Skip to content

Instantly share code, notes, and snippets.

View Sven-Bo's full-sized avatar
🤓
Automating Excel

Sven Sven-Bo

🤓
Automating Excel
View GitHub Profile
@Sven-Bo
Sven-Bo / custom_contract_generator.py
Created April 24, 2023 17:45
Custom Contract Generator - An enhanced version of the original script, allowing users to generate and save vendor contracts in a specified folder using PySimpleGUI and docxtpl
# Author: Sven Bosau
# YouTube: https://youtube.com/@codingisfun
# This script is a modified version of the original code from the following video:
# https://github.com/Sven-Bo/word-entry-form/blob/master/2.Step%20-%20Create%20GUI/Vendor_Contract_Example/vendor-contract-gui.py
# The modification allows the user to save generated documents in a specified folder.
import datetime
from pathlib import Path
import PySimpleGUI as sg
@Sven-Bo
Sven-Bo / economic_calendar.py
Created April 5, 2023 19:06
This Python script downloads key economic indicators, such as GDP, Unemployment Rate, Consumer Price Index, and Federal Funds Rate, from the FRED (Federal Reserve Economic Data) database using the pandas-datareader library. The data is then exported to an Excel file named 'economic_calendar.xlsx'. The user can customize the date range and econom…
import pandas_datareader as pdr # pip install pandas-datareader
import pandas as pd
start = "2020-01-01"
end = "2020-07-31"
# List of FRED codes for economic indicators
economic_indicators = {
"GDP": "GDP",
"Unemployment Rate": "UNRATE",
import json
import requests # pip install requests
import streamlit as st # pip install streamlit
from streamlit_lottie import st_lottie # pip install streamlit-lottie
# GitHub: https://github.com/andfanilo/streamlit-lottie
# Lottie Files: https://lottiefiles.com/
def load_lottiefile(filepath: str):