leafcoder's recent timeline updates
leafcoder's repos on GitHub
Python · 152 watchers
django-covid19
实时接口获取中国各个城市、省份、国家的新型冠状肺炎(新冠肺炎 / 2019-nCoV / Covid-19)。疫情数据以及整体统计详情,新增美国各州统计、每日疫情数据 API。爬虫实时追踪新冠疫情变化,数据来自丁香园和 covidtracking.com。数据大屏示例:http://ncov.leafcoder.cn/demo/ 项目文档:http://ncov.leafcoder.cn/docs/
Python · 2 watchers
litefs
Build a web server framework using Python. Litefs was developed to implement a server framework that can quickly, securely, and flexibly build Web projects. Litefs is a high-performance HTTP server. Litefs has the characteristics of high stability, rich functions, and low system consumption.
Python · 2 watchers
ProxyPoolSpider
抓取各大主要的免费代理网站数据,选取可用IP保存入数据库
Python · 1 watchers
EscrowAPI
escrow.com API 接口
JavaScript · 1 watchers
leafcoder.github.com
叶子
0 watchers
aliyun-openapi-python-sdk
Alibaba Cloud SDK for Python
0 watchers
aliyun-oss-python-sdk
Aliyun OSS SDK for Python
Python · 0 watchers
aliyun-tablestore-python-sdk
Aliyun Tablestore (原OTS) Python SDK
Python · 0 watchers
barcode
㊙️ Create standard barcodes with Python. No external dependencies. 100% Organic Python.
0 watchers
c10k
A coroutine-based alternative implementation of the posix thread
0 watchers
country-json
A simple data of the world by country each in JSON format.
Python · 0 watchers
cpinyin
使用 cython 重写 lxneng 的 xpinyin.
Python · 0 watchers
crawler-dis
g-cat.bgidx.cn OMIM 疾病数据获取
Python · 0 watchers
dailyscript
常用脚本,专注解决小问题。
0 watchers
DecryptLogin
DecryptLogin: APIs for loginning some websites by using requests.
0 watchers
django-friendship
Django app to manage following and bi-directional friendships
CSS · 0 watchers
dnsadmin
自用前端框架
0 watchers
dnslib
A Python library to encode/decode DNS wire-format packets
0 watchers
etcd
Distributed reliable key-value store for the most critical data of a distributed system
Python · 0 watchers
eurasia
Automatically exported from code.google.com/p/eurasia
0 watchers
follow-me-install-kubernetes-cluster
和我一步步部署 kubernetes 集群
0 watchers
funcraft
(have) Fun with Serverless(API Gateway & Function Compute)
Python · 0 watchers
fundwave
0 watchers
jumpserver
JumpServer 是广受欢迎的开源堡垒机,是符合 4A 规范的专业运维安全审计系统。
0 watchers
leafcoder
0 watchers
libeio
libeio sync from http://cvs.schmorp.de/libeio/
0 watchers
libev
Full-featured high-performance event loop loosely modelled after libevent
0 watchers
limerc-sdk
Limesurvey Remote Control API SDK
Python · 0 watchers
limesurveyrc2api
LimeSurvey RC2 REST webservices client
Python · 0 watchers
litedb
基于 sqlite3 实现的简单对象数据库
Python · 0 watchers
movies-dataset
Python · 0 watchers
MovieSpider
爬取电影资源的爬虫
C · 0 watchers
Python-scws
scws Python扩展
Jupyter Notebook · 0 watchers
python3-cookbook
《Python Cookbook》 3rd Edition Translation
0 watchers
sf-sdk
顺丰速运 Python SDK
Dockerfile · 0 watchers
shiny-server-docker
构建 shiny-server 的 docker 镜像
0 watchers
slowdown
Coroutine-based Python web framework based on Gevent
Python · 0 watchers
tornado-mvc
MVC 初始程序,可按照本项目 MVC 模式构建项目。
Python · 0 watchers
utils
common scripts or functions
Python · 0 watchers
YaozhOtcSpider
爬取药智数据(db.yaozh.com)的OTC数据
leafcoder

leafcoder

Life is short, use Python.
V2EX member #528113, joined on 2021-01-13 13:45:53 +08:00
玩蛇人属蛇。
leafcoder's recent replies
忽略第 3 条条件可以如下:

class C(object):
pass


class Demo(object):

def __new__(cls, *args, **kwargs):
inst = object.__new__(cls, *args, **kwargs)
if not hasattr(Demo, 'c_inst'):
c_inst = C(*args, **kwargs)
Demo.c_inst = c_inst
inst.c_inst = Demo.c_inst
return inst

def __init__(self, *args, **kwargs):
pass


for i in range(5):
o = Demo()
print(o, o.c_inst)

输出:

>>> (<__main__.Demo object at 0x7f7bd9e95310>, <__main__.C object at 0x7f7bd9e95350>)
>>> (<__main__.Demo object at 0x7f7bd9e95390>, <__main__.C object at 0x7f7bd9e95350>)
>>> (<__main__.Demo object at 0x7f7bd9e95310>, <__main__.C object at 0x7f7bd9e95350>)
>>> (<__main__.Demo object at 0x7f7bd9e95390>, <__main__.C object at 0x7f7bd9e95350>)
>>> (<__main__.Demo object at 0x7f7bd9e95310>, <__main__.C object at 0x7f7bd9e95350>)
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3638 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 04:48 · PVG 12:48 · LAX 21:48 · JFK 00:48
♥ Do have faith in what you're doing.