Skip to content

Instantly share code, notes, and snippets.

bakaiadam

Block or report user

Report or block bakaiadam

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 gist:e5437d4b5a612979d0d499df07c48d3f
convert_files_to_mobi()
{
for i in *.pdf *.djvu *.epub ; do ebook-convert "$i" "${i}.mobi";done
}
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]
@bakaiadam
bakaiadam / a.cpp
Created Oct 18, 2018
probability calculator
View a.cpp
#include <iostream>
#include <cstdlib>
#include <vector>
using namespace std;
double rand_double()
{
return std::rand()/(double)RAND_MAX;
}
@bakaiadam
bakaiadam / gist:ebec49d0f0d97720c6a1cca1f36e12a2
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)
You can’t perform that action at this time.