Skip to content

Instantly share code, notes, and snippets.

View manucabral's full-sized avatar
💫

Manu manucabral

💫
View GitHub Profile
@manucabral
manucabral / beautiful_output.py
Created November 2, 2022 14:06
A simple module for managing the console output
'''
BeautifulOutput is a module for managing the terminal output of the program including colors and formatting.
The colors are defined in the COLORS dictionary, you can change it to whatever you want.
You can also add more colors, just add them to the dictionary colors.
To use it, just import it and call BeautifulOutput.init() before using it.
Then you can call BeautifulOutput(str) to print a string with the formatting.
Script by: Manuel Cabral (github: manucabral)
All rights reserved.
@manucabral
manucabral / test.py
Created November 28, 2022 22:51
test
import tkinter as tk
class Application(tk.Frame):
def __init__(self, master=None):
super().__init__(master)
self.winfo_toplevel().title('MacroMimo')
self.winfo_toplevel().resizable(False, False)
self.sequences = [
{
'id': 1,
@manucabral
manucabral / client.py
Created January 25, 2023 20:16
pygame client/server example with sockets
import pygame as py
import socket as sk
import threading as th
class Client:
__slots__ = (
"__host",
"__port",
"__s",
@manucabral
manucabral / pyoutube.py
Created June 13, 2023 21:47
Get youtube video data using python.
import urllib3
import json
def get_data(embed_url: str) -> dict:
http = urllib3.PoolManager()
response = http.request("GET", embed_url)
return json.loads(response.data.decode("utf-8"))