Python module with various features! Install with the below command!
pip install dankware
Update to the latest version with the below command!
pip install --upgrade dankware
from dankware import multithread
import time
a = 0
def example():
global a
a += 1
print(a)
time.sleep(5)
multithread(example, 10) # func: example | threads: 10 | single: 50 seconds | multi: 5 seconds
from dankware import multithread
import time
new_list = [1, 2, 3, 4, 5]; sum = 0
def example(num):
global sum
sum += num
time.sleep(5)
multithread(example, 10, new_list) # input_one: list
print(sum)
from dankware import multithread
import time
list1 = [1, 2, 3, 4, 5]
list2 = [5, 4, 3, 2, 1]
def example(num1, num2):
print(num1 + num2)
time.sleep(5)
multithread(example, 10, list1, list2) # input_one: list1 | input_two: list2
from dankware import multithread
import time
new_list = [1, 2, 3, 4, 5]
def example(num1, num2):
print(num1 * num2)
time.sleep(5)
multithread(example, 10, new_list, 5, progress_bar=False) # input_two: 5 | disabled progress bar
import os
from dankware import export_registry_keys, is_admin
# [NOTE]: this function requires admin privileges!
export_path = "D:\\export.reg"
registry_root = r'HKEY_CURRENT_USER'
registry_path = r'Software\Google\Chrome\PreferenceMACs'
#export_path = os.path.join(os.environ['USERPROFILE'], 'Desktop', 'export.reg')
export_registry_keys(registry_root, registry_path, recursive=True, export_path=export_path)
from dankware import splash_screen
# Supports: GIFs / PNGs / JPGs / BMPs / ICOs
splash_screen("D:\\splash.gif", duration=5)
# runs on main thread
from dankware import splash_screen
from concurrent.futures import ThreadPoolExecutor
ThreadPoolExecutor(1).submit(splash_screen, "splash.png", 5)
# runs on separate thread
import sys
from dankware import err, clr
try: value = 1/0
except: print(clr(err(sys.exc_info()),2))
from dankware import github_downloads
# full url > https://api.github.com/repos/EssentialsX/Essentials/releases/latest
for url in github_downloads("EssentialsX/Essentials"): print(url)
from dankware import github_file_selector
# full url > https://api.github.com/repos/EssentialsX/Essentials/releases/latest
for url in github_file_selector("EssentialsX/Essentials", "remove", ['AntiBuild', 'Discord', 'GeoIP', 'Protect', 'XMPP']): print(url)
from dankware import random_ip
print(random_ip())
from dankware import clr
# default mode = 1
# default colour_one = white
# default colour_two = magenta
print(clr("\n > Hey! Long time no see :)"))
#print(clr("\n > Hey! Long time no see :)", colour_one = white, colour_two = magenta))
from dankware import clr, white, magenta
# default mode = 1
# default colour_one = white
# default colour_two = magenta
print(clr("\n > Hey! Long time no see :)", colour_one = magenta, colour_two = white))
from dankware import clr
print(clr("\n This is a string: True | This is an integer: False"))
from dankware import clr, green, magenta
# dankware now supports adding custom colours on both the text and the function itself!
# colour_two = green
print(clr(f"\n > {magenta}Purple{white} thinks he's better than everyone else :(", colour_two=green))
from dankware import clr
# mode = 2
print(clr("\n > Error in sector [7] redirecting... | INTEGRITY_CHECK_SUCCESS: TRUE",2))
from dankware import clr
# mode = 3
print(clr("\n > Is this a randomly coloured string: TRUE | As you can see it does not colour True/False",3))
banner = '''
888 888
888 888 s i r . d a n k ' s
888 888
.d88888 8888b. 88888b. 888 888 888 888 888 8888b. 888d888 .d88b.
d88" 888 "88b 888 "88b 888 .88P 888 888 888 "88b 888P" d8P Y8b
888 888 .d888888 888 888 888888K 888 888 888 .d888888 888 88888888
Y88b 888 888 888 888 888 888 "88b Y88b 888 d88P 888 888 888 Y8b.
"Y88888 "Y888888 888 888 888 888 "Y8888888P" "Y888888 888 "Y8888
'''
from dankware import clr
# mode = 4
print(clr(banner,4))
from dankware import align
print(align(banner)) # also works with single text line (even coloured)
from dankware import align, clr
print(align(clr(banner,4)))
from dankware import fade
banner = '''
888 d8b 888
v e n a x y t ' s 888 Y8P 888
888 888
.d88b. 888d888 8888b. .d88888 888 .d88b. 88888b. 888888
d88P"88b 888P" "88b d88" 888 888 d8P Y8b 888 "88b 888
888 888 888 .d888888 888 888 888 88888888 888 888 888
Y88b 888 888 888 888 Y88b 888 888 Y8b. 888 888 Y88b.
"Y88888 888 "Y888888 "Y88888 888 "Y8888 888 888 "Y888
888
Y8b d88P
"Y88P"
'''
print(fade(banner, "black"))
print(fade(banner, "black-v"))
print(fade(banner, "red"))
print(fade(banner, "red-v"))
print(fade(banner, "green"))
print(fade(banner, "green-v"))
print(fade(banner, "cyan"))
print(fade(banner, "cyan-v"))
print(fade(banner, "blue"))
print(fade(banner, "blue-v"))
print(fade(banner, "purple"))
print(fade(banner, "purple-v"))
print(fade(banner, "pink-v"))
print(fade(banner, "random"))