Skip to content

Instantly share code, notes, and snippets.

Lovro Mažgon lovromazgon

Block or report user

Report or block lovromazgon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lovromazgon
lovromazgon / Apriori.java
Last active Dec 10, 2015 — forked from monperrus/Apriori.java
Java implementation of the Apriori algorithm for mining frequent itemsets - using multiple threads (default 8)
View Apriori.java
import java.io.*;
import java.util.*;
/** The class encapsulates an implementation of the Apriori algorithm to compute frequent itemsets.
*
* This version uses multiple threads to go through the dataset and is therefore 3x faster than the 1 thread version.
*
* Notice: To enable progress tracking (CLIProgressBar) follow these steps:
* 1. download this class and put it on the classpath: https://gist.github.com/lovromazgon/9c801554ceb56157de30
* 2. uncomment lines 229 and 243
@lovromazgon
lovromazgon / Rabbit.java
Last active Feb 9, 2019 — forked from Chase-san/Rabbit.java
Rabbit Stream Cipher
View Rabbit.java
/**
* @see {@link http://tools.ietf.org/rfc/rfc4503.txt}
*/
public class Rabbit {
private static final int[] A = new int[] { 0x4D34D34D, 0xD34D34D3, 0x34D34D34, 0x4D34D34D, 0xD34D34D3, 0x34D34D34, 0x4D34D34D, 0xD34D34D3 };
private static final long MAX_UNSIGNED_INT = Integer.MAX_VALUE * 2l + 2; //2^32
private static final boolean DEBUG = false;
private int[] X;
private int[] C;
You can’t perform that action at this time.