Skip to content

Instantly share code, notes, and snippets.

@IllusiveMilkman
IllusiveMilkman / imdb_postgres_setup.sh
Last active Oct 7, 2021
Import IMDB datasets into PostgreSQL
View imdb_postgres_setup.sh
# This script was intended to get raw IMDB datasets into Postgres
# The script worked on my mac setup.
#
# You may have to update your psql command with appropriate -U and -d flags and may have to
# provide appropriate permissions to new folders.
#
# Customise as you see fit and for your setup.
#
# Tables are NOT optomised, nor have any indexes been created
# The point is to "just get the data into Postgres"
@IllusiveMilkman
IllusiveMilkman / DebugPrintArray.vb
Created Nov 17, 2020
VBA Debug Array - Print to Immediate Window
View DebugPrintArray.vb
' The following Sub can be used in VBA to print the contents of an Array to the Immediate Window for debugging purposes
Sub DebugPrintArray(arr As Variant)
Debug.Print ("----------------------Debugging Array----------------------")
Debug.Print ("Array row count (from zero): " & UBound(arr))
Debug.Print ("Array col count (from zero): " & UBound(arr, 2))
Dim rowString As String
rowString = ""
View Postgres Window Functions.sql
-- Window Function examples
-- PostgreSQL conference South Africa 2018
-- By Willem Booysen
-- Youtube: https://www.youtube.com/watch?v=blHEnrYwySE
-- Create database and templates for demo
DROP DATABASE IF EXISTS WindowFunctions;
CREATE DATABASE WindowFunctions;