Skip to content

Instantly share code, notes, and snippets.

@kjoehlers
kjoehlers / jukebox.py
Created September 25, 2020 02:02
Jukebox
import sqlite3
try:
import tkinter
except ImportError:
import Tkinter as tkinter # Python 2
class Scrollbox(tkinter.Listbox):
def __init__(self, window, **kwargs):
import tkinter.font as tkFont
from tkinter import *
from tkinter import ttk
font_family = "Helvetica"
font_size = {
"small": 9,
"normal": 10,
"large": 11,
@RamonWill
RamonWill / TkinterExcel.py
Last active March 12, 2025 02:51
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()
from __future__ import unicode_literals
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import youtube_dl
import threading
import time
import os
from tkinter.filedialog import askdirectory
import keyboard
@pran9957
pran9957 / PY0101EN-1-2-Strings.ipynb
Created February 19, 2020 17:03
Created on Cognitive Class Labs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stephencweiss
stephencweiss / webdev_online_resources.md
Created February 19, 2020 15:20 — forked from bradtraversy/webdev_online_resources.md
Online Resources For Web Developers (No Downloading)
@tovask
tovask / web_page_youtube_links_to_mp3.py
Last active April 21, 2020 03:26
Find youtube links in a webpage, and save them as mp3.
from wordcloud import WordCloud, STOPWORDS
import imageio
import matplotlib.pyplot as plt
def random_red_color_func(word=None, font_size=None, position=None, orientation=None, font_path=None, random_state=None):
h = 0
s = 100
l = int(50 * (float(random_state.randint(60, 120))/100.0))
return "hsl({}, {}%, {}%)".format(h, s, l)
method/keyword parameters uses
open() filename and open mode (optional) create a file object by opening/creating the file in the specified read/write mode
with - use it together with open(); closes the file after the suite completes
read() size (optional) read the file up to the size specified if set
readline() size (optional) read a single line with a size limit if set
readlines() size (optional) create a list of the read lines with an optional size hint
for loop - iterate the lines of the file
write() the string write the string to the file that is opened with a certain writeable mode
writelines() the list of strings write the list of strings to the file that is opened with a certain writeable mode
close() - close the opened file
#!/usr/bin/env python3
import tkinter
main_window = tkinter.Tk()
main_window.title('Sistem Klinik')
class top_menu:
# To-Do:
# - Patient, stock, about