Skip to content

Instantly share code, notes, and snippets.

View CristhianBoujon's full-sized avatar

Cristhian Boujon CristhianBoujon

View GitHub Profile
@joyofdata
joyofdata / gist:26e49e77285e35bc2439
Created March 26, 2015 15:42
Setting Up a Time Dimension Table in MySQL / comment
DROP TABLE IF EXISTS `T`;
CREATE TABLE `T` (
`n` int(11)
);
INSERT INTO `T`(n) SELECT @row := @row + 1 as row FROM
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t2,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t3,
(select 0 union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) t4,
@ngcrawford
ngcrawford / multiprocessing_template.py
Created March 29, 2012 12:49
Template for multiprocessing large files line by line
#!/usr/bin/env python
# encoding: utf-8
import multiprocessing
from textwrap import dedent
from itertools import izip_longest
def process_chunk(d):
"""Replace this with your own function
that processes data one line at a

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name: