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 io.github.coderodde.math.prob.timebayes; | |
| public final class TimeDependentBayesJava { | |
| public static interface IntervalEvent { | |
| public abstract double probability(double t); | |
| } | |
| public static final IntervalEvent EVENT_B = |
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 io.github.coderodde.math; | |
| import java.math.BigInteger; | |
| /** | |
| * This class provides some facilities for computing binomials with arbitrary | |
| * precision. | |
| */ | |
| public final class FastBigIntegerBinomial { |
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
| from collections import deque | |
| # The start cell in (0, 0) should be 1 for funniness: | |
| m = [[0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 0, 0], | |
| [0, 0, 0, 0, 1, 0], | |
| [0, 0, 1, 0, 0, 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
| package io.github.coderodde.textui.components; | |
| import java.io.IOException; | |
| import org.jline.terminal.Terminal; | |
| import org.jline.terminal.TerminalBuilder; | |
| /** | |
| * This class implements a simple text UI progress bar. | |
| */ | |
| public final class DualTextProgressBar { |
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.math.BigDecimal; | |
| import java.util.*; | |
| public class Test1 { | |
| private static double computeMean1(double... values) { | |
| double sum = 0.0; | |
| for (double x : values) { | |
| sum += x; | |
| } |
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
| java -jar target\WikiGameKiller.java-1.0.0.jar --source https://en.wikipedia.org/wiki/Audi --target https://en.wikipedia.org/wiki/Hiisi --expansion-timeout 5000000000 --forward-threads 512 --backward-threads 512 --master-trials 1000 --master-sleep-duration 50000000 --slave-sleep-duration 100000000 --stats --out ..\index.html | |
| java -jar target\WikiGameKiller.java-1.0.0.jar --source https://en.wikipedia.org/wiki/Johnny_Depp --target https://en.wikipedia.org/wiki/Bugatti --expansion-timeout 10000000000 --forward-threads 512 --backward-threads 512 --master-trials 1000 --master-sleep-duration 50000000 --slave-sleep-duration 100000000 --stats --out ..\index.html |
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 time | |
| class ListNode(): | |
| def __init__(self, datum): | |
| self.datum = datum | |
| self.next = None | |
| class LinkedList(): |
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
| from collections import defaultdict | |
| from typing import DefaultDict, Generic, Iterator, Optional, TypeVar | |
| T = TypeVar("T") | |
| class Node(Generic[T]): | |
| __slots__ = ("data", "bottom") | |
| def __init__(self, value : T, bottom: Optional["Node[T]"] = None) -> None: |
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 viikko5; | |
| import java.util.Objects; | |
| public final class Fraction implements Comparable<Fraction> { | |
| public static final Fraction ZERO = new Fraction(0); | |
| private final long numerator; | |
| private final long denominator; |
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 viikko4; | |
| // https://github.com/coderodde/DiscreteRandomVariables.java | |
| import io.github.coderodde.prob.randomvariables.support.BinomialDistribution; | |
| import io.github.coderodde.prob.randomvariables.support.PoissonDistribution; | |
| import java.math.BigDecimal; | |
| import java.math.RoundingMode; | |
| public class Tehtavat4 { |
NewerOlder