随笔分类 - python
摘要:def f(d): d['xx']="d" d['a']=4d={'a':55}f(d) 翻译 搜索 复制
阅读全文
摘要:Lib\shutil.py Recursively delete a directory tree def rmtree(path, ignore_errors=False, onerror=None): """Recursively delete a directory tree. If igno
阅读全文
摘要:实践: 1、 a,b=123,456locals()['a']=1locals()['b']=2 场景: 画图: 时序图 汽车、轮船 两家公司分别销量 for var in ['car', 'ship']: # 默认橙色 plot_data = data.dropna(subset=[var], i
阅读全文
摘要:APScheduler · PyPI https://pypi.org/project/APScheduler/ Commits · agronholm/apscheduler https://github.com/agronholm/apscheduler/commits/master
阅读全文
摘要:查看 设置字体 中文字体 from matplotlib.font_manager import FontManagerimport subprocessmy_font_path = 'simhei.ttf' # SimHeiFontManager().addfont(my_font_path)mp
阅读全文
摘要:import sysprint(sys._getframe().f_code.co_name) python 获取函数名字的办法_qq_16069927的博客-CSDN博客 https://blog.csdn.net/qq_16069927/article/details/89043169 翻译 搜
阅读全文
摘要:每个事件运行后还将调用 delayfunc 并传入参数 0 以允许其他线程有机会在多线程应用中运行。 sched 事件调度器 — Python 3.8.16 文档 https://docs.python.org/zh-cn/3.8/library/sched.html 翻译 搜索 复制
阅读全文
摘要:Python代码加密 - 4种方案_python文件保护_SeafyLiang的博客-CSDN博客 https://blog.csdn.net/SeafyLiang/article/details/111573911 python代码的几种常见加密方式分享_python_脚本之家 https://w
阅读全文
摘要:实践 1、 python s="abc" s+="34" # OK print(s) s[0]="k" # TypeError: 'str' object does not support item assignment golang s := "abc" s += "456" fmt.Printl
阅读全文
摘要:默认值只计算一次。默认值为列表、字典或类实例等可变对象时,会产生与该规则不同的结果。例如,下面的函数会累积后续调用时传递的参数: def f(a, L=[]): L.append(a) return L print(f(1)) print(f(2)) print(f(3)) 输出结果如下: [1]
阅读全文
摘要:Util | Node.js v19.1.0 Documentation https://nodejs.org/api/util.html#util_util_isdeepstrictequal_val1_val2 如何在JavaScript中比较对象?有哪几种方法? - 知乎 https://zh
阅读全文
摘要:Django 使用动态模型在Django框架中|极客教程 https://geek-docs.com/django/django-questions/308_django_using_dynamic_models_in_django_framework.html#google_vignette 模型
阅读全文
摘要:实践: 1、 import "encoding/json" func mapVstruct2jsonMarshal() { t := struct { A string B int32 C bool }{"a", 123, true} m := map[string]interface{}{ "A"
阅读全文
摘要:https://github.com/python/cpython/blob/aa1b8a168d8b8dc1dfc426364b7b664501302958/Lib/test/test_os.py https://github.com/python/cpython/blob/master/Lib/
阅读全文
摘要:styleguide | Style guides for Google-originated open-source projects https://google.github.io/styleguide/pyguide.html def now(): print(datetime.dateti
阅读全文
摘要:4. 执行模型 — Python 3.8.5 文档 https://docs.python.org/zh-cn/3/reference/executionmodel.html 4. 执行模型¶ 4.1. 程序的结构 Python 程序是由代码块构成的。 代码块 是被作为一个单元来执行的一段 Pyth
阅读全文
摘要:├── __init__.py├── tall2.py└── tall.pytall.pya = 23b = 34class I: def __init__(self): print(444)class J: pass__all__ = [ 'a', 'I',]tall2.py# from tall
阅读全文
摘要:https://github.com/jazzband/django-redis/blob/master/django_redis/exceptions.py django-redis/base.py at master · jazzband/django-redis https://github.
阅读全文

浙公网安备 33010602011771号