This file contains hidden or 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 math | |
| import multiprocessing | |
| import random | |
| # Rolls 231 d4 and returns the total number of 1s | |
| def roll(): | |
| ones = 0 | |
| for i in range(231): | |
| # Returns a 2 bit random binary number (00, 01, 10, 11) => 1, 2, 3, 4 | |
| if random.getrandbits(2) == 0: |
This file contains hidden or 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 socket | |
| import struct | |
| import time | |
| import queue | |
| addr = ("<an ip address>", 4950) | |
| hid = 0x00000fff | |
| touch = 0x02000000 | |
| circle = 0x007ff7ff |
This file contains hidden or 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 UIKit | |
| import ImageRow | |
| import Eureka | |
| class CustomImagePickerController: ImagePickerController { | |
| override var preferredStatusBarStyle: UIStatusBarStyle { | |
| return .default // For dark status bar | |
| //return .lightContent // For light status bar | |
| } | |
| } |