This file contains 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
upstream websocket { | |
server localhost:3000; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
access_log /var/log/nginx/websocket.access.log main; |
This file contains 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
#!/usr/bin/python | |
import MySQLdb | |
import pandas as pd | |
db = MySQLdb.connect(host= ENJOY_CONFIG['host'], | |
user=ENJOY_CONFIG['user'], | |
passwd=ENJOY_CONFIG['password'], | |
db=ENJOY_CONFIG['database'] | |
) |
This file contains 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 MySQLdb | |
db = MySQLdb.connect("localhost", "user", "pw", "census") | |
cursor = db.cursor() | |
sql = 'SELECT * FROM name' | |
cursor.execute(sql) | |
results = cursor.fetchall() | |
print len(results) |