Python
Start an ad-hoc web server
Run:
List the loggers and make some of them shut up
# List loggers
loggers = [logging.getLogger(name) for name in logging.root.manager.loggerDict]
print(loggers)
# STFU Py4J
logging.getLogger("py4j.clientserver").setLevel(logging.ERROR)
Decorative Python
Primer on Python Decorators: https://realpython.com/primer-on-python-decorators/
Sync/Async
A simple walk-through of the interaction between sync and async: https://www.aeracode.org/2018/02/19/python-async-simplified
Installing pyenv in Windows
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Invoke-WebRequest -UseBasicParsing -Uri "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1" -OutFile "./install-pyenv-win.ps1"; &"./install-pyenv-win.ps1"
Add <HOME_DIR>\.pyenv\pyenv-win\bin
to PATH
pyenv --version
to check if the installation was successful.- Run
pyenv install -l
to check a list of Python versions supported by pyenv-win - Run
pyenv install <version>
to install the supported version - Run
pyenv global <version>
to set a Python version as the global version -
Check which Python version you are using and its path
-
Check that Python is working