{{ message }}

Instantly share code, notes, and snippets.

Created Oct 18, 2016
kiszámolni bicskónak, hogy mennyi az esélye legalább egy jegyre
View gist:ebec49d0f0d97720c6a1cca1f36e12a2
 #from __future__ import division def calc(emberek,jegyek,beepitettek): prob_to_win=beepitettek/float(emberek) if (jegyek!=1): prob_to_win+=calc(emberek-1,jegyek-1,beepitettek)*(1-prob_to_win); # print prob_to_win return prob_to_win; #print calc(0,0,0)
Created Oct 18, 2018
probability calculator
View a.cpp
 #include #include #include using namespace std; double rand_double() { return std::rand()/(double)RAND_MAX; }
Last active Jul 19, 2019
View a.py
 # generate random Gaussian values from random import seed from random import gauss # seed random number generator seed() # generate some Gaussian values elem=[0,0] cucc=[0,0] nagyobb=[0,0] sum=[0,0]
Created May 29, 2020
useful scripts
View gist:e5437d4b5a612979d0d499df07c48d3f
 convert_files_to_mobi() { for i in *.pdf *.djvu *.epub ; do ebook-convert "\$i" "\${i}.mobi";done }
Created Nov 29, 2020
make html pretty dark
View gist:9f514b332da70c8b822eb82386275c39