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
\documentclass[12pt, twoside]{report} | |
\usepackage[a4paper,width=150mm, top=25mm, bottom=25mm, bindingoffset=6mm]{geometry} | |
\usepackage{minted} | |
\usepackage{caption} | |
\usepackage[backend=biber,style=numeric,hyperref=true]{biblatex} | |
\setlength{\parindent}{1em} | |
\setlength{\parskip}{1em} | |
\raggedbottom | |
\begin{document} |
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 time | |
import random | |
import asyncio | |
from ib_insync import * | |
from collections import namedtuple | |
LiveFuturesSettings = namedtuple('LiveFuturesSettings', | |
'tickers, exchange, bar_size, whatToShow, influx_measurement, log_filename,') |
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
from ibapi.wrapper import EWrapper | |
from ibapi.client import EClient | |
from ibapi.contract import Contract as IBcontract | |
from threading import Thread | |
import queue | |
import datetime | |
import time |
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 QuantLib as ql # version 1.5 | |
#import matplotlib.pyplot as plt | |
#%matplotlib inline | |
# option data | |
maturity_date = ql.Date(1, 6, 2018) | |
spot_price = 2720 | |
strike_price = 2725 | |
volatility = 0.13 # the historical vols for a year | |
dividend_rate = 0.0 |
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
count_outcomes_by_condition <- function(my_data, cond){ | |
ret = apply.weekly(na.omit(my_data), function(r){sum(eval(parse(text=cond)))}) | |
names(ret)[1] = cond | |
return(ret) | |
} | |
xts2df <- function(x) { | |
res_qqq_df = xts2df(res_qqq) | |
data.frame(date=index(x), coredata(x)) | |
} |
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
class EditableCell extends React.Component { | |
state = { | |
value: this.props.value, | |
editable: this.props.editable || false, | |
}; | |
componentWillReceiveProps(nextProps) { | |
if (nextProps.editable !== this.state.editable) { | |
this.setState({ editable: nextProps.editable }); | |
if (nextProps.editable) { | |
this.cacheValue = this.state.value; |
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
{ | |
"__schema":{ | |
"queryType":{ | |
"name":"Query" | |
}, | |
"mutationType":{ | |
"name":"MyMutations" | |
}, | |
"subscriptionType":null, | |
"types":[ |
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
upstream chronograf { | |
server influxdb.service.consul:8888; | |
} | |
upstream rabbitmq { | |
server rabbitmq.service.consul:15672; | |
} | |
upstream airflow { | |
server airflow.service.consul:8889; |
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
... | |
class URLPrefixMiddleware(object): | |
def __init__(self, app, prefix=''): | |
self.app = app | |
self.prefix = prefix | |
def __call__(self, environ, start_response): | |
if environ['PATH_INFO'].startswith(self.prefix): |
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
siakhnin@mac-korbel21:~/Documents/workspace/butler/provision/terraform/collaboratory/salt-master$ terraform apply -var-file ../collaboratory_credentials.tfvars | |
2017/01/12 20:57:42 [INFO] Terraform version: 0.8.4 a791ff09b29d063dd4b6da0cac04ad3b83c836f5 | |
2017/01/12 20:57:42 [INFO] CLI args: []string{"/Users/siakhnin/Documents/workspace/go/bin/terraform", "apply", "-var-file", "../collaboratory_credentials.tfvars"} | |
2017/01/12 20:57:42 [DEBUG] Detected home directory from env var: /Users/siakhnin | |
2017/01/12 20:57:42 [DEBUG] Detected home directory from env var: /Users/siakhnin | |
2017/01/12 20:57:42 [DEBUG] Attempting to open CLI config file: /Users/siakhnin/.terraformrc | |
2017/01/12 20:57:42 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2017/01/12 20:57:42 [DEBUG] Detected home directory from env var: /Users/siakhnin | |
2017/01/12 20:57:42 [DEBUG] New state was assigned lineage "f6c68402-6178-44d5-8809-a7d75fcb98cd" | |
var.salt_master_ip |
NewerOlder