Skip to main content


Showing posts from October, 2018

[PART 4] NuTracker, ReactJS application - Finish Dashboard Read functionality

In the previous part we added the first call to the async api to do search, now we will build on that to call more apis, and to add more components on the page to finish up the Display flows (i.e. what doesn't require writes / forms) : search this allows the user to find a specific food and choose to add an entry for it to their day to record that they consumed a specific portion of that food. show entries This feature is to allow users to see what they recorded as a list of entries, each entry represents a food the user added on a specific date. show progress bars The user will be able to set goals like how many calories, proteins, fats they want to consume daily and these bars will calculate from the entries they added how close they are to their daily goals reload entries & progress metrics when date change  This is to provide the ability for the users to go back in history and see their entries. all this is in general similar to the steps I did before:

Using Windows 10 built in bash to ssh to ec2 instance

Using Windows 10 built in bash to ssh to ec2 instance detailed steps to install bash on windows here: Summary: 0- enable windows subsytem for linux 1- open cmd 2- type bash 3- accept and create a unix user account 4- wait to finish 6- you may need to reboot reopen cmd and type bash, you should see your cmd prompt changed. 5- to ssh to ec2 you need .pem key file that you download when you create the instance 6- copy that file under /home or something else but not under /mnt/* (windows files) because the next step will not work, the file has to be in a linux directory (bash in windows can't change windows files permissions) 7- we have to run this command : $ chmod 400 pem_file.pem because otherwise you will get an error that this key permissions are too open (not secure enough). 8- the command is ssh -i "pem_file.pem" ec2-user@123.456.897  (replace the pem file name and ip with your values). now yo

Online IDE :)

I stumbled upon this neat online IDE , where you can : - instantly start, share and run code - use npm dependencies and install what you need quickly - you can drag drop files from your computer I'm yet to explore it but seems very promising it also has a neat feature to embed itself in blogs like this one so that's awesome because now I can show live examples of running code and share them with my readers ! all I had to do is include an iframe with url to my test project on their website this is an example of a react project   :) Kudos to the people who create this cool stuff and share with us !

Gensim NLP and TF-IDF document search example

In this blog I'll try to use an NLP (Natural language processing) library to get to: - know some basic concepts and - try to search a data set of books metadata (author, title, summary) to respond to user query Setup  you need: - Anaconda (python environment management tool), get it here Anaconda works by creating an isolated installation of python with the packages needed and it won't affect other environments so you can run different versions of python and other python libraries without conflicts - code: - setup the environment (in shell window or in anaconda prompt) run: conda create gensim_env python=3.5 gensim nltk jupyter this will install the packages needed - navigate to the code directory, run: jupyter notebook this will open the server web page and you can select the notebook that we need now : gensimWord2Vec Code