Skip to content

Instantly share code, notes, and snippets.

View gaulinmp's full-sized avatar
🏠
Working from home

Mac gaulinmp

🏠
Working from home
View GitHub Profile
@gaulinmp
gaulinmp / singularize.py
Last active August 29, 2015 14:24
Singularize function from patterns codebase
#### SINGULARIZE #########################################################
# Adapted from Bermi Ferrer's Inflector for Python:
# http://www.bermi.org/inflector/
# Copyright (c) 2006 Bermi Ferrer Martinez
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software to deal in this software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of this software, and to permit
# persons to whom this software is furnished to do so, subject to the following
@gaulinmp
gaulinmp / gaulinmp.zsh-theme
Created November 24, 2014 23:40
ZSH Theme
# reference colors
GREEN="%{$fg_bold[green]%}"
RED="%{$fg_bold[red]%}"
CYAN="%{$fg_bold[cyan]%}"
YELLOW="%{$fg_bold[yellow]%}"
BLUE="%{$fg_bold[blue]%}"
MAGENTA="%{$fg_bold[magenta]%}"
WHITE="%{$fg_bold[white]%}"
COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE)
@gaulinmp
gaulinmp / reg_sho_download.py
Last active August 29, 2015 13:57
Download Reg SHO files from NASDAQ
from ftplib import FTP
def login(oldftp):
try:
ftp.close()
except: pass
return FTP(host='ftp.nasdaqtrader.com',user='anonymous',passwd='jones_school@rice.edu')
def download_regsho_data(save_dir=None):
if not save_dir: