PyClass: Difference between revisions

From Noisebridge
Jump to navigation Jump to search
(more on the ideal student)
No edit summary
(34 intermediate revisions by 18 users not shown)
Line 1: Line 1:
=== PSAs and Events ===
=== Welcome to the Noisebridge PyClass! ===


'''PSA 10-1-14:''' PyClass starts at 700 PM, try to come a few minutes earlier. We want to finish up by nine so people can hack or catch their preferred train home. You can come at any time, but YMMV.
PyClass is an introductory Python course run by the Noisebridge community. It helps students solve common programming problems while learning about the language.  Classes are held Mondays 7:00 - 9:00 PM in the 'Church' Classroom, and are mostly organized through [https://meetup.com/noisebridge Meetup].  If you have not been to Noisebridge before, please try to arrive 15 minutes early so that you can be introduced to the space.


'''PSA 8-19-14:''' The [https://noisebridge.net/wiki/PyClass noisebridge wiki] and [https://github.com/PyClass/PyClass-lesson-plans github readme] files have the same information and updates.
=== Course Material ===
The course contains six lessons and assorted guest lectures. Each of the core classes covers a programming tool, from JSON in the first class to deploying a flask webapp in the last.  Each class also demonstrates a feature that makes Python special, and when taken together they are a good baseline for effective programming in the language. The current list of classes is:


'''PSA 8-16-14:''' The new curriculum for the Noisebridge PyClass is a crash course in the Python standard library, also touching on modules that are popular but not quite part of the standard modules. Scroll down to see the course list.
* Storing and transmitting information with JSON
* [https://github.com/jgarst/PythonClass/tree/master/course/strings Working with text data]
* Relational databases and SQL
* Performance and Big O notation
* Objects and Classes
* Web applications with Flask


=== Scheduled Weekly Meeting Times ===
The material for these is available on [https://github.com/jgarst/PythonClass/tree/master/course github].  The classes tend to move fast, but can be repeated and have references to related material in the notes.


We set up the space at 6:45 PM - try to arrive early to help if you are able to.
The first three classes (JSON, text data, SQL) are suitable for anyone, but will be more difficult if you are not comfortable using python as a calculator.


* Tuesday 7:00 - 9:00 PM PST - 'Turing' Classroom
    # importing libraries
* Wednesday 7:00 - 9:00 PM PST - 'Church' Classroom
    import time
   
    # printing and calling functions
    print(time.ctime())
   
    # variables and math
    calculation = (1 * 2 * 3) / 2 
   
    # strings
    print('I've done some math!', calculation)


=== Mailing List ===
* If you are comfortable this program, you will be comfortable with the class. <br \>
* If can understand understand what the program is doing, the class is a good fit for you, but might seem fast.
* If you do not have Python installed on your machine, you are invited to the class, but encouraged to arrange a time with the organizer to get started first.


Sign up for this to hear updates and conversations regarding the course!
The last three classes assume familiarity with loops, functions and collections.  If you are comfortable with the following program you will be comfortable with the class.


[http://groups.google.com/group/pyclass PyClass-Discussion]
    frequency_dict = {}
    word = "noisebridge"
   
    for letter in word:
        times = frequency_dict.get(letter, 0)
        times += 1
        frequency_dict[letter] = times


=== Class Description, Goals, and Ideal Student ===
=== Python Setup ===
We use Python 3, and encourage students to do the same.  The best way to install Python depends on your operating system, but there are good [https://realpython.com/installing-python/ online tutorials] for most cases.  The class uses Jupyter notebooks for slides and example code, but encourages students to run python from text files on their computers.  If you do not have a preferred way of editing programs, Python comes with a simple code editor called IDLE.


The pace of the courses will be fast, and the materials will be available online 24/7. We plan to frequently repeat modules with new twists as we iterate over course materials.
Python can be difficult to install. If you don't yet have a programming environment, you are encouraged to message the organizer and get help with setup.


A major PyClass goal is to break down the courses into independent units. In other words, you won't fall behind if you miss a week. Sounds good, right?
If you want to attend class, but don't have Python installed, you can try it out with [http://repl.it/languages/Python3 repl.it]. This will allow you to follow along every class except the last one, which covers python projects and Flask.  We still recommend installing Python on your computer as soon as possible.


To best experience the course, spend a short time reviewing the course materials before you come in. If you wish to know this week's courses, please join the mailing list and send an email out to PyClass@googlegroups.com
=== Helping out and getting additional help ===
PyClass runs on volunteer effort, and we would love to have your help keeping it it excellent!  The simplest and most appreciated contributions are simple examples of the projects you want to work on, the bugs you encounter, and the concepts you find difficult. Especially if they are succinct or easy to turn into problems that others can learn from.


The ideal student for this course will '''at the very minimum''' be able to grasp the following code (feel free to use web resources to look up anything you don't understand):
We are always looking for more people to teach classes.  This is a great way to solidify your understanding, find new and exciting edge cases, and help others.  We welcome people teaching existing classes, or their own classes on the subjects they are most excited about.  Remember, the only thing that qualifies people to run PyClass is having enough enthusiasm to show up.


<source lang="python">letter_frequency_dict = {}
If you need help getting started, getting unstuck, or getting someone to look at your code we are happy to help! There are usually office hours during the week, announced in the class, and designed to solve these problems.  Feel free to reach out over meetup to learn more.
word = "noisebridge"
   
for letter in word:
    times = letter_frequency_dict.get(letter, 0)
    times += 1
    letter_frequency_dict[letter] = times</source>


It certainly does help to have some coding experience with one or more other programming languages.<br>
=== Code of Conduct ===
We would definitely encourage your learning of programming languages other than just Python, regardless of whether or not you decide to drop in to our PyClass.<br>
PyClass holds to the Noisebridge [https://www.noisebridge.net/wiki/Community_Standards Community Standards], which we take seriously.
At the same time, if you happen to be new to Python or to programming in general here are some excellent resources to help get you up-to-speed:<br />-[http://learnpythonthehardway.org/ Learn Python the Hardway] - great guide for total beginner<br />-[http://www.swaroopch.com/notes/python/ Byte of Python] - nice guide for total beginner and new to python<br />-[https://docs.python.org/2/tutorial/ Excellent Official Python Tutorial - 2.7.8] - great for new to python<br />-[http://shop.oreilly.com/product/0636920028154.do Learning Python 5th edition (also at sf lib)] - A comprehensive guide to the language and its uses<br />-[http://pymotw.com/2/ Python Module of the Week] - Learning the standard library by example<br />-[https://www.python.org/doc/ The docs themselves! 2.x for this class] - Learn what is and how to use the standard library


There are many, many good resources for learning the language of Python and how to do awesome things with it. Those listed above are just a few based on personal experience and strong recommendations.<br><br>
We also follow the Recurse Center [https://www.recurse.com/social-rules social rules], because they are excellent at creating an environment where people are comfortable learning.
''*'' While most of us will be more than glad to go over in person these excellent resources (and others) for you Beginners interested in dropping by for the PyClass, still, it's completely '''UNexcellent''' for us to completely halt course coding sessions just in order to provide you with your own individual Beginning Python tutorials, starting from scratch!


=== Course List ===
=== Python Resources ===


The order of the following courses has not yet been determined.
For learning programming, we recommend that you consult multiple resources with a variety of formats and priorities.  Some of our favorite resources are <br />
-[http://learnpythonthehardway.org/ Learn Python the Hard Way] - A clear introduction to python intended for people new to programming.  Written well enough to be useful for more advanced programmers as well.  Available in the Noisebridge library. <br />
-[https://docs.python.org/3 Python Documentation] - The Python documentation is a well written and comprehensive reference.  It isn't a page turner, but should be one of your first stops when confused. <br />
-[http://pymotw.com/3/ Python Module of the Week] - Python comes with batteries included, but it can still be hard find the best tool among the hundreds of modules it provides.  Python Module of the Week walks you through each of the standard library modules provided by the language.  <br />
- [https://pyvideo.org/ pyvideo] - A searchable index of Python conference talks.  Drop by class for some specific recommendations! <br />
- [http://pythontutor.com/ python tutor] - pythontutor.com allows you to walk through small pieces of code and understand how Python thinks of them.  An excellent resource for debugging mysterious Python behavior.


Please email PyClass@googlegroups.com if you want to know what courses are coming this week!
There are more good resources for learning Python than we can list here. Do you have a favorite that you think is missing?  Let us know!


# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/1_json_module.md JSON format, Python Types, and the JSON Module]<br />
=== Free to all - please donate to Noisebridge! ===
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/5_control_statements.md Control Flow and Exceptions]<br />
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/3_functional_and_control.md itertools, and Functional Programming]<br />
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/4_builtintypes_stringservices.md Built-in Types and String Services]<br />
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/10_rot13.md Coding a module: rot13]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/6_socrata_matplotlib_workshop.md Matplotlib Workshop (using Socrata API]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/11_server_side_dev_flask.md Flask - Installfest &amp; Basics]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/9_numbers.md Working with numbers in Python]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/13_games.md Programming Mastermind (the game)]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/14_unittest.md Unit Testing and Python's unittest Module]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/15_classy_OOP.md OOP in Python]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/16_keywords_and_control_flow.md Keywords &amp; Control Flow]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/17_polygon_abstraction.md Project: Calculate Angles of a Polygon]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/18_unittesting_more.md Project: Unit testing our projects]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/12_functions.md Functions]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/2_git_module.md Git] - incomplete
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/3_functional_and_control.md Functional Programming in Python]
# [https://github.com/PyClass/PyClass-lesson-plans/blob/master/7_built-ins_and_idioms.md Some Idioms for Python Builtins]


=== OS / Environment / Versions ===
This course only happens because the Noisebridge community provides a space for it to exist.  Maintaining the space and broader community is difficult and thankless work.  The course is free, but if you want to help the community pay rent go to: https://www.noisebridge.net/wiki/Donate_or_Pay_Dues.  <br />
Recommended Donations: $15, $50, $200+ Recommended monthly donations: $10, $20, $40, $80+ / month


This section is under development.
[[Category:Programming languages]]
 
For the sake of our sanity we use Python 2 for this course.
 
Installing Python with [http://docs.python-guide.org/en/latest/ The Hitchhiker’s Guide to Python!]
 
Emergency Python Command Line: http://repl.it/languages/Python
 
'''We accept refugees using all operating systems. You will be politely prodded in the direction of solutions that are closer to posix standards: http://en.wikipedia.org/wiki/POSIX#Mostly_POSIX-compliant'''
 
Some routes:<br />1. Install a linux virtual machine on another computer using virtualbox.<br />2. Use the command line in your apple machine.<br />3. Explore POSIX for windows: http://en.wikipedia.org/wiki/POSIX#POSIX_for_Windows
 
Another critical tool is git:<br />''Windows: http://git-scm.com/download/win<br />''Mac: http://git-scm.com/download/mac<br />*Linux: (use your package manager)
 
=== For Lesson Planners: ===
 
==== Some Modules to include ====
 
<ol start="5" style="list-style-type: decimal;">
<li>Numeric and Mathematical Modules, and Operators<br /></li>
<li>argparse, ConfigParser, and more - configuring your applications<br /></li>
<li>pip, virtualenv, packaging, versions, and inspect.<br /></li>
<li>Logging your applications: logging, logging.config, logging.handlers<br /></li>
<li>Exceptions and Debugging: Exception behavior, custom exceptions, pdb, cProfile, timeit, time, trace.<br /></li>
<li>os, sys, and io (Caution, here be Python 3, inside the io module)<br /></li>
<li>(potential for a unittest course)<br /></li>
<li>Built-in Functions</li></ol>
 
* Control Structures, itertools - Teddy<br />
* requests<br />
* urllib/urllib2<br />
* math<br />
* ConfigParser<br />
* argparse<br />
* json<br />
* csv<br />
* time, datetime<br />
* os<br />
* sys<br />
* io<br />
* logging<br />
* decorators<br />
* Profile<br />
* subprocess (catchall replacement for system call libraries)<br />
* pdb<br />
* unittest<br />
* py.test<br />
* virtualenv<br />
* pip<br />
* packaging?<br />
* versions
 
==== Two approaches for course material building that should be blended ====
 
# Modules Course - http://pymotw.com/2
# Applications Course - http://newcoder.io/dataviz/part-0/

Revision as of 00:26, 10 July 2019

Welcome to the Noisebridge PyClass!

PyClass is an introductory Python course run by the Noisebridge community. It helps students solve common programming problems while learning about the language. Classes are held Mondays 7:00 - 9:00 PM in the 'Church' Classroom, and are mostly organized through Meetup. If you have not been to Noisebridge before, please try to arrive 15 minutes early so that you can be introduced to the space.

Course Material

The course contains six lessons and assorted guest lectures. Each of the core classes covers a programming tool, from JSON in the first class to deploying a flask webapp in the last. Each class also demonstrates a feature that makes Python special, and when taken together they are a good baseline for effective programming in the language. The current list of classes is:

  • Storing and transmitting information with JSON
  • Working with text data
  • Relational databases and SQL
  • Performance and Big O notation
  • Objects and Classes
  • Web applications with Flask

The material for these is available on github. The classes tend to move fast, but can be repeated and have references to related material in the notes.

The first three classes (JSON, text data, SQL) are suitable for anyone, but will be more difficult if you are not comfortable using python as a calculator.

   # importing libraries
   import time
   
   # printing and calling functions
   print(time.ctime())
   
   # variables and math
   calculation = (1 * 2 * 3) / 2  
   
   # strings
   print('I've done some math!', calculation)
  • If you are comfortable this program, you will be comfortable with the class.
  • If can understand understand what the program is doing, the class is a good fit for you, but might seem fast.
  • If you do not have Python installed on your machine, you are invited to the class, but encouraged to arrange a time with the organizer to get started first.

The last three classes assume familiarity with loops, functions and collections. If you are comfortable with the following program you will be comfortable with the class.

   frequency_dict = {}
   word = "noisebridge"
   
   for letter in word:
       times = frequency_dict.get(letter, 0)
       times += 1
       frequency_dict[letter] = times

Python Setup

We use Python 3, and encourage students to do the same. The best way to install Python depends on your operating system, but there are good online tutorials for most cases. The class uses Jupyter notebooks for slides and example code, but encourages students to run python from text files on their computers. If you do not have a preferred way of editing programs, Python comes with a simple code editor called IDLE.

Python can be difficult to install. If you don't yet have a programming environment, you are encouraged to message the organizer and get help with setup.

If you want to attend class, but don't have Python installed, you can try it out with repl.it. This will allow you to follow along every class except the last one, which covers python projects and Flask. We still recommend installing Python on your computer as soon as possible.

Helping out and getting additional help

PyClass runs on volunteer effort, and we would love to have your help keeping it it excellent! The simplest and most appreciated contributions are simple examples of the projects you want to work on, the bugs you encounter, and the concepts you find difficult. Especially if they are succinct or easy to turn into problems that others can learn from.

We are always looking for more people to teach classes. This is a great way to solidify your understanding, find new and exciting edge cases, and help others. We welcome people teaching existing classes, or their own classes on the subjects they are most excited about. Remember, the only thing that qualifies people to run PyClass is having enough enthusiasm to show up.

If you need help getting started, getting unstuck, or getting someone to look at your code we are happy to help! There are usually office hours during the week, announced in the class, and designed to solve these problems. Feel free to reach out over meetup to learn more.

Code of Conduct

PyClass holds to the Noisebridge Community Standards, which we take seriously.

We also follow the Recurse Center social rules, because they are excellent at creating an environment where people are comfortable learning.

Python Resources

For learning programming, we recommend that you consult multiple resources with a variety of formats and priorities. Some of our favorite resources are
-Learn Python the Hard Way - A clear introduction to python intended for people new to programming. Written well enough to be useful for more advanced programmers as well. Available in the Noisebridge library.
-Python Documentation - The Python documentation is a well written and comprehensive reference. It isn't a page turner, but should be one of your first stops when confused.
-Python Module of the Week - Python comes with batteries included, but it can still be hard find the best tool among the hundreds of modules it provides. Python Module of the Week walks you through each of the standard library modules provided by the language.
- pyvideo - A searchable index of Python conference talks. Drop by class for some specific recommendations!
- python tutor - pythontutor.com allows you to walk through small pieces of code and understand how Python thinks of them. An excellent resource for debugging mysterious Python behavior.

There are more good resources for learning Python than we can list here. Do you have a favorite that you think is missing? Let us know!

Free to all - please donate to Noisebridge!

This course only happens because the Noisebridge community provides a space for it to exist. Maintaining the space and broader community is difficult and thankless work. The course is free, but if you want to help the community pay rent go to: https://www.noisebridge.net/wiki/Donate_or_Pay_Dues.
Recommended Donations: $15, $50, $200+ Recommended monthly donations: $10, $20, $40, $80+ / month