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
from selenium import webdriver | |
from selenium.common.exceptions import WebDriverException | |
from selenium.webdriver.support.ui import WebDriverWait, Select | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver import ChromeOptions | |
from urllib.parse import quote_plus | |
from os.path import exists, isfile | |
from time import sleep |
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 -*- | |
import argparse | |
import csv | |
from os.path import isfile | |
from simplewa import SimpleWhatsapp | |
from sys import exit | |
from jinja2 import Template | |
from typing import Union | |
from time import sleep |
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 sys | |
if len(sys.argv) < 3: | |
print("Usage: python test.py A B") | |
sys.exit(1) | |
A,B = int(sys.argv[1]), int(sys.argv[2]) | |
if B < 0: | |
print("B should be positive.") |
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
#!/usr/bin/env python | |
# Do `python3 -i vector.py` to use it interactively | |
from vpython import vector as v | |
from vpython import * | |
from typing import Union, Type | |
import sympy as sym | |
from fractions import Fraction | |
def man(): |
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
from math import log2 | |
from sys import argv | |
from rich.console import Console | |
from rich.table import Table | |
########## CHANGE THIS ########### | |
NWAY = 2 # 1/2/4 | |
# Number of bytes | |
WORD = 4 # 4 bytes (Probably no need to change this) |
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
from rich.console import Console | |
from rich.table import Table | |
import sys | |
from itertools import product | |
from math import ceil | |
def main(): | |
if len(sys.argv) != 3: | |
print("Command: python3 column.py <literals> <minterms>") | |
print("e.g python3 column.py A,D,B,C 4,7,3,1") |
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
from rich.console import Console | |
from rich.table import Table | |
from itertools import product | |
class InvalidInputException(Exception): | |
pass | |
def JK_flop(Q, J, K): | |
# Returns Q+ and Q+' |
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
#!/bin/bash | |
# CS2106 Lab Assignment 1 Zip Build Script v1 by @rizemon | |
# ---------------------------------- | |
# Colors (From https://gist.github.com/jonsuh/3c89c004888dfc7352be) | |
# ---------------------------------- | |
NOCOLOR='\033[0m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' |
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
#!/bin/bash | |
# CS2106 Lab Assignment 1 Zip Build Script v2 by @rizemon | |
# Improvements added: | |
# - No longer requires creation of temp directory to house copies of necessary files | |
# - Now checks for missing files and reports them | |
# - Add reminder for student to check whether they have entered their information into the files | |
# Modify this | |
NUSNET_ID="" |
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
/* | |
Inspired by this post https://www.deepfryd.com/burp-academy-apprentice/ | |
How to use: | |
1) Browse to https://portswigger.net/web-security/all-labs. | |
2) Open your web browser's Developer tools by pressing 'F12' on your keyboard. | |
3) Click on the console tab. | |
4) Paste the following Javascript code into the console's prompt and hit 'Enter' on the keyboard. | |
5) Wait for all the labs to be updated with their respective levels (Tested ~12s) |
OlderNewer