替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| ''' | |
| redis_search.py | |
| Written by Josiah Carlson July 3, 2010 | |
| Released into the public domain. | |
| This module implements a simple TF/IDF indexing and search algorithm using | |
| Redis as a datastore server. The particular algorithm implemented uses the |
| .DS_Store | |
| *.log | |
| tmp/ |
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`| from PIL import Image | |
| from PIL.ExifTags import TAGS, GPSTAGS | |
| def get_exif_data(image): | |
| """Returns a dictionary from the exif data of an PIL Image item. Also converts the GPS Tags""" | |
| exif_data = {} | |
| info = image._getexif() | |
| if info: | |
| for tag, value in info.items(): | |
| decoded = TAGS.get(tag, tag) |
| package main | |
| import ( | |
| "bytes" | |
| "exec" | |
| "log" | |
| "os" | |
| ) | |
| // Pipeline strings together the given exec.Cmd commands in a similar fashion |
| from ctypes import * | |
| from ctypeslib.contrib.pythonhdr import * | |
| def quick_summary(data,words=150): | |
| ots = OTS() | |
| ots.parse_string(data) | |
| return ots.summarize_by_words(words) | |
| class OTS: | |
| libots = None |
| class Application(tornado.web.Application): | |
| def __init__(self): | |
| tornado.web.Application.__init__(self, handlers, **settings) | |
| self.db_session = db_session | |
| self.redis = redis.StrictRedis() | |
| self.session_store = RedisSessionStore(self.redis) | |
| class BaseHandler(tornado.web.RequestHandler): |
| <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission> | |
| <uses-permission android:name="android.permission.INTERNET"></uses-permission> |
| #-*-coding:utf-8-*- | |
| def seg(pinyin): | |
| sm = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'w', 'x', 'y', 'z', 'sh', 'zh', 'ch'] | |
| ymd = {'a': {'i':None, 'o':None, 'n': {'g': None}}, | |
| 'e': {'i':None, 'r':None, 'n': {'g': None}}, | |
| 'i': {'e':None, 'a':{'n':{'g':None}, 'o':None}, 'u':None, 'o':{'n':{'g':None}}, 'n':{'g':None}}, | |
| 'o': {'u':None, 'n':{'g':None}}, | |
| 'u': {'a':{'i':None, 'n':{'g':None}}, 'e':None, 'i':None, 'o':None} | |
| } |