Skip to content

Instantly share code, notes, and snippets.

View sughodke's full-sized avatar

Sid Ghodke sughodke

  • San Jose, California
View GitHub Profile
@sughodke
sughodke / ExportStocksWatchlist.scpt
Created April 12, 2021 15:32
Export your watchlist from Stocks.app
(*
Exports the Stocks.app watchlist
This script will use system events to read the window title of the Stocks App and press the up arrow to move to the next stock. The title contains the stock ticker and recent price. This is appended to a running list and is returned at the end of the run. Currently only 90 stocks are returned per run.
Future: Terminate script when the value being appended is the same as last value.
*)
@sughodke
sughodke / SXSW Pitch Template.md
Last active August 3, 2018 02:19
I saw an interesting SXSW On-stage Pitch, I wanted to reform it as a template

hi I am (first name) and the co-founder and CEO of (company name)

1. question for the audience

tell me who is good has ever participated in a clinical trial

2. the answer shows the problem

I cannot see anything so

@sughodke
sughodke / README.md
Created June 5, 2018 05:57
Typespeed for Subreddits

Copy words.reddit into your typespeed words directory. On Ubuntu that is /usr/share/typespeed/words/.

@sughodke
sughodke / scrape_ec2.py
Created May 31, 2018 23:01
Scrape current EC2 pricing data from Amazon Web Services catalog (Original powdahound/ec2instances.info)
#!/usr/bin/env python
import requests
import json
from json import encoder
import sys
def add_pretty_names(instances):
family_names = {
't2': 'T2 General Purpose',
@sughodke
sughodke / Output.png
Last active December 11, 2023 20:30
Read Mail.app Database
Output.png
@sughodke
sughodke / February-15-2018.Output.csv
Last active March 16, 2018 00:37
Get current processing times for all USCIS centers
Application for Certificate of Citizenship Application for Naturalization Application to Register Permanent Residence or Adjust Status City ID Last Updated State
April 23, 2017 June 14, 2017 April 21, 2017 Albany 11 February 15, 2018 NY
August 1, 2017 May 22, 2017 April 21, 2017 Albuquerque 4 February 15, 2018 NM
June 18, 2017 May 1, 2017 June 1, 2017 Anchorage 15 February 15, 2018 AK
March 25, 2017 February 7, 2017 December 15, 2016 Atlanta 22 February 15, 2018 GA
December 5, 2016 February 17, 2017 December 6, 2016 Baltimore 24 February 15, 2018 MD
August 1, 2017 June 18, 2017 September 1, 2017 Boise 40 February 15, 2018 ID
November 15, 2016 June 16, 2017 April 6, 2017 Boston 41 February 15, 2018 MA
April 4, 2017 June 30, 2017 May 31, 2017 Buffalo 47 February 15, 2018 NY
August 1, 2017 January 14, 2017 December 21, 2016 Casper 80 February 15, 2018 WY
@sughodke
sughodke / learn_binary.py
Created January 14, 2018 03:01
Train an Estimator to learn how to encode any integer to binary
"""
Train an Estimator to learn how to encode integer to binary
"""
import numpy as np
X = np.array([
[1, -1], [1, 0], [1, 1],
[0, -1], [0, 0], [0, 1],
[-1, -1], [-1, 0], [-1, 1],
@sughodke
sughodke / .block
Last active January 5, 2018 22:41 — forked from mbostock/.block
Animated Ulam Spiral
license: gpl-3.0
height: 960
@sughodke
sughodke / README.md
Last active January 5, 2018 22:26 — forked from mbostock/README.md
Ulam Spiral Quadtree 1

Ulam Archamedial Spiral

Ulam Spiral is a way of visualising prime numbers. We start with 1 in center and continue writing numbers in a rectangular spiral. Above, numbers in yellow are prime numbers. The spiral can be thought to demonstrate prime numbers form patterns.

Ulam Spiral Wikipedia page

Numberphile Youtube video

Adapted from Mike's Quadtree demo

@sughodke
sughodke / knapsack.py
Last active January 3, 2018 00:46
Production Ready Knapsack
# SG: Modified to produce Markdown output
#
# This file is part of DEAP.
#
# DEAP is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# DEAP is distributed in the hope that it will be useful,