op | hash-map | sorted-map | hash-set | sorted-set | vector | queue | list | lazy seq |
---|---|---|---|---|---|---|---|---|
conj | log32n | log2n | log32n | log2n | 1 | 1 | 1 | 1 |
assoc | log32n | log2n | - | - | log32n | - | - | - |
dissoc | log32n | log2n | - | - | - | - | - | - |
disj | - | - | log32n | log2n | - | - | - | - |
nth | - | - | - | - | log32n | n | n | n |
get | log32n | log2n | log32 |
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
# I'm using a Debian 9 image on an n1-standard-1 machine type | |
#----------------------------------------------------------------------------------------------------------------------- | |
# Configuration | |
#----------------------------------------------------------------------------------------------------------------------- | |
# This is the token you get from going to | |
# https://buildkite.com/organizations/your-organization/agents | |
# and clicking Reveal Agent Token | |
BUILDKITE_AGENT_TOKEN=foo |
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
# I use the Amazon Linux 2 AMI on a t3.medium (2 vCPU, 4 GiB memory) instance attached to a 20 GB volume | |
#----------------------------------------------------------------------------------------------------------------------- | |
# Configuration | |
#----------------------------------------------------------------------------------------------------------------------- | |
# This is the token you get from going to | |
# https://buildkite.com/organizations/your-organization/agents | |
# and clicking Reveal Agent Token | |
export BUILDKITE_AGENT_TOKEN=foo |
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
# based on fuzzyset but considerably optimized to focus on trigrams and cosine similarity and be immutable through public | |
# interfaces after initialization | |
import re | |
from math import sqrt | |
from operator import itemgetter | |
from collections import defaultdict | |
_non_word_sub = re.compile(r'[^\w, ]+').sub | |
class TrigramFuzzySet(object): |
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
;; Example usage: | |
;; (cusip "ABCD1234") | |
;; => "ABCD12348" | |
(use '[clojure.string :as string]) | |
(defn clean-cusip | |
"Converts a string into an unchecked 8-character CUSIP, padding with '0' if | |
necessary" | |
[s] |
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
' For when you want to preserve color indices when saving from Excel 2007+ to | |
' .xls format. Copy into PERSONAL.XLS or your worksheet and run with | |
' Alt+F11, Ctrl+G, ColorCells() | |
Private Const StartRow As Integer = 2 | |
Private Const StartCol As Integer = 2 | |
Private Const LastColorIndex As Integer = 56 | |
Public Sub ColorCells() | |
Dim i As Integer |
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
@echo off | |
rem List all running Java processes, excluding useless metrics | |
tasklist /fi "IMAGENAME eq javaw.exe" /fo LIST /v ^ | |
| find /v "Session" ^ | |
| find /v "User" ^ | |
| find /v "CPU" ^ | |
| find /v "Status" | |
echo. | |
:user_input |
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
#!/usr/bin/env ruby | |
# To get a list of available albums: | |
# flickr_set.rb bryanmckelvey | |
# | |
# To download an album: | |
# flickr_set.rb bryanmckelvey "Fall 2011" | |
require "fleakr" | |
# Get an API key at http://www.flickr.com/services/apps/create/apply |
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/sh | |
# Run with | |
# curl -L https://raw.github.com/gist/3275691/changeInput.sh | sh | |
git clone git://gist.github.com/2146751.git changeInput | |
cd changeInput | |
gcc t.m -o changeInput -lobjc -framework foundation -framework carbon | |
cp changeInput ~/bin | |
# Then open Automator and create something like: | |
# Service |
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
% bare minimum Japanese document for Mac | |
% | |
% build with: | |
% latexmk -pdf hoge.tex | |
\documentclass[11pt]{article} | |
\usepackage[top=0.5in, bottom=0.75in, left=0.75in, right=0.75in]{geometry} | |
\usepackage{xltxtra} | |
\XeTeXlinebreaklocale "ja" | |
\setmainfont[Mapping=tex-text]{Hiragino Mincho Pro W3} |
NewerOlder