# Python library

## Jupyter Notebook

A waste of time. Output in my source files pollutes git and prevents me from editing it in Vim. Just let me run the freacking code and render images as standalone PNGs which I can include from Markdown.

## NumPy

The people who work on this will go straight to heaven, no questions asked.

## @cirosantilli/_file/numpy/numpy/fft_plot.py

Generates numpy/fft_plot.svg, the plot of with 25 points and its DFT.

## @cirosantilli/_file/numpy/numpy/fft.py

Output:
sin(t)
fft
real 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
imag 0 -10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10
rfft
real 0 0 0 0 0 0 0 0 0 0 0
imag 0 -10 0 0 0 0 0 0 0 0 0

sin(t) + sin(4t)
fft
real 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
imag 0 -10 0 0 -10 0 0 0 0 0 0 0 0 0 0 0 10 0 0 10
rfft
real 0 0 0 0 0 0 0 0 0 0 0
imag 0 -10 0 0 -10 0 0 0 0 0 0
With our understanding of the discrete Fourier transform we see clearly that:
• the signal is being decomposed into sinusoidal components
• because we are doing the Discrete Fourier transform of a real signal, for the fft, so there is redundancy in the. We also understand that rfft simply cuts off and only keeps half of the coefficients

## SageMath

A Python wrapper over a bunch of numeric and computer algebra system packages to try and fully replace MATLAB et. al.
Quickstart tutorial at: www.sagemath.org/tour-quickstart.html From this we see that they are very opinionated, you don't need to import anything, everything has a pre-defined global name, which is convenient, e.g.:
is the 3D vector space over the rationals. This also suggests that they are quite focused on computer algebra as opposed to numerical.

## Scikit-learn

Examples under python/sklearn
. .venv/bin/activate
pip install sklearn matplotlib seaborn

## Django (web-framework)

One problem with Django is that it does not expose its ORM as an external library: stackoverflow.com/questions/33170016/how-to-use-django-1-8-5-orm-without-creating-a-django-project which is wasteful of development time.

## gothinkster/django-realworld-example-app

As of 2021, last updated 2016, and python 3.5 appears to be mandatory or else:
RuntimeError: __class__ not set defining 'AbstractBaseUser' as <class 'django.contrib.auth.base_user.AbstractBaseUser'>. Was __classcell__ propagated to type.__new__?
which apparently broke in 3.6: stackoverflow.com/questions/41343263/provide-classcell-example-for-python-3-6-metaclass and pyenv install fails on Ubuntu 20.10, so... fuck. Workarounds at:
but am I in the mood considering that the ancient Django version would require an immediate port anyways? Repo is at Django 1.0, while newest is now already Django 3. The Rails one is broken for the same reason. Fuck 2.