<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:media="http://search.yahoo.com/mrss/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Python - 四号程序员</title>
	<atom:link href="https://www.coder4.com/archives/category/python/feed" rel="self" type="application/rss+xml" />
	<link>https://www.coder4.com</link>
	<description>Keep It Simple and Stupid</description>
	<lastBuildDate>Tue, 20 May 2025 08:22:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.3</generator>
	<item>
		<title>ultralytics的yolo如何只安装cpu版本？</title>
		<link>https://www.coder4.com/archives/8437</link>
					<comments>https://www.coder4.com/archives/8437#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Tue, 20 May 2025 08:16:29 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=8437</guid>

					<description><![CDATA[--extra-index-url https://download.pytorch.org/whl/cpu ultralytics requirements中添加如上设定[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/8437/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Ubuntu 24.04使用python虚拟环境</title>
		<link>https://www.coder4.com/archives/8185</link>
					<comments>https://www.coder4.com/archives/8185#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Tue, 16 Jul 2024 10:46:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[venv]]></category>
		<category><![CDATA[虚拟环境]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=8185</guid>

					<description><![CDATA[新版Python不再建议直接pip安装了，而是要使用虚拟环境 sudo apt install -y python3-dev python3-virtualenv 创建虚拟环境 virtualenv newenv source newenv/bin/activate # 取消激活 deactivate &#160;[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/8185/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>MobileNetV3的oxxruntime推理(Python)</title>
		<link>https://www.coder4.com/archives/8175</link>
					<comments>https://www.coder4.com/archives/8175#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Fri, 07 Jun 2024 11:25:01 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[onnx]]></category>
		<category><![CDATA[推理]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=8175</guid>

					<description><![CDATA[import cv2 import numpy as np import onnxruntime as ort def load_model(model_path): """加载ONNX模型""" session = ort.InferenceSession(model_path) return session def preprocess_image(image_path): image = cv2.imread(image_path)[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/8175/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>pip安装如何切换国内源</title>
		<link>https://www.coder4.com/archives/6754</link>
					<comments>https://www.coder4.com/archives/6754#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Thu, 05 Sep 2019 02:54:41 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=6754</guid>

					<description><![CDATA[sudo pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx-package &#160;[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/6754/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>使用nuitka将Python文件编译成可执行程序</title>
		<link>https://www.coder4.com/archives/6569</link>
					<comments>https://www.coder4.com/archives/6569#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Thu, 25 Jul 2019 12:08:28 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[nuitka]]></category>
		<category><![CDATA[可执行]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=6569</guid>

					<description><![CDATA[安装 sudo pip3 install nuitka 编译成可执行程序 python3 -m nuitka --standalone --follow-imports ./test.py 会生成一个test.dist的目录，把整个目录拷贝上去，就可以执行了。 需要说明的是，现在nuitka不支持静态链接，所以如果glibc相关库对不上的话，也是没法执行的，建议安装个同版本的系统(docker即可)，去编译下就好。[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/6569/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>peewee解决问题&quot;OperationalError: (2006, &#039;MySQL server has gone away&#039;)&quot;</title>
		<link>https://www.coder4.com/archives/6030</link>
					<comments>https://www.coder4.com/archives/6030#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Wed, 25 Apr 2018 08:25:55 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[MySQL server has gone away]]></category>
		<category><![CDATA[peewee]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=6030</guid>

					<description><![CDATA[用过ＭySQL的应该都知道，ＭySQL默认长链接只能保持8小时，超过后就会自动断开。 在peewee中如何维持长连接呢？ 解决方法比较晦涩，需要自定义一个支持重试的mixin，然后自定义一种RetryMySQLDatabase混入mixin from peewee import * from peewee import __exception_wrapper__ class RetryOperationalError(object): def execute[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/6030/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Python如何递归的获取dict中的key</title>
		<link>https://www.coder4.com/archives/5767</link>
					<comments>https://www.coder4.com/archives/5767#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Tue, 17 Oct 2017 03:50:01 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">https://www.coder4.com/?p=5767</guid>

					<description><![CDATA[def get_recursively(search_dict, field): """ Takes a dict with nested lists and dicts, and searches all dicts for a key of the field provided. """ fields_found = [] for key, value in search_dict.iteritems():[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/5767/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>pip安装包时出现OutOfMemory的问题</title>
		<link>https://www.coder4.com/archives/4751</link>
					<comments>https://www.coder4.com/archives/4751#comments</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Wed, 20 Jan 2016 08:56:27 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=4751</guid>

					<description><![CDATA[sudo pip install --no-cache-dir 加上这个参数，一般能够缓解一部分情况。[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/4751/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Python获取外网ip地址</title>
		<link>https://www.coder4.com/archives/4621</link>
					<comments>https://www.coder4.com/archives/4621#comments</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Sat, 30 May 2015 02:51:02 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=4621</guid>

					<description><![CDATA[s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.connect(('8.8.8.8', 80)) print(s.getsockname()[0]) s.close() 备注：这个IP有可能被墙，可以换一个国内的，呵呵。。 如果是NAT出口的，显示的是NAT的IP地址。[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/4621/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>[转载]几个有用的python函数 (笛卡尔积, 排列, 组合)</title>
		<link>https://www.coder4.com/archives/4618</link>
					<comments>https://www.coder4.com/archives/4618#respond</comments>
		
		<dc:creator><![CDATA[coder4]]></dc:creator>
		<pubDate>Wed, 13 May 2015 02:20:01 +0000</pubDate>
				<category><![CDATA[Python]]></category>
		<guid isPermaLink="false">http://www.coder4.com/?p=4618</guid>

					<description><![CDATA[转载自：http://www.tuicool.com/articles/vIRryi product 笛卡尔积 permutations 排列 combinations 组合,没有重复 combinations_with_replacement 组合,有重复 &#62;&#62;&#62; import itertools &#62;&#62;&#62; for i in itertools.product('ABCD', repeat = 2): ... print[......] 继续阅读]]></description>
		
					<wfw:commentRss>https://www.coder4.com/archives/4618/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
