Skip to content

Instantly share code, notes, and snippets.

View gustavofuhr's full-sized avatar

Gustavo Führ gustavofuhr

View GitHub Profile
@gustavofuhr
gustavofuhr / llm_wrapper.py
Created August 20, 2024 13:52
A wrapper for GPT4, Claude Sonnet, LLama and Google Gemini.
import os
from enum import Enum
import argparse
from openai import OpenAI
import anthropic
import ollama
import google.generativeai as genai
@gustavofuhr
gustavofuhr / check_realmadrid_tickets.py
Created July 18, 2024 18:45
Check if general public tickets are available at the Real Madrir official site.
import time
import smtplib
import ssl
from email.message import EmailMessage
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
@gustavofuhr
gustavofuhr / rename_arxiv_files.py
Created July 11, 2024 17:53
Rename arxiv pdf files to the paper's title (and year, if required)
import os
import re
import argparse
import feedparser
def get_arxiv_number(s):
p = re.compile(r"(\d{4}.\d{5})(v\d)?\.pdf")
result = p.search(s)
@QuantumCD
QuantumCD / Qt 5 Dark Fusion Palette
Created August 15, 2013 21:40
This is a complete (I think) dark color palette for the Qt 5 Fusion theme, as well as a nice style sheet for the tool tips that make them blend better with the rest of the theme. To have immediate effect, be sure to put this in your main function before showing the parent window. Child windows should automatically inherit the palette unless you …
qApp->setStyle(QStyleFactory::create("Fusion"));
QPalette darkPalette;
darkPalette.setColor(QPalette::Window, QColor(53,53,53));
darkPalette.setColor(QPalette::WindowText, Qt::white);
darkPalette.setColor(QPalette::Base, QColor(25,25,25));
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53));
darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
darkPalette.setColor(QPalette::ToolTipText, Qt::white);
darkPalette.setColor(QPalette::Text, Qt::white);