====== Python ====== ===== Wiki-Links ===== * [[prog:python:language|Python Sprachkonstrukte (Klassen, Definitionen, Threads, etc.)]] * [[prog:python:networking|Python Network Code]] * [[prog:python:gaming|Python Game-Design mit Ren'Py]] * [[prog:python:grafik|Grafikbibliotheken für Python]] * [[prog:python:pip|Tips zu pip]] * [[prog:python:jupyter|Jupyter]] * [[prog:python:unittest|Unit-Tests in Python]] * [[prog:python:videos|Youtube-Videos über Python]] ===== Python-Dokumentation ===== Gute Quellen zu Python: * [[http://docs.python.org/tutorial/|Python Tutorial]] (für ersten Einstieg) * [[https://www.w3schools.com/python/python_intro.asp|w3schools]] (Sprachelemente kurz erklärt) * [[https://realpython.com|Real Python Tutorials]] (umfassende und gute Tutorials) * [[https://www.youtube.com/watch?v=rfscVS0vtbw|Lerne Python - Youtube Kurs für Anfänger]] * [[http://rgruet.free.fr/PQR26/PQR2.6.html|Python 2.6 Quick Reference(leider nicht mehr aktuell!)]] https://www.python.org/shell/ für die kurze Coding-Session unterwegs... ==== Literatur ==== * https://github.com/victusfate/Python-for-Fun-by-Chris-Meyers * http://www.lassp.cornell.edu/sethna/pubPDF/PythonEducation.pdf * https://wiki.python.org/moin/BeginnersGuide/NonProgrammers * http://illustratedtheoryofnumbers.com/prog.html * https://engineering.ucsb.edu/~shell/che210d/numpy.pdf ===== Allgemein: ===== * [[https://pymotw.com/2/|Python Module of the Week]] * [[http://bender.astro.sunysb.edu/classes/python-science/|PHY 546: Python for Scientific Computing]] * http://stackoverflow.com/questions/246725/how-do-i-add-tab-completion-to-the-python-shell * http://stackoverflow.com/questions/6558765/how-do-you-see-the-entire-command-history-in-interactive-python ==== Editor/IDE: ==== * http://thonny.org * [[https://randomnerdtutorials.com/getting-started-thonny-micropython-python-ide-esp32-esp8266/|Getting Started with Thonny MicroPython (Python) IDE for ESP32 and ESP8266]] * [[https://www.youtube.com/watch?v=lBkcDFRA958|IDLE (Video)]] ===== Verschiedenes ===== * [[http://ipython.org/|ipython]] ist ein guter interaktiver Interpreter, also ein Ersatz für IDLE. * [[http://www.alexonlinux.com/pythons-optparse-for-human-beings|optparse-Artikel]] * [[http://dirk-loss.de/python-tools.htm|Python tools for penetration testers]] * [[http://py2exe.org/|py2exe]] packt Python Skripte zu einer Windows-Anwendung (vielleicht für die GUI interessant um mehr Nutzer anzusprechen?) * [[http://www.scribd.com/doc/39946630/Python-Idioms|New Python Idioms]] * [[https://eli.thegreenplace.net/2017/interacting-with-a-long-running-child-process-in-python/|Interacting with a long-running child process in Python]] * [[https://stackoverflow.com/questions/107705/disable-output-buffering|Disable output buffering]] * [[https://stackoverflow.com/questions/281133/how-to-control-the-mouse-in-mac-using-python|How to control the mouse in Mac using Python]] ==== virtualenv (virtenv) ==== * http://docs.python-guide.org/en/latest/dev/virtualenvs/ * sudo -H pip install virtualenv oder * sudo /usr/bin/easy_install virtualenv * cd my_project_folder virtualenv venv #erstellt einen Ordner und laedt Programmierumgebung source venv/bin/activate deactivate #verlaesst die virtuelle Umgebung ==== Bild-Mustererkennung mit OpenCV ==== * [[https://www.youtube.com/watch?v=WQeoO7MI0Bs|LEARN OPENCV in 3 HOURS with Python | Including 3x Example Projects (2020)]] * [[https://stackoverflow.com/questions/28327020/opencv-detect-mouse-position-clicking-over-a-picture|Opencv: detect mouse position clicking over a picture]] * https://colab.research.google.com/github/xn2333/OpenCV/blob/master/Image_Processing_in_Python_Final.ipynb ==== Machine Learning ==== * [[prog:ml:start|Machine Learning]] === LXML === * [[http://stackoverflow.com/questions/34224854/add-multiple-elements-to-xml-with-lxml|add-multiple-elements-to-xml-with-lxml]] === Python-Tipps === * [[prog:python:tipps|Python-Tipps & Tricks]] ==== Dynamic code ==== * http://stackoverflow.com/questions/1143833/how-do-you-add-a-model-method-to-an-existing-class-within-an-interactive-session * http://stackoverflow.com/questions/3061/calling-a-function-of-a-module-from-a-string-with-the-functions-name-in-python * http://stackoverflow.com/questions/16700958/python-how-can-i-dynamically-remove-a-method-from-a-class-i-e-opposite-of * http://stackoverflow.com/questions/17929543/how-can-i-dynamically-create-class-methods-for-a-class-in-python * http://stackoverflow.com/questions/19205608/exec-to-add-a-function-into-a-class * http://stackoverflow.com/questions/701802/how-do-i-execute-a-string-containing-python-code-in-python * http://stackoverflow.com/questions/3877623/in-python-can-you-have-variables-within-triple-quotes-if-so-how === Numerische Methoden === * https://docs.scipy.org/doc/numpy/reference/generated/numpy.random.poisson.html * http://stackoverflow.com/questions/25828184/fitting-to-poisson-histogram === Network-Analysis === * https://networkx.github.io * https://stackoverflow.com/questions/20133479/how-to-draw-directed-graphs-using-networkx-in-python * https://graph-tool.skewed.de ===== Sphinx/Doku ===== Für die Projextdokumentation bietet sich [[http://sphinx.pocoo.org/|Sphinx]] an. Eingabeformat ist dann [[http://docutils.sourceforge.net/docs/user/rst/quickstart.html|ReStructuredText]] ([[http://docutils.sourceforge.net/docs/user/rst/cheatsheet.txt|Cheat Sheet]]); als Ausgabe wird HTML oder LaTeX erzeugt. Erste Beispiele (nicht immer aktuell) unter http://mschuette.name/build/html/index.html und http://mschuette.name/build/latex/IPv6SecurityToolbox.pdf Die Sphinx-Erweiterung [[http://sphinx.pocoo.org/ext/autodoc.html|autodoc]] erzeugt automatische API-/Code-Dokumentationen aus den Python-docstrings. Eine Erweiterung [[http://matforge.org/fipy/browser/branches/git-sphinx/documentation/sphinxext/bibtex?rev=3479|bibtex]] ermöglicht Zitate aus BibTeX-Dateien. (noch zu testen.)