Skip to content

Instantly share code, notes, and snippets.

View jamesevers's full-sized avatar

Jamie jamesevers

  • Apple
  • New York
View GitHub Profile
@jamesevers
jamesevers / currency_converter.py
Created October 18, 2015 15:51
a currency converter that uses the yahoo finance API to find exchange rates
import urllib2
import json
def currencyConverter(from_value,target_value,currency_quantity):
yahoo_exchange_url = "https://query.yahooapis.com/v1/public/yql"
yahoo_query = 'select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20("'+currency_from+currency_to+'")'
yql_query_url = yql_base_url + "?q=" + yql_query + "&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys"
try:
yql_response = urllib2.urlopen(yql_query_url)
try:
yql_json = json.loads(yql_response.read())
@jamesevers
jamesevers / guardian_gaza.ipynb
Last active September 3, 2015 00:22 — forked from darribas/guardian_gaza.ipynb
A IPython Notebook to analyze the Gaza-Israel 2012 crisis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.