This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import fnmatch, subprocess | |
import sys, os | |
import argparse | |
def generate_filename_pattern(pattern): | |
try: | |
if pattern[0] == '.': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import pprint | |
from time import sleep | |
import twitter | |
import redis | |
API_CREDENTIALS = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import time | |
import random | |
import sys | |
import pygame | |
from pygame import gfxdraw | |
from pygame.time import Clock | |
from pygame import DOUBLEBUF, HWSURFACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <boost/algorithm/string.hpp> | |
#include "dump.hh" | |
#include "constants.hh" | |
#include "leveldb/db.h" | |
#include "leveldb/write_batch.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import re | |
MANUAL_PACKAGES = dict.fromkeys([ | |
'leveldb', | |
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def memoize(func, cache, num_args): | |
""" | |
Wrap a function so that results for any argument tuple are stored in | |
'cache'. Note that the args to the function must be usable as dictionary | |
keys. | |
Only the first num_args are considered when creating the key. | |
""" | |
@wraps(func) | |
def wrapper(*args): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## Common Python patterns and idioms | |
## | |
# remove elements from list in-place | |
mylist[:] = [e for e in mylist if mycondition(mylist)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Diff a appliquer pour pouvoir gerer les coefficients: | |
iff --git a/axiom/core/hooks.py b/axiom/core/hooks.py | |
index ca6d47d..6cd9364 100644 | |
--- a/axiom/core/hooks.py | |
+++ b/axiom/core/hooks.py | |
@@ -163,15 +163,15 @@ class Hooks(object): | |
entity['overriden'] = True | |
else: | |
relevancy_markers = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label class="control-label" for="channelselect">Channels</label> | |
<div class="controls"> | |
<select name="channels" id="channelselect" multiple="multiple" style="height: 150px;"> | |
{% for channel in channels %} | |
<option value="{{ channel }}">{{ channel }}</option> | |
{% endfor %} | |
</select> | |
<p class="help-block">Channels on whih keyword should be overriden</p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label class="control-label" for="channelselect">Channels</label> | |
<div class="controls"> | |
<select name="channels" id="channelselect" multiple="multiple" style="height: 150px;"> | |
{% for channel in channels %} | |
<option value="{{ channel }}">{{ channel }}</option> | |
{% endfor %} | |
</select> | |
<p class="help-block">Channels on whih keyword should be overriden</p> | |
</div> |
OlderNewer