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 <libcouchstore/couch_db.h> | |
#include "internal.h" | |
#include <stdio.h> | |
#include <vector> | |
#include <stdlib.h> | |
#include "util.h" | |
#include "couch_btree.h" | |
#include "bitfield.h" | |
#include <iostream> | |
#include <numeric> |
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 <stdio.h> | |
#ifndef __cplusplus | |
#define true 1 | |
#define false 0 | |
#endif | |
int check_utf8(unsigned const char* data, size_t length) { | |
int expect_extend = 0; | |
unsigned const char* end = data + length; |
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 <stdio.h> | |
#include <stdint.h> | |
#include <stddef.h> | |
#ifndef __cplusplus | |
#define true 1 | |
#define false 0 | |
#endif | |
int check_utf8(unsigned const char* data, size_t length) { |
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
(defproject glassnoat "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:main glassnoat.core | |
:dependencies [[org.clojure/clojure "1.4.0"] | |
[clojurewerkz/spyglass "1.1.0-SNAPSHOT"]]) |
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 cascacb.test | |
(:use cascalog.api) | |
(:require [cascalog.ops :as c] | |
[cbdrawer.client :as cb] | |
[cbdrawer.transcoders :refer [json-transcoder]] | |
[cascacb.tap :refer [cbtap]])) | |
;; Enhance the "beer-sample" dataset that comes with couchbase. | |
(defn update-abv-averages [] | |
(cb/set-transcoder! json-transcoder) |
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/env python | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from numexpr import evaluate | |
from math import pi | |
def testset(): | |
count = 450 | |
rcoords = np.random.rand(count, 3) | |
rcoords[:,2] = rcoords[:,2] * 0.005 + 0.005 |
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
test: test.cc | |
${CXX} -o test test.cc `llvm-config --libs` |
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
function newns { | |
if [ ! -e project.clj ]; then | |
echo "Not in a project directory." | |
return 1 | |
fi | |
local filename=src/$(echo $1 | tr .- /_).clj | |
local dir=$(dirname $filename) | |
mkdir -p $dir | |
if [ ! -e $filename ]; then | |
echo "(ns $1)" > $filename |
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
package keylist; | |
import com.couchbase.client.TapClient; | |
import net.spy.memcached.tapmessage.TapMagic; | |
import net.spy.memcached.tapmessage.TapOpcode; | |
import net.spy.memcached.tapmessage.TapRequestFlag; | |
import net.spy.memcached.tapmessage.RequestMessage; | |
import net.spy.memcached.tapmessage.ResponseMessage; | |
import java.net.URI; | |
import java.util.ArrayList; |
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
package dumper; | |
import com.couchbase.client.TapClient; | |
import net.spy.memcached.tapmessage.ResponseMessage; | |
import java.net.URI; | |
import java.util.ArrayList; | |
import java.util.zip.InflaterOutputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.ByteArrayInputStream; |