Skip to content
Bonus materials, exercises, and example projects for our Python tutorials
Jupyter Notebook Python JavaScript HTML CSS Java Emacs Lisp
Branch: master
Clone or download
bzaczynski Merge pull request #84 from realpython/binary-search
Add materials for binary search
Latest commit 8e41a3d Nov 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Fix CI caching May 9, 2019
.github Update Aug 14, 2019
asyncio-walkthrough BinaryIO -> IO Nov 4, 2018
binary-search Specify explicit encoding for Windows Nov 11, 2019
concurrency-overview Update tutorial link Jun 13, 2019
django-migrations Fixed more linter errors Feb 8, 2019
emacs-the-best-python-editor Lots more Pythonic code to add! Sep 19, 2019
flask-connexion-rest-part-2 id vs person_id typo Jun 1, 2019
flask-connexion-rest-part-4 flask-connexion-rest-part-4 : initial (finally) commit of the code th… Jun 24, 2019
flask-connexion-rest Fix minor typo Jun 7, 2019
flask-google-login change button text May 23, 2019
generators Rename techcruch.csv to techcrunch.csv Jun 30, 2019
histograms Reformat using black Oct 9, 2018
intro-to-bokeh Merge branch 'master' of Feb 6, 2019
intro-to-threading Use object() for sentinel value in threading article Mar 25, 2019
itertools-in-python3 Reformat using black Oct 9, 2018
nearbyshops Update Dec 13, 2018
oop-in-java-vs-python Final typo Mar 26, 2019
opencv-color-spaces Reformat using black Oct 9, 2018
openpyxl-excel-spreadsheets-python Delete sample dataset Aug 14, 2019
pandas-fast-flexible-intuitive Reformat using black Oct 9, 2018
pandas-groupby Add README Aug 15, 2019
pygame-a-primer Minor formatting issues May 10, 2019
pyqt-calculator-tutorial Fix imports Sep 16, 2019
python-sockets-tutorial Fix flake8 violation Dec 12, 2018
random-data Reformat using black Oct 9, 2018
serverless-sms-service Update Mar 5, 2019
simulation-with-simpy Refactor Aug 20, 2019
understanding-asynchronous-programming Merge pull request #82 from realpython/understanding-async-python Oct 4, 2019
web-scraping-bs4 Fix: format code using black Jul 13, 2019
.gitignore Restored the flask-connexion-rest directory, and created new director… Aug 8, 2018
LICENSE Initial commit May 6, 2018 Update Apr 30, 2019
pyproject.toml Resolve flake8 <-> black conflicts May 9, 2019
requirements.txt Resolve flake8 <-> black conflicts May 9, 2019

Real Python Materials

Bonus materials, exercises, and example projects for our Python tutorials.

Build Status: CircleCI

Running Code Style Checks

We use flake8 and black to ensure a consistent code style for all of our sample code in this repository.

Run the following commands to validate your code against the linters:

$ flake8
$ black --check .

Running Python Code Formatter

We're using a tool called black on this repo to ensure consistent formatting. On CI it runs in "check" mode to ensure any new files added to the repo are following PEP 8. If you see linter warnings that say something like "would reformat" it means black disagrees with your formatting.

The easiest way to resolve these errors is to just run Black locally on the code and then committing those changes, as explained below.

To automatically re-format your code to be consistent with our code style guidelines, run black in the repository root folder:

$ black .
You can’t perform that action at this time.