Skip to content

Instantly share code, notes, and snippets.

ToC

  1. Section 1
  2. Section 2

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.

Duis autem vel eum iriure dolor in hendrerit

#!/usr/bin/env python3
import sys
import logging
logging.basicConfig(format="%(asctime)s %(message)s",
level=logging.INFO,
stream=sys.stderr)
import numpy as np
import xarray as xr
import pandas as pd
@pont-us
pont-us / create-wifi-qr-code-sign.py
Last active May 20, 2022 18:01
Create a WiFi QR code as a PDF or printout
#!/usr/bin/env python3
"""Create a wifi QR code as a PDF or printout.
This script creates a small sign showing a WiFi network name (SSID) and
password along with a QR code encoding this information in a format which
allows Android devices to connect automatically to the network by scanning
the code.
Requires: pdflatex, qrencode
@pont-us
pont-us / irmunmix-statistics.py
Created September 3, 2019 21:24
Read and summarize data from Irmunmix output files
#!/usr/bin/env python3
"""Read and summarize data from Irmunmix output files.
This script reads data from one or more Irmunmix output files and prints
summary statistics of the mean coercivities to the standard output.
Currently, it analyses all components from all specified files, and does
not allow the selection of a particular component from each file.
@pont-us
pont-us / extract-stackoverflow-tech-tags.py
Last active August 16, 2019 13:14
Extract and print technology tags from StackOverflow company page
#!/usr/bin/env python3
"""Extract and print technology tags from StackOverflow company page.
Given the final part of a StackOverflow company URL, extract the contents
from the technology stack links onthe corresponding company page and write
them to stdout, separated by spaces.
e.g. supplying "suse" as an argument will print the technologies listed
at https://stackoverflow.com/jobs/companies/suse .
@pont-us
pont-us / replace_2g_depth_column.py
Created March 1, 2018 08:41
Replace values in Depth column of a 2G magnetometer file
#!/usr/bin/env python3
import argparse
"""
Replace the contents of the column headed "Depth" in a tab-delimited text
file with a repeated, increasing range of specified numbers. Intended to fix
incorrect depths in 2G magnetometer files. The column header is retained in
the output file. The values below it are replaced with a sequence starting at
the specified min_depth and ending at the specified max_depth (inclusive).