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/python | |
"""\ | |
A command-line utility that can (re)send all messages in an mbox file | |
to a specific email address, with options for controlling the rate at | |
which they are sent, etc. | |
""" | |
# I got this script from Robin Dunn a few years ago, see | |
# https://github.com/wojdyr/fityk/wiki/MigrationToGoogleGroups |
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
A list of features that we want to see in CouchDB. Needs to be voted on so that it can become a priority queue. | |
User Facing Features | |
==================== | |
1. Conflicts are the rule, not the exception | |
All previous versions of CouchDB hide conflicts by default (selecting | |
an arbitrary but consistent winning revision). Expert users can find | |
and resolve conflicts. |
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
XVFB=/usr/bin/Xvfb | |
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset" | |
PIDFILE=/var/run/xvfb.pid | |
case "$1" in | |
start) | |
echo -n "Starting virtual X frame buffer: Xvfb" | |
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS | |
echo "." | |
;; | |
stop) |
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
;;; this is now in a library: https://github.com/cemerick/shoreleave-remote-ring | |
(ns ^{:doc "Server-side RPC support for use with shoreleave (and maybe fetch?). | |
Mostly copied from https://github.com/shoreleave/shoreleave-remote-noir; | |
changed to eliminate the noir-isms..."} | |
cemerick.cljs.rpc) | |
(def default-remote-uri "/_fetch") | |
(def remotes (atom {})) |
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
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
/* | |
This is our integer linked list type (Null is an empty list) | |
(it is immutable, note the consts) | |
*/ | |
typedef struct IntList_s const * const IntList; |
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
;; using defc from core.logic master | |
;; guarantee that a path of keys does not occur in map x, | |
;; note that the body of a defc is in fact just regular | |
;; Clojure code | |
(defc not-pathc [x path] | |
(= (get-in x path :not-found) :not-found)) | |
(comment |
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
;; (require '[clojure.string :as str] '[clojure.java.shell :as shell] '[taoensso.timbre :as timbre]) | |
(defn with-free-port! | |
"Attempts to kill any current port-binding process, then repeatedly executes | |
nullary `bind-port!-fn` (which must return logical true on successful | |
binding). Returns the function's result when successful, else throws an | |
exception. *nix only. | |
This idea courtesy of Feng Shen, Ref. http://goo.gl/kEolu." | |
[port bind-port!-fn & {:keys [max-attempts sleep-ms] |
Few days ago Mike Anderson wrote [a proposal][mike] for a generic matrix API in Clojure which could compete with NumPy. I wanted to write a similar post for months, but was reluctant to start. This problem is very dear to me. Basically, it is a matter if I can use Clojure for most of my work, or it remains a toy language for me. Thanks to Mike for bringing the question up. Though, I have a different vision of how we should approach arrays and matrices in Clojure.
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
(ns speed-test.core | |
;; Original Java Source | |
(:import LCS)) | |
(set! *warn-on-reflection* true) | |
(defn time-it [num-trials f] | |
(loop [sum-ms 0 trials-left num-trials] | |
(let [start (System/currentTimeMillis)] | |
(f) |
OlderNewer