Working with Azure and Python

Ralph/ January 25, 2020/ Azure, Python

First Step: Hello World Sample The following steps at borrowed from the quick start tutorial. Download sample repository Create virtual environment Login zu Azure Deploy to App Service Create Django App with PostgreSQL Installation PostgreSQL on Mac OS Set user and passwords for postgres database Create database and user for django app Download sample repository Create virtual environment Run server

Read More

Django | Cookbook

Ralph/ January 22, 2020/ Cookbook, Django, Python

First steps The following steps are based on a summary of the Django Tutorial Create project Create view Create view in app_base/views.py Add view to app_base/urls.py Add urls to project main/urls.py Create admin user Create data and database Create database model in app_base/models.py Activating models in main/settings.py Make app modifiable in the admin (app_base/admin.py) Writing more views Create views in

Read More

Test-Driven Development with Python

Ralph/ August 7, 2019/ Python

Part 1: Create a TDD Python Project Part 2: Use Jenkins to automatically test your App Part 1: Create a TTD Python Project Final source code is on Github. Introduction The task of creating an error free program is not easy. And, if your program runs free of errors, keeping it error-free after an update or change is even more complicated.

Read More

Working with Django

Ralph/ June 15, 2019/ Django, Python

Tutorial: Django-Polls App We start with this amazing tutorial in building a Django polls app. The final code of the tutorial is here. After this, we will extend the App with additional feature like Bootstrap and Angular 8. Starting with Django Installation with Pip Install from Source Tutorial https://docs.djangoproject.com/en/2.2/intro/tutorial02/ Configure development environment Visual Studio Code Helpfull links and documentation Links

Read More

Jupyter | Cookbook

Ralph/ May 12, 2019/ Cookbook, Jupyter, Python

Cookbook Customize start dir Search for the following line in the file Replace by Free online Notebooks https://notebooks.azure.com/ https://nbviewer.jupyter.org/ https://colab.research.google.com/notebooks/welcome.ipynb

Working with virtual environments

Ralph/ March 16, 2018/ Python

Introduction venv module virtualenv pipenv pipenv Introduction Pipenv — the officially recommended Python packaging tool from Python.org, free (as in freedom). Read here how to install in details Installation For Mac OS and brew package manager Prepare environment venv module Installation Nothing required. Module venv is part of the Python distribution Prepare environment virtualenv Prepare environment

Python: Replacing the Shell

Ralph/ May 19, 2017/ Python

Possible Solutions plumbum Github XonSH Github (git clone https://github.com/xonsh/xonsh.git) IPython Sarge Source (hg clone https://bitbucket.org/vinay.sajip/sarge) sh Github (git clone https://github.com/amoffat/sh.git) Plumbum Install: pip install plumbum

iPython | Getting Started

Ralph/ May 12, 2017/ iPython, Python

Introduction iPython ist ein Kommandozeileninterpreter zum interaktiven Arbeiten mit der Programmiersprache Python.  IDEs and Environments iPython Jupyter Anaconda Install  Jupyter $ virtualenv –python python3 jupyter $ cd jupyter $ . bin/activate $ pip install –upgrade pip $ pip install jupyter Finally run jupyter jupyter notebook Anaconda $ virtualenv –python python3 anaconda $ cd anaconda $ . bin/activate $ wget https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh | bash jupyter notebook

Read More

Python: Toolbox

Ralph/ December 30, 2016/ Python

Introduction Update Python Environment Update all Python packages pip3 list| cut -f1 -d’ ‘|xargs -I {} pip3 install {} –upgrade Debugging and Tracing def tracefunc(frame, event, arg, indent=[0]): if event == “call”: indent[0] += 2 print “-” * indent[0] + “> call function”, frame.f_code.co_name elif event == “return”: print “<” + “-” * indent[0], “exit function”, frame.f_code.co_name indent[0] -= 2

Read More