Gran Hermano Blog » rm big

Ce blog consacré à gran hermano est en cours de rédaction... Vous pouvez néanmoins lire quelques articles sur rm big et proposer un site


Infos sur rm big RSS


  1. Commentaires sur rm big

    Poster un commentaire sur rm big




  2.  #!/usr/bin/python # name: utf2lat1.py import codecsimport sys # default encoder/decoderuni2lat1 = codecs.getencoder('iso-8859-1')utf82uni = codecs.getdecoder('utf-8')nil_encode_decode = 0 # dictionary of coder/decoder indexed by input and ouput langencoder_names = dict({ 'fr': 'iso-8859-1', 'en': 'iso-8859-1' }) decoder_names = dict({ 'fr': 'utf-8', 'en': 'iso-8859-1' }) def initialise_codecs(lang): encoder_name = encoder_names.get(lang, 'iso-8859-1') decoder_name = decoder_names.get(lang, 'utf-8') if decoder_name == encoder_name: global nil_encode_decode nil_encode_decode = 1 return print >> sys.stdout, 'Input lang: "%s", encoder: "%s", decoder "%s"' \ % (lang, encoder_name, decoder_name) global uni2lat1 uni2lat1 = codecs.getencoder(encoder_name) global utf82uni utf82uni = codecs.getdecoder(decoder_name) def encode(str, file): if nil_encode_decode == 1: return str try: x, l = utf82uni(str) except: print >> sys.stderr, 'Invalid %s: "%s"' % (utf82uni.__name__, file) raise try: y, l = uni2lat1(x) ##print >> sys.stderr, "LAT1: %s" % (file) return y except: ##print >> sys.stderr, "UTF8: %s" % (file) ##raise res= for i in x: c = ord(i) if c < 256: res.append(chr(c)) else: ## FIXME: use html entities if possible ##print >> sys.stderr, '%s: "%x"' % (file, c) res.append('\x26#%d;' % (c)) res = ''.join(res) ##print >> sys.stderr, '=> "%s"' % (res) return res if __name__ == '__main__': ##tst = 'éèçàùÉÈÇÀÙ' tst = 'é è' res = encode(tst) print >> sys.stderr, '"%s" -> "%s"' % (tst, res) 

    #!/usr/bin/python # name: extract SQL.py import reimport sysimport utf2lat1 big=0init_codec=0symlink = {} p1 = re.compile(r"()'\),\(")re_match_lang = re.compile("-- Host:.*Database: (.*)wiki") def extract1(line): global init_codec # text from dump can contain something matching the regexp, init only # once to avoid some pitfall if init_codec == 0: match = re_match_lang.search(line) if repr(match) != 'None' and len(match.groups()) >= 1: lang = match.group(1) utf2lat1.initialise_codecs(lang) init_codec = 1 if not line.startswith("INSERT INTO cur VALUES "): return line = line line = p1.sub(r"\1'\n", line) l = line.split("\n") return l p2 = re.compile("','") def extract2(line): ##print "line: " + line a = line.split(",", 2) ## a = id ## a = namespace ## a = remaining ##print "a: " + a r = a ## strip leading ' b = r.split("','", 5) ## b = title ## b = article ## b = summary + user_id + user_name ## b = timestamp ## b = ... ## if a == '6': ## c = b.split(",'") ## print "%s : %s" % (c, b) title = eval("'" + b + "'") ## print "\tid = %s" % (a) ## print "\tns = %s" % (a) ## print "\tti = %s" % (title) ## print "\tts = %s" % (b) ## (ns, title, text, time) return (a, title, b, b) ns_name = { '0': 'article', '1': 'talk', '2': 'user', '3': 'user_talk', '4': 'wikipedia', '5': 'wikipedia_talk', '6': 'image', '7': 'image_talk', '8': 'msg', '9': 'msg_talk', '10': 'template', '11': 'template_talk', '12': 'help', '13': 'help_talk', '14': 'category', '15': 'category_talk'} def set_file_time(pathname, ts): import time import os # parse the timestamp string year = int(ts) mont = int(ts) day = int(ts) hour = int(ts) min = int(ts) sec = int(ts) tuple = (year, mont, day, hour, min, sec, 0, 0, 0) try: t = time.mktime(tuple) os.utime(pathname, (t,t)) except: print >> sys.stderr, "%s -> %s" % (ts, tuple) def mkfilename(ns, name): name = name.replace('/', '%25') if ns != '0' or big == 0: return name n = name.upper() if n.isalnum() : return n + '/' + name else: return '-/' + name def mklnkname(ns, name): if ns != '0' or big == 0: return mkfilename(ns, name) return '../' + mkfilename(ns, name) def out(ns, name, data, ts): import os ##print "out %s:%s" % (ns, name) try: name = utf2lat1.encode(name, 'filename: ' + name) except: print "illégal namefile: '%s'" % (name) return pathname = ns_name + '/' + mkfilename(ns, name) ## search for redirect match = re.search(r'\s*#\s*REDIRECT\s*\]*)\]\]', data, re.I) if match: ## found a redirect ##print "%s REDIRECT to %s" % (name, match.group(1)) dest = match.group(1).replace(' ', '_') if len(dest) >= 1: dest = dest.upper() + dest dest = mklnkname(ns, dest) symlink = dest else: try: f = open(pathname, "w") f.write(utf2lat1.encode(data, pathname)) f.close() set_file_time(pathname, ts) except: print >> sys.stderr, "can't write '%s'" % (pathname) ##raise return for i in ns_name.values(): import os print "create dir %s" % (i) os.system('rm -rf %s' % (i)) os.mkdir(i) if '-big' in sys.argv: big=1 for i in "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-": os.mkdir(ns_name + '/' + i) if '-utf8' in sys.argv: init_codec=1 for i in sys.stdin.xreadlines(): l = extract1(i) for i in l: ns, title, txt, time = extract2(i) ##if ns != '0' and ns != '4' and ns != '6' and ns != '8': ## continue t1 = re.sub(r"\\'", "'", txt) t2 = re.sub(r'\\"', '"', t1) t3 = re.sub(r"\\r\\n", "\n", t2) t4 = re.sub(r'\\n', '\n', t3) ##t5 = re.sub(r'\\\\', '\\', t4) out(ns, title, t4, time) for pathname, dest in symlink.items(): try: os.symlink(dest, pathname) except: print >> sys.stderr, 'Erreur: REDIRECT "%s" to "%s"' % (pathname, dest) 

    #!/usr/bin/python # name: extract_SQL_UTF8.py import reimport sys big=0symlink = {} p1 = re.compile(r"()'\),\(") def extract1(line): if not line.startswith("INSERT INTO cur VALUES "): return line = line line = p1.sub(r"\1'\n", line) l = line.split("\n") return l p2 = re.compile("','") def extract2(line): ##print "line: " + line a = line.split(",", 2) ## a = id ## a = namespace ## a = remaining ##print "a: " + a r = a ## strip leading ' b = r.split("','", 5) ## b = title ## b = article ## b = summary + user_id + user_name ## b = timestamp ## b = ... ## if a == '6': ## c = b.split(",'") ## print "%s : %s" % (c, b) title = eval("'" + b + "'") ## print "\tid = %s" % (a) ## print "\tns = %s" % (a) ## print "\tti = %s" % (title) ## print "\tts = %s" % (b) ## (ns, title, text, time) return (a, title, b, b) ns_name = { '0': 'article', '1': 'talk', '2': 'user', '3': 'user_talk', '4': 'wikipedia', '5': 'wikipedia_talk', '6': 'image', '7': 'image_talk', '8': 'msg', '9': 'msg_talk', '10': 'template', '11': 'template_talk', '12': 'help', '13': 'help_talk', '14': 'category', '15': 'category_talk'} def set_file_time(pathname, ts): import time import os # parse the timestamp string year = int(ts) mont = int(ts) day = int(ts) hour = int(ts) min = int(ts) sec = int(ts) tuple = (year, mont, day, hour, min, sec, 0, 0, 0) try: t = time.mktime(tuple) os.utime(pathname, (t,t)) except: print >> sys.stderr, "%s -> %s" % (ts, tuple) def mkfilename(ns, name): name = name.replace('/', '%25') if ns != '0' or big == 0: return name n = name.upper() if n.isalnum() : return n + '/' + name else: return '-/' + name def mklnkname(ns, name): if ns != '0' or big == 0: return mkfilename(ns, name) return '../' + mkfilename(ns, name) def out(ns, name, data, ts): import os pathname = ns_name + '/' + mkfilename(ns, name) ## search for redirect match = re.search(r'\s*#\s*REDIRECT\s*\]*)\]\]', data, re.I) if match: ## found a redirect ##print "%s REDIRECT to %s" % (name, match.group(1)) dest = match.group(1).replace(' ', '_') if len(dest) >= 1: dest = dest.upper() + dest dest = mklnkname(ns, dest) symlink = dest else: try: f = open(pathname, "w") f.write(data) f.close() set_file_time(pathname, ts) except: print >> sys.stderr, "can't write '%s'" % (pathname) ##raise return for i in ns_name.values(): import os print "create dir %s" % (i) os.system('rm -rf %s' % (i)) os.mkdir(i) if '-big' in sys.argv: big=1 for i in "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-": os.mkdir(ns_name + '/' + i) for i in sys.stdin.xreadlines(): l = extract1(i) for i in l: ns, title, txt, time = extract2(i) ##if ns != '0' and ns != '4' and ns != '6' and ns != '8': ## continue t1 = re.sub(r"\\'", "'", txt) t2 = re.sub(r'\\"', '"', t1) t3 = re.sub(r"\\r\\n", "\n", t2) t4 = re.sub(r'\\n', '\n', t3) ##t5 = re.sub(r'\\\\', '\\', t4) out(ns, title, t4, time) for pathname, dest in symlink.items(): try: os.symlink(dest, pathname) except: print >> sys.stderr, 'Erreur: REDIRECT "%s" to "%s"
    

    Amazon.fr : The Big Lebowski - Edition Collector: DVD: Jeff Bridges ...


    Amazon.fr : The Big Lebowski - Edition Collector: DVD: Jeff Bridges ... Amazon.fr : The Big Lebowski - Edition Collector: DVD: Jeff Bridges,John Goodman,Julianne Moore,Steve Buscemi,Peter Stormare,David Huddleston,Philip Seymour Hoffman,Joel Coen ...

    Visiter : Amazon.fr : The Big Lebowski - Edition Collector: DVD: Jeff Bridges ...



    Exclu : OSBCREW Live Sur RM Soon ! - Radio Moris


    Exclu : OSBCREW Live Sur RM Soon ! - Radio MorisExclu : OSBCREW Live Sur RM Soon ! Annonces RM ... Big News OSBCREW pou live N Direct lor Fridayfiva alors si zot ena kit question/mot d'encouragement ... , met ene ti post enbas ...

    Visiter : Exclu : OSBCREW Live Sur RM Soon ! - Radio Moris



    Radio Moris :: Sega Music from Mauritius - Ile Maurice


    Radio Moris :: Sega Music from Mauritius - Ile MauriceDepuis sa création, en Août 2003 RM est rapidement devenu l'une des plus grande portail ... Big News OSBCREW pou live N Direct lor Fridayfiva alors si zot ena kit question/mot d ...

    Visiter : Radio Moris :: Sega Music from Mauritius - Ile Maurice



    Découvrez les dernières promotions chez Rosa Maria


    Découvrez les dernières promotions chez Rosa MariaUne sélection de produits de qualité qui viendront agréablement décorer, agencer votre ... Copyright © RM Décoration - Tous droits réservés: Site réalisé avec Oxatis

    Visiter : Découvrez les dernières promotions chez Rosa Maria



    Mp3 Rm Wma Mix, Dub, lyrics, Accapela, composition, midi, platines, cd ...


    Mp3 Rm Wma Mix, Dub, lyrics, Accapela, composition, midi, platines, cd ... 188 : dj big up: dancehall:zouk:ragga 189 : DJ BIGDAVE: ZOUK ,RETRO ZOUK ,COMPAS, DANCEHALL , SALSA ,SOCA ,DUMBOLO... 190 : dj biggie971: zouk ...

    Visiter : Mp3 Rm Wma Mix, Dub, lyrics, Accapela, composition, midi, platines, cd ...




    Patrice BIGUET

    patrice.biguet.netCV de Patrice BIGUET, ingénieur en informatique, développeur PHP/SQL, spécialisé en référencement et optimisation de contenus pour les moteurs de recherche.

    Visiter : Patrice BIGUET


    Agence Immobilière Tarbes

    www.abafim.comImplantée dans la périphérie nord de Paris sur 3 campus : Villetaneuse, Saint-Denis, Bobigny. Présentation, formations, la recherche, bibliothèques, vie étudiante.

    Visiter : Agence Immobilière Tarbes


    Université Paris-Nord, Paris 13

    www.univ-paris13.frLogiciel d'e-marketing professionnel permettant l'envoi d'un nombre illmité d'emails personnalisés.

    Visiter : Université Paris-Nord, Paris 13


    Bigposte mailing

    www.bigposte.comLiens commentés sur les paquetages permettant l'utilisation de grands nombres.

    Visiter : Bigposte mailing


    Big number

    www.chez.comPrésente ces objets, classés par thèmes. Informe sur les possibilités d'achat et les conditions de vente.

    Visiter : Big number


  3. Aucun message sur rm big

    Poster un commentaire sur rm big

« Todo Programas
Todoar »