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/bash | |
cd /path/to/git/repo/ | |
git add -A | |
git commit -m "Backup on `date`" | |
git push origin |
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 pandas as pd | |
import pymysql | |
from sqlalchemy import create_engine | |
engine = create_engine("mysql+pymysql://USER:PASSWORD@HOST:PORT/DBNAME") | |
df = pd.read_sql_query("SELECT * FROM table", engine) | |
df.head() |
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 re | |
import requests | |
DEFAULT_TICKERS = ["BBRY", "VOD", "T", "S"] | |
URL = "http://www.sec.gov/cgi-bin/browse-edgar?CIK={}&Find=Search&owner=exclude&action=getcompany" | |
CIK_RE = re.compile(r".*CIK=(\d{10}).*") | |
cik_dict = {} | |
for ticker in DEFAULT_TICKERS: | |
results = CIK_RE.findall(requests.get(URL.format(ticker)).content.decode("ascii")) |
NewerOlder