Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- msg = [1,0,1,0,1,0,1,1,1,1,1,1,1,0,1,1,1,1,0,0,0,1,1,1,1,1,0,0,1,0]
- def get_new_theta(msg, theta):
- theta=random.randint(40,45)
- new_theta = [theta]
- for a, b in zip(msg[3::5], msg[4::5]):
- new_theta.append(new_theta[-1] + a + b)
- return new_theta
- for i, theta in enumerate(get_new_theta(msg, 1)[:-1]):
- for j in range(5):
- print(theta, msg[i*5+j])
- 44 1
- 44 0
- 44 1
- 44 0
- 44 1
- 45 0
- 45 1
- 45 1
- 45 1
- 45 1
- 47 1
- 47 1
- 47 1
- 47 0
- 47 1
- 48 1
- 48 1
- 48 1
- 48 0
- 48 0
- 48 0
- 48 1
- 48 1
- 48 1
- 48 1
- 50 1
- 50 0
- 50 0
- 50 1
- 50 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement