Skip to content

Instantly share code, notes, and snippets.

View joshterrill's full-sized avatar

Josh Terrill joshterrill

View GitHub Profile
{
"assets": [
{
"id": "image_0",
"w": 8000,
"h": 1467,
"u": "images/",
"p": "img_0.png"
},
{
@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
@joshterrill
joshterrill / shortcode.js
Created November 27, 2017 01:40
shortcode minus jquery
/*
* shortcode.js 1.1.0
* by @nicinabox
* License: MIT
* Issues: https://github.com/nicinabox/shortcode.js/issues
*/
/* jshint strict: false, unused: false */
var Shortcode = function(el, tags) {
@joshterrill
joshterrill / straight-lines.py
Created December 27, 2017 03:23
lane detection example
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import cv2
import math
def region_of_interest(img, vertices):
mask = np.zeros_like(img)
match_mask_color = 255 # <-- This line altered for grayscale.
@joshterrill
joshterrill / single-left-right-lane.py
Created December 27, 2017 03:26
lane detection example
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import cv2
import math
def region_of_interest(img, vertices):
mask = np.zeros_like(img)
match_mask_color = 255 # <-- This line altered for grayscale.
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@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 / javascript-programming-cheat-sheet.md
Last active April 27, 2018 02:42
Javascript Programming Cheat Sheet

Programming Cheat Sheet

Javascript Types

  • Strings are defined by encompassing text inside of single or double quotes.
    • let myString = 'some string goes here'
  • Numbers are defined by creating a variable and putting a number in it. It can also have decimal points.
    • let myNumber = 443
  • Arrays are lists of things that are defined by putting items in between square brackets
    • let myArray = [1,2,3,4]
@joshterrill
joshterrill / README.md
Created June 13, 2018 08:12
OpenPGP.js browserify javascript methods
  1. Install browserify
npm install -g browserify
  1. Save the pgp.util.js contents to a file.

  2. Run browserify ./pgp.util.js -o ./openpgp.bundle.js

{
"name": "usda-ingredients-api",
"version": "1.0.0",
"description": "a REST API for pulling ingredients given a UPC code from ndb.nal.usda.gov",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",