Skip to content

Instantly share code, notes, and snippets.

@gitgithan
gitgithan / README.md
Created December 3, 2018 04:19 — forked from tmilos/README.md
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation

@gitgithan
gitgithan / rf_bias.py
Created December 23, 2018 03:53 — forked from rnowling/rf_bias.py
Simulate RF Categorical Variable Encoding Bias
import random
import sys
import numpy as np
import matplotlib.pyplot as plt
from sklearn.ensemble import RandomForestClassifier
N_SAMPLES = 1000
N_TREES = 100
MAX_CATEGORIES = 32
@gitgithan
gitgithan / Output
Created February 9, 2019 11:43 — forked from macournoyer/Output
A Neural Network framework in 25 LOC
$ python xor.py
Training:
Epoch 0 MSE: 1.765
Epoch 100 MSE: 0.015
Epoch 200 MSE: 0.005
* Target MSE reached *
Evaluating:
1 XOR 0 = 1 ( 0.904) Error: 0.096
0 XOR 1 = 1 ( 0.908) Error: 0.092
1 XOR 1 = 0 (-0.008) Error: 0.008
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gitgithan
gitgithan / gist:d7b8d0b5ec27081cc0391c8b03bd192b
Created October 31, 2020 08:22
Recursion with global variable gotcha
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# global no bounding "
]
},
{
@gitgithan
gitgithan / Recursion_with_global_variable_gotcha.ipynb
Created October 31, 2020 08:24
Recursion with global variable gotcha
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gitgithan
gitgithan / SETUP_DAY.md
Created April 6, 2021 14:11
Starting my coding journey...
@gitgithan
gitgithan / SETUP_DAY.md
Created April 7, 2021 04:33
Starting my coding journey...
@gitgithan
gitgithan / SETUP_DAY.md
Created May 3, 2021 10:52
Starting my coding journey...
@gitgithan
gitgithan / modern_sql_style_guide.md
Created February 8, 2022 10:34 — forked from mattmc3/modern_sql_style_guide.md
Modern SQL Style Guide
layout author title revision version description
default
mattmc3
Modern SQL Style Guide
2019-01-17
1.0.1
A guide to writing clean, clear, and consistent SQL.

Modern SQL Style Guide