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/python2.7 | |
#-*- coding=utf-8 -*- | |
import shlex | |
import subprocess | |
from tornado.gen import coroutine, Task, Return | |
from tornado.process import Subprocess | |
from tornado.ioloop import IOLoop | |
@coroutine |
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 | |
#-*- coding=utf-8 -*- | |
"""用于和地理信息有关的数据处理 | |
""" | |
__author__ = ['"wuyadong" <[email protected]>'] | |
import math |
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 | |
#-*- coding=utf-8 -*- | |
"""用于描述一些具体的方法 | |
""" | |
__author__ = ['"wuyadong" <[email protected]>'] | |
import warnings | |
import functools |
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
""" | |
Scrapy Item | |
See documentation in docs/topics/item.rst | |
""" | |
from pprint import pformat | |
from UserDict import DictMixin | |
from scrapy.utils.trackref import object_ref |
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
class api_route(object): | |
"""api的包装器 | |
Attributes: | |
_api_methods: 字典,key是路径名,value是函数对象 | |
""" | |
_api_methods = {} | |
def __init__(self, uri): |
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/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
from xml.dom import minidom | |
from collections import Mapping | |
from petl.io import RowContainer | |
from lxml import etree | |
def fromxml(source, rowmatch, *args, **kwargs): | |
return XmlView(source, rowmatch, *args, **kwargs) | |
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 org.apache.http.Header; | |
import org.apache.http.HttpEntity; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.ByteBuffer; | |
import java.nio.charset.Charset; | |
import java.util.*; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; |
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
package com.shenbian.service.personchange.impl.utils; | |
import java.util.*; | |
/** | |
* Trie Tree | |
* @author JobsDong | |
*/ | |
public class TrieTree { |
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 | |
# -*- coding: utf-8 -*- | |
import threading | |
class KbTerms(object): | |
"""singleton | |
""" | |
_instance_lock = threading.Lock() |
OlderNewer