Git Product home page Git Product logo

python-primer's Introduction

python-primer

Short Python primer for devs with experience in another language (such as Java) looking to quickly get up to speed with the basics of Python.

Setting things up

  • Install Python 3.9.x using the official canonical Python web site

  • Clone this github repo at some preferred location on your system.

  • cd into the cloned project

  • Create a virtual Python environment (in this case named .venv):

     python3.9 -m venv .venv
     
  • Activate the environment (you'll have to do this step every time you come back to work on this project) - this basically tells your shell which Python to use - in this this case the one located in .venv:

     source .venv/bin/activate
  • The first time only (or any time the requirements.txt file is updated), you'll need to install various 3rd party packages we'll use in this project:

     pip install -r requirements.txt

Running Jupyter Notebook

Once the above steps are completed, you can run Jupyter Notebook locally (remember to activate the .venv Python environment before doing so):

jupyter notebook .

This will open up Jupyter Notebook in your default browser. Simply select a notebook you want to view/edit (or create a new one) from this interface.

Each Jupyter notebook is essentially a front-end to the Python interactive prompt (the so-called REPL - which stands for Read-Evaluate-Print-Loop). Remember that Python is essentially an interpreted language, so you can run commands one at a time via this REPL, still maintaining state from previous issue commands in the same session. And Jupyter is a graphical layer on top of that.

You could use the plain Python REPL by typing python at the command line (after activating the virtual environment) and get a text-based REPL.

Jupyter is nicer because it remembers your code (as long as you save it), you can add non code blocks (using Markdown for example), and you can easily run previous commands by selecting the cell and running it. Amongst other things...

After Completing the Primer

Once you have completed this primer, you should be ready to move on to more advanced Python in this repo:

Python Deep Dive Series

python-primer's People

Contributors

fbaptiste avatar

Watchers

 avatar

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.