This file contains 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 yoshida.tika_sample; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import org.apache.tika.exception.TikaException; | |
import org.apache.tika.metadata.Metadata; | |
import org.apache.tika.parser.AutoDetectParser; |
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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.concurrent.TimeUnit; | |
public class ExceptionHandler | |
implements Thread.UncaughtExceptionHandler { | |
private final long WAIT_TIME = 60L; | |
@Override public void uncaughtException(Thread thread, Throwable e) { | |
// ------------------------------------------------- | |
// RuntimeException which was throwed in TestListener should handled here, but not. |
This file contains 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 -*- | |
import sys | |
import urllib | |
import urllib2 | |
import json | |
# you need to set your domain endpoints. | |
SEARCH_ENDPOINT = "XXXXX.us-east-1.cloudsearch.amazonaws.com" | |
DOCUMENT_ENDPOINT = "XXXXX.us-east-1.cloudsearch.amazonaws.com" |
This file contains 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> | |
type tail | |
path /opt/solr/solr-4.9.0/example/logs/solr.log | |
pos_file /var/log/td-agent/solr.log.pos | |
tag raw.solr.log | |
format /^(?<loglevel>[^ ]*) (?<hyp>[^ ]*) (?<time>[^ ]* [^ ]*) (?<class>[^ ]*) \[(?<core>[^ ]*)\] webapp=\/(?<webapp>[^ ]*) path=\/(?<path>[^ ]*) params={(?<params>[^ ]*)} hits=(?<hits>[^ ]*) status=(?<status>[^ ]*) QTime=(?<Qtime>[^ ]*) / | |
time_format %Y-%m-%d %H:%M:%S.%L; | |
</source> | |
<match raw.solr.log> |
This file contains 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 | |
# -*- coding: utf-8 -*- | |
import sys | |
import itertools | |
import csv | |
import datetime | |
import time | |
from math import sqrt | |
from operator import add |
OlderNewer