This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
OlderNewer