Skip to main content

Python开发学习小册

Python可以说是目前世界上最流行的编程语言(没有之一),是美国几乎所有计算机名校入门的第一课,它是数学相关的几乎所有人文、自然科研领域(比如物理、化学、生物信息、数据分析、金融分析、社会学、工程等等)最为推荐的编程语言,是人工智能研究必学的两门编程语言之一(Python、C++),是AI大模型内置的编程语言(ChatGPT代码解释器)。

最重要的,对于技术爱好者来说,Python也是最为推荐学习的编程语言之一(另一门是JavaScript),它生态丰富、功能强大、简单易学,因此它也是编程普及最合适的编程语言之一,是每一个不以程序员为生的职场人士最推荐学习的编程语言(比如它已是Office内置脚本语言)。

值得一提的是,由于国内程序员就业市场基本被大企业所把持,Go、Java、JavaScript、C++、Rust会是更好的选择,Python程序员的就业情况目前很不理想,这个需要注意一下。

关于学习的说明

本教程不仅包含了十分深入的Python知识,还在教程里介绍了非常多的学习方法,目的就是希望你能够快速而又真正地掌握Python编程。

1、详细的操作步骤

本教程之所以花大量的时间将每一步操作步骤都写得十分详实,就是希望你不能只看,而一定要动手实践,不动手实践你就不要学。很多人学习的时候,喜欢看视频,收藏资料,看书等,这些都是效率极为低下的学习方式。

2、本教程案例丰富而完整

学习编程,不需要你对复杂而枯燥的理论知识咬文嚼字,对庞杂而生硬的概念死记硬背,最为重要的是你一定要将代码运行起来。也就是说,如果你比较懒,你大可以尽管复制粘贴代码;如果你看不懂,你大可以稀里糊涂地将它运行起来,将代码给跑起来看实际效果,非常重要

3、深入而丰富的知识点

尽管教程为了让大家方便学习、理解,把一些不常用、过于抽象的知识点做了删减,但教程所包含的知识内容,足以让你入门Python,用Python做出一些实用的项目,至于那些复杂难懂的概念,本教程也提供了学习方法。

关于内容的编排说明

教程包括推荐学习和选学两大部分,其中推荐学习部分,是本教程的核心部分,如果你希望学习Python,那么你一定要先掌握它;选学部分,是本教程的补充部分,不学不会影响你对Python的掌握,本教程也会持续更新补充部分的内容。

其中推荐学习部分,包括《Python语法基础》、《Python高效办公》、《Web网页与网络请求》、《Flak与后端开发》、《云函数与云服务》等5部分内容。补充部分则会标记为选学,里面的内容也会持续调整与更新。

https://frostming.com/2019/03-13/where-do-your-packages-go/

Python新手项目

10个Python项目

Top 10 Python Projects for Beginners

以及配套的Python代码

10个Python项目源码

190个Python项目含源码

190 Python Projects with Source Code

35个Python项目

35个Python项目

这里也有一个有趣的项目

Python Projects – Beginner to Advanced

Python项目

55个Python项目

Python相关课程

这个课程不错

这里有一些案例

这个Python课程可以参考

对应的Github

这个Python课程值得参考,是微软的课程

可以看一下

Python数据结构与算法

可以参考

可以参考

可以参考

需要学习的包

那些好用的软件基本都是由编程语言开发的,掌握了Python,你也能开发出那些好用且实用的软件

1、去除背景

去除背景

https://www.remove.bg/

2、you-get

研究一下https://github.com/showlab/Tune-A-Video 的代码

用法语写的教程,可以参考

https://github.com/mouredev/Hello-Python

// How to use: node DownloadWeChatStickers_macOS.js
// Requirements: curl, node
// Reference: https://blog.jogle.top/2022/08/14/macos-wechat-sticker-dump/

const { execSync } = require('child_process');
const { randomUUID } = require('crypto');
const fs = require('fs');
const exec = require('child_process').exec;
const os = require('os');
const argv = process.argv.slice(2);
const path = require('path');

let userDir;

const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
function copyFavArchive() {
const weChatDataPath = `${os.homedir()}/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9`;
// 获取当前目录下有多少个文件夹名字符串长的文件夹
let dirs = fs.readdirSync(weChatDataPath).filter((dir) => dir.length > 30);
if (dirs.length === 0) {
console.error('找不到用户文件夹');
return;
}
// 检查文件夹里面有没有 Stickets/fav.archive 文件
dirs = dirs.filter((dir) => fs.existsSync(`${weChatDataPath}/${dir}/Stickers/fav.archive`));
if (dirs.length > 1 && argv.length === 0) {
console.info('疑似找到多个用户文件夹,重新运行时请指定序号');
dirs.forEach((dir, index) => {
console.info(`${index + 1}. ${path.resolve(weChatDataPath, dir)}`);
});
return;
}
if (dirs.length > 1 && argv.length > 0) {
userDir = dirs[argv[0] - 1];
}
if (dirs.length === 1) {
userDir = dirs[0];
}
const favArchivePath = `${weChatDataPath}/${userDir}/Stickers/fav.archive`;
const destPath = `${os.homedir}/Desktop/fav.archive.plist`
fs.copyFileSync(favArchivePath, destPath);
console.info(`已复制 fav.archive 文件到桌面`);
console.info(`[*] UserDir: ${userDir}`);
console.info(`[*] fav.archive 路径: ${favArchivePath}`);
return destPath;
}

if (fs.existsSync('fav.archive')) {
fs.unlinkSync('fav.archive');
}
if (fs.existsSync('fav.archive.plist')) {
fs.unlinkSync('fav.archive.plist');
}

copyFavArchive();

const cmd = 'plutil -convert xml1 fav.archive.plist';
execSync(cmd); // 转换为 plist 格式

const input = fs.readFileSync('fav.archive.plist', 'utf8');

const linkRegex = /<string>(https?:\/\/.*?)<\/string>/g;
let match;
const links = [];
while ((match = linkRegex.exec(input)) !== null) {
links.push(match[1]);
}
console.log('匹配到' + links.length + '个表情包');
links.forEach((url, index) => {
links[index] = url.replace(/&amp;/g, '&');
});

function download(url, filename) {
console.log('开始下载' + filename);
const userAgent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36';
const cmd = `curl -A "${userAgent}" -o 'download/${filename}' '${url}'`;
exec(cmd, (error, stdout, stderr) => {
if (error) {
console.error(`执行出错: ${error}`);
return;
}
console.log('下载完成' + filename);
});
}

async function main() {
const downloadDir = `${userDir}_Stickers`;
if (!fs.existsSync(downloadDir)) {
console.log('创建文件夹' + downloadDir);
fs.mkdirSync(downloadDir);
}
console.log('5秒后开始下载表情包...');
await sleep(3000);
links.forEach((url, index) => {
const name = randomUUID();
const filename = `${name}.gif`;
console.log('开始下载第' + (index + 1) + '个表情包');
download(url, filename);
});
}

main();

https://github.com/Asabeneh/30-Days-Of-Python?tab=readme-ov-file

https://github.com/avinashkranjan/Amazing-Python-Scripts

https://github.com/geekcomputers/Python?tab=readme-ov-file https://github.com/garimasingh128/awesome-python-projects

这个不错,值得研究 https://github.com/Python-World/python-mini-projects

https://github.com/prathimacode-hub/Awesome_Python_Scripts?tab=readme-ov-file

https://github.com/natnew/100-Python-Projects

https://github.com/zhiwehu/Python-programming-exercises

https://github.com/prathimacode-hub/Awesome_Python_Scripts?tab=readme-ov-file

https://github.com/practical-tutorials/project-based-learning?tab=readme-ov-file

https://github.com/mindninjaX/Python-Projects-for-Beginners/tree/master

https://github.com/larymak/Python-project-Scripts

https://github.com/ghanteyyy/nppy https://github.com/kishanrajput23/Personal-Python-Projects

https://github.com/geekcomputers/Python

https://medium.mybridge.co/36-amazing-python-open-source-projects-v-2019-2fe058d79450

https://github.com/king04aman/All-In-One-Python-Projects https://github.com/mrayanasim09/python-projects

https://www.programiz.com/python-programming/modules/math

比较简单的python习题 https://www.w3resource.com/python-exercises/math/

https://github.com/humiaozuzu/awesome-flask

https://github.com/danielgatis/rembg

https://github.com/Mrinank-Bhowmick/python-beginner-projects

Textualize / textual