Skip to content

Instantly share code, notes, and snippets.

View jorgebastida's full-sized avatar

Jorge Bastida jorgebastida

View GitHub Profile
# antes de importar nada
from gevent import monkey
monkey.patch_socket()
import gevent
from gevent import socket
def InsertData(line, value):
data = line.split(',')
@jorgebastida
jorgebastida / search.py
Created April 13, 2012 09:44 — forked from javisantana/search.py
search like a real hacker
#index is like this
index = [
('content indexed', object_id),
('test string', 1),
...
]
def _search(q):
if q:
q = q.lower()