Skip to content

Instantly share code, notes, and snippets.

firm1

Block or report user

Report or block firm1

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View data-forum-zds.csv
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
View commande.sh
python manage.py shell < update-tags.py
View gist:9cdeec2e46075ce2f1e2
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 Nov 12, 2014
fonctions de scoring d'un sujet de forum
View scoring.py
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
View launch.sh
#!/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.
You can’t perform that action at this time.