Skip to content

Commit 14545b5

Browse files
authored
Merge pull request #1 from talkpython/master
update from source
2 parents 1385b01 + 4bb06a2 commit 14545b5

File tree

54 files changed

+327
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+327
-19
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,11 @@ ENV/
105105
days/91-93-sqlalchemy/demo/persistent_rps/db/rock_paper_scissors.sqlite
106106
days/91-93-sqlalchemy/demo/persistent_rps_starter/.vscode/settings.json
107107
rock_paper_scissors.sqlite
108+
109+
# Gimp
110+
*.xcf
111+
112+
# TexturePacker
113+
*.tps
114+
115+
**.DS_Store

days/01-03-datetimes/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Work on *Bite 7 - Parsing dates from logs* for your second day of learning datet
2222

2323
Edit: We decided to simplify Bite 7 slightly after some feedback we received from students. We've now removed the requirement to read in the file which should keep the Bite focused on the theme.
2424

25-
Additionally, we've added another Bite that should be more appropriate for beginners. Unlock it here: [https://codechalleng.es/bites/promo/datetimes_starter](https://codechalleng.es/bites/promo/datetimes_starter)
25+
Additionally, we've added another TWO free Bites that should be more appropriate for beginners. Unlock them here: [https://codechalleng.es/bites/promo/datetimes_starter](https://codechalleng.es/bites/promo/datetimes_starter) and [https://codechalleng.es/bites/promo/more-datetimes](https://codechalleng.es/bites/promo/more-datetimes).
2626

2727

2828
## Day N+2: Your Turn!
@@ -33,11 +33,12 @@ A fun project would be to create yourself a Pomodoro Timer that incorporates dat
3333

3434
This could also be applied to a stopwatch app. Use time of course but also throw in the timestamps and even some basic calculations on the difference between the start and end timestamps.
3535

36+
We encourage you to _pull request_ your work via [PyBites Code Challenge #52](https://codechalleng.es/challenges/52/). Have fun!
3637

3738
### Time to share what you've accomplished!
3839

3940
Be sure to share your last couple of days work on Twitter or Facebook. Use the hashtag **#100DaysOfCode**.
4041

4142
Here are [some examples](https://twitter.com/search?q=%23100DaysOfCode) to inspire you. Consider including [@talkpython](https://twitter.com/talkpython) and [@pybites](https://twitter.com/pybites) in your tweets.
4243

43-
*See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).*
44+
*See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).*

days/04-06-collections/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Collections module
2+
3+
## Day 1: Your new data structure friends
4+
5+
Welcome to this lesson. Today you will learn about some powerful new data structures: `namedtuple`, `defaultdict`, `Counter` and `deque`.
6+
7+
Today you watch the videos. I also prepared a [Jupyter notebook](https://github.com/talkpython/100daysofcode-with-python-course/blob/master/days/04-06-collections/collections.ipynb) so you can follow along with this lesson.
8+
9+
## Day 2: Practice using movie data
10+
11+
You get to use these new data structures I encourage you to code an exercise: [PyBites Code Challenge 13 - Highest Rated Movie Director](https://pybit.es/codechallenge13.html).
12+
13+
See the [notebook](https://github.com/talkpython/100daysofcode-with-python-course/blob/master/days/04-06-collections/collections.ipynb) for more info how to complete this exercise.
14+
15+
You can also take a slimmed down version of this exercise [on our platform](https://codechalleng.es/bites/30/).
16+
17+
## Day 3: More practice on your own data
18+
19+
We challenge you to find your own data set and try to use the new collections data structures yourself.
20+
21+
Stuck at finding examples? We used `collections` quite a bit for [when we did the 100 Days of Code](https://github.com/pybites/100DaysOfCode/blob/master/LOG.md):
22+
23+
$ python module_index.py |grep collections
24+
collections | stdlib | 001, 021, 023, 034, 036, 042, 045, 055, 057, 063, 076, 084, 086, 095, 096
25+
26+
## Time to share what you've accomplished!
27+
28+
Be sure to share your last couple of days work on Twitter or Facebook. Use the hashtag **#100DaysOfCode**.
29+
30+
Here are [some examples](https://twitter.com/search?q=%23100DaysOfCode) to inspire you. Consider including [@talkpython](https://twitter.com/talkpython) and [@pybites](https://twitter.com/pybites) in your tweets.
31+
32+
See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).

days/10-12-pytest/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Be warned: mastering `pytest` might feel like possessing a super power!
1414

1515
## Day N: Setup + Learn pytest
1616

17-
Today you will pip install `pytest` and `pytest-cov` and watch the video lectures.
17+
Today you will pip install `pytest` and `pytest-cov` (best practice is to use a [virtual environment](https://pybit.es/the-beauty-of-virtualenv.html)) and watch the video lectures.
1818

1919
Start thinking about how you can write tests for your code ...
2020

days/13-15-text-games/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def game_loop(player1, player2, rolls):
7474
# Compute who won
7575
```
7676

77-
Bonus points for address the possibility of a tie after three rounds.
77+
Bonus points if you address the possibility of a tie after three rounds.
7878

7979
## Day 15: Tidy up standard **Rock, Paper, Scissors**
8080

@@ -116,4 +116,4 @@ Be sure to share your last couple of days work on Twitter or Facebook. Use the h
116116

117117
Here are [some examples](https://twitter.com/search?q=%23100DaysOfCode) to inspire you. Consider including [@talkpython](https://twitter.com/talkpython) and [@pybites](https://twitter.com/pybites) in your tweets.
118118

119-
*See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).*
119+
*See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).*

days/13-15-text-games/rps15.jpg

-2.4 KB
Loading
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# List comprehensions and generators
2+
3+
## Day 1: Ready to learn some powerful, Pythonic concepts?
4+
5+
> List comprehensions and generators are in my top 5 favorite Python features leading to clean, robust and Pythonic code.
6+
7+
Welcome to this lesson. In today's videos you will learn two powerful techniques you can use in Python: list comprehensions and generators.
8+
9+
I prepared a [Jupyter notebook](https://github.com/talkpython/100daysofcode-with-python-course/blob/master/days/16-18-listcomprehensions-generators/list-comprehensions-generators.ipynb) so you can follow along with this lesson.
10+
11+
## Day 2: Practice!
12+
13+
Look at your code and see if you can refactor it to use list comprehensions. Same for generators. Are you building up a list somewhere where you could potentially use a generator?
14+
15+
[My notebook](https://github.com/talkpython/100daysofcode-with-python-course/blob/master/days/16-18-listcomprehensions-generators/list-comprehensions-generators.ipynb) has an exercise to sink your teeth in. Please try it and tomorrow I will discuss the solution.
16+
17+
## Day 3: Solution / simulate unix pipelines
18+
19+
I will detail the solution of yesterday's exercise [in my notebook](https://github.com/talkpython/100daysofcode-with-python-course/blob/master/days/16-18-listcomprehensions-generators/list-comprehensions-generators.ipynb)
20+
21+
Today if you have time left, I encourage you to try 2 extra exercises [on our platform](https://codechalleng.es):
22+
- [Bite 5. Parse a list of names](https://codechalleng.es/bites/5/) (use a set comprehension in first function)
23+
- [Bite 26. Dictionary comprehensions are awesome](https://codechalleng.es/bites/promo/awesome-dict-comprehensions)
24+
25+
If you still have time left, or you prefer to practice generators check out this cool blog code challenge: [Code Challenge 11 - Generators for Fun and Profit](https://codechalleng.es/challenges/11/)
26+
27+
## Time to share what you've accomplished!
28+
29+
Be sure to share your last couple of days work on Twitter or Facebook. Use the hashtag **#100DaysOfCode**.
30+
31+
Here are [some examples](https://twitter.com/search?q=%23100DaysOfCode) to inspire you. Consider including [@talkpython](https://twitter.com/talkpython) and [@pybites](https://twitter.com/pybites) in your tweets.
32+
33+
See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).

days/22-24-decorators/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Decorators
2+
3+
## Day 1: Quick howto
4+
5+
Welcome to this lesson. Decorators are a sometimes overlooked and more advanced feature. They support a nice way to abstract your code. Although hard to grasp at first there is not that much to it.
6+
7+
In today's videos you will watch me explain this powerful concept. You can follow along with my Jupyter notebook [here](https://github.com/talkpython/100daysofcode-with-python-course/blob/master/days/22-24-decorators/decorators.ipynb).
8+
9+
## Day 2: A practical exercise
10+
11+
Try to take a crack at [Bite 22. Write a decorator with argument](https://codechalleng.es/bites/promo/decorator-fun).
12+
13+
If you get stuck we have a more open-ended challenge as well: [Write DRY Code With Decorators blog challenge](https://codechalleng.es/challenges/14/).
14+
15+
Look at the code you have written so far, where could you refactor / add decorators? The more you practice the sooner you grok them and the easier they become.
16+
17+
## Day 3: More practice
18+
19+
The exercise and code challenge of yesterday should keep you busy for a bit, today get some more practice in.
20+
21+
## Time to share what you've accomplished!
22+
23+
Be sure to share your last couple of days work on Twitter or Facebook. Use the hashtag **#100DaysOfCode**.
24+
25+
Here are [some examples](https://twitter.com/search?q=%23100DaysOfCode) to inspire you. Consider including [@talkpython](https://twitter.com/talkpython) and [@pybites](https://twitter.com/pybites) in your tweets.
26+
27+
See a mistake in these instructions? Please [submit a new issue](https://github.com/talkpython/100daysofcode-with-python-course/issues) or fix it and [submit a PR](https://github.com/talkpython/100daysofcode-with-python-course/pulls).

days/22-24-decorators/decorators.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@
582582
" @make_html('p')\n",
583583
" @make_html('strong')\n",
584584
" def get_text(text):\n",
585-
" pass\n",
585+
" print(text)\n",
586586
"\n",
587587
"Calling:\n",
588588
"\n",

days/22-24-decorators/stacking.png

-17.3 KB
Loading

0 commit comments

Comments
 (0)