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

nilesh had questions

parent 229dbcb5
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
`pip3 install -r requirements.txt ` `pip3 install -r requirements.txt `
* Setup * Setup
...@@ -24,8 +23,3 @@ ...@@ -24,8 +23,3 @@
### Nilesh doubts: ### 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): ...@@ -51,7 +51,7 @@ def verifyVRF(pk,hash,proof,seed):
def sortition(sk,seed,rolecount,role,w,badaW,pk): def sortition(sk,seed,rolecount,role,w,badaW,pk):
''' '''
:param sk: secrete key :param sk: secret key
:param seed: :param seed:
:param rolecount: tou :param rolecount: tou
:param role: :param role:
...@@ -135,23 +135,23 @@ def verifySort(pk,hash,proof,seed,rolecount,role,w,badaW): ...@@ -135,23 +135,23 @@ def verifySort(pk,hash,proof,seed,rolecount,role,w,badaW):
return j return j
def computeRange(): # def computeRange():
badaW=10 # badaW=10
lastValue = 0; # lastValue = 0;
p = 0.5 # p = 0.5
x = 0.0023 # x = 0.0023
j = 0 # j = 0
if (x<=stats.binom.pmf(0, badaW, p)): # if (x<=stats.binom.pmf(0, badaW, p)):
j = 0 # j = 0
else : # else :
for k in range(0,badaW+1): # for k in range(0,badaW+1):
lastValue = lastValue + stats.binom.pmf(k, badaW, p) # lastValue = lastValue + stats.binom.pmf(k, badaW, p)
nextvalue =lastValue+ stats.binom.pmf(k+1, badaW, p) # nextvalue =lastValue+ stats.binom.pmf(k+1, badaW, p)
print(lastValue) # print(lastValue)
print(nextvalue) # print(nextvalue)
print("------------") # print("------------")
j =j+1 # 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