diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..a60cc3f --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: pxiaoer +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a23d113 --- /dev/null +++ b/.gitignore @@ -0,0 +1,46 @@ +# Jekyll +_site/ +.sass-cache/ +.jekyll-cache/ +.jekyll-metadata + +# Ruby +Gemfile.lock +.bundle/ +vendor/ + +# OS +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Editor +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# Logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Environment variables +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# Temporary files +tmp/ +temp/ +.tmp/ \ No newline at end of file diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..bfb6cb6 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +python.flypython.com \ No newline at end of file diff --git a/README.md b/README.md index 6a245e1..a53dbb8 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,183 @@ -# FlyPython +# 🐍 FlyPython - LLM Agent & AI Development Hub +[python.flypython.com](https://python.flypython.com) -## Python Books +## 🤖 LLM Agent Python - Core Focus -#### Beginner -- 《PYTHON CRASH COURSE: A HANDS-ON, PROJECT-BASED INTRODUCTION TO PROGRAMMING》 -- 《STARTING OUT WITH PYTHON (4TH EDITION)》 -- 《AUTOMATE THE BORING STUFF WITH PYTHON: PRACTICAL PROGRAMMING FOR TOTAL BEGINNERS》 +### 🚀 Leading LLM Agent Frameworks +#### **OpenAI Agents SDK** +- [OpenAI Agents Python Documentation](https://openai.github.io/openai-agents-python/) - Official OpenAI Agents SDK for building AI agents +- [OpenAI Python Library](https://github.com/openai/openai-python) - Official OpenAI Python library -## Python书籍列表 +#### **CrewAI - Multi-Agent Systems** +- [CrewAI Framework](https://github.com/joaomdmoura/crewAI) - Cutting-edge framework for orchestrating role-playing, autonomous AI agents +- [CrewAI Documentation](https://docs.crewai.com/) - Official CrewAI documentation +- [CrewAI Examples](https://github.com/joaomdmoura/crewAI-examples) - Real-world CrewAI implementations +- [Learn Agentic AI with CrewAI](https://github.com/panaversity/learn-agentic-ai) - Comprehensive CrewAI learning resources -#### 初学者 -- 《Python编程从入门到实践》 -- 《Python编程快速上手-让繁琐工作自动化》 -- 《Python学习手册》 +#### **LangGraph - Advanced Agent Workflows** +- [LangGraph](https://github.com/langchain-ai/langgraph) - Build stateful, multi-actor applications with LLMs +- [LangChain Agent Framework](https://python.langchain.com/docs/modules/agents/) - LangChain agents and tools +#### **AutoGen - Conversational AI Agents** +- [Microsoft AutoGen](https://github.com/microsoft/autogen) - Multi-agent conversation framework -#### 中级 -- 《流畅的Python》 -- 《Python Ticks: A Buufect of Awesome》 -- 《Effective Python: 59 Specific ways to 》 -- +#### **Dapr Agents** +- [Dapr Agents](https://github.com/dapr/python-sdk) - Stateful virtual actors for multi-agent workflows -#### 实践 -- 《Python编程》 -- 《Python极客项目编程》 -- 《Python核心编程》 +### 🛠️ Latest Open Source LLM Agent Projects (2024) +#### **Minimal & Educational** +- [min-agent](https://github.com/zhouzaida/min-agent) - Minimal 200-line LLM Agent for understanding agent principles +- [LangChain ReAct Agent](https://github.com/botextractai/ai-langchain-react-agent) - ReAct agent with Python REPL and DuckDuckGo Search +- [OpenSource LLM Agents ReAct](https://github.com/Praveengovianalytics/llm_agents_open_source) - Open source LLM agents implementation -#### 高级 -- 《Python Cookbook》 +#### **Production-Ready Frameworks** +- [SuperModels](https://github.com/JohannesVC/SuperModels) - Desktop app for running LLM agents with reflection mechanisms +- [AgentKit](https://github.com/japanvik/agentkit) - Simple framework for creating distributed LLM agents over networks +#### **Specialized Applications** +- [CrewAI Platform Examples](https://github.com/genaiworks/crewai) - Multi-agent systems with various real-world applications +- [CrewAI Lenox](https://github.com/samurayy99/crewai_lenox) - Advanced CrewAI implementations +### 📚 LLM Agent Learning Resources +#### **Comprehensive Guides** +- [Building Multi-Agent AI Systems with CrewAI](https://medium.com/neural-engineer/understanding-crewai-building-multi-agent-ai-systems-15d0236d5cbf) +- [Agent Development Best Practices](https://cookbook.openai.com/examples/gpt4-1_prompting_guide) -#### 参考资源 -- https://pythonbooks.org/ +#### **Courses & Tutorials** +- [Agentic AI Development Course](https://github.com/panaversity/learn-agentic-ai) - Complete course on Dapr Agentic Cloud Ascent (DACA) +- [Python for AI and Machine Learning](https://realpython.com/learning-paths/machine-learning-python/) +- [LangChain Agent Tutorials](https://python.langchain.com/docs/tutorials/) +## 📖 Python Learning & Development -## Python课程列表 +### 🎯 Quick Navigation -#### 初学者 +1. [Python News](#python-news) +2. [Python Books](#python-books) +3. [Courses](#courses) +4. [Algorithms & Data Structures](#algorithms) +5. [Web Development](#web-development) +6. [Data Science & Analysis](#data-science) +7. [Automation & Bots](#automation--bots) +8. [Finance & Trading](#finance--trading) +9. [Performance Optimization](#performance) +--- + +### Python News + +- [Python Official](https://www.python.org/) +- [Medium Python](https://medium.com/tag/python) +- **Reddit Communities:** + - [r/Python](https://www.reddit.com/r/Python/) + - [r/learnpython](https://www.reddit.com/r/learnpython/) + - [r/pythontips](https://www.reddit.com/r/pythontips/) + - [r/pythoncoding](https://www.reddit.com/r/pythoncoding) + +### Python Books + +#### **For Beginners** +- **Python Crash Course: A Hands-On, Project-Based Introduction to Programming** (3rd Edition, 2023) + - [Amazon](https://www.amazon.com/Python-Crash-Course-Hands-Project-Based/dp/1718502702) + +- **Starting Out with Python** (4th Edition) + - [Amazon](https://www.amazon.com/Starting-Out-Python-Tony-Gaddis/dp/0134444329) + +- **Automate the Boring Stuff with Python** (2nd Edition) + - [Free Online](https://automatetheboringstuff.com/) | [Amazon](https://www.amazon.com/Automate-Boring-Stuff-Python-Programming/dp/1593279922) + +- **Python Cookbook: Recipes for Mastering Python 3** + - [Amazon](https://www.amazon.co.uk/Python-Cookbook-David-Beazley/dp/1449340377) + +#### **Advanced Python (2023-2024)** +- **Effective Python: 90 Specific Ways to Write Better Python** (2nd Edition) ⭐⭐⭐⭐⭐ + - [Amazon](https://www.amazon.com/Effective-Python-Specific-Software-Development/dp/0134853989) + +- **Clean Code in Python** ⭐⭐⭐⭐⭐ + - [Amazon](https://www.amazon.com/Clean-Code-Python-maintainable-efficient/dp/1788835832) + +### Courses + +#### **Beginner Courses** - [Python for Everybody](https://www.coursera.org/specializations/python) +- [Python 3 Programming](https://www.coursera.org/specializations/python-3-programming) + +#### **Advanced Learning** +- [REST APIs with Flask and Python in 2024](https://www.coursera.org/learn/packt-rest-apis-with-flask-and-python-in-2024-i01az) - Professional Flask Development +- [Financial Analysis with YFinance](https://kritjunsree.medium.com/the-2024-guide-to-using-yfinance-with-python-for-effective-stock-analysis-668a4a26ee3a) - Modern Python Finance Tools + +### Algorithms + +- [Interactive Python Coding Interview Challenges](https://github.com/donnemartin/interactive-coding-challenges) - Algorithms and data structures +- [Algorithms: Minimal Examples in Python](https://github.com/keon/algorithms) - Data structures and algorithms +- [Pygorithm: Learn Python Algorithms](http://pygorithm.readthedocs.io/en/latest) - Fun way to learn algorithms + +### Web Development + +#### **FastAPI** +- [FastAPI Documentation](https://fastapi.tiangolo.com/) - Modern, fast web framework for building APIs +- [FastAPI Best Practices](https://github.com/zhanymkanov/fastapi-best-practices) + +#### **Flask** +- [REST APIs with Flask and Python in 2024](https://www.coursera.org/learn/packt-rest-apis-with-flask-and-python-in-2024-i01az) +- [Developing RESTful APIs with Python and Flask](https://auth0.com/blog/developing-restful-apis-with-python-and-flask) +- [Flask & Code Quality](https://flake8.pycqa.org/en/latest/user/error-codes.html) + +#### **Django** +- [Complete Beginner's Guide to Django - Part 1](https://simpleisbetterthancomplex.com/series/2017/09/04/a-complete-beginners-guide-to-django-part-1.html) +- [Build a REST API with Django](https://scotch.io/tutorials/build-a-rest-api-with-django-a-test-driven-approach-part-1) + +### Data Science + +#### **NumPy** +- [From Python to Numpy](http://www.labri.fr/perso/nrougier/from-python-to-numpy/) +- [Exploring Line Lengths in Python Packages](http://jakevdp.github.io/blog/2017/11/09/exploring-line-lengths-in-python-packages) + +#### **Matplotlib** +- [Anatomy of Matplotlib](https://github.com/matplotlib/AnatomyOfMatplotlib) + +#### **Data Analysis Projects** +- [Exploring United States Policing Data](https://blog.patricktriest.com/police-data-python) +- [Analyzing 1000+ Greek Wines](https://tselai.com/greek-wines-analysis.html) +- [Generate FiveThirtyEight Graphs](https://www.dataquest.io/blog/making-538-plots) +- [Amazon Product Review Analysis](http://minimaxir.com/2017/01/amazon-spark) + +### Automation & Bots + +#### **Web Scraping** +- [Web Scraping with Scrapy, SQL, Matplotlib](http://www.scrapingauthority.com/python-scrapy-mysql-and-matplotlib-to-gain-web-data-insights) +- [Advanced Web Scraping: Bypassing 403 Forbidden](http://sangaline.com/post/advanced-web-scraping-tutorial) +- [Mastering Python Web Scraping](https://hackernoon.com/mastering-python-web-scraping-get-your-data-back-e9a5cc653d88) +#### **Automation Projects** +- [Wedding Automation with Twilio and Python](https://www.twilio.com/blog/2017/04/wedding-at-scale-how-i-used-twilio-python-and-google-to-automate-my-wedding.html) +- [Finding Interesting People on Medium](https://medium.freecodecamp.org/how-i-used-python-to-find-interesting-people-on-medium-be9261b924b0) +#### **Bots** +- [Reddit + Facebook Messenger Bot](https://pythontips.com/2017/04/13/making-a-reddit-facebook-messenger-bot) +- [Instagram Bot Success Story](https://medium.freecodecamp.com/my-open-source-instagram-bot-got-me-2-500-real-followers-for-5-in-server-costs-e40491358340) +#### **Spreadsheets Integration** +- [Python Excel Tutorial: The Definitive Guide](https://hackernoon.com/python-excel-tutorial-the-definitive-guide-934ee6dd15b0) +- [Data Analysis with Python in Excel](https://learning.anaconda.cloud/anaconda-certified-data-analysis-with-python-in-excel) +- [Google Sheets and Python](https://www.youtube.com/watch?v=vISRn5qFrkM) +### Finance & Trading +- [2024 Guide to YFinance for Stock Analysis](https://kritjunsree.medium.com/the-2024-guide-to-using-yfinance-with-python-for-effective-stock-analysis-668a4a26ee3a) +- [Quantitative Trading with Python](https://medium.com/@deepml1818/quantitative-trading-with-python-analyzing-financial-data-7c829d447e0a) +- [Financial Data with Alpha Vantage 2024](https://medium.com/@datavisiondallas/navigating-financial-data-with-python-and-alpha-vantage-in-2024-a-beginners-guide-ca005bb1a6c2) +- [Stock Price Data - Python for Finance](https://www.youtube.com/watch?v=2BrpKpWwT2A) +- [Analyzing Cryptocurrency Markets](https://blog.patricktriest.com/analyzing-cryptocurrencies-python) -#### 飞蟒学习小组 -飞蟒Python学习小组内测中,欢迎大家参加免费的内测 -内测微信群 +### Performance - +- [Million Requests per Second with Python](https://medium.freecodecamp.com/million-requests-per-second-with-python-95c137af319) +- [Yes, Python is Slow, and I Don't Care](https://hackernoon.com/yes-python-is-slow-and-i-dont-care-13763980b5a1) +- [Memoization in Python](https://dbader.org/blog/python-memoization) diff --git a/README_cn.md b/README_cn.md new file mode 100644 index 0000000..c8c7945 --- /dev/null +++ b/README_cn.md @@ -0,0 +1,184 @@ +# 🐍 FlyPython - LLM Agent 与 AI 开发中心 + +[python.flypython.com](https://python.flypython.com) + +## 🤖 LLM Agent Python - 核心重点 + +### 🚀 主流 LLM Agent 框架 + +#### **OpenAI Agents SDK** +- [OpenAI Agents Python 文档](https://openai.github.io/openai-agents-python/) - 官方 OpenAI Agents SDK 用于构建 AI 智能体 +- [OpenAI Python 库](https://github.com/openai/openai-python) - 官方 OpenAI Python 库 + +#### **CrewAI - 多智能体系统** +- [CrewAI 框架](https://github.com/joaomdmoura/crewAI) - 用于协调角色扮演、自主 AI 智能体的尖端框架 +- [CrewAI 文档](https://docs.crewai.com/) - 官方 CrewAI 文档 +- [CrewAI 示例](https://github.com/joaomdmoura/crewAI-examples) - 真实世界 CrewAI 实现案例 +- [使用 CrewAI 学习 Agentic AI](https://github.com/panaversity/learn-agentic-ai) - 综合 CrewAI 学习资源 + +#### **LangGraph - 高级智能体工作流** +- [LangGraph](https://github.com/langchain-ai/langgraph) - 使用 LLM 构建有状态的多角色应用程序 +- [LangChain Agent 框架](https://python.langchain.com/docs/modules/agents/) - LangChain 智能体和工具 + +#### **AutoGen - 对话式 AI 智能体** +- [Microsoft AutoGen](https://github.com/microsoft/autogen) - 多智能体对话框架 + +#### **Dapr Agents** +- [Dapr Agents](https://github.com/dapr/python-sdk) - 用于多智能体工作流的有状态虚拟角色 + +### 🛠️ 最新开源 LLM Agent 项目 (2024) + +#### **极简与教育性项目** +- [min-agent](https://github.com/zhouzaida/min-agent) - 极简 200 行 LLM Agent,用于理解智能体原理 +- [LangChain ReAct Agent](https://github.com/botextractai/ai-langchain-react-agent) - 带有 Python REPL 和 DuckDuckGo 搜索的 ReAct 智能体 +- [开源 LLM Agents ReAct](https://github.com/Praveengovianalytics/llm_agents_open_source) - 开源 LLM 智能体实现 + +#### **生产就绪框架** +- [SuperModels](https://github.com/JohannesVC/SuperModels) - 具有反思机制的 LLM 智能体桌面应用 +- [AgentKit](https://github.com/japanvik/agentkit) - 用于创建网络分布式 LLM 智能体的简单框架 + +#### **专业应用** +- [CrewAI 平台示例](https://github.com/genaiworks/crewai) - 多种真实世界应用的多智能体系统 +- [CrewAI Lenox](https://github.com/samurayy99/crewai_lenox) - 高级 CrewAI 实现 + +### 📚 LLM Agent 学习资源 + +#### **综合指南** +- [使用 CrewAI 构建多智能体 AI 系统](https://medium.com/neural-engineer/understanding-crewai-building-multi-agent-ai-systems-15d0236d5cbf) +- [智能体开发最佳实践](https://cookbook.openai.com/examples/gpt4-1_prompting_guide) + +#### **课程与教程** +- [Agentic AI 开发课程](https://github.com/panaversity/learn-agentic-ai) - Dapr Agentic Cloud Ascent (DACA) 完整课程 +- [Python 人工智能和机器学习](https://realpython.com/learning-paths/machine-learning-python/) +- [LangChain Agent 教程](https://python.langchain.com/docs/tutorials/) + +## 📖 Python 学习与开发 + +### 🎯 快速导航 + +1. [Python 新闻](#python-新闻) +2. [Python 书籍](#python-书籍) +3. [课程](#课程) +4. [算法与数据结构](#算法) +5. [Web 开发](#web-开发) +6. [数据科学与分析](#数据科学) +7. [自动化与机器人](#自动化与机器人) +8. [金融与交易](#金融与交易) +9. [性能优化](#性能优化) + +--- + +### Python 新闻 + +- [Python 官方](https://www.python.org/) +- [Medium Python](https://medium.com/tag/python) +- **Reddit 社区:** + - [r/Python](https://www.reddit.com/r/Python/) + - [r/learnpython](https://www.reddit.com/r/learnpython/) + - [r/pythontips](https://www.reddit.com/r/pythontips/) + - [r/pythoncoding](https://www.reddit.com/r/pythoncoding) + +### Python 书籍 + +#### **初学者** +- **Python 编程从入门到实践** (第3版, 2023) + - [Amazon](https://www.amazon.com/Python-Crash-Course-Hands-Project-Based/dp/1718502702) + +- **Python 编程入门** (第4版) + - [Amazon](https://www.amazon.com/Starting-Out-Python-Tony-Gaddis/dp/0134444329) + +- **Python 编程快速上手:让繁琐工作自动化** (第2版) + - [免费在线](https://automatetheboringstuff.com/) | [Amazon](https://www.amazon.com/Automate-Boring-Stuff-Python-Programming/dp/1593279922) + +- **Python Cookbook:掌握 Python 3 的秘诀** + - [Amazon](https://www.amazon.co.uk/Python-Cookbook-David-Beazley/dp/1449340377) + +#### **高级 Python (2023-2024)** +- **Effective Python:编写高质量 Python 代码的 90 个建议** (第2版) ⭐⭐⭐⭐⭐ + - [Amazon](https://www.amazon.com/Effective-Python-Specific-Software-Development/dp/0134853989) + +- **Python 代码整洁之道** ⭐⭐⭐⭐⭐ + - [Amazon](https://www.amazon.com/Clean-Code-Python-maintainable-efficient/dp/1788835832) + +### 课程 + +#### **初学者课程** +- [Python for Everybody](https://www.coursera.org/specializations/python) +- [Python 3 编程](https://www.coursera.org/specializations/python-3-programming) + +#### **高级学习** +- [2024 年 Flask 和 Python REST API](https://www.coursera.org/learn/packt-rest-apis-with-flask-and-python-in-2024-i01az) - 专业 Flask 开发 +- [YFinance 金融分析](https://kritjunsree.medium.com/the-2024-guide-to-using-yfinance-with-python-for-effective-stock-analysis-668a4a26ee3a) - 现代 Python 金融工具 + +### 算法 + +- [Python 交互式编程面试挑战](https://github.com/donnemartin/interactive-coding-challenges) - 算法和数据结构 +- [算法:Python 中的最小示例](https://github.com/keon/algorithms) - 数据结构和算法 +- [Pygorithm:学习 Python 算法](http://pygorithm.readthedocs.io/en/latest) - 学习算法的有趣方式 + +### Web 开发 + +#### **FastAPI** +- [FastAPI 文档](https://fastapi.tiangolo.com/) - 现代、快速的 API 构建 Web 框架 +- [FastAPI 最佳实践](https://github.com/zhanymkanov/fastapi-best-practices) + +#### **Flask** +- [2024 年 Flask 和 Python REST API](https://www.coursera.org/learn/packt-rest-apis-with-flask-and-python-in-2024-i01az) +- [使用 Python 和 Flask 开发 RESTful API](https://auth0.com/blog/developing-restful-apis-with-python-and-flask) +- [Flask 与代码质量](https://flake8.pycqa.org/en/latest/user/error-codes.html) + +#### **Django** +- [Django 完全初学者指南 - 第1部分](https://simpleisbetterthancomplex.com/series/2017/09/04/a-complete-beginners-guide-to-django-part-1.html) +- [使用 Django 构建 REST API](https://scotch.io/tutorials/build-a-rest-api-with-django-a-test-driven-approach-part-1) + +### 数据科学 + +#### **NumPy** +- [从 Python 到 Numpy](http://www.labri.fr/perso/nrougier/from-python-to-numpy/) +- [探索 Python 包中的行长度](http://jakevdp.github.io/blog/2017/11/09/exploring-line-lengths-in-python-packages) + +#### **Matplotlib** +- [Matplotlib 剖析](https://github.com/matplotlib/AnatomyOfMatplotlib) + +#### **数据分析项目** +- [探索美国警务数据](https://blog.patricktriest.com/police-data-python) +- [分析 1000+ 希腊葡萄酒](https://tselai.com/greek-wines-analysis.html) +- [生成 FiveThirtyEight 图表](https://www.dataquest.io/blog/making-538-plots) +- [亚马逊产品评论分析](http://minimaxir.com/2017/01/amazon-spark) + +### 自动化与机器人 + +#### **网页抓取** +- [使用 Scrapy、SQL、Matplotlib 进行网页抓取](http://www.scrapingauthority.com/python-scrapy-mysql-and-matplotlib-to-gain-web-data-insights) +- [高级网页抓取:绕过 403 禁止](http://sangaline.com/post/advanced-web-scraping-tutorial) +- [掌握 Python 网页抓取](https://hackernoon.com/mastering-python-web-scraping-get-your-data-back-e9a5cc653d88) + +#### **自动化项目** +- [使用 Twilio 和 Python 的婚礼自动化](https://www.twilio.com/blog/2017/04/wedding-at-scale-how-i-used-twilio-python-and-google-to-automate-my-wedding.html) +- [在 Medium 上寻找有趣的人](https://medium.freecodecamp.org/how-i-used-python-to-find-interesting-people-on-medium-be9261b924b0) + +#### **机器人** +- [Reddit + Facebook Messenger 机器人](https://pythontips.com/2017/04/13/making-a-reddit-facebook-messenger-bot) +- [Instagram 机器人成功故事](https://medium.freecodecamp.com/my-open-source-instagram-bot-got-me-2-500-real-followers-for-5-in-server-costs-e40491358340) + +#### **电子表格集成** +- [Python Excel 教程:权威指南](https://hackernoon.com/python-excel-tutorial-the-definitive-guide-934ee6dd15b0) +- [在 Excel 中使用 Python 进行数据分析](https://learning.anaconda.cloud/anaconda-certified-data-analysis-with-python-in-excel) +- [Google Sheets 和 Python](https://www.youtube.com/watch?v=vISRn5qFrkM) + +### 金融与交易 + +- [2024 年 YFinance 股票分析指南](https://kritjunsree.medium.com/the-2024-guide-to-using-yfinance-with-python-for-effective-stock-analysis-668a4a26ee3a) +- [使用 Python 进行量化交易](https://medium.com/@deepml1818/quantitative-trading-with-python-analyzing-financial-data-7c829d447e0a) +- [2024 年 Alpha Vantage 金融数据](https://medium.com/@datavisiondallas/navigating-financial-data-with-python-and-alpha-vantage-in-2024-a-beginners-guide-ca005bb1a6c2) +- [股票价格数据 - Python 金融编程](https://www.youtube.com/watch?v=2BrpKpWwT2A) +- [分析加密货币市场](https://blog.patricktriest.com/analyzing-cryptocurrencies-python) + + +### 性能优化 + +- [Python 每秒百万请求](https://medium.freecodecamp.com/million-requests-per-second-with-python-95c137af319) +- [是的,Python 很慢,但我不在乎](https://hackernoon.com/yes-python-is-slow-and-i-dont-care-13763980b5a1) +- [Python 中的记忆化](https://dbader.org/blog/python-memoization) + + diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..bfc1f36 --- /dev/null +++ b/_config.yml @@ -0,0 +1,134 @@ +# Site settings +title: FlyPython +subtitle: Python Learning Resource Hub +description: >- + FlyPython is a carefully curated collection of Python learning resources, + including tutorials, books, courses, tools, and best practices to support + Python learners from beginners to advanced developers. + +# Site information +url: "https://python.flypython.com" +baseurl: "" + +# Author information +author: + name: FlyPython + email: hello@flypython.com + github: flypython + twitter: flypython + +# Build settings +markdown: kramdown +highlighter: rouge +permalink: pretty + +# Theme configuration - Using GitHub Pages compatible theme +remote_theme: pages-themes/cayman@v0.2.0 + +# Plugins (GitHub Pages whitelist) +plugins: + - jekyll-feed + - jekyll-sitemap + - jekyll-seo-tag + - jekyll-optional-front-matter + - jekyll-readme-index + - jekyll-relative-links + +# SEO settings +lang: en +logo: /assets/images/logo.png + +# Social links +github_username: flypython +twitter_username: flypython + +# Navigation +header_pages: + - README.md + - README_cn.md + +# GitHub Pages safe collections +collections: + tutorials: + output: true + permalink: /:collection/:name/ + resources: + output: true + permalink: /:collection/:name/ + +# Defaults +defaults: + - scope: + path: "" + type: "posts" + values: + layout: "post" + author: "FlyPython" + - scope: + path: "" + type: "pages" + values: + layout: "page" + - scope: + path: "README.md" + values: + layout: "default" + title: "FlyPython - Python Learning Resources" + description: "A curated collection of Python learning resources including tutorials, books, courses, and best practices for developers at all levels." + lang: "en" + permalink: "/" + - scope: + path: "README_cn.md" + values: + layout: "default" + title: "FlyPython - Python 学习资源" + description: "精心策划的 Python 学习资源集合,包含教程、书籍、课程和各级别开发者的最佳实践。" + lang: "zh-CN" + permalink: "/README_cn.html" + - scope: + path: "" + type: "tutorials" + values: + layout: "tutorial" + - scope: + path: "" + type: "resources" + values: + layout: "resource" + +# Analytics (optional) +google_analytics: # UA-XXXXXXXX-X + +# Features +show_downloads: false +show_github_ribbon: false + +# Custom variables +github: + repository_url: https://github.com/flypython/python + repository_name: flypython/python + +# Content settings +kramdown: + input: GFM + hard_wrap: false + syntax_highlighter: rouge + syntax_highlighter_opts: + css_class: 'highlight' + span: + line_numbers: false + block: + line_numbers: true + +# Exclude from processing +exclude: + - Gemfile + - Gemfile.lock + - node_modules + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ + - tools/ + - link_audit_report.md + - content_update_summary.md \ No newline at end of file diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..8555b4a --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,46 @@ +main: + - title: "🏠 Home" + url: "/" + - title: "🇨🇳 中文版" + url: "/README_cn.html" + - title: "📚 Resources" + url: "#resources" + children: + - title: "📖 Tutorials" + url: "#tutorials" + - title: "📚 Books" + url: "#books" + - title: "🎓 Courses" + url: "#courses" + - title: "🛠️ Tools" + url: "#tools" + - title: "🤖 AI/ML" + url: "#ai-ml" + children: + - title: "🧠 LLM" + url: "#python-for-llm" + - title: "📊 Data Science" + url: "#data-science" + - title: "💹 Finance" + url: "#finance" + - title: "🔗 GitHub" + url: "https://github.com/flypython/python" + external: true + +footer: + - title: "Quick Links" + children: + - title: "Python.org" + url: "https://python.org" + - title: "PyPI" + url: "https://pypi.org" + - title: "Real Python" + url: "https://realpython.com" + - title: "Community" + children: + - title: "Reddit r/Python" + url: "https://reddit.com/r/Python" + - title: "Stack Overflow" + url: "https://stackoverflow.com/questions/tagged/python" + - title: "Python Discord" + url: "https://discord.gg/python" \ No newline at end of file diff --git a/_includes/head-custom.html b/_includes/head-custom.html new file mode 100644 index 0000000..ef883a9 --- /dev/null +++ b/_includes/head-custom.html @@ -0,0 +1,215 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html new file mode 100644 index 0000000..3c0f24e --- /dev/null +++ b/_layouts/default.html @@ -0,0 +1,92 @@ + + + + + + + {% seo %} + + + + + + + + {% include head-custom.html %} + + + Skip to the content. + + + +
+ + {% if content contains '##' %} + + {% endif %} + + {{ content }} + + +
+ + + + + \ No newline at end of file diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..c249f6e --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,417 @@ +/* Custom CSS for FlyPython */ + +/* Enhanced Typography */ +body { + font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + line-height: 1.8; +} + +/* Language Toggle Styles */ +.language-toggle { + margin: 1rem 0; + text-align: center; +} + +.btn-lang { + display: inline-block; + margin: 0 0.25rem; + padding: 0.5rem 1rem; + background-color: rgba(255, 255, 255, 0.2); + color: white; + text-decoration: none; + border-radius: 0.3rem; + border: 1px solid rgba(255, 255, 255, 0.3); + transition: all 0.2s ease; + /* Ensure buttons are not affected by generic .btn styles */ + transform: none !important; + box-shadow: none; +} + +.btn-lang:hover { + background-color: rgba(255, 255, 255, 0.3); + border-color: rgba(255, 255, 255, 0.5); + text-decoration: none; + color: white; + /* Disable transform effects on hover */ + transform: none !important; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +.btn-lang.active { + background-color: rgba(255, 255, 255, 0.9); + color: #333; + border-color: rgba(255, 255, 255, 0.9); + transform: none !important; +} + +/* Header Stats */ +.header-stats { + margin-top: 1rem; + padding: 0.75rem 1rem; + background: rgba(255, 255, 255, 0.1); + border-radius: 0.5rem; + backdrop-filter: blur(10px); + border: 1px solid rgba(255, 255, 255, 0.2); +} + +.header-stats p { + margin: 0; + color: rgba(255, 255, 255, 0.9); + font-size: 0.9rem; + text-align: center; + font-weight: 300; +} + +.header-stats a { + color: rgba(255, 255, 255, 0.95); + text-decoration: none; + transition: all 0.2s ease; +} + +.header-stats a:hover { + color: white; + text-decoration: none; +} + +.header-stats img { + vertical-align: middle; + margin-left: 0.25rem; +} + +/* Enhanced Header */ +.page-header { + background: linear-gradient(135deg, #157878 0%, #2c3e50 100%); +} + +.project-name { + font-size: 3rem; + font-weight: 700; + text-shadow: 0 2px 4px rgba(0,0,0,0.3); +} + +.project-tagline { + font-size: 1.2rem; + font-weight: 300; + opacity: 0.9; +} + +/* Enhanced Buttons - Only affects GitHub buttons, not language toggle buttons */ +.btn:not(.btn-lang) { + transition: all 0.3s ease; +} + +.btn:not(.btn-lang):hover { + transform: translateY(-2px); + box-shadow: 0 4px 8px rgba(0,0,0,0.2); +} + +/* Table of Contents Styles */ +.toc { + background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); + border: 1px solid #dee2e6; + border-radius: 0.5rem; + padding: 1.5rem; + margin: 2rem 0; + box-shadow: 0 2px 4px rgba(0,0,0,0.1); +} + +.toc h3 { + margin-top: 0; + color: #495057; + font-size: 1.2rem; + border-bottom: 2px solid #157878; + padding-bottom: 0.5rem; +} + +.toc ul { + list-style: none; + padding-left: 0; +} + +.toc li { + margin: 0.5rem 0; +} + +.toc a { + color: #157878; + text-decoration: none; + padding: 0.25rem 0.5rem; + border-radius: 0.25rem; + transition: all 0.2s ease; + display: block; +} + +.toc a:hover { + background-color: #157878; + color: white; + text-decoration: none; +} + +.toc-level-2 { + padding-left: 1rem; +} + +.toc-level-3 { + padding-left: 2rem; +} + +/* Enhanced Main Content */ +.main-content { + line-height: 1.8; +} + +.main-content h1, +.main-content h2, +.main-content h3, +.main-content h4 { + color: #2c3e50; + margin-top: 2rem; + margin-bottom: 1rem; +} + +.main-content h2 { + border-bottom: 2px solid #157878; + padding-bottom: 0.5rem; +} + +.main-content h3 { + border-left: 4px solid #157878; + padding-left: 1rem; +} + +/* Code block enhancements */ +.main-content pre { + background: #2d3748; + border-radius: 0.5rem; + padding: 1.5rem; + overflow-x: auto; +} + +.main-content code { + background: #f1f3f4; + color: #d73a49; + padding: 0.2rem 0.4rem; + border-radius: 0.25rem; + font-size: 0.9em; +} + +.main-content pre code { + background: none; + color: #e2e8f0; + padding: 0; +} + +/* Link styles */ +.main-content a { + color: #157878; + text-decoration: none; + border-bottom: 1px solid transparent; + transition: all 0.2s ease; +} + +.main-content a:hover { + border-bottom-color: #157878; + text-decoration: none; +} + +/* Enhanced lists */ +.main-content ul li { + margin: 0.75rem 0; +} + +.main-content ul li a { + font-weight: 500; +} + +.main-content ul li a:hover { + background: rgba(21, 120, 120, 0.1); + padding: 0.2rem 0.4rem; + border-radius: 0.25rem; + margin: -0.2rem -0.4rem; +} + +/* Footer enhancements */ +.site-footer { + border-top: 2px solid #157878; + margin-top: 3rem; + padding-top: 2rem; +} + +.footer-stats { + text-align: center; + margin-top: 1rem; + padding: 1rem; + background: #f8f9fa; + border-radius: 0.5rem; +} + +.footer-stats p { + margin: 0; + color: #6c757d; +} + +/* Scroll to top button */ +.scroll-to-top { + position: fixed; + bottom: 2rem; + right: 2rem; + background: #157878; + color: white; + border: none; + border-radius: 50%; + width: 3rem; + height: 3rem; + cursor: pointer; + opacity: 0; + transition: opacity 0.3s ease; + z-index: 1000; + font-size: 1.2rem; +} + +.scroll-to-top.show { + opacity: 1; +} + +.scroll-to-top:hover { + background: #2c3e50; +} + +/* Resource cards */ +.resource-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); + gap: 2rem; + margin: 2rem 0; +} + +.resource-card { + background: white; + border-radius: 0.5rem; + padding: 1.5rem; + box-shadow: 0 2px 10px rgba(0,0,0,0.1); + transition: all 0.3s ease; + border-left: 4px solid #157878; +} + +.resource-card:hover { + transform: translateY(-4px); + box-shadow: 0 8px 25px rgba(0,0,0,0.15); +} + +/* Category headers */ +.category-header { + display: flex; + align-items: center; + margin: 3rem 0 1.5rem 0; + padding: 1rem; + background: linear-gradient(135deg, rgba(21, 120, 120, 0.1) 0%, rgba(21, 120, 120, 0.05) 100%); + border-radius: 0.5rem; + border-left: 5px solid #157878; +} + +/* Statistics section */ +.stats-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); + gap: 1rem; + margin: 2rem 0; +} + +.stat-card { + background: white; + padding: 1.5rem; + border-radius: 0.5rem; + text-align: center; + box-shadow: 0 2px 10px rgba(0,0,0,0.1); + border-top: 3px solid #157878; +} + +.stat-number { + font-size: 2.5rem; + font-weight: bold; + color: #157878; + display: block; +} + +.stat-label { + color: #666; + font-size: 0.9rem; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +/* Responsive improvements */ +@media screen and (max-width: 768px) { + .project-name { + font-size: 2rem; + } + + .project-tagline { + font-size: 1rem; + } + + .language-toggle { + text-align: center; + } + + .btn-lang { + display: block; + margin: 0.5rem auto; + max-width: 200px; + } + + .header-stats { + margin: 1rem 0; + padding: 0.5rem; + } + + .header-stats p { + font-size: 0.8rem; + line-height: 1.4; + } + + .toc { + margin: 1rem 0; + padding: 1rem; + } + + .resource-grid { + grid-template-columns: 1fr; + } + + .stats-grid { + grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); + } +} + +/* Dark mode support */ +@media (prefers-color-scheme: dark) { + .resource-card { + background: #2d3748; + color: #e2e8f0; + } + + .stat-card { + background: #2d3748; + color: #e2e8f0; + } + + .footer-stats { + background: #2d3748; + color: #e2e8f0; + } +} + +/* Print styles */ +@media print { + .page-header, + .site-footer, + .scroll-to-top, + .toc { + display: none !important; + } + + .main-content { + max-width: none !important; + } +} \ No newline at end of file diff --git a/qrcode.png b/qrcode.png deleted file mode 100644 index 4b36c58..0000000 Binary files a/qrcode.png and /dev/null differ diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..d909cd5 --- /dev/null +++ b/robots.txt @@ -0,0 +1,19 @@ +User-agent: * +Allow: / + +# Sitemap +Sitemap: https://python.flypython.com/sitemap.xml + +# Specific directives +Disallow: /tools/ +Disallow: /*.json$ +Disallow: /assets/css/ +Disallow: /assets/js/ + +# Allow all important pages +Allow: /README.md +Allow: /README_cn.html +Allow: / + +# Crawl delay (optional) +Crawl-delay: 1 \ No newline at end of file diff --git a/tools/check_links.py b/tools/check_links.py new file mode 100644 index 0000000..627fcbc --- /dev/null +++ b/tools/check_links.py @@ -0,0 +1,189 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +""" +FlyPython 链接检查工具 +用于定期检查README文件中所有外部链接的有效性 +""" + +import re +import requests +import time +import json +import os +from urllib.parse import urlparse +from concurrent.futures import ThreadPoolExecutor, as_completed + +class LinkChecker: + def __init__(self): + self.session = requests.Session() + self.session.headers.update({ + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' + }) + self.timeout = 10 + self.results = { + 'working': [], + 'broken': [], + 'redirect': [], + 'timeout': [], + 'unknown': [] + } + + def extract_links_from_file(self, filename): + """从markdown文件中提取所有外部链接""" + try: + with open(filename, 'r', encoding='utf-8') as f: + content = f.read() + except Exception as e: + print(f"无法读取文件 {filename}: {e}") + return [] + + # 匹配markdown链接格式 [text](url) + markdown_links = re.findall(r'\[([^\]]*)\]\(([^)]+)\)', content) + + # 匹配纯链接格式 + url_pattern = r'https?://[^\s\])\}]+' + plain_links = re.findall(url_pattern, content) + + links = [] + + # 处理markdown链接 + for text, url in markdown_links: + if url.startswith('http'): + links.append({ + 'text': text, + 'url': url, + 'file': filename, + 'type': 'markdown' + }) + + # 处理纯链接 + for url in plain_links: + # 避免重复 + if not any(link['url'] == url for link in links): + links.append({ + 'text': url, + 'url': url, + 'file': filename, + 'type': 'plain' + }) + + return links + + def check_link(self, link): + """检查单个链接的状态""" + url = link['url'] + try: + response = self.session.head(url, timeout=self.timeout, allow_redirects=True) + status_code = response.status_code + + if status_code == 200: + link['status'] = 'working' + link['status_code'] = status_code + self.results['working'].append(link) + elif 300 <= status_code < 400: + link['status'] = 'redirect' + link['status_code'] = status_code + link['final_url'] = response.url + self.results['redirect'].append(link) + else: + # 尝试GET请求,有些网站不支持HEAD + try: + response = self.session.get(url, timeout=self.timeout) + if response.status_code == 200: + link['status'] = 'working' + link['status_code'] = response.status_code + self.results['working'].append(link) + else: + link['status'] = 'broken' + link['status_code'] = response.status_code + self.results['broken'].append(link) + except: + link['status'] = 'broken' + link['status_code'] = status_code + self.results['broken'].append(link) + + except requests.exceptions.Timeout: + link['status'] = 'timeout' + link['error'] = 'Request timeout' + self.results['timeout'].append(link) + + except requests.exceptions.RequestException as e: + link['status'] = 'unknown' + link['error'] = str(e) + self.results['unknown'].append(link) + + return link + + def check_all_links(self, links, max_workers=10): + """并发检查所有链接""" + print(f"开始检查 {len(links)} 个链接...") + + with ThreadPoolExecutor(max_workers=max_workers) as executor: + future_to_link = {executor.submit(self.check_link, link): link for link in links} + + for i, future in enumerate(as_completed(future_to_link), 1): + link = future_to_link[future] + try: + result = future.result() + status = result.get('status', 'unknown') + print(f"[{i}/{len(links)}] {status.upper()}: {result['url']}") + time.sleep(0.1) + except Exception as e: + print(f"检查链接时出错 {link['url']}: {e}") + + def generate_report(self): + """生成检查报告""" + total = sum(len(links) for links in self.results.values()) + + print("\n" + "="*60) + print("链接检查报告") + print("="*60) + print(f"总链接数: {total}") + print(f"正常链接: {len(self.results['working'])}") + print(f"重定向链接: {len(self.results['redirect'])}") + print(f"失效链接: {len(self.results['broken'])}") + print(f"超时链接: {len(self.results['timeout'])}") + print(f"未知状态: {len(self.results['unknown'])}") + + # 保存详细结果 + os.makedirs('../reports', exist_ok=True) + with open('../reports/link_check_results.json', 'w', encoding='utf-8') as f: + json.dump(self.results, f, ensure_ascii=False, indent=2) + + print(f"\n详细结果已保存到: reports/link_check_results.json") + +def main(): + checker = LinkChecker() + + # 从README文件提取链接 (相对于项目根目录) + files_to_check = ['../README.md', '../README_cn.md'] + all_links = [] + + for filename in files_to_check: + print(f"从 {filename} 提取链接...") + links = checker.extract_links_from_file(filename) + all_links.extend(links) + print(f"找到 {len(links)} 个链接") + + if not all_links: + print("没有找到任何链接!") + return + + # 去重 + unique_links = [] + seen_urls = set() + for link in all_links: + if link['url'] not in seen_urls: + unique_links.append(link) + seen_urls.add(link['url']) + + print(f"去重后共 {len(unique_links)} 个唯一链接") + + # 检查链接 + checker.check_all_links(unique_links) + + # 生成报告 + checker.generate_report() + +if __name__ == '__main__': + main() \ No newline at end of file