GithubHelp home page GithubHelp logo

talkpython / 100daysofcode-with-python-course Goto Github PK

View Code? Open in Web Editor NEW
2.0K 136.0 1.1K 7.67 MB

Course materials and handouts for #100DaysOfCode in Python course

Home Page: https://training.talkpython.fm/courses/explore_100days_in_python/100-days-of-code-in-python

License: MIT License

Python 8.23% Jupyter Notebook 90.38% HTML 1.07% CSS 0.32%
100daysofcode python python3 learn-to-code course tutorial video

100daysofcode-with-python-course's Introduction

#100DaysOfCode with Python course

Binder

Visit the course page

Course details page: talkpython.fm/100days

Course Summary

#100DaysOfCode in Python is your perfect companion to take the 100 days of code challenge and be successful. This course is 1-part video lesson, 2-parts guided projects. You will be amazed at how many Python technologies and libraries you learn on this journey. Join the course and get started.

What's this course about and how is it different?

100 days of code is not just about the commitment. The true power and effectiveness is in having a guide and pursuing the "right-sized" projects. That’s why we have 33 deeply practical projects. Each paired with 20-40 minute lessons at the beginning of the project.

Just a small sampling of the projects you’ll work on include:

  • Understanding basic Python data structures
  • Searching large text corpuses with regular expressions
  • Consume HTTP services including the Twitter and GitHub APIs among others
  • Visual data with graphs using plotly
  • Convert your Python CLI (command line interface) app to a GUI application
  • Program against Excel in Python to automate your spreadsheet data
  • Build a text-based game and learn object-oriented programming
  • Automate multi-step web processes using selenium
  • Test your code with pytest and unit testing
  • Create a basic web app with Flask
  • Create a JSON-based online game service using Flask too
  • And 22 more projects!

View the full course outline.

Who is this course for?

This course is for anyone who wants to immerse themselves in Python for 100 days worth of learning and hands-on projects.

We don’t start from absolute zero in terms of programming but if you are new to Python we have a language appendix and we start somewhat slow. By the end of the course, we get into intermediate-level Python projects.

Course flow and the 33 projects

Course flow

We have broken the 100 days worth of coding into 33 3-day segments. As you can see, the first day is largely learning the new topics (HTTP APIs, web scraping, databases, etc.). The following two days have some guidance but is much more hands-on than the first day.

Get the full course details

Visit the full course page for all the details: talkpython.fm/100days

100daysofcode-with-python-course's People

Contributors

bbelderbos avatar clamytoe avatar glenncalleja avatar gruentee avatar hobojoe1848 avatar jallman112 avatar justashoemaker avatar mikeckennedy avatar pathcl avatar prcutler avatar shtihl avatar slowrance avatar theconsultant avatar vivekvashist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

100daysofcode-with-python-course's Issues

urlretrieve function

This function can't use anymore since is removed from python.

How can I handle this problem? Are there any function can be replaced with this function?

** Days 4-6

Missing file 94-96days

On the readme there is a link to the build.spec (line 61). The link in broken file not found.

Consider rewording

The first sentence on the following page is hard to read, it tripped me up and I caught myself re-reading it.

https://github.com/talkpython/100daysofcode-with-python-course/blob/master/days/25-27-error-handling/README.md

One of the key differentiators of professional programs and scripts thrown together by beginners is pro app does not crash.

Perhaps it could be re-written like one of the following:

One of the key differentiators of professional programs and scripts thrown together by beginners is that the pro app does not crash.

One of the key differentiators of professional programs and scripts thrown together by beginners is the pro app does not crash.

Missing README for days 04-06

G'day Michael and team,

There is no README file for days 04-06. I managed to navigate to the exercise eventually from the link in the video, but was under the impression that all days would have README instructions.

Cheers,

Conor

Day 55-57 Example - write_post()

Within my write_post() implementation, the call resp.json() in the print() returns a list of the previous (in my case) three published items but not the new post that the write_post() was to create. I ran this the original project code using both uplink version 0.4.0 and uplink version 0.9.1 with the same results. I have double checked the source code with the code posted in github. The console output is provided below. Any assistance is appreciated.

C:\Users\rbern\PycharmProjects\ScrapyPractice2\venv\Scripts\python.exe C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 52869 --file C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py
pydev debugger: process 8784 is connecting

Connected to pydev debugger (build 201.6668.115)
What would you like to do next?
[w]rite a post or [r]ead them?

  1. [1,231 views] Easy Breezy Python HTTP Clients
  2. [10 views] Introducing Requests for Python
  3. [100 views] PyCharm, the Best IDE for Python

Which number to view? Details for selected_post: c7081102-e2c9-41ec-8b79-adc1f3469d91
Title: Easy Breezy Python HTTP Clients
Written: 2017-02-14
Content: So maybe you've heard about Requests...

What would you like to do next?
[w]rite a post or [r]ead them?Title: Body contents: view count (int):
Traceback (most recent call last):
File "C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev\pydevd.py", line 1438, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Users\rbern\AppData\Local\JetBrains\Toolbox\apps\PyCharm-P\ch-0\201.6668.115\plugins\python\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 58, in
main()
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 12, in main
write_post()
File "C:/Users/rbern/Desktop/course100days/days/55-57-uplink/demo/program.py", line 53, in write_post
print("Created new post successfully: {}".format(resp.json().get('id')))
AttributeError: 'list' object has no attribute 'get'

Process finished with exit code -1

packtpub 'find_element_by_name' doesn't work

Hello, the find_element_by_name as described in the tutorial does not work for this site. Additionally it looks like they've updated their website and don't have the ebook page that is used in the walkthrough. Could this be updated/looked into?

parse error

The default code throws an error and below code fixes it

def get_movies_by_director():
directors = defaultdict(list)
with open(MOVIE_DATA, encoding='utf-8') as f:
for line in csv.DictReader(f):
try:
director = line['director_name']
movie = line['movie_title'].replace('\xa0', '')
if line['title_year']:
year = int(line['title_year'])
else:
year = 0
if line['imdb_score']:
score = float(line['imdb_score'])
else:
score = 0
except ValueError:
continue

        m = Movie(title=movie, year=year, score=score)
        directors[director].append(m)
return directors

in byte 89 longest state - there are north and south crolina

in the same length .... it returns me an error :

def test_get_longest_state():
  assert get_longest_state(us_state_abbrev) == 'South Carolina'

E AssertionError: assert 'North Carolina' == 'South Carolina'
E - North Carolina
E ? ^ ^
E + South Carolina
E ? ^ ^

Add section about setting things up

It would be good for any beginner to have lesson about setting a enviromment virtualenv and other things. If this would be good for you, I will be happy to do that.

Day 55-57 results in Type Error for __init__

Hi.

When I execute program.py for the Day 55-57 example I run into the following Type Error:

File "C:\Users\salro\PycharmProjects\100daysofcode-with-python-course\venv\lib\site-packages\uplink\hooks.py", line 103, in handle_response
response = hook.handle_response(consumer, response)
File "C:\Users\salro\PycharmProjects\100daysofcode-with-python-course\venv\lib\site-packages\uplink\hooks.py", line 20, in wrapper
return hook(*args, **kwargs)
File "C:\Users\salro\PycharmProjects\100daysofcode-with-python-course\venv\lib\site-packages\uplink\returns.py", line 39, in call
return self._strategy(*args, **kwargs)
TypeError: init() takes 1 positional argument but 2 were given

I tried multiple angles I am familiar with but nothing has worked so far.

Day9: working with dictionaries

Hey there,

Having a hard time following instructions for day 9. Dictionaries are unsorted. So printing out the nth dictionary entry doesn't make sense to me. Since the dictionary is in alphabetical order in data.py, I assumed this means that is the "order" the instructions are referring to. So I generated a new dictionary with the index as the key.

However, the last instruction says to replace the key in the nth position of the dictionary with the value from the nth position in the list. However, that would create a duplicate key in the dictionary and doesn't work.

Please let me know if I'm completely missing something here!

Thanks very much!
-Blake

Small detail on capturing all capitalized words

In your code you use the regex
r'[A-Z][a-z0-9]+'
as the pattern, but that would not count capitalized one letter words (i.e., I or A), capitalized words with apostrophes (e.g., Don't, Isn't, O'Leary) and it would also miss words (or abbreviations that had one or more capitals (e.g., USA, STOP and McKnight). There are certainly much more complicated ways to write the pattern, but I would suggest the pattern
r'[A-Z][A-Za-z0-9']*'
It is not a big deal, but I thought I would mention it. This might capture unintended strings (e.g., lists with letter counters like '(A)', '(B)', etc.; variables that show up in equations like X + Y; non-word strings like UK postal codes - EC1, W8, etc.), but I am of the school of thought that I would rather have more data than less.

day 2 error

Hello,

I am trying to figure out what went wrong with my code for the day 2 challenge. I am pretty sure the result is correct.
Which for challenge one is 2017. 07.08 and 505 days for challenge 2.

Challenge :

  1. We kicked off our 100 Days of Code project on March 30th, 2017. Calculate what date we finished the full 100 days!
  2. PyBites was founded on the 19th of December 2016. We're attending our first PyCon together on May 8th, 2018. Can you calculate how many days from PyBites' inception to our first PyCon meet up?

My code :

from datetime import date, timedelta

start_100days = date(2017, 3, 30)
pybites_founded = date(2016, 12, 19)
pycon_date = date(2018, 5, 8)

def get_hundred_days_end_date():
"""Return a string of yyyy-mm-dd"""
end_date=timedelta(days=100)
finish_day = start_100days + end_date

print(str(finish_day))

def get_days_between_pb_start_first_joint_pycon():
"""Return the int number of days"""
in_between_days = pycon_date - pybites_founded
print(str(in_between_days))

get_hundred_days_end_date()
get_days_between_pb_start_first_joint_pycon()

error return :

============================= test session starts ==============================
platform linux -- Python 3.8.13, pytest-5.4.2, py-1.8.1, pluggy-0.13.1
rootdir: /tmp
plugins: asyncio-0.12.0
2017-07-08
505 days, 0:00:00
collected 2 items

../../tmp/test_calc_dts.py 2017-07-08
F505 days, 0:00:00
F

=================================== FAILURES ===================================
________________________ test_get_hundred_days_end_date ________________________

def test_get_hundred_days_end_date():
  assert get_hundred_days_end_date() == '2017-07-08'

E AssertionError: assert None == '2017-07-08'
E + where None = get_hundred_days_end_date()

/tmp/test_calc_dts.py:6: AssertionError
_______________________ test_get_days_till_pycon_meetup ________________________

def test_get_days_till_pycon_meetup():
  assert get_days_between_pb_start_first_joint_pycon() == 505

E assert None == 505
E + where None = get_days_between_pb_start_first_joint_pycon()

/tmp/test_calc_dts.py:10: AssertionError
=========================== short test summary info ============================
FAILED ../../tmp/test_calc_dts.py::test_get_hundred_days_end_date - Assertion...
FAILED ../../tmp/test_calc_dts.py::test_get_days_till_pycon_meetup - assert N...
============================== 2 failed in 0.07s ===============================

Itertools traffic light task

Hi, I think there's some missing info in the itertools unit readme. It says to try to complete the task before watching the video, but the only description of the task in the readme is "create a script that simulates traffic lights" - it's not obvious what it is.

Link in day 5 is broken

Hi, started the course a few days ago and I noticed that the link to PyBite 13 that appears in day 5 is broken. I get a 404 error.

Also, I think that the url given in the notebook to retrieve the data is not valid anymore.

Thanks Michael for all that you put out there for people to level up in Python 🙏
I'm a big fan of TalkPythonToMe

Pyperclip does not work correctly under Linux

I had issues with pyperclip. Copying text to the clipboard did not work. Found the solution for my problem on the pypi page of pyperclip:

"... On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run “sudo apt-get install xclip” or “sudo apt-get install xsel” (Note: xsel does not always seem to work.)

Otherwise on Linux, you will need the gtk or PyQt4 modules installed."

Everything works fine now, after I have installed xclip.

Day38 - bad data in csv file

Hello,

On Day 38 when loading the Thanksgiving data from the file, there is a error that occurs:

UnicodeDecodeError:

'utf-8' codec can't decode byte 0xed in position 3599: invalid continuation byte

The file gets processed until the record with 'RespondentID':'4335955206' then it errors out.

Also when opening the csv file in PyCharm I get "File was loaded in the wrong encoding: 'UTF-8'"

screen shot 2018-04-27 at 7 08 20 am

The error goes away when removing the line with RspondentID: '4335955152'

Packt Publishing website updated

Hi,

the website packtpub.com has been updated, the code in the notebook does not work any more. I found the field for the user name in the code inspector but was not able to find the right element qualifier to address it. The 2nd example with the pybites banner generator did of course not work either because Bob did not reveal his password. Can't you find (or create) a website that is not changed frequently and easily accessible for everyone?

Cheers,
Andreas

day 04-06 encoding problem on file open

There are some extended ascii characters in the csv download. It seems jupyter doesn't mind, but if you're doing this on IDLE or some other thing with CPython, it balks on reading the file, starting at character 535. This can be avoided by adding """encoding='utf-8'""" to the open statement.

Possible misleading typo in 22-24 Decorators

In 100daysofcode-with-python-course/days/22-24-decorators/decorators.ipynb under "Second day: a practical exercise" you list the following block of code:

@make_html('p')
@make_html('strong')
def get_text(text):
    pass

As the problem is listed now it implies that make_html decorator should be responsible for printing the test instead of just adding tags. In the linked pybite get_text() is defined as:

def get_text(text):
    print(text)

Is that pass in the jupyter notebook a typo, which instead should be print(text)?

Day05 exercise - SSL: CERTIFICATE_VERIFY_FAILED

I tried recreating the day 5 example found in the provided notebook on my machine in Pycharm and am getting a SSL: CERTIFICATE_VERIFY_FAILED error when the movies file is being downloaded using urlretrieve. I am able to reproduce this when running the script from the terminal as well. Not sure if something happened with the cert on raw.githubusercontent.com

from urllib.request import urlretrieve

movie_data = 'https://raw.githubusercontent.com/pybites/challenges/solutions/13/movie_metadata.csv'
movies_csv = 'movies.csv'
urlretrieve(movie_data, movies_csv)

Traceback (most recent call last): File "movieparse.py", line 6, in <module> urlretrieve(movie_data, movies_csv) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 248, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 223, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 526, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 544, in _open '_open', req) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 504, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1361, in https_open context=self._context, check_hostname=self._check_hostname) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/urllib/request.py", line 1320, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)>

video 'hello test world'

This video was very disappointing . Your explanation of the command line arguments was extremely superficial. I cannot get it to work. I am starting to regret buying this course. can you point to a better, more detailed explanation of how to run pytest. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.