Skip to content

Instantly share code, notes, and snippets.

View julian-klode's full-sized avatar

Julian Andres Klode julian-klode

View GitHub Profile
#!/usr/bin/python3
#
# Copyright (C) 2020-2021 Julian Andres Klode <[email protected]>
#
# This Source Code Form is subject to the terms of the Mozilla
# Public License, v. 2.0. If a copy of the MPL was not distributed
# with this file, You can obtain one at
# https://mozilla.org/MPL/2.0/.
#
"""HR plotting script.
@julian-klode
julian-klode / liberal-pinning.md
Last active March 19, 2021 13:52
APT solver questions

Given packages a and b with versions 1,2,3 (higher is more preferred), and a dependency A|B giving preference to A, how would you expect a dependency a|b to expand?

  1. A over B within each preference level:
    a (= 3) | b (= 3) | a (= 2) | b (= 2) | a (= 1) | b (= 1)
    
  2. any A over any B:
    a (= 3) | a (= 2) | a (= 1) | b (= 3) | b (= 2) | b (= 1)
    
Origin: Ubuntu
Label: Ubuntu
Suite: hirsute
Version: 21.04
Codename: hirsute
Date: Thu, 04 Feb 2021 9:47:45 UTC
Architectures: amd64 arm64 armhf i386 ppc64el riscv64 s390x
Components: main restricted universe multiverse
Description: Ubuntu Hirsute 21.04
MD5Sum:
; $ hledger -f f bal -p 2020 --value=end assets -Y
; Period-end value changes in 2020:
;
; || 2020
; ====================++=========
; assets:investments || -13.59€
; --------------------++---------
; || -13.59€
; $ hledger -f f bal -p 2020 --value=end assets
; -9.79€ assets:investments
#!/usr/bin/gnuplot
#
# speed - simple speed measuring tool using Debian repository download - plotting
#
# SPDX-FileCopyrightText: 2020 Julian Andres Klode <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
set datafile separator ","
set terminal png size 2560 ,1440
set title "Bandbreitenmessung / Bandwidth measurement - Deutsche Glasfaser"
#!/usr/bin/python3
import urllib.request
import time
import apt_pkg
import subprocess
import sys
def get_ping(cdn):
import csv
import difflib
with open("a1jx52.csv") as ftse:
ftse_list = list(csv.reader(ftse))
with open("IUSN_holdings.csv") as small:
small_list = list(csv.reader(small))
def clean(s):
for c in ". ,":
#include <apt-pkg/cachefile.h>
#include <apt-pkg/cachefilter.h>
#include <apt-pkg/debversion.h>
#include <apt-pkg/error.h>
#include <apt-pkg/init.h>
#include <apt-pkg/pkgsystem.h>
#include <apt-pkg/strutl.h>
#include <cstdlib>
#include <iostream>
#include <regex>
#!/usr/bin/python3
#
# Copyright (C) 2020 Julian Andres Klode <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-or-later
"""Takes a Chrome CSV on stdin, and produces a Bitwarden JSON export on stdout.
The output only contains relevant fields, and logins are merged together based
on user name and password.

Keybase proof

I hereby claim:

  • I am julian-klode on github.
  • I am julianklode (https://keybase.io/julianklode) on keybase.
  • I have a public key ASATNYfDeu0km1-g-ZY8ECurwuNlKjkY5bLLKeCCk39inAo

To claim this, I am signing this object: