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
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n | |
\n |
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
import Data.Matrix | |
import Data.Maybe | |
import Data.List | |
import Data.Char | |
import Control.Monad | |
import qualified Data.Vector | |
type Puzzle = Matrix (Maybe Int) | |
puzzle = puzzleFromLines |
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
function getRandomInt(min, max) { | |
return Math.floor(Math.random() * (max - min)) + min; | |
} | |
var monty = function(doSwitch) { | |
var tryCount = 10000; | |
var winCount = 0.0; | |
for (var i = 0; i < tryCount; i++) { | |
var car = getRandomInt(0, 3); |
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
SetCapsLockState Off | |
*CapsLock:: | |
key= | |
Input, key, B C L1 T1, {Esc} | |
if (ErrorLevel = "Max") | |
if key { | |
Send {Ctrl Down} | |
Send {Blind}%key% | |
} |
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
import asyncio | |
import sys | |
import socket | |
import signal | |
signal.signal(signal.SIGINT, signal.SIG_DFL) | |
from argparse import ArgumentParser | |
def parse_cl(): |
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
class MinHeap<T> { | |
// op: return true when a should be above b. | |
static fromMutableArr<T>(arr: T[], op: (a: T, b: T) => boolean) { | |
this.heapify(arr, op); | |
return new MinHeap<T>(arr, op); | |
} | |
static heapify<T>(arr: T[], op: (a: T, b: T) => boolean) { | |
let start = parent(arr.length - 1); | |
for (let i = start; i >= 0; i--) { | |
MinHeap.siftDown(arr, i, op); |
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
; From @rhh4x0r on https://gist.github.com/volks73/1e889e01ad0a736159a5d56268a300a8 | |
*CapsLock:: | |
{ | |
Send "{LControl down}" | |
} | |
*CapsLock up:: | |
{ | |
Send "{LControl Up}" |