Skip to main content

Posts

Artist got automated

Here is my first Tensorflow run to convert images to different styles of famous painters I am using the code that is available at  https://github.com/lengstrom/fast-style-transfer It uses specific versions of below libraries !apt install ffmpeg !pip install tensorflow==0.12.1 !pip install numpy==1.11.2 !pip install scipy==0.18.1 !pip install pillow==3.4.2 I started with latest version and that triggered failure after failure. If you are like me, add below changes to their respective files #This is to make tensorflow behave as if it is in v1 File : evaluate.py and ./src/transform.py import tensorflow.compat.v1 as tf tf.disable_v2_behavior() #Image functions are removed from scipy.misc module. so use imageio instead import imageio scipy.misc.imsave(out_path, img) --> imageio.imwrite(out_path, img) img = scipy.misc.imread(src, mode='RGB') --> img = imageio.imread(src, pilmode='RGB') Refer this post on more details on imageio changes Here is the ...

Covid19 - Travel restrictions and Impact on Auto Insurance Industry

This post intended to track impact on Auto Insurance Industry due to Travel restrictions. As of 4/6, All State and America Family insurance companies announced to reduce premiums and return payments already made. ValChoice , a data analytics companies estimating 70% savings by updating your change mode of transport from commute to pleasure driving. Irrespective of whether your Insurance provider transfers any savings in claims to individuals or not, since we arent driving much, it may be a good idea to change policy coverage to state minimum and reduce premium reduction immediately. If things change, you start driving again, Remember, you can always update your policy coverage.

Covid19 mitigation strategy

As anticipated Lock downs aren’t a viable solution for long. Across the worlds, all Govt feel pressure to lift restrictions. Below is a strategy addressing it End Goal : No Active cases of people infected with COVID19 in the community or everyone in the community are Recovered Stage 1 A new infectious virus is identified outside community. No known infection in the community ( Measure : first case reported date) All the travel from outside to the community is restricted ( Measure : data of restrictions) All incoming people are screened for virus infection and quarantined immediately ( Measure : Screening / Testing strategy) Stage 2 : Contact tracing People travel from outside the community, found to be Virus infected later on. Contact tracing begins. All the people in contact with infected persons are quarantined for testing. Contact tracing goes for people of indirect contact and Restrictions put in places where the infected person may have travelled w...

Understanding Covid19

Test, Trace and Isolate  Some articles / videos that helped me understand Covid19 better are documented here for others Read Peter Kruger 's answer to Why is COVID-19 considered a deadly virus even though only 15,000 people have died? on Quora Want to see the true potential impact of ignoring social distancing? Through a partnership with @xmodesocial , we analyzed secondary locations of anonymized mobile devices that were active at a single Ft. Lauderdale beach during spring break. This is where they went across the US: pic.twitter.com/3A3ePn9Vin — Tectonix GEO (@TectonixGEO) March 25, 2020 Effectiveness of local lock down and closing down boarders Read John Light 's answer to Some researchers are indicating that the epidemiology of COVID-19 is following a graph-theoretic "small world" model rather than a classic exponential model; do you agree, and how does this bode for the disease progression in the U.S.? on Quora Expl...

My Thoughts on Corona virus #COVID19

Based on Corona virus ability to stay undetected (with no symptoms) while keep spreading is going to keep this virus alive for a long time to come . Let that sink for a min As we dont have a cure yet, social distancing, can only slow down its spread but cant eradicate it completely. If social distancing sounds too silly for you, check this video to understand how effective it is. So its not IF but WHEN , one is going to be infected . By practicing social distancing, we are effectively buying more time and protecting someone vulnerable, could be our loved one. During this time, lets hope More people dont get infected, crushing Medical infrastructure Virus dont mutate into some other form Get a cure to the virus or a vaccine (with mild virus) to train our immune system. -------------------------------------------------- On consequences Of those infected, elderly and folks with weak immune system are most at life risk. Remaining others will get recover...

Weight loss - Muscle building - Protein

Why you need Protein ? Thermogenesis is the natural increase in the energy your body uses after eating. Protein causes a  higher rate of dietary thermogenesis  than other nutrients — research in the  Nutrition & Metabolism  journal explains that eating protein can actually allow the body to blast through up to  20-30% more calories than carbohydrates or fat The government recommends that the baseline requirements for adults is 0.75g of dietary protein per kilogram of bodyweight per day To  maximize muscle growth , research from the  Journal of Sports Sciences  recommends consumption of between: 1.3-1.8g per kilogram of bodyweight per day  (the amount between these two points depends on training status) and; Up to  1.8-2g per kilogram of bodyweight per day during periods of energy restriction  to prevent muscle loss – more than double the government recommendations. I think in general it would be better to m...

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/

Upa Yoga

Howdy Modi - Uniting Indian Diaspora

As a NRI living in US, I used to various associations like Gujarathi, Tamil, Telugu, Telangana associations etc., But when India was bad mouthed in Western press after Article 370 removal on behalf of Muslim brotherhood, felt like need of United Indian voice. While Pakistani officials spread rumors in Twitter, they kept debunked by various fact finding organizations. But voice isnt enough to make it to main stream media. Refer On the other hand, India as a nation is so diversified , that each state has its own culture, norms, cousins. Traditionally these differences kept Indians abroad apart coming under one umbrella. Since there is no external uniting force, looks like Modi has taken it upon himself to bring all onto one platform. As per 2015 estimates, around 1.5Million are Indian Americans with voting rights. Refer  https://aapidata.github.io/quick_stats/national_data.html and another 300K are pending with approved green card petitions. While these folks are star...