Welcome to the 100LinesOfPythonCode repository! This repository showcases unique, clever, and cool Python code snippets—all under 100 lines of code. Each piece of code is well-commented, easy to understand, and aims to provide something intriguing, whether it's a unique algorithm, an uncommon use case, or a smart trick in Python.
├── snippets/
│ └── your_descriptive_title.py or your_descriptive_title.ipynb
├── README.md
- snippets/: This folder contains all the Python and Jupyter Notebook files. Each file should be named descriptively based on what the code does.
- README.md: Documentation of the project (You're reading it now!)
-
Fork and star ⭐ this repository to show your support.
-
Clone the repository to your local machine:
git clone https://github.com/your-username/100LinesOfPythonCode.git
-
Navigate to the snippets folder to explore the code:
cd 100LinesOfPythonCode/snippets -
Run the Python code or open the .ipynb file to check out the snippet:
python your_descriptive_title.py
We welcome contributions! Here’s how you can help:
-
Create a new snippet: Write a new Python or Jupyter Notebook file under the snippets/ folder. Your code should:
- Be under 100 lines.
- Be well-commented and easy to understand.
- Demonstrate a unique concept, algorithm, or technique.
-
Name the file descriptively: Use a clear and concise name that reflects what the code does.
-
Create a Pull Request (PR):
- Fork this repository.
- Add your Python or .ipynb file under the snippets/ folder in your forked version.
- Submit a Pull Request 🔄 with your changes, whether it’s fixing a bug or adding an exciting new feature.
Make sure your PR follows our Contribution Guidelines 📜. This ensures that the code remains clean, well-documented, and easy to follow.
-
Follow these steps:
-
Fork the repository
-
Clone your forked repository
git clone https://github.com/your-username/100LinesOfPythonCode.git
-
Create a new branch
git checkout -b your-branch-name
-
Add your changes and commit
git add . git commit -m "Add your_descriptive_title.py"
-
Push your changes
git push origin your-branch-name
-
Open a Pull Request on the original repository
If you find these snippets interesting or useful, please star this repository! ⭐
Feel free to fork the repository and submit your own snippets. Together, we can build a collection of intriguing Python code!
📄 License This project is licensed under the MIT License - see the LICENSE file for details.