View index.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View ipynb_custom.css
<link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400,500,700,800,
900,100italic,300italic,400italic,500italic,700italic,800italic,900italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:300,400' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Crimson+Text' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Kameron' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:200' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:300' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:400' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
View NYSE_tradingdays.py
from dateutil import rrule
import datetime
# Generate ruleset for holiday observances on the NYSE
def NYSE_holidays(a=datetime.date.today(), b=datetime.date.today()+datetime.timedelta(days=365)):
rs = rrule.rruleset()
# Include all potential holiday observances
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth=12, bymonthday=31, byweekday=rrule.FR)) # New Years Day
View apmonitor.m
% APMONITOR A class for processing APMonitor models on a remote server.
%
% SYNOPSIS
%
% apmonitor(server)
% Initializes an APMonitor application on a remote server and
% returns an object with methods to upload, solve, and download
% application data. Results in an error if the server does not
% respond.
View standalone.tpbuild
#!/bin/bash
# Texpad build (.tpbuild) for standalone
pdflatex "$TEXPAD_ROOTFILE"
convert -density 300 "$TEXPAD_ROOTFILE_NO_EXT".pdf "$TEXPAD_ROOTFILE_NO_EXT".png
rm "$TEXPAD_ROOTFILE_NO_EXT".aux
rm "$TEXPAD_ROOTFILE_NO_EXT".log
View stock.m
% STOCK A Matlab class for obtaining quotes from Yahoo Finance.
%
% SYNOPSIS
%
% stock(symbol,speriod,sfreq)
% Creates an object for the current quote and historical prices for
% the stock denoted by SYMBOL.
%
% symbol String or cell array of strings denoting desired stocks.
%
View displaytable.m
function str = displaytable(A,rnames,cnames,fmt,tableformat,fname)
% DISPLAYTABLE Convert a matrix to a printable table.
%
% STR = DISPLAYTABLE(A,RNAMES,CNAMES,FMT,TABLEFORMAT,FNAME)
% Formats a matrix as a table with row and column labels. The result is
% a string that will print as a formatted table. Useful labeling and
% annotating computational results.
%
% REQUIRED PARAMETERS
View molweight.m
function mw = molweight(varargin)
% MOLWEIGHT Computes the molecular weights for a set of chemical species.
%
% SYNTAX
%
% mw = molweight(formula)
% mw = molweight(species)
% mw = molweigth(r)
%