
python
python3
tang_xin_cs
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
table 转view dual python 代码
import pandas import io s = io.BytesIO(b""""CATEGORY_ID","CATEGORY_NAME","DESCRIPTION","PICTURE" 1,"Beverages","Soft drinks, coffees, teas, beers, and ales","beverages.gif" 2,"Condiments","Sweet and savory sauces, relishes, spreads, and seasonings","co原创 2022-05-13 20:18:40 · 1040 阅读 · 0 评论 -
爬虫方法 api 层面、模拟层面、组合层面
scrapy 反爬机制不太好用 api 的好用 selenium 所见即所得 得要去掉一些 selenium的flag ,以防检测到 时间设置,元素xpath变化 ,尽量搜索是否唯一的类名,类选择器比较好。,情况变化。 慢 selenium +mitmproxy mitmproxy得到一些网络内容 selenium得到一些页面内容 selenium,登录信息保存到use-dir 。就不用登录了。 浏览器层面 油猴插件,脚本,有什么可以拦截http请求,ajax请求,因为包含数据。得到数据发送到python原创 2021-05-20 14:31:43 · 176 阅读 · 0 评论 -
docker copy命令注意与理解
copy dir1 ./ 结果并不是 ./ dir1 而是 ./ dir1里的文件与目录 第二 COPY dir1/* ./ 结果并不是 ./ dir1 xxx/file.txt 而是 ./ file.txt 也就是dir1的目录结构不会复制。*号是将所有目录/包括子目录下的文件复制而已 ...原创 2021-04-30 15:41:57 · 1004 阅读 · 1 评论 -
“Failed to load response data“ django@xframe_options_exempt 网站不许 Firefox 显示被嵌入的网页
python django ajax chrome 显示 failed to xxx 。以为ajax 数据量大。 设置ajax 的timeout 没有用 换firefox 网站不许 Firefox 显示被嵌入的网页 。哦。(firefox nb) django 的官方 xframe_options_exempt 在view的视图方法上注解 ok.安全问题。 ...原创 2021-04-06 17:50:03 · 835 阅读 · 0 评论 -
tqdm单行显示
一直流动 。你启动了多个tqdm 实例打印。使用完close() 。 你使用了print的语句。用tbar.write() 不需要n update(),默认加一。total后期加入 ?原创 2021-04-04 12:09:02 · 476 阅读 · 0 评论 -
python3 thread not working 坑
多线程不报错, 多进程不报错 A B C(A,B) A,B写在上面 _thread ()函数线程,要使用,tuple 再加个逗号!! _thread.start_new_thread(sava_to_el, (data, job_id,)) 而from concurrent.futures.thread import ThreadPoolExecutor 中 pool.submit(sava_to_el, data, id) 不要tuple 。。。。。。。。。。。。不要括号民 不报错。。。。。原创 2021-03-30 20:00:12 · 194 阅读 · 0 评论 -
mitmproxy USB: usb_device_handl问题
[9240:7252:0325/133523.225:ERROR:device_event_log_impl.cc(214)] [13:35:23.225] USB: usb_device_handle_win.cc:1056 Failed to read descriptor from node connection:连到系统上的设备没有发挥作用。 (0x1F) 搞了半天,没搞定 反正 ,我将pthon 的函数线程改为继承线程类的方式就可以了。但还是会出这个错误。不过,mitmproxy可以继承执行了,原创 2021-03-25 13:52:17 · 1658 阅读 · 0 评论 -
matlab 指定python 路径 64bit
因为matlab 不支持 32bitpython 和高版本python。而系统默认装是32bit 。anaconda只能虚拟路径。 一:添加anaconda的envs到path 代替系统的32bit 二:装个64bit的python 三:在matlab中指定路径。重启后会变 pyversion(‘C:\ProgramData\Anaconda3\envs\AgeGender\python.exe’) ...原创 2020-09-03 11:14:52 · 561 阅读 · 0 评论 -
linux 安装python3和pip 注意事项。
参考: 三种方法? 首先centos上的是python2 .不要总是复制粘贴乱改的话会整个系统无法使用。你最好知道第一条命令是干什么的。最好就备份一个系统先。否则你会后悔的。 建议编译安装。因为yum安装只安装了python3没有pip。之后安装pip的话出现什么依赖./Modules/zlibmodule.c:8:18:error:zlib.h: No suchfileor...原创 2020-05-05 21:16:30 · 247 阅读 · 0 评论 -
python pycharm spider pip docker
pip 安装第三方库 第三方库:https://pypi.org/ https://blog.youkuaiyun.com/lzqg1990/article/details/87877048 在安装目录下 pip install xxx https://www.cnblogs.com/fengff/p/11804465.html 关于脚本第一行的 #!/usr/bin/python 的解释,相信很多不熟悉 L...原创 2020-03-05 19:45:07 · 600 阅读 · 0 评论