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 codeiq; | |
import java.util.*; | |
/** | |
* 深さ優先探索を基本戦略とする SQL92 予約語パングラムのソルバーです。 | |
* <p> | |
* 出題は https://codeiq.jp/ace/stakemura/q594 こちら。 | |
* </p> | |
* <pre> |
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
set-option -g prefix C-t | |
bind-key C-t send-prefix | |
set-window-option -g mode-mouse on |
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 org.apache.commons.math3.distribution.ChiSquaredDistribution; | |
import org.apache.commons.math3.stat.inference.ChiSquareTest; | |
import org.hamcrest.BaseMatcher; | |
import org.hamcrest.Description; | |
import java.util.Arrays; | |
import java.util.List; | |
/** | |
* カイ二乗検定を用いた検証を行う BaseMatcher 継承クラスです。 |
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
/** | |
* b-bit Minwise hashing の Java 実装です。 | |
* <p> | |
* 参考文献 : <a href="http://research.microsoft.com/pubs/120078/wfc0398-lips.pdf">b-Bit Minwise Hashing</a> | |
* </p> | |
* | |
* @author KOMIYA Atsushi | |
*/ | |
public class MinHash { | |
private final int numBits; |
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.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Arrays; | |
/** | |
* CodeIQ の問題 [交差点をすばやく数えよう!](https://codeiq.jp/ace/yuki_hiroshi/q432) の回答です。 | |
* | |
* @author KOMIYA Atsushi | |
*/ |
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
# | |
# CodeIQ の問題「予約語から最長のしりとりを作ろう!」 | |
# https://codeiq.jp/ace/stakemura/q408 に対する回答コードです。 | |
# | |
# 出題者による解答例は https://github.com/stakemura/codeiq こちらにあります。 | |
# | |
# | |
# 予約語の最初の 1 文字と最後の 1 文字で構成される 2 文字の | |
# 文字列 (headtail) の頻度を保持します |
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
public class XXHash { | |
private static final int PRIME32_2 = (int) 2246822519L; | |
private static final int PRIME32_3 = (int) 3266489917L; | |
private static final int PRIME32_4 = 668265263; | |
private static final int PRIME32_5 = 374761393; | |
public static int xxHash4ByteLE(int val, int seed) { | |
long h32 = seed + PRIME32_5 + 4; | |
h32 += (val & 0xffffffffL) * PRIME32_3; |
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 twitter4j.Twitter; | |
import twitter4j.TwitterException; | |
import twitter4j.TwitterFactory; | |
import twitter4j.UserList; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.charset.Charset; | |
import java.nio.file.Files; | |
import java.util.List; |
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.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
/** | |
* 処理の再試行をしやすくする機能を提供します。 | |
* | |
* @author KOMIYA Atsushi | |
*/ |