diff --git a/OfficialProjects/AutoShipper/autoshipper.py b/OfficialProjects/AutoShipper/autoshipper.py new file mode 100644 index 0000000..51e10b8 --- /dev/null +++ b/OfficialProjects/AutoShipper/autoshipper.py @@ -0,0 +1,104 @@ +import time, sys + +name1 = [] +name2 = [] + +flames = ["F lame", "f L ame", "fl A me", "flam E"] +flame = ["f", "l", "a", "m", "e"] +biglettersflame = {"f": "Ḟ", "l": "Ḷ", "a": "Ḁ", "m": "Ṃ", "e": "Ẹ"} +biglettersflame2 = {"f": "F", "l": "L", "a": "A", "m": "M", "e": "E"} + +def printinator(spisok, probeli): + slovo = "" + if probeli == True: + for bukva in spisok: + slovo = slovo + bukva + slovo = slovo + " " + else: + for bukva in spisok: + slovo = slovo + bukva + print(slovo) + +def comparator(): + for o in name1: + while o in name2: + name2.remove(o) + printinator(name2, False) + while o in name1: + name1.remove(o) + printinator(name1, False) + for o in name2: + while o in name1: + name1.remove(o) + printinator(name1, False) + while o in name2: + name2.remove(o) + printinator(name2, False) + +def printflame(index): + slovo = "" + for o in range(len(flame)): + if o != index - 1: + slovo = slovo + flame[o] + else: + slovo = slovo + biglettersflame[flame[o]] + print('\b' * 10, end='') + print(format(slovo), end='') + sys.stdout.flush() + +name1str = input("Enter name of first person (all letters should be small): ") +name2str = input("Enter name of second person (all letters should be small): ") + +for letter in name1str: + name1.append(letter) + +printinator(name1, False) + +for letter in name2str: + name2.append(letter) + +printinator(name2, False) + +print("") +print("Deleting letters, that both names contain") +comparator() +print("") +print("Now we have:") +printinator(name1, False) +printinator(name2, False) + +dlina = len(name1) + len(name2) +print("Lengths of two names is: " + str(dlina)) +print("Now check:") +printinator(flame, False) +print("") + +i = -1 +j = -1 +peredudaleniemi = 0 + + + +while len(flame) > 1: + while j < dlina: + i = i + 1 + j = j + 1 + if i > len(flame): + i = -1 + printflame(i) + time.sleep(0.4) + if len(flame) > 1: + if dlina <= len(flame): + del flame[dlina - 1] + else: + del flame[(dlina % len(flame)) - 1] + j = 0 + i = 0 + + +print('\b' * 10, end='') +print(flame[0]) +print("") +print("Your prediction letter is: " + biglettersflame2[flame[0]]) +print("You can interpret it differently, because it is prediction") +input("To exit press Enter...") diff --git a/OfficialProjects/CatBench/CatBench.py b/OfficialProjects/CatBench/CatBench.py new file mode 100644 index 0000000..7259a83 --- /dev/null +++ b/OfficialProjects/CatBench/CatBench.py @@ -0,0 +1,162 @@ +input("To start KOTIKOT benchmark, press enter...") +import time +from concurrent.futures import ThreadPoolExecutor, as_completed + + + + +fromStartTest = 0 +markForBench1 = "Didn't tested" +markForBench2 = "Didn't tested" +markForBench3 = "Didn't tested" +markForBench4 = "Didn't tested" +markForBench5 = "Didn't tested" +marksList = [] + +def bench1(n): + print("Testing your computer...") + fromStartTest = time.time_ns() + def factorial(kolvo): + fakt = 1 + for i in range(1, kolvo + 1): + fakt = fakt * i + return fakt + schislo = factorial(n) + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 1 is " + str(timeForBench1 / 1000000000) + "s") + markForBench1 = int(100000000000 - int(timeForBench1)) + marksList.append("Mark for test 1: ") + marksList.append(str(markForBench1)) + +def bench2(n): + print("Testing your computer with test 2...") + fromStartTest = time.time_ns() + def fibonacciIt(pokolenia): + if pokolenia == 1: + return 0 + perv = 0 + vtor = 1 + result = perv + vtor + for i in range(1, pokolenia - 1): + tret = perv + vtor + result = result + tret + perv = vtor + vtor = tret + return result + res = fibonacciIt(n) + timeForBench2 = time.time_ns() - fromStartTest + print("Time elapsed for bench 2 is " + str(timeForBench2 / 1000000000) + "s") + markForBench2 = int(100000000000 - int(timeForBench2)) + marksList.append("Mark for test 2: ") + marksList.append(str(markForBench2)) + +def bench3(n): + print("Testing your computer with test 3...") + fromStartTest = time.time_ns() + a=7**n + timeForBench3 = time.time_ns() - fromStartTest + print("Time elapsed for bench 3 is " + str(timeForBench3 / 1000000000) + "s") + markForBench3 = int(100000000000 - int(timeForBench3)) + marksList.append("Mark for test 3: ") + marksList.append(str(markForBench3)) + +def bench4(n): + print("Testing your computer with test 4...") + fromStartTest = time.time_ns() + peremannaa = "Fluffy cats" * n + timeForBench4 = time.time_ns() - fromStartTest + print("Time elapsed for bench 4 is " + str(timeForBench4 / 1000000000) + "s") + markForBench4 = int(100000000000 - int(timeForBench4)) + marksList.append("Mark for test 4: ") + marksList.append(str(markForBench4)) + +def benchMem5(chislo1): + class Meow: + def __init__(self, i): + self.i = i + + def fignia(chislo): + i = [] + m = 0 + for k in range(chislo): + m = Meow("Fluffy cats" * 1000000000) + i.append(m) + return "a" + + with ThreadPoolExecutor(max_workers=10) as pool: + print("Testing your computer with test 4 (memory test)...") + fromStartTest = time.time_ns() + results = [pool.submit(fignia, 3) for i in range(1)] + for future in as_completed(results): + timeForBench5 = time.time_ns() - fromStartTest + print("Time elapsed for bench 5 is " + str(timeForBench5 / 1000000000) + "s") + markForBench5 = int(100000000000 - int(timeForBench5)) + marksList.append("Mark for test 5: ") + marksList.append(str(markForBench5)) + + + + + + + + +Tests = input("Write numbers of tests you like to run \n1 - Testing by 'factorial' system \n2 - testing by fibonacci numbers system \n3 - exponentiation big numbers test \n4 - words multiplying \n5 - memory test - long (16s on my PC) and 'eats' all of your RAM, use only if you REALLY want that \n \nAlso write letter near number \nl - for lite test, \nm - for medium, \nh - for hard \n \nPrint like this: 1m 2h 5l, you can start not only one test \nOn example tests 1 - in medium mode, 2 - in hard and 5 - in lite will start \nPlease, type here... ").split() + +if "1l" in Tests: + bench1(50000) + +if "1m" in Tests: + bench1(100000) + +if "1h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench1(200000) + +if "2l" in Tests: + bench2(200000) + +if "2m" in Tests: + bench2(500000) + +if "2h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench2(650000) + +if "3l" in Tests: + bench3(2041315) + +if "3m" in Tests: + bench3(5541315) + +if "3h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench3(15541315) + +if "4l" in Tests: + bench4(190000000) + +if "4m" in Tests: + bench4(1000000000) + +if "4h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench4(3000000000) + +if "5l" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +if "5m" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +if "5h" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +print("\nYour final marks are:\n") +for i in range(len(marksList)): + print(marksList[i]) + +input("\nTo exit CatBench press enter...") diff --git a/OfficialProjects/CatBench/CatBench0.0.1.py b/OfficialProjects/CatBench/CatBench0.0.1.py new file mode 100644 index 0000000..211e12d --- /dev/null +++ b/OfficialProjects/CatBench/CatBench0.0.1.py @@ -0,0 +1,23 @@ +input("To start benchmark, press enter...") +import time +fromStartTest = 0 + + +def bench1(n): + print("Testing your computer...") + fromStartTest = time.time_ns() + def factorial(kolvo): + fakt = 1 + for i in range(1, kolvo + 1): + fakt = fakt * i + return fakt + schislo = factorial(n) + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 1 is " + str(timeForBench1 / 1000000000) + "s") + + + +bench1(100000) + + +input("To exit CatBench press enter...") \ No newline at end of file diff --git a/OfficialProjects/CatBench/CatBench0.0.2.py b/OfficialProjects/CatBench/CatBench0.0.2.py new file mode 100644 index 0000000..66806b5 --- /dev/null +++ b/OfficialProjects/CatBench/CatBench0.0.2.py @@ -0,0 +1,78 @@ +input("To start benchmark, press enter...") +import time +from concurrent.futures import ThreadPoolExecutor, as_completed +from random import randint +fromStartTest = 0 + +class Meow: + def __init__(self, i): + self.i = i + +def bench1(n): + print("Testing your computer...") + fromStartTest = time.time_ns() + def factorial(kolvo): + fakt = 1 + for i in range(1, kolvo + 1): + fakt = fakt * i + return fakt + schislo = factorial(n) + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 1 is " + str(timeForBench1 / 1000000000) + "s") + +def bench2(n): + print("Testing your computer with test 2...") + fromStartTest = time.time_ns() + def fibonacciIt(pokolenia): + if pokolenia == 1: + return 0 + perv = 0 + vtor = 1 + result = perv + vtor + for i in range(1, pokolenia - 1): + tret = perv + vtor + result = result + tret + perv = vtor + vtor = tret + return result + res = fibonacciIt(n) + timeForBench2 = time.time_ns() - fromStartTest + print("Time elapsed for bench 2 is " + str(timeForBench2 / 1000000000) + "s") + +def bench3(n): + print("Testing your computer with test 3...") + fromStartTest = time.time_ns() + a=7**n + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 3 is " + str(timeForBench1 / 1000000000) + "s") + +def benchMem4(chislo1): + def fignia(chislo): + i = [] + m = 0 + for k in range(chislo): + m = Meow("Fluffy cats" * 1000000000) + i.append(m) + return "a" + + with ThreadPoolExecutor(max_workers=10) as pool: + print("Testing your computer with test 4 (memory test)...") + fromStartTest = time.time_ns() + results = [pool.submit(fignia, 3) for i in range(1)] + for future in as_completed(results): + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 5 is " + str(timeForBench1 / 1000000000) + "s") + +def bench5(n, a): + print("Testing your computer with test 5...") + fromStartTest = time.time_ns() + peremannaa = n ** a + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 5 is " + str(timeForBench1 / 1000000000) + "s") + +bench1(100000) +bench2(500000) +bench3(5541315) +benchMem4(1) +bench5(55555, 1000000) +input("To exit CatBench press enter...") \ No newline at end of file diff --git a/OfficialProjects/CatBench/CatBench0.0.3.py b/OfficialProjects/CatBench/CatBench0.0.3.py new file mode 100644 index 0000000..a0c2179 --- /dev/null +++ b/OfficialProjects/CatBench/CatBench0.0.3.py @@ -0,0 +1,135 @@ +import time +from concurrent.futures import ThreadPoolExecutor, as_completed +from random import randint +fromStartTest = 0 + +def bench1(n): + print("Testing your computer...") + fromStartTest = time.time_ns() + def factorial(kolvo): + fakt = 1 + for i in range(1, kolvo + 1): + fakt = fakt * i + return fakt + schislo = factorial(n) + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 1 is " + str(timeForBench1 / 1000000000) + "s") + +def bench2(n): + print("Testing your computer with test 2...") + fromStartTest = time.time_ns() + def fibonacciIt(pokolenia): + if pokolenia == 1: + return 0 + perv = 0 + vtor = 1 + result = perv + vtor + for i in range(1, pokolenia - 1): + tret = perv + vtor + result = result + tret + perv = vtor + vtor = tret + return result + res = fibonacciIt(n) + timeForBench2 = time.time_ns() - fromStartTest + print("Time elapsed for bench 2 is " + str(timeForBench2 / 1000000000) + "s") + +def bench3(n): + print("Testing your computer with test 3...") + fromStartTest = time.time_ns() + a=7**n + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 3 is " + str(timeForBench1 / 1000000000) + "s") + +def bench4(n): + print("Testing your computer with test 4...") + fromStartTest = time.time_ns() + peremannaa = "Fluffy cats" * n + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 4 is " + str(timeForBench1 / 1000000000) + "s") + +def benchMem5(chislo1): + class Meow: + def __init__(self, i): + self.i = i + + def fignia(chislo): + i = [] + m = 0 + for k in range(chislo): + m = Meow("Fluffy cats" * 1000000000) + i.append(m) + return "a" + + with ThreadPoolExecutor(max_workers=10) as pool: + print("Testing your computer with test 4 (memory test)...") + fromStartTest = time.time_ns() + results = [pool.submit(fignia, 3) for i in range(1)] + for future in as_completed(results): + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 5 is " + str(timeForBench1 / 1000000000) + "s") + + + + + + + + +input("To start benchmark, press enter...") + +Tests = input("Write numbers of tests you like to run \n1 - Testing by 'factorial' system \n2 - testing by fibonacci numbers system \n3 - exponentiation big numbers test \n4 - words multiplying \n5 - memory test - long (16s on my PC) and 'eats' all of your RAM, use only if you REALLY want that \n \nAlso write letter near number \nl - for lite test, \nm - for medium, \nh - for hard \n \nPrint like this: 1m 2h 5l, you can start not only one test \nOn example tests 1 - in medium mode, 2 - in hard and 5 - in lite will start \nPlease, type here... ").split() + +if "1l" in Tests: + bench1(50000) + +if "1m" in Tests: + bench1(100000) + +if "1h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench1(200000) + +if "2l" in Tests: + bench2(200000) + +if "2m" in Tests: + bench2(500000) + +if "2h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench2(650000) + +if "3l" in Tests: + bench3(2041315) + +if "3m" in Tests: + bench3(5541315) + +if "3h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench3(15541315) + +if "4l" in Tests: + bench4(190000000) + +if "4m" in Tests: + bench4(1000000000) + +if "4h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench4(3000000000) + +if "5l" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +if "5m" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +if "5h" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +input("To exit CatBench press enter...") \ No newline at end of file diff --git a/OfficialProjects/CatBench/CatBench0.0.4.py b/OfficialProjects/CatBench/CatBench0.0.4.py new file mode 100644 index 0000000..7ee3414 --- /dev/null +++ b/OfficialProjects/CatBench/CatBench0.0.4.py @@ -0,0 +1,161 @@ +import time +from concurrent.futures import ThreadPoolExecutor, as_completed +from random import randint +import pprint + +fromStartTest = 0 +markForBench1 = "Didn't tested" +markForBench2 = "Didn't tested" +markForBench3 = "Didn't tested" +markForBench4 = "Didn't tested" +markForBench5 = "Didn't tested" +marksList = [] + +def bench1(n): + print("Testing your computer...") + fromStartTest = time.time_ns() + def factorial(kolvo): + fakt = 1 + for i in range(1, kolvo + 1): + fakt = fakt * i + return fakt + schislo = factorial(n) + timeForBench1 = time.time_ns() - fromStartTest + print("Time elapsed for bench 1 is " + str(timeForBench1 / 1000000000) + "s") + markForBench1 = int(100000000000 - int(timeForBench1)) + marksList.append("Mark for test 1: ") + marksList.append(str(markForBench1)) + +def bench2(n): + print("Testing your computer with test 2...") + fromStartTest = time.time_ns() + def fibonacciIt(pokolenia): + if pokolenia == 1: + return 0 + perv = 0 + vtor = 1 + result = perv + vtor + for i in range(1, pokolenia - 1): + tret = perv + vtor + result = result + tret + perv = vtor + vtor = tret + return result + res = fibonacciIt(n) + timeForBench2 = time.time_ns() - fromStartTest + print("Time elapsed for bench 2 is " + str(timeForBench2 / 1000000000) + "s") + markForBench2 = int(100000000000 - int(timeForBench2)) + marksList.append("Mark for test 2: ") + marksList.append(str(markForBench2)) + +def bench3(n): + print("Testing your computer with test 3...") + fromStartTest = time.time_ns() + a=7**n + timeForBench3 = time.time_ns() - fromStartTest + print("Time elapsed for bench 3 is " + str(timeForBench3 / 1000000000) + "s") + markForBench3 = int(100000000000 - int(timeForBench3)) + marksList.append("Mark for test 3: ") + marksList.append(str(markForBench3)) + +def bench4(n): + print("Testing your computer with test 4...") + fromStartTest = time.time_ns() + peremannaa = "Fluffy cats" * n + timeForBench4 = time.time_ns() - fromStartTest + print("Time elapsed for bench 4 is " + str(timeForBench4 / 1000000000) + "s") + markForBench4 = int(100000000000 - int(timeForBench4)) + marksList.append("Mark for test 4: ") + marksList.append(str(markForBench4)) + +def benchMem5(chislo1): + class Meow: + def __init__(self, i): + self.i = i + + def fignia(chislo): + i = [] + m = 0 + for k in range(chislo): + m = Meow("Fluffy cats" * 1000000000) + i.append(m) + return "a" + + with ThreadPoolExecutor(max_workers=10) as pool: + print("Testing your computer with test 4 (memory test)...") + fromStartTest = time.time_ns() + results = [pool.submit(fignia, 3) for i in range(1)] + for future in as_completed(results): + timeForBench5 = time.time_ns() - fromStartTest + print("Time elapsed for bench 5 is " + str(timeForBench5 / 1000000000) + "s") + markForBench5 = int(100000000000 - int(timeForBench5)) + marksList.append("Mark for test 5: ") + marksList.append(str(markForBench5)) + + + + + + +input("To start benchmark, press enter...") + +Tests = input("Write numbers of tests you like to run \n1 - Testing by 'factorial' system \n2 - testing by fibonacci numbers system \n3 - exponentiation big numbers test \n4 - words multiplying \n5 - memory test - long (16s on my PC) and 'eats' all of your RAM, use only if you REALLY want that \n \nAlso write letter near number \nl - for lite test, \nm - for medium, \nh - for hard \n \nPrint like this: 1m 2h 5l, you can start not only one test \nOn example tests 1 - in medium mode, 2 - in hard and 5 - in lite will start \nPlease, type here... ").split() + +if "1l" in Tests: + bench1(50000) + +if "1m" in Tests: + bench1(100000) + +if "1h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench1(200000) + +if "2l" in Tests: + bench2(200000) + +if "2m" in Tests: + bench2(500000) + +if "2h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench2(650000) + +if "3l" in Tests: + bench3(2041315) + +if "3m" in Tests: + bench3(5541315) + +if "3h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench3(15541315) + +if "4l" in Tests: + bench4(190000000) + +if "4m" in Tests: + bench4(1000000000) + +if "4h" in Tests: + print("Should not last more, than 1m, if more, stop the test") + bench4(3000000000) + +if "5l" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +if "5m" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +if "5h" in Tests: + print("Should not last more, than 3m, yes, it can last 3m, if more, stop the test") + benchMem5(1) + +print("\nYour final marks are:\n") +for i in range(len(marksList)): + print(marksList[i]) +#print(markForBench1, markForBench2, markForBench3, markForBench4, markForBench5) + +input("\nTo exit CatBench press enter...") diff --git a/OfficialProjects/CatBench/CatBenchLogos/CatBenchLogo.ico b/OfficialProjects/CatBench/CatBenchLogos/CatBenchLogo.ico new file mode 100644 index 0000000..4027186 Binary files /dev/null and b/OfficialProjects/CatBench/CatBenchLogos/CatBenchLogo.ico differ diff --git a/OfficialProjects/CatBench/CatBenchLogos/CatBenchLogo128x128.ico b/OfficialProjects/CatBench/CatBenchLogos/CatBenchLogo128x128.ico new file mode 100644 index 0000000..34f420c Binary files /dev/null and b/OfficialProjects/CatBench/CatBenchLogos/CatBenchLogo128x128.ico differ diff --git a/OfficialProjects/CoolAutoPressers/RestarterREADME.txt b/OfficialProjects/CoolAutoPressers/RestarterREADME.txt new file mode 100644 index 0000000..504b18d --- /dev/null +++ b/OfficialProjects/CoolAutoPressers/RestarterREADME.txt @@ -0,0 +1 @@ +To stop program, press and hold Ctrl + 1 \ No newline at end of file diff --git a/OfficialProjects/CoolAutoPressers/autoPageRestarter.py b/OfficialProjects/CoolAutoPressers/autoPageRestarter.py new file mode 100644 index 0000000..e7bae03 --- /dev/null +++ b/OfficialProjects/CoolAutoPressers/autoPageRestarter.py @@ -0,0 +1,16 @@ +import keyboard +import time + +print("Auto page restarter by BarsTiger") +print("You have 5 sec for going to browser") +time.sleep(5) + +while True: + keyboard.press("ctrl") + keyboard.press("r") + time.sleep(0.5) + keyboard.release("ctrl") + keyboard.release("r") + time.sleep(0.5) + if keyboard.is_pressed("ctrl") and keyboard.is_pressed("1"): + exit() diff --git a/OfficialProjects/PyQt converter/PyQt converter.py b/OfficialProjects/PyQt converter/PyQt converter.py new file mode 100644 index 0000000..0c8df12 --- /dev/null +++ b/OfficialProjects/PyQt converter/PyQt converter.py @@ -0,0 +1,25 @@ +import os, shutil, random, easygui, time +from os.path import basename +from subprocess import * +slash = '\\' + +start = easygui.buttonbox("Open .ui file to convert it", "Converter", ("Browse file", "Cancel")) + +if start == "Cancel": + exit() + +if start == "Browse file": + thisFile = easygui.fileopenbox(filetypes=["ui"]) + +filename = basename(thisFile)[:-3] + +fileik = open('convert.txt', "w+") +fileik.write('python -m PyQt5.uic.pyuic -x ' + thisFile + " -o " + os.path.dirname(thisFile) + slash + filename + ".py") +fileik.close() + +shutil.move("convert.txt", "convert.bat") + +call('start convert.bat', shell=True) + +time.sleep(1) +os.remove("convert.bat") \ No newline at end of file diff --git a/OfficialProjects/RandomBigOrSmallFileCreator/fileGenerator.py b/OfficialProjects/RandomBigOrSmallFileCreator/fileGenerator.py new file mode 100644 index 0000000..6e626df --- /dev/null +++ b/OfficialProjects/RandomBigOrSmallFileCreator/fileGenerator.py @@ -0,0 +1,37 @@ +import os, shutil, random +slash = '\\' +chars = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', + 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', + 'z', 'x', 'c', 'v', 'b', 'n', 'm'] + +input("KOTIKOT, all rights reserved \nPress Enter to start...") + +nameoffile = input("Enter name of file: ") + +mode = int(input("Enter mode of file generating \n " + "1 - random numbers and letters \n " + "2 - repeating your word or symbol \n " + "Enter here: ")) +if mode == 1: + length = int(input('Enter length of file: ')) + fileik = open(nameoffile + '.txt', "w+") + for i in range(length): + fileik.write(chars[random.randint(0, len(chars)) - 1]) + fileik.close() + +elif mode == 2: + povtors = int(input('Enter number of repeats in file: ')) + word = input('Enter word or symbol, that will be repeated: ') + fileik = open(nameoffile + '.txt', "w+") + for i in range(povtors): + fileik.write(word * povtors) + fileik.close() + + +wheretosave = "D:" +if input('Do you want to save file NOT to D:drive (y/n, y is to enter your path, n - save to D:\): ') == "y": + wheretosave = input("Print path to your folder: ") +shutil.move(nameoffile + ".txt", wheretosave + slash + nameoffile + ".txt") + +input("All worked, press Enter to exit program...") \ No newline at end of file diff --git a/OfficialProjects/meowarch/Meowarch.ico b/OfficialProjects/meowarch/Meowarch.ico new file mode 100644 index 0000000..6ca832d Binary files /dev/null and b/OfficialProjects/meowarch/Meowarch.ico differ diff --git a/OfficialProjects/meowarch/Meowarch.png b/OfficialProjects/meowarch/Meowarch.png new file mode 100644 index 0000000..c0aa4a4 Binary files /dev/null and b/OfficialProjects/meowarch/Meowarch.png differ diff --git a/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/KOTIKOT.url b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/KOTIKOT.url new file mode 100644 index 0000000..c877247 --- /dev/null +++ b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/KOTIKOT.url @@ -0,0 +1,5 @@ +[{000214A0-0000-0000-C000-000000000046}] +Prop3=19,11 +[InternetShortcut] +IDList= +URL=https://kotikot.netlify.app/ diff --git a/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/Meowarch.png b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/Meowarch.png new file mode 100644 index 0000000..dbcd6f0 Binary files /dev/null and b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/Meowarch.png differ diff --git a/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/cat.bmp b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/cat.bmp new file mode 100644 index 0000000..e69de29 diff --git a/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/meow.txt b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/meow.txt new file mode 100644 index 0000000..2e65efe --- /dev/null +++ b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/meow.txt @@ -0,0 +1 @@ +a \ No newline at end of file diff --git a/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/test.meowarch b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/test.meowarch new file mode 100644 index 0000000..2a0f8dd Binary files /dev/null and b/OfficialProjects/meowarch/ReadyForDownloading/For testing MeowArch/test.meowarch differ diff --git a/OfficialProjects/meowarch/ReadyForDownloading/Installation/installEasygui.bat b/OfficialProjects/meowarch/ReadyForDownloading/Installation/installEasygui.bat new file mode 100644 index 0000000..6e01b02 --- /dev/null +++ b/OfficialProjects/meowarch/ReadyForDownloading/Installation/installEasygui.bat @@ -0,0 +1 @@ +pip install easygui \ No newline at end of file diff --git a/OfficialProjects/meowarch/ReadyForDownloading/MeowArch/desktop.ini b/OfficialProjects/meowarch/ReadyForDownloading/MeowArch/desktop.ini new file mode 100644 index 0000000..6b511c4 --- /dev/null +++ b/OfficialProjects/meowarch/ReadyForDownloading/MeowArch/desktop.ini @@ -0,0 +1,7 @@ +[.ShellClassInfo] +IconResource=D:\RAZNOE\!ïðîãðàììèðîâàíèå\KOTIKOT apps\meowarch\ReadyForDownloading\MeowArch\Meowarch.ico,0 +[ViewState] +Mode= +Vid= +FolderType=Generic +Logo=D:\RAZNOE\!ïðîãðàììèðîâàíèå\KOTIKOT apps\meowarch\ReadyForDownloading\MeowArch\Meowarch.png diff --git a/OfficialProjects/meowarch/ReadyForDownloading/MeowArch/meowarch.py b/OfficialProjects/meowarch/ReadyForDownloading/MeowArch/meowarch.py new file mode 100644 index 0000000..ce05762 --- /dev/null +++ b/OfficialProjects/meowarch/ReadyForDownloading/MeowArch/meowarch.py @@ -0,0 +1,39 @@ +import os +import easygui +import zipfile +from os.path import basename +import shutil +slash = '\\' +ziporunzip = easygui.buttonbox("What do you want to do?", "Meowarch", ("Archive file", "Unarchive file", "Cancel")) + +if ziporunzip == "Cancel": + exit() + + +if ziporunzip == "Archive file": + thisFile = easygui.fileopenbox(filetypes=["*"], multiple=True) + nameofzip = easygui.enterbox("Enter name of archive:") + # filenameWithoutTochka = os.path.splitext(thisFile)[0] + zipfile = zipfile.ZipFile(nameofzip + '.zip', 'w', zipfile.ZIP_DEFLATED) + for i in range(len(thisFile)): + zipfile.write(thisFile[i], basename(thisFile[i])) + while easygui.buttonbox("Do you want to add more files?", "Meowarch", ("Yes", "No, I added all needed files")) == "Yes": + thisFile = easygui.fileopenbox(filetypes=["*"], multiple=True) + for i in range(len(thisFile)): + zipfile.write(thisFile[i], basename(thisFile[i])) + zipfile.close() + os.rename(nameofzip + ".zip", nameofzip + ".meowarch") + wheretosave = easygui.diropenbox("Where to save archive?") + shutil.move(nameofzip + ".meowarch", wheretosave + slash + nameofzip + ".meowarch") + + + + +if ziporunzip == "Unarchive file": + zipFile = easygui.fileopenbox(filetypes=["*"]) + wheretoextract = easygui.diropenbox("Where to extract files?") + filenameWithoutTochka = os.path.splitext(zipFile)[0] + os.rename(zipFile, filenameWithoutTochka + ".zip") + with zipfile.ZipFile(filenameWithoutTochka + ".zip", 'r') as zipObj: + zipObj.extractall(wheretoextract) + os.rename(filenameWithoutTochka + ".zip", filenameWithoutTochka + ".meowarch") \ No newline at end of file diff --git a/OfficialProjects/meowarch/ReadyForDownloading/README.txt b/OfficialProjects/meowarch/ReadyForDownloading/README.txt new file mode 100644 index 0000000..e03dd14 --- /dev/null +++ b/OfficialProjects/meowarch/ReadyForDownloading/README.txt @@ -0,0 +1,8 @@ +Before using, read install.txt and install all you need + +Launch meowarch.py from MeowArch folder, but don't copy .py file from this folder, it may crash (I think not, but what if?) meowarch, and it will not work +untill you copy file back. + +Don't copy any files to MeowArch folder + +If you want to test program, use files in folder "For testing MeowArch", and than use meowarch for your needs \ No newline at end of file diff --git a/OfficialProjects/meowarch/ReadyForDownloading/install.txt b/OfficialProjects/meowarch/ReadyForDownloading/install.txt new file mode 100644 index 0000000..5c8c72a --- /dev/null +++ b/OfficialProjects/meowarch/ReadyForDownloading/install.txt @@ -0,0 +1,13 @@ +Henlo +I am guide for installation +Firstly, install Python. If you want, download latest version from official website. But I added installation file of Python 3.9 +If it won't work - download from https://www.python.org/ + +!IMPORTANT! +Check te box "install pip" + +After installing python and pip, run installEasygui.bat or in CMD print +>>> pip install easygui +(without >>>) + +Cool, your copy of MeowArch works! \ No newline at end of file diff --git a/OfficialProjects/meowarch/meowarch.py b/OfficialProjects/meowarch/meowarch.py new file mode 100644 index 0000000..ce05762 --- /dev/null +++ b/OfficialProjects/meowarch/meowarch.py @@ -0,0 +1,39 @@ +import os +import easygui +import zipfile +from os.path import basename +import shutil +slash = '\\' +ziporunzip = easygui.buttonbox("What do you want to do?", "Meowarch", ("Archive file", "Unarchive file", "Cancel")) + +if ziporunzip == "Cancel": + exit() + + +if ziporunzip == "Archive file": + thisFile = easygui.fileopenbox(filetypes=["*"], multiple=True) + nameofzip = easygui.enterbox("Enter name of archive:") + # filenameWithoutTochka = os.path.splitext(thisFile)[0] + zipfile = zipfile.ZipFile(nameofzip + '.zip', 'w', zipfile.ZIP_DEFLATED) + for i in range(len(thisFile)): + zipfile.write(thisFile[i], basename(thisFile[i])) + while easygui.buttonbox("Do you want to add more files?", "Meowarch", ("Yes", "No, I added all needed files")) == "Yes": + thisFile = easygui.fileopenbox(filetypes=["*"], multiple=True) + for i in range(len(thisFile)): + zipfile.write(thisFile[i], basename(thisFile[i])) + zipfile.close() + os.rename(nameofzip + ".zip", nameofzip + ".meowarch") + wheretosave = easygui.diropenbox("Where to save archive?") + shutil.move(nameofzip + ".meowarch", wheretosave + slash + nameofzip + ".meowarch") + + + + +if ziporunzip == "Unarchive file": + zipFile = easygui.fileopenbox(filetypes=["*"]) + wheretoextract = easygui.diropenbox("Where to extract files?") + filenameWithoutTochka = os.path.splitext(zipFile)[0] + os.rename(zipFile, filenameWithoutTochka + ".zip") + with zipfile.ZipFile(filenameWithoutTochka + ".zip", 'r') as zipObj: + zipObj.extractall(wheretoextract) + os.rename(filenameWithoutTochka + ".zip", filenameWithoutTochka + ".meowarch") \ No newline at end of file