Skip to content

Instantly share code, notes, and snippets.

View pmartinez8241's full-sized avatar
🇨🇦
WORKING FOR UNICAL AVIATION

PETE MARTINEZ pmartinez8241

🇨🇦
WORKING FOR UNICAL AVIATION
  • Cal Poly Pomona JAVA TUTOR
  • Walnut CA 91789
View GitHub Profile
use gtk::{prelude::*, Orientation};
use gtk::{glib, Application, ApplicationWindow, Widget};
use std::fs;
const APP_ID: &str = "org.gtk_rs.HelloWorld2";
fn main() -> glib::ExitCode {
// Create a new application
let app = Application::builder().application_id(APP_ID).build();
// Connect to "activate" signal of `app`
@pmartinez8241
pmartinez8241 / episode_includes.sql
Created September 14, 2023 05:20
episodes_insert_list
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e01 - Currahee.mkv');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e01 - Currahee.srt');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e02 - Day of Days.mkv');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e02 - Day of Days.srt');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e03 - Carentan.mkv');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e03 - Carentan.srt');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e04 - Replacements.mkv');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e04 - Replacements.srt');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e05 - Crossroads.mkv');
INSERT INTO tv.episodes (name) values (E'Band of Brothers - s01e05 - Crossroads.srt');
@pmartinez8241
pmartinez8241 / POSTGRESQL_REFCURSOR_EXAMPLE.py
Last active May 20, 2023 00:02
How to create, then use, a postgres REFCURSOR in postgres
import psycopg2
import json
def get_drives_and_media_type():
results = []
with psycopg2.connect("host=# dbname=entertainment_database user=# password=#") as conn:
with conn.cursor() as db_cursor: