Skip to content

Instantly share code, notes, and snippets.

import whoosh,os
from whoosh import index
import whoosh.index
import whoosh.qparser
import tornado.ioloop
import tornado.web
class Search(object):
def __init__(self, indexdir, searchstr):
self.indexdir = indexdir
import whoosh,os
from whoosh import index
import whoosh.index
import whoosh.fields
import whoosh.qparser
import tornado.ioloop
import tornado.web
from whoosh import analysis, fields, formats, query, highlight
class Search(object):
@yxlwfds
yxlwfds / README.md
Last active August 29, 2015 14:09 — forked from felix021/README.md

一个修复了的版本,在 mac 下不能获取 ip,所以用 ip138来 读了 替换上你的Email,密码,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。

获得domain_id可以用curl curl -k https://dnsapi.cn/Domain.List -d "login_email=xxx&login_password=xxx"

获得record_id类似 curl -k https://dnsapi.cn/Record.List -d "login_email=xxx&login_password=xxx&domain_id=xxx"

import random
from functools import partial
from heapq import heappush, heappop
from time import sleep, perf_counter
import trio
import queue
CONCURRENCY_LIMIT = 8
limiter = trio.CapacityLimiter(CONCURRENCY_LIMIT)
@yxlwfds
yxlwfds / app.py
Created August 7, 2024 07:36 — forked from PhilippHomann/app.py
FastAPI file upload with streaming_form_data to parse multipart/form-data
from fastapi import FastAPI, UploadFile, HTTPException
from starlette.requests import Request
from streaming_form_data import StreamingFormDataParser
from streaming_form_data.targets import FileTarget
from tempfile import NamedTemporaryFile
import os
import shutil