text
stringlengths
1
93.6k
json = {"license": f"{key}"}
client.put(f"/reg/{id}/account", headers=headers_post, json=json)
json = {"license": f"{license}"}
client.put(f"/reg/{id}/account", headers=headers_post, json=json)
r = client.get(f"/reg/{id}/account", headers=headers_get)
account_type = r.json()["account_type"]
referral_count = r.json()["referral_count"]
license = r.json()["license"]
client.delete(f"/reg/{id}", headers=headers_get)
gkeys.append(license)
print(f"License Key: {license}\nData remaining: +{referral_count}GB over 24.59 petabyte")
except:
print("Error occurred.")
time.sleep(15)
if a % 4 == 0:
time.sleep(30)
os.system('cls' if os.name == 'nt' else 'clear')
print("\033[1;37;40mBelow is the generated key list.")
print("\033[1;37;40mEach key is usable on to a maximum five devices.\n\033[1;37;40mplease copy/paste for later use. \n")
print("\033[1;36;40m#Mahsa_amini")
for x in gkeys:
print(x)
input('\n\033[1;37;40m \n\n\n\n\n\n Any question \033[1;31;40m<<==============>>\033[1;37;40m github.com/NiREvil \n\033[0;30;47m press "Enter" to exit ...')
# <FILESEP>
# A simple example of RMPflow: goal reaching while avoiding obstacles
# @author Anqi Li
# @date April 8, 2019
from rmp import RMPRoot
from rmp_leaf import CollisionAvoidance, GoalAttractorUni
import numpy as np
from numpy.linalg import norm
from scipy.integrate import solve_ivp
import matplotlib.pyplot as plt
import matplotlib.patches as patches
# ---------------------------------------------
# build the rmp tree
x_g = np.array([-3, 3])
x_o = np.array([0, 0])
r_o = 1
r = RMPRoot('root')
leaf1 = CollisionAvoidance('collision_avoidance', r, None, epsilon=0.2)
leaf2 = GoalAttractorUni('goal_attractor', r, x_g)
# ----------------------------------------------
# -----------------------------------------
# possible initial configurations
# x = np.array([-2, -2])
# x_dot = np.array([2.3, 0])
# x = np.array([2, -1])
# x_dot = np.array([1, 0])
# x = np.array([-10, 0])
# x_dot = np.array([-1, 0])
x = np.array([2.5, -3.2])
x_dot = np.array([-1, 1])
# x = np.zeros((2, 1))
# x_dot = np.zeros((2, 1))
# while norm(x) <= 1.1:
# x = np.array([3, -3]) + np.random.randn(2) * 3
# x_dot = np.array([-1, 1])
state_0 = np.concatenate((x, x_dot), axis=None)
# --------------------------------------------
# --------------------------------------------
# dynamics
def dynamics(t, state):
state = state.reshape(2, -1)
x = state[0]
x_dot = state[1]
x_ddot = r.solve(x, x_dot)
state_dot = np.concatenate((x_dot, x_ddot), axis=None)
return state_dot
# --------------------------------------------
# ---------------------------------------------
# solve the diff eq
sol = solve_ivp(dynamics, [0, 40], state_0)
# ---------------------------------------------
# --------------------------------------------