会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Loading
WONDERING
everything in the world~
联系
订阅
管理
上一页
1
2
3
4
5
6
···
9
下一页
2024年7月8日
python logger 使用技巧集锦
摘要: 1. 简单使用 import logging # 基本设置 # 如果没有设置,则可以使用该设置用于显示 logging.basicConfig(level='DEBUG', datefmt='%Y-%m-%d %H:%M:%S', format='%(asctime)s [%(name)s] %(l
阅读全文
posted @ 2024-07-08 16:40 kingron
阅读(540)
评论(0)
推荐(0)
2024年7月6日
cdh 集群安装
摘要: 参考 CDH6.2全网最完整安装部署步骤 · 大数据体系课wiki CDH6.2离线安装 | MonkeyWie's Blog
阅读全文
posted @ 2024-07-06 11:55 kingron
阅读(16)
评论(0)
推荐(0)
2024年7月5日
datax hdfsreader 支持 decimal 类型
摘要: 参考 如何更改 datax 以支持hive 的 DECIMAL 数据类型? - 掘金 Datax-HdfsWriter如何实现支持decimal类型数据写入_datax hdfs decimal-CSDN博客
阅读全文
posted @ 2024-07-05 18:27 kingron
阅读(110)
评论(0)
推荐(0)
2024年7月3日
pytest fixture 使用
摘要: 参考 Pytest测试框架(三):pytest fixture 用法 - 测试开发小记 - 博客园 (cnblogs.com) A Complete Guide to Pytest Fixtures | Better Stack Community
阅读全文
posted @ 2024-07-03 14:39 kingron
阅读(23)
评论(0)
推荐(0)
获取当前运行的终端大小
摘要: 方法 shutil 模块有一个方法 .get_terminal_size,通过这个方法可以获取到当前运行的终端大小。 比如: >>> import shutil >>> shutil.get_terminal_size() os.terminal_size(columns=195, lines=52
阅读全文
posted @ 2024-07-03 14:28 kingron
阅读(138)
评论(0)
推荐(0)
pip 的几种安装方式
摘要: 基本使用 # 安装 pip install numpy # 更新 pip install -U numpy # 卸载 pip uninstall numpy 指定源安装 安装时指定: # 清华源 pip install numpy -i https://pypi.tuna.tsinghua.edu.
阅读全文
posted @ 2024-07-03 12:35 kingron
阅读(127)
评论(0)
推荐(0)
python 中快速定位到三方包所在路径
摘要: 方法 使用如下命令可打印当前 python 所使用的三方包路径: python -m site 或: python -c 'import site; print(site.getsitepackages())' 参考 site Site-specific configuration hook — P
阅读全文
posted @ 2024-07-03 12:25 kingron
阅读(46)
评论(0)
推荐(0)
常见排序原理及 python 实现
摘要: 时间复杂度与空间复杂度 常用O(1)或O(n)表示,其中1表示一个单位(最简单的单位,可以是多个或1个,但在时间上总体是较低且连续的),时间通常指的是程序运行时间,空间则是指程序在运行时所占用的内存空间。各个阶段的复杂度可用下面的顺序比较: O(1) < O(logn) < O(n) < O(nlo
阅读全文
posted @ 2024-07-03 12:13 kingron
阅读(30)
评论(0)
推荐(0)
2024年6月28日
django | 常见 SQL 及其对应的 ORM 写法
摘要: 1. 子查询用 count 作为返回值 期望的 SQL 类似于: select (select count(*) from child where child.pid = parent.id) as auth_exists from parent 写法: subquery = Subquery(Ch
阅读全文
posted @ 2024-06-28 23:35 kingron
阅读(67)
评论(0)
推荐(0)
2024年6月26日
使用 mockito 替代 unitest.mock
摘要: 介绍 mockito 是一个 pytest 插件,相比于 unitest.mock,具有如下特点: 所有对象都自动为 autospec,无需担心模拟对象被错误的调用而不被发现 不使用字符串参数作为模拟对象,可以减少拼写错误 提供的返回值或抛出错误更加冗长,但也更明确和具体 安装 使用 pip 安装即
阅读全文
posted @ 2024-06-26 09:50 kingron
阅读(74)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
···
9
下一页
公告