Commit 9b7da117 authored by UNHALE NILESH ARUN's avatar UNHALE NILESH ARUN

nilesh had questions

parent 229dbcb5
......@@ -12,7 +12,6 @@
`pip3 install -r requirements.txt `
* Setup
......@@ -24,8 +23,3 @@
### Nilesh doubts:
1 Why start ticking function has a callback arg.?\
2 What does callback do?
3 What simulate do ?
4 What compute range ?
5 node and links
\ No newline at end of file
......@@ -51,7 +51,7 @@ def verifyVRF(pk,hash,proof,seed):
def sortition(sk,seed,rolecount,role,w,badaW,pk):
'''
:param sk: secrete key
:param sk: secret key
:param seed:
:param rolecount: tou
:param role:
......@@ -135,23 +135,23 @@ def verifySort(pk,hash,proof,seed,rolecount,role,w,badaW):
return j
def computeRange():
badaW=10
lastValue = 0;
p = 0.5
x = 0.0023
j = 0
if (x<=stats.binom.pmf(0, badaW, p)):
j = 0
else :
for k in range(0,badaW+1):
lastValue = lastValue + stats.binom.pmf(k, badaW, p)
nextvalue =lastValue+ stats.binom.pmf(k+1, badaW, p)
print(lastValue)
print(nextvalue)
print("------------")
j =j+1
# def computeRange():
# badaW=10
# lastValue = 0;
# p = 0.5
# x = 0.0023
# j = 0
# if (x<=stats.binom.pmf(0, badaW, p)):
# j = 0
# else :
# for k in range(0,badaW+1):
# lastValue = lastValue + stats.binom.pmf(k, badaW, p)
# nextvalue =lastValue+ stats.binom.pmf(k+1, badaW, p)
# print(lastValue)
# print(nextvalue)
# print("------------")
# j =j+1
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment