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 / similarity_example.ipynb
Last active April 4, 2024 04:33
N-Gram Similarity Comparison
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gaulinmp
gaulinmp / imports.ipynb
Last active February 10, 2023 19:57 — forked from edwinhu/header.ipynb
Header file for 90% of the Notebook necessities.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gaulinmp
gaulinmp / dist_notebook.ipynb
Created November 15, 2021 16:23
Normal dist question
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gaulinmp
gaulinmp / nopromotedtweets.js
Created October 6, 2020 17:26
Tampermonkey script to remove promoted tweets
// ==UserScript==
// @name Twitter Promoted
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Get rid of stupid promoted tweets
// @author Mac Gaulin
// @match http*://twitter.com/*
// @grant none
// ==/UserScript==
@gaulinmp
gaulinmp / .screenrc
Last active April 24, 2018 16:06
screenrc and associated files
# Don't display the copyright page
startup_message off
# keep scrollback n lines
defscrollback 3000
# load ipython and my flask site in background, zsh in foreground.
screen -t py 0 bash -c 'jupyter lab; exec bash'
screen -t htop 1 bash -c 'htop; exec bash'
screen 2 zsh
@gaulinmp
gaulinmp / formats.txt
Created January 8, 2018 22:09
Excel Formats
Accounting:
_($* #,##0_);[Red]_($* (#,##0);_($* "-"_);_(@_)
* Left align $, parenthesis and red for negatives, - for 0, empty for empty.
@gaulinmp
gaulinmp / progress.py
Created May 25, 2016 00:34
Ipython Progress
from IPython.display import display
import ipywidgets
df = list(range(100))
f = ipywidgets.FloatProgress(min=0, max=len(df))
out = ipywidgets.Output()
display(f, out)
for i in df:
@gaulinmp
gaulinmp / download_ff_industry.py
Last active February 17, 2016 06:27
Download Fama French industry classifications
from io import BytesIO
from zipfile import ZipFile
import requests
def download_ffind_zip(ind_num):
zip_url = ('http://mba.tuck.dartmouth.edu/pages/faculty/ken.french/ftp/Siccodes{}.zip'
.format(ind_num))
data = requests.get(zip_url)
zipfile = ZipFile(BytesIO(data.content))
@gaulinmp
gaulinmp / GET_FFDATA.SAS
Last active January 26, 2016 00:07
SAS Macros file for all my common macros.
/*******************READ ME*********************************************
* - Macro to download and parse the Fama French Factors -
*
* SAS VERSION: 9.4.0
* DATE: 2015-12-15
* AUTHOR: gaulinmp (@gmail)
* ORIGIN: edwinhu (https://gist.github.com/edwinhu/9397971)
*
****************END OF READ ME******************************************/
%macro GET_FFDATA(file=,
@gaulinmp
gaulinmp / new_flask_from_mold.sh
Last active September 3, 2015 00:24
Project from git template
#!/bin/bash
# From http://kevinthompson.info/blog/2013/11/11/using-git-repos-as-project-templates.html
# removed --depth 1, because that messes up GitHub hosting.
# Get flask_mold with latest version. Name it first passed in arg
git clone --origin source git@github.com:gaulinmp/flask_mold $1
cd $1
# Use Git Hub command to create repo on your git and set it to origin.