Skip to content

Commit e042329

Browse files
committed
Added final project chapter
Signed-off-by: Chandan Kumar <raukadah@gmail.com>
1 parent d92d323 commit e042329

File tree

3 files changed

+57
-4
lines changed

3 files changed

+57
-4
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,11 @@ https://www.python.org/downloads/
3838
* [Begin your Python Journey](beginning.md)
3939
* [Have fun with Python Data Structures](data_structures.md)
4040
* [Interact with files and Modules](file_and_modules.md)
41+
* [Final Project](final_project.md)
42+
43+
### What nexts from here:
44+
* Complete [Python for you and me book](https://pymbook.readthedocs.io/en/latest/)
45+
* Complete [The Hitchhiker’s Guide to Python](https://docs.python-guide.org/)
46+
* Looking for solving problems/projects check [Pybites](https://pybit.es/)
47+
48+
Have fun and Happy Hacking.

file_and_modules.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,4 @@ greetings.greeting('FOSS MEET')
115115
Welcome FOSS MEET
116116
the value of __name__ is greetings
117117
[raukadah@ironman python-workshop]$
118-
```
119-
120-
## Installing a new python module
121-
$ python3 -m pip install requests
118+
```

final_project.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# It's time to solve the riddle
2+
3+
## Tools we need before starting
4+
5+
### Install pip
6+
```
7+
$python3 -m ensurepip
8+
```
9+
10+
### Create a virtualenv and activate it
11+
```
12+
$ python3 -m venv fossmeet
13+
$ source fossmeet/bin/activate
14+
```
15+
16+
### Install requests python module
17+
```
18+
$ python3 -m pip install requests
19+
```
20+
21+
## It's time to follow next steps
22+
23+
Here is the github contributions API url
24+
https://api.github.com/repos/python/cpython/stats/contributors
25+
26+
[1.] Create a github token to access github API by following this
27+
link: https://github.com/settings/tokens/new
28+
29+
[2.] Copy the token store it safely in a file
30+
31+
[3.] Create a file name github_repo_contributors.py
32+
33+
[4.] Create first function which will ask for your github
34+
username and token and return it as a tuple.
35+
36+
[5.] Import requests module, then use *requests.get* method to
37+
call the github API and then store the response
38+
* check the response status code if it is not 200
39+
then raise exception with proper message.
40+
* If you get the response code == 200 then use json module
41+
and dump response data in contribution.json
42+
43+
[6.] Since we have data now, create another function which will
44+
return contributors name and their contributions
45+
46+
[7.] Procced with first top 10 contributors name
47+
48+
[8.] Print the no. of contributors with same commit.

0 commit comments

Comments
 (0)