Skip to content

Instantly share code, notes, and snippets.

@aaraza
aaraza / unfollowers.py
Last active August 14, 2025 19:03
Instagram follower analysis. Determine who doesn't follow you back.
import json
import os
FOLLOWING_FILE_PATH = f"/Users/{os.getlogin()}/Downloads/connections/followers_and_following/following.json"
FOLLOWER_FILE_PATH = f"/Users/{os.getlogin()}/Downloads/connections/followers_and_following/followers_1.json"
following = []
for i in json.load(open(FOLLOWING_FILE_PATH))["relationships_following"]:
following.append(i["string_list_data"][0]['value'])
" Author: Ali Raza
" GitHub: aaraza
" Basic Setting
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
set mouse=a
set textwidth=500
set lbr

Week 1

  • Hypothesis Function: model. Function that predicts desired value based on provided parameters. h(x) = y
  • Cost Function: Determines how effective a model is by analyzing how acurately it predicts an already labeled set
  • Gradient Descent: Minimizes the cost function by finidng the best value for parameters

On gradient descent intuition

@aaraza
aaraza / jupyter-unit-tests.ipynb
Created December 20, 2018 00:43
example on how to run unit tests in jupyter
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aaraza
aaraza / machine-learning.md
Last active December 12, 2018 17:24
Basic Machine Learning Definitions
  • Precision: What proportion of positive identifications were correct
  • Recall: What proportion of actual positives were identified correctly

Source: https://developers.google.com/machine-learning/crash-course/classification/precision-and-recall

  • Regression: Statistical technique that attempts to predict the value of something when the value is a continious unit (i.e. Stock price, tempreture)

Source: https://www.quora.com/What-is-regression-in-machine-learning

  • Supervised Learning: Given a trained data set (one where both the depenedent and independent variables are labeled), supervised learning builds models that will predict the dependent variable off a function of the independent variables for new input
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
@aaraza
aaraza / google-fonts.html
Created July 27, 2018 16:08
Example google font import for font Lobster
<link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
git diff-tree --no-commit-id --name-only -r 124c96b1e8d9c4335ef92e514a7a4d36b770977d > mine
git diff-tree --no-commit-id --name-only -r 20dd1d55359c3a7f5ecfd48dc6b59405d54776a9 > blr