Skip to content

Instantly share code, notes, and snippets.

View jasiek's full-sized avatar

Jan Szumiec jasiek

View GitHub Profile
# https://en.wikipedia.org/wiki/Call_signs_in_the_United_Kingdom#Call_sign_assignments_for_amateur_radio
# This appears to work:
/
(?<reg>[UDJIMWPTHNSC]?)
(?<callsign>M\g<reg>[01356][A-Z]{3})|
(?<callsign>(G\g<reg>[123468][A-Z]{2,3})|
(G\g<reg>[07][A-Z]{3})|(G\g<reg>5[A-Z]{2}))|
(?<callsign>2[EUDJIMW][01][A-Z]{3})
/
var refParser = require('json-schema-ref-parser');
const fs = require('fs');
const path = require('path');
const jsonPath = process.argv[2] || './schemas';
const distPath = process.argv[3] || './dist';
const prefix = process.argv[4] || '';
const beautify = require('js-beautify').js_beautify;
fs.readdir(jsonPath, (err, filenames) => {
if (err) {
void setup() {
Serial.begin(9600);
for (int i = 0; i < 14; i++) {
pinMode(i, OUTPUT);
}
}
void loop() {
for (int i = 0; i < 14; i++) {

Keybase proof

I hereby claim:

  • I am jasiek on github.
  • I am jasiek (https://keybase.io/jasiek) on keybase.
  • I have a public key ASAnCMSJ1EGLfS54e39jGTQ1qCNQfWUO0dr4mt2xp0HCqQo

To claim this, I am signing this object:

@jasiek
jasiek / melody_in_c.ly
Last active June 8, 2017 18:47
Melody in C
\language "english"
\version "2.18.2"
\header {
title = "Melody in C"
}
a_upper = \relative c'' {
\clef treble
\key c \major
@jasiek
jasiek / todo.txt
Created September 21, 2017 21:11
* Cyfrowy notariusz:
Uprościć podpis elektroniczny w ten sposób, że banki lub ubezpieczyciele (którzy już wykonali
proces KYC w odniesieniu do konkretnej osoby), mogą umożliwać podpisywanie dokumentów on-line.
To radykalnie obniży barierę którą trzeba przeskoczyć aby zacząć korzystać z podpisu elektronicznego.
Banki będą tym zainteresowane ponieważ umożliwa im to wygenerowanie kolejnego strumienia dochodów
z istniejącej bazy klientów.
* Konsolidacja technologiczna centrów danych. Z moich informacji wynika, że Państwo jest w posiadaniu
ogromnej ilości centrów danych, z których wiele nie jest wykorzystywanych. Należy przeprowadzić
inwentaryzację i konsolidację zarówno na poziomie materialnym jak i technologicznym. Niepotrzebne
require 'securerandom'
N = 1_000_000
M = 16
s = Array.new(N) { SecureRandom.hex(M) }
s.sort!
def lcs(a, b)
M.times do |i|
@jasiek
jasiek / dist.py
Last active August 2, 2018 19:35
matches.txt
from Levenshtein import distance, hamming, median
with open("miejscowosci.txt") as f:
lines = f.readlines()
newlines = []
while len(lines) > 0:
line = lines.pop()
newlines.append(line.strip())
newlines = list(set(newlines))
newlines.sort(key=lambda p : distance('Ledionkoi', p))
import os
import shutil
import sys
#
# For each file in a given directory, create a directory with the first letter of the file, and then move the file
# into that directory.
#
def main():
4859943 "British"
1063401 null
179841 "English"
83582 "Irish"
76441 "Polish"
73856 "Indian"
68676 "Romanian"
58986 "Chinese"
55624 "Italian"
42444 "German"