Skip to content

Instantly share code, notes, and snippets.

@rspeare
rspeare / p_values_for_logreg.py
Last active December 29, 2024 07:04
P values for sklearn logistic regression
from sklearn import linear_model
import numpy as np
import scipy.stats as stat
class LogisticReg:
"""
Wrapper Class for Logistic Regression which has the usual sklearn instance
in an attribute self.model, and pvalues, z scores and estimated
errors for each coefficient in
@pdanford
pdanford / README.md
Last active August 11, 2025 13:52
Launching iTerm2 from macOS Finder

Launching iTerm2 from macOS Finder

(Based on info from Peter Downs' gitub but with modified behavior to open a new terminal window for each invocation instead of reusing an already open window.)

The following three ways to launch an iTerm2 window from Finder have been tested on iTerm2 version 3+ running on macOS Mojave+.

pdanford - April 2020


@rosszurowski
rosszurowski / lerp-color.js
Last active July 10, 2025 05:21
Linear interpolation for hexadecimal colors.
/**
* A linear interpolator for hexadecimal colors
* @param {String} a
* @param {String} b
* @param {Number} amount
* @example
* // returns #7F7F7F
* lerpColor('#000000', '#ffffff', 0.5)
* @returns {String}
*/
@hofmannsven
hofmannsven / README.md
Last active November 22, 2025 10:31
Git CLI Cheatsheet