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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: emacs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Description: This file should be placed in /etc/init.d. | |
### END INIT INFO | |
#change this | |
#USERNAME=YourUserName |
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
;;; github-theme.el --- Github color theme for GNU Emacs 24 | |
;; Copyright (C) 2011 Dudley Flanders <[email protected]> | |
;; Author: Dudley Flanders | |
;; Adapted-By: Yesudeep Mangalapilly | |
;; Adapted-By: Joshua Timberman | |
;; Adapted-By: Alejandro Catalina | |
;; Keywords: github color theme | |
;; URL original: http://github.com/dudleyf/color-theme-github |
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 ml-clj.lasso | |
(:require [clojure.algo.generic.math-functions :as math] | |
[clojure.core.matrix :as m] | |
[clojure.core.matrix.operators :as M])) | |
(defn max-lambda | |
[Y X] | |
(second | |
(apply max-key second | |
(map-indexed vector |
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
;; | |
;; linking and capturing | |
;; | |
(defun elfeed-link-title (entry) | |
"Copy the entry title and URL as org link to the clipboard." | |
(interactive) | |
(let* ((link (elfeed-entry-link entry)) | |
(title (elfeed-entry-title entry)) | |
(titlelink (concat "[[" link "][" title "]]"))) |
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
#(take % ((fn rfib [a b] | |
(lazy-seq (cons a (rfib b (+ a b))))) | |
1 1)) |
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
(spaceline-define-segment evil-state-custom (upcase (format "%S" evil-state))) | |
;; Install it along the other segments, place it wherever you want | |
(spaceline-install | |
'(((persp-name workspace-number window-number evil-state-custom) | |
:fallback evil-state | |
:separator "|" | |
:face highlight-face) | |
anzu | |
auto-compile |
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
; http://www.algolist.com/Dijkstra's_algorithm | |
(defn dijkstra [g src] | |
(loop [dsts (assoc (zipmap (keys g) (repeat nil)) src 0) | |
curr src | |
unvi (apply hash-set (keys g))] | |
(if (empty? unvi) | |
dsts | |
(let [unvi (disj unvi curr) | |
nextn (first (sort-by #(% dsts) unvi)) |
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
(defun quicksort-compr (l) | |
(when l | |
(pattern (p . xs) l | |
(append (quicksort-compr (@ x x xs (< x p))) (list p) | |
(quicksort-compr (@ x x xs (>= x p))))))) | |
;; Using https://gist.github.com/AlejandroCatalina/7faaaee84cbda9884600 |
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
(defmacro @ (value bind list test) | |
(let ((newlist (gensym))) | |
`(let ((,newlist nil)) | |
(dolist (,bind ,list) | |
(when ,test | |
(push ,value ,newlist))) | |
(nreverse ,newlist)))) | |
(defmacro pattern (bind l &rest body) | |
`(destructuring-bind ,bind ,l |