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.Arrays; | |
import java.util.Comparator; | |
public class NormalizedGini { | |
private static double gini(double[] a, double[] p, double[] w) { | |
int len = a.length; | |
if (p.length != len || w.length != len) { | |
throw new IllegalArgumentException("array length not equal"); | |
} |
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
<html> | |
<body> | |
<h2>Remove Url Defense</h2> | |
<form method="post" action="fixUrls"> | |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> | |
<tr> | |
<td width="100%">Enter URL Defended Text here: </td> | |
</tr> | |
<tr> |
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 org.apache.commons.io.IOUtils; | |
import org.openrdf.rio.ntriples.NTriplesWriter; | |
import org.openrdf.rio.turtle.TurtleParser; | |
public class TurtleFileParsingExample { | |
public static final String TTL = "@prefix images: <http://www.somepublisher.com/img/> . \n" | |
+ "@prefix isi: <http://www.isi.edu/ikcap/Wingse/fileOntology.owl#> . \n" | |
+ "images:f43240.jpg isi:hasMetadata <http://www.somepublisher.com/ns/m43240> ."; |
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 mvm.rya.api.RdfCloudTripleStoreConfiguration; | |
import mvm.rya.indexing.accumulo.ConfigUtils; | |
import mvm.rya.indexing.accumulo.geo.GeoConstants; | |
import mvm.rya.mongodb.MongoDBRdfConfiguration; | |
import mvm.rya.sail.config.RyaSailFactory; | |
import org.apache.commons.io.IOUtils; | |
import org.apache.hadoop.conf.Configuration; | |
import org.openrdf.model.vocabulary.RDFS; | |
import org.openrdf.query.QueryLanguage; |
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 mvm.rya.indexing.accumulo.temporal; | |
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at |
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
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box" | |
config.vm.provider "virtualbox" do |vb| | |
vb.name = "dev-box" | |
vb.memory = "4096" | |
vb.cpus = 4 | |
end |
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.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.time.LocalDateTime; | |
import java.time.format.DateTimeFormatter; | |
import java.util.Calendar; | |
import java.util.Date; | |
import java.util.GregorianCalendar; | |
public class ParsingExample { |
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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
public class foo { | |
public static void main(String[] args) throws Exception { | |
String long_string = "asdfasdf123456"; | |
String six_string = "123456"; | |
String five_string = "12345"; | |
String one_string = "1"; | |
String empty_string = ""; |