Skip to content

Instantly share code, notes, and snippets.

View joshterrill's full-sized avatar

Josh Terrill joshterrill

View GitHub Profile
@joshterrill
joshterrill / Fast.ai install script
Created October 19, 2018 17:51 — forked from gilrosenthal/Fast.ai install script
Fast.ai Install on Google Colab
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@joshterrill
joshterrill / ticker.py
Created January 8, 2018 06:04 — forked from Krewn/ticker.py
python 3 Stock Ticker with colored text and percent gain since last seen. Requires connection to Yahoo finance API .Includes indices for s&p 500 and NASDAQ
from termcolor import colored
_title = colored("----.----.----^", 'green')
print(_title)
InteractiveVersion = """"""
tickerQ= input('ticker?')
stockGroupSelection = input('Selection(snp | nasdaq):')
stockGroupSelection=stockGroupSelection.lower()
commandLineVersion="""
@joshterrill
joshterrill / US Zip Codes from 2013 Government Data
Created November 15, 2017 23:57 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993
var express = require("express"),
http = require("http"),
async = require("async"),
sockjs = require("sockjs"),
uuid = require("uuid"),
url = require("url"),
redis = require("redis"); // for pubsub and to persist data if your app restarts
var app = express(),
redisClient = redis.createClient(),