Skip to content

Instantly share code, notes, and snippets.

View ihodes's full-sized avatar

Isaac Hodes ihodes

View GitHub Profile
(ns cljson-shootout.core
(:require cheshire.core clj-json.core clojure.data.json
[criterium.core :refer :all]))
(def +json+ "{\"apple\":\"pie\", \"banana\":{\"qwertyuiopasdfghjklzxcvbnm,\":100, \"askdfj adlskfj\":[1,2,3,4,5,1,2,3,4,1,2,3,4,3,3,2,2,2,2,2,2,2,\"Whoa there!\"]}, \"anarray\":[893172,19203809,12093810928309123,1237732,123,0.111]}")
(defn cheshire-test
import subprocess
def maven_dependencies():
output = subprocess.check_output(["mvn", "dependency:build-classpath"])
output = output.split('\n')
deps = set()
# coding: utf-8
import json
import os
import sys
import vcf
from collections import defaultdict
;;; python-settings
;;; requires modes: ein python jedi
;; if not in ipython notebook mode allows sending to ipython server from buffer (C-c C-c)
;; (switch to shell with C-c C-z)
(setq
python-shell-interpreter "ipython"
(global-set-key (kbd "M-/") 'hippie-expand)
(global-set-key (kbd "C-x C-b") 'ibuffer)
(global-set-key (kbd "C-s") 'isearch-forward-regexp)
(global-set-key (kbd "C-r") 'isearch-backward-regexp)
(global-set-key (kbd "C-c r") 'replace-regexp)
(global-set-key (kbd "C-x C-u") 'undo-tree-undo)
(global-set-key (kbd "C-x C-r") 'undo-tree-redo)
  1. Install JDK 1.7 from oracle (http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html)
  2. Install IntelliJ (community edition is fine)
  1. Launch, Configure (option on splash screen) -> Plugins -> search for Scala (http://link.isaachodes.io/image/1g1P0K2G1i2A) and install, apply + restart
  2. Clone github repo of ADAM https://github.com/bigdatagenomics/adam (git clone git@github.com:bigdatagenomics/adam.git)
  3. Import project in intellij--choose the cloned repo, then the pom.xml in it to make sure the maven deps and build are imported by IntelliJ (http://link.isaachodes.io/image/3S1X2U2a0V3R)
  • follow the wizard, which should set things up intelligently
# example .ensime generation
# Maven to Ensime config. convertor:
#
# Prints .ensime configuration for Maven project.
#
# USAGE:
# mvn-ensime PROJECT_NAME PROJECT_PACKAGE ROOT_DIR TARGET_DIR SOURCE_DIRS*
#
python mvn-ensime.py adam org.bdgenomics.adam \
<html>
<head>
<style>
.node circle {
fill: white;
stroke: steelblue;
stroke-width: 1.5px;
}
.node {
<html>
<head>
<style>
.node circle {
fill: white;
stroke: steelblue;
stroke-width: 1.5px;
}
.node {
<html>
<head>
<style>
.node circle {
fill: white;
stroke: steelblue;
stroke-width: 1.5px;
}
.node {