Skip to content

Instantly share code, notes, and snippets.

@rafalstapinski
rafalstapinski / test_hashes.py
Last active October 17, 2021 03:52
quick python hashing func speed test
import random
import string
import time
from hashlib import blake2b, blake2s, md5, sha1, sha3_224, sha3_256, sha3_384, sha3_512, sha224, sha256, sha384, sha512
algs = [
sha512,
sha3_224,
sha1,
sha256,

Keybase proof

I hereby claim:

  • I am rafalstapinski on github.
  • I am rstapinski (https://keybase.io/rstapinski) on keybase.
  • I have a public key ASDZHGybunyFIUjomMGpeh-_BOZjPsEU7CE4gVO3Dk93VAo

To claim this, I am signing this object:

@rafalstapinski
rafalstapinski / settings.json
Last active May 8, 2022 17:59
vscode settings.json for everything. will keep up to date
{
// Global Editor
"git.ignoreLimitWarning": true,
"files.insertFinalNewline": true,
"editor.tabSize": 4,
"editor.fontFamily": "Comic Mono",
// Python
"python.languageServer": "Pylance",
"python.testing.pytestArgs": ["test"],
@rafalstapinski
rafalstapinski / FlowLayout.py
Created September 30, 2022 18:22
A custom Qt FlowLayout that efficiently reorganizes elements when the viewport changes.
import math
from PySide6 import QtWidgets, QtCore
class FlowLayout(QtWidgets.QLayout):
item_list: list[QtWidgets.QLayoutItem]
horizontal_space: int
vertical_space: int
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDPsBeX92Phbk9E3WQ3xE0DxX6mDcKRO3PZW1QdAirS5PqQxhijjVEl+Kf03vuJIjoKmrUDMP7H00PQNldM62TT5VREzTK+hHNuHC9TERucfVs8j95Hxqf8f9hKtY0JYvw0MwAIh0tFnrKc+lwKh5OcKOthwodJdXy2zCbUS2nicwzfcellju3L7M5lIqNs26teX5d1nOMbAluFyzUrXW9ylD0XedgG1MN9LgvmecNVguUhZWFk0IcpY4NO4xRSx6S08ZOgMYRYDAsx2MWAD8BWbIYWipIbGQ+nGhavSbjyrAJX4c+JSijOceH9VbwBxpSJ8DatytX8vOI4WM6qnrtlAo49mK5eQKsJRBasD+5sbCqrXvW6/5lF6pWkqpVGAmftS82Qlp90e+jMx7uextcxoCoA51gT2iOZabSWK70OsSJJU7RKPOorSbxxxbpi+5nQuiHlD/8nvsnP0x9sHQzdnQXLNQBPFS/+iBmqTOBsVuP/nRuXJ7MFvZ4jI24WKCQi9psLl6dELyhX2Eb9HseOTfC2TpTbzq5jXt5+vpO68Uq3ag3LRD7F6dR1Ak4ndYjDkrROgrV5SJ7fP1Pq3tWtvXGOhL6l2maClf3dGQsQe3iw5AUrTTU/Vvq90rsecG8XrasawAQqC4Vz08CN4rjGA5U8ndvdvDFFYVEQsgnFWw== stapinskirafal@gmail.com