Skip to content

Instantly share code, notes, and snippets.

@danuker
danuker / window_monitor.py
Created March 11, 2026 00:50
Time waste annoyance
#!/usr/bin/env python3
# If I'm wasting time, pop up an image that reminds me of my addiction.
# Created 2026-03-11
# One-shotted by Qwen3.5-35B-A3B-UD-IQ4_NL from Unsloth
import subprocess
import time
import re
from datetime import datetime
@danuker
danuker / youtube_summarizer.py
Last active September 3, 2025 08:05
YouTube Summarizer
#!/usr/bin/env python3
# The MIT License (MIT)
# Copyright © 2025 Dan Gheorghe Haiduc
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
@danuker
danuker / xoclasa.py
Created November 19, 2018 22:56
X și Zero cu clasa
# X si zero - Tutorial #9 - Clase
class Tabla:
def __init__(self):
self.reprezentare = [
[' ', ' ', ' '],
[' ', ' ', ' '],
[' ', ' ', ' ']
]
@danuker
danuker / xo.py
Created February 6, 2018 13:25
X si Zero - reparat pentru Python 3
# X si zero
tabla = [
[' ', ' ', ' '],
[' ', ' ', ' '],
[' ', ' ', ' ']
]
def afisare(t):
@danuker
danuker / gist:5f7736d3306d6f69f50dbe7dd6c099d9
Created January 14, 2018 19:08
Parity gets hit by Syncing... it's Super Effective!
2018-01-14 19:52:36 Starting Parity/v1.8.6-beta-2d051e4-20180109/x86_64-linux-gnu/rustc1.22.1
2018-01-14 19:52:36 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-14 19:52:36 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-14 19:52:36 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-14 19:52:36 State DB configuration: fast
2018-01-14 19:52:36 Operating mode: active
2018-01-14 19:52:36 Configured for Foundation using Ethash engine
2018-01-14 19:52:37 Updated conversion rate to Ξ1 = US$1319.53 (90219710 wei/gas)
2018-01-14 19:52:40 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.107:30303
2018-01-14 19:52:50 Syncing snapshot 0/807 #0 5/100 peers 8 KiB chain 3 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 85 µs
@danuker
danuker / logfile.err
Created January 14, 2018 17:43
Parity trying to sync, almost finishing but not completing
2018-01-14 17:05:32 Starting Parity/v1.8.6-beta-2d051e4-20180109/x86_64-linux-gnu/rustc1.22.1
2018-01-14 17:05:32 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-14 17:05:32 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-14 17:05:32 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-14 17:05:32 State DB configuration: fast
2018-01-14 17:05:32 Operating mode: active
2018-01-14 17:05:32 Configured for Foundation using Ethash engine
2018-01-14 17:05:33 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.107:30303
2018-01-14 17:05:33 Updated conversion rate to Ξ1 = US$1316.76 (90409496 wei/gas)
2018-01-14 17:05:43 Syncing snapshot 0/807 #0 4/100 peers 8 KiB chain 3 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 76 µs
@danuker
danuker / gist:ec350847ca0ce7784d1183b8147ffecf
Created January 10, 2018 08:02
Parity succeeded warp sync
2018-01-09 23:45:35 Starting Parity/v1.8.5-beta-54bae9a-20171228/x86_64-linux-gnu/rustc1.22.1
2018-01-09 23:45:35 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-09 23:45:35 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-09 23:45:35 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-09 23:45:35 State DB configuration: fast
2018-01-09 23:45:35 Operating mode: active
2018-01-09 23:45:35 Configured for Foundation using Ethash engine
2018-01-09 23:45:35 Updated conversion rate to Ξ1 = US$1239.18 (96069660 wei/gas)
2018-01-09 23:45:36 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.102:30303
2018-01-09 23:45:46 Syncing snapshot 0/305 #462052 7/50 peers 166 KiB chain 67 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 47 µs
2018-01-09 22:14:54 Starting Parity/v1.8.5-beta-54bae9a-20171228/x86_64-linux-gnu/rustc1.22.1
2018-01-09 22:14:54 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-09 22:14:54 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-09 22:14:54 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-09 22:14:54 State DB configuration: fast
2018-01-09 22:14:54 Operating mode: active
2018-01-09 22:14:54 Configured for Foundation using Ethash engine
2018-01-09 22:14:55 Updated conversion rate to Ξ1 = US$1216.81 (97835820 wei/gas)
2018-01-09 22:14:59 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.102:30303
2018-01-09 22:15:09 Syncing #374323 043f…4bd2 0 blk/s 0 tx/s 0 Mgas/s 0+ 0 Qed #374323 5/25 peers 239 KiB chain 67 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 40 µs
@danuker
danuker / gist:a759df6eaa420f9c695db88e153bdce7
Created January 9, 2018 21:41
block checksum mismatch
2018-01-09 20:19:42 Starting Parity/v1.8.5-beta-54bae9a-20171228/x86_64-linux-gnu/rustc1.22.1
2018-01-09 20:19:42 Keys path piggies/wallets/datastores/eth/keys/Foundation
2018-01-09 20:19:42 DB path piggies/wallets/datastores/eth/chains/ethereum/db/906a34e69aec8c0d
2018-01-09 20:19:42 Path to dapps piggies/wallets/datastores/eth/dapps
2018-01-09 20:19:42 State DB configuration: fast
2018-01-09 20:19:42 Operating mode: active
2018-01-09 20:19:42 Configured for Foundation using Ethash engine
2018-01-09 20:19:42 Updated conversion rate to Ξ1 = US$1209.53 (98424690 wei/gas)
2018-01-09 20:19:42 Public node URL: enode://9f7fec7418406f906b8bc4713cf2c65abddac5257a12ee63d64757b58aa1f31d82bb2ed18d83f6011be537227c1993238e3dc6426a280e63c322fc6a02902b73@192.168.0.102:30303
2018-01-09 20:19:52 Syncing snapshot 0/520 #0 3/25 peers 8 KiB chain 3 MiB db 0 bytes queue 10 KiB sync RPC: 0 conn, 0 req/s, 49 µs
# Loto edition
# pret bilet: 4.8 lei
# castig mediu din 2005: aprox. 14000000 lei
import random
castig_mediu = 14000000
bilet = 4.8