Skip to content

Instantly share code, notes, and snippets.

View fn-hide's full-sized avatar
:shipit:
What?

Huda Febrianto Nurrohman fn-hide

:shipit:
What?
View GitHub Profile
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active October 18, 2025 12:03
Conventional Commits Cheatsheet
@bshishov
bshishov / forecasting_metrics.py
Last active September 5, 2025 21:52
Python Numpy functions for most common forecasting metrics
import numpy as np
EPSILON = 1e-10
def _error(actual: np.ndarray, predicted: np.ndarray):
""" Simple error """
return actual - predicted
@curiousest
curiousest / read_postgres_sqlalchemy.py
Created November 23, 2016 15:20
Use automap_base to use an existing db with sqlalchemy
from sqlalchemy import MetaData, create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.sql import select
from sqlalchemy import func
engine = create_engine('postgres://db_user@db_host:5432/db_name', client_encoding='utf8')
Session = sessionmaker(bind=engine)
session = Session()