• Stars
    star
    155
  • Rank 232,880 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created over 11 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Practice Python with colored grids in the IPython Notebook

ipythonblocks

Travis-CI

Coveralls

PyPI

ipythonblocks is a teaching tool for use with the IPython Notebook. It provides a BlockGrid object whose representation is an HTML table. Individual table cells are represented by Block objects that have .red, .green, and .blue attributes by which the color of that cell can be specified.

ipythonblocks allows students to experiment with Python flow control concepts and immediately see the effects of their code represented in a colorful, attractive way. BlockGrid objects can be indexed and sliced like 2D NumPy arrays making them good practice for learning how to access arrays.

See these demo notebooks for more on using ipythonblocks:

Install

ipythonblocks can be installed with pip:

pip install ipythonblocks

However, the package is contained in a single .py file and if you prefer you can just grab ipythonblocks.py and copy it to wherever you want to use it (useful for packaging with other teaching materials).

Dependencies

Required dependencies:

Optional dependencies:

Testing dependencies:

  • pytest >= 2.3, (for the test suite, see below)
  • responses >= 0.1
  • mock (dependency of responses)

Demo dependencies:

  • PIL (for starry_night_to_text.ipynb)

Testing

The test suite is written using pytest, so you can run the test suite with:

py.test

More Repositories

1

snakeviz

An in-browser Python profile viewer
Python
2,137
star
2

palettable

Color palettes for Python
Python
715
star
3

open-in-nbviewer

Easily open your current page in nbviewer
JavaScript
128
star
4

html-css-resume-template

A resume template based on HTML5 and CSS
HTML
66
star
5

pytest-features

A quick overview of some pytest features
Python
50
star
6

cext23

Examples of Python C extensions that work on Python 2 and 3
Python
36
star
7

scipy-2019-intro-to-python

Introduction to Python Tutorial at SciPy 2019
Jupyter Notebook
34
star
8

blog-posts

Jupyter Notebook
30
star
9

scipy-2020-intro-to-python

Introduction to Python Tutorial at SciPy 2020
Jupyter Notebook
24
star
10

scipy-2018-software-eng-techniques

Software Engineering Techniques Tutorial at SciPy 2018
Jupyter Notebook
19
star
11

2015-07-06-scipy

Software Carpentry Workshop at SciPy 2015
HTML
15
star
12

dc-python-meetup-nov-2012

Material for the Number Crunching in Python workshop.
14
star
13

scipy-2018-intro-to-python

Introduction to Python tutorial at SciPy 2018
Jupyter Notebook
13
star
14

scipy-2013-git-testing

Git and testing tutorial at SciPy 2013
Python
8
star
15

scipy-2021-intro-to-python

Introduction to Python and Programming Tutorial at SciPy 2021
Jupyter Notebook
7
star
16

zbox

Get cytoolz or toolz, whatever's around
Python
5
star
17

2015-09-09-lbl-labtech

HTML
5
star
18

regexmagic

Regular expression magic for the IPython Notebook
Python
4
star
19

scipy-2023-intro-to-python

Introduction to Python and Programming Tutorial at SciPy 2023
Jupyter Notebook
4
star
20

pycon-2018-talk

Python Performance Investigation by Example
Jupyter Notebook
4
star
21

omp-python-test

Simple Python 2 C extension for testing usage of OpenMP
Python
3
star
22

game-of-life-js

Conway's Game of Life with JavaScript and Canvas
JavaScript
3
star
23

pyladies-flask-apr-2016

Flask demo for PyLadies study group on April 27, 2016
Python
2
star
24

tservice

Start a local Tornado static file server
Python
1
star
25

ipythonblocks.org

Source for ipythonblocks.org
HTML
1
star
26

utilities

Miscellaneous utilities I use
Python
1
star
27

uw-things-to-learn

Top things to learn at UW SWC Boot Camp
1
star
28

profile_default

Default IPython profile customizations
JavaScript
1
star
29

scipy2013-swc-lightning-talk

Lightning Talk About Software Carpentry at SciPy 2013
JavaScript
1
star
30

advent-of-code

Advent of Code
Jupyter Notebook
1
star
31

jaccs

Write strings to access nested JSON objects
Python
1
star
32

pyidlastro

Affiliated package for ported IDL astrolib routines
1
star