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
| 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) |
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 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): |