Skip to content

Instantly share code, notes, and snippets.

View ofey404's full-sized avatar

Ofey Chan ofey404

View GitHub Profile
@ofey404
ofey404 / main.cpp
Created October 23, 2019 23:56
OJ cpp routine
#include <iostream>
using namespace std;
int main() {
return 0;
}
import numpy as np
from numpy.random import poisson
import matplotlib.pyplot as plt
import scipy.misc
import scipy.special
# Poisson distribution
# a discrete probability distribution that expresses the probability of a given
# number of events occurring in a fixed interval of time or space if these
# events occur with a known constant rate and independently of the time since
@ofey404
ofey404 / winning_streak-191015.py
Last active October 16, 2019 03:42
Winning Streak simulation code of Mr. Yu's ML Lecture week 5
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
def three_continous() -> None:
def has_three_continous(possible):
return "111" in possible
all_possible = ["1", "0"]
@ofey404
ofey404 / routine.py
Created March 22, 2019 06:42
minimal python code routine
def main():
pass
if __name__ == "__main__":
main()
@ofey404
ofey404 / min.c
Created March 3, 2019 16:41
minimal routines for c code
#include <stdio.h>
int main(void)
{
}