Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -*- coding: UTF-8 -*- | |
| import ezibpy | |
| import time | |
| # initialize ezIBpy | |
| ibConn = ezibpy.ezIBpy() | |
| ibConn.connect(clientId=1234, host="localhost", port=7497) |
This file contains hidden or 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
| # encrypt/descrupy | |
| encrypt(){ | |
| if [ -z "$1" ] | |
| then | |
| echo "Missing argument: Use encrypt [in] [out]" | |
| else | |
| if [ -z "$2" ] | |
| then | |
| cp $1 /tmp/$1 | |
| openssl enc -aes-256-cbc -e -in /tmp/$1 -out $1 |
This file contains hidden or 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
| # Place this script in | |
| # ~/.ipython/profile_default/startup | |
| # ------------------------------------------- | |
| import pandas_profiling | |
| from pandas.core.base import PandasObject | |
| def df_profile(df): | |
| return pandas_profiling.ProfileReport(df) |
This file contains hidden or 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
| """ | |
| Retrieve Pre-Market data from Google Finance | |
| Ported to Python 3.x | |
| Original code by Dr. Pawel Lachowicz | |
| http://www.quantatrisk.com/2015/05/07/hacking-google-finance-in-pre-market-trading-python/ | |
| """ | |
| import requests | |
| import json | |
| from time import sleep |
This file contains hidden or 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 uuid | |
| import wtforms_json | |
| from sqlalchemy import not_ | |
| from sqlalchemy.dialects.postgresql import UUID | |
| from wtforms import Form | |
| from wtforms.fields import FormField, FieldList | |
| from wtforms.validators import Length | |
| from flask import current_app as app | |
| from flask import request, json, jsonify, abort |
This file contains hidden or 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
| #! /bin/sh | |
| ### BEGIN INIT INFO | |
| # Provides: IBController | |
| # Short-Description: starts instance of IBController | |
| # Description: starts instance of IBController using start-stop-daemon | |
| ### END INIT INFO | |
| # IBController | |
| IBC_PATH="/path/to/IBController" |
This file contains hidden or 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
| function docReady(callback, bubble) { | |
| var addListener = this.addEventListener || this.attachEvent, | |
| removeListener = this.removeEventListener || this.detachEvent | |
| if (document.readyState === "complete" || document.readyState === "loaded" || document.readyState === "interactive") { | |
| callback(); | |
| return; | |
| } |
This file contains hidden or 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
| navigator.agent = (function() { | |
| var ua = navigator.userAgent, ver; | |
| // browser | |
| var browser = ua.match(/(opera|chrome|safari|firefox|msie|trident)\/?\s*(\.?\d+(\.\d+)*)/i); | |
| if (browser && (ver = ua.match(/version\/([\.\d]+)/i)) !== null) browser[2] = ver[1]; | |
| var bver = browser[2].split('.'); | |
| // os |
This file contains hidden or 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
| function outputCLI($text, $color=null) { | |
| $colors = array( | |
| 'BLACK' => "0;30m", | |
| 'GRAY' => "1;30m", | |
| 'LIGHTGRAY' => "0;37m", | |
| 'BLUE' => "0;34m", | |
| 'LIGHTBLUE' => "1;34m", | |
| 'GREEN' => "0;32m", | |
| 'LIGHTGREEN' => "1;32m", | |
| 'CYAN' => "0;36m", |