Lecture 1: Introduction to Research — [📝Lecture Notebooks] [
Lecture 2: Introduction to Python — [📝Lecture Notebooks] [
Lecture 3: Introduction to NumPy — [📝Lecture Notebooks] [
Lecture 4: Introduction to pandas — [📝Lecture Notebooks] [
Lecture 5: Plotting Data — [📝Lecture Notebooks] [[
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://scipy-cookbook.readthedocs.io/items/KalmanFiltering.html | |
# https://github.com/pykalman/pykalman | |
import pandas as pd | |
from pykalman import KalmanFilter | |
import numpy as np | |
def rolling_window(a, step): | |
shape = a.shape[:-1] + (a.shape[-1] - step + 1, step) | |
strides = a.strides + (a.strides[-1],) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util=require('util') | |
var WebSocketClient = require('websocket').client; | |
var client = new WebSocketClient(); | |
var conn = null | |
var received = false | |
client.on('connectFailed', function(error) { | |
console.log('Connect Error: ' + error.toString()); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from random import random | |
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*100 | |
pdata = pd.DataFrame({"a":flow, "b":flow}) | |
pdata.b = pdata.b.shift(9) | |
data = pdata.iloc[10:] * random() # some noise | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var newGridCellValue = '', | |
deleteGridCellValue = false; | |
Ext.define('ExcelCellEditing', { | |
extend: 'Ext.grid.plugin.CellEditing', | |
alias: 'plugin.excelcellediting', | |
initEditTriggers: function () { | |
var me = this; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, string, urllib | |
GROUPS = dict([('ags','ftp://ftp.cmegroup.com/pub/settle/stlags'), | |
('rates','ftp://ftp.cmegroup.com/pub/settle/stlint'), | |
('fx','ftp://ftp.cmegroup.com/pub/settle/stlcur'), | |
('nymex','ftp://ftp.cmegroup.com/pub/settle/stlnymex'), | |
('comex','ftp://ftp.cmegroup.com/settle/stlcomex'), | |
('clearport','ftp://ftp.cmegroup.com/settle/stlcpc')]) | |
# month codes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svmComputeOneForecast = function( | |
id, | |
data, | |
response, | |
startPoints, | |
endPoints, | |
len, | |
history=500, | |
trace=FALSE, | |
kernel="radial", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
jQuery templates use constructs like: | |
{{if condition}} print something{{/if}} | |
This, of course, completely screws up Django templates, | |
because Django thinks {{ and }} mean something. | |
Wrap {% verbatim %} and {% endverbatim %} around those | |
blocks of jQuery templates and this will try its best |