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
(require 'company) | |
(global-company-mode t) | |
(global-set-key (kbd "s-;") 'company-dabbrev) | |
(global-set-key (kbd "s-:") 'company-complete) | |
(global-auto-complete-mode 0) ;; disable this!!! they fight eachother and it is annoying. |
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
def multi(dispatch_fn): | |
def _inner(*args, **kwargs): | |
return _inner.__multi__.get( | |
dispatch_fn(*args, **kwargs), | |
_inner.__multi_default__ | |
)(*args, **kwargs) | |
_inner.__multi__ = {} | |
_inner.__multi_default__ = lambda *args, **kwargs: None # Default default | |
return _inner |
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 racehub.om.facebook | |
(:require [cljs.core.async :as a] | |
[racehub.schema :as rs] | |
[schema.core :as s :include-macros true])) | |
;; ## Utilities | |
(defn prune | |
"Takes a mapping of keys -> new key names and a map and returns a | |
map with nils removed and keys swapped where they're present in the |
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 schema-client.schema-extensions | |
"Schemas representing abstract classes and subclasses" | |
(:use plumbing.core) | |
(:require | |
[clojure.string :as str] | |
[plumbing.map :as map] | |
[schema.core :as s] | |
[schema.utils :as utils] | |
[schema.macros :as sm])) |
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 selfspy.conf. Put this in your ~/.config/ to use it | |
# with the systemd .service file. | |
# Note: You cannot indent lines in here! | |
# Defaults, used by both selfspy and selfstats. | |
[Defaults] | |
# Don't use quotes around the password, they'd be part of it! | |
# Example: |
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
(sm/defn coupon-lookup | |
"If the code supplied is empty, sends a failed discount on | |
immediately. (This won't affect the rendering, since nothing's | |
shown if the code is blank.) If the code is NOT blank, fires off an | |
Ajax request to the server to look up the discount. | |
TODO: Ideally we'd have a channel that could signal a dissoc, | |
instead of only adding items to the state." | |
[title :- regatta/Title | |
code :- coupon/Code |
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 avi.compose) | |
(declare ^:private splice-form) | |
(defn- splice-normal-form | |
[value form] | |
(apply list (first form) value (rest form))) | |
(defn- splice-if-form | |
[value form] |
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
# Author: Nelle Varoquaux, Andrew Tulloch | |
# Uses the pool adjacent violators algorithm (PAVA), with the | |
# enhancement of searching for the longest decreasing subsequence to | |
# pool at each step. | |
import numpy as np | |
cimport numpy as np | |
cimport cython |
Find it here: https://github.com/bitemyapp/learnhaskell