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
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': False, | |
'handlers': { | |
"console": { | |
'class': 'logging.StreamHandler', | |
} | |
}, | |
'loggers': { | |
'django.db.backends': { |
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
# -*- coding:utf-8 -*- | |
import os | |
import csv | |
import MySQLdb as mysql | |
inpath = '.' | |
uipath = unicode(inpath, "utf-8") | |
files = os.listdir(uipath) # 存放2000万开房数据的路径 |
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
# -*- coding: utf-8 -*- | |
import aliyun.api | |
import sys | |
aliyun.setDefaultAppInfo("key", "secret") | |
a = aliyun.api.Ecs20140526DescribeInstancesRequest() | |
def get_instance_ip(region=''): |
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
# -*- coding: utf-8 -*- | |
# vim: ts=4:sw=4:expandtab | |
""" | |
RabbitMQ 库封装,主要是针对多台rabbitmq服务器的HA支持, 另外对执行动作时的心跳检测。 | |
""" | |
import os | |
import pika |
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
# coding: utf-8 | |
# vim: ts=4:sw=4:expandtab | |
""" | |
Copyright (c) 2014 SysDev Tools. | |
""" | |
import os | |
import sys |
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
#!/bin/env python | |
# Author: Neil <neil@neildd.com> | |
# Date: 1-24-2013 | |
# Desc: Read information from Apache status page | |
import re | |
import urllib2 | |
class pyApacheStatus: | |
def __init__(self, apache_host): |
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
var App = function() { | |
// Basic Config | |
var config = { | |
debug: true | |
}; | |
// HomeView | |
var home = function() { | |
console.log('hello home'); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>RunAtLoad</key> | |
<true/> | |
<key>KeepAlive</key> | |
<true/> | |
<key>Label</key> | |
<string>com.googlecode.goagent</string> |
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
# This is a hack to patch slow socket.getfqdn calls that | |
# BaseHTTPServer (and its subclasses) make. | |
# See: http://bugs.python.org/issue6085 | |
# See: http://www.answermysearches.com/xmlrpc-server-slow-in-python-how-to-fix/2140/ | |
import BaseHTTPServer | |
def _bare_address_string(self): | |
host, port = self.client_address[:2] | |
return str(host) |
NewerOlder