Skip to content

Instantly share code, notes, and snippets.

Ed Duarte EdDuarte

Block or report user

Report or block EdDuarte

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
View BirthdayProblem.java
// from guava library
import com.google.common.collect.ContiguousSet;
import com.google.common.collect.DiscreteDomain;
import com.google.common.collect.Range;
// change these two variables
final long nPeople = 23;
final long nDays = 365;
ContiguousSet<Long> matrix = ContiguousSet.create(
View keybase.md

Keybase proof

I hereby claim:

  • I am edduarte on github.
  • I am edduarte (https://keybase.io/edduarte) on keybase.
  • I have a public key ASDbP2LiMvtfE-_kgoAsOfg7Nc5bgXzIgNhxLHf0Yxk3Uwo

To claim this, I am signing this object:

@EdDuarte
EdDuarte / Prime.java
Last active Aug 4, 2019
Primality tests (Trial division, Fermat and Miller-Rabin) in Java.
View Prime.java
/**
* @author Ed Duarte (<a href="mailto:hi@edduarte.com">hi@edduarte.com</a>)
*/
public class Prime {
private java.security.SecureRandom random;
public Prime() {
this.random = new java.security.SecureRandom();
You can’t perform that action at this time.