I hereby claim:
- I am hastern on github.
- I am hannosternberg (https://keybase.io/hannosternberg) on keybase.
- I have a public key whose fingerprint is 4F04 BA51 330C F378 12C9 C2B7 85D2 50F6 D86F F5CD
To claim this, I am signing this object:
#!/usr/bin/env python | |
import argparse | |
import json | |
import pathlib | |
from PIL import Image | |
if __name__ == "__main__": |
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import json | |
import itertools | |
import collections | |
import random | |
import pathlib | |
from PIL import Image |
@echo off | |
Setlocal EnableDelayedExpansion | |
IF [%RESTIC_REPOSITORY%] == [] GOTO missingrepo | |
IF [%RESTIC_PASSWORD%] == [] GOTO missingpass | |
IF NOT EXIST %RESTIC_REPOSITORY% GOTO invalidrepo | |
REM Expect restic to be in the system path | |
SET RESTIC_PATH=restic |
-- This is a custom design based on the Advent of Code Day 2 | |
-- | |
-- You can put your own input into the design by changing parts of | |
-- the code below. | |
-- Currently it is not possible to solve both parts at once. | |
function get_name() | |
return "AoC-Day 2-Bathroom Security" | |
end |
import pyparsing as pp | |
LP = pp.Literal("(").suppress() | |
RP = pp.Literal(")").suppress() | |
String = pp.Word(pp.alphanums + '_') | |
SingleQuoteString = pp.QuotedString(quoteChar="'", unquoteResults=False) | |
DoubleQuoteString = pp.QuotedString(quoteChar='"', unquoteResults=False) | |
QuotedString = SingleQuoteString | DoubleQuoteString | |
Atom = String | QuotedString |
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
# | |
# A simple dictionary based configuration loader | |
# | |
# ------------- | |
# Usage example | |
# ------------- | |
# | |
# from configloader import Configuration |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
import math | |
import operator | |
import itertools | |
def pad(iterable, padding=0): | |
for itm in itertools.chain(iterable, itertools.cycle([padding])): |
/* Some list helper functions */ | |
elementOrVal (l, idx, v) := block( | |
[res], | |
if length(l) >= idx and idx > 0 then | |
res: l[idx] | |
else | |
res: v, | |
res | |
); |
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import os | |
import wx | |
def messageDialog(message, caption=wx.MessageBoxCaptionStr, style=wx.OK | wx.ICON_INFORMATION): | |
"""Utility method to create a generic message dialog""" | |
dial = wx.MessageDialog(None, message, caption, style) | |
return dial.ShowModal() |