How-Tos

Flask and WSGI

Flask is a python module that that makes Web application creation easier. Flask generates Web pages on the fly, and when coupled with WSGI (Web Server Gateway Interface) on an Apache Web server, scales up to commercial usage. Flask is built on the WSGI Werkzeug toolkit and the Jinja2 template engine. The definitive Flask tutorial: Flask Mega Tutorial. A readable and to-the-point WSGI installation guide: How to deploy a Flask application on Ubuntu. This is a concise reminder guide taken from the above. See the above references for specific details. Installing mo

How-Tos

Snake, Camel, Dromedary cases

When it comes to naming in computer programming, we have our go-to's "foo" and "baz" for quick name choices, for files or variables or functions. But it is considered best practice to use more meaningful names like "TaxTips.txt" or "Vacation_Photos_2021". We have case types too. In the olden days, metal type is stored in wooden cases in pullout drawers, one drawer per font and size. A composer removes a case and places it on an easel, and uses a composing stick to arrange the type pieces into a phrase that is then placed into a chase for printing. The capital letters 'A

How-Tos

How to run Jupyter notebook on a remote server

You can run Jupyter server on a remote machine instead of your local machine. Replace the server port number with the port you want for your remote machine: remoteuser@remotehost: jupyter notebook --no-browser --port=9888 [default 8888]Use ssh to open a path between your local machine and the remote machine. The first localhost port below is the client side of ssh on your local machine: localuser@localhost: ssh -N -f -L localhost:9000:localhost:9888 -i "keypair.pem" ubuntu@ec2-xxx-xxx-xxx-xxx.compute-1.amazonaws.comReplace the address after keypair.pem wit