Skip to content

Instantly share code, notes, and snippets.

View abdelouahabb's full-sized avatar

ALIANE Abdelouahab abdelouahabb

View GitHub Profile
@abdelouahabb
abdelouahabb / arabic_tornado.py
Last active August 29, 2015 14:08
This is a gist how to use unicode as Tornado URLS (here i used arabic char)
#!/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)
<!DOCTYPE html>
<html>
<head>
<title>
ba3333
</title>
<meta charset="utf-8">
#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):
@abdelouahabb
abdelouahabb / app.py
Last active November 7, 2019 11:44
Using SQLite with Tornado. just a simple code, tornado is easy, and if you want to make a simple application that runs on the same server, use this Gist for less dependecies ^_^
#!/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
@abdelouahabb
abdelouahabb / gist:6911367
Last active August 8, 2017 04:19
simple script to get your fb friends
#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 ;)
'''
@abdelouahabb
abdelouahabb / tornado_fb_poster.py
Last active May 11, 2018 07:10
this is how to post on your application page on facebook using only Tornado, no more libraries ;)
#!/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