TARGETPython is an introductory course for Python that will take you through Python Basics, Computer Science Concepts, the use of Matplot and more! You will learn about Git, a tool to organize and share code, Machine Learning and find some guidelines about preparing a project required to complete the TARGET Python course.
Here you'll find presentations with that explain coding basics and self guided lessons with corresponding challenges to learn the basics of Python using Jupyter Notebooks.
For each lesson, you should first look over the presentation corresponding to the lesson, then do the Python Lesson, then the Challenges.
Finally, you will end this course by completing a final project.
In the menu you will find direct links to quickly go to the previously mentioned materials. This page also contains links to the lessons introduced in order.
In the lessons, read the material, execute the code, thinker around with it: make changes, see the results! Afterwards, attempt the challenges. Challenge 1 and 2 are mandatory, 3 is optional. All challenge solutions are provided in the more tab of the menu, however it’s recommended to look only after creating your own solution. Problems can be solved in multiple ways therefore, all working solutions satisfying the challenge with no Python errors are OK.
The Python Lessons and Challenges are done using Jupyter Notebooks, a technology that allows to mix text and code that you can execute. There are a few companies that can host for free your Notebooks on the Cloud. For the classes we will use Google Colaboratory, you can login using Google account or creating a free one as explained in GoogleColabSignup. Later we'll see how to use Git and host your project on github.com.
You will find some reference to Azure Notebooks by Microsoft, but Microsoft shut down the service in January 2021.
Read the Introduction to Coding slides
Sign up to Google Colab and clone Lesson 1 (if you didn't already)
Work on Lesson 1 (In order to work on the lesson and run the code you need to save your own copy, the link is to a demo copy of the lesson)
Work on Lesson 1 Challenges (In order to work on the notebook and run the code you need to save your own copy, the link is to a demo copy)
To go back and continue to work on notebooks you already started, log-in to Google Colaboratory and click on the desired notebook.
Here is an example of Solutions to Lesson 1 Challenges
Complete section 1 to 4 in the Git Introduction (follow all the links): Learn about Git and GitHub, fork the Lesson 2 repository and import it in Google Colaboratory
Work on Lesson 2 : log-in to Google Colaboratory and click on Lesson2 (target_python_lesson2.ipynb)
Work on Lesson 2 Challenges: log-in to Google Colaboratory and click on the Lesson2 challenges (target_python_challenge2.ipynb). The Lesson 2 folder includes also the NOVA file transfer data provided by Andrew Norman
To go back and continue to work on notebooks you already started, log-in to Google Colaboratory and click on the desired notebook
(optional) Complete the tutorial linked in section 5 of the Git Introduction to learn to use git to manage files on your computer (using the command line)
Here is an example of Solutions to Lesson 2 Challenges
Fork the Lesson 3 repository and import it in Azure Notebooks (see Lesson 2, step 2 if you don't remember how)
Work on Lesson 3 : log-in to Google Colaboratory and click on the Lesson3 (target_python_lesson3.ipynb)
Work on Lesson 3 Challenges: log-in to Google Colaboratory and click on the Lesson3 challenges (target_python_challenge3.ipynb)
To go back and continue to work on notebooks you already started, log-in to Google Colaboratory and click on the desired notebook.
Here is an example of Solutions to Lesson 3 Challenges
This material can be completed out of order.
Chatbots and AI
For the following it is recommended to have completed at least Lesson 2.
Clone and complete the Mathematical plots examples (play extensively with the content, changing the functions to plot)
Clone and complete A Neural Algorithm of Artistic Style, by Gabriel Purdue. This Jupyter Notebook is on Google Colab(oratory), another free notebooks hosting.
To start, login with a Google account (or create a new one), make a copy on your drive (menu "File" > "Save a copy in Drive...") and open your copy with Colab. Alternatively you can click "OPEN IN PLAYGROUND" (this will not save your changes but will allow you to run the code).
Before running the code, open the menu "Runtime" > "Change runtime type" and make sure that your Runtime type is Python 3 and the Hardware accelerator is GPU (Colab allows you to use GPUs!).
Follow the tutorial: read about Neural Networks, play around with the TensorFlow Playground, read about the algorithm for artistic style and transform the Fermilab picture
Now use choose an image you like and apply the "Van Gogh" style to it
In this blog post you can find a demo similar to the distributed spot counting demo presented by Ken Herner. You can run the code locally. To run on remote clusters it requires access to Open Science Grid resources.
For previous editions material go to the archive.