Skip to content

Instantly share code, notes, and snippets.

View haraonline's full-sized avatar
🎯
Focusing

Hara haraonline

🎯
Focusing
  • Germany
View GitHub Profile
import tkinter
from tkinter import ttk
import requests
class MoviesDB:
def __init__(self, master):
self.master = master
self.createWidgets()
@haraonline
haraonline / tk_scale_widget.py
Last active May 2, 2018 14:05
tkinter slider that changes font size dynamically
from tkinter import *
from tkinter import ttk
master = Tk()
master.geometry('750x350+200+200')
scale_1 = ttk.Scale(master, orient='horizontal', length=200, from_=10, to=30)
scale_1.pack(padx=10, pady=30, anchor='nw')
label_1 = ttk.Label(master, text='Hello World', background='orange', font=('Candara', 10, 'italic'))
@haraonline
haraonline / pg_import_csv_to_heroku.sh
Created September 2, 2017 14:03 — forked from jboesch/pg_import_csv_to_heroku.sh
Importing a CSV dump of Postgres data into Heroku
# You have your csv data and it looks like so... It's in a file named "my_data.csv" and we want to import it into a table named "my_things".
"1", "Something", "0.50", "2013-05-05 10:00:00"
"2", "Another thing", "1.50", "2013-06-05 10:30:00"
# Now you want to import it, go to the command line and type:
$ PGPASSWORD=PWHERE psql -h HOSTHERE -U USERHERE DBNAMEHERE -c "\copy my_things FROM 'my_data.csv' WITH CSV;"
# Voila! It's impoted. Now if you want to wipe it out and import a fresh one, you would do this: