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 threading | |
import numpy as np | |
import multiprocessing | |
import os | |
def cpu_stress(): | |
while True: | |
_ = sum(i * i * i * i * i * i * i * i for i in range(10**12)) | |
def memory_stress(): |
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
const readline = require('readline'); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
const colors = { | |
blue: "\x1b[34m", | |
green: "\x1b[32m", |
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 qrcode | |
from PIL import Image, ImageDraw | |
def create_qr_code(data, foreground_color, background_color): | |
qr_code = qrcode.QRCode( | |
version=1, | |
error_correction=qrcode.constants.ERROR_CORRECT_H, | |
box_size=10, | |
border=4, | |
) |