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 typing import Tuple | |
from loguru import logger | |
from twisted.internet import reactor | |
from twisted.internet.posixbase import PosixReactorBase | |
from twisted.internet.protocol import DatagramProtocol | |
reactor: PosixReactorBase = reactor | |
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 python3 | |
import random | |
choices = list('8+*-/') | |
result = None | |
while result != 100: | |
eights_left = 8 | |
expr = '' | |
on_operator = True | |
while eights_left > 0: |
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 | |
# Script for automatically running a VBox VM in headless mode and SSH into it | |
# start VM | |
VMNAME="KaliLinux" | |
echo "Starting Kali Linux Virtual Machine" | |
VBoxHeadless --startvm $VMNAME > /dev/null 2>&1 & | |
# show a spinner while it warms up | |
WAIT=20 |
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 threading | |
class ReadWriteLock: | |
""" | |
A lock object that allows many simultaneous "read locks", but | |
only one "write lock." | |
Modified from | |
https://www.safaribooksonline.com/library/view/python-cookbook/0596001673/ch06s04.html | |
""" |
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 -x | |
# 1) Go to Xiaomis Fastboot Update Page. http://en.miui.com/a-234.html | |
# 2) Download latest Fastboot ROM. Like latest China dev. | |
# 3) Extract the content. | |
# 4) Boot your phone to Bootloader Mode. Vol Down and Power. Until Fastboot shows up. | |
# 5) Run this script from the root folder of the downloaded files. | |
echo "Flashing Firmware" | |
cat "./misc.txt" |
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 ubuntu | |
RUN apt-get update | |
RUN apt-get install -y build-essential curl | |
# NodeJS >= 6.0 | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | |
RUN apt-get install -y nodejs | |
# ttfautohint |
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 python3 | |
from subprocess import run, PIPE, Popen | |
from multiprocessing.pool import Pool | |
from itertools import repeat | |
from sys import argv | |
import shlex | |
def _run_adb(device: str, args: list) -> None: | |
cmd = ' '.join(['adb', '-s {}'.format(device)] + args) | |
print(cmd) |
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
*** ASSIGNMENT 1 *** | |
Entropies: | |
M1Test - 1.0 | |
M2Test - 0.957117428264771 | |
M3Test - 0.9998061328047111 | |
*** ASSIGNMENT 3 *** | |
M1: [0.0752726, 0.0058384, 0.0047076, 0.0263117, 0.2870307, 0.0007579] | |
M2: [0.0037562, 0.0024585, 0.0010561, 0.0156642, 0.0172772, 0.0062476] |
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
{"lastUpload":"2022-03-30T13:16:00.737Z","extensionVersion":"v3.4.3"} |