Tech Tutorials

How to parse a .fdf file in Python

How to parse a .fdf file that was created by exporting comments made within a PDF document using Adobe Reader DC version 2020.006.20042). A simple Python example illustrating the basics of parsing the .fdf file is as follows: [gist...

Python List, Tuple, Dictionary Syntax

An extremely simple example of Python lists, tuples and dictionary syntax. The example shows how to iterate through these python data structures.

Docker Cheat Sheet

Stop / Start Docker Service in Linux Commit Docker Container [code language="bash" gutter="false" title="commit docker...

Postgres Upsert On Conflict Where Clause

A basic example of a Postgres Upsert using "on conflict do update" with a where clause.    Postgres Upsert ON CONFLICT with WHERE clause create table z_test( f1 text PRIMARY KEY, f2 text, f3 text, f4 text ); insert into z_test (f1,f2,f3,f4) values('1','2','3','4');...

Set Python Virtual Env on Windows

How to set (activate) the Python Virtual Environment on Windows    Command Line cd /<path to virtual env>/Scripts activate.bat

Django Views

Each Django view is responsible for doing one of two things: returning an HttpResponse object containing the content for the requested page, or raising an exception such as Http404. The rest is up to you. Your view can read records from a database, or not. It can use...