├── .gitignore ├── Games ├── DiceRoller.py ├── KillTheSith │ ├── Game.py │ ├── background.jpg │ ├── enemy.png │ ├── jet.png │ ├── laser.png │ └── shot.wav ├── Snake.py └── Tetris.py ├── LICENCE ├── Mathematic-Tools ├── BinaryTrainer.py ├── CoinAnalyzer.py ├── Collatz_conjunction.py └── NumberConverter │ ├── Graphics.ui │ └── Main.py ├── Online-Tools ├── EmailManager │ ├── .gitignore │ ├── Login.py │ ├── LoginScreen.py │ ├── LoginScreen.ui │ ├── SignUpScreen.ui │ ├── UI_EmailManager.py │ ├── WelcomeScreen.ui │ └── requirements.txt ├── GeoLocator.py ├── LiveChat │ ├── Client.py │ └── Server.py ├── Tag_Generator │ ├── README.md │ ├── TagGenerator.py │ ├── graphics.ui │ ├── icon.ico │ ├── requirements.txt │ └── tag_list.txt └── WifiMonitor.py ├── README.md └── System-Tools ├── CircularClock.py ├── Computer-Details-App ├── Main.py ├── README.md └── Specs │ ├── CPU.py │ ├── GPU.py │ ├── RAM.py │ ├── SYSTEM.py │ └── SizeConverter.py ├── Computer-Details-Singular └── CPU_data.py ├── File_Integrity ├── FileIntegrety.ui ├── Integrity_log.txt ├── Main.py ├── Validations.py └── requirements.txt ├── Hash_Validator.py ├── Melody_Player ├── icon.png └── melody_player.py ├── NetworkTool ├── Screens │ ├── APScreen.ui │ └── NetworkScreen.ui ├── main.py ├── netspeed.py ├── page_template.ui └── tools │ └── Template.py ├── Project_Installer.py ├── Screenshot.py ├── System-Maintainer ├── Maintainer.py └── README.md ├── SystemInfo ├── Main.py ├── icon.png ├── logo.ico └── requirements.txt ├── SystemStopper ├── SystemStopper.py ├── SystemStopper.ui └── logo.ico ├── TerminalAnimation.py ├── TextEditor.py ├── WeatherApp.py ├── WebcamActivation.py └── alarm.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Editors 2 | .vscode/ 3 | .idea/ 4 | 5 | # Vagrant 6 | .vagrant/ 7 | 8 | # Mac/OSX 9 | .DS_Store 10 | 11 | # Windows 12 | Thumbs.db 13 | 14 | # Source for the following rules: https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore 15 | # Byte-compiled / optimized / DLL files 16 | __pycache__/ 17 | *.py[cod] 18 | *$py.class 19 | 20 | # C extensions 21 | *.so 22 | 23 | # Distribution / packaging 24 | .Python 25 | build/ 26 | develop-eggs/ 27 | dist/ 28 | downloads/ 29 | eggs/ 30 | .eggs/ 31 | lib/ 32 | lib64/ 33 | parts/ 34 | sdist/ 35 | var/ 36 | wheels/ 37 | *.egg-info/ 38 | .installed.cfg 39 | *.egg 40 | MANIFEST 41 | 42 | # PyInstaller 43 | # Usually these files are written by a python script from a template 44 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 45 | *.manifest 46 | *.spec 47 | 48 | # Installer logs 49 | pip-log.txt 50 | pip-delete-this-directory.txt 51 | 52 | # Unit test / coverage reports 53 | htmlcov/ 54 | .tox/ 55 | .nox/ 56 | .coverage 57 | .coverage.* 58 | .cache 59 | nosetests.xml 60 | coverage.xml 61 | *.cover 62 | .hypothesis/ 63 | .pytest_cache/ 64 | 65 | # Translations 66 | *.mo 67 | *.pot 68 | 69 | # Django stuff: 70 | *.log 71 | local_settings.py 72 | db.sqlite3 73 | 74 | # Flask stuff: 75 | instance/ 76 | .webassets-cache 77 | 78 | # Scrapy stuff: 79 | .scrapy 80 | 81 | # Sphinx documentation 82 | docs/_build/ 83 | 84 | # PyBuilder 85 | target/ 86 | 87 | # Jupyter Notebook 88 | .ipynb_checkpoints 89 | 90 | # IPython 91 | profile_default/ 92 | ipython_config.py 93 | 94 | # pyenv 95 | .python-version 96 | 97 | # celery beat schedule file 98 | celerybeat-schedule 99 | 100 | # SageMath parsed files 101 | *.sage.py 102 | 103 | # Environments 104 | .env 105 | .venv 106 | env/ 107 | venv/ 108 | ENV/ 109 | env.bak/ 110 | venv.bak/ 111 | 112 | # Spyder project settings 113 | .spyderproject 114 | .spyproject 115 | 116 | # Rope project settings 117 | .ropeproject 118 | 119 | # mkdocs documentation 120 | /site 121 | 122 | # mypy 123 | .mypy_cache/ 124 | .dmypy.json 125 | dmypy.json -------------------------------------------------------------------------------- /Games/DiceRoller.py: -------------------------------------------------------------------------------- 1 | import random 2 | from tkinter import * 3 | 4 | class Dice_roller(object): 5 | def __init__(self, master): 6 | frame = Frame(master) 7 | frame.pack() 8 | 9 | self.label = Label(master, font=("times", 200)) 10 | button = Button(master, text="Roll Dice!", command=self.roll) 11 | button.place(x=200, y=0) 12 | 13 | def roll(self): 14 | symbols = ["\u2680", "\u2681", "\u2682", "\u2683", "\u2684", "\u2685"] 15 | self.label.config(text=f"{random.choice(symbols)}{random.choice(symbols)}") 16 | self.label.pack() 17 | 18 | if __name__ == '__main__': 19 | root = Tk() 20 | root.title("Dice Roller") 21 | root.geometry("500x300") 22 | Dice_roller(root) 23 | root.mainloop() 24 | 25 | -------------------------------------------------------------------------------- /Games/KillTheSith/Game.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pygame 3 | import random 4 | from pygame.locals import * 5 | 6 | os.chdir(os.path.dirname(os.path.realpath(__file__))) 7 | 8 | WINDOW_WIDTH = 800 9 | WINDOW_HEIGHT = 800 10 | BACKGROUND = pygame.image.load('background.jpg') 11 | BACKGROUND_RECT = BACKGROUND.get_rect() 12 | JET = pygame.image.load('jet.png') 13 | ENEMY = pygame.image.load('enemy.png') 14 | BULLET = pygame.image.load('laser.png') 15 | 16 | FPS = 60 17 | 18 | RED = (255, 0, 0) 19 | GREEN = (0, 255, 0) 20 | BLACK = (0, 0, 0) 21 | 22 | 23 | class Enemy(pygame.sprite.Sprite): 24 | def __init__(self): 25 | pygame.sprite.Sprite.__init__(self) 26 | self.image = ENEMY 27 | self.rect = self.image.get_rect() 28 | self.rect.x = random.randrange(WINDOW_WIDTH - self.rect.width) 29 | self.rect.y = random.randrange(-100, -40) 30 | self.speed = random.randrange(1, 5) 31 | self.health = 100 32 | 33 | def update(self): 34 | self.rect.y += self.speed 35 | if self.rect.top > WINDOW_HEIGHT + 10: 36 | self.rect.x = random.randrange(WINDOW_WIDTH - self.rect.width) 37 | self.rect.y = random.randrange(-100, -40) 38 | self.speed = random.randrange(1, 8) 39 | player.score -= 1 40 | 41 | enemies = pygame.sprite.Group() 42 | 43 | for i in range(7): 44 | enemy = Enemy() 45 | enemies.add(enemy) 46 | 47 | 48 | class Player(pygame.sprite.Sprite): 49 | def __init__(self): 50 | pygame.sprite.Sprite.__init__(self) 51 | self.image = JET 52 | self.rect = self.image.get_rect() 53 | self.rect_centerx = 240 54 | self.rect.bottom = 770 55 | self.score = 0 56 | 57 | def shoot(self): 58 | bullet = Bullet(self.rect.centerx, self.rect.top) 59 | all_sprites.add(bullet) 60 | bullets.add(bullet) 61 | 62 | 63 | class Bullet(pygame.sprite.Sprite): 64 | def __init__(self, x, y): 65 | pygame.sprite.Sprite.__init__(self) 66 | self.image = BULLET 67 | self.rect = self.image.get_rect() 68 | self.rect.bottom = y 69 | self.rect.centerx = x 70 | self.speedy = -15 71 | 72 | def update(self): 73 | self.rect.y += self.speedy 74 | if self.rect.bottom < 0: 75 | self.kill() 76 | 77 | bullets = pygame.sprite.Group() 78 | 79 | 80 | pygame.init() 81 | pygame.mixer.init() 82 | 83 | # !! Cant upload soundfile to Github... !! 84 | # pygame.mixer.music.load('bgsound.wav') 85 | # pygame.mixer.music.play(-1) 86 | 87 | screen = pygame.display.set_mode((WINDOW_WIDTH, WINDOW_HEIGHT)) 88 | pygame.display.set_caption('Kill The Sith') 89 | clock = pygame.time.Clock() 90 | 91 | all_sprites = pygame.sprite.Group() 92 | player = Player() 93 | all_sprites.add(player) 94 | all_sprites.add(enemy) 95 | 96 | font = pygame.font.SysFont('comicsans', 30, True) 97 | game_over = font.render("GAME OVER!", 1, RED) 98 | 99 | 100 | run = True 101 | while run: 102 | clock.tick(FPS) 103 | 104 | hits = pygame.sprite.groupcollide(enemies, bullets, True, True) 105 | for hit in hits: 106 | enemy = Enemy() 107 | all_sprites.add(enemy) 108 | enemies.add(enemy) 109 | player.score += 1 110 | bullets.remove(hit) 111 | 112 | hits = pygame.sprite.spritecollide(player, enemies, False) 113 | if hits: 114 | screen.blit(game_over, (400, 400)) 115 | run = False 116 | 117 | for event in pygame.event.get(): 118 | if event.type == pygame.QUIT: 119 | run = False 120 | 121 | 122 | keys = pygame.key.get_pressed() 123 | 124 | if keys[pygame.K_SPACE] and len(bullets) < 10: 125 | player.shoot() 126 | 127 | if keys[pygame.K_LEFT] and player.rect.x > 0: 128 | player.rect.x -= 7 129 | 130 | elif keys[pygame.K_RIGHT] and player.rect.x < WINDOW_WIDTH - 50: 131 | player.rect.x += 7 132 | 133 | if keys[pygame.K_UP] and player.rect.y > 600: 134 | player.rect.y -= 3 135 | 136 | elif keys[pygame.K_DOWN] and player.rect.y < WINDOW_HEIGHT - 100: 137 | player.rect.y += 3 138 | 139 | all_sprites.update() 140 | 141 | text = font.render(f'Score: {player.score}', 1, RED) 142 | screen.blit(BACKGROUND, BACKGROUND_RECT) 143 | screen.blit(text, (650, 50)) 144 | all_sprites.draw(screen) 145 | pygame.display.flip() 146 | screen.fill(BLACK) 147 | 148 | pygame.quit() 149 | -------------------------------------------------------------------------------- /Games/KillTheSith/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/Games/KillTheSith/background.jpg -------------------------------------------------------------------------------- /Games/KillTheSith/enemy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/Games/KillTheSith/enemy.png -------------------------------------------------------------------------------- /Games/KillTheSith/jet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/Games/KillTheSith/jet.png -------------------------------------------------------------------------------- /Games/KillTheSith/laser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/Games/KillTheSith/laser.png -------------------------------------------------------------------------------- /Games/KillTheSith/shot.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/Games/KillTheSith/shot.wav -------------------------------------------------------------------------------- /Games/Snake.py: -------------------------------------------------------------------------------- 1 | import random 2 | import curses 3 | 4 | def main(stdscr): 5 | # Setup 6 | curses.curs_set(0) 7 | height, width = stdscr.getmaxyx() 8 | window = curses.newwin(height, width, 0, 0) 9 | window.keypad(1) 10 | window.timeout(100) 11 | 12 | # Initial snake position 13 | snake_x = width // 4 14 | snake_y = height // 2 15 | snake = [ 16 | [snake_y, snake_x], 17 | [snake_y, snake_x - 1], 18 | [snake_y, snake_x - 2] 19 | ] 20 | 21 | # Initial food position 22 | food = [height // 2, width // 2] 23 | window.addch(food[0], food[1], curses.ACS_PI) 24 | 25 | # Initial direction and score 26 | key = curses.KEY_RIGHT 27 | score = 0 28 | 29 | # Direction map for reverse direction detection 30 | opposite_directions = { 31 | curses.KEY_UP: curses.KEY_DOWN, 32 | curses.KEY_DOWN: curses.KEY_UP, 33 | curses.KEY_LEFT: curses.KEY_RIGHT, 34 | curses.KEY_RIGHT: curses.KEY_LEFT, 35 | } 36 | 37 | while True: 38 | # Display the score 39 | window.addstr(0, 2, f"Score: {score} ") 40 | 41 | # Get user input 42 | next_key = window.getch() 43 | # Ignore reverse direction 44 | if next_key != -1 and next_key != opposite_directions.get(key, None): 45 | key = next_key 46 | 47 | # Calculate new head position 48 | new_head = [snake[0][0], snake[0][1]] 49 | 50 | if key == curses.KEY_DOWN: 51 | new_head[0] += 1 52 | if key == curses.KEY_UP: 53 | new_head[0] -= 1 54 | if key == curses.KEY_LEFT: 55 | new_head[1] -= 1 56 | if key == curses.KEY_RIGHT: 57 | new_head[1] += 1 58 | 59 | # Check for collisions 60 | if ( 61 | new_head[0] in [0, height] or # Collides with top/bottom border 62 | new_head[1] in [0, width] or # Collides with left/right border 63 | new_head in snake # Collides with itself 64 | ): 65 | break 66 | 67 | # Insert new head to the snake 68 | snake.insert(0, new_head) 69 | 70 | # Check if the snake eats the food 71 | if snake[0] == food: 72 | score += 10 # Increase score 73 | food = None 74 | while food is None: 75 | new_food = [ 76 | random.randint(1, height - 2), 77 | random.randint(1, width - 2) 78 | ] 79 | food = new_food if new_food not in snake else None 80 | window.addch(food[0], food[1], curses.ACS_PI) 81 | else: 82 | # Remove the tail piece if no food is eaten 83 | tail = snake.pop() 84 | window.addch(int(tail[0]), int(tail[1]), ' ') 85 | 86 | # Render the snake 87 | window.addch(int(snake[0][0]), int(snake[0][1]), curses.ACS_CKBOARD) 88 | 89 | # Run the game 90 | curses.wrapper(main) 91 | -------------------------------------------------------------------------------- /Games/Tetris.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pygame 3 | import random 4 | 5 | os.chdir(os.path.dirname(os.path.realpath(__file__))) 6 | 7 | if not os.path.isfile("scores.txt"): 8 | with open("scores.txt", "a") as file: 9 | pass 10 | 11 | pygame.font.init() 12 | 13 | s_width = 800 14 | s_height = 700 15 | play_width = 300 16 | play_height = 600 17 | block_size = 30 18 | 19 | top_left_x = (s_width - play_width) // 2 20 | top_left_y = s_height - play_height 21 | 22 | # SHAPE FORMATS 23 | S = [['.....', 24 | '.....', 25 | '..00.', 26 | '.00..', 27 | '.....'], 28 | ['.....', 29 | '..0..', 30 | '..00.', 31 | '...0.', 32 | '.....']] 33 | 34 | Z = [['.....', 35 | '.....', 36 | '.00..', 37 | '..00.', 38 | '.....'], 39 | ['.....', 40 | '..0..', 41 | '.00..', 42 | '.0...', 43 | '.....']] 44 | 45 | J = [['.....', 46 | '.0...', 47 | '.000.', 48 | '.....', 49 | '.....'], 50 | ['.....', 51 | '..00.', 52 | '..0..', 53 | '..0..', 54 | '.....'], 55 | ['.....', 56 | '.....', 57 | '.000.', 58 | '...0.', 59 | '.....'], 60 | ['.....', 61 | '..0..', 62 | '..0..', 63 | '.00..', 64 | '.....']] 65 | 66 | I = [['..0..', 67 | '..0..', 68 | '..0..', 69 | '..0..', 70 | '.....'], 71 | ['.....', 72 | '0000.', 73 | '.....', 74 | '.....', 75 | '.....']] 76 | 77 | O = [['.....', 78 | '.....', 79 | '.00..', 80 | '.00..', 81 | '.....']] 82 | 83 | L = [['.....', 84 | '...0.', 85 | '.000.', 86 | '.....', 87 | '.....'], 88 | ['.....', 89 | '..0..', 90 | '..0..', 91 | '..00.', 92 | '.....'], 93 | ['.....', 94 | '.....', 95 | '.000.', 96 | '.0...', 97 | '.....'], 98 | ['.....', 99 | '.00..', 100 | '..0..', 101 | '..0..', 102 | '.....']] 103 | 104 | T = [['.....', 105 | '..0..', 106 | '.000.', 107 | '.....', 108 | '.....'], 109 | ['.....', 110 | '..0..', 111 | '..00.', 112 | '..0..', 113 | '.....'], 114 | ['.....', 115 | '.....', 116 | '.000.', 117 | '..0..', 118 | '.....'], 119 | ['.....', 120 | '..0..', 121 | '.00..', 122 | '..0..', 123 | '.....']] 124 | 125 | shapes = [S, Z, I, O, J, L, T] 126 | shape_colors = [(0, 255, 0), (255, 0, 0), (0, 255, 255), (255, 255, 0), (255, 165, 0), (0, 0, 255), (128, 0, 128)] 127 | # index 0 - 6 represent shape 128 | 129 | class Piece(object): 130 | def __init__(self, x, y, shape): 131 | self.x = x 132 | self.y = y 133 | self.shape = shape 134 | self.color = shape_colors[shapes.index(shape)] 135 | self.rotation = 0 136 | 137 | 138 | def create_grid(locked_pos={}): 139 | grid = [[(0,0,0) for _ in range(10)] for _ in range(20)] 140 | 141 | for i in range(len(grid)): 142 | for j in range(len(grid[i])): 143 | if (j, i) in locked_pos: 144 | c = locked_pos[(j,i)] 145 | grid[i][j] = c 146 | return grid 147 | 148 | 149 | def convert_shape_format(shape): 150 | positions = [] 151 | format = shape.shape[shape.rotation % len(shape.shape)] 152 | 153 | for i, line in enumerate(format): 154 | row = list(line) 155 | for j, column in enumerate(row): 156 | if column == '0': 157 | positions.append((shape.x + j, shape.y + i)) 158 | 159 | for i, pos in enumerate(positions): 160 | positions[i] = (pos[0] - 2, pos[1] - 4) 161 | 162 | return positions 163 | 164 | 165 | def valid_space(shape, grid): 166 | accepted_pos = [[(j, i) for j in range(10) if grid[i][j] == (0,0,0)] for i in range(20)] 167 | accepted_pos = [j for sub in accepted_pos for j in sub] 168 | 169 | formatted = convert_shape_format(shape) 170 | 171 | for pos in formatted: 172 | if pos not in accepted_pos: 173 | if pos[1] > -1: 174 | return False 175 | return True 176 | 177 | 178 | def check_lost(positions): 179 | for pos in positions: 180 | x, y = pos 181 | if y < 1: 182 | return True 183 | 184 | return False 185 | 186 | 187 | def get_shape(): 188 | return Piece(5, 0, random.choice(shapes)) 189 | 190 | 191 | def draw_text_middle(surface, text, size, color): 192 | font = pygame.font.SysFont("comicsans", size, bold=True) 193 | label = font.render(text, 1, color) 194 | 195 | surface.blit(label, (top_left_x + play_width /2 - (label.get_width()/2), top_left_y + play_height/2 - label.get_height()/2)) 196 | 197 | 198 | def draw_grid(surface, grid): 199 | sx = top_left_x 200 | sy = top_left_y 201 | 202 | for i in range(len(grid)): 203 | pygame.draw.line(surface, (128,128,128), (sx, sy + i*block_size), (sx+play_width, sy+ i*block_size)) 204 | for j in range(len(grid[i])): 205 | pygame.draw.line(surface, (128, 128, 128), (sx + j*block_size, sy),(sx + j*block_size, sy + play_height)) 206 | 207 | 208 | def clear_rows(grid, locked): 209 | inc = 0 210 | for i in range(len(grid)-1, -1, -1): 211 | row = grid[i] 212 | if (0,0,0) not in row: 213 | inc += 1 214 | ind = i 215 | for j in range(len(row)): 216 | try: 217 | del locked[(j,i)] 218 | except: 219 | continue 220 | 221 | if inc > 0: 222 | for key in sorted(list(locked), key=lambda x: x[1])[::-1]: 223 | x, y = key 224 | if y < ind: 225 | newKey = (x, y + inc) 226 | locked[newKey] = locked.pop(key) 227 | return inc 228 | 229 | 230 | def draw_next_shape(shape, surface): 231 | font = pygame.font.SysFont('comicsans', 30) 232 | label = font.render('Next Shape', 1, (255,255,255)) 233 | 234 | sx = top_left_x + play_width + 50 235 | sy = top_left_y + play_height/2 - 100 236 | format = shape.shape[shape.rotation % len(shape.shape)] 237 | 238 | for i, line in enumerate(format): 239 | row = list(line) 240 | for j, column in enumerate(row): 241 | if column == '0': 242 | pygame.draw.rect(surface, shape.color, (sx + j*block_size, sy + i*block_size, block_size, block_size), 0) 243 | surface.blit(label, (sx + 10, sy - 30)) 244 | 245 | 246 | def update_score(nscore): 247 | score = max_score() 248 | 249 | with open('scores.txt', 'w') as file: 250 | if int(score) > nscore: 251 | file.write(str(score)) 252 | else: 253 | file.write(str(nscore)) 254 | 255 | def max_score(): 256 | try: 257 | with open('scores.txt', 'r') as file: 258 | lines = file.readlines() 259 | score = lines[0].strip() 260 | except: 261 | score = "0" 262 | return score 263 | 264 | 265 | def draw_window(surface, grid, score=0, last_score = 0): 266 | surface.fill((0, 0, 0)) 267 | pygame.font.init() 268 | font = pygame.font.SysFont('comicsans', 60) 269 | label = font.render('Tetris', 1, (255, 255, 255)) 270 | surface.blit(label, (top_left_x + play_width / 2 - (label.get_width() / 2), 30)) 271 | # current score 272 | font = pygame.font.SysFont('comicsans', 30) 273 | label = font.render('Score: ' + str(score), 1, (255,255,255)) 274 | sx = top_left_x + play_width + 50 275 | sy = top_left_y + play_height/2 - 100 276 | surface.blit(label, (sx + 20, sy + 160)) 277 | # last score 278 | label = font.render('High Score: ' + last_score, 1, (255,255,255)) 279 | sx = top_left_x - 250 280 | sy = top_left_y + 200 281 | surface.blit(label, (sx + 20, sy + 160)) 282 | 283 | for i in range(len(grid)): 284 | for j in range(len(grid[i])): 285 | pygame.draw.rect(surface, grid[i][j], (top_left_x + j*block_size, top_left_y + i*block_size, block_size, block_size), 0) 286 | 287 | pygame.draw.rect(surface, (255, 0, 0), (top_left_x, top_left_y, play_width, play_height), 5) 288 | 289 | draw_grid(surface, grid) 290 | #pygame.display.update() 291 | 292 | 293 | def main(win): 294 | last_score = max_score() 295 | locked_positions = {} 296 | grid = create_grid(locked_positions) 297 | 298 | change_piece = False 299 | run = True 300 | current_piece = get_shape() 301 | next_piece = get_shape() 302 | clock = pygame.time.Clock() 303 | fall_time = 0 304 | fall_speed = 0.27 305 | level_time = 0 306 | score = 0 307 | 308 | while run: 309 | grid = create_grid(locked_positions) 310 | fall_time += clock.get_rawtime() 311 | level_time += clock.get_rawtime() 312 | clock.tick() 313 | 314 | if level_time/1000 > 5: 315 | level_time = 0 316 | if level_time > 0.12: 317 | level_time -= 0.005 318 | 319 | if fall_time/1000 > fall_speed: 320 | fall_time = 0 321 | current_piece.y += 1 322 | if not(valid_space(current_piece, grid)) and current_piece.y > 0: 323 | current_piece.y -= 1 324 | change_piece = True 325 | 326 | for event in pygame.event.get(): 327 | if event.type == pygame.QUIT: 328 | run = False 329 | pygame.display.quit() 330 | 331 | if event.type == pygame.KEYDOWN: 332 | if event.key == pygame.K_LEFT: 333 | current_piece.x -= 1 334 | if not(valid_space(current_piece, grid)): 335 | current_piece.x += 1 336 | if event.key == pygame.K_RIGHT: 337 | current_piece.x += 1 338 | if not(valid_space(current_piece, grid)): 339 | current_piece.x -= 1 340 | if event.key == pygame.K_DOWN: 341 | current_piece.y += 1 342 | if not(valid_space(current_piece, grid)): 343 | current_piece.y -= 1 344 | if event.key == pygame.K_UP: 345 | current_piece.rotation += 1 346 | if not(valid_space(current_piece, grid)): 347 | current_piece.rotation -= 1 348 | 349 | shape_pos = convert_shape_format(current_piece) 350 | 351 | for i in range(len(shape_pos)): 352 | x, y = shape_pos[i] 353 | if y > -1: 354 | grid[y][x] = current_piece.color 355 | 356 | if change_piece: 357 | for pos in shape_pos: 358 | p = (pos[0], pos[1]) 359 | locked_positions[p] = current_piece.color 360 | current_piece = next_piece 361 | next_piece = get_shape() 362 | change_piece = False 363 | score += clear_rows(grid, locked_positions) * 10 364 | 365 | draw_window(win, grid, score, last_score) 366 | draw_next_shape(next_piece, win) 367 | pygame.display.update() 368 | 369 | if check_lost(locked_positions): 370 | draw_text_middle(win, "YOU LOST!", 80, (255,255,255)) 371 | pygame.display.update() 372 | pygame.time.delay(1500) 373 | run = False 374 | update_score(score) 375 | 376 | def main_menu(win): 377 | run = True 378 | while run: 379 | win.fill((0,0,0)) 380 | draw_text_middle(win, 'Press Any Key To Play', 60, (255,255,255)) 381 | pygame.display.update() 382 | for event in pygame.event.get(): 383 | if event.type == pygame.QUIT: 384 | run = False 385 | if event.type == pygame.KEYDOWN: 386 | main(win) 387 | 388 | pygame.display.quit() 389 | 390 | win = pygame.display.set_mode((s_width, s_height)) 391 | pygame.display.set_caption('Tetris') 392 | main_menu(win) -------------------------------------------------------------------------------- /LICENCE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. -------------------------------------------------------------------------------- /Mathematic-Tools/BinaryTrainer.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import time 3 | import random 4 | from PyQt5 import QtCore, QtGui, QtWidgets 5 | from PyQt5.QtWidgets import QApplication, QMainWindow 6 | from PyQt5.QtCore import QCoreApplication, QObject, QRunnable 7 | 8 | 9 | class MainWindow(QMainWindow): 10 | score = 0 11 | streak = 0 12 | def __init__(self): 13 | super(MainWindow, self).__init__() 14 | self.setGeometry(200, 200, 590, 467) 15 | self.setWindowTitle("Binary Trainer") 16 | self.initUI() 17 | self.decimal_string, self.binary_string = self.question() 18 | self.binary_question.setText(self.binary_string) 19 | 20 | 21 | def initUI(self): 22 | self.top_label = QtWidgets.QLabel(self) 23 | self.top_label.setObjectName("top_label") 24 | self.top_label.setGeometry(QtCore.QRect(40, 0, 511, 51)) 25 | font = QtGui.QFont() 26 | font.setFamily("Inconsolata Extra Expanded ExtraBold") 27 | font.setPointSize(36) 28 | font.setBold(True) 29 | font.setWeight(75) 30 | self.top_label.setFont(font) 31 | self.top_label.setText("Binary Trainer") 32 | 33 | self.score_label = QtWidgets.QLabel(self) 34 | self.score_label.setObjectName("score_label") 35 | self.score_label.setGeometry(QtCore.QRect(80, 70, 101, 16)) 36 | font1 = QtGui.QFont() 37 | font1.setFamily("Inconsolata Extra Expanded ExtraBold") 38 | font1.setPointSize(18) 39 | font1.setBold(True) 40 | font1.setWeight(75) 41 | self.score_label.setFont(font1) 42 | self.score_label.setText("Score:") 43 | self.score_count = QtWidgets.QLabel(self) 44 | self.score_count.setObjectName("score_count") 45 | self.score_count.setGeometry(QtCore.QRect(190, 70, 61, 16)) 46 | self.score_count.setFont(font1) 47 | self.score_count.setText(str(MainWindow.score)) 48 | 49 | self.streak_label = QtWidgets.QLabel(self) 50 | self.streak_label.setObjectName("streak_label") 51 | self.streak_label.setGeometry(QtCore.QRect(330, 70, 121, 16)) 52 | self.streak_label.setFont(font1) 53 | self.streak_label.setText("Streak:") 54 | self.streak_count = QtWidgets.QLabel(self) 55 | self.streak_count.setObjectName("streak_count") 56 | self.streak_count.setGeometry(QtCore.QRect(460, 70, 61, 16)) 57 | self.streak_count.setFont(font1) 58 | self.streak_count.setText(str(MainWindow.streak)) 59 | 60 | self.convertion_label = QtWidgets.QLabel(self) 61 | self.convertion_label.setObjectName("convertion_label") 62 | self.convertion_label.setGeometry(QtCore.QRect(140, 120, 301, 20)) 63 | self.convertion_label.setFont(font1) 64 | self.convertion_label.setText("Convertion Table:") 65 | self.convertion_table = QtWidgets.QLabel(self) 66 | self.convertion_table.setObjectName("convertion_table") 67 | self.convertion_table.setGeometry(QtCore.QRect(30, 140, 521, 31)) 68 | font2 = QtGui.QFont() 69 | font2.setFamily("Inconsolata Extra Expanded ExtraBold") 70 | font2.setPointSize(16) 71 | font2.setBold(True) 72 | font2.setWeight(75) 73 | self.convertion_table.setFont(font2) 74 | self.convertion_table.setText("128 64 32 16 8 4 2 1") 75 | 76 | self.split_line = QtWidgets.QLabel(self) 77 | self.split_line.setObjectName("split_line") 78 | self.split_line.setGeometry(QtCore.QRect(20, 170, 551, 20)) 79 | self.split_line.setFont(font2) 80 | self.split_line.setText("_______________________________________________________________________________________________") 81 | 82 | self.binary_question = QtWidgets.QLabel(self) 83 | self.binary_question.setObjectName("binary_question") 84 | self.binary_question.setGeometry(QtCore.QRect(20, 230, 551, 21)) 85 | self.binary_question.setFont(font2) 86 | self.binary_question.setAlignment(QtCore.Qt.AlignCenter) 87 | self.binary_question.setText("") 88 | 89 | self.octet_input_1 = QtWidgets.QLineEdit(self) 90 | self.octet_input_1.setObjectName("octet_input_1") 91 | self.octet_input_1.setGeometry(QtCore.QRect(120, 310, 81, 32)) 92 | self.octet_input_1.setFont(font2) 93 | self.octet_input_1.setMaxLength(3) 94 | self.octet_input_1.setAlignment(QtCore.Qt.AlignCenter) 95 | self.octet_input_1.setText("") 96 | self.octet_input_2 = QtWidgets.QLineEdit(self) 97 | self.octet_input_2.setObjectName("octet_input_2") 98 | self.octet_input_2.setGeometry(QtCore.QRect(210, 310, 81, 32)) 99 | self.octet_input_2.setFont(font2) 100 | self.octet_input_2.setMaxLength(3) 101 | self.octet_input_2.setAlignment(QtCore.Qt.AlignCenter) 102 | self.octet_input_2.setText("") 103 | 104 | self.octet_input_3 = QtWidgets.QLineEdit(self) 105 | self.octet_input_3.setObjectName("octet_input_3") 106 | self.octet_input_3.setGeometry(QtCore.QRect(300, 310, 81, 32)) 107 | self.octet_input_3.setFont(font2) 108 | self.octet_input_3.setMaxLength(3) 109 | self.octet_input_3.setAlignment(QtCore.Qt.AlignCenter) 110 | self.octet_input_3.setText("") 111 | self.octet_input_4 = QtWidgets.QLineEdit(self) 112 | self.octet_input_4.setObjectName("octet_input_4") 113 | self.octet_input_4.setGeometry(QtCore.QRect(390, 310, 81, 32)) 114 | self.octet_input_4.setFont(font2) 115 | self.octet_input_4.setMaxLength(3) 116 | self.octet_input_4.setAlignment(QtCore.Qt.AlignCenter) 117 | self.octet_input_4.setText("") 118 | 119 | self.check_button = QtWidgets.QPushButton(self) 120 | self.check_button.setObjectName("check_button") 121 | self.check_button.setGeometry(QtCore.QRect(230, 360, 131, 41)) 122 | font3 = QtGui.QFont() 123 | font3.setFamily("Inconsolata Extra Expanded Black") 124 | font3.setPointSize(18) 125 | font3.setBold(True) 126 | font3.setWeight(75) 127 | self.check_button.setFont(font3) 128 | self.check_button.setText("Check") 129 | self.check_button.clicked.connect(self.verify) 130 | 131 | self.result_feedback = QtWidgets.QLabel(self) 132 | self.result_feedback.setObjectName("result_feedback") 133 | self.result_feedback.setGeometry(QtCore.QRect(220, 270, 151, 21)) 134 | self.result_feedback.setFont(font2) 135 | self.result_feedback.setAlignment(QtCore.Qt.AlignCenter) 136 | self.result_feedback.setText("") 137 | 138 | 139 | def question(self): 140 | num_string = self.q_decimal() 141 | bin_string = self.q_binary(num_string) 142 | return num_string, bin_string 143 | 144 | 145 | def q_decimal(self): 146 | octet_1 = random.randint(0, 255) 147 | octet_2 = random.randint(0, 255) 148 | octet_3 = random.randint(0, 255) 149 | octet_4 = random.randint(0, 255) 150 | return f"{octet_1}.{octet_2}.{octet_3}.{octet_4}" 151 | 152 | def q_binary(self, decimal_string): 153 | binary_string = "" 154 | for num in decimal_string.split("."): 155 | binary_string += str("{0:08b}.".format(int(num))) 156 | return binary_string[:-1] 157 | 158 | 159 | def verify(self): 160 | octet_1 = self.octet_input_1.text() 161 | octet_2 = self.octet_input_2.text() 162 | octet_3 = self.octet_input_3.text() 163 | octet_4 = self.octet_input_4.text() 164 | result_string = f"{octet_1}.{octet_2}.{octet_3}.{octet_4}" 165 | if self.decimal_string == result_string: 166 | MainWindow.score += 1 167 | MainWindow.streak += 1 168 | self.result_feedback.setText("Correct") 169 | self.score_count.setText(str(MainWindow.score)) 170 | self.streak_count.setText(str(MainWindow.streak)) 171 | self.result_feedback.setText("") 172 | else: 173 | MainWindow.streak = 0 174 | self.result_feedback.setText("Incorrect") 175 | self.streak_count.setText(str(MainWindow.streak)) 176 | self.result_feedback.setText("") 177 | self.decimal_string, self.binary_string = self.question() 178 | self.binary_question.setText(str(self.binary_string)) 179 | self.octet_input_1.setText("") 180 | self.octet_input_2.setText("") 181 | self.octet_input_3.setText("") 182 | self.octet_input_4.setText("") 183 | 184 | 185 | if __name__ == "__main__": 186 | app = QApplication(sys.argv) 187 | window = MainWindow() 188 | window.show() 189 | sys.exit(app.exec_()) 190 | -------------------------------------------------------------------------------- /Mathematic-Tools/CoinAnalyzer.py: -------------------------------------------------------------------------------- 1 | # Analyze total bought of crypto, the spending, coin prices & average, earnings and fees 2 | import textwrap 3 | 4 | class CoinAnalyzer(object): 5 | def __init__(self, amounts, prices, transfers, current_amount): 6 | self.amounts = amounts 7 | self.prices = prices 8 | self.transfers = transfers 9 | self.current_amount = current_amount 10 | 11 | def data_string(self): 12 | return textwrap.dedent(f""" 13 | Total Bought: {round(self.total_bought(), 2)} 14 | Coin Average: {round(self.coin_average(), 2)} 15 | Total Earning: {round(self.earnings(), 2)} 16 | """) 17 | 18 | def __str__(self): 19 | return str(self.data_string()) 20 | 21 | def total_transfered(self): 22 | amount = 0 23 | for buy in self.amounts: 24 | amount += buy 25 | return amount 26 | 27 | def total_bought(self): 28 | amount = self.total_transfered() 29 | amount -= self.spending() 30 | return amount 31 | 32 | def spending(self): 33 | amount = 0 34 | for sell in self.transfers: 35 | amount += sell 36 | return amount 37 | 38 | def coin_average(self): 39 | price = 0 40 | for _price in self.prices: 41 | price += _price 42 | return price / len(self.prices) 43 | 44 | def earnings(self): 45 | return self.current_amount - self.total_bought() 46 | 47 | 48 | if __name__ == "__main__": 49 | amounts = [979.63, 5219.40, 830.67, 1547.73] 50 | prices = [0.91, 1.14, 1.32, 1.31] 51 | transfers = [499.83, 631.10, 999.38, 999.76] 52 | current_amount = 6100 53 | print(CoinAnalyzer(amounts, prices, transfers, current_amount)) -------------------------------------------------------------------------------- /Mathematic-Tools/Collatz_conjunction.py: -------------------------------------------------------------------------------- 1 | """ Collatz Conjecture: (3x + 1) """ 2 | 3 | from matplotlib import pyplot as plt 4 | plt.style.use("ggplot") 5 | 6 | """ This mathematical equation will ALWAYS end up with 1 """ 7 | count = 0 8 | evens = 0 9 | odds = 0 10 | numbers = [] 11 | counts = [] 12 | 13 | number = int(input("Enter integer: ")) 14 | first = number 15 | 16 | while number != 1: 17 | if number % 2 == 0: 18 | evens += 1 19 | number = int(number / 2) 20 | else: 21 | odds += 1 22 | number = int(number * 3 + 1) 23 | count += 1 24 | counts.append(count) 25 | numbers.append(number) 26 | 27 | plt.plot(counts, numbers, color="k", linestyle="--", marker="o", label="Numbers") 28 | 29 | plt.xlabel(f"Numbers\nSteps: {count}") 30 | plt.ylabel(f"Results\nEvens: {evens} | Odds: {odds}") 31 | plt.title(f"3x + 1 Illustration: Given number: {first}") 32 | plt.grid(True) 33 | plt.legend() 34 | plt.show() 35 | -------------------------------------------------------------------------------- /Mathematic-Tools/NumberConverter/Graphics.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 802 10 | 296 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 0 21 | 0 22 | 801 23 | 271 24 | 25 | 26 | 27 | 28 | 10 29 | 75 30 | true 31 | 32 | 33 | 34 | 2 35 | 36 | 37 | 38 | Binary 39 | 40 | 41 | 42 | 43 | 280 44 | 0 45 | 251 46 | 41 47 | 48 | 49 | 50 | 51 | 22 52 | 75 53 | true 54 | 55 | 56 | 57 | Binary 58 | 59 | 60 | Qt::AlignCenter 61 | 62 | 63 | 64 | 65 | 66 | 150 67 | 60 68 | 571 69 | 31 70 | 71 | 72 | 73 | 74 | 12 75 | 75 76 | true 77 | 78 | 79 | 80 | 81 | 82 | 83 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 84 | 85 | 86 | 87 | 88 | 89 | 20 90 | 60 91 | 121 92 | 31 93 | 94 | 95 | 96 | 97 | 16 98 | 75 99 | true 100 | 101 | 102 | 103 | Binary: 104 | 105 | 106 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 107 | 108 | 109 | 110 | 111 | 112 | 150 113 | 100 114 | 571 115 | 31 116 | 117 | 118 | 119 | 120 | 12 121 | 75 122 | true 123 | 124 | 125 | 126 | 127 | 128 | 129 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 130 | 131 | 132 | 133 | 134 | 135 | 20 136 | 100 137 | 121 138 | 31 139 | 140 | 141 | 142 | 143 | 16 144 | 75 145 | true 146 | 147 | 148 | 149 | Decimal: 150 | 151 | 152 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 153 | 154 | 155 | 156 | 157 | 158 | 350 159 | 160 160 | 101 161 | 51 162 | 163 | 164 | 165 | 166 | 16 167 | 75 168 | true 169 | 170 | 171 | 172 | Convert 173 | 174 | 175 | 176 | 177 | 178 | Hexa 179 | 180 | 181 | 182 | 183 | 20 184 | 100 185 | 121 186 | 31 187 | 188 | 189 | 190 | 191 | 16 192 | 75 193 | true 194 | 195 | 196 | 197 | Decimal: 198 | 199 | 200 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 201 | 202 | 203 | 204 | 205 | 206 | 150 207 | 60 208 | 571 209 | 31 210 | 211 | 212 | 213 | 214 | 12 215 | 75 216 | true 217 | 218 | 219 | 220 | 221 | 222 | 223 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 224 | 225 | 226 | 227 | 228 | 229 | 280 230 | 0 231 | 251 232 | 41 233 | 234 | 235 | 236 | 237 | 22 238 | 75 239 | true 240 | 241 | 242 | 243 | Hexadecimal 244 | 245 | 246 | Qt::AlignCenter 247 | 248 | 249 | 250 | 251 | 252 | 350 253 | 160 254 | 101 255 | 51 256 | 257 | 258 | 259 | 260 | 16 261 | 75 262 | true 263 | 264 | 265 | 266 | Convert 267 | 268 | 269 | 270 | 271 | 272 | 20 273 | 60 274 | 121 275 | 31 276 | 277 | 278 | 279 | 280 | 16 281 | 75 282 | true 283 | 284 | 285 | 286 | Hex: 287 | 288 | 289 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 290 | 291 | 292 | 293 | 294 | 295 | 150 296 | 100 297 | 571 298 | 31 299 | 300 | 301 | 302 | 303 | 12 304 | 75 305 | true 306 | 307 | 308 | 309 | 310 | 311 | 312 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 313 | 314 | 315 | 316 | 317 | 318 | Octal 319 | 320 | 321 | 322 | 323 | 20 324 | 100 325 | 121 326 | 31 327 | 328 | 329 | 330 | 331 | 16 332 | 75 333 | true 334 | 335 | 336 | 337 | Decimal: 338 | 339 | 340 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 341 | 342 | 343 | 344 | 345 | 346 | 150 347 | 60 348 | 571 349 | 31 350 | 351 | 352 | 353 | 354 | 12 355 | 75 356 | true 357 | 358 | 359 | 360 | 361 | 362 | 363 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 364 | 365 | 366 | 367 | 368 | 369 | 280 370 | 0 371 | 251 372 | 41 373 | 374 | 375 | 376 | 377 | 22 378 | 75 379 | true 380 | 381 | 382 | 383 | Octadecimal 384 | 385 | 386 | Qt::AlignCenter 387 | 388 | 389 | 390 | 391 | 392 | 350 393 | 160 394 | 101 395 | 51 396 | 397 | 398 | 399 | 400 | 16 401 | 75 402 | true 403 | 404 | 405 | 406 | Convert 407 | 408 | 409 | 410 | 411 | 412 | 20 413 | 60 414 | 121 415 | 31 416 | 417 | 418 | 419 | 420 | 16 421 | 75 422 | true 423 | 424 | 425 | 426 | Octal: 427 | 428 | 429 | Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter 430 | 431 | 432 | 433 | 434 | 435 | 150 436 | 100 437 | 571 438 | 31 439 | 440 | 441 | 442 | 443 | 12 444 | 75 445 | true 446 | 447 | 448 | 449 | 450 | 451 | 452 | Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 0 462 | 0 463 | 802 464 | 21 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | -------------------------------------------------------------------------------- /Mathematic-Tools/NumberConverter/Main.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | from PyQt5 import QtCore, QtGui, QtWidgets 4 | from PyQt5.QtWidgets import QMainWindow, QApplication, QPushButton, QWidget, QAction, QTabWidget,QVBoxLayout 5 | from PyQt5.QtGui import QIcon 6 | from PyQt5.QtCore import pyqtSlot 7 | 8 | class MainWindow(QMainWindow): 9 | def __init__(self): 10 | super(MainWindow, self).__init__() 11 | self.setGeometry(200, 200, 802, 296) 12 | self.setWindowTitle("Number System Converter") 13 | os.chdir(os.path.dirname(os.path.realpath(__file__))) 14 | # self.setWindowIcon(QtGui.QIcon("logo.ico")) 15 | self.initUI() 16 | 17 | 18 | def initUI(self): 19 | self.tabWidget = QTabWidget(self) 20 | self.tabWidget.setObjectName("tabWidget") 21 | self.tabWidget.setGeometry(QtCore.QRect(0, 0, 801, 271)) 22 | 23 | font = QtGui.QFont() 24 | font.setPointSize(10) 25 | font.setBold(True) 26 | font.setWeight(75) 27 | self.tabWidget.setFont(font) 28 | 29 | self.tab_binary = QWidget() 30 | self.tab_binary.setObjectName("tab_binary") 31 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_binary), "Binary") 32 | 33 | self.toplabel_binary = QtWidgets.QLabel(self) 34 | self.toplabel_binary.setObjectName("toplabel_binary") 35 | self.toplabel_binary.setGeometry(QtCore.QRect(280, 0, 251, 41)) 36 | font1 = QtGui.QFont() 37 | font1.setPointSize(22) 38 | font1.setBold(True) 39 | font1.setWeight(75) 40 | self.toplabel_binary.setFont(font1) 41 | self.toplabel_binary.setAlignment(QtCore.Qt.AlignCenter) 42 | self.toplabel_binary.setText("Binary") 43 | 44 | self.entry_binary = QtWidgets.QLineEdit(self) 45 | self.entry_binary.setObjectName("entry_binary") 46 | self.entry_binary.setGeometry(QtCore.QRect(150, 60, 571, 31)) 47 | font2 = QtGui.QFont() 48 | font2.setPointSize(12) 49 | font2.setBold(True) 50 | font2.setWeight(75) 51 | self.entry_binary.setFont(font2) 52 | self.entry_binary.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 53 | self.entry_binary.setText("") 54 | 55 | self.label_binary = QtWidgets.QLabel(self) 56 | self.label_binary.setObjectName("label_binary") 57 | self.label_binary.setGeometry(QtCore.QRect(20, 60, 121, 31)) 58 | font3 = QtGui.QFont() 59 | font3.setPointSize(16) 60 | font3.setBold(True) 61 | font3.setWeight(75) 62 | self.label_binary.setFont(font3) 63 | self.label_binary.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 64 | self.label_binary.setText("Binary:") 65 | 66 | self.entry_decimal = QtWidgets.QLineEdit(self) 67 | self.entry_decimal.setObjectName("entry_decimal") 68 | self.entry_decimal.setGeometry(QtCore.QRect(150, 100, 571, 31)) 69 | self.entry_decimal.setFont(font2) 70 | self.entry_decimal.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 71 | self.entry_decimal.setText("") 72 | 73 | self.label_decimal = QtWidgets.QLabel(self) 74 | self.label_decimal.setObjectName("label_decimal") 75 | self.label_decimal.setGeometry(QtCore.QRect(20, 100, 121, 31)) 76 | self.label_decimal.setFont(font3) 77 | self.label_decimal.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 78 | self.label_decimal.setText("Decimal:") 79 | 80 | self.button_binary = QtWidgets.QPushButton(self) 81 | self.button_binary.setObjectName("button_binary") 82 | self.button_binary.setGeometry(QtCore.QRect(350, 160, 101, 51)) 83 | self.button_binary.setFont(font3) 84 | self.button_binary.setText("Convert") 85 | 86 | self.tabWidget.addTab(self.tab_binary, "") 87 | self.tab_hexa = QWidget() 88 | self.tab_hexa.setObjectName("tab_hexa") 89 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_hexa), "Hexa") 90 | 91 | self.label_decimal_hexa = QtWidgets.QLabel(self) 92 | self.label_decimal_hexa.setObjectName("label_decimal_hexa") 93 | self.label_decimal_hexa.setGeometry(QtCore.QRect(20, 100, 121, 31)) 94 | self.label_decimal_hexa.setFont(font3) 95 | self.label_decimal_hexa.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 96 | self.label_decimal_hexa.setText("Decimal:") 97 | 98 | self.entry_hexa = QtWidgets.QLineEdit(self) 99 | self.entry_hexa.setObjectName(u"entry_hexa") 100 | self.entry_hexa.setGeometry(QtCore.QRect(150, 60, 571, 31)) 101 | self.entry_hexa.setFont(font2) 102 | self.entry_hexa.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 103 | self.entry_hexa.setText("") 104 | 105 | self.toplabel_hexa = QtWidgets.QLabel(self) 106 | self.toplabel_hexa.setObjectName("toplabel_hexa") 107 | self.toplabel_hexa.setGeometry(QtCore.QRect(280, 0, 251, 41)) 108 | self.toplabel_hexa.setFont(font1) 109 | self.toplabel_hexa.setAlignment(QtCore.Qt.AlignCenter) 110 | self.toplabel_hexa.setText("Hexadecimal") 111 | 112 | self.button_hexa = QPushButton(self) 113 | self.button_hexa.setObjectName("button_hexa") 114 | self.button_hexa.setGeometry(QtCore.QRect(350, 160, 101, 51)) 115 | self.button_hexa.setFont(font3) 116 | self.button_hexa.setText("Convert") 117 | 118 | self.label_hexa = QtWidgets.QLabel(self) 119 | self.label_hexa.setObjectName("label_hexa") 120 | self.label_hexa.setGeometry(QtCore.QRect(20, 60, 121, 31)) 121 | self.label_hexa.setFont(font3) 122 | self.label_hexa.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 123 | self.label_hexa.setText("Hex:") 124 | 125 | self.entry_decimal_hexa = QtWidgets.QLineEdit(self) 126 | self.entry_decimal_hexa.setObjectName("entry_decimal_hexa") 127 | self.entry_decimal_hexa.setGeometry(QtCore.QRect(150, 100, 571, 31)) 128 | self.entry_decimal_hexa.setFont(font2) 129 | self.entry_decimal_hexa.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 130 | self.entry_decimal_hexa.setText("") 131 | 132 | self.tabWidget.addTab(self.tab_hexa, "") 133 | self.tab_octal = QWidget() 134 | self.tab_octal.setObjectName("tab_octal") 135 | 136 | self.label_decimal_octal = QtWidgets.QLabel(self) 137 | self.label_decimal_octal.setObjectName("label_decimal_octal") 138 | self.label_decimal_octal.setGeometry(QtCore.QRect(20, 100, 121, 31)) 139 | self.label_decimal_octal.setFont(font3) 140 | self.label_decimal_octal.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 141 | self.label_decimal_octal.setText("Decimal:") 142 | 143 | self.entry_octal = QtWidgets.QLineEdit(self) 144 | self.entry_octal.setObjectName("entry_octal") 145 | self.entry_octal.setGeometry(QtCore.QRect(150, 60, 571, 31)) 146 | self.entry_octal.setFont(font2) 147 | self.entry_octal.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 148 | self.entry_octal.setText("") 149 | 150 | self.toplabel_octal = QtWidgets.QLabel(self) 151 | self.toplabel_octal.setObjectName("toplabel_octal") 152 | self.toplabel_octal.setGeometry(QtCore.QRect(280, 0, 251, 41)) 153 | self.toplabel_octal.setFont(font1) 154 | self.toplabel_octal.setAlignment(QtCore.Qt.AlignCenter) 155 | self.toplabel_octal.setText("Octadecimal") 156 | 157 | self.button_octal = QtWidgets.QPushButton(self) 158 | self.button_octal.setObjectName("button_octal") 159 | self.button_octal.setGeometry(QtCore.QRect(350, 160, 101, 51)) 160 | self.button_octal.setFont(font3) 161 | self.button_octal.setText("Convert") 162 | 163 | self.label_octal = QtWidgets.QLabel(self) 164 | self.label_octal.setObjectName("label_octal") 165 | self.label_octal.setGeometry(QtCore.QRect(20, 60, 121, 31)) 166 | self.label_octal.setFont(font3) 167 | self.label_octal.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) 168 | self.label_octal.setText("Octal:") 169 | 170 | self.entry_decimal_octal = QtWidgets.QLineEdit(self) 171 | self.entry_decimal_octal.setObjectName("entry_decimal_octal") 172 | self.entry_decimal_octal.setGeometry(QtCore.QRect(150, 100, 571, 31)) 173 | self.entry_decimal_octal.setFont(font2) 174 | self.entry_decimal_octal.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter) 175 | self.entry_decimal_octal.setText("") 176 | 177 | self.tabWidget.addTab(self.tab_octal, "") 178 | self.tabWidget.setCurrentIndex(2) 179 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_octal), "Octal") 180 | 181 | # QMetaObject.connectSlotsByName(MainWindow) 182 | # setupUi 183 | 184 | if __name__ == "__main__": 185 | app = QApplication(sys.argv) 186 | window = MainWindow() 187 | window.show() 188 | sys.exit(app.exec_()) 189 | -------------------------------------------------------------------------------- /Online-Tools/EmailManager/.gitignore: -------------------------------------------------------------------------------- 1 | LoginCreds.txt 2 | env 3 | Client_Credentials.json 4 | __pycache__ -------------------------------------------------------------------------------- /Online-Tools/EmailManager/Login.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import pickle 4 | import imaplib 5 | from googleapiclient.discovery import build 6 | from google_auth_oauthlib.flow import InstalledAppFlow 7 | from google.auth.transport.requests import Request 8 | from email.mime.base import MIMEBase 9 | from email.mime.text import MIMEText 10 | from email.mime.image import MIMEImage 11 | from email.mime.audio import MIMEAudio 12 | from email.mime.multipart import MIMEMultipart 13 | from mimetypes import guess_type as guess_mime_type 14 | from base64 import urlsafe_b64encode, urlsafe_b64decode 15 | 16 | 17 | class Login(object): 18 | mail_servers = { 19 | "gmail": [["smtp.gmail.com", 587], ["imap.gmail.com", 993]], 20 | "aol": [["smtp.aol.com", 587], ["imap.aol.com", 993]], 21 | "outlook": [["smtp-mail.outlook.com", 587], ["imap-mail.outlook.com", 993]], 22 | "bt-connect": [["smtp.btconnect.com", 25], ["imap4.btconnect.com", 143]], 23 | "office365": [["smtp.office365.com", 587], ["outlook.office365.com", 993]], 24 | "yahoo": [["smtp.mail.yahoo.com", 465], ["imap.mail.yahoo.com", 993]], 25 | "yahoo-plus": [["plus.smtp.mail.yahoo.com", 465], ["plus.imap.mail.yahoo.com", 993]], 26 | "yahoo-uk": [["smtp.mail.yahoo.co.uk", 465], ["imap.mail.yahoo.co.uk", 993]], 27 | "yahoo-europe": [["smtp.mail.yahoo.com", 465], ["imap.mail.yahoo.com", 993]], 28 | "t-online": [["securesmtp.t-online.de", 587], ["secureimap.t-online.de", 993]], 29 | "verizon": [["outgoing.verizon.net", 587], ["incoming.verizon.net", 143]] 30 | # Find additional mail servers at https://www.systoolsgroup.com/imap/ 31 | } 32 | 33 | def __init__(self, email, password): 34 | self.email = email 35 | self.password = password 36 | if email != "debug" and password != "debug": 37 | try: 38 | self.smtp_server, self.smtp_port = Login.mail_servers[email.split("@")[1].split(".")[0]][0] 39 | self.imap_server, self.imap_port = Login.mail_servers[email.split("@")[1].split(".")[0]][1] 40 | except KeyError: 41 | sys.exit("Invalid email address") 42 | 43 | def __str__(self): 44 | if hasattr(self, "smtp_port"): 45 | data = "\n" 46 | for key, value in self.__dict__.items(): 47 | data += f"{key}: \t{value}\n" 48 | return data 49 | return "Invalid email address" 50 | 51 | @staticmethod 52 | def gmail_validation(): 53 | # Gmail user access and refresh tokens 54 | scope = ["https://mail.google.com/"] 55 | creds = None 56 | if os.path.exists("token.pickle"): 57 | with open("token.pickle", "rb") as token: 58 | creds = pickle.load(token) 59 | if not creds or not creds.valid: 60 | if creds and creds.expired and creds.refresh_token: 61 | creds.refresh(Request()) 62 | else: 63 | flow = InstalledAppFlow.from_client_secrets_file("Client_Credentials.json", scope) 64 | creds = flow.run_local_server(port=0) 65 | with open("token.pickle", "wb") as token: 66 | pickle.dump(creds, token) 67 | return build("gmail", "v1", credentials=creds) 68 | 69 | def login(self): 70 | if self.email == "debug" and self.password == "debug": 71 | return True 72 | try: 73 | imap = imaplib.IMAP4_SSL(self.imap_server) 74 | imap.login(self.email, self.password) 75 | return True 76 | except imaplib.IMAP4.error: 77 | return False 78 | 79 | def logout(self): 80 | pass 81 | 82 | def send_email(self): 83 | pass 84 | 85 | def read_email(self): 86 | pass 87 | 88 | def delete_email(self): 89 | pass 90 | 91 | 92 | if __name__ == "__main__": 93 | with open("LoginCreds.txt", "r") as f: 94 | email = f.readline().strip() 95 | password = f.readline().strip() 96 | api_key = f.readline().strip() 97 | user = Login(email, password) 98 | print(user) 99 | user.login() 100 | 101 | -------------------------------------------------------------------------------- /Online-Tools/EmailManager/LoginScreen.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import Login 3 | from PyQt5 import QtCore, QtGui, QtWidgets 4 | from PyQt5.QtWidgets import QApplication, QMainWindow 5 | 6 | class MainWindow(QMainWindow): 7 | def __init__(self): 8 | super(MainWindow, self).__init__() 9 | self.setGeometry(100, 100, 800, 600) 10 | self.setWindowTitle("Email Manager | Login") 11 | self.setStyleSheet("background-color: rgb(154, 154, 154);") 12 | self.initUi() 13 | 14 | def initUi(self): 15 | self.top_label = QtWidgets.QLabel(self) 16 | self.top_label.setObjectName("top_label") 17 | self.top_label.setGeometry(QtCore.QRect(0, 0, 800, 100)) 18 | title_font = QtGui.QFont() 19 | title_font.setPointSize(22) 20 | title_font.setBold(True) 21 | title_font.setWeight(75) 22 | self.top_label.setFont(title_font) 23 | self.top_label.setLayoutDirection(QtCore.Qt.LeftToRight) 24 | self.top_label.setAlignment(QtCore.Qt.AlignCenter) 25 | self.top_label.setText("Email Manager") 26 | 27 | self.email_label = QtWidgets.QLabel(self) 28 | self.email_label.setObjectName("email_label") 29 | self.email_label.setGeometry(QtCore.QRect(350, 120, 100, 30)) 30 | label_font = QtGui.QFont() 31 | label_font.setPointSize(14) 32 | label_font.setBold(True) 33 | label_font.setWeight(75) 34 | self.email_label.setFont(label_font) 35 | self.email_label.setAlignment(QtCore.Qt.AlignCenter) 36 | self.email_label.setText("Email") 37 | 38 | self.email_input = QtWidgets.QLineEdit(self) 39 | self.email_input.setObjectName("email_input") 40 | self.email_input.setGeometry(QtCore.QRect(200, 150, 400, 30)) 41 | input_font = QtGui.QFont() 42 | input_font.setPointSize(14) 43 | input_font.setBold(True) 44 | input_font.setWeight(50) 45 | self.email_input.setFont(input_font) 46 | self.email_input.setMaxLength(100) 47 | 48 | self.password_label = QtWidgets.QLabel(self) 49 | self.password_label.setObjectName("password_label") 50 | self.password_label.setGeometry(QtCore.QRect(345, 200, 110, 30)) 51 | self.password_label.setFont(label_font) 52 | self.password_label.setStyleSheet("") 53 | self.password_label.setAlignment(QtCore.Qt.AlignCenter) 54 | self.password_label.setText("Password") 55 | 56 | self.password_input = QtWidgets.QLineEdit(self) 57 | self.password_input.setObjectName("password_input") 58 | self.password_input.setGeometry(QtCore.QRect(200, 230, 400, 30)) 59 | self.password_input.setFont(input_font) 60 | self.password_input.setMaxLength(100) 61 | self.password_input.setEchoMode(QtWidgets.QLineEdit.Password) 62 | 63 | self.signin_button = QtWidgets.QPushButton(self) 64 | self.signin_button.setObjectName("signin_button") 65 | self.signin_button.setGeometry(QtCore.QRect(350, 280, 100, 50)) 66 | button_font = QtGui.QFont() 67 | button_font.setPointSize(18) 68 | button_font.setBold(True) 69 | button_font.setWeight(75) 70 | self.signin_button.setFont(button_font) 71 | self.signin_button.setText("Login") 72 | self.signin_button.clicked.connect(self.login) 73 | 74 | self.status_label = QtWidgets.QLabel(self) 75 | self.status_label.setObjectName("status_label") 76 | self.status_label.setGeometry(QtCore.QRect(245, 400, 300, 30)) 77 | self.status_label.setFont(label_font) 78 | self.status_label.setAlignment(QtCore.Qt.AlignCenter) 79 | self.status_label.setFont(label_font) 80 | 81 | def login(self): 82 | email = self.email_input.text() 83 | password = self.password_input.text() 84 | try: 85 | user = Login.Login(email, password) 86 | test = user.login() 87 | if test: 88 | self.status_label.setText("Login Successful") 89 | except Exception as e: 90 | self.status_label.setText("Invalid Email or Password") 91 | print(e) 92 | 93 | if __name__ == "__main__": 94 | app = QApplication(sys.argv) 95 | window = MainWindow() 96 | window.show() 97 | sys.exit(app.exec_()) 98 | -------------------------------------------------------------------------------- /Online-Tools/EmailManager/LoginScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | false 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 60 27 | 140 28 | 681 29 | 205 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 14 38 | 75 39 | true 40 | 41 | 42 | 43 | 44 | 45 | 46 | Username 47 | 48 | 49 | Qt::AlignCenter 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 16 58 | 75 59 | true 60 | 61 | 62 | 63 | 64 | 65 | 66 | 100 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 14 78 | 75 79 | true 80 | 81 | 82 | 83 | 84 | 85 | 86 | Password 87 | 88 | 89 | Qt::AlignCenter 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 16 98 | 75 99 | true 100 | 101 | 102 | 103 | 100 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 300 116 | 410 117 | 201 118 | 121 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 18 127 | 75 128 | true 129 | 130 | 131 | 132 | Login 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 18 141 | 75 142 | true 143 | 144 | 145 | 146 | Sign Up 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 60 156 | 350 157 | 681 158 | 61 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 14 167 | 75 168 | true 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | Qt::AlignCenter 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 0 188 | 0 189 | 801 190 | 111 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 22 199 | 75 200 | true 201 | 202 | 203 | 204 | Qt::LeftToRight 205 | 206 | 207 | 208 | 209 | 210 | Login 211 | 212 | 213 | Qt::AlignCenter 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 0 223 | 530 224 | 131 225 | 71 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 14 234 | 75 235 | true 236 | 237 | 238 | 239 | Exit 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | -------------------------------------------------------------------------------- /Online-Tools/EmailManager/SignUpScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 300 21 | 380 22 | 201 23 | 121 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 18 32 | 75 33 | true 34 | 35 | 36 | 37 | Create 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 60 47 | 140 48 | 681 49 | 233 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 14 58 | 75 59 | true 60 | 61 | 62 | 63 | 64 | 65 | 66 | Username 67 | 68 | 69 | Qt::AlignCenter 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 16 78 | 75 79 | true 80 | 81 | 82 | 83 | 84 | 85 | 86 | 100 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 14 98 | 75 99 | true 100 | 101 | 102 | 103 | 104 | 105 | 106 | Password 107 | 108 | 109 | Qt::AlignCenter 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 16 118 | 75 119 | true 120 | 121 | 122 | 123 | 100 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 14 135 | 75 136 | true 137 | 138 | 139 | 140 | 141 | 142 | 143 | Password 144 | 145 | 146 | Qt::AlignCenter 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 16 155 | 75 156 | true 157 | 158 | 159 | 160 | 100 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 0 173 | 0 174 | 801 175 | 111 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 22 184 | 75 185 | true 186 | 187 | 188 | 189 | Qt::LeftToRight 190 | 191 | 192 | 193 | 194 | 195 | Sign Up 196 | 197 | 198 | Qt::AlignCenter 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 0 208 | 540 209 | 101 210 | 61 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 14 219 | 75 220 | true 221 | 222 | 223 | 224 | Exit 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | -------------------------------------------------------------------------------- /Online-Tools/EmailManager/UI_EmailManager.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import Login 3 | from PyQt5 import QtCore, QtGui, QtWidgets 4 | from PyQt5.uic import loadUi 5 | from PyQt5.QtWidgets import QApplication, QMainWindow 6 | 7 | class LoginScreen(QMainWindow): 8 | def __init__(self): 9 | super(LoginScreen, self).__init__() 10 | loadUi('LoginScreen.ui', self) 11 | self.setWindowTitle("Email Manager | Login") 12 | self.login_button.clicked.connect(self.login) 13 | 14 | def login(self): 15 | self.email = self.email_input.text() 16 | password = self.password_input.text() 17 | try: 18 | user = Login.Login(self.email, password) 19 | success = user.login() 20 | if success: 21 | self.close() 22 | self.welcome_screen = WelcomeScreen(self.email) 23 | self.welcome_screen.show() 24 | except Exception as e: 25 | self.feedback_label.setText("Invalid Email or Password") 26 | print(e) 27 | 28 | 29 | class WelcomeScreen(QMainWindow): 30 | def __init__(self, username): 31 | self.username = username.split('@')[0] 32 | super(WelcomeScreen, self).__init__() 33 | loadUi('WelcomeScreen.ui', self) 34 | self.setWindowTitle("Email Manager | Welcome") 35 | self.welcome_label.setText(f"Welcome {self.username}") 36 | self.logout_button.clicked.connect(self.logout) 37 | 38 | def logout(self): 39 | self.close() 40 | self.login_screen = LoginScreen() 41 | self.login_screen.show() 42 | 43 | if __name__ == "__main__": 44 | app = QApplication(sys.argv) 45 | window = LoginScreen() 46 | window.show() 47 | sys.exit(app.exec_()) 48 | -------------------------------------------------------------------------------- /Online-Tools/EmailManager/WelcomeScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 0 24 | 0 25 | 801 26 | 111 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 22 35 | 75 36 | true 37 | 38 | 39 | 40 | Qt::LeftToRight 41 | 42 | 43 | 44 | 45 | 46 | Welcome 47 | 48 | 49 | Qt::AlignCenter 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 590 59 | 500 60 | 201 61 | 80 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 18 70 | 75 71 | true 72 | 73 | 74 | 75 | Logout 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /Online-Tools/EmailManager/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/Online-Tools/EmailManager/requirements.txt -------------------------------------------------------------------------------- /Online-Tools/GeoLocator.py: -------------------------------------------------------------------------------- 1 | import geocoder 2 | import reverse_geocoder as rg 3 | import tkinter as tk 4 | from tkinter import messagebox, filedialog 5 | import webbrowser 6 | 7 | class IpLocator: 8 | def __init__(self, target_ip="me"): 9 | self.target = geocoder.ip(target_ip) 10 | self.data = self.locate(self.target) 11 | 12 | def __str__(self): 13 | if self.data: 14 | return (f"IP Address: {self.data[0]}\n" 15 | f"City: {self.data[1]}\n" 16 | f"Country: {self.data[2]}\n" 17 | f"Coordinates: {self.data[3][0]}, {self.data[3][1]}") 18 | else: 19 | return "Location could not be determined." 20 | 21 | def locate(self, target): 22 | if target.latlng: # Check if latlng is not None 23 | latitude, longitude = target.latlng 24 | city = rg.search((latitude, longitude), verbose=False) 25 | return [target.ip, city[0]["name"], target.country, [latitude, longitude]] 26 | else: 27 | return None # Return None if latlng is not available 28 | 29 | class GeoLocatorApp: 30 | def __init__(self, root): 31 | self.root = root 32 | self.root.title("Geo Locator Tool") 33 | self.root.geometry("600x400") 34 | self.root.configure(bg="#2b2b2b") 35 | 36 | # Title label 37 | self.title_label = tk.Label(root, text="IP Geographical Locator", font=("Arial", 24, "bold"), fg="white", bg="#2b2b2b") 38 | self.title_label.pack(pady=20) 39 | 40 | # IP input field 41 | self.ip_frame = tk.Frame(root, bg="#2b2b2b") 42 | self.ip_frame.pack(pady=10) 43 | 44 | self.ip_label = tk.Label(self.ip_frame, text="Enter IP Address:", font=("Arial", 14), fg="white", bg="#2b2b2b") 45 | self.ip_label.pack(side=tk.LEFT, padx=10) 46 | 47 | self.ip_entry = tk.Entry(self.ip_frame, font=("Arial", 14), width=20) 48 | self.ip_entry.pack(side=tk.LEFT, padx=10) 49 | 50 | # Locate button 51 | self.locate_button = tk.Button(root, text="Locate IP", font=("Arial", 14, "bold"), bg="#212121", fg="white", relief="flat", command=self.locate_ip) 52 | self.locate_button.pack(pady=20) 53 | 54 | # Display area 55 | self.result_frame = tk.Frame(root, bg="#2b2b2b") 56 | self.result_frame.pack(pady=10) 57 | 58 | self.result_label = tk.Label(self.result_frame, text="", font=("Courier", 14), fg="white", bg="#2b2b2b", justify="left", anchor="w") 59 | self.result_label.pack(pady=10) 60 | 61 | # Buttons frame 62 | self.button_frame = tk.Frame(root, bg="#2b2b2b") 63 | self.button_frame.pack(pady=10) 64 | 65 | # Show on map button (Initially hidden) 66 | self.show_map_button = self.create_rounded_button(self.button_frame, text="Show on Map", command=self.open_map_in_browser) 67 | self.show_map_button.pack(side=tk.LEFT, padx=10) 68 | self.show_map_button.pack_forget() # Hide button initially 69 | 70 | # Copy to clipboard button (Initially hidden) 71 | self.copy_button = self.create_rounded_button(self.button_frame, text="Copy to Clipboard", command=self.copy_to_clipboard) 72 | self.copy_button.pack(side=tk.LEFT, padx=10) 73 | self.copy_button.pack_forget() # Hide button initially 74 | 75 | # Save to file button (Initially hidden) 76 | self.save_button = self.create_rounded_button(self.button_frame, text="Save to File", command=self.save_to_file) 77 | self.save_button.pack(side=tk.LEFT, padx=10) 78 | self.save_button.pack_forget() # Hide button initially 79 | 80 | def create_rounded_button(self, parent, text, command): 81 | return tk.Button(parent, text=text, font=("Arial", 14, "bold"), bg="#212121", fg="white", relief="flat", 82 | command=command, bd=0, highlightthickness=0, padx=20, pady=5, overrelief="flat", 83 | activebackground="#333333", activeforeground="white", 84 | highlightbackground="white", highlightcolor="white") 85 | 86 | def locate_ip(self): 87 | ip_address = self.ip_entry.get() 88 | if not ip_address: 89 | messagebox.showerror("Input Error", "Please enter an IP address.") 90 | return 91 | 92 | try: 93 | locator = IpLocator(ip_address) 94 | if locator.data: 95 | self.result_label.config(text=str(locator)) 96 | self.latitude, self.longitude = locator.data[3][0], locator.data[3][1] 97 | 98 | # Show all buttons after successful location 99 | self.show_map_button.pack(side=tk.LEFT, padx=10) 100 | self.copy_button.pack(side=tk.LEFT, padx=10) 101 | self.save_button.pack(side=tk.LEFT, padx=10) 102 | else: 103 | messagebox.showerror("Location Error", "Location could not be determined for this IP address.") 104 | self.hide_buttons() 105 | except Exception as e: 106 | messagebox.showerror("Location Error", f"An error occurred: {str(e)}") 107 | self.hide_buttons() 108 | 109 | def open_map_in_browser(self): 110 | if hasattr(self, 'latitude') and hasattr(self, 'longitude'): 111 | map_url = f"https://www.google.com/maps?q={self.latitude},{self.longitude}" 112 | webbrowser.open(map_url) 113 | else: 114 | messagebox.showerror("Map Error", "No valid location data to display on map.") 115 | 116 | def copy_to_clipboard(self): 117 | self.root.clipboard_clear() 118 | self.root.clipboard_append(self.result_label.cget("text")) 119 | messagebox.showinfo("Copied", "Geolocation data copied to clipboard!") 120 | 121 | def save_to_file(self): 122 | file_path = filedialog.asksaveasfilename(defaultextension=".txt", filetypes=[("Text files", "*.txt")]) 123 | if file_path: 124 | with open(file_path, "w") as file: 125 | file.write(self.result_label.cget("text")) 126 | messagebox.showinfo("Saved", "Geolocation data saved to file!") 127 | 128 | def hide_buttons(self): 129 | self.show_map_button.pack_forget() 130 | self.copy_button.pack_forget() 131 | self.save_button.pack_forget() 132 | 133 | if __name__ == "__main__": 134 | root = tk.Tk() 135 | app = GeoLocatorApp(root) 136 | root.mainloop() 137 | -------------------------------------------------------------------------------- /Online-Tools/LiveChat/Client.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import errno 4 | import socket 5 | 6 | class Client(object): 7 | def __init__(self, my_username, IP="127.0.0.1", PORT=1234): 8 | self.my_username = my_username 9 | self.HEADER_LENGTH = 10 10 | 11 | self.client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 12 | self.client_socket.connect((IP, PORT)) 13 | self.client_socket.setblocking(False) 14 | 15 | username = my_username.encode('utf-8') 16 | username_header = f"{len(username):<{self.HEADER_LENGTH}}".encode('utf-8') 17 | self.client_socket.send(username_header + username) 18 | 19 | 20 | if __name__ == "__main__": 21 | user = input("Enter username >> ") 22 | client = Client(user) 23 | while True: 24 | message = input(f"{client.my_username} >> ") 25 | if message: 26 | message = message.encode('utf-8') 27 | message_header = f"{len(message):<{client.HEADER_LENGTH}}".encode('utf-8') 28 | client.client_socket.send(message_header + message) 29 | try: 30 | while True: 31 | username_header = client.client_socket.recv(client.HEADER_LENGTH) 32 | if not len(username_header): 33 | print("\nConnection terminated by the server!") 34 | sys.exit() 35 | username_length = int(username_header.decode('utf-8').strip()) 36 | username = client.client_socket.recv(username_length).decode('utf-8') 37 | message_header = client.client_socket.recv(client.HEADER_LENGTH) 38 | message_length = int(message_header.decode('utf-8').strip()) 39 | message = client.client_socket.recv(message_length).decode('utf-8') 40 | print(f'{username} >> {message}') 41 | except IOError as e: 42 | if e.errno != errno.EAGAIN and e.errno != errno.EWOULDBLOCK: 43 | print(f'Reading error: {str(e)}') 44 | sys.exit() 45 | continue 46 | except Exception as e: 47 | print(f'Reading error: {str(e)}') 48 | sys.exit() 49 | 50 | 51 | -------------------------------------------------------------------------------- /Online-Tools/LiveChat/Server.py: -------------------------------------------------------------------------------- 1 | import os 2 | import select 3 | import socket 4 | 5 | class Server(object): 6 | def __init__(self, IP="127.0.0.1", PORT=1234): 7 | self.server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 8 | self.server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 9 | self.server_socket.bind((IP, PORT)) 10 | self.server_socket.listen() 11 | self.HEADER_LENGTH = 10 12 | self.sockets_list = [self.server_socket] 13 | self.clients = {} 14 | os.system("cls") 15 | print(f"[ SERVER UP AND RUNNING ]\n[IP: {IP}]\n[Port: {PORT}]\n") 16 | 17 | def receive_message(self, client_socket): 18 | try: 19 | message_header = client_socket.recv(self.HEADER_LENGTH) 20 | if not len(message_header): 21 | return False 22 | message_length = int(message_header.decode("utf-8").strip()) 23 | return {"header": message_header, "data": client_socket.recv(message_length)} 24 | except: 25 | return False 26 | 27 | if __name__ == "__main__": 28 | server = Server() 29 | while True: 30 | read_sockets, _, exception_sockets = select.select(server.sockets_list, [], server.sockets_list) 31 | for notified_socket in read_sockets: 32 | if notified_socket == server.server_socket: 33 | client_socket, client_address = server.server_socket.accept() 34 | user = server.receive_message(client_socket) 35 | if user is False: 36 | continue 37 | server.sockets_list.append(client_socket) 38 | server.clients[client_socket] = user 39 | ip, port = client_address 40 | print(f"\n[ USER CONNECTED: {user['data'].decode('utf-8')} ]\n" 41 | f"[IP: {ip}]\n[Port: {port}]\n") 42 | else: 43 | message = server.receive_message(notified_socket) 44 | if message is False: 45 | print(f"[ CONNECTION TERMINATED: {user['data'].decode('utf-8')} ]") 46 | server.sockets_list.remove(notified_socket) 47 | del server.clients[notified_socket] 48 | continue 49 | user = server.clients[notified_socket] 50 | print(f"{user['data'].decode('utf-8')} >> {message['data'].decode('utf-8')}") 51 | for server.client_socket in server.clients: 52 | if server.client_socket != notified_socket: 53 | server.client_socket.send(user["header"] + user["data"] + message["header"] + message["data"]) 54 | for notified_socket in exception_sockets: 55 | Server.sockets_list.remove(notified_socket) 56 | del server.clients[notified_socket] 57 | -------------------------------------------------------------------------------- /Online-Tools/Tag_Generator/README.md: -------------------------------------------------------------------------------- 1 | # Tag-Generator 2 | Generate tags for Instagram, Facebook, etc... 3 | -------------------------------------------------------------------------------- /Online-Tools/Tag_Generator/TagGenerator.py: -------------------------------------------------------------------------------- 1 | """ TODO: 2 | Add tags through line input, not as file input. 3 | """ 4 | 5 | import sys, os, random, win32clipboard 6 | from PyQt5 import QtCore, QtGui, QtWidgets 7 | from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog 8 | from pathlib import Path 9 | 10 | 11 | class MainWindow(QMainWindow): 12 | def __init__(self): 13 | super(MainWindow, self).__init__() 14 | self.setGeometry(300, 300, 580, 400) 15 | self.setWindowTitle("Tag Generator") 16 | 17 | os.chdir(os.path.dirname(os.path.realpath(__file__))) 18 | self.setWindowIcon(QtGui.QIcon("icon.ico")) 19 | 20 | self.font_element = QtGui.QFont() 21 | self.font_element.setPointSize(16) 22 | self.font_element.setBold(True) 23 | self.font_element.setWeight(75) 24 | 25 | self.font_tags = QtGui.QFont() 26 | self.font_tags.setPointSize(12) 27 | self.font_tags.setBold(True) 28 | self.font_tags.setWeight(75) 29 | 30 | self.initUI() 31 | 32 | self.tag_list = self.read_tags() 33 | self.lcd_tagCount.display(int(len(self.tag_list))) 34 | 35 | 36 | def initUI(self): 37 | self.button_add = QtWidgets.QPushButton(self) 38 | self.button_add.setObjectName("button_add") 39 | self.button_add.setGeometry(QtCore.QRect(10, 10, 111, 81)) 40 | self.button_add.setFont(self.font_element) 41 | self.button_add.setText("Add Tags") 42 | self.button_add.clicked.connect(self.add_tags) 43 | 44 | self.button_generate = QtWidgets.QPushButton(self) 45 | self.button_generate.setObjectName("button_generate") 46 | self.button_generate.setGeometry(QtCore.QRect(10, 100, 111, 81)) 47 | self.button_generate.setFont(self.font_element) 48 | self.button_generate.setText("Generate") 49 | self.button_generate.clicked.connect(self.generate) 50 | 51 | self.button_copy = QtWidgets.QPushButton(self) 52 | self.button_copy.setObjectName("button_copy") 53 | self.button_copy.setGeometry(QtCore.QRect(440, 100, 131, 81)) 54 | self.button_copy.setFont(self.font_element) 55 | self.button_copy.setText("Copy Tags") 56 | self.button_copy.clicked.connect(self.copy_tags) 57 | 58 | self.label_tagCount = QtWidgets.QLabel(self) 59 | self.label_tagCount.setObjectName("label_tagCount") 60 | self.label_tagCount.setGeometry(QtCore.QRect(430, 0, 141, 31)) 61 | self.label_tagCount.setFont(self.font_element) 62 | self.label_tagCount.setAlignment(QtCore.Qt.AlignCenter) 63 | self.label_tagCount.setText("Tag Counter:") 64 | 65 | self.lcd_tagCount = QtWidgets.QLCDNumber(self) 66 | self.lcd_tagCount.setObjectName("lcd_tagCount") 67 | self.lcd_tagCount.setGeometry(QtCore.QRect(440, 30, 131, 41)) 68 | self.lcd_tagCount.setSmallDecimalPoint(False) 69 | self.lcd_tagCount.setDigitCount(7) 70 | self.lcd_tagCount.setProperty("value", 0.0) 71 | self.lcd_tagCount.setObjectName("lcdNumber") 72 | self.lcd_tagCount.setStyleSheet("QLCDNumber { color: black }") 73 | self.lcd_tagCount.display(0) 74 | 75 | self.spin_tagAmount = QtWidgets.QSpinBox(self) 76 | self.spin_tagAmount.setObjectName("spin_tagAmount") 77 | self.spin_tagAmount.setGeometry(QtCore.QRect(360, 120, 71, 41)) 78 | self.spin_tagAmount.setFont(self.font_element) 79 | self.spin_tagAmount.setAlignment(QtCore.Qt.AlignCenter) 80 | self.spin_tagAmount.setMinimum(1) 81 | self.spin_tagAmount.setMaximum(999) 82 | self.spin_tagAmount.setValue(30) 83 | 84 | self.label_include = QtWidgets.QLabel(self) 85 | self.label_include.setObjectName("label_include") 86 | self.label_include.setGeometry(QtCore.QRect(150, 0, 141, 31)) 87 | self.label_include.setFont(self.font_element) 88 | self.label_include.setAlignment(QtCore.Qt.AlignCenter) 89 | self.label_include.setText("Include:") 90 | 91 | self.check_pythonprogramming = QtWidgets.QCheckBox(self) 92 | self.check_pythonprogramming.setObjectName("check_pythonprogramming") 93 | self.check_pythonprogramming.setGeometry(QtCore.QRect(140, 90, 191, 21)) 94 | self.check_pythonprogramming.setFont(self.font_tags) 95 | self.check_pythonprogramming.setText("pythonprogramming") 96 | 97 | self.check_programming = QtWidgets.QCheckBox(self) 98 | self.check_programming.setObjectName("check_programming") 99 | self.check_programming.setGeometry(QtCore.QRect(140, 70, 191, 21)) 100 | self.check_programming.setFont(self.font_tags) 101 | self.check_programming.setText("programming") 102 | 103 | self.check_gaming = QtWidgets.QCheckBox(self) 104 | self.check_gaming.setObjectName("check_gaming") 105 | self.check_gaming.setGeometry(QtCore.QRect(140, 50, 191, 21)) 106 | self.check_gaming.setFont(self.font_tags) 107 | self.check_gaming.setText("gaming") 108 | 109 | self.check_machinelearning = QtWidgets.QCheckBox(self) 110 | self.check_machinelearning.setObjectName("check_machinelearning") 111 | self.check_machinelearning.setGeometry(QtCore.QRect(140, 110, 191, 21)) 112 | self.check_machinelearning.setFont(self.font_tags) 113 | self.check_machinelearning.setText("machinelearning") 114 | 115 | self.check_python = QtWidgets.QCheckBox(self) 116 | self.check_python.setObjectName("check_python") 117 | self.check_python.setGeometry(QtCore.QRect(140, 30, 191, 21)) 118 | self.check_python.setFont(self.font_tags) 119 | self.check_python.setText("python") 120 | 121 | self.check_python_genius = QtWidgets.QCheckBox(self) 122 | self.check_python_genius.setObjectName("check_python_genius") 123 | self.check_python_genius.setGeometry(QtCore.QRect(140, 150, 191, 21)) 124 | self.check_python_genius.setFont(self.font_tags) 125 | self.check_python_genius.setText("python_genius") 126 | 127 | self.check_hacking = QtWidgets.QCheckBox(self) 128 | self.check_hacking.setObjectName("check_hacking") 129 | self.check_hacking.setGeometry(QtCore.QRect(140, 130, 191, 21)) 130 | self.check_hacking.setFont(self.font_tags) 131 | self.check_hacking.setText("hacking") 132 | 133 | self.text_tags = QtWidgets.QTextEdit(self) 134 | self.text_tags.setObjectName("text_tags") 135 | self.text_tags.setGeometry(QtCore.QRect(10, 190, 561, 191)) 136 | 137 | 138 | def set_tags(self): 139 | add_tags = [] 140 | tags = [ 141 | self.check_pythonprogramming, self.check_python_genius, self.check_programming, 142 | self.check_gaming, self.check_machinelearning, self.check_python, self.check_hacking] 143 | for tag in tags: 144 | if tag.isChecked(): 145 | name = "#" + str(tag.text()) 146 | add_tags.append(name) 147 | return add_tags 148 | 149 | 150 | def read_tags(self): 151 | tags = [] 152 | try: 153 | with open("tag_list.txt", "r") as file: 154 | for word in file.read().split(" "): 155 | for added in tags: 156 | if word == added: 157 | continue 158 | tags.append(word) 159 | except Exception as E: 160 | return E 161 | return tags 162 | 163 | 164 | def generate(self): 165 | tags = [] 166 | result = "" 167 | amount = self.spin_tagAmount.value() 168 | checked_tags = self.set_tags() 169 | for tag in checked_tags: 170 | tags.append(tag) 171 | while len(tags) <= amount: 172 | word = random.choice(self.tag_list) 173 | if word not in tags: 174 | tags.append(word) 175 | for word in tags: 176 | result += word + " " 177 | self.text_tags.setText(result) 178 | 179 | 180 | def copy_tags(self): 181 | tags = self.text_tags.toPlainText() 182 | win32clipboard.OpenClipboard() 183 | win32clipboard.EmptyClipboard() 184 | win32clipboard.SetClipboardText(tags) 185 | win32clipboard.CloseClipboard() 186 | self.text_tags.setText("Tags copied to clipboard!") 187 | 188 | 189 | def add_tags(self): 190 | tags = [] 191 | start_dir = str(Path.home()) 192 | fname, *_ = QFileDialog.getOpenFileName(self, 'Choose Text File', start_dir) 193 | try: 194 | with open(fname, "r") as file: 195 | for word in file.read().split(" "): 196 | for added in tags: 197 | if word == added: 198 | continue 199 | tags.append(word.strip("\n")) 200 | except Exception as E: 201 | return E 202 | try: 203 | with open("tag_list.txt", "a+") as file: 204 | for word in file.read().split(" "): 205 | for added in tags: 206 | if word == added: 207 | continue 208 | file.write(word + " ") 209 | except Exception as E: 210 | return E 211 | 212 | 213 | if __name__ == "__main__": 214 | app = QApplication(sys.argv) 215 | window = MainWindow() 216 | window.show() 217 | sys.exit(app.exec_()) 218 | -------------------------------------------------------------------------------- /Online-Tools/Tag_Generator/graphics.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 580 10 | 437 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 10 21 | 10 22 | 111 23 | 81 24 | 25 | 26 | 27 | 28 | 16 29 | 75 30 | true 31 | 32 | 33 | 34 | Add Tags 35 | 36 | 37 | 38 | 39 | 40 | 10 41 | 100 42 | 111 43 | 81 44 | 45 | 46 | 47 | 48 | 16 49 | 75 50 | true 51 | 52 | 53 | 54 | Show 55 | 56 | 57 | 58 | 59 | 60 | 440 61 | 100 62 | 131 63 | 81 64 | 65 | 66 | 67 | 68 | 16 69 | 75 70 | true 71 | 72 | 73 | 74 | Generate 75 | 76 | 77 | 78 | 79 | 80 | 430 81 | 0 82 | 141 83 | 31 84 | 85 | 86 | 87 | 88 | 16 89 | 75 90 | true 91 | 92 | 93 | 94 | Tag Counter: 95 | 96 | 97 | Qt::AlignCenter 98 | 99 | 100 | 101 | 102 | 103 | 440 104 | 30 105 | 131 106 | 41 107 | 108 | 109 | 110 | 111 | 112 | 113 | 360 114 | 120 115 | 71 116 | 41 117 | 118 | 119 | 120 | 121 | 16 122 | 75 123 | true 124 | 125 | 126 | 127 | Qt::AlignCenter 128 | 129 | 130 | 1 131 | 132 | 133 | 999 134 | 135 | 136 | 30 137 | 138 | 139 | 140 | 141 | 142 | 150 143 | 0 144 | 141 145 | 31 146 | 147 | 148 | 149 | 150 | 16 151 | 75 152 | true 153 | 154 | 155 | 156 | Include: 157 | 158 | 159 | Qt::AlignCenter 160 | 161 | 162 | 163 | 164 | 165 | 140 166 | 90 167 | 191 168 | 21 169 | 170 | 171 | 172 | 173 | 12 174 | 75 175 | true 176 | 177 | 178 | 179 | pythonprogramming 180 | 181 | 182 | 183 | 184 | 185 | 140 186 | 70 187 | 191 188 | 21 189 | 190 | 191 | 192 | 193 | 12 194 | 75 195 | true 196 | 197 | 198 | 199 | programming 200 | 201 | 202 | 203 | 204 | 205 | 140 206 | 50 207 | 191 208 | 21 209 | 210 | 211 | 212 | 213 | 12 214 | 75 215 | true 216 | 217 | 218 | 219 | gaming 220 | 221 | 222 | 223 | 224 | 225 | 140 226 | 110 227 | 191 228 | 21 229 | 230 | 231 | 232 | 233 | 12 234 | 75 235 | true 236 | 237 | 238 | 239 | machinelearning 240 | 241 | 242 | 243 | 244 | 245 | 140 246 | 30 247 | 191 248 | 21 249 | 250 | 251 | 252 | 253 | 12 254 | 75 255 | true 256 | 257 | 258 | 259 | python 260 | 261 | 262 | 263 | 264 | 265 | 140 266 | 150 267 | 191 268 | 21 269 | 270 | 271 | 272 | 273 | 12 274 | 75 275 | true 276 | 277 | 278 | 279 | python_genius 280 | 281 | 282 | 283 | 284 | 285 | 140 286 | 130 287 | 191 288 | 21 289 | 290 | 291 | 292 | 293 | 12 294 | 75 295 | true 296 | 297 | 298 | 299 | hacking 300 | 301 | 302 | 303 | 304 | 305 | 10 306 | 190 307 | 561 308 | 191 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 0 317 | 0 318 | 580 319 | 21 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | -------------------------------------------------------------------------------- /Online-Tools/Tag_Generator/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/Online-Tools/Tag_Generator/icon.ico -------------------------------------------------------------------------------- /Online-Tools/Tag_Generator/requirements.txt: -------------------------------------------------------------------------------- 1 | PyQt5==5.15.4 2 | PyQt5-Qt5==5.15.2 3 | PyQt5-sip==12.9.0 4 | pywin32==301 5 | -------------------------------------------------------------------------------- /Online-Tools/Tag_Generator/tag_list.txt: -------------------------------------------------------------------------------- 1 | #ai #android #anime #apexlegends #apple #architecture #art #artificialintelligence #automation #battleroyale #bhfyp #bigdata #branding #building #business #c #callofduty #civil #civilengineer #civilengineering #cnc #coaching #cod #code #coder #coderlife #coding #codingisfun #codinglife #codingmemes #college #community #computer #computerengineering #computerprogramming #computers #computerscience #concrete #construction #cosplay #covid #csgo #css #cybersecurity #data #dataanalytics #datascience #datascientist #deeplearning #design #destiny #dev #developer #developerlife #developers #development #digital #education #electrical #electricalengineering #electronics #engenhariacivil #engineer #engineering #engineeringlife #engineeringmemes #engineeringstudent #engineers #entrepreneur #esports #ethicalhacking #fabrication #follow #fortnite #fortniteclips #funny #future #gadget #gadgets #game #gameplay #gamer #gamergirl #gamerlife #gamers #games #gaming #gamingcommunity #gaminglife #gamingmemes #gamingsetup #geek #goals #google #growth #gta #hacker #hackers #hacking #html #india #industrial #industry #informationtechnology #innovation #inspiration #instagamer #instagaming #instagood #instagram #instatech #internet #investment #iot #iphone #it #java #javascript #kalilinux #leadership #learning #learntocode #life #like #linux #lol #love #m #machine #machinelearning #machining #manufacturing #marketing #mechanic #mechanical #mechanicalengineering #meme #memes #minecraft #mobile #modernwarfare #motivation #news #nintendo #nintendoswitch #oneplus #online #pc #pcgamer #pcgaming #photography #photooftheday #php #physics #playstation #pro #programmer #programmerhumor #programmerlife #programmers #programming #programminglife #programmingmemes #project #property #ps #pubg #pubgmobile #python #pythoncode #pythonprogramming #realestate #retrogaming #robotics #royalpython #samsung #science #security #skills #smartphone #snake #software #softwaredeveloper #softwaredevelopment #softwareengineer #softwareengineering #startup #steel #stem #streamer #student #tech #techie #technews #techno #technology #technologynews #tecnologia #training #twitch #twitchstreamer #videogame #videogames #web #webdesign #webdeveloper #webdevelopment #website #welding #work #xbox #xboxone #youtube #youtuber -------------------------------------------------------------------------------- /Online-Tools/WifiMonitor.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import pandas 4 | import subprocess 5 | import threading 6 | import logging 7 | from scapy.all import * 8 | 9 | # Initialize logging 10 | logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') 11 | 12 | class WifiMonitor: 13 | def __init__(self, interface): 14 | # Initialize the monitor with a specified network interface 15 | self.interface = interface 16 | self.networks = pandas.DataFrame(columns=["BSSID", "SSID", "dBm", "Channel", "Crypto"]) 17 | self.networks.set_index("BSSID", inplace=True) 18 | self.running = True 19 | 20 | def callback(self, packet): 21 | # Processes packets captured by sniff, filtering for Dot11Beacon packets 22 | try: 23 | if packet.haslayer(Dot11Beacon): 24 | bssid = packet[Dot11].addr2 25 | ssid = packet[Dot11Elt].info.decode(errors='ignore') 26 | dbm_signal = packet.getlayer(RadioTap).dBm_AntSignal if packet.haslayer(RadioTap) else "N/A" 27 | stats = packet[Dot11Beacon].network_stats() 28 | self.networks.loc[bssid] = [ssid, dbm_signal, stats.get("channel"), stats.get("crypto")] 29 | except Exception as e: 30 | logging.error(f"Error processing packet: {e}") 31 | 32 | def change_channel(self): 33 | # Continuously change channel of the wireless interface to scan all available channels 34 | try: 35 | ch = 1 36 | while self.running: 37 | subprocess.run(["iw", "dev", self.interface, "set", "channel", str(ch)], check=False) 38 | ch = (ch % 14) + 1 39 | time.sleep(0.5) 40 | except Exception as e: 41 | logging.error(f"Error changing channel: {e}") 42 | 43 | def print_all(self): 44 | # Periodically clears the screen and prints all detected networks 45 | try: 46 | while self.running: 47 | os.system("clear") 48 | print("Press Ctrl+C to exit.\n") 49 | print(self.networks) 50 | time.sleep(0.5) 51 | except Exception as e: 52 | logging.error(f"Error while printing networks: {e}") 53 | 54 | def stop_monitor_mode(interface): 55 | # Safely stops monitor mode and resets the interface to managed mode 56 | try: 57 | check_mode = subprocess.run(["iw", "dev", interface, "info"], capture_output=True, text=True) 58 | if "type monitor" in check_mode.stdout: 59 | stop_result = subprocess.run(["sudo", "airmon-ng", "stop", interface], capture_output=True, text=True) 60 | logging.info(f"Monitor mode stopped: {stop_result.stdout}") 61 | subprocess.run(["sudo", "ip", "link", "set", interface, "up"], check=True) 62 | subprocess.run(["sudo", "iw", interface, "set", "type", "managed"], check=True) 63 | logging.info(f"{interface} has been set to managed mode and brought up.") 64 | except subprocess.CalledProcessError as e: 65 | logging.error(f"Failed to revert {interface} to managed mode: {e}") 66 | except Exception as e: 67 | logging.error(f"Unhandled error in stopping monitor mode: {e}") 68 | 69 | def detect_interfaces(): 70 | # Detect wireless interfaces available on the system 71 | interfaces = [] 72 | try: 73 | result = subprocess.run(["iw", "dev"], capture_output=True, text=True) 74 | for line in result.stdout.splitlines(): 75 | if "Interface" in line: 76 | interfaces.append(line.split()[1]) 77 | except subprocess.CalledProcessError as e: 78 | logging.error(f"Subprocess error during interface detection: {e}") 79 | except Exception as e: 80 | logging.error(f"General error detected during interface detection: {e}") 81 | return interfaces 82 | 83 | def activate_monitor_mode(interface): 84 | # Activates monitor mode on the specified interface 85 | try: 86 | check_mode = subprocess.run(["iw", "dev", interface, "info"], capture_output=True, text=True) 87 | if "type monitor" in check_mode.stdout: 88 | logging.info(f"{interface} is already in monitor mode.") 89 | return interface 90 | 91 | activate_result = subprocess.run(["sudo", "airmon-ng", "start", interface], capture_output=True, text=True) 92 | print("Activating monitor mode:\n", activate_result.stdout) 93 | for line in activate_result.stdout.splitlines(): 94 | if "monitor mode enabled on" in line: 95 | new_interface = line.split()[-1] 96 | if '(' in new_interface: 97 | new_interface = new_interface.split('(')[0].strip() 98 | return new_interface 99 | except subprocess.CalledProcessError as e: 100 | logging.error(f"Failed to activate monitor mode on {interface}: {e}") 101 | except Exception as e: 102 | logging.error(f"Unhandled error during monitor mode activation: {e}") 103 | return None 104 | 105 | if __name__ == "__main__": 106 | # Main execution block 107 | interfaces = detect_interfaces() 108 | if not interfaces: 109 | logging.info("No wireless interfaces detected.") 110 | exit(1) 111 | 112 | print("Detected interfaces:") 113 | for idx, intf in enumerate(interfaces): 114 | print(f"{idx+1}. {intf}") 115 | print(f"{len(interfaces)+1}. Exit") 116 | choice = int(input("Select an interface to use or Exit: ")) 117 | if choice == len(interfaces) + 1: 118 | print("Exiting...") 119 | exit(0) 120 | 121 | selected_interface = interfaces[choice - 1] 122 | mon_interface = activate_monitor_mode(selected_interface) 123 | if not mon_interface: 124 | logging.info("Failed to enable monitor mode.") 125 | exit(1) 126 | 127 | ap = WifiMonitor(mon_interface) 128 | printer = threading.Thread(target=ap.print_all) 129 | channel_changer = threading.Thread(target=ap.change_channel) 130 | printer.daemon = True 131 | channel_changer.daemon = True 132 | 133 | try: 134 | printer.start() 135 | channel_changer.start() 136 | sniff(prn=ap.callback, iface=mon_interface, stop_filter=lambda x: not ap.running) 137 | except KeyboardInterrupt: 138 | print("\nDetected KeyboardInterrupt, stopping...") 139 | ap.stop_monitor_mode(selected_interface) 140 | os.system("clear") 141 | print("Exiting...") 142 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mixed Applications 2 | Applications & Tools developed in Python 3 | 4 | # Description 5 | ## Games 6 | - **Kill The Sith:** 7 | - Space hhooter. 8 | - **Dice Game:** 9 | - TKinter dice roller. 10 | - **Tetris:** 11 | - PyGame Tetris game. 12 | ## Mathematical Tools 13 | - **Number Converter:** 14 | - Convert between hexadecimal, binary & decimal number systems. 15 | - **Binary Trainer:** 16 | - Train your ability to calculate binary numbers in the head. 17 | - **Collatz Conjecture:** 18 | - A mathematical equation that always end up with 1. 19 | ## Online Tools 20 | - **Email Manager:** 21 | - Send & Manage emails. 22 | - **Live Chat:** 23 | - A Client - Server application for basic communication. 24 | - **Tag Generator:** 25 | - Generate $n$ amount of tags for different platforms. 26 | - **Wifi Monitor:** 27 | - Works like airmon-ng, monitoring networks in the area and display sigal strength, encryption, etc... 28 | - **IP Geographical Locator:** 29 | - Fetches geo locations of a given IP address with options to show on map and save data. 30 | ## System-Tools 31 | - **Computer Details:** 32 | - Display hardware & network data. 33 | - **File Integrity:** 34 | - Calculate checksum of file & compare to valid checksum. 35 | - **Melody Player:** 36 | - Play simple sounds on a small virtuel keyboard. 37 | - **System Maintainer:** 38 | - Cross-platform system cleaner with update, autoremoval & more. 39 | - **System Info:** 40 | - PyQt5 extension of *Computer Details*. 41 | - **System Stopper:** 42 | - Cross-platform system stopper with timer. 43 | - **Alarm:** 44 | - Simple alarm to *beeb* at a specific moment 45 | - **Hash Validator:** 46 | - Terminal version of *File Integrity*. 47 | - **Project Installer:** 48 | - Install whole python projects by copying path or dropping python project into input field. 49 | - **Terminal Animation:** 50 | - Displays a simple animation in the Terminal. 51 | - **Text Editor:** 52 | - Simple text-editor that can save, redo & undo, etc. 53 | - **Animated Circular Clock:** 54 | - A simple TKinter app to show a live animted rounded clock. 55 | - **Weather Dashboard:** 56 | - Simple TKinter app to get the current weather (temperature and climate) of a given city. 57 | 58 | # Authors 59 | [Byte Sensei](https://github.com/bytesenseidk) 60 | 61 | # Version History 62 | - 0.1: 63 | * Initial build 64 | - 0.1.1: 65 | * Professionalize Project 66 | 67 | # Licence 68 | This project is licenced under the Mozilla Public License 2.0 - see the [LICENCE](https://github.com/bytesenseidk/Mixed-Applications/blob/main/LICENCE) for details 69 | -------------------------------------------------------------------------------- /System-Tools/CircularClock.py: -------------------------------------------------------------------------------- 1 | import turtle, time # Import the turtle graphics and time modules 2 | from datetime import datetime # Import the datetime module to get the current time 3 | 4 | # Set up the turtle screen (background color, size, and disabling automatic updates) 5 | screen = turtle.Screen(); screen.bgcolor("black"); screen.setup(600, 600); screen.tracer(0) 6 | 7 | # Set up the turtle (hide it, set speed, and color for drawing) 8 | pen = turtle.Turtle(); pen.hideturtle(); pen.speed(0); pen.color("white") 9 | 10 | # Function to draw the clock face, hour markers, digits, and hands 11 | def draw_clock(h, m, s): 12 | pen.clear() # Clear the previous drawing 13 | pen.penup(); pen.goto(0, 210); pen.setheading(180); pen.pendown(); pen.circle(210) 14 | # Draw the clock's outer circle 15 | 16 | # Draw the 12 hour markers and digits 17 | for i in range(12): 18 | angle = i * 30 19 | pen.penup(); pen.goto(0, 0); pen.setheading(90); pen.rt(angle); pen.fd(190); pen.pendown(); pen.fd(20) 20 | # For each hour marker, move to the starting position, rotate to the correct angle, and draw the marker 21 | 22 | pen.penup(); pen.goto(0, 0); pen.setheading(90); pen.rt(angle); pen.fd(160) 23 | pen.write(str(i + 1), align="center", font=("Arial", 18, "normal")) 24 | # Move the pen slightly inward and write the corresponding digit 25 | 26 | # Draw the hour, minute, and second hands 27 | for angle, length, color in [(h * 30 + m * 0.5, 100, "white"), (m * 6, 150, "blue"), (s * 6, 180, "red")]: 28 | pen.penup(); pen.goto(0, 0); pen.setheading(90); pen.rt(angle); pen.color(color); pen.pendown(); pen.fd(length) 29 | # Calculate the angle and length for each hand, set the color, and draw the hand from the center 30 | 31 | # Main loop to update the clock every second 32 | while True: 33 | # Get the current hour, minute, and second 34 | h, m, s = datetime.now().hour % 12, datetime.now().minute, datetime.now().second 35 | draw_clock(h, m, s); screen.update(); time.sleep(1) # Draw the clock and update the screen every second 36 | 37 | turtle.done() # Keep the window open 38 | 39 | 40 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-App/Main.py: -------------------------------------------------------------------------------- 1 | """ A full program with UI to show computer details """ 2 | 3 | from Specs.RAM import RandomAccessMemory 4 | from Specs.SYSTEM import SystemInformation 5 | from Specs.CPU import CentralProcessingUnit 6 | 7 | print(RandomAccessMemory()) 8 | print(SystemInformation()) 9 | print(CentralProcessingUnit()) 10 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-App/README.md: -------------------------------------------------------------------------------- 1 | # Computer-Details 2 | Get hardware and software details for your computer 3 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-App/Specs/CPU.py: -------------------------------------------------------------------------------- 1 | import psutil 2 | 3 | 4 | class CentralProcessingUnit(object): 5 | def __init__(self): 6 | self.frequency = psutil.cpu_freq() 7 | self.data = { 8 | "Physical Cores": psutil.cpu_count(logical=False), 9 | "Total Cores": psutil.cpu_count(logical=True), 10 | "Max Frequency": self.frequency.max, 11 | "Min Frequency": self.frequency.min, 12 | "Current Frequency": self.frequency.current 13 | } 14 | 15 | 16 | def __str__(self): 17 | return str(f"Physical Cores: {self.data['Physical Cores']}\n" 18 | f"Total Cores: {self.data['Total Cores']}\n" 19 | f"Max Frequency: {self.data['Max Frequency']}\n" 20 | f"Min Frequency: {self.data['Min Frequency']}\n" 21 | f"Current Frequency: {self.data['Current Frequency']}\n" 22 | f"CPU Usage: {[print(f'Core {i+1}: {percentage}%') for i, percentage in enumerate(psutil.cpu_percent(percpu=True, interval=1))][0]}") 23 | 24 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-App/Specs/GPU.py: -------------------------------------------------------------------------------- 1 | import GPUtil 2 | 3 | 4 | class CpuInfo(object): 5 | def __init__(self): 6 | self.gpu = GPUtil.getGPUs() 7 | self.gpu_list = [] 8 | 9 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-App/Specs/RAM.py: -------------------------------------------------------------------------------- 1 | import psutil 2 | from SizeConverter import GetSize 3 | 4 | 5 | class RandomAccessMemory(object): 6 | def __init__(self): 7 | memory = psutil.virtual_memory() 8 | self.data = { 9 | "Total": memory.total, 10 | "Available": memory.available, 11 | "Used": memory.used, 12 | "Percentage": memory.percent 13 | } 14 | 15 | 16 | def __str__(self): 17 | return str(f"Total RAM: {GetSize(self.data['Total'])}\n" 18 | f"Available RAM: {GetSize(self.data['Available'])}\n" 19 | f"Used RAM: {GetSize(self.data['Used'])}\n" 20 | f"Percantage: {str(GetSize(self.data['Percentage'])).strip('B')}%") 21 | 22 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-App/Specs/SYSTEM.py: -------------------------------------------------------------------------------- 1 | import platform 2 | 3 | 4 | class SystemInformation(object): 5 | def __init__(self): 6 | self.system = platform.uname() 7 | self.data = { 8 | "System": self.system.system, 9 | "Node": self.system.node, 10 | "Release": self.system.release, 11 | "Version": self.system.version, 12 | "Machine": self.system.machine, 13 | "Processor": self.system.processor 14 | } 15 | 16 | 17 | def __str__(self): 18 | return str(f"System: {self.data['System']}\n" 19 | f"Node Name: {self.data['Node']}\n" 20 | f"Release: {self.data['Release']}\n" 21 | f"Version: {self.data['Version']}\n" 22 | f"Machine: {self.data['Machine']}\n" 23 | f"Processor: {self.data['Processor']}") 24 | 25 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-App/Specs/SizeConverter.py: -------------------------------------------------------------------------------- 1 | class GetSize(object): 2 | def __init__(self, bytes_=0): 3 | self.bytes_ = bytes_ 4 | self.factor = 1024 # 1 Kilobyte 5 | self.units = ["", "K", "M", "G", "T", "P"] 6 | 7 | 8 | def size_categorize(self): 9 | for unit in self.units: 10 | if self.bytes_ < self.factor: 11 | return f"{self.bytes_:.2f} {unit}B" 12 | self.bytes_ /= self.factor 13 | 14 | 15 | def __str__(self): 16 | return str(self.size_categorize()) 17 | 18 | -------------------------------------------------------------------------------- /System-Tools/Computer-Details-Singular/CPU_data.py: -------------------------------------------------------------------------------- 1 | import psutil 2 | import cpuinfo 3 | from tabulate import tabulate 4 | 5 | def cpu_info(): 6 | frequency = psutil.cpu_freq() 7 | processor = cpuinfo.get_cpu_info()['brand_raw'] 8 | data = { 9 | "Physical Cores": [psutil.cpu_count(logical=False)], 10 | "Total Cores": [psutil.cpu_count(logical=True)], 11 | "Max Frequency": [frequency.max], 12 | "Min Frequency": [frequency.min], 13 | "Current Frequency": [frequency.current] 14 | } 15 | core_usage = lambda: '\n'.join([f'Core {i+1}: {percentage}%' for i, 16 | percentage in enumerate(psutil.cpu_percent(percpu=True, interval=1))]).split('\n') 17 | 18 | cores_0_headers = [header[0] for header in [core.split(':') for core in core_usage()][:8]] 19 | cores_0_data = [value[1] for value in [core.split(':') for core in core_usage()][:8]] 20 | cores_1_headers = [header[0] for header in [core.split(':') for core in core_usage()][-8:]] 21 | cores_1_data = [value[1] for value in [core.split(':') for core in core_usage()][-8:]] 22 | 23 | return [processor, data, [cores_0_headers, cores_0_data], [cores_1_headers, cores_1_data]] 24 | 25 | if __name__ == "__main__": 26 | processor, data, cores_0, cores_1 = cpu_info() 27 | print(f'\t\t [ {processor} ]\n') 28 | print(tabulate(data, headers="keys")) 29 | print(f'{"\t"*4} [ USAGE ]') 30 | print(tabulate(cores_0, tablefmt='row')) 31 | print(tabulate(cores_1, tablefmt='row')) 32 | 33 | -------------------------------------------------------------------------------- /System-Tools/File_Integrity/FileIntegrety.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 805 10 | 423 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 20 21 | 0 22 | 771 23 | 61 24 | 25 | 26 | 27 | 28 | Inconsolata Ultra Expanded SemiBold 29 | 26 30 | 75 31 | true 32 | 33 | 34 | 35 | File Integrity Checker 36 | 37 | 38 | Qt::AlignCenter 39 | 40 | 41 | 42 | 43 | 44 | 180 45 | 70 46 | 451 47 | 32 48 | 49 | 50 | 51 | 52 | 53 | 54 | 300 55 | 110 56 | 211 57 | 34 58 | 59 | 60 | 61 | 62 | Inconsolata Ultra Expanded SemiBold 63 | 12 64 | 75 65 | true 66 | 67 | 68 | 69 | Choose File 70 | 71 | 72 | 73 | 74 | 75 | 180 76 | 200 77 | 451 78 | 32 79 | 80 | 81 | 82 | 83 | 84 | 85 | 320 86 | 320 87 | 171 88 | 34 89 | 90 | 91 | 92 | 93 | Inconsolata Ultra Expanded SemiBold 94 | 12 95 | 75 96 | true 97 | 98 | 99 | 100 | Check 101 | 102 | 103 | 104 | 105 | 106 | 360 107 | 160 108 | 91 109 | 31 110 | 111 | 112 | 113 | 114 | MD5 115 | 116 | 117 | 118 | 119 | SHA256 120 | 121 | 122 | 123 | 124 | SHA1 125 | 126 | 127 | 128 | 129 | 130 | 131 | 280 132 | 240 133 | 251 134 | 41 135 | 136 | 137 | 138 | 139 | Inconsolata Ultra Expanded SemiBold 140 | 18 141 | 75 142 | true 143 | 144 | 145 | 146 | 147 | 148 | 149 | Qt::AlignCenter 150 | 151 | 152 | 153 | 154 | 155 | 640 156 | 70 157 | 81 158 | 31 159 | 160 | 161 | 162 | 163 | Inconsolata Ultra Expanded SemiBold 164 | 12 165 | 75 166 | true 167 | 168 | 169 | 170 | Log 171 | 172 | 173 | 174 | 175 | 176 | 177 | 0 178 | 0 179 | 805 180 | 26 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | -------------------------------------------------------------------------------- /System-Tools/File_Integrity/Integrity_log.txt: -------------------------------------------------------------------------------- 1 | File: Validations.py 2 | Generated Hash: d3792fb5de757a9068c1a09270bc1885 3 | Origional Hash: d3792fb5de757a9068c1a09270bc1885 4 | Result: Match! 5 | ------------------------------ 6 | 7 | File: Main.py 8 | Generated Hash: 46e2cc98ff48140442ef05d6b46632ef 9 | Origional Hash: d3792fb5de757a9068c1a09270bc1885 10 | Result: No Match! 11 | ------------------------------ 12 | 13 | -------------------------------------------------------------------------------- /System-Tools/File_Integrity/Main.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from Validations import MD5, SHA1, SHA256 3 | from PyQt5.uic import loadUi 4 | from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog 5 | 6 | class MainWindow(QMainWindow): 7 | def __init__(self): 8 | super(MainWindow, self).__init__() 9 | loadUi('FileIntegrety.ui', self) 10 | self.setWindowTitle("File Integrity Checker") 11 | self.button_file.clicked.connect(self.set_function) 12 | self.button_check.clicked.connect(self.check_function) 13 | 14 | def set_function(self): 15 | options = QFileDialog.Options() 16 | options |= QFileDialog.DontUseNativeDialog 17 | file_name, _ = QFileDialog.getOpenFileName(self,"QFileDialog.getOpenFileName()", 18 | "","All Files (*);;Python Files (*.py)", options=options) 19 | if file_name: 20 | self.file_entry.setText(file_name) 21 | 22 | 23 | def check_function(self): 24 | hashes = {"MD5": MD5, 25 | "SHA1": SHA1, 26 | "SHA256": SHA256 27 | } 28 | file, hash_sum = self.file_entry.text(), str(self.hash_entry.text()).strip() 29 | hash = str(self.hash_choice.currentText()) 30 | generated_hash_temp = hashes[hash] 31 | generated_hash = str(generated_hash_temp(file)).strip() 32 | if hash_sum == generated_hash: 33 | result = "Match!" 34 | else: 35 | result = "No Match!" 36 | if self.log_box.isChecked(): 37 | with open("Integrity_log.txt", "a") as logger: 38 | logger.write(f"File: {str(file.split('/')[-1])}\nGenerated Hash: {generated_hash}\nOrigional Hash: {hash_sum}\nResult: {result}\n{'-'*30}\n\n") 39 | self.label_result.setText(result) 40 | 41 | 42 | if __name__ == "__main__": 43 | app = QApplication(sys.argv) 44 | window = MainWindow() 45 | window.show() 46 | sys.exit(app.exec_()) 47 | -------------------------------------------------------------------------------- /System-Tools/File_Integrity/Validations.py: -------------------------------------------------------------------------------- 1 | import os 2 | import hashlib 3 | 4 | 5 | class HashGenerator(object): 6 | def __init__(self, file): 7 | self.file = file.replace('"', "") 8 | self.BUF_SIZE = 65536 9 | self.file_name = str(file.split("/")[-1]) 10 | try: 11 | drive = str(file.split("/")[0]) 12 | file_path = os.path.join(file.strip(self.file_name)) 13 | if str(file_path.split("/")[0]) != drive: 14 | file_path = str(drive.strip(":") + file_path) 15 | os.chdir(file_path) 16 | except Exception as E: 17 | print(E) 18 | 19 | 20 | class MD5(HashGenerator): 21 | def __init__(self, *args, **kwargs): 22 | super(MD5, self).__init__(*args, **kwargs) 23 | self.md5_sum = hashlib.md5() 24 | self.generate() 25 | 26 | def generate(self): 27 | with open(self.file_name, "rb") as file: 28 | while True: 29 | data = file.read(self.BUF_SIZE) 30 | if not data: 31 | break 32 | self.md5_sum.update(data) 33 | 34 | def __str__(self): 35 | return str(self.md5_sum.hexdigest()) 36 | 37 | 38 | class SHA1(HashGenerator): 39 | def __init__(self, *args, **kwargs): 40 | super(SHA1, self).__init__(*args, **kwargs) 41 | self.sha1_sum = hashlib.sha1() 42 | self.generate() 43 | 44 | def generate(self): 45 | with open(self.file_name, "rb") as file: 46 | while True: 47 | data = file.read(self.BUF_SIZE) 48 | if not data: 49 | break 50 | self.sha1_sum.update(data) 51 | 52 | def __str__(self): 53 | return str(self.sha1_sum.hexdigest()) 54 | 55 | 56 | class SHA256(HashGenerator): 57 | def __init__(self, *args, **kwargs): 58 | super(SHA256, self).__init__(*args, **kwargs) 59 | self.sha256_sum = hashlib.sha256() 60 | self.generate() 61 | 62 | def generate(self): 63 | with open(self.file_name, "rb") as file: 64 | while True: 65 | data = file.read(self.BUF_SIZE) 66 | if not data: 67 | break 68 | self.sha256_sum.update(data) 69 | 70 | def __str__(self): 71 | return str(self.sha256_sum.hexdigest()) 72 | -------------------------------------------------------------------------------- /System-Tools/File_Integrity/requirements.txt: -------------------------------------------------------------------------------- 1 | PyQt5==5.15.4 2 | PyQt5-Qt5==5.15.2 3 | PyQt5-sip==12.9.0 4 | -------------------------------------------------------------------------------- /System-Tools/Hash_Validator.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import hashlib 4 | from tabulate import tabulate 5 | 6 | class Hash_Check(object): 7 | def __init__(self, check_file, hash_key): 8 | self.check_file = check_file 9 | self.hash_key = hash_key 10 | self.script_path = os.getcwd() 11 | # Reads in 64kb chunks. 12 | self.BUF_SIZE = 65536 13 | self.md5 = hashlib.md5() 14 | self.sha1 = hashlib.sha1() 15 | self.sha256 = hashlib.sha256() 16 | self.hash_generator() 17 | 18 | def __str__(self): 19 | values = str(self.validate()) 20 | return values 21 | 22 | def hash_generator(self): 23 | drive = str(self.check_file.split("\\")[0]) 24 | file_name = str(self.check_file.split("\\")[-1]) 25 | file_path = os.path.join(self.check_file.strip(file_name)) 26 | if str(file_path.split("\\")[0]) != drive: 27 | file_path = str(drive.strip(":") + file_path) 28 | os.chdir(file_path) 29 | with open(file_name, 'rb') as file: 30 | while True: 31 | data = file.read(self.BUF_SIZE) 32 | if not data: 33 | break 34 | self.md5.update(data) 35 | self.sha1.update(data) 36 | self.sha256.update(data) 37 | 38 | 39 | def validate(self): 40 | hash_sha = str(self.sha1.hexdigest()) 41 | hash_md5 = str(self.md5.hexdigest()) 42 | hash_sha256 = str(self.sha256.hexdigest()) 43 | while True: 44 | if hash_sha == hash_key: 45 | table = tabulate([["Validation:", "Hashes Match!"], 46 | ["Key Given:", self.hash_key], 47 | ["sha1sum", hash_sha]], 48 | headers="firstrow", tablefmt="grid") 49 | elif hash_md5 == hash_key: 50 | table = tabulate([["Validation:", "Hashes Match!"], 51 | ["Key Given:", self.hash_key], 52 | ["md5sum", hash_md5]], 53 | headers="firstrow", tablefmt="grid") 54 | elif hash_sha256 == hash_key: 55 | table = tabulate([["Validation:", "Hashes Match!"], 56 | ["Key Given:", self.hash_key], 57 | ["sha256sum", hash_sha256]], 58 | headers="firstrow", tablefmt="grid") 59 | else: 60 | table = tabulate([["Validation:", "Hashes Don't Match!"], 61 | ["Key Given:", self.hash_key], 62 | ["sha1sum", hash_sha], 63 | ["md5sum", hash_md5]], 64 | headers="firstrow", tablefmt="grid") 65 | return table 66 | 67 | 68 | if __name__ == "__main__": 69 | """ Be Aware of tailing whitespace""" 70 | print("Drag 'n Drop File Here:") 71 | check_file = str(input(r" >> ")).replace('"', "") 72 | print("Enter Official hash-Key Here:") 73 | hash_key = str(input(r" >> ")) 74 | validation = Hash_Check(check_file, hash_key) 75 | print(validation) 76 | 77 | 78 | -------------------------------------------------------------------------------- /System-Tools/Melody_Player/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/System-Tools/Melody_Player/icon.png -------------------------------------------------------------------------------- /System-Tools/Melody_Player/melody_player.py: -------------------------------------------------------------------------------- 1 | import sys, winsound 2 | from PyQt5 import QtCore, QtGui, QtWidgets 3 | from PyQt5.QtWidgets import QApplication, QMainWindow 4 | 5 | class MainWindow(QMainWindow): 6 | def __init__(self): 7 | super(MainWindow, self).__init__() 8 | self.setGeometry(548, 225, 548, 225) 9 | self.setWindowTitle("Melody Player") 10 | self.setWindowIcon(QtGui.QIcon("icon.png")) 11 | self.initUI() 12 | 13 | def initUI(self): 14 | self.Button_00 = QtWidgets.QPushButton(self) 15 | self.Button_00.setGeometry(QtCore.QRect(10, 10, 75, 71)) 16 | self.Button_00.setObjectName("Button_00") 17 | self.Button_00.setText("♩") 18 | self.Button_00.clicked.connect(lambda: winsound.Beep(2300, 100)) 19 | 20 | self.Button_01 = QtWidgets.QPushButton(self) 21 | self.Button_01.setGeometry(QtCore.QRect(100, 10, 75, 71)) 22 | self.Button_01.setObjectName("Button_01") 23 | self.Button_01.setText("♪") 24 | self.Button_01.clicked.connect(lambda: winsound.Beep(2100, 100)) 25 | 26 | self.Button_02 = QtWidgets.QPushButton(self) 27 | self.Button_02.setGeometry(QtCore.QRect(190, 10, 75, 71)) 28 | self.Button_02.setObjectName("Button_02") 29 | self.Button_02.setText("♫") 30 | self.Button_02.clicked.connect(lambda: winsound.Beep(1900, 100)) 31 | 32 | self.Button_03 = QtWidgets.QPushButton(self) 33 | self.Button_03.setGeometry(QtCore.QRect(280, 10, 75, 71)) 34 | self.Button_03.setObjectName("Button_03") 35 | self.Button_03.setText("≠") 36 | self.Button_03.clicked.connect(lambda: winsound.Beep(1700, 100)) 37 | 38 | self.Button_04 = QtWidgets.QPushButton(self) 39 | self.Button_04.setGeometry(QtCore.QRect(370, 10, 75, 71)) 40 | self.Button_04.setObjectName("Button_04") 41 | self.Button_04.setText("♭") 42 | self.Button_04.clicked.connect(lambda: winsound.Beep(1500, 100)) 43 | 44 | self.Button_05 = QtWidgets.QPushButton(self) 45 | self.Button_05.setGeometry(QtCore.QRect(460, 10, 75, 71)) 46 | self.Button_05.setObjectName("Button_05") 47 | self.Button_05.setText("♮") 48 | self.Button_05.clicked.connect(lambda: winsound.Beep(1300, 100)) 49 | 50 | self.Button_06 = QtWidgets.QPushButton(self) 51 | self.Button_06.setGeometry(QtCore.QRect(10, 90, 75, 71)) 52 | self.Button_06.setObjectName("Button_06") 53 | self.Button_06.setText("°") 54 | self.Button_06.clicked.connect(lambda: winsound.Beep(1100, 100)) 55 | 56 | self.Button_07 = QtWidgets.QPushButton(self) 57 | self.Button_07.setGeometry(QtCore.QRect(100, 90, 75, 71)) 58 | self.Button_07.setObjectName("Button_07") 59 | self.Button_07.setText("ø") 60 | self.Button_07.clicked.connect(lambda: winsound.Beep(900, 100)) 61 | 62 | self.Button_08 = QtWidgets.QPushButton(self) 63 | self.Button_08.setGeometry(QtCore.QRect(190, 90, 75, 71)) 64 | self.Button_08.setObjectName("Button_08") 65 | self.Button_08.setText("♬") 66 | self.Button_08.clicked.connect(lambda: winsound.Beep(700, 100)) 67 | 68 | self.Button_09 = QtWidgets.QPushButton(self) 69 | self.Button_09.setGeometry(QtCore.QRect(280, 90, 75, 71)) 70 | self.Button_09.setObjectName("Button_09") 71 | self.Button_09.setText("≭") 72 | self.Button_09.clicked.connect(lambda: winsound.Beep(500, 100)) 73 | 74 | self.Button_10 = QtWidgets.QPushButton(self) 75 | self.Button_10.setGeometry(QtCore.QRect(370, 90, 75, 71)) 76 | self.Button_10.setObjectName("Button_10") 77 | self.Button_10.setText("♯") 78 | self.Button_10.clicked.connect(lambda: winsound.Beep(300, 100)) 79 | 80 | self.Button_11 = QtWidgets.QPushButton(self) 81 | self.Button_11.setGeometry(QtCore.QRect(460, 90, 75, 71)) 82 | self.Button_11.setObjectName("Button_11") 83 | self.Button_11.setText("؂") 84 | self.Button_11.clicked.connect(lambda: winsound.Beep(100, 100)) 85 | 86 | self.tag = QtWidgets.QLabel(self) 87 | self.tag.setGeometry(QtCore.QRect(220, 170, 121, 20)) 88 | font = QtGui.QFont() 89 | font.setPointSize(11) 90 | font.setBold(True) 91 | font.setWeight(75) 92 | self.tag.setFont(font) 93 | self.tag.setObjectName("tag") 94 | self.tag.setText("python_genius") 95 | 96 | 97 | if __name__ == "__main__": 98 | app = QApplication(sys.argv) 99 | window = MainWindow() 100 | window.show() 101 | app.exec_() 102 | 103 | 104 | -------------------------------------------------------------------------------- /System-Tools/NetworkTool/Screens/APScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 807 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 20 21 | 500 22 | 101 23 | 41 24 | 25 | 26 | 27 | 28 | 16 29 | 75 30 | true 31 | 32 | 33 | 34 | Exit 35 | 36 | 37 | 38 | 39 | 40 | 460 41 | 10 42 | 181 43 | 41 44 | 45 | 46 | 47 | 48 | 20 49 | 75 50 | true 51 | 52 | 53 | 54 | Downlaod: 55 | 56 | 57 | Qt::AlignCenter 58 | 59 | 60 | 61 | 62 | 63 | 510 64 | 50 65 | 131 66 | 31 67 | 68 | 69 | 70 | 71 | 20 72 | 75 73 | true 74 | 75 | 76 | 77 | Upload: 78 | 79 | 80 | Qt::AlignCenter 81 | 82 | 83 | 84 | 85 | 86 | 640 87 | 12 88 | 81 89 | 31 90 | 91 | 92 | 93 | 94 | 20 95 | 75 96 | true 97 | 98 | 99 | 100 | 101 | 102 | 103 | 640 104 | 50 105 | 81 106 | 31 107 | 108 | 109 | 110 | 111 | 20 112 | 75 113 | true 114 | 115 | 116 | 117 | 118 | 119 | 120 | 720 121 | 50 122 | 81 123 | 31 124 | 125 | 126 | 127 | 128 | 16 129 | 75 130 | true 131 | 132 | 133 | 134 | Mbps 135 | 136 | 137 | Qt::AlignCenter 138 | 139 | 140 | 141 | 142 | 143 | 720 144 | 10 145 | 81 146 | 31 147 | 148 | 149 | 150 | 151 | 16 152 | 75 153 | true 154 | 155 | 156 | 157 | Mbps 158 | 159 | 160 | Qt::AlignCenter 161 | 162 | 163 | 164 | 165 | 166 | 167 | 0 168 | 0 169 | 807 170 | 26 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /System-Tools/NetworkTool/Screens/NetworkScreen.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 807 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 20 21 | 500 22 | 101 23 | 41 24 | 25 | 26 | 27 | 28 | 16 29 | 75 30 | true 31 | 32 | 33 | 34 | Exit 35 | 36 | 37 | 38 | 39 | 40 | 460 41 | 10 42 | 181 43 | 41 44 | 45 | 46 | 47 | 48 | 20 49 | 75 50 | true 51 | 52 | 53 | 54 | Downlaod: 55 | 56 | 57 | Qt::AlignCenter 58 | 59 | 60 | 61 | 62 | 63 | 510 64 | 50 65 | 131 66 | 31 67 | 68 | 69 | 70 | 71 | 20 72 | 75 73 | true 74 | 75 | 76 | 77 | Upload: 78 | 79 | 80 | Qt::AlignCenter 81 | 82 | 83 | 84 | 85 | 86 | 640 87 | 12 88 | 81 89 | 31 90 | 91 | 92 | 93 | 94 | 20 95 | 75 96 | true 97 | 98 | 99 | 100 | 101 | 102 | 103 | 640 104 | 50 105 | 81 106 | 31 107 | 108 | 109 | 110 | 111 | 20 112 | 75 113 | true 114 | 115 | 116 | 117 | 118 | 119 | 120 | 720 121 | 50 122 | 81 123 | 31 124 | 125 | 126 | 127 | 128 | 16 129 | 75 130 | true 131 | 132 | 133 | 134 | Mbps 135 | 136 | 137 | Qt::AlignCenter 138 | 139 | 140 | 141 | 142 | 143 | 720 144 | 10 145 | 81 146 | 31 147 | 148 | 149 | 150 | 151 | 16 152 | 75 153 | true 154 | 155 | 156 | 157 | Mbps 158 | 159 | 160 | Qt::AlignCenter 161 | 162 | 163 | 164 | 165 | 166 | 167 | 0 168 | 0 169 | 807 170 | 26 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /System-Tools/NetworkTool/main.py: -------------------------------------------------------------------------------- 1 | """ 2 | Accesspoint scan 3 | Host info 4 | Interface scanner 5 | ip_locator 6 | Network speed 7 | Service name finder 8 | GUI: 9 | - Host Info & Interface scanner & IP Locator 10 | - Network Speed & Service Name Finder 11 | - AP Scanner 12 | """ 13 | import sys 14 | import time 15 | import threading 16 | from PyQt5 import QtWidgets 17 | from PyQt5.uic import loadUi 18 | from PyQt5.QtWidgets import QApplication, QMainWindow 19 | from netspeed import * 20 | 21 | 22 | class Navigations(object): 23 | def host_page(self): 24 | self.close() 25 | self.host_screen = HostScreen() 26 | screens.addWidget(self.host_screen) 27 | screens.setCurrentIndex(screens.currentIndex() + 1) 28 | 29 | 30 | 31 | def network_page(self): 32 | self.close() 33 | self.network_screen = NetworkScreen() 34 | screens.addWidget(self.network_screen) 35 | screens.setCurrentIndex(screens.currentIndex() + 1) 36 | 37 | 38 | def ap_page(self): 39 | self.close() 40 | self.ap_screen = APScreen(username) 41 | screens.addWidget(self.ap_screen) 42 | screens.setCurrentIndex(screens.currentIndex() + 1) 43 | 44 | def subprocesses(self): 45 | netspeed_thread = threading.Thread(target=self.update_netspeed) 46 | netspeed_thread.start() 47 | 48 | def update_netspeed(self): 49 | net_speed = Network_Details().return_data() 50 | self.lcd_download.display(net_speed[0]) 51 | self.lcd_upload.display(net_speed[1]) 52 | 53 | def exit(self): 54 | sys.exit() 55 | 56 | 57 | 58 | class HostScreen(QMainWindow, Navigations): 59 | def __init__(self): 60 | super(HostScreen, self).__init__() 61 | loadUi('page_template.ui', self) 62 | 63 | self.exit_btn.clicked.connect(self.exit) 64 | 65 | self.subprocesses() 66 | 67 | 68 | 69 | 70 | class APScreen(QMainWindow, Navigations): 71 | def __init__(self, username): 72 | self.username = username.split('@')[0] 73 | super(APScreen, self).__init__() 74 | loadUi('Screens/APScreen.ui', self) 75 | self.exit_button.clicked.connect(self.exit) 76 | 77 | 78 | class NetworkScreen(QMainWindow, Navigations): 79 | def __init__(self): 80 | super(NetworkScreen, self).__init__() 81 | loadUi('Screens/NetworkScreen.ui', self) 82 | self.exit_button.clicked.connect(self.exit) 83 | 84 | 85 | if __name__ == "__main__": 86 | app = QApplication(sys.argv) 87 | screens = QtWidgets.QStackedWidget() 88 | login_window = HostScreen() 89 | screens.setWindowTitle("Network Tool") 90 | screens.addWidget(login_window) 91 | screens.setFixedHeight(600) 92 | screens.setFixedWidth(800) 93 | screens.show() 94 | sys.exit(app.exec_()) 95 | -------------------------------------------------------------------------------- /System-Tools/NetworkTool/netspeed.py: -------------------------------------------------------------------------------- 1 | import psutil 2 | import speedtest 3 | 4 | class Network_Details(object): 5 | def __init__(self): 6 | self.scanner = psutil.net_if_addrs() 7 | self.speed = speedtest.Speedtest() 8 | self.interfaces = self.interface()[0] 9 | 10 | def interface(self): 11 | interfaces = [] 12 | for interface_name, _ in self.scanner.items(): 13 | interfaces.append(str(interface_name)) 14 | return interfaces 15 | 16 | def return_data(self): 17 | down = float(str(f"{round(self.speed.download() / 1_000_000, 2)}")) 18 | up = float(str(f"{round(self.speed.upload() / 1_000_000, 2)}")) 19 | return down, up 20 | 21 | -------------------------------------------------------------------------------- /System-Tools/NetworkTool/page_template.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 800 10 | 600 11 | 12 | 13 | 14 | MainWindow 15 | 16 | 17 | 18 | 19 | 20 | 20 21 | 500 22 | 101 23 | 41 24 | 25 | 26 | 27 | 28 | 16 29 | 75 30 | true 31 | 32 | 33 | 34 | Exit 35 | 36 | 37 | 38 | 39 | 40 | 480 41 | 10 42 | 151 43 | 31 44 | 45 | 46 | 47 | 48 | 16 49 | 75 50 | true 51 | 52 | 53 | 54 | Downlaod: 55 | 56 | 57 | Qt::AlignCenter 58 | 59 | 60 | 61 | 62 | 63 | 520 64 | 50 65 | 111 66 | 31 67 | 68 | 69 | 70 | 71 | 16 72 | 75 73 | true 74 | 75 | 76 | 77 | Upload: 78 | 79 | 80 | Qt::AlignCenter 81 | 82 | 83 | 84 | 85 | 86 | 630 87 | 12 88 | 81 89 | 31 90 | 91 | 92 | 93 | 94 | 16 95 | 50 96 | false 97 | 98 | 99 | 100 | 101 | 102 | 103 | 630 104 | 50 105 | 81 106 | 31 107 | 108 | 109 | 110 | 111 | 16 112 | 50 113 | false 114 | 115 | 116 | 117 | 118 | 119 | 120 | 710 121 | 50 122 | 81 123 | 31 124 | 125 | 126 | 127 | 128 | 16 129 | 75 130 | true 131 | 132 | 133 | 134 | Mbps 135 | 136 | 137 | Qt::AlignCenter 138 | 139 | 140 | 141 | 142 | 143 | 710 144 | 10 145 | 81 146 | 31 147 | 148 | 149 | 150 | 151 | 16 152 | 75 153 | true 154 | 155 | 156 | 157 | Mbps 158 | 159 | 160 | Qt::AlignCenter 161 | 162 | 163 | 164 | 165 | 166 | 167 | 0 168 | 0 169 | 800 170 | 26 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /System-Tools/NetworkTool/tools/Template.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from PyQt5 import QtWidgets 3 | from PyQt5.uic import loadUi 4 | from PyQt5.QtWidgets import QApplication, QMainWindow 5 | 6 | 7 | class Navigations(object): 8 | def host_page(self): 9 | self.close() 10 | self.host_screen = HostScreen() 11 | screens.addWidget(self.host_screen) 12 | screens.setCurrentIndex(screens.currentIndex() + 1) 13 | 14 | 15 | """, 16 | def register_page(self): 17 | self.close() 18 | self.signup_screen = SignUpScreen() 19 | screens.addWidget(self.signup_screen) 20 | screens.setCurrentIndex(screens.currentIndex() + 1) 21 | 22 | 23 | def welcome_page(self, username): 24 | self.close() 25 | self.ap_screen = APScreen(username) 26 | screens.addWidget(self.ap_screen) 27 | screens.setCurrentIndex(screens.currentIndex() + 1) 28 | """ 29 | def update_netspeed(self): 30 | self.lcd_download.display(5) 31 | self.lcd_upload.display(4) 32 | 33 | def exit(self): 34 | sys.exit() 35 | 36 | 37 | 38 | class HostScreen(QMainWindow, Navigations): 39 | def __init__(self): 40 | super(HostScreen, self).__init__() 41 | loadUi('page_template.ui', self) 42 | screens.setWindowTitle("Network Tool") 43 | #self.login_button.clicked.connect(self.login) 44 | #self.signup_button.clicked.connect(self.register_page) 45 | self.exit_btn.clicked.connect(self.exit) 46 | self.update_netspeed() 47 | 48 | """ 49 | def login(self): 50 | username = self.username_input.text() 51 | password = self.password_input.text() 52 | user_data = self.database.get_account(username) 53 | try: 54 | if user_data["username"] == username and self.database.verify_password(user_data["password"], password): 55 | self.welcome_page(username) 56 | else: 57 | self.feedback_label.setText("Invalid username or password") 58 | except Exception as e: 59 | self.feedback_label.setText(e) 60 | 61 | 62 | class APScreen(QMainWindow, Navigations): 63 | def __init__(self, username): 64 | self.username = username.split('@')[0] 65 | super(APScreen, self).__init__() 66 | loadUi('Screens/APScreen.ui', self) 67 | screens.setWindowTitle("Login System | Welcome") 68 | self.welcome_label.setText(f"Welcome {self.username}") 69 | self.logout_button.clicked.connect(self.host_page) 70 | self.exit_button.clicked.connect(self.exit) 71 | self.database = Database() 72 | 73 | 74 | class SignUpScreen(QMainWindow, Navigations): 75 | def __init__(self): 76 | super(SignUpScreen, self).__init__() 77 | loadUi('Screens/SignUpScreen.ui', self) 78 | screens.setWindowTitle("Login System | Sign Up") 79 | self.create_button.clicked.connect(self.sign_up) 80 | self.login_button.clicked.connect(self.host_page) 81 | self.exit_button.clicked.connect(self.exit) 82 | 83 | """ 84 | 85 | if __name__ == "__main__": 86 | app = QApplication(sys.argv) 87 | screens = QtWidgets.QStackedWidget() 88 | login_window = HostScreen() 89 | 90 | screens.addWidget(login_window) 91 | screens.setFixedHeight(600) 92 | screens.setFixedWidth(800) 93 | screens.show() 94 | sys.exit(app.exec_()) -------------------------------------------------------------------------------- /System-Tools/Project_Installer.py: -------------------------------------------------------------------------------- 1 | import os 2 | import platform 3 | 4 | operating_system = platform.system() 5 | commands = { 6 | "Windows": {"clean": "cls", "pip": "pip", 7 | "split": "\\", "env": "env\\Scripts\\activate"}, 8 | "Linux": {"clean": "clear", "pip": "pip3", 9 | "split": "/", "env": "source env/bin/activate"}, 10 | "Mac": {"clean": "clear", "pip": "pip", 11 | "split": "/", "env": "source env/bin/activate"} 12 | } 13 | 14 | os.system(commands[operating_system]["clean"]) 15 | project_path = input(r"[!] Drag 'n Drop Project Folder Here: ") 16 | os.chdir(project_path) 17 | project_name = os.getcwd().split(commands[operating_system]["split"])[-1] 18 | 19 | 20 | if os.path.isfile("requirements.txt"): 21 | os.system(f"{commands[operating_system]['pip']} install virtualenv") 22 | if not os.path.isdir("env"): 23 | os.system("virtualenv env") 24 | 25 | os.system(commands[operating_system]["clean"]) 26 | 27 | print("\n[!] Will now install the following modules:\n") 28 | with open("requirements.txt", "r+") as modules: 29 | for module in modules.readlines(): 30 | print(module.strip("\n")) 31 | 32 | _ = input("\n\n[!] Press Enter to continue..\n") 33 | 34 | os.system(commands[operating_system]["clean"]) 35 | os.system(f"{commands[operating_system]['env']} && {commands[operating_system]['pip']} install -r requirements.txt") 36 | 37 | else: 38 | print("\n\n[!] No requirements.txt file detected!\n") 39 | _ = input("[!] Press Enter to continue..") 40 | 41 | os.system(commands[operating_system]["clean"]) 42 | 43 | print("\nSetup is now complete..\n\n", 44 | f"[!] Project Name: {project_name}\n", 45 | f"[!] Activate Environment: {project_path}{commands[operating_system]['split']}{commands[operating_system]['env']}\n", 46 | f"[!] Deactivate Environment: deactivate\n\n") 47 | 48 | -------------------------------------------------------------------------------- /System-Tools/Screenshot.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pyautogui 3 | 4 | 5 | def screenshot(): 6 | # Path to picture folder 7 | save_path = os.path.join(os.path.expanduser("~"), "Pictures") 8 | # Take screenshot and save to save_path 9 | shot = pyautogui.screenshot() 10 | shot.save(f"{save_path}\\python_screenshot.png") 11 | return print(f"\nScreenshot taken and saved to {save_path}") 12 | 13 | 14 | if __name__ == "__main__": 15 | screenshot() 16 | 17 | -------------------------------------------------------------------------------- /System-Tools/System-Maintainer/Maintainer.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import platform 4 | 5 | class Maintainer(object): 6 | def __init__(self): 7 | self.system = platform.uname().system 8 | self.version = platform.uname().version 9 | self.arch = platform.uname().machine 10 | self.pyversion = sys.version.split("(")[0] 11 | self.update_feedbacks = ["Scanning for updates...", "Downloading updates...", "Installing updates..."] 12 | self.clean_feedbacks = ["Cleaning recycle bins globally...", "Cleaning temporary files globally..."] 13 | self.cleaner = {"Windows": "cls", 14 | "Linux": "clear", 15 | "Darwin": "clear"} 16 | 17 | @property 18 | def system_info(self): 19 | return str(" [ System Information ]\n" 20 | f"Operating System:\t{self.system}\n" 21 | f"System Version:\t\t{self.version}\n" 22 | f"Architecture:\t\t{self.arch}\n" 23 | f"Python Version:\t\t{self.pyversion}") 24 | 25 | def __str__(self): 26 | return str(self.system) 27 | 28 | 29 | class WindowsMaintain(Maintainer): 30 | def __init__(self, *args, **kwargs): 31 | super(WindowsMaintain, self).__init__(*args, **kwargs) 32 | 33 | def updater(self): 34 | commands = ["UsoClient StartScan", "UsoClient StartDownload", "UsoClient StartInstall"] 35 | for feed, command in enumerate(commands): 36 | print(f"{self.update_feedbacks[feed]}\n") 37 | os.system(command) 38 | 39 | def cleaner(self): 40 | commands = [r"rd /s c:\$Recycle.Bin", r"del /q/f/s %TEMP%\*"] 41 | for feed, command in enumerate(commands): 42 | print(f"{self.clean_feedbacks[feed]}\n") 43 | os.system(command) 44 | 45 | 46 | class DebianMaintain(Maintainer): 47 | def __init__(self, *args, **kwargs): 48 | super(DebianMaintain, self).__init__(*args, **kwargs) 49 | 50 | def updater(self): 51 | commands = ["sudo apt update -y", "sudo apt upgrade -y", "sudo apt dist-upgrade -y"] 52 | for feed, command in enumerate(commands): 53 | print(f"{self.update_feedbacks[feed]}\n") 54 | os.system(command) 55 | 56 | 57 | if __name__ == "__main__": 58 | operating_systems = {"Windows": WindowsMaintain(), 59 | "Linux": DebianMaintain(), 60 | "Darwin": "None"} 61 | ops = platform.uname().system 62 | os.system(Maintainer().cleaner[ops]) 63 | if ops in operating_systems.keys(): 64 | print(operating_systems[ops].system_info) 65 | else: 66 | print(f"Unsupported Operating System: {ops}") 67 | 68 | -------------------------------------------------------------------------------- /System-Tools/System-Maintainer/README.md: -------------------------------------------------------------------------------- 1 | # System-Maintainer 2 | Update & clean your system 3 | -------------------------------------------------------------------------------- /System-Tools/SystemInfo/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/System-Tools/SystemInfo/icon.png -------------------------------------------------------------------------------- /System-Tools/SystemInfo/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/System-Tools/SystemInfo/logo.ico -------------------------------------------------------------------------------- /System-Tools/SystemInfo/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/System-Tools/SystemInfo/requirements.txt -------------------------------------------------------------------------------- /System-Tools/SystemStopper/SystemStopper.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | from PyQt5 import QtCore, QtGui, QtWidgets 4 | from PyQt5.QtWidgets import QApplication, QMainWindow 5 | 6 | class MainWindow(QMainWindow): 7 | def __init__(self): 8 | super(MainWindow, self).__init__() 9 | self.setGeometry(200, 200, 526, 220) 10 | self.setWindowTitle("System Stopper") 11 | 12 | self.font_1 = QtGui.QFont() 13 | self.font_1.setFamily("Microsoft YaHei UI") 14 | self.font_1.setBold(False) 15 | self.font_1.setWeight(75) 16 | self.font_1.setPointSize(14) 17 | 18 | self.font_2 = QtGui.QFont() 19 | self.font_2.setFamily("Rockwell Extra Bold") 20 | self.font_2.setBold(True) 21 | self.font_2.setWeight(75) 22 | 23 | self.initUI() 24 | 25 | 26 | def initUI(self): 27 | self.label_top = QtWidgets.QLabel(self) 28 | self.label_top.setObjectName("label_top") 29 | self.label_top.setGeometry(QtCore.QRect(80, 0, 351, 51)) 30 | self.font_2.setPointSize(24) 31 | self.label_top.setFont(self.font_2) 32 | self.label_top.setAlignment(QtCore.Qt.AlignCenter) 33 | self.label_top.setText("System Stopper") 34 | 35 | 36 | self.entry_minutes = QtWidgets.QLineEdit(self) 37 | self.entry_minutes.setObjectName("entry_minutes") 38 | self.entry_minutes.setGeometry(QtCore.QRect(170, 70, 171, 31)) 39 | self.font_2.setPointSize(14) 40 | self.font_2.setBold(False) 41 | self.font_2.setWeight(50) 42 | self.entry_minutes.setFont(self.font_2) 43 | self.entry_minutes.setAlignment(QtCore.Qt.AlignCenter) 44 | self.entry_minutes.setText("") 45 | self.entry_minutes.setPlaceholderText("Default = Now") 46 | 47 | 48 | self.radio_shutdown = QtWidgets.QRadioButton(self) 49 | self.radio_shutdown.setObjectName("radio_shutdown") 50 | self.radio_shutdown.setGeometry(QtCore.QRect(350, 66, 141, 17)) 51 | self.radio_shutdown.setText("Shutdown") 52 | self.radio_shutdown.setFont(self.font_1) 53 | self.radio_shutdown.setChecked(True) 54 | 55 | self.radio_restart = QtWidgets.QRadioButton(self) 56 | self.radio_restart.setObjectName("radio_restart") 57 | self.radio_restart.setGeometry(QtCore.QRect(350, 86, 141, 17)) 58 | self.radio_restart.setText("Restart") 59 | self.radio_restart.setFont(self.font_1) 60 | 61 | 62 | self.label_minutes = QtWidgets.QLabel(self) 63 | self.label_minutes.setObjectName("label_minutes") 64 | self.label_minutes.setGeometry(QtCore.QRect(28, 70, 141, 31)) 65 | self.font_2.setPointSize(16) 66 | self.label_minutes.setFont(self.font_2) 67 | self.label_minutes.setAlignment(QtCore.Qt.AlignCenter) 68 | self.label_minutes.setText("Minutes:") 69 | 70 | self.label_activation = QtWidgets.QLabel(self) 71 | self.label_activation.setObjectName("label_activation") 72 | self.label_activation.setGeometry(QtCore.QRect(90, 110, 331, 31)) 73 | self.font_2.setPointSize(12) 74 | self.label_activation.setFont(self.font_2) 75 | self.label_activation.setAlignment(QtCore.Qt.AlignCenter) 76 | self.label_activation.setText("") 77 | 78 | 79 | self.button_activate = QtWidgets.QPushButton(self) 80 | self.button_activate.setObjectName("button_activate") 81 | self.button_activate.setGeometry(QtCore.QRect(180, 160, 151, 51)) 82 | self.button_activate.setText("Activate") 83 | self.button_activate.setFont(self.font_2) 84 | self.button_activate.setFocus(True) 85 | self.button_activate.clicked.connect(self.activate) 86 | 87 | 88 | def activate(self): 89 | method = None 90 | try: 91 | timer_period = int(self.entry_minutes.text()) 92 | except: 93 | timer_period = 0 94 | if self.radio_shutdown.isChecked(): 95 | method = "Shutdown" 96 | os.system(f"shutdown -s -t {timer_period * 60}") 97 | else: 98 | method = "Restarting" 99 | os.system(f"shutdown -r -t {timer_period * 60}") 100 | if timer_period == 1: 101 | self.label_activation.setText(f"{method} in {timer_period} minute..") 102 | else: 103 | self.label_activation.setText(f"{method} in {timer_period} minutes..") 104 | 105 | 106 | if __name__ == "__main__": 107 | app = QApplication(sys.argv) 108 | window = MainWindow() 109 | window.setStyleSheet("background-color: lightgrey;") 110 | window.setWindowIcon(QtGui.QIcon("shutdown_logo.ico")) 111 | window.show() 112 | sys.exit(app.exec_()) -------------------------------------------------------------------------------- /System-Tools/SystemStopper/SystemStopper.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | MainWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 526 10 | 294 11 | 12 | 13 | 14 | 15 | Microsoft YaHei UI 16 | 16 17 | 75 18 | true 19 | 20 | 21 | 22 | System Stopper 23 | 24 | 25 | 26 | 27 | 28 | 80 29 | 0 30 | 351 31 | 51 32 | 33 | 34 | 35 | 36 | Rockwell Extra Bold 37 | 24 38 | 39 | 40 | 41 | System Stopper 42 | 43 | 44 | Qt::AlignCenter 45 | 46 | 47 | 48 | 49 | 50 | 170 51 | 70 52 | 171 53 | 31 54 | 55 | 56 | 57 | 58 | 14 59 | 50 60 | false 61 | 62 | 63 | 64 | 65 | 66 | 67 | Qt::AlignCenter 68 | 69 | 70 | 71 | 72 | 73 | 350 74 | 60 75 | 141 76 | 17 77 | 78 | 79 | 80 | Shutdown 81 | 82 | 83 | 84 | 85 | 86 | 350 87 | 80 88 | 141 89 | 17 90 | 91 | 92 | 93 | Restart 94 | 95 | 96 | 97 | 98 | 99 | 28 100 | 70 101 | 141 102 | 31 103 | 104 | 105 | 106 | 107 | Rockwell Extra Bold 108 | 16 109 | 110 | 111 | 112 | Minutes: 113 | 114 | 115 | Qt::AlignCenter 116 | 117 | 118 | 119 | 120 | 121 | 90 122 | 110 123 | 331 124 | 31 125 | 126 | 127 | 128 | 129 | Rockwell Extra Bold 130 | 16 131 | 132 | 133 | 134 | 135 | 136 | 137 | Qt::AlignCenter 138 | 139 | 140 | 141 | 142 | 143 | 180 144 | 160 145 | 151 146 | 51 147 | 148 | 149 | 150 | Activate 151 | 152 | 153 | 154 | 155 | 156 | 157 | 0 158 | 0 159 | 526 160 | 34 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /System-Tools/SystemStopper/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bytesenseidk/Mixed-Applications/84188ff7d21f0b5994ad8a722fa37ca5244bc0e8/System-Tools/SystemStopper/logo.ico -------------------------------------------------------------------------------- /System-Tools/TerminalAnimation.py: -------------------------------------------------------------------------------- 1 | import time 2 | j = 0 3 | while True: 4 | for j in range(6): 5 | print("[",j*" ","=",(6-j)*" ","]",end="\r", sep="") 6 | time.sleep(0.2) 7 | for j in range(6): 8 | print("[",(6-j)*" ", "=",(j)*" ","]",end="\r", sep="") 9 | time.sleep(0.2) -------------------------------------------------------------------------------- /System-Tools/TextEditor.py: -------------------------------------------------------------------------------- 1 | from tkinter import * 2 | from tkinter import ttk 3 | from tkinter.filedialog import askopenfile, asksaveasfilename 4 | 5 | class Text_Editor(object): 6 | def __init__(self, master): 7 | frame = Frame(master) 8 | frame.pack() 9 | menubar = Menu(root) 10 | filemenu = Menu(menubar, tearoff=0) 11 | root.config(menu=menubar) 12 | menubar.add_cascade(label="File", menu=filemenu) 13 | filemenu.add_command(label="Open", command=self.open_file) 14 | filemenu.add_command(label="Save", command=self.save_file) 15 | filemenu.add_command(label="Exit", command=root.destroy) 16 | self.textfield = Text(root, font=("arail", 10)) 17 | self.textfield.pack() 18 | 19 | def open_file(self): 20 | self.textfield.delete("1.0", END) 21 | file = askopenfile(mode="r", filetypes=[("text files", "*.txt")]) 22 | if file is not None: 23 | text = file.read() 24 | self.textfield.insert("1.0", text) 25 | 26 | def save_file(self): 27 | text = self.textfield.get("1.0", "end-1c") 28 | file = asksaveasfilename(title="Save", filetypes=[("text files", "*.txt")]) 29 | with open(file, "w") as data: 30 | data.write(text) 31 | 32 | 33 | if __name__ == "__main__": 34 | root = Tk() 35 | root.title("Text Editor") 36 | Text_Editor(root) 37 | root.mainloop() 38 | 39 | -------------------------------------------------------------------------------- /System-Tools/WeatherApp.py: -------------------------------------------------------------------------------- 1 | import requests # For making API requests to get weather data 2 | import tkinter as tk # For creating the GUI (Graphical User Interface) 3 | from PIL import Image, ImageTk # For handling and displaying images/icons in the GUI 4 | 5 | # Function to get weather data from the OpenWeatherMap API 6 | def get_weather(): 7 | city = city_entry.get() # Get the city entered by the user 8 | if not city: 9 | label_temp.config(text="Enter a city name!") 10 | return 11 | 12 | api_key = "" # Replace with your own OpenWeatherMap API key 13 | url = f"http://api.openweathermap.org/data/2.5/weather?q={city}&appid={api_key}&units=metric" # API request URL 14 | 15 | response = requests.get(url).json() # Make the API request and parse the JSON response 16 | 17 | # Print the full response for debugging 18 | print("API Response:", response) # Print the response to see what data is returned 19 | 20 | # Check if the "main" key exists in the response 21 | if "main" in response: 22 | temp = response["main"]["temp"] 23 | weather = response["weather"][0]["description"] 24 | icon_code = response["weather"][0]["icon"] 25 | 26 | # Update the temperature label with a pulsing animation 27 | animate_pulse(label_temp, f"{temp}°C") 28 | 29 | # Update the weather description label with a fade-in animation 30 | animate_fade_in(label_weather, weather.capitalize()) 31 | 32 | # Fetch the weather icon from OpenWeatherMap and update the icon label 33 | icon_url = f"http://openweathermap.org/img/wn/{icon_code}@2x.png" # URL for the weather icon 34 | icon_image = Image.open(requests.get(icon_url, stream=True).raw) # Load the icon image using PIL.Image 35 | label_icon.image = ImageTk.PhotoImage(icon_image) # Convert PIL image to PhotoImage for tkinter 36 | label_icon.config(image=label_icon.image) # Set the icon in the label 37 | else: 38 | # Handle the error if "main" key is missing 39 | error_message = response.get("message", "Unknown error") 40 | print(f"Error: {error_message}") 41 | label_temp.config(text="N/A") 42 | label_weather.config(text="City not found or invalid API key") 43 | label_icon.config(image='') # Clear the icon 44 | 45 | # Animation: Pulse effect on temperature label 46 | def animate_pulse(label, new_text, scale=1.0, step=0.05, max_scale=1.2): 47 | label.config(text=new_text) # Set the new text 48 | scale += step # Increase the scale by the step 49 | label.config(font=("Arial", int(48 * scale), "bold")) # Adjust the font size to create a pulse effect 50 | 51 | # Reverse direction if max scale is reached 52 | if scale > max_scale or scale < 1.0: 53 | step = -step 54 | 55 | # Continue animating until scale returns to normal 56 | if round(scale, 2) != 1.0: 57 | root.after(50, lambda: animate_pulse(label, new_text, scale, step)) # Re-run the function after 50 ms 58 | 59 | # Animation: Fade-in effect on weather description label 60 | def animate_fade_in(label, new_text, alpha=0): 61 | # Define a list of intermediate colors to simulate fading 62 | colors = ['#333333', '#555555', '#777777', '#999999', '#bbbbbb', '#dddddd', '#ffffff'] 63 | label.config(text=new_text, fg=colors[int(alpha * len(colors))]) # Update the color to simulate fading 64 | 65 | alpha += 0.1 # Increment the alpha level 66 | 67 | if alpha <= 1.0: 68 | root.after(100, lambda: animate_fade_in(label, new_text, alpha)) # Continue fading in 69 | 70 | # Set up the main application window 71 | root = tk.Tk() # Initialize the main window 72 | root.title("Weather Dashboard") # Set the window title 73 | root.geometry("400x500") # Set the window size 74 | root.configure(bg="#1e1e2f") # Set the background color for the dashboard 75 | 76 | # Create and configure the label for entering the city name 77 | city_entry_label = tk.Label(root, text="Enter city:", font=("Arial", 14), fg="white", bg="#1e1e2f") 78 | city_entry_label.pack(pady=10) 79 | 80 | # Create the input field for the city 81 | city_entry = tk.Entry(root, font=("Arial", 14), width=20, bg="white") 82 | city_entry.pack(pady=5) 83 | 84 | # Create and configure the label for displaying the temperature 85 | label_temp = tk.Label(root, font=("Arial", 48, "bold"), fg="#ffffff", bg="#1e1e2f") # Large font for temperature 86 | label_temp.pack(pady=20) # Add padding around the label for spacing 87 | 88 | # Create and configure the label for displaying the weather description 89 | label_weather = tk.Label(root, font=("Arial", 24), fg="#ffffff", bg="#1e1e2f") # Medium font for weather description 90 | label_weather.pack() # Pack the label into the window 91 | 92 | # Create and configure the label for displaying the weather icon 93 | label_icon = tk.Label(root, bg="#1e1e2f") # Icon label with the same background color 94 | label_icon.pack(pady=10) # Add padding around the icon for spacing 95 | 96 | # Create and configure the refresh button to update the weather data 97 | refresh_button = tk.Button(root, text="Get Weather", font=("Arial", 14), command=get_weather, bg="#4caf50", fg="white", relief="flat") # Styled button 98 | refresh_button.pack(pady=20) # Add padding around the button for spacing 99 | 100 | root.mainloop() # Run the main loop to keep the GUI window open 101 | -------------------------------------------------------------------------------- /System-Tools/WebcamActivation.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | def webcam_activation(): 5 | camera = cv2.VideoCapture(0) # Camera selection 6 | while True: 7 | # Camera validation & Camera activation 8 | val, frame = camera.read() 9 | # Show picture or video 10 | cv2.imshow("frame", frame) 11 | # Exit by pressing 'e' 12 | if cv2.waitKey(1) == ord("e"): 13 | break 14 | 15 | if __name__ == "__main__": 16 | webcam_activation() 17 | 18 | -------------------------------------------------------------------------------- /System-Tools/alarm.py: -------------------------------------------------------------------------------- 1 | import time 2 | import winsound 3 | from win10toast import ToastNotifier 4 | 5 | def timer(message, minutes): 6 | # Windows Notification Instantiator 7 | notificator = ToastNotifier() 8 | # Notification Details 9 | notificator.show_toast("Alarm", 10 | f"Alarm wil go off in {minutes} minutes..", 11 | duration=50) 12 | # Pause Script 13 | time.sleep(minutes * 60) 14 | # Alarm Sound 15 | winsound.Beep(frequency=2500, duration=1000) 16 | # Show Notification 17 | notificator.show_toast(f"Alarm", message, duration=50) 18 | 19 | if __name__ == "__main__": 20 | message = "Post on github!" 21 | minutes = 20 22 | timer(message, minutes) 23 | --------------------------------------------------------------------------------