Skip to content

Instantly share code, notes, and snippets.

View siscia's full-sized avatar

Simone Mosciatti siscia

View GitHub Profile
dim(popB[[7]])
sampleA<-sample(popA$id,75, replace=FALSE) # mean(popA)=0.7
sampleB<-sample(popB[[7]]$id, 75, replace=FALSE) # mean(popB[[7]])=0.7
popB7id <- setdiff(popB[[7]]$id, sampleB)
popB7 <- popB[[7]][popB[[7]]$id %in% popB7id, ]
sampleB_pure <- list()
@siscia
siscia / ruby-clojure
Last active August 29, 2015 14:06 — forked from mikel99/ruby-clojure
ruby/clojure
layout title description category tags
post
Manage (Mongodb's) ObjectId and json
clojure
mongo
mongodb
rest
REST

I was writing yet another REST interface in Clojure + MongoDB (this is the last time) and if you have ever mixed this technology there is a little issue that raises every single time.

layout title description category tags
post
Manage (Mongodb's) ObjectId and json
clojure
mongo
mongodb
rest
REST

I was writing yet another REST interface in Clojure + MongoDB (this is the last time) and if you have ever mixed this technology there is a little issues that raise every single time.

(ns project.logging
(:require [clojure.tools.logging :refer [info warn]]
[dire.core :refer [with-pre-hook!]]
[project.destructure :refer :all]))
(with-pre-hook! #'destructure-cow-list
(fn [connection]
(info connection "is listing cows.")))
(with-pre-hook! #'destructure-cow-create