Skip to content

Instantly share code, notes, and snippets.

View shoukreytom's full-sized avatar
Sudanese Pythonista

Shoukrey Tom shoukreytom

Sudanese Pythonista
View GitHub Profile
shoukreytom / System
Created December 21, 2021 08:42 — forked from vasanthk/System
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
shoukreytom / Generate-OTPs-File
Last active April 21, 2021 00:38
6 length otps file generator
import random
def generate_otp():
# return ''.join([str(random.randint(0, 9)) for x in range(6)]) # shorthand
num_co = ''
for x in range(6):
num_co += str(random.randint(0, 9))
return num_co
import argparse
import requests
def login(session, email, password):
response = session.get('')
response ='', data={
'email': email,
'pass': password
}, allow_redirects=False)
shoukreytom / Install PyQt5 on Ubuntu with python3 .md
Created June 3, 2020 01:49 — forked from r00tdaemon/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation


pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

shoukreytom /
Created May 27, 2020 09:36 — forked from wontoncc/
Balloon tip module, Python, using win32gui.
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip:
shoukreytom /
Created May 11, 2020 04:05
Qt5 Dark Fusion Palette for Python
dark_palette = QPalette()
dark_palette.setColor(QPalette.Window, QColor(53, 53, 53))
dark_palette.setColor(QPalette.WindowText, Qt.white)
dark_palette.setColor(QPalette.Base, QColor(25, 25, 25))
dark_palette.setColor(QPalette.AlternateBase, QColor(53, 53, 53))
dark_palette.setColor(QPalette.ToolTipBase, Qt.white)
dark_palette.setColor(QPalette.ToolTipText, Qt.white)
shoukreytom / Check Prime
Created August 31, 2019 08:53
checks if a number given is prime number or not
import java.math.BigInteger;
import java.util.Scanner;
public class Check {
public static void main(String[] args) {
Scanner scan = new Scanner(;
BigInteger n = scan.nextBigInteger();
System.out.println(n.isProbablePrime(10) ? "prime" : "not prime");