Chapter X

Some Chapter title

install MacOS

xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install pyenv pyenv-virtualenv
brew install zlib sqlite
cd ~/

echo 'eval "$(pyenv init -)"' >> .zshrc

pyenv install -l
pyenv install 3.8.2

Visual Studio Code die Python-Erweiterung installiert
Shift + cmd + P -> Python: Select Interpreter

Manualls

  1. https://docs.python.org/3/
Quellen

https://opensource.com/article/19/6/python-virtual-environments-mac

https://bodo-schoenfeld.de/eine-virtuelle-umgebung-fuer-python-erstellen/

https://akrabat.com/creating-virtual-environments-with-pyenv/

todo

https://github.com/OpenReplyDE/bbbackup

https://www.data-science-architect.de/selektieren-von-daten-in-dataframes/

Inst

Ubuntu

https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-an-ubuntu-20-04-server-de

pas 22.03.2020

Unterabschnitte von Python

in arbeit in arbeit

OCR

OCR nachträglich …

pas 18.05.2020

Unterabschnitte von JupyterLab

Basics

  • Tuple = (“John”, “Peter”, “Vicky”)
  • dictionary = {“name”: “John”, “country”: “Norway”}
  • list = [“apple”, “banana”, “cherry”]
  • set = {“apple”, “banana”, “cherry”}
  • array = numpy …

Bildbearbeitung mit Pillow

Thumb’s erstellen

from PIL import Image
import glob, os, sys

size = 128, 128

folder = os.path.dirname(__file__)
os.chdir(folder)
print(os.getcwd())

# l = [f for f in os.listdir(folder) if f.endswith('.jpg')]

for infile in os.listdir(folder):
    try:
        im = Image.open(infile)
        file, ext = os.path.splitext(infile)
        print(infile)
        im.thumbnail(size, Image.ANTIALIAS)
        im.save(file + "-thumb.jpg", "JPEG")
    except:
        print("Unexpected error: " , sys.exc_info()[0])

Quellen

  1. http://effbot.org/imagingbook/image.htm#tag-Image.Image.verify