I hereby claim:
- I am mikolajb on github.
- I am mikolajb (https://keybase.io/mikolajb) on keybase.
- I have a public key ASAAD6zCg61eSlBrI7cswOxmRh70s8UEwhr1XCdYvGiYmQo
To claim this, I am signing this object:
| import requests | |
| from bs4 import BeautifulSoup | |
| from collections import defaultdict | |
| from datetime import datetime | |
| from pymongo import MongoClient | |
| KEYS = { | |
| 'Lista:': "lista", | |
| 'Okręg wyborczy:': "okręg", | |
| 'Liczba głosów:': "glosow", |
| """ | |
| Generate calendar for 5 minute plank challenge. | |
| Usage: | |
| python plank.py > plank.csv | |
| or | |
| python plank.py NUMBER_OF_SECONDS > plank.csv |
I hereby claim:
To claim this, I am signing this object:
| version: 2 | |
| services: | |
| one: | |
| image: python:slim | |
| command: python -m http.server 9999 | |
| ports: | |
| - 9999:9999 | |
| networks: | |
| - a | |
| - b |
| require 'mail' | |
| =begin | |
| Put participants in file INPUT_FILE in a format: | |
| participant_name:participant_email | |
| selection will be backed up in BACKUP_FILE. | |
| =end |
| from itertools import chain, product | |
| from time import time | |
| REPEAT = 10000 | |
| for s1, s2 in product([10, 100], repeat=2): | |
| print "%i tuples with %i elements each" % (s2, s1) | |
| a = [tuple(range(s1)) for i in range(s2)] | |
| t = time() |
| #!/bin/bash | |
| # creates ssh tunnel | |
| ssh -N -f -L 5353:localhost:5353 remote-host | |
| # makes udp -> tcp stream | |
| socat UDP-RECVFROM:53,fork TCP:localhost:5353 |
| require "pstore" | |
| threads = [] | |
| 100.times do |i| | |
| threads << Thread.new do | |
| Thread.current[:name] = "reader#{i}" | |
| p = PStore.new "test-pstore.pstore", true | |
| 10.times do | |
| roots_empty = false |
| require 'webrick/httpproxy' | |
| require 'RMagick' | |
| handler = Proc.new do |req,res| | |
| if [".gif", ".png", ".jpg", ".jpeg", ".ico"].include? req.path[-4..-1] | |
| begin | |
| image = Magick::Image.from_blob(res.body).first | |
| image.flip! | |
| res.body = image.to_blob | |
| rescue Magick::ImageMagickError => e |