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
{ | |
"terminal.integrated.scrollback": 100000000, | |
// "editor.defaultFormatter": "esbenp.prettier-vscode", | |
"files.trimTrailingWhitespace": true, | |
"files.insertFinalNewline": true, | |
"terminal.integrated.env.linux": { | |
"PATH": "/workspaces/bin:${env:PATH}" | |
}, | |
"editor.renderWhitespace": "all", | |
"python.defaultInterpreterPath": "/usr/local/bin/python", |
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
# MySQLdbの場合 | |
# | |
import MySQLdb | |
connection = MySQLdb.connect(host='192.168.59.103', db='hoge_db', user='hoge_user', passwd='hoge_pw', charset='utf8') | |
cursor = connection.cursor() | |
cursor.execute('select * from foo_bar') | |
result = cursor.fetchall() | |
for row in result: | |
print row | |
cursor.close() |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import argparse | |
import logging | |
import logging.handlers | |
import SocketServer | |
from datetime import datetime as dt | |
HOST = '0.0.0.0' |