View [Python 3] Precise integer base conversion.py
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
#!/usr/bin/python3 | |
''' | |
"Precise integer base conversion" | |
UNLICENSE license. | |
''' | |
# - StackOverflow begin - | |
def convert_base(num, to_base=10, from_base=10, only_alphabet = False): # added | |
alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
View [Python 3] Remote Compilation Script.py
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
#!/usr/bin/python3 | |
import os | |
import hashlib | |
import binascii | |
import zlib | |
''' | |
"Remote Compilation Script" | |
UNLICENSE license. |
View bytebeat04242022.js
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
/* | |
Signed bytebeat, 44100 Hz. April 24th, 2022. Session #1. Diicorp95. UNLICENSE license. | |
A: munching squares | |
B: warm noise | |
C: 3D triangles | |
D: rings | |
E: deeper rings | |
F: rings manipulations | |
G: Jacob's ladder (60 Hz). Best when `(2**(15-(15&t>>14))-1)` is replaced to `3` or `7` | |
H: hypnotic Jacob's ladder (60 Hz) |
View mcbook.py
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
# Edited | |
# Aight, so it's supposed to generate commands to | |
# generate minecraft books. Does it work? Mebbe. | |
import textwrap, json | |
import unicodedata | |
from argparse import ArgumentParser | |
def generate(title, author, text): | |
"""Returns minecraft command as string.""" |
View brute_play.py
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
#!/usr/bin/python3 | |
import itertools,time,random | |
def br(ch,ma):return (''.join(ca) for ca in itertools.chain.from_iterable(itertools.product(ch,repeat=i) for i in range(1,ma+1))) | |
ke=str(bin(random.randint(0,255)))[2:];CL='\033[0m';print(CL,end='');co=0;cv=0;ok=False | |
for at in br('01',len(ke)): | |
x=str(co%7+91);print('\033[0;'+x+'m',end='');print(str(cv),">",at,'of',len(at));time.sleep(0.01);cv=co+1 | |
if at==ke:ok=True;break | |
else:co+=1 | |
print(CL) | |
if ok:print('Took iterations:',cv) |
View find_fraction.py
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
#!/usr/bin/python3 | |
from fractions import Fraction | |
max_i = 10**5 | |
max_v = 10 | |
while True: | |
end = False | |
b = input("Find a fraction for ")[0:17].lower() | |
if b == "": |
View brute.py
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
#!/usr/bin/python3 | |
import itertools | |
def bruteforce(charset = '01', maxlength = 4): | |
return (''.join(candidate) | |
for candidate in itertools.chain.from_iterable(itertools.product(charset, repeat=i) | |
for i in range(1, maxlength + 1))) | |
alphabet = '' |
View math.root_mean_square.py
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
#!/usr/bin/python3 | |
from math import sqrt, ceil | |
def RMS(y): | |
if type(y) == list and y: | |
ms = 0 | |
rms = 0 | |
for i,j in enumerate(y): | |
ms = ms + j ** 2 |
View Base64-decoding-loop_nanoseconds.py
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
#!/usr/bin/env python3 | |
a = 'Vm0wd2QyUXlVWGxWV0d4V1YwZDRWMVl3WkRSV01WbDNXa1JTVjAxV2JETlhhMUpUVmpBeFYySkVUbGhoTVVwVVZtcEJlRll5U2tWVWJHaG9UVlZ3VlZadGNFSmxSbGw1VTJ0V1ZXSkhhRzlVVmxaM1ZsWmFkR05GU214U2JHdzFWVEowVjFaWFNraGhSemxWVm14YU0xWnNXbUZrUjA1R1UyMTRVMkpIZHpGV1ZFb3dWakZhV0ZOcmFHaFNlbXhXVm0xNFlVMHhXbk5YYlVaclVqQTFSMVV5TVRSVk1rcElaSHBHVjFaRmIzZFdha1poVjBaT2NtRkhhRk5sYlhoWFZtMHhORmxWTUhoWGJrNVlZbFZhY2xWcVFURlNNVlY1VFZSU1ZrMXJjRWxhU0hCSFZqRmFSbUl6WkZkaGExcG9WakJhVDJOdFJraGhSazVzWWxob1dGWnRNSGhPUm14V1RVaG9XR0pyTlZsWmJGWmhZMnhXY1ZGVVJsTk5WbFkxVkZaU1UxWnJNWEpqUld4aFUwaENTRlpxUm1GU2JVbDZXa1prYUdFeGNHOVdha0poVkRKT2RGSnJhR2hTYXpWeldXeG9iMWRHV25STlNHaFBVbTE0VjFSVmFHOVhSMHB5VGxac1dtSkdXbWhaTW5oWFkxWkdWVkpzVGs1V2JGa3hWa1phVTFVeFduSk5XRXBxVWxkNGFGVXdhRU5UUmxweFVtMUdVMkpWYkRaWGExcHJZVWRGZUdOSE9WZGhhMHBvVmtSS1QyUkdTbkpoUjJoVFlYcFdlbGRYZUc5aU1XUkhWMjVTVGxOSGFGQlZiVEUwVmpGU1ZtRkhPVmhTTUhCNVZHeGFjMWR0U2tkWGJXaGFUVlp3YUZwRlpGTlRSa3B5VGxaT2FWSnRPVE5XTW5oWFdWWlJlRmRzYUZSaVJuQnhWV3hrVTFsV1VsWlhiVVpPVFZad2VGVXlkREJXTVZweVkwWndXR0V4Y0R |
View scrotum.js
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
// No copyright | |
var ogg = 'T2dnUwACAAAAAAAAAACUeQAAAAAAANmTfYABHgF2b3JiaXMAAAAAAiJWAAAAAAAAOo8AAAAAAACqAU9nZ1MAAAAAAAAAAAAAlHkAAAEAAAA83iSnDzv/////////////////4wN2b3JiaXMrAAAAWGlwaC5PcmcgbGliVm9yYmlzIEkgMjAxMjAyMDMgKE9tbmlwcmVzZW50KQAAAAABBXZvcmJpcyRCQ1YBAAgAAIAgChnGgNCQVQAAEAAAQohGxlCnlASXgoUQR8RQh5DzUGrpIHhKYcmY9BRrEEII33vPvffeeyA0ZBUAAAQAQBgFDmLgMQlCCKEYxQlRnCkIQghhOQmWch46CUL3IIQQLufecu699x4IDVkFAAACADAIIYQQQgghhBBCCimlFFKKKaaYYsoxxxxzzDHIIIMMOuikk04yqaSTjjLJqKPUWkotxRRTbLnFWGutNefca1DKGGOMMcYYY4wxxhhjjDHGCEJDVgEAIAAAhEEGGWQQQgghhRRSiimmHHPMMceA0JBVAAAgAIAAAAAAR5EUyZEcyZEkSbIkS9Ikz/Isz/IsTxM1UVNFVXVV27V925d923d12bd92XZ1WZdlWXdtW5d1V9d1Xdd1Xdd1Xdd1Xdd1Xdd1IDRkFQAgAQCgIzmOIzmOIzmSIymSAoSGrAIAZAAABADgKI7iOJIjOZZjSZakSZrlWZ7laZ4maqIHhIasAgAAAQAEAAAAAACgKIriKI4jSZalaZrnqZ4oiqaqqqJpqqqqmqZpmqZpmqZpmqZpmqZpmqZpmqZpmqZpmqZpmqZpmqZpmkBoyCoAQAIAQMdxHMdRHMdxHMmRJAkIDVkFAMgAAAgAwFAUR5Ecy7EkzdIsz/I00TM9V5RN3dRVGwgNWQUAAAIACAAAAAAAwPEcz/EcT/Ikz/Icz/EkT9I0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdM0TdOA0JBVAAAC |
NewerOlder