# data[].attributes.attachment_link.description
WASM powered Jupyter running in the browser.

# data[].attributes.attachment_link.description
Neues Unterrichtsmaterial zur künstlichen Intelligenz (KI). Das Perzeptron. Jetzt in einer interaktiven Lernumgebung die Grundlagen der künstlichen Intelligenz kennenlernen!

# data[].attributes.attachment_link.readable_text
Beschreibung der Unterrichtseinheit

Was ist die schnellste Route von Mainz nach München? Google Maps oder andere Online-Karten beantworten uns diese Frage schnell. Aber wie geht ein Computerprogramm dabei vor? Ist die schnellste Route automatisch auch die umweltfreundlichste Route?

In diesem Unterrichtsmaterial müssen als erstes aus dem komplexen Straßennetz auf einer Karte Süddeutschlands die wichtigsten Informationen und Wege von Mainz nach München gefunden werden. Dabei konzentrieren sich die Lernenden auf das Autobahnnetz und markieren Straßen und Autobahnkreuze. Autobahnabschnitte werden mit Zeiten ergänzt, die man benötigt, um sie zurückzulegen. So erstellen die Schülerinnen und Schüler einen Graph und entwickeln eine grobe Vorstellung von möglichen Routen und eventuell sogar schon eine Idee für die schnellste Route. An dieser Stelle werden die anwendungsbezogenen Arbeitsblätter durch ein nicht obligatorisches Video ergänzt, das Graphen formal-mathematisch einführt. Die Materialien und Arbeitsblätter finden Sie über den Link am Ende dieser Seite.

Wie kann man sich jedoch sicher sein, die schnellste Route gefunden zu haben? Dafür soll der Dijkstra-Algorithmus, der wohl bekannteste "Kürzeste-Wege-Algorithmus", so nachvollzogen werden, dass die Lernenden ihn selbst anwenden können. Da es sich um einen für Schülerinnen und Schüler komplexen Algorithmus in einem nicht bekannten Anwendungsgebiet handelt, bekommen die sie zum Nachvollziehen zuerst übersichtliche grafische Hilfestellungen und Hinweise, die es besonders zu beachten gilt. Auch ein Erklärvideo soll helfen, den Algorithmus zu verstehen.

Nachdem die Lernenden den schnellsten Weg gefunden und versucht haben, den Dijkstra-Algorithmus selbst zu formulieren, sind sie nun selbst gefordert, die umweltfreundlichste Route von Mainz nach München zu finden. Weil die Umweltfreundlichkeit einer Route einerseits von sehr vielen Faktoren abhängt, andererseits aber auch nicht eindeutig definiert ist, handelt es sich dabei um eine starke Vereinfachung.

Abschließend wird folgende Frage bearbeitet: Wie findet man den besten Kompromiss zwischen schneller und umweltfreundlicher Route? Thematisch schließt somit die Lerneinheit in Richtung der aktuellen Nachhaltigkeitsdebatte ab und schafft fachmathematisch eine Verbindung zwischen Netzwerk- und multikriterieller Optimierung. Darüber hinaus haben die Lernenden die Möglichkeit, sich in einem interaktiven Jupyter-Notebook-Kurs mit dem Programmieren des Dijkstra-Algorithmus zu beschäftigen. Dieser löst die Anschauungsbeispiele in der Programmiersprache Python.

Didaktisch-methodischer Kommentar

Relevanz des Themas

Heutzutage spielen Navigationsprogramme, besonders Google Maps oder Apple Karten, eine sehr große Rolle und werden alltäglich verwendet. Das Lösen von Navigationsproblemen kann dem mathematischen Fachgebiet der Netzwerkoptimierung zugeordnet werden. Das allein zeigt die herausragende Relevanz und unterschätzte Bedeutung eines Themas, das in den Lehrplänen der Länder deutschlandweit bisher keine große spielt.

Vorkenntnisse

Die Lernenden benötigen für die Unterrichtseinheit keine mathematischen Vorkenntnisse, da es sich um ein außerschulisches mathematisches Anwendungsfeld handelt. Durch die recht anspruchsvollen Inhalte ist diese Lernumgebung jedoch erst für Schülerinnen und Schüler ab der 8. Klasse bis hin zur Oberstufe empfohlen.

Didaktische Analyse

Die Schülerinnen und Schüler lernen mathematische Inhalte im Bereich der Netzwerkoptimierung kennen. Sie lernen den Umgang mit Graphen, Knoten, Kanten und Kantengewichten. Ein Exkurs mit einer kleinen Einführung in die formal-mathematische Netzwerkoptimierung wird für leistungsstarke Oberstufenschülerinnen und -schüler in einem Video gegeben. Außerdem erarbeiten sie ein algorithmisches Vorgehen, den Dijkstra-Algorithmus, sowie ein bikriterielles Netzwerkoptimierungsproblem. Lernschwierigkeiten sind besonders bei der Formulierung des Algorithmus zu erwarten, weswegen hier das Wahrnehmen der Hilfestellungen im Erklärvideo empfohlen wird.

Methodische Analyse

Das Lernheft beziehungsweise die Arbeitsblätter können ausgedruckt, ausgeteilt und bearbeitet werden. Die Bearbeitung an Tablets bietet sich ebenfalls an. Für den Programmierexkurs ist ein Computer oder ein Tablet notwendig.

Es gibt unterschiedliche Möglichkeiten, die Lerneinheit methodisch durchzuführen:

1. Sie kann über mehrere Stunden als Wochenarbeitsauftrag mit dem Lernheft in Einzel- oder Paararbeit erfolgen. Sicherungen können in kleinen Gruppen- oder Paararbeitsphasen durchgeführt werden, indem Ergebnisse verglichen werden.

2. Die Arbeitsphasen des Lernhefts sind als Arbeitsblätter nutzbar. Für jede Arbeitsphase kann eine Unterrichtsstunde verwendet werden. Am Anfang kann ein gemeinsamer Einstieg und am Ende eine gemeinsame Sicherung stattfinden. Die Arbeitsphasen finden in Einzel- oder Paararbeit statt.

3. Es ist auch denkbar, das Lernheft vollständig in einer Heimarbeitsphase durchzuführen. Am Ende sollte aber eine Besprechung im Unterricht stattfinden

Hinweise zu den Materialien

Arbeitsblatt 1: Die Lernenden erstellen aus Kartenmaterial ein Netzwerk aus Knoten und Kanten.

Arbeitsblatt 2: Die Lernenden vollziehen an einem Beispiel den Dijkstra-Algorithmus nach und formulieren ihn selbst.

Arbeitsblatt 3: Die Lernenden wenden den Dijkstra-Algorithmus an einem Beispiel selbst an.

Arbeitsblatt 4: Die Lernenden lösen an einem Beispiel ein bikriterielles Netzwerksoptimierungsproblem.

Programmierexkurs: Die Lernenden vollziehen den Code des Dijkstra-Algorithmus nach und programmieren Abschnitte selbst.

Alle Arbeitsblätter sind einzeln oder als Lernheft zusammengefasst verfügbar. Sie können die Arbeitsblätter über den Link am Ender der Seite herunterladen.

Digitale Kompetenzen, die Lehrende zur Umsetzung der Unterrichtseinheit benötigen (nach dem DigCompEdu Modell)

Die Lehrkräfte integrieren das Hilfsmaterial zur Programmierung des Dijkstra-Algorithmus, um den Lernenden das Erarbeiten eigener, kreativer Lösungen zu ermöglichen und sie in ihrem Lösungsprozess zu unterstützen (3.2 und 3.4). Dabei nutzen sie das Lernvideo zu Graphen, um den Lernenden das Vertiefen ihres eigenen Wissens zu ermöglichen (3.4).

Vermittelte Kompetenzen

Fachkompetenz

Die Schülerinnen und Schüler

erstellen einen Graph mit Knoten, Kanten und Kantengewichten, indem sie aus Kartenmaterial einen Graphen erstellen.

erklären und formulieren den Dijkstra-Algorithmus, indem sie ihn an einem Beispiel nachvollziehen und anschließend die einzelnen Schritte dokumentieren.

wenden den Dijkstra-Algorithmus an, indem sie die umweltfreundlichste Route zwischen Mainz und München finden.

Medienkompetenz

Die Schülerinnen und Schüler

verstehen die Funktionsweise von Navigationsprogrammen, indem sie grundlegende Prinzipien der Netzwerkoptimierung anhand eines Beispiels nachvollziehen.

erklären einen Algorithmus, indem sie algorithmische Strukturen in einem Beispiel erkennen und allgemeingültig formulieren.

lösen ein technisches Problem, indem sie ein "Kürzeste-Wege-Problem" in der Programmiersprache Python formulieren.

Sozialkompetenz

Die Schülerinnen und Schüler

kommunizieren miteinander, indem sie in Paararbeit zusammenarbeiten.

geben einander Feedback, indem sie in Sicherungsphasen Lösungen kontrollieren und besprechen.

21st Century-Skills

Die Schülerinnen und Schüler

fördern sich im kritischen Denken, indem sie bei der Formulierung und Programmierung des Dijkstra-Algorithmus strukturiert vorgehen, Argumente innerhalb der Lerngruppe analysieren und die Ergebnisse des Dijkstra-Algorithmus nutzen, um die umweltfreundlichste Route zu bestimmen*.

stärken ihre Fähigkeiten zur Kollaboration und Kommunikation, indem sie die Aufgaben im Team diskutieren und lösen.

fördern ihr Verständnis der digitalen Welt, indem sie durch das Bearbeiten der Aufgaben einen Einblick in die Funktionsweise von Navigationsprogrammen erlangen.

* nach Ennis, R.H. (2011). Critical Thinking: Reflection and perspective - Part I. Inquiry: CT across the Disciplines 26 (1), S. 4-18.

# data[].attributes.attachment_link.title
Wie funktionieren Navigationsprogramme? | Lehrer-Online - Lehrer-Online

# data[].attributes.attachment_link.description
Unterrichtsmaterial zu Navigationsprogrammen. Wie funktioniert Google Maps? Algorithmus von Google Maps und Navigation. Jetzt informieren!

# data[].attributes.attachment_link.description
Neue Ideen entwickeln, Probleme kreativ lösen und dabei von der Zielgruppe und ihren Bedürfnissen ausgehen - das macht Design Thinking aus. In unserem Projek...

# data[].attributes.attachment_link.description
OnlineGDB is online IDE with python compiler. Quick and easy way to compile python program online. It supports python3.

# data[].attributes.body
Die Programmiersprache Python im Wahlpflichtbereich der Sek1 RS GE UV 7.4/10.3 (nrw.de)

# data[].attributes.attachment_link.readable_text
Python ist eine Programmiersprache, die plattformunabhängig auf allen gängigen Systemen sogar bis hin zu den Systemen Arduino und Rasperry Pi eingesetzt werden kann und mit einfachen Entwicklungsumgebungen kostenlos zur Verfügung steht.
Python wurde von Guido von Rossum am Centrum voor Wiskunde en Informatica Anfang der 1990er Jahre entwickelt. Auch wenn häufig ein Zusammenhang mit der Schlangenart hergestellt wird, Guido von Rossum hat seine Programmiersprache nicht nach der Schlangenart sondern nach der britischen Comedy-Gruppe Monty Python benannt. Verwendet werden häufig immer noch älteren Versionen 2.x parallel zu den aktuellen Versionen 3.x. Leider sind die Versionen 3.x aber nicht zu den Versionen 2.x abwärtskompatibel.

Sie weist eine Reihe von Vorzügen auf, die sie auch für den Einsatz im Informatikunterricht der Sekundarstufe 1 interessant macht. So wurde Python mit dem Ziel entworfen, Programme möglichst einfach und übersichtlich zu gestalten. Zudem erlaubt Python unterschiedliche Programmierstile (imperativ, funktional und objektorientiert) und kann so flexibel als textorientierte Programmiersprache sowohl im Anfänger- wie auch für Fortgeschrittenenkurs eingesetzt werden.

Im Internet sind auch für den Unterricht in der Schule viele interessante Seiten, die sich mit Python beschäftigen, erreichbar. Einige der freien Materialien werden hier kommentiert und bereitgestellt.

Nochmals einige Besonderheiten von Python:

Python hat ein modernes Sprachkonzept, ist einfach zu lernen und sehr gut lesbar.

Blockbildung erfolgt ausschließlich über Einrückung - keine geschweiften Klammern, kein "begin .. end", dadurch weniger Syntaxfehler.

Der interaktive Modus erlaubt einfaches und effizientes Testen kleiner Codeschnipsel.

Prozedurale Programmierung ist ebenso möglich wie objektorientierte Programmierung.

Eine einfache, aber brauchbare IDE wird gleich mitgeliefert.

Python ist mächtig! Man kann mit Python komplette GUI-Anwendungen entwickeln, dynamische Websites erstellen, HTML-Formulare auslesen, Datenbanken abfragen, Roboter steuern und - natürlich - Spiele programmieren.

# data[].attributes.attachment_link.title
Die Programmiersprache Python im Wahlpflichtbereich der Sek1 RS GE UV 7.4/10.3

# data[].attributes.attachment_link.description
Python ist eine Programmiersprache, die plattformunabhängig auf allen gängigen Systemen sogar bis hin zu den Systemen Arduino und Rasperry Pi eingesetzt werden kann und mit einfachen Entwicklungsumgebungen kostenlos zur Verfügung steht. Python wurde von Guido von Rossum am Centrum voor Wiskunde en Informatica Anfang der 1990er Jahre entwickelt.

# data[].attributes.attachment_link.title
Materialien zum neuen Bildungsplan Informatik an den nichtgewerblichen Beruflichen Gymnasien

# data[].attributes.attachment_link.description
Materialien zum neuen Bildungsplan Informatik an den nichtgewerblichen Beruflichen Gymnasien

# data[].attributes.body
LerneProgrammieren Python Cheatsheet

# data[].attributes.body
Spickzettel.pdf (tigerjython4kids.ch)

# data[].attributes.body
python:cours:mementopython3-english.pdf (limsi.fr)

# data[].attributes.body
GitHub - gto76/python-cheatsheet: Comprehensive Python Cheatsheet

# data[].attributes.attachment_link.description
Comprehensive Python Cheatsheet. Contribute to gto76/python-cheatsheet development by creating an account on GitHub.

# data[].attributes.body
Python Cheat Sheet (programmingwithmosh.com)

# data[].attributes.attachment_link.readable_text
The Zen of Python

From the PEP 20 -- The Zen of Python:

Long time Pythoneer Tim Peters succinctly channels the BDFL's guiding principles for Python's design into 20 aphorisms, only 19 of which have been written down.

>>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!

Python Basics

Math Operators

From Highest to Lowest precedence:

Examples of expressions in the interactive shell:

Data Types

String Concatenation and Replication

String concatenation:

>>> 'Alice' 'Bob' 'AliceBob'

Note: Avoid + operator for string concatenation. Prefer string formatting.

String Replication:

>>> 'Alice' * 5 'AliceAliceAliceAliceAlice'

Variables

You can name a variable anything as long as it obeys the following rules:

1. It can be only one word.

2. It can use only letters, numbers, and the underscore (_) character.

3. It can't begin with a number.

4. Variable name starting with an underscore (_) are considered as "unuseful`.

Example:

>>> spam = 'Hello' >>> spam 'Hello'

_spam should not be used again in the code.

Comments

Inline comment:

# This is a comment

Multiline comment:

# This is a # multiline comment

Code with a comment:

a = 1 # initialization

Please note the two spaces in front of the comment.

Function docstring:

def foo(): """ This is a function docstring You can also use: ''' Function Docstring ''' """

The print() Function

>>> print('Hello world!') Hello world!

>>> a = 1 >>> print('Hello world!', a) Hello world! 1

The input() Function

Example Code:

>>> print('What is your name?') # ask for their name >>> myName = input() >>> print('It is good to meet you, {}'.format(myName)) What is your name? Al It is good to meet you, Al

The len() Function

Evaluates to the integer value of the number of characters in a string:

Note: test of emptiness of strings, lists, dictionary, etc, should not use len, but prefer direct boolean evaluation.

>>> a = [1, 2, 3] >>> if a: >>> print("the list is not empty!")

The str(), int(), and float() Functions

Integer to String or Float:

>>> print('I am {} years old.'.format(str(29))) I am 29 years old.

Float to Integer:

Flow Control

Comparison Operators

These operators evaluate to True or False depending on the values you give them.

Examples:

>>> 'hello' == 'hello' True

>>> 'hello' == 'Hello' False

>>> 'dog' != 'cat' True

Boolean evaluation

Never use == or != operator to evaluate boolean operation. Use the is or is not operators, or use implicit boolean evaluation.

NO (even if they are valid Python):

>>> True == True True

>>> True != False True

YES (even if they are valid Python):

>>> True is True True

>>> True is not False True

These statements are equivalent:

>>> if a is True: >>> pass >>> if a is not False: >>> pass >>> if a: >>> pass

And these as well:

>>> if a is False: >>> pass >>> if a is not True: >>> pass >>> if not a: >>> pass

Boolean Operators

There are three Boolean operators: and, or, and not.

The and Operator's Truth Table:

The or Operator's Truth Table:

The not Operator's Truth Table:

Mixing Boolean and Comparison Operators

>>> (4 < 5) and (5 < 6) True

>>> (4 < 5) and (9 < 6) False

>>> (1 == 2) or (2 == 2) True

You can also use multiple Boolean operators in an expression, along with the comparison operators:

>>> 2 + 2 == 4 and not 2 + 2 == 5 and 2 * 2 == 2 + 2 True

if Statements

if name == 'Alice': print('Hi, Alice.')

else Statements

name = 'Bob' if name == 'Alice': print('Hi, Alice.') else: print('Hello, stranger.')

elif Statements

name = 'Bob' age = 5 if name == 'Alice': print('Hi, Alice.') elif age < 12: print('You are not Alice, kiddo.')

name = 'Bob' age = 30 if name == 'Alice': print('Hi, Alice.') elif age < 12: print('You are not Alice, kiddo.') else: print('You are neither Alice nor a little kid.')

while Loop Statements

spam = 0 while spam < 5: print('Hello, world.') spam = spam + 1

break Statements

If the execution reaches a break statement, it immediately exits the while loop's clause:

while True: print('Please type your name.') name = input() if name == 'your name': break print('Thank you!')

continue Statements

When the program execution reaches a continue statement, the program execution immediately jumps back to the start of the loop.

while True: print('Who are you?') name = input() if name != 'Joe': continue print('Hello, Joe. What is the password? (It is a fish.)') password = input() if password == 'swordfish': break print('Access granted.')

for Loops and the range() Function

>>> print('My name is') >>> for i in range(5): >>> print('Jimmy Five Times ({})'.format(str(i))) My name is Jimmy Five Times (0) Jimmy Five Times (1) Jimmy Five Times (2) Jimmy Five Times (3) Jimmy Five Times (4)

The range() function can also be called with three arguments. The first two arguments will be the start and stop values, and the third will be the step argument. The step is the amount that the variable is increased by after each iteration.

>>> for i in range(0, 10, 2): >>> print(i) 0 2 4 6 8

You can even use a negative number for the step argument to make the for loop count down instead of up.

>>> for i in range(5, -1, -1): >>> print(i) 5 4 3 2 1 0

For else statement

This allows to specify a statement to execute in case of the full loop has been executed. Only useful when a break condition can occur in the loop:

>>> for i in [1, 2, 3, 4, 5]: >>> if i == 3: >>> break >>> else: >>> print("only executed when no item of the list is equal to 3")

Importing Modules

import random for i in range(5): print(random.randint(1, 10))

import random, sys, os, math

from random import *

Ending a Program Early with sys.exit()

import sys while True: print('Type exit to exit.') response = input() if response == 'exit': sys.exit() print('You typed {}.'.format(response))

Functions

>>> def hello(name): >>> print('Hello {}'.format(name)) >>> >>> hello('Alice') >>> hello('Bob') Hello Alice Hello Bob

Return Values and return Statements

When creating a function using the def statement, you can specify what the return value should be with a return statement. A return statement consists of the following:

import random def getAnswer(answerNumber): if answerNumber == 1: return 'It is certain' elif answerNumber == 2: return 'It is decidedly so' elif answerNumber == 3: return 'Yes' elif answerNumber == 4: return 'Reply hazy try again' elif answerNumber == 5: return 'Ask again later' elif answerNumber == 6: return 'Concentrate and ask again' elif answerNumber == 7: return 'My reply is no' elif answerNumber == 8: return 'Outlook not so good' elif answerNumber == 9: return 'Very doubtful' r = random.randint(1, 9) fortune = getAnswer(r) print(fortune)

The None Value

>>> spam = print('Hello!') Hello!

>>> spam is None True

Note: never compare to None with the == operator. Always use is.

Keyword Arguments and print()

>>> print('Hello', end='') >>> print('World') HelloWorld

>>> print('cats', 'dogs', 'mice') cats dogs mice

>>> print('cats', 'dogs', 'mice', sep=',') cats,dogs,mice

Local and Global Scope

Code in the global scope cannot use any local variables.

However, a local scope can access global variables.

Code in a function's local scope cannot use variables in any other local scope.

You can use the same name for different variables if they are in different scopes. That is, there can be a local variable named spam and a global variable also named spam.

The global Statement

If you need to modify a global variable from within a function, use the global statement:

>>> def spam(): >>> global eggs >>> eggs = 'spam' >>> >>> eggs = 'global' >>> spam() >>> print(eggs) spam

There are four rules to tell whether a variable is in a local scope or global scope:

1. If a variable is being used in the global scope (that is, outside of all functions), then it is always a global variable.

2. If there is a global statement for that variable in a function, it is a global variable.

3. Otherwise, if the variable is used in an assignment statement in the function, it is a local variable.

4. But if the variable is not used in an assignment statement, it is a global variable.

Exception Handling

Basic exception handling

>>> def spam(divideBy): >>> try: >>> return 42 / divideBy >>> except ZeroDivisionError as e: >>> print('Error: Invalid argument: {}'.format(e)) >>> >>> print(spam(2)) >>> print(spam(12)) >>> print(spam(0)) >>> print(spam(1)) 21.0 3.5 Error: Invalid argument: division by zero None 42.0

Final code in exception handling

Code inside the finally section is always executed, no matter if an exception has been raised or not, and even if an exception is not caught.

>>> def spam(divideBy): >>> try: >>> return 42 / divideBy >>> except ZeroDivisionError as e: >>> print('Error: Invalid argument: {}'.format(e)) >>> finally: >>> print("-- division finished --") >>> print(spam(2)) -- division finished -- 21.0 >>> print(spam(12)) -- division finished -- 3.5 >>> print(spam(0)) Error: Invalid Argument division by zero -- division finished -- None >>> print(spam(1)) -- division finished -- 42.0

Lists

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> spam ['cat', 'bat', 'rat', 'elephant']

Getting Individual Values in a List with Indexes

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> spam[0] 'cat'

>>> spam[3] 'elephant'

Negative Indexes

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> spam[-1] 'elephant'

>>> 'The {} is afraid of the {}.'.format(spam[-1], spam[-3]) 'The elephant is afraid of the bat.'

Getting Sublists with Slices

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> spam[0:4] ['cat', 'bat', 'rat', 'elephant']

>>> spam[1:3] ['bat', 'rat']

>>> spam[0:-1] ['cat', 'bat', 'rat']

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> spam[:2] ['cat', 'bat']

>>> spam[1:] ['bat', 'rat', 'elephant']

Slicing the complete list will perform a copy:

>>> spam2 = spam[:] ['cat', 'bat', 'rat', 'elephant'] >>> spam.append('dog') >>> spam ['cat', 'bat', 'rat', 'elephant', 'dog'] >>> spam2 ['cat', 'bat', 'rat', 'elephant']

Getting a List's Length with len()

>>> spam = ['cat', 'dog', 'moose'] >>> len(spam) 3

Changing Values in a List with Indexes

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> spam[1] = 'aardvark' >>> spam ['cat', 'aardvark', 'rat', 'elephant'] >>> spam[2] = spam[1] >>> spam ['cat', 'aardvark', 'aardvark', 'elephant'] >>> spam[-1] = 12345 >>> spam ['cat', 'aardvark', 'aardvark', 12345]

List Concatenation and List Replication

>>> [1, 2, 3] + ['A', 'B', 'C'] [1, 2, 3, 'A', 'B', 'C'] >>> ['X', 'Y', 'Z'] * 3 ['X', 'Y', 'Z', 'X', 'Y', 'Z', 'X', 'Y', 'Z'] >>> spam = [1, 2, 3] >>> spam = spam + ['A', 'B', 'C'] >>> spam [1, 2, 3, 'A', 'B', 'C']

Removing Values from Lists with del Statements

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> del spam[2] >>> spam ['cat', 'bat', 'elephant']

>>> del spam[2] >>> spam ['cat', 'bat']

Using for Loops with Lists

>>> supplies = ['pens', 'staplers', 'flame-throwers', 'binders'] >>> for i, supply in enumerate(supplies): >>> print('Index {} in supplies is: {}'.format(str(i), supply)) Index 0 in supplies is: pens Index 1 in supplies is: staplers Index 2 in supplies is: flame-throwers Index 3 in supplies is: binders

Looping Through Multiple Lists with zip()

>>> name = ['Pete', 'John', 'Elizabeth'] >>> age = [6, 23, 44] >>> for n, a in zip(name, age): >>> print('{} is {} years old'.format(n, a)) Pete is 6 years old John is 23 years old Elizabeth is 44 years old

The in and not in Operators

>>> 'howdy' in ['hello', 'hi', 'howdy', 'heyas'] True

>>> spam = ['hello', 'hi', 'howdy', 'heyas'] >>> 'cat' in spam False

>>> 'howdy' not in spam False

>>> 'cat' not in spam True

The Multiple Assignment Trick

The multiple assignment trick is a shortcut that lets you assign multiple variables with the values in a list in one line of code. So instead of doing this:

>>> cat = ['fat', 'orange', 'loud'] >>> size = cat[0] >>> color = cat[1] >>> disposition = cat[2]

You could type this line of code:

>>> cat = ['fat', 'orange', 'loud'] >>> size, color, disposition = cat

The multiple assignment trick can also be used to swap the values in two variables:

>>> a, b = 'Alice', 'Bob' >>> a, b = b, a >>> print(a) 'Bob'

>>> print(b) 'Alice'

Augmented Assignment Operators

Examples:

>>> spam = 'Hello' >>> spam += ' world!' >>> spam 'Hello world!' >>> bacon = ['Zophie'] >>> bacon *= 3 >>> bacon ['Zophie', 'Zophie', 'Zophie']

Finding a Value in a List with the index() Method

>>> spam = ['Zophie', 'Pooka', 'Fat-tail', 'Pooka'] >>> spam.index('Pooka') 1

Adding Values to Lists with the append() and insert() Methods

append():

>>> spam = ['cat', 'dog', 'bat'] >>> spam.append('moose') >>> spam ['cat', 'dog', 'bat', 'moose']

insert():

>>> spam = ['cat', 'dog', 'bat'] >>> spam.insert(1, 'chicken') >>> spam ['cat', 'chicken', 'dog', 'bat']

Removing Values from Lists with remove()

>>> spam = ['cat', 'bat', 'rat', 'elephant'] >>> spam.remove('bat') >>> spam ['cat', 'rat', 'elephant']

If the value appears multiple times in the list, only the first instance of the value will be removed.

Sorting the Values in a List with the sort() Method

>>> spam = [2, 5, 3.14, 1, -7] >>> spam.sort() >>> spam [-7, 1, 2, 3.14, 5]

>>> spam = ['ants', 'cats', 'dogs', 'badgers', 'elephants'] >>> spam.sort() >>> spam ['ants', 'badgers', 'cats', 'dogs', 'elephants']

You can also pass True for the reverse keyword argument to have sort() sort the values in reverse order:

>>> spam.sort(reverse=True) >>> spam ['elephants', 'dogs', 'cats', 'badgers', 'ants']

If you need to sort the values in regular alphabetical order, pass str. lower for the key keyword argument in the sort() method call:

>>> spam = ['a', 'z', 'A', 'Z'] >>> spam.sort(key=str.lower) >>> spam ['a', 'A', 'z', 'Z']

You can use the built-in function sorted to return a new list:

>>> spam = ['ants', 'cats', 'dogs', 'badgers', 'elephants'] >>> sorted(spam) ['ants', 'badgers', 'cats', 'dogs', 'elephants']

Tuple Data Type

>>> eggs = ('hello', 42, 0.5) >>> eggs[0] 'hello'

>>> eggs[1:3] (42, 0.5)

The main way that tuples are different from lists is that tuples, like strings, are immutable.

Converting Types with the list() and tuple() Functions

>>> tuple(['cat', 'dog', 5]) ('cat', 'dog', 5)

>>> list(('cat', 'dog', 5)) ['cat', 'dog', 5]

>>> list('hello') ['h', 'e', 'l', 'l', 'o']

Dictionaries and Structuring Data

Example Dictionary:

myCat = {'size': 'fat', 'color': 'gray', 'disposition': 'loud'}

The keys(), values(), and items() Methods

values():

>>> spam = {'color': 'red', 'age': 42} >>> for v in spam.values(): >>> print(v) red 42

keys():

>>> for k in spam.keys(): >>> print(k) color age

items():

>>> for i in spam.items(): >>> print(i) ('color', 'red') ('age', 42)

Using the keys(), values(), and items() methods, a for loop can iterate over the keys, values, or key-value pairs in a dictionary, respectively.

 >>> spam = {'color': 'red', 'age': 42} >>> >>> for k, v in spam.items(): >>> print('Key: {} Value: {}'.format(k, str(v))) Key: age Value: 42 Key: color Value: red

Checking Whether a Key or Value Exists in a Dictionary

>>> spam = {'name': 'Zophie', 'age': 7}

>>> 'name' in spam.keys() True

>>> 'Zophie' in spam.values() True

>>> # You can omit the call to keys() when checking for a key >>> 'color' in spam False

>>> 'color' not in spam True

The get() Method

Get has two parameters: key and default value if the key did not exist

>>> picnic_items = {'apples': 5, 'cups': 2} >>> 'I am bringing {} cups.'.format(str(picnic_items.get('cups', 0))) 'I am bringing 2 cups.'

>>> 'I am bringing {} eggs.'.format(str(picnic_items.get('eggs', 0))) 'I am bringing 0 eggs.'

The setdefault() Method

Let's consider this code:

spam = {'name': 'Pooka', 'age': 5} if 'color' not in spam: spam['color'] = 'black'

Using setdefault we could write the same code more succinctly:

>>> spam = {'name': 'Pooka', 'age': 5} >>> spam.setdefault('color', 'black') 'black'

>>> spam {'color': 'black', 'age': 5, 'name': 'Pooka'}

>>> spam.setdefault('color', 'white') 'black'

>>> spam {'color': 'black', 'age': 5, 'name': 'Pooka'}

Pretty Printing

>>> import pprint >>> >>> message = 'It was a bright cold day in April, and the clocks were striking >>> thirteen.' >>> count = {} >>> >>> for character in message: >>> count.setdefault(character, 0) >>> count[character] = count[character] + 1 >>> >>> pprint.pprint(count) {' ': 13, ',': 1, '.': 1, 'A': 1, 'I': 1, 'a': 4, 'b': 1, 'c': 3, 'd': 3, 'e': 5, 'g': 2, 'h': 3, 'i': 6, 'k': 2, 'l': 3, 'n': 4, 'o': 2, 'p': 1, 'r': 5, 's': 3, 't': 6, 'w': 2, 'y': 1}

Merge two dictionaries

# in Python 3.5+: >>> x = {'a': 1, 'b': 2} >>> y = {'b': 3, 'c': 4} >>> z = {**x, **y} >>> z {'c': 4, 'a': 1, 'b': 3} # in Python 2.7 >>> z = dict(x, **y) >>> z {'c': 4, 'a': 1, 'b': 3}

sets

From the Python 3 documentation

A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate entries. Set objects also support mathematical operations like union, intersection, difference, and symmetric difference.

Initializing a set

There are two ways to create sets: using curly braces {} and the built-in function set()

>>> s = {1, 2, 3} >>> s = set([1, 2, 3])

When creating an empty set, be sure to not use the curly braces {} or you will get an empty dictionary instead.

sets: unordered collections of unique elements

A set automatically remove all the duplicate values.

>>> s = {1, 2, 3, 2, 3, 4} >>> s {1, 2, 3, 4}

And as an unordered data type, they can't be indexed.

>>> s = {1, 2, 3} >>> s[0] Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'set' object does not support indexing >>>

set add() and update()

Using the add() method we can add a single element to the set.

>>> s = {1, 2, 3} >>> s.add(4) >>> s {1, 2, 3, 4}

And with update(), multiple ones .

>>> s = {1, 2, 3} >>> s.update([2, 3, 4, 5, 6]) >>> s {1, 2, 3, 4, 5, 6} # remember, sets automatically remove duplicates

set remove() and discard()

Both methods will remove an element from the set, but remove() will raise a key error if the value doesn't exist.

>>> s = {1, 2, 3} >>> s.remove(3) >>> s {1, 2} >>> s.remove(3) Traceback (most recent call last): File "<stdin>", line 1, in <module> KeyError: 3

discard() won't raise any errors.

>>> s = {1, 2, 3} >>> s.discard(3) >>> s {1, 2} >>> s.discard(3) >>>

set union()

union() or | will create a new set that contains all the elements from the sets provided.

>>> s1 = {1, 2, 3} >>> s2 = {3, 4, 5} >>> s1.union(s2) # or 's1 | s2' {1, 2, 3, 4, 5}

set intersection

intersection or & will return a set containing only the elements that are common to all of them.

>>> s1 = {1, 2, 3} >>> s2 = {2, 3, 4} >>> s3 = {3, 4, 5} >>> s1.intersection(s2, s3) # or 's1 & s2 & s3' {3}

set difference

difference or - will return only the elements that are unique to the first set (invoked set).

>>> s1 = {1, 2, 3} >>> s2 = {2, 3, 4} >>> s1.difference(s2) # or 's1 - s2' {1} >>> s2.difference(s1) # or 's2 - s1' {4}

set symetric_difference

symetric_difference or ^ will return all the elements that are not common between them.

>>> s1 = {1, 2, 3} >>> s2 = {2, 3, 4} >>> s1.symmetric_difference(s2) # or 's1 ^ s2' {1, 4}

itertools Module

The itertools module is a collection of tools intended to be fast and use memory efficiently when handling iterators (like lists or dictionaries).

From the official Python 3.x documentation:

The module standardizes a core set of fast, memory efficient tools that are useful by themselves or in combination. Together, they form an "iterator algebra" making it possible to construct specialized tools succinctly and efficiently in pure Python.

The itertools module comes in the standard library and must be imported.

The operator module will also be used. This module is not necessary when using itertools, but needed for some of the examples below.

accumulate()

Makes an iterator that returns the results of a function.

itertools.accumulate(iterable[, func])

Example:

>>> data = [1, 2, 3, 4, 5] >>> result = itertools.accumulate(data, operator.mul) >>> for each in result: >>> print(each) 1 2 6 24 120

The operator.mul takes two numbers and multiplies them:

operator.mul(1, 2) 2 operator.mul(2, 3) 6 operator.mul(6, 4) 24 operator.mul(24, 5) 120

Passing a function is optional:

>>> data = [5, 2, 6, 4, 5, 9, 1] >>> result = itertools.accumulate(data) >>> for each in result: >>> print(each) 5 7 13 17 22 31 32

If no function is designated the items will be summed:

5 5 + 2 = 7 7 + 6 = 13 13 + 4 = 17 17 + 5 = 22 22 + 9 = 31 31 + 1 = 32

combinations()

Takes an iterable and a integer. This will create all the unique combination that have r members.

itertools.combinations(iterable, r)

Example:

>>> shapes = ['circle', 'triangle', 'square',] >>> result = itertools.combinations(shapes, 2) >>> for each in result: >>> print(each) ('circle', 'triangle') ('circle', 'square') ('triangle', 'square')

combinations_with_replacement()

Just like combinations(), but allows individual elements to be repeated more than once.

itertools.combinations_with_replacement(iterable, r)

Example:

>>> shapes = ['circle', 'triangle', 'square'] >>> result = itertools.combinations_with_replacement(shapes, 2) >>> for each in result: >>> print(each) ('circle', 'circle') ('circle', 'triangle') ('circle', 'square') ('triangle', 'triangle') ('triangle', 'square') ('square', 'square')

count()

Makes an iterator that returns evenly spaced values starting with number start.

itertools.count(start=0, step=1)

Example:

>>> for i in itertools.count(10,3): >>> print(i) >>> if i > 20: >>> break 10 13 16 19 22

cycle()

This function cycles through an iterator endlessly.

itertools.cycle(iterable)

Example:

>>> colors = ['red', 'orange', 'yellow', 'green', 'blue', 'violet'] >>> for color in itertools.cycle(colors): >>> print(color) red orange yellow green blue violet red orange

When reached the end of the iterable it start over again from the beginning.

chain()

Take a series of iterables and return them as one long iterable.

itertools.chain(*iterables)

Example:

>>> colors = ['red', 'orange', 'yellow', 'green', 'blue'] >>> shapes = ['circle', 'triangle', 'square', 'pentagon'] >>> result = itertools.chain(colors, shapes) >>> for each in result: >>> print(each) red orange yellow green blue circle triangle square pentagon

compress()

Filters one iterable with another.

itertools.compress(data, selectors)

Example:

>>> shapes = ['circle', 'triangle', 'square', 'pentagon'] >>> selections = [True, False, True, False] >>> result = itertools.compress(shapes, selections) >>> for each in result: >>> print(each) circle square

dropwhile()

Make an iterator that drops elements from the iterable as long as the predicate is true; afterwards, returns every element.

itertools.dropwhile(predicate, iterable)

Example:

>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1] >>> result = itertools.dropwhile(lambda x: x<5, data) >>> for each in result: >>> print(each) 5 6 7 8 9 10 1

filterfalse()

Makes an iterator that filters elements from iterable returning only those for which the predicate is False.

itertools.filterfalse(predicate, iterable)

Example:

>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1] >>> result = itertools.filterfalse(lambda x: x<5, data) >>> for each in result: >>> print(each) 5 6 7 8 9 10

groupby()

Simply put, this function groups things together.

itertools.groupby(iterable, key=None)

Example:

>>> robots = [{ 'name': 'blaster', 'faction': 'autobot' }, { 'name': 'galvatron', 'faction': 'decepticon' }, { 'name': 'jazz', 'faction': 'autobot' }, { 'name': 'metroplex', 'faction': 'autobot' }, { 'name': 'megatron', 'faction': 'decepticon' }, { 'name': 'starcream', 'faction': 'decepticon' }] >>> for key, group in itertools.groupby(robots, key=lambda x: x['faction']): >>> print(key) >>> print(list(group)) autobot [{'name': 'blaster', 'faction': 'autobot'}] decepticon [{'name': 'galvatron', 'faction': 'decepticon'}] autobot [{'name': 'jazz', 'faction': 'autobot'}, {'name': 'metroplex', 'faction': 'autobot'}] decepticon [{'name': 'megatron', 'faction': 'decepticon'}, {'name': 'starcream', 'faction': 'decepticon'}]

islice()

This function is very much like slices. This allows you to cut out a piece of an iterable.

itertools.islice(iterable, start, stop[, step])

Example:

>>> colors = ['red', 'orange', 'yellow', 'green', 'blue',] >>> few_colors = itertools.islice(colors, 2) >>> for each in few_colors: >>> print(each) red orange

permutations()

itertools.permutations(iterable, r=None)

Example:

>>> alpha_data = ['a', 'b', 'c'] >>> result = itertools.permutations(alpha_data) >>> for each in result: >>> print(each) ('a', 'b', 'c') ('a', 'c', 'b') ('b', 'a', 'c') ('b', 'c', 'a') ('c', 'a', 'b') ('c', 'b', 'a')

product()

Creates the cartesian products from a series of iterables.

>>> num_data = [1, 2, 3] >>> alpha_data = ['a', 'b', 'c'] >>> result = itertools.product(num_data, alpha_data) >>> for each in result: print(each) (1, 'a') (1, 'b') (1, 'c') (2, 'a') (2, 'b') (2, 'c') (3, 'a') (3, 'b') (3, 'c')

repeat()

This function will repeat an object over and over again. Unless, there is a times argument.

itertools.repeat(object[, times])

Example:

>>> for i in itertools.repeat("spam", 3): print(i) spam spam spam

starmap()

Makes an iterator that computes the function using arguments obtained from the iterable.

itertools.starmap(function, iterable)

Example:

>>> data = [(2, 6), (8, 4), (7, 3)] >>> result = itertools.starmap(operator.mul, data) >>> for each in result: >>> print(each) 12 32 21

takewhile()

The opposite of dropwhile(). Makes an iterator and returns elements from the iterable as long as the predicate is true.

itertools.takewhile(predicate, iterable)

Example:

>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1] >>> result = itertools.takewhile(lambda x: x<5, data) >>> for each in result: >>> print(each) 1 2 3 4

tee()

Return n independent iterators from a single iterable.

itertools.tee(iterable, n=2)

Example:

>>> colors = ['red', 'orange', 'yellow', 'green', 'blue'] >>> alpha_colors, beta_colors = itertools.tee(colors) >>> for each in alpha_colors: >>> print(each) red orange yellow green blue

>>> colors = ['red', 'orange', 'yellow', 'green', 'blue'] >>> alpha_colors, beta_colors = itertools.tee(colors) >>> for each in beta_colors: >>> print(each) red orange yellow green blue

zip_longest()

Makes an iterator that aggregates elements from each of the iterables. If the iterables are of uneven length, missing values are filled-in with fillvalue. Iteration continues until the longest iterable is exhausted.

itertools.zip_longest(*iterables, fillvalue=None)

Example:

>>> colors = ['red', 'orange', 'yellow', 'green', 'blue',] >>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10,] >>> for each in itertools.zip_longest(colors, data, fillvalue=None): >>> print(each) ('red', 1) ('orange', 2) ('yellow', 3) ('green', 4) ('blue', 5) (None, 6) (None, 7) (None, 8) (None, 9) (None, 10)

Comprehensions

List comprehension

>>> a = [1, 3, 5, 7, 9, 11] >>> [i - 1 for i in a] [0, 2, 4, 6, 8, 10]

Set comprehension

>>> b = {"abc", "def"} >>> {s.upper() for s in b} {"ABC", "DEF"}

Dict comprehension

>>> c = {'name': 'Pooka', 'age': 5} >>> {v: k for k, v in c.items()} {'Pooka': 'name', 5: 'age'}

A List comprehension can be generated from a dictionary:

>>> c = {'name': 'Pooka', 'first_name': 'Oooka'} >>> ["{}:{}".format(k.upper(), v.upper()) for k, v in c.items()] ['NAME:POOKA', 'FIRST_NAME:OOOKA']

Manipulating Strings

Escape Characters

Example:

>>> print("Hello there!\nHow are you?\nI\'m doing fine.") Hello there! How are you? I'm doing fine.

Raw Strings

A raw string completely ignores all escape characters and prints any backslash that appears in the string.

>>> print(r'That is Carol\'s cat.') That is Carol\'s cat.

Note: mostly used for regular expression definition (see re package)

Multiline Strings with Triple Quotes

>>> print('''Dear Alice, >>> >>> Eve's cat has been arrested for catnapping, cat burglary, and extortion. >>> >>> Sincerely, >>> Bob''') Dear Alice, Eve's cat has been arrested for catnapping, cat burglary, and extortion. Sincerely, Bob

To keep a nicer flow in your code, you can use the dedent function from the textwrap standard package.

>>> from textwrap import dedent >>> >>> def my_function(): >>> print(''' >>> Dear Alice, >>> >>> Eve's cat has been arrested for catnapping, cat burglary, and extortion. >>> >>> Sincerely, >>> Bob >>> ''').strip()

This generates the same string than before.

Indexing and Slicing Strings

H e l l o w o r l d ! 0 1 2 3 4 5 6 7 8 9 10 11

>>> spam = 'Hello world!' >>> spam[0] 'H'

Slicing:

 >>> spam[0:5] 'Hello'

>>> spam[:5] 'Hello'

>>> spam[6:] 'world!'

>>> spam[6:-1] 'world'

>>> spam[:-1] 'Hello world'

>>> spam[::-1] '!dlrow olleH'

>>> spam = 'Hello world!' >>> fizz = spam[0:5] >>> fizz 'Hello'

The in and not in Operators with Strings

>>> 'Hello' in 'Hello World' True

>>> 'Hello' in 'Hello' True

>>> 'HELLO' in 'Hello World' False

>>> '' in 'spam' True

>>> 'cats' not in 'cats and dogs' False

The in and not in Operators with list

>>> a = [1, 2, 3, 4] >>> 5 in a False

The upper(), lower(), isupper(), and islower() String Methods

>>> spam = 'Hello world!' >>> spam = spam.upper() >>> spam 'HELLO WORLD!'

>>> spam = spam.lower() >>> spam 'hello world!'

isupper() and islower():

>>> spam = 'Hello world!' >>> spam.islower() False

>>> spam.isupper() False

>>> 'HELLO'.isupper() True

>>> 'abc12345'.islower() True

>>> '12345'.islower() False

>>> '12345'.isupper() False

The isX String Methods

isalpha() returns True if the string consists only of letters and is not blank.

isalnum() returns True if the string consists only of letters and numbers and is not blank.

isdecimal() returns True if the string consists only of numeric characters and is not blank.

isspace() returns True if the string consists only of spaces,tabs, and new-lines and is not blank.

istitle() returns True if the string consists only of words that begin with an uppercase letter followed by only lowercase letters.

The startswith() and endswith() String Methods

>>> 'Hello world!'.startswith('Hello') True

>>> 'Hello world!'.endswith('world!') True

>>> 'abc123'.startswith('abcdef') False

>>> 'abc123'.endswith('12') False

>>> 'Hello world!'.startswith('Hello world!') True

>>> 'Hello world!'.endswith('Hello world!') True

The join() and split() String Methods

join():

>>> ', '.join(['cats', 'rats', 'bats']) 'cats, rats, bats'

>>> ' '.join(['My', 'name', 'is', 'Simon']) 'My name is Simon'

>>> 'ABC'.join(['My', 'name', 'is', 'Simon']) 'MyABCnameABCisABCSimon'

split():

>>> 'My name is Simon'.split() ['My', 'name', 'is', 'Simon']

>>> 'MyABCnameABCisABCSimon'.split('ABC') ['My', 'name', 'is', 'Simon']

>>> 'My name is Simon'.split('m') ['My na', 'e is Si', 'on']

Justifying Text with rjust(), ljust(), and center()

rjust() and ljust():

>>> 'Hello'.rjust(10) ' Hello'

>>> 'Hello'.rjust(20) ' Hello'

>>> 'Hello World'.rjust(20) ' Hello World'

>>> 'Hello'.ljust(10) 'Hello '

An optional second argument to rjust() and ljust() will specify a fill character other than a space character. Enter the following into the interactive shell:

>>> 'Hello'.rjust(20, '*') '***************Hello'

>>> 'Hello'.ljust(20, '-') 'Hello---------------'

center():

>>> 'Hello'.center(20) ' Hello '

>>> 'Hello'.center(20, '=') '=======Hello========'

Removing Whitespace with strip(), rstrip(), and lstrip()

>>> spam = ' Hello World ' >>> spam.strip() 'Hello World'

>>> spam.lstrip() 'Hello World '

>>> spam.rstrip() ' Hello World'

>>> spam = 'SpamSpamBaconSpamEggsSpamSpam' >>> spam.strip('ampS') 'BaconSpamEggs'

Copying and Pasting Strings with the pyperclip Module (need pip install)

>>> import pyperclip >>> pyperclip.copy('Hello world!') >>> pyperclip.paste() 'Hello world!'

String Formatting

% operator

>>> name = 'Pete' >>> 'Hello %s' % name "Hello Pete"

We can use the %x format specifier to convert an int value to a string:

>>> num = 5 >>> 'I have %x apples' % num "I have 5 apples"

Note: For new code, using str.format or f-strings (Python 3.6+) is strongly recommended over the % operator.

String Formatting (str.format)

Python 3 introduced a new way to do string formatting that was later back-ported to Python 2.7. This makes the syntax for string formatting more regular.

>>> name = 'John' >>> age = 20' >>> "Hello I'm {}, my age is {}".format(name, age) "Hello I'm John, my age is 20"

>>> "Hello I'm {0}, my age is {1}".format(name, age) "Hello I'm John, my age is 20"

The official Python 3.x documentation recommend str.format over the % operator:

The formatting operations described here exhibit a variety of quirks that lead to a number of common errors (such as failing to display tuples and dictionaries correctly). Using the newer formatted string literals or the str.format() interface helps avoid these errors. These alternatives also provide more powerful, flexible and extensible approaches to formatting text.

Lazy string formatting

You would only use %s string formatting on functions that can do lazy parameters evaluation, the most common being logging:

Prefer:

>>> name = "alice" >>> logging.debug("User name: %s", name)

Over:

>>> logging.debug("User name: {}".format(name))

Or:

>>> logging.debug("User name: " + name)

Formatted String Literals or f-strings (Python 3.6+)

>>> name = 'Elizabeth' >>> f'Hello {name}!' 'Hello Elizabeth!

It is even possible to do inline arithmetic with it:

>>> a = 5 >>> b = 10 >>> f'Five plus ten is {a + b} and not {2 * (a + b)}.' 'Five plus ten is 15 and not 30.'

Template Strings

A simpler and less powerful mechanism, but it is recommended when handling format strings generated by users. Due to their reduced complexity template strings are a safer choice.

>>> from string import Template >>> name = 'Elizabeth' >>> t = Template('Hey $name!') >>> t.substitute(name=name) 'Hey Elizabeth!'

Regular Expressions

1. Import the regex module with import re.

2. Create a Regex object with the re.compile() function. (Remember to use a raw string.)

3. Pass the string you want to search into the Regex object's search() method. This returns a Match object.

4. Call the Match object's group() method to return a string of the actual matched text.

All the regex functions in Python are in the re module:

Matching Regex Objects

>>> phone_num_regex = re.compile(r'\d\d\d-\d\d\d-\d\d\d\d') >>> mo = phone_num_regex.search('My number is 415-555-4242.') >>> print('Phone number found: {}'.format(mo.group())) Phone number found: 415-555-4242

Grouping with Parentheses

>>> phone_num_regex = re.compile(r'(\d\d\d)-(\d\d\d-\d\d\d\d)') >>> mo = phone_num_regex.search('My number is 415-555-4242.') >>> mo.group(1) '415' >>> mo.group(2) '555-4242' >>> mo.group(0) '415-555-4242' >>> mo.group() '415-555-4242'

To retrieve all the groups at once: use the groups() method-note the plural form for the name.

>>> mo.groups() ('415', '555-4242') >>> area_code, main_number = mo.groups() >>> print(area_code) 415 >>> print(main_number) 555-4242

Matching Multiple Groups with the Pipe

The | character is called a pipe. You can use it anywhere you want to match one of many expressions. For example, the regular expression r'Batman|Tina Fey' will match either 'Batman' or 'Tina Fey'.

>>> hero_regex = re.compile (r'Batman|Tina Fey') >>> mo1 = hero_regex.search('Batman and Tina Fey.') >>> mo1.group() 'Batman' >>> mo2 = hero_regex.search('Tina Fey and Batman.') >>> mo2.group() 'Tina Fey'

You can also use the pipe to match one of several patterns as part of your regex:

>>> bat_regex = re.compile(r'Bat(man|mobile|copter|bat)') >>> mo = bat_regex.search('Batmobile lost a wheel') >>> mo.group() 'Batmobile' >>> mo.group(1) 'mobile'

Optional Matching with the Question Mark

The ? character flags the group that precedes it as an optional part of the pattern.

>>> bat_regex = re.compile(r'Bat(wo)?man') >>> mo1 = bat_regex.search('The Adventures of Batman') >>> mo1.group() 'Batman' >>> mo2 = bat_regex.search('The Adventures of Batwoman') >>> mo2.group() 'Batwoman'

Matching Zero or More with the Star

The * (called the star or asterisk) means "match zero or more"-the group that precedes the star can occur any number of times in the text.

>>> bat_regex = re.compile(r'Bat(wo)*man') >>> mo1 = bat_regex.search('The Adventures of Batman') >>> mo1.group() 'Batman' >>> mo2 = bat_regex.search('The Adventures of Batwoman') >>> mo2.group() 'Batwoman' >>> mo3 = bat_regex.search('The Adventures of Batwowowowoman') >>> mo3.group() 'Batwowowowoman'

Matching One or More with the Plus

While * means "match zero or more," the + (or plus) means "match one or more". The group preceding a plus must appear at least once. It is not optional:

>>> bat_regex = re.compile(r'Bat(wo)+man') >>> mo1 = bat_regex.search('The Adventures of Batwoman') >>> mo1.group() 'Batwoman'

>>> mo2 = bat_regex.search('The Adventures of Batwowowowoman') >>> mo2.group() 'Batwowowowoman'

>>> mo3 = bat_regex.search('The Adventures of Batman') >>> mo3 is None True

Matching Specific Repetitions with Curly Brackets

If you have a group that you want to repeat a specific number of times, follow the group in your regex with a number in curly brackets. For example, the regex (Ha){3} will match the string 'HaHaHa', but it will not match 'HaHa', since the latter has only two repeats of the (Ha) group.

Instead of one number, you can specify a range by writing a minimum, a comma, and a maximum in between the curly brackets. For example, the regex (Ha){3,5} will match 'HaHaHa', 'HaHaHaHa', and 'HaHaHaHaHa'.

>>> ha_regex = re.compile(r'(Ha){3}') >>> mo1 = ha_regex.search('HaHaHa') >>> mo1.group() 'HaHaHa'

>>> mo2 = ha_regex.search('Ha') >>> mo2 is None True

Greedy and Nongreedy Matching

Python's regular expressions are greedy by default, which means that in ambiguous situations they will match the longest string possible. The non-greedy version of the curly brackets, which matches the shortest string possible, has the closing curly bracket followed by a question mark.

>>> greedy_ha_regex = re.compile(r'(Ha){3,5}') >>> mo1 = greedy_ha_regex.search('HaHaHaHaHa') >>> mo1.group() 'HaHaHaHaHa'

>>> nongreedy_ha_regex = re.compile(r'(Ha){3,5}?') >>> mo2 = nongreedy_ha_regex.search('HaHaHaHaHa') >>> mo2.group() 'HaHaHa'

The findall() Method

In addition to the search() method, Regex objects also have a findall() method. While search() will return a Match object of the first matched text in the searched string, the findall() method will return the strings of every match in the searched string.

>>> phone_num_regex = re.compile(r'\d\d\d-\d\d\d-\d\d\d\d') # has no groups >>> phone_num_regex.findall('Cell: 415-555-9999 Work: 212-555-0000') ['415-555-9999', '212-555-0000']

To summarize what the findall() method returns, remember the following:

When called on a regex with no groups, such as \d-\d\d\d-\d\d\d\d, the method findall() returns a list of ng matches, such as ['415-555-9999', '212-555-0000'].

When called on a regex that has groups, such as (\d\d\d)-(d\d)-(\d\d\d\d), the method findall() returns a list of es of strings (one string for each group), such as [('415', '555', '9999'), ('212', '555', '0000')].

Making Your Own Character Classes

There are times when you want to match a set of characters but the shorthand character classes (\d, \w, \s, and so on) are too broad. You can define your own character class using square brackets. For example, the character class [aeiouAEIOU] will match any vowel, both lowercase and uppercase.

>>> vowel_regex = re.compile(r'[aeiouAEIOU]') >>> vowel_regex.findall('Robocop eats baby food. BABY FOOD.') ['o', 'o', 'o', 'e', 'a', 'a', 'o', 'o', 'A', 'O', 'O']

You can also include ranges of letters or numbers by using a hyphen. For example, the character class [a-zA-Z0-9] will match all lowercase letters, uppercase letters, and numbers.

By placing a caret character (^) just after the character class's opening bracket, you can make a negative character class. A negative character class will match all the characters that are not in the character class. For example, enter the following into the interactive shell:

>>> consonant_regex = re.compile(r'[^aeiouAEIOU]') >>> consonant_regex.findall('Robocop eats baby food. BABY FOOD.') ['R', 'b', 'c', 'p', ' ', 't', 's', ' ', 'b', 'b', 'y', ' ', 'f', 'd', '.', ' ', 'B', 'B', 'Y', ' ', 'F', 'D', '.']

The Caret and Dollar Sign Characters

You can also use the caret symbol (^) at the start of a regex to indicate that a match must occur at the beginning of the searched text.

Likewise, you can put a dollar sign (\$) at the end of the regex to indicate the string must end with this regex pattern.

And you can use the ^ and \$ together to indicate that the entire string must match the regex-that is, it's not enough for a match to be made on some subset of the string.

The r'^Hello' regular expression string matches strings that begin with 'Hello':

>>> begins_with_hello = re.compile(r'^Hello') >>> begins_with_hello.search('Hello world!') <_sre.SRE_Match object; span=(0, 5), match='Hello'> >>> begins_with_hello.search('He said hello.') is None True

The r'\d\$' regular expression string matches strings that end with a numeric character from 0 to 9:

>>> whole_string_is_num = re.compile(r'^\d+$') >>> whole_string_is_num.search('1234567890') <_sre.SRE_Match object; span=(0, 10), match='1234567890'> >>> whole_string_is_num.search('12345xyz67890') is None True >>> whole_string_is_num.search('12 34567890') is None True

The Wildcard Character

The . (or dot) character in a regular expression is called a wildcard and will match any character except for a newline:

>>> at_regex = re.compile(r'.at') >>> at_regex.findall('The cat in the hat sat on the flat mat.') ['cat', 'hat', 'sat', 'lat', 'mat']

Matching Everything with Dot-Star

>>> name_regex = re.compile(r'First Name: (.*) Last Name: (.*)') >>> mo = name_regex.search('First Name: Al Last Name: Sweigart') >>> mo.group(1) 'Al'

>>> mo.group(2) 'Sweigart'

The dot-star uses greedy mode: It will always try to match as much text as possible. To match any and all text in a nongreedy fashion, use the dot, star, and question mark (.*?). The question mark tells Python to match in a nongreedy way:

>>> nongreedy_regex = re.compile(r'<.*?>') >>> mo = nongreedy_regex.search('<To serve man> for dinner.>') >>> mo.group() '<To serve man>'

>>> greedy_regex = re.compile(r'<.*>') >>> mo = greedy_regex.search('<To serve man> for dinner.>') >>> mo.group() '<To serve man> for dinner.>'

Matching Newlines with the Dot Character

The dot-star will match everything except a newline. By passing re.DOTALL as the second argument to re.compile(), you can make the dot character match all characters, including the newline character:

>>> no_newline_regex = re.compile('.*') >>> no_newline_regex.search('Serve the public trust.\nProtect the innocent.\nUphold the law.').group() 'Serve the public trust.'

>>> newline_regex = re.compile('.*', re.DOTALL) >>> newline_regex.search('Serve the public trust.\nProtect the innocent.\nUphold the law.').group() 'Serve the public trust.\nProtect the innocent.\nUphold the law.'

Review of Regex Symbols

Case-Insensitive Matching

To make your regex case-insensitive, you can pass re.IGNORECASE or re.I as a second argument to re.compile():

>>> robocop = re.compile(r'robocop', re.I) >>> robocop.search('Robocop is part man, part machine, all cop.').group() 'Robocop'

>>> robocop.search('ROBOCOP protects the innocent.').group() 'ROBOCOP'

>>> robocop.search('Al, why does your programming book talk about robocop so much?').group() 'robocop'

Substituting Strings with the sub() Method

The sub() method for Regex objects is passed two arguments:

1. The first argument is a string to replace any matches.

2. The second is the string for the regular expression.

The sub() method returns a string with the substitutions applied:

>>> names_regex = re.compile(r'Agent \w+') >>> names_regex.sub('CENSORED', 'Agent Alice gave the secret documents to Agent Bob.') 'CENSORED gave the secret documents to CENSORED.'

Another example:

>>> agent_names_regex = re.compile(r'Agent (\w)\w*') >>> agent_names_regex.sub(r'\1****', 'Agent Alice told Agent Carol that Agent Eve knew Agent Bob was a double agent.') A**** told C**** that E**** knew B**** was a double agent.'

Managing Complex Regexes

To tell the re.compile() function to ignore whitespace and comments inside the regular expression string, "verbose mode" can be enabled by passing the variable re.VERBOSE as the second argument to re.compile().

Now instead of a hard-to-read regular expression like this:

phone_regex = re.compile(r'((\d{3}|\(\d{3}\))?(\s|-|\.)?\d{3}(\s|-|\.)\d{4}(\s*(ext|x|ext.)\s*\d{2,5})?)')

you can spread the regular expression over multiple lines with comments like this:

phone_regex = re.compile(r'''( (\d{3}|\(\d{3}\))? # area code (\s|-|\.)? # separator \d{3} # first 3 digits (\s|-|\.) # separator \d{4} # last 4 digits (\s*(ext|x|ext.)\s*\d{2,5})? # extension )''', re.VERBOSE)

Handling File and Directory Paths

There are two main modules in Python that deals with path manipulation. One is the os.path module and the other is the pathlib module. The pathlib module was added in Python 3.4, offering an object-oriented way to handle file system paths.

Backslash on Windows and Forward Slash on OS X and Linux

On Windows, paths are written using backslashes (\) as the separator between folder names. On Unix based operating system such as macOS, Linux, and BSDs, the forward slash (/) is used as the path separator. Joining paths can be a headache if your code needs to work on different platforms.

Fortunately, Python provides easy ways to handle this. We will showcase how to deal with this with both os.path.join and pathlib.Path.joinpath

Using os.path.join on Windows:

>>> import os >>> os.path.join('usr', 'bin', 'spam') 'usr\\bin\\spam'

And using pathlib on *nix:

>>> from pathlib import Path >>> print(Path('usr').joinpath('bin').joinpath('spam')) usr/bin/spam

pathlib also provides a shortcut to joinpath using the / operator:

>>> from pathlib import Path >>> print(Path('usr') / 'bin' / 'spam') usr/bin/spam

Notice the path separator is different between Windows and Unix based operating system, that's why you want to use one of the above methods instead of adding strings together to join paths together.

Joining paths is helpful if you need to create different file paths under the same directory.

Using os.path.join on Windows:

>>> my_files = ['accounts.txt', 'details.csv', 'invite.docx'] >>> for filename in my_files: >>> print(os.path.join('C:\\Users\\asweigart', filename)) C:\Users\asweigart\accounts.txt C:\Users\asweigart\details.csv C:\Users\asweigart\invite.docx

Using pathlib on *nix:

>>> my_files = ['accounts.txt', 'details.csv', 'invite.docx'] >>> home = Path.home() >>> for filename in my_files: >>> print(home / filename) /home/asweigart/accounts.txt /home/asweigart/details.csv /home/asweigart/invite.docx

The Current Working Directory

Using os on Windows:

>>> import os >>> os.getcwd() 'C:\\Python34' >>> os.chdir('C:\\Windows\\System32') >>> os.getcwd() 'C:\\Windows\\System32'

Using pathlib on *nix:

>>> from pathlib import Path >>> from os import chdir >>> print(Path.cwd()) /home/asweigart >>> chdir('/usr/lib/python3.6') >>> print(Path.cwd()) /usr/lib/python3.6

Creating New Folders

Using os on Windows:

>>> import os >>> os.makedirs('C:\\delicious\\walnut\\waffles')

Using pathlib on *nix:

>>> from pathlib import Path >>> cwd = Path.cwd() >>> (cwd / 'delicious' / 'walnut' / 'waffles').mkdir() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python3.6/pathlib.py", line 1226, in mkdir self._accessor.mkdir(self, mode) File "/usr/lib/python3.6/pathlib.py", line 387, in wrapped return strfunc(str(pathobj), *args) FileNotFoundError: [Errno 2] No such file or directory: '/home/asweigart/delicious/walnut/waffles'

Oh no, we got a nasty error! The reason is that the 'delicious' directory does not exist, so we cannot make the 'walnut' and the 'waffles' directories under it. To fix this, do:

>>> from pathlib import Path >>> cwd = Path.cwd() >>> (cwd / 'delicious' / 'walnut' / 'waffles').mkdir(parents=True)

And all is good :)

Absolute vs. Relative Paths

There are two ways to specify a file path.

An absolute path, which always begins with the root folder

A relative path, which is relative to the program's current working directory

There are also the dot (.) and dot-dot (..) folders. These are not real folders but special names that can be used in a path. A single period ("dot") for a folder name is shorthand for "this directory." Two periods ("dot-dot") means "the parent folder."

Handling Absolute and Relative Paths

To see if a path is an absolute path:

Using os.path on *nix:

>>> import os >>> os.path.isabs('/') True >>> os.path.isabs('..') False

Using pathlib on *nix:

>>> from pathlib import Path >>> Path('/').is_absolute() True >>> Path('..').is_absolute() False

You can extract an absolute path with both os.path and pathlib

Using os.path on *nix:

>>> import os >>> os.getcwd() '/home/asweigart' >>> os.path.abspath('..') '/home'

Using pathlib on *nix:

from pathlib import Path print(Path.cwd()) /home/asweigart print(Path('..').resolve()) /home

You can get a relative path from a starting path to another path.

Using os.path on *nix:

>>> import os >>> os.path.relpath('/etc/passwd', '/') 'etc/passwd'

Using pathlib on *nix:

>>> from pathlib import Path >>> print(Path('/etc/passwd').relative_to('/')) etc/passwd

Checking Path Validity

Checking if a file/directory exists:

Using os.path on *nix:

import os >>> os.path.exists('.') True >>> os.path.exists('setup.py') True >>> os.path.exists('/etc') True >>> os.path.exists('nonexistentfile') False

Using pathlib on *nix:

from pathlib import Path >>> Path('.').exists() True >>> Path('setup.py').exists() True >>> Path('/etc').exists() True >>> Path('nonexistentfile').exists() False

Checking if a path is a file:

Using os.path on *nix:

>>> import os >>> os.path.isfile('setup.py') True >>> os.path.isfile('/home') False >>> os.path.isfile('nonexistentfile') False

Using pathlib on *nix:

>>> from pathlib import Path >>> Path('setup.py').is_file() True >>> Path('/home').is_file() False >>> Path('nonexistentfile').is_file() False

Checking if a path is a directory:

Using os.path on *nix:

>>> import os >>> os.path.isdir('/') True >>> os.path.isdir('setup.py') False >>> os.path.isdir('/spam') False

Using pathlib on *nix:

>>> from pathlib import Path >>> Path('/').is_dir() True >>> Path('setup.py').is_dir() False >>> Path('/spam').is_dir() False

Finding File Sizes and Folder Contents

Getting a file's size in bytes:

Using os.path on Windows:

>>> import os >>> os.path.getsize('C:\\Windows\\System32\\calc.exe') 776192

Using pathlib on *nix:

>>> from pathlib import Path >>> stat = Path('/bin/python3.6').stat() >>> print(stat) # stat contains some other information about the file as well os.stat_result(st_mode=33261, st_ino=141087, st_dev=2051, st_nlink=2, st_uid=0, --snip-- st_gid=0, st_size=10024, st_atime=1517725562, st_mtime=1515119809, st_ctime=1517261276) >>> print(stat.st_size) # size in bytes 10024

Listing directory contents using os.listdir on Windows:

>>> import os >>> os.listdir('C:\\Windows\\System32') ['0409', '12520437.cpx', '12520850.cpx', '5U877.ax', 'aaclient.dll', --snip-- 'xwtpdui.dll', 'xwtpw32.dll', 'zh-CN', 'zh-HK', 'zh-TW', 'zipfldr.dll']

Listing directory contents using pathlib on *nix:

>>> from pathlib import Path >>> for f in Path('/usr/bin').iterdir(): >>> print(f) ... /usr/bin/tiff2rgba /usr/bin/iconv /usr/bin/ldd /usr/bin/cache_restore /usr/bin/udiskie /usr/bin/unix2dos /usr/bin/t1reencode /usr/bin/epstopdf /usr/bin/idle3 ...

To find the total size of all the files in this directory:

WARNING: Directories themselves also have a size! So you might want to check for whether a path is a file or directory using the methods in the methods discussed in the above section!

Using os.path.getsize() and os.listdir() together on Windows:

>>> import os >>> total_size = 0 >>> for filename in os.listdir('C:\\Windows\\System32'): total_size = total_size + os.path.getsize(os.path.join('C:\\Windows\\System32', filename)) >>> print(total_size) 1117846456

Using pathlib on *nix:

>>> from pathlib import Path >>> total_size = 0 >>> for sub_path in Path('/usr/bin').iterdir(): ... total_size += sub_path.stat().st_size >>> >>> print(total_size) 1903178911

Copying Files and Folders

The shutil module provides functions for copying files, as well as entire folders.

>>> import shutil, os >>> os.chdir('C:\\') >>> shutil.copy('C:\\spam.txt', 'C:\\delicious') 'C:\\delicious\\spam.txt' >>> shutil.copy('eggs.txt', 'C:\\delicious\\eggs2.txt') 'C:\\delicious\\eggs2.txt'

While shutil.copy() will copy a single file, shutil.copytree() will copy an entire folder and every folder and file contained in it:

>>> import shutil, os >>> os.chdir('C:\\') >>> shutil.copytree('C:\\bacon', 'C:\\bacon_backup') 'C:\\bacon_backup'

Moving and Renaming Files and Folders

>>> import shutil >>> shutil.move('C:\\bacon.txt', 'C:\\eggs') 'C:\\eggs\\bacon.txt'

The destination path can also specify a filename. In the following example, the source file is moved and renamed:

>>> shutil.move('C:\\bacon.txt', 'C:\\eggs\\new_bacon.txt') 'C:\\eggs\\new_bacon.txt'

If there is no eggs folder, then move() will rename bacon.txt to a file named eggs.

>>> shutil.move('C:\\bacon.txt', 'C:\\eggs') 'C:\\eggs'

Permanently Deleting Files and Folders

Calling os.unlink(path) or Path.unlink() will delete the file at path.

Calling os.rmdir(path) or Path.rmdir() will delete the folder at path. This folder must be empty of any files or folders.

Calling shutil.rmtree(path) will remove the folder at path, and all files and folders it contains will also be deleted.

Safe Deletes with the send2trash Module

You can install this module by running pip install send2trash from a Terminal window.

>>> import send2trash >>> with open('bacon.txt', 'a') as bacon_file: # creates the file ... bacon_file.write('Bacon is not a vegetable.') 25 >>> send2trash.send2trash('bacon.txt')

Walking a Directory Tree

>>> import os >>> >>> for folder_name, subfolders, filenames in os.walk('C:\\delicious'): >>> print('The current folder is {}'.format(folder_name)) >>> >>> for subfolder in subfolders: >>> print('SUBFOLDER OF {}: {}'.format(folder_name, subfolder)) >>> for filename in filenames: >>> print('FILE INSIDE {}: {}'.format(folder_name, filename)) >>> >>> print('') The current folder is C:\delicious SUBFOLDER OF C:\delicious: cats SUBFOLDER OF C:\delicious: walnut FILE INSIDE C:\delicious: spam.txt The current folder is C:\delicious\cats FILE INSIDE C:\delicious\cats: catnames.txt FILE INSIDE C:\delicious\cats: zophie.jpg The current folder is C:\delicious\walnut SUBFOLDER OF C:\delicious\walnut: waffles The current folder is C:\delicious\walnut\waffles FILE INSIDE C:\delicious\walnut\waffles: butter.txt

pathlib provides a lot more functionality than the ones listed above, like getting file name, getting file extension, reading/writing a file without manually opening it, etc. Check out the official documentation if you want to know more!

Reading and Writing Files

The File Reading/Writing Process

To read/write to a file in Python, you will want to use the with statement, which will close the file for you after you are done.

Opening and reading files with the open() function

>>> with open('C:\\Users\\your_home_folder\\hello.txt') as hello_file: ... hello_content = hello_file.read() >>> hello_content 'Hello World!' >>> # Alternatively, you can use the *readlines()* method to get a list of string values from the file, one string for each line of text: >>> with open('sonnet29.txt') as sonnet_file: ... sonnet_file.readlines() [When, in disgrace with fortune and men's eyes,\n', ' I all alone beweep my outcast state,\n', And trouble deaf heaven with my bootless cries,\n', And look upon myself and curse my fate,'] >>> # You can also iterate through the file line by line: >>> with open('sonnet29.txt') as sonnet_file: ... for line in sonnet_file: # note the new line character will be included in the line ... print(line, end='') When, in disgrace with fortune and men's eyes, I all alone beweep my outcast state, And trouble deaf heaven with my bootless cries, And look upon myself and curse my fate,

Writing to Files

>>> with open('bacon.txt', 'w') as bacon_file: ... bacon_file.write('Hello world!\n') 13 >>> with open('bacon.txt', 'a') as bacon_file: ... bacon_file.write('Bacon is not a vegetable.') 25 >>> with open('bacon.txt') as bacon_file: ... content = bacon_file.read() >>> print(content) Hello world! Bacon is not a vegetable.

Saving Variables with the shelve Module

To save variables:

>>> import shelve >>> cats = ['Zophie', 'Pooka', 'Simon'] >>> with shelve.open('mydata') as shelf_file: ... shelf_file['cats'] = cats

To open and read variables:

>>> with shelve.open('mydata') as shelf_file: ... print(type(shelf_file)) ... print(shelf_file['cats']) <class 'shelve.DbfilenameShelf'> ['Zophie', 'Pooka', 'Simon']

Just like dictionaries, shelf values have keys() and values() methods that will return list-like values of the keys and values in the shelf. Since these methods return list-like values instead of true lists, you should pass them to the list() function to get them in list form.

>>> with shelve.open('mydata') as shelf_file: ... print(list(shelf_file.keys())) ... print(list(shelf_file.values())) ['cats'] [['Zophie', 'Pooka', 'Simon']]

Saving Variables with the pprint.pformat() Function

>>> import pprint >>> cats = [{'name': 'Zophie', 'desc': 'chubby'}, {'name': 'Pooka', 'desc': 'fluffy'}] >>> pprint.pformat(cats) "[{'desc': 'chubby', 'name': 'Zophie'}, {'desc': 'fluffy', 'name': 'Pooka'}]" >>> with open('myCats.py', 'w') as file_obj: ... file_obj.write('cats = {}\n'.format(pprint.pformat(cats))) 83

Reading ZIP Files

>>> import zipfile, os >>> os.chdir('C:\\') # move to the folder with example.zip >>> with zipfile.ZipFile('example.zip') as example_zip: ... print(example_zip.namelist()) ... spam_info = example_zip.getinfo('spam.txt') ... print(spam_info.file_size) ... print(spam_info.compress_size) ... print('Compressed file is %sx smaller!' % (round(spam_info.file_size / spam_info.compress_size, 2))) ['spam.txt', 'cats/', 'cats/catnames.txt', 'cats/zophie.jpg'] 13908 3828 'Compressed file is 3.63x smaller!'

Extracting from ZIP Files

The extractall() method for ZipFile objects extracts all the files and folders from a ZIP file into the current working directory.

>>> import zipfile, os >>> os.chdir('C:\\') # move to the folder with example.zip >>> with zipfile.ZipFile('example.zip') as example_zip: ... example_zip.extractall()

The extract() method for ZipFile objects will extract a single file from the ZIP file. Continue the interactive shell example:

>>> with zipfile.ZipFile('example.zip') as example_zip: ... print(example_zip.extract('spam.txt')) ... print(example_zip.extract('spam.txt', 'C:\\some\\new\\folders')) 'C:\\spam.txt' 'C:\\some\\new\\folders\\spam.txt'

Creating and Adding to ZIP Files

>>> import zipfile >>> with zipfile.ZipFile('new.zip', 'w') as new_zip: ... new_zip.write('spam.txt', compress_type=zipfile.ZIP_DEFLATED)

This code will create a new ZIP file named new.zip that has the compressed contents of spam.txt.

JSON, YAML and configuration files

JSON

Open a JSON file with:

import json with open("filename.json", "r") as f: content = json.loads(f.read())

Write a JSON file with:

import json content = {"name": "Joe", "age": 20} with open("filename.json", "w") as f: f.write(json.dumps(content, indent=2))

YAML

Compared to JSON, YAML allows for much better human maintainability and gives you the option to add comments. It is a convenient choice for configuration files where humans will have to edit it.

There are two main libraries allowing to access to YAML files:

Install them using pip install in your virtual environment.

The first one it easier to use but the second one, Ruamel, implements much better the YAML specification, and allow for example to modify a YAML content without altering comments.

Open a YAML file with:

from ruamel.yaml import YAML with open("filename.yaml") as f: yaml=YAML() yaml.load(f)

Anyconfig

Anyconfig is a very handy package allowing to abstract completely the underlying configuration file format. It allows to load a Python dictionary from JSON, YAML, TOML, and so on.

Install it with:

pip install anyconfig

Usage:

import anyconfig conf1 = anyconfig.load("/path/to/foo/conf.d/a.yml")

Debugging

Raising Exceptions

Exceptions are raised with a raise statement. In code, a raise statement consists of the following:

The raise keyword

A call to the Exception() function

A string with a helpful error message passed to the Exception() function

>>> raise Exception('This is the error message.') Traceback (most recent call last): File "<pyshell#191>", line 1, in <module> raise Exception('This is the error message.') Exception: This is the error message.

Often it's the code that calls the function, not the function itself, that knows how to handle an exception. So you will commonly see a raise statement inside a function and the try and except statements in the code calling the function.

def box_print(symbol, width, height): if len(symbol) != 1: raise Exception('Symbol must be a single character string.') if width <= 2: raise Exception('Width must be greater than 2.') if height <= 2: raise Exception('Height must be greater than 2.') print(symbol * width) for i in range(height - 2): print(symbol + (' ' * (width - 2)) + symbol) print(symbol * width) for sym, w, h in (('*', 4, 4), ('O', 20, 5), ('x', 1, 3), ('ZZ', 3, 3)): try: box_print(sym, w, h) except Exception as err: print('An exception happened: ' + str(err))

Getting the Traceback as a String

The traceback is displayed by Python whenever a raised exception goes unhandled. But can also obtain it as a string by calling traceback.format_exc(). This function is useful if you want the information from an exception's traceback but also want an except statement to gracefully handle the exception. You will need to import Python's traceback module before calling this function.

>>> import traceback >>> try: >>> raise Exception('This is the error message.') >>> except: >>> with open('errorInfo.txt', 'w') as error_file: >>> error_file.write(traceback.format_exc()) >>> print('The traceback info was written to errorInfo.txt.') 116 The traceback info was written to errorInfo.txt.

The 116 is the return value from the write() method, since 116 characters were written to the file. The traceback text was written to errorInfo.txt.

Traceback (most recent call last): File "<pyshell#28>", line 2, in <module> Exception: This is the error message.

Assertions

An assertion is a sanity check to make sure your code isn't doing something obviously wrong. These sanity checks are performed by assert statements. If the sanity check fails, then an AssertionError exception is raised. In code, an assert statement consists of the following:

The assert keyword

A condition (that is, an expression that evaluates to True or False)

A comma

A string to display when the condition is False

>>> pod_bay_door_status = 'open' >>> assert pod_bay_door_status == 'open', 'The pod bay doors need to be "open".' >>> pod_bay_door_status = 'I\'m sorry, Dave. I\'m afraid I can\'t do that.' >>> assert pod_bay_door_status == 'open', 'The pod bay doors need to be "open".' Traceback (most recent call last): File "<pyshell#10>", line 1, in <module> assert pod_bay_door_status == 'open', 'The pod bay doors need to be "open".' AssertionError: The pod bay doors need to be "open".

In plain English, an assert statement says, "I assert that this condition holds true, and if not, there is a bug somewhere in the program." Unlike exceptions, your code should not handle assert statements with try and except; if an assert fails, your program should crash. By failing fast like this, you shorten the time between the original cause of the bug and when you first notice the bug. This will reduce the amount of code you will have to check before finding the code that's causing the bug.

Disabling Assertions

Assertions can be disabled by passing the -O option when running Python.

Logging

To enable the logging module to display log messages on your screen as your program runs, copy the following to the top of your program (but under the #! python shebang line):

import logging logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s- %(message)s')

Say you wrote a function to calculate the factorial of a number. In mathematics, factorial 4 is 1 × 2 × 3 × 4, or 24. Factorial 7 is 1 × 2 × 3 × 4 × 5 × 6 × 7, or 5,040. Open a new file editor window and enter the following code. It has a bug in it, but you will also enter several log messages to help yourself figure out what is going wrong. Save the program as factorialLog.py.

>>> import logging >>> >>> logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s- %(message)s') >>> >>> logging.debug('Start of program') >>> >>> def factorial(n): >>> >>> logging.debug('Start of factorial(%s)' % (n)) >>> total = 1 >>> >>> for i in range(1, n + 1): >>> total *= i >>> logging.debug('i is ' + str(i) + ', total is ' + str(total)) >>> >>> logging.debug('End of factorial(%s)' % (n)) >>> >>> return total >>> >>> print(factorial(5)) >>> logging.debug('End of program') 2015-05-23 16:20:12,664 - DEBUG - Start of program 2015-05-23 16:20:12,664 - DEBUG - Start of factorial(5) 2015-05-23 16:20:12,665 - DEBUG - i is 0, total is 0 2015-05-23 16:20:12,668 - DEBUG - i is 1, total is 0 2015-05-23 16:20:12,670 - DEBUG - i is 2, total is 0 2015-05-23 16:20:12,673 - DEBUG - i is 3, total is 0 2015-05-23 16:20:12,675 - DEBUG - i is 4, total is 0 2015-05-23 16:20:12,678 - DEBUG - i is 5, total is 0 2015-05-23 16:20:12,680 - DEBUG - End of factorial(5) 0 2015-05-23 16:20:12,684 - DEBUG - End of program

Logging Levels

Logging levels provide a way to categorize your log messages by importance. There are five logging levels, described in Table 10-1 from least to most important. Messages can be logged at each level using a different logging function.

Disabling Logging

After you've debugged your program, you probably don't want all these log messages cluttering the screen. The logging.disable() function disables these so that you don't have to go into your program and remove all the logging calls by hand.

>>> import logging >>> logging.basicConfig(level=logging.INFO, format=' %(asctime)s -%(levelname)s - %(message)s') >>> logging.critical('Critical error! Critical error!') 2015-05-22 11:10:48,054 - CRITICAL - Critical error! Critical error! >>> logging.disable(logging.CRITICAL) >>> logging.critical('Critical error! Critical error!') >>> logging.error('Error! Error!')

Logging to a File

Instead of displaying the log messages to the screen, you can write them to a text file. The logging.basicConfig() function takes a filename keyword argument, like so:

import logging logging.basicConfig(filename='myProgramLog.txt', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

Lambda Functions

This function:

>>> def add(x, y): return x + y >>> add(5, 3) 8

Is equivalent to the lambda function:

>>> add = lambda x, y: x + y >>> add(5, 3) 8

It's not even need to bind it to a name like add before:

>>> (lambda x, y: x + y)(5, 3) 8

Like regular nested functions, lambdas also work as lexical closures:

>>> def make_adder(n): return lambda x: x + n >>> plus_3 = make_adder(3) >>> plus_5 = make_adder(5) >>> plus_3(4) 7 >>> plus_5(4) 9

Note: lambda can only evaluate an expression, like a single line of code.

Ternary Conditional Operator

Many programming languages have a ternary operator, which define a conditional expression. The most common usage is to make a terse simple conditional assignment statement. In other words, it offers one-line code to evaluate the first expression if the condition is true, otherwise it evaluates the second expression.

Example:

>>> age = 15 >>> print('kid' if age < 18 else 'adult') kid

Ternary operators can be chained:

>>> age = 15 >>> print('kid' if age < 13 else 'teenager' if age < 18 else 'adult') teenager

The code above is equivalent to:

if age < 18: if age < 13: print('kid') else: print('teenager') else: print('adult')

args and kwargs

The names args and kwargs are arbitrary - the important thing are the * and ** operators. They can mean:

1. In a function declaration, * means "pack all remaining positional arguments into a tuple named <name>", while ** is the same for keyword arguments (except it uses a dictionary, not a tuple).

2. In a function call, * means "unpack tuple or list named <name> to positional arguments at this position", while ** is the same for keyword arguments.

For example you can make a function that you can use to call any other function, no matter what parameters it has:

def forward(f, *args, **kwargs): return f(*args, **kwargs)

Inside forward, args is a tuple (of all positional arguments except the first one, because we specified it - the f), kwargs is a dict. Then we call f and unpack them so they become normal arguments to f.

You use *args when you have an indefinite amount of positional arguments.

>>> def fruits(*args): >>> for fruit in args: >>> print(fruit) >>> fruits("apples", "bananas", "grapes") "apples" "bananas" "grapes"

Similarly, you use **kwargs when you have an indefinite number of keyword arguments.

>>> def fruit(**kwargs): >>> for key, value in kwargs.items(): >>> print("{0}: {1}".format(key, value)) >>> fruit(name = "apple", color = "red") name: apple color: red

>>> def show(arg1, arg2, *args, kwarg1=None, kwarg2=None, **kwargs): >>> print(arg1) >>> print(arg2) >>> print(args) >>> print(kwarg1) >>> print(kwarg2) >>> print(kwargs) >>> data1 = [1,2,3] >>> data2 = [4,5,6] >>> data3 = {'a':7,'b':8,'c':9} >>> show(*data1,*data2, kwarg1="python",kwarg2="cheatsheet",**data3) 1 2 (3, 4, 5, 6) python cheatsheet {'a': 7, 'b': 8, 'c': 9} >>> show(*data1, *data2, **data3) 1 2 (3, 4, 5, 6) None None {'a': 7, 'b': 8, 'c': 9} # If you do not specify ** for kwargs >>> show(*data1, *data2, *data3) 1 2 (3, 4, 5, 6, "a", "b", "c") None None {}

Things to Remember(args)

1. Functions can accept a variable number of positional arguments by using *args in the def statement.

2. You can use the items from a sequence as the positional arguments for a function with the * operator.

3. Using the * operator with a generator may cause your program to run out of memory and crash.

4. Adding new positional parameters to functions that accept *args can introduce hard-to-find bugs.

Things to Remember(kwargs)

1. Function arguments can be specified by position or by keyword.

2. Keywords make it clear what the purpose of each argument is when it would be confusing with only positional arguments.

3. Keyword arguments with default values make it easy to add new behaviors to a function, especially when the function has existing callers.

4. Optional keyword arguments should always be passed by keyword instead of by position.

Context Manager

While Python's context managers are widely used, few understand the purpose behind their use. These statements, commonly used with reading and writing files, assist the application in conserving system memory and improve resource management by ensuring specific resources are only in use for certain processes.

with statement

A context manager is an object that is notified when a context (a block of code) starts and ends. You commonly use one with the with statement. It takes care of the notifying.

For example, file objects are context managers. When a context ends, the file object is closed automatically:

>>> with open(filename) as f: >>> file_contents = f.read() # the open_file object has automatically been closed.

Anything that ends execution of the block causes the context manager's exit method to be called. This includes exceptions, and can be useful when an error causes you to prematurely exit from an open file or connection. Exiting a script without properly closing files/connections is a bad idea, that may cause data loss or other problems. By using a context manager you can ensure that precautions are always taken to prevent damage or loss in this way.

Writing your own contextmanager using generator syntax

It is also possible to write a context manager using generator syntax thanks to the contextlib.contextmanager decorator:

>>> import contextlib >>> @contextlib.contextmanager ... def context_manager(num): ... print('Enter') ... yield num + 1 ... print('Exit') >>> with context_manager(2) as cm: ... # the following instructions are run when the 'yield' point of the context ... # manager is reached. ... # 'cm' will have the value that was yielded ... print('Right in the middle with cm = {}'.format(cm)) Enter Right in the middle with cm = 3 Exit >>>

__main__ Top-level script environment

__main__ is the name of the scope in which top-level code executes. A module's name is set equal to __main__ when read from standard input, a script, or from an interactive prompt.

A module can discover whether or not it is running in the main scope by checking its own __name__, which allows a common idiom for conditionally executing code in a module when it is run as a script or with python -m but not when it is imported:

>>> if __name__ == "__main__": ... # execute only if run as a script ... main()

For a package, the same effect can be achieved by including a main.py module, the contents of which will be executed when the module is run with -m

For example we are developing script which is designed to be used as module, we should do:

>>> # Python program to execute function directly >>> def add(a, b): ... return a+b ... >>> add(10, 20) # we can test it by calling the function save it as calculate.py 30 >>> # Now if we want to use that module by importing we have to comment out our call, >>> # Instead we can write like this in calculate.py >>> if __name__ == "__main__": ... add(3, 5) ... >>> import calculate >>> calculate.add(3, 5) 8

Advantages

1. Every Python module has it's __name__ defined and if this is __main__, it implies that the module is being run standalone by the user and we can do corresponding appropriate actions.

2. If you import this script as a module in another script, the name is set to the name of the script/module.

3. Python files can act as either reusable modules, or as standalone programs.

4. if __name__ == "main": is used to execute some code only if the file was run directly, and not imported.

setup.py

The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the setup script is to describe your module distribution to the Distutils, so that the various commands that operate on your modules do the right thing.

The setup.py file is at the heart of a Python project. It describes all of the metadata about your project. There a quite a few fields you can add to a project to give it a rich set of metadata describing the project. However, there are only three required fields: name, version, and packages. The name field must be unique if you wish to publish your package on the Python Package Index (PyPI). The version field keeps track of different releases of the project. The packages field describes where you've put the Python source code within your project.

This allows you to easily install Python packages. Often it's enough to write:

python setup.py install

and module will install itself.

Our initial setup.py will also include information about the license and will re-use the README.txt file for the long_description field. This will look like:

>>> from distutils.core import setup >>> setup( ... name='pythonCheatsheet', ... version='0.1', ... packages=['pipenv',], ... license='MIT', ... long_description=open('README.txt').read(), ... )

Find more information visit http://docs.python.org/install/index.html.

Dataclasses

Dataclasses are python classes but are suited for storing data objects. This module provides a decorator and functions for automatically adding generated special methods such as__init__() and __repr__() to user-defined classes.

Features

1. They store data and represent a certain data type. Ex: A number. For people familiar with ORMs, a model instance is a data object. It represents a specific kind of entity. It holds attributes that define or represent the entity.

2. They can be compared to other objects of the same type. Ex: A number can be greater than, less than, or equal to another number.

Python 3.7 provides a decorator dataclass that is used to convert a class into a dataclass.

python 2.7

>>> class Number: ... def __init__(self, val): ... self.val = val ... >>> obj = Number(2) >>> obj.val 2

with dataclass

>>> @dataclass ... class Number: ... val: int ... >>> obj = Number(2) >>> obj.val 2

Default values

It is easy to add default values to the fields of your data class.

>>> @dataclass ... class Product: ... name: str ... count: int = 0 ... price: float = 0.0 ... >>> obj = Product("Python") >>> obj.name Python >>> obj.count 0 >>> obj.price 0.0

Type hints

It is mandatory to define the data type in dataclass. However, If you don't want specify the datatype then, use typing.Any.

>>> from dataclasses import dataclass >>> from typing import Any >>> @dataclass ... class WithoutExplicitTypes: ... name: Any ... value: Any = 42 ...

Virtual Environment

The use of a Virtual Environment is to test python code in encapsulated environments and to also avoid filling the base Python installation with libraries we might use for only one project.

virtualenv

Usage:

1. Make a Virtual Environment

mkvirtualenv HelloWold

Anything we install now will be specific to this project. And available to the projects we connect to this environment.

2. Set Project Directory

To bind our virtualenv with our current working directory we simply enter:

setprojectdir .

3. Deactivate

To move onto something else in the command line type 'deactivate' to deactivate your environment.

deactivate

Notice how the parenthesis disappear.

4. Workon

Open up the command prompt and type 'workon HelloWold' to activate the environment and move into your root project folder

workon HelloWold

poetry

Poetry is a tool for dependency management and packaging in Python. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

1. Create a new project

poetry new my-project

This will create a my-project directory:

my-project ├── pyproject.toml ├── README.rst ├── poetry_demo │ └── __init__.py └── tests ├── __init__.py └── test_poetry_demo.py

The pyproject.toml file will orchestrate your project and its dependencies:

[tool.poetry] name = "my-project" version = "0.1.0" description = "" authors = ["your name <your@mail.com>"] [tool.poetry.dependencies] python = "*" [tool.poetry.dev-dependencies] pytest = "^3.4"

2. Packages

To add dependencies to your project, you can specify them in the tool.poetry.dependencies section:

[tool.poetry.dependencies] pendulum = "^1.4"

Also, instead of modifying the pyproject.toml file by hand, you can use the add command and it will automatically find a suitable version constraint.

$ poetry add pendulum

To install the dependencies listed in the pyproject.toml:

poetry install

To remove dependencies:

poetry remove pendulum

For more information, check the documentation.

pipenv

Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world. Windows is a first-class citizen, in our world.

Enter your Project directory and install the Packages for your project

cd my_project pipenv install <package>

Pipenv will install your package and create a Pipfile for you in your project's directory. The Pipfile is used to track which dependencies your project needs in case you need to re-install them.

Find more information and a video in docs.pipenv.org.

anaconda

Anaconda is another popular tool to manage python packages.

Where packages, notebooks, projects and environments are shared. Your place for free public conda package hosting.

Usage:

To use the Virtual Environment, activate it by:

conda activate HelloWorld

Anything installed now will be specific to the project HelloWorld

# data[].attributes.attachment_link.description
Anyone can forget how to make character classes for a regex, slice a list or do a for loop. This cheat sheet tries to provide a basic reference for beginner and advanced developers, lower the entry barrier for newcomers and help veterans refresh the old tricks.

# data[].attributes.body
programming-for-kids/book.md at master · jackdoe/programming-for-kids (github.com)

# data[].attributes.attachment_link.description
book for parents and kids. Contribute to jackdoe/programming-for-kids development by creating an account on GitHub.

# data[].attributes.body
4917 (punkx.org)

# data[].attributes.attachment_link.description
card game for teaching kids how to read and write machine code, using a simple 4 bit computer with very simple instruction set, 2 general purpose registers and only 16 cells of addressable memory. Just to manage your expectations, those are basically 54 tiny programs that I spent 2

# data[].attributes.attachment_link.description
append Autokorrelation Bedingte Berechnungen Build-In Klassen concat conditional-expression DataFrame Data Science Datenmanagement Dictionary General-Purpose Grunddatentypen Gründe für Python html-Widgets Immutable Objects Import javascript join Kontrollstrukturen list-comprehensions Logische Operatoren merge Module importieren Multiparadigmatisch Mutable Objects Namespace np.where numpy Open-Source Pandas PEP-8 Programmieren Programmierung Python R Random Walk Saisonalität Scrum shiny Stationarität Timestamp Zeitreiehenanalyse Zeitreihenanalyse __main__ __name__

# data[].attributes.body
Und ein zugehöriges Buch: Book (edudesk.de)

# data[].attributes.body
https://lightbot.lu/

# data[].attributes.attachment_link.description
Code with Mu: a simple Python editor for beginner programmers.

# data[].attributes.body
Englisch

# data[].attributes.attachment_link.title
Python Examples – Learn Python Programming - Python Examples

# data[].attributes.attachment_link.description
Python Examples covers Python Basics, String Operations, List Operations, Dictionaries, Files, Image Processing, Data Analytics and popular Python Modules.

# data[].attributes.attachment_link.readable_text
Get unlimited access

Open in app

Home

Notifications

Lists

Stories

Write

Aman Kharwal

Jun 11, 2021

4 min read

185 Python Projects with Source Code: solved and explained for free

Python is one of the best programming languages. Due to its readability and beginner-friendly nature, it has been accepted by industries around the world. So to master Python for any field you have to work on projects. In this article, I will take you through more than 180+ Python projects with source code.

Python Projects with Source Code

Python Projects For Beginners:

1. Group Anagrams using Python

2. Calculate Mean, Median, and Mode using Python

3. Calculate Execution Time of a Python Program

4. Rock Paper Scissors Game using Python

5. Print Emojis using Python

6. Correct Spellings using Python

7. Scraping Github Profile using Python

8. Visualize Linear Relationships using Python

9. Generate Text using Python

10. Scrape Table From a Website using Python

11. Extract Text From PDF using Python

12. Reversing a String using Python

13. Match Sequences using Python

14. QR Code using Python

15. Decode a QR Code using Python

16. Creating Dummy Data using Python

17. Remove Cuss Words using Python

18. Find Duplicate Values using Python

19. Detect Questions using Python

20. Voice Recorder using Python

21. Reading and Writing CSV Files using Python

22. Box Plot using Python

23. Send Instagram Messages using Python

24. Age Calculator using Python

25. LCM using Python

26. Price Elasticity of Demand using Python

27. Find the Most Frequent Words in a File

28. Find the Number of Capital Letters in a File

29. Index of Maximum Value in a Python List

30. Index of Minimum Value in a Python List

31. Voice Recorder using Python

32. Send Instagram Messages using Python

33. Animated Scatter Plot

34. Create Font Art using Python

35. Collage Maker with Python

36. Get Phone Number Details using Python

37. Display a Calendar using Python

38. Internet Speed Test using Python

39. Text to Handwriting with Python

40. Shutdown Computer using Python

41. Send Automatic Emails using Python

42. Defang IP Address

43. Password Authentication using Python

44. Web Scraping to create a dataset

45. Resume Scanner

46. Merge Sort Algorithm

47. Pick a Random card using Python

48. Quartile Deviation using Python

49. Count Character Occurrences

50. Pyramid Pattern using Python

51. Sequential Search

52. Swap Variables using Python

53. Sorting NumPy Arrays

54. Validate Anagrams

55. Create Tables with Python

56. Recursive Binary Search

57. Backward For Loop

58. Dijkstra’s Algorithm using Python

59. Hash Tables using Python

60. Queues using Python

61. Validate a Binary Search Tree

62. Stacks using Python

63. Check Palindrome Words

64. Breadth-First Search Algorithm

65. Plot Annotations

66. Real-Time Currency Converter

67. FizzBuzz Algorithm

68. Extract Keywords with Python

69. Read Data From Google Sheets with Python

70. Invoice Generator with Python

71. Text-Based Adventure Game

72. Mad Libs Game with Python

73. Create Acronyms using Python

74. Alarm Clock with Python

75. Email Slicer with Python

76. Story Generator with Python

77. Generate Password with Python

78. Play Rock, Paper, and Scissors with Python

79. Dice Roll Simulator

80. QR Code Generator

81. Animal Quiz Game

82. Print Coloured Text

83. BMI Calculator

84. Fahrenheit to Celcius Converter

85. Taking Multiple User Inputs

86. Convert Roman Numbers to Decimals

87. Pearson Correlation

88. Treemap using Python

89. Convert Image to an array

90. Scrape IMDb with Python

91. Python Projects for Resume

92. Python Project Ideas for Final Year

Advance Python Projects:

1. Time Series Graph using Python

2. Get Stock Price Data using Python

3. Candlestick Chart using Python

4. Word Cloud From a Pandas DataFrame

5. LeNet-5 Architecture using Python

6. End-to-end Encryption using Python

7. Get Live Covid-19 Data using Python

8. Violin Plot using Python

9. Sunburst Plot with Python

10. Calculation of Accuracy using Python

11. Visualize a Neural Network using Python

12. Bias and Variance using Python

13. Get Live Weather Updates using Python

14. Count Objects in Image using Python

15. Scrape Trending News using Python

16. Real-time Stock Price Data Visualization using Python

17. OTP Verification using Python

18. Data Visualization on a map

19. Choropleth Map with Python

20. Egg catcher game

21. Extract Country Details

22. Convert Text to Numerical data

23. AUC and ROC using Python

24. Interactive Language Translator

25. Maximum Profit Finder

26. Language Detection

27. Histogram and Density Plots with Python

28. Radar Plot with Python

29. Create a Chatbot with Python

30. Stopwords Removal

31. Unicode Characters Removal

32. Grammar Correction with Python

33. Caterpillar Game with Python

34. Maze Solver

35. Encrypt and Decrypt Messages with Python

36. Screen Pet Game with Python

37. Robot Builder with Python

38. Generate Word Clouds

39. Bitcoin Mining

40. Password Picker

41. Typing Test Game GUI

42. Contact Book with Python

43. Hangman Game with Python

44. URL Shortner with Python

45. Digital Clock GUI

46. Get Desktop Notifications with Python

47. Use Your Phone Camera for Computer Vision

48. Music Player GUI

49. Game of Life with Python

50. Extract Text from videos

51. Fidget Spinner Game

52. Spelling Correction with Python

53. Create Amazing Graphics with Python

54. Monty Hall Simulator

55. Video to Audio Converter

56. Tic Tac Toe GUI

57. Calculator GUI

58. Number Guessing Game

59. Image Converter GUI

60. Weight Converter GUI

61. Visualize a Chess Board with Python

62. Age and Gender Detection

63. Bar Code and QR Code Reader

64. Create Audiobook with Python

65. Face Detection

66. Extract Text from PDF

67. Card Game using DS and Algo

68. Web Scrapper with Python

69. Create a Pencil Sketch using Python

70. Text Editor GUI

71. Instagram Filters with Python

72. Count Number of Rainy days in a year

73. Send Emails with Python

74. Image Segmentation

75. Quick Sort Algorithm

76. Deploy a Chatbot

77. Create a Telegram Bot

78. Scraping Twitter without API

79. Text to Speech Converter

80. Keyword Research with Python

81. Next Word Prediction

82. Scrape Wikipedia

83. Lives Game

84. Web Scraping to create a CSV

85. Scrape Instagram

86. Image Filtering

87. Audio Processing

88. Analog Clock with Python

89. Create a Simple Chatbot

90. Clock APP with Python

91. 3D Graphs

92. Calendar GUI

93. Get Real-time weather with Python

So these were some of the best Python projects with source code that you should try.

--

More from Aman Kharwal

I write stories behind the data📈 | https://www.instagram.com/the.clever.programmer/

Love podcasts or audiobooks? Learn on the go with our new app.

Try Knowable

Recommended from Medium

Ruining (Ray) Li

Fundamental of Computer Graphics

Rustem Feyzkhanov

ML infrastructure @ AWS Summit 2021

Aman Kharwal

in

Coders Camp

96 Python Projects with Source Code

Miguel N. Galace

How a one-line fix halved the load time of our new KYC Form

Sitaraman Lakshminarayanan

Has Authorization evolved in 20 years?

Anton Chernysh

in

DevOops World … and the Universe

Migrating WordPress site from GoDaddy managed WP hosting to DigitalOcean droplet.

Gajendran Mohan

Basics of Kubernetes

Platingnum

Top Cloud Computing Trends In 2021

About Help Terms Privacy

Get the Medium app

Aman Kharwal

I write stories behind the data📈 | https://www.instagram.com/the.clever.programmer/

More from Medium

Bhavya Rajdev

My first full stack data science project (Part 5)…

Aviral Bhardwaj

Top 7 beginner projects in Machine Learning

Haq Nawaz

in

Dev Genius

Develop a Logistic Regression Machine Learning Model

Tirendaz Academy

in

Level Up Coding

Introduction to Machine Learning for Beginners

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable

# data[].attributes.attachment_link.description
Python is one of the best programming languages. Due to its readability and beginner-friendly nature, it has been accepted by industries around the world. So to master Python for any field you have...

# data[].attributes.attachment_link.title
Turtle Programming in Python - GeeksforGeeks

# data[].attributes.attachment_link.description
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

# data[].attributes.attachment_link.title
How to: Play games in your Christmas tree

# data[].attributes.attachment_link.description
Coding Exercises with solutions for Python developers. Practice 220+ Python Topic-specific exercises. Solve Python challenges, assignments, programs.

# data[].attributes.body
inkl. Java Script Code

# data[].attributes.attachment_link.description
Bubble sort, sometimes referred to as sinking sort, is a simple sorting algorithm that repeatedly steps through the list to be sorted, compares each pair of adjacent items and swaps them if they are in the wrong order (ascending or descending arrangement).

# data[].attributes.attachment_link.readable_text
visualising data structures and algorithms through animation

Featured story: Visualizing Algorithms with a Click

VisuAlgo project is funded by Optiver for 2023-2024. We now open VisuAlgo account registration to every Computer Science students/teachers worldwide and have started various upgrading (sub)-projects.

VisuAlgo is a trilingual site. Try visiting the other versions of VisuAlgo other than the default English version, e.g., or Indonesian. Users can see the translation statistics for these three pages. We aim to make all three has near 100% translation rate. Unfortunately the translation progress with other languages are too far behind and they are thus redirected to English.

In VisuAlgo, you can use your own input for any algorithm instead of using only the provided sample inputs. This is one of the key feature of VisuAlgo. Try the graph drawing feature in these 9 graph-related visualizations: , , , , , , , Steiner Tree, and . You can also click tag 'graph' in any of these 9 graph-related visualization boxes or type in 'graph' in the search box.

Here are some of the newer visualization features: ability to show two visualization scales (1.0x and 0.5x), the zoom-out scale is used to show operations of a slightly bigger test cases, (the linked list are no longer automatically re-layout for most cases to strengthen the O(1) impression of almost all Linked List operations).

Breaking news [Fri, 09 Jun 23]: VisuAlgo project is funded by starting today. We now open VisuAlgo account registration to every Computer Science students/teachers worldwide. Go to the and follow the on-screen instructions to create a new VisuAlgo account (no longer restricted to 'nus.edu'-related emails).

To compare 2 related algorithms, e.g., Kruskal's vs Prim's on the same graph, or 2 related operations of the same data structure, e.g., visualizing Binary (Max) Heap as a Binary Tree or as a Compact Array, open 2 VisuAlgo pages in 2 windows and juxtapose them. Click to see the screenshot. This juxtaposition technique can be used anytime you want to compare two similar data structures or algorithms.

You can visualize the recursion tree (or DAG, if there are overlapping subproblems and Dynamic Programming (DP) is applicable) of ANY valid recursive function that can be written in JavaScript. Click to see the screenshot. Obviously do not try visualizing recursion with a gigantic recursion tree as doing so will crash your own web browser/computer.

VisuAlgo loads fast for first time visitors (we use Cloudflare global CDN), but it loads 'almost instantly' for returning visitors as we also cache lots of static content of VisuAlgo :). So, do not use incognito or private browsing mode to keep the cache. Moreover, for NUS students with VisuAlgo accounts, we will load VisuAlgo according to your preferences/class setup after you .

Each visualization page has an 'e-Lecture Mode' that is accessible from that page's top right corner. This mode is automatically shown to first time (or non logged-in) visitors to showcase the data structure or algorithm being visualized. The quality of e-Lecture mode for many visualization pages have reached the lecture standard of algorithm classes in National University of Singapore :).

Please check the newest features of VisuAlgo: 1). User accounts system for NUS students and verified CS lecturers worldwide (and also read the latest Privacy Policy popup at the bottom right corner), 2). More mobile-friendly setup, 3). More polished e-Lecture notes to reach "NUS standard", and 4). Trilingual capability (/en, /zh, or /id).

VisuAlgo has two main components: The 24 visualization pages and their associated Online Quiz component (more questions are currently being added into the question bank). We do not script any of the questions in Online Quiz :O and all answers will be graded almost instantly :). You can this online quiz system by clicking the 'Training' button on the visualization module.

Reload screen or rotate device for a pathway suiting your device orientation

About

Initially conceived in 2011 by Associate Professor Steven Halim, VisuAlgo aimed to facilitate a deeper understanding of data structures and algorithms for his students by providing a self-paced, interactive learning platform.

Featuring numerous advanced algorithms discussed in Dr. Steven Halim's book, 'Competitive Programming' - co-authored with Dr. Felix Halim and Dr. Suhendry Effendy - VisuAlgo remains the exclusive platform for visualizing and animating several of these complex algorithms even after a decade.

While primarily designed for National University of Singapore (NUS) students enrolled in various data structure and algorithm courses (e.g., CS1010/equivalent, CS2040/equivalent (including IT5003), CS3230, CS3233, and CS4234), VisuAlgo also serves as a valuable resource for inquisitive minds worldwide, promoting online learning.

Initially, VisuAlgo was not designed for small touch screens like smartphones, as intricate algorithm visualizations required substantial pixel space and click-and-drag interactions. For an optimal user experience, a minimum screen resolution of 1366x768 is recommended. However, since April 2022, a mobile (lite) version of VisuAlgo has been made available, making it possible to use a subset of VisuAlgo features on smartphone screens.

VisuAlgo remains a work in progress, with the ongoing development of more complex visualizations. At present, the platform features 24 visualization modules.

Equipped with a built-in question generator and answer verifier, VisuAlgo's "online quiz system" enables students to test their knowledge of basic data structures and algorithms. Questions are randomly generated based on specific rules, and students' answers are automatically graded upon submission to our grading server. As more CS instructors adopt this online quiz system worldwide, it could effectively eliminate manual basic data structure and algorithm questions from standard Computer Science exams in many universities. By assigning a small (but non-zero) weight to passing the online quiz, CS instructors can significantly enhance their students' mastery of these basic concepts, as they have access to an almost unlimited number of practice questions that can be instantly verified before taking the online quiz. Each VisuAlgo visualization module now includes its own online quiz component.

VisuAlgo has been translated into three primary languages: English, Chinese, and Indonesian. Additionally, we have authored public notes about VisuAlgo in various languages, including Indonesian, Korean, Vietnamese, and Thai:

Team

Project Leader & Advisor (Jul 2011-present)
Associate Professor Steven Halim, School of Computing (SoC), National University of Singapore (NUS)
Dr Felix Halim, Senior Software Engineer, Google (Mountain View)

Undergraduate Student Researchers 1
CDTL TEG 1: Jul 2011-Apr 2012: Koh Zi Chun, Victor Loh Bo Huai

Final Year Project/UROP students 1
Jul 2012-Dec 2013: Phan Thi Quynh Trang, Peter Phandi, Albert Millardo Tjindradinata, Nguyen Hoang Duy
Jun 2013-Apr 2014 Rose Marie Tan Zhao Yun, Ivan Reinaldo

Undergraduate Student Researchers 2
CDTL TEG 2: May 2014-Jul 2014: Jonathan Irvin Gunawan, Nathan Azaria, Ian Leow Tze Wei, Nguyen Viet Dung, Nguyen Khac Tung, Steven Kester Yuwono, Cao Shengze, Mohan Jishnu

Final Year Project/UROP students 2
Jun 2014-Apr 2015: Erin Teo Yi Ling, Wang Zi
Jun 2016-Dec 2017: Truong Ngoc Khanh, John Kevin Tjahjadi, Gabriella Michelle, Muhammad Rais Fathin Mudzakir
Aug 2021-Apr 2023: Liu Guangyuan, Manas Vegi, Sha Long, Vuong Hoang Long, Ting Xiao, Lim Dewen Aloysius

Undergraduate Student Researchers 3
Optiver: Aug 2023-Oct 2023: Bui Hong Duc, Oleh Naver, Tay Ngan Lin

Final Year Project/UROP students 3
Aug 2023-Apr 2024: Xiong Jingya, Radian Krisno, Ng Wee Han

List of translators who have contributed ≥ 100 translations can be found at statistics page.

Acknowledgements
NUS gave Teaching Enhancement Grant to kickstart this project.

Terms of use

VisuAlgo is generously offered at no cost to the global Computer Science community. If you appreciate VisuAlgo, we kindly request that you spread the word about its existence to fellow Computer Science students and instructors. You can share VisuAlgo through social media platforms (e.g., Facebook, YouTube, Instagram, TikTok, Twitter, etc), course webpages, blog reviews, emails, and more.

Data Structures and Algorithms (DSA) students and instructors are welcome to use this website directly for their classes. If you capture screenshots or videos from this site, feel free to use them elsewhere, provided that you cite the URL of this website ( https://visualgo.net) and/or the list of publications below as references. However, please refrain from downloading VisuAlgo's client-side files and hosting them on your website, as this constitutes plagiarism. At this time, we do not permit others to fork this project or create VisuAlgo variants. Personal use of an offline copy of the client-side VisuAlgo is acceptable.

Please note that VisuAlgo's online quiz component has a substantial server-side element, and it is not easy to save server-side scripts and databases locally. Currently, the general public can access the online quiz system only through the 'training mode.' The 'test mode' offers a more controlled environment for using randomly generated questions and automatic verification in real examinations at NUS.
List of Publications
This work has been presented at the CLI Workshop at the ICPC World Finals 2012 (Poland, Warsaw) and at the IOI Conference at IOI 2012 (Sirmione-Montichiari, Italy). You can click this link to read our 2012 paper about this system (it was not yet called VisuAlgo back in 2012) and this link for the short update in 2015 (to link VisuAlgo name with the previous project).
Bug Reports or Request for New Features
VisuAlgo is not a finished project. Associate Professor Steven Halim is still actively improving VisuAlgo. If you are using VisuAlgo and spot a bug in any of our visualization page/online quiz tool or if you want to request for new features, please contact Associate Professor Steven Halim. His contact is the concatenation of his name and add gmail dot com.

Privacy Policy
Version 1.2 (Updated Fri, 18 Aug 2023).
Since Fri, 18 Aug 2023, we no longer use Google Analytics. Thus, all cookies that we use now are solely for the operations of this website. The annoying cookie-consent popup is now turned off even for first-time visitors.

Since Fri, 07 Jun 2023, thanks to a generous donation by Optiver, anyone in the world can self-create a VisuAlgo account to store a few customization settings (e.g., layout mode, default language, playback speed, etc).

Additionally, for NUS students, by using a VisuAlgo account (a tuple of NUS official email address, student name as in the class roster, and a password that is encrypted on the server side - no other personal data is stored), you are giving a consent for your course lecturer to keep track of your e-lecture slides reading and online quiz training progresses that is needed to run the course smoothly. Your VisuAlgo account will also be needed for taking NUS official VisuAlgo Online Quizzes and thus passing your account credentials to another person to do the Online Quiz on your behalf constitutes an academic offense. Your user account will be purged after the conclusion of the course unless you choose to keep your account (OPT-IN). Access to the full VisuAlgo database (with encrypted passwords) is limited to Prof Halim himself.

For other CS lecturers worldwide who have written to Steven, a VisuAlgo account (your (non-NUS) email address, you can use any display name, and encrypted password) is needed to distinguish your online credential versus the rest of the world. Your account will have CS lecturer specific features, namely the ability to see the hidden slides that contain (interesting) answers to the questions presented in the preceding slides before the hidden slides. You can also access Hard setting of the VisuAlgo Online Quizzes. You can freely use the material to enhance your data structures and algorithm classes. Note that there can be other CS lecturer specific features in the future.

For anyone with VisuAlgo account, you can remove your own account by yourself should you wish to no longer be associated with VisuAlgo tool.

# data[].attributes.attachment_link.keywords[]
visualgo data structure algorithm visualization animation online learning tutorial lecture

# data[].attributes.attachment_link.title
visualising data structures and algorithms through animation - VisuAlgo

# data[].attributes.attachment_link.description
VisuAlgo was conceptualised in 2011 by Dr Steven Halim as a tool to help his students better understand data structures and algorithms, by allowing them to learn the basics on their own and at their own pace.

# data[].attributes.attachment_link.title
Blazing fast cloud developer environments

# data[].attributes.attachment_link.description
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or window. Reload to refresh your session. Reload to refresh your session.

# data[].attributes.attachment_link.readable_text
Entdecken Sie die Möglichkeiten von Python 3! Ob Sie erst anfangen, mit Python zu arbeiten, oder bei Ihrer Arbeit etwas nachschlagen möchten - in diesem Buch, der 5. Auflage unseres Python-Handbuchs, finden Sie alles, was Sie zu Python 3 wissen müssen.
Angefangen mit einer Einführung in Python bietet das Buch eine Sprachreferenz, die Beschreibung der Standardbibliothek und ausführliche Informationen zu professionellen Themen wie GUI-Entwicklung, Webentwicklung, Anbindung an C oder wissenschaftliches Rechnen.
Dabei gehen die Autoren ausführlich auf die wesentlichen Unterschiede zwischen Python 3 und früheren Versionen ein.

Die gedruckte Version des Buches erhalten Sie im Rheinwerk-Shop - versandkostenfreie Lieferung nach Deutschland, Österreich und in die Schweiz.
Zum Rheinwerk-Shop

# data[].attributes.attachment_link.description
Entdecken Sie die Möglichkeiten von Python 3! Ob Sie erst anfangen, mit Python zu arbeiten, oder bei Ihrer Arbeit etwas nachschlagen möchten - in diesem Buch, der 5. Auflage unseres Python-Handbuchs, finden Sie alles, was Sie zu Python 3 wissen müssen.

# data[].attributes.attachment_link.title
Openbooks. Rheinwerk-Bücher kostenlos online lesen. Ein Service des Rheinwerk Verlags

# data[].attributes.attachment_link.description
Rheinwerk ist ein kostenloser Service von uns für Sie. Wir bieten Ihnen auf dieser Seite die HTML-Version eines vollständigen Buches für Ihre Aus- und Weiterbildung. Stöbern Sie in unserem Angebot an Openbooks, wir haben für Sie aus jedem Programmbereich Bücher ausgesucht. Sie können das Openbook jederzeit online lesen und zum Vertiefen Ihrer Kenntnisse nutzen.

# data[].attributes.body
Relativ altes Buch aus 2009 mit entsprechend veralteten Code-Beispielen usw. Grundkonzepte usw. sind dafür umfassend beschrieben.

# data[].attributes.attachment_link.readable_text
In diesem Kapitel stellen die Autoren sich und dieses Buch vor. Sie erklären, was Objektorientierung im Bereich der Softwareentwicklung bedeutet. Und am Ende des Kapitels geraten sie auch schon in die erste Diskussion miteinander.
1.1 Was ist Objektorientierung?

Objektorientierung ist eine mittlerweile bewährte Methode, um die Komplexität von Softwaresystemen in den Griff zu bekommen. Die Entwicklung der Objektorientierung als Konzept der Softwaretechnik ist sehr eng mit der Entwicklung von objektorientierten Programmiersprachen verbunden.

Von Alan Kay, dem Erfinder der Sprache Smalltalk, die als die erste konsequent objektorientierte Programmiersprache gilt, wird die folgende Geschichte erzählt:
Bei einer Präsentation bei Apple Mitte der 80er-Jahre hielt ein Mitarbeiter einen Vortrag über die erste Version der neu entwickelten Programmiersprache Oberon. Diese sollte der nächste große Schritt in der Welt der objektorientierten Sprachen sein. Da meldete sich Alan Kay zu Wort und hakte nach: "Diese Sprache unterstützt also keine Vererbung?" "Das ist korrekt." "Und sie unterstützt keine Polymorphie?" "Das ist korrekt." "Und sie unterstützt auch keine Datenkapselung?" "Das ist ebenfalls korrekt." "Dann scheint mir das keine objektorientierte Sprache zu sein." Der Vortragende meinte darauf: "Nun, wer kann schon genau sagen, was nun objektorientiert ist und was nicht." Woraufhin Alan Kay zurückgab: "Ich kann das. Ich bin Alan Kay, und ich habe den Begriff geprägt."
Der geschilderte Dialog enthält genau die drei Grundelemente, die als Basis von objektorientierten Programmiersprachen gelten:

Unterstützung von Vererbungsmechanismen

Unterstützung von Datenkapselung

Unterstützung von Polymorphie

Auf alle drei Punkte werden wir eingehen. Objektorientierung geht allerdings mittlerweile weit über diese Grunddefinition hinaus. Die genannten Punkte bilden lediglich den kleinsten gemeinsamen Nenner.

Ihre Meinung

Wie hat Ihnen das Openbook gefallen? Wir freuen uns immer über Ihre Rückmeldung. Schreiben Sie uns gerne Ihr Feedback als E-Mail an kommunikation@rheinwerk-verlag.de.

# data[].attributes.attachment_link.description
Objektorientierte Programmierung - Das umfassende Handbuch - 1 Einleitung

# data[].attributes.body
https://strype.org/

# data[].attributes.body
IDE textbasiert

Klassen-Modellierer zum Modellieren von Klassen mit Attributen und Methoden

UML-Fenster mit Klassen und ihren Beziehungen. Durch Aufrufen des Konstruktors erstellen Sie Objekte. Methoden von Objekten ruften Sie dann interaktiv auf.

GUI-Designer für Qt, Tkinter und TTK

Struktogramm-Editor zum Modellieren von Algorithmen und Konvertieren in Python-Code.

Sequenzdiagramm-Editor zum Modellieren von Sequenzdiagrammen mit Lebenslinien und Aktivierungen.

# data[].attributes.attachment_link.readable_text
GuiPy ist eine Python-IDE für die Schule, die auf PyScripter basiert. Die meisten Python-IDEs unterstützen nur textbasiertes Codieren. GuiPy bietet stattdessen mehrere grafische Tools, die das Lernen und Lehren von Python-Programmierkonzepten unterstützen. Dazu gehören:

Klassen-Modellierer zum Modellieren von Klassen mit Attributen und Methoden

UML-Fenster mit Klassen und ihren Beziehungen. Durch Aufrufen des Konstruktors erstellen Sie Objekte. Methoden von Objekten ruften Sie dann interaktiv auf.

Struktogramm-Editor zum Modellieren von Algorithmen und Konvertieren in Python-Code.

Sequenzdiagramm-Editor zum Modellieren von Sequenzdiagrammen mit Lebenslinien und Aktivierungen.

Der Klassen-Modellierer ist ein einfach benutzbares Werkzeug zur Modellierung von Klassen. Mit dem Klassen-Modellierer können Sie neue Klassen erzeugen und bestehende Klassen bearbeiten. Er liest Python-Dateien und stellt sie als Klasse mit Attributen und Methoden dar. Änderungen im Klassen-Modellierer werden direkt in die zugehörige Python-Datei übernommen.

Die Reihenfolge der Attribute und Methoden im Strukturbaum kann mittels Drag&Drop verändert werden.

Den Klassen-Modellierer rufen Sie über das Symbol im Editorfenster auf. Sie können auch auf die gewünschte Klasse im UML-Fenster doppelklicken oder das Kontextmenü verwenden, um den Klassen-Modellierer aufzurufen.

Der Klassen-Modellierer berücksichtigt den UML-Standard, weswegen auch String als Datentyp angeboten wird. Bei der Umsetzung in Python-Quellcode wird daraus automatisch str.

Nachdem Sie eine Klasse mit dem Klassenmodellierer modelliert haben, ist es an der Zeit, Ihr Modell zu testen. Im uml-Fenster können Sie durch Öffnen des Kontextmenüs einer Klasse mit der rechten Maustaste den Konstruktor zum interaktiven Erstellen eines Objekts aufrufen.

Wenn Sie anschließend das Kontextmenü des erstellten Objekts aufrufen, können Sie die Attribute bearbeiten und die Methoden des Objekts aufrufen. Geänderte Attributwerte sind leicht zu erkennen und Objekte, die durch einen Methodenaufruf erstellt wurden, werden sofort angezeigt. Dies ist besonders nützlich, wenn Sie mit dynamischen Datenstrukturen wie Listen und Bäumen arbeiten.

Nach dem Testen eines Modells im UML-Fenster kann man es in einem Konsolen- oder GUI-Programm benutzen.

Es ist ziemlich kompliziert eine graphische Benutzungsoberfläche mit Layout-Managern zu gestalten. Schülerinnen und Schüler haben damit erhebliche Schwierigkeiten. Viel einfacher ist es mittels Drag&Drop Widgets an die gewünschte Position auf dem Formular zu ziehen. Der in GuiPy verfügbare GUI-Designer benutzt daher keine Layout-Manager sondern absolute Positionierung, womit man ziemlich schnell sein Layout gestalten kann.

Um ein GUI-Programm zu erstellen, klicken Sie auf das Symbol der Registerkarte „Programm". Dadurch werden ein Programgerüst in einem Editorfenster und ein GUI-Formular bereitgestellt.

Um ein Widget zu platzieren, klicken Sie zuerst auf dessen Symbol auf der Registerkarte Tkinter oder TTK und dann auf das GUI-Formular. Alternativ können Sie ein Widget per Drag & Drop von einer Registerkarte auf Ihr GUI-Formular ziehen. Anschließend können Sie das Widget positionieren und mit dem Objektinspektor konfigurieren. Der Quellcode wird entsprechend synchronisiert.

Mit dem Symbol eines Quellcode-Editors öffnen Sie das zugehörige GUI-Formular.

Das GUI-Formular verfügt über ein Kontextmenü zum Bearbeiten der Widgets.

GuiPy verfügt über einen Struktogrammeditor, mit dem Struktogramme erstellt und bearbeitet werden können.

Die Modellierung von Abläufen mit Struktogrammen auf einer programmiersprachlich unabhängigen Ebene spielt im Informatikunterricht eine wichtige Rolle, weil Algorithmen auf einer abstrakten Ebene ohne konkrete programmiersprachliche Details modelliert werden können. Ein Algorithmus kann verstanden werden, ohne dass man ihn selbst in Python programmieren kann. Händisches Zeichnen von Struktogrammen auf Papier bringt keine ansehlichen Ergebnisse, weil Strukturänderungen praktisch nicht möglich sind. Mit dem Struktogrammeditor können Struktogramme einfach, schnell und korrekt erstellt werden.

Aus Struktogrammen kann Python-Quellcode generiert werden, der aber dann noch nach bearbeitet werden muss. Dies unterstützt beim Implementieren in Python. Der umgekehrte Weg geht auch. Im Editor kann man Quelltext auswählen und daraus ein Struktogramm erzeugen lassen.

Per Drag&Drop können Struktogrammelemente in ein Struktogramm eingefügt und aus einem Struktogramm herausgezogen werden. Zieht man ein Strktogrammelement nach unten, werden alle darauf folgenden Elemten auch mitabgetrennt. Aus der linken Symbolleiste lassen sich Struktogramelemente herausziehen, zum Löschen kann man sie zurück auf die Symbolleiste ziehen. Leere Struktogrammelemente klickt man an und tippt den Text einfach ein. Zum nachträglichen Editieren doppelklickt man den betreffenden Text.

Das grüne P erzeugt aus dem Struktogramm soweit möglich eine Pythonfunktion. In der Konfiguration können die im Struktogramm verwendeten Texte angepasst werden.

Mit dem Sequenzdiagramm-Editor können Sie ein Sequenzdiagramm interaktiv erstellen. Lebenslinien gibt in zwei Formen, als Akteur und mit benanntem Kopf. Sie werden mit Hilfe der Symbolleiste eingefügt. Zum Herstellen einer Verbindung zwischen Lebenslinien benutzt man das Kontextmenü einer Lebenslinie und ruft dort verbinden mit auf. Zum Verändern von Texten rufen sie den Texteditor durch Doppelklicken auf.

Sequenzdiagramme werden mit der Dateierweiterung psd gespeichert. Es handelt sich um Textdateien, die auch mit externen Texteditoren bearbeitet werden können.

GuiPy wird unter Windows entwickelt.

Der GuiPy funktioniert unter Linux mit der Wine-Erweiterung. Hinweise zur Installation finden Sie auf der WineHQ Seite. Unter Wine wird die Schriftart Monospace empfohlen. Manche Schriftarten funktionieren nicht im Editor.

GuiPy läuft auf dem Mac sowohl mit CrossOver Office (Wine) als auch in einer virtualisierten Windowsumgebung problemlos.

Bei einem 64-Bit Mac funktioniert er unter der Virtualisierungssoftware VMWare Fusion einwandfrei.

Auf einem Mac mit M1 oder M2 Prozessor kann man GuiPy wie folgt einrichten. Zunächst lädt man die kostenlose Software UTM herunter https://mac.getutm.app/ und installiert diese. Zur Installation zieht man im UTM-Fenster das UTM-Icon auf das Applications-Icon.

Die bei UTM befindlichen Anleitungen zum Download einer Windows-ISO-Datei sind kompliziert und führen oft nicht zum Ziel. Daher installiert man sich im nächsten Schritt die Testversion von Paralles für Mac https://www.parallels.com/de/products/desktop/. Mit Parallels lädt man dann eine funkionierende Windows-11-ISO-Datei herunter. Die Testversion von Parallels deinstalliert man wieder. Zum Schluss ruft man UTM auf und erzeugt sich eine virtuelle Maschine mit Windows 11.

In Windows 11 wird dann zuerst Python und dann GuiPy installiert. Von https://python.org laden Sie sich eine 64-Bit Version von Python (x64/amd) herunter und installieren diese. Typischerweise wird nach C:\Users\<username>\AppData\Local\Programs\Python\Python3xx installiert.

Aktuell lässt sich die 64-Bit „Personal Version" von GuiPy nicht installieren. Laden Sie sich deshalb die „Spezial Version" herunter und entpacken Sie die Zip-Datei. Starten Sie dann das Programm setup.exe und installieren Sie in den vorgeschlagenen Ordner C:\Program Files\GuiPy\.

Nach dem Start von GuiPy kommt ein Hinweis auf eine fehlende Pythonversion. Schließen Sie beide dazugehörende Fenster. Öffnen Sie dann über das Menü Fenster die Konfiguration. Klicken Sie „nicht registrierte Versionen" an und dann auf „Hinzufügen". Wählen Sie den Installationsordner von Python aus:

Wählen Sie abschließend die so in GuiPy bereitgestellte Pythinversion aus und aktivieren Sie diese.

# data[].attributes.attachment_link.description
GuiPy ist eine Python-IDE für die Schule, die auf PyScripter basiert. Die meisten Python-IDEs unterstützen nur textbasiertes Codieren. GuiPy bietet stattdessen mehrere grafische Tools, die das Lernen und Lehren von Python-Programmierkonzepten unterstützen. Dazu gehören: Klassen-Modellierer zum Modellieren von Klassen mit Attributen und Methoden UML-Fenster mit Klassen und ihren Beziehungen.

# data[].attributes.body
https://www.brentozar.com/archive/2015/10/how-to-download-the-stack-overflow-database-via-bittorrent/

# data[].attributes.attachment_link.readable_text
I use a Microsoft SQL Server version of the public Stack Overflow data export for my blog posts and training classes because it's way more interesting than a lot of sample data sets out there. It's easy to learn, has just a few easy-to-understand tables, and has real-world data distributions for numbers, dates, and strings. Plus, it's open source and no charge for you - just choose your size:

Small: 10GB database as of 2010: 1GB direct download, or torrent or magnet. Expands to a ~10GB database called StackOverflow2010 with data from the years 2008 to 2010. If all you need is a quick, easy, friendly database for demos, and to follow along with code samples here on the blog, this is all you probably need.

Medium: 50GB database as of 2013: 10GB direct download, or torrent or magnet. Expands to a ~50GB database called StackOverflow2013 with data from 2008 to 2013 data. I use this in my Fundamentals classes because it's big enough that slow queries will actually be kinda slow.

Large: current 430GB database as of 2022-06: 54GB torrent (magnet.) Expands to a ~430GB SQL Server 2016 database. Because it's so large, I only distribute it with BitTorrent, not direct download links.

For my training classes: specialized copy as of 2018/06: 47GB torrent (magnet.) Expands to a ~180GB SQL Server 2016 database with queries and indexes specific to my training classes. Because it's so large, I only distribute it with BitTorrent, not direct download links.

After you download it, extract the .7Zip files with 7Zip. (I use that for max compression to keep the downloads a little smaller.) The extract will have the database MDF, NDFs (additional data files), LDF, and a Readme.txt file. Don't extract the files directly into your SQL Server's database directories - instead, extract them somewhere else first, and then move or copy them into the SQL Server's database directories. You're going to screw up the database over time, and you're going to want to start again - keep the original copy so you don't have to download it again.

Then, attach the database. It's in Microsoft SQL Server 2016 format (2008 for the older torrents), so you can attach it to any 2016 or newer instance. It doesn't use any Enterprise Edition features like partitioning or compression, so you can attach it to Developer, Standard, or Enterprise Edition. If your SSMS crashes or throws permissions errors, you likely tried extracting the archive directly into the database directory, and you've got permissions problems on the data/log files.

As with the original data dump, this is provided under cc-by-sa 4.0 license. That means you are free to share this database and adapt it for any purpose, even commercially, but you must attribute it to the original authors (not me):

What's Inside the StackOverflow Database

I want you to get started quickly while still keeping the database size small, so:

All tables have a clustered index on Id, an identity field

No other indexes are included (nonclustered or full text)

The log file is small, and you should grow it out if you plan to build indexes or modify data

It only includes StackOverflow.com data, not data for other Stack sites

To get started, here's a few helpful links:

Past Versions

I also keep past versions online too in case you need to see a specific version for a demo.

2021-02 - 54GB torrent (magnet.) Expands to a ~401GB SQL Server 2016 database.

2020-06 - 46GB torrent (magnet.) Expands to a ~381GB SQL Server 2008 database. This is the last export that can be used with SQL Server 2014 & prior.

2019-12 - 52GB torrent (magnet.) Expands to a ~361GB SQL Server 2008 database.

2019-09 - 43GB torrent (magnet.) Expands to a ~352GB SQL Server 2008 database. This is the last export licensed with the cc-by-sa 3.0 license.

2019-06 - 40GB torrent (magnet.) Expands to a ~350GB SQL Server 2008 database.

2018-12 - 41GB torrent (magnet.) Expands to a ~323GB SQL Server 2008 database.

2018-09 -39GB torrent (magnet.) Expands to a ~312GB SQL Server 2008 database.

2018-06 - 38GB torrent (magnet.) Expands to a ~304GB SQL Server 2008 database. Starting with this version & newer, the giant PostHistory table is included. As you can probably guess by the name, this would make for excellent partitioning and archival demos. As you might not guess, the NVARCHAR(MAX) datatypes of the Comment and Text fields make those demos rather...challenging.

2017-12 - 19GB torrent (magnet.) Expands to a ~137GB SQL Server 2008 database.

2017-08 - 16GB torrent (magnet), 122GB SQL Server 2008 database. Starting with this version & newer, each table's Id fields are identity fields. This way we can run real-life-style insert workloads during my Mastering Query Tuning class. (Prior to this version, the Id fields were just INTs, so you needed to select the max value or some other trick to generate your own Ids.)

2017-06 - 16GB torrent (magnet), 118GB SQL Server 2008 database. Starting with this torrent & newer, I broke this up into multiple SQL Server data files, each in their own 7z file, to make compression / decompression / distribution a little easier. You need all of those files to attach the database.

2017-01 - 14GB torrent (magnet), 110GB SQL Server 2008 database

2016-03 - 12GB torrent (magnet), 95GB SQL Server 2005 database

2015-08 - 9GB torrent (magnet), 70GB SQL Server 2005 database

Why are Some Sizes/Versions Only On BitTorrent?

BitTorrent is a peer-to-peer file distribution system. When you download a torrent, you also become a host for that torrent, sharing your own bandwidth to help distribute the file. It's a free way to get a big file shared amongst friends.

The download is relatively large, so it would be expensive for me to host on a server. For example, if I hosted it in Amazon S3, I'd have to pay around $5 USD every time somebody downloaded the file. I like you people, but not quite enough to go around handing you dollar bills. (As it is, I'm paying for multiple seedboxes to keep these available, heh.)

Some corporate firewalls understandably block BitTorrent because it can use a lot of bandwidth, and it can also be used to share pirated movies/music/software/whatever. If you have difficulty running BitTorrent from work, you'll need to download it from home instead.

# data[].attributes.attachment_link.title
How to Download the Stack Overflow Database - Brent Ozar Unlimited®

# data[].attributes.attachment_link.description
I use a Microsoft SQL Server version of the public Stack Overflow data export for my blog posts and training classes because it's way more interesting than a lot of sample data sets out there. It's easy to learn, has just a few easy-to-understand tables, and has real-world data distributions for numbers, dates, and strings....

# data[].attributes.body
https://github.com/Microsoft/sql-server-samples/releases/tag/wide-world-importers-v1.0

# data[].attributes.attachment_link.title
Release Wide World Importers sample database v1.0 · microsoft/sql-server-samples

# data[].attributes.attachment_link.description
WideWorldImporters sample database for SQL Server (starting 2016) and Azure SQL Database. For details see the corresponding documentation.
This release includes the following artifacts: SQL Server...

# data[].attributes.body
https://github.com/cwoodruff/ChinookDatabase

# data[].attributes.attachment_link.title
GitHub - cwoodruff/ChinookDatabase: Chinook is a sample database available for SQL Server, Oracle, MySQL, etc. It can be created by running a single SQL script.

# data[].attributes.attachment_link.description
Chinook is a sample database available for SQL Server, Oracle, MySQL, etc. It can be created by running a single SQL script. - GitHub - cwoodruff/ChinookDatabase: Chinook is a sample database available for SQL Server, Oracle, MySQL, etc. It can be created by running a single SQL script.

# data[].attributes.body
https://github.com/jOOQ/sakila

# data[].attributes.attachment_link.title
GitHub - jOOQ/sakila: The Sakila Database

# data[].attributes.attachment_link.description
The Sakila database is a nicely normalised database modelling a DVD rental store (for those of you old enough to remember what that is). Its design includes a few nice features: Many to many relationships Multiple paths between entities (e.g.

# data[].attributes.body
https://fakerphp.github.io/

# data[].attributes.attachment_link.readable_text
Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you.

It's heavily inspired by Perl's Data::Faker, and by Ruby's Faker.

Installation

Faker requires PHP >= 7.1.

composer require fakerphp/faker

Basic Usage

Faker supports both PSR-0 as PSR-4 autoloaders.

// when installed via composer require_once 'vendor/autoload.php';

You can also load Fakers shipped PSR-0 autoloader

// load Faker autoloader require_once '/path/to/Faker/src/autoload.php';
alternatively, you can use any other PSR-4 compliant autoloader
Create fake data

Use Faker\Factory::create() to create and initialize a faker generator, which can generate data by calling methods named after the type of data you want.

require_once 'vendor/autoload.php'; // use the factory to create a Faker\Generator instance $faker = Faker\Factory::create(); // generate data by calling methods echo $faker->name(); // 'Vince Sporer' echo $faker->email(); // 'walter.sophia@hotmail.com' echo $faker->text(); // 'Numquam ut mollitia at consequuntur inventore dolorem.'

Each call to $faker->name() yields a different (random) result. This is because Faker uses __call() magic, and forwards Faker\Generator->$method() calls to Faker\Generator->format($method, $attributes).

for ($i = 0; $i < 3; $i++) { echo $faker->name() . "\n"; } // 'Cyrus Boyle' // 'Alena Cummerata' // 'Orlo Bergstrom'

Modifiers

Faker provides three special providers, unique(), optional(), and valid(), to be called before any provider.

// unique() forces providers to return unique values $values = []; for ($i = 0; $i < 10; $i++) { // get a random digit, but always a new one, to avoid duplicates $values []= $faker->unique()->randomDigit(); } print_r($values); // [4, 1, 8, 5, 0, 2, 6, 9, 7, 3] // providers with a limited range will throw an exception when no new unique value can be generated $values = []; try { for ($i = 0; $i < 10; $i++) { $values []= $faker->unique()->randomDigitNotNull(); } } catch (\OverflowException $e) { echo "There are only 9 unique digits not null, Faker can't generate 10 of them!"; } // you can reset the unique modifier for all providers by passing true as first argument $faker->unique($reset = true)->randomDigitNotNull(); // will not throw OverflowException since unique() was reset // tip: unique() keeps one array of values per provider // optional() sometimes bypasses the provider to return a default value instead (which defaults to NULL) $values = []; for ($i = 0; $i < 10; $i++) { // get a random digit, but also null sometimes $values []= $faker->optional()->randomDigit(); } print_r($values); // [1, 4, null, 9, 5, null, null, 4, 6, null] // optional() accepts a weight argument to specify the probability of receiving the default value. // 0 will always return the default value; 1.0 will always return the provider. Default weight is 0.5 (50% chance). // Please note that the weight can be provided as float (0 / 1.0) or int (0 / 100) // As float $faker->optional($weight = 0.1)->randomDigit(); // 90% chance of NULL $faker->optional($weight = 0.9)->randomDigit(); // 10% chance of NULL // As int $faker->optional($weight = 10)->randomDigit; // 90% chance of NULL $faker->optional($weight = 100)->randomDigit; // 0% chance of NULL // optional() accepts a default argument to specify the default value to return. // Defaults to NULL. $faker->optional($weight = 0.5, $default = false)->randomDigit(); // 50% chance of FALSE $faker->optional($weight = 0.9, $default = 'abc')->word(); // 10% chance of 'abc' // valid() only accepts valid values according to the passed validator functions $values = []; $evenValidator = function($digit) { return $digit % 2 === 0; }; for ($i = 0; $i < 10; $i++) { $values []= $faker->valid($evenValidator)->randomDigit(); } print_r($values); // [0, 4, 8, 4, 2, 6, 0, 8, 8, 6] // just like unique(), valid() throws an overflow exception when it can't generate a valid value $values = []; try { $faker->valid($evenValidator)->randomElement([1, 3, 5, 7, 9]); } catch (\OverflowException $e) { echo "Can't pick an even number in that set!"; }

If you would like to use a modifier with a value not generated by Faker, use the passthrough() method. passthrough() simply returns whatever value it was given.

$faker->optional()->passthrough(mt_rand(5, 15));

Localization

Faker\Factory can take a locale as an argument, to return localized data. If no localized provider is found, the factory falls back to the default locale (en_US).

// create a French faker $faker = Faker\Factory::create('fr_FR'); for ($i = 0; $i < 3; $i++) { echo $faker->name() . "\n"; } // Luce du Coulon // Auguste Dupont // Roger Le Voisin

You can check available Faker locales in the source code, under the Provider directory. The localization of Faker is an ongoing process, for which we need your help. Don't hesitate to create localized providers to your own locale and submit a PR!

Seeding the Generator

You may want to always get the same generated data - for instance when using Faker for unit testing purposes. The generator offers a seed() method, which seeds the random number generator. Calling the same script twice with the same seed produces the same results.

$faker = Faker\Factory::create(); $faker->seed(1234); echo $faker->name(); // 'Jess Mraz I';

Tip

DateTime formatters won't reproduce the same fake data if you don't fix the $max value:

// even when seeded, this line will return different results because $max varies $faker->dateTime(); // equivalent to $faker->dateTime($max = 'now') // make sure you fix the $max parameter $faker->dateTime('2014-02-25 08:37:17'); // will return always the same date when seeded

Tip

Formatters won't reproduce the same fake data if you use the rand() php function. Use $faker or mt_rand() instead:

// bad $faker->realText(rand(10, 20)); // good $faker->realText($faker->numberBetween(10, 20));

Faker Internals: Understanding Providers

A Faker\Generator alone can't do much generation. It needs Faker\Provider objects to delegate the data generation to them. Faker\Factory::create() actually creates a Faker\Generator bundled with the default providers. Here is what happens under the hood:

$faker = new Faker\Generator(); $faker->addProvider(new Faker\Provider\en_US\Person($faker)); $faker->addProvider(new Faker\Provider\en_US\Address($faker)); $faker->addProvider(new Faker\Provider\en_US\PhoneNumber($faker)); $faker->addProvider(new Faker\Provider\en_US\Company($faker)); $faker->addProvider(new Faker\Provider\Lorem($faker)); $faker->addProvider(new Faker\Provider\Internet($faker));

Whenever you try to access a property on the $faker object, the generator looks for a method with the same name in all the providers attached to it. For instance, calling $faker->name triggers a call to Faker\Provider\Person::name(). And since Faker starts with the last provider, you can easily override existing formatters: just add a provider containing methods named after the formatters you want to override.

That means that you can easily add your own providers to a Faker\Generator instance. A provider is usually a class extending \Faker\Provider\Base. This parent class allows you to use methods like lexify() or randomNumber(); it also gives you access to formatters of other providers, through the protected $generator property. The new formatters are the public methods of the provider class.

Here is an example provider for populating Book data:

namespace Faker\Provider; class Book extends \Faker\Provider\Base { public function title($nbWords = 5) { $sentence = $this->generator->sentence($nbWords); return substr($sentence, 0, strlen($sentence) - 1); } public function ISBN() { return $this->generator->ean13(); } }

To register this provider, just add a new instance of \Faker\Provider\Book to an existing generator:

$faker->addProvider(new \Faker\Provider\Book($faker));

Now you can use the two new formatters like any other Faker formatter:

$book = new Book(); $book->setTitle($faker->title()); $book->setISBN($faker->ISBN()); $book->setSummary($faker->text()); $book->setPrice($faker->randomNumber(2));

Tip

A provider can also be a Plain Old PHP Object. In that case, all the public methods of the provider become available to the generator.

Language specific formatters

Supported locales can be found under the "Locales" header on the left.

Misnamed locales

Source: https://www.localeplanet.com/icu/

License

Faker is released under the MIT License. See the bundled LICENSE file for details.

# data[].attributes.attachment_link.description
Faker is a PHP library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you. It's heavily inspired by Perl's Data::Faker, and by Ruby's Faker.

# data[].attributes.body
https://www.sachsen.schule/~astra2013/

# data[].attributes.attachment_link.description
Die astra-Datenbank ist ein Abkömmling der
bekannten terra. Sie dient ausschliesslich zu Lehrzwecken
der Informatik - nicht der Astronomie!

# data[].attributes.body
Freie Basisversion - versteht sich auf unterschiedlichste Datenbanktypen und hat eine Datenbankvisualisierung der Tabellen in inkl. Keys, Relationen usw.

# data[].attributes.attachment_link.description
DbVisualizer is a database management and analysis tool for all major databases (e.g. Oracle, SQL Server, DB2, Sybase, MySQL, SQLite) on Windows, macOS, Linux and Unix platforms.

# data[].attributes.body
Schreibe was das Programm machen soll und erhalte den Code // Auch als VS Code-Extension verfügbar

# data[].attributes.attachment_link.description
Copy the code from any coding video or live video calls and paste it in your text editor just like you copy code from GitHub & Stack Overflow

# data[].attributes.body
https://snap.berkeley.edu/snap/snap.html

# data[].attributes.headline
Spiel zum schnellen Einstieg in Algorithmen

# data[].attributes.subject
Spiel zum schnellen Einstieg in Algorithmen

# data[].attributes.body
Zuweisungen, Vergleichsoperatoren,  Verzweigung, Schleifen, Funktionen inkl. Parameterübergabe usw.

# data[].attributes.body
Ein Punkt muss über ein Feld geführt werden. Dabei sind Codeschnipsel zu wählen, die auf Karten zur Auswahl vorliegen. Die Codeschnipsel sind zudem mit den Cursor-Tasten auszuführen (links, rechts, oben, unten)

# data[].attributes.body
https://programmieren.wdrmaus.de/welcome

# data[].attributes.attachment_link.description
Bei 'Programmieren mit der Maus' lernen Kinder ab 8 Jahre Schritt für Schritt Bildergeschichten und Spiele mit der Maus aus der 'Sendung mit der Maus' zu programmieren. Viel Spaß!

# data[].attributes.body
https://blockly.games/

# data[].attributes.attachment_link.description
Games for tomorrow’s programmers. Block-based programming lessons for beginners.

# data[].attributes.attachment_link.title
Objektorientierung in Python - OOP Masterclass - From Newbie to Expert | OOP Komplettkurs

# data[].attributes.body
https://www.erlebe-it.de/Unterrichtsmaterialien/Python

# data[].attributes.attachment_link.readable_text
Es gibt zahlreiche unterschiedliche Methoden, an medienpädagogischen Inhalten zu arbeiten. Häufig kann man sich hier auch aus einem Repertoire unterschiedlichster Methoden aus der allgemeinbildenden Pädagogik oder der Spielpädagogik bedienen. Schauen Sie gerne in Ihren eigenen individuellen Methodenkoffer. Methoden, die Ihnen bei der Erarbeitung anderer Inhalte geholfen haben, können auch auf medienpädagogische Inhalte angewandt werden.

Beispiele für die Arbeit am Thema Medien

Medien-Tabu

Die Klasse wird in zwei Gruppen aufgeteilt. Abwechselnd stellen einzelne Personen aus den Gruppen einen Medienbegriff vor. Diese können zuvor von der Lehrkraft, den Schüler*innen oder aus dem beigefügten Set von Begriffen ausgewählt werden. Nun müssen die Begriffe erklärt werden, ohne die darunter angegeben Wörter zu benutzen. Für die Erklärung wird zuvor ein Zeitfenster ausgemacht (30 Sekunden oder 1 Minute). Eine andere teilnehmende Person kontrolliert die Einhaltung der Regeln. Für jeden richtig erratenen Begriff gibt es einen Punkt.
Beispiel herunterladen
Medien-Activity

Dieses Spiel funktioniert fast genauso wie Medien-Tabu. Der Unterschied ist, dass die Begriffe erklärt, pantomimisch dargestellt oder gezeichnet werden. Um einen Begriff zu zeichnen, kann entweder die Tafel oder ein Smartboard genutzt werden. Hierbei bietet die Seite www.kritzel-klub.de eine gute Grundlage.
Beispiel herunterladen
Kabelsalat

Die Schüler*innen sitzen im Stuhlkreis. Dabei befindet sich ein Stuhl weniger im Kreis, als es Spielteilnehmer*innen gibt. Die Person ohne Sitzplatz stellt sich in die Mitte und beschreibt eine mediale Tätigkeit (Beispiel: Alle, die Musik auf Spotify hören.) Alle Teilnehmer*innen, auf die diese Aussage zutrifft, wechseln den Platz. Die Person, die die Aussage formuliert hat, ebenfalls. Somit bleibt eine neue Person übrig, die keinen Sitzplatz hat, welche sich nun eine mediale Aussage überlegen darf.
Tipps für weitere Methoden herunterladen

# data[].attributes.attachment_link.description
Es gibt zahlreiche unterschiedliche Methoden, an medienpädagogischen Inhalten zu arbeiten. Häufig kann man sich hier auch aus einem Repertoire unterschiedlichster Methoden aus der allgemeinbildenden Pädagogik oder der Spielpädagogik bedienen. Schauen Sie gerne in Ihren eigenen individuellen Methodenkoffer. Methoden, die Ihnen bei der Erarbeitung anderer Inhalte geholfen haben, können auch auf medienpädagogische Inhalte angewandt werden.

# data[].attributes.attachment_link.title
Open Roberta | Ein Projekt der Roberta-Initiative des Fraunhofer IAIS

# data[].attributes.attachment_link.description
Im "Open Roberta ® Lab" erweckst Du Deine Robots und Boards zum Leben. Wie das geht? Ganz einfach: Indem Du den Robotern zeigst, was sie machen sollen - und zwar mit "NEPO"! NEPO die grafische Programmiersprache im Open Roberta Lab. Sie sorgt dafür, dass der Roboter und Du Euch gut verstehen, denn die menschliche Sprache versteht der Roboter nicht.

# data[].attributes.attachment_link.readable_text
1. SCRUM - Was ist SCRUM? Ein Überblick - mITSM GmbH Was ist SCRUM? - borisgloger consulting GmbH Kanban for Scrummies - borisgloger consulting GmbH

Grundwerte:

Die Lernenden und ihre Interaktionen stehen über Prozessen und Werkzeugen.

Das Zielprodukt steht über einer umfassenden Dokumentation.

Die Zusammenarbeit und der Kommunikationsfluss mit dem Product Owner (Lehrer:in) ist grundlegend und wichtig.

Reagieren auf Veränderung steht über dem Befolgen eines Planes.

Prinzipien:

Unsere höchste Priorität ist es, den Kunden durch frühe und kontinuierliche Auslieferung wertvoller Software zufrieden zu stellen.

Unsere höchste Priorität ist es, dem Product Owner durch frühe und kontinuierliche Auslieferung wertvoller Produkte / Erfolge zufriedenzustellen.

Heiße Anforderungsänderungen selbst spät in der Entwicklung willkommen. Agile Prozesse nutzen Veränderungen zum Wettbewerbsvorteil des Kunden.

Heiße Anforderungsänderungen selbst spät in der Zusammenarbeit willkommen. Agile Unterrichtsprozesse betrachten Veränderungen als Chance und nutzen Veränderungen zum tiefergehenden Wissens- und Kompetenzerwerb.

Liefere funktionierende Software regelmäßig innerhalb weniger Wochen oder Monate und bevorzuge dabei die kürzere Zeitspanne.

Gesetz der Arbeit (Arbeit dauert immer so lange, wie man sich dafür Zeit lässt). Arbeite nicht zu lange an etwas.

Fachexperten und Entwickler müssen während des Projektes täglich zusammenarbeiten.

Alle Schüler:innen kommen zum Standup zusammen und arbeiten an den Stellen zusammen, an denen es vereinbart wurde oder nötig ist.

Errichte Projekte rund um motivierte Individuen. Gib ihnen das Umfeld und die Unterstützung, die sie benötigen und vertraue darauf, dass sie die Aufgabe erledigen.

Das ist ein Prinzip für den Product Owner (Lehrer:in). Besondere Aufmerksamkeit gilt meiner Meinung nach hier dem Umfeld und der Unterstützung, die die Schüler:innen benötigen. Dieses Prinzip bedeutet zielgruppenadäquate Anpassung des Scrum.

Die effizienteste und effektivste Methode, Informationen an ein Team und innerhalb eines Entwicklungsteams zu übermitteln, ist im Gespräch von Angesicht zu Angesicht.

Wertigkeit des persönlichen Kontakts und der direkten Kommunikation.

Funktionierende Software ist das wichtigste Fortschrittsmaß.

Das Weiterkommen im Prozess ist ein wichtiger Gradmesser für ein Schüler:innen-Team.

Agile Prozesse fördern nachhaltige Entwicklung. Die Auftraggeber, Entwickler und Benutzer sollten ein gleichmäßiges Tempo auf unbegrenzte Zeit halten können.

Nicht nachlassen. Fördern durch Fordern.

Ständiges Augenmerk auf technische Exzellenz und gutes Design fördert Agilität.

Die Lehrer:innen achten auf genaue Einhaltung der Vorgaben und fordern diese aktiv ein.

Einfachheit - die Kunst, die Menge nicht getaner Arbeit zu maximieren - ist essenziell.

Die Fähigkeit unnötige Arbeit zu erkennen ist ein Ziel des Einsatzes von Scrum im Unterricht.

Die besten Architekturen, Anforderungen und Entwürfe entstehen durch selbstorganisierte Teams.

Wieder ein Prinzip, welches für die Lehrkraft entscheidend ist. Es bedeutet den Schüler:innen Vertrauen entgegenzubringen und sie ihren Weg finden zu lassen. Nicht die Lehrer:innen gestalten die Teamarbeit, die Lernenden tun das selbstständig. Die besten Entwürfe und Architekturen entstehen nicht durch unnötige Einmischungen und Steuerungen der Lehrkraft.

In regelmäßigen Abständen reflektiert das Team, wie es effektiver werden kann und passt sein Verhalten entsprechend an.

Das Planning und das sich stetig wiederholende Standup sind sehr gewissenhaft ein- und durchzuführen.

Regeln

SCRUM vs. Wasserfall:

Probleme, die SCRUM gegenüber Wasserfall löst:

You might be heading completely in the wrong direction for months and not suspect it.

The sooner you give things to your customers, the quicker they can tell you if you're making something they need.

Fail fast so you can fix early.

Durch eine klare Strukturierung und Ritualisierung des Arbeitsprozesses in Sprints, in denen jeweils die verschiedenen Phasen der Planung, Ausführung, Überprüfung und Anpassung durchlaufen werden, kann ein Produkt gezielt und nutzerorientiert weiterentwickelt werden.

Product Owner:

Die Lehrperson beschränkt sich darauf die Ziele festzulegen ("Was") und den Teams klar zu machen, weshalb es sinnvoll ist, dass sie tun, was sie tun sollen ("Warum").

Es sind aber die Teams, die ihren Weg hin zu diesem als sinnvoll empfundenen Ziel bestimmen.

Ein wesentliches Element von eduScrum ist, dass der Product Owner die Entscheidung darüber, wie ein Team ein Produkt realisiert, dem Team überlässt.

Die Rolle des Product Owners besteht dann darin, das Team zu begleiten und den Teammitgliedern zu helfen Hindernisse in der Arbeit zu beseitigen.

Er darf sich aber nicht in die Entscheidungen eines Teams bezüglich der Art und Weise ihrer Arbeit einmischen, solange die Grundregeln von eduScrum nicht verletzt werden.

Teams:

"Cross-functional" sind Teams, die über alle Kompetenzen, Ressourcen, etc. verfügen, die notwendig sind, um die definierten Ziele erfüllen zu können.

Product Backlog:

Das Product Backlog entspricht einer Liste von Lernzielen, die der Product Owner den Bildungsplänen eines Faches entnimmt und für die Schüler*innen aufbereitet.

Der Product-Owner stellt den Teams vor Beginn eines Sprints das Product Backlog zur Verfügung, sodass die Teams dann mit der Priorisierung und Planung beginnen können.

Die Lernziele im Product Backlog werden im Idealfall als sogenannte "User Stories" verfasst (siehe unten).

User Stories sind "Nutzergeschichten", die eine Aufgabe produktorientiert und aus Sicht des Users beschreiben und sind somit nicht mit Tasks (Aufgaben) zu verwechseln.

Es ist jedoch üblich, dass die Teams zu den User Stories selber Tasks anfertigen.

Meetings

Durch die Stand-Ups werden die Teams dazu gebracht, miteinander über den Arbeitsprozess, die eigenen Leistungen und Schwierigkeiten im Prozess zu sprechen.

Somit wird die Basis dafür gelegt, dass die Lernenden nicht nur ihre Kommunikation verbessern, sondern auch schrittweise zu einem besser und effektiver arbeitenden Team werden können.

Im sog. Daily-Meeting trifft sich das gesamte Team vor dem Board, um sich Klarheit über den Arbeitsprozess zu verschaffen.

In betrieblichen Scrum-Teams findet dieses Event täglich für 15 Minuten statt.

In schulischen Scrum-Teams findet das Event zu Beginn jeder Unterrichtsstunde für 5 Minuten statt.

Planungs-Meetings

Im weiteren Verlauf des Planungsmeetings sollten die Teams zusätzlich für sich als Gruppe zu definieren, wann eine Aufgabe wirklich bearbeitet und FERTIG ist (Entwicklung der sog. Definition of Done) und das transparent für alle sichtbar vermerken.

Team-Synchronisation / Stand-Up:

Feedback-Runde / Review-Meeting

Das sog. Review-Meeting trägt den Scrum-Säulen von Beobachtung und Anpassung Rechnung.

Die Ergebnisse des Lern- & Arbeitsprozesses werden mit der Lehrkraft besprochen.

Ist das Team dort, wo es hinkommen wollte?

Sind die relevanten Ergebnisse erarbeitet worden oder muss noch nachgearbeitet bzw. im nächsten Durchgang von KidsScrum etwas angepasst / verändert werden?

Rückschau / Retrospektive

Das für die Teamarbeit und den vernetzten Lernprozess wichtigste Meeting ist die sog. Retrospektive.

In diesem Meeting werden die Hindernisse (oder Impediments), die im Laufe des Prozesses von einzelnen Teammitgliedern auf dem Board hinterlegt worden sind durchgesprochen (siehe Bild Mural: Die wichtigsten Elemente von KidsScrum ).

Dieses Meeting liegt hauptsächlich in der Verantwortung des Team-Scrum-Masters, am Anfang (im ersten Durchgang von KidsScrum) unterstützt durch die Lehrkraft.

Bei diesem Meeting geht es darum, die Teamarbeit selbst zu beleuchten.

Wo steht das Team, in welcher (Team-)Phase befindet es sich, welche (Team-)Rollen haben ggf. die einzelnen Teammitglieder, welche Konflikte gibt es.

Was ist im abgelaufenen Durchgang gut gelaufen, was weniger gut, was will das Team behalten oder ausbauen, was will es lieber nicht wieder tun.

Zeitkontingent

Zeitkontingent

Vorschlag Sprintlänge und Meetings

1x Doppelstunde + 1x Einzelstunde

1-Wochen-Sprint: Planung zu Beginn der Doppelstunde, Teamsynchronisation bei der Einzelstunde, Feedback-Runde & Rückschau am Ende der Einzelstunde

2-Wochen-Sprint: Planung zu Beginn der ersten Doppelstunde, Teamsynchronisation bei der Einzelstunde in Woche 1+2 sowie in der Doppelstunde in der zweiten Woche, Feedback-Runde & Rückschau am Ende der Doppelstunde in der zweiten Woche.

1x die Woche Projektzeit (3-5 Stunden)

1-Tages-Sprint: Planung zu Beginn der Stunde, am Ende der Stunde Feedback-Runde und Rückschau. Die Rückschau kann auch auf den nächsten Termin vor die Teamsynchronisation bzw. die nächste Planung gelegt werden.

Lerntafel

Auf der hier dargestellten Lerntafel stehen oben rechts die Namen der Lernteam-Mitglieder.

Oben links ist Platz, um entweder die Lernziele oder die Problemstellung und Vision für das Lernprodukt zu notieren (vergleiche Box "Problemstellung & Vision").

In der priorisierten Lernliste werden die Lernschritte darunter der Priorität nach geordnet abgelegt. Die Akzeptanzkriterien stehen häufig auf der Rückseite der Karten. So kann das Lernteam schnell überprüfen, ob der Lernschritt bereits abgeschlossen werden kann.

Der größte Teil ist für eine Tabelle reserviert, auf der das Lernteam die Lern- und Lernteilschritte darstellt, an denen es aktuell arbeitet. In die Spalte auf der linken Seite werden alle Lernschritte (User Stories) gezogen, die ein Lernteam im kommenden Sprint fertigstellen möchte. Die Spalte daneben mit Lernteilschritten (Tasks) ist optional. Jeder Lernschritt kann noch einmal in kleine Unteraufgaben unterteilt werden, die zur Fertigstellung des Schrittes nötig sind. Dies bietet sich vor allem bei längeren Sprintzyklen und komplexeren Lernschritten an.

Um sich beim nächsten Treffen des Lernteams noch daran zu erinnern, wer an einer Aufgabe arbeiten wollte, notieren die Lernenden in der Regel ihren Namen auf den Lern- und Lernteilschritten.

In der Spalte In Arbeit hängen alle Lernschritte oder bei der Verwendung von Lernteilschritten alle Lernteilschritte, an denen das Lernteam aktuell arbeitet. Ziel ist es, dass alle Karten am Ende des Sprints in der Spalte Fertig hängen.

Burn-Down-Chart

Glossar

Rollen

Sie weisen den Schüler bzw. Lehrern bestimmte Aufgaben zu.

Product Owner (PO)

Lehrer, wird auch als Auftraggeber oder Lerncoach (S4S=Scrum4Schools) bezeichnet.

Entwicklungsteam

Gruppe aus Schülern, Schülerteam (eduscrum) oder Lernteam (S4S)

Scrum Master

Gruppenleiter/-sprecher der Schülergruppe, auch Strukturheld/in (S4S) genannt.

Ereignisse

Wiederkehrende Termine, Zeremonien,Meetings, Treffen

Sprint

Aufgaben, Lernjob für einen festgelegten Zeitraum (z.B. bis zu den nächsten Ferien), Story, Lernschritt

Sprint Planning

Blick ins Fernrohr (die Planung) am Anfang der 1. Stunde.

Daily Scrum

Täglicher Starttermin, Stand Up (eduscrum) vor jeder Stunde, Teamsynchronisation (S4S).

Sprint Review

Die Gruppen zeigen sich gegenseitig ihre Ergebnisse am Ende oder als Meilensteine zwischendurch, Feedbackrunde (S4S).

Sprint Retrospektive

Die Gruppe überlegt am Ende, ob es die Ergebnisse jetzt und in Zukunft verbessern kann, Rückschau (S4S).

Artefakte

Sie bündeln die Informationen und machen sie für alle Transparent

Sprint-Ziel

Aufgabenblatt, Handout, Auftrag,Arbeitsblatt, Lernstoff

Product-Backlog bzw. Sprint-Backlog

Ergebnis der Planung (in einer visuellen Übersicht), Flip oder Scrum-Board (eduscrum) oder Arbeitstafel, Lerntafel

Produktinkrement

Teilaufgaben, Lernstep, Lernschritt, Lernziele, Tasks

in Arbeit, Work in Progress

verbleibende, erforderliche Arbeit

# data[].attributes.attachment_link.description
1. SCRUM - Was ist SCRUM? Ein Überblick - mITSM GmbH Was ist SCRUM? - borisgloger consulting GmbH Kanban for Scrummies - borisgloger consulting GmbH Die Lernenden und ihre Interaktionen stehen über Prozessen und Werkzeugen. Das Zielprodukt steht über einer umfassenden Dokumentation. Die Zusammenarbeit und der Kommunikationsfluss mit dem Product Owner (Lehrer:in) ist grundlegend und wichtig.

# data[].attributes.attachment_link.title
WebSequenceDiagrams - Draw sequence diagrams online in seconds

# data[].attributes.attachment_link.description
Draw sequence diagrams in seconds using this free online tool.

# data[].attributes.attachment_link.readable_text
Pandas Tutor lets you write Python pandas code in your browser and see how it transforms your data step-by-step. (If you use R, check out Tidy Data Tutor.)

Why use this tool? Let's say you're trying to explain what this pandas code does:

(dogs[dogs['size'] == 'medium']
 .sort_values('type')
 .groupby('type').median()
)

Running this code in Jupyter shows only the input data and final result:

But this doesn't tell you what's going on behind the scenes.

What did this code just do? This single code expression has 4 steps (filtering, sorting, grouping, and aggregating), but only the final output is shown.

Where were the medium-sized dogs? This code filters for dogs with size"medium", but none of those dogs appear in the original table display (on the left) because they were buried in the middle rows.

How were the rows grouped? The output doesn't show which rows were grouped and aggregated together. (Note that printing apandas.GroupBy object won't display this information either.)

If you ran this same code in Pandas Tutor, you can teach students exactly what's going on step-by-step:

Or if you're a student, you can use this tool to explore and learn on your own. Check out more examples below:

# data[].attributes.attachment_link.title
Pandas Tutor - visualize Python pandas code

# data[].attributes.attachment_link.description
Pandas Tutor lets you write Python pandas code in your browser and see how it transforms your data step-by-step. (If you use R, check out Tidy Data Tutor.) Why use this tool?

# data[].attributes.body
Hier finden sich u. a. Python-orientierte Aufgaben

# data[].attributes.body
und weitere Lizenzen

# data[].attributes.attachment_link.description
Wenn Sie Programmieren lernen oder unterrichten, lassen Sie sich die branchenführenden Tools von JetBrains nicht entgehen! Kostenlose Bildungslizenzen für JetBrains-Tools.

# data[].attributes.body
erfordert Registrierung / Beispiel für Python z. B. https://youtu.be/Oz3W-LKfafE?t=1775

# data[].attributes.attachment_link.readable_text
Please, sign up to use our fast and easy-to-work weather APIs. As a start to use OpenWeather products, we recommend our One Call API 3.0. For more functionality, please consider our products, which are included in professional collections.

Professional collections

For professionals and specialists with middle sized project, we recommend our Professional collections, which included Current & Forecasts collection, Historical weather data collection, Weather Maps collection and other APIs.

For Enterprise level projects we provide Enterprise license, which is included all forecast products and current state, along with alerts, maps, and other products. Learn more

You can read the How to Start guide and enjoy using our powerful weather APIs right now.

Current & Forecast weather data collection

Climatic Forecast 30 days

Forecast weather data for 30 days

JSON format

Included in the Developer, Professional and Enterprise subscription plans

Global Weather Alerts
Push notifications

Get all the warnings from national weather agencies

Weather alerts are pushed to your endpoint as soon as they occur

Data feed provides all active weather alerts from the entire world

Each alert contents date, time, location, and detailed description

Monthly subscription. Please contact us to get access.

Solar Irradiance & Energy Prediction service

Solar Irradiance API

Get the solar data by particular location and calculate energy generation!

GHI, DNI, DHI indices for clear sky and cloudy sky models

Current data and forecast for 15 days ahead solar radiation data

40+ years of historical data (from January 1, 1979)

Daily aggregation for every day with hourly detalization for specified day

Historical solar irradiance and historical solar irradiance forecast bulks downloading

Available worldwide

Solar Panel Energy Prediction

Get the particular solar panel power output, based on the panel's technical characteristics!

Create unlimited number of solar panels for particular location with the desired specifications

Current and forecast for 15 days ahead solar panel power output data

40+ years of historical data (from January 1, 1979)

Daily aggregation for every day with hourly detalization for specified day

Available worldwide

Historical weather data collection

History Bulk

History Bulk provides weather data for any location for more than 40 years back
(from January 01, 1979).

Available through our Marketplace

CSV and JSON formats

Statistical Weather Data API

Statistical data on main weather parameters for any day and month of the year

The statistics is calculated based on our Historical weather data

JSON format

The weather data updated every hour

Included in Medium and Advanced subscription plans

Maps collection

Global Precipitation Maps Historical data

Current and historical weather maps for the previous 2 days

Historical precipitation data with 10-minutes step

Resolution higher than 1 km

Use as layers in Direct Tiles, OpenLayers, Leaflet, and Google Maps

Included in Professional and Enterprise subscription plans

Global Precipitation Maps Historical & Forecast data

Current, forecast and historical precipitation maps

Forecast is available for the next 6 hours for the US territory and for the next 2 hours for other global areas

The historical weather map for the previous 2 days

Data update period is every 10 minutes

Resolution higher than 1 km

Use as layers in Direct Tiles, OpenLayers, Leaflet, and Google Maps

Please contact us to get access

Other weather API's collection

Air Pollution API

Current, forecast and historical air pollution data

Forecast for 4 days ahead with 1-hour step

Air Pollution API includes both Air Quality Index and indices for CO, NO, NO₂, O₃, SO₂, NH₃, PM2.5, PM₁₀

Included in both free and paid subscriptions

Geocoding API

Geocoding API supports both the direct and reverse methods, working at the level of city names, areas and districts, countries and states

You can cap how many locations with the same name or the nearby geographic coordinates will be seen in the API response

Included in both free and paid subscriptions

Weather Stations

API for managing your personal weather stations

Connect your stations and transfer the measurements

Receive the aggregated measurements from the station

Included in both free and paid subscriptions

UV Index Deprecated

The product retired on 1st April 2021, please find UVI data in One Call API 3.0

Current UV index (Clear Sky), forecast and historical data are available for any geo location (lat/lon)

Interpretation of the UV Index and recommended protection are provided

JSON format

Weather Triggers

Simple syntax to create triggers which will be working upon the occurrence of specified weather conditions (temperature, humidity, pressure, etc.) in a certain period of time

The alerts will be generated in our service once the conditions set in the trigger are met

Included in both free and paid subscriptions

# data[].attributes.attachment_link.description
Simple and fast and free weather API from OpenWeatherMap you have access to current weather data, hourly, 5- and 16-day forecasts. Historical weather data for 40 years back for any coordinate. Weather maps, UV Index, air pollution and historical data

# data[].attributes.body
https://visualtk.com/

# data[].attributes.attachment_link.title
Visual TK, Visual Python Tkinter GUI Creator

# data[].attributes.attachment_link.description
With Visual TK, you can design Tkinter Form(Window) by dragging and dropping Widgets Button, Lables, CheckBox, RadioBox, Entry, ListBox, Message, Container and Frame.

# data[].attributes.attachment_link.readable_text
Du möchtest deinen Schülerinnen und Schülern einen Einblick in das Thema Künstliche Intelligenz geben? Du möchtest Zukunftsthemen im Unterricht behandeln? Du suchst kostenloses Unterrichtsmaterial zum Thema Künstliche Intelligenz? Dann bist du hier genau richtig.

Mithilfe unserer Unterrichtsmaterialien erhalten Schülerinnen und Schüler eine praktische Einführung in Künstliche Intelligenz und Machine Learning. In den Unterrichtseinheiten werden neben den kreativen, praktischen Übungen auch wichtige theoretische Grundlagen besprochen. Schülerinnen und Schüler verstehen, wo Künstliche Intelligenz zum Einsatz kommt. Sie programmieren und trainieren selbst eine einfache Künstliche Intelligenz. Anschließend erarbeiten die Schülerinnen und Schüler Faktoren für gute und schlechte Machine Learning Modelle.

Unsere Unterlagen im Überblick:

Als Lehrkraft kennst du dich selbst noch nicht mit dem Thema Künstliche Intelligenz aus? Kein Problem! Von uns erhältst du Materialien zur Vorbereitung und zur Unterrichtsgestaltung. Damit lernst du und deine Schülerinnen und Schüler das wichtige Themengebiet Künstliche Intelligenz kennen und verstehst anschließend Chancen und Risiken dieser neuen Technologie besser.

Warum Künstliche Intelligenz?

Künstliche Intelligenz verändert in vielen Bereichen unser Leben. Deshalb sollten alle Menschen die Grundlagen verstehen, um Chancen und Risiken beurteilen zu können.

Künstliche Intelligenz und Machine Learning kann praktisch vermittelt und erlebt werden. So können Schülerinnen und Schüler ohne Vorkenntnisse das Thema verstehen.

Es gibt tolle Tools zur Entwicklung von Künstlicher Intelligenz Anwendungen. Wir nutzen die Tools Machinlearningforkids, Scratch, App Inventor und die einsteigerfreundliche Programmiersprache Python.

Mit vielen praktischen Übungen tauchen wir in die spannende Welt der Künstlichen Intelligenz ein.

Die kostenlosen Unterlagen findest du auf unserer Online-Plattform im Bereich „Künstliche Intelligenz".
Empfohlen ab Klassenstufe 7.

# data[].attributes.attachment_link.description
Du möchtest deinen Schülerinnen und Schülern einen Einblick in das Thema Künstliche Intelligenz geben? Du möchtest Zukunftsthemen im Unterricht behandeln? Du suchst kostenloses Unterrichtsmaterial zum Thema Künstliche Intelligenz? Dann bist du hier genau richtig. Mithilfe unserer Unterrichtsmaterialien erhalten Schülerinnen und Schüler eine praktische Einführung in Künstliche Intelligenz und Machine Learning.

# data[].attributes.body
https://create.withcode.uk/

# data[].attributes.attachment_link.description
Write, run debug and share python code in your browser

# data[].attributes.body
englisch

# data[].attributes.body
englischsprachig

# data[].attributes.body
IDE inkl. Klassenmodellierer, Struktogramm usw.

# data[].attributes.attachment_link.readable_text
GuiPy ist eine Python-IDE für die Schule, die auf PyScripter basiert. Die meisten Python-IDEs unterstützen nur textbasiertes Codieren. GuiPy bietet stattdessen mehrere grafische Tools, die das Lernen und Lehren von Python-Programmierkonzepten unterstützen. Dazu gehören:

Klassen-Modellierer zum Modellieren von Klassen mit Attributen und Methoden

UML-Fenster mit Klassen und ihren Beziehungen. Durch Aufrufen des Konstruktors erstellen Sie Objekte. Methoden von Objekten ruften Sie dann interaktiv auf.

Struktogramm-Editor zum Modellieren von Algorithmen und Konvertieren in Python-Code.

Sequenzdiagramm-Editor zum Modellieren von Sequenzdiagrammen mit Lebenslinien und Aktivierungen.

Der Klassen-Modellierer ist ein einfach benutzbares Werkzeug zur Modellierung von Klassen. Mit dem Klassen-Modellierer können Sie neue Klassen erzeugen und bestehende Klassen bearbeiten. Er liest Python-Dateien und stellt sie als Klasse mit Attributen und Methoden dar. Änderungen im Klassen-Modellierer werden direkt in die zugehörige Python-Datei übernommen.

Die Reihenfolge der Attribute und Methoden im Strukturbaum kann mittels Drag&Drop verändert werden.

Den Klassen-Modellierer rufen Sie über das Symbol im Editorfenster auf. Sie können auch auf die gewünschte Klasse im UML-Fenster doppelklicken oder das Kontextmenü verwenden, um den Klassen-Modellierer aufzurufen.

Der Klassen-Modellierer berücksichtigt den UML-Standard, weswegen auch String als Datentyp angeboten wird. Bei der Umsetzung in Python-Quellcode wird daraus automatisch str.

Nachdem Sie eine Klasse mit dem Klassenmodellierer modelliert haben, ist es an der Zeit, Ihr Modell zu testen. Im uml-Fenster können Sie durch Öffnen des Kontextmenüs einer Klasse mit der rechten Maustaste den Konstruktor zum interaktiven Erstellen eines Objekts aufrufen.

Wenn Sie anschließend das Kontextmenü des erstellten Objekts aufrufen, können Sie die Attribute bearbeiten und die Methoden des Objekts aufrufen. Geänderte Attributwerte sind leicht zu erkennen und Objekte, die durch einen Methodenaufruf erstellt wurden, werden sofort angezeigt. Dies ist besonders nützlich, wenn Sie mit dynamischen Datenstrukturen wie Listen und Bäumen arbeiten.

Nach dem Testen eines Modells im UML-Fenster kann man es in einem Konsolen- oder GUI-Programm benutzen.

Es ist ziemlich kompliziert eine graphische Benutzungsoberfläche mit Layout-Managern zu gestalten. Schülerinnen und Schüler haben damit erhebliche Schwierigkeiten. Viel einfacher ist es mittels Drag&Drop Widgets an die gewünschte Position auf dem Formular zu ziehen. Der in GuiPy verfügbare GUI-Designer benutzt daher keine Layout-Manager sondern absolute Positionierung, womit man ziemlich schnell sein Layout gestalten kann.

Um ein GUI-Programm zu erstellen, klicken Sie auf das Symbol der Registerkarte „Programm". Dadurch werden ein Programgerüst in einem Editorfenster und ein GUI-Formular bereitgestellt.

Um ein Widget zu platzieren, klicken Sie zuerst auf dessen Symbol auf der Registerkarte Tkinter oder TTK und dann auf das GUI-Formular. Alternativ können Sie ein Widget per Drag & Drop von einer Registerkarte auf Ihr GUI-Formular ziehen. Anschließend können Sie das Widget positionieren und mit dem Objektinspektor konfigurieren. Der Quellcode wird entsprechend synchronisiert.

Mit dem Symbol eines Quellcode-Editors öffnen Sie das zugehörige GUI-Formular.

Das GUI-Formular verfügt über ein Kontextmenü zum Bearbeiten der Widgets.

GuiPy verfügt über einen Struktogrammeditor, mit dem Struktogramme erstellt und bearbeitet werden können.

Die Modellierung von Abläufen mit Struktogrammen auf einer programmiersprachlich unabhängigen Ebene spielt im Informatikunterricht eine wichtige Rolle, weil Algorithmen auf einer abstrakten Ebene ohne konkrete programmiersprachliche Details modelliert werden können. Ein Algorithmus kann verstanden werden, ohne dass man ihn selbst in Python programmieren kann. Händisches Zeichnen von Struktogrammen auf Papier bringt keine ansehlichen Ergebnisse, weil Strukturänderungen praktisch nicht möglich sind. Mit dem Struktogrammeditor können Struktogramme einfach, schnell und korrekt erstellt werden.

Aus Struktogrammen kann Python-Quellcode generiert werden, der aber dann noch nach bearbeitet werden muss. Dies unterstützt beim Implementieren in Python. Der umgekehrte Weg geht auch. Im Editor kann man Quelltext auswählen und daraus ein Struktogramm erzeugen lassen.

Per Drag&Drop können Struktogrammelemente in ein Struktogramm eingefügt und aus einem Struktogramm herausgezogen werden. Zieht man ein Strktogrammelement nach unten, werden alle darauf folgenden Elemten auch mitabgetrennt. Aus der linken Symbolleiste lassen sich Struktogramelemente herausziehen, zum Löschen kann man sie zurück auf die Symbolleiste ziehen. Leere Struktogrammelemente klickt man an und tippt den Text einfach ein. Zum nachträglichen Editieren doppelklickt man den betreffenden Text.

Das grüne P erzeugt aus dem Struktogramm soweit möglich eine Pythonfunktion. In der Konfiguration können die im Struktogramm verwendeten Texte angepasst werden.

Mit dem Sequenzdiagramm-Editor können Sie ein Sequenzdiagramm interaktiv erstellen. Lebenslinien gibt in zwei Formen, als Akteur und mit benanntem Kopf. Sie werden mit Hilfe der Symbolleiste eingefügt. Zum Herstellen einer Verbindung zwischen Lebenslinien benutzt man das Kontextmenü einer Lebenslinie und ruft dort verbinden mit auf. Zum Verändern von Texten rufen sie den Texteditor durch Doppelklicken auf.

Sequenzdiagramme werden mit der Dateierweiterung psd gespeichert. Es handelt sich um Textdateien, die auch mit externen Texteditoren bearbeitet werden können.

GuiPy wird unter Windows entwickelt.

Der GuiPy funktioniert unter Linux mit der Wine-Erweiterung. Hinweise zur Installation finden Sie auf der WineHQ Seite. Unter Wine wird die Schriftart Monospace empfohlen. Manche Schriftarten funktionieren nicht im Editor.

GuiPy läuft auf dem Mac sowohl mit CrossOver Office (Wine) als auch in einer virtualisierten Windowsumgebung problemlos.

Bei einem 64-Bit Mac funktioniert er unter der Virtualisierungssoftware VMWare Fusion einwandfrei.

Auf einem Mac mit M1 oder M2 Prozessor kann man GuiPy wie folgt einrichten. Zunächst lädt man die kostenlose Software UTM herunter https://mac.getutm.app/ und installiert diese. Zur Installation zieht man im UTM-Fenster das UTM-Icon auf das Applications-Icon.

Die bei UTM befindlichen Anleitungen zum Download einer Windows-ISO-Datei sind kompliziert und führen oft nicht zum Ziel. Daher installiert man sich im nächsten Schritt die Testversion von Paralles für Mac https://www.parallels.com/de/products/desktop/. Mit Parallels lädt man dann eine funkionierende Windows-11-ISO-Datei herunter. Die Testversion von Parallels deinstalliert man wieder. Zum Schluss ruft man UTM auf und erzeugt sich eine virtuelle Maschine mit Windows 11.

In Windows 11 wird dann zuerst Python und dann GuiPy installiert. Von https://python.org laden Sie sich eine 64-Bit Version von Python (x64/amd) herunter und installieren diese. Typischerweise wird nach C:\Users\<username>\AppData\Local\Programs\Python\Python3xx installiert.

Aktuell lässt sich die 64-Bit „Personal Version" von GuiPy nicht installieren. Laden Sie sich deshalb die „Spezial Version" herunter und entpacken Sie die Zip-Datei. Starten Sie dann das Programm setup.exe und installieren Sie in den vorgeschlagenen Ordner C:\Program Files\GuiPy\.

Nach dem Start von GuiPy kommt ein Hinweis auf eine fehlende Pythonversion. Schließen Sie beide dazugehörende Fenster. Öffnen Sie dann über das Menü Fenster die Konfiguration. Klicken Sie „nicht registrierte Versionen" an und dann auf „Hinzufügen". Wählen Sie den Installationsordner von Python aus:

Wählen Sie abschließend die so in GuiPy bereitgestellte Pythinversion aus und aktivieren Sie diese.

# data[].attributes.attachment_link.description
GuiPy ist eine Python-IDE für die Schule, die auf PyScripter basiert. Die meisten Python-IDEs unterstützen nur textbasiertes Codieren. GuiPy bietet stattdessen mehrere grafische Tools, die das Lernen und Lehren von Python-Programmierkonzepten unterstützen. Dazu gehören: Klassen-Modellierer zum Modellieren von Klassen mit Attributen und Methoden UML-Fenster mit Klassen und ihren Beziehungen.

# data[].attributes.body
Online-Tool zum Modellieren von Datenflussdiagrammen mit Auswertungsfunktion.

# data[].attributes.body
ab 10. Klasse

# data[].attributes.attachment_link.readable_text
Fall 181120 überträgt die Spielerfahrung sogenannter Live-Escape-Games auf den Informatik-Unterricht. Das Spiel stellt Teams aus bis zu 6 Schülerinnen und Schülern ab Klassenstufe 10 vor die Herausforderung, in 90 Minuten die Ermittlungen in einem fiktiven Kriminalfall nachzuvollziehen. Dabei wollen nicht nur unterschiedliche multimediale Spuren in den korrekten Zusammenhang gebracht werden: Um die Rätsel zu lösen, müssen die Spielerinnen und Spieler ihre informatischen Kompetenzen gekonnt anwenden.

Das Szenario

In Berlin kam es durch einen Hackerangriff zu einem Stromausfall. Nachdem Kommissar Braun nach einem Monat Ermittlungsarbeit seinen Vorgesetzten mitteilt, dass der Fall gelöst sei, verschwindet er spurlos. Der Polizeipräsident wendet sich nun an das aus den Schülerinnen und Schülern bestehende Sonderermittlungsteam, um die Arbeit des Kommissars an dem Fall und sein Ergebnis zu rekonstruieren. Nachdem sie der Spur des Hackers und des Kommissars durch mehrere Städte Europas gefolgt ist, entdeckt die Gruppe am Ende die Wahrheit hinter dem Hackerangriff und dem Verschwinden des Kommissars.

Das Spielprinzip

Die Schülerinnen und Schüler bekommen die Beweismittelkiste und einen Brief des Polizeipräsidenten übergeben. Dieser erklärt die Ziele und Regeln des Spiels und bringt die jungen Ermittler auf die ersten Spuren. Die Gruppe wird dann vom Notizbuch des verschwundenen Ermittlers von Rätsel zu Rätsel geführt. Das Spiel wurde so konzipiert, dass die Spielerinnen und Spieler während des Spiels keine Hilfe durch die Lehrkraft in Anspruch nehmen müssen. Dafür wurden zu jedem Rätsel zwei Tipps und eine Lösung in das Spiel integriert, die nach Ermessen der Gruppe jederzeit verwendet werden dürfen. Da der Lehrkraft keine Aufgaben der Spielsteuerung zuteil werden, kann sie sich während des Spiels darauf konzentrieren, die gruppendynamischen Prozesse zu beobachten, und gegebenenfalls bei der Gruppenorganisation helfen.

Die Informatik

Fall 181120 zielt nicht auf einen eingegrenzten Informatikinhalt ab. Vielmehr sollen die Spielenden aus ihrem Repertoire an informatischen Fähigkeiten schöpfen, um die Rätsel zu lösen. Dadurch eignet sich sich das Spiel unabhängig vom aktuellen Lerninhalt als motivierender Kontrast zum Schulalltag. Zu den informatischen Kenntnissen, die im Spiel gefordert sind, gehören u.a.

Grundbausteine von Algorithmen

Graphen, Bäume und Algorithmen auf Graphen

Automaten und Zustandsdiagramme

Codierung

Persönlichkeiten der Informatik

Dabei müssen diese Themenfelder nicht explizit im Unterricht behandelt worden sein. Das Spiel setzt vielmehr ein allgemeines Informatik-Verständnis voraus und ist einfacher zu bewältigen, wenn bestimmte in der Informatik typische Darstellungsformen bekannt sind.

Detaillierte Informationen über Fall 181120 finden sich im Handbuch zum Spiel.

Kürzer, leichter verständlich, weniger Aufwand! Wir haben unsere Erfahrungen mit Fall 181120 genutzt und das Spiel weiterentwickelt.
Zur Download-Seite
Gegenüber der ersten Version hat sich folgendes verändert:

Mehr Übersicht: Wir haben die Menge an Material verringert.

Mehr Parallelität: Nun können noch mehr Rätsel gleichzeitig bearbeitet werden.

Mehr Verständlichkeit: Wir haben hier und da an den Formulierungen gefeilt und auch der Ton im Video ist besser zu verstehen.

Weniger Rätsel: Wir haben zwei Rätsel entfernt, damit das Spiel in der geplanten Zeit machbar ist. Weitere Rätsel haben wir gekürzt.

Weniger Aufwand: Das Nachbauen des Spiels ist nicht nur wesentlich simpler, sondern auch kostengünstiger.

Sämtliche downloadbare Dateien der alten Version finden sich auf der Download-Seite.
Zur Download-Seite

# data[].attributes.attachment_link.description
Fall 181120 ist ein neues kooperatives Rätselspiel der Universität Potsdam. Ähnlich einem Live-Escape-Game stehen die Schülerinnen und Schüler in Gruppen vor der Herausforderung, einen mit Rätseln gespickten Kriminalfall um einen Hackerangriff zu lösen. So prüfen und vertiefen sie auf spielerische Weise ihre informatischen Kenntnisse.

# data[].attributes.body
Viele Coding-Beispiele zum Bearbeiten mit Stift und Papier inkl. fortgeschrittener Konzepte, englischsprachig unter CC-Lizenz.

# data[].attributes.attachment_link.readable_text
I made this game so I can improve my daughter's ability to read and debug code. Each card has something interesting to teach. The game is simple, pick a card, read the code, throw a 20 sided dice (wherever you see the ⚂ symbol) to get a value and evaluate the code together with your kid.

NB: I am a overwhelmed by requests, so shipping is a bit delayed, but hopefully I can clear the queue by tomorrow. Thanks for all the support!

deck: easy.html

code: programming-time

memory: memory.txt

cheatsheet: cheatsheet.txt

price: 10€ per deck plus 10€ shipping, or print it yourself for free, you can also print it on 7 pages a4 paper (landscape) and cut it. I printed 300 decks with a professional card printing company, 150 I will donate to the local coding schools.

author: github.com/jackdoe

co author: Jackie (10 yo), the game was her idea and she helped with the implementation

contact: programmingtime@fastmail.com

license: CC BY 4.0

Example cards (6 out of 55):

As you can see they cover all kinds of topics, some are more advanced, some are quite trivial, but the key is you take a dice and pen and paper and follow the code together.

PS: the back of the cards and the cover is an ascii string.

# data[].attributes.attachment_link.description
I made this game so I can improve my daughter's ability to read and debug code. Each card has something interesting to teach. The game is simple, pick a card, read the code, throw a 20 sided dice (wherever you see the ⚂ symbol) to get a value and evaluate the code together with your kid.

# data[].attributes.body
React Python IDE (react-python-ide.vercel.app)

# data[].attributes.attachment_link.description
We're a large, friendly community focused around the Python programming language. Our community is open to those who wish to learn the language, as well as those looking to help others.

# data[].attributes.body
Bietet diverse Grundlagenübungen an.
https://github.com/trekhleb/learn-python

# data[].attributes.attachment_link.readable_text
This is a collection of Python scripts that are split by topics and contain code examples with explanations, different use cases and links to further readings.

It is a playground because you may change or add the code to see how it works and test it out using assertions. It also allows you to lint the code you've wrote and check if it fits to Python code style guide. Altogether it might make your learning process to be more interactive and it might help you to keep code quality pretty high from very beginning.

It is a cheatsheet because you may get back to these code examples once you want to recap the syntax of standard Python statements and constructions. Also because the code is full of assertions you'll be able to see expected functions/statements output right away without launching them.

You might also be interested in 🤖 Interactive Machine Learning Experiments

Each Python script in this repository has the following structure:

"""Lists  <--- Name of the topic here

# @see: https://www.learnpython.org/en/Lists  <-- Link to further readings goes here

Here might go more detailed explanation of the current topic (i.e. general info about Lists).
"""


def test_list_type():
    """Explanation of sub-topic goes here.

    Each file contains test functions that illustrate sub-topics (i.e. lists type, lists methods).
    """

    # Here is an example of how to build a list.  <-- Comments here explain the action
    squares = [1, 4, 9, 16, 25]

    # Lists can be indexed and sliced.
    # Indexing returns the item.
    assert squares[0] == 1  # <-- Assertions here illustrate the result.
    # Slicing returns a new list.
    assert squares[- 3:] == [9, 16, 25]  # <-- Assertions here illustrate the result.

So normally you might want to do the following:

Find the topic you want to learn or recap.

Read comments and/or documentation that is linked in each script's docstring (as in example above).

Look at code examples and assertions to see usage examples and expected output.

Change code or add new assertions to see how things work.

Run tests and lint the code to see if it work and is written correctly.

Installing Python
Make sure that you have Python3 installed on your machine.

You might want to use venv standard Python library to create virtual environments and have Python, pip and all dependent packages to be installed and served from the local project directory to avoid messing with system wide packages and their versions.

Depending on your installation you might have access to Python3 interpreter either by running python or python3. The same goes for pip package manager - it may be accessible either by running pip or pip3.

You may check your Python version by running:

Note that in this repository whenever you see python it will be assumed that it is Python 3.
Installing dependencies
Install all dependencies that are required for the project by running:

pip install -r requirements.txt

Tests are made using pytest framework.

You may add new tests for yourself by adding files and functions with test_ prefix (i.e. test_topic.py with def test_sub_topic() function inside).

To run all the tests please execute the following command from the project root folder:

To run specific tests please execute:

pytest ./path/to/the/test_file.py

Linting is done using pylint and flake8 libraries.

PyLint

To check if the code is written with respect to PEP 8 style guide please run:

In case if linter will detect error (i.e. missing-docstring) you may want to read more about specific error by running:

pylint --help-msg=missing-docstring
More about PyLint
Flake8

To check if the code is written with respect to PEP 8 style guide please run:

Or if you want to have more detailed output you may run:

flake8 ./src --statistics --show-source --count
More about Flake8
You may support this project via ❤️️ GitHub or ❤️️ Patreon.

# data[].attributes.attachment_link.description
This is a collection of Python scripts that are split by topics and contain code examples with explanations, different use cases and links to further readings. It is a playground because you may change or add the code to see how it works and test it out using assertions.

# data[].attributes.body
Bietet eine sehr umfassende Sammlung auch anspruchsvollerer Coding-Prinzipien.
Python/DIRECTORY.md at master · TheAlgorithms/Python · GitHub

# data[].attributes.attachment_link.title
GitHub - TheAlgorithms/Python: All Algorithms implemented in Python

# data[].attributes.attachment_link.description
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or window. Reload to refresh your session. Reload to refresh your session.

# data[].attributes.body
https://github.com/vinta/awesome-python

# data[].attributes.attachment_link.title
GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resources

# data[].attributes.attachment_link.description
A curated list of awesome Python frameworks, libraries, software and resources. Inspired by awesome-php. Libraries for administrative interfaces. Python implementation of data structures, algorithms and design patterns. Also see awesome-algorithms. ASGI-compatible web servers. asyncio - (Python standard library) Asynchronous I/O, event loop, coroutines and tasks. trio - A friendly library for async concurrency and I/O.

# data[].attributes.body
https://github.com/practical-tutorials/project-based-learning#python

# data[].attributes.attachment_link.description
A list of programming tutorials in which aspiring software developers learn how to build an application from scratch. These tutorials are divided into different primary programming languages. Tutorials may involve multiple technologies and languages. To get started, simply fork this repo. Please refer to CONTRIBUTING.md for contribution guidelines.

# data[].attributes.body
https://github.com/zhiwehu/Python-programming-exercises

# data[].attributes.attachment_link.description
100+ Python challenging programming exercises. Contribute to zhiwehu/Python-programming-exercises development by creating an account on GitHub.

# data[].attributes.body
Machine Learning (google)
https://github.com/tensorflow/tensorflow

# data[].attributes.attachment_link.readable_text
Documentation

TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications.

TensorFlow was originally developed by researchers and engineers working on the Google Brain team within Google's Machine Intelligence Research organization to conduct machine learning and deep neural networks research. The system is general enough to be applicable in a wide variety of other domains, as well.

TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backward compatible API for other languages.

Keep up-to-date with release announcements and security updates by subscribing to announce@tensorflow.org. See all the mailing lists.

Install

See the TensorFlow install guide for the pip package, to enable GPU support, use a Docker container, and build from source.

To install the current release, which includes support for CUDA-enabled GPU cards (Ubuntu and Windows):

$ pip install tensorflow

A smaller CPU-only package is also available:

$ pip install tensorflow-cpu

To update TensorFlow to the latest version, add --upgrade flag to the above commands.
Nightly binaries are available for testing using the tf-nightly andtf-nightly-cpu packages on PyPi.
Try your first TensorFlow program

For more examples, see the TensorFlow tutorials.

Contribution guidelines
If you want to contribute to TensorFlow, be sure to review the contribution guidelines. This project adheres to TensorFlow'scode of conduct. By participating, you are expected to uphold this code. We use GitHub issues for tracking requests and bugs, please seeTensorFlow Discuss for general questions and discussion, and please direct specific questions toStack Overflow.
The TensorFlow project strives to abide by generally accepted best practices in open-source software development:

Continuous build status

Official Builds

Build Type

Status

Artifacts

Linux XLA
TBA

Android

Community Supported Builds

Build Type

Status

Artifacts

Linux aarch64 CPU Nightly (OpenLab)
Python 3.6
Nightly

Red Hat® Enterprise Linux® 7.6 CPU & GPU
Python 2.7, 3.6
1.13.1 PyPI

Community Supported Containers

Resources

Learn more about the TensorFlow community and how to contribute.

License
Apache License 2.0

# data[].attributes.attachment_link.description
Documentation TensorFlow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML-powered applications.

# data[].attributes.body
https://github.com/jerry-git/learn-python3

# data[].attributes.attachment_link.description
Jupyter notebooks for teaching/learning Python 3. Contribute to jerry-git/learn-python3 development by creating an account on GitHub.

# data[].attributes.body
https://github.com/joaoventura/full-speed-python

# data[].attributes.attachment_link.title
GitHub - joaoventura/full-speed-python: Full Speed Python: a book for self-learners

# data[].attributes.attachment_link.description
Pdf and epub files can be downloaded from: https://github.com/joaoventura/full-speed-python/releases/ This book aims to teach the Python programming language using a practical approach. Its method is quite simple: after a short introduction to each topic, the reader is invited to learn more by solving the proposed exercises.

# data[].attributes.body
https://github.com/rasbt/python_reference

# data[].attributes.attachment_link.title
GitHub - rasbt/python_reference: Useful functions, tutorials, and other Python-related things

# data[].attributes.attachment_link.description
Python tips and tutorials [back to top] A collection of not so obvious Python stuff you should know!

# data[].attributes.body
https://github.com/MTrajK/coding-problems

# data[].attributes.attachment_link.title
GitHub - MTrajK/coding-problems: Solutions for various coding/algorithmic problems and many useful resources for learning algorithms and data structures

# data[].attributes.attachment_link.description
Solutions for various coding/algorithmic problems and many useful resources for learning algorithms and data structures - GitHub - MTrajK/coding-problems: Solutions for various coding/algorithmic problems and many useful resources for learning algorithms and data structures

# data[].attributes.attachment_link.title
Dokumentationen zum Unterricht (Fernunterricht) – Chrissis’ Edublog

# data[].attributes.attachment_link.description
Die Dokumentationen sind in folgendem nach Themen aufgeführt. Sie dienen der Orientierung! Sie enthalten Lösungen zu den Arbeitsmaterialien und können vom Umfang her abweichen von den im Unterricht geleisteten Lösungen. Das ist hauptsächlich abhängig von dem Vertiefungsumfang und der geleisteten Stu…

# data[].attributes.attachment_link.title
GitHub - alievk/avatarify-desktop: Successor of Avatarify Python

# data[].attributes.attachment_link.description
Avatarify for desktop with a user friendly interface. Windows 10 Nvidia GPU: GeForce 1070 or higher is recommended Web camera Download Avatarify Desktop (897 Mb). Double click on the installer. Windows Defender warning screen may pop up telling that the app comes from an unknown source. Click "More info", then "Run anyway".

# data[].attributes.attachment_link.provider_name
py.CheckiO - Python coding challenges and exercises with solutions for beginners and advanced

# data[].attributes.attachment_link.title
py.CheckiO - Python coding challenges and exercises with solutions for beginners and advanced

# data[].attributes.attachment_link.description
py.CheckiO - Python practice online. Improve your coding skills by solving coding challenges and exercises online with your friends in a fun way. Exchanges experience with other users online through fun coding activities.

# data[].attributes.attachment_link.description
Join a global community working to strengthen the Commons

# data[].attributes.attachment_link.description
Python Tutorials → In-depth articles and video courses Learning Paths → Guided study plans for accelerated learning Quizzes → Check your learning progress Browse Topics → Focus on a specific area or skill level Community Chat → Learn with other Pythonistas Office Hours → Live Q&A calls with Python experts Podcast → Hear what's new in the world of Python Books → Round out your knowledge and learn offline Unlock All Content →

# data[].attributes.body
UML, EPK usw. online und kostenfrei

# data[].attributes.attachment_link.readable_text
yEd Live is the browser version of the powerful yEd desktop application. No more installer is needed to quickly and effectively create high-quality diagrams. Built upon our JavaScript diagramming library yFiles, the automatic layout algorithms arrange even large data sets with just the press of a button.

Create, import, or share graphs on any device that operates a modern browser. Even graphs that have been generated with the yEd Graph Editor application can now be shared with colleagues and friends without them having to install the desktop application.

# data[].attributes.attachment_link.description
yEd Live is the browser version of the powerful yEd desktop application. No more installer is needed to quickly and effectively create high-quality diagrams. Built upon our JavaScript diagramming library yFiles, the automatic layout algorithms arrange even large data sets with just the press of a button.

# data[].attributes.attachment_link.description
draw.io is a free online diagramming application and flowchart maker . You can use it to create UML, entity relationship, org charts, BPMN and BPM, database schema and networks. Also possible are telecommunication network, workflow, flowcharts, maps overlays and GIS, electronic circuit and social network diagrams.

# data[].attributes.body
Aufrufen einer Wetterdatenbank inkl. grafischer Aufbereitung der GUI (englischsprachig)

# data[].attributes.attachment_link.title
How to Program a GUI Application (with Python Tkinter)!

# data[].attributes.body
Open Source und mit vielen kollaborativen Diensten versehen, z. B. KANBAN-Board, markdown, Whitebard und Klassikern wie Text, Tabellen und Präsentationen

# data[].attributes.attachment_link.readable_text
JavaScript must be enabled to perform encryption in your browser

يجب أن يكون جافاسكربت مُمَكن لتمكين التشفير في متصفحك

El JavaScript ha d'estar habilitat per a realitzar l'encriptatge al navegador

JavaScript muss aktiviert sein, um die Verschlüsselung in deinem Browser zu ermöglichen

JavaScript debe estar activado para realizar la encriptación en tu navegador

JavaScript gaituta egon behar da zure nabigatzailean enkriptaketak egiteko

JavaScript doit être activé pour effectuer le chiffrement dans votre navigateur

ブラウザーで暗号化を行うにはJavaScriptが有効になっている必要があります

Для выполнения шифрования в вашем браузере должен быть включен JavaScript

JavaScript måste vara aktiverat för att utföra kryptering i din webbläsare

必须启用 JavaScript 才能在浏览器中进行加密

# data[].attributes.body
"CS Unplugged ist eine Sammlung kostenloser Lehrmaterialien, durch die Informatik anhand von anregenden Spielen und Aufgaben mit Karten, Bindfaden, Wachsstiften und viel Herumrennen gelehrt wird."

Zielgruppe: 5-14 Jahre

# data[].attributes.attachment_link.description
CS Unplugged is a collection of free teaching material that teaches Computer Science through engaging games and puzzles that use cards, string, crayons and lots of running around.

# data[].attributes.attachment_link.readable_text
This is the text of a revised funding proposal that we sent to DARPA in August 1999. In March, we heard that at least an earlier version of the proposal was accepted by DARPA; the work has begun late 1999 and will hopefully last two years, although we've only received funding for the first year (through October 2000). We're keeping our fingers crossed for the rest.

Unfortunately, the move of the Python development team to other employers meant that we didn't get to complete the CP4E project at CNRI. This move was motivated in a large part by the disappointingly small amount of funding that DARPA committed to CP4E.

The project is now in limbo; IDLE is still being developed, but we aren't actively pursuing the other goals of CP4E. Other people are, however; this is generally discussed in the EDU-SIG mailing list.

Note:I have made one change to the text of the proposal: At the request of some supporters of other languages, I've withdrawn a language comparison chart that contained highly personal and sometimes unfounded opinions of other languages. The table was being used out of context in a way that some found objectionable. (Not all of the table is disputed, but it seems wiser not to engage in direct language comparisons without a lot more documentation.)

I've also removed some administrative details from the text and made some minor changes to accommodate HTML. I apologize for the writing style, which is at times more representative of funding proposals than most of the prose I write. I would like to thank Jeremy Hylton, Barry Warsaw, Al Vezza, Bob Kahn, Randy Pausch and David Beazley for contributions and suggestions that made this a successful proposal.

--Guido van Rossum

More resources are listed on the pages below:

Python in Education Special Interest Group (EDU-SIG)

IDLE - Python's own Interactive DeveLopment Environment

DARPA proposal - where it all started

Discussion of CP4E on Ward Cunningham's original Wiki.

Point of Contact: Guido van Rossum
Corporation for National Research Initiatives
1895 Preston White Drive, Suite 100
Reston, VA 20191-5434
Tel: (703) 620-8990
Fax: (703) 620-0913
Email: guido@cnri.reston.va.us
In the seventies, Xerox PARC asked: "Can we have a computer on every desk?" We now know this is possible, but those computers haven't necessarily empowered their users. Today's computers are often inflexible: the average computer user can typically only change a limited set of options configurable via a "wizard" (a lofty word for a canned dialog), and is dependent on expert programmers for everything else.

We ask a follow-up question: "What will happen if users can program their own computer?" We're looking forward to a future where every computer user will be able to "open the hood" of their computer and make improvements to the applications inside. We believe that this will eventually change the nature of software and software development tools fundamentally.

We compare mass ability to read and write software with mass literacy, and predict equally pervasive changes to society. Hardware is now sufficiently fast and cheap to make mass computer education possible: the next big change will happen when most computer users have the knowledge and power to create and modify software.

The open source movement claims that peer review of software by thousands can greatly improve the quality of software. The success of Linux shows the value of this claim. We believe that the next step, having millions (or billions) of programmers, will cause a change of a different quality--the abundant availability of personalized software.

The tools needed for this new way to look at programming will be different from the tools currently available to professional programmers. We intend to greatly improve both the training material and the development tools available. For example, non-professional programmers should not have to fear that a small mistake might destroy their work or render their computer unusable. They also need better tools to help them understand the structure of a program, whether explicit or implied in the source code.

Our plan has three components:

Develop a new computing curriculum suitable for high school and college students.

Create better, easier to use tools for program development and analysis.

Build a user community around all of the above, encouraging feedback and self-help.

These components come together in the scientific exploration of the role of programming in next generation computing environments.
We intend to start with Python, a language designed for rapid development. We believe that Python makes a great first language to learn: Unlike languages designed specifically for beginners, Python is also the choice of many programming professionals. It has an active, growing user community which has already expressed much interest in this proposal, and we expect that this will be a fertile first deployment ground for the teaching materials and tools we propose to create. During the course of the research we will evaluate Python and propose improvements or alternatives.

CNRI proposes to undertake a research effort called Computer Programming for Everybody (CP4E). This effort intends to improve the state of the art of computer use, not by introducing new hardware, nor even (primarily) through new software, but simply by empowering all users to be computer programmers.

Recent developments in computer and communication hardware have given many people access to powerful computers, in the form of desktops, laptops, and embedded systems. It is time to give these users more control over their computers through education and supporting software. If users have a general understanding of computers at the level of software design and implementation, this will cause a massive surge in productivity and creativity, with a far-ranging impact that can barely be anticipated or imagined.

On a shorter term, the quantity and quality of available computer software will improve drastically, as the imagination and labor of millions is applied to the problem. Inventive users will be able to improve the software that supports them in their tasks, and share their improvements with their colleagues or--via the Internet--with others far away who are faced with the same tasks and problems. The ability to modify or customize software is important in crisis situations, when experts cannot be appealed to for help. It is also important for day-to-day activities: The number of unfilled programming jobs is currently estimated by some at 200,000 to 400,000.

The two major research goals are the development of a prototype of a new programming curriculum and matching prototype software comprising a highly user-friendly programming environment. We envision that the typical target audience will consist of high school and (non-CS major) undergraduate college students, although younger students and adults will also be considered. Course and software will normally be used together, so they should be tightly tuned to each other; each will also be usable on its own.

We will also explore the role of programming in the future. We are rapidly entering an age where information appliances, wearable computers, and deeply networked, embedded CPUs in everyday objects offer users control over their physical and information environments. End-user programmability will be the key to unlocking the potential of these technologies. (This is a common theme of DARPA's Information Technology Expeditions, cf. [Dertouzos].)

The research effort will not be done in isolation. We will engage academic research groups as well as several leading high schools. We will also build a larger community by making our course materials and software freely available on the Internet.

We plan to start by basing both components on Python, a popular free interpreted object-oriented language [Python] [Lutz] [Watters]. Originally developed at CWI in Amsterdam, Python is currently being developed and maintained by CNRI. Python is extremely suitable for teaching purposes, without being a "toy" language: it is very popular with computer professionals as a rapid application development language. Python combines elements from several major programming paradigms (procedural, functional and object-oriented) with an elegant syntax that is easy on the eyes and easy to learn and use. While we believe that Python is a good starting point, undoubtedly we will learn that improvements are possible. As part of our research, we will evaluate the effectiveness of Python for education and use by beginners, and design improvements or alternatives.

We expect that the fruits of our research will be demonstrable within two years and can impact society as a whole within a decade. This is the point when children who learn computer programming using our course in high school will start joining the work force (and the military). We expect the new mobile and embedded computing and communication technologies mentioned above to reach maturity around the same time. Thus, our timelines are nicely matched.

In the dark ages, only those with power or great wealth (and selected experts) possessed reading and writing skills or the ability to acquire them. It can be argued that literacy of the general population (while still not 100%), together with the invention of printing technology, has been one of the most emancipatory forces of modern history.

We have only recently entered the information age, and it is expected that computer and communication technology will soon replace printing as the dominant form of information distribution technology. About half of all US households already own at least one personal computer, and this number is still growing.

However, while many people nowadays use a computer, few of them are computer programmers. Non-programmers aren't really "empowered" in how they can use their computer: they are confined to using applications in ways that "programmers" have determined for them. One doesn't need to be a visionary to see the limitations here.

An even more radical change is the introduction of computing and communications embedded in home and office systems. The number of devices that will contain programmable elements is expected to grow dramatically in the coming years. We must learn how to expose this programmability to users in a meaningful way and to make it easy for non-programmers to control and program these devices.

In this "expedition into the future," we want to explore the notion that virtually everybody can obtain some level of computer programming skills in school, just as they can learn how to read and write.

There are many challenges for programming languages and environments to be used by a mass audience. If everybody is a programmer, poor programmers will surely abound. Coping with this situation adequately requires a rethinking of the fundamental properties of programming languages and development tools. Yet, we believe that there should be no clear-cut distinction between tools used by professionals and tools used for education--just as professional writers use the same language and alphabet as their readers!

Given the ever more pervasive use of computers and software in every aspect of society, we expect the need for programming skills will only increase. While most quality software will be produced by professionals, there will be a need for more programming and customizability by end users.

Examples of this drive for flexibility can be seen in both present-day computing and its likely future:

Increasingly powerful applications for desktop and laptop computers use scripting and macro facilities.

Growth of the Internet has led directly to greater need for programmability to create active and interactive Web content.

End-user information appliances and networks of CPUs embedded in everyday objects--both will demand user control and personalization.

Mobile and intelligent software agents will be commonplace and require customization by users.

Our Vision
In the future, we envision that computer programming will be taught in elementary school, just like reading, writing and arithmetic. We really mean computer programming--not just computer use (which is already being taught). The Logo project [Papert][Logo], for example, has shown that young children can benefit from a computing education. Of course, most children won't grow up to be skilled application developers, just as most people don't become professional authors--but reading and writing skills are useful for everyone, and so (in our vision) will be general programming skills. For the time being, we set our goals a bit less ambitious. We focus on teaching programming to high school and (non-CS major) college undergraduates. If we are successful here, we expect that the lower grades will soon follow, within their limitations.

In addition to the goal of teaching how computers work, a course in computer programming will return to the curriculum an emphasis on logical thought which was once the main benefit of teaching geometry.

Two general computing trends of particular interest are the move towards information appliances and the growth of embedded CPUs in everyday machines and appliances--whether in the military or the civilian sector. The decreasing size of computing and the increasing reach of networking, particularly wireless networking, make it possible to share information between devices and to interact with them. The ability to program will greatly improve users' ability to control these devices. Imagine that users could make their own changes to the software embedded in, say, their GPS receiver or handheld organizer, rather than (or in addition to) downloading upgrades from a vendor or buying "canned" add-on applications from third parties. This would greatly empower people to improve their life by programming their personal tools to do exactly what they need them to do.

If we are successful, non-experts will be able use their computers and other intelligent devices much more effectively, reducing their level of frustration and increasing their productivity and work satisfaction. (New leisure possibilities will undoubtedly ensue as well!) Computer users will be able to solve their own computer problems more often, reducing the need for technical support.

Even if most users do not program regularly, a familiarity with programming and the structure of software will make them more effective users of computers. For example, when something goes wrong, they will be able to make a better mental model of the likely failure, which will allow them to fix or work around the problem. They will also be able to assess better when they can make the changes themselves and when they will need the services of an expert. They will be more able to converse with experts, since they will now share more of a common language. An analogy is obtaining basic literacy in automotive maintenance: you know enough to check your oil and add a few quarts if necessary, but you also know that you shouldn't try to change your own brakes. When the mechanic says "your rotors are warped and you need new pads," you understand what he is talking about.

If this effort is successful, there could be many millions, eventually billions of computer programmers, at various levels of proficiency. The effects this will have on the state of the art of software development is hard to imagine. The nature of software will change to accommodate the needs of these programmers, allowing customization through source code modifications--and personalizations will be plentiful.

The effort could also have a major impact on getting women and minorities into computer programming--currently, these groups are vastly underrepresented.

The recently popular open source movement [OpenSource] is promising to improve the quality of key software packages through the peer review of thousands, as well as the ability for programmers to "scratch their own itch" (i.e., tweak the software in a minor way that only one individual cares about). We expect that moving from thousands to millions or billions of programmers will further change the nature of the software development process. Personal programming will become more important (and feasible) at this scale, while mass peer review will become relatively less important, due to diminished returns (the logistics of integrating bug fixes from thousands of sources is already a formidable task). But most current software, open source or otherwise, is too complex to allow anyone to do personal customization without first investing a serious amount of effort and time into understanding the software they're using. We are interested in changes to the whole software development process that will fix this as well--in particular, development tools.

In addition, by enabling the programmability of applications by anybody, we will leverage economies of scale without sacrificing the desire of users for highly personalized software. Applications can be mass-produced, without forcing everyone to fit the same mold in their use of the software (or into just those eddies of customizability planned by the developers). Users will want to personalize their systems for a number of reasons; these include becoming more productive, solving a problem peculiar to their needs, or just expressing their creativity and setting themselves apart from their peers. They will be able to achieve this if they have the basic programming literacy we envision.

Some broad questions help frame our specific research goals, such as: Will the programming language taught in schools resemble the programming languages we know today? Will it even be called a programming language? How will we teach it? Will there be only one language? What other tools are essential to the teaching and use of this language? Is it even possible to have a language and tools that are both good for teaching and useful for experts?

Just as interesting are questions like these: How and for what purposes will people use their programming skills? How will a near-universal ability to read and write computer programs change the structure and utility of computer software? (This is especially interesting in combination with future versions of the Internet, which promise high-speed ubiquitous access to computing and storage elements.) Will people be motivated to actually program their systems once they have the confidence that they can? Will they even be interested in the first place?

A clear concern is the expectation that, if most people are programmers, many of them will most likely be poor programmers. People who can't write understandable sentences in their native tongue or balance their checkbook are unlikely to write well-structured computer programs! Our intent, however, is to make programming accessible, if not easy, for everyone. Some users will employ or contract a third party programming and customization service. This is much like a homeowner contracting out for a remodeling job.

We therefore need to investigate ways to improve the quality of the interaction between the programmer and the system, to help even poor programmers get the most out of their computers. For example, you might want to write a program to customize your PDA or toaster, but you might be discouraged if a small mistake could wipe out your address book or set your house on fire. Safeguards against disasters are needed, as well as ways of backing out of unwanted changes to a system as a whole. ("Undo", while very powerful, usually only applies to one file at a time. Backing out of unwanted global system changes typically requires a reboot or even painful data restoration from back-up media.)

Another concern regards configuration management. Without superior configuration management, businesses are going to find themselves either unable to correct problems, or held hostage by programmers who have modified the operating system or applications in a manner that precludes either upgrading or making other changes. In general, all locally made changes to large software systems are currently in danger of being incompatible with future upgrades of the primary product. Even locally produced software may be rendered unusable when the primary developer leaves, due to a number of reasons including lack of testing or documentation.

Apart from the fear that something might go wrong, another concern for beginning programmers who are interested in customizing their computer is the daunting task of trying to understand a large piece of existing software. We need to look into user-friendly tools for program analysis; more about this later. Another intellectual challenge is visualization of (application-generated) data in ways that help novices. Spreadsheets are of great value here, but not all data fits the matrix form.

Scripting languages are growing in popularity among professional programmers [Ousterhout], but questions remain about performance, software reuse, and integration with components written in other languages. We can address these challenges by enhancing the facilities of JPython [Hugunin1], a Python dialect seamlessly integrated with Java, and SWIG, an interface generator that creates interfaces between scripting languages and systems languages like C or C++.

It is well understood that there is something of a dichotomy between "general" programming languages on the one hand and "domain-specific" languages on the other. For this discussion, we use the term "general" in a broad and loose sense, to include functional programming languages and possibly even logic programming languages, to the extent to which they are usable as a general programming tool. Turing-completeness is the key concept here.

The domain-specific category then contains everything else, from command line argument syntax to email headers and HTML. The distinguishing factor here is the presence of a relatively narrow application domain. In this category we also place things like Microsoft's "wizards" (really just sequences of predefined dialogs connected by simple flow charts) and the controls and dials on microwave ovens or nuclear reactors.

A typical property of domain-specific languages is that they provide excellent control in the application domain for which they were intended, and (almost) no freedom in unanticipated areas. For example, HTML has no inherent ability for conditional inclusion of text, or for variable expansion. (The fact that such features have been added many times as incompatible extensions merely proves this point.)

General languages, on the other hand, usually aren't as good in any particular domain. For example, it is much harder to write a program in a general language to format a paragraph of text than it is in HTML. However, general languages make up for this through their Turing-completeness, which makes it possible to solve any problem that might come up (assuming availability of sufficient resources). General languages are therefore ideal when used in combination with domain-specific languages.

For example, if cell phones were programmable, one would still use the regular domain-specific interface (the keypad) to dial a specific number, since that's the most convenient way to access that specific functionality. However, without programmability, there is no way to make it try several different numbers for a particular friend until one is answered, unless the cell phone vendor anticipated this particular feature.

We propose to start by making it possible to teach programming in Python, an existing scripting language, and to focus on creating a new development environment and teaching materials for it. We have anecdotal evidence that Python is a good language to teach as a first programming language. Our effort will focus on creating tools and educational materials for this purpose and on fostering a community around those materials. This will allow us to study in what ways Python is a good (or bad) language for teaching, and instigate directions for future development.

Why start with an existing language? Our experience indicates that the design and implementation of a new language takes years--and that this work must be (nearly) completed before a user-friendly development environment and teaching materials can be created. So we jump-start our project by using an existing language. Depending on user feedback, we may make changes to Python or design a new language altogether during the project.

We already have some evidence of where changes might be necessary. Prof. Randy Pausch at Carnegie Mellon University (see below) has conducted some usability studies of Python within their limited problem domain. Their users seemed most confused by the case sensitivity of Python's variable names and by the truncation of integer division. More extensive and generalized studies will serve to drive specific changes to Python, or indicate the need for a newly designed language.

Python is a good language for teaching absolute beginners. It derives many of its critical features from ABC, a language that was designed specifically for teaching programming to non-experts [ABC] [Geurts]. The Python community has seen many reports from individuals who taught their children programming using Python. The consensus from these reports is that the language itself is well suited for this purpose--unlike, for example, C++, Java, Perl, Tcl, or Visual Basic, which are too cluttered with idiosyncrasies.

Table 1 on the next page is a (highly subjective) chart comparing a few relevant aspects of Python to some other languages. From this table (and our experience), we conclude that Python is a good first choice for teaching which also serves well as a language for more serious application development. Unlike other languages proposed for teaching to novices (e.g. Logo, LogoMation, even Python's ancestor ABC), Python isn't just a teaching language. It is suitable for developing large real applications, as shown by projects here at CNRI [Knowbots] [Mailman] as well as elsewhere. For example, Industrial Light and Magic has converted its entire tool base to Python and considers this an advantage over the competition.

Moreover, Python is extensible by modules written in other languages (e.g. C, C++, or Java), to mediate access to advanced functionality that is not easily accessible from Python directly (for example, high-speed 3-D computer graphics packages). While we don't expect students to write these extension modules, the use of such modules makes it possible to spruce up their learning experience greatly. This extensibility gives teachers an opportunity to tailor lessons to the interests of their students by providing them with guarded access to other software packages.

The fact that Python can be used to develop large applications plays into a different aspect of our vision, namely the development of open source application software that can be tailored by users who are not expert programmers, but have learned some programming skills. Although this is not the focus of our effort here, we hope that we will see at least some initiatives towards this goal, and we will encourage companies and organizations wishing to take steps in this direction. We expect that the existence of JPython will be an important enabling factor here.

Python's programming environment and documentation are less than ideal for teaching to novices. In particular, the existing program development tools and tutorials for Python (there are several of each) all assume that the user is a dyed-in-the-wool developer, who knows a suite of external tools to edit, run and debug programs, and who already knows one or more other programming languages and their development environments. This currently stands in the way of more widespread experimentation with Python as a first programming language.

Table 1. Language comparison chart

(withdrawn)

Approach

We will create a next-generation programming environment and teaching materials that empower ordinary users to write simple programs and to understand the structure and organization of larger programs. We will also explore how widespread programming literacy will affect the production and use of software in a ubiquitous computing environment.

Our work is organized into three distinct areas:

a new computing curriculum suitable for high school and college students.

better, easier to use tools for program development and analysis.

a user community formed around the above, encouraging feedback and self-help.

As explained before, we will initially use the Python programming language. This will get the world ready for the next step. The "next generation computing environment" may not use Python, but Python and CP4E are useful experimental steps in the right direction.
As soon as initial versions of the newly developed course and tools are released to the community, the feedback channels will be opened. The initial feedback will mostly go into improvements of the environment and teaching materials. This is where the community building begins.

A key goal of the CP4E effort is the development of a curriculum for teaching programming literacy to a range of students, from non-computer science major undergraduates, down to secondary school and eventually lower- and middle-school students. The approach for each of these grade levels may differ so as to better relate to and reach students as they mature, but CP4E strives to provide a unified approach which will grow as the student grows, presenting richer and more in-depth topic material along the way. The initial effort will focus mainly on high school and undergraduate students.

CNRI will develop the basic materials for the curriculum, including software that will be used in the teaching environments, and tutorial and introductory material which may serve as the basis for textbooks on programming. CNRI will be working closely with educators experienced in producing textbooks and other teaching materials in order to best tailor these tools for the intended age groups.

Our goal is to take the software environments and tools used by more experienced programmers, and produce versions of these that will be useful in teaching programming skills. We are inspired by the existing Python interactive interpreter and by IDLE (a graphical development environment for Python), both of which can be used either as productivity tools for professional programmers, or as teaching aides when used in conjunction with tutorial material. Our new tools will provide useful functionality for novice and experienced programmer alike.

CNRI proposes to work with the University of Chicago to develop a new course in computer science, using Python as the programming language for all levels of programming instruction. Python is a particularly appropriate language for this purpose because it is easy to learn, read, and use, yet powerful enough to illustrate essential aspects of programming languages and software engineering. Thus even young students could be taught the basics of programming using Python, but they would not be limited in their application domain as they would be with Logo. The use of Python would allow each student to explore and progress at their own pace. Especially exciting is the fact that gifted students would have a powerful programming language and environment already at their fingertips, should they become motivated to learn more, or at a faster pace.

The University of Chicago would develop a series of courses that introduce programming and computer concepts to non-computer science students at the undergraduate and high-school level. Currently, courses at this level tend to emphasize either programming languages (with a strong mathematical flavor) or web-programming topics such as HTML and JavaScript. Unfortunately, both of these approaches have serious limitations. If a course is excessively formal and mathematical, it may only appeal to computer science majors and students of a technical mindset. On the other hand, Web-programming courses, while capitalizing greatly on the popularity of the Internet, tend to narrowly focus on specific technologies such as HTML, Perl, or JavaScript. As a result students learn little about computing within a greater context or gain the problem solving skills needed to solve the computational problems of the future.

The course to be developed at Chicago will address the aspects of computing that we feel everyone must know in order to be a knowledgeable computer user:

Basic computer organization. Students will learn the basics of how computers work and how they are put together. Topics would include Boolean algebra, logic, and simple computer architecture (e.g. CPU, memory, I/O). Simply stated, this is the stuff going on "under the hood"--stated in easily understandable terms. Ultimately, we would hope to demystify computers as much as possible.

An introduction to programming. This will introduce different ways people have programmed computers. Students will learn about procedural, functional, and object oriented programming, but in an informal manner. Rather than trying to turn students into professional programmers, the goal will be to introduce students to some of the ways people have tried to simplify the use of computers.

Software architecture. In the future, it is increasingly likely that computers will be programmed largely by assembling existing software components and writing a small amount of glue code. In order to make this possible, an understanding of how software is put together will be essential. Student will learn about software design and software organization (just what in the heck are all those DLL's anyway?).

Debugging and problem solving. How to survive when all else fails--without having to call customer support.

At all levels of education, it is vitally important that usability studies for both the software tools and the textbook material are conducted and evaluated. This is the only way that such materials and tools will be improved and tailored for the specific age and experience groups. Usability studies of the type conducted by Prof. Pausch of CMU will be developed and conducted at all three levels of teaching. Of course, we will also develop traditional tests to allow teachers to measure individual students' performance.
We intend to engage in small-scale teaching efforts ourselves, e.g. at the local high schools listed in the collaboration section, but we don't expect that we will be doing much teaching. If our experience with Python's popularity is any indication, we won't have to: others are eager to participate in this experiment.

The courses will use the new development environment described in the next section. As an incentive to make programming more "fun", we intend to connect the development environment to an existing programmable 3-D game-playing engine as used in popular computer games. Several such engines are or will likely become available for use with Python; we will select one and create an interface library for it suitable to our audience.

Why use a 3-D game-playing engine? The experiences with Logo show that graphics are a good way to catch a younger audience's attention, but its 2-D graphics look somewhat boring compared to the video games teenagers are familiar with these days. Alice is a good example of an engaging 3-D graphics environment.

In addition to using a 3-D game as a testbed, we may use CNRI's Knowbot technology [Knowbots] as a motivating application for novice programmers. Knowbot programs are independent mobile programs capable of migrating between Knowbot "service stations" (specially equipped hosts) throughout the Internet. Service stations provide services to the Knowbot programs such as search services, digital object repositories, auction services, etc.

Another way of looking at a Knowbot program is as a small component working within the larger framework of the service station. A Knowbot program is a modular, independent program that can be easily written to move around the Internet, but which has powerful functionality due to its integration into the framework, and its use of the environments it encounters.

We will be exploring several ideas on how to use Knowbot programs in the teaching curriculum. We imagine cooperative gaming scenarios, where students can create Knowbot programs that exhibit certain behaviors and must work together to solve a common problem. This would be a great way to motivate students from all over the Internet to collaborate.

We might envision treasure hunts, where students have to apply the programming skills they just learned in order to discover and migrate to a service station, solve a puzzle at the site, and receive the treasure. We might design distributed virtual simulations, similar to MIT's Virtual Fishtank [Fishtank], where students can create their own discrete elements of a complex system (e.g. implement a virtual fish in a Knowbot program) and watch how their own elements interact with others. Because the Knowbot technology allows for highly distributed, very complex interactions across the entire Internet, it gives us a unique platform for experimenting with rich cooperative learning opportunities.

We will design and build a programming environment specifically intended to support the teaching of programming to users with no previous programming experience. Our aim is provide tools to support users when they are learning programming and when they are employing those skills in their homes and offices.

We believe that most ordinary users will employ their programming skills to customized and extend their computing environment. Rather than writing new programs from scratch, most people will add new code to existing programs. There are three significant challenges that must be addressed by programming tools aimed at this audience.

First, the environment must significantly ease the burden of writing, installing, and debugging new programs. The current generation of development tools can be cumbersome for expert users, let alone novices. We must focus careful design and usability studies on the development of new programming environments.

The second challenge is to provide for the continual evolution and modification of software artifacts by consumers as well as producers. We will develop tools to help users understand the structure of large programs so that they can identify where to make changes and what impact those changes will have. Our tools will also help users manage and configure software, so that individual components can be replaced or upgraded over time. These tools will help users share new and modified programs by automatically tracking versions and dependencies.

The final challenge is to build tools that will be useful in a ubiquitous computing environment. The desktop computing environment will be rapidly overtaken by networks of computer-controlled devices and physical systems. This new environment exacerbates problems of installing, debugging, and managing software. It also poses new challenges for system designers to build software that allows end-user customization.

This section is organized around these three challenges. The first section discusses the proposed programming environment. The second section discusses program analysis and configuration management tools. The third section discusses application frameworks to support end-user programmability of ubiquitous computing environments.

Our approach to this problem will be to look at how traditional programming tools, such as editors, debuggers, and class browsers, can be augmented and enhanced by more advanced ways of analyzing, inspecting, and understanding programs.

The most basic activities of programmers are editing source code, running the program to test it, and debugging the program. (Python doesn't have a separate compilation phase.) A programming environment must of course support these activities. We have been developing a portable programming environment for Python named IDLE, which allows the user to execute individual statements interactively. It is mostly targeted at experienced programmers, but will server as a starting point for an environment for absolute beginners.

IDLE only scratches the surface of the kind of programming environment needed to help novice programmers. For example, its source code colorization and indentation features could be replaced by a much more powerful program checker which would point out all syntax errors, undefined identifiers, type mismatches, and so on, while the user is typing (like a spelling checker). The debugger could support retracing execution steps, editing the source code of the running program, etc. The program editor could support a flexible form of template-based editing (the Alice group has very good experiences with this in their limited domain). The undo feature, which currently allows undoing source code changes only, could be extended to undo changes to the run-time state of the program or even side-effects to the environment (within reason--we can't expect to undo printing or the sending of an email message). As an example, the Alice software provides full undo for all actions involving changes to the 3D world it manages.

Two specific areas of work are undo and an extended type checker.

"Undo" is an extremely important tool for beginners because it is the programmer's first line of defense. Along with version control, auto-save, and other features, the ability to rollback an unlimited number of near-term changes means that the programmer has more leeway to experiment and learn. However, most undo implementations are quite limited in their scope. Our approach will investigate such concepts as selective and global undo. In a traditional undo system, the editor simply keeps a linked list of changes to a file, and those changes can be unapplied or reapplied by moving through this list (there are variations on this theme, including undo rings, and undo/redo). One of the problems with traditional undo is where some undesirable changes overlap with some desirable changes; the programmer often has to lose the desirable ones to eliminate the undesirable ones.

With selective undo, changes can be localized to a finer granularity. For example, suppose a programmer made three changes to function A at the top of the file intermingled with four changes to function Z at the bottom of the file. Now the programmer discovers that function A should never have changed; selective undo allows changes to function A to be rolled back without affecting the changes to function Z.

Global undo is similar to what version control provides, where system level changes can be tagged and rolled back when they adversely affect the system. Where global undo differs however is that no a-priori decision has to be made about tagging.

We also plan to enhance the development environment with type-checking tools that help programmers find mistakes in their code and improve the performance of compiled code. Python is a dynamically typed language, like Smalltalk or Scheme, that relies on extensive runtime checking to ensure the correct use of built-in operations. Soft typing [Cartwright] is a mechanism to statically check programs in dynamically typed languages to detect errors and eliminate unnecessary runtime checks; the analysis is integrated with the programming environment rather than with the language runtime. This mechanism has been applied to Scheme [Wright][Flanagan]. We will develop a similar type checking mechanism for Python. The key challenges for developing a soft type system for Python are extending the analysis to objects and modules and accommodating Python's extremely dynamic execution environment, which allows modification of classes and instances at runtime.

Preliminary work at CNRI demonstrated the value of type analysis for improving the performance of JPython programs. Hugunin [Hugunin2] demonstrated performance improvements of up to three orders of magnitude for JPython.

We will augment the basic programming environment with a collection of tools that aid users in understanding large programs, so that they can customize and modify them, and in managing the installation and configuration of software, so that they can upgrade the software without destroying their modifications. We will also develop and extend tools that build interfaces between low-level software components and scripting languages, which will enable greater user control over the low-level components.

It is important that these program analysis tools, aimed at beginners, are simple to use, and that they allow grasping the results of the analysis without requiring detailed understanding of how the analysis is done. At the same time, we strive for our tools to be powerful enough for experts too--they should accommodate increasing expert levels as a user becomes more familiar with the tool, and they should be able to handle large programs. An analysis tool that can effectively be applied to, say, the source code of the Netscape browser, is much more useful than one that only works well for small example programs.

Our focus on relatively inexperienced programmers requires that our tools contain excellent visualization modules, which can present the discovered design to the user without causing information overload. For example, current visualization tools often lack "common sense," and will mindlessly produce large tree or graph diagrams spanning many pages that consist of endlessly repeated similar substructures; this effect causes the user to lose sight of the forest through the trees.

We plan to focus initially on tools that work with Python programs. However, most of the techniques for program analysis that we expect to develop are essentially independent of the language being used. We will also investigate the use of tools that cross language boundaries, so that users can consider the effects of changes at the scripting level on low-level components written in C or Java.

The program analysis tools will help users understand the gross structure of programs by identifying the relationships between static program components. One example of this kind of analysis tool is Womble, which extracts object models from Java bytecodes [Jackson]. Womble extracts object model directly from source (or object) code, rather than from a formal specification. Because this method does not rely on the existence of a formal specification (such as a UML model), we believe it is more accessible to ordinary users. A similar approach can be used for analyzing Python programs, although Python's dynamic typing and "first class" functions and classes pose significant challenges.

We will also investigate program slicing [Tip] and program paths [Ball] as techniques to help users understand where to make changes and what impact those changes will have. Slicing is a well-known technique for identifying subsets of programs that affect a particular variable. Analysis via program paths shows the various possible execution paths through a body of code. Each technique has value for testing and debugging programs. Two challenges are to apply these techniques across language boundaries and to identify abstractions boundaries that are implicit in the code but expressed inexactly by the type system. Womble, for example, recognizes that Java container classes are not an interesting part of an application's object model; it merely represents a relationship between the object that uses the container and the contained objects. Similarly, a program slice could be performed with respect to certain abstraction boundaries and aspects of the code. A program slice that presents the functional aspect of a program without including concurrency-specific code may be useful for understanding the program structure. (Of course, the concurrency-specific code is important to understand, but may be a separate concern.)

A third area of work is one automatic generation of scripting language interfaces to low-level code such as C, C++, or Java. The SWIG tool [SWIG], developed by our collaborator David Beazley (see Collaboration Plans section below), helps users generate scripting language bindings from C and C++. We will work to improve and extend SWIG to improve the amount of automatic processing that can be done and to allow greater customization of bindings by users. We will also enhance SWIG to produce more natural language bindings; for example, when strings are passed as function parameters in C programs they are typically represented by two variables, a pointer and a length. The SWIG bindings should automatically convert between those two C variables and a single Python string argument.

If users are empowered to modify and customize code, they will be challenged to maintain those changes when the underlying software is upgraded or when system components are replaced. Version control is already a vexing problem for software developers, who must ensure that their products are compatible with many operating systems and shared libraries. Users will also want to share their customizations with others - co-workers or friends and relatives. We will provide tools to help users maintain and share programs and modifications to programs.

One of the most important issues that our programming tools research will address is the burden that user customizability will place on system configuration management. When a user makes a change to an application, what assurances are there that a future update to the application by the vendor will be compatible with these changes? How does the user himself keep track of just what changes they've made to an application? What happens when a future version of the product adds a feature, previously missing, that the user has added (in a different form)?

Our tools will help users keep track of changes they've made, through successive revisions, and help users merge their changes back when the primary application itself has been modified or updated by the vendor. A key to this approach is identifying each version of software and a simple language for describing its properties and dependencies. For example, we intend to improve version control systems so that they track changes at different abstraction levels and granularities than current systems, e.g. labeling changes based on the features they implement instead of the source files (or parts of files) they modify. The tool will automatically identify dependencies on other libraries and component. We will investigate ways to integrate testing frameworks into the configuration management systems so that when the primary application is upgraded, each feature change a user has installed, will be merged and tested.

We will also create community-enhancing tools that make it easier to share, integrate, and use peer-developed software. Issues to be addressed include dependency management between packages, ease of installation (and de-installation!), coping with changes to both the operating system, applications, and libraries, version control, and package maintenance. Software must be described and classified, and forums for discussion, feedback, bug reports and patches (both to the maintainer and from the maintainer) must be established. Of greatest importance is that these community-building tools must be primarily managed by the community itself; they must be highly distributed, replicated, and secure. For example, users could share information about compatibility problems between various libraries; when coupled with automatic distribution tools, this information could prevent software upgrades that prevent other applications from working.

There are several existing tools that attempt to address some or all of these issues. The Comprehensive Perl Archive Network attempts to contain all the Perl material a Perl programmer would ever need [CPAN]. It is distributed and replicated, and it makes the job of installing Perl modules easier (though not always easy enough). It is not, however, very adaptable to other types of archival material. Within the Python community, the distribution-utilities special interest group is attempting to make the distribution and installation of third party software easier, but it does not address the wider issues involved, and again, it is narrowly focused on Python software [Distutils]. The most ambitious related work we are familiar with is the self-updating software [Liskov] project.

We will examine the impact of future changes in computing and communications on the way users control computers, and the implications of such developments as near infinite bandwidth, greater accessibility to much more powerful computers, the ubiquity of computing resources, and a much greater level of internetworking, even at the micro-device level. These changes affect both what kinds of programs users will write and what kinds of computers those programs will run on.

Our approach in this area will be to work with experimental and prototype systems in order to understand how end user programmability should be exposed. As these technologies mature, we may incorporate our experiences into teaching materials.

Many non-programmers begin writing small programs that are used within specific domains and within the contexts of application frameworks. The spreadsheet is perhaps the best example of programming in a limited context. It provides a limited language targeted specifically at manipulating tables of numerical data. The application provides the coordination framework--managing the display, control flow, I/O, etc.--and lets the user concentrate on a specific problem. A macro facility, which is one part of a spreadsheet's programming suite, aids the use of many applications, allowing users to automate repetitive tasks. A second example can be found in MS Word macros, which are also a common form of user customization.

The Internet has exposed many non-professionals to programming, especially in domain-specific languages like HTML and active content languages like JavaScript, PHP and CGI. In these situations, too, non-programmers are typically creating small programs which fit within the larger context, for example, of a Web server which takes care of details such as managing the TCP/IP connections to the clients, setting up the environment in which the user programs run, handling error situations, and adhering to standard protocols.

In the future, non-programmers will be using a plethora of information appliances. One example area where programmability of these devices will significantly improve their usefulness is in the management of information flow--and perhaps more crucially, the limiting of information flow. A person may have messages arriving over many media--text, voice, video--and access them via many devices such as PDA, mobile phone, and computer screen. We expect seamless interoperability, so that for example a mobile phone can be used to follow up to an email with a voice response without having to look up the number. Small programs could be used to customize the interfaces on these devices and to filter and limit the flow of messages through them.

Some examples include:

Trying several different phone numbers to reach a person, perhaps depending on time of day or day of week.

Diverting incoming phone calls to voice mail or email when you do not want to be disturbed-but still letting important calls through.

Lowering the volume on TV or radio when you answer the phone.

Recording copies of certain phone calls, perhaps by invoking a speech-to-text converter.

Limiting the amount of personal information transferred to stores or companies as part of an e-commerce transaction.

Each of these interface features might be accommodated by the designers of a particular device. However, feature-rich interfaces are harder to use, so designers may intentionally limit the interface. It is also likely that inventive users will always think of features the designer has overlooked. Allowing for end user programmability and customization lets the user adapt the device to her particular needs.
These examples indicate an important pattern in programming scope: users will be customizing applications and appliances in the context of the system's computational model and software framework. Thus our expedition will explore ways to modularize applications, and organize these modules so that users can add the small bits of functionality they want without having to concern themselves with the operation of the system as a whole.

One of the key goals of empowering non-programmers to modify and customize software in the context of application frameworks or embedded devices is to reduce the cognitive load required to understand how the modification fits into the larger program. This is true even for experienced programmers new to an application's code base. Applications must be modular and provide sufficient high level abstractions so that their constituent parts can be understood quickly and independently. This lets people concentrate primarily on the parts that need to be changed. In our approach we will explore several ideas intended to improve the modularity of software.

We intend to look at existing techniques, such as object-oriented programming and component composition as ways to organize the software. In theory it is much easier to swap out a black box component for some different functionality, as long as the interfaces and input/output semantics are maintained. In reality, it is currently very difficult to write classes and components that are independent of the rest of the system. We will also be exploring new concepts such as Aspect Oriented Programming [AOP], a new way of modularizing software based on cross-cutting concerns. Perhaps some combination of these, or new modularizing techniques will prove effective, for example, by organizing each function as an aspect of a component.

Besides working with selected partners, we will seek the involvement of the community at large. We will do this by sharing prototypes of the developed courses and software through a website, and by soliciting feedback on those materials through a variety of channels such as newsgroups and mailing lists. CNRI has considerable experience with community involvement through the web and via other means. For example, the key focus for the Python community is the Python website [Python], which also hosts many Python-related mailing lists; an important focus for the digital library community is the D-Lib website [D-Lib]. Both sites are run by CNRI. The existing Python community is already showing great interest in the CP4E proposal, and we expect that this will be the perfect place to bootstrap community activities specific to the CP4E effort.

Such explicit facilities for community involvement will greatly benefit our research, and allow the community to reap the most benefit from our research. Benefits of early and large-scale community involvement for our research will include: volunteers who help "test-drive" our courses and software prototypes; new courses developed by community members aimed at specific target audiences or aimed at teaching specific skills or subjects; localized variants, translations etc. of existing courses; new or modified examples (you can never have enough examples, and examples that are tailored to specific audiences are more effective); new applications developed by and for students of our courses using our program development software; and so on. In the Python community, we receive many such contributions (including complete foreign-language translations of key documents) completely unsolicited!

Benefits for the community include early access to new courses and software, and help for teachers in teaching and in convincing their management of the importance of teaching computer programming to all students (as opposed to the advanced placement crowd). We also expect that the proposed community facilities will foster a large amount of self-sufficiency among community members. For example, in co-tutoring projects, students in need of tutoring help will find volunteer tutors on the net (often other students who are more advanced), and teachers will be able to exchange their experiences directly. This kind of tutoring activity already occurs in the Python community, and will help defray the load on our research team caused by repeated requests for help with simple questions.

In the spirit of "mass computer literacy" and the open source movement [OpenSource], our website will make the courses and software widely and freely available. In addition to the website, we will create and maintain one or more mailing lists with archives, and perhaps a "chat" service for users. We will actively participate in the mailing lists in order to foster a community, and also collect and analyze the feedback provided by the community to us through these (and other) channels.

It is clear that we consider community involvement essential for the success of this project. Therefore, we want to go beyond the typical website setup. We plan to create an automated archival site for teachers, students and programmers, which can be used to exchange course notes, examples, useful software, and so on. We also plan to develop prototype software to aid users in maintaining consistent collections of software packages, both locally developed and downloaded, on one or more machines. The expected frequent exchange of extensions, upgrades, patches, end user modifications, and so on, would cause a nightmare of version control problems using the existing practice. This is elaborated in the subsection "Sharing and Maintaining" above.

We will build into the program a certain amount of planned cooperation with other academic and non-academic institutions in order to ensure the success of the research. In particular, we propose to subcontract some activities to groups at Carnegie Mellon University and the University of Chicago. The Alice group at CMU has successfully used Python as an end user programming language for their popular virtual reality software; the University of Chicago has considerable experience and interest in CS curriculum development. We also plan to work informally with other academic groups and to open up the participation to others as practicable.

The Alice group [Alice] [Pausch], under leadership of Prof. Randy Pausch, develops affordable 3-D graphics and virtual reality software for Windows, originally at the University of Virginia and now at Carnegie Mellon University. They use Python both for end user programming and in the implementation of large parts of their system (almost everything except the rendering engine). They probably have the most extensive and best-documented case study of teaching Python programming (albeit in a limited domain) to users with no prior programming experience, and their enthusiasm for Python has been a great encouragement for us to consider using Python in a general programming curriculum. They are also one of the only groups to apply usability testing to programming languages and Application Programmer Interfaces.

We plan to provide the Alice group with limited funding to continue this part of their research in a mutually beneficial way. We expect to benefit from their experience in teaching Python to novice users, from the simple but effective programming tools they have built into the Alice system, and from their proficiency in user testing--very important for both the tutorial and the software we plan to develop. They will benefit from our tutorial (giving Alice users broader instruction in software development) as well as from our software (more powerful program construction tools).

The University of Chicago can contribute to the CP4E research effort in two core areas: curriculum development and software development tools. We also plan to work with the University of Chicago Laboratory School, a private K-12 school operated by the University of Chicago. Our liaison at the University of Chicago is Prof. David Beazley, an experienced Python user. We plan to provide the University of Chicago with limited funding for curriculum development. This will be to our benefit because of their interest and experience in teaching; their benefit will be the use of a superior programming language and tools.

Finally, we plan to work directly with selected local schools to "test-drive" the developed materials. Working with local schools makes regular face-to-face meetings with both teachers and students possible; we consider this essential for the evaluation of our prototype course and software. The Yorktown High School in Arlington County, Virginia, has already shown interest in this proposal [Yorktown].

Another possible candidate might be the Thomas Jefferson High School for Science and Technology, a public magnet school in Fairfax County, Virginia, which already offers a computer science curriculum to advanced students [TJHSST]. We will be contacting other local schools in Maryland, Virginia, and the District of Columbia for collaboration purposes during the course of this project.

We also plan to work informally with academic and other research groups who are developing personal computing hardware and software for the future ("ubiquitous computing" projects); these projects all envision end user programmability of sorts. Some examples of such projects are Project Oxygen at MIT [Dertouzos], Portolano/Workscape at Xerox PARC and the University of Washington [Portolano], and Invisible Computing at CMU.

We expect that the main benefit for us of such cooperation will be early deployment of our technology in advanced systems, while their benefit will be improved end user programmability of the systems they are developing. Note that the timing is excellent here: widespread deployment of the personal, embedded systems as envisioned in e.g. Project Oxygen is expected around the same time that our curriculum and software could be in widespread use.

Comparison to Other Research

ABC. Python's predecessor, ABC, was designed in the early eighties as a teaching language. Its motto was "stamp out Basic"--acknowledging the main competition in languages for non-experts at the time. ABC's designers had a lot of experience teaching "classic" programming languages like ALGOL to novices. They found that their students were often so overwhelmed by the incidental details of using a computer language (such as running the compiler, dealing with different numeric formats, arcane I/O operations, and low-level memory management) that they never managed to concentrate on the essentials of good program and algorithm design.

To counteract this effect, ABC's designers went back to first principles. They set out to design a language and an environment for that language that would take care of all the incidentals, leaving the student more time to learn what's essential in programming independent of the programming language at hand, such as clear control flow and powerful data structures, and focusing on the elegant expression of programs. They proposed both a new language design and new terminology that deviated radically from what was (and still is) current among computer scientists and programmers. In fact, the single largest reason why ABC didn't make as much of an impact as expected is probably that they deviated too much from current practice. The people who had access to the hardware that was needed to run ABC (initially it only ran on Unix system, although it was later ported to the Mac and PC) were often experienced computer users who felt frustrated that ABC didn't "speak the same language" as the rest of their applications.

About a decade later, Python grew out of this frustration. It shares ABC's focus on elegance of expression, fundamentals of programming, and taking away incidentals, but adds object-orientation, extensibility, and a powerful library of modules that interface to other applications, via many different mechanisms: shared files, program embedding, RPC interfaces like CORBA or COM, and network protocols (supporting all the protocols typically used on the Internet).

Logo. Really a family of languages related to Lisp and mostly developed at MIT, Logo is of course the most well-known programming language for children. It has a rich tradition, strong roots in schools, and a number of commercial offerings. There is ongoing research being done by the Epistemology and Learning Group at the MIT Media Lab, e.g. the "programmable brick" (in cooperation with LEGO).

A key difference between Logo and our proposal lies in our vision that millions of (amateur) programmers will be developing open source software together--Logo appears content with teaching limited programming skills to younger children, for whom computer programming is mostly a way to train their mind in abstract thinking. Logo also has limited applicability in the real world of software development.

LogoMation. A company called Magic Square sells LogoMation, a language not unlike Logo, with a similar emphasis on turtle graphics. It comes with an excellent tutorial suitable for children from 8 up. LogoMation's syntax is similar to Python (more so than Logo's syntax); which suggests that we're on the right track with Python.

But like Logo, LogoMation is limited in the growth path it offers. It doesn't directly address the issue of "what next," expecting its users to move on to other programming languages for real work.

Alice. The testimonials on the Alice website clearly indicate that Alice is successful at teaching programming to children as well as to adults with no prior computer experience. It also indicates the importance of a "fun" environment (and Alice's 3-D graphics are more attractive than Logo's turtle graphics). Alice also gives us some hints on what aspects of Python could be improved: for example, their experiences suggest that Python's case-sensitivity is a problem.

However, the emphasis of the Alice project is on 3-D graphics--the Alice tutorial doesn't really teach much in the way of program or data structuring techniques. While we agree that 3-D graphics are a great way to create and keep a young audience captive, we are interested more in teaching programming in general, not just graphics. For this reason, the emphasis in our initial work will be on the development of a programming environment and tutorial where 3-D graphics is just one of the possible uses for a computer.

DrScheme. The TeachScheme! Project at Rice University [TeachScheme] aims to develop a new introductory computing curriculum based on the Scheme programming language. A central part of the Rice effort is the development of DrScheme [Findler], a programming environment targeted at beginning students. The focus of TeachScheme is on a relatively narrow audience--college students who have a solid grounding in high school algebra and an interest in studying computing and its application to scientific problems. We envision a much wider audience, where the assumptions about a strong math background and interest in scientific problems do not hold. We also expect that Scheme, a language that excels in exposing the fundamental building blocks of computation for pedagogical purposes, would be inappropriate for a mass audience.

It is interesting to note, however, that one of the key parts of the TeachScheme project is a development environment. While the audiences and approach are different, our project and TeachScheme share a sense that the development environment is a crucial component. There is a need for an interactive read-eval-print loop, a powerful debugger, and tools to understand how programs work.

Facilities

We will use CNRI's existing computing infrastructure for development and distribution of the proposed materials, augmented with desktop workstations and a web server purchased specifically for this project. We will use the Internet and the World-Wide Web for all distribution of materials.

List of Key Personnel

Guido van Rossum will lead this effort at CNRI. He is a group leader at CNRI, and is the creator of Python, for which he still serves as the key developer. He is also the lead designer of the Knowbot mobile agent system. In the past he has worked on ABC, a programming language developed for teaching purposes, and Amoeba, a well known distributed operating system developed in the 80s. He has a Masters' degree in mathematics and computer science from the University of Amsterdam.

Jeremy Hylton is a senior member of the CNRI technical staff. He is one of the designers of the Knowbot mobile agent system, and has designed and implemented several agent-based information management applications. He received a M.Eng. in electrical engineering and computer science and an S.B. in computer science and engineering from the Massachusetts Institute of Technology, both in 1996.

Barry Warsaw is a senior member of the CNRI technical staff. He has been a contributing designer to several CNRI projects including the Application Gateway System, the Knowbot Operating Environment, and JPython. He has contributed to development of the Python language and to the Grail Internet Browser. He received a B.S. in computer science from the University of Maryland in 1984. Previous to CNRI, he worked on robotic systems operator interfaces at the National Institute of Standards and Technology from 1980 through 1990, and on medical database information technology at the National Library of Medicine from 1990 through 1994.

CNRI will perform the following work:

Develop a prototype programming environment for Python, including program analysis and management tools suitable for use by novices.

Develop a prototype tutorial to teach programming using Python to non-programmers, especially in high school or college, using the above programming environment.

Develop example software aimed at the above audience; for example, a Python extension that allows the manipulation of a third-party 3-D game-playing environment.

Set up and maintain a website and mailing lists promoting the above software and tutorial and soliciting feedback.

Collaborate with selected high schools and universities.

Engage in small-scale teaching and user testing efforts.

Collect feedback regarding the above software and tutorial from users, students and teachers and use this to improve the software and tutorial. Also use it to improve the Python language itself or to propose a better language.

Publish a final report documenting the research, the lessons learned, the results of the research, and the recommended follow-on research.

The Alice group at CMU will perform the following work:

Integrate CNRI-developed tools into Alice.

User testing of CNRI-developed tools and tutorial.

The University of Chicago will perform the following work:

Work with CNRI to develop the CNRI-developed tutorial into a CS curriculum suitable for high school, and separately into a CS course suitable for non-CS undergraduates in college.

Teach classes using the developed curriculum in order to provide feedback.

In order to maximize access to the materials produced, all software, educational materials, and reports produced for this project will be made freely available on the World-Wide Web as open source material.
We envision the following schedule for the effort:

Year 1. Initial research at CNRI: develop initial prototype programming environment; design program analysis and measurement tools; develop first version of tutorial; develop contacts with other researchers and with interested teachers.

Year 2: At CNRI: initial implementation of program analysis and measurement tools; collect feedback from first software and tutorial experiences. At CMU: start working on integrating CNRI-developed tools into Alice and start user testing. At U of C: start working on curriculum development for high school and college students.

Year 3: Continue above activities. In addition, at CNRI: integrate first program analysis and measurement tools into programming environment; small-scale roll-out of enhanced programming environment; develop initial example applications; define evaluation criteria for success. At CMU: user testing of program analysis tools. At U of C: integrate use of program analysis tools into curriculum.

Year 4: Continue above activities, completing most of them. In addition, at CNRI: large-scale roll-out of enhanced programming environment; refine example applications; start large-scale collection of end user feedback; start working on Python language changes. At CMU: Completion of user testing, integration into Alice. At U of C: completion and roll-out of curriculum.

Year 5: Project completion: report experiences, evaluate success, technology transfer to educational world and industry.

There are no optional tasks in the proposal.

[ABC]
http://www.cwi.nl/~steven/abc/ [Ball] Thomas Ball and James R. Larus. Programs Follow Paths. Microsoft Research Technical Report MSR-TR-99-01, Jan. 1999. [Alice] [AOP] Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier, John Irwin. Aspect-Oriented Programming.
In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), Finland. Springer-Verlag LNCS 1241. June 1997.http://www.parc.xerox.com/spl/projects/aop/ [Blair] [Cartwright] Robert Cartwright and Matthias Felleisen. Program verification through soft typing. ACM Computing Surveys, June 1996, 28(2): 349-351. [CPAN] [Dertouzos] Michael L. Dertouzos. The Future of Computing. Scientific American, Aug. 1999. [Distutils] http://www.python.org/sigs/distutils-sig/ [D-Lib] [Findler] Robert Bruce Findler, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, and Matthias Felleisen. DrScheme: a pedagogic programming environment for Scheme. In Proceedings of the 1997 Symposium on Programming Languages: Implementations, Logics, and Programs, Southampton, UK, Sept. 1997. (Lecture Notes in Computer Science, Vol. 1292.) [Fishtank] http://el.www.media.mit.edu/groups/el/projects/fishtank/ [Flanagan] Cormac Flanagan and Matthias Felleisen. Componential Set-Based Analysis. ACM Transactions of Programming Languages and Systems, to appear. [Geurts] Leo Geurts, Lambert Meertens, Steven Pemberton. The ABC Programmer's Handbook. Prentice-Hall, 1990. [Hugunin1] Jim Hugunin. Python and Java - The best of both worlds. In Proceedings of the 6th International Python Conference, San Jose, Ca., Oct. 1997, pp. 11-20. [Hugunin2] Jim Hugunin. JPython Update. Invited talk, 7th International Python Conference. Houston, Tex., Nov. 1998. PowerPoint slides: http://www.jpython.org/jpython-talk-1.ppt [Jackson] Daniel Jackson and Allison Waingold. Lightweight Extraction of Object Models from Bytecode. In Proceedings of the International Conference on Software Engineering, Los Angeles, Ca., May 1999. [JPython] [Knowbots] http://www.cnri.reston.va.us/home/koe/ [Liskov] http://sdg.lcs.mit.edu/~dnj/research/self-updating.html [Logo] http://el.www.media.mit.edu/groups/logo-foundation/ [LogoMation] http://www.magicsquare.com/LM2/ [Lutz] Mark Lutz. Programming Python. O'Reilly, 1996. [Mozilla] [Mailman] [Ousterhout] John K. Ousterhout. Scripting: Higher Level Programming for the 21st Century. IEEE Computer, March 1998. [Papert] Mindstorms: Children, Computers, and Powerful Ideas. New York: Basic Books, 1980. [Pausch] Randy Pausch, Tommy Burnette, A.C. Capeheart, Matthew Conway, Dennis Cosgrove, Rob DeLine, Jim Durbin, Rich Gossweiler, Shuichi Koga, Jeff White. Alice: Rapid Prototyping System for Virtual Reality. IEEE Computer Graphics and Applications, May 1995.[Portolano] http://www.cs.washington.edu/research/projects/portolano/ [Python] [SWIG] [Tip] Frank Tip. A survey of program slicing techniques. Journal of Programming Languages, 3(3):121-189, September 1995. [TeachScheme] http://www.cs.rice.edu/CS/PLT/Teaching/ [TJHSST] [Yorktown] http://yhspatriot.yorktown.arlington.k12.va.us/ [Watters] Aaron Watters, Guido van Rossum, Jim Ahlstrom. Internet Programming with Python. MIS Press/Henry Holt, 1996. [Wright] Andrew K. Wright, Robert Cartwright. A Practical Soft Type System for Scheme. ACM Transactions of Programming Languages and Systems, Jan. 1997, 19(1): 87-152.

# data[].attributes.attachment_link.keywords[]
python programming language object oriented web free open source software license documentation download community

# data[].attributes.attachment_link.description
This is the text of a revised funding proposal that we sent to DARPA in August 1999. In March, we heard that at least an earlier version of the proposal was accepted by DARPA; the work has begun late 1999 and will hopefully last two years, although we've only received funding for the first year (through October 2000).

# data[].attributes.body
Qt ist ein GUI-Designer

# data[].attributes.attachment_link.readable_text
What is Eric?

Eric is a full featured Python editor and IDE, written in Python. It is based on the cross platform Qt UI toolkit, integrating the highly flexible Scintilla editor control. It is designed to be usable as everdays' quick and dirty editor as well as being usable as a professional project management tool integrating many advanced features Python offers the professional coder. eric includes a plug-in system, which allows easy extension of the IDE functionality with plug-ins downloadable from the net.

Current stable version is eric6 based on PyQt5 (with Qt5) and Python 3.

Features

Unlimited number of editors

Configurable window layout

Configurable syntax hilighting

Sourcecode autocompletion

Sourcecode calltips

Sourcecode folding

Brace matching

Error highlighting

Advanced search functionality including project wide search and replace

Integrated class browser

Integrated version control interface for Mercurial, Subversion and Git repositories (as core plug-ins)

Integrated cooperation functions (chat, shared editor)

Integrated sourcecode documentation system

Integrated Python debugger including support to debug multi-threaded and multi-processing applications

Integrated profiling and code coverage support

Integrated automatic code checkers (syntax, errors and style [PEP-8])

Integrated task (ToDo items) management

Advanced project management facilities

Interactive Python shell including syntax hilighting and autocompletion

Application diagrams

Running external applications from within the IDE

Integrated unittest support

Integrated CORBA support based on omniORB

Integrated support for Google protobuf

Integrated 'Virtual Environment' management

Integrated support for Python Package Management (pip)

Integrated rope refactoring tool (as optional plug-in)

Integrated interface to various packagers (as optional plug-ins)

Integrated interface to PyLint (as optional plug-in)

Many integrated wizards for regex and Qt dialogs (as core plug-ins)

Localizations: Currently Eric is available in English, German, Russian, and Spanish.

Tools for previewing Qt forms and translations

Integrated Web Browser

Integrated interface to the enchant spell checking library

...many, many more not mentioned here

# data[].attributes.attachment_link.description
Eric is a full featured Python editor and IDE, written in Python. It is based on the cross platform Qt UI toolkit, integrating the highly flexible Scintilla editor control. It is designed to be usable as everdays' quick and dirty editor as well as being usable as a professional project management tool integrating many advanced features Python offers the professional coder.

# data[].attributes.body
aliasaria/scrumblr: Collaborative Online Scrum Tool Using Websockets, Node.js, jQuery, and CSS3 (github.com)

# data[].attributes.attachment_link.readable_text
scrumblr is a web-based simulation of a physical agile kanban board that supports real-time collaboration. it is built using node.js, websockets (using socket.io), CSS3, and jquery. i hope you like it.

you can play with a demo here:

And view a video here:

if you'd like to use scrumblr go to scrumblr.ca. new boards are made simply by modifying the url to something unique. e.g. your team could use a shared board at: http://scrumblr.ca/thisisoursecretboard23423242

alternatively, you can follow the instructions below to setup scrumblr yourself. it is very simple -- it just uses redis and node.js.

if you are a developer, please fork and submit changes/fixes.

scrumblr works on up to date chrome browsers. tested mainly on chrome for osx.

my goal was to avoid buttons and ui (almost everything is edit in place or draggable). everything should be discoverable (no "help"). the look is meant to be as close as possible to Well.ca's real sprint board. see picture below. many of the decisions were to make the app look and feel as much as possible like well.ca's real sprint board -- you may find this annoying but we find it kinda funny.

install redis (last tested on v6.0.9)

install node.js (last tested on v13.11.0)

install npm

cd to the scrumblr directory; you should see server.js and other files.

run npm install

run redis redis-server (this will run forever, so open a new terminal for the next steps, or learn how to run redis as a daemon)

run scrumblr node server.js --server:port=80 where "80" is the port you want scrumblr to run on. it defaults to 8080

open a browser to http://<server>:<port> where <server> is your server's url or IP address, and <port> is the port you chose in the previous step. e.g. `http://yourwebserver:8080/

scrumblr is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

scrumblr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

See http://www.gnu.org/licenses/.

the images used in scrumblr, however are licensed under cc non commercial noderivs:

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

ali asaria

# data[].attributes.attachment_link.description
scrumblr is a web-based simulation of a physical agile kanban board that supports real-time collaboration. it is built using node.js, websockets (using socket.io), CSS3, and jquery. i hope you like it. you can play with a demo here: And view a video here: if you'd like to use scrumblr go to scrumblr.ca.

# data[].attributes.body
Einfache Integration via https://github.com/jupyter-widgets/ipyleaflet

# data[].attributes.attachment_link.readable_text
Python Libraries for GIS and Mapping

Python libraries are the ultimate extension in GIS because it allows you to boost its core functionality.

By using Python libraries, you can break out of the mold that is GIS and dive into some serious data science.

There are 200+ standard libraries in Python. But there are thousands of third-party libraries too. So, it's endless how far you can take it.

Today, it's all about Python libraries in GIS. Specifically, what are the most popular Python packages that GIS professionals use today? Let's get started.

First, why even use Python libraries for GIS?

Have you ever noticed how GIS is missing that one capability you need it to do? Because no GIS software can do it all, Python libraries can add that extra functionality you need.

Put simply, a Python library is code someone else has written to make life easier for the rest of us. Developers have written open libraries for machine learning, reporting, graphing, and almost everything in Python.

If you want this extra functionality, you can leverage those libraries by importing them into your Python script. From here, you can call functions that aren't natively part of your core GIS software.

PRO TIP: Use pip to install and manage your packages in Python

Python Libraries for GIS

If you're going to build an all-star team for GIS Python libraries, this would be it. They all help you go beyond the typical managing, analyzing, and visualizing of spatial data. That is the true definition of a geographic information system.

If you use Esri ArcGIS, then you're probably familiar with the ArcPy library. ArcPy is meant for geoprocessing operations. But it's not only for spatial analysis, it's also for data conversion, management, and map production with Esri ArcGIS.

Geopandas is like pandas meet GIS. But instead of straight-forward tabular analysis, the geopandas library adds a geographic component. For overlay operations, Geopandas uses Fiona and Shapely, which are Python libraries of their own.

The GDAL/OGR library is used for translating between GIS formats and extensions. QGIS, ArcGIS, ERDAS, ENVI, and GRASS GIS and almost all GIS software use it for translation in some way. At this time, GDAL/OGR supports 97 vector and 162 raster drivers.

The RSGISLib library is a set of remote sensing tools for raster processing and analysis. To name a few, it classifies, filters, and performs statistics on imagery. My personal favorite is the module for object-based segmentation and classification (GEOBIA).

The main purpose of the PyProj library is how it works with spatial referencing systems. It can project and transform coordinates with a range of geographic reference systems. PyProj can also perform geodetic calculations and distances for any given datum.

Python Libraries for Data Science

Data science extracts insights from data. It takes data and tries to make sense of it, such as by plotting it graphically or using machine learning. This list of Python libraries can do exactly this for you.

Numerical Python ( NumPy library) takes your attribute table and puts it in a structured array. Once it's in a structured array, it's much faster for any scientific computing. One of the best things about it is how you can work with other Python libraries like SciPy for heavy statistical operations.

The Pandas library is immensely popular for data wrangling. It's not only for statisticians. But it's incredibly useful in GIS too. Computational performance is key for pandas. The success of Pandas lies in its data frame. Data frames are optimized to work with big data. They're optimized to such a point that it's something that Microsoft Excel wouldn't even be able to handle.

When you're working with thousands of data points, sometimes the best thing to do is plot it all out. Enter matplotlib. Statisticians use the matplotlib library for visual display. Matplotlib does it all. It plots graphs, charts, and maps. Even with big data, it's decent at crunching numbers.

Lately, machine learning has been all the buzz. And with good reason. Scikit is a Python library that enables machine learning. It's built into NumPy, SciPy, and Matplotlib. So, if you want to do any data mining, classification or ML prediction, the Scikit library is a decent choice.

Regular expressions (Re) are the ultimate filtering tool. When there's a specific string you want to hunt down in a table, this is your go-to library. But you can take it a bit further like detecting, extracting and replacing with pattern matching.

ReportLab is one of the most satisfying libraries on this list. I say this because GIS often lacks sufficient reporting capabilities. Especially, if you want to create a report template, this is a fabulous option. I don't know why the ReportLab library falls a bit off the radar because it shouldn't.

If you want to create interactive maps, ipyleaflet is a fusion of Jupyter notebook and Leaflet. You can control an assortment of customizations like loading basemaps, geojson, and widgets. It also gives a wide range of map types to pick from including choropleth, velocity data, and side-by-side views.

Just like ipyleaflet, Folium allows you to leverage leaflet to build interactive web maps. It gives you the power to manipulate your data in Python, then you can visualize it with the leading open-source JavaScript library.

Geemap is intended more for science and data analysis using Google Earth Engine (GEE). Although anyone can use this Python library, scientists and researchers specifically use it to explore the multi-petabyte catalog of satellite imagery in GEE for their specific applications and uses with remote sensing data.

Simply named the LiDAR Python Package, the purpose is to process and visualize Light Detection and Ranging (LiDAR) data. For example, it includes tools to smooth, filter, and extract topological properties from digital elevation models (DEMs) data. Althought I don't see integration with raw LAS files, it serves its purpose for terrain and hydrological analysis.

PRO TIP: If you need a quick and dirty list of functions for Python libraries, check out DataCamp's Cheat Sheets.

The Python Libraries All-Star Team

These are the Python libraries we thought were stand-outs for GIS and data science.

Now, it's time to turn it on to you.

If you could build an all-star team of Python libraries, who would you put on your team?

Please let us know with a comment below.

Are you looking to build your Python skills?

And if you want to get certified in Python programming, then check out some of the top-notch programs below:

Earn a certificate upon completion - increase your chances of promotion and starting a new career.

# data[].attributes.attachment_link.title
15 Python Libraries for GIS and Mapping - GIS Geography

# data[].attributes.attachment_link.description
Python libraries are the ultimate extension in GIS because it allows you to boost its core functionality. By using Python libraries, you can break out of the mold that is GIS and dive into some serious data science. There are 200+ standard libraries in Python. But there are thousands of third-party libraries too.

# data[].attributes.body
u. a. KANBAN-Board, Mindmapping und viele andere Templates / ermöglicht es mit einem Stift auf dem Canvas zu schreiben, darüber Mindmaps, Notizzettel usw. zu heften / Präsentationsmodus inklusive (Frames können für beliebige Bereiche definiert und während der Präsentation aufgerufen werden.)

NEU: EDUCATION LICENCE (KOSTENFREI FÜR LEHRKRÄFTE / PRO LEHRKRAFT 100 PERSONEN IN TEAMS MÖGLICH)

DSGVO unklar

# data[].attributes.attachment_link.title
Miro: the collaborative whiteboard platform for distributed teams

# data[].attributes.attachment_link.description
Scalable, secure, cross-device and enterprise-ready team collaboration whiteboard for distributed teams. Join 10M+ users from around the world