Skip to main content

Posts

Installing R on Ubuntu 19.10

Download R Source code from https://cran.rstudio.com/index.html extract the .tar.gz file to a location gzip -dc R-x.y.z.tar.gz | tar -xf - current sources for the recommended packages, which can be obtained by rsync or downloaded from CRAN. To use rsync to install the appropriate sources for the recommended packages, run ./tools/rsync-recommended from the top-level directory of the R sources. Install necessary packages to add repository over HTTPS sudo apt install apt-transport-https software-properties-common Add CRAN external repository sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/' edit /etc/apt/sources.list and remove comments for deb-src for line containing cran35/ (mostly last line of this file) execute sudo apt-get update to read the sources files. Install package dependencies using sudo apt-get...

My algorithmic Trading journey

Like many i used to manually watch and trade stocks, ETFs. Its non-productive and involves our emotions in trading decisions. So I wanted to automate trading. Initially used Trailing Stop and Limit orders. But they can automate only in a prescribed way. I started thinking about a way to trade programatically, where we have more control. My quest pointed to Zipline, a python algorithmic trading library. It support backtesting (testing algorithm with historic data) and most importantly supports live trading In this blog, I will walk you through my algorithmic trading journey. Zipline Installation From  https://www.zipline.io/index.html , I see it only supports python 2.7 or Python 3.5 Since python 2 was sun set on Jan 1 2020, there is no point in trying it. I went ahead with Python 3. For programming, installed latest Ubuntu 19.10 in a virtual machine . Ubuntu 19.10 comes bundled with Python 3.7.5. You can check your python version by typing python3  -V ...

OnePlus 6T - Android 10 (OOS 10)

Its been more than 3 months since August security patch update. Out of curiosity I checked Oxygen Updater. To my surprise, Oxygen OS v 10 (based on Android 10) is available. Since this is a stable release, i went head and updated it. Its ended up being a buggy release. For those of you, who didnt get update over OTA, its better to wait for OOS 10.1. Here are the list of issue and the workarounds. Issue #1 :  Phone randomly restarts and then goes to boot loop Workaround : when the phone stuck in boot loop (with OnePlus logo animation), Press Power Button and Volume Down button to restart it Issue #2 : Google play wont work Work Around : Booting to recovery and clearing cache is expected to fix this. will update after testing To booting to recovery, Firstly, turn off your phone: press and hold the Power button for a while or press the Power key once and choose ‘power off’. Once the switch off process is completed start pressing and also holding down the Volume Dow...

[SOLVED] - Netgear Router R7800 - Access control

Issue: Netgear Router R7800 (firmware version  V1.0.2.62 )   with access control by default blocking access to new devices, is blocks access to new devices but when we allow access to newly blocked device, Router wont allow access and still blocks internet access to device. Solution / Work around 1. Access "Access control" itself is a challenge as Router keeps asking for authentication. Solution is to navigate to "access control" page from Advanced --> Security --> Access Control. This wont prompt for authentication again 2. Once you connect a new device, it will be blocked by default. Currently allowing access though the "Allow" button doesn't help. 3. To connect the device follow below steps Turn off Wifi on new device. It disconnect the device from Router and moves the entry of the device to " View list of blocked devices not currently connected to the network" Copy the mac address of the new device and ...

Investing in Gold

Like many, I keep hearing about looming recession and Gold as a hedge. But how exactly gold is going to help me and if yes, how to invest is something running behind my mind.  So here is my work on it and hope it helps you too. Why Invest in Gold ?  Fiat currency we are holding is loosing its value at the rate of inflation. But before fiat currency, gold is the standard. Based on current technology, its difficult to extract gold. so in the demand vs supply equation, supply cant balloon like central banks printing money at their will. so i dont need to worry about Gold loosing its value over time. On Supply part, As per World Gold Council estimate 190,040 metric tones extracted and another 54000 metric can be extracted from ground. Refer :  https://www.gold.org/about-gold/gold-supply/gold-mining/how-much-gold On the Demand part, Below are the key drivers of Gold demand Source: Thomson Reuters GFMS, World Gold Council As an investment, From individu...

Manual to living a Human Life - How to poop properly

Years ago, I had a question "is there a manual explaining how to use my (Human) body? " Pursuit of this question send me in different directions. In this post, I will talk about "How to poop properly?" what is the right way ? Before get into it, Why now ? My daughter going through potty training. She naturally prefers Indian style full squat. This initially puzzled me as she newer knew about this way and also this is against what she is seeing / observing in Potty training videos and what is being taught at school. Being born in India, crouching is the way for us. Now being in western world, forcing my daughter against her natural will, makes me feel guilt. So i started searching about what is the right thing to do. Came across  Dov Sikirov who researched on Human Digestive diseases. In his 2013 article (refer  https://link.springer.com/article/10.1023/A:1024180319005 ) he studied straining forces applied when sitting or squatting dur...

Windows webscrapper - Parsehub

Pros web scrapping methodology very user friendly Control - Correct - Command method using in build ML Cons While using Desktop app, it is very slow. Not sure if Browser with in Desktop app running from local machine or Parsehub server. This will be a concern while passing login credentials to scrap secured data Some interesting Parsehub blog posts https://www.parsehub.com/blog/scrape-twitter-tweets/ https://www.parsehub.com/blog/ https://www.parsehub.com/blog/mining-tweets-for-sentiment-analysis-part-1/ https://www.parsehub.com/blog/mining-tweets-for-sentiment-analysis-part-2/ https://www.parsehub.com/blog/portia-vs-parsehub-comparison-which-alternative-is-the-best-option-for-web-scraping/ https://www.parsehub.com/blog/parsehub-vs-scrapy-comparison-which-alternative-is-better-for-web-scraping/ https://www.parsehub.com/blog/parsehub-vs-import-io-which-alternative-is-better-for-web-scraping/