Skip to content

Instantly share code, notes, and snippets.

View ynadji's full-sized avatar
🇩🇿
je ne connais que la langue de mes colonisateurs

yacin ynadji

🇩🇿
je ne connais que la langue de mes colonisateurs
View GitHub Profile
(loop for x from 1 to 10 do (print x))
@ynadji
ynadji / loggerize.py
Created March 2, 2010 20:33
function-level logging with python
import logging
# log everything
logging.basicConfig(level=logging.DEBUG)
# kickass logging for function entry/exit
class loggerize(object):
def __init__(self, f):
self.f = f
# Set this to one or more main LaTeX files (e.g. those with \documentclass)
# for a specific build. Leave blank to build all files having an uncommented
# \documentclass.
MAIN=
# WARNING: If you have multiply defined labels, your bibliography WILL get
# fucked up.
###########################################################################
# MAKE NO EDITS BELOW (except to debug) #
@ynadji
ynadji / infb.css
Created December 16, 2010 14:04 — forked from ruel/infb.py
/*
Ruel Pagayon (c) 2010 - ruel@ruel.me
Cascading Style Sheet for InFB Log Output.
*/
body {
background-color: #3C3C3C;
color: #FFF;
margin-top: 50px;
margin-left: 25px;
@ynadji
ynadji / gist:937340
Created April 22, 2011 18:38
multiprocessing
#!/usr/bin/env python
import sys
import glob
import os
import re
from optparse import OptionParser
from itertools import chain, izip, repeat
sys.path.append('gza')
@ynadji
ynadji / gist:1475005
Created December 14, 2011 02:38
homebrew error
==> Downloading http://downloads.sourceforge.net/project/wine/Source/wine-1.2.3.tar.bz2
File already downloaded in /Users/ynadji/Library/Caches/Homebrew
/usr/bin/tar xf /Users/ynadji/Library/Caches/Homebrew/wine-1.2.3.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file configure
Hunk #1 succeeded at 6540 with fuzz 2 (offset 123 lines).
==> ./configure --prefix=/usr/local/Cellar/wine/1.2.3 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
./configure --prefix=/usr/local/Cellar/wine/1.2.3 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
checking build system type... x86_64-apple-darwin11.2.0
Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libdaq.0.dylib
/usr/local/lib/libsfbpf.0.dylib
/usr/local/lib/libxmmsclient++-glib.1.0.0.dylib
/usr/local/lib/libxmmsclient++.4.0.0.dylib
==> Downloading http://downloads.sourceforge.net/project/wine/Source/wine-1.2.3.tar.bz2
File already downloaded in /Users/ynadji/Library/Caches/Homebrew
/usr/bin/tar xf /Users/ynadji/Library/Caches/Homebrew/wine-1.2.3.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file configure
Hunk #1 succeeded at 6540 with fuzz 2 (offset 123 lines).
==> ./configure --prefix=/usr/local/Cellar/wine/1.2.3 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
./configure --prefix=/usr/local/Cellar/wine/1.2.3 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
checking build system type... x86_64-apple-darwin11.2.0
==> Downloading http://downloads.sourceforge.net/project/wine/Source/wine-1.2.3.tar.bz2
File already downloaded in /Users/ynadji/Library/Caches/Homebrew
/usr/bin/tar xf /Users/ynadji/Library/Caches/Homebrew/wine-1.2.3.tar.bz2
==> Patching
/usr/bin/patch -f -p1 -i 001-homebrew.diff
patching file configure
Hunk #1 succeeded at 6540 with fuzz 2 (offset 123 lines).
==> ./configure --prefix=/usr/local/Cellar/wine/1.2.3 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
./configure --prefix=/usr/local/Cellar/wine/1.2.3 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
checking build system type... x86_64-apple-darwin11.2.0
==> Downloading http://downloads.sourceforge.net/project/wine/Source/wine-1.3.35.tar.bz2
/usr/bin/curl -qf#LA Homebrew 0.8.1 (Ruby 1.8.7-249; Mac OS X 10.7.2) http://downloads.sourceforge.net/project/wine/Source/wine-1.3.35.tar.bz2 -o /Users/ynadji/Library/Caches/Homebrew/wine-1.3.35.tar.bz2
/usr/bin/tar xf /Users/ynadji/Library/Caches/Homebrew/wine-1.3.35.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/wine/1.3.35 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
./configure --prefix=/usr/local/Cellar/wine/1.3.35 --x-include=/usr/X11/include/ --x-lib=/usr/X11/lib/ --with-x --with-coreaudio --with-opengl --without-mpg123
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking whether make sets $(MAKE)... yes
checking for gcc... /usr/bin/gcc-4.2
checking whether the C compiler works... yes