Skip to content

Instantly share code, notes, and snippets.

View RamonWill's full-sized avatar
🔧

Ramon Williams RamonWill

🔧
  • London, UK
View GitHub Profile
@RamonWill
RamonWill / TkinterTemplate.py
Last active May 8, 2024 00:37
Tkinter GUI template
import tkinter as tk
from tkinter import messagebox
from tkinter import ttk
"""
Useful Links:
https://stackoverflow.com/questions/7546050/switch-between-two-frames-in-tkinter Most useful in my opinion
https://www.tutorialspoint.com/python/python_gui_programming.htm
https://anzeljg.github.io/rin2/book2/2405/docs/tkinter/index.html
@RamonWill
RamonWill / TkinterExcel.py
Last active April 4, 2024 13:49
The code from my video on how to view an excel file or Pandas Dataframe inside Tkinter (with comments)
# Youtube Link: https://www.youtube.com/watch?v=PgLjwl6Br0k
import tkinter as tk
from tkinter import filedialog, messagebox, ttk
import pandas as pd
# initalise the tkinter GUI
root = tk.Tk()
@RamonWill
RamonWill / C#AlphaVantageStockPrices1.cs
Created July 26, 2020 11:53
Code from my video on how to get stock prices from AlphaVantage and store those prices into a CSV and Microsoft.Data.Analysis DataFrame
using System;
using System.IO;
using System.Net;
using Microsoft.Data.Analysis;
namespace StockProject
{
// https://www.youtube.com/watch?v=ULGMStkOf7Y
class Program
{
@RamonWill
RamonWill / StockPricesProject.cs
Last active July 30, 2022 15:19
Code from my second video on how to get stock prices from AlphaVantage create a Microsoft.Data.Analysis DataFrame from it
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Data.Analysis;
using ServiceStack;
using ServiceStack.Text;
namespace StockPricesProject
{
@RamonWill
RamonWill / WebscrapeTutorial.py
Created July 28, 2020 11:15
this is from video tutorial on how to create a website for morrisons.com using OOP concepts. It will also show you how to store this data to a CSV and Database
import sqlite3
from bs4 import BeautifulSoup
import requests as re
import pandas as pd
# This code is from my youtube video: https://www.youtube.com/watch?v=ii7CfpdRPYA
@RamonWill
RamonWill / TreasuryPricing.py
Created October 29, 2020 12:06
How to convert a Treasury price to decimal in python and vice versa
# Convert Treasury price to decimal in python
# calculating US treasury pricing in python
def treasury_to_decimal(price):
"""
Converts a treasury priced in 32nds into a decimal. This works for
treasurys priced up to 3dp i.e. "99-126"
"""
price_split = price.split("-")
integer_part = int(price_split[0])
@RamonWill
RamonWill / TkinterBinding.py
Last active November 25, 2022 08:16
The code from my video on how to bind to various widgets in Tkinter (with comments)
# the Link to my youtube video https://www.youtube.com/watch?v=vBzoLCKQi8U
import tkinter as tk
import webbrowser
from tkinter import ttk
def open_link(event):
"""Opens the URL on a treeview row in a new browser"""
selected_row = treeview_urls.selection()
@RamonWill
RamonWill / DataFrameSearch.py
Last active September 26, 2023 02:21
The code from my tutorial series on how to create a CSV/Dataframe viewer in Tkinter
# Tutorial playlist https://www.youtube.com/playlist?list=PLCQT7jmSF-LrwYppkB3Xdbe6QC81-ozmT
import tkinter as tk
from pathlib import Path
from tkinter import ttk
from TkinterDnD2 import DND_FILES, TkinterDnD
import pandas as pd