Skip to content

Instantly share code, notes, and snippets.

from tkinter import Tk, Canvas, Frame, BOTH
from colour import Color
import math
# les constantes de la formule
E0=20
U=0.0005
class Example(Frame):
We can't make this file beautiful and searchable because it's too large.
id,title,forum,category_forum,1-datetime,1-likes,1-dislikes,2-datetime,2-likes,2-dislikes
446,Bienvenue sur Zeste de Savoir !,Communauté,Le bar à smoothies,2014-07-07 00:04:06,28,0,2014-07-07 08:10:27,16,0
481,Your Desktop!,Communauté,Le bar à smoothies,2014-07-08 00:58:57,15,0,2014-07-08 01:27:18,5,0
484,JZDS Paris,Communauté,Le bar à smoothies,2014-07-08 09:19:07,4,0,2014-07-08 09:20:46,1,0
498,Petites questions aux devs.,Communauté,Le bar à smoothies,2014-07-08 14:42:01,0,0,2014-07-08 14:49:27,3,0
500,"##zestedesavoir sur Freenode, le Canal IRC de Zeste de Savoir",Communauté,Le bar à smoothies,2014-07-08 14:57:05,25,0,2014-07-08 15:01:27,0,0
501,Monokai,Communauté,Le bar à smoothies,2014-07-08 15:14:43,3,0,2014-07-08 15:22:53,1,0
524,Un smoothie pour le Brésil,Communauté,Le bar à smoothies,2014-07-08 22:55:49,5,0,2014-07-08 22:58:08,11,0
544,Mettons en musique la communauté !,Communauté,Le bar à smoothies,2014-07-09 15:07:04,4,0,2014-07-09 15:20:33,3,0
python manage.py shell < update-tags.py
from collections import Counter, defaultdict, OrderedDict
import os
import sys
import threading
import warnings
from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured
from django.utils import lru_cache
from django.utils.deprecation import RemovedInDjango19Warning
from django.utils._os import upath
@firm1
firm1 / scoring.py
Created November 12, 2014 16:12
fonctions de scoring d'un sujet de forum
from zds.forum.models import TopicFollowed, Topic, Post
from zds.utils.models import CommentLike, CommentDislike
unit_mark_activity = {
"follow": { # points lié au suivi du topic
"site": 1, # suivre un topic sur le site
"email": 2, # suivre un topic par email
}
"post" : { # points liés a tous les messages sauf au premier post
"new": 2, # nouveau message
@firm1
firm1 / launch.sh
Last active August 29, 2015 14:08
script
#!/bin/bash
#Set Script Name variable
SCRIPT=`basename ${BASH_SOURCE[0]}`
#Initialize variables to default values.
OPT_URL_REPO="https://github.com/zestedesavoir/zds-site.git"
OPT_BRANCH="dev"
#Set fonts for Help.