import pandas as pd
import numpy as np
from scipy.spatial import distance
from mip.model import *
factories = pd.DataFrame ([
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am xpl on github. | |
* I am xpl (https://keybase.io/xpl) on keybase. | |
* I have a public key ASCbmgidGUS8v1jHmPMQmSQEqPMHxAmeQERrU2XSi1jyOAo | |
To claim this, I am signing this object: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xF4B9d98828dF938ccf16b644Be471cF23816AB9F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------------------------------------- | |
'use strict' | |
// ----------------------------------------------------------------- | |
function replicate (times, n) { | |
let arr = [] | |
if (times <= 0) { return arr } | |
arr.push (n) |
Here's a script for squashing up to the first commit coming after a merge commit (with confirmation). Useful for working in a branch and then squashing temporary commits before merging into trunk.
Save the script as squash
. Upon executing, it brings your git editor (vim/nano/whatever) to confirm the prepped rebase
todo — so you would only need to simply save-and-exit (in most cases).
#!/usr/bin/env python3
# flake8: noqa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# --------------------------------------- | |
# EXAMPLE USE: | |
# | |
# ./watch.sh target/debug/my-server-app | |
# --------------------------------------- | |
kill_prev_pid () { | |
echo Killing prev pid $(cat .pid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name HN Chat Mode | |
// @namespace https://news.ycombinator.com/ | |
// @version 2024-09-18 | |
// @description live comments updater | |
// @author You | |
// @match https://news.ycombinator.com/item* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=news.ycombinator.com | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GitHub Approve to Bless | |
// @namespace http://tampermonkey.net/ | |
// @version 1.2 | |
// @description Replaces "approve" and its variants with "bless" and corresponding variants on GitHub pull request pages, accounting for dynamic content and case sensitivity. | |
// @author | |
// @match https://github.com/*/*/pull/* | |
// @grant none | |
// @icon https://github.githubassets.com/favicons/favicon.svg | |
// ==/UserScript== |