Skip to content

Instantly share code, notes, and snippets.

View juliobetta's full-sized avatar
🎧

Julio Betta juliobetta

🎧
View GitHub Profile
@juliobetta
juliobetta / gist:59269eb8d48219db627315cfefd6f021
Created September 10, 2019 16:58
remove a file from history after added to .gitignore
git update-index --skip-worktree <filepath>
@juliobetta
juliobetta / maybe.py
Last active June 22, 2022 19:02
Maybe Monad in Python (naive approach)
from abc import ABC
from typing import Callable, TypeVar, Generic
T = TypeVar('T')
class Maybe(Generic[T], ABC):
def __init__(self, value: T | None):
self.value = value
@juliobetta
juliobetta / duckdb_postgres_pyspark_tutorial
Created October 31, 2024 15:29 — forked from Databracket9/duckdb_postgres_pyspark_tutorial
Data Engineering with DuckDb Tutorial
#library import
import duckdb
import configparser
from duckdb.experimental.spark.sql import SparkSession as session
from duckdb.experimental.spark.sql.functions import col, when, lit
#read configs from secrets file
config = configparser.ConfigParser()
config.read('duck_db_demo/secrets.ini')
user = config['POSTGRES']['USER']