Skip to content

Instantly share code, notes, and snippets.

Avatar
🇸🇩
Sudanese Pythonista

Shoukrey Tom shoukreytom

🇸🇩
Sudanese Pythonista
View GitHub Profile
@shoukreytom
shoukreytom / System Design.md
Created Dec 21, 2021 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

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
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('https://m.facebook.com')
response = session.post('https://m.facebook.com/login.php', data={
'email': email,
'pass': password
}, allow_redirects=False)
@shoukreytom
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

Installation

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
shoukreytom / balloontip.py
Created May 27, 2020 — forked from wontoncc/balloontip.py
Balloon tip module, Python, using win32gui.
View balloontip.py
# -- coding: utf-8 --
from win32api import *
from win32gui import *
import win32con
import sys, os
import struct
import time
class WindowsBalloonTip:
@shoukreytom
shoukreytom / dark_fusion.py
Created May 11, 2020 — forked from mstuttgart/dark_fusion.py
Qt5 Dark Fusion Palette for Python
View dark_fusion.py
qApp.setStyle("Fusion")
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
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(System.in);
BigInteger n = scan.nextBigInteger();
scan.close();
System.out.println(n.isProbablePrime(10) ? "prime" : "not prime");