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
function alphabet() { | |
let letter = | |
arguments.length > 0 ? | |
arguments[0] : | |
"a"; | |
let next = String.fromCharCode(letter.charCodeAt(0)+1); | |
return next == "z" ? | |
next : | |
letter + alphabet(next); |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"os" | |
"regexp" | |
"strconv" | |
) |
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
from pupa.scrape import Person, Scraper | |
import lxml.html | |
import re | |
import pdb | |
class IAPersonScraper(Scraper): | |
jurisdiction = 'ia' | |
def scrape(self, chamber=None): |
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
table = mkHashTable 10 | |
table | |
|> insert ("bob", "bob metadata") | |
|> insert ("alice", "alice metadata") | |
|> delete "bob" | |
|> search "bob" |
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
import Data.Char | |
import Data.Monoid | |
zipRot :: Int -> [a] -> [(a, a)] | |
zipRot n xs = | |
let rotXs = (drop n xs) ++ (take n xs) | |
in zip xs rotXs | |
captcha :: (Monoid a, Eq a) => Int -> [a] -> a | |
captcha n xs = |
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
module Monitor exposing (..) | |
import Html exposing (..) | |
{-| Single source of truth | |
-} | |
type alias Model = | |
{ text : String } |
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
import sys | |
import requests as req | |
def get(url) = | |
outputs |> fmap$(print) where: | |
result = url |> req.get | |
status = (result | |
|> .status_code | |
|> "Status Code: {}".format$()) |
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
(ns for-clj.core) | |
;; utils | |
(defn | |
digits [n base] | |
(loop [n n b base acc '()] | |
(let [[q m] ((juxt quot mod) n b) | |
d (/ (* base m) b)] | |
(if (> q 0) |
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
set -g default-terminal "screen-256color" | |
# keybindings | |
set-window-option -g mode-keys vi | |
bind-key -T copy-mode-vi 'v' send -X begin-selection | |
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel | |
# Change the 'leader' key (the prefix by which you 'command' tmux itself rather than type) | |
# -- I hate pressing ctrl all the time, so instead I remap this to the ` key. | |
# Basically for all tmux commands, now type ` followed by the command. |
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
;; -*- mode: emacs-lisp -*- | |
;; This file is loaded by Spacemacs at startup. | |
;; It must be stored in your home directory. | |
(defun dotspacemacs/layers () | |
"Configuration Layers declaration. | |
You should not put any user code in this function besides modifying the variable | |
values." | |
(setq-default | |
;; Base distribution to use. This is a layer contained in the directory |
OlderNewer