Skip to content

Instantly share code, notes, and snippets.

@canada4663
canada4663 / yql_custom
Created November 17, 2013 22:06
Custom YQL Query Example
#Custom YQL Query Pointing at Unpublished XML via github
# "balancesheet" can be replaced with incomestatement or cashflow to get those reports
use "https://raw.github.com/canada4663/yql-tables/master/yahoo/finance/yahoo.finance.balancesheet.xml" as yahoo.finance.balancesheet;
select * from yahoo.finance.balancesheet where symbol="T";
#For Annual data
select * from yahoo.finance.balancesheet where symbol="T" and timeframe="annual";
#Once yql-tables pull request is completed, you can eliminate the "use..." portion and point directly at yahoo.finance.balancesheet
@canada4663
canada4663 / option_parser.py
Created January 19, 2014 16:39
Simple Method for Parsing Stock Option Symbols into Underlying, Expiration Date, Option Type, and Strike Price
def _parse_option(self,symbol):
#option_format = r'''
# ^([\D]{1,6})
# ([\d]{2})
# ([\d]{2})
# ([\d]{2})
# ([PC]{1})
# ([\d]{5})
# ([\d]{3})
# $'''
<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>WRF Sermon Podcast</title>
<link>https://gist.githubusercontent.com/canada4663/fbe27bdd3563b77d6527/raw/95f4095bcdaaed18d2d411b11b0ac18b25509beb/wrf.rss</link>
<description>Sunday Sermons from White Rock Fellowship Dallas</description>
<atom:link href="https://gist.githubusercontent.com/canada4663/fbe27bdd3563b77d6527/raw/95f4095bcdaaed18d2d411b11b0ac18b25509beb/wrf.rss" rel="self"/>
<docs>http://www.rssboard.org/rss-specification</docs>
<generator>python-feedgen</generator>
<language>en-US</language>
<lastBuildDate>Sun, 28 Jun 2015 19:45:32 +0000</lastBuildDate>