This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import time | |
def moon(): | |
MOON_DURATION = 29.53058770576 | |
KNOWN_NEW_MOON_EPOCH = 947116800 | |
SECONDS_IN_A_DAY = 86400 | |
PHASES = ["🌑", "🌘", "🌗", "🌖", "🌕", "🌔", "🌓", "🌒", "🌑"] | |
moonphase = (time() - KNOWN_NEW_MOON_EPOCH)/SECONDS_IN_A_DAY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import sha256 | |
t = b'hola' | |
h = b'' | |
while not t in h: h = sha256(h).digest() | |
p = h.find(t) | |
print(h[p:p+len(t)].decode('utf-8')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include QMK_KEYBOARD_H | |
enum layers { | |
_QWERTY = 0, | |
_LOWER, | |
_RAISE, | |
_ADJUST, | |
}; | |
#define LOWER MO(_LOWER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unidecode | |
import os | |
for j in range(1000): | |
word = str(j) | |
a = os.popen('whois %s.cl' % word).read() | |
if 'no entries found' in a: | |
print('%s.cl\t\t-\t\tdisponible' % word) | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io/ioutil" | |
"log" | |
"os" | |
"strings" | |
"github.com/syndtr/goleveldb/leveldb" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
mQENBF0TfCwBCACglEMcEa008PLH0JQXphnUSmRQC12feBdJdyJYAO2z70dQ5kVv | |
KlYAM1ELRZ55uzSTY3+La/CsJpes9n2NyXOMrqUUiW7qLzFE4hSfZNSe2iNE0w3D | |
VbkcOXyqLn109B6DJki8hH8P7Cry1xkFcCoMUzmP8ULkvuAXOuekJaSHiDSKPcUm | |
DPt1puc4Rk4wXMmmg0STKpQHs8q5kkvOppPgogFDcBYViDy90IgFUDthyn5hFkhm | |
LLlJAb2VI/249TrB+f++RvJPSEaajWiJWcm5mbl1sOkRF2hGkcbolLc8nFj+G/YW | |
5KvQmKoaukPbi/sjwWrJA+rd/f0fD2wGmMVNABEBAAG0FGN2YXNxeHogPGN2eHpA | |
cG0ubWU+iQFOBBMBCgA4FiEEqmLqQJoHbaHLFw5cMPkJIxooZI4FAl0TfCwCGwMF | |
CwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQMPkJIxooZI4btgf8DsA6Tb5lRy3W |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Genesis block: 6e27bffd2a104bea1c870be76aab1cce13bebb0db40606773827517da9528174 | |
PUBKEY_ADDRESS: 88 (0x58) | |
SCRIPT_ADDRESS: 50 (0x32) | |
SECRET_KEY: 216 (0xd8) | |
EXT_PUBLIC_KEY: {0x04, 0x88, 0xB2, 0x1E} | |
EXT_SECRET_KEY: {0x04, 0x88, 0xAD, 0xE4} | |
RPC PORT: 21662 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://bitcoin.stackexchange.com/a/59806 | |
def secp256k1(s): | |
P = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 - 1 | |
N = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 | |
G = (0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798, | |
0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8) | |
def add(p, q): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"log" | |
"bytes" | |
"encoding/hex" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from binascii import a2b_hex | |
from hashlib import new | |
from collections import deque | |
from os import urandom | |
from argparse import ArgumentParser | |
# opcode | |
OP_CHECKMULTISIG = 'ae' | |
# Arguments |
NewerOlder