From 0d7e2b926f74c2be3d8478b621802de4dd17d393 Mon Sep 17 00:00:00 2001 From: Mikalai Syty <mikalai.syty@gmail.com> Date: Tue, 9 Oct 2018 13:19:59 +0200 Subject: [PATCH 1/4] Removed duplicated .gitignore files, simplified txt-files exclusion in the repository root folder --- .gitignore | 5 ++- data/.gitignore | 107 ------------------------------------------------ doc/.gitignore | 107 ------------------------------------------------ src/.gitignore | 107 ------------------------------------------------ 4 files changed, 3 insertions(+), 323 deletions(-) delete mode 100644 data/.gitignore delete mode 100644 doc/.gitignore delete mode 100644 src/.gitignore diff --git a/.gitignore b/.gitignore index e9bdebe..1049ef6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ # my private file private.py -ideas.txt -github.txt + +# txt files in a repository root folder +/*.txt # Byte-compiled / optimized / DLL files __pycache__/ diff --git a/data/.gitignore b/data/.gitignore deleted file mode 100644 index 5c26ba0..0000000 --- a/data/.gitignore +++ /dev/null @@ -1,107 +0,0 @@ -# my private file -private.py - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 5c26ba0..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1,107 +0,0 @@ -# my private file -private.py - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ diff --git a/src/.gitignore b/src/.gitignore deleted file mode 100644 index 5c26ba0..0000000 --- a/src/.gitignore +++ /dev/null @@ -1,107 +0,0 @@ -# my private file -private.py - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*.cover -.hypothesis/ -.pytest_cache/ - -# Translations -*.mo -*.pot - -# Django stuff: -*.log -local_settings.py -db.sqlite3 - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# pyenv -.python-version - -# celery beat schedule file -celerybeat-schedule - -# SageMath parsed files -*.sage.py - -# Environments -.env -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ From e8612e8eb5c3f0f3aeed21557c4bae7e72c9c58b Mon Sep 17 00:00:00 2001 From: Mikalai Syty <mikalai.syty@gmail.com> Date: Tue, 9 Oct 2018 13:20:28 +0200 Subject: [PATCH 2/4] Removed ideas.txt.gpg file --- ideas.txt.gpg | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 ideas.txt.gpg diff --git a/ideas.txt.gpg b/ideas.txt.gpg deleted file mode 100644 index 48eaf0b..0000000 --- a/ideas.txt.gpg +++ /dev/null @@ -1,2 +0,0 @@ -� 3���=K�l���U(��C�diN*�z��.f��}��!��GJ�2�Ț��,W�t�&VLW-OW����7(��I��K�˶�ޓG&$_�Xs$%��7ͅ`J�|2Lj|'�!�褂�!Q�~>_t������~+��y�� #�1_�S���v�F�k�{H��9� ;��}�%+�{��n��<�Yul�<^�&-$F/�ڨ��-/B�=A�Q�����!�c���Iju -~�G���>��ܭ`�!����ΊJ�A%�PY�rsƃ�����k��� \ No newline at end of file From 9ac217f2553385b829443517f10ad4d83455ec7e Mon Sep 17 00:00:00 2001 From: Mikalai Syty <mikalai.syty@gmail.com> Date: Tue, 9 Oct 2018 13:20:41 +0200 Subject: [PATCH 3/4] Added requirements files for easier dependencies installation (both for Linux and Windows) --- src/requirements-win.txt | 18 ++++++++++++++++++ src/requirements.txt | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 src/requirements-win.txt create mode 100644 src/requirements.txt diff --git a/src/requirements-win.txt b/src/requirements-win.txt new file mode 100644 index 0000000..344269b --- /dev/null +++ b/src/requirements-win.txt @@ -0,0 +1,18 @@ +pywin32==223 +numpy==1.14.5 +Pillow==5.3.0 +feedparser==5.2.1 +html2text==2018.1.9 +imageio==2.4.1 +matplotlib==3.0.0 +midi2audio==0.1.1 +moviepy==0.2.3.5 +music21==5.3.0 +numba==0.40.0 +pygame==1.9.4 +pyttsx3==2.7 +quandl==3.4.2 +scipy==1.1.0 +skimage==0.0 +vispy==0.5.3 +wordcloud==1.5.0 diff --git a/src/requirements.txt b/src/requirements.txt new file mode 100644 index 0000000..441a224 --- /dev/null +++ b/src/requirements.txt @@ -0,0 +1,17 @@ +numpy==1.14.5 +Pillow==5.3.0 +feedparser==5.2.1 +html2text==2018.1.9 +imageio==2.4.1 +matplotlib==3.0.0 +midi2audio==0.1.1 +moviepy==0.2.3.5 +music21==5.3.0 +numba==0.40.0 +pygame==1.9.4 +pyttsx3==2.7 +quandl==3.4.2 +scipy==1.1.0 +skimage==0.0 +vispy==0.5.3 +wordcloud==1.5.0 From 2827bad2aa17f346487b78ceb6ca70937263d270 Mon Sep 17 00:00:00 2001 From: Mikalai Syty <mikalai.syty@gmail.com> Date: Tue, 9 Oct 2018 13:20:52 +0200 Subject: [PATCH 4/4] Cleaned up and restructured README file --- README.md | 82 +++++++++++++++++++++++-------------------------------- 1 file changed, 34 insertions(+), 48 deletions(-) diff --git a/README.md b/README.md index ee9f077..8613ca1 100644 --- a/README.md +++ b/README.md @@ -1,56 +1,42 @@ # python4zkm -Introductionary Python3 samples related to digital artworts, demonstrating principles of data, images, sound, and visualizations. -Inspired by the [open codes](https://open-codes.zkm.de/en) exhibition at the -[ZKM](https://zkm.de/), Karlsruhe, Germany +Introductionary Python3 samples related to digital artworts, demonstrating principles of data, images, sound, and visualizations. Inspired by the [open codes](https://open-codes.zkm.de/en) exhibition at the +[ZKM](https://zkm.de/), Karlsruhe, Germany. -The related workshop [Code like an Artist](https://www.meet-and-code.org/de/de/event-show/1872 -) ist recognized by the international [meet and code](https://www.meet-and-code.org/de/de/ -) program. +The related workshop [Code like an Artist](https://www.meet-and-code.org/de/de/event-show/1872) ist recognized by the international [meet and code](https://www.meet-and-code.org/de/de/) program. <img src="https://zkm.de/media/styles/r17_1280/public/bild/ocii_plakat_dina1_final.jpg?itok=77xfS05w&c=e425af2cad7290dca592b01cdf1b1ca4" width="250"> -More information on the related artworks and the samples is in the [doc folder](../master/doc/opencodes.md) -The code samples don't aim to demonstrate best-practice in terms of coding style and documentation -(not even on English syntax and grammar). Instead, they try to give an introduction in a very brief manner to -everything from "what is a variable" to "how to crate a movie" and beyond. - -To run all samples you need to install the following modules: - - * numpy - * matplotlib - * numba - * pygame - * random - * pyttsx3 - * * On Windows you need pywin32 too for speech - * feedparser - * hashlib - * html2text - * quandl - * wave - * moviepy - * vispy - * imageio - * scikit-image - * sxipy - * PIL (aka PILLOW) - -I hope I got all of them. In case I didn't you will get a warning about missing modules.... - -In addition, you need the following packages in your system installation: - - * espeak for text to speech output - * Image processing examples would profit from opencv2, but this requires a lot of additional stuff on WIndows, so I tried to avoid it. In case you want to go that way: - * * Install OpenCV3 - * * Get a basic VisualStudio installation. Please refer to the OpenCV3 tutorials like - * * * here: https://docs.opencv.org/master/d3/d52/tutorial_windows_install.htm - * For stockParse you need an API key from Quandl (the stock data provider) - * * Sign up for a free key [here](https://quandl.com) and add the key to a file - * * private.py with the content: - * * * quandl_key = "<the key you got from quandl>" - * * stockParse imports the key from this private file - -The samples have been tested on Linux and Windows using Python3 version 3.6 +More information on the related artworks and the samples is in the [doc folder](../master/doc/opencodes.md). +## Disclaimer +The code samples don't aim to demonstrate best-practice in terms of coding style and documentation (not even on English syntax and grammar). Instead, they try to give an introduction in a very brief manner to everything from "what is a variable" to "how to create a movie" and beyond. +## Requirements + +### System installations + +- Python 3.6+ +- eSpeak + - for text to speech output +- OpenCV3 + - a basic VisualStudio installation. Please refer to the OpenCV3 tutorials like [here](https://docs.opencv.org/master/d3/d52/tutorial_windows_install.html) +- Quandl API Key (for `stockParse` sample) + - sign up for a free key [here](https://quandl.com) and add the key to a file `private.py` created in a repository root folder with the following content: + - `quandl_key = <the key you got from quandl>` + +### Python packages + +In order to run all samples, you need to install dependencies as follows: + +On Windows: + +``` +pip install -r requirements-win.txt +``` + +On Linux or Mac: + +``` +pip install -r requirements.txt +```