This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import requests | |
import pylab as plt | |
URL = 'http://165.227.157.145:8080/api/do_measurement?x={}' | |
FILENAME = 'results.npy' | |
def get_value(x): | |
""" get one value from API """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 100 | |
def run(losi, i, j): | |
l = losi[i] | |
losi.remove(l) | |
return losi[:j] + [l] + losi[j:] | |
losi = range(1, n + 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import matplotlib.pylab as plt | |
def shift(angel, lenght): | |
return math.cos(angel) * lenght, math.sin(angel) * lenght | |
def get_position(wheels): | |
x, y = 0, 0 |