Skip to content

Instantly share code, notes, and snippets.

View konnov's full-sized avatar
🏠
Working from home

igor@konnov.phd konnov

🏠
Working from home
View GitHub Profile
@konnov
konnov / FunctionSetEqualityProofs.tla
Created September 6, 2026 19:56
Proofs about function sets
---- MODULE FunctionSetEqualityProofs ----
EXTENDS TLAPS
\* Proofs for https://github.com/apalache-mc/apalache/issues/3477.
\* AI-assisted: written and checked with the pi coding assistant.
\* No finiteness assumptions are needed.
\* Run from the repository root:
\* tlapm --nofp test/tla/FunctionSetEqualityProofs.tla
\* These statements concern sets of functions, not function constructors.
@konnov
konnov / organize-photos-by-month.py
Created July 25, 2026 14:43
Organize photos from Google Takeout
#!/usr/bin/env python3
#
# Copy every photo from input_directory/**/*.{jpg,jpeg}
# to output_directory/${yyyy}-${mm}/${basename}, where:
# - yyyy is the year when the photo was taken
# - mm is the year when the photo was taken
# - basename is the name of the file excluding the directory name.
#
# This script requires the exif package. Install it by running pip:
#
@konnov
konnov / opus4.8-explanation.txt
Last active May 30, 2026 17:50
Pseudo-German task for LLMs
I've decoded the customer's puzzle. It's a deliberately obfuscated formal-methods exercise. Here's my translation:
┌───────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────┐
│ Obfuscated term │ Actual meaning │
├───────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────┤
│ Gevickling │ A Peano natural number │
├───────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────┤
│ Quonzerung │ Zero │
├───────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────┤
│ Schrischbreiz(g) │ Successor — g + 1
@konnov
konnov / MC3_system.tla
Created April 28, 2026 10:26
Generated TLA+ specification of ZooKeeper f9865650ed34749d2b6c57a71e2f961a16347eb1
------------------------------ MODULE MC3_system ------------------------------
\* an instance to run the model checker
EXTENDS Integers, FiniteSets, Sequences, TLC
REPLICA == {1, 2, 3}
IUT_REPLICA == 1
PERSIST_IUT_STATE == TRUE
QUORUMS == {{1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}
REPLICA_PERMS == {(1 :> 1) @@ (2 :> 2) @@ (3 :> 3), (1 :> 1) @@ (2 :> 3) @@ (3 :> 2), (1 :> 2) @@ (2 :> 1) @@ (3 :> 3), (1 :> 2) @@ (2 :> 3) @@ (3 :> 1), (1 :> 3) @@ (2 :> 1) @@ (3 :> 2), (1 :> 3) @@ (2 :> 2) @@ (3 :> 1)}
CRASHED == {v_0 \in {0}: FALSE}
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
@konnov
konnov / easychair2slack.py
Created August 25, 2020 20:35
A script to export an Easychair program into Slack
#!/usr/bin/env python
#
# Import an Easychair program into slack sessions.
#
# 1. To export the Easychair program into CSV,
# go to Schedule/Download program/CSV format.
# Unpack the produces zip and run this script in the same directory.
#
# 2. In your Slack workspace, click next to the workspace name,
# choose Settings & administration/Workspace settings.

Keybase proof

I hereby claim:

  • I am konnov on github.
  • I am ikonnov (https://keybase.io/ikonnov) on keybase.
  • I have a public key ASDAc8NCM928qOHdBf0h0D66JkHE_HiWXUAN3t3r3PDZGAo

To claim this, I am signing this object:

@konnov
konnov / rtm2todoist.py
Created April 1, 2018 16:05
Converting Remember-the-milk tasks (ICS) to a Todoist template (CSV)
#!/usr/bin/env python
#
# Converting an ICS file produced by Remember the milk to a CSV file
# that can be read by Todoist.
#
# Bye-bye, remember the milk. Raising the annual price from $25.00 to $39.99,
# while stagnating with the old interface, is the way to lose your loyal pro users.
#
# This script requires icalendar, which can be installed like this:
#
@konnov
konnov / nikita.pml
Last active December 1, 2016 14:55
/**
Producer/Consumer by Nikita Yushchenko
The Promela encoding by Igor Konnov.
To check the property, run:
spin -a nikita.pml && gcc -o pan pan.c && ./pan -f -a -N corr2 -m10000000
*/
@konnov
konnov / bridge.tla
Last active June 6, 2016 17:51
Yet another bridge puzzle in TLA+
---------------------------- MODULE bridgePuzzle ----------------------------
(*
Use TLC from TLA Toolbox to solve this puzzle:
http://research.microsoft.com/en-us/um/people/lamport/tla/toolbox.html
A family of four people (the father, the mother, the baby, and the grandmother)
have to cross a bridge at night having only one flashlight.
At most two people can cross the bridge at a time holding
the flashlight in their hands. It takes each member of the family the
following time to cross the bridge in either direction: father needs 1 minute,