Skip to content

Instantly share code, notes, and snippets.

*** distro/shark-0.9.1/project/SharkBuild.scala 2014-04-09 01:57:26.000000000 -0700
--- shark-0.9.1/project/SharkBuild.scala 2014-06-16 19:16:24.640170412 -0700
***************
*** 201,206 ****
--- 201,207 ----
// See https://code.google.com/p/guava-libraries/issues/detail?id=1095
"com.google.code.findbugs" % "jsr305" % "1.3.+",
+ "co.paralleluniverse" % "quasar-core" % "0.5.0",
// Hive unit test requirements. These are used by Hadoop to run the tests, but not necessary
@mikebern
mikebern / eb-patch
Created June 10, 2014 23:47
EB Patch
diff --git hive/src/main/java/com/twitter/elephantbird/hive/serde/ProtobufStructObjectInspector.java hive/src/main/java/com/twitter/elephantbird/hive/serde/ProtobufStructObjectInspector.java
index 9649f0d..fd9a65d 100644
--- hive/src/main/java/com/twitter/elephantbird/hive/serde/ProtobufStructObjectInspector.java
+++ hive/src/main/java/com/twitter/elephantbird/hive/serde/ProtobufStructObjectInspector.java
@@ -160,7 +160,7 @@ public final class ProtobufStructObjectInspector extends SettableStructObjectIns
java.util.List values = (java.util.List) fieldValue;
int i = 0;
for (Object value : values) {
- builder.setRepeatedField(descriptor.findFieldByName(field.getFieldName()), i++, value);
+ builder.addRepeatedField(descriptor.findFieldByName(field.getFieldName()), value);
@mikebern
mikebern / screenify
Last active January 11, 2022 21:35
Screenify. Couple minor glitches are fixed: 1. line 1 - use bash, instead of sh. 2. here-docs were not properly terminated.
#!/bin/bash
#
# Trick process(es) to talk to current terminal
#
# Copyright (c) 2004, 2005 Timo Lindfors <timo.lindfors@iki.fi>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
@mikebern
mikebern / gist:5251965
Created March 27, 2013 05:38
Parse trees using Prolog
%
% parses given sentence, outputs and draws all possible parse trees
% example is from Coursera NLP course by Michael Collins
%
% tested with gprolog
% to compile: gplc --no-top-level parse_tree.pl
% ignore alignment warnings
% to run: ./parse_tree
%