forked from sumanth-0/100LinesOfPythonCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path100LinesOfPythonCode
More file actions
60 lines (45 loc) · 2.53 KB
/
100LinesOfPythonCode
File metadata and controls
60 lines (45 loc) · 2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
We welcome contributions from developers of all skill levels! Whether you're submitting a Python snippet, fixing bugs, improving documentation, or adding new features, your contributions make a big difference.
How to Contribute
1. Fork the Repository
Fork the repository by clicking the "Fork" button at the top of this page. This will create a copy of the repository in your GitHub account.
2. Clone Your Fork
Clone your forked repository to your local machine with the following command:
bash/Terminal
git clone https://github.com/sumanth-0/100LinesOfPythonCode.git
3. Create a New Branch
Before making any changes, create a new branch for your contribution:
bash/Terminal
Copy code
git checkout -b branch-name
Replace branch-name with something descriptive, like add-python-snippet or fix-typo-in-docs.
4. Add Your Python Code
Add your Python code snippet in the snippets/ directory. Ensure your code follows these guidelines:
It must be under 100 lines of code.
It should be well-commented and easy to understand.
It should provide something interesting—this could be a unique algorithm, a cool use case, or a clever trick in Python.
Name your file using a descriptive title of what the code does. For example:
bash
Copy code
snippets/fibonacci_sequence.py
5. Test Your Code
Ensure your code works by running it locally. If you can, write test cases to validate its functionality.
6. Commit and Push Your Changes
After you've made your changes and tested your code, commit your work:
bash
Copy code
git add .
git commit -m "Add <description-of-your-code>"
git push origin branch-name
7. Open a Pull Request
Go to your forked repository on GitHub, and click the "Compare & pull request" button. In the pull request, describe the changes you've made and why they are interesting. You may reference issues or discussions if necessary.
8. Review and Merge
We will review your pull request, and once approved, it will be merged into the main repository.
Contribution Guidelines
Follow Python’s PEP 8 style guide to keep the code clean and readable.
Make sure your code is under 100 lines.
Be respectful and collaborative when giving or receiving feedback on code reviews.
Feel free to add comments or suggestions to improve other submissions.
When in doubt, check out our existing snippets to see if your idea has been implemented before.
Issues
If you find a bug, have a question, or would like to suggest a new feature, feel free to open an issue. Please include a detailed description so we can understand the problem or feature request.
Thank you for contributing!