- https://jamesthornton.com#EXIWlRrkjKE
- https://twitter.com/Rangers/status/1641554510605611011
- https://twitter.com/astros/status/1641996751618940936
- https://www.youtube.com/watch?v=S7c3lzpDkvQ#7SlILk2WMTI
- https://gist.github.com/espeed/dd3026536ec3d38afea1072941670f52#3ch6eXkQWU8-C5TDc46E1G4-trIjpVH8h88-UcW056B9jeQ-LvG_M_fAkXU
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
// Example using the Neo4j Fulltext Index with Gremlin-Groovy | |
// by James Thornton, http://jamesthornton.com | |
import com.tinkerpop.blueprints.pgm.impls.neo4j.util.Neo4jVertexSequence; | |
import com.tinkerpop.blueprints.pgm.impls.neo4j.util.Neo4jEdgeSequence; | |
Graph g = new Neo4jGraph('/tmp/neo4jmovies'); | |
indexManager = g.getRawGraph().index(); | |
indexConfig = ["provider":"lucene", "type":"fulltext"] |
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
#!/usr/bin/env python | |
def encodeZigZag32(n): return (n << 1) ^ (n >> 31) | |
def encodeZigZag64(n): return (n << 1) ^ (n >> 63) | |
def decodeZigZag32(n): return (n >> 1) ^ -(n & 1) | |
def decodeZigZag64(n): return (n >> 1) ^ -(n & 1) | |
def encodeVInt(n): | |
data = '' | |
while n >= 0x80: |
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
source "http://rubygems.org" | |
gem "janky", "~>0.9" | |
gem "pg" | |
gem "thin" |
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
import java.util.Collection; | |
import org.neo4j.graphalgo.PathFinder; | |
import org.neo4j.graphalgo.impl.path.AllSimplePaths; | |
import org.neo4j.graphalgo.impl.path.ShortestPath; | |
import org.neo4j.graphdb.DynamicRelationshipType; | |
import org.neo4j.graphdb.Expander; | |
import org.neo4j.graphdb.GraphDatabaseService; | |
import org.neo4j.graphdb.Node; | |
import org.neo4j.graphdb.Path; |
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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Done under Visual Studio 2010 using the excelent Python Tools for Visual Studio | |
# http://pytools.codeplex.com/ | |
# | |
# Article on ideas vs execution at: http://blog.databigbang.com/ideas-and-execution-magic-chart/ | |
import urllib2 | |
import json |
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
;; Copyright (c) James Reeves. All rights reserved. | |
;; The use and distribution terms for this software are covered by the Eclipse | |
;; Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) which | |
;; can be found in the file epl-v10.html at the root of this distribution. By | |
;; using this software in any fashion, you are agreeing to be bound by the | |
;; terms of this license. You must not remove this notice, or any other, from | |
;; this software. | |
(ns compojure.server.jetty | |
"Clojure interface to start an embedded Jetty server." |
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
@Test | |
public void testSerliazingMapByMessagePack(){ | |
Map<String, Object> map = new HashMap<String, Object>(); | |
map.put("int", 1); | |
map.put("long", 1L); | |
map.put("date", new Date()); | |
map.put("string", "test"); | |
byte[] buffer = MessagePack.pack(map); | |
for (byte b : buffer) { |
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
# Requirements | |
#sudo apt-get install libcurl4-gnutls-dev # for RCurl on linux | |
#install.packages('RCurl') | |
#install.packages('RJSONIO') | |
library('RCurl') | |
library('RJSONIO') | |
query <- function(querystring) { | |
h = basicTextGatherer() |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; Copyright (c) Rich Hickey. All rights reserved. | |
; The use and distribution terms for this software are covered by the | |
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php) | |
; which can be found in the file CPL.TXT at the root of this distribution. | |
; By using this software in any fashion, you are agreeing to be bound by | |
; the terms of this license. | |
; You must not remove this notice, or any other, from this software. | |
;dimensions of square world |
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
;;(require 'copterj.git-version) ;; Pick up DRY'd version numbers | |
(require 'clojure.contrib.io) ;; Needed to locate newrelic | |
(let [java-agent (str "-javaagent:" (clojure.contrib.io/pwd) "/lib/newrelic.jar")] | |
(defproject apij ~(copterj.git-version/git-describe) | |
:description "Hotelicopter's API" | |
:dependencies | |
[[com.hotelicopter/copterj "1.0.0-SNAPSHOT"] |