Python README

The project's README from github.com/geekcomputers/Python. As one markdown file: README.md.

#This is a new repo

My Python Eggs 🐍 😄

Python Checks License: MIT Python 3.10+


I do not consider myself as a programmer. I create these little programs as experiments to play with Python, or to solve problems for myself. I would gladly accept pointers from others to improve, simplify, or make the code more efficient. If you would like to make any comments then please feel free to email me: [email protected].


This repository contains a collection of Python scripts that are designed to reduce human workload and serve as educational examples for beginners to get started with Python. The code documentation is aligned correctly for viewing in Notepad++ :spiral_notepad:

Feel free to explore the scripts and use them for your learning and automation needs!

Getting Started

List of Scripts:

  1. batch_file_rename.py - Batch rename a group of files in a specified directory, changing their extensions.
  2. create_dir_if_not_there.py - Check if a directory exists in the user's home directory. Create it if it doesn't exist.
  3. Fast Youtube Downloader - Download YouTube videos quickly with parallel threads using aria2c.
  4. Google Image Downloader - Query a given term and retrieve images from the Google Image database.
  5. dir_test.py - Test if the directory testdir exists. If not, create it.
  6. env_check.py - Check if all the required environment variables are set.
  7. blackjack.py - Casino Blackjack-21 game in Python.
  8. fileinfo.py - Show file information for a given file.
  9. folder_size.py - Scan the current directory and all subdirectories and display their sizes.
  10. logs.py - Search for all *.log files in a directory, zip them using the specified program, and date stamp them.
  11. move_files_over_x_days.py - Move all files over a specified age (in days) from the source directory to the destination directory.
  12. nslookup_check.py - Open the file server_list.txt and perform nslookup for each server to check the DNS entry.
  13. osinfo.py - Display information about the operating system on which the script is running.
  14. ping_servers.py - Ping the servers associated with the specified application group.
  15. ping_subnet.py - Scan the final range of a given IP subnet for available addresses.
  16. powerdown_startup.py - Ping machines in the server list. Load the putty session if the machine is up, or notify if it is not.
  17. puttylogs.py - Zip all the logs in the given directory.
  18. script_count.py - Scan the scripts directory and count the different types of scripts.
  19. get_youtube_view.py - Get more views for YouTube videos and repeat songs on YouTube.
  20. script_listing.py - List all files in a given directory and its subdirectories.
  21. testlines.py - Open a file and print out 100 lines of the set line variable.
  22. tweeter.py - Tweet text or a picture from the terminal.
  23. serial_scanner.py - List available serial ports in use on Linux and Windows systems.
  24. get_youtube_view.py - Get more views for YouTube videos and repeat songs on YouTube.
  25. CountMillionCharacter.py and CountMillionCharacter2.0 - Get character count of a text file.
  26. xkcd_downloader.py - Download the latest XKCD comic and place them in a new folder called "comics".
  27. timymodule.py - An alternative to Python's 'timeit' module and easier to use.
  28. calculator.py - Implement a calculator using Python's eval() function.
  29. Google_News.py - Use BeautifulSoup to provide latest news headlines along with news links.
  30. cricket_live_score - Use BeautifulSoup to provide live cricket scores.
  31. youtube.py - Take a song name as input and fetch the YouTube URL of the best matching song and play it.
  32. site_health.py - Check the health of a remote server.
  33. SimpleStopWatch.py - Simple stop watch implementation using Python's time module.
  34. Changemac.py - Change your MAC address, generate a random MAC address, or enter input as a new MAC address on Linux (Successfully Tested in Ubuntu 18.04).
  35. whatsapp-monitor.py - Use Selenium to give online status updates about your contacts in WhatsApp on the terminal.
  36. whatsapp-chat-analyzer.py - WhatsApp group/individual chat analyzer that visualizes chat activity using matplotlib.
  37. JARVIS.py - Control Windows programs with your voice.
  38. Images Downloader - Download images from webpages on Unix-based systems.
  39. space_invader.py.py - Classical 2D space invader game to recall your childhood memories.
  40. Test Case Generator - Generate different types of test cases with a clean and friendly UI, used in competitive programming and software testing.
  41. Extract Thumbnail From Video - Extract Thumbnail from video files
  42. How to begin the journey of open source (first contribution) - First Contribution of open source
  43. smart_file_organizer.py - Organizes files in a directory into categorized subfolders based on file type (Images, Documents, Videos, Audios, Archives, Scripts, Others). You can run it once or automatically at set intervals using the --path and --interval options.

_Note: The content in this repository belongs to the respective authors and creators. I'm just providing a formatted README.md for better presentation.

Python (geekcomputers/Python)

Searching Database…

35.4K ·GitHub
这是什么?这是一个个人收集的小型独立 Python 脚本合集,涵盖自动化、游戏、实用工具和网页爬取。它既用来解决作者自己的问题,也可作为初学者的学习示例。
这是一个库,还是只是一个脚本文件夹?它是一个扁平的文件夹,里面是互不相关、彼此独立的 Python 脚本,并不是带有共享 API 的库或软件包。
我该如何运行其中某个脚本?克隆仓库,然后直接用 Python 运行你想要的那个 .py 文件(例如 python blackjack.py)。每个脚本都是独立的,所以你只需挑选需要的那个,而无需安装整个项目。
这些脚本需要额外的库吗?这取决于具体脚本:有些只使用标准库(如 time、calculator),而另一些则需要 BeautifulSoup、Selenium、matplotlib 或 aria2c 等第三方包。这些依赖没有打包在一起,也没有统一列在一个 requirements 文件中。
这些脚本是否经过打磨,并作为一个完整的项目来维护?没有。作者称它们为个人实验,而非专业软件,而且有些脚本只在特定的操作系统版本上测试过(例如 Changemac.py 仅在 Ubuntu 18.04 上测试)。
这些脚本在 Windows 和 Linux 上都能用吗?大多数是跨平台的 Python 脚本,但也有少数是针对特定操作系统的,例如 serialscanner.py(支持 Linux/Windows),以及 Changemac.py(仅限 Linux,已在 Ubuntu 上测试)。
包含哪些类型的脚本?种类繁多:文件和目录工具(批量重命名、文件夹大小统计、文件整理器)、网络工具(服务器 ping、DNS 检查、MAC 地址修改器)、游戏(二十一点、太空侵略者),以及网页爬虫(谷歌新闻、YouTube 下载器、WhatsApp 聊天记录分析器)。
有语音助手脚本吗?有。JARVIS.py 可以让你用语音控制 Windows 程序。
智能文件整理脚本如何配置?smartfileorganizer.py 会把文件分类整理到不同的子文件夹中(图片、文档、视频、音频、压缩包、脚本、其他),并且可以通过 --path 和 --interval 选项只运行一次或重复运行。
Size
48.9 MB
Stars
35.4K
Updated
CommitOct 16
Age
14y
Commits · 90 Days