Skip to content

Instantly share code, notes, and snippets.

@cheeaun
cheeaun / putonglasses.txt
Created September 14, 2012 08:57
put on glasses unicode
•_•)
( •_•)>⌐■-■
(⌐■_■)
@sd
sd / ponche-crema-receta.markdown
Last active February 18, 2024 21:08 — forked from anibal/ponche-crema-receta.markdown
Granny's Carúpano Style Egg Nog (Ponche Crema Carupanero)

Granny's Carúpano Style Egg Nog (Ponche Crema Carupanero)

Ingredients

  • 1 bottle of Whistle Pig bourbon whiskey (or rye), 1 bottle of Bruichladdich scotch whisky
  • 30 egg yolks
  • 4 cans of condensed milk (14 oz / 397g per can)
  • 1 bottle of rum (750 ml)
@iamatypeofwalrus
iamatypeofwalrus / roll_ipython_in_aws.md
Last active January 22, 2024 11:18
Create an iPython HTML Notebook on Amazon's AWS Free Tier from scratch.

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
@yanofsky
yanofsky / LICENSE
Last active June 5, 2024 21:51
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@jreijn
jreijn / hippo-kibana-dashboard.json
Last active December 18, 2015 19:09
Hippo Kibana dashboard
{
"title": "Hippo Campus Experience Optimizer with Relevance for Targeting",
"services": {
"query": {
"idQueue": [
1,
2,
3,
4
],
@mlgill
mlgill / rmerge.py
Last active March 8, 2023 18:19
A modified version of pandas merge command that will replace overlapping columns not associated with the join rather than appending a suffix.
import pandas as pa
def rmerge(left,right,**kwargs):
"""Perform a merge using pandas with optional removal of overlapping
column names not associated with the join.
Though I suspect this does not adhere to the spirit of pandas merge
command, I find it useful because re-executing IPython notebook cells
containing a merge command does not result in the replacement of existing
columns if the name of the resulting DataFrame is the same as one of the
@okomestudio
okomestudio / ab_test.py
Created May 12, 2014 19:19
An example of A/B test using the chi-squared test for independence.
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""An example of A/B test using the chi-squared test for independence."""
import numpy as np
import pandas as pd
from scipy.stats import chi2_contingency
def main():
data = pd.io.parsers.read_csv('n10000.csv')
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@syhw
syhw / dnn.py
Last active June 23, 2024 04:13
A simple deep neural network with or w/o dropout in one file.
"""
A deep neural network with or w/o dropout in one file.
License: Do What The Fuck You Want to Public License http://www.wtfpl.net/
"""
import numpy, theano, sys, math
from theano import tensor as T
from theano import shared
from theano.tensor.shared_randomstreams import RandomStreams
@elliottcordo
elliottcordo / gist:59d3c90b158331fe6ed7
Created August 13, 2014 20:21
python-redshift-pandas-statistics
import sys
import logging
import psycopg2
import pandas as pd
import pandas.io.sql as sqlio
import ConfigParser
import argparse
import statistics
from pandas import pivot_table, crosstab
from datetime import datetime