Skip to content

Instantly share code, notes, and snippets.

View jagtesh's full-sized avatar

Jag Chadha jagtesh

View GitHub Profile
Copy this to roam/js page, including the "{{[[roam/js]]}}" node:
- {{[[roam/js]]}}
- ```javascript
/*
* Roam template PoC by @ViktorTabori
* 0.1alpha
*
* How to install it:
* - go to `roam/js` page`
@Sandy4321
Sandy4321 / XGBoost-from-scratch-python.py
Created May 7, 2020 12:24 — forked from Ekeany/XGBoost-from-scratch-python.py
A numpy/pandas implementation of XGBoost
import numpy as np
import pandas as pd
from math import e
class Node:
'''
A node object that is recursivly called within itslef to construct a regression tree. Based on Tianqi Chen's XGBoost
the internal gain used to find the optimal split value uses both the gradient and hessian. Also a weighted quantlie sketch
and optimal leaf values all follow Chen's description in "XGBoost: A Scalable Tree Boosting System" the only thing not
@wrighter
wrighter / download_bars.py
Last active September 19, 2025 12:16
A command line utility to download historical data from Interactive Brokers
#!/usr/bin/env python
import os
import sys
import argparse
import logging
from datetime import datetime, timedelta
from typing import List, Optional
from collections import defaultdict
@kadereub
kadereub / numba_polyfit.py
Last active October 5, 2024 20:33
A numba implementation of numpy polfit
# Load relevant libraries
import numpy as np
import numba as nb
import matplotlib.pyplot as plt
# Goal is to implement a numba compatible polyfit (note does not include error handling)
# Define Functions Using Numba
# Idea here is to solve ax = b, using least squares, where a represents our coefficients e.g. x**2, x, constants
@nb.njit
@dvf
dvf / change-codec.md
Last active October 10, 2025 01:17
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

use std::collections::HashMap;
use std::fmt;
use std::io;
use std::num::ParseFloatError;
use std::rc::Rc;
/*
Types
*/
@DamianSuess
DamianSuess / SpecialFolderLocations.md
Last active September 7, 2025 02:33
C# Environment.SpecialFolder
@teamon
teamon / Dockerfile
Created August 31, 2018 10:28
elixir + phoenix + node dockerfile
########################################
# 1. Build nodejs frontend
########################################
FROM node:10.9-alpine as build-node
# prepare build dir
RUN mkdir -p /app/assets
WORKDIR /app
# set build ENV
@sscotth
sscotth / keystroke the clipboard extended.workflow
Last active September 7, 2025 09:08
Paste as keystrokes (macOS)
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
#
# Extended vs Simple?
# * Includes an initial delay to allow you to change active windows
# * Adds small delay between keypresses for slower responding windows like SSH sessions
# * Better handling of numbers
# * VMWare bug fix
#
@inventionate
inventionate / install-r.sh
Last active August 31, 2023 18:27
Install R with OpenBLAS via Homebrew
# Stat Installation
# XCode CLT
xcode-select --install
# Update Homebrew
brew update
# Check for broken dependencies and/or outdated packages
brew doctor