Skip to content

Instantly share code, notes, and snippets.

View k-funk's full-sized avatar

Kevin Funk k-funk

  • San Francisco, CA
View GitHub Profile
@k-funk
k-funk / README.md
Last active December 16, 2015 22:20
CS 686 Final Project

US FOREIGN MILITARY ASSISTANCE: 1947-2011#

####Values are in constant dollars (adjusted for inflation). Part of 1976 omitted, "fiscal year" months changed.####

###Data Source:### https://explore.data.gov/Foreign-Commerce-and-Aid/U-S-Overseas-Loans-and-Grants-Greenbook-/5gah-bvex This data set contains the amount of US Dollars spent on military foreign aid, per country, for each year (1947-2011) The dataset has been altered in the following ways: Converted to .json, added the total foreign aid from all countries for a given year, and added 3 letter country codes for geospacial mapping references. JSON structure: {foregin aid[year,total_aid,countries{country name, country code, foreign aid received}]} I chose this data to visualize because it gives insight as to the US's rapidly changing policy on foreign aid for the past 60 years. Also, being able to visually see which countries are receiving the most money is informative as to the country's affairs of that year.

@k-funk
k-funk / scrape_google_photos_album.py
Last active November 2, 2022 13:40
Scraping Google Photos Public Album
# inspired by https://medium.com/p/d49f037c8e3c/responses/show (hopefully the regex is updated there when this one breaks)
# also exists as a django-cms plugin at https://github.com/k-funk/djangocms-scrape-google-photos-album
import logging
import re
import requests
logger = logging.getLogger(__name__)
import fetch from 'node-fetch'
import express, { Request, Response } from 'express'
import * as dotenv from 'dotenv'
import bodyParser from 'body-parser'
dotenv.config()
const redirectUri = 'http://localhost:5010/oauth/linearCallback'
const AuthorizationHost = 'https://linear.app'