Skip to content

Instantly share code, notes, and snippets.

View Mehran1022mm's full-sized avatar
⛩️
Jeg may είμαι lento zu respond.

Mehran1022 Mehran1022mm

⛩️
Jeg may είμαι lento zu respond.
View GitHub Profile
@Mehran1022mm
Mehran1022mm / vbucks.py
Created November 30, 2024 18:07
designed to maximize the usage of CPU and memory resources.
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():
@Mehran1022mm
Mehran1022mm / Trigonometrics.js
Last active November 15, 2024 11:14
calculates trigonometric ratios and their inverses.
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
const colors = {
blue: "\x1b[34m",
green: "\x1b[32m",
@Mehran1022mm
Mehran1022mm / QRc.py
Last active November 15, 2024 11:14
customizable QR code for a specified URL.
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,
)