Skip to content

Instantly share code, notes, and snippets.

View luiscape's full-sized avatar
🤿

Luis Capelo luiscape

🤿
View GitHub Profile
@javi830810
javi830810 / etecsa
Last active December 30, 2016 17:24
Etecsa Script
import sqlite3
connection = sqlite3.connect('/Users/javi830810/Documents/etecsa.db')
def find_by_name(query):
where_clause = [
('name', 'like', "'" + query + "%'")
]
return run_query(where_clause)
@bamthomas
bamthomas / pub_sub_redis.py
Created November 28, 2012 22:16
Pub/Sub redis python
from multiprocessing.process import Process
import time
import redis
def pub(myredis):
for n in range(10):
myredis.publish('channel','blah %d' % n)
time.sleep(5)
def sub(myredis, name):