Twitter Streaming and Analysis

Following gist may be used as a reference to stream twitter data into PostgreSQL database. Data is then queried from the database and preprocessed before performing NLP Sentiment Analysis.

Read More

Pandas Excel Analysis

Python Pandas Excel Data Analysis of Network Tickets. The code reads in an Excel file, performs analysis as needed and outputs the analysis data to another Excel file. The generated file is intended to be ingested into Power BI for visualization. Following packages will be needed:

  • pandas
  • matplotlib
Read More

Algorithms

While studying algorithms recently, coded basic implementations of Binary Search, Selection Sort, Quicksort and Dijkstra’s algorithm in Python. Please see the repository link below and feel free to clone and extend. I plan to add more algorithms and revise the existing code sometime in future.

Read More

Tensorflow Fashion MNIST CNN

Fasion dataset used in the previous post was trained with a CNN. Note 99% training accuracy but test accuracy is 90%. This may be due to overfitting which will be discussed in a later post. Please stay tuned.

Read More

VSCode Code Runner 'ModuleNotFoundError'

In case you receive an error similar to the one as depicted below in Visual Studio Code while trying to run Python code in a xxx.py file, using the “Run Code” button on the top right hand side of the code window, then please use following process to resolve the issue.

Read More

Numpy & Pandas Quick Reference

Instead of long-winded explanations, I’ve created following Numpy and Panadas quick reference gists so that code and output are available in-place. These should serve as a quick reference to anyone working with these libraries.

Read More

ML - NY Cheap Rentals Notebook

ML - NY Cheap Rentals Notebook was uploaded to Github. This Jupyter notebook uses following Python modules:

  • Pandas
  • Google Geocoder
  • Patsy
  • Statsmodels OLS (ordinary least squares) model
Read More

A Concise Guide to Git from Command Line

  • Go to the git website and download git for your operating system
  • Open the command line terminal on your machine and execute following commands. I will be using commands specific to the default OSX terminal. Please use the corresponding file system commands for your operating system.
    • pwd to “print working directory”. This will show your current directory.
    • In case you will like to create git repository under another directory, use the cd command to navigate to that directory
    • Use mkdir to create new directory under the main directory. This will be your local git repository
    • Use cd to navigate to the new directory. Currently, this directory does not have any files. So, create a file using touch filename.ext. Please substitute ‘filename’ with your own filename and ‘ext’ with the file extension. It can be any valid filename and extension, for example, txt, rtf, java, swift, js etc.
  • To clone a remote repository on to your machine locally, you can use git clone <repository_url> or fork another repository. See Fork a repo and  Pull Request Tutorial for details
  • Now, if you execute the git command without any parameters, it will provide you with the command usage details
  • In case you intend to exclude certain files or directories from the git process, create the .gitignore file (see details below)  before executing any git commands, as any files or directories that preexisted in the local git repository prior to creation of the .gitignore file will not be ignored. I usually prefer to execute following command before initializing a local git repository:

    echo "# repository-name" >> README.md
    touch LICENSE
    touch .gitignore
    open .gitignore
     (Use this command to edit the file)

Read More