Python

Hack'n Fix

 Hack two web apps.

Then fix the vulnerabilites.

Format Dates Calendar.Txt Style

Format your dates Calendar.txt style, everywhere! Like 2024-01-04 w01 Thu.

I printed every day from year 1700 to 2400, using Python 3, Go, PHP, Django templates and 'date'. Then I checked that results match.

day.strftime("%Y-%m-%d w%V %a") # Python
$date->format('Y-m-d \wW D') // PHP
date +"%Y-%m-%d w%V %a" # Linux 'date'

Python Dotted Dictionary

Access your Python dict with a dot

>>> sn.url
'TeroKarvinen.com'

Using just built-in standard libraries

>>> sn = SimpleNamespace(**d)

Deploy Django 4 - Production Install

It's easy to write web apps with Python Django. To publish your apps on the internet, you must use a real production web server. This tutorial shows you how.

We'll install Python Django 4 using the recommended Apache 2.4 and mod_wsgi. Django is a popular Python web programming framework used by Instagram, National Geographic and Discus.

Django 4 Instant Customer Database Tutorial

Build a customer database. Web interface. Multiple users can log in, and edit customer database.

Learn the basics of Django 4, the web framework used by Instagram, National Geographic and Discus.

Docote - Read API Documentation Offline

Command line offline document reader for programmers, devdocs.io compatible - Docoto Read API docs offline. CLI, never leave the keyboard. Free download under GPL 3.

Supports DevDocs.io compatible JSON dictionaries, including Python, Go, HTML, Postgre and many others.

Python Web Service From Idea to Production

Build Python web service and publish it to the world!

Enroll 2022-03-14 w11 Mon 08:00. Last instance was fully booked on the day enrollment started.

Previous feedback was excellent 4.9 out of 5. Intensive online course 2022 w21-w22.

Python Web Service From Idea to Production

Build Python web service and publish it to the world!

New instance starting 2022 w21! Enroll 2022-03-14 w11 Mon 08:00.

Course completed! Feedback was excellent 4.9 out of 5. Thanks for taking my course!

You can read feedback in comments.

Intensive course on w21 and w22.

Enroll at 08:00 on Monday! Most seats were booked right after enrollment opened. Enrollment is open right now. Update: Only few seats left. Fully booked. Queue started, enroll quickly to get better position in the queue.

Jump Plugin for Micro

Jump to any function, class or heading with F4. Go, JavaScript, Python, C... A plugin for micro editor.

And if you're writing books, Jump plugin creates a table of contents from MarkDown, and allows you to jump to headings.

Translate Offline with AI

Traslate Spanish to English with Free Offline Translator LibreTranslate.

Now you can machine translate text fully offline, with no external services.

And yes, this includes the pre-trained machine learning models, works completely offline and is even Free software. So it's an nice and private alternative to Google Translate. Works with Arabic, Chinese, French, German, Italian, Russian, Spanish, Portuguese and of course English.

Log Anomaly Detection With Artificial Intelligence

 Can artificial intelligence pick suspicious log entries? My students Tuomo Kuure and Joni Hakala are training a model for that.

They use ELK to collect logs from multiple computers to an ElasticSearch NoSQL database. These log entries are then analysed with their own model using Python Tensorflow in a Docker container with GPU support.

Flask Automatic Forms

Automatically create your database and HTML forms from your model. Short, convenient, but a bit abstract. Short notes.

Deploy Python Flask to Production

Apache Foundation Feather Logo

If a tree falls in a forest and there are no clients, does it make a sound?

Deploy your web app production style. We'll use Apache2 mod_wsgi to install Flask "Hello world" app.

Flask Templates

Templates make it easy to write valid HTML. Flask supports my favourite template engine, Jinja2.

Hello Flask - Write a Python Web App

Python Flask 'Hello world' in Firefox Many popular websites use Python somewhere in their stack: Youtube, Facebook, Google and Dropbox. Flask web framework is used by Pinterest and LinkedIn.

With this article, you learn to install Python Flask and run a "Hello world" in development environment.