pip3 install --user pyqt5
sudo apt-get install python3-pyqt5
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -- coding: utf-8 -- | |
from win32api import * | |
from win32gui import * | |
import win32con | |
import sys, os | |
import struct | |
import time | |
class WindowsBalloonTip: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Picking the right architecture = Picking the right battles + Managing trade-offs
- 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?