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
package models; | |
import java.util.Date; | |
import java.util.List; | |
import java.util.Set; | |
import java.util.UUID; | |
import javax.persistence.Entity; | |
import javax.persistence.GeneratedValue; | |
import javax.persistence.GenerationType; |
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
{ | |
"max_variables": 3, | |
"functions": { | |
"0": "-age" | |
}, | |
"index_code": "dgmqn", | |
"allows_facets": true, | |
"ram": 600, | |
"log_server_host": "index123.localhost", | |
"autocomplete": true, |
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
package storm.starter.bolt; | |
import java.util.Collections; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.Set; | |
import java.util.Timer; | |
import java.util.TimerTask; | |
import org.joda.time.DateTime; |
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
object MD5 { | |
def hash(s: String) = { | |
val m = java.security.MessageDigest.getInstance("MD5") | |
val b = s.getBytes("UTF-8") | |
m.update(b, 0, b.length) | |
new java.math.BigInteger(1, m.digest()).toString(16) | |
} | |
} |
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
// This is a sample of handling collections with Scala | |
// It receives the .xml from your delicious account and generates an output to plot | |
// the count of tags on a timeframe | |
// | |
// Please, if you know better ways to do the same processing, please let me know: @arjones | |
// | |
import scala.xml._ | |
import org.joda.time._ |
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
.DS_Store | |
tmp/ |
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
.DS_Store | |
tmp/ |
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
package net.arjones.sandbox; | |
import net.lag.configgy.Config; | |
import net.lag.kestrel.PersistentQueue; | |
public class KestrelTest { | |
public static void main(String[] args) throws InterruptedException { | |
Config config = new Config(); |
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
#Author: Marcel Pinheiro Caraciolo | |
#Confusion Matrix Generator | |
#Version: 0.1 | |
#email: caraciol at gmail . com | |
from pprint import pprint as _pretty_print | |
import math | |
class ConfusionMatrix(object): |
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 'benchmark' | |
require 'logger' | |
class Module | |
def alias_method_chain( target, feature ) | |
alias_method "#{target}_without_#{feature}", target | |
alias_method target, "#{target}_with_#{feature}" | |
end | |
end unless Module.public_method_defined?(:alias_method_chain) |