This file contains hidden or 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
from concurrent.futures import ThreadPoolExecutor | |
from tornado import gen | |
from tornado.process import cpu_count | |
import bcrypt | |
# global threadpool | |
pool = ThreadPoolExecutor(cpu_count()) | |
@gen.coroutine | |
def create_user(name, password): |
This file contains hidden or 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 tornado.ioloop | |
import tornado.web | |
import tornado.escape | |
#import urllib2 old way | |
arabic_word = u'السلام' | |
arab = tornado.escape.url_escape(arabic_word) |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title> | |
ba3333 | |
</title> | |
<meta charset="utf-8"> |
This file contains hidden or 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
#coding: utf-8 | |
import tornado.ioloop | |
import tornado.web | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("Hello, world") | |
class UnicodeHandler(tornado.web.RequestHandler): |
This file contains hidden or 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 tornado.web | |
import tornado.httpserver | |
import tornado.ioloop | |
from tornado.options import define, options | |
import handlers | |
import os |
This file contains hidden or 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
#coding: utf-8 | |
''' | |
Petit script qui vous aide à récupérer la liste de vos amis ainsi que leurs liens au cas où vous avez été bloqué, | |
vous saisissez le lien dans un navigateur là où vous êtes déconnecté, si le lien marche, ce 'faux' ami vous a bloqué, | |
sinon, il a 'vraiment' désactivé son compte :D | |
et surtout, ne renommez pas ce fichier facebook.py sinon il va créer une interference avec la bibliothèque Facebook et il va essayer de s'importer lui même! | |
et quand vous trouvez quelques chose entre '' laissez la et remplacez que le contenu! c'est un type texte et non une variable! | |
copyleft: abdelouahab ;) | |
''' |
This file contains hidden or 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 tornado.auth | |
import tornado.escape | |
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.options | |
import tornado.web | |
import tornado.gen |
NewerOlder