$2a$11$oBJsoS9ki4IFxI/nm5D2Ve2IZhUIjtP97/VRqcd.DDDcSAmtEduEC
This file contains hidden or 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 concurrent.futures import ProcessPoolExecutor | |
from hashlib import md5 | |
#import sys | |
def calc_hash(line: str) -> str: | |
return md5(line.encode('utf-8')).hexdigest() | |
if __name__ == "__main__": | |
hash = calc_hash(str(1300)) # this is the string I want to test!! | |
# hash = sys.argv[-1] # an alternative way |
This file contains hidden or 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
#!/usr/bin/env python3 | |
"""This module, called sqlite_cm, has a single class, also called sqlite_cm. | |
It's recommended to import this module using the "from import" method: | |
``from sqlite_cm import sqlite_cm``. | |
""" | |
import sqlite3 | |
class sqlite_cm: |
This file contains hidden or 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
print('\n'.join(list(map(lambda z:str(z[0]) if all(type(x) is int for x in z) else ''.join(z) if all(type(x) is str for x in z) else ''.join([x for x in z if type(x) is str]),[tuple(s if i%n==0 else i for n,s in [(3,'Fizz'),(5,'Buzz')]) for i in range(1,1001)])))) |
This file contains hidden or 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
using System; | |
namespace Classes | |
{ | |
class Classes | |
{ | |
private static void Main(string[] args) | |
{ | |
int[,] grid1 = | |
{ { 1, 2, 3, 4, 5, 6, 7, 8, 9 } |
This file contains hidden or 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 hashlib, secrets, argparse, base64 | |
def hashish(algo: str, inputstr: str, salt: bytes = b'') -> str: | |
h = hashlib.new(algo) | |
h.update(bytes(inputstr, 'utf-8') + salt) | |
return h.hexdigest() + salt.hex() | |
def hashish64(algo: str, inputstr: str, salt: bytes = b'') -> str: | |
h = hashlib.new(algo) | |
h.update(bytes(inputstr, 'utf-8') + salt) |
This file contains hidden or 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
#!/usr/bin/env python3 | |
# -*- config: utf-8 -*- | |
import subprocess | |
import argparse | |
if __name__ == "__main__": | |
omx = "omxplayer --aspect-mode fill -o hdmi".split(" ") | |
p = argparse.ArgumentParser(description="Play a video on the Pi.") | |
p.add_argument('url', type=str, help="the URL of the stream/video") | |
p.add_argument('-fr', type=str, help="requested frame rate (default: best)") |
This file contains hidden or 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
#!/usr/bin/env python3 | |
from sys import argv | |
def rational(j:int)->tuple: | |
'''Stern-Brocot sequence''' | |
r = [1, 1] | |
for i in range(j): | |
yield (r[i], r[i+1], r[i] / r[i+1]) | |
r += [r[i] + r[i+1], r[i+1]] | |
if __name__ == "__main__": |
I hereby claim:
- I am CiQL on github.
- I am ciql (https://keybase.io/ciql) on keybase.
- I have a public key whose fingerprint is 5AC3 CEC2 D0A9 4E91 123B DD87 FDC7 E194 815C 98CE
To claim this, I am signing this object:
This file contains hidden or 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
#!/usr/bin/env python3 | |
# -*- config: utf-8 -*- | |
import functools, sys | |
sys.setrecursionlimit(100000) | |
@functools.lru_cache(maxsize=None) | |
def ackermann(m, n): | |
'''Runs Ackermann–Péter (two-argument) function''' | |
m, n = abs(m), abs(n) | |
if (m == 0): |
NewerOlder