hexsha
string | size
int64 | ext
string | lang
string | max_stars_repo_path
string | max_stars_repo_name
string | max_stars_repo_head_hexsha
string | max_stars_repo_licenses
list | max_stars_count
int64 | max_stars_repo_stars_event_min_datetime
string | max_stars_repo_stars_event_max_datetime
string | max_issues_repo_path
string | max_issues_repo_name
string | max_issues_repo_head_hexsha
string | max_issues_repo_licenses
list | max_issues_count
int64 | max_issues_repo_issues_event_min_datetime
string | max_issues_repo_issues_event_max_datetime
string | max_forks_repo_path
string | max_forks_repo_name
string | max_forks_repo_head_hexsha
string | max_forks_repo_licenses
list | max_forks_count
int64 | max_forks_repo_forks_event_min_datetime
string | max_forks_repo_forks_event_max_datetime
string | content
string | avg_line_length
float64 | max_line_length
int64 | alphanum_fraction
float64 | qsc_code_num_words_quality_signal
int64 | qsc_code_num_chars_quality_signal
float64 | qsc_code_mean_word_length_quality_signal
float64 | qsc_code_frac_words_unique_quality_signal
float64 | qsc_code_frac_chars_top_2grams_quality_signal
float64 | qsc_code_frac_chars_top_3grams_quality_signal
float64 | qsc_code_frac_chars_top_4grams_quality_signal
float64 | qsc_code_frac_chars_dupe_5grams_quality_signal
float64 | qsc_code_frac_chars_dupe_6grams_quality_signal
float64 | qsc_code_frac_chars_dupe_7grams_quality_signal
float64 | qsc_code_frac_chars_dupe_8grams_quality_signal
float64 | qsc_code_frac_chars_dupe_9grams_quality_signal
float64 | qsc_code_frac_chars_dupe_10grams_quality_signal
float64 | qsc_code_frac_chars_replacement_symbols_quality_signal
float64 | qsc_code_frac_chars_digital_quality_signal
float64 | qsc_code_frac_chars_whitespace_quality_signal
float64 | qsc_code_size_file_byte_quality_signal
float64 | qsc_code_num_lines_quality_signal
float64 | qsc_code_num_chars_line_max_quality_signal
float64 | qsc_code_num_chars_line_mean_quality_signal
float64 | qsc_code_frac_chars_alphabet_quality_signal
float64 | qsc_code_frac_chars_comments_quality_signal
float64 | qsc_code_cate_xml_start_quality_signal
float64 | qsc_code_frac_lines_dupe_lines_quality_signal
float64 | qsc_code_cate_autogen_quality_signal
float64 | qsc_code_frac_lines_long_string_quality_signal
float64 | qsc_code_frac_chars_string_length_quality_signal
float64 | qsc_code_frac_chars_long_word_length_quality_signal
float64 | qsc_code_frac_lines_string_concat_quality_signal
float64 | qsc_code_cate_encoded_data_quality_signal
float64 | qsc_code_frac_chars_hex_words_quality_signal
float64 | qsc_code_frac_lines_prompt_comments_quality_signal
float64 | qsc_code_frac_lines_assert_quality_signal
float64 | qsc_codepython_cate_ast_quality_signal
float64 | qsc_codepython_frac_lines_func_ratio_quality_signal
float64 | qsc_codepython_cate_var_zero_quality_signal
bool | qsc_codepython_frac_lines_pass_quality_signal
float64 | qsc_codepython_frac_lines_import_quality_signal
float64 | qsc_codepython_frac_lines_simplefunc_quality_signal
float64 | qsc_codepython_score_lines_no_logic_quality_signal
float64 | qsc_codepython_frac_lines_print_quality_signal
float64 | qsc_code_num_words
int64 | qsc_code_num_chars
int64 | qsc_code_mean_word_length
int64 | qsc_code_frac_words_unique
null | qsc_code_frac_chars_top_2grams
int64 | qsc_code_frac_chars_top_3grams
int64 | qsc_code_frac_chars_top_4grams
int64 | qsc_code_frac_chars_dupe_5grams
int64 | qsc_code_frac_chars_dupe_6grams
int64 | qsc_code_frac_chars_dupe_7grams
int64 | qsc_code_frac_chars_dupe_8grams
int64 | qsc_code_frac_chars_dupe_9grams
int64 | qsc_code_frac_chars_dupe_10grams
int64 | qsc_code_frac_chars_replacement_symbols
int64 | qsc_code_frac_chars_digital
int64 | qsc_code_frac_chars_whitespace
int64 | qsc_code_size_file_byte
int64 | qsc_code_num_lines
int64 | qsc_code_num_chars_line_max
int64 | qsc_code_num_chars_line_mean
int64 | qsc_code_frac_chars_alphabet
int64 | qsc_code_frac_chars_comments
int64 | qsc_code_cate_xml_start
int64 | qsc_code_frac_lines_dupe_lines
int64 | qsc_code_cate_autogen
int64 | qsc_code_frac_lines_long_string
int64 | qsc_code_frac_chars_string_length
int64 | qsc_code_frac_chars_long_word_length
int64 | qsc_code_frac_lines_string_concat
null | qsc_code_cate_encoded_data
int64 | qsc_code_frac_chars_hex_words
int64 | qsc_code_frac_lines_prompt_comments
int64 | qsc_code_frac_lines_assert
int64 | qsc_codepython_cate_ast
int64 | qsc_codepython_frac_lines_func_ratio
int64 | qsc_codepython_cate_var_zero
int64 | qsc_codepython_frac_lines_pass
int64 | qsc_codepython_frac_lines_import
int64 | qsc_codepython_frac_lines_simplefunc
int64 | qsc_codepython_score_lines_no_logic
int64 | qsc_codepython_frac_lines_print
int64 | effective
string | hits
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d62e4743038fffd2a8a1156bb48d0232552671d3
| 257
|
py
|
Python
|
tests/utils.py
|
ireneontheway5/pymilvus
|
b812449a98602b4370b3b3430bdeb18b24035e53
|
[
"Apache-2.0"
] | 1
|
2020-03-03T07:55:16.000Z
|
2020-03-03T07:55:16.000Z
|
tests/utils.py
|
ireneontheway5/pymilvus
|
b812449a98602b4370b3b3430bdeb18b24035e53
|
[
"Apache-2.0"
] | null | null | null |
tests/utils.py
|
ireneontheway5/pymilvus
|
b812449a98602b4370b3b3430bdeb18b24035e53
|
[
"Apache-2.0"
] | 3
|
2019-11-06T08:28:58.000Z
|
2020-04-24T09:58:54.000Z
|
import grpc
class MockGrpcError(grpc.RpcError):
def __init__(self, code=1, details="error"):
self._code = code
self._details = details
def code(self):
return self._code
def details(self):
return self._details
| 18.357143
| 48
| 0.63035
| 31
| 257
| 4.967742
| 0.419355
| 0.155844
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005348
| 0.272374
| 257
| 13
| 49
| 19.769231
| 0.818182
| 0
| 0
| 0
| 0
| 0
| 0.019455
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.111111
| 0.222222
| 0.777778
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
d643904a2ca9672ab7f9b2864175a821506cb3de
| 28,178
|
py
|
Python
|
main.py
|
Gunjanph/Brick-Breaker
|
a8c46a791a7bba752d182231f41c00e223a65b7d
|
[
"MIT"
] | null | null | null |
main.py
|
Gunjanph/Brick-Breaker
|
a8c46a791a7bba752d182231f41c00e223a65b7d
|
[
"MIT"
] | null | null | null |
main.py
|
Gunjanph/Brick-Breaker
|
a8c46a791a7bba752d182231f41c00e223a65b7d
|
[
"MIT"
] | null | null | null |
import signal
import os
import time
import subprocess
from random import randrange, randint
import numpy as np
from colorama import init, Fore, Back
init()
from input import Get, input_to
from board import Board
from paddle import Paddle
from ball import Ball
from bricks import Brick, UnbreakableBrick
from config import Config
from explode import Explode
from powerup import Powerup
from expand import Expand
from shrink import Shrink
from fast import Fast
from grab import Grab
from thru import Thru
from bullet import Bullet
from bullets import Bullets
from falling import Falling_Brick
from rainbow import Rainbow_Brick
from boss import Boss
from bomb import Bomb
obj_board = Board(30,110)
obj_board.create_board()
obj_config = Config()
row = 1 #how much fall the brick
flag = 0
rainbow_flag = 0
health_flag = 0
obj_paddle = Paddle(28,47,1)
obj_paddle.starting_position(obj_board.matrix)
ball_y = randrange(47,53)
# ball_y = 50
obj_ball = Ball(27,ball_y,1)
obj_ball.starting_position(obj_board.matrix)
obj_brick = Brick()
obj_brick.appear_brick(obj_board.matrix, 1, 0)
# obj_brick2 = Brick2()
# obj_brick2.appear_brick2(obj_board.matrix)
# obj_brick3 = Brick3()
# obj_brick3.appear_brick3(obj_board.matrix)
obj_unbrick = UnbreakableBrick()
obj_unbrick.appear_unb(obj_board.matrix,1)
obj_explode = Explode()
obj_explode.exappear_brick(obj_board.matrix, obj_config.level)
obj_fall = Falling_Brick()
obj_rainbow = Rainbow_Brick()
obj_rainbow.rainbow_appear_brick(obj_board)
obj_boss = Boss(2, 31, 1)
# obj_powerup = Powerup()
powerup_list = []
start_powerup = []
active_powerup = []
brick_flag = []
laser = []
bombs = []
get = Get()
obj_ball.vely = 0
def find_line(point1, point2):
return np.cross(list(point1)+[1], list(point2)+[1])
# point1 = (0,0)
# point2 = (2,3)
# point2 = (0,4)
def find_points(point1, point2):
a,b,c = find_line(point1,point2)
# print(a,b,c)
x1,y1 = point1
x2,y2 = point2
xv = 2*(x1<x2)-1
yv = 2*(y1<y2)-1
points = []
if abs(x1-x2) > abs(y1-y2):
for x in range(x1,x2+xv,xv):
y = -(a*x + c)/b
points.append((x,int(y)))
if(y - int(y) != 0):
points.append((x,int(y)+1))
else:
for y in range(y1,y2+yv,yv):
x = -(b*y + c)/a
points.append((int(x),y))
if(x - int(x) != 0):
points.append((int(x)+1,y))
points.sort(key = lambda x: x[0], reverse=(xv==-1))
return points
# points = find_points(point1, point2, 1)
# print(points)
def reposition():
# obj_ball.y = randrange(47,53)
obj_ball.y = 50
obj_paddle.y = 47
obj_paddle.x = 28
obj_ball.x = 27
obj_ball.number = 1
obj_ball.vely = 0
obj_ball.velx = 0
obj_paddle.starting_position(obj_board.matrix)
obj_ball.starting_position(obj_board.matrix)
for i in range(len(active_powerup)):
if active_powerup[i][0].number == 1:
obj_paddle.disappear_paddle(obj_board)
obj_paddle.expand()
obj_paddle.reappear_paddle(obj_board)
if active_powerup[i][0].number == 2:
obj_paddle.disappear_paddle(obj_board)
obj_paddle.shrink()
obj_paddle.reappear_paddle(obj_board)
if active_powerup[i][0].number == 3:
if obj_ball.velx < 0 and obj_ball.velx >= -1:
obj_ball.velx += 1
if obj_ball.velx > 0 and obj_ball.velx <= 1:
obj_ball.velx -= 1
if active_powerup[i][0].number == 4:
obj_ball.active = 0
if active_powerup[i][0].number == 5:
obj_ball.thruactive = 0
if active_powerup[i][0].number == 6:
obj_config.bullet = 0
active_powerup.clear()
def powup(numb, x, y):
if numb == 1:
# quit()
obj_shrink = Shrink(x, y)
obj_shrink.starting_position(obj_board.matrix, x, y)
powerup_list.append(obj_shrink)
start_powerup.append(obj_shrink)
elif numb == 2:
# quit()
obj_expand = Expand(x, y)
obj_expand.starting_position(obj_board.matrix, x, y)
powerup_list.append(obj_expand)
start_powerup.append(obj_expand)
elif numb == 3:
# quit()
obj_fast = Fast(x, y)
obj_fast.starting_position(obj_board.matrix, x, y)
powerup_list.append(obj_fast)
start_powerup.append(obj_fast)
elif numb == 4:
obj_grab = Grab(x, y)
obj_grab.starting_position(obj_board.matrix, x, y)
powerup_list.append(obj_grab)
start_powerup.append(obj_grab)
elif numb == 5:
obj_thru = Thru(x, y)
obj_thru.starting_position(obj_board.matrix, x, y)
powerup_list.append(obj_thru)
start_powerup.append(obj_thru)
elif numb == 6:
obj_bullet = Bullet(x, y)
obj_bullet.starting_position(obj_board.matrix, x, y)
powerup_list.append(obj_bullet)
start_powerup.append(obj_bullet)
def impartpowerup():
for i in range(len(start_powerup)):
start_powerup[i].disappear(obj_board)
if obj_ball.velx>0:
start_powerup[i].x = 0
else:
start_powerup[i].x-=obj_ball.velx
start_powerup[i].y+=obj_ball.vely
start_powerup[i].vely = obj_ball.vely
if obj_board.matrix[start_powerup[i].x][start_powerup[i].y] == "X" or isinstance(obj_board.matrix[start_powerup[i].x][start_powerup[i].y], int)==True:
print("in if")
brick_flag.append((start_powerup[i].x,start_powerup[i].y, obj_board.matrix[start_powerup[i].x][start_powerup[i].y]))
start_powerup[i].reappear(obj_board)
start_powerup.pop(i)
def movepowerup():
for i in range(len(powerup_list)):
if powerup_list[i].x + powerup_list[i].velx < 28:
if powerup_list[i].y + powerup_list[i].vely >= 109 or powerup_list[i].y + powerup_list[i].vely <= 0:
powerup_list[i].vely = -powerup_list[i].vely
if powerup_list[i].x + powerup_list[i].velx <= 0:
powerup_list[i].velx = -powerup_list[i].velx
powerup_list[i].disappear(obj_board)
for j in range(len(brick_flag)):
if brick_flag[j][0] == powerup_list[i].x and brick_flag[j][1] == powerup_list[i].y:
print("in loop")
obj_board.matrix[powerup_list[i].x][powerup_list[i].y] = brick_flag[j][2]
brick_flag.pop(j)
powerup_list[i].x += powerup_list[i].velx
powerup_list[i].y += powerup_list[i].vely
if obj_board.matrix[powerup_list[i].x][powerup_list[i].y] == "X" or isinstance(obj_board.matrix[powerup_list[i].x][powerup_list[i].y], int)==True:
brick_flag.append((powerup_list[i].x,powerup_list[i].y, obj_board.matrix[powerup_list[i].x][powerup_list[i].y]))
powerup_list[i].reappear(obj_board)
else:
powerup_list[i].disappear(obj_board)
powerup_list.pop(i)
def endpowerup():
for i in range(len(active_powerup)):
if(time.time()-active_powerup[i][1] >= active_powerup[i][0].time):
if active_powerup[i][0].number == 1:
obj_paddle.disappear_paddle(obj_board)
obj_paddle.expand()
obj_paddle.reappear_paddle(obj_board)
if active_powerup[i][0].number == 2:
obj_paddle.disappear_paddle(obj_board)
obj_paddle.shrink()
obj_paddle.reappear_paddle(obj_board)
if active_powerup[i][0].number == 3:
if obj_ball.velx < 0 and obj_ball.velx >= -1:
obj_ball.velx += 1
if obj_ball.velx > 0 and obj_ball.velx <= 1:
obj_ball.velx -= 1
if active_powerup[i][0].number == 4:
obj_ball.active = 0
if active_powerup[i][0].number == 5:
obj_ball.thruactive = 0
if active_powerup[i][0].number == 6:
obj_config.bullet = 0
active_powerup.pop(i)
break;
else:
if active_powerup[i][0].number == 6:
return 10 - round(time.time())+round(active_powerup[i][1])
def shoot():
x = 27
y = obj_paddle.y+1
obj_bullets = Bullets(x,y,1)
obj_bullets.starting_position(obj_board.matrix, x, y)
laser.append(obj_bullets)
def bossbomb():
x = obj_boss.x+8
y = obj_boss.y+19
obj_bomb = Bomb(x,y,1)
obj_bomb.starting_position(obj_board.matrix, x, y)
bombs.append(obj_bomb)
def movepaddle():
char = input_to(get)
# print(char)
bx = obj_ball.get_x()
bay = obj_ball.get_y()
by = obj_ball.get_velx()
vely = obj_ball.get_vely()
py = obj_paddle.get_y()
length = obj_paddle.get_len()
if char == 'q':
print("QUIT :(")
quit()
if char == 'd':
move_right = obj_paddle.right_collision(bx, by)
# print(bx, by)
if(move_right == 2):
# obj_ball.direction = 1
# obj_ball.disappear_ball(obj_board)
# obj_ball.y+=1
# obj_ball.reappear_ball(obj_board)
if obj_config.level == 1 or obj_config.level == 2:
obj_paddle.direction = 1
obj_paddle.disappear_paddle(obj_board)
obj_paddle.y+=2
obj_paddle.reappear_paddle(obj_board)
if obj_config.level == 3:
if obj_paddle.y<92:
obj_paddle.direction = 1
obj_paddle.disappear_paddle(obj_board)
obj_paddle.y+=2
obj_paddle.reappear_paddle(obj_board)
if(obj_boss.y+39 <= 107):
obj_boss.disappear_boss(obj_board)
obj_boss.y += 2
obj_boss.appear_boss(obj_board)
# print(obj_paddle.y)
if(move_right == 1):
if obj_config.level == 1 or obj_config.level == 2:
obj_ball.direction = 1
obj_ball.disappear_ball(obj_board)
obj_ball.y+=2
obj_ball.reappear_ball(obj_board)
obj_paddle.direction = 1
obj_paddle.disappear_paddle(obj_board)
obj_paddle.y+=2
obj_paddle.reappear_paddle(obj_board)
if obj_config.level == 3:
if obj_paddle.y<95:
obj_ball.direction = 1
obj_ball.disappear_ball(obj_board)
obj_ball.y+=2
obj_ball.reappear_ball(obj_board)
obj_paddle.direction = 1
obj_paddle.disappear_paddle(obj_board)
obj_paddle.y+=2
obj_paddle.reappear_paddle(obj_board)
# print(obj_paddle.y)
if(obj_boss.y+39 <= 107):
obj_boss.disappear_boss(obj_board)
obj_boss.y += 2
obj_boss.appear_boss(obj_board)
if char == 'a':
move_left = obj_paddle.left_collision(bx, by)
if(move_left == 2):
if obj_config.level == 1 or obj_config.level == 2:
obj_paddle.direction = -1
obj_paddle.disappear_paddle(obj_board)
obj_paddle.y-=2
obj_paddle.reappear_paddle(obj_board)
if obj_config.level == 3:
if obj_paddle.y<90:
obj_paddle.direction = -1
obj_paddle.disappear_paddle(obj_board)
obj_paddle.y-=2
obj_paddle.reappear_paddle(obj_board)
if(obj_boss.y >= 2):
obj_boss.disappear_boss(obj_board)
obj_boss.y -= 2
obj_boss.appear_boss(obj_board)
# print(obj_paddle.y)
if(move_left == 1):
if obj_config.level == 1 or obj_config.level == 2:
obj_paddle.direction = -1
obj_ball.direction = -1
obj_paddle.disappear_paddle(obj_board)
obj_ball.disappear_ball(obj_board)
obj_paddle.y-=2
obj_ball.y-=2
obj_paddle.reappear_paddle(obj_board)
obj_ball.reappear_ball(obj_board)
if obj_config.level == 3:
if obj_paddle.y>18:
obj_paddle.direction = -1
obj_ball.direction = -1
obj_paddle.disappear_paddle(obj_board)
obj_ball.disappear_ball(obj_board)
obj_paddle.y-=2
obj_ball.y-=2
obj_paddle.reappear_paddle(obj_board)
obj_ball.reappear_ball(obj_board)
if(obj_boss.y >= 2):
obj_boss.disappear_boss(obj_board)
obj_boss.y -= 2
obj_boss.appear_boss(obj_board)
if char == 'l':
obj_config.level += 1
obj_config.start_time[obj_config.level-1] = obj_config.time
obj_brick.level_disappear_brick(obj_board)
obj_brick.appear_brick(obj_board.matrix, obj_config.level, health_flag)
obj_unbrick.appear_unb(obj_board.matrix, obj_config.level)
obj_explode.exappear_brick(obj_board.matrix, obj_config.level)
obj_ball.disappear_ball(obj_board)
obj_paddle.disappear_paddle(obj_board)
reposition()
if obj_config.level == 3:
obj_boss.starting_position(obj_board.matrix)
if char == ' ':
obj_ball.velx = -1
obj_ball.vely = vely + (bay - (py + (int)(length/2)))
# def boss_collision():
# if
def move():
x = obj_ball.get_x()
y = obj_ball.get_y()
vel_x = obj_ball.get_velx()
vel_y = obj_ball.get_vely()
obj_ball.disappear_ball(obj_board)
obj_ball.x+=vel_x
obj_ball.y+=vel_y
obj_ball.reappear_ball(obj_board)
def collision():
# obj_ball.vely = 1
global rainbow_flag
x = obj_ball.get_x()
y = obj_ball.get_y()
py = obj_paddle.get_y()
length = obj_paddle.get_len()
vel_x = obj_ball.get_velx()
vel_y = obj_ball.get_vely()
powerupnumber = 0
# # wall
# if x <= 1:
# obj_ball.velx = -vel_x
# if x >= 28:
# obj_ball.number-=1
# if obj_ball.number == 0:
# obj_config.life-=1
# if obj_config.life == 0:
# print("GAME OVER")
# quit()
# else:
# obj_ball.disappear_ball(obj_board)
# obj_paddle.disappear_paddle(obj_board)
# reposition()
# if y+vel_y >= 109 or y <= 0:
# obj_ball.vely = -vel_y
# paddle
if x+vel_x<=29 and y+vel_y<=109:
if obj_board.matrix[x+1][y] == "I" or (vel_x==2 and obj_board.matrix[x+2][y] == "I"):
if vel_x!=0 or vel_y!=0:
# quit()
subprocess.Popen(['aplay', './sound/mb_hit.wav'])
os.system('clear')
if flag == 1:
obj_fall.fall_appear_brick(obj_board)
if obj_ball.active == 1:
# quit()
obj_ball.vely = 0
obj_ball.velx = 0
else:
obj_ball.vely = vel_y + (y - (py + (int)(length/2)))
obj_ball.velx = -vel_x
for i in range(len(powerup_list)):
if powerup_list[i].x+2 <= 29:
if obj_board.matrix[powerup_list[i].x+2][powerup_list[i].y] == "I" or obj_board.matrix[powerup_list[i].x+1][powerup_list[i].y] == "I":
# quit()
# active_powerup.append((powerup_list[i], time.time()))
powerup_list[i].disappear(obj_board)
if powerup_list[i].number == 1:
# quit()
if obj_paddle.get_len() > 3:
obj_paddle.disappear_paddle(obj_board)
obj_paddle.shrink()
obj_paddle.reappear_paddle(obj_board)
active_powerup.append((powerup_list[i], time.time()))
if powerup_list[i].number == 2:
# quit()
if obj_paddle.get_len() < 9:
obj_paddle.disappear_paddle(obj_board)
obj_paddle.expand()
obj_paddle.reappear_paddle(obj_board)
active_powerup.append((powerup_list[i], time.time()))
if powerup_list[i].number == 3:
# quit()
active_powerup.append((powerup_list[i], time.time()))
if obj_ball.velx < 0 and obj_ball.velx >= -1:
obj_ball.velx -= 1
if obj_ball.velx > 0 and obj_ball.velx <= 1:
obj_ball.velx += 1
if powerup_list[i].number == 4:
# quit()
active_powerup.append((powerup_list[i], time.time()))
obj_ball.active = 1
if powerup_list[i].number == 5:
active_powerup.append((powerup_list[i], time.time()))
obj_ball.thruactive = 1
if powerup_list[i].number == 6:
active_powerup.append((powerup_list[i], time.time()))
obj_config.bullet = 1
subprocess.Popen(['aplay', './sound/mb_hit.wav'])
os.system('clear')
powerup_list.pop(i)
break;
# wall
if x <= 1:
obj_ball.velx = -vel_x
subprocess.Popen(['aplay', './sound/mb_wall.wav'])
os.system('clear')
if x >= 28:
obj_ball.number-=1
if obj_ball.number == 0:
obj_config.life-=1
if obj_config.life == 0:
print("GAME OVER")
subprocess.Popen(['aplay', './sound/mb_die.wav'])
os.system('clear')
quit()
else:
obj_ball.disappear_ball(obj_board)
obj_paddle.disappear_paddle(obj_board)
reposition()
subprocess.Popen(['aplay', './sound/mb_wall.wav'])
os.system('clear')
if y+vel_y >= 109 or y <= 0:
obj_ball.vely = -vel_y
subprocess.Popen(['aplay', './sound/mb_wall.wav'])
os.system('clear')
# brick
point1 = (x,y)
point2 = (x+vel_x,y+vel_y)
if vel_x!=0 or vel_y!=0:
pts = find_points(point1, point2)
# print(pts)
if vel_y==0:
for i in range(len(pts)):
if pts[i][1]<=109 and pts[i][0]<=29:
if obj_board.matrix[pts[i][0]][pts[i][1]] == "X":
if pts[i][0] == 6 and pts[i][1] == 20:
rainbow_flag = 1
if obj_board.matrix[pts[i][0]][pts[i][1]+1] == -10:
subprocess.Popen(['aplay', './sound/mb_brick.wav'])
os.system('clear')
obj_explode.exdisappear_brick(obj_board,pts[i][0],pts[i][1],obj_config)
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
else:
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
powerupnumber = obj_brick.disappear_brick(obj_board,pts[i][0],pts[i][1],obj_config)
powup(powerupnumber, pts[i][0], pts[i][1])
else:
obj_config.score += obj_board.matrix[pts[i][0]][pts[i][1]+1]
break;
elif obj_board.matrix[pts[i][0]][pts[i][1]-1] == "X":
if pts[i][0] == 6 and pts[i][1]-1 == 20:
rainbow_flag = 1
if obj_board.matrix[pts[i][0]][pts[i][1]] == -10:
subprocess.Popen(['aplay', './sound/mb_brick.wav'])
os.system('clear')
obj_explode.exdisappear_brick(obj_board,pts[i][0],pts[i][1]-1,obj_config)
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
else:
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
powerupnumber = obj_brick.disappear_brick(obj_board,pts[i][0],pts[i][1]-1,obj_config)
powup(powerupnumber, pts[i][0], pts[i][1])
else:
obj_config.score += obj_board.matrix[pts[i][0]][pts[i][1]]
break;
elif obj_board.matrix[pts[i][0]][pts[i][1]+1] == "X":
if pts[i][0] == 6 and pts[i][1]+1 == 20:
rainbow_flag = 1
if obj_board.matrix[pts[i][0]][pts[i][1]+2] == -10:
subprocess.Popen(['aplay', './sound/mb_brick.wav'])
os.system('clear')
obj_explode.exdisappear_brick(obj_board,pts[i][0],pts[i][1]+1,obj_config)
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
else:
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
powerupnumber = obj_brick.disappear_brick(obj_board,pts[i][0],pts[i][1]+1,obj_config)
powup(powerupnumber, pts[i][0], pts[i][1])
else:
obj_config.score += obj_board.matrix[pts[i][0]][pts[i][1]+2]
break
# elif obj_board.matrix[pts[i][0]][pts[i][1]] != " " or obj_board.matrix[pts[i][0]][pts[i][1]] != "I" or obj_board.matrix[pts[i][0]][pts[i][1]] != "?" or obj_board.matrix[pts[i][0]][pts[i][1]] != "+" or obj_board.matrix[pts[i][0]][pts[i][1]] != "_" or obj_board.matrix[pts[i][0]][pts[i][1]] != ">" or obj_board.matrix[pts[i][0]][pts[i][1]] != "@" or obj_board.matrix[pts[i][0]][pts[i][1]] != "|" or isinstance(obj_board.matrix[pts[i][0]][pts[i][1]], int) != True:
# obj_ball.velx = -vel_x
# obj_ball.disappear_ball(obj_board)
# obj_ball.reappear_ball(obj_board)
# obj_boss.health -= 10
# break;
# elif obj_board.matrix[pts[i][0]][pts[i][1]-1] != " " or obj_board.matrix[pts[i][0]][pts[i][1]-1] != "I" or obj_board.matrix[pts[i][0]][pts[i][1]-1] != "?" or obj_board.matrix[pts[i][0]][pts[i][1]-1] != "+" or obj_board.matrix[pts[i][0]][pts[i][1]-1] != "_" or obj_board.matrix[pts[i][0]][pts[i][1]-1] != ">" or obj_board.matrix[pts[i][0]][pts[i][1]-1] != "@" or obj_board.matrix[pts[i][0]][pts[i][1]-1] != "|" or isinstance(obj_board.matrix[pts[i][0]][pts[i][1]-1], int) != True:
# obj_ball.velx = -vel_x
# obj_ball.disappear_ball(obj_board)
# obj_ball.reappear_ball(obj_board)
# obj_boss.health -= 10
# break;
# elif obj_board.matrix[pts[i][0]][pts[i][1]+1] != " " or obj_board.matrix[pts[i][0]][pts[i][1]+1] != "I" or obj_board.matrix[pts[i][0]][pts[i][1]+1] != "?" or obj_board.matrix[pts[i][0]][pts[i][1]+1] != "+" or obj_board.matrix[pts[i][0]][pts[i][1]+1] != "_" or obj_board.matrix[pts[i][0]][pts[i][1]+1] != ">" or obj_board.matrix[pts[i][0]][pts[i][1]+1] != "@" or obj_board.matrix[pts[i][0]][pts[i][1]+1] != "|" or isinstance(obj_board.matrix[pts[i][0]][pts[i][1]+1], int) != True:
# obj_ball.velx = -vel_x
# obj_ball.disappear_ball(obj_board)
# obj_ball.reappear_ball(obj_board)
# obj_boss.health -= 10
# break;
elif obj_board.matrix[pts[i][0]][pts[i][1]] == "-" or obj_board.matrix[pts[i][0]][pts[i][1]] == "=" or obj_board.matrix[pts[i][0]][pts[i][1]] == ":" or obj_board.matrix[pts[i][0]][pts[i][1]] == "(" or obj_board.matrix[pts[i][0]][pts[i][1]] == ")" or obj_board.matrix[pts[i][0]][pts[i][1]] == "*" or obj_board.matrix[pts[i][0]][pts[i][1]] == "`" or obj_board.matrix[pts[i][0]][pts[i][1]] == ".":
obj_ball.velx = -vel_x
obj_ball.disappear_ball(obj_board)
obj_ball.reappear_ball(obj_board)
obj_boss.health -= 10
break;
elif obj_board.matrix[pts[i][0]][pts[i][1]-1] == "-" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "=" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == ":" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "(" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == ")" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "*" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "`" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == ".":
obj_ball.velx = -vel_x
obj_ball.disappear_ball(obj_board)
obj_ball.reappear_ball(obj_board)
obj_boss.health -= 10
break;
elif obj_board.matrix[pts[i][0]][pts[i][1]+1] == "-" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "=" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == ":" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "(" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == ")" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "*" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "`" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == ".":
obj_ball.velx = -vel_x
obj_ball.disappear_ball(obj_board)
obj_ball.reappear_ball(obj_board)
obj_boss.health -= 10
break;
else:
for i in range(len(pts)):
if pts[i][1]<=109 and pts[i][0]<=29:
if obj_board.matrix[pts[i][0]][pts[i][1]] == "X":
if obj_board.matrix[pts[i][0]][pts[i][1]+1] == -10:
subprocess.Popen(['aplay', './sound/mb_brick.wav'])
os.system('clear')
obj_explode.exdisappear_brick(obj_board,pts[i][0],pts[i][1],obj_config)
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
else:
if obj_ball.thruactive == 0:
obj_ball.velx = -vel_x
powerupnumber = obj_brick.disappear_brick(obj_board,pts[i][0],pts[i][1],obj_config)
powup(powerupnumber, pts[i][0], pts[i][1])
else:
obj_config.score += obj_board.matrix[pts[i][0]][pts[i][1]+1]
# if (vel_x<0 and vel_y<0) or (vel_x>0 and vel_y>0):
# obj_ball.velx = -vel_x
# else:
# obj_ball.vely = -vel_y
break;
elif obj_board.matrix[pts[i][0]][pts[i][1]] == "-" or obj_board.matrix[pts[i][0]][pts[i][1]] == "=" or obj_board.matrix[pts[i][0]][pts[i][1]] == ":" or obj_board.matrix[pts[i][0]][pts[i][1]] == "(" or obj_board.matrix[pts[i][0]][pts[i][1]] == ")" or obj_board.matrix[pts[i][0]][pts[i][1]] == "*" or obj_board.matrix[pts[i][0]][pts[i][1]] == "`" or obj_board.matrix[pts[i][0]][pts[i][1]] == ".":
obj_ball.velx = -vel_x
obj_ball.disappear_ball(obj_board)
obj_ball.reappear_ball(obj_board)
obj_boss.health -= 10
break;
elif obj_board.matrix[pts[i][0]][pts[i][1]-1] == "-" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "=" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == ":" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "(" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == ")" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "*" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == "`" or obj_board.matrix[pts[i][0]][pts[i][1]-1] == ".":
obj_ball.velx = -vel_x
obj_ball.disappear_ball(obj_board)
obj_ball.reappear_ball(obj_board)
obj_boss.health -= 10
break;
elif obj_board.matrix[pts[i][0]][pts[i][1]+1] == "-" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "=" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == ":" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "(" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == ")" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "*" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == "`" or obj_board.matrix[pts[i][0]][pts[i][1]+1] == ".":
obj_ball.velx = -vel_x
obj_ball.disappear_ball(obj_board)
obj_ball.reappear_ball(obj_board)
obj_boss.health -= 10
break;
#bullet brick
i=0
while i < len(laser):
if laser[i].x+laser[i].velx<=1:
laser[i].disappear(obj_board)
laser.pop(i)
elif obj_board.matrix[laser[i].x+laser[i].velx][laser[i].y] == "X":
if obj_board.matrix[laser[i].x+laser[i].velx][laser[i].y+1] == -10:
subprocess.Popen(['aplay', './sound/mb_brick.wav'])
os.system('clear')
obj_explode.exdisappear_brick(obj_board,laser[i].x+laser[i].velx,laser[i].y,obj_config)
else:
# print("in laser")
powerupnumber = obj_brick.disappear_brick(obj_board, laser[i].x+laser[i].velx, laser[i].y, obj_config)
powup(powerupnumber, laser[i].x, laser[i].y)
laser[i].disappear(obj_board)
laser.pop(i)
elif isinstance(obj_board.matrix[laser[i].x][laser[i].y], int)==True:
temp = obj_board.matrix[laser[i].x][laser[i].y]
laser[i].disappear(obj_board)
obj_board.matrix[laser[i].x][laser[i].y] = temp
laser[i].x = laser[i].x+laser[i].velx
laser[i].reappear(obj_board)
else:
laser[i].disappear(obj_board)
laser[i].x = laser[i].x+laser[i].velx
laser[i].reappear(obj_board)
i+=1
# bomb
i=0
while i < len(bombs):
if bombs[i].x+bombs[i].velx>28:
bombs[i].disappear(obj_board)
bombs.pop(i)
elif obj_board.matrix[bombs[i].x+bombs[i].velx][bombs[i].y] == "X":
if obj_board.matrix[bombs[i].x+bombs[i].velx][bombs[i].y+1] == -10:
subprocess.Popen(['aplay', './sound/mb_brick.wav'])
os.system('clear')
obj_explode.exdisappear_brick(obj_board,bombs[i].x+bombs[i].velx,bombs[i].y,obj_config)
else:
# print("in bombs")
powerupnumber = obj_brick.disappear_brick(obj_board, bombs[i].x+bombs[i].velx, bombs[i].y, obj_config)
powup(powerupnumber, bombs[i].x, bombs[i].y)
bombs[i].disappear(obj_board)
bombs.pop(i)
elif isinstance(obj_board.matrix[bombs[i].x][bombs[i].y], int)==True:
temp = obj_board.matrix[bombs[i].x][bombs[i].y]
bombs[i].disappear(obj_board)
obj_board.matrix[bombs[i].x][bombs[i].y] = temp
bombs[i].x = bombs[i].x+bombs[i].velx
bombs[i].reappear(obj_board)
elif obj_board.matrix[bombs[i].x+bombs[i].velx][bombs[i].y] == "I":
obj_config.life -= 1
if obj_config.life == 0:
print("GAME OVER")
subprocess.Popen(['aplay', './sound/mb_die.wav'])
os.system('clear')
quit()
bombs[i].disappear(obj_board)
bombs.pop(i)
else:
bombs[i].disappear(obj_board)
bombs[i].x = bombs[i].x+bombs[i].velx
bombs[i].reappear(obj_board)
i+=1
x=time.time()
y=x
z=x
count = 0
time_bullet = 10
# collision()
while True:
os.system('clear')
# else:
# flag=0
obj_config.time = (round(time.time()) - round(x))
if obj_config.bullet==1:
string = "SCORE: " + str(obj_config.score) + " | LIVES: " + str(obj_config.life) + " | TIME PLAYED: " + str(obj_config.time) + " | LEVEL:" + str(obj_config.level) + " | TIME REMAINING:" + str(time_bullet)
else:
string = "SCORE: " + str(obj_config.score) + " | LIVES: " + str(obj_config.life) + " | TIME PLAYED: " + str(obj_config.time) + " | LEVEL:" + str(obj_config.level)
if obj_config.time-obj_config.start_time[obj_config.level-1] >= 60:
# print("time:" +str(obj_config.time)+ str(obj_config.start_time))
# obj_fall.fall_appear_brick(obj_board)
flag = 1
else:
flag = 0
if obj_boss.health == 50:
health_flag = 1
obj_brick.appear_brick(obj_board.matrix, obj_config.level, health_flag)
if obj_boss.health == 20:
obj_brick.appear_brick(obj_board.matrix, obj_config.level, health_flag)
# obj_board.theyllprintit(string)
temp = obj_board.theyllprintit(string, obj_config.bullet, obj_config.level, obj_boss.health)
if temp == 0:
if obj_config.level!=3:
obj_config.level += 1
obj_config.start_time[obj_config.level-1] = obj_config.time
obj_brick.level_disappear_brick(obj_board)
obj_brick.appear_brick(obj_board.matrix, obj_config.level, health_flag)
obj_unbrick.appear_unb(obj_board.matrix, obj_config.level)
obj_explode.exappear_brick(obj_board.matrix, obj_config.level)
obj_ball.disappear_ball(obj_board)
obj_paddle.disappear_paddle(obj_board)
reposition()
if obj_config.level == 3:
obj_boss.starting_position(obj_board.matrix)
if time.time() - y >= 0.5:
y = time.time()
bossbomb()
# obj_board.matrix[1][]
# movepaddle()
movepaddle()
move()
if obj_config.bullet==1:
if time.time() - y >= 0.5:
y = time.time()
shoot()
collision()
impartpowerup()
movepowerup()
time_bullet = endpowerup()
if rainbow_flag == 0 and obj_config.level == 1:
obj_rainbow.color(obj_board)
# move() # move is clearing the last block
# count += 1
# time.sleep(0.20)
| 35.134663
| 486
| 0.649904
| 4,804
| 28,178
| 3.601374
| 0.04184
| 0.116525
| 0.110861
| 0.045778
| 0.785215
| 0.76354
| 0.741518
| 0.70493
| 0.677128
| 0.648171
| 0
| 0.029744
| 0.168394
| 28,178
| 802
| 487
| 35.134663
| 0.708573
| 0.116403
| 0
| 0.564263
| 0
| 0
| 0.023747
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.018809
| false
| 0
| 0.040752
| 0.001567
| 0.064263
| 0.009404
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d649e8d105ddce7c396037ab58eb3f53723982ea
| 355
|
py
|
Python
|
src/simmate/workflow_engine/common_tasks/__init__.py
|
jacksund/simmate
|
0b29704540574e11b711f7b44e2cb7740141ebb4
|
[
"BSD-3-Clause"
] | 9
|
2021-12-21T02:58:21.000Z
|
2022-01-25T14:00:06.000Z
|
src/simmate/workflow_engine/common_tasks/__init__.py
|
jacksund/simmate
|
0b29704540574e11b711f7b44e2cb7740141ebb4
|
[
"BSD-3-Clause"
] | 51
|
2022-01-01T15:59:58.000Z
|
2022-03-26T21:25:42.000Z
|
src/simmate/workflow_engine/common_tasks/__init__.py
|
jacksund/simmate
|
0b29704540574e11b711f7b44e2cb7740141ebb4
|
[
"BSD-3-Clause"
] | 7
|
2022-01-01T03:44:32.000Z
|
2022-03-29T19:59:27.000Z
|
# -*- coding: utf-8 -*-
from .load_input_and_register import load_input_and_register
from .save_result import save_result
from .load_nested_calculation import LoadNestedCalculationTask
from .save_nested_calculation import SaveNestedCalculationTask
from .parse_multi_command import parse_multi_command
from .customized_s3task import run_customized_s3task
| 39.444444
| 62
| 0.873239
| 46
| 355
| 6.326087
| 0.456522
| 0.054983
| 0.082474
| 0.137457
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009231
| 0.084507
| 355
| 8
| 63
| 44.375
| 0.886154
| 0.059155
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c3926a4f8ca12b6307e8be812116f869cb36fabf
| 55
|
py
|
Python
|
skinny/histogram.py
|
sinanm89/skin_detect
|
510ca1228a59e9cb73e03d5d3c982d4a4b6ac323
|
[
"MIT"
] | null | null | null |
skinny/histogram.py
|
sinanm89/skin_detect
|
510ca1228a59e9cb73e03d5d3c982d4a4b6ac323
|
[
"MIT"
] | null | null | null |
skinny/histogram.py
|
sinanm89/skin_detect
|
510ca1228a59e9cb73e03d5d3c982d4a4b6ac323
|
[
"MIT"
] | null | null | null |
"""Histogram for accurate skin detection in opencv."""
| 27.5
| 54
| 0.745455
| 7
| 55
| 5.857143
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.127273
| 55
| 1
| 55
| 55
| 0.854167
| 0.872727
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c3b484477ab0c791213968970e61f7f23b37926c
| 516
|
py
|
Python
|
cerebro/nas/__init__.py
|
jiange91/cerebro-system
|
6c09f5a5b56ef78c0519fdb6c0839cb199bd49a8
|
[
"Apache-2.0"
] | null | null | null |
cerebro/nas/__init__.py
|
jiange91/cerebro-system
|
6c09f5a5b56ef78c0519fdb6c0839cb199bd49a8
|
[
"Apache-2.0"
] | null | null | null |
cerebro/nas/__init__.py
|
jiange91/cerebro-system
|
6c09f5a5b56ef78c0519fdb6c0839cb199bd49a8
|
[
"Apache-2.0"
] | 1
|
2022-02-03T05:53:37.000Z
|
2022-02-03T05:53:37.000Z
|
from autokeras.tuners.greedy import Greedy
from .tuners.greedy import GreedySearch
from .tuners.randsearch import RandomSearch
# from .tuners.hyperband import Hyperband
from .hphpmodel import HyperHyperModel
from .tuners.gridsearch import GridSearch
from .tuners.greedy import GreedySearch
HyperHyperModel.__module__ = "cerebro.nas"
# Hyperband.__module__ = "cerebro.nas.tuner"
GridSearch.__module__ = "cerebro.nas.tuner"
RandomSearch.__module__ = "cerebro.nas.tuner"
GreedySearch.__module__ = "cerebro.nas.greedy"
| 36.857143
| 46
| 0.825581
| 59
| 516
| 6.881356
| 0.271186
| 0.123153
| 0.197044
| 0.155172
| 0.167488
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.089147
| 516
| 14
| 46
| 36.857143
| 0.86383
| 0.158915
| 0
| 0.2
| 0
| 0
| 0.145833
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
c3e2cec1a90a0617e34da500ebc081d7b4851d4c
| 355
|
py
|
Python
|
assignment8/mapper.py
|
IITDU-BSSE06/ads-demystifying-the-logs-Shisir
|
2d57cf15b4e8097e54e1a997ed01b9a5002640be
|
[
"MIT"
] | null | null | null |
assignment8/mapper.py
|
IITDU-BSSE06/ads-demystifying-the-logs-Shisir
|
2d57cf15b4e8097e54e1a997ed01b9a5002640be
|
[
"MIT"
] | null | null | null |
assignment8/mapper.py
|
IITDU-BSSE06/ads-demystifying-the-logs-Shisir
|
2d57cf15b4e8097e54e1a997ed01b9a5002640be
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python
#>>> a='http://www.the-associates.co.uk/images/filmmediablock/332/RtB_0576.jpg'
#>>> b=urlparse(a).path
#>>> b
#'/images/filmmediablock/332/RtB_0576.jpg'
import sys
from urlparse import urlparse
for line in sys.stdin:
data = line.strip().split(" ")
if len(data) == 10:
print urlparse(data[6]).path
| 19.722222
| 80
| 0.628169
| 51
| 355
| 4.333333
| 0.666667
| 0.180995
| 0.208145
| 0.235294
| 0.298643
| 0.298643
| 0
| 0
| 0
| 0
| 0
| 0.059028
| 0.188732
| 355
| 17
| 81
| 20.882353
| 0.708333
| 0.456338
| 0
| 0
| 0
| 0
| 0.005882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.333333
| null | null | 0.166667
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
c3ebb868df291050977911fcb1027a439871d6e4
| 256
|
py
|
Python
|
nbmetalog/get_timestamp.py
|
mmore500/nbmetalog
|
670f8ad76a587d8848c81e4f790c31c96402f8b0
|
[
"MIT"
] | null | null | null |
nbmetalog/get_timestamp.py
|
mmore500/nbmetalog
|
670f8ad76a587d8848c81e4f790c31c96402f8b0
|
[
"MIT"
] | 1
|
2021-09-02T16:08:58.000Z
|
2021-09-02T16:08:58.000Z
|
nbmetalog/get_timestamp.py
|
mmore500/nbmetalog
|
670f8ad76a587d8848c81e4f790c31c96402f8b0
|
[
"MIT"
] | null | null | null |
from datetime import datetime, timezone
from . import _except_return_none
@_except_return_none
def get_timestamp():
return datetime.now().replace(
tzinfo=timezone.utc,
).replace(
microsecond=0,
).isoformat().replace('+', 'Z')
| 21.333333
| 39
| 0.683594
| 29
| 256
| 5.793103
| 0.62069
| 0.142857
| 0.190476
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004831
| 0.191406
| 256
| 11
| 40
| 23.272727
| 0.806763
| 0
| 0
| 0
| 0
| 0
| 0.007813
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.111111
| true
| 0
| 0.222222
| 0.111111
| 0.444444
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
613de9c112a4635093b326b7ef5ecb7e59d1fe6e
| 183
|
py
|
Python
|
py/baltools/__init__.py
|
paulmartini/baltools
|
06f64036eea7f0ae261d72369c7714e74dba31da
|
[
"BSD-3-Clause"
] | null | null | null |
py/baltools/__init__.py
|
paulmartini/baltools
|
06f64036eea7f0ae261d72369c7714e74dba31da
|
[
"BSD-3-Clause"
] | 5
|
2020-04-03T02:26:33.000Z
|
2021-01-23T20:57:38.000Z
|
py/baltools/__init__.py
|
paulmartini/baltools
|
06f64036eea7f0ae261d72369c7714e74dba31da
|
[
"BSD-3-Clause"
] | null | null | null |
#
# See top-level LICENSE file for Copyright information
#
# -*- coding: utf-8 -*-
"""
Tools to identify, characterize, and simulate BAL QSOs.
"""
from ._version import __version__
| 16.636364
| 55
| 0.704918
| 23
| 183
| 5.391304
| 0.956522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.006579
| 0.169399
| 183
| 10
| 56
| 18.3
| 0.809211
| 0.715847
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
615b56d642e66f59e26dcc4c105f482bc5a542be
| 483
|
py
|
Python
|
tests/validation/test_clean_provisional.py
|
StuartMacKay/ebird-api
|
14b5c777548416a58abec05e25cd4b9a8e22f210
|
[
"MIT"
] | 9
|
2020-05-16T20:26:33.000Z
|
2021-11-02T06:24:46.000Z
|
tests/validation/test_clean_provisional.py
|
StuartMacKay/ebird-api
|
14b5c777548416a58abec05e25cd4b9a8e22f210
|
[
"MIT"
] | 17
|
2019-06-22T09:41:22.000Z
|
2020-09-11T06:25:21.000Z
|
tests/validation/test_clean_provisional.py
|
ProjectBabbler/ebird-api
|
14b5c777548416a58abec05e25cd4b9a8e22f210
|
[
"MIT"
] | null | null | null |
import unittest
from ebird.api.validation import clean_provisional
class CleanProvisionalTests(unittest.TestCase):
"""Tests for the clean_provisional validation function."""
def test_converts_bool(self):
self.assertEqual("true", clean_provisional(True))
self.assertEqual("false", clean_provisional(False))
def test_converts_integer(self):
self.assertEqual("true", clean_provisional(1))
self.assertEqual("false", clean_provisional(0))
| 30.1875
| 62
| 0.73913
| 54
| 483
| 6.425926
| 0.481481
| 0.276657
| 0.086455
| 0.132565
| 0.432277
| 0.224784
| 0
| 0
| 0
| 0
| 0
| 0.004902
| 0.15528
| 483
| 15
| 63
| 32.2
| 0.845588
| 0.10766
| 0
| 0
| 0
| 0
| 0.042353
| 0
| 0
| 0
| 0
| 0
| 0.444444
| 1
| 0.222222
| false
| 0
| 0.222222
| 0
| 0.555556
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
616d3bc609ba1e61c0fbc32b58631c5a46c7c255
| 445
|
py
|
Python
|
Test_01_Login (2).py
|
MakeGunshot/upload
|
6a868c90a54870ed653b9b57be6a9a7193ada8e6
|
[
"MIT"
] | 1
|
2019-05-07T09:19:27.000Z
|
2019-05-07T09:19:27.000Z
|
Test_01_Login.py
|
MakeGunshot/0726
|
fb79f24c73426512d250373085db8369def2f6c9
|
[
"MIT"
] | null | null | null |
Test_01_Login.py
|
MakeGunshot/0726
|
fb79f24c73426512d250373085db8369def2f6c9
|
[
"MIT"
] | null | null | null |
# coding=utf-8
from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
class Login():
def __init__(self):
self.driver = webdriver.Chrome()
self.driver.get('http://118.31.19.120:3000/')
def login(self,username,psw):
element = WebDriverWait(self.driver,30,0.5).until
| 26.176471
| 64
| 0.730337
| 63
| 445
| 5.079365
| 0.603175
| 0.15
| 0.196875
| 0.16875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050802
| 0.159551
| 445
| 16
| 65
| 27.8125
| 0.804813
| 0.026966
| 0
| 0
| 0
| 0
| 0.060748
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.181818
| false
| 0
| 0.454545
| 0
| 0.727273
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
618d261a272399267873fd5e3793e0c683e345e1
| 685
|
py
|
Python
|
signalz/generators/uniform_white_noise.py
|
seang097/signalz
|
0846e037b288e508a7648887874e3e07ef8cac73
|
[
"MIT"
] | 9
|
2017-07-28T18:02:38.000Z
|
2022-01-02T07:53:26.000Z
|
signalz/generators/uniform_white_noise.py
|
seang097/signalz
|
0846e037b288e508a7648887874e3e07ef8cac73
|
[
"MIT"
] | 1
|
2017-12-26T20:34:00.000Z
|
2017-12-29T11:02:05.000Z
|
signalz/generators/uniform_white_noise.py
|
seang097/signalz
|
0846e037b288e508a7648887874e3e07ef8cac73
|
[
"MIT"
] | 2
|
2020-10-16T09:39:30.000Z
|
2021-11-22T21:40:32.000Z
|
"""
.. versionadded:: 0.4
This function generates Uniform white noise series. This function uses
`numpy.random.uniform`.
Function Documentation
======================================
"""
import numpy as np
def uniform_white_noise(n, minimum=-1, maximum=1):
"""
Random values with uniform distribution.
**Args:**
* `n` - length of the output data (int) - how many samples will be on output
**Kwargs:**
* `minimum` - minimal value (float)
* `maximum` - maximal value (float)
**Returns:**
* vector of values representing the noise (1d array)
"""
return np.random.uniform(low=minimum, high=maximum, size=n)
| 22.096774
| 80
| 0.59562
| 79
| 685
| 5.139241
| 0.658228
| 0.059113
| 0.083744
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009542
| 0.235037
| 685
| 30
| 81
| 22.833333
| 0.765267
| 0.690511
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
619e6bd831fadc3987647866446d1017ce105bef
| 76
|
py
|
Python
|
wikipedia/__init__.py
|
MUTLCC/Wikipedia
|
031c2211f4f2212453acb043b702def2128f8dd9
|
[
"MIT"
] | null | null | null |
wikipedia/__init__.py
|
MUTLCC/Wikipedia
|
031c2211f4f2212453acb043b702def2128f8dd9
|
[
"MIT"
] | 2
|
2022-02-26T20:31:47.000Z
|
2022-03-01T11:05:49.000Z
|
wikipedia/__init__.py
|
MUTLCC/Wikipedia
|
031c2211f4f2212453acb043b702def2128f8dd9
|
[
"MIT"
] | null | null | null |
from .exceptions import *
from .wikipedia import *
__version__ = (1, 0, 0)
| 15.2
| 25
| 0.697368
| 10
| 76
| 4.9
| 0.7
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.048387
| 0.184211
| 76
| 4
| 26
| 19
| 0.741935
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
61a693dce6455f02828158e78fc158b193532e83
| 177
|
py
|
Python
|
main.py
|
digicatech/python_learn
|
4c9ace5b2ced82243db010dfb755571a8e938e90
|
[
"MIT"
] | null | null | null |
main.py
|
digicatech/python_learn
|
4c9ace5b2ced82243db010dfb755571a8e938e90
|
[
"MIT"
] | null | null | null |
main.py
|
digicatech/python_learn
|
4c9ace5b2ced82243db010dfb755571a8e938e90
|
[
"MIT"
] | null | null | null |
import sys
import modules.mymodule
import json
def main(argv):
modules.mymodule.printSomething("Hello world !....")
pass
if __name__ == "__main__":
main(sys.argv)
| 16.090909
| 56
| 0.694915
| 22
| 177
| 5.227273
| 0.636364
| 0.26087
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175141
| 177
| 11
| 57
| 16.090909
| 0.787671
| 0
| 0
| 0
| 0
| 0
| 0.140449
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.125
| false
| 0.125
| 0.375
| 0
| 0.5
| 0.125
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
f60d8090c2cdbd58e3ab4d58cf6d90c2a12d7245
| 130
|
py
|
Python
|
Program_Sederhana.py
|
heptadeka/Kekasih-pertama-ku
|
d08024127141a8afcad72e57c4d34e3aeec32bf8
|
[
"MIT"
] | null | null | null |
Program_Sederhana.py
|
heptadeka/Kekasih-pertama-ku
|
d08024127141a8afcad72e57c4d34e3aeec32bf8
|
[
"MIT"
] | null | null | null |
Program_Sederhana.py
|
heptadeka/Kekasih-pertama-ku
|
d08024127141a8afcad72e57c4d34e3aeec32bf8
|
[
"MIT"
] | null | null | null |
print ("Angka Pertama : ")
a = int(input())
print ("Angka Kedua : ")
b = int (input())
print (hasil = a * b)
| 9.285714
| 27
| 0.476923
| 16
| 130
| 3.875
| 0.5625
| 0.322581
| 0.419355
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.338462
| 130
| 13
| 28
| 10
| 0.72093
| 0
| 0
| 0
| 0
| 0
| 0.27027
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.6
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
f63dead5f417fd3cf971033f182b023dbfeb2ea9
| 233
|
py
|
Python
|
models/comments.py
|
Junhua9981/WebProjectFinal
|
8db619b4196fa3bc684202ddb24a725c15e06d78
|
[
"MIT"
] | null | null | null |
models/comments.py
|
Junhua9981/WebProjectFinal
|
8db619b4196fa3bc684202ddb24a725c15e06d78
|
[
"MIT"
] | null | null | null |
models/comments.py
|
Junhua9981/WebProjectFinal
|
8db619b4196fa3bc684202ddb24a725c15e06d78
|
[
"MIT"
] | null | null | null |
from sqlite3 import Timestamp
from pydantic import BaseModel, Field, EmailStr
class CommentModel(BaseModel):
comment: str = Field(...)
name: str = Field(...)
timestamp: Timestamp = Field(...)
course: str = Field(...)
| 29.125
| 47
| 0.669528
| 25
| 233
| 6.24
| 0.56
| 0.153846
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.005291
| 0.188841
| 233
| 8
| 48
| 29.125
| 0.820106
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.285714
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
f65c55623d5158150efe15dc5520e4d0edbf2c49
| 60
|
py
|
Python
|
qtUtils/Constants.py
|
KentMrng/kmLib
|
80cedeb1e27d322849c8b2b56f7f1613cea37b29
|
[
"MIT"
] | null | null | null |
qtUtils/Constants.py
|
KentMrng/kmLib
|
80cedeb1e27d322849c8b2b56f7f1613cea37b29
|
[
"MIT"
] | null | null | null |
qtUtils/Constants.py
|
KentMrng/kmLib
|
80cedeb1e27d322849c8b2b56f7f1613cea37b29
|
[
"MIT"
] | null | null | null |
UP_KEY = 16777235
DOWN_KEY = 16777237
TAB_KEY = 16777217
| 8.571429
| 19
| 0.75
| 9
| 60
| 4.666667
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.5
| 0.2
| 60
| 7
| 20
| 8.571429
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9c938ad7db064d4e3183491aac03445711f5e6c3
| 46
|
py
|
Python
|
openmdao/__init__.py
|
relf/OpenMDAO
|
e96aa063d04330ed0aedece365b7f0b8717aad3b
|
[
"Apache-2.0"
] | null | null | null |
openmdao/__init__.py
|
relf/OpenMDAO
|
e96aa063d04330ed0aedece365b7f0b8717aad3b
|
[
"Apache-2.0"
] | null | null | null |
openmdao/__init__.py
|
relf/OpenMDAO
|
e96aa063d04330ed0aedece365b7f0b8717aad3b
|
[
"Apache-2.0"
] | 1
|
2021-04-15T13:33:39.000Z
|
2021-04-15T13:33:39.000Z
|
__version__ = '3.8.1-dev'
INF_BOUND = 1.0E30
| 11.5
| 25
| 0.673913
| 9
| 46
| 2.888889
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.179487
| 0.152174
| 46
| 3
| 26
| 15.333333
| 0.487179
| 0
| 0
| 0
| 0
| 0
| 0.195652
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9c9d559bbde2a9c3525973fda6f0f1d01e8a7a4d
| 149
|
py
|
Python
|
querybulletin/__main__.py
|
bpptkg/bpptkg-querybulletin
|
5e108a28a06e8a295b55ef6575be4169cd04d36c
|
[
"MIT"
] | null | null | null |
querybulletin/__main__.py
|
bpptkg/bpptkg-querybulletin
|
5e108a28a06e8a295b55ef6575be4169cd04d36c
|
[
"MIT"
] | null | null | null |
querybulletin/__main__.py
|
bpptkg/bpptkg-querybulletin
|
5e108a28a06e8a295b55ef6575be4169cd04d36c
|
[
"MIT"
] | null | null | null |
"""Invokes main cli function when the querybulletin is run as a script."""
from querybulletin.cli import main
if __name__ == '__main__':
main()
| 24.833333
| 74
| 0.724832
| 21
| 149
| 4.761905
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174497
| 149
| 5
| 75
| 29.8
| 0.813008
| 0.456376
| 0
| 0
| 0
| 0
| 0.106667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9ca2b4dc1c3488f54990ed9f67d782c325f953a4
| 1,419
|
py
|
Python
|
datatig/models/type.py
|
DataTig/DataTig
|
b4e9aa18dfcc8010972df732463344205ad62a75
|
[
"MIT"
] | 5
|
2021-06-11T11:56:01.000Z
|
2022-03-03T18:27:10.000Z
|
datatig/models/type.py
|
DataTig/DataTig
|
b4e9aa18dfcc8010972df732463344205ad62a75
|
[
"MIT"
] | 8
|
2020-04-27T16:28:03.000Z
|
2022-02-11T15:40:30.000Z
|
datatig/models/type.py
|
DataTig/DataTig
|
b4e9aa18dfcc8010972df732463344205ad62a75
|
[
"MIT"
] | null | null | null |
from .type_field import TypeFieldModel
class TypeModel:
def __init__(self, siteconfig):
self.id = None
self.config = None
self.fields = {}
self.siteconfig = siteconfig
def load_from_config(self, config) -> None:
self.id = config.get("id")
self.config = config
self.fields = {}
for config in self.config.get("fields", []):
field_config = TypeFieldModel()
field_config.load(config)
self.fields[field_config.id] = field_config
def directory(self) -> str:
return self.config.get("directory")
def directory_in_git_repository(self) -> str:
dir = self.config.get("directory")
if self.siteconfig.git_submodule_directory() and dir.startswith(
self.siteconfig.git_submodule_directory()
):
dir = dir[len(self.siteconfig.git_submodule_directory()) :]
return dir
def guide_form_xlsx(self) -> str:
return self.config.get("guide_form_xlsx")
def list_fields(self) -> list:
return self.config.get("list_fields", []) # TODO add some sensible defaults
def json_schema(self) -> str:
return self.config.get("json_schema")
def pretty_json_indent(self) -> int:
return self.config.get("pretty_json_indent", 4)
def default_format(self) -> str:
return self.config.get("default_format", "yaml")
| 31.533333
| 84
| 0.629316
| 171
| 1,419
| 5.023392
| 0.280702
| 0.128056
| 0.121071
| 0.132712
| 0.243306
| 0.121071
| 0
| 0
| 0
| 0
| 0
| 0.000946
| 0.255109
| 1,419
| 44
| 85
| 32.25
| 0.811731
| 0.021846
| 0
| 0.058824
| 0
| 0
| 0.071429
| 0
| 0
| 0
| 0
| 0.022727
| 0
| 1
| 0.264706
| false
| 0
| 0.029412
| 0.176471
| 0.529412
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
9cb4269abf41541f70e57aefaeee6cda3b1da1fe
| 90
|
py
|
Python
|
src/python/okane/entity/account.py
|
adrianogil/Okane
|
fe8d45d36a04b04116f8ebd112a7bd6215bfc77d
|
[
"MIT"
] | null | null | null |
src/python/okane/entity/account.py
|
adrianogil/Okane
|
fe8d45d36a04b04116f8ebd112a7bd6215bfc77d
|
[
"MIT"
] | null | null | null |
src/python/okane/entity/account.py
|
adrianogil/Okane
|
fe8d45d36a04b04116f8ebd112a7bd6215bfc77d
|
[
"MIT"
] | null | null | null |
class Account:
def __init__(self, name):
self.id = -1
self.name = name
| 22.5
| 29
| 0.555556
| 12
| 90
| 3.833333
| 0.666667
| 0.347826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016667
| 0.333333
| 90
| 4
| 30
| 22.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9cb565e4ce245dfdcfdab6d50f71c2b60c2e0491
| 1,017
|
py
|
Python
|
rewards/file.py
|
lloydphan/reward-crawler
|
8bd84104b34db9015ffa9b95e6788b634522d715
|
[
"MIT"
] | null | null | null |
rewards/file.py
|
lloydphan/reward-crawler
|
8bd84104b34db9015ffa9b95e6788b634522d715
|
[
"MIT"
] | null | null | null |
rewards/file.py
|
lloydphan/reward-crawler
|
8bd84104b34db9015ffa9b95e6788b634522d715
|
[
"MIT"
] | null | null | null |
import os
class File:
file = ""
def __init__(self, file_name):
self.file_name = file_name
def isFile(self, file_name):
if os.path.isfile(file_name):
return True
else:
return False
def openOrCreate(self):
if self.isFile(self.file_name):
with open(self.file_name, "r") as file:
return file
else:
with open(self.file_name, "w+") as file:
return file
def readFile(self):
with open(self.file_name, "r") as reader:
return reader.read()
def readLine(self):
with open(self.file_name, "r") as reader:
return reader.readline()
def readLnsFile(self):
with open(self.file_name, "r") as reader:
return reader.readlines()
def writeFile(self, line):
with open(self.file_name, "a") as wr:
wr.write(line + "\n")
def rename(self, old_name, new_name):
os.rename(old_name, new_name)
| 24.214286
| 52
| 0.557522
| 132
| 1,017
| 4.143939
| 0.272727
| 0.175503
| 0.219378
| 0.175503
| 0.361974
| 0.288848
| 0.288848
| 0.246801
| 0.246801
| 0.246801
| 0
| 0
| 0.334317
| 1,017
| 41
| 53
| 24.804878
| 0.807976
| 0
| 0
| 0.225806
| 0
| 0
| 0.00885
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.258065
| false
| 0
| 0.032258
| 0
| 0.580645
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
9cb8e3fd93d66ca659d61875414b987d07dcaebc
| 7,174
|
py
|
Python
|
testing/impl/test_big_segments.py
|
annuupadhyayPS/python-server-sdk-2
|
782dac861e81c1f5988af93019f5d1d506e8ef00
|
[
"Apache-2.0"
] | null | null | null |
testing/impl/test_big_segments.py
|
annuupadhyayPS/python-server-sdk-2
|
782dac861e81c1f5988af93019f5d1d506e8ef00
|
[
"Apache-2.0"
] | null | null | null |
testing/impl/test_big_segments.py
|
annuupadhyayPS/python-server-sdk-2
|
782dac861e81c1f5988af93019f5d1d506e8ef00
|
[
"Apache-2.0"
] | null | null | null |
from ldclient.config import BigSegmentsConfig
from ldclient.evaluation import BigSegmentsStatus
from ldclient.impl.big_segments import BigSegmentStoreManager, _hash_for_user_key
from ldclient.interfaces import BigSegmentStoreMetadata
from testing.mock_components import MockBigSegmentStore
from queue import Queue
import time
user_key = 'user-key'
user_hash = _hash_for_user_key(user_key)
def test_membership_query_uncached_result_healthy_status():
expected_membership = { "key1": True, "key2": False }
store = MockBigSegmentStore()
store.setup_metadata_always_up_to_date()
store.setup_membership(user_hash, expected_membership)
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store))
try:
expected_result = (expected_membership, BigSegmentsStatus.HEALTHY)
assert manager.get_user_membership(user_key) == expected_result
finally:
manager.stop()
def test_membership_query_cached_result_healthy_status():
expected_membership = { "key1": True, "key2": False }
store = MockBigSegmentStore()
store.setup_metadata_always_up_to_date()
store.setup_membership(user_hash, expected_membership)
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store))
try:
expected_result = (expected_membership, BigSegmentsStatus.HEALTHY)
assert manager.get_user_membership(user_key) == expected_result
assert manager.get_user_membership(user_key) == expected_result
finally:
manager.stop()
assert store.membership_queries == [ user_hash ] # only 1 query done rather than 2, due to caching
def test_membership_query_can_cache_result_of_none():
store = MockBigSegmentStore()
store.setup_metadata_always_up_to_date()
store.setup_membership(user_hash, None)
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store))
try:
expected_result = ({}, BigSegmentsStatus.HEALTHY)
assert manager.get_user_membership(user_key) == expected_result
assert manager.get_user_membership(user_key) == expected_result
finally:
manager.stop()
assert store.membership_queries == [ user_hash ] # only 1 query done rather than 2, due to caching
def test_membership_query_cache_can_expire():
expected_membership = { "key1": True, "key2": False }
store = MockBigSegmentStore()
store.setup_metadata_always_up_to_date()
store.setup_membership(user_hash, expected_membership)
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store, user_cache_time=0.005))
try:
expected_result = (expected_membership, BigSegmentsStatus.HEALTHY)
assert manager.get_user_membership(user_key) == expected_result
time.sleep(0.1)
assert manager.get_user_membership(user_key) == expected_result
finally:
manager.stop()
assert store.membership_queries == [ user_hash, user_hash ] # cache expired after 1st query
def test_membership_query_stale_status():
expected_membership = { "key1": True, "key2": False }
store = MockBigSegmentStore()
store.setup_metadata_always_stale()
store.setup_membership(user_hash, expected_membership)
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store))
try:
expected_result = (expected_membership, BigSegmentsStatus.STALE)
assert manager.get_user_membership(user_key) == expected_result
finally:
manager.stop()
def test_membership_query_stale_status_no_store_metadata():
expected_membership = { "key1": True, "key2": False }
store = MockBigSegmentStore()
store.setup_metadata_none()
store.setup_membership(user_hash, expected_membership)
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store))
try:
expected_result = (expected_membership, BigSegmentsStatus.STALE)
assert manager.get_user_membership(user_key) == expected_result
finally:
manager.stop()
def test_membership_query_least_recent_user_evicted_from_cache():
user_key_1, user_key_2, user_key_3 = 'userkey1', 'userkey2', 'userkey3'
user_hash_1, user_hash_2, user_hash_3 = _hash_for_user_key(user_key_1), \
_hash_for_user_key(user_key_2), _hash_for_user_key(user_key_3)
membership_1, membership_2, membership_3 = { 'seg1': True }, { 'seg2': True }, { 'seg3': True }
store = MockBigSegmentStore()
store.setup_metadata_always_up_to_date()
store.setup_membership(user_hash_1, membership_1)
store.setup_membership(user_hash_2, membership_2)
store.setup_membership(user_hash_3, membership_3)
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store, user_cache_size=2))
try:
result1 = manager.get_user_membership(user_key_1)
result2 = manager.get_user_membership(user_key_2)
result3 = manager.get_user_membership(user_key_3)
assert store.membership_queries == [user_hash_1, user_hash_2, user_hash_3]
# Since the capacity is only 2 and user_key_1 was the least recently used, that key should be
# evicted by the user_key_3 query. Now only user_key_2 and user_key_3 are in the cache, and
# querying them again should not cause a new query to the store.
result2a = manager.get_user_membership(user_key_2)
result3a = manager.get_user_membership(user_key_3)
assert result2a == result2
assert result3a == result3
assert store.membership_queries == [user_hash_1, user_hash_2, user_hash_3]
result1a = manager.get_user_membership(user_key_1)
assert result1a == result1
assert store.membership_queries == [user_hash_1, user_hash_2, user_hash_3, user_hash_1]
finally:
manager.stop()
def test_status_polling_detects_store_unavailability():
store = MockBigSegmentStore()
store.setup_metadata_always_up_to_date()
statuses = Queue()
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store, status_poll_interval=0.01))
try:
manager.status_provider.add_listener(lambda status: statuses.put(status))
status1 = manager.status_provider.status
assert status1.available == True
store.setup_metadata_error()
status2 = statuses.get(True, 1.0)
assert status2.available == False
store.setup_metadata_always_up_to_date()
status3 = statuses.get(True, 1.0)
assert status3.available == True
finally:
manager.stop()
def test_status_polling_detects_stale_status():
store = MockBigSegmentStore()
store.setup_metadata_always_up_to_date()
statuses = Queue()
manager = BigSegmentStoreManager(BigSegmentsConfig(store=store, status_poll_interval=0.01))
try:
manager.status_provider.add_listener(lambda status: statuses.put(status))
status1 = manager.status_provider.status
assert status1.stale == False
store.setup_metadata_always_stale()
status2 = statuses.get(True, 1.0)
assert status2.stale == True
store.setup_metadata_always_up_to_date()
status3 = statuses.get(True, 1.0)
assert status3.stale == False
finally:
manager.stop()
| 40.303371
| 103
| 0.73613
| 866
| 7,174
| 5.73903
| 0.147806
| 0.046479
| 0.042254
| 0.072435
| 0.785513
| 0.765392
| 0.740845
| 0.700201
| 0.638431
| 0.632998
| 0
| 0.017924
| 0.18344
| 7,174
| 177
| 104
| 40.531073
| 0.830488
| 0.051575
| 0
| 0.652482
| 0
| 0
| 0.012358
| 0
| 0
| 0
| 0
| 0
| 0.170213
| 1
| 0.06383
| false
| 0
| 0.049645
| 0
| 0.113475
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9cbe7ffd8d5ee1ddc90b4e073fe95bef3eef59c6
| 86
|
py
|
Python
|
InvalidSizeException.py
|
renshj/High-Cadence-Processing
|
5d5a2df741858f6e1466d7c4b008e9245d4b780a
|
[
"MIT"
] | null | null | null |
InvalidSizeException.py
|
renshj/High-Cadence-Processing
|
5d5a2df741858f6e1466d7c4b008e9245d4b780a
|
[
"MIT"
] | null | null | null |
InvalidSizeException.py
|
renshj/High-Cadence-Processing
|
5d5a2df741858f6e1466d7c4b008e9245d4b780a
|
[
"MIT"
] | null | null | null |
#This file was created by Tate Hagan
class InvalidSizeException(Exception):
pass
| 28.666667
| 39
| 0.77907
| 11
| 86
| 6.090909
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.174419
| 86
| 3
| 40
| 28.666667
| 0.943662
| 0.406977
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.5
| 0
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
9cc4ef180071919386b4ebc30c3c006fe56901f7
| 60
|
py
|
Python
|
src/controller/ai/heuristics/heuristic.py
|
arubenruben/IART-Ball-Sort-Puzzle
|
0d71c533e9a329b61220cb90c0bc5a67ae404b89
|
[
"MIT"
] | null | null | null |
src/controller/ai/heuristics/heuristic.py
|
arubenruben/IART-Ball-Sort-Puzzle
|
0d71c533e9a329b61220cb90c0bc5a67ae404b89
|
[
"MIT"
] | null | null | null |
src/controller/ai/heuristics/heuristic.py
|
arubenruben/IART-Ball-Sort-Puzzle
|
0d71c533e9a329b61220cb90c0bc5a67ae404b89
|
[
"MIT"
] | null | null | null |
class Heuristic:
def evaluate(self, node):
pass
| 15
| 29
| 0.616667
| 7
| 60
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.3
| 60
| 3
| 30
| 20
| 0.880952
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
9cd094ba1fe64b68dd01aa2a34a96cbd8c40ab9b
| 106
|
py
|
Python
|
tronpy/__init__.py
|
itsAPK/tronpy
|
2ffc4f86da1fe5c1429d86d905d185e6918a0a61
|
[
"MIT"
] | 1
|
2020-10-04T05:50:46.000Z
|
2020-10-04T05:50:46.000Z
|
env/lib/python3.6/site-packages/tronpy/__init__.py
|
YazdanRa/ad_bot
|
976a6c73cf94746cb92afea1ed3a0e77acfafb46
|
[
"MIT"
] | null | null | null |
env/lib/python3.6/site-packages/tronpy/__init__.py
|
YazdanRa/ad_bot
|
976a6c73cf94746cb92afea1ed3a0e77acfafb46
|
[
"MIT"
] | null | null | null |
from tronpy.tron import Tron
from tronpy.contract import Contract, ShieldedTRC20
TRX = 1_000_000
SUN = 1
| 17.666667
| 51
| 0.801887
| 17
| 106
| 4.882353
| 0.588235
| 0.240964
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 0.150943
| 106
| 5
| 52
| 21.2
| 0.811111
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
9cf3101e56714044e7d21f6c90c4cb271011c0c4
| 42,599
|
py
|
Python
|
cathedral/graphics/shapes.py
|
tetris-hermetris/cathedral
|
4b7809c9406f22ae8842760270e5a97c5bbbed17
|
[
"MIT"
] | 1
|
2020-10-11T21:54:33.000Z
|
2020-10-11T21:54:33.000Z
|
cathedral/graphics/shapes.py
|
tetris-hermetris/cathedral
|
4b7809c9406f22ae8842760270e5a97c5bbbed17
|
[
"MIT"
] | null | null | null |
cathedral/graphics/shapes.py
|
tetris-hermetris/cathedral
|
4b7809c9406f22ae8842760270e5a97c5bbbed17
|
[
"MIT"
] | null | null | null |
from .geometry import move, moveToPoint
from ..utils import sgn
from math import sin, cos, pi
def window(w=200, h=200, n=150, pivot=(500, 500), sectors=4, corners=1, color={'reds':1}):
'''Generate window primitive based on superellipse,
returns (points, 'live', color)'''
if corners != 0: corners = 1
n = (abs(n) + 1) / 100
sectors *=4
w /= 2
h /= 2
x, y = pivot
na = 2 / n
piece = (pi * 2) / sectors
points = []
t = 0
for t1 in range(sectors + 1):
xO=(abs((cos(t)))**na)*w*sgn(cos(t))
yO=(abs((sin(t)))**na)*h*sgn(sin(t))
if not corners:
points.append((xO+x, yO+y))
elif sgn(yO) >= 0:
points.append((xO+x, yO+y))
elif sgn(xO) < 1:
points.append((x-w, yO+y))
else:
if corners == 1:
points.append((x, y-h))
points.append((x+w, y-h))
corners = 2
points.append((x+w, yO+y))
t+=piece
poly = tuple(reversed(points[:-1]))
return [poly, 'live', color]
def star(s=50, pivot=(500, 500), phase=0, rays=8, lenght=15, fixed=True, color={'yellows':1}):
'''A star primitive as (points, 'live', color)'''
if fixed: rays = int(rays)
if phase > 1: phase = 1
if phase < 0: phase = 0
points = []
ray_angle = 360 / (rays)
for n in range(int(360 / ray_angle)):
p0 = move(pivot, ray_angle * n, s/2, 'deg')
p2 = move(pivot, (ray_angle * n) + (ray_angle / 2), s/2 - lenght, 'deg')
points.append(p0)
points.append(p2)
poly = tuple(reversed(points))
return [poly, 'live', color]
def sheep(s=50, pivot=(500, 500), phase=0, color={'whites':1}):
'''A sheep primitive as (points, 'live', color)'''
phase = abs((phase % 100 - 50) * 2)
fr1 = ((0.7476459510357816, 0.048), (0.60075329566855, -0.624), (0.6346516007532956, -0.964), (0.5630885122410546, -1.052), (0.4576271186440678, -0.948), (0.4915254237288136, -0.596), (0.4274952919020716, -0.268), (0.3069679849340866, -0.264), (0.2391713747645951, -0.672), (0.1751412429378531, -0.98), (0.09227871939736347, -1.064), (0.02824858757062147, -0.94), (0.11487758945386065, -0.676), (0.0696798493408663, -0.28), (-0.2542372881355932, -0.344), (-0.4274952919020716, -0.62), (-0.3973634651600753, -0.948), (-0.4312617702448211, -1.056), (-0.5291902071563088, -0.996), (-0.5480225988700564, -0.584), (-0.4764595103578154, -0.3), (-0.5254237288135594, -0.264), (-0.608286252354049, -0.552), (-0.6045197740112994, -1.016), (-0.6572504708097928, -1.104), (-0.7401129943502824, -1.016), (-0.7401129943502824, -0.516), (-0.9058380414312618, -0.12), (-0.8757062146892656, 0.212), (-1.0, 0.212), (-0.6308851224105462, 0.516), (-0.20903954802259886, 0.412), (0.20527306967984935, 0.436), (0.2693032015065913, 0.8), (0.2580037664783427, 0.836), (0.2919020715630885, 0.844), (0.3182674199623352, 0.808), (0.3709981167608286, 0.828), (0.352165725047081, 0.872), (0.2580037664783427, 0.86), (0.10734463276836158, 0.888), (0.04331450094161959, 1.068), (0.1751412429378531, 1.068), (0.3069679849340866, 0.924), (0.3860640301318267, 1.0), (0.5819209039548022, 0.996), (0.6610169491525424, 0.932), (0.7928436911487758, 1.052), (0.9133709981167608, 1.032), (0.8267419962335216, 0.86), (0.7137476459510358, 0.84), (0.615819209039548, 0.852), (0.6120527306967984, 0.808), (0.6308851224105462, 0.78), (0.7024482109227872, 0.828), (0.6572504708097928, 0.72), (0.5404896421845574, 0.6), (0.4124293785310734, 0.6), (0.4651600753295669, 0.536), (0.4350282485875706, 0.5), (0.5103578154425612, 0.5), (0.480225988700565, 0.536), (0.5404896421845574, 0.6), (0.6572504708097928, 0.72), (0.672316384180791, 0.604), (0.687382297551789, 0.504), (0.6949152542372882, 0.46), (0.7062146892655368, 0.404))
fr2 = ((0.6836158192090396, 0.044), (0.6120527306967984, -0.64), (0.623352165725047, -0.956), (0.5630885122410546, -1.052), (0.4463276836158192, -1.004), (0.4990583804143126, -0.66), (0.4576271186440678, -0.3), (0.3069679849340866, -0.264), (0.2843691148775895, -0.644), (0.1374764595103578, -0.972), (0.0696798493408663, -1.036), (-0.0018832391713747645, -0.932), (0.1638418079096045, -0.592), (0.04331450094161959, -0.264), (-0.1751412429378531, -0.276), (-0.4086629001883239, -0.56), (-0.3709981167608286, -0.976), (-0.4538606403013183, -0.94), (-0.4764595103578154, -0.896), (-0.551789077212806, -0.552), (-0.487758945386064, -0.252), (-0.5480225988700564, -0.264), (-0.67984934086629, -0.544), (-0.6045197740112994, -0.996), (-0.664783427495292, -1.008), (-0.736346516007533, -0.928), (-0.8493408662900188, -0.512), (-0.9058380414312618, -0.12), (-0.8757062146892656, 0.212), (-1.0, 0.212), (-0.6308851224105462, 0.516), (-0.11487758945386065, 0.412), (0.15254237288135594, 0.436), (0.4387947269303202, 0.8), (0.4199623352165725, 0.868), (0.5743879472693032, 0.876), (0.6271186440677966, 0.816), (0.6760828625235404, 0.836), (0.6534839924670434, 0.88), (0.4199623352165725, 0.868), (0.2843691148775895, 0.888), (0.19397363465160075, 1.044), (0.3258003766478343, 1.068), (0.4689265536723164, 0.964), (0.5291902071563088, 1.04), (0.7250470809792844, 1.036), (0.7853107344632768, 0.992), (0.8041431261770244, 1.016), (0.9322033898305084, 1.052), (0.8945386064030132, 0.96), (0.8418079096045198, 0.9), (0.8267419962335216, 0.9), (0.8267419962335216, 0.892), (0.8305084745762712, 0.888), (0.8305084745762712, 0.888), (1.0, 0.708), (0.9887005649717514, 0.704), (0.9096045197740112, 0.7), (0.9510357815442562, 0.648), (0.9133709981167608, 0.612), (0.9736346516007532, 0.612), (0.9623352165725048, 0.648), (0.9887005649717514, 0.704), (1.0, 0.708), (0.9774011299435028, 0.6), (0.9058380414312618, 0.556), (0.7288135593220338, 0.58), (0.664783427495292, 0.4))
points = []
for i in range(len(fr1)):
p = moveToPoint(fr1[i], fr2[i], phase)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
poly = tuple(points)
return [poly, 'live', color]
def salamandra(s=50, pivot=(500, 500), phase=0, color={'yellows':1}):
'''A salamandra primitive as (points, 'live', color)'''
phase = abs((phase % 100 - 50) * 2)
fr1 = ((0.12264, -0.324), (0.25472, -0.344), (0.15566, -0.564), (0.40566, -0.532), (0.56604, -0.552), (0.61792, -0.496), (0.7217, -0.568), (0.62736, -0.652), (0.55189, -0.608), (0.36321, -0.628), (0.06604, -0.764), (0.00943, -1.004), (0.12736, -1.204), (0.32547, -1.284), (0.43868, -1.192), (0.58491, -1.264), (0.58491, -1.368), (0.44811, -1.456), (0.31132, -1.368), (0.05189, -1.28), (-0.16981, -1.04), (-0.21698, -0.688), (-0.41981, -0.588), (-0.51887, -0.392), (-0.60377, -0.36), (-0.5566, -0.26), (-0.4434, -0.284), (-0.46226, -0.368), (-0.36321, -0.488), (-0.17925, -0.528), (-0.11321, -0.372), (0.00943, -0.332), (-0.11321, -0.304), (-0.17925, -0.116), (-0.37736, -0.06), (-0.58962, -0.104), (-0.65094, -0.164), (-0.74528, -0.12), (-0.70755, -0.032), (-0.62736, -0.056), (-0.43868, 0.036), (-0.24057, 0.064), (-0.29717, 0.264), (-0.15094, 0.292), (-0.29717, 0.336), (-0.25472, 0.524), (-0.44811, 0.696), (-0.51415, 0.916), (-0.61792, 0.984), (-0.5283, 1.088), (-0.41509, 1.024), (-0.44811, 0.96), (-0.34906, 0.78), (-0.12736, 0.72), (-0.06604, 0.824), (-0.20283, 0.944), (-0.13208, 1.024), (-0.07547, 0.992), (-0.04245, 1.04), (-0.09906, 1.068), (0.08491, 1.34), (0.12264, 1.332), (0.13679, 1.256), (0.09906, 1.228), (0.14151, 1.18), (0.18868, 1.22), (0.16509, 1.256), (0.20755, 1.32), (0.24528, 1.324), (0.33019, 1.036), (0.27358, 1.004), (0.29717, 0.964), (0.35849, 0.992), (0.40094, 0.912), (0.23585, 0.764), (0.25943, 0.7), (0.47642, 0.744), (0.68868, 0.644), (0.75472, 0.68), (0.84434, 0.608), (0.74057, 0.532), (0.66981, 0.588), (0.46226, 0.632), (0.22642, 0.448), (0.14623, 0.328), (0.0, 0.296), (0.13679, 0.26), (0.15566, 0.16), (0.39151, 0.22), (0.53302, 0.32), (0.5566, 0.388), (0.66981, 0.36), (0.66038, 0.244), (0.56132, 0.232), (0.42925, 0.108), (0.21698, -0.044), (0.25472, -0.284))
fr2 = ((0.15094, -0.332), (0.26887, -0.372), (0.09906, -0.628), (0.32075, -0.656), (0.48113, -0.692), (0.54245, -0.644), (0.63208, -0.732), (0.5283, -0.8), (0.46226, -0.748), (0.26415, -0.748), (-0.0283, -0.808), (-0.18868, -1.048), (-0.24057, -1.284), (-0.28774, -1.48), (-0.20283, -1.592), (-0.31132, -1.692), (-0.43868, -1.676), (-0.50943, -1.556), (-0.38679, -1.464), (-0.38208, -1.252), (-0.36792, -0.996), (-0.26887, -0.688), (-0.43868, -0.56), (-0.53302, -0.38), (-0.62264, -0.36), (-0.58491, -0.26), (-0.48113, -0.276), (-0.49057, -0.356), (-0.37264, -0.472), (-0.20283, -0.54), (-0.09906, -0.372), (0.03774, -0.336), (-0.08962, -0.3), (-0.12736, -0.112), (-0.33491, -0.052), (-0.50943, -0.056), (-0.58491, -0.1), (-0.66038, -0.032), (-0.60377, 0.028), (-0.54717, -0.004), (-0.37264, 0.048), (-0.16509, 0.064), (-0.2217, 0.264), (-0.08491, 0.304), (-0.23113, 0.336), (-0.23113, 0.516), (-0.43396, 0.66), (-0.58962, 0.76), (-0.69811, 0.78), (-0.68868, 0.884), (-0.56604, 0.884), (-0.55189, 0.82), (-0.36792, 0.748), (-0.14151, 0.7), (-0.09434, 0.8), (-0.25, 0.908), (-0.1934, 0.996), (-0.13208, 0.968), (-0.10377, 1.016), (-0.16509, 1.044), (-0.02358, 1.324), (0.01887, 1.32), (0.04245, 1.248), (0.0, 1.208), (0.0566, 1.16), (0.10849, 1.212), (0.06604, 1.252), (0.10377, 1.32), (0.14151, 1.324), (0.26415, 1.052), (0.20755, 1.016), (0.23585, 0.976), (0.29717, 1.008), (0.34906, 0.936), (0.20283, 0.768), (0.23585, 0.712), (0.4434, 0.776), (0.64623, 0.8), (0.69811, 0.852), (0.8066, 0.804), (0.73585, 0.716), (0.66038, 0.748), (0.46226, 0.668), (0.24057, 0.484), (0.21698, 0.36), (0.07075, 0.316), (0.21698, 0.288), (0.23585, 0.152), (0.46698, 0.2), (0.61321, 0.268), (0.64623, 0.328), (0.75472, 0.284), (0.71698, 0.184), (0.63208, 0.184), (0.5, 0.092), (0.28302, -0.048), (0.28302, -0.304))
fr3 = ((0.19811, -0.424), (0.28774, -0.484), (0.06132, -0.692), (0.21698, -0.796), (0.39623, -0.832), (0.45755, -0.8), (0.53774, -0.892), (0.4434, -0.952), (0.37736, -0.896), (0.16038, -0.888), (-0.10377, -0.84), (-0.45283, -0.996), (-0.79245, -1.08), (-1.06132, -1.076), (-1.18396, -1.148), (-1.29717, -1.064), (-1.28774, -0.972), (-1.15566, -0.912), (-1.04717, -1.008), (-0.82547, -0.992), (-0.56604, -0.908), (-0.29245, -0.68), (-0.41509, -0.524), (-0.55189, -0.4), (-0.64151, -0.408), (-0.66038, -0.312), (-0.56132, -0.284), (-0.5283, -0.356), (-0.35377, -0.448), (-0.19811, -0.548), (-0.07547, -0.424), (0.07075, -0.404), (-0.04245, -0.348), (-0.01887, -0.144), (-0.24528, -0.076), (-0.42453, -0.02), (-0.51887, -0.028), (-0.53302, 0.068), (-0.42925, 0.08), (-0.41509, 0.02), (-0.24528, 0.028), (-0.01887, 0.028), (-0.07075, 0.228), (0.06132, 0.3), (-0.10377, 0.316), (-0.18868, 0.46), (-0.41038, 0.552), (-0.62264, 0.564), (-0.68396, 0.508), (-0.78302, 0.568), (-0.6934, 0.656), (-0.62736, 0.624), (-0.40094, 0.648), (-0.17453, 0.624), (-0.15566, 0.716), (-0.34906, 0.792), (-0.32075, 0.904), (-0.25, 0.88), (-0.23113, 0.932), (-0.30189, 0.952), (-0.24057, 1.252), (-0.1934, 1.256), (-0.15094, 1.192), (-0.17453, 1.156), (-0.11792, 1.124), (-0.08491, 1.176), (-0.12736, 1.2), (-0.10849, 1.276), (-0.07075, 1.284), (0.12736, 1.04), (0.07547, 0.996), (0.11792, 0.964), (0.16981, 1.004), (0.24057, 0.944), (0.13208, 0.736), (0.1934, 0.692), (0.37264, 0.796), (0.49057, 0.904), (0.46226, 0.948), (0.57075, 1.004), (0.62736, 0.916), (0.56132, 0.884), (0.45755, 0.704), (0.27358, 0.512), (0.34434, 0.364), (0.21226, 0.32), (0.36792, 0.288), (0.40094, 0.1), (0.61321, 0.124), (0.77358, 0.12), (0.82547, 0.164), (0.91981, 0.092), (0.83019, 0.02), (0.76887, 0.052), (0.63679, 0.016), (0.41038, -0.096), (0.32547, -0.408))
fr4 = ((0.19811, -0.516), (0.28774, -0.596), (0.0283, -0.804), (0.15094, -0.952), (0.33962, -0.992), (0.40566, -0.968), (0.47642, -1.068), (0.38208, -1.12), (0.31604, -1.06), (0.08962, -1.04), (-0.16038, -0.932), (-0.57547, -1.0), (-0.90566, -0.816), (-0.99057, -0.528), (-1.07547, -0.392), (-0.98113, -0.308), (-0.86792, -0.32), (-0.80189, -0.432), (-0.91981, -0.52), (-0.82547, -0.724), (-0.60377, -0.848), (-0.32075, -0.744), (-0.41509, -0.568), (-0.56132, -0.472), (-0.65566, -0.492), (-0.69811, -0.396), (-0.59906, -0.352), (-0.55189, -0.42), (-0.35377, -0.5), (-0.20283, -0.624), (-0.0566, -0.496), (0.08491, -0.484), (-0.02358, -0.44), (0.03302, -0.22), (-0.20283, -0.148), (-0.33962, 0.0), (-0.42925, 0.008), (-0.41038, 0.108), (-0.30189, 0.092), (-0.3066, 0.028), (-0.18396, -0.044), (0.05189, -0.052), (-0.01415, 0.148), (0.13208, 0.224), (-0.04717, 0.228), (-0.15094, 0.348), (-0.39151, 0.388), (-0.58019, 0.304), (-0.61321, 0.224), (-0.75, 0.244), (-0.6934, 0.36), (-0.61321, 0.352), (-0.40566, 0.488), (-0.17925, 0.488), (-0.17453, 0.576), (-0.38679, 0.628), (-0.36321, 0.752), (-0.28302, 0.736), (-0.27358, 0.788), (-0.34906, 0.804), (-0.32075, 1.116), (-0.27358, 1.124), (-0.2217, 1.068), (-0.23585, 1.028), (-0.17925, 1.004), (-0.15094, 1.06), (-0.19811, 1.08), (-0.18396, 1.16), (-0.14623, 1.172), (0.08019, 0.956), (0.03302, 0.908), (0.07547, 0.876), (0.12736, 0.924), (0.20283, 0.876), (0.10849, 0.644), (0.18396, 0.608), (0.35849, 0.74), (0.39623, 0.916), (0.32547, 0.944), (0.40566, 1.052), (0.51415, 1.0), (0.48113, 0.924), (0.4717, 0.664), (0.30189, 0.456), (0.42453, 0.32), (0.2783, 0.256), (0.43868, 0.236), (0.48113, 0.012), (0.68868, 0.024), (0.85377, -0.016), (0.91509, 0.024), (1.0, -0.064), (0.88679, -0.12), (0.83962, -0.076), (0.70283, -0.084), (0.47642, -0.18), (0.34906, -0.516))
points = []
if 0 <= phase < 33.3:
for i in range(len(fr1)):
p = moveToPoint(fr1[i], fr2[i], phase*3)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
if 33.3 <= phase < 66.6:
for i in range(len(fr1)):
p = moveToPoint(fr2[i], fr3[i], (phase-33.3)*3)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
if 66.6 <= phase <= 100:
for i in range(len(fr1)):
p = moveToPoint(fr3[i], fr4[i], (phase-66.6)*3)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
poly = tuple(points)
return [poly, 'live', color]
def salamalamandra(s=50, pivot=(500, 500), phase=0, color={'yellows':1}):
'''Long version of salamandra primitive as (points, 'live', color)'''
phase = abs((phase % 100 - 50) * 2)
fr1 = ((0.10363, 2.072), (0.18135, 2.128), (0.13472, 2.172), (0.18653, 2.236), (0.24352, 2.24), (0.43005, 1.88), (0.35751, 1.84), (0.3886, 1.796), (0.46632, 1.828), (0.50777, 1.756), (0.2487, 1.628), (0.29016, 1.58), (0.64767, 1.644), (0.81347, 1.58), (0.8601, 1.616), (0.95855, 1.556), (0.88083, 1.488), (0.80311, 1.524), (0.64249, 1.552), (0.37306, 1.412), (0.29534, 1.164), (0.35233, 0.976), (0.6114, 1.08), (0.72021, 1.208), (0.73057, 1.28), (0.84456, 1.296), (0.8601, 1.196), (0.78756, 1.172), (0.67358, 1.004), (0.39896, 0.788), (0.46114, 0.58), (0.35233, 0.304), (0.60104, 0.364), (0.81347, 0.276), (0.88601, 0.316), (0.98446, 0.244), (0.87047, 0.164), (0.79793, 0.22), (0.58031, 0.248), (0.27979, 0.136), (0.15026, -0.136), (0.20725, -0.26), (0.50259, -0.156), (0.65285, -0.052), (0.67876, 0.016), (0.79275, 0.008), (0.79275, -0.096), (0.68912, -0.112), (0.54404, -0.268), (0.27979, -0.424), (0.35233, -0.628), (0.27461, -0.944), (0.54922, -0.928), (0.72539, -0.952), (0.78756, -0.896), (0.89637, -0.972), (0.80311, -1.052), (0.71503, -1.004), (0.50259, -1.02), (0.23316, -1.172), (0.17098, -1.328), (0.16062, -1.56), (0.19689, -1.744), (0.28497, -1.912), (0.16062, -1.952), (0.0829, -1.764), (0.01036, -1.552), (-0.03627, -1.36), (-0.06736, -1.084), (-0.3057, -0.976), (-0.40415, -0.78), (-0.49741, -0.744), (-0.44041, -0.648), (-0.33679, -0.68), (-0.34715, -0.76), (-0.24352, -0.88), (-0.04145, -0.924), (0.01554, -0.644), (-0.06218, -0.512), (-0.27979, -0.464), (-0.51295, -0.516), (-0.58549, -0.576), (-0.68394, -0.532), (-0.64249, -0.444), (-0.5544, -0.464), (-0.35233, -0.368), (-0.13472, -0.332), (-0.21762, -0.116), (-0.18135, 0.112), (-0.40933, 0.284), (-0.5285, 0.452), (-0.61658, 0.48), (-0.58549, 0.58), (-0.48705, 0.556), (-0.48705, 0.488), (-0.33161, 0.376), (-0.11399, 0.32), (-0.06218, 0.516), (-0.15026, 0.704), (-0.37824, 0.756), (-0.58031, 0.732), (-0.63731, 0.668), (-0.75648, 0.712), (-0.70984, 0.804), (-0.62694, 0.788), (-0.46114, 0.844), (-0.27461, 0.872), (-0.38342, 1.072), (-0.35233, 1.388), (-0.53368, 1.524), (-0.62176, 1.748), (-0.70466, 1.796), (-0.65285, 1.892), (-0.54404, 1.828), (-0.56995, 1.768), (-0.46632, 1.612), (-0.15026, 1.572), (-0.10363, 1.652), (-0.34715, 1.772), (-0.29016, 1.852), (-0.21762, 1.82), (-0.18653, 1.872), (-0.25907, 1.9), (0.00518, 2.252), (0.06218, 2.248), (0.08808, 2.168), (0.02591, 2.132))
fr2 = ((0.10363, 2.024), (0.20207, 2.092), (0.15026, 2.136), (0.20207, 2.208), (0.25907, 2.208), (0.43005, 1.848), (0.35751, 1.804), (0.39378, 1.76), (0.46632, 1.796), (0.51295, 1.684), (0.25389, 1.588), (0.31088, 1.54), (0.63731, 1.524), (0.81865, 1.48), (0.86528, 1.516), (0.95855, 1.452), (0.88083, 1.388), (0.80311, 1.424), (0.64767, 1.428), (0.37824, 1.316), (0.27979, 1.172), (0.33161, 0.9), (0.6114, 0.92), (0.76684, 0.988), (0.80829, 1.044), (0.91192, 1.028), (0.88083, 0.94), (0.80829, 0.936), (0.64249, 0.836), (0.37306, 0.704), (0.3886, 0.476), (0.30052, 0.232), (0.55959, 0.248), (0.78756, 0.184), (0.8601, 0.22), (0.95855, 0.152), (0.84974, 0.068), (0.77202, 0.128), (0.5544, 0.132), (0.23834, 0.04), (0.18135, -0.18), (0.21244, -0.328), (0.49223, -0.296), (0.67358, -0.244), (0.71503, -0.18), (0.82383, -0.212), (0.79793, -0.312), (0.6943, -0.304), (0.50777, -0.396), (0.23316, -0.512), (0.26943, -0.764), (0.1658, -1.02), (0.4456, -1.032), (0.64767, -1.06), (0.70466, -1.004), (0.81865, -1.08), (0.71503, -1.156), (0.63212, -1.112), (0.41451, -1.128), (0.1399, -1.232), (0.05699, -1.408), (0.03109, -1.648), (0.03627, -1.848), (0.09326, -2.02), (-0.03109, -2.02), (-0.07772, -1.856), (-0.11917, -1.64), (-0.15026, -1.428), (-0.17617, -1.164), (-0.40933, -1.072), (-0.55959, -0.928), (-0.64767, -0.924), (-0.64249, -0.832), (-0.54404, -0.828), (-0.52332, -0.9), (-0.36269, -0.972), (-0.13472, -1.0), (-0.09326, -0.776), (-0.15026, -0.56), (-0.3886, -0.516), (-0.62694, -0.532), (-0.70984, -0.576), (-0.79793, -0.524), (-0.73057, -0.44), (-0.65803, -0.476), (-0.43005, -0.412), (-0.18653, -0.376), (-0.23316, -0.2), (-0.21244, 0.04), (-0.4715, 0.168), (-0.62694, 0.288), (-0.71503, 0.292), (-0.72539, 0.384), (-0.62694, 0.388), (-0.60104, 0.332), (-0.41451, 0.268), (-0.17098, 0.244), (-0.1399, 0.452), (-0.17617, 0.644), (-0.39896, 0.684), (-0.60622, 0.684), (-0.67358, 0.628), (-0.78238, 0.684), (-0.72021, 0.768), (-0.64249, 0.744), (-0.46632, 0.78), (-0.25907, 0.816), (-0.34715, 1.044), (-0.25389, 1.32), (-0.54404, 1.408), (-0.69948, 1.556), (-0.78756, 1.564), (-0.79793, 1.648), (-0.68394, 1.636), (-0.67358, 1.584), (-0.49741, 1.5), (-0.1658, 1.532), (-0.09326, 1.612), (-0.34197, 1.724), (-0.29016, 1.804), (-0.21762, 1.772), (-0.18653, 1.824), (-0.25907, 1.856), (-0.03627, 2.22), (0.02591, 2.216), (0.06736, 2.136), (0.01036, 2.096))
fr3 = ((0.03627, 2.02), (0.13472, 2.104), (0.0829, 2.144), (0.12953, 2.216), (0.18653, 2.216), (0.37824, 1.868), (0.31088, 1.824), (0.35233, 1.772), (0.41451, 1.808), (0.4715, 1.732), (0.2228, 1.604), (0.27979, 1.496), (0.61658, 1.5), (0.76684, 1.572), (0.7772, 1.616), (0.87565, 1.616), (0.8601, 1.536), (0.78238, 1.532), (0.65803, 1.408), (0.34715, 1.3), (0.41969, 1.02), (0.34197, 0.816), (0.59067, 0.776), (0.78238, 0.74), (0.86528, 0.768), (0.92746, 0.692), (0.82383, 0.632), (0.76166, 0.68), (0.54922, 0.684), (0.29534, 0.656), (0.25389, 0.432), (0.25907, 0.2), (0.50259, 0.212), (0.70984, 0.256), (0.74611, 0.312), (0.84456, 0.288), (0.80829, 0.196), (0.72539, 0.208), (0.55959, 0.108), (0.26425, -0.012), (0.23316, -0.232), (0.21244, -0.432), (0.52332, -0.452), (0.73575, -0.504), (0.81347, -0.468), (0.88083, -0.54), (0.79793, -0.604), (0.71503, -0.56), (0.48705, -0.56), (0.19689, -0.616), (0.17617, -0.828), (0.18653, -1.024), (0.44041, -1.016), (0.60622, -0.964), (0.63212, -0.896), (0.74093, -0.912), (0.72539, -1.004), (0.63731, -1.0), (0.48187, -1.116), (0.20207, -1.2), (0.18135, -1.452), (0.13472, -1.66), (0.0829, -1.868), (0.03109, -2.048), (-0.10363, -2.02), (-0.02591, -1.844), (-0.02591, -1.664), (-0.03109, -1.432), (-0.06218, -1.224), (-0.35751, -1.136), (-0.58031, -1.108), (-0.66839, -1.152), (-0.75648, -1.068), (-0.65803, -1.004), (-0.58549, -1.056), (-0.37306, -1.036), (-0.10363, -1.044), (-0.14508, -0.84), (-0.16062, -0.596), (-0.40933, -0.504), (-0.60104, -0.42), (-0.69948, -0.432), (-0.74093, -0.344), (-0.64249, -0.304), (-0.59067, -0.36), (-0.39896, -0.396), (-0.13472, -0.4), (-0.1658, -0.224), (-0.20207, -0.016), (-0.47668, 0.088), (-0.6943, 0.096), (-0.7772, 0.052), (-0.87047, 0.132), (-0.7772, 0.188), (-0.70984, 0.148), (-0.48187, 0.2), (-0.24352, 0.188), (-0.27461, 0.468), (-0.27979, 0.688), (-0.50259, 0.796), (-0.66839, 0.892), (-0.74611, 0.88), (-0.78238, 0.964), (-0.68394, 0.996), (-0.64249, 0.94), (-0.49223, 0.888), (-0.2487, 0.852), (-0.23316, 1.064), (-0.23834, 1.34), (-0.53368, 1.416), (-0.74093, 1.42), (-0.82383, 1.38), (-0.91192, 1.448), (-0.80829, 1.508), (-0.7513, 1.468), (-0.5285, 1.512), (-0.19689, 1.5), (-0.12953, 1.604), (-0.38342, 1.72), (-0.33679, 1.8), (-0.26425, 1.768), (-0.23316, 1.812), (-0.30052, 1.848), (-0.12435, 2.212), (-0.07254, 2.216), (-0.02073, 2.144), (-0.06736, 2.1))
fr4 = ((0.01554, 2.076), (0.0829, 2.132), (0.02073, 2.168), (0.04663, 2.248), (0.10363, 2.248), (0.35751, 1.916), (0.29534, 1.868), (0.33161, 1.816), (0.39896, 1.848), (0.45596, 1.764), (0.21244, 1.652), (0.27461, 1.572), (0.60104, 1.612), (0.70466, 1.768), (0.67876, 1.828), (0.78238, 1.892), (0.83938, 1.796), (0.7513, 1.748), (0.66321, 1.524), (0.39378, 1.388), (0.51295, 1.1), (0.37306, 0.868), (0.55959, 0.84), (0.72539, 0.784), (0.80829, 0.8), (0.84974, 0.708), (0.73575, 0.664), (0.67876, 0.728), (0.47668, 0.752), (0.24352, 0.7), (0.15026, 0.548), (0.2487, 0.32), (0.46632, 0.376), (0.61658, 0.488), (0.62176, 0.556), (0.72021, 0.58), (0.7513, 0.48), (0.66321, 0.452), (0.54404, 0.284), (0.31606, 0.112), (0.35233, -0.116), (0.26943, -0.332), (0.48705, -0.368), (0.68394, -0.464), (0.7772, -0.444), (0.81347, -0.532), (0.71503, -0.576), (0.64767, -0.516), (0.41451, -0.464), (0.19171, -0.512), (0.09845, -0.732), (0.17617, -0.924), (0.37824, -0.88), (0.47668, -0.76), (0.4715, -0.68), (0.57513, -0.648), (0.63212, -0.744), (0.53886, -0.78), (0.44041, -0.976), (0.2228, -1.084), (0.20207, -1.38), (0.14508, -1.588), (0.03627, -1.76), (-0.08808, -1.932), (-0.20725, -1.868), (-0.06736, -1.7), (-0.04145, -1.56), (-0.01554, -1.328), (-0.06218, -1.136), (-0.36788, -1.02), (-0.58031, -1.004), (-0.66839, -1.052), (-0.76684, -0.972), (-0.65285, -0.896), (-0.59585, -0.952), (-0.41969, -0.928), (-0.1399, -0.944), (-0.2487, -0.684), (-0.18653, -0.424), (-0.40933, -0.268), (-0.5544, -0.112), (-0.65803, -0.096), (-0.66321, 0.008), (-0.54404, 0.016), (-0.52332, -0.052), (-0.36788, -0.156), (-0.11399, -0.224), (-0.06736, -0.092), (-0.18135, 0.056), (-0.4456, 0.248), (-0.66321, 0.22), (-0.74093, 0.164), (-0.84974, 0.244), (-0.7513, 0.316), (-0.68394, 0.276), (-0.46632, 0.364), (-0.2228, 0.304), (-0.3886, 0.66), (-0.3057, 0.816), (-0.53886, 1.004), (-0.65285, 1.172), (-0.73057, 1.196), (-0.71503, 1.296), (-0.59585, 1.28), (-0.58549, 1.208), (-0.47668, 1.08), (-0.22798, 1.004), (-0.16062, 1.164), (-0.21244, 1.388), (-0.50777, 1.552), (-0.67358, 1.524), (-0.74611, 1.488), (-0.82383, 1.556), (-0.73057, 1.616), (-0.67876, 1.58), (-0.51295, 1.644), (-0.19171, 1.58), (-0.1399, 1.628), (-0.39896, 1.756), (-0.35751, 1.836), (-0.28497, 1.8), (-0.2487, 1.844), (-0.31606, 1.884), (-0.11399, 2.244), (-0.04145, 2.244), (-0.00518, 2.168), (-0.05181, 2.128))
points = []
if 0 <= phase < 20:
for i in range(len(fr1)):
p = moveToPoint(fr1[i], fr2[i], phase*3)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
if 20 <= phase < 80:
for i in range(len(fr1)):
p = moveToPoint(fr2[i], fr3[i], (phase-33.3)*3)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
if 80 <= phase <= 100:
for i in range(len(fr1)):
p = moveToPoint(fr3[i], fr4[i], (phase-66.6)*3)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
poly = tuple(points)
return [poly, 'live', color]
def jeanne(s=50, pivot=(500, 500), phase=0, color={'yellows':1}):
'''Jeanne D'Arc primitive as (points, 'live', color)'''
phase = abs((phase % 100 - 50) * 2)
fr1 = ((-0.30501, -0.40212), (-0.29287, -0.44461), (-0.40212, -0.47193), (-0.20486, -1.38543), (-0.19575, -1.38543), (-0.23824, -0.93627), (-0.217, -0.79666), (-0.19272, -0.79666), (-0.19272, -0.72686), (-0.26555, -0.71472), (-0.19272, -0.20789), (-0.12291, -0.05615), (-0.02883, -0.04097), (-0.02883, -0.01973), (-0.09863, -0.01973), (-0.09863, 0.05008), (-0.02276, 0.05918), (-0.02276, 0.08649), (-0.10774, 0.08346), (-0.12595, 0.32625), (-0.13202, 0.32625), (-0.17147, 0.13809), (-0.1563, 0.11381), (-0.20182, 0.03187), (-0.16844, 0.00759), (-0.3566, -0.39302), (-0.53263, -0.44461), (-0.52352, -0.3566), (-0.49621, -0.32929), (-0.52352, -0.2261), (-0.56297, -0.18665), (-0.51745, -0.11684), (-0.45372, -0.16237), (-0.48103, -0.217), (-0.44765, -0.31108), (-0.40819, -0.28983), (-0.39302, -0.25038), (-0.40819, -0.23824), (-0.36571, 0.0349), (-0.34143, 0.05615), (-0.3566, 0.17754), (-0.32322, 0.20789), (-0.25645, 0.55387), (-0.20182, 0.6085), (-0.20789, 0.72382), (-0.06222, 0.76631), (0.03794, 0.77845), (0.03794, 0.84522), (0.08953, 0.83005), (0.14416, 0.83308), (0.17754, 0.87557), (0.17754, 0.8786), (0.14112, 0.85432), (0.09256, 0.84825), (0.04401, 0.86343), (0.00759, 0.94841), (-0.00152, 1.01821), (0.00759, 1.04552), (0.03187, 1.03642), (0.06525, 1.04856), (0.0349, 1.06373), (0.01366, 1.06373), (0.01366, 1.09408), (-0.00759, 1.09408), (-0.02276, 1.03945), (0.00152, 0.89378), (-0.07739, 0.94841), (-0.02276, 1.18513), (0.05918, 1.26707), (0.17147, 1.29439), (0.32625, 1.22458), (0.36267, 1.1305), (0.39605, 0.90895), (0.31108, 0.87557), (0.25038, 0.89985), (0.27162, 0.96965), (0.26252, 1.06677), (0.23217, 1.13657), (0.18665, 1.15478), (0.05008, 1.15781), (0.01366, 1.13961), (0.01669, 1.1305), (0.05311, 1.13961), (0.18665, 1.13961), (0.23217, 1.11533), (0.23824, 1.07587), (0.18665, 1.08801), (0.15933, 1.08194), (0.14719, 1.06677), (0.18665, 1.07891), (0.23824, 1.06373), (0.24431, 1.04249), (0.22003, 1.04249), (0.19272, 1.05766), (0.15933, 1.04249), (0.18665, 1.02124), (0.22003, 1.04249), (0.24431, 1.04249), (0.23824, 0.96055), (0.22307, 0.87557), (0.25645, 0.8695), (0.25038, 0.8088), (0.29894, 0.7997), (0.2959, 0.77542), (0.32625, 0.76935), (0.45068, 0.73596), (0.49317, 0.69954), (0.49317, 1.29439), (0.39605, 1.35205), (0.13809, 1.42489), (0.09256, 1.43399), (0.07436, 1.48558), (-0.17754, 1.48558), (-0.28983, 1.43096), (-0.46586, 1.44006), (-0.58118, 1.46131), (-0.86343, 1.41275), (-0.77542, 1.49165), (-0.66009, 1.56146), (-0.84522, 1.59181), (-0.92716, 1.60698), (-0.70561, 1.7041), (-0.59332, 1.73141), (-0.51138, 1.72231), (-0.34446, 1.68892), (-0.18665, 1.7739), (0.08649, 1.7648), (0.11077, 1.73445), (0.33232, 1.71624), (0.47496, 1.65857), (0.4871, 1.47344), (0.49317, 1.47344), (0.49317, 1.74962), (0.46586, 1.78604), (0.51745, 1.84977), (0.56904, 1.78907), (0.54476, 1.74962), (0.54476, 1.66768), (0.65706, 1.57056), (0.61457, 1.22155), (0.56297, 1.25493), (0.55083, 1.50986), (0.54476, 1.50986), (0.54476, 0.6783), (0.76631, 0.45068), (0.79059, 0.30501), (0.79666, 0.27769), (0.80577, 0.13809), (0.73293, 0.07436), (0.68741, 0.07739), (0.57208, 0.13505), (0.54476, 0.13809), (0.54476, -1.71624), (0.49317, -1.71624), (0.49317, 0.13809), (0.45675, 0.12898), (0.44461, 0.18665), (0.44765, 0.24734), (0.49621, 0.2868), (0.57815, 0.27769), (0.59939, 0.25038), (0.68134, 0.25038), (0.68134, 0.25341), (0.60546, 0.26859), (0.58422, 0.29287), (0.49317, 0.30804), (0.49317, 0.36571), (0.44461, 0.39909), (0.35053, 0.08346), (0.30501, 0.08346), (0.22307, 0.08042), (0.22307, 0.05008), (0.34143, 0.05008), (0.34143, -0.02276), (0.22307, -0.01062), (0.22307, -0.0349), (0.30804, -0.05311), (0.38392, -0.05311), (0.44765, -0.33232), (0.45979, -0.72989), (0.33536, -0.73596), (0.31411, -0.81791), (0.33536, -0.83308), (0.30804, -0.93627), (0.34143, -1.00607), (0.30501, -1.04552), (0.32322, -1.16085), (0.2959, -1.50986), (0.29287, -1.57967), (0.38392, -1.71017), (0.32929, -1.77086), (0.2261, -1.75873), (0.18968, -1.63733), (0.12898, -1.58877), (0.16237, -1.47648), (0.10167, -1.16085), (0.13202, -1.05463), (0.1047, -1.04552), (0.12595, -0.94841), (0.08346, -0.86039), (0.11684, -0.82701), (0.09863, -0.72989), (0.00152, -0.73596), (-0.00152, -0.81184), (0.0258, -0.83308), (-0.01669, -0.92109), (-0.00759, -1.01821), (-0.04097, -1.04249), (-0.01669, -1.15781), (-0.0956, -1.50379), (-0.08649, -1.5827), (-0.10167, -1.62215), (-0.14719, -1.6434), (-0.0956, -1.8953), (-0.11381, -1.9742), (-0.17451, -1.91654), (-0.22307, -1.68892), (-0.2868, -1.76176), (-0.38088, -1.76176), (-0.40516, -1.71017), (-0.32625, -1.62822), (-0.27769, -1.54932), (-0.24127, -1.64643), (-0.23217, -1.63733), (-0.49014, -0.49924), (-0.60243, -0.53566), (-0.6085, -0.49014))
fr2 = ((-0.30501, -0.40212), (-0.29287, -0.44461), (-0.40212, -0.47193), (-0.20486, -1.38543), (-0.19575, -1.38543), (-0.23824, -0.93627), (-0.217, -0.79666), (-0.19272, -0.79666), (-0.19272, -0.72686), (-0.26555, -0.71472), (-0.19272, -0.20789), (-0.12291, -0.05615), (-0.02883, -0.04097), (-0.02883, -0.01973), (-0.09863, -0.01973), (-0.09863, 0.05008), (-0.02276, 0.05918), (-0.02276, 0.08649), (-0.10774, 0.08346), (-0.13809, 0.3566), (-0.14416, 0.3566), (-0.17147, 0.13809), (-0.1563, 0.11381), (-0.20182, 0.03187), (-0.16844, 0.00759), (-0.3566, -0.39302), (-0.53263, -0.44461), (-0.52352, -0.3566), (-0.49621, -0.32929), (-0.52352, -0.2261), (-0.56297, -0.18665), (-0.51745, -0.11684), (-0.45372, -0.16237), (-0.48103, -0.217), (-0.44765, -0.31108), (-0.40819, -0.28983), (-0.39302, -0.25038), (-0.40819, -0.23824), (-0.36571, 0.0349), (-0.34143, 0.05615), (-0.3566, 0.17754), (-0.32322, 0.20789), (-0.26555, 0.55387), (-0.23824, 0.58422), (-0.25948, 0.62671), (-0.06222, 0.73596), (-0.02883, 0.739), (-0.03794, 0.77845), (0.01669, 0.8088), (0.11381, 0.81487), (0.14416, 0.86039), (0.14112, 0.86343), (0.10774, 0.83612), (0.05918, 0.82701), (0.01062, 0.83915), (-0.03187, 0.92109), (-0.04704, 0.9909), (-0.03794, 1.01821), (-0.01366, 1.0091), (0.01973, 1.02428), (-0.01366, 1.03945), (-0.0349, 1.03642), (-0.0349, 1.06677), (-0.05615, 1.06677), (-0.06829, 1.0091), (-0.0349, 0.86646), (-0.11684, 0.91502), (-0.07739, 1.15478), (-0.00152, 1.24279), (0.10774, 1.27618), (0.26859, 1.21851), (0.31108, 1.12747), (0.35964, 0.90895), (0.27466, 0.8695), (0.21396, 0.89074), (0.22914, 0.96055), (0.21396, 1.05766), (0.18058, 1.12443), (0.13202, 1.13961), (-0.00455, 1.13354), (-0.03794, 1.11229), (-0.0349, 1.10319), (0.00152, 1.11533), (0.13505, 1.12443), (0.18058, 1.10319), (0.18968, 1.06373), (0.13809, 1.07284), (0.11077, 1.06373), (0.09863, 1.04856), (0.13809, 1.06373), (0.18968, 1.05159), (0.19879, 1.03035), (0.17451, 1.03035), (0.14416, 1.04249), (0.11381, 1.02428), (0.14112, 1.00607), (0.17451, 1.03035), (0.19879, 1.03035), (0.19879, 0.94841), (0.18968, 0.86343), (0.22307, 0.86039), (0.22003, 0.7997), (0.26859, 0.79363), (0.25948, 0.75114), (0.28983, 0.74507), (0.43551, 0.69651), (0.49317, 0.65402), (0.49317, 1.29439), (0.39605, 1.35205), (0.13809, 1.44006), (0.10167, 1.40668), (0.11684, 1.37026), (-0.10774, 1.28528), (-0.09863, 1.23065), (-0.217, 1.10926), (-0.44158, 1.05766), (-0.6085, 1.07284), (-0.49621, 1.12443), (-0.33536, 1.26707), (-0.52049, 1.29742), (-0.56601, 1.29439), (-0.51138, 1.33687), (-0.27162, 1.40364), (-0.27466, 1.47648), (-0.08953, 1.59484), (-0.01973, 1.61305), (-0.03187, 1.65554), (0.07739, 1.71017), (0.2959, 1.72838), (0.47496, 1.65857), (0.4871, 1.47344), (0.49317, 1.47344), (0.49317, 1.74962), (0.46586, 1.78604), (0.51745, 1.84977), (0.56904, 1.78907), (0.54476, 1.74962), (0.54476, 1.66768), (0.71775, 1.50379), (0.64188, 1.21244), (0.56297, 1.25493), (0.55083, 1.50986), (0.54476, 1.50986), (0.54476, 0.63278), (0.72382, 0.43854), (0.76631, 0.29894), (0.79666, 0.27769), (0.80577, 0.13809), (0.73293, 0.07436), (0.68741, 0.07739), (0.57208, 0.13505), (0.54476, 0.13809), (0.54476, -1.71624), (0.49317, -1.71624), (0.49317, 0.13809), (0.45675, 0.12898), (0.44461, 0.18665), (0.44765, 0.24734), (0.49621, 0.2868), (0.57815, 0.27769), (0.59939, 0.25038), (0.68134, 0.25038), (0.68134, 0.25341), (0.60546, 0.26859), (0.58422, 0.29287), (0.49317, 0.30804), (0.49317, 0.36571), (0.38695, 0.39909), (0.35053, 0.08346), (0.31108, 0.08346), (0.22307, 0.08042), (0.22307, 0.05008), (0.34143, 0.05008), (0.34143, -0.02276), (0.22307, -0.01062), (0.22307, -0.0349), (0.30804, -0.05311), (0.38392, -0.05311), (0.44765, -0.33232), (0.45979, -0.72989), (0.33536, -0.73596), (0.31411, -0.81791), (0.33536, -0.83308), (0.30804, -0.93627), (0.34143, -1.00607), (0.30501, -1.04552), (0.32322, -1.16085), (0.2959, -1.50986), (0.29287, -1.57967), (0.38392, -1.71017), (0.32929, -1.77086), (0.2261, -1.75873), (0.18968, -1.63733), (0.12898, -1.58877), (0.16237, -1.47648), (0.10167, -1.16085), (0.13202, -1.05463), (0.1047, -1.04552), (0.12595, -0.94841), (0.08346, -0.86039), (0.11684, -0.82701), (0.09863, -0.72989), (0.00152, -0.73596), (-0.00152, -0.81184), (0.0258, -0.83308), (-0.01669, -0.92109), (-0.00759, -1.01821), (-0.04097, -1.04249), (-0.01669, -1.15781), (-0.0956, -1.50379), (-0.08649, -1.5827), (-0.10167, -1.62215), (-0.14719, -1.6434), (-0.0956, -1.8953), (-0.11381, -1.9742), (-0.17451, -1.91654), (-0.22307, -1.68892), (-0.2868, -1.76176), (-0.38088, -1.76176), (-0.40516, -1.71017), (-0.32625, -1.62822), (-0.27769, -1.54932), (-0.24127, -1.64643), (-0.23217, -1.63733), (-0.49014, -0.49924), (-0.60243, -0.53566), (-0.6085, -0.49014))
points = []
for i in range(len(fr1)):
p = moveToPoint(fr1[i], fr2[i], phase)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
poly = tuple(points)
return [poly, 'live', color]
def bird(s=50, pivot=(500, 500), phase=0, color={'whites':1}):
'''A bird primitive as (points, 'live', color)'''
phase = abs((phase % 100 - 50) * 2)
fr1 = ((-0.018, -1.022), (-0.022, -1.0), (0.042, -0.958), (-0.046, -0.848), (-0.11, -0.642), (-0.052, -0.434), (-0.066, -0.434), (-0.426, -0.952), (-0.478, -0.938), (-0.502, -0.974), (-0.562, -0.96), (-0.584, -0.994), (-0.638, -0.984), (-0.664, -1.014), (-0.74, -1.0), (-0.096, -0.204), (0.022, -0.16), (0.026, -0.146), (-0.312, -0.194), (-0.39, -0.188), (-0.43, -0.148), (-0.158, -0.102), (-0.152, -0.086), (-0.446, -0.124), (-0.652, -0.094), (-0.714, -0.044), (-0.722, -0.016), (-0.504, -0.04), (-0.356, -0.022), (-0.354, -0.008), (-0.506, -0.016), (-0.792, 0.02), (-0.848, 0.07), (-0.858, 0.106), (-0.562, 0.074), (-0.378, 0.09), (-0.374, 0.104), (-0.59, 0.104), (-0.888, 0.156), (-0.934, 0.21), (-0.942, 0.246), (-0.592, 0.198), (-0.394, 0.206), (-0.392, 0.218), (-0.62, 0.238), (-0.93, 0.292), (-1.002, 0.384), (-1.002, 0.418), (-0.298, 0.332), (0.09, 0.406), (0.136, 0.31), (0.072, 0.214), (0.084, 0.07), (0.204, 0.036), (0.216, 0.046), (0.108, 0.084), (0.1, 0.212), (0.162, 0.312), (0.112, 0.438), (-0.232, 0.384), (-0.514, 0.458), (-0.558, 0.516), (-0.562, 0.556), (-0.432, 0.516), (-0.264, 0.486), (-0.264, 0.498), (-0.43, 0.542), (-0.572, 0.612), (-0.616, 0.682), (-0.616, 0.724), (-0.454, 0.64), (-0.262, 0.594), (-0.262, 0.608), (-0.452, 0.678), (-0.626, 0.782), (-0.652, 0.854), (-0.644, 0.888), (-0.438, 0.77), (-0.238, 0.702), (-0.238, 0.714), (-0.45, 0.82), (-0.658, 0.952), (-0.672, 1.05), (-0.658, 1.082), (-0.42, 0.916), (-0.078, 0.76), (0.24, 0.646), (0.344, 0.54), (0.356, 0.344), (0.274, 0.18), (0.276, 0.168), (0.388, 0.186), (0.632, 0.234), (0.752, 0.21), (0.754, 0.142), (0.73, 0.116), (0.764, 0.086), (0.79, 0.12), (0.762, 0.144), (0.762, 0.208), (0.828, 0.144), (0.832, -0.064), (0.796, -0.112), (0.774, -0.108), (0.79, -0.066), (0.774, 0.012), (0.742, 0.012), (0.768, -0.076), (0.746, -0.076), (0.706, 0.0), (0.67, 0.038), (0.626, 0.046), (0.544, 0.022), (0.404, -0.236), (0.236, -0.362), (0.198, -0.47), (0.28, -0.54), (0.554, -0.516), (0.658, -0.598), (0.652, -0.658), (0.634, -0.658), (0.63, -0.618), (0.56, -0.572), (0.55, -0.574), (0.61, -0.65), (0.594, -0.704), (0.576, -0.702), (0.578, -0.666), (0.516, -0.58), (0.506, -0.582), (0.54, -0.658), (0.524, -0.698), (0.508, -0.7), (0.508, -0.658), (0.438, -0.584), (0.23, -0.652), (0.104, -0.612), (0.126, -0.54), (0.112, -0.538), (0.034, -0.708), (0.046, -0.834), (0.102, -0.924), (0.172, -0.89), (0.25, -0.906), (0.296, -0.934), (0.286, -0.956), (0.24, -0.936), (0.176, -0.926), (0.176, -0.932), (0.238, -0.956), (0.28, -0.984), (0.272, -1.008), (0.23, -0.984), (0.156, -0.96), (0.156, -0.968), (0.216, -0.998), (0.244, -1.034), (0.232, -1.052), (0.198, -1.024), (0.112, -1.0), (0.06, -1.0), (0.014, -1.008))
fr2 = ((-0.038, -1.002), (-0.042, -0.98), (0.022, -0.938), (-0.066, -0.828), (-0.13, -0.622), (-0.058, -0.414), (-0.072, -0.414), (-0.42, -0.928), (-0.464, -0.924), (-0.482, -0.954), (-0.532, -0.944), (-0.554, -0.976), (-0.602, -0.964), (-0.628, -0.998), (-0.692, -0.982), (-0.14, -0.238), (0.034, -0.126), (0.034, -0.11), (-0.188, -0.216), (-0.264, -0.234), (-0.314, -0.206), (-0.066, -0.084), (-0.066, -0.068), (-0.336, -0.188), (-0.542, -0.218), (-0.614, -0.188), (-0.63, -0.162), (-0.416, -0.124), (-0.28, -0.064), (-0.28, -0.05), (-0.426, -0.102), (-0.71, -0.148), (-0.776, -0.116), (-0.796, -0.082), (-0.502, -0.03), (-0.332, 0.036), (-0.332, 0.05), (-0.538, -0.01), (-0.84, -0.046), (-0.9, -0.006), (-0.918, 0.026), (-0.568, 0.08), (-0.38, 0.144), (-0.38, 0.156), (-0.606, 0.11), (-0.918, 0.074), (-1.012, 0.14), (-1.022, 0.174), (-0.472, 0.25), (0.082, 0.45), (0.138, 0.36), (0.062, 0.234), (0.064, 0.09), (0.184, 0.056), (0.19, 0.07), (0.088, 0.104), (0.088, 0.232), (0.17, 0.362), (0.1, 0.49), (-0.17, 0.398), (-0.532, 0.532), (-0.572, 0.594), (-0.572, 0.634), (-0.446, 0.582), (-0.282, 0.538), (-0.28, 0.55), (-0.442, 0.608), (-0.578, 0.69), (-0.616, 0.764), (-0.612, 0.806), (-0.458, 0.708), (-0.27, 0.646), (-0.268, 0.66), (-0.452, 0.746), (-0.616, 0.864), (-0.636, 0.938), (-0.626, 0.972), (-0.43, 0.836), (-0.238, 0.752), (-0.236, 0.764), (-0.438, 0.888), (-0.634, 1.036), (-0.64, 1.136), (-0.624, 1.166), (-0.4, 0.98), (-0.072, 0.796), (0.234, 0.656), (0.33, 0.54), (0.336, 0.41), (0.2, 0.242), (0.208, 0.232), (0.238, 0.26), (0.388, 0.4), (0.524, 0.418), (0.538, 0.352), (0.52, 0.322), (0.558, 0.298), (0.578, 0.336), (0.546, 0.354), (0.534, 0.418), (0.608, 0.386), (0.65, 0.182), (0.624, 0.128), (0.602, 0.128), (0.61, 0.172), (0.58, 0.246), (0.548, 0.24), (0.59, 0.158), (0.568, 0.154), (0.514, 0.22), (0.46, 0.228), (0.412, 0.152), (0.438, -0.034), (0.376, -0.208), (0.216, -0.342), (0.178, -0.45), (0.258, -0.48), (0.466, -0.302), (0.598, -0.308), (0.628, -0.36), (0.614, -0.37), (0.588, -0.34), (0.504, -0.344), (0.502, -0.348), (0.59, -0.378), (0.608, -0.432), (0.594, -0.44), (0.574, -0.41), (0.474, -0.376), (0.472, -0.38), (0.538, -0.426), (0.548, -0.468), (0.536, -0.478), (0.512, -0.444), (0.436, -0.414), (0.224, -0.604), (0.082, -0.588), (0.112, -0.52), (0.098, -0.518), (0.014, -0.688), (0.026, -0.814), (0.082, -0.904), (0.152, -0.87), (0.23, -0.886), (0.276, -0.914), (0.266, -0.936), (0.22, -0.916), (0.156, -0.906), (0.156, -0.912), (0.218, -0.936), (0.26, -0.964), (0.252, -0.988), (0.21, -0.964), (0.136, -0.94), (0.136, -0.948), (0.196, -0.978), (0.224, -1.014), (0.212, -1.032), (0.178, -1.004), (0.092, -0.98), (0.04, -0.98), (-0.006, -0.988))
# fr2 = ((-0.018, -1.022), (-0.022, -1.0), (0.042, -0.958), (-0.046, -0.848), (-0.11, -0.642), (-0.052, -0.434), (-0.066, -0.434), (-0.426, -0.952), (-0.478, -0.938), (-0.502, -0.974), (-0.562, -0.96), (-0.584, -0.994), (-0.638, -0.984), (-0.664, -1.014), (-0.74, -1.0), (-0.096, -0.204), (0.022, -0.16), (0.026, -0.146), (-0.312, -0.194), (-0.39, -0.188), (-0.43, -0.148), (-0.158, -0.102), (-0.152, -0.086), (-0.446, -0.124), (-0.652, -0.094), (-0.714, -0.044), (-0.722, -0.016), (-0.504, -0.04), (-0.356, -0.022), (-0.354, -0.008), (-0.506, -0.016), (-0.792, 0.02), (-0.848, 0.07), (-0.858, 0.106), (-0.562, 0.074), (-0.378, 0.09), (-0.374, 0.104), (-0.59, 0.104), (-0.888, 0.156), (-0.934, 0.21), (-0.942, 0.246), (-0.592, 0.198), (-0.394, 0.206), (-0.392, 0.218), (-0.62, 0.238), (-0.93, 0.292), (-1.002, 0.384), (-1.002, 0.418), (-0.298, 0.332), (0.09, 0.406), (0.136, 0.31), (0.072, 0.214), (0.084, 0.07), (0.204, 0.036), (0.216, 0.046), (0.108, 0.084), (0.1, 0.212), (0.162, 0.312), (0.112, 0.438), (-0.232, 0.384), (-0.514, 0.458), (-0.558, 0.516), (-0.562, 0.556), (-0.432, 0.516), (-0.264, 0.486), (-0.264, 0.498), (-0.43, 0.542), (-0.572, 0.612), (-0.616, 0.682), (-0.616, 0.724), (-0.454, 0.64), (-0.262, 0.594), (-0.262, 0.608), (-0.452, 0.678), (-0.626, 0.782), (-0.652, 0.854), (-0.644, 0.888), (-0.438, 0.77), (-0.238, 0.702), (-0.238, 0.714), (-0.45, 0.82), (-0.658, 0.952), (-0.672, 1.05), (-0.658, 1.082), (-0.42, 0.916), (-0.078, 0.76), (0.24, 0.646), (0.344, 0.54), (0.356, 0.344), (0.274, 0.18), (0.276, 0.168), (0.388, 0.186), (0.632, 0.234), (0.752, 0.21), (0.754, 0.142), (0.73, 0.116), (0.764, 0.086), (0.79, 0.12), (0.762, 0.144), (0.762, 0.208), (0.828, 0.144), (0.832, -0.064), (0.796, -0.112), (0.774, -0.108), (0.79, -0.066), (0.774, 0.012), (0.742, 0.012), (0.768, -0.076), (0.746, -0.076), (0.706, 0.0), (0.67, 0.038), (0.626, 0.046), (0.544, 0.022), (0.404, -0.236), (0.236, -0.362), (0.198, -0.47), (0.28, -0.54), (0.554, -0.516), (0.658, -0.598), (0.652, -0.658), (0.634, -0.658), (0.63, -0.618), (0.56, -0.572), (0.55, -0.574), (0.61, -0.65), (0.594, -0.704), (0.576, -0.702), (0.578, -0.666), (0.516, -0.58), (0.506, -0.582), (0.54, -0.658), (0.524, -0.698), (0.508, -0.7), (0.508, -0.658), (0.438, -0.584), (0.23, -0.652), (0.104, -0.612), (0.126, -0.54), (0.112, -0.538), (0.034, -0.708), (0.046, -0.834), (0.102, -0.924), (0.172, -0.89), (0.25, -0.906), (0.296, -0.934), (0.286, -0.956), (0.24, -0.936), (0.176, -0.926), (0.176, -0.932), (0.238, -0.956), (0.28, -0.984), (0.272, -1.008), (0.23, -0.984), (0.156, -0.96), (0.156, -0.968), (0.216, -0.998), (0.244, -1.034), (0.232, -1.052), (0.198, -1.024), (0.112, -1.0), (0.06, -1.0), (0.014, -1.008))
points = []
for i in range(len(fr1)):
p = moveToPoint(fr1[i], fr2[i], phase)
points.append(((p[0] * s) + pivot[0], (p[1] * s) + pivot[1]))
poly = tuple(points)
return [poly, 'live', color]
| 293.786207
| 4,693
| 0.534379
| 8,586
| 42,599
| 2.65071
| 0.146634
| 0.002373
| 0.002373
| 0.00435
| 0.342458
| 0.318555
| 0.315831
| 0.313283
| 0.311086
| 0.311086
| 0
| 0.555386
| 0.124979
| 42,599
| 145
| 4,694
| 293.786207
| 0.055184
| 0.072044
| 0
| 0.452991
| 0
| 0
| 0.001975
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.059829
| false
| 0
| 0.025641
| 0
| 0.145299
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
140a2191c38ca628e9b1554519485cf3548ce587
| 150
|
py
|
Python
|
soundcard/argparser.py
|
sayRequil/soundcards
|
dfe3e7b2ccf22f40e2e240e5bc95f95755c670f4
|
[
"MIT"
] | null | null | null |
soundcard/argparser.py
|
sayRequil/soundcards
|
dfe3e7b2ccf22f40e2e240e5bc95f95755c670f4
|
[
"MIT"
] | null | null | null |
soundcard/argparser.py
|
sayRequil/soundcards
|
dfe3e7b2ccf22f40e2e240e5bc95f95755c670f4
|
[
"MIT"
] | null | null | null |
import sys
class ArgParser:
def getArgs():
return sys.args
def parser(self):
return self
def addArg(arr,n):
return "-" + n
| 12.5
| 20
| 0.593333
| 20
| 150
| 4.45
| 0.65
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.3
| 150
| 11
| 21
| 13.636364
| 0.847619
| 0
| 0
| 0
| 0
| 0
| 0.006667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.375
| false
| 0
| 0.125
| 0.375
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
1421395330e20fa1d82eb6b5e919159de66e929d
| 214
|
py
|
Python
|
sites/Pixiv/__init__.py
|
LufsX/nazurin
|
b2d7c0ce1146af6e27520361cdf4ca230b78a215
|
[
"MIT"
] | null | null | null |
sites/Pixiv/__init__.py
|
LufsX/nazurin
|
b2d7c0ce1146af6e27520361cdf4ca230b78a215
|
[
"MIT"
] | null | null | null |
sites/Pixiv/__init__.py
|
LufsX/nazurin
|
b2d7c0ce1146af6e27520361cdf4ca230b78a215
|
[
"MIT"
] | 1
|
2020-10-30T19:27:56.000Z
|
2020-10-30T19:27:56.000Z
|
"""Pixiv site plugin."""
from .api import Pixiv
from .config import PRIORITY
from .commands import commands
from .interface import patterns, handle
__all__ = ['Pixiv', 'commands', 'PRIORITY', 'patterns', 'handle']
| 30.571429
| 65
| 0.738318
| 26
| 214
| 5.923077
| 0.5
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.126168
| 214
| 7
| 65
| 30.571429
| 0.823529
| 0.084112
| 0
| 0
| 0
| 0
| 0.183246
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.8
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
14347f6d528126e1b0d72ca0d124b67bfb1db522
| 273
|
py
|
Python
|
linecook/tests/test_patterns.py
|
tonysyu/linecook
|
fa7928347bb103d2ea1b25baefc23e5a11ff5d6c
|
[
"BSD-3-Clause"
] | null | null | null |
linecook/tests/test_patterns.py
|
tonysyu/linecook
|
fa7928347bb103d2ea1b25baefc23e5a11ff5d6c
|
[
"BSD-3-Clause"
] | 9
|
2018-05-31T20:50:33.000Z
|
2019-07-19T01:35:51.000Z
|
linecook/tests/test_patterns.py
|
tonysyu/linecook
|
fa7928347bb103d2ea1b25baefc23e5a11ff5d6c
|
[
"BSD-3-Clause"
] | null | null | null |
from linecook import patterns
def test_any_of():
assert patterns.any_of("a", "b", "c") == r"(a|b|c)"
def test_bounded_word():
assert patterns.bounded_word("hello") == r"\bhello\b"
def test_exact_match():
assert patterns.exact_match("hello") == r"^hello$"
| 19.5
| 57
| 0.663004
| 42
| 273
| 4.095238
| 0.452381
| 0.122093
| 0.034884
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153846
| 273
| 13
| 58
| 21
| 0.744589
| 0
| 0
| 0
| 0
| 0
| 0.131868
| 0
| 0
| 0
| 0
| 0
| 0.428571
| 1
| 0.428571
| true
| 0
| 0.142857
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
1466c04f032f5c06c7c3e088655a17f40aa65169
| 7,713
|
py
|
Python
|
webrecorder/test/test_recs_api.py
|
gitter-badger/webrecorder
|
9c4fc3b816a77f312ec864ca8598f7bbc1b41394
|
[
"Apache-2.0"
] | 1
|
2021-01-01T21:32:53.000Z
|
2021-01-01T21:32:53.000Z
|
webrecorder/test/test_recs_api.py
|
n0ncetonic/webrecorder
|
7459a0f6bc162eec2d383bd908d82d95cdc15940
|
[
"Apache-2.0"
] | null | null | null |
webrecorder/test/test_recs_api.py
|
n0ncetonic/webrecorder
|
7459a0f6bc162eec2d383bd908d82d95cdc15940
|
[
"Apache-2.0"
] | null | null | null |
import time
import os
from .testutils import FullStackTests
# ============================================================================
class TestWebRecRecAPI(FullStackTests):
def _anon_post(self, url, *args, **kwargs):
return self.testapp.post(url.format(user=self.anon_user), *args, **kwargs)
def _anon_delete(self, url, *args, **kwargs):
return self.testapp.delete(url.format(user=self.anon_user), *args, **kwargs)
def _anon_get(self, url, *args, **kwargs):
return self.testapp.get(url.format(user=self.anon_user), *args, **kwargs)
def test_create_anon_rec(self):
res = self._anon_post('/api/v1/recordings?user={user}&coll=temp', params={'title': 'My Rec'})
assert self.testapp.cookies['__test_sesh'] != ''
assert res.json['recording']['id'] == 'my-rec'
assert res.json['recording']['title'] == 'My Rec'
assert self.redis.exists('r:' + self.anon_user + ':temp:my-rec:info')
def test_create_anon_rec_dup(self):
res = self._anon_post('/api/v1/recordings?user={user}&coll=temp', params={'title': 'My Rec'})
assert self.testapp.cookies['__test_sesh'] != ''
assert res.json['recording']['id'] == 'my-rec-2'
assert res.json['recording']['title'] == 'My Rec 2'
assert self.redis.exists('r:' + self.anon_user + ':temp:my-rec-2:info')
def test_anon_get_anon_rec(self):
res = self._anon_get('/api/v1/recordings/my-rec?user={user}&coll=temp')
assert res.json['recording']
rec = res.json['recording']
assert rec['size'] == 0
assert rec['id'] == 'my-rec'
assert rec['title'] == 'My Rec'
assert rec['download_url'] == 'http://localhost:80/{user}/temp/my-rec/$download'.format(user=self.anon_user)
assert rec['created_at'] == rec['updated_at']
assert rec['created_at'] <= int(time.time())
def test_create_another_anon_rec(self):
res = self._anon_post('/api/v1/recordings?user={user}&coll=temp', params={'title': '2 Another! Recording!'})
assert self.testapp.cookies['__test_sesh'] != ''
assert res.json['recording']['id'] == '2-another-recording'
assert self.redis.exists('r:' + self.anon_user + ':temp:2-another-recording:info')
def test_list_all_recordings(self):
res = self._anon_get('/api/v1/recordings?user={user}&coll=temp')
recs = res.json['recordings']
assert len(recs) == 3
recs.sort(key=lambda x: x['id'])
assert recs[0]['id'] == '2-another-recording'
assert recs[0]['title'] == '2 Another! Recording!'
assert recs[0]['download_url'] == 'http://localhost:80/{user}/temp/2-another-recording/$download'.format(user=self.anon_user)
assert recs[1]['id'] == 'my-rec'
assert recs[1]['title'] == 'My Rec'
assert recs[1]['download_url'] == 'http://localhost:80/{user}/temp/my-rec/$download'.format(user=self.anon_user)
assert recs[2]['id'] == 'my-rec-2'
assert recs[2]['title'] == 'My Rec 2'
assert recs[2]['download_url'] == 'http://localhost:80/{user}/temp/my-rec-2/$download'.format(user=self.anon_user)
def test_page_list_0(self):
res = self._anon_get('/api/v1/recordings/my-rec/pages?user={user}&coll=temp')
assert res.json == {'pages': []}
def test_page_add_1(self):
cdx_key = 'r:{user}:temp:my-rec:cdxj'.format(user=self.anon_user)
self.redis.zadd(cdx_key, 0, 'com,example)/ 2016010203000000 {}')
page = {'title': 'Example', 'url': 'http://example.com/', 'timestamp': '2016010203000000'}
res = self._anon_post('/api/v1/recordings/my-rec/pages?user={user}&coll=temp', params=page)
assert res.json == {}
def test_page_list_1(self):
res = self._anon_get('/api/v1/recordings/my-rec/pages?user={user}&coll=temp')
assert res.json == {'pages': [{'id': 'cf6e50ec2c', 'title': 'Example', 'url': 'http://example.com/', 'timestamp': '2016010203000000'}]}
def test_page_add_2(self):
cdx_key = 'r:{user}:temp:my-rec:cdxj'.format(user=self.anon_user)
self.redis.zadd(cdx_key, 0, 'com,example)/foo/bar 2016010203000000 {}')
page = {'title': 'Example', 'url': 'http://example.com/foo/bar', 'timestamp': '2015010203000000'}
res = self._anon_post('/api/v1/recordings/my-rec/pages?user={user}&coll=temp', params=page)
assert res.json == {}
def test_page_list_2(self):
res = self._anon_get('/api/v1/recordings/my-rec/pages?user={user}&coll=temp')
assert len(res.json['pages']) == 2
assert {'id': 'cf6e50ec2c', 'title': 'Example', 'url': 'http://example.com/', 'timestamp': '2016010203000000'} in res.json['pages']
assert {'id': 'ce9820d103', 'title': 'Example', 'url': 'http://example.com/foo/bar', 'timestamp': '2015010203000000'} in res.json['pages']
def test_page_delete(self):
params = {'url': 'http://example.com/foo/bar', 'timestamp': '2015010203000000'}
res = self._anon_delete('/api/v1/recordings/my-rec/pages?user={user}&coll=temp', params=params)
assert res.json == {}
res = self._anon_get('/api/v1/recordings/my-rec/pages?user={user}&coll=temp')
assert len(res.json['pages']) == 1
assert {'id': 'cf6e50ec2c', 'title': 'Example', 'url': 'http://example.com/', 'timestamp': '2016010203000000'} in res.json['pages']
def test_collide_wb_url_format(self):
res = self._anon_post('/api/v1/recordings?user={user}&coll=temp', params={'title': '2016'})
assert res.json['recording']['id'] == '2016-'
def test_collide_wb_url_format_2(self):
res = self._anon_post('/api/v1/recordings?user={user}&coll=temp', params={'title': '2ab_'})
assert res.json['recording']['id'] == '2ab_-'
#def test_error_already_exists(self):
# res = self._anon_post('/api/v1/recordings?user={user}&coll=temp', params={'title': '2 Another Recording'}, status=400)
# assert res.json == {'error_message': 'Recording Already Exists', 'id': '2-another-recording', 'title': '2 Another! Recording!'}
def test_error_no_such_rec(self):
res = self._anon_get('/api/v1/recordings/blah@$?user={user}&coll=temp', status=404)
assert res.json == {'error_message': 'Recording not found', 'id': 'blah@$'}
def test_error_no_such_rec_pages(self):
res = self._anon_get('/api/v1/recordings/my-rec3/pages?user={user}&coll=temp', status=404)
assert res.json == {'error_message': 'Recording not found', 'id': 'my-rec3'}
page = {'title': 'Example', 'url': 'http://example.com/foo/bar', 'timestamp': '2015010203000000'}
res = self._anon_post('/api/v1/recordings/my-rec3/pages?user={user}&coll=temp', params=page, status=404)
assert res.json == {'error_message': 'Recording not found', 'id': 'my-rec3', 'request_data': page}
def test_error_missing_user_coll(self):
res = self._anon_post('/api/v1/recordings', params={'title': 'Recording'}, status=400)
assert res.json == {'error_message': "User must be specified", 'request_data': {'title': 'Recording'}}
def test_error_invalid_user_coll(self):
res = self._anon_post('/api/v1/recordings?user=user&coll=coll', params={'title': 'Recording'}, status=404)
assert res.json == {"error_message": "No such user", 'request_data': {'title': 'Recording'}}
def test_rename_rec(self):
test_title = 'Test / Special Chars !'
res = self._anon_post('/api/v1/recordings/my-rec/rename/Test%20%2F%20Special%20Chars%20!?user={user}&coll=temp')
res = res.json
assert res['rec_id'] == 'test--special-chars-'
assert res['title'] == test_title
| 46.745455
| 146
| 0.623622
| 1,045
| 7,713
| 4.449761
| 0.107177
| 0.056774
| 0.049677
| 0.065376
| 0.811828
| 0.772903
| 0.703656
| 0.641505
| 0.589032
| 0.544516
| 0
| 0.044657
| 0.172566
| 7,713
| 164
| 147
| 47.030488
| 0.683955
| 0.047323
| 0
| 0.185185
| 0
| 0.009259
| 0.36974
| 0.138635
| 0
| 0
| 0
| 0
| 0.435185
| 1
| 0.194444
| false
| 0
| 0.027778
| 0.027778
| 0.259259
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
14952922734e6eb5c10d76c8d8e56ccf9b7bf51c
| 72
|
py
|
Python
|
transformer_baselines/tasks/__init__.py
|
MilaNLProc/nlpb
|
6407f5241e5184e296e7c2ddbf51daf3e1d8edf7
|
[
"MIT"
] | 2
|
2021-06-10T14:42:07.000Z
|
2021-06-15T19:30:12.000Z
|
transformer_baselines/tasks/__init__.py
|
MilaNLProc/transformer-baselines
|
6407f5241e5184e296e7c2ddbf51daf3e1d8edf7
|
[
"MIT"
] | null | null | null |
transformer_baselines/tasks/__init__.py
|
MilaNLProc/transformer-baselines
|
6407f5241e5184e296e7c2ddbf51daf3e1d8edf7
|
[
"MIT"
] | null | null | null |
from .classification import ClassificationTask
from .ner import NERTask
| 24
| 46
| 0.861111
| 8
| 72
| 7.75
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 72
| 2
| 47
| 36
| 0.96875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1af00a1f65543731bddb9b9ab36b416c32def47f
| 3,953
|
py
|
Python
|
VPLVisitor.py
|
lamhacker/VPL-Compiler
|
c54850f95342504e962b990c5cac17679e7069a9
|
[
"Apache-2.0"
] | 2
|
2020-01-28T12:41:09.000Z
|
2020-04-25T13:31:43.000Z
|
VPLVisitor.py
|
lamhacker/VPL-Compiler
|
c54850f95342504e962b990c5cac17679e7069a9
|
[
"Apache-2.0"
] | null | null | null |
VPLVisitor.py
|
lamhacker/VPL-Compiler
|
c54850f95342504e962b990c5cac17679e7069a9
|
[
"Apache-2.0"
] | null | null | null |
# Generated from VPL.g4 by ANTLR 4.7
from antlr4 import *
if __name__ is not None and "." in __name__:
from .VPLParser import VPLParser
else:
from VPLParser import VPLParser
# This class defines a complete generic visitor for a parse tree produced by VPLParser.
class VPLVisitor(ParseTreeVisitor):
# Visit a parse tree produced by VPLParser#program.
def visitProgram(self, ctx:VPLParser.ProgramContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#function_declaration.
def visitFunction_declaration(self, ctx:VPLParser.Function_declarationContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#parameter.
def visitParameter(self, ctx:VPLParser.ParameterContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#parameterName.
def visitParameterName(self, ctx:VPLParser.ParameterNameContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#multParameterName.
def visitMultParameterName(self, ctx:VPLParser.MultParameterNameContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#variable_declaration.
def visitVariable_declaration(self, ctx:VPLParser.Variable_declarationContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#condition.
def visitCondition(self, ctx:VPLParser.ConditionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#whileloop.
def visitWhileloop(self, ctx:VPLParser.WhileloopContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#assign.
def visitAssign(self, ctx:VPLParser.AssignContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#noneStatement.
def visitNoneStatement(self, ctx:VPLParser.NoneStatementContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#nest_statement.
def visitNest_statement(self, ctx:VPLParser.Nest_statementContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#addExpression.
def visitAddExpression(self, ctx:VPLParser.AddExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#minusExpression.
def visitMinusExpression(self, ctx:VPLParser.MinusExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#multExpression.
def visitMultExpression(self, ctx:VPLParser.MultExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#divExpression.
def visitDivExpression(self, ctx:VPLParser.DivExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#minExpression.
def visitMinExpression(self, ctx:VPLParser.MinExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#parenthesisExpression.
def visitParenthesisExpression(self, ctx:VPLParser.ParenthesisExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#idenetExpression.
def visitIdenetExpression(self, ctx:VPLParser.IdenetExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#numExpression.
def visitNumExpression(self, ctx:VPLParser.NumExpressionContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#lessThan.
def visitLessThan(self, ctx:VPLParser.LessThanContext):
return self.visitChildren(ctx)
# Visit a parse tree produced by VPLParser#largeThan.
def visitLargeThan(self, ctx:VPLParser.LargeThanContext):
return self.visitChildren(ctx)
del VPLParser
| 33.5
| 87
| 0.752846
| 434
| 3,953
| 6.817972
| 0.237327
| 0.04461
| 0.074349
| 0.133829
| 0.439
| 0.439
| 0.429199
| 0.417709
| 0.417709
| 0.417709
| 0
| 0.001233
| 0.17961
| 3,953
| 118
| 88
| 33.5
| 0.911193
| 0.322287
| 0
| 0.428571
| 1
| 0
| 0.00038
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.428571
| false
| 0
| 0.061224
| 0.428571
| 0.938776
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
213678d22ab971b6d7443d1f8098633d1d5fca24
| 3,071
|
py
|
Python
|
ooobuild/csslo/view/__init__.py
|
Amourspirit/ooo_uno_tmpl
|
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
|
[
"Apache-2.0"
] | null | null | null |
ooobuild/csslo/view/__init__.py
|
Amourspirit/ooo_uno_tmpl
|
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
|
[
"Apache-2.0"
] | null | null | null |
ooobuild/csslo/view/__init__.py
|
Amourspirit/ooo_uno_tmpl
|
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
|
[
"Apache-2.0"
] | null | null | null |
# coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http: // www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from ...lo.view.document_zoom_type import DocumentZoomType as DocumentZoomType
from ...lo.view.duplex_mode import DuplexMode as DuplexMode
from ...lo.view.office_document_view import OfficeDocumentView as OfficeDocumentView
from ...lo.view.paper_format import PaperFormat as PaperFormat
from ...lo.view.paper_orientation import PaperOrientation as PaperOrientation
from ...lo.view.print_job_event import PrintJobEvent as PrintJobEvent
from ...lo.view.print_options import PrintOptions as PrintOptions
from ...lo.view.print_settings import PrintSettings as PrintSettings
from ...lo.view.printable_state import PrintableState as PrintableState
from ...lo.view.printable_state_event import PrintableStateEvent as PrintableStateEvent
from ...lo.view.printer_descriptor import PrinterDescriptor as PrinterDescriptor
from ...lo.view.render_descriptor import RenderDescriptor as RenderDescriptor
from ...lo.view.render_options import RenderOptions as RenderOptions
from ...lo.view.selection_type import SelectionType as SelectionType
from ...lo.view.view_settings import ViewSettings as ViewSettings
from ...lo.view.x_control_access import XControlAccess as XControlAccess
from ...lo.view.x_form_layer_access import XFormLayerAccess as XFormLayerAccess
from ...lo.view.x_line_cursor import XLineCursor as XLineCursor
from ...lo.view.x_multi_selection_supplier import XMultiSelectionSupplier as XMultiSelectionSupplier
from ...lo.view.x_print_job import XPrintJob as XPrintJob
from ...lo.view.x_print_job_broadcaster import XPrintJobBroadcaster as XPrintJobBroadcaster
from ...lo.view.x_print_job_listener import XPrintJobListener as XPrintJobListener
from ...lo.view.x_print_settings_supplier import XPrintSettingsSupplier as XPrintSettingsSupplier
from ...lo.view.x_printable import XPrintable as XPrintable
from ...lo.view.x_printable_broadcaster import XPrintableBroadcaster as XPrintableBroadcaster
from ...lo.view.x_printable_listener import XPrintableListener as XPrintableListener
from ...lo.view.x_renderable import XRenderable as XRenderable
from ...lo.view.x_screen_cursor import XScreenCursor as XScreenCursor
from ...lo.view.x_selection_change_listener import XSelectionChangeListener as XSelectionChangeListener
from ...lo.view.x_selection_supplier import XSelectionSupplier as XSelectionSupplier
from ...lo.view.x_view_cursor import XViewCursor as XViewCursor
from ...lo.view.x_view_settings_supplier import XViewSettingsSupplier as XViewSettingsSupplier
| 62.673469
| 103
| 0.83621
| 409
| 3,071
| 6.136919
| 0.337408
| 0.076494
| 0.12749
| 0.074502
| 0.1
| 0.022709
| 0
| 0
| 0
| 0
| 0
| 0.003246
| 0.097037
| 3,071
| 48
| 104
| 63.979167
| 0.901911
| 0.187561
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0.40625
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
|
0
| 4
|
2144cd7eea60aa5161075deb53b0b1b482c7e63b
| 6,082
|
py
|
Python
|
PyTrinamic/examples/evalboards/TMC5031/TMC5031_eval_register_dump.py
|
trinamic-AA/PyTrinamic
|
b054f4baae8eb6d3f5d2574cf69c232f66abb4ee
|
[
"MIT"
] | 37
|
2019-01-13T11:08:45.000Z
|
2022-03-25T07:18:15.000Z
|
PyTrinamic/examples/evalboards/TMC5031/TMC5031_eval_register_dump.py
|
AprDec/PyTrinamic
|
a9db10071f8fbeebafecb55c619e5893757dd0ce
|
[
"MIT"
] | 56
|
2019-02-25T02:48:27.000Z
|
2022-03-31T08:45:34.000Z
|
PyTrinamic/examples/evalboards/TMC5031/TMC5031_eval_register_dump.py
|
AprDec/PyTrinamic
|
a9db10071f8fbeebafecb55c619e5893757dd0ce
|
[
"MIT"
] | 26
|
2019-01-14T05:20:16.000Z
|
2022-03-08T13:27:35.000Z
|
#!/usr/bin/env python3
'''
Dump all register values of the TMC5031 IC.
The connection to a Landungsbrücke is established over USB. TMCL commands are
used for communicating with the IC.
Created on 29.01.2020
@author: JM
'''
import PyTrinamic
from PyTrinamic.connections.ConnectionManager import ConnectionManager
from PyTrinamic.evalboards.TMC5031_eval import TMC5031_eval
PyTrinamic.showInfo()
connectionManager = ConnectionManager()
myInterface = connectionManager.connect()
TMC5031 = TMC5031_eval(myInterface)
print("GCONF: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.GCONF)))
print("GSTAT: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.GSTAT)))
print("SLAVECONF: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.SLAVECONF)))
print("INPUT: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.INPUT)))
print("X_COMPARE: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.X_COMPARE)))
print("RAMPMODE_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.RAMPMODE[0])))
print("XACTUAL_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.XACTUAL[0])))
print("VACTUAL_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VACTUAL[0])))
print("VSTART_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VSTART[0])))
print("A1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.A1[0])))
print("V1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.V1[0])))
print("AMAX_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.AMAX[0])))
print("VMAX_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VMAX[0])))
print("DMAX_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.DMAX[0])))
print("D1_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.D1[0])))
print("VSTOP_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VSTOP[0])))
print("TZEROWAIT_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.TZEROWAIT[0])))
print("XTARGET_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.XTARGET[0])))
print("IHOLD_IRUN_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.IHOLD_IRUN[0])))
print("VCOOLTHRS_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VCOOLTHRS[0])))
print("VHIGH_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VHIGH[0])))
print("SW_MODE_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.SWMODE[0])))
print("RAMP_STAT_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.RAMPSTAT[0])))
print("XLATCH_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.XLATCH[0])))
print("RAMPMODE_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.RAMPMODE[1])))
print("XACTUAL_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.XACTUAL[1])))
print("VACTUAL_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VACTUAL[1])))
print("VSTART_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VSTART[1])))
print("A1_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.A1[1])))
print("V1_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.V1[1])))
print("AMAX_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.AMAX[1])))
print("VMAX_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VMAX[1])))
print("DMAX_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.DMAX[1])))
print("D1_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.D1[1])))
print("VSTOP_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VSTOP[1])))
print("TZEROWAIT_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.TZEROWAIT[1])))
print("XTARGET_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.XTARGET[1])))
print("IHOLD_IRUN_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.IHOLD_IRUN[1])))
print("VCOOLTHRS_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VCOOLTHRS[1])))
print("VHIGH_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.VHIGH[1])))
print("SW_MODE_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.SW_MODE_M2[1])))
print("RAMP_STAT_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.RAMP_STAT_M2[1])))
print("XLATCH_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.XLATCH[1])))
print("MSLUT___M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSLUT___M1)))
print("MSLUT___M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSLUT___M2)))
print("MSLUTSEL_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSLUTSEL_M1)))
print("MSLUTSTART_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSLUTSTART_M1)))
print("MSCNT_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSCNT_M1[0])))
print("MSCURACT_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSCURACT_M1[0])))
print("CHOPCONF_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.CHOPCONF_M1[0])))
print("COOLCONF_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.COOLCONF_M1[0])))
print("DRV_STATUS_M1: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.DRV_STATUS_M1[0])))
print("MSLUTSEL_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSLUTSEL_M2)))
print("MSLUTSTART_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSLUTSTART_M2)))
print("MSCNT_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSCNT_M2[1])))
print("MSCURACT_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.MSCURACT_M2[1])))
print("CHOPCONF_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.CHOPCONF_M2[1])))
print("COOLCONF_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.COOLCONF_M2[1])))
print("DRV_STATUS_M2: 0x{0:08X}".format(TMC5031.readRegister(TMC5031.registers.DRV_STATUS_M2[1])))
myInterface.close()
| 69.908046
| 99
| 0.745807
| 849
| 6,082
| 5.228504
| 0.110718
| 0.039874
| 0.079748
| 0.159495
| 0.718856
| 0.718856
| 0.718856
| 0.718856
| 0.665916
| 0.050462
| 0
| 0.154435
| 0.076948
| 6,082
| 87
| 100
| 69.908046
| 0.636266
| 0.035515
| 0
| 0
| 0
| 0
| 0.251749
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.044776
| 0
| 0.044776
| 0.880597
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
dcd16236a48192d6b0bbc066bc05dce0f6e838c0
| 138
|
py
|
Python
|
examples/no_end_MPI_loop_test.py
|
hamish2014/batchOpenMPI
|
4e573c4bd84ae0ac88d18f96e90680bc9179a9d2
|
[
"MIT"
] | null | null | null |
examples/no_end_MPI_loop_test.py
|
hamish2014/batchOpenMPI
|
4e573c4bd84ae0ac88d18f96e90680bc9179a9d2
|
[
"MIT"
] | null | null | null |
examples/no_end_MPI_loop_test.py
|
hamish2014/batchOpenMPI
|
4e573c4bd84ae0ac88d18f96e90680bc9179a9d2
|
[
"MIT"
] | 1
|
2021-01-14T04:53:58.000Z
|
2021-01-14T04:53:58.000Z
|
import batchOpenMPI
batchOpenMPI.begin_MPI_loop()
print('Basic test to see if mpirun hangs is no end_MPI_loop is called on the master')
| 23
| 85
| 0.804348
| 24
| 138
| 4.458333
| 0.833333
| 0.130841
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144928
| 138
| 5
| 86
| 27.6
| 0.90678
| 0
| 0
| 0
| 0
| 0
| 0.550725
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0.333333
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
dcd704d81482a7cb63651b9e05b60c97523ea94a
| 301
|
py
|
Python
|
bot/classes/__init__.py
|
monkeydg/POG-bot
|
97ced2c4b8f8709887b3d0828484e1dd1128dc1f
|
[
"MIT"
] | 2
|
2020-09-24T14:56:50.000Z
|
2021-04-15T16:12:36.000Z
|
bot/classes/__init__.py
|
monkeydg/POG-bot
|
97ced2c4b8f8709887b3d0828484e1dd1128dc1f
|
[
"MIT"
] | 12
|
2021-04-28T15:33:34.000Z
|
2022-03-29T10:10:05.000Z
|
bot/classes/__init__.py
|
monkeydg/POG-bot
|
97ced2c4b8f8709887b3d0828484e1dd1128dc1f
|
[
"MIT"
] | 6
|
2020-08-01T13:38:40.000Z
|
2020-08-14T20:35:17.000Z
|
from .accounts import Account
from .bases import Base
from .players import Player, ActivePlayer, CharNotFound, CharAlreadyExists, CharInvalidWorld, CharMissingFaction
from .weapons import Weapon
from .teams import Team
from .stats import PlayerStat
from .scores import TeamScore, PlayerScore, Loadout
| 37.625
| 112
| 0.837209
| 35
| 301
| 7.2
| 0.657143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.116279
| 301
| 7
| 113
| 43
| 0.947368
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
dcdaf7c2e2ffd343fded4420e627d43ad5320759
| 104
|
py
|
Python
|
healthcom/betterhealth/apps.py
|
qaifikhan/django-ecommerce-website
|
6781dddc3ce4dacfb036411514f2876cccabf618
|
[
"MIT"
] | 1
|
2022-03-26T01:12:45.000Z
|
2022-03-26T01:12:45.000Z
|
healthcom/betterhealth/apps.py
|
qaifikhan/django-ecommerce-website
|
6781dddc3ce4dacfb036411514f2876cccabf618
|
[
"MIT"
] | null | null | null |
healthcom/betterhealth/apps.py
|
qaifikhan/django-ecommerce-website
|
6781dddc3ce4dacfb036411514f2876cccabf618
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class BetterhealthConfig(AppConfig):
name = 'betterhealth'
| 17.333333
| 37
| 0.740385
| 10
| 104
| 7.7
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.192308
| 104
| 5
| 38
| 20.8
| 0.916667
| 0
| 0
| 0
| 0
| 0
| 0.121212
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
dce886482b7dbb2f6a620b20e40549d3044dd4fa
| 135
|
py
|
Python
|
exercicios/ex003.py
|
DeyvisonR/curso_python
|
983b634d39f542369628ae48c7449ea75fd1ebbd
|
[
"MIT"
] | null | null | null |
exercicios/ex003.py
|
DeyvisonR/curso_python
|
983b634d39f542369628ae48c7449ea75fd1ebbd
|
[
"MIT"
] | null | null | null |
exercicios/ex003.py
|
DeyvisonR/curso_python
|
983b634d39f542369628ae48c7449ea75fd1ebbd
|
[
"MIT"
] | null | null | null |
n1 = int(input('digite um número: '))
n2 = int(input('digite outro número: '))
print('a soma de {} + {} = {}'.format(n1, n2, n1 + n2))
| 33.75
| 55
| 0.57037
| 21
| 135
| 3.666667
| 0.619048
| 0.207792
| 0.363636
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.054054
| 0.177778
| 135
| 3
| 56
| 45
| 0.63964
| 0
| 0
| 0
| 0
| 0
| 0.451852
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
dcf500f23bb6a1dce3bfd76b6fd1d156227d34c2
| 319
|
py
|
Python
|
file_food.py
|
JakubCzech/Snake_pygame
|
c26ff7749244014a80e4dcf3ea7bacc714a1b052
|
[
"MIT"
] | null | null | null |
file_food.py
|
JakubCzech/Snake_pygame
|
c26ff7749244014a80e4dcf3ea7bacc714a1b052
|
[
"MIT"
] | null | null | null |
file_food.py
|
JakubCzech/Snake_pygame
|
c26ff7749244014a80e4dcf3ea7bacc714a1b052
|
[
"MIT"
] | null | null | null |
class _Food:
color = (107, 0, 0)
def __init__(self, pos_x, pos_y, live = 100):
self.pos_x = pos_x
self.pos_y = pos_y
self.live = live
def get_pos_x(self):
return self.pos_x
def get_pos_y(self):
return self.pos_y
def live_decrement(self):
self.live -=1
| 26.583333
| 49
| 0.576803
| 53
| 319
| 3.132075
| 0.320755
| 0.210843
| 0.144578
| 0.13253
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.041475
| 0.319749
| 319
| 12
| 50
| 26.583333
| 0.723502
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0.166667
| 0.666667
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
b4ce0277a10f0fbbe2ba02fa453e2a4a15185b3c
| 69
|
py
|
Python
|
pseudoslam/envs/__init__.py
|
HaojieSHI98/HouseExpo
|
2a2388e6e38e9698390e35fcf54e7ff00cd34253
|
[
"MIT"
] | null | null | null |
pseudoslam/envs/__init__.py
|
HaojieSHI98/HouseExpo
|
2a2388e6e38e9698390e35fcf54e7ff00cd34253
|
[
"MIT"
] | null | null | null |
pseudoslam/envs/__init__.py
|
HaojieSHI98/HouseExpo
|
2a2388e6e38e9698390e35fcf54e7ff00cd34253
|
[
"MIT"
] | null | null | null |
# from pseudoslam.envs.robot_exploration_v0 import RobotExplorationT0
| 69
| 69
| 0.898551
| 8
| 69
| 7.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.030769
| 0.057971
| 69
| 1
| 69
| 69
| 0.892308
| 0.971014
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
b4d86ffd8b842855d630411c14ff879a81d80b1d
| 39
|
py
|
Python
|
ecasb2share/tests/__init__.py
|
statiksof/ECAS-B2SHARE
|
bdaf939877e78a3f847c56f5d6bc5077b6dea719
|
[
"MIT"
] | 1
|
2021-05-19T09:33:21.000Z
|
2021-05-19T09:33:21.000Z
|
ecasb2share/tests/__init__.py
|
statiksof/ECAS-B2SHARE
|
bdaf939877e78a3f847c56f5d6bc5077b6dea719
|
[
"MIT"
] | null | null | null |
ecasb2share/tests/__init__.py
|
statiksof/ECAS-B2SHARE
|
bdaf939877e78a3f847c56f5d6bc5077b6dea719
|
[
"MIT"
] | 1
|
2019-09-03T15:28:18.000Z
|
2019-09-03T15:28:18.000Z
|
all = ["ecas_b2share_test", "tests.py"]
| 39
| 39
| 0.692308
| 6
| 39
| 4.166667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.027778
| 0.076923
| 39
| 1
| 39
| 39
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.625
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
370221d857ff76f741440f2985caaabd4680951b
| 233
|
py
|
Python
|
lib/plugs/ms_teams.py
|
bankova-gabriella/layer
|
87feadbca7bcb935b91e1a4b29fd15ea26103075
|
[
"MIT"
] | null | null | null |
lib/plugs/ms_teams.py
|
bankova-gabriella/layer
|
87feadbca7bcb935b91e1a4b29fd15ea26103075
|
[
"MIT"
] | null | null | null |
lib/plugs/ms_teams.py
|
bankova-gabriella/layer
|
87feadbca7bcb935b91e1a4b29fd15ea26103075
|
[
"MIT"
] | null | null | null |
import pymsteams
def send_message(message, webhook):
pymsteams.connectorcard(webhook).text(message).send()
class MSTeamsAPI:
def __init__(self, layer):
self.layer = layer
self.send_message = send_message
| 17.923077
| 57
| 0.708155
| 27
| 233
| 5.851852
| 0.481481
| 0.208861
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197425
| 233
| 12
| 58
| 19.416667
| 0.84492
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.285714
| false
| 0
| 0.142857
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
37315b5d14bcf141134b361b3e912811908e46c4
| 2,029
|
py
|
Python
|
rbig_jax/transforms/rotation.py
|
alexhepburn/rbig_jax
|
706dd60d2049071be0fb3d311c83719121854678
|
[
"MIT"
] | null | null | null |
rbig_jax/transforms/rotation.py
|
alexhepburn/rbig_jax
|
706dd60d2049071be0fb3d311c83719121854678
|
[
"MIT"
] | null | null | null |
rbig_jax/transforms/rotation.py
|
alexhepburn/rbig_jax
|
706dd60d2049071be0fb3d311c83719121854678
|
[
"MIT"
] | null | null | null |
import collections
import jax.numpy as np
from chex import Array, dataclass
RotParams = collections.namedtuple("Params", ["rotation"])
@dataclass
class RotationParams:
rotation: Array
def InitPCARotation():
# create marginal functions
# TODO a bin initialization function
def init_func(inputs):
# rotation
outputs, params = get_pca_params(inputs)
return outputs, params
def transform(params, inputs):
# rotation
return np.dot(inputs, params.rotation)
def gradient_transform(params, inputs):
# rotation is zero...
logabsdet = np.zeros_like(inputs)
return inputs, logabsdet
def inverse_transform(params, inputs):
return np.dot(inputs, params.rotation.T)
return init_func, transform, gradient_transform, inverse_transform
def get_pca_params(inputs: Array) -> Array:
# rotation
rotation = compute_projection(inputs)
outputs = np.dot(inputs, rotation)
return outputs, RotationParams(rotation=rotation)
def compute_projection(X: np.ndarray) -> np.ndarray:
"""Compute PCA projection matrix
Using SVD, this computes the PCA components for
a dataset X and computes the projection matrix
needed to do the PCA decomposition.
Parameters
----------
X : np.ndarray, (n_samples, n_features)
the data to calculate to PCA projection matrix
Returns
-------
VT : np.ndarray, (n_features, n_features)
the projection matrix (V.T) for the PCA decomposition
Notes
-----
Can find the original implementation here:
https://bit.ly/2EBDV9o
"""
# center the data
X = X - np.mean(X, axis=0)
# Compute SVD
_, _, VT = np.linalg.svd(X, full_matrices=False, compute_uv=True)
return VT.T
def rot_forward_transform(X, params):
return np.dot(X, params.rotation)
def rot_inverse_transform(X, params):
return np.dot(X, params.rotation.T)
def rot_gradient_transform(X, params):
return np.ones_like(X)
| 21.585106
| 70
| 0.674717
| 255
| 2,029
| 5.258824
| 0.364706
| 0.0522
| 0.032811
| 0.049217
| 0.126771
| 0.108874
| 0.06264
| 0.06264
| 0.06264
| 0
| 0
| 0.001923
| 0.231148
| 2,029
| 93
| 71
| 21.817204
| 0.857692
| 0.299162
| 0
| 0
| 0
| 0
| 0.010448
| 0
| 0
| 0
| 0
| 0.010753
| 0
| 1
| 0.30303
| false
| 0
| 0.090909
| 0.151515
| 0.757576
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
2ea0238b14782cb3e094011ef1c051b77ec10584
| 254
|
py
|
Python
|
QUANTAXIS/QAPubSub/declaters.py
|
B34nK0/QUANTAXIS
|
94162f0f863682e443ef8ae11f5b54da6f93421b
|
[
"MIT"
] | 6,322
|
2017-03-22T09:34:20.000Z
|
2022-03-31T05:26:45.000Z
|
QUANTAXIS/QAPubSub/declaters.py
|
B34nK0/QUANTAXIS
|
94162f0f863682e443ef8ae11f5b54da6f93421b
|
[
"MIT"
] | 690
|
2018-01-02T06:44:54.000Z
|
2022-03-25T02:06:22.000Z
|
QUANTAXIS/QAPubSub/declaters.py
|
B34nK0/QUANTAXIS
|
94162f0f863682e443ef8ae11f5b54da6f93421b
|
[
"MIT"
] | 2,183
|
2018-01-02T10:32:10.000Z
|
2022-03-30T00:57:31.000Z
|
#app = faust.App('myapp', broker='kafka://localhost')
class QUANTAXIS_PUBSUBER():
def __init__(self, name, broker='rabbitmq://localhost'):
self.exchange = name
#@app.agent(value_type=Order)
def agent(value_type=order):
pass
| 25.4
| 60
| 0.65748
| 31
| 254
| 5.16129
| 0.645161
| 0.125
| 0.175
| 0.2375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185039
| 254
| 10
| 61
| 25.4
| 0.772947
| 0.314961
| 0
| 0
| 0
| 0
| 0.115607
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4
| false
| 0.2
| 0
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
2ea2829ec0b4ab38dc154e67194b2a306fc916d8
| 74
|
py
|
Python
|
TestModule/__init__.py
|
Oreder/PythonSelfStudy
|
64c774ef469dcede6f653ab8eafd3edc83452876
|
[
"MIT"
] | 1
|
2017-07-28T03:42:29.000Z
|
2017-07-28T03:42:29.000Z
|
TestModule/__init__.py
|
Oreder/PythonSelfStudy
|
64c774ef469dcede6f653ab8eafd3edc83452876
|
[
"MIT"
] | null | null | null |
TestModule/__init__.py
|
Oreder/PythonSelfStudy
|
64c774ef469dcede6f653ab8eafd3edc83452876
|
[
"MIT"
] | null | null | null |
from Tsum import Tsum
from Tproduct import Tproduct
from Tmin import Tmin
| 18.5
| 29
| 0.837838
| 12
| 74
| 5.166667
| 0.416667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.162162
| 74
| 3
| 30
| 24.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
2ecbcd758794560413da872c7ab57b328502922f
| 1,090
|
py
|
Python
|
utils/exceptions/hots_exceptions.py
|
fennr/Samuro-HotsBot
|
81e7a65a08d50602442094e52d6d2e405c98ac1a
|
[
"Apache-2.0"
] | 1
|
2022-03-26T11:28:00.000Z
|
2022-03-26T11:28:00.000Z
|
utils/exceptions/hots_exceptions.py
|
fennr/Samuro-HotsBot
|
81e7a65a08d50602442094e52d6d2e405c98ac1a
|
[
"Apache-2.0"
] | null | null | null |
utils/exceptions/hots_exceptions.py
|
fennr/Samuro-HotsBot
|
81e7a65a08d50602442094e52d6d2e405c98ac1a
|
[
"Apache-2.0"
] | null | null | null |
from utils.library import files
config = files.get_yaml("config.yaml")
class HotsException(Exception):
"""Базовый класс для других исключений"""
def __init__(self, *args):
if args:
self.message = args[0]
else:
self.message = None
def __str__(self):
if self.message:
return f'Custom Error, {self.message}'
else:
return 'Custom Error'
class CommandError(HotsException):
pass
class HeroNotFoundError(CommandError):
def __str__(self):
if self.message:
return f'Не найден герой:, {self.message}'
else:
return 'Не найден герой'
class WrongTalentLvl(CommandError):
def __str__(self):
return "Выбран невозможный уровень таланта"
class LeagueNotFound(CommandError):
def __str__(self):
return "Не найдены игры в шторм лиге"
class WrongLeague(CommandError):
def __str__(self):
return "Введена некорректная лига"
class NoActiveEvents(CommandError):
def __str__(self):
return "Нет активных матчей"
| 20.961538
| 54
| 0.637615
| 118
| 1,090
| 5.644068
| 0.466102
| 0.099099
| 0.09009
| 0.165165
| 0.258258
| 0.09009
| 0.09009
| 0.09009
| 0
| 0
| 0
| 0.001263
| 0.273395
| 1,090
| 51
| 55
| 21.372549
| 0.839646
| 0.03211
| 0
| 0.333333
| 0
| 0
| 0.194471
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.212121
| false
| 0.030303
| 0.030303
| 0.121212
| 0.69697
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
2ecfcab69dfdfc819a75810740ff4f8a3aac169c
| 279
|
py
|
Python
|
Python/Py4e/ForLoops/test7.py
|
Cryptoniac/Challenge
|
fcb2f685c21bd84c1ef0924e5f0026bd2961c772
|
[
"MIT"
] | null | null | null |
Python/Py4e/ForLoops/test7.py
|
Cryptoniac/Challenge
|
fcb2f685c21bd84c1ef0924e5f0026bd2961c772
|
[
"MIT"
] | null | null | null |
Python/Py4e/ForLoops/test7.py
|
Cryptoniac/Challenge
|
fcb2f685c21bd84c1ef0924e5f0026bd2961c772
|
[
"MIT"
] | null | null | null |
# How to Find the Smallest value
largest_so_far = -1
print('Before', largest_so_far)
for the_num in [1, 99, 24, 25, 56, 4, 57, 89, 5, 94, 21] :
if the_num > largest_so_far :
largest_so_far = the_num
print(largest_so_far, the_num)
print('After', largest_so_far)
| 25.363636
| 58
| 0.681004
| 52
| 279
| 3.346154
| 0.519231
| 0.310345
| 0.413793
| 0.172414
| 0.264368
| 0.264368
| 0
| 0
| 0
| 0
| 0
| 0.09009
| 0.204301
| 279
| 10
| 59
| 27.9
| 0.693694
| 0.107527
| 0
| 0
| 0
| 0
| 0.044534
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.428571
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
2ee33cda70fdc114d328316e62c2f4c265e76a48
| 269
|
py
|
Python
|
SimPEG/EM/Static/SIP/__init__.py
|
rolandhill/simpeg
|
92d220e55d3d280b44e4cbcbddc42d57a974ca94
|
[
"MIT"
] | 3
|
2020-11-27T03:18:28.000Z
|
2022-03-18T01:29:58.000Z
|
SimPEG/EM/Static/SIP/__init__.py
|
visiope/simpeg
|
94295102afc664c001f77c88f902772e06a467c0
|
[
"MIT"
] | null | null | null |
SimPEG/EM/Static/SIP/__init__.py
|
visiope/simpeg
|
94295102afc664c001f77c88f902772e06a467c0
|
[
"MIT"
] | 1
|
2021-03-21T09:54:33.000Z
|
2021-03-21T09:54:33.000Z
|
from .ProblemSIP import Problem3D_CC, Problem3D_N
from .ProblemSIP_2D import Problem2D_CC, Problem2D_N
from .SurveySIP import Survey, Data, from_dc_to_sip_survey
from . import SrcSIP as Src
from . import RxSIP as Rx
from .Run import run_inversion, spectral_ip_mappings
| 38.428571
| 58
| 0.836431
| 43
| 269
| 4.953488
| 0.55814
| 0.131455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021186
| 0.122677
| 269
| 6
| 59
| 44.833333
| 0.881356
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
2eebf9d0b2af41b49e718e4c649b529b01b0197d
| 86
|
py
|
Python
|
gen_doc/serializers/__init__.py
|
Shchusia/gen_doc
|
216b561fc973c5565a78348c5b0b3db58f84442f
|
[
"Unlicense"
] | null | null | null |
gen_doc/serializers/__init__.py
|
Shchusia/gen_doc
|
216b561fc973c5565a78348c5b0b3db58f84442f
|
[
"Unlicense"
] | null | null | null |
gen_doc/serializers/__init__.py
|
Shchusia/gen_doc
|
216b561fc973c5565a78348c5b0b3db58f84442f
|
[
"Unlicense"
] | null | null | null |
"""
import serializers
"""
from .python_doc_serializer import PythonDocSerializer
| 17.2
| 55
| 0.77907
| 8
| 86
| 8.125
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.139535
| 86
| 4
| 56
| 21.5
| 0.878378
| 0.209302
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
2ef5882420676c5bd5f9b951f60d381d3d815bcb
| 238
|
py
|
Python
|
handlers/routes.py
|
alanwilter/flask-pytest-example
|
d9aa421aa4dd57633ec1f969db3d501a19b4725b
|
[
"MIT"
] | null | null | null |
handlers/routes.py
|
alanwilter/flask-pytest-example
|
d9aa421aa4dd57633ec1f969db3d501a19b4725b
|
[
"MIT"
] | null | null | null |
handlers/routes.py
|
alanwilter/flask-pytest-example
|
d9aa421aa4dd57633ec1f969db3d501a19b4725b
|
[
"MIT"
] | null | null | null |
from flask import jsonify
from pytest_cov.embed import cleanup_on_sigterm
cleanup_on_sigterm()
def configure_routes(app):
@app.route("/")
def hello_world():
return jsonify(
message="Hello World",
)
| 17
| 47
| 0.659664
| 29
| 238
| 5.172414
| 0.655172
| 0.12
| 0.213333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.247899
| 238
| 13
| 48
| 18.307692
| 0.837989
| 0
| 0
| 0
| 0
| 0
| 0.05042
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.222222
| 0.111111
| 0.555556
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
2c1653bf315258bfcf256ea59e352aee8e027b90
| 153
|
py
|
Python
|
Module/module_1479092252_68.py
|
quanyang/Taint-em-All
|
2ee5d26fec2cd11c10e8a3826a6e2bc94ec57c14
|
[
"Apache-2.0"
] | 7
|
2019-06-11T10:40:09.000Z
|
2022-02-18T09:23:03.000Z
|
Module/module_1479092252_68.py
|
quanyang/Taint-em-All
|
2ee5d26fec2cd11c10e8a3826a6e2bc94ec57c14
|
[
"Apache-2.0"
] | 1
|
2020-03-10T02:56:41.000Z
|
2021-10-01T20:45:56.000Z
|
Module/module_1479092252_68.py
|
quanyang/Taint-em-All
|
2ee5d26fec2cd11c10e8a3826a6e2bc94ec57c14
|
[
"Apache-2.0"
] | 4
|
2019-06-03T16:50:49.000Z
|
2020-07-24T11:37:06.000Z
|
from Visitor.Visitor import Visitor
from Model.Node import *
name = "Module Name"
prereq = None
class ModuleName(Visitor):
def __init__(self):
pass
| 21.857143
| 35
| 0.751634
| 21
| 153
| 5.285714
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163399
| 153
| 7
| 36
| 21.857143
| 0.867188
| 0
| 0
| 0
| 0
| 0
| 0.071429
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.142857
| false
| 0.142857
| 0.285714
| 0
| 0.571429
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
|
0
| 4
|
2c2365714cdd12cc597645773769a037a567e0c1
| 958
|
py
|
Python
|
procurebd_api/serializers.py
|
FarishtaJayas/HackNSU-2.0
|
c49fe1d57cc512266e1208eb8ad6d62ddbac8743
|
[
"MIT"
] | null | null | null |
procurebd_api/serializers.py
|
FarishtaJayas/HackNSU-2.0
|
c49fe1d57cc512266e1208eb8ad6d62ddbac8743
|
[
"MIT"
] | null | null | null |
procurebd_api/serializers.py
|
FarishtaJayas/HackNSU-2.0
|
c49fe1d57cc512266e1208eb8ad6d62ddbac8743
|
[
"MIT"
] | 1
|
2020-10-04T06:35:37.000Z
|
2020-10-04T06:35:37.000Z
|
from rest_framework import serializers
from procurebd_api.models import *
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = ProfileUser
#fields = ('name', 'ranking')
fields = '__all__'
class ItemSerializer(serializers.ModelSerializer):
class Meta:
model = Item
fields ='__all__'
class VendorSerializer(serializers.ModelSerializer):
class Meta:
model = Vendor
fields ='__all__'
class OrderSerializer(serializers.ModelSerializer):
class Meta:
model = Order
fields ='__all__'
class ReportSerializer(serializers.ModelSerializer):
class Meta:
model = Order
fields ='__all__'
class TransactionSerializer(serializers.ModelSerializer):
class Meta:
model = Transaction
fields ='__all__'
| 18.784314
| 57
| 0.591858
| 73
| 958
| 7.410959
| 0.369863
| 0.288355
| 0.343808
| 0.38817
| 0.513863
| 0.218115
| 0.218115
| 0.218115
| 0.218115
| 0
| 0
| 0
| 0.340292
| 958
| 51
| 58
| 18.784314
| 0.856013
| 0.029228
| 0
| 0.538462
| 0
| 0
| 0.045161
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.076923
| 0
| 0.538462
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
2c2c29894434e90b95537fe9210617ea432687f4
| 231
|
py
|
Python
|
delta_migrations/__init__.py
|
magrathj/delta-migrations
|
34021d25182bc04b1fa879dd07012e222e53d418
|
[
"CC0-1.0"
] | 1
|
2021-12-07T18:31:25.000Z
|
2021-12-07T18:31:25.000Z
|
delta_migrations/__init__.py
|
magrathj/delta-migrations
|
34021d25182bc04b1fa879dd07012e222e53d418
|
[
"CC0-1.0"
] | null | null | null |
delta_migrations/__init__.py
|
magrathj/delta-migrations
|
34021d25182bc04b1fa879dd07012e222e53d418
|
[
"CC0-1.0"
] | null | null | null |
import click
from . import app
from .runner import DeltaMigrationRunner
from .helper import DeltaMigrationHelper
@click.group()
def cli():
pass
cli.add_command(app.create_migration_dir)
if __name__ == "__main__":
cli()
| 15.4
| 41
| 0.753247
| 29
| 231
| 5.62069
| 0.689655
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.155844
| 231
| 15
| 42
| 15.4
| 0.835897
| 0
| 0
| 0
| 0
| 0
| 0.034632
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| true
| 0.1
| 0.4
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
2596b9db7d13eef7ac97d5bf1635ada140b1a48f
| 83,747
|
py
|
Python
|
tests/test_plotting.py
|
tillbiskup/aspecd
|
5c7d7ceb9ec3eb97d01348c0495adc999c7af78a
|
[
"BSD-2-Clause"
] | 2
|
2021-03-16T05:26:12.000Z
|
2021-11-27T18:08:22.000Z
|
tests/test_plotting.py
|
tillbiskup/aspecd
|
5c7d7ceb9ec3eb97d01348c0495adc999c7af78a
|
[
"BSD-2-Clause"
] | null | null | null |
tests/test_plotting.py
|
tillbiskup/aspecd
|
5c7d7ceb9ec3eb97d01348c0495adc999c7af78a
|
[
"BSD-2-Clause"
] | null | null | null |
"""Tests for plotting."""
import contextlib
import io
import warnings
import matplotlib.axes
import matplotlib.collections
import matplotlib.figure
import matplotlib.legend
import matplotlib.lines
import matplotlib.pyplot as plt
import numpy as np
import os
import unittest
import aspecd.exceptions
from aspecd import plotting, utils, dataset
class TestPlotter(unittest.TestCase):
def setUp(self):
self.plotter = plotting.Plotter()
self.filename = 'Testfile.png'
def tearDown(self):
if os.path.isfile(self.filename):
os.remove(self.filename)
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_has_plot_method(self):
self.assertTrue(hasattr(self.plotter, 'plot'))
self.assertTrue(callable(self.plotter.plot))
def test_name_property_equals_full_class_name(self):
full_class_name = utils.full_class_name(self.plotter)
self.assertEqual(self.plotter.name, full_class_name)
def test_has_parameters_property(self):
self.assertTrue(hasattr(self.plotter, 'parameters'))
def test_parameters_property_is_dict(self):
self.assertTrue(isinstance(self.plotter.parameters, dict))
def test_has_properties_property(self):
self.assertTrue(hasattr(self.plotter, 'properties'))
def test_has_description_property(self):
self.assertTrue(hasattr(self.plotter, 'description'))
def test_description_property_is_string(self):
self.assertTrue(isinstance(self.plotter.description, str))
def test_has_figure_property(self):
self.assertTrue(hasattr(self.plotter, 'figure'))
def test_has_fig_property(self):
self.assertTrue(hasattr(self.plotter, 'fig'))
def test_fig_property_and_figure_property_are_identical(self):
self.assertTrue(self.plotter.figure is self.plotter.fig)
def test_has_axes_property(self):
self.assertTrue(hasattr(self.plotter, 'axes'))
def test_has_ax_property(self):
self.assertTrue(hasattr(self.plotter, 'axes'))
def test_ax_property_and_axes_property_are_identical(self):
self.assertTrue(self.plotter.axes is self.plotter.ax)
def test_has_filename_property(self):
self.assertTrue(hasattr(self.plotter, 'filename'))
def test_has_caption_property(self):
self.assertTrue(hasattr(self.plotter, 'caption'))
def test_has_style_property(self):
self.assertTrue(hasattr(self.plotter, 'style'))
def test_has_save_method(self):
self.assertTrue(hasattr(self.plotter, 'save'))
self.assertTrue(callable(self.plotter.save))
def test_plot_sets_figure_property(self):
self.plotter.plot()
self.assertTrue(isinstance(self.plotter.figure,
matplotlib.figure.Figure))
plt.close(self.plotter.figure)
def test_plot_sets_fig_property(self):
self.plotter.plot()
self.assertTrue(isinstance(self.plotter.fig, matplotlib.figure.Figure))
plt.close(self.plotter.fig)
def test_plot_sets_axes_property(self):
self.plotter.plot()
self.assertTrue(isinstance(self.plotter.axes, matplotlib.axes.Axes))
plt.close(self.plotter.figure)
def test_plot_sets_ax_property(self):
self.plotter.plot()
self.assertTrue(isinstance(self.plotter.ax, matplotlib.axes.Axes))
plt.close(self.plotter.figure)
def test_plot_sets_no_new_figure_property_if_existing(self):
fig, ax = plt.subplots()
self.plotter.figure = fig
self.plotter.axes = ax
self.plotter.plot()
self.assertIs(fig, self.plotter.figure)
def test_plot_sets_no_new_axes_property_if_existing(self):
fig, ax = plt.subplots()
self.plotter.figure = fig
self.plotter.axes = ax
self.plotter.plot()
self.assertIs(ax, self.plotter.axes)
def test_save_without_saver_raises(self):
with self.assertRaises(aspecd.exceptions.MissingSaverError):
self.plotter.save()
def test_save_returns_saver(self):
saver = plotting.Saver()
saver.filename = self.filename
self.plotter.plot()
returned_saver = self.plotter.save(saver)
self.assertTrue(isinstance(returned_saver, plotting.Saver))
def test_save_sets_plot_in_saver(self):
saver = plotting.Saver()
saver.filename = self.filename
self.plotter.plot()
returned_saver = self.plotter.save(saver)
self.assertEqual(returned_saver.plotter, self.plotter)
def test_save_sets_filename(self):
saver = plotting.Saver()
saver.filename = self.filename
self.plotter.plot()
self.plotter.save(saver)
self.assertEqual(self.filename, self.plotter.filename)
def test_plot_applies_properties(self):
self.plotter.properties.figure.dpi = 300.0
self.plotter.plot()
self.assertEqual(self.plotter.properties.figure.dpi,
self.plotter.figure.dpi)
def test_plot_with_unknown_style_raises(self):
self.plotter.style = 'foo'
with self.assertRaises(aspecd.exceptions.StyleNotFoundError):
self.plotter.plot()
def test_plot_adds_zero_lines(self):
self.plotter.parameters['show_zero_lines'] = True
self.plotter.plot()
self.assertEqual(2, len(self.plotter.ax.get_lines()))
def test_plot_without_zero_lines_does_not_add_zero_lines(self):
self.plotter.parameters['show_zero_lines'] = False
self.plotter.plot()
self.assertEqual(0, len(self.plotter.ax.get_lines()))
def test_plot_applies_properties_to_zero_lines(self):
self.plotter.parameters['show_zero_lines'] = True
self.plotter.properties.zero_lines.color = '#999'
self.plotter.plot()
self.assertEqual(self.plotter.properties.zero_lines.color,
self.plotter.ax.get_lines()[0]._color)
class TestSinglePlotter(unittest.TestCase):
def setUp(self):
self.plotter = plotting.SinglePlotter()
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_has_drawing_property(self):
self.assertTrue(hasattr(self.plotter, 'drawing'))
def test_plot_without_dataset_raises(self):
with self.assertRaises(aspecd.exceptions.MissingDatasetError):
self.plotter.plot()
def test_plot_with_preset_dataset(self):
self.plotter.dataset = dataset.Dataset()
self.plotter.plot()
def test_plot_from_dataset_sets_dataset(self):
test_dataset = dataset.Dataset()
plotter = test_dataset.plot(self.plotter)
self.assertTrue(isinstance(plotter.dataset, dataset.Dataset))
def test_plot_with_dataset(self):
test_dataset = dataset.Dataset()
self.plotter.plot(dataset=test_dataset)
self.assertGreater(len(test_dataset.representations), 0)
def test_plot_with_dataset_sets_axes_labels(self):
test_dataset = dataset.Dataset()
test_dataset.data.axes[0].quantity = 'foo'
test_dataset.data.axes[0].unit = 'bar'
test_dataset.data.axes[1].quantity = 'foo'
test_dataset.data.axes[1].unit = 'bar'
xlabel = '$' + test_dataset.data.axes[0].quantity + '$' + ' / ' + \
test_dataset.data.axes[0].unit
ylabel = '$' + test_dataset.data.axes[1].quantity + '$' + ' / ' + \
test_dataset.data.axes[1].unit
plotter = test_dataset.plot(self.plotter)
self.assertEqual(xlabel, plotter.axes.get_xlabel())
self.assertEqual(ylabel, plotter.axes.get_ylabel())
def test_axes_labels_with_empty_unit_without_slash(self):
test_dataset = dataset.Dataset()
test_dataset.data.axes[0].quantity = 'foo'
test_dataset.data.axes[0].unit = ''
test_dataset.data.axes[1].quantity = 'foo'
test_dataset.data.axes[1].unit = ''
xlabel = '$' + test_dataset.data.axes[0].quantity + '$'
ylabel = '$' + test_dataset.data.axes[1].quantity + '$'
plotter = test_dataset.plot(self.plotter)
self.assertEqual(xlabel, plotter.axes.get_xlabel())
self.assertEqual(ylabel, plotter.axes.get_ylabel())
def test_plot_returns_dataset(self):
test_dataset = self.plotter.plot(dataset=dataset.Dataset())
self.assertTrue(isinstance(test_dataset, dataset.Dataset))
def test_plot_checks_applicability(self):
class MyPlotter(aspecd.plotting.SinglePlotter):
@staticmethod
def applicable(dataset):
return False
dataset = aspecd.dataset.Dataset()
plotter = MyPlotter()
with self.assertRaises(aspecd.exceptions.NotApplicableToDatasetError):
dataset.plot(plotter)
def test_plot_check_applicability_prints_helpful_message(self):
class MyPlotter(aspecd.plotting.SinglePlotter):
@staticmethod
def applicable(dataset):
return False
dataset = aspecd.dataset.Dataset()
dataset.id = "foo"
plotter = MyPlotter()
message = "MyPlotter not applicable to dataset with id foo"
with self.assertRaisesRegex(
aspecd.exceptions.NotApplicableToDatasetError, message):
dataset.plot(plotter)
class TestSinglePlotter1D(unittest.TestCase):
def setUp(self):
self.plotter = plotting.SinglePlotter1D()
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_has_type_property(self):
self.assertTrue(hasattr(self.plotter, 'type'))
def test_set_type(self):
plot_type = 'scatter'
self.plotter.type = plot_type
self.assertEqual(self.plotter.type, plot_type)
def test_setting_wrong_type_raises(self):
with self.assertRaises(TypeError):
self.plotter.type = 'foo'
def test_plot_sets_drawing(self):
self.plotter.plot(dataset=dataset.Dataset())
self.assertTrue(self.plotter.drawing)
def test_plot_with_2D_data_raises(self):
dataset_ = dataset.Dataset()
dataset_.data.data = np.random.rand(3, 2)
with self.assertRaises(
aspecd.exceptions.NotApplicableToDatasetError):
self.plotter.plot(dataset_)
def test_set_line_colour_from_dict(self):
line_colour = '#cccccc'
properties = {'drawing': {'color': line_colour}}
self.plotter.properties.from_dict(properties)
self.assertEqual(line_colour, self.plotter.properties.drawing.color)
def test_plot_sets_correct_line_color(self):
color = '#cccccc'
dict_ = {'drawing': {'color': color}}
self.plotter.properties.from_dict(dict_)
self.plotter.plot(dataset=dataset.Dataset())
self.assertEqual(color, self.plotter.drawing.get_color())
def test_plot_sets_axes_xlabel(self):
label = 'foo bar'
dict_ = {'axes': {'xlabel': label}}
self.plotter.properties.from_dict(dict_)
self.plotter.plot(dataset=dataset.Dataset())
self.assertEqual(label, self.plotter.axes.get_xlabel())
def test_plot_adds_no_x_zero_line_if_out_of_range(self):
self.plotter.parameters['show_zero_lines'] = True
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([10])+5
plotter = dataset_.plot(self.plotter)
self.assertEqual([0., 0.], plotter.ax.get_lines()[1].get_xdata())
def test_plot_adds_no_y_zero_line_if_out_of_range(self):
self.plotter.parameters['show_zero_lines'] = True
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([10])-0.5
dataset_.data.axes[0].values = np.linspace(4, 5, 10)
plotter = dataset_.plot(self.plotter)
self.assertEqual([0., 0.], plotter.ax.get_lines()[1].get_ydata())
def test_plot_with_show_legend_sets_legend_label(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([10])-0.5
dataset_.data.axes[0].values = np.linspace(4, 5, 10)
dataset_.label = 'foo'
self.plotter.parameters['show_legend'] = True
plotter = dataset_.plot(self.plotter)
self.assertEqual(dataset_.label,
plotter.legend.get_texts()[0].get_text())
def test_axes_tight_x_sets_xlim_to_data_limits(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([100])
dataset_.data.axes[0].values = np.linspace(np.pi, 2*np.pi, 100)
self.plotter.parameters['tight'] = 'x'
plotter = dataset_.plot(self.plotter)
self.assertEqual(dataset_.data.axes[0].values[0],
plotter.axes.get_xlim()[0])
def test_axes_tight_y_sets_xlim_to_data_limits(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([100])
dataset_.data.axes[0].values = np.linspace(np.pi, 2*np.pi, 100)
self.plotter.parameters['tight'] = 'y'
plotter = dataset_.plot(self.plotter)
self.assertEqual(dataset_.data.data.min(),
plotter.axes.get_ylim()[0])
def test_axes_tight_both_sets_xlim_and_ylim_to_data_limits(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([100])
dataset_.data.axes[0].values = np.linspace(np.pi, 2*np.pi, 100)
self.plotter.parameters['tight'] = 'both'
plotter = dataset_.plot(self.plotter)
self.assertEqual(dataset_.data.axes[0].values[0],
plotter.axes.get_xlim()[0])
self.assertEqual(dataset_.data.data.min(),
plotter.axes.get_ylim()[0])
class TestSinglePlotter2D(unittest.TestCase):
def setUp(self):
self.plotter = plotting.SinglePlotter2D()
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_plot_with_1D_dataset_raises(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5])
with self.assertRaises(
aspecd.exceptions.NotApplicableToDatasetError):
dataset_.plot(self.plotter)
def test_has_type_property(self):
self.assertTrue(hasattr(self.plotter, 'type'))
def test_set_type(self):
plot_type = 'contour'
self.plotter.type = plot_type
self.assertEqual(self.plotter.type, plot_type)
def test_setting_wrong_type_raises(self):
with self.assertRaises(TypeError):
self.plotter.type = 'foo'
def test_plot_sets_drawing(self):
dataset_ = dataset.Dataset()
dataset_.data.data = np.random.rand(3, 2)
self.plotter.plot(dataset=dataset_)
self.assertTrue(self.plotter.drawing)
def test_plot_with_dataset_sets_axes_labels(self):
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
xlabel = '$' + test_dataset.data.axes[0].quantity + '$' + ' / ' + \
test_dataset.data.axes[0].unit
ylabel = '$' + test_dataset.data.axes[1].quantity + '$' + ' / ' + \
test_dataset.data.axes[1].unit
plotter = test_dataset.plot(self.plotter)
self.assertEqual(xlabel, plotter.axes.get_xlabel())
self.assertEqual(ylabel, plotter.axes.get_ylabel())
def test_plot_with_dataset_sets_axes_limits(self):
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[0].values = np.linspace(5, 10, 5)
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
test_dataset.data.axes[1].values = np.linspace(50, 100, 5)
xlimits = tuple(test_dataset.data.axes[0].values[[0, -1]])
ylimits = tuple(test_dataset.data.axes[1].values[[0, -1]])
plotter = test_dataset.plot(self.plotter)
self.assertEqual(xlimits, plotter.axes.get_xlim())
self.assertEqual(ylimits, plotter.axes.get_ylim())
def test_plot_contour(self):
self.plotter.type = 'contour'
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
test_dataset.plot(self.plotter)
def test_plot_with_switched_axes(self):
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[0].values = np.linspace(5, 10, 5)
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
test_dataset.data.axes[1].values = np.linspace(50, 100, 5)
xlimits = tuple(test_dataset.data.axes[1].values[[0, -1]])
ylimits = tuple(test_dataset.data.axes[0].values[[0, -1]])
self.plotter.parameters['switch_axes'] = True
plotter = test_dataset.plot(self.plotter)
self.assertEqual(xlimits, plotter.axes.get_xlim())
self.assertEqual(ylimits, plotter.axes.get_ylim())
def test_plot_contour_with_levels(self):
self.plotter.type = 'contour'
self.plotter.parameters['levels'] = 40
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
self.assertGreaterEqual(len(plotter.drawing.levels),
self.plotter.parameters['levels'] - 5)
def test_set_cmap_from_dict(self):
cmap = 'RdGy'
properties = {'drawing': {'cmap': cmap}}
self.plotter.properties.from_dict(properties)
self.assertEqual(cmap, self.plotter.properties.drawing.cmap)
def test_plot_sets_correct_cmap(self):
cmap = 'RdGy'
dict_ = {'drawing': {'cmap': cmap}}
self.plotter.properties.from_dict(dict_)
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
self.plotter.plot(dataset=test_dataset)
self.assertEqual(cmap, self.plotter.drawing.cmap.name)
def test_plot_imshow_with_levels_ignores_levels(self):
self.plotter.parameters['levels'] = 40
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
test_dataset.plot(self.plotter)
def test_plot_imshow_sets_aspect_to_auto(self):
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
test_dataset.plot(self.plotter)
self.assertEqual('auto', self.plotter.ax._aspect)
def test_show_contour_lines_plots_contour_lines_in_contourf(self):
self.plotter.type = 'contourf'
self.plotter.parameters['show_contour_lines'] = True
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
line_collection = [isinstance(x, matplotlib.collections.LineCollection)
for x in plotter.ax.get_children()]
self.assertTrue(any(line_collection))
def test_contour_plot_sets_correct_linewidths(self):
self.plotter.type = 'contour'
dict_ = {'drawing': {'linewidths': 2}}
self.plotter.properties.from_dict(dict_)
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
line_collection = [
x for x in plotter.ax.get_children()
if isinstance(x, matplotlib.collections.LineCollection)
]
self.assertEqual(dict_['drawing']['linewidths'],
line_collection[0].get_linewidths()[0])
def test_contour_plot_sets_correct_linestyles(self):
self.plotter.type = 'contour'
dict_ = {'drawing': {'linestyles': ':', 'linewidths': 1}}
self.plotter.properties.from_dict(dict_)
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
line_collection = [
x for x in plotter.ax.get_children()
if isinstance(x, matplotlib.collections.LineCollection)
]
# linestyle ':' => (0.0, [1.0, 1.65]) for linewidth = 1
self.assertEqual((0.0, [1.0, 1.65]),
line_collection[0].get_linestyles()[0])
def test_contour_plot_sets_correct_colors(self):
self.plotter.type = 'contour'
dict_ = {'drawing': {'colors': 'k'}}
self.plotter.properties.from_dict(dict_)
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
line_collection = [
x for x in plotter.ax.get_children()
if isinstance(x, matplotlib.collections.LineCollection)
]
self.assertListEqual([0., 0., 0., 1.],
list(line_collection[0].get_colors()[0]))
def test_contourf_plot_with_contour_lines_sets_correct_linewidths(self):
self.plotter.type = 'contourf'
self.plotter.parameters['show_contour_lines'] = True
dict_ = {'drawing': {'linewidths': 2}}
self.plotter.properties.from_dict(dict_)
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
line_collection = [
x for x in plotter.ax.get_children()
if isinstance(x, matplotlib.collections.LineCollection)
]
self.assertEqual(dict_['drawing']['linewidths'],
line_collection[0].get_linewidths()[0])
def test_contourf_plot_with_contour_lines_sets_correct_linestyles(self):
self.plotter.type = 'contourf'
self.plotter.parameters['show_contour_lines'] = True
dict_ = {'drawing': {'linestyles': ':', 'linewidths': 1}}
self.plotter.properties.from_dict(dict_)
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
line_collection = [
x for x in plotter.ax.get_children()
if isinstance(x, matplotlib.collections.LineCollection)
]
# linestyle ':' => (0.0, [1.0, 1.65]) for linewidth = 1
self.assertEqual((0.0, [1.0, 1.65]),
line_collection[0].get_linestyles()[0])
def test_contourf_plot_with_contour_lines_sets_correct_colors(self):
self.plotter.type = 'contourf'
self.plotter.parameters['show_contour_lines'] = True
dict_ = {'drawing': {'colors': 'k'}}
self.plotter.properties.from_dict(dict_)
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.random([5, 5])
plotter = test_dataset.plot(self.plotter)
line_collection = [
x for x in plotter.ax.get_children()
if isinstance(x, matplotlib.collections.LineCollection)
]
self.assertListEqual([0., 0., 0., 1.],
list(line_collection[0].get_colors()[0]))
class TestSinglePlotter2DStacked(unittest.TestCase):
def setUp(self):
self.plotter = plotting.SinglePlotter2DStacked()
self.filename = 'foo.pdf'
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
if os.path.exists(self.filename):
os.remove(self.filename)
def test_instantiate_class(self):
pass
def test_class_has_sensible_description(self):
self.assertIn('stack', self.plotter.description)
def test_plot_with_1D_dataset_raises(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5])
with self.assertRaises(
aspecd.exceptions.NotApplicableToDatasetError):
dataset_.plot(self.plotter)
def test_parameters_have_stacking_dimension_key(self):
self.assertIn('stacking_dimension', self.plotter.parameters)
def test_plot_consists_of_correct_number_of_lines(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
self.assertGreaterEqual(10, len(plotter.axes.get_lines()))
def test_plot_along_zero_dim_consists_of_correct_number_of_lines(self):
self.plotter.parameters['stacking_dimension'] = 0
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
self.assertGreaterEqual(5, len(plotter.axes.get_lines()))
def test_plot_stacks_plots(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
self.assertGreater(max(plotter.axes.get_lines()[5].get_ydata()),
max(plotter.axes.get_lines()[0].get_ydata())*3)
def test_plot_with_zero_offset_preserves_offset(self):
self.plotter.parameters['offset'] = 0
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
self.assertEqual(0, plotter.parameters['offset'])
def test_plot_along_zero_dim_stacks_plots(self):
self.plotter.parameters['stacking_dimension'] = 0
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
self.assertGreater(max(plotter.axes.get_lines()[4].get_ydata()),
max(plotter.axes.get_lines()[0].get_ydata())*3)
def test_plot_along_zero_dim_sets_correct_axes_labels(self):
self.plotter.parameters['stacking_dimension'] = 0
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
plotter = test_dataset.plot(self.plotter)
self.assertIn(test_dataset.data.axes[1].unit,
plotter.axes.get_xlabel())
def test_plot_sets_correct_axes_limits(self):
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[0].values = np.linspace(5, 10, 5)
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
test_dataset.data.axes[1].values = np.linspace(50, 100, 10)
plotter = test_dataset.plot(self.plotter)
xlimits = tuple(test_dataset.data.axes[0].values[[0, -1]])
self.assertLessEqual(plotter.axes.get_xlim()[0], xlimits[0])
self.assertGreaterEqual(plotter.axes.get_xlim()[1], xlimits[1])
def test_plot_along_zero_dim_sets_correct_axes_limits(self):
self.plotter.parameters['stacking_dimension'] = 0
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[0].values = np.linspace(5, 10, 5)
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
test_dataset.data.axes[1].values = np.linspace(50, 100, 10)
plotter = test_dataset.plot(self.plotter)
xlimits = tuple(test_dataset.data.axes[1].values[[0, -1]])
self.assertLessEqual(plotter.axes.get_xlim()[0], xlimits[0])
self.assertGreaterEqual(plotter.axes.get_xlim()[1], xlimits[1])
def test_plot_with_offset_stacks_plots_accordingly(self):
self.plotter.parameters['offset'] = 2
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
self.assertGreater(max(plotter.axes.get_lines()[5].get_ydata()),
max(plotter.axes.get_lines()[0].get_ydata())*10)
def test_plot_sets_drawings(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
dataset_.plot(self.plotter)
self.assertEqual(10, len(self.plotter.drawing))
def test_plot_applies_drawing_properties_to_all_drawings(self):
self.plotter.properties.drawing.color = '#aaccee'
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
self.assertEqual(self.plotter.properties.drawing.color,
plotter.axes.get_lines()[0]._color)
self.assertEqual(self.plotter.properties.drawing.color,
plotter.axes.get_lines()[4]._color)
def test_set_color_from_dict(self):
color = '#aaccee'
properties = {'drawing': {'color': color}}
self.plotter.properties.from_dict(properties)
self.assertEqual(color, self.plotter.properties.drawing.color)
def test_save_plot_with_set_color_does_not_raise(self):
self.plotter.properties.drawing.color = '#aaccee'
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
plotter = dataset_.plot(self.plotter)
saver_ = aspecd.plotting.Saver()
saver_.filename = self.filename
plotter.save(saver_)
self.assertTrue(os.path.exists(self.filename))
def test_plot_sets_correct_yticks(self):
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
test_dataset.data.axes[1].values = np.linspace(50, 100, 10)
plotter = test_dataset.plot(self.plotter)
self.assertEqual(10, len(plotter.axes.get_yticks()))
def test_plot_along_zero_dim_sets_correct_yticks(self):
self.plotter.parameters['stacking_dimension'] = 0
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[0].values = np.linspace(5, 10, 5)
plotter = test_dataset.plot(self.plotter)
self.assertEqual(5, len(plotter.axes.get_yticks()))
def test_plot_sets_correct_yticklabels(self):
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
test_dataset.data.axes[1].values = np.linspace(50, 100, 10)
plotter = test_dataset.plot(self.plotter)
self.assertEqual(test_dataset.data.axes[1].values[0].astype(str),
plotter.axes.get_yticklabels()[0].get_text())
def test_plot_along_zero_dim_sets_correct_yticklabels(self):
self.plotter.parameters['stacking_dimension'] = 0
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[0].quantity = 'zero'
test_dataset.data.axes[0].unit = 'foo'
test_dataset.data.axes[0].values = np.linspace(5, 10, 5)
plotter = test_dataset.plot(self.plotter)
self.assertEqual(test_dataset.data.axes[0].values[0].astype(str),
plotter.axes.get_yticklabels()[0].get_text())
def test_plot_with_ytick_format_sets_correct_yticklabels(self):
test_dataset = aspecd.dataset.CalculatedDataset()
test_dataset.data.data = np.random.random([5, 10]) - 0.5
test_dataset.data.axes[1].quantity = 'one'
test_dataset.data.axes[1].unit = 'bar'
test_dataset.data.axes[1].values = np.linspace(50, 100, 10)
self.plotter.parameters["yticklabelformat"] = '%.2f'
plotter = test_dataset.plot(self.plotter)
self.assertEqual('%.2f' % test_dataset.data.axes[1].values[2],
plotter.axes.get_yticklabels()[2].get_text())
def test_plot_zero_lines_for_each_trace(self):
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.random.random([5, 10]) - 0.5
self.plotter.parameters['show_zero_lines'] = True
plotter = dataset_.plot(self.plotter)
self.assertGreaterEqual(20, len(plotter.axes.get_lines()))
class TestMultiPlotter(unittest.TestCase):
def setUp(self):
self.plotter = plotting.MultiPlotter()
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_has_datasets_property(self):
self.assertTrue(hasattr(self.plotter, 'datasets'))
def test_datasets_property_is_list(self):
self.assertTrue(isinstance(self.plotter.datasets, list))
def test_plot_without_datasets_raises(self):
with self.assertRaises(aspecd.exceptions.MissingDatasetError):
self.plotter.plot()
def test_plot_with_datasets(self):
self.plotter.datasets.append(dataset.Dataset())
self.plotter.plot()
def test_parameters_have_axes_key(self):
self.assertIn('axes', self.plotter.parameters)
def test_parameters_axes_is_list_of_axes_objects(self):
self.assertTrue(isinstance(self.plotter.parameters['axes'], list))
self.assertTrue(self.plotter.parameters['axes'])
for axis in self.plotter.parameters['axes']:
self.assertTrue(isinstance(axis, dataset.Axis))
def test_plot_with_axes_in_parameters_sets_axes_labels(self):
self.plotter.parameters['axes'][0].quantity = 'foo'
self.plotter.parameters['axes'][0].unit = 'bar'
self.plotter.parameters['axes'][1].quantity = 'foo2'
self.plotter.parameters['axes'][1].unit = 'bar2'
xlabel = '$' + self.plotter.parameters['axes'][0].quantity + \
'$' + ' / ' + self.plotter.parameters['axes'][0].unit
ylabel = '$' + self.plotter.parameters['axes'][1].quantity + \
'$' + ' / ' + self.plotter.parameters['axes'][1].unit
self.plotter.datasets.append(dataset.Dataset())
self.plotter.plot()
self.assertEqual(xlabel, self.plotter.axes.get_xlabel())
self.assertEqual(ylabel, self.plotter.axes.get_ylabel())
def test_plot_with_datasets_with_identical_axes_sets_axes_labels(self):
test_dataset0 = dataset.Dataset()
test_dataset0.data.axes[0].quantity = 'foo'
test_dataset0.data.axes[0].unit = 'bar'
test_dataset0.data.axes[1].quantity = 'foo'
test_dataset0.data.axes[1].unit = 'bar'
test_dataset1 = dataset.Dataset()
test_dataset1.data.axes[0].quantity = 'foo'
test_dataset1.data.axes[0].unit = 'bar'
test_dataset1.data.axes[1].quantity = 'foo'
test_dataset1.data.axes[1].unit = 'bar'
xlabel = '$' + test_dataset0.data.axes[0].quantity + '$' + ' / ' + \
test_dataset0.data.axes[0].unit
ylabel = '$' + test_dataset0.data.axes[1].quantity + '$' + ' / ' + \
test_dataset0.data.axes[1].unit
self.plotter.datasets.append(test_dataset0)
self.plotter.datasets.append(test_dataset1)
self.plotter.plot()
self.assertEqual(xlabel, self.plotter.axes.get_xlabel())
self.assertEqual(ylabel, self.plotter.axes.get_ylabel())
def test_plot_with_datasets_adds_drawing_properties(self):
self.plotter.datasets.append(dataset.Dataset())
self.plotter.plot()
self.assertEqual(len(self.plotter.datasets),
len(self.plotter.properties.drawings))
def test_plot_with_show_legend_set_to_true_adds_legend(self):
self.plotter.datasets.append(dataset.Dataset())
self.plotter.parameters['show_legend'] = True
with contextlib.redirect_stderr(io.StringIO()):
self.plotter.plot()
self.assertIs(type(self.plotter.legend), matplotlib.legend.Legend)
def test_axes_properties_set_axes_labels(self):
self.plotter.properties.axes.xlabel = 'foo'
self.plotter.properties.axes.ylabel = 'bar'
test_dataset = dataset.Dataset()
test_dataset.data.axes[0].quantity = 'foo'
test_dataset.data.axes[0].unit = 'bar'
test_dataset.data.axes[1].quantity = 'foo'
test_dataset.data.axes[1].unit = 'bar'
self.plotter.datasets.append(test_dataset)
self.plotter.plot()
self.assertEqual(self.plotter.properties.axes.xlabel,
self.plotter.axes.get_xlabel())
self.assertEqual(self.plotter.properties.axes.ylabel,
self.plotter.axes.get_ylabel())
def test_plot_checks_applicability(self):
class MyPlotter(aspecd.plotting.MultiPlotter):
@staticmethod
def applicable(dataset):
return False
dataset1 = aspecd.dataset.Dataset()
dataset2 = aspecd.dataset.Dataset()
plotter = MyPlotter()
plotter.datasets.append(dataset1)
plotter.datasets.append(dataset2)
with self.assertRaises(aspecd.exceptions.NotApplicableToDatasetError):
plotter.plot()
def test_plot_checks_applicability_and_prints_helpful_message(self):
class MyPlotter(aspecd.plotting.MultiPlotter):
@staticmethod
def applicable(dataset):
return False
dataset1 = aspecd.dataset.Dataset()
dataset2 = aspecd.dataset.Dataset()
plotter = MyPlotter()
plotter.datasets.append(dataset1)
plotter.datasets.append(dataset2)
message = "MyPlotter not applicable to one or more datasets"
with self.assertRaisesRegex(
aspecd.exceptions.NotApplicableToDatasetError, message):
plotter.plot()
class TestMultiPlotter1D(unittest.TestCase):
def setUp(self):
self.plotter = plotting.MultiPlotter1D()
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_description_is_sensible(self):
self.assertNotIn('Abstract', self.plotter.description)
def test_properties_are_of_correct_type(self):
self.assertIs(type(self.plotter.properties),
aspecd.plotting.MultiPlot1DProperties)
def test_has_type_property(self):
self.assertTrue(hasattr(self.plotter, 'type'))
def test_set_type(self):
plot_type = 'loglog'
self.plotter.type = plot_type
self.assertEqual(self.plotter.type, plot_type)
def test_setting_wrong_type_raises(self):
with self.assertRaises(TypeError):
self.plotter.type = 'foo'
def test_plot_with_2D_data_raises(self):
dataset_ = dataset.Dataset()
dataset_.data.data = np.random.rand(3, 2)
self.plotter.datasets.append(dataset_)
with self.assertRaises(
aspecd.exceptions.NotApplicableToDatasetError):
self.plotter.plot()
def test_plot_with_datasets(self):
self.plotter.datasets.append(dataset.Dataset())
self.plotter.plot()
def test_plot_with_datasets_adds_drawing_to_properties(self):
self.plotter.datasets.append(dataset.Dataset())
self.plotter.plot()
self.assertEqual(1, len(self.plotter.properties.drawings))
def test_added_drawing_is_correct_type(self):
self.plotter.datasets.append(dataset.Dataset())
self.plotter.plot()
self.assertIs(type(self.plotter.properties.drawings[0]),
aspecd.plotting.LineProperties)
def test_plot_sets_correct_line_color(self):
color = '#abcdef'
dict_ = {'drawings': [{'color': color}]}
self.plotter.properties.from_dict(dict_)
self.plotter.datasets.append(dataset.Dataset())
self.plotter.plot()
self.assertEqual(color, self.plotter.drawings[0].get_color())
def test_plot_with_show_legend_sets_legend_label(self):
dataset_ = dataset.Dataset()
dataset_.label = 'foo'
self.plotter.datasets.append(dataset_)
self.plotter.parameters['show_legend'] = True
self.plotter.plot()
self.assertEqual(dataset_.label,
self.plotter.legend.get_texts()[0].get_text())
class TestMultiPlotter1DStacked(unittest.TestCase):
def setUp(self):
self.plotter = plotting.MultiPlotter1DStacked()
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.sin(np.linspace(0, 2*np.pi))
self.plotter.datasets.append(dataset_)
self.plotter.datasets.append(dataset_)
self.plotter.datasets.append(dataset_)
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_description_is_sensible(self):
self.assertNotIn('Abstract', self.plotter.description)
def test_plot_stacks_plots(self):
self.plotter.plot()
self.assertLess(min(self.plotter.axes.get_lines()[2].get_ydata()),
min(self.plotter.axes.get_lines()[0].get_ydata())*2)
def test_plot_removes_yticks(self):
self.plotter.plot()
self.assertEqual(0, len(self.plotter.axes.get_yticklabels()))
def test_plot_has_zero_lines_turned_off_by_default(self):
self.plotter.plot()
self.assertFalse(self.plotter.parameters["show_zero_lines"])
def test_parameters_have_offset_key(self):
self.assertIn('offset', self.plotter.parameters)
def test_plot_stacks_plots_with_given_offset(self):
self.plotter.parameters["offset"] = 10
self.plotter.plot()
self.assertLess(min(self.plotter.axes.get_lines()[2].get_ydata()),
min(self.plotter.axes.get_lines()[0].get_ydata())*20)
def test_plot_zero_lines_for_each_trace(self):
self.plotter.parameters['show_zero_lines'] = True
self.plotter.plot()
self.assertEqual(2*len(self.plotter.datasets),
len(self.plotter.axes.get_lines()))
def test_plot_zero_lines_for_each_trace_at_correct_position(self):
self.plotter.parameters['show_zero_lines'] = True
self.plotter.plot()
self.assertGreater(0, self.plotter.axes.get_lines()[-1].get_ydata()[0])
class TestCompositePlotter(unittest.TestCase):
def setUp(self):
self.plotter = plotting.CompositePlotter()
self.dataset = aspecd.dataset.CalculatedDataset()
self.dataset.data.data = np.sin(np.linspace(0, 2*np.pi, 101))
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_description_is_sensible(self):
self.assertIn('Composite', self.plotter.description)
def test_has_grid_dimensions_property(self):
self.assertTrue(hasattr(self.plotter, 'grid_dimensions'))
def test_has_subplot_locations_property(self):
self.assertTrue(hasattr(self.plotter, 'subplot_locations'))
def test_has_axes_positions_property(self):
self.assertTrue(hasattr(self.plotter, 'axes_positions'))
def test_has_plotter_property(self):
self.assertTrue(hasattr(self.plotter, 'plotter'))
def test_plot_with_single_subplot_adds_axis_to_axes(self):
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
single_plotter.dataset = self.dataset
self.plotter.plotter.append(single_plotter)
self.plotter.plot()
self.assertEqual(1, len(self.plotter.axes))
def test_plot_with_multiple_subplots_adds_axes_to_axes(self):
self.plotter.grid_dimensions = [2, 2]
self.plotter.subplot_locations = [[0, 0, 1, 1],
[1, 0, 1, 1],
[0, 1, 2, 1]]
single_plotter = plotting.SinglePlotter1D()
single_plotter.dataset = self.dataset
self.plotter.plotter.append(single_plotter)
self.plotter.plotter.append(single_plotter)
self.plotter.plotter.append(single_plotter)
self.plotter.plot()
self.assertEqual(len(self.plotter.subplot_locations),
len(self.plotter.axes))
def test_plot_with_single_subplot_and_plotter_plots_line(self):
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
single_plotter.dataset = self.dataset
self.plotter.plotter.append(single_plotter)
self.plotter.plot()
self.assertTrue(self.plotter.axes[0].has_data())
def test_plot_without_plotter_raises(self):
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
with self.assertRaises(aspecd.exceptions.MissingPlotterError):
self.plotter.plot()
def test_plot_with_not_enough_plotters_raises(self):
self.plotter.grid_dimensions = [2, 2]
self.plotter.subplot_locations = [[0, 0, 1, 1],
[1, 0, 1, 1],
[0, 1, 2, 1]]
single_plotter = plotting.SinglePlotter1D()
single_plotter.dataset = self.dataset
self.plotter.plotter.append(single_plotter)
self.plotter.plotter.append(single_plotter)
with self.assertRaises(aspecd.exceptions.MissingPlotterError):
self.plotter.plot()
def test_plot_sets_axes_position(self):
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
self.plotter.axes_positions = [[0.2, 0.2, -0.2, -0.2]]
single_plotter = plotting.SinglePlotter1D()
single_plotter.dataset = self.dataset
self.plotter.plotter.append(single_plotter)
self.plotter.plot()
offsets = self.plotter.axes_positions[0]
axis_position = [0.125 + offsets[0]*0.775, 0.110 + offsets[1]*0.77,
offsets[2]*0.775, offsets[3]*0.77]
self.assertListEqual(axis_position,
list(self.plotter.axes[0].get_position().bounds))
def test_plot_shows_legend(self):
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
single_plotter.dataset = self.dataset
single_plotter.parameters['show_legend'] = True
self.plotter.plotter.append(single_plotter)
with contextlib.redirect_stderr(io.StringIO()):
self.plotter.plot()
self.assertTrue(isinstance(self.plotter.axes[0].get_legend(),
matplotlib.legend.Legend))
class TestSingleCompositePlotter(unittest.TestCase):
def setUp(self):
self.plotter = plotting.SingleCompositePlotter()
def tearDown(self):
if self.plotter.fig:
plt.close(self.plotter.fig)
def test_instantiate_class(self):
pass
def test_description_is_sensible(self):
self.assertIn('single dataset', self.plotter.description)
def test_plot_without_dataset_raises(self):
with self.assertRaises(aspecd.exceptions.MissingDatasetError):
self.plotter.plot()
def test_plot_with_preset_dataset(self):
self.plotter.dataset = dataset.Dataset()
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
self.plotter.plotter.append(single_plotter)
self.plotter.plot()
def test_plot_from_dataset_sets_dataset(self):
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
self.plotter.plotter.append(single_plotter)
test_dataset = dataset.Dataset()
plotter = test_dataset.plot(self.plotter)
self.assertTrue(isinstance(plotter.dataset, dataset.Dataset))
def test_plot_with_dataset(self):
self.plotter.grid_dimensions = [1, 1]
self.plotter.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
self.plotter.plotter.append(single_plotter)
test_dataset = dataset.Dataset()
self.plotter.plot(dataset=test_dataset)
self.assertGreater(len(test_dataset.representations), 0)
def test_plot_checks_applicability(self):
class MyPlotter(aspecd.plotting.SingleCompositePlotter):
@staticmethod
def applicable(dataset):
return False
dataset = aspecd.dataset.Dataset()
plotter = MyPlotter()
with self.assertRaises(aspecd.exceptions.NotApplicableToDatasetError):
dataset.plot(plotter)
def test_plot_check_applicability_prints_helpful_message(self):
class MyPlotter(aspecd.plotting.SingleCompositePlotter):
@staticmethod
def applicable(dataset):
return False
dataset = aspecd.dataset.Dataset()
dataset.id = "foo"
plotter = MyPlotter()
message = "MyPlotter not applicable to dataset with id foo"
with self.assertRaisesRegex(
aspecd.exceptions.NotApplicableToDatasetError, message):
dataset.plot(plotter)
class TestSaver(unittest.TestCase):
def setUp(self):
self.saver = plotting.Saver()
self.filename = 'test.pdf'
def tearDown(self):
if os.path.isfile(self.filename):
os.remove(self.filename)
if self.saver.plotter and self.saver.plotter.fig:
plt.close(self.saver.plotter.fig)
def test_instantiate_class(self):
pass
def test_has_save_method(self):
self.assertTrue(hasattr(self.saver, 'save'))
self.assertTrue(callable(self.saver.save))
def test_save_without_filename_raises(self):
with self.assertRaises(aspecd.exceptions.MissingFilenameError):
self.saver.save(plotting.Plotter())
def test_with_filename_set_previously(self):
self.saver.plotter = plotting.Plotter()
self.saver.plotter.plot()
self.saver.filename = self.filename
self.saver.save()
def test_instantiate_with_filename_sets_filename(self):
self.saver = plotting.Saver(self.filename)
self.assertEqual(self.saver.filename, self.filename)
def test_save_without_plotter_raises(self):
self.saver.filename = self.filename
with self.assertRaises(aspecd.exceptions.MissingPlotError):
self.saver.save()
def test_save_with_plotter_sets_plotter(self):
plotter = plotting.Plotter()
plotter.plot()
self.saver.filename = self.filename
self.saver.save(plotter)
self.assertEqual(self.saver.plotter, plotter)
def test_has_parameters_property(self):
self.assertTrue(hasattr(self.saver, 'parameters'))
def test_parameters_property_is_dict(self):
self.assertTrue(isinstance(self.saver.parameters, dict))
def test_save_creates_file(self):
plotter = plotting.Plotter()
plotter.plot()
self.saver.filename = self.filename
self.saver.save(plotter)
self.assertTrue(os.path.isfile(self.filename))
def test_set_format_parameter_adds_extension(self):
plotter = plotting.Plotter()
plotter.plot()
self.filename = 'test.pdf'
self.saver.filename, _ = os.path.splitext(self.filename)
self.saver.parameters["format"] = 'pdf'
self.saver.save(plotter)
self.assertTrue(os.path.isfile(self.filename))
def test_set_format_parameter_corrects_extension(self):
plotter = plotting.Plotter()
plotter.plot()
self.filename = 'test.pdf'
basename, _ = os.path.splitext(self.filename)
self.saver.parameters["format"] = 'pdf'
self.saver.filename = '.'.join([basename, "png"])
self.saver.save(plotter)
self.assertTrue(os.path.isfile(self.filename))
def test_set_format_parameter_writes_appropriate_file(self):
plotter = plotting.Plotter()
plotter.plot()
self.filename = 'test.pdf'
self.saver.filename, _ = os.path.splitext(self.filename)
self.saver.parameters["format"] = 'pdf'
self.saver.save(plotter)
self.assertTrue(os.path.isfile(self.filename))
def test_save_with_singleplotter1d(self):
test_dataset = dataset.Dataset()
plotter = plotting.SinglePlotter1D()
plotter = test_dataset.plot(plotter)
plotter.plot()
self.saver.filename = self.filename
self.saver.save(plotter)
def test_save_with_singleplotter2d(self):
test_dataset = dataset.Dataset()
test_dataset.data.data = np.random.rand(3, 2)
plotter = plotting.SinglePlotter2D()
plotter = test_dataset.plot(plotter)
plotter.plot()
self.saver.filename = self.filename
self.saver.save(plotter)
def test_save_with_multiplotter(self):
plotter = plotting.MultiPlotter()
plotter.datasets.append(dataset.Dataset())
plotter.plot()
self.saver.filename = self.filename
self.saver.save(plotter)
class TestCaption(unittest.TestCase):
def setUp(self):
self.caption = plotting.Caption()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.caption, 'to_dict'))
self.assertTrue(callable(self.caption.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.caption, 'from_dict'))
self.assertTrue(callable(self.caption.from_dict))
def test_has_title_property(self):
self.assertTrue(hasattr(self.caption, 'title'))
def test_has_text_property(self):
self.assertTrue(hasattr(self.caption, 'text'))
def test_has_parameters_property(self):
self.assertTrue(hasattr(self.caption, 'parameters'))
class TestDrawingProperties(unittest.TestCase):
def setUp(self):
self.drawing_properties = plotting.DrawingProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.drawing_properties, 'to_dict'))
self.assertTrue(callable(self.drawing_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.drawing_properties, 'from_dict'))
self.assertTrue(callable(self.drawing_properties.from_dict))
def test_has_properties(self):
for prop in ['label']:
self.assertTrue(hasattr(self.drawing_properties, prop))
def test_has_apply_method(self):
self.assertTrue(hasattr(self.drawing_properties, 'apply'))
self.assertTrue(callable(self.drawing_properties.apply))
def test_apply_without_argument_raises(self):
with self.assertRaises(aspecd.exceptions.MissingDrawingError):
self.drawing_properties.apply()
def test_apply_sets_properties(self):
self.drawing_properties.label = 'foo'
line = matplotlib.lines.Line2D([0, 1], [0, 0])
self.drawing_properties.apply(drawing=line)
self.assertEqual(self.drawing_properties.label, line.get_label())
def test_apply_with_nonexisting_property_issues_log_message(self):
self.drawing_properties.foobar = 'foo'
line = matplotlib.lines.Line2D([0, 1], [0, 0])
with self.assertLogs(__package__, level='DEBUG') as cm:
self.drawing_properties.apply(drawing=line)
self.assertIn('"{}" has no setter for attribute "{}", hence not '
'set'.format(line.__class__, "foobar"), cm.output[0])
class TestLineProperties(unittest.TestCase):
def setUp(self):
self.line_properties = plotting.LineProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.line_properties, 'to_dict'))
self.assertTrue(callable(self.line_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.line_properties, 'from_dict'))
self.assertTrue(callable(self.line_properties.from_dict))
def test_has_properties(self):
for prop in ['color', 'drawstyle', 'label', 'linestyle', 'linewidth',
'marker']:
self.assertTrue(hasattr(self.line_properties, prop))
def test_has_apply_method(self):
self.assertTrue(hasattr(self.line_properties, 'apply'))
self.assertTrue(callable(self.line_properties.apply))
def test_apply_without_argument_raises(self):
with self.assertRaises(aspecd.exceptions.MissingDrawingError):
self.line_properties.apply()
def test_apply_sets_properties(self):
self.line_properties.label = 'foo'
# noinspection PyUnresolvedReferences
line = matplotlib.lines.Line2D([0, 1], [0, 0])
self.line_properties.apply(drawing=line)
self.assertEqual(self.line_properties.label, line.get_label())
class TestSurfaceProperties(unittest.TestCase):
def setUp(self):
self.properties = plotting.SurfaceProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.properties, 'to_dict'))
self.assertTrue(callable(self.properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.properties, 'from_dict'))
self.assertTrue(callable(self.properties.from_dict))
def test_has_properties(self):
for prop in ['cmap']:
self.assertTrue(hasattr(self.properties, prop))
def test_has_apply_method(self):
self.assertTrue(hasattr(self.properties, 'apply'))
self.assertTrue(callable(self.properties.apply))
def test_apply_without_argument_raises(self):
with self.assertRaises(aspecd.exceptions.MissingDrawingError):
self.properties.apply()
@unittest.skip
def test_apply_sets_properties(self):
self.properties.cmap = 'RdGy'
# noinspection PyUnresolvedReferences
contour = matplotlib.lines.Line2D([0, 1], [0, 0])
self.properties.apply(drawing=contour)
self.assertEqual(self.properties.cmap, contour.cmap.name)
class TestPlotProperties(unittest.TestCase):
def setUp(self):
self.plot_properties = plotting.PlotProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'to_dict'))
self.assertTrue(callable(self.plot_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'from_dict'))
self.assertTrue(callable(self.plot_properties.from_dict))
def test_has_figure_property(self):
self.assertTrue(hasattr(self.plot_properties, 'figure'))
def test_has_apply_method(self):
self.assertTrue(hasattr(self.plot_properties, 'apply'))
self.assertTrue(callable(self.plot_properties.apply))
def test_apply_without_argument_raises(self):
with self.assertRaises(aspecd.exceptions.MissingPlotterError):
self.plot_properties.apply()
def test_apply_sets_properties(self):
self.plot_properties.figure.dpi = 300.0
plot = plotting.Plotter()
plot.plot()
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.figure.dpi,
plot.figure.get_dpi())
plt.close(plot.figure)
class TestFigureProperties(unittest.TestCase):
def setUp(self):
self.figure_properties = plotting.FigureProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.figure_properties, 'to_dict'))
self.assertTrue(callable(self.figure_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.figure_properties, 'from_dict'))
self.assertTrue(callable(self.figure_properties.from_dict))
def test_has_properties(self):
for prop in ['size', 'dpi', 'title']:
self.assertTrue(hasattr(self.figure_properties, prop))
def test_has_apply_method(self):
self.assertTrue(hasattr(self.figure_properties, 'apply'))
self.assertTrue(callable(self.figure_properties.apply))
def test_apply_without_argument_raises(self):
with self.assertRaises(aspecd.exceptions.MissingFigureError):
self.figure_properties.apply()
def test_apply_sets_figure_dpi(self):
self.figure_properties.dpi = 300.0
plot = plotting.Plotter()
plot.plot()
self.figure_properties.apply(figure=plot.figure)
self.assertEqual(self.figure_properties.dpi, plot.figure.get_dpi())
plt.close(plot.figure)
def test_apply_sets_figure_size(self):
self.figure_properties.size = (10, 5)
plot = plotting.Plotter()
plot.plot()
self.figure_properties.apply(figure=plot.figure)
self.assertListEqual(list(self.figure_properties.size),
list(plot.figure.get_size_inches()))
plt.close(plot.figure)
def test_apply_sets_figure_title(self):
self.figure_properties.title = 'foo'
plot = plotting.Plotter()
plot.plot()
self.figure_properties.apply(figure=plot.figure)
self.assertEqual(self.figure_properties.title,
plot.figure._suptitle.get_text())
plt.close(plot.figure)
class TestAxisProperties(unittest.TestCase):
def setUp(self):
self.axis_properties = plotting.AxesProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.axis_properties, 'to_dict'))
self.assertTrue(callable(self.axis_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.axis_properties, 'from_dict'))
self.assertTrue(callable(self.axis_properties.from_dict))
def test_has_properties(self):
for prop in ['aspect', 'facecolor', 'position', 'title',
'xlabel', 'xlim', 'xscale', 'xticklabels', 'xticks',
'ylabel', 'ylim', 'yscale', 'yticklabels', 'yticks']:
self.assertTrue(hasattr(self.axis_properties, prop))
def test_has_apply_properties_method(self):
self.assertTrue(hasattr(self.axis_properties, 'apply'))
self.assertTrue(callable(self.axis_properties.apply))
def test_apply_properties_without_argument_raises(self):
with self.assertRaises(aspecd.exceptions.MissingAxisError):
self.axis_properties.apply()
def test_apply_properties_sets_axis_properties(self):
self.axis_properties.xlabel = 'foo'
plot = plotting.Plotter()
plot.plot()
self.axis_properties.apply(axes=plot.axes)
self.assertEqual(self.axis_properties.xlabel, plot.axes.get_xlabel())
plt.close(plot.figure)
def test_apply_properties_from_dict_sets_axis_properties(self):
label = 'foo'
properties = {'axes': {'xlabel': label}}
plot = plotting.MultiPlotter1D()
plot.datasets.append(aspecd.dataset.Dataset())
plot.properties.from_dict(properties)
plot.plot()
self.assertEqual(label, plot.axes.get_xlabel())
plt.close(plot.figure)
def test_set_xticks(self):
self.axis_properties.xticks = np.linspace(0, 1, 11)
plot = plotting.Plotter()
plot.plot()
self.axis_properties.apply(axes=plot.axes)
self.assertListEqual(list(self.axis_properties.xticks),
list(plot.axes.get_xticks()))
plt.close(plot.figure)
def test_set_xtick_labels(self):
self.axis_properties.xticks = np.linspace(0, 1, 11)
self.axis_properties.xticklabels = np.linspace(2, 3, 11).astype(str)
plot = plotting.Plotter()
plot.plot()
self.axis_properties.apply(axes=plot.axes)
self.assertEqual(self.axis_properties.xticklabels[5],
plot.axes.get_xticklabels()[5].get_text())
plt.close(plot.figure)
def test_set_yticks(self):
self.axis_properties.yticks = np.linspace(0, 1, 11)
plot = plotting.Plotter()
plot.plot()
self.axis_properties.apply(axes=plot.axes)
self.assertListEqual(list(self.axis_properties.yticks),
list(plot.axes.get_yticks()))
plt.close(plot.figure)
def test_set_ytick_labels(self):
self.axis_properties.yticks = np.linspace(0, 1, 11)
self.axis_properties.yticklabels = np.linspace(2, 3, 11).astype(str)
plot = plotting.Plotter()
plot.plot()
self.axis_properties.apply(axes=plot.axes)
self.assertEqual(self.axis_properties.yticklabels[5],
plot.axes.get_yticklabels()[5].get_text())
plt.close(plot.figure)
def test_set_ticks_and_labels_does_not_issue_warning(self):
self.axis_properties.xticks = np.linspace(0, 1, 11)
self.axis_properties.xticklabels = np.linspace(2, 3, 11).astype(str)
plot = plotting.Plotter()
plot.plot()
with warnings.catch_warnings(record=True) as warning:
self.axis_properties.apply(axes=plot.axes)
self.assertFalse(len(warning))
plt.close(plot.figure)
class TestLegendProperties(unittest.TestCase):
def setUp(self):
self.legend_properties = plotting.LegendProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.legend_properties, 'to_dict'))
self.assertTrue(callable(self.legend_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.legend_properties, 'from_dict'))
self.assertTrue(callable(self.legend_properties.from_dict))
def test_has_properties(self):
for prop in ['loc', 'frameon']:
self.assertTrue(hasattr(self.legend_properties, prop))
def test_has_apply_method(self):
self.assertTrue(hasattr(self.legend_properties, 'apply'))
self.assertTrue(callable(self.legend_properties.apply))
def test_apply_without_argument_raises(self):
with self.assertRaises(aspecd.exceptions.MissingLegendError):
self.legend_properties.apply()
def test_apply_properties_sets_legend_properties(self):
self.legend_properties.loc = 'center'
plot = plotting.Plotter()
plot.plot()
with contextlib.redirect_stderr(io.StringIO()):
legend = plot.axes.legend()
self.legend_properties.apply(legend=legend)
self.assertEqual(self.legend_properties.loc, legend.loc)
plt.close(plot.figure)
def test_location_sets_legend_loc(self):
location = 5
self.legend_properties.location = location
plot = plotting.Plotter()
plot.properties.legend = self.legend_properties
plot.parameters['show_legend'] = True
with contextlib.redirect_stderr(io.StringIO()):
plot.plot()
legend = plot.legend
self.assertEqual(location, legend._loc)
plt.close(plot.figure)
def test_location_from_dict_sets_legend_loc(self):
location = 5
properties = {'legend': {'location': location}}
plot = plotting.Plotter()
plot.properties.from_dict(properties)
plot.parameters['show_legend'] = True
with contextlib.redirect_stderr(io.StringIO()):
plot.plot()
legend = plot.legend
self.assertEqual(location, legend._loc)
plt.close(plot.figure)
def test_frameon_sets_legend_frameon(self):
frameon = False
self.legend_properties.frameon = frameon
plot = plotting.Plotter()
plot.properties.legend = self.legend_properties
plot.parameters['show_legend'] = True
with contextlib.redirect_stderr(io.StringIO()):
plot.plot()
legend = plot.legend
self.assertEqual(frameon, legend.get_frame_on())
plt.close(plot.figure)
def test_location_not_included_in_to_dict(self):
self.assertNotIn('location', self.legend_properties.to_dict())
class TestGridProperties(unittest.TestCase):
def setUp(self):
self.grid_properties = plotting.GridProperties()
def test_instantiate_class(self):
pass
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.grid_properties, 'to_dict'))
self.assertTrue(callable(self.grid_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.grid_properties, 'from_dict'))
self.assertTrue(callable(self.grid_properties.from_dict))
def test_has_properties(self):
for prop in ['show', 'ticks', 'axis', 'lines']:
self.assertTrue(hasattr(self.grid_properties, prop))
def test_has_apply_method(self):
self.assertTrue(hasattr(self.grid_properties, 'apply'))
self.assertTrue(callable(self.grid_properties.apply))
def test_apply_without_argument_raises(self):
with self.assertRaises(TypeError):
self.grid_properties.apply()
def test_lines_color_is_sensible_for_grid(self):
self.assertEqual('#cccccc', self.grid_properties.lines.color)
def test_apply_properties_sets_properties(self):
self.grid_properties.show = True
self.grid_properties.lines.color = '#cccccc'
plot = plotting.Plotter()
plot.plot()
self.grid_properties.apply(axes=plot.axes)
self.assertEqual(self.grid_properties.lines.color,
plot.axes.xaxis.get_gridlines()[0].get_color())
plt.close(plot.figure)
class TestSinglePlotProperties(unittest.TestCase):
def setUp(self):
self.plot_properties = plotting.SinglePlotProperties()
def test_instantiate_class(self):
pass
def test_has_figure_property(self):
self.assertTrue(hasattr(self.plot_properties, 'figure'))
def test_has_axes_property(self):
self.assertTrue(hasattr(self.plot_properties, 'axes'))
def test_has_grid_property(self):
self.assertTrue(hasattr(self.plot_properties, 'grid'))
def test_has_drawing_property(self):
self.assertTrue(hasattr(self.plot_properties, 'drawing'))
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'to_dict'))
self.assertTrue(callable(self.plot_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'from_dict'))
self.assertTrue(callable(self.plot_properties.from_dict))
def test_apply_sets_axis_properties(self):
self.plot_properties.axes.xlabel = 'foo'
plot = plotting.SinglePlotter()
plot.plot(dataset=dataset.Dataset())
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.axes.xlabel,
plot.axes.get_xlabel())
plt.close(plot.figure)
def test_apply_sets_grid_properties(self):
self.plot_properties.grid.show = True
self.plot_properties.grid.lines.color = '#000000'
plot = plotting.SinglePlotter()
plot.plot(dataset=dataset.Dataset())
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.grid.lines.color,
plot.axes.xaxis.get_gridlines()[0].get_color())
plt.close(plot.figure)
def test_apply_sets_drawing_properties(self):
self.plot_properties.drawing.label = 'foo'
plot = plotting.SinglePlotter1D()
plot.plot(dataset=dataset.Dataset())
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.drawing.label,
plot.drawing.get_label())
plt.close(plot.figure)
class TestSinglePlot1DProperties(unittest.TestCase):
def setUp(self):
self.plot_properties = plotting.SinglePlot1DProperties()
def test_instantiate_class(self):
pass
def test_apply_sets_drawing_properties(self):
self.plot_properties.drawing.linewidth = 2.0
plot = plotting.SinglePlotter1D()
plot.plot(dataset=dataset.Dataset())
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.drawing.linewidth,
plot.drawing.get_linewidth())
plt.close(plot.figure)
class TestSinglePlot2DProperties(unittest.TestCase):
def setUp(self):
self.plot_properties = plotting.SinglePlot2DProperties()
def test_instantiate_class(self):
pass
def test_apply_sets_drawing_properties(self):
self.plot_properties.drawing.cmap = 'RdGy'
plot = plotting.SinglePlotter2D()
dataset_ = dataset.Dataset()
dataset_.data.data = np.random.random([5, 5])
plot.plot(dataset=dataset_)
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.drawing.cmap,
plot.drawing.cmap.name)
plt.close(plot.figure)
class TestMultiPlotProperties(unittest.TestCase):
def setUp(self):
self.plot_properties = plotting.MultiPlotProperties()
def test_instantiate_class(self):
pass
def test_has_figure_property(self):
self.assertTrue(hasattr(self.plot_properties, 'figure'))
def test_has_axes_property(self):
self.assertTrue(hasattr(self.plot_properties, 'axes'))
def test_has_grid_property(self):
self.assertTrue(hasattr(self.plot_properties, 'grid'))
def test_has_drawings_property(self):
self.assertTrue(hasattr(self.plot_properties, 'drawings'))
def test_has_legend_property(self):
self.assertTrue(hasattr(self.plot_properties, 'legend'))
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'to_dict'))
self.assertTrue(callable(self.plot_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'from_dict'))
self.assertTrue(callable(self.plot_properties.from_dict))
def test_apply_sets_axis_properties(self):
self.plot_properties.axes.xlabel = 'foo'
plot = plotting.MultiPlotter()
plot.datasets = [dataset.Dataset()]
plot.plot()
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.axes.xlabel,
plot.axes.get_xlabel())
plt.close(plot.figure)
def test_apply_sets_grid_properties(self):
self.plot_properties.grid.show = True
self.plot_properties.grid.lines.color = '#000000'
plot = plotting.SinglePlotter()
plot.plot(dataset=dataset.Dataset())
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.grid.lines.color,
plot.axes.xaxis.get_gridlines()[0].get_color())
plt.close(plot.figure)
def test_apply_sets_legend_properties(self):
self.plot_properties.legend.loc = 'center'
plotter = plotting.MultiPlotter()
dataset_ = dataset.Dataset()
dataset_.label = 'foo'
plotter.datasets = [dataset_]
plotter.plot()
with contextlib.redirect_stderr(io.StringIO()):
plotter.legend = plotter.axes.legend()
self.plot_properties.apply(plotter=plotter)
self.assertEqual(self.plot_properties.legend.loc,
plotter.legend.loc)
plt.close(plotter.figure)
def test_from_dict_sets_drawings(self):
dict_ = {'drawings': [{'label': 'foo'}]}
self.plot_properties.from_dict(dict_)
self.assertEqual('foo', self.plot_properties.drawings[0].label)
def test_from_dict_sets_multiple_drawings(self):
dict_ = {'drawings': [{'label': 'foo'}, {'label': 'bar'}]}
self.plot_properties.from_dict(dict_)
self.assertEqual('foo', self.plot_properties.drawings[0].label)
self.assertEqual('bar', self.plot_properties.drawings[1].label)
def test_from_dict_does_not_add_drawing_if_it_exists(self):
self.plot_properties.drawings.append(
aspecd.plotting.DrawingProperties())
dict_ = {'drawings': [{'label': 'foo'}]}
self.plot_properties.from_dict(dict_)
self.assertEqual(1, len(self.plot_properties.drawings))
def test_from_dict_adds_missing_drawing(self):
dict_ = {'drawings': [{'label': 'foo'}]}
self.plot_properties.from_dict(dict_)
self.assertEqual(1, len(self.plot_properties.drawings))
def test_from_dict_adds_missing_drawings(self):
dict_ = {'drawings': [{'label': 'foo'}, {'label': 'bar'}]}
self.plot_properties.from_dict(dict_)
self.assertEqual(2, len(self.plot_properties.drawings))
def test_from_dict_sets_legend(self):
dict_ = {'legend': {'loc': 'center'}, 'drawings': [{'label': 'foo'}]}
self.plot_properties.from_dict(dict_)
self.assertEqual('center', self.plot_properties.legend.loc)
class TestMultiPlot1DProperties(unittest.TestCase):
def setUp(self):
self.plot_properties = plotting.MultiPlot1DProperties()
def test_instantiate_class(self):
pass
def test_added_drawing_is_line_properties_object(self):
self.plot_properties.add_drawing()
self.assertIs(type(self.plot_properties.drawings[0]),
aspecd.plotting.LineProperties)
def test_added_drawing_has_correct_default_colour(self):
property_cycle = plt.rcParams['axes.prop_cycle'].by_key()
colour = property_cycle["color"][0]
self.plot_properties.add_drawing()
self.assertEqual(colour, self.plot_properties.drawings[0].color)
def test_drawing_has_correct_color_if_more_drawings_than_colors(self):
property_cycle = plt.rcParams['axes.prop_cycle'].by_key()
colour = property_cycle["color"][0]
for idx in range(0, len(property_cycle["color"])+1):
self.plot_properties.add_drawing()
self.assertEqual(colour, self.plot_properties.drawings[0].color)
def test_added_drawing_has_correct_default_linewidth(self):
linewidth = plt.rcParams['lines.linewidth']
self.plot_properties.add_drawing()
self.assertEqual(linewidth, self.plot_properties.drawings[0].linewidth)
def test_added_drawing_has_correct_default_linestyle(self):
linewidth = plt.rcParams['lines.linestyle']
self.plot_properties.add_drawing()
self.assertEqual(linewidth, self.plot_properties.drawings[0].linestyle)
def test_added_drawing_has_correct_default_marker(self):
linewidth = plt.rcParams['lines.marker']
self.plot_properties.add_drawing()
self.assertEqual(linewidth, self.plot_properties.drawings[0].marker)
class TestCompositePlotProperties(unittest.TestCase):
def setUp(self):
self.plot_properties = plotting.CompositePlotProperties()
def test_instantiate_class(self):
pass
def test_has_figure_property(self):
self.assertTrue(hasattr(self.plot_properties, 'figure'))
def test_has_axes_property(self):
self.assertTrue(hasattr(self.plot_properties, 'axes'))
def test_has_to_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'to_dict'))
self.assertTrue(callable(self.plot_properties.to_dict))
def test_has_from_dict_method(self):
self.assertTrue(hasattr(self.plot_properties, 'from_dict'))
self.assertTrue(callable(self.plot_properties.from_dict))
def test_apply_sets_axis_properties(self):
self.plot_properties.axes.xlabel = 'foo'
plot = plotting.CompositePlotter()
plot.grid_dimensions = [1, 1]
plot.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.sin(np.linspace(0, 2*np.pi, 101))
single_plotter.dataset = dataset_
plot.plotter.append(single_plotter)
plot.plot()
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.axes.xlabel,
plot.axes[0].get_xlabel())
plt.close(plot.figure)
def test_apply_sets_axis_properties_for_multiple_plots(self):
self.plot_properties.axes.xlabel = 'foo'
plot = plotting.CompositePlotter()
plot.grid_dimensions = [2, 1]
plot.subplot_locations = [[0, 0, 1, 1], [1, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.sin(np.linspace(0, 2*np.pi, 101))
single_plotter.dataset = dataset_
plot.plotter.append(single_plotter)
plot.plotter.append(single_plotter)
plot.plot()
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.axes.xlabel,
plot.axes[0].get_xlabel())
self.assertEqual(self.plot_properties.axes.xlabel,
plot.axes[1].get_xlabel())
plt.close(plot.figure)
def test_apply_overrides_axis_properties(self):
self.plot_properties.axes.xlabel = 'foo'
plot = plotting.CompositePlotter()
plot.grid_dimensions = [1, 1]
plot.subplot_locations = [[0, 0, 1, 1]]
single_plotter = plotting.SinglePlotter1D()
single_plotter.properties.axes.xlabel = 'bar'
dataset_ = aspecd.dataset.CalculatedDataset()
dataset_.data.data = np.sin(np.linspace(0, 2*np.pi, 101))
single_plotter.dataset = dataset_
plot.plotter.append(single_plotter)
plot.plot()
self.plot_properties.apply(plotter=plot)
self.assertEqual(self.plot_properties.axes.xlabel,
plot.axes[0].get_xlabel())
plt.close(plot.figure)
| 40.089517
| 79
| 0.665636
| 9,974
| 83,747
| 5.367856
| 0.041007
| 0.077047
| 0.028857
| 0.028036
| 0.858682
| 0.81124
| 0.758774
| 0.695755
| 0.65117
| 0.612955
| 0
| 0.012866
| 0.217608
| 83,747
| 2,088
| 80
| 40.108716
| 0.804237
| 0.002388
| 0
| 0.638173
| 0
| 0
| 0.030561
| 0
| 0.003513
| 0
| 0
| 0
| 0.183841
| 1
| 0.199649
| false
| 0.015222
| 0.008197
| 0.003513
| 0.230094
| 0.001756
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
25a32f1abb2c01196af44a83c31be5d591504608
| 1,353
|
py
|
Python
|
file_sync_tool/utility/info.py
|
jackd248/file-sync-tool
|
68fbca562f232c2bc064f546d9eade20a2ae456f
|
[
"MIT"
] | null | null | null |
file_sync_tool/utility/info.py
|
jackd248/file-sync-tool
|
68fbca562f232c2bc064f546d9eade20a2ae456f
|
[
"MIT"
] | null | null | null |
file_sync_tool/utility/info.py
|
jackd248/file-sync-tool
|
68fbca562f232c2bc064f546d9eade20a2ae456f
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: future_fstrings -*-
from db_sync_tool.utility import output
from file_sync_tool import info
def print_header(mute):
"""
Printing console header
:param mute: Boolean
:return:
"""
if mute is False:
print(output.CliFormat.BLACK + '##############################################' + output.CliFormat.ENDC)
print(output.CliFormat.BLACK + '# #' + output.CliFormat.ENDC)
print(
output.CliFormat.BLACK + '#' + output.CliFormat.ENDC + ' FILE SYNC TOOL ' + output.CliFormat.BLACK + '#' + output.CliFormat.ENDC)
print(output.CliFormat.BLACK + '# v' + info.__version__ + ' #' + output.CliFormat.ENDC)
print(output.CliFormat.BLACK + '# ' + info.__homepage__ + ' #' + output.CliFormat.ENDC)
print(output.CliFormat.BLACK + '# #' + output.CliFormat.ENDC)
print(output.CliFormat.BLACK + '##############################################' + output.CliFormat.ENDC)
def print_footer():
"""
Printing console footer
:return:
"""
_message = 'Successfully synchronized files'
output.message(
output.Subject.INFO,
_message,
True,
True
)
| 36.567568
| 169
| 0.510717
| 117
| 1,353
| 5.760684
| 0.350427
| 0.356083
| 0.237389
| 0.259644
| 0.514837
| 0.514837
| 0.514837
| 0.449555
| 0.449555
| 0.449555
| 0
| 0.00107
| 0.308943
| 1,353
| 37
| 170
| 36.567568
| 0.719786
| 0.103474
| 0
| 0.2
| 0
| 0
| 0.261538
| 0.078632
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| false
| 0
| 0.1
| 0
| 0.2
| 0.45
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
25e622333a681cf71cc870657dee7b877b8dfe7e
| 1,165
|
py
|
Python
|
iok.py
|
bangyen/i-ok
|
911439d6b38688e669a4db1b5f85d7beedae2380
|
[
"MIT"
] | null | null | null |
iok.py
|
bangyen/i-ok
|
911439d6b38688e669a4db1b5f85d7beedae2380
|
[
"MIT"
] | null | null | null |
iok.py
|
bangyen/i-ok
|
911439d6b38688e669a4db1b5f85d7beedae2380
|
[
"MIT"
] | null | null | null |
def run():
file = "main.iok"
file = open(file, "r")
script = file.read()
file.close()
script = script.split(" ")
res = 0
a = 16
for char in script:
if char == "i+":
res += 1
elif char == "i-":
res -= 1
elif char == "i*":
res *= 2
elif char == "i/":
res /= 2
elif char == "i--":
res -= 2
elif char == "i++":
res += 2
if res == a:
res = "a"
elif res == a + 1:
res = "b"
elif res == a + 2:
res = "c"
elif res == a + 3:
res = "d"
elif res == a + 4:
res = "e"
elif res == a + 5:
res = "f"
elif res == a + 6:
res = "g"
elif res == a + 7:
res = "h"
elif res == a + 8:
res = "i"
elif res >= a + 9:
res = "null"
elif res == ps: #special chars
res = "!"
elif res == ps - 1:
res = "@"
elif res == ps - 2:
res = "#"
elif res == ps - 3:
res = "$"
elif res == ps - 4:
res = "%"
elif res == ps - 5:
res = "^"
elif res == ps - 6:
res = "&"
elif res == ps - 7:
res = "*"
elif res == ps - 8:
res = "("
elif res == ps - 9:
res = ")"
elif res <= ps - 10:
res = "null"
print(res)
| 17.923077
| 32
| 0.399142
| 173
| 1,165
| 2.687861
| 0.248555
| 0.301075
| 0.212903
| 0.258065
| 0.15914
| 0.15914
| 0.15914
| 0.15914
| 0.111828
| 0.111828
| 0
| 0.041311
| 0.397425
| 1,165
| 64
| 33
| 18.203125
| 0.621083
| 0
| 0
| 0.03125
| 0
| 0
| 0.044309
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0.015625
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
25e6d0e44ab50915306042aa09f692f391b5c374
| 85
|
py
|
Python
|
application/utils/globals.py
|
topix-hackademy/social-listener
|
ce00a0ff6bd699b7941aaf92b17df378dac1633b
|
[
"MIT"
] | 12
|
2016-12-16T09:43:37.000Z
|
2022-01-30T05:49:14.000Z
|
application/utils/globals.py
|
topix-hackademy/social-listener
|
ce00a0ff6bd699b7941aaf92b17df378dac1633b
|
[
"MIT"
] | 2
|
2016-12-20T17:35:38.000Z
|
2016-12-21T09:18:02.000Z
|
application/utils/globals.py
|
topix-hackademy/social-listener
|
ce00a0ff6bd699b7941aaf92b17df378dac1633b
|
[
"MIT"
] | 3
|
2017-07-02T10:01:54.000Z
|
2021-01-03T01:58:01.000Z
|
configuration = None
def init():
global configuration
configuration = None
| 12.142857
| 24
| 0.705882
| 8
| 85
| 7.5
| 0.625
| 0.566667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.235294
| 85
| 6
| 25
| 14.166667
| 0.923077
| 0
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d302e5431ed2aa5cd6224ddb6ba47f9bd01907df
| 56
|
py
|
Python
|
behave_graph/__main__.py
|
jenmud/behave-graph
|
d2a1fc819a424de2c1df41223fb468299023c25d
|
[
"MIT"
] | 2
|
2021-04-21T23:02:10.000Z
|
2021-08-05T07:12:27.000Z
|
behave_graph/__main__.py
|
jenmud/behave-graph
|
d2a1fc819a424de2c1df41223fb468299023c25d
|
[
"MIT"
] | null | null | null |
behave_graph/__main__.py
|
jenmud/behave-graph
|
d2a1fc819a424de2c1df41223fb468299023c25d
|
[
"MIT"
] | null | null | null |
"""
Run main.
"""
from behave_graph import main
main()
| 8
| 29
| 0.660714
| 8
| 56
| 4.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178571
| 56
| 6
| 30
| 9.333333
| 0.782609
| 0.160714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d331c678aca994216f5d1dcb47142fe48db773b8
| 212
|
py
|
Python
|
GPy/mappings/__init__.py
|
strongh/GPy
|
775ce9e64c1e8f472083b8f2430134047d97b2fa
|
[
"BSD-3-Clause"
] | 1
|
2015-08-06T13:47:10.000Z
|
2015-08-06T13:47:10.000Z
|
GPy/mappings/__init__.py
|
strongh/GPy
|
775ce9e64c1e8f472083b8f2430134047d97b2fa
|
[
"BSD-3-Clause"
] | null | null | null |
GPy/mappings/__init__.py
|
strongh/GPy
|
775ce9e64c1e8f472083b8f2430134047d97b2fa
|
[
"BSD-3-Clause"
] | 1
|
2021-12-09T01:31:17.000Z
|
2021-12-09T01:31:17.000Z
|
# Copyright (c) 2013, 2014 GPy authors (see AUTHORS.txt).
# Licensed under the BSD 3-clause license (see LICENSE.txt)
from kernel import Kernel
from linear import Linear
from mlp import MLP
#from rbf import RBF
| 26.5
| 59
| 0.768868
| 35
| 212
| 4.657143
| 0.6
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.050847
| 0.165094
| 212
| 7
| 60
| 30.285714
| 0.870057
| 0.622642
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d33499f42b9fe4b998baa8b6f65e9b0519fae5f7
| 24
|
py
|
Python
|
acerezoc/conditional.py
|
acerezoc/Programming_with_python_2021
|
f6dedfb2c9e033c1a6c291a2464d179f2fe75400
|
[
"Apache-2.0"
] | null | null | null |
acerezoc/conditional.py
|
acerezoc/Programming_with_python_2021
|
f6dedfb2c9e033c1a6c291a2464d179f2fe75400
|
[
"Apache-2.0"
] | null | null | null |
acerezoc/conditional.py
|
acerezoc/Programming_with_python_2021
|
f6dedfb2c9e033c1a6c291a2464d179f2fe75400
|
[
"Apache-2.0"
] | null | null | null |
my_city_name = "Madrid"
| 24
| 24
| 0.75
| 4
| 24
| 4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 24
| 1
| 24
| 24
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0
| null | null | 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d348140644e4e2f06512f1a9d84571e30a747e3d
| 832
|
py
|
Python
|
musicscore/musicxml/types/complextypes/emptyline.py
|
alexgorji/music_score
|
b4176da52295361f3436826903485c5cb8054c5e
|
[
"MIT"
] | 2
|
2020-06-22T13:33:28.000Z
|
2020-12-30T15:09:00.000Z
|
musicscore/musicxml/types/complextypes/emptyline.py
|
alexgorji/music_score
|
b4176da52295361f3436826903485c5cb8054c5e
|
[
"MIT"
] | 37
|
2020-02-18T12:15:00.000Z
|
2021-12-13T20:01:14.000Z
|
musicscore/musicxml/types/complextypes/emptyline.py
|
alexgorji/music_score
|
b4176da52295361f3436826903485c5cb8054c5e
|
[
"MIT"
] | null | null | null |
from musicscore.musicxml.attributes.dahsedformatting import DashedFormatting
from musicscore.musicxml.attributes.linelength import LineLength
from musicscore.musicxml.attributes.lineshape import LineShape
from musicscore.musicxml.attributes.linetype import LineType
from musicscore.musicxml.attributes.placement import Placement
from musicscore.musicxml.attributes.printstyle import PrintStyle
from musicscore.musicxml.types.complextypes.complextype import Empty
class ComplexTypeEmptyLine(Empty, LineShape, LineType, LineLength, DashedFormatting, PrintStyle, Placement):
"""The empty-line type represents an empty element with line-shape, line-type, line-length, dashed-formatting,
print-style and placement attributes."""
def __init__(self, tag, *args, **kwargs):
super().__init__(tag=tag, *args, **kwargs)
| 52
| 114
| 0.81851
| 93
| 832
| 7.236559
| 0.419355
| 0.145617
| 0.228826
| 0.28529
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09976
| 832
| 15
| 115
| 55.466667
| 0.898531
| 0.174279
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1
| false
| 0
| 0.7
| 0
| 0.9
| 0.1
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d35035b3bfb8c2bd167fae919f0a0f902fa01bee
| 1,086
|
py
|
Python
|
MiscScipts/CarInfo.py
|
nevileone/CarHackingTools
|
a549ccb7a3b55e03ba157a98329b4ee72d8d89ea
|
[
"MIT"
] | 496
|
2018-07-31T06:51:05.000Z
|
2022-03-31T22:15:38.000Z
|
MiscScipts/CarInfo.py
|
pentestbr/CarHackingTools
|
a82baee3c17a54e22000eb0b06d081e85d705fba
|
[
"MIT"
] | 4
|
2018-08-26T17:58:10.000Z
|
2021-05-20T12:37:14.000Z
|
MiscScipts/CarInfo.py
|
pentestbr/CarHackingTools
|
a82baee3c17a54e22000eb0b06d081e85d705fba
|
[
"MIT"
] | 127
|
2018-08-06T16:35:41.000Z
|
2022-02-02T18:21:15.000Z
|
#!/usr/bin/env python
import sys
import time
import obd
import json
import os
if len(sys.argv) == 1:
connection = obd.OBD()
else:
connection = obd.OBD(sys.argv[1])
os.system('clear')
while True:
print 'Car Information: '
print 'Speed : ' + \
str(connection.query(obd.commands.SPEED).value.to("mph"))
print 'RPM : ' + str(connection.query(obd.commands.RPM).value)
print 'Fuel Level: ' + str(connection.query(obd.commands.FUEL_LEVEL).value)
print 'Engine Temp : ' + \
str(connection.query(obd.commands.COOLANT_TEMP).value.to("degF"))
print '\n'
print 'Diagonstic Information: '
print 'Stored DTCs: ' + str(connection.query(obd.commands.GET_DTC).value)
print 'UpTme: ' + str(connection.query(obd.commands.RUN_TIME).value)
print '\n'
print 'Weather Information:'
print 'Air Temp: ' \
+ str(connection.query(obd.commands.AMBIANT_AIR_TEMP).value.to("degF"))
print 'Barometric Pressure: ' \
+ str(connection.query(obd.commands.BAROMETRIC_PRESSURE).value)
time.sleep(5)
os.system('clear')
| 31.028571
| 79
| 0.662063
| 143
| 1,086
| 4.979021
| 0.363636
| 0.146067
| 0.202247
| 0.235955
| 0.393258
| 0.092697
| 0
| 0
| 0
| 0
| 0
| 0.003386
| 0.184162
| 1,086
| 34
| 80
| 31.941176
| 0.800226
| 0.018416
| 0
| 0.133333
| 0
| 0
| 0.166197
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.166667
| null | null | 0.433333
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
d381828768aaf1a88f807987b47953e726900742
| 567
|
py
|
Python
|
jarvis/resume/migrations/0016_auto_20170522_0534.py
|
Anubhav722/blahblah
|
160698e06a02e671ac40de3113cd37d642e72e96
|
[
"MIT"
] | 1
|
2019-01-03T06:10:04.000Z
|
2019-01-03T06:10:04.000Z
|
jarvis/resume/migrations/0016_auto_20170522_0534.py
|
Anubhav722/blahblah
|
160698e06a02e671ac40de3113cd37d642e72e96
|
[
"MIT"
] | 1
|
2021-03-31T19:11:52.000Z
|
2021-03-31T19:11:52.000Z
|
jarvis/resume/migrations/0016_auto_20170522_0534.py
|
Anubhav722/blahblah
|
160698e06a02e671ac40de3113cd37d642e72e96
|
[
"MIT"
] | null | null | null |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-22 05:34
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('resume', '0015_auto_20170512_0749'),
]
operations = [
migrations.RemoveField(
model_name='resume',
name='company',
),
migrations.RemoveField(
model_name='resume',
name='institution',
),
migrations.RemoveField(
model_name='resume',
name='location',
),
]
| 20.25
| 48
| 0.539683
| 52
| 567
| 5.769231
| 0.615385
| 0.21
| 0.26
| 0.3
| 0.4
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0.087766
| 0.336861
| 567
| 27
| 49
| 21
| 0.710106
| 0.119929
| 0
| 0.473684
| 1
| 0
| 0.147177
| 0.046371
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.052632
| 0
| 0.210526
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d38461a3a750c6f6cc1a2e21a9a751bf5aef6c40
| 59
|
py
|
Python
|
code/nikkei2019_qual_a_02.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | 3
|
2019-08-16T16:55:48.000Z
|
2021-04-11T10:21:40.000Z
|
code/nikkei2019_qual_a_02.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | null | null | null |
code/nikkei2019_qual_a_02.py
|
KoyanagiHitoshi/AtCoder
|
731892543769b5df15254e1f32b756190378d292
|
[
"MIT"
] | null | null | null |
N,A,B=map(int,input().split())
print(min(A,B),max(0,A+B-N))
| 29.5
| 30
| 0.610169
| 16
| 59
| 2.25
| 0.6875
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017241
| 0.016949
| 59
| 2
| 31
| 29.5
| 0.603448
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
d394e890c0fc652da0d0b3492e00f326734515c6
| 72
|
py
|
Python
|
tests/function/__init__.py
|
ddimatos/zhmc-ansible-modules
|
6eb29056052f499021a4bab26539872b25050640
|
[
"Apache-2.0"
] | 10
|
2017-08-10T07:40:29.000Z
|
2021-03-18T18:33:08.000Z
|
tests/function/__init__.py
|
ddimatos/zhmc-ansible-modules
|
6eb29056052f499021a4bab26539872b25050640
|
[
"Apache-2.0"
] | 439
|
2017-07-20T07:31:08.000Z
|
2022-03-27T19:59:22.000Z
|
tests/function/__init__.py
|
ddimatos/zhmc-ansible-modules
|
6eb29056052f499021a4bab26539872b25050640
|
[
"Apache-2.0"
] | 9
|
2019-03-30T08:49:40.000Z
|
2021-05-15T02:42:11.000Z
|
# this file is required to get the pytest working with relative imports
| 36
| 71
| 0.805556
| 12
| 72
| 4.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.180556
| 72
| 1
| 72
| 72
| 0.983051
| 0.958333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d395fe74a56b078a59e039da6201247ae4b71f8f
| 329
|
py
|
Python
|
analysis/swap/__init__.py
|
melaniebeck/GZExpress
|
43129239cbf6b646200ede4aebcb3a29c1cad1d4
|
[
"MIT"
] | null | null | null |
analysis/swap/__init__.py
|
melaniebeck/GZExpress
|
43129239cbf6b646200ede4aebcb3a29c1cad1d4
|
[
"MIT"
] | null | null | null |
analysis/swap/__init__.py
|
melaniebeck/GZExpress
|
43129239cbf6b646200ede4aebcb3a29c1cad1d4
|
[
"MIT"
] | null | null | null |
from logging import *
from config import *
from io import *
from bureau import *
from agent import *
from collection import *
from storage import *
from subject import *
from toydb import *
from mongodb import *
from shannon import *
from mysqldb import *
from mysqldb_ML import *
from subject_ML import *
from agent_ML import *
| 20.5625
| 24
| 0.772036
| 48
| 329
| 5.229167
| 0.3125
| 0.557769
| 0.119522
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182371
| 329
| 15
| 25
| 21.933333
| 0.933086
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d3abaa52eb536d609be589e46aaa852f310217a7
| 94
|
py
|
Python
|
sequence/test/side_effects/__init__.py
|
ritchie46/clickstream
|
79c669d0636521db2697e5fa583628d1920cc6c1
|
[
"MIT"
] | 8
|
2020-01-27T14:43:02.000Z
|
2021-08-24T19:26:30.000Z
|
sequence/test/side_effects/__init__.py
|
ritchie46/clickstream
|
79c669d0636521db2697e5fa583628d1920cc6c1
|
[
"MIT"
] | 4
|
2020-07-16T14:27:11.000Z
|
2021-01-27T08:28:20.000Z
|
sequence/test/side_effects/__init__.py
|
ritchie46/clickstream
|
79c669d0636521db2697e5fa583628d1920cc6c1
|
[
"MIT"
] | 6
|
2020-07-16T12:14:49.000Z
|
2021-05-17T08:18:42.000Z
|
# Tests in these module have side effects.
# They download data or make artifact directories.
| 31.333333
| 50
| 0.787234
| 14
| 94
| 5.285714
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.170213
| 94
| 2
| 51
| 47
| 0.948718
| 0.946809
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
6cb55a069910bb0711a7afbaac8a28c24f0b2d7b
| 62
|
py
|
Python
|
file_handler/manage.py
|
merwane/shield
|
067d4ed9c84946479c200c0f7bcf47f7bfce3b80
|
[
"MIT"
] | null | null | null |
file_handler/manage.py
|
merwane/shield
|
067d4ed9c84946479c200c0f7bcf47f7bfce3b80
|
[
"MIT"
] | null | null | null |
file_handler/manage.py
|
merwane/shield
|
067d4ed9c84946479c200c0f7bcf47f7bfce3b80
|
[
"MIT"
] | null | null | null |
import os
def delete_file(filename):
os.remove(filename)
| 12.4
| 26
| 0.741935
| 9
| 62
| 5
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16129
| 62
| 4
| 27
| 15.5
| 0.865385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6cc920c7effb33cf26fabf3b0d402dd0df29447c
| 225
|
py
|
Python
|
tests/conftest.py
|
joar/disk-usage-exporter
|
cb23ced094f3410d15e4ad99d1006acf65812123
|
[
"BSD-2-Clause"
] | 9
|
2017-10-20T21:27:30.000Z
|
2021-05-27T13:54:57.000Z
|
tests/conftest.py
|
joar/disk-usage-exporter
|
cb23ced094f3410d15e4ad99d1006acf65812123
|
[
"BSD-2-Clause"
] | 3
|
2017-08-15T18:43:46.000Z
|
2020-09-30T08:43:35.000Z
|
tests/conftest.py
|
joar/disk-usage-exporter
|
cb23ced094f3410d15e4ad99d1006acf65812123
|
[
"BSD-2-Clause"
] | 2
|
2018-01-19T17:48:08.000Z
|
2019-03-28T08:45:25.000Z
|
import logging
import pytest
from disk_usage_exporter import logging as _logging
@pytest.fixture(scope='session', autouse=True)
def configure_logging():
_logging.configure_logging(for_humans=True, level=logging.DEBUG)
| 22.5
| 68
| 0.813333
| 30
| 225
| 5.866667
| 0.633333
| 0.147727
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102222
| 225
| 9
| 69
| 25
| 0.871287
| 0
| 0
| 0
| 0
| 0
| 0.031111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| true
| 0
| 0.5
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
6cd3fc6b6fc9327449607d5e067b0541aa367dac
| 268
|
py
|
Python
|
Selenium/Opencart_login_page/test_alert.py
|
BahrmaLe/otus_python_homework
|
510a4f1971b35048d760fcc45098e511b81bea31
|
[
"MIT"
] | 1
|
2021-02-25T15:37:21.000Z
|
2021-02-25T15:37:21.000Z
|
Selenium/Opencart_login_page/test_alert.py
|
BahrmaLe/otus_python_homework
|
510a4f1971b35048d760fcc45098e511b81bea31
|
[
"MIT"
] | null | null | null |
Selenium/Opencart_login_page/test_alert.py
|
BahrmaLe/otus_python_homework
|
510a4f1971b35048d760fcc45098e511b81bea31
|
[
"MIT"
] | null | null | null |
def test_alert_message(alert_message):
"""Use this for check message in different cases:Incorrectly username/password, only username, only password by
parameters """
print(alert_message)
assert 'No match for Username and/or Password.' in alert_message
| 44.666667
| 115
| 0.764925
| 37
| 268
| 5.405405
| 0.621622
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164179
| 268
| 5
| 116
| 53.6
| 0.892857
| 0.44403
| 0
| 0
| 0
| 0
| 0.275362
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 1
| 0.333333
| false
| 0.333333
| 0
| 0
| 0.333333
| 0.333333
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
6cdacc1255714d00aad79e85b4d5b879a38916da
| 140
|
py
|
Python
|
example_django_project/example_django_project/serialization.py
|
rennat/django_delta_logger
|
5bb2a2edd8258e9c146a515886b2bf0e0df00365
|
[
"MIT"
] | null | null | null |
example_django_project/example_django_project/serialization.py
|
rennat/django_delta_logger
|
5bb2a2edd8258e9c146a515886b2bf0e0df00365
|
[
"MIT"
] | null | null | null |
example_django_project/example_django_project/serialization.py
|
rennat/django_delta_logger
|
5bb2a2edd8258e9c146a515886b2bf0e0df00365
|
[
"MIT"
] | null | null | null |
from django.conf import settings
from django.utils.module_loading import import_string
JsonEncoder = import_string(settings.JSON_ENCODER)
| 23.333333
| 53
| 0.857143
| 19
| 140
| 6.105263
| 0.631579
| 0.172414
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092857
| 140
| 5
| 54
| 28
| 0.913386
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9f036a872be537cfa1f0de478083e9abe045c894
| 64
|
py
|
Python
|
3-9 guests.py
|
Holaplace/path_to_python
|
8fae2aca8d6da04c39a67514948fdf50e883750a
|
[
"MIT"
] | 1
|
2019-02-06T01:49:18.000Z
|
2019-02-06T01:49:18.000Z
|
3-9 guests.py
|
Holaplace/path_to_python
|
8fae2aca8d6da04c39a67514948fdf50e883750a
|
[
"MIT"
] | null | null | null |
3-9 guests.py
|
Holaplace/path_to_python
|
8fae2aca8d6da04c39a67514948fdf50e883750a
|
[
"MIT"
] | null | null | null |
name_list = ['Amy','Bob','Candy','Ellen']
print(len(name_list))
| 32
| 42
| 0.65625
| 10
| 64
| 4
| 0.8
| 0.4
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0625
| 64
| 2
| 43
| 32
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0.25
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
9f1c1bd35f81aa694adee9c43675c66f39bb89b8
| 5,556
|
py
|
Python
|
codango/userprofile/tests/test_routes.py
|
NdagiStanley/silver-happiness
|
67fb6dd4047c603a84276f88a021d4489cf3b41e
|
[
"MIT"
] | 2
|
2019-10-17T01:03:12.000Z
|
2021-11-24T07:43:14.000Z
|
codango/userprofile/tests/test_routes.py
|
NdagiStanley/silver-happiness
|
67fb6dd4047c603a84276f88a021d4489cf3b41e
|
[
"MIT"
] | 49
|
2019-09-05T02:48:04.000Z
|
2021-06-28T02:29:42.000Z
|
codango/userprofile/tests/test_routes.py
|
NdagiStanley/silver-happiness
|
67fb6dd4047c603a84276f88a021d4489cf3b41e
|
[
"MIT"
] | 1
|
2019-04-10T19:40:28.000Z
|
2019-04-10T19:40:28.000Z
|
from django.test import TestCase, Client
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
class ProfileViewTestCase(TestCase):
def setUp(self):
self.client = Client()
self.user = User.objects.create_user(
username='lade',
password='password'
)
self.user.set_password('password')
self.user.save()
self.login = self.client.login(
username='lade', password='password')
def test_can_reach_profile_page(self):
response = self.client.get('/user/lade')
self.assertEqual(response.status_code, 200)
def test_can_reach_profile_edit_page(self):
response = self.client.post(
'/user/lade/edit',
{'position': 'Software Developer',
'place_of_work': 'Andela',
'first_name': 'Lade',
'last_name': 'Oshodi',
'about': 'I love to Code'})
self.assertEqual(response.status_code, 302)
class FollowViewTestCase(TestCase):
def setUp(self):
self.client = Client()
self.user1 = User.objects.create_user(
username='golden', password='abiodun')
self.user2 = User.objects.create_user(
username='jubril', password='issa')
self.user1.save()
self.user2.save()
self.login = self.client.login(username='golden', password='abiodun')
def test_can_reach_followers_page(self):
response = self.client.get('/user/golden/followers')
self.assertEqual(response.status_code, 200)
def test_can_reach_following_page(self):
response = self.client.get('/user/golden/following')
self.assertEqual(response.status_code, 200)
class FollowUserProfileTest(TestCase):
def setUp(self):
self.client = Client()
self.user1 = User.objects.create_user(
username='golden', password='abiodun')
self.user2 = User.objects.create_user(
username='jubril', password='issa')
self.user1.save()
self.user2.save()
self.login = self.client.login(username='golden', password='abiodun')
def test_a_logged_in_user_can_follow_a_registered_user(self):
response = self.client.post('/user/golden/follow')
self.assertEqual(response.status_code, 200)
class SettingsViewTest(TestCase):
def setUp(self):
self.client = Client()
self.user = User.objects.create_user(
username='test', password='test')
self.user.save()
self.login = self.client.login(username='test', password='test')
def test_can_reach_settings_page(self):
response = self.client.get(
reverse(
'settings',
kwargs={'username': self.user.username}
))
self.assertEqual(response.status_code, 200)
def test_can_change_password(self):
response = self.client.post(
reverse(
'settings',
kwargs={'username': self.user.username}
), {
'new_password': 'tester',
'verify_new_password': 'tester'
}
)
# redirect with success message
self.assertEqual(response.status_code, 302)
def test_can_change_password_error(self):
response = self.client.post(
reverse(
'settings',
kwargs={'username': self.user.username}
), {
'new_password': 'tester',
'verify_new_password': 'tester1'
}
)
# redirects with error message
self.assertEqual(response.status_code, 302)
def test_can_change_password_special_character_error(self):
response = self.client.post(
reverse(
'settings',
kwargs={'username': self.user.username}
), {
'new_password': '??',
'verify_new_password': '??'
}
)
# redirects with error message
self.assertEqual(response.status_code, 302)
def test_can_change_username(self):
response = self.client.post(
reverse(
'settings',
kwargs={'username': self.user.username}
), {
'new_username': 'tested'
}
)
# redirects with success message
self.assertEqual(response.status_code, 302)
def test_can_change_username_null_error(self):
response = self.client.post(
reverse(
'settings',
kwargs={'username': self.user.username}
), {
'new_username': ''
}
)
# redirects with error message
self.assertEqual(response.status_code, 302)
def test_can_change_username_special_characters_error(self):
response = self.client.post(
reverse(
'settings',
kwargs={'username': self.user.username}
), {
'new_username': '??'
}
)
# redirects with error message
self.assertEqual(response.status_code, 302)
def test_can_set_frequency(self):
response = self.client.post(
reverse(
'settings',
kwargs={'username': self.user.username}
), {
'frequency': 'daily'
}
)
# redirects with success message
self.assertEqual(response.status_code, 302)
| 31.748571
| 77
| 0.569114
| 547
| 5,556
| 5.605119
| 0.164534
| 0.068493
| 0.067841
| 0.093281
| 0.798761
| 0.783431
| 0.742661
| 0.690476
| 0.665036
| 0.621331
| 0
| 0.012682
| 0.318755
| 5,556
| 174
| 78
| 31.931034
| 0.797358
| 0.037257
| 0
| 0.56338
| 0
| 0
| 0.114024
| 0.008238
| 0
| 0
| 0
| 0
| 0.091549
| 1
| 0.119718
| false
| 0.140845
| 0.021127
| 0
| 0.169014
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
9f6eb3b9df84234d0f6c3be136c8e8e46a4f6a56
| 292
|
py
|
Python
|
lovage/utils.py
|
CloudSnorkel/lovage
|
6596fc2fd7fad6ae5b50c1fb55d299d8fc17278d
|
[
"MIT"
] | 8
|
2020-01-25T21:40:26.000Z
|
2020-06-12T16:32:50.000Z
|
lovage/utils.py
|
CloudSnorkel/lovage
|
6596fc2fd7fad6ae5b50c1fb55d299d8fc17278d
|
[
"MIT"
] | 3
|
2020-04-29T04:55:32.000Z
|
2021-04-25T05:02:18.000Z
|
lovage/utils.py
|
CloudSnorkel/lovage
|
6596fc2fd7fad6ae5b50c1fb55d299d8fc17278d
|
[
"MIT"
] | null | null | null |
import os
def is_in_cloud():
"""
Checks if this code is running in a deployed Lovage stack. Useful when you have to initialize global variables
only in deployed code.
:return: True if running in AWS/GCP/Azure/etc.
"""
return os.getenv("LOVAGE_IN_CLOUD", "0") == "1"
| 26.545455
| 114
| 0.674658
| 46
| 292
| 4.195652
| 0.717391
| 0.072539
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00885
| 0.226027
| 292
| 10
| 115
| 29.2
| 0.845133
| 0.616438
| 0
| 0
| 0
| 0
| 0.193182
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| true
| 0
| 0.333333
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9f87a8a2bfda4be87466e9593c38dcf6ce71e656
| 154,116
|
py
|
Python
|
pybandit/optproblems/cec2005/unimodal.py
|
chunjenpeng/pyBandit
|
df14bf0cc263d8fa0ad0a539e94327ac35e33d1c
|
[
"MIT"
] | 1
|
2018-07-12T08:30:44.000Z
|
2018-07-12T08:30:44.000Z
|
pybandit/optproblems/cec2005/unimodal.py
|
PENGChunJen/pyBandit
|
df14bf0cc263d8fa0ad0a539e94327ac35e33d1c
|
[
"MIT"
] | null | null | null |
pybandit/optproblems/cec2005/unimodal.py
|
PENGChunJen/pyBandit
|
df14bf0cc263d8fa0ad0a539e94327ac35e33d1c
|
[
"MIT"
] | null | null | null |
import random
import math
import numpy as np
from optproblems.base import Individual, BoundConstraintsChecker, TestProblem
from optproblems.continuous import doublesum, EllipsoidFunction, sphere
class F1(TestProblem):
"""Shifted sphere."""
bias = -450.0
offsets = [-39.3119, 58.8999, -46.3224, -74.6515, -16.7997, -80.5441,
-10.5935, 24.9694, 89.8384, 9.1119, -10.7443, -27.8558, -12.5806,
7.593, 74.8127, 68.4959, -53.4293, 78.8544, -68.5957, 63.7432,
31.347, -37.5016, 33.8929, -88.8045, -78.7719, -66.4944, 44.1972,
18.3836, 26.5212, 84.4723, 39.1769, -61.4863, -25.6038, -81.1829,
58.6958, -30.8386, -72.6725, 89.9257, -15.1934, -4.3337, 5.343,
10.5603, -77.7268, 52.0859, 40.3944, 88.3328, -55.8306, 1.3181,
36.025, -69.9271, -8.6279, -56.8944, 85.1296, 17.6736, 6.1529,
-17.6957, -58.9537, 30.3564, 15.9207, -18.0082, 80.6411,
-42.3912, 76.2776, -50.1652, -73.5736, 28.3369, -57.9905,
-22.7327, 52.0269, 39.2599, 10.8679, 77.8207, 66.0395, -50.0667,
55.7063, 73.7141, 38.5296, -56.7865, -89.6477, 37.9576, 29.472,
-35.4641, -31.7868, 77.3235, 54.7906, -48.2794, 74.2714, 72.6103,
62.964, -14.1446, 20.4923, 46.5897, -83.6021, -46.4809, 83.7373,
-79.6611, 24.3479, -17.2303, 72.3404, -36.4022]
def __init__(self, num_variables, phenome_preprocessor=None, **kwargs):
self.is_deterministic = True
self.do_maximize = False
self.num_variables = num_variables
self.min_bounds = [-100.0] * num_variables
self.max_bounds = [100.0] * num_variables
bounds = (self.min_bounds, self.max_bounds)
preprocessor = BoundConstraintsChecker(bounds, phenome_preprocessor)
TestProblem.__init__(self, self.objective_function,
phenome_preprocessor=preprocessor,
**kwargs)
def objective_function(self, phenome):
phenome = [phene - offset for offset, phene in zip(self.offsets, phenome)]
assert len(phenome) == self.num_variables
obj_value = sphere(phenome) + self.bias
return obj_value
def get_optimal_solutions(self, max_number=None):
return [Individual(self.offsets[:self.num_variables])]
class F2(TestProblem):
"""Shifted double-sum."""
bias = -450.0
offsets = [35.6267, -82.9123, -10.6423, -83.5815, 83.1552, 47.048, -89.4359,
-27.4219, 76.1448, -39.0595, 48.8857, -3.9828, -71.9243, 64.1947,
-47.7338, -5.9896, -26.2828, -59.1811, 14.6028, -85.478,
-50.4901, 0.924, 32.3978, 30.2388, -85.0949, 60.1197, -36.2183,
-8.5883, -5.1971, 81.5531, -23.4316, -25.3505, -41.2485, 8.8018,
-24.2222, -87.9807, 78.0473, -48.0528, 14.0177, -36.6405,
12.2168, 18.1449, -64.5647, -84.8493, -76.6088, -1.7042,
-36.0761, 37.0336, 18.4431, -64.359, -39.3692, -17.714, 30.1985,
-18.5483, 9.6866, 82.6009, -45.5256, 5.1443, 74.204, 66.8103,
-63.4704, 13.0329, -5.6878, 29.5271, -0.4353, -26.1652, -6.6847,
-80.2291, -29.5815, 82.0422, 77.177, -11.277, 32.0759, -2.6858,
81.5096, 64.077, -26.1294, -84.782, -62.8768, -37.6355, 76.8916,
53.417, -25.3311, -38.0702, -84.1738, -11.2246, -83.4619,
-17.5508, -36.5285, 89.5528, 25.8794, 68.6252, 55.7968, -29.5975,
-58.0976, 65.7413, -8.8703, -5.3281, 74.0661, 4.0338]
def __init__(self, num_variables, phenome_preprocessor=None, **kwargs):
self.is_deterministic = True
self.do_maximize = False
self.num_variables = num_variables
self.min_bounds = [-100.0] * num_variables
self.max_bounds = [100.0] * num_variables
bounds = (self.min_bounds, self.max_bounds)
preprocessor = BoundConstraintsChecker(bounds, phenome_preprocessor)
TestProblem.__init__(self, self.objective_function,
phenome_preprocessor=preprocessor,
**kwargs)
def objective_function(self, phenome):
phenome = [phene - offset for offset, phene in zip(self.offsets, phenome)]
assert len(phenome) == self.num_variables
obj_value = doublesum(phenome) + self.bias
return obj_value
def get_optimal_solutions(self, max_number=None):
return [Individual(self.offsets[:self.num_variables])]
class F3(TestProblem):
"""Shifted rotated high conditioned elliptic function."""
bias = -450.0
offsets = [-32.2013, 64.9776, -38.3, -23.2582, -54.0088, 86.6286, -6.3009,
-49.3644, 5.3499, 52.2418, -13.3643, 73.1263, -8.5691, -20.4915,
-60.1487, 16.0884, -78.3319, 70.0387, -6.8521, -64.797, 65.4005,
-26.0233, -33.8757, 51.5893, 27.6427, -69.4485, 25.5123,
-59.0782, -66.5481, -51.2733, -81.776, -71.6572, 37.081,
-63.4248, -64.7785, 31.5299, 18.5387, 9.8342, -0.6037, 1.7346,
70.1605, -82.0391, -42.7368, -83.593, -85.0255, 41.1773, 4.1649,
-13.4505, -0.31, -38.7944, 71.2702, 65.532, 8.7753, -55.4691,
-20.6252, 22.2901, 13.6798, 65.6745, 75.8418, 27.8926, -15.0616,
-17.3036, 57.9346, -86.6326, 65.0596, 47.3884, 29.166, 65.5435,
3.4643, -39.814, 18.2261, 77.0446, 62.1882, -11.4, -10.6218,
70.1276, -40.8673, -24.4451, 52.1398, -10.5136, 29.2399, 2.1705,
44.0863, 81.7943, 80.0466, 88.3266, 16.6098, -50.2573, -71.6993,
71.5368, 61.4273, -3.6739, 77.9428, -22.3294, 64.7634, -74.2823,
14.1899, 37.8473, -77.7129, 28.9959]
matrix2D = np.array([[-0.9838884637416794, 0.17878336308515416],
[0.1787833630851541, 0.9838884637416795]])
matrix10D = np.array([[0.17830682721057345, 0.05578633058716659, 0.4759190557666973, 0.24551129863391566, 0.31998625926387086, 0.3210200144836385, 0.027787561319902176, 0.2666400104677562, 0.41568009651337917, -0.47771934552669726],
[0.6351636285946867, 0.05009142383664624, 0.20110601384121973, -0.6807688241663351, -0.049934546553907944, -0.04639942342458296, -0.19460194646748039, 0.18961539926194687, -0.019416259626804547, 0.10639981029473855],
[0.32762147366023187, 0.36016598714114556, -0.2363565509404495, -0.01856685401744485, -0.24479096747593634, 0.44818973341886903, 0.5351863573361957, -0.3120692519053052, -0.13863719921728737, -0.20713981146209595],
[-0.06478321058798428, -0.49424101683695937, 0.13101175297435969, 0.03161517193119454, -0.1750610791487186, 0.6890803934491838, 0.010544234469094992, 0.21948984793273507, -0.16468539805844565, 0.3904855051851341],
[-0.2764804478537137, 0.1138311450612022, -0.30818401502810994, -0.3595940710443874, 0.2644625803470219, 0.0286167883791575, 0.47528027904995646, 0.4099399404977017, 0.4113104336891543, 0.2289934518888688],
[0.15454249061641606, 0.54899186274158, -0.1838202994179226, 0.3394446190390916, 0.285961887742557, 0.12833167642713417, -0.25495080172376317, 0.394607523020371, -0.3452464027000741, 0.2959031832336851],
[-0.05190797769001451, -0.1445075780970033, -0.46086919626114314, -0.05368796481836808, -0.36317793499109247, 0.027439997038558633, -0.21422629652542946, 0.5054514889308478, -0.09806471701908984, -0.5634699101856451],
[0.5014298935446065, -0.5313365904845752, -0.37294385871521135, 0.2337086643138151, 0.4432753766248853, -0.16972740381143742, 0.2036414896333169, -0.023717523924336927, -0.07180545586295492, -0.007333217845033976],
[0.10441248047680891, 0.04306422614936954, -0.41675972625940993, 0.016522876074361707, 0.0017437281849141879, 0.2959494487903076, -0.5119748773936874, -0.3267981976235789, 0.5825310659093351, 0.13204141339826148],
[-0.2964590765763169, -0.031303011496605505, -0.0780091540821166, -0.41548534874482024, 0.5695940357244347, 0.2909519840034815, -0.18560717510075503, -0.24653488847859115, -0.3714902508547979, -0.30015617693118707]])
matrix30D = np.array([[0.10164957261764876, 0.28907203592317565, -0.28676502138024335, 0.1218656189849876, 0.005564508600170918, -0.22303152232011716, -0.1947278015668383, -0.1187111843571265, 0.13820926976639555, -0.03782856975350359, 0.3145503195435482, 0.04487983403959616, 0.12570115974584642, 0.21140455372781417, -0.39649477833532365, 0.21679987185764366, 0.1734433978156879, 0.05205633230714463, -0.2286556716275806, -0.1724263688476806, -0.018765349832665177, -0.2450977619662135, -0.042909543123452715, 0.08520392393757856, -0.0028073675525156255, -0.2694346492544198, 0.204261606401297, -0.07730857500700167, 0.12110828066102342, -0.04171193079104835],
[-0.06356688128738831, -0.06366532526403493, -0.09861259546241607, -0.10014364585581643, -0.14493349141275022, -0.041766780198875544, 0.36929813921174637, 0.11774688957741393, 0.19505102110413464, 0.10671307555259535, 0.1088859352715337, -0.22768051668524378, 0.019400190759083166, -0.1133194666552539, -0.08575427185145576, 0.1868394788471477, -0.2154077357793683, -0.27527136459375956, -0.24996069817518474, -0.043423348482698, 0.21024671926158417, 0.0006398686130767, 0.39221941156458107, 0.11354160173324693, -0.376237262492889, 0.011874606989760618, -0.10259435399326221, 0.17356454384129819, 0.10525158160810666, -0.1991314037147829],
[0.1716067566418046, -0.039406430050305384, 0.11335061164399883, -0.4007898331836075, 0.0025266241235494162, -0.00865890279827147, 0.1396817679586794, 0.05395086229230797, 0.453574017608888, 0.27416554845722513, -0.20120102931824305, 0.10786018168385161, 0.11215507852777834, -0.08522175632536345, -0.036565694622393584, 0.07681600872811145, 0.08386159939400979, 0.25854807960750176, -0.010666415655920922, -0.05266368870433495, 0.046050815312167294, -0.2874335398245715, -0.022690225101958856, -0.036380368816751676, 0.28497320149377114, 0.20056353219635795, 0.27387241616454305, 0.20574639118739677, -0.07649882043529228, -0.07038372924617202],
[0.2775954381088784, 0.03720353496167518, 0.01886152913696575, -0.2621111205488722, 0.49253846010095254, 0.10261612034343869, 0.22224353035271752, 0.2319628589073994, -0.1643220295757958, -0.2509741577638973, 0.30930716388123813, -0.13324284074970702, -0.07505331839007812, 0.04315272602362225, -0.20505081318573026, -0.007245074369464138, -0.03476662397080396, -0.1603320333170557, 0.08740311868819384, -0.1010145017960481, -0.03696687551134546, -0.015208663498307698, 0.0032052127606547872, -0.14309051818892518, 0.2689989534380106, -0.021838249567058324, -0.1580018044174444, 0.009339956251623809, -0.19639985053639275, -0.1996604797546255],
[0.09871960697666698, -0.2267964611200932, -0.25254146449215054, 0.05280126298394851, -0.1933448392228727, 0.21559967509050282, 0.29372216194092204, -0.1611901846261491, 0.15819279073280304, 0.08625079760905448, 0.11385968059614064, -0.27752413275486176, 0.18174263574348862, 0.2523333098544508, 0.038988626915871225, -0.08929704696802197, 0.16819065608949466, 0.27870318713320774, 0.23598261494637288, 0.2449714908714476, -0.1932522476640285, 0.018121744120277616, 0.002403366684444846, -0.14803728856015086, 0.06941494521425752, -0.27338951414303636, -0.23466893106435363, 0.003976031572932356, 0.13804596199533947, -0.11192640635625034],
[0.013549989414998383, -0.15897918291945926, -0.2576996867333399, -0.1784741533120154, 0.10885546020927407, -0.02183302426781088, 0.011850247261564915, -0.4127826328926849, 0.020744877014688398, -0.21183337363018903, -0.09655020970752953, 0.45390162748620316, -0.24632751256734814, -0.02967255646941305, 0.025745054803161548, 0.008597760929578901, -0.4171224385941253, 0.12446362871527113, -0.061058126254324656, 0.14976678374594685, 0.03424716176167472, 0.024894537273179276, 0.10477176440902719, -0.14765843280100496, -0.026208389465230564, -0.21326752653532252, 0.08590846352226907, -0.021833389903042136, -0.008177048146396568, -0.25723522049513087],
[0.18507347206915797, 0.15758035573018975, 0.032477251416465375, 0.4513071535613241, 0.19946842670449538, 0.37564752754982783, 0.1214312485110197, -0.19712551151710206, -0.13251075393884892, -0.14209059076039393, -0.2882611491007309, -0.18497202703143684, 0.1268081208097443, -0.18806334431661748, 0.03705938920470933, 0.08334864078395424, -0.027389917097839694, -0.023383972318880147, -0.10674018659465959, 0.07779746056373545, -0.01173616083176247, -0.22937486599785303, 0.0688547189862504, 0.0628942659530501, 0.08653140694309171, 0.16356035494155557, 0.23597247253073309, -0.0028318894910640846, 0.21650296150916884, -0.26430986667164025],
[0.13594932566906506, 0.3074191368514748, -0.15350247009863083, -0.14464531358364677, 0.04569261220518883, -0.05189948196742329, -0.05023133376759738, -0.26647001189789654, -0.00302927455868819, 0.1414678206033217, -0.14946656543309728, -0.13255052878573606, 0.254605021271442, 0.24464274994716803, 0.05335814642380131, -0.4806845568085278, -0.10429863563017264, -0.044814506124222976, -0.19163684292503938, -0.04257621258985102, 0.2755575497651694, 0.2672161378422087, 0.06221164286156204, 0.2569063146581813, 0.1622822489440353, 0.08913301921926425, -0.1249001362000181, -0.038948084012320354, -0.1427961021242354, -0.07269754815671875],
[0.03906726157411894, -0.3037293537719967, -0.17810842626246476, 0.04551997284638125, -0.0475207899802671, 0.17515992233757294, -0.011875763424877415, 0.10366344641108381, -0.012206184268571521, 0.2808511082903948, 0.31488849823259546, -0.008302221147605102, -0.09358833954572465, -0.2773088560924207, 0.0722588515120634, -0.02523184139648953, -0.23915419607575888, 0.01580488647934725, -0.3394620056100733, 0.03470271487542195, -0.11175215790045064, -0.010080015898204227, -0.24868686049393682, 0.36285510582611696, 0.306165344066221, 0.017401570953453942, -0.0029360361797943135, -0.28626680055921755, 0.028433878851802184, 0.045232477160892424],
[-0.26023600115933015, -0.21499575729520948, 0.1400048219411101, -0.09209391350394246, 0.19762492844673585, -0.1160680960363133, -0.1434911020093422, -0.24003309876225815, -0.03076489776643003, -0.15151291610765563, 0.1348069540937481, -0.10061335421716092, 0.15837154489540492, 0.019952736779194315, -0.18012745424870008, 0.01279656937980069, 0.08468879502374074, 0.23027670832848535, -0.3435080486516305, 0.23464834876862828, -0.06202851577285202, -0.14119879636686303, 0.23594051722401366, -0.13255055751508624, 0.04088273372406207, 0.4212886268641687, -0.2766448363731282, -0.07165403009795077, 0.08322672312454074, 0.1375581333515522],
[-0.11453132803044509, 0.0005016103467944411, 0.06333082983936206, -0.190127227640041, 0.03199469160152175, 0.037475410260706395, -0.10651833891466217, 0.2586572448986541, -0.25243252362585583, 0.1818138537310842, 0.05982141932356695, -0.03827781356067774, 0.3251954662837682, 0.11502545808617184, 0.10909906763059674, -0.06221718876058416, -0.22015238873256468, 0.11693860325273177, 0.07170143938917405, 0.06353150239828748, 0.3285670598500912, -0.25477116399848937, -0.1137288063660733, -0.2803643931188687, -0.19616703427550175, -0.06479602378440377, 0.14803341992172783, -0.39103954522623335, 0.18421575628361483, -0.20567728172193261],
[-0.30659016189985566, 0.13312718600651358, -0.08903401020698419, -0.26771359515466603, 0.30206030171609105, -0.07760238932793143, -0.015530031921647092, -0.1053433173399142, -0.12306870860450268, 0.03887631912384898, -0.057248130601958505, -0.07901605313688591, 0.0668144887425574, -0.10461884702108182, 0.41576604583960663, 0.35093232220868503, 0.2746140185508066, 0.006127619227398179, -0.07501588089849591, 0.09983092779737897, 0.02525310705863986, -0.005485543132883931, -0.2397536368923103, 0.245111971309485, 0.017417557421154497, -0.22523540216036722, -0.16543629204672444, 0.19938153032978617, 0.07670402454959387, -0.1707781703667471],
[0.006689533991120046, -0.030659953050316126, 0.10272965845804866, -0.06721648766793795, 0.14210487621784515, 0.1355886412891005, -0.011894510681984643, -0.12056119870765801, -0.0020096507361536207, 0.25051991430019005, 0.053355200123323884, 0.10019225153719218, 0.4015622771308912, 0.17081089509279365, -2.6119138618403325e-05, 0.2672923120943625, -0.13258462573464175, -0.3126419986029899, -0.10852024420513201, 0.0854968851463823, -0.38834820528282776, 0.41292322461932435, 0.0063405624124030216, -0.2106430730674752, -0.02910727101394996, 0.009332353221005443, 0.28247031266947714, 0.03171318701282695, -0.03942522499589698, 0.09869812010307308],
[-0.3260660043651632, -0.06853195731760066, 0.04554446822403763, -0.11555168208661482, -0.17825174102936656, 0.05871209551117389, -0.11765576068605013, -0.19746247788481788, -0.16204447647757614, 0.079117267317619, 0.2750498617494267, -0.1581581983694536, -0.13278630206979702, -0.15796297078398455, -0.06808686684726778, -0.3712864017036526, 0.24920682322750803, -0.22500859368947737, 0.036929236094847336, 0.07940052830938431, -0.05044498730149946, -0.08006463613957981, 0.1047415815056818, -0.08204999381930998, 0.0974309100049117, -0.044897124011706036, 0.41381288616302425, 0.1961680257619389, -0.11894214294232994, -0.29121555285078454],
[-0.03374360023766475, -0.039881061790095325, -0.09792181375516726, 0.06863479065354666, 0.3395842706518788, 0.05714479700355888, -0.0911782130051627, -0.20044401863158703, 0.40432500907917257, 0.18809302975576175, 0.12077786335462118, 0.038280318129714316, -0.17521362545123614, 0.12450303785453637, 0.2856748653621252, -0.05573720949136751, 0.11466442561705872, -0.35885530134843846, 0.28373847564034077, -0.08629316234503127, 0.0031540189437001685, -0.24461095883440617, 0.16002934713033515, 0.015339169328660411, -0.1075616664377728, 0.1525273789423709, -0.04889714347341972, -0.336329439262963, 0.018316757659536213, 0.06182989319898719],
[0.14240466715456365, 0.15321457769660388, 0.37285641983131007, -0.1570967543312308, 0.21981357096489298, 0.07514334794736817, -0.2284877619182089, 0.01714165231048845, 0.13215246272666265, 0.08292559321432781, 0.06504573770111124, -0.21087097725917006, -0.19185388072821907, -0.06359297493233657, -0.11947725369276378, -0.10561979878742121, -0.18288882151273664, 0.15135418938215822, 0.10826355082329937, 0.32237181825723915, -0.04194545141862241, 0.07307412581521902, 0.19921301547571402, 0.24798156337561747, -0.08376938149158719, -0.3387612275872482, 0.1023734890135393, 0.05908728748477116, 0.3016341077486798, 0.19936630448367115],
[-0.020694916791897004, -0.07944697259110753, 0.08048592896466096, 0.25362252509829203, 0.09791435814140367, -0.19941627515551485, -0.06248136911318807, 0.09004818729689022, 0.047491466802618267, 0.20719020857347664, -0.08348172160319763, 0.03686344936894379, 0.031196842419712864, -0.2682155810599555, -0.021514495727349932, 0.15227077446092127, 0.23222531207789465, 0.10479941207418143, -0.0001491910378031755, -0.014117832287631294, 0.23854539677645265, 0.3242745514048472, 0.41029197491955305, -0.17292072214480383, 0.3222683108411213, -0.2556994832218574, -0.03781754758268757, -0.2707052167722046, -0.10379129395551044, -0.17573957645103017],
[-0.18605460547463779, 0.25057635463170563, 0.006761729421830952, -0.03002742798534898, -0.0906983516624831, -0.01086111465067783, 0.3466793860849267, -0.07682037436277776, 0.051795188478884625, -0.14409782286993017, 0.12304688755604394, -0.23778574893246746, -0.301659094813294, 0.21241680363756868, 0.0849027994478177, 0.26136020343724486, -0.027256101625377265, 0.15920276021915677, -0.005789509652101111, 0.22819303431099655, 0.20150668235139793, 0.18442046276866697, -0.06757870156923138, -0.007779634101181586, 0.10202752769307531, 0.17086491478664886, 0.3485715522838689, -0.29048194696238494, -0.17725434398512266, 0.1615758013298807],
[-0.33330180733706594, 0.0939206948762525, -0.10888451131033554, 0.2821805067660851, 0.3374348277643299, -0.27984333600756145, 0.24412147571491902, 0.17486113420742802, 0.1214913683178583, 0.2770188399139099, -0.22394849868648964, -0.028510431226916117, -0.11802827287860457, 0.023800046077563572, -0.2721862063209091, -0.2567039239372421, -0.1434977653278118, -0.03148335113170741, -0.06739983333460163, 0.22633940659978288, -0.14400590013832085, -0.06449333263849208, -0.2700692189111661, -0.1389346106574317, -0.02190877868697272, -0.05551564376087152, -0.024198146629657243, 0.09122949398093559, -0.03640203350558166, -0.03206738744403439],
[-0.033260249656886946, -0.03713528807899055, 0.18905207148017175, -0.03286215638527545, -0.15683447682801296, 0.25163980730298163, 0.03809467570092754, -0.013505876543970436, 0.12582566384208957, -0.0840280956576722, -0.10034574705428417, 0.21028987367517912, -0.05758921228458939, 0.14808233845212124, -0.1494276862199406, 0.015515074946079845, 0.15981333614687732, -0.44844163190452635, -0.21576106481219698, 0.2574727206149297, 0.37915675510110086, -0.07169174320701732, -0.19383285347918833, -0.14222720000830874, 0.2686276537393518, -0.18293549650767138, -0.16961512048474714, 0.009633724619305787, 0.21851274403303259, 0.13312409337606884],
[0.3755078366572995, -0.20161612858498879, 0.22590527596234802, 0.0867452504671401, 0.013850166150773292, -0.21681091111820583, 0.0384516188556211, -0.10986826346319642, 0.04407898310635957, -0.05263268535654733, 0.05030574186504403, 0.023822550637571747, 0.13579980757140755, -0.09089752597225279, -0.014883710422609884, -0.00783958875197413, 0.18090769592980158, -0.07545111855007587, -0.05672588501540177, 0.4051081312093054, 0.08789836277095082, -0.0736520115889272, -0.2252182970327358, 0.1635857856616217, -0.36051966406400604, -0.05309862539264366, 0.03346527066261012, -0.11910223620024862, -0.448521018902321, -0.13632591005447317],
[-0.025110797493557085, -0.28733379317079755, -0.13434839908223567, -0.03572457045497909, 0.1322172750750852, -0.21795248281946067, -0.03940086744230657, 0.024793438341622155, 0.32391621194604914, -0.4395111080750659, -0.02016420836888503, -0.2308378490143518, 0.2205180912573041, -0.22497419475504515, 0.0239884912323955, -0.15280905866121272, 0.0011287165960036211, -0.08657409249422608, 0.08050672599579121, -0.11988786632273904, 0.1419587543238365, 0.2838814329357093, -0.25556836173554304, -0.042281551362847156, 0.011271735359420557, 0.01824747043604259, 0.25134409934105456, -0.02270791486558549, 0.30181572712174365, 0.06278649622909739],
[0.0815837455518731, 0.10775112443770757, -0.3314584065739228, 0.20099897680649959, 0.04363765613024238, 0.09739816376380893, -0.3161684882592524, 0.09067123378413507, 0.08226068819300537, 0.0444647412793935, 0.24250263043499515, -0.07574396541395291, 0.09442225207667716, -0.14516037821599304, 0.15188640305850426, 0.10483638283446395, -0.1970794461725917, 0.019448535803295412, 0.09411734035171354, 0.2868321910732192, 0.3037207491323617, -0.05554637441643755, 0.013649751163702376, -0.2436180982993806, 0.06852955823481943, 0.08331120191434356, -0.02323413916270817, 0.42197164577658186, -0.23211003632725546, 0.2126713386215258],
[-0.08411349716480196, 0.2671738104200829, -0.32942793492683603, -0.22935439089071982, 0.022102650718827326, 0.4116021160804735, -0.041438272573231454, 0.23057935150834066, 0.14100790046220504, -0.11635412696170282, -0.1223182623802988, 0.15192671828995424, 0.0494117079395017, -0.31375226619414054, -0.16242170003691905, -0.12926642975958613, 0.29312047759968773, 0.06509623895781569, -0.1006076157365267, 0.16610591592807022, -0.12756791269583487, 0.13242178052066697, 0.06788380788555118, -0.03480220337328866, -0.27412193609556623, 0.02409964652358143, -0.01391780977515977, -0.24694317827549023, -0.11064527956806586, 0.05959117490215722],
[0.07804624697550466, 0.3842475033746546, 0.05837658938969228, -0.04209996901270768, -0.16476055047659377, -0.2554931971495647, 0.2511831390962274, -0.2067569559471814, -0.061874033881479766, 0.07591049244840525, 0.2744561257246464, 0.24240850402356406, 0.15810527439614874, -0.406159213924635, -0.052019555916896505, -0.021263245792077553, -0.0523481734866822, -0.09057086765340154, 0.3107763986385857, 0.1584450254972078, -0.051654891412967766, 0.030184317955887333, -0.07816291345334235, -0.03511262115683164, 0.09556458922803548, 0.19593754388065976, -0.16686639297545844, -0.0769273143220218, 0.28483342779841636, -0.007094215849415299],
[-0.22478593316709744, -0.10690753323625946, -0.14034481301019194, -0.10766894140971613, -0.07000181268975715, -0.05209842258237794, 0.039134752347044895, -0.03808097030304609, -0.11809915343001645, -0.13532422253864415, -0.2542695029461662, -0.09427426205798985, 0.3026142977152861, -0.07266164938985886, -0.2202473626090201, 0.1253057089844455, -0.18954925252662602, -0.20028344319988667, 0.3256438745811935, 0.09610257663324431, -0.04326174625410054, -0.28343383100775704, 0.19018992705637697, 0.2946258652086023, 0.21652746759735045, -0.18068242850777214, 0.033090098143782956, -0.13829217905437288, -0.2539045292194694, 0.26185486656293894],
[-0.06365124443059178, -0.12075946721838979, 0.03678448248091081, -0.029902582436935995, 0.1378510257617648, 0.27044524288469585, 0.027655093015208545, -0.40475575314803686, -0.0971153979333453, 0.27508335573136006, -0.010475237362260963, -0.11715666011176244, -0.0651778605148483, -0.18199678584566278, -0.40911206402015826, 0.133071143212234, 0.012679223495304051, 0.1260038260375165, 0.17741010018177125, -0.3120296114922535, 0.30753458154358654, 0.12053521161179297, -0.26530282198230454, -0.046099076232067604, -0.20628115953462534, -0.00031984675745712316, -0.08294173897394426, 0.02409072068473203, -0.08264078804184766, 0.13289415927179837],
[-0.09258002020007425, 0.24959117063361386, 0.27461608686658096, 0.004029815199549951, -0.13671282070528148, 0.04244901895828142, -0.008529854215737903, -0.17603562754195543, 0.26619379098571355, -0.1358914415275283, 0.01772992480330396, -0.24075271123044695, 0.06999100337946608, -0.23917148064949065, 0.19747604518219758, -0.059404321029556735, -0.22795601049700706, 0.0008454535553885466, -0.23168778326475864, -0.24381374562821848, -0.1822390964907852, -0.16964726751324385, -0.10706404807877484, -0.3148920617579128, 0.01814552248979811, -0.3038182951305896, -0.17675099554628118, -0.12509130295376725, -0.26427576494710864, 0.05343054637229896],
[0.18442315678624885, 0.036065642439805944, -0.1515866151190366, -0.1868196236156065, -0.2151018293597755, -0.1470663497172954, -0.3892524916386423, -0.019877627554174545, 0.007209294998808069, 0.09663377273367546, -0.2892342065038359, -0.37250304146667473, -0.2629035120026147, -0.01725631438983024, -0.16234791697498255, 0.24157090656377067, -0.07110144164010855, -0.19399427715565953, 0.0634826103416546, 0.14192436053873175, -0.16252711085120092, 0.05468965462113791, -0.1407952587932556, -0.15640731411060593, 0.062021408267310514, 0.19017265007815504, -0.14199057163087, -0.14796318049637583, 0.060261052484320406, -0.27351513921215437],
[-0.32626134390303263, 0.061165891213855725, 0.22603679973647378, 0.1549110585925226, -0.061053932058101106, 0.21289760696624113, -0.19865846008834215, 0.10235370088684803, 0.33580669335073227, -0.14945338682590917, 0.14397656792139552, 0.13906972085266758, 0.13441459194040084, 0.14004187857964312, -0.15628802435917502, 0.10101794957554246, -0.18083245532989659, 0.09022662091878751, 0.22127295163290212, 0.020387632665325006, 0.012700334596552097, 0.14966814660972003, -0.1084752699177321, 0.26690818873297156, 0.05316152267086041, 0.1322473405003913, -0.14066573725697004, 0.02521076152518014, -0.11541944854629883, -0.46733198884685845]])
matrix50D = np.array([[0.1374921239644807, 0.11620641238747896, 0.29622984347321335, 0.14717319493126776, -0.2869269656303789, 0.12067109509769522, -0.06108664698851719, -0.18956839632920866, -0.06915312830961531, 0.004704936865753106, -0.014454094347701483, -0.03913046461827609, -0.06821329625867326, -0.20481122961852874, -0.18073616626530875, 0.0031452249614259196, -0.03575554675627914, 0.020950470053892153, 0.11294742869496059, 0.00890703105111641, 0.029434134169277405, -0.08802729041434089, -0.0535946531001928, 0.34242466555415957, -0.10833793926599444, -0.1611309612935178, -0.14142586316935538, 0.11195557749019834, -0.054681396531274795, -0.08982765800147972, -0.12572643384705237, -0.08045620645991348, -0.15622886904146507, -0.19149236143723505, 0.14717964722662946, -0.1466349811035666, -0.05988348398208523, -0.05333982818068158, 0.1431020047247136, -0.03250046573368938, 0.2261802770861211, -0.1105901547603094, -0.06430662806745263, -0.31774375412228123, 0.2311018288059341, -0.15653293665734805, -0.06964504893630709, 0.0593688078479851, -0.021080137447729994, -0.03887987159203763],
[0.024158413309536317, 0.14152765985453006, -0.1393617335668575, 0.326408411507377, -0.10830375323257624, 0.23111052970350845, 0.009413356882596856, 0.08980795666091525, -0.13155714307688335, 0.023313780687825192, -0.11134733671708735, -0.15082669453914926, 0.007633171470992013, 0.09958168366491209, 0.16032132607792188, 0.14360226768722653, 0.16600892207153334, 0.12767526763097045, -0.0758912417502087, -0.1296277300259371, 0.20998106482951215, 0.22768561546705346, 0.13044283115593303, -0.0769343211921715, 0.02455803535802115, 0.17328400284674841, 0.18877011094557278, -0.34733872793913484, -0.0009042741365653881, 0.09532836123909019, -0.15277010733270172, -0.01282985878897174, -0.1656425747074998, 0.16921734671009117, 0.14058001746363105, -0.2075301767431376, 0.09449346078434114, -0.156032152503374, -0.03548921688616584, 0.23006050507641124, 0.02867698294484518, 0.02603664280740564, 0.07929585139396957, -0.056538663079506446, 0.1074034333815209, -0.13620737024671262, -0.08621012010918017, 0.06442669989797885, 0.03266795817181725, -0.07713843849070327],
[0.4360601801408968, -0.21875495765111594, 0.15060597455015912, -0.0035749583050595913, 0.010719648697299647, 0.05760819155178119, -0.19228955895644434, 0.029516903365539086, -0.004344890490402425, -0.06592000249464444, -0.005299039022139178, -0.0013939318178723401, -0.1704646883783843, -0.021415705796698926, -0.02479259731543426, 0.05202615324015692, -0.11996749160134997, 0.023506651444489466, -0.3382163546282686, -0.041963907092947936, 0.027636394442371197, -0.04565328030045615, 0.08391438529603644, -0.032181161454000906, -0.13859439473554275, 0.28049837219209783, -0.16880658307136706, 0.01749371887435438, -0.05567952843077275, -0.12706047027394549, 0.10432335893247105, 0.17054614368905915, 0.16161150888336365, -0.04408510979805637, -0.10944686649496031, -0.14798313411754555, -0.042299020023011676, 0.009433492765636221, -0.11001372675028455, 0.2522700314985749, 0.062363306186182584, 0.06603040636416153, 0.042011360419535425, 0.06781265987243575, -0.02186175371760594, -0.042531739023569944, -0.03356317056273459, 0.19564076117111032, -0.049930188944878835, 0.3667564488663167],
[0.19793826733247166, 0.10221434177807967, -0.11921610593164685, -0.21950225040961566, -0.07430699148690856, 0.2262313066196156, -0.010523182391099187, 0.04466153089692594, 0.04032464860538328, 0.11678669156857949, 0.1397734799678145, -0.24144611627992135, 0.23313959751071758, 0.2122512931512456, 0.01925420763304312, -0.03653316059474689, -0.16530874620146913, -0.08288772089711872, 0.0577022245224529, -0.20697985426681317, -0.1683421337350696, -0.02433533462492371, -0.04880347681314115, -0.21487662286642972, -0.09870675515082906, -0.18522495571462183, 0.07860385768380979, 0.18169633160029394, 0.1191020379465064, 0.04488185878720272, 0.08733277494663784, 0.03539753494987104, 0.13622961113393553, 0.0017997441678148853, 0.13572187339631525, -0.10692578570436861, -0.06439722615244588, -0.14573278652415517, -0.1044806858559825, -0.04693251690739316, 0.03850719357919044, 0.12037290417084076, -0.08201875684329339, -0.12610536961930907, -0.17077554636916922, -0.3877682321917242, 0.04145394667703017, 0.09050413058554505, -0.20839061224770947, -0.10198887586821408],
[-0.031084137652741036, 0.10913904553216508, 0.061359267410751386, 0.01822908318077594, -0.05507724882237775, -0.01454281057039299, -0.01830917787050708, -0.126579536422708, -0.1259598675574144, 0.10189955467076839, -0.03069412086211235, 0.22060979912034792, -0.05408790573190157, 0.006216534710514693, -0.2551947820664214, 0.04509038280330157, 0.27025001977481533, -0.15068399297723653, 0.3472568858409702, -0.046391607821416186, -0.003438019330944425, 0.18169282006470103, -0.009893638204881868, -0.029861953787196107, -0.2415395078252435, 0.29433211107850615, 0.06898865784417613, -0.022744436288289746, -0.0019995765287704847, 0.02280066683039151, 0.18696428395897752, 0.1380386958379012, 0.1110909424708327, -0.11946727566779002, 0.16186321780296378, 0.1622965374180136, -0.11213950866583546, 0.07276413445390861, -0.23110259516476103, 0.241855275203866, 0.048913769046922066, 0.1006228606519433, -0.06083326769234195, -0.05415976291632559, -0.09085288015300089, -0.04281615600026826, 0.07943600032707104, -0.31230124087332906, -0.13167736839594046, 0.028587696171626088],
[-0.17972787138385787, -0.02082207808565187, -0.12924077342895757, 0.09330549299290931, 0.0541802549269417, 0.20155164940320183, -0.052367445473402566, -0.10977628784933711, 0.048526963490563416, -0.1921218322929618, 0.0694133366740844, 0.24758137826067222, 0.03613838781852391, 0.06255937845968064, -0.1678971667803711, -0.012300317746980581, -0.0008843290016572996, -0.27334343185371607, 0.011408822209026144, -0.3150824307756473, 0.1236474851665063, -0.009460702233531201, 0.11918699476291654, 0.15477572421072316, 0.32006262630462834, 0.10746616310391116, -0.023061115239086532, 0.15661077789087655, -0.04602659453802866, -0.0673874694482454, -0.18623314627796617, 0.07421690234018626, -0.058815732843707946, 0.06416560472742448, 0.2021609778038831, 0.030586922243066098, -0.09096569633682479, -0.004878053327253105, -0.00024600469912725996, -0.18908488667825357, -0.0112312417479179, 0.21920444838012776, -0.17932072408103922, 0.2365312089332057, 0.06823019763366443, -0.06801280657707631, -0.04063683682705466, 0.21383752821106572, -0.0936811837026591, 0.1893488758723808],
[0.10241020066333675, -0.10676991174069746, -0.028496303590960326, -0.054492302340552086, 0.003104677023586857, 0.06976521390336334, 0.34387049695752375, -0.0574715098690741, -0.0981808554632042, 0.12867977566735186, 0.3341727514785653, -0.2000648886047981, -0.14629538296446998, -0.1768559396027662, 0.03111049749810964, 0.062308965346578725, 0.21579298712397085, -0.13044123802208588, 0.10844456763158242, 0.11721785615066312, 0.0558836096315775, 0.01696523124451452, 0.09177441225466773, 0.178725877473389, 0.2280625756973569, 0.09920679353891901, 0.004682610090884683, 0.2402885506863267, 0.06435148844207567, -0.09656691071678418, 0.10293215585822287, 0.1530195082175369, -0.10441767946168024, 0.13795171056036384, -0.29635628004593084, -0.12968664395781757, 0.22522816480902766, 0.03488942897942544, -0.16375134721101056, 0.05435796138013811, -0.02976490806945961, -0.033530719461079515, 0.0039250384426245425, 0.08501472448370129, 0.0891158212197072, -0.07062733650988355, -0.05709711106264185, 0.004607342432040253, -0.1962890644090435, -0.17955888675263204],
[-0.0830982050418944, -0.0551160976532148, 0.2592434607251344, -0.13421030374294643, 0.06234725135056294, -0.024717894497700593, -0.15281311334686729, -0.03643068194582431, -0.19663657129313813, -0.04880060279316908, -0.08441374540663209, 0.13367607211652144, 0.13673698914513494, 0.18827807165026175, 0.23120650637665804, 0.10990994450534011, 0.12667855396157848, 0.1084249903458292, 0.1228959944273864, -0.2659675797834193, 0.18344365171939342, -0.09955856407841343, 0.023887903074297966, 0.08551584298513731, 0.21059956542380232, -0.06828856234676754, 0.023054270490740693, 0.08044018650664204, 0.13467208964202695, -0.026481595129309442, 0.006688421576910688, 0.11483880312855758, 0.08042920252768859, -0.13084337681832617, -0.25658893522697307, -0.08298441789337227, 0.11054113621417365, -0.11118445504094696, -0.08589354685563837, -0.10406950844405413, 0.10739127466526145, -0.05611577188722653, 0.15169808296124085, -0.08032351284825615, -0.1274701834520033, -0.2054484803666361, -0.21876132541406954, -0.2656747677996773, 0.23549675436092718, 0.1454299562688092],
[-0.1759944316054039, 0.040868183852561905, -0.16417531622016548, 0.021591351403191593, -0.040926787972743274, 0.33176105588067734, -0.10786190109635253, 0.031904908245736906, 0.03798316079505036, -0.017629925696529127, 0.11465147700829059, -0.013963776054906894, -0.08678471750657239, 0.22135271793430883, 0.08480152663828996, 0.052423253934914635, 0.03367208398217381, -0.07993546352933445, 0.03856991149254942, 0.42973804243275643, -0.1911995957436632, -0.1397210760230327, 0.25890113099419954, 0.035894749642442075, 0.12266102556773109, -0.1143503969882896, 0.14714569841144373, 0.053963314769949845, -0.12368396244955282, -0.041220615116026815, 0.09506211470776839, -0.03775647882833812, 0.07728624224412001, -0.3542727328154775, 0.015222122029378275, 0.013500102998258047, 0.05671403929760104, -0.048853058869893565, -0.06580828506520822, 0.13401405860165858, -0.08812668588227238, 0.13263817371830455, 0.14252956608831896, -0.15415503805309594, 0.18862775497341364, 0.04174503314360933, 0.028853459612087125, -0.026913952886134587, 0.10299597024380772, 0.2388262637627845],
[-0.013537266381015626, -0.013458252457162959, 0.08177860134710639, 0.16459053177849162, 0.35705296725635316, 0.15059566598235638, -0.14398641835239162, 0.08321894659089639, 0.3682966710618022, -0.015762419273935836, 0.055580177513836565, 0.14728464114866674, -0.07802450771550662, 0.11830087672377279, 0.013651782971881904, -0.11436663720636205, 0.23829352712165108, 0.17417325822127444, 0.049664807274514236, -0.02854637742258987, -0.07870909748480782, -0.02268746651950747, -0.19142695614721433, -0.026489648616313158, -0.14932582865150115, 0.05061829771176761, 0.014104343285946699, 0.006808039844286887, 0.01616365352465852, -0.3504016276447838, -0.11152024221899735, -0.011507697068746558, -0.0027975458744665467, -0.11246171324704693, -0.008084343724593834, -0.19919118245055445, -0.02218888699610857, -0.1743193833779996, -0.11290623603134028, -0.12169253508750975, -0.13186777781042153, -0.21472624262674056, 0.10167570409912428, 0.08162981132155679, 0.10985065285797287, -0.03223670170045778, 0.03363647076932151, -0.057710406143305845, -0.24554683527783946, -0.1721741828708583],
[0.08053530933811258, -0.10762581005891031, -0.19439011661676758, -0.12655863732945669, -0.005543313423752209, -0.21991460029694862, 0.1355200563817616, -0.18338766613962484, -0.01084757323707693, -0.12235722191493868, 0.06783176119880253, 0.070138521216297, -0.22288510891388333, 0.011653972646282105, 0.09389676008280487, -0.14629282398363047, 0.1149967503777612, -0.22218909528261171, -0.021650724831380603, 0.10169685474108929, -0.028058817773881615, -0.21746508421517705, -0.18674421099990737, 0.011944897141629728, -0.08245962934048832, 0.23716743286860886, 0.18162262514074726, -0.12477472071302181, -0.0323580557287842, 0.14299681847254228, -0.19803641397245053, 0.1730913153604051, -0.07089577311238471, -0.22280929111663397, 0.14178886324986614, -0.08846652403259885, -0.0773728871096186, -0.04651267635081815, 0.05792392891029696, -0.08498924274812712, -0.1043242960779492, -0.0644626452300548, 0.17291889762499008, -0.08934112161378942, -0.1581770979311065, -0.2825200994698403, -0.0965729091597996, 0.1813047897278307, 0.22594788463134496, -0.1094582307814836],
[-0.03743580928997017, 0.1968649406569915, -0.10694803707774472, -0.05113926341389138, 0.19425725859483448, 0.0875580066356316, -0.09614398075573807, 0.14967638935920716, -0.0989151334347381, 0.2142451799688381, 0.22628240767754532, -0.19019064289142254, -0.1126273068259643, -0.3044391966922787, 0.0768468307287102, -0.0542372280720733, 0.13173650653218613, 0.06779010124919706, -0.1100004025871449, 0.010028279670043156, 0.1330581176468593, -0.14217904462078393, -0.06843252096237475, 0.07513189353467153, -0.0594750908097868, 0.06335923778126903, 0.013813728607414772, 0.06793958298299041, 0.023329385950774235, -0.13021946066005877, -0.07470952783412133, -0.1617869302289446, -0.12853046992510667, -0.028814475889556553, 0.10264847200784061, -0.13928692494319925, -0.24914072624873806, -0.07206767043721686, -0.01572035200362956, -0.09060176137053466, 0.17537506060800126, 0.3093367040175351, -0.04741256582722909, 0.0433945286356908, -0.3139188963696999, 0.14520852045427468, 0.041715790074307216, -0.19928071359279206, 0.18914299864144635, 0.13040758338052175],
[0.15598111057100744, 0.03474587676445346, -0.13728386360850897, -0.09846074661095994, 0.26731696605144395, 0.07560528863181909, 0.11763035288639814, -0.2631137659264421, 0.040264525038723735, 0.22075018322051, -0.13577931773047988, 0.11685611297441181, 0.2291139891741589, -0.10159623555926654, -0.04226630095299814, -0.05398388670953539, -0.09997866808922062, 0.32936393044819495, -0.13415021567849678, -0.08439945284481906, -0.19852834329651375, -0.06305747532773476, 0.24150059788851416, 0.26693536338186624, 0.1303197690011481, 0.15042982176275915, 0.17055997666766087, -0.11950775144559243, -0.27064381858751574, 0.1395555579285587, 0.13944946183889453, 0.04768579727316196, -0.009475494004672399, -0.15951407406637758, 0.05601603209548495, -0.11120423596350525, 0.05780943383138413, 0.06718930260663482, 0.07926861383418216, -0.04308420090375259, 0.00650837353868584, -0.07059990302712225, -0.15376920622458212, 0.002105337862939953, -0.06547035079888057, -0.006518373699839084, -0.06973830970260589, -0.12342648066504748, -0.08711412723344567, -0.06327784728021081],
[0.004703146158482409, -0.11571404492141765, 0.042223404479169994, 0.13154295702505375, 0.08966275851895726, 0.03189001575631992, 0.17678218970443899, 0.09368775746972206, 0.09539439484654119, -0.30250723930001533, -0.14952900151532034, 0.05039928569221834, -0.24382295428653433, -0.03329730577786959, 0.014212707621607234, 0.16250228890294346, 0.05718782007964886, 0.17948668526564496, 0.17057184481865664, -0.03280694430186141, -0.2038046252173096, -0.16367098979130407, 0.10798675968921964, 0.061145475653125815, -0.18776028329236874, -0.13623718896015005, -0.16926652809799697, 0.061115897135113006, -0.1070564825743838, 0.12582279495096937, 0.13596179752198437, 0.15110222375359977, -0.014359164579094716, 0.19470475211653182, 0.16279078895935992, -0.08345772147643393, 0.2966769004789913, -0.11619188202392404, 0.05255398818674221, -0.09848900484866507, 0.0849281307442802, 0.3836151834331776, 0.03958398524175511, 0.014501122911371005, -0.15234779743658058, -0.0670502001031025, 0.11432751940663602, -0.05966104599273439, 0.08979160382414238, -0.08623234914623434],
[0.004647140782736005, -0.005295060143125603, -0.07692625270832537, 0.06515514587529855, -0.0016140320256810864, -0.05255587294849551, -0.03252564706366486, 0.022948253621819754, -0.15749788064396236, -0.19066441666502973, -0.2785404183125994, -0.07035447960817612, -0.02079903458654361, -0.04938686664574205, 0.08172579132388648, 0.12320016529238845, 0.07200235896855232, -0.17613180026677425, -0.009052178071724613, -0.15214512305265665, -0.25561722298438744, 0.12166482814665379, -0.0012341417859283686, -0.025671336475752315, 0.23965862143673844, 0.04294723502112701, -0.06597834023248351, 0.1341355855006902, -0.08078875198732474, -0.09539821415124095, 0.014313486563715337, -0.013433626318530926, 0.018653019592736162, -0.1926052390255822, -0.25463579749945386, -0.2564571106358162, -0.3250609675737128, -0.10311993116890265, 0.18446585887316963, 0.17515572410660935, -0.07706212351518829, 0.011586384478892176, -0.10006896299488122, -0.03861875605593768, -0.05292061201421966, 0.05323373669902538, 0.37527010834208313, -0.038783795466979874, 0.05101595722518299, -0.24885806305619437],
[-0.02798033634849482, -0.44863139760927045, -0.13550105375614302, 0.041333284997318386, -0.10577139310849866, -0.22116954508269543, -0.1472022719280727, -0.1643346794638675, 0.051706489550777876, 0.015664236863734818, 0.26619784165189386, -0.18071866433561715, 0.2560719968372815, -0.09216695085519731, -0.07139133700182274, 0.14214192181100854, 0.24079828829275216, 0.10960028785723994, 0.08300900719899121, -0.13909316254090548, 0.033255075839511386, -0.1124580097504491, -0.10511922297232319, -0.14070006113399655, 0.022272294529382817, -0.16912646643638476, 0.03542885148550816, -0.1130180603523481, -0.28331550623440044, -0.09716547425887266, -0.006821271499676338, 0.054628040580113404, -0.08403575751920021, -0.05478404601463932, 0.047401685360651785, 0.09853497762999418, 0.023918322514207082, -0.23332009766811646, 0.18078896459916935, 0.17411735988984225, -0.025334252011496163, 0.0839580309030984, -0.035153933720795214, -0.02001413861415017, 0.03056590061024335, 0.0591680760400162, -0.011057738884213993, -0.057830666170592265, -0.1173015495257044, 0.12478681756175458],
[-0.10227205187641014, -0.030310567955987168, 0.3272509893328024, 0.0901059290019317, -0.08278593214993724, -0.008781745257571312, 0.029658284938480217, 0.2715866521807663, -0.06806545056352499, 0.150175922469357, 0.049165121878548296, 0.14559476498026744, 0.05894316884501152, -0.12188172069280524, -0.09471699156503355, -0.26074167533873704, 0.06819920771054397, 0.030233891265781607, -0.09674749767630735, 0.08782792605655868, -0.0016112591301294511, -0.16011061153611214, -0.06538532228012948, -0.07433604483298833, 0.10798873477418418, -0.06609754724345951, 0.26463432802537035, -0.14452841764330343, 0.09244749829734071, 0.10005621702153428, 0.2749551100798633, 0.23233445066637287, -0.06645058004438816, 0.06991236125466646, -0.01255203431745453, -0.1395211090856693, -0.11416203740820424, -0.02226778842612427, 0.20471680569729397, -0.02448963004424036, -0.12819662534938098, 0.09780566122537668, -0.11954866459269371, 0.1487918696656096, 0.204961479950904, -0.2789325079551441, 0.2284491109012968, -0.015025419050954966, 0.04102723782197799, 0.10620697242744546],
[-0.009917321126126939, 0.08500499599738157, 0.12572148220186938, 0.36480752117641924, 0.07640227562159944, 0.02063462239121614, 0.020130585708442523, -0.12108116672707808, -0.16860486182904968, 0.16006492212194884, 0.21226451080844, 0.2021772188602623, 0.08904154331954044, -0.02556562454335465, 0.13164753597974363, 0.15479513627312197, -0.030006654172207586, -0.06278228355492238, 0.048383986194628824, 0.11045693149903875, -0.03131118872409057, 0.1420963655170613, -0.22500590813269955, 0.06806694615301773, -0.04703146014102175, -0.06864501886595992, -0.16350076570041433, -0.1387039768972694, -0.1345074425760927, 0.10808228745442366, 0.0752473634437382, -0.20566822684634878, 0.18302287144970675, -0.08438975115739854, -0.1820010358726909, -0.05550026520068833, 0.09059554497102779, -0.061227774941920256, -0.020336432700042324, -0.09508072123496254, -0.31479578820069704, 0.1378172617580644, -0.15242801556840713, -0.02503509044458085, -0.2829454675744026, -0.08082200820217317, -0.06567170933701427, 0.2690881892495536, -0.011237052891356208, 0.050313190045519214],
[0.20264770279422162, -0.16279485516923747, 0.010404090373437067, 0.016506108844246258, -0.046551791780283965, -0.07529029614955532, 0.29215680392686405, 0.15705076026721304, 0.09493912574191361, 0.13803118500362493, -0.0968050430079206, 0.2960501473053837, -0.004286691379975896, 0.10894452030857511, 0.04991549662567343, -0.2052132746816391, -0.055533788996897836, -0.01415120111051266, -0.024052737373851506, -0.0016818631668601028, 0.36610702016547236, -0.06883624941407208, -0.03559292107273929, -0.04125798839620006, 0.24561223364799148, -0.05121990100435601, -0.046270372489705044, 0.031477181864546976, -0.060717562605734264, 0.07474574495407021, -0.018706178993238815, -0.09739272446172241, -0.016040179227890854, -0.1025711852660334, 0.06931953155183274, -0.022236478111709427, -0.017928816426036803, -0.21892593399740928, -0.20211761149539226, 0.032449245129397994, 0.05387439157338122, 0.17198843777936898, 0.04451586329021549, -0.3736075804149899, -0.033566451882346596, 0.24071957209956313, 0.18531372384654854, 0.0035667511114824543, -0.15987642387824222, -0.05057271738127865],
[-0.07537798346430212, -0.09769712415918122, -0.18538291582634508, -0.03971216633585666, 0.13975008891308877, 0.1755067762573327, -0.15391619544765725, 0.0031137681786751795, 0.22802649877686462, -0.0038801558279965586, 0.01876621159572644, -0.010677454079390195, -0.12316361843760976, 0.001629669469175378, -0.15316872950638644, 0.25263962440559173, -0.19819985725711906, -0.11983751584107066, -0.07327040464663631, 0.14239357772537706, 0.3828268180325954, 0.12142251361881508, -0.2151732447232034, 0.03148734067005056, 0.008309436504821494, -0.0192109420212605, 0.00953368222145878, -0.03968527168738797, 0.05420325870651958, 0.10385382501129171, -0.02096234941283189, 0.2164702964831803, 0.08008828581309134, -0.004114842378529619, -0.07603999160944258, -0.15227366548577936, 0.17019904488204562, 0.15536787786231882, 0.2704273561853973, -0.0018318775501165712, -0.008119612471361974, -0.06897783905616543, -0.21238814649179855, -0.2222023194477731, -0.08331787795388895, -0.10354693546224994, 0.13736278868474808, -0.26677527064235684, -0.010779809179358354, -0.00941988926046905],
[0.1461241459973719, 0.07257516717227365, -0.21042273377928544, 0.16929337342774176, -0.04676092431621773, -0.10990508548761271, 0.10407036447024301, -0.24545089652487315, -0.11238234981621081, 0.27653159339284933, -0.272421400127879, 0.13172491694289085, -0.0832778470988651, 0.035403534079689096, -0.047171772963530895, -0.05672686407814816, 0.07259965821032023, -0.07242684692525532, -0.01394905159528548, 0.1768969711588013, 0.06293019811968241, 0.037245669472052746, 0.24249652170842886, -0.18411937258079994, -0.11745412023860409, -0.19046502355017153, 0.024261266124505916, 0.1414704779276214, 0.18243459221624297, -0.23012342203274122, -0.12722573420065672, 0.06375344260241654, 0.06624668030010482, 0.05535328587416735, -0.06954739295823148, -0.037938011629028795, 0.05240779972852544, -0.19777627077125878, 0.3352994237156567, -0.13449062299434544, 0.015166017758611398, -0.007117702536826086, 0.09355130971181144, 0.15411049260219967, -0.10660757341672641, -0.0565285792656695, -0.013971342636861344, -0.08876146455377122, -0.1379510018284186, 0.20744135682941364],
[-0.11979933520952238, -0.07207598275878427, -0.01953253193969577, -0.09181184453305237, 0.29268246700311307, 0.22883650935960287, 0.027239296752990423, -0.20205357442000937, -0.0641565979767727, 0.0772714439078058, -0.07367931438938922, 0.07244169639992531, -0.15980820979979654, -0.23444645203572373, -0.07187167796215671, -0.1694552902032788, -0.022522640446682264, -0.011598246259612015, 0.017542432013882375, -0.2146804685331852, 0.01747874727713187, -0.047842955031377206, -0.02085461172841982, -0.15380184161996155, 0.02587199344920569, -0.34975146042961497, -0.17532515103509508, -0.14678591757636958, 0.18021644946784574, 0.09500227817352948, -0.024755018680761805, -0.01885030918126153, -0.04402177513543062, -0.06573844589680497, -0.05058041027060586, -0.007488879353534751, -0.08037260851061725, 0.20795497049326675, 0.029917224336063704, 0.3777288426949057, -0.12735252069112815, 0.17026264920629278, 0.26488530527650594, -0.037036394320562056, 0.06643707277650558, -0.041770381432797016, -0.1615896436887009, 0.0698588699163445, -0.054410638948826195, -0.08010207730008424],
[0.022284849849896326, 0.0433793364808565, -0.18553923944821618, 0.07269621508529431, -0.13152985585579866, 0.0432250022802366, -0.01267930160509415, -0.05786815710684336, -0.015853779977703753, 0.06074612669669791, -0.09254697677848206, 0.06528726867862196, 0.10393752278635404, 0.0999570451806761, 0.1049695196290865, -0.014379298479230217, -0.22150668345224853, 0.10511393063166458, 0.03115140384654522, 0.14666409101156544, -0.16286327395905634, -0.10067410877820934, -0.3234667146499723, 0.10568898256833593, 0.12306616925501082, 0.05119028817476767, -0.34671419189692676, 0.006038666349734644, 0.22281545195758473, -0.010328951716107131, 0.01556048686542452, 0.21587500039205182, -0.45427116926046224, -0.010152096718740558, 0.07932442258203716, 0.04623842812681746, 0.012759812072083168, -0.1534541281871768, -0.16615296357387294, 0.2083153648683784, -0.11977243889326672, -0.0473734997357221, -0.09315539874414622, 0.1784055045552669, -0.05421570873268043, -0.0200761555542628, -0.009686978592292313, -0.17973796482031373, 0.017279720173087872, 0.11846519104399574],
[0.06446923729494101, -0.09504665247730137, 0.126840563805456, 0.09006773430141567, -0.16498680942499658, 0.16155955210693485, -0.005460234666600379, -0.01880642632729621, -0.04421522787197616, -0.05780330138778503, 0.06241495409882547, -0.06277183918272318, -0.1343214309872556, 0.0163860127554471, -0.14989574610316644, -0.24119937020452983, -0.07533919031187176, 0.17283775041772023, 0.12332297080114236, -0.045839333404342236, 0.0640765682212555, -0.07752726732877575, 0.12223705551191062, 0.033772336740209935, 0.06312941861080228, -0.16031701531218476, 0.21282653737777543, 0.08154108866898879, -0.0026356163542421264, -0.07864519841591443, -0.27674323943703116, 0.04579024265493613, 0.17898075943094593, 0.0009377965235339561, 0.08904501726353763, 0.013750167411162948, 0.1241334351808789, 0.004638356993389197, -0.09950690604097902, 0.2666810779199912, -0.23876762035435278, -0.22916468751148408, -0.23650817263955268, 0.1543983395663433, -0.3770261924721972, 0.1208753500582816, 0.10454031686591006, -0.009490053326783194, 0.2266228551129204, -0.07879719999816555],
[0.09511841702382788, -0.0660788318583924, 0.09351103258268868, 0.0587833430830885, -0.09688372038213874, -0.1735002118606512, -0.017780041436987335, -0.07713954345118186, 0.10392914092647347, 0.07002071920107458, -0.04253566216997253, -0.2227918758467281, -0.07741609158973416, 0.2804181564868337, 0.0837460990980419, 0.007830814374502532, -0.025286209445468444, -0.07968755681132558, 0.03123331046073344, -0.05754012133287277, 0.07351673859201684, 0.0729655950074155, -0.14192000468252677, 0.3590914784599049, 0.16636873897990825, -0.06702644748207168, 0.08089608625272032, -0.09582995831756486, 0.12416553613512595, -0.12169027834777546, 0.2433724852436284, -0.17699138426694364, 0.11256679106532286, -0.07730859637390627, 0.32070916661443183, -0.16418434198587348, 0.016498622521431614, 0.25228099637472473, 0.15255026665680516, 0.04875563174812195, -0.07008212772997147, 0.14626224205803803, 0.27327742939402766, 0.2465883800649849, -0.09024768046216727, 0.056716476799721374, 0.027590103286361307, -0.07230531751421614, -0.11156922003002125, -0.019790632988596218],
[-0.045831458489914066, 0.24740296817835278, 0.08823576020351372, -0.1947413568714431, 0.1743753409524092, -0.2072687552544093, 0.3065260889357993, 0.14288316435501225, 0.14238587088177107, -0.19830608869559285, 0.12377195095778214, -0.054794439460776674, 0.03432244340109095, 0.03666415130034315, -0.10275393206817969, 0.058155598504403425, -0.0573771995599095, 0.042784963022963175, 0.022475038838029947, 0.10392323487171112, 0.06534099342380523, 0.25476371694098654, 0.14889654711090697, 0.20285422973704567, 0.029745904261100055, -0.14938586418448496, -0.09874745745412766, -0.15766178172891446, -0.01164679252829034, -0.17295291867817664, -0.002308592290796273, 0.20327636735396232, 0.09571628136522681, 0.03554367359293003, 0.07196127270704201, -0.0072421142678351985, -0.27095602134876307, -0.2959014489484061, 0.09666664984607606, 0.20503965128168172, -0.14183690957898556, -0.011299545776996229, -0.050023347630253186, -0.08225628484011285, -0.04786718111249976, -0.06296384793917333, -0.22692886791973346, 0.013219231865326544, 0.021550786680442573, 0.12177424078005156],
[-0.04761365536146662, -0.16436643824470532, 0.02821560148106892, -0.08388402546252578, 0.14218173494186873, -0.07926765869580214, -0.1883250233029576, 0.10152099760819593, -0.3568557541880029, -0.14089858245784984, -0.09724822948587511, -0.028883956616452103, -0.012429102045988093, 0.09374723409685942, -0.3702618445226094, 0.031450394324213156, -0.11850451634073753, -0.01884117968764085, -0.158992452419291, 0.07249350477714374, 0.04887535321964524, 0.10484922358500937, 0.05143916354053632, 0.08276596090253849, -0.15306910074706753, -0.01713679546273266, 0.2518957367690015, 0.0893405577160713, 0.14804812740684192, -0.04647677681099182, 0.14969279072374952, -0.10251057822234164, -0.35108210075049506, -0.13847801164363915, -0.011560535128676126, -0.02672478077410759, 0.13886339820943158, -0.19546464470370617, -0.06640125519711035, -0.08539196984493716, -0.1984201646540744, 0.12556867216088605, -0.014540227767386879, -0.05557759643610085, -0.08391919883535692, 0.10193762592911566, -0.17057864984899623, 0.07735593101284566, -0.12312337096042099, -0.16597724336110636],
[0.047751227210036204, 0.032658411494503437, 0.01647013998156814, -0.048261258156358545, -0.046661573237947215, -0.07222567090867016, -0.19457673401040218, 0.04688937168515387, 0.0926235058246809, 0.21033040994373103, -0.03260508846560848, 0.10688561667784023, -0.30829394443396496, 0.06688723374756891, -0.03718020785118166, 0.18796216328620516, 0.06373860579495602, -0.307950712382529, -0.12562055994708343, -0.09734769882504625, -0.2400914775372804, -0.31084624996736515, 0.012441864549729773, 0.15190545554459164, 0.08970506880159303, -0.13211161683574862, 0.08903100754229219, -0.2194992124140553, 0.06424256300602381, 0.15160289741283983, -0.015989718380103206, -0.10141743986879947, 0.1218734765841365, 0.26886231035796265, -0.04885461649335814, 0.003179063543532045, -0.044707179781985754, -0.2628707479040124, -0.07206682778075893, 0.08752899391672216, 0.04128666950565137, -0.0839237524453737, -0.20650120225844962, -0.013915048612073861, 0.029395579302540345, 0.12199657535401577, -0.22694112115816495, -0.12346225111827525, -0.08702538280834138, -0.09492300058471989],
[-0.28409293331248386, -0.012930928939058213, -0.12444406313932728, 0.12680565615185818, -0.06550317957596899, 0.006183584512791723, 0.09215315707481604, 0.020866578366759116, 0.003504660277758028, -0.14402068955701425, -0.009006930867670635, -0.05349053078222559, -0.06300102502468047, -0.12985706966372038, 0.24755139850999214, -0.22031158445162036, -0.22753059043466742, 0.07039336300047618, 0.20932029708374933, -0.16316194627589267, -0.027987072493243084, -0.12006903138739035, -0.10325543682587698, 0.07740135616422375, -0.1381991631168025, 0.2504055630290222, 0.20221466803464613, 0.04433639479526045, 0.24672071540964552, -0.020300097046438717, 0.1575567880536051, 0.005872058595578596, 0.17804431975768337, -0.06667032554224925, -0.11785807743493226, -0.05680330350863375, 0.07052315403326932, -0.13858345651897608, 0.21591851697209205, 0.12049089671072341, 0.11579090583744259, -0.005058441761966774, -0.13078331951377123, -0.13107616818975437, 0.0007503238906834832, 0.20269442536965862, -0.17936112998170364, 0.10415692835247328, -0.2415956288981101, 0.14617773721218724],
[-0.21564838732047467, -0.04464114229275476, 0.033072435874516797, -0.21219578416004847, -0.2935550570059296, -0.08330755674324218, 0.03462343429321226, -0.24816051933675828, 0.22343996696975546, 0.19434423031071338, 0.1569700891158693, 0.20204652928519198, -0.08140578139920594, -0.05717588764498723, -0.019468399870769947, 0.1594298299172208, -0.27104383880436017, 0.10453990277191355, -0.026191879335008942, -0.10328237763868177, 0.019146406918168473, 0.138647654555919, 0.13214366250559442, -0.13141913189702695, -0.11300098925398844, 0.10081730506298227, 0.002613945884217858, -0.06771375198987829, 0.1047785724525005, -0.17475252288909823, 0.03021380003155114, -0.07091101398714247, 0.009709474342839482, -0.09343110633999933, -0.04295553076611749, -0.2724794349968118, 0.050901612168309913, -0.163634629377763, -0.11263052516700896, -0.02216572799635468, -0.02571491522495654, 0.20214017464786874, -0.010143868515846656, 0.14204841832894435, 0.15842655341100526, 0.036728510973636906, 0.06736441267479902, 0.01291588561774926, 0.27653163522905316, -0.19671949716905776],
[-0.059244032398172324, -0.13280207634191657, -0.03058407508834027, -0.33095815289574193, -0.030108179977903066, 0.07524352102528373, -0.08285398817543406, -0.07195721155234483, -0.3683946798226929, -0.01912109655863658, 0.13275775995632402, 0.10267561418981974, -0.11650114314138289, 0.184206898421966, 0.11779199106434769, -0.30171767066916105, 0.003925486495763255, 0.10073657950020448, -0.02485367930139345, 0.05168588139243844, -0.1546974993045953, 0.27688154637372603, -0.14411161859577287, 0.20371465561096838, -0.09707344766667533, -0.008061856373000895, -0.08278866890506592, -0.07607894114015407, -0.16346528863496762, 0.046559975827814626, -0.26246054221334325, -0.01831072377249786, 0.1217393423906023, 0.2703201981443506, -0.0006758845213250125, -0.1382112002308176, 0.053738895505905986, -0.06948291169378125, 0.08568910091909525, -0.031481442886958436, -0.002287763642926289, 0.09546275830028499, 0.012114637623849423, -0.039606322692301264, 0.16056054131000194, 0.030267797484188865, 0.16633585807038048, -0.1471888643015032, -0.13336472692596815, 0.09415742915838955],
[-0.018027447396159198, -0.16248497511143783, -0.27255244136851686, 0.197757438370414, 0.049779052421899006, -0.1878915690843561, -0.2079801635749245, 0.1611444048172155, -0.04865822844975581, 0.17564950077340497, -0.02188620377872107, 0.04123997745865841, -0.010501889368554264, -0.12814296389759652, -0.1572727908304814, -0.07727674487915548, -0.18051807387961957, 0.027975467029148056, 0.27581769067316453, 0.00909043085518992, -0.19200765412311396, 0.1456978339390387, 0.027552670918928098, 0.08160873241823213, 0.16569870297371403, -0.09576897763273033, 0.05735942646276047, -0.11894097792241111, -0.005473215213674037, -0.23199055423198015, 0.06101328471719898, 0.19136480349884405, 0.05351810774522551, 0.21125853634609307, 0.007510030439170076, -0.16904925196146472, -0.07450562208500733, 0.15088762213771617, -0.24348731809499624, -0.1305311565390782, 0.12726244798726924, -0.06324651998996451, 0.1505378536066525, -0.25417443922936855, -0.052070245738834314, -0.0387021651416259, -0.029002845203943778, 0.15612487048197443, 0.16042362474872973, 0.05954669952301503],
[0.11363157489202275, -0.1407899370642752, 0.07344109410090559, -0.15150538481605327, -0.03773005273863293, 0.2122983360456805, -0.04960207200570184, -0.0829220227504401, -0.07777279267905068, -0.11652789012033608, -0.041937301218968055, 0.04402861199880704, -0.1971471942699836, 0.061450547204326814, 0.1957487969110485, 0.09979940793351173, -0.16910845095108448, 0.09639564202114065, 0.3460580665469725, 0.20506443651997142, 0.1738121301449954, -0.07041717933434904, 0.09498571847451363, -0.10988168550084358, 0.05285031187220663, -0.03441431354087211, 0.07845721824244062, -0.3291213669892272, -0.12362935198341125, -0.14981460023849075, 0.11340500770003607, -0.05072323217379922, -0.1876019810033974, 0.04194087844721887, -0.11340535473228731, 0.11822944981574282, -0.3434138079159768, 0.04154870582576719, 0.032943752408787434, -0.15256236258799516, 0.13640001102005303, -0.005334367244859921, -0.1244081791151819, 0.15751514838799438, -0.13206645131505115, -0.058726854778653755, -0.023593066491890375, 0.06542882520845711, -0.19358137019456037, -0.10643193992060962],
[0.2585994662987746, 0.2519243449408773, 0.12210575931318997, -0.13183403096134047, 0.19719555330961203, 0.0021688429326270765, -0.07151766086506114, -0.0733410508432938, -0.07968557043075065, 0.12569414422929182, 0.04041219564195972, -0.01769423964873476, -0.13862964185462337, 0.007689600190379189, 0.23713304095492066, 0.07520431051178758, -0.05544955572203296, -0.1337949112014219, 0.15166516620863799, -0.2468824528969151, -0.023508896848733356, 0.023101595117974685, -0.059428712486528604, -0.10549759999585936, 0.011234715829253804, -0.01456346063573024, 0.12897020021480368, -0.022135192757662608, -0.051702921294854605, -0.23087990841245962, 0.08978044606134977, 0.2261479850808003, -0.1869424175528443, 0.02326660316295725, 0.15081840678501637, 0.16905610608693608, 0.24248361089970066, 0.00178768851999016, 0.14817927652844642, -0.05559537550429741, -0.22896777296785, 0.00031706471909264994, -0.08669616667531241, -0.17975846601015968, 0.1738973737442043, 0.2534700646231551, 0.15261572609379204, 0.1251936801655581, 0.16045999269730266, 0.08535412270143948],
[0.011499269199745877, -0.11840074965542705, -0.07148856111976791, -0.0974348577468137, 0.13419605880166158, 0.15386432808492292, 0.12739132998242214, -0.033364021245004365, -0.00146013227273833, 0.1025870738388921, -0.19340181197404438, -0.23649313353186707, -0.08575914542364693, -0.13611227248557414, -0.21730359495667576, 0.09450077809023925, -0.0635254661849532, 0.03382606350975267, 0.1629413117459578, -0.09248517275456494, 0.06694193812180094, -0.004813638514348097, -0.11874326826044121, 0.18904908549576493, 0.021761998152086043, 0.11243272035250045, 0.005225866681574768, -0.11192132573261072, 0.0885015044458164, 0.09414912812655442, 0.054090187368817585, -0.24833414512842614, 0.14074989607183042, -0.003936871017069263, -0.06335053189000012, 0.23705107929229044, 0.00547909990148945, -0.3713263483163232, -0.08563561633165899, -0.11000401227517399, -0.09425703961750993, -0.14701849954710333, 0.16455379188340127, 0.09728436644638734, 0.12288538855127167, -0.1574609099785832, 0.3187867038144821, 0.08445557839512705, 0.14076413396044124, 0.2277118222700476],
[-0.18016077571580622, -0.023489029555641416, 0.1085980636443699, 0.03555839941830249, -0.03442141679678791, -0.07577179376076208, 0.01064223480664714, -0.12726718102414047, 0.09860543480462872, 0.09280023989547678, -0.11288182793283265, -0.3337751504615306, -0.34974948379917675, 0.13776001806630558, -0.07468076992936672, -0.2287000658273846, 0.05008345041090584, 0.046204425717634744, 0.03394263270923437, -0.08193209451962148, -0.008790338842657447, 0.12838105952050935, 0.06295457677424221, -0.2935525112172386, 0.14850846641364673, 0.08513322587346096, -0.21262991801276, 0.07527616748964053, -0.20805650865683042, 0.1652849246610912, 0.16980569374938204, -0.0647233365994843, -0.12660011052012984, -0.016953822301357488, 0.044042184975088744, -0.18277697855048014, -0.04792036078269078, -0.010299292888234278, -0.06710390726852725, -0.20287476204865612, -0.18491891068359004, -0.09311716842428873, -0.18158906171086495, -0.12112473487620477, -0.025613990478127777, -0.02465137084432279, -0.20018916386041788, -0.10110215722228692, -0.008694278569278952, 0.21009969914644316],
[-0.32663311758185626, 0.1837771614696603, -0.11426970987818001, -0.1471286856340909, -0.01955080164378242, -0.1045810087851186, -0.04435436481899158, -0.090342847228477, -0.1158455867796421, 0.07875337678018333, -0.20194054930904662, -0.023556984426997968, -0.056342990177656656, 0.14082143799216804, -0.03220784438013452, -0.03997314832857609, 0.1601240635035542, 0.14209852038232212, -0.1946657106695917, 0.04773267309541836, 0.1853839998356553, -0.2795641822872285, -0.08027660914206391, 0.06262812162107771, 0.019445717932179918, 0.025621805900752064, -0.13995092056390285, -0.014154470824254771, -0.15438609721337432, -0.37097423484893943, 0.1823992247328356, -0.020740242361716142, 0.10131399943153355, 0.1286288928285722, 0.01506167853524858, 0.09753854898698386, 0.1455859457434597, 0.058443667608151825, -0.06377772977104057, 0.1655981405649254, 0.056331386918214835, -0.0023404988212128042, -0.14902884105999312, -0.10881748741770644, -0.0658730774133826, -0.2123731985594028, 0.13257411256632035, 0.27697110532975217, -0.03645743095663995, -0.1302785545623915],
[-0.08226477075127513, -0.06610406242781616, 0.17875299249669982, 0.06339237573364594, 0.12344390637897781, 0.11117948474048868, 0.10419281949672343, -0.31826688144810966, 0.06534906920381664, -0.18514827514551396, -0.06508726986377773, 0.05029010468495427, 0.20108450915631568, -0.12502205452239512, 0.0968203297825337, -0.05454642665491973, -0.1622071919487721, -0.30692656735805557, -0.1138335589500706, 0.12557399033048214, -0.010853513638100363, -0.010407147386859007, -0.09148154695690416, -0.08311012046741016, -0.03730059504800653, -0.0006092612079759172, 0.22625380706407452, 0.11787925236278035, -0.1843208572396973, -0.15964260207214534, 0.1657416426984277, -0.19430185630430905, -0.10138368944150151, 0.3992366083094025, 0.10227790821109341, -0.1315751044305682, -0.02016899913003069, -0.09362812662452799, -0.11477090454916292, 0.14261167825269544, 0.03180921798794127, -0.11946611312706508, 0.1348889574914507, -0.09359413387011088, -0.09539364682285556, -0.04027946734627746, 0.008144899932257055, -0.1744333216007825, 0.10090666522087485, 0.09871307968857791],
[0.1936964141163099, 0.15786366222039652, -0.03854690044390554, -0.07338010770216379, -0.26902412615194576, 0.12644747329470857, -0.12098215701053215, -0.07613786777421783, 0.254015285486226, -0.11492815798845181, -0.14048780077631776, -0.06822939623144136, 0.1699492552675107, -0.024392447887171632, -0.17697863600255398, -0.17324326726203906, 0.131258787519932, 0.04495976327505718, 0.08725901550320966, 0.019523225918879637, 0.006253776044521463, -0.10751244279691836, -0.03960086921421233, 0.099492800691808, 0.018625132091404182, 0.1725125944470292, 0.027038930237053137, -0.0987550541069362, 0.01992043726511263, -0.09369042414185158, -0.04644278850798229, -0.021291851038143666, -0.006997217708685669, 0.22484997309945357, -0.3545011651059813, 0.0478174788831026, -0.030204314006861743, 0.06718406796604244, 0.07197113173852929, -0.09804163517722064, -0.3575087657031427, 0.3506014699724004, 0.11006633987550997, -0.1936681631847768, -0.046533846673323775, 0.05584692460266066, -0.11607217928470011, -0.0754463417511927, 0.04807203304544699, -0.0192906390629548],
[-0.07929646566179914, -0.024131943134984696, 0.12582617207303282, 0.054931709755634835, 0.02341409787446219, -0.19074740381237762, -0.19624220732200603, 0.04450128455800215, 0.19645348567275872, 0.05336050466425386, -0.17138831246962943, -0.16293313081091684, -0.048177103838996316, -0.25151296812630236, 0.2894469229514785, -0.20311293531160063, -0.15178711916919216, -0.19108086548920603, -0.06915322716194712, 0.02397256881234711, -0.010874271834806123, 0.1946341183081051, 0.15527429117595068, 0.13733672894442767, -0.008007327156932373, -0.0482811538880768, 0.07117369623238862, -0.07447071582494068, -0.10621116198756136, -0.055026952022834384, -0.22100692651516274, 0.0492447759339225, -0.06246400822586071, -0.1685287479051006, -0.08056708658771615, 0.2708000782564378, 0.1937326881355113, -0.056673141132189804, -0.18192408532984838, 0.03709681507583911, 0.01210015183948856, 0.22105094678401216, -0.08241799342325198, 0.04366155885389273, -0.0338673223262576, -0.2992518023808649, 0.0675107604972628, -0.11466795584337794, -0.16956752447927406, -0.04693479776750572],
[0.02215417936558937, -0.23700563613233214, 0.06010046765521834, -0.16310130836806877, -0.031408931592276375, 0.2595226779260457, 0.1287681653449252, 0.28780370777650444, 0.11273826191503608, 0.21618115578363808, -0.17192769854256224, 0.0822997449700466, 0.06751037821728618, 0.038644939268686104, -0.055819188741912426, -0.11443626325712276, 0.14382123016657639, -0.1807486180253677, 0.06475384010085908, 0.03431771849775224, -0.1624945471265394, 0.23523102270610663, -0.1558826952913545, -0.030906308592279122, 0.041374893412133795, 0.10574483059993499, -0.07196998513804927, -0.009917249812857886, -0.09991089523851686, -0.18955167709302317, 0.03174122405771145, -0.12596744872284493, -0.06312037310397176, -0.08084516656034242, 0.01505930175099559, 0.08029412509140024, 0.18589782902600013, -0.029662696510233552, 0.27542958084838143, 0.10498007657995231, 0.224467439408358, 0.024344229995458662, -0.11351601029610171, 0.06816881650747565, -0.11567750476797482, -0.024096942498628038, -0.2905929683450007, 0.1016042464083039, 0.24798053697732395, -0.049060188668656725],
[0.117485875742302, -0.1742263700157319, -0.039523550516705336, 0.2326690836228456, 0.23000745494369593, -0.07904735660146998, -0.08375224044361802, -0.15160808611672605, 0.05423435486902463, -0.0060755217967054555, 0.2748489149921174, -0.007477985922424215, 0.0018896184511461287, 0.28488956348513267, 0.042779414938904796, -0.23487675710853126, 0.013346337293573906, 0.004502343861048539, -0.006451313989706766, -0.014273951013467873, 0.007872470082591764, 0.017372905005961514, 0.2814784295999547, 0.09653986965414604, -0.06082032039046738, 0.11781286404198853, -0.15536461415962535, 0.003352685370431033, 0.28368925985582366, 0.0050305186282704525, 0.13556350605282916, -0.18850244928356324, -0.08628218884021455, 0.11339849434876942, -0.06450100454543274, 0.22156146227138607, -0.09995004273863217, -0.019030976079067535, 0.1635839002167289, 0.0946487545374452, 0.08764348459917995, 0.033532443491782755, -0.18310681589696534, -0.1704369967316346, 0.07570264272770301, -0.15405883899986195, 0.10901889214260184, -0.058226193381651664, 0.26397104212173567, -0.1527272836102222],
[0.021016252703078657, 0.018730978498865198, -0.1856759009821403, -0.033795543647475876, -0.06845313507613399, 0.01511294928142724, 0.04410130615724667, -0.06488169694619712, 0.20271444222950594, -0.008571461029878196, -0.08587411297312474, 0.040681203888842464, -0.021640384597376112, 0.13433240468108334, 0.08973119923317396, -0.10747469758788238, 0.21916868979647214, -0.056831603471104025, -0.02442815121332346, -0.1472227501013003, 0.11588858194345866, 0.16276709642471726, -0.051329066007981136, 0.25781119760963866, -0.3455824544029788, -0.3593786185007559, 0.16807434823317002, 0.04760555896253815, -0.08574888457599904, 0.1537097295293726, 0.18144497084994407, 0.07268955781378895, -0.2323286792347175, -0.032775077432262295, -0.27834269397049244, -0.0970568893991682, -0.10084826947610602, 0.0648810976620571, -0.17300445557046654, 0.030552943643573534, 0.10724672403322834, -0.061503824341675915, -0.13430480111179183, 0.11252623188130886, -0.006793270719517277, 0.09826560689137259, 0.0867418464564225, 0.18282482762056274, 0.12903782166271388, 0.18135951511415335],
[-0.0727535919010361, -0.16183602664093952, 0.1112478038040491, 0.03805610137215801, 0.1687848844186108, 0.06099122346181113, 0.06420413035490029, -0.06581468274680878, -0.11512594462320881, 0.11772734210380074, -0.2052088123444955, -0.2923844671321434, 0.3171234970622314, 0.10644973368375446, 0.02808683760428652, -0.07202851267135628, -0.008898536625503625, -0.26823166700837753, 0.12299472111093442, 0.13459393685856288, 0.12833548421361418, -0.2120413142800408, 0.08577908944459547, 0.04487690389317603, -0.22866002140176947, 0.027280237382639665, -0.18608192334618395, -0.17719046885378723, 0.02632481328764226, -0.008276356178608923, -0.11829731973633312, 0.24994751055352157, 0.1719145533753768, -0.037452192260440914, 0.053305147804555725, -0.21085940819728902, -0.049218361706061454, -0.010756828993144436, -0.1370830280243069, -0.10476419302659684, -0.02085931916277154, 0.09267956470713444, -0.16723184212137557, 0.08439455378780303, 0.17324215130049656, 0.23832474945303386, -0.03896710138276134, 0.022763864863716076, 0.10446700694892812, -0.12101098595669657],
[0.09720159269182294, 0.10841833403298232, -0.13624375188268173, 0.17698214309337945, -0.061351741786586374, 0.04174314403393002, 0.3023380380540203, 0.013882815557234918, -0.16156112008365664, -0.23223264908701946, 0.13963279920148813, -0.055907270422838586, -0.07011469101335359, 0.07816312614794925, -0.19074655242640437, -0.1334449770184675, -0.1208409421236679, -0.1227146253581876, -0.20004271829896875, -0.2070717002226672, -0.07570648913967468, -0.061573138051664186, -0.12853236279629024, -0.10316151589218846, -0.0010616151429416396, -0.12379712775128712, -0.01032770608186732, -0.3709475843409666, -0.07803469291215918, -0.2767777002662802, 0.06132994551908956, -0.031734770352870596, 0.05231954875905161, -0.20270451143021284, -0.16519518913955308, 0.06299409587383632, 0.1515844272413884, 0.0706966082596919, -0.11451985410643505, -0.1599000178215602, 0.15590809524007287, 0.017321141139035236, -0.06008123110270013, 0.046407821228668066, 0.07717176995003759, -0.0226351489610591, -0.014144778808848188, -0.3035778967083723, 0.04910942019657426, 0.028904307705884376],
[-0.20908849913630198, -0.2947515144974091, 0.0948853672388619, 0.11029663547054476, -0.16051641480865497, 0.22642588201992864, 0.23708772807256337, -0.007523672885391238, -0.021679160797194723, 0.1780507056975991, -0.03633746349812419, -0.03936299729683905, -0.07458981366533024, 0.03842507369155097, 0.1422599725511691, 0.1965625971679531, 0.029290436322201373, 0.07475537965367304, -0.33555806266122845, -0.1388835930304606, -0.13080378953325475, 0.060670403101143834, 0.01884127770920282, 0.1384832830556403, -0.133416109180038, 0.0004836371660627683, 0.05201391815645144, 0.03762015600154396, 0.09112114299576436, -0.15187405262604933, -0.03676508503593242, 0.2236256723464851, -0.005226413708043102, 0.03916576159211493, 0.06213747287034201, 0.28451519920513507, -0.2816502344814292, 0.10510670295032723, -0.010786124795432976, -0.18842548394896658, -0.18208206253427361, -0.021976881257699338, 0.06694813586628483, -0.24466757354438212, -0.11642987247514375, 0.03895589143637633, -0.004587966511757268, -0.05831687653243597, -0.037883966213458825, -0.019799949403995952],
[0.014560075441365328, 0.053534940325775805, -0.19106677319123508, 0.05787295763666406, -0.1579173630594444, 0.14592166853454525, -0.21084038458428464, 0.12885676431607962, -0.08306336860463227, 0.010145524007035845, 0.08713398944902832, 0.07402091938056717, -0.013137604336071994, -0.1440211730602026, 0.09498268474775096, -0.20248689405413645, -0.09226570369991138, -0.12615303773729578, -0.04619145479153911, -0.1010815252416784, 0.23220760604298915, 0.024054897356661782, 0.10642200192428831, 0.09122348140273788, -0.09325412428049033, -0.019853125415257297, -0.22160129340773502, 0.0868595074936123, -0.2753834925608185, 0.056057952176785275, 0.3483824315346287, 0.1577499875778439, 0.12367379154053017, 0.0025769395829934086, 0.07652566306385111, 0.10867048133324264, -0.0416448414211638, -0.23045030953498, 0.10052220851210074, -0.07702063461780613, -0.14111081710534515, -0.18217329605421945, 0.2558673848749977, 0.13823128542531715, 0.004684871910373344, 0.035504257341361666, -0.11617856125572094, -0.11517897054597628, 0.06763811625952221, -0.2876156812251252],
[0.1404932460080464, -0.09393306280279555, -0.10088292433092293, -0.11283324329527794, -0.08025000738432389, 0.07835843602207514, -0.1059967540744111, -0.16232378197660308, 0.002136832725109487, -0.2631641653825679, -0.09014767138056007, 0.041139381797628445, 0.034029237870025486, -0.3153245424519863, 0.16285372220955688, -0.057518835806209395, 0.32369790194839265, 0.06521673446992549, -0.14618614374500338, 0.15991961333474233, -0.010110480877169984, 0.2056600500983576, -0.03335997574071633, -0.05277015985173178, 0.16224873159890585, -0.12982269519749948, -0.039596821064528304, -0.1118173344290603, 0.3561704945578816, -0.03948108178116315, 0.2066993265795226, -0.02195997355752005, 0.20826507754837933, -0.051530627874275876, 0.2645263010334456, -0.004957615915925493, 0.05519428463423369, -0.06150966552884851, -0.15451662206262684, -0.17298818411626035, -0.02541999354132042, -0.02746877104380231, -0.25753886675851445, -0.059263852646767624, 0.051240278181066544, 0.05169052973072976, -0.046261239239293865, 0.02618746937354447, 0.04058523918618707, -0.007330001215441655],
[0.053238366937102544, -0.14414374998355547, -0.19128345242809458, -0.1212795175582309, -0.062041159030865975, -0.08814459542309903, 0.10336350598402722, 0.31082192075728254, -0.06472458891173684, -0.022819088099331548, -0.05248674875249396, 0.14645376882186434, 0.06030541801995156, -0.11934156115475718, 0.1582952845187834, 0.1012946508842709, 0.003517954495788954, -0.08603448404039625, 0.13114034685357234, -0.12472932174833458, 0.06384787152920729, -0.16223942876329497, 0.2105646303917635, 0.053586191487235806, -0.22236430925114486, -0.003241012849387476, -0.10435150589357728, -0.0013066738801647104, -0.0003316179608114471, -0.1379393637722831, -0.03010882000161903, -0.3432268535498913, -0.07574716172741648, 0.004990345160459931, 0.10853708375898011, -0.17111803679093807, 0.02452039834594816, 0.2368390219860048, -0.016938300152503274, 0.03493391264355569, -0.3805392642339704, -0.13249024614915106, -0.16730236714838873, -0.05210888523940232, 0.10323688295412355, -0.20701012895415336, -0.02452176932185337, -0.16487382581194274, -0.031760194386503245, 0.16674806887198618],
[0.16216385616248383, -0.04688831214518566, -0.12379361574513689, 0.13283777983750128, 0.10081533369703505, -0.07880115103294315, 0.059813576587519526, -0.00637048819416764, -0.07690158979252128, 0.03020980107938395, -0.1437867665874132, -0.013291502466450925, -0.12423459480516749, 0.03873862157813516, 0.061022413253352496, 0.06834768198356243, -0.11123009623270576, 0.19958552967932905, 0.02335948850884561, 0.06284773627534035, 0.09913562714566883, 0.026569338243576993, -0.29799215731854467, -0.02945768220431876, 0.006387965774914891, -0.059680324910581, 0.22305144612002062, 0.33979324690258955, -0.15373829686581042, -0.02869269866115274, -0.0291025811334324, -0.026628403759817686, 0.20913166445505835, 0.04275570397121452, 0.00861121504002218, 0.12739298903716487, -0.19538391870889987, 0.028519054953177806, -0.08172613813082646, 0.06773111201814995, -0.07289695649383057, 0.2348354686228396, -0.1791243236258637, 0.10667147621586978, 0.3751749819156953, -0.11924100069186716, -0.2927652021376737, -0.10684861782185531, 0.17911088040947595, -0.11649462309081006]])
def __init__(self, num_variables, phenome_preprocessor=None, **kwargs):
self.is_deterministic = True
self.do_maximize = False
self.num_variables = num_variables
self.min_bounds = [-100.0] * num_variables
self.max_bounds = [100.0] * num_variables
self.matrices = dict()
self.matrices[2] = self.matrix2D
self.matrices[10] = self.matrix10D
self.matrices[30] = self.matrix30D
self.matrices[50] = self.matrix50D
self.ellipsoid_function = EllipsoidFunction(1.0e6)
bounds = (self.min_bounds, self.max_bounds)
preprocessor = BoundConstraintsChecker(bounds, phenome_preprocessor)
TestProblem.__init__(self, self.objective_function,
phenome_preprocessor=preprocessor,
**kwargs)
def objective_function(self, phenome):
phenome = np.array([phene - offset for offset, phene in zip(self.offsets, phenome)])
phenome = np.dot(phenome, self.matrices[self.num_variables])
assert len(phenome) == self.num_variables
obj_value = self.ellipsoid_function(phenome) + self.bias
return obj_value
def get_optimal_solutions(self, max_number=None):
return [Individual(self.offsets[:self.num_variables])]
class F4(F2):
"""Shifted double-sum with noise."""
def __init__(self, num_variables, phenome_preprocessor=None, **kwargs):
F2.__init__(self, num_variables, phenome_preprocessor, **kwargs)
self.is_deterministic = False
def objective_function(self, phenome):
obj_value = F2.objective_function(self, phenome) - self.bias
#obj_value *= (1.0 + 0.4 * random.gauss(0, 1))
obj_value *= (1.0 + 0.4 * abs(random.gauss(0, 1)))
obj_value += self.bias
return obj_value
class F5(TestProblem):
"""Schwefel's problem 2.6 with global optimum on bounds."""
bias = -310.0
offsets = [-5.5559, 7.947, -1.538, 8.3897, 7.7182, -8.3147, -2.1423,
-2.4392, -3.3787, -7.3047, 3.058, 6.7613, 2.3444, 5.6514,
1.0491, -0.8324, 1.3039, -0.0651, 0.0424, -6.5176, -8.6977,
2.7053, -1.4842, -8.8158, 5.6475, -4.5999, 3.6337, -6.4068,
4.8867, 8.2225, 6.6873, -5.8862, 2.5925, 0.8027, 7.5525, 4.2621,
3.5091, -2.6055, -8.4063, 6.1947, -6.5024, -8.144, -4.8444,
3.1572, 3.9624, -8.4969, 6.2642, 1.1448, 3.9132, 3.614, -8.4785,
0.2955, 3.5597, -5.5854, -8.9173, 4.0627, 8.387, -3.768, 5.9001,
3.8212, -6.4771, 6.8886, -2.4951, 2.5007, 1.3866, -7.3488,
-1.5349, 2.9223, 7.1813, -4.799, 8.3061, -8.7911, -6.3035,
-6.1222, 5.7116, 7.4369, 6.1738, -7.1118, 3.7062, 6.1274,1.3696,
-4.5894, 4.5844, -1.2133, 4.18, 0.3337, 7.3355, 8.16, 1.4422,
7.9909, -8.1183, -6.8285, -2.9079, 0.2028, -6.2375, 0.1294,
0.1474, 2.6981, 0.4233, 6.1942]
A = np.array([[-89.0, -28.0, -73.0, 49.0, 50.0, 81.0, 21.0, -22.0, -35.0, 74.0, 62.0, 18.0, 16.0, 6.0, 94.0, 58.0, -83.0, 70.0, -5.0, -16.0, 80.0, -67.0, -7.0, -20.0, -27.0, 75.0, -9.0, -24.0, 73.0, 18.0, 82.0, -44.0, -20.0, -3.0, 72.0, 52.0, 80.0, -11.0, -31.0, 19.0, 91.0, -49.0, -30.0, 64.0, 90.0, 35.0, 72.0, 16.0, 27.0, 36.0, -46.0, 74.0, -35.0, 36.0, 63.0, 46.0, -73.0, 73.0, 38.0, 89.0, -68.0, -43.0, 98.0, 57.0, 70.0, -15.0, -59.0, 2.0, -29.0, 55.0, 31.0, 29.0, -59.0, 31.0, -11.0, 18.0, 47.0, 87.0, 72.0, 44.0, -55.0, -55.0, 93.0, 57.0, 95.0, -24.0, 15.0, 2.0, 60.0, -79.0, 33.0, -25.0, -63.0, 36.0, 93.0, -87.0, 37.0, -33.0, -61.0, 24.0],
[8.0, -23.0, -1.0, -98.0, -94.0, -53.0, -85.0, 92.0, 57.0, 77.0, 41.0, -39.0, 96.0, -61.0, 97.0, -62.0, -84.0, -99.0, -74.0, 15.0, 61.0, 87.0, -77.0, -71.0, 64.0, 12.0, -76.0, -18.0, 27.0, 15.0, 24.0, 58.0, -68.0, -32.0, 26.0, -65.0, -45.0, -76.0, -42.0, 5.0, 97.0, 5.0, -22.0, -53.0, -48.0, -61.0, 77.0, 82.0, -18.0, 58.0, -81.0, 79.0, -91.0, -6.0, -58.0, 26.0, -80.0, -50.0, -63.0, -14.0, 33.0, 82.0, -35.0, 16.0, 9.0, -24.0, -73.0, -50.0, -5.0, -5.0, 24.0, -76.0, -32.0, -7.0, 28.0, -63.0, 13.0, 73.0, -59.0, -98.0, -83.0, 56.0, -69.0, 14.0, -7.0, 47.0, 85.0, -72.0, -29.0, -3.0, 79.0, 91.0, -87.0, -27.0, -17.0, -48.0, -11.0, -58.0, 49.0, -26.0],
[-28.0, 49.0, -9.0, 80.0, 50.0, -53.0, -9.0, -83.0, -71.0, 3.0, 65.0, 31.0, -39.0, -42.0, 53.0, -79.0, -83.0, -69.0, -94.0, 41.0, -21.0, -17.0, 88.0, -63.0, -97.0, -62.0, 45.0, 89.0, 15.0, -27.0, 96.0, -79.0, -99.0, -96.0, -49.0, 97.0, -38.0, -33.0, -3.0, 66.0, -8.0, -32.0, -8.0, -39.0, -52.0, 82.0, -26.0, 50.0, 13.0, 93.0, -94.0, 30.0, 43.0, 21.0, 13.0, -53.0, -30.0, 94.0, 72.0, 59.0, 75.0, -89.0, -65.0, 34.0, 2.0, -58.0, -53.0, 8.0, -18.0, -22.0, 54.0, -58.0, 41.0, 52.0, -79.0, 49.0, -33.0, 93.0, -5.0, 91.0, -15.0, -59.0, -39.0, 24.0, 27.0, 98.0, -28.0, 26.0, 41.0, 50.0, -46.0, 38.0, -93.0, 0.0, 57.0, -73.0, 27.0, -38.0, 69.0, 25.0],
[33.0, 59.0, 87.0, 40.0, 37.0, 68.0, -54.0, -97.0, 21.0, 75.0, 75.0, 46.0, -25.0, -31.0, 65.0, -96.0, -46.0, 77.0, -98.0, 3.0, 46.0, -48.0, 53.0, 65.0, 45.0, -43.0, 22.0, 96.0, -53.0, 99.0, -26.0, 97.0, 91.0, 83.0, -33.0, -93.0, -73.0, 32.0, 8.0, -81.0, -92.0, -24.0, 63.0, 12.0, -75.0, 77.0, -51.0, -86.0, 35.0, -34.0, 13.0, 39.0, 92.0, 79.0, -82.0, -12.0, 7.0, 0.0, 75.0, 91.0, -65.0, 24.0, 43.0, 69.0, 71.0, 40.0, -2.0, 44.0, 4.0, 89.0, 91.0, 50.0, 30.0, 64.0, -2.0, 87.0, -65.0, 98.0, 25.0, 12.0, -97.0, -70.0, -69.0, -52.0, 86.0, -48.0, 19.0, 29.0, -9.0, -71.0, -45.0, -48.0, -54.0, -24.0, -68.0, -40.0, 71.0, -49.0, -47.0, 81.0],
[39.0, 35.0, 8.0, -43.0, 82.0, 67.0, -58.0, 22.0, -98.0, 68.0, -20.0, -29.0, 11.0, 70.0, 77.0, 72.0, 24.0, -14.0, -83.0, -82.0, 96.0, 12.0, -78.0, -65.0, -26.0, -74.0, -83.0, -49.0, -91.0, 35.0, -99.0, 16.0, -68.0, 83.0, -10.0, -72.0, 7.0, 5.0, -79.0, 35.0, -69.0, 81.0, 22.0, -12.0, -73.0, 39.0, 72.0, 24.0, 4.0, 61.0, -47.0, 87.0, -31.0, 89.0, 1.0, 91.0, 64.0, 56.0, -39.0, -54.0, -99.0, 71.0, 93.0, -2.0, -48.0, 48.0, 65.0, -81.0, 53.0, 28.0, 35.0, 13.0, 92.0, 82.0, -63.0, -49.0, -85.0, 26.0, -51.0, 23.0, -54.0, 93.0, 45.0, 13.0, -92.0, 34.0, -67.0, 49.0, 24.0, 21.0, -83.0, -5.0, 69.0, -58.0, -20.0, 70.0, 87.0, 31.0, -79.0, 61.0],
[51.0, 80.0, 4.0, -28.0, -46.0, 22.0, -44.0, 33.0, -57.0, -39.0, -37.0, 74.0, 47.0, 60.0, -83.0, 84.0, -77.0, -95.0, -47.0, -43.0, 17.0, 0.0, 11.0, 68.0, 4.0, 36.0, 56.0, 52.0, 26.0, -44.0, 33.0, 83.0, 79.0, 41.0, -22.0, 10.0, 71.0, -59.0, 48.0, 98.0, 84.0, 91.0, 63.0, -95.0, -25.0, -52.0, 59.0, 88.0, 64.0, -92.0, 90.0, -23.0, -72.0, -45.0, -23.0, 22.0, -76.0, -2.0, -74.0, -81.0, -41.0, 10.0, 25.0, -5.0, 78.0, -52.0, -70.0, 92.0, -19.0, 2.0, 74.0, 44.0, -36.0, 1.0, 66.0, 61.0, -14.0, -59.0, -3.0, 0.0, 17.0, 66.0, 19.0, 56.0, 2.0, 37.0, 81.0, -48.0, -89.0, 24.0, -100.0, -45.0, -4.0, 64.0, 64.0, -19.0, 46.0, 67.0, 64.0, 53.0],
[-18.0, -48.0, 13.0, 50.0, -24.0, -89.0, 35.0, 21.0, 64.0, -70.0, -24.0, -18.0, -20.0, 6.0, 28.0, 94.0, -22.0, -62.0, -84.0, -11.0, -36.0, 53.0, 57.0, -78.0, -30.0, -93.0, -44.0, -56.0, -62.0, 89.0, 6.0, 89.0, -22.0, -73.0, 92.0, 84.0, 51.0, 73.0, -77.0, -22.0, -74.0, 96.0, 83.0, -32.0, -60.0, -43.0, -58.0, 31.0, 95.0, 1.0, -32.0, 32.0, 0.0, -96.0, 53.0, -46.0, 62.0, -22.0, 31.0, -47.0, 73.0, 75.0, 63.0, 47.0, 19.0, 89.0, -58.0, -25.0, 58.0, 93.0, -11.0, 90.0, 40.0, -5.0, 17.0, -69.0, 10.0, 87.0, 3.0, 93.0, 0.0, -46.0, 22.0, -5.0, 94.0, 43.0, 15.0, 39.0, -50.0, 65.0, -23.0, -4.0, -22.0, -83.0, -66.0, -68.0, 81.0, 85.0, -76.0, 7.0],
[-2.0, 35.0, 27.0, 36.0, -44.0, 3.0, -84.0, 33.0, 71.0, -71.0, 56.0, 66.0, 49.0, -70.0, -86.0, 67.0, 77.0, 93.0, 80.0, -5.0, 98.0, -82.0, 58.0, -38.0, -70.0, -32.0, -46.0, 40.0, -7.0, -65.0, 63.0, 10.0, 58.0, 36.0, -6.0, -12.0, 41.0, 79.0, 31.0, -15.0, 46.0, -12.0, 54.0, 90.0, 43.0, 4.0, -85.0, 23.0, -59.0, 52.0, 93.0, -71.0, -61.0, -3.0, -81.0, 5.0, 54.0, -58.0, 70.0, 48.0, 56.0, -37.0, 21.0, 94.0, -44.0, 31.0, -62.0, -83.0, 49.0, 12.0, -96.0, 71.0, -4.0, 76.0, 97.0, -39.0, 62.0, 80.0, 33.0, -52.0, -34.0, -23.0, 7.0, -84.0, -69.0, 99.0, 38.0, 24.0, -30.0, -84.0, -94.0, 13.0, 6.0, 33.0, -21.0, 12.0, 67.0, -11.0, 33.0, 3.0],
[19.0, -28.0, -47.0, -94.0, 53.0, 52.0, 29.0, 59.0, -44.0, 14.0, -15.0, -35.0, -70.0, -42.0, 44.0, 46.0, -72.0, 34.0, 4.0, 35.0, 47.0, -61.0, 9.0, 39.0, -69.0, 14.0, -72.0, -12.0, 9.0, 91.0, 73.0, 14.0, 24.0, -4.0, 42.0, -14.0, 4.0, 80.0, -30.0, 76.0, 29.0, 25.0, 40.0, 16.0, -12.0, 44.0, 57.0, -80.0, 51.0, 43.0, 14.0, -59.0, 73.0, -64.0, 91.0, -88.0, -93.0, 96.0, 56.0, -21.0, -96.0, -26.0, 82.0, -42.0, 13.0, -48.0, -15.0, -23.0, 45.0, 35.0, 81.0, -3.0, 28.0, 27.0, 34.0, -70.0, 49.0, 18.0, 14.0, 90.0, 100.0, -66.0, 23.0, -95.0, -8.0, 98.0, -63.0, -76.0, 4.0, -58.0, 57.0, -43.0, 34.0, 50.0, -16.0, 97.0, 71.0, 15.0, 63.0, -55.0],
[16.0, -26.0, 52.0, -4.0, -65.0, -11.0, -97.0, -80.0, 18.0, -64.0, -93.0, 69.0, 56.0, 91.0, -44.0, -71.0, -49.0, 30.0, -32.0, -83.0, -34.0, 40.0, 83.0, 15.0, 26.0, 82.0, 6.0, 57.0, 80.0, 68.0, 2.0, -88.0, -7.0, 7.0, -15.0, 55.0, 96.0, -6.0, 80.0, -72.0, 78.0, -41.0, 84.0, -7.0, 2.0, -72.0, 50.0, 31.0, -5.0, -86.0, -19.0, 75.0, -26.0, -4.0, 6.0, 57.0, 56.0, -66.0, -30.0, -68.0, 92.0, -19.0, -23.0, 57.0, 78.0, 23.0, -67.0, 66.0, -36.0, -89.0, 23.0, -7.0, 71.0, -55.0, 49.0, -54.0, 89.0, -71.0, -85.0, 90.0, -21.0, -42.0, 70.0, 9.0, -75.0, -92.0, 86.0, -11.0, 66.0, -10.0, 39.0, 88.0, -4.0, 88.0, 73.0, 15.0, 83.0, -50.0, 94.0, 60.0],
[54.0, 36.0, -1.0, 84.0, 83.0, -66.0, 66.0, -53.0, 1.0, -91.0, 73.0, -71.0, 23.0, 42.0, 41.0, -34.0, 36.0, 82.0, 56.0, 42.0, -5.0, -2.0, 87.0, 25.0, 40.0, 24.0, 77.0, 52.0, 4.0, -96.0, -64.0, -70.0, -96.0, -26.0, 50.0, 88.0, 83.0, -57.0, 69.0, -93.0, 19.0, -4.0, -70.0, 100.0, 84.0, 83.0, 56.0, -34.0, 37.0, 33.0, 0.0, -96.0, -69.0, -12.0, 98.0, 81.0, -26.0, 69.0, 69.0, 61.0, 24.0, -19.0, 0.0, 78.0, -32.0, -70.0, 46.0, -12.0, 22.0, -34.0, -10.0, -32.0, 55.0, -9.0, -60.0, 22.0, -87.0, 39.0, -45.0, 9.0, 3.0, 7.0, 73.0, 47.0, 8.0, -41.0, 82.0, -41.0, 94.0, -14.0, -56.0, 8.0, -33.0, -51.0, 34.0, -48.0, -48.0, 41.0, 7.0, 60.0],
[21.0, 58.0, -18.0, -30.0, 51.0, -29.0, 91.0, 16.0, 28.0, 62.0, -75.0, 45.0, -68.0, -62.0, 18.0, -38.0, -65.0, -67.0, -41.0, -39.0, -30.0, 76.0, 58.0, 11.0, -49.0, -86.0, -45.0, -93.0, 41.0, 30.0, -16.0, -48.0, -7.0, -67.0, -39.0, -96.0, -92.0, -28.0, -4.0, -95.0, 99.0, -36.0, 85.0, 64.0, -33.0, 38.0, 17.0, 96.0, 64.0, 12.0, 35.0, 90.0, -22.0, -28.0, -37.0, 58.0, 48.0, 23.0, -52.0, -2.0, -12.0, 41.0, 24.0, 20.0, -1.0, -99.0, 8.0, -49.0, -49.0, 43.0, 37.0, -59.0, 57.0, -61.0, 47.0, -31.0, -43.0, -87.0, -22.0, -80.0, 72.0, -45.0, 1.0, -61.0, -13.0, 92.0, 22.0, -2.0, 90.0, -77.0, -33.0, 34.0, 85.0, 94.0, 55.0, -26.0, 89.0, 80.0, -54.0, 85.0],
[99.0, 47.0, 2.0, -55.0, 100.0, -22.0, 5.0, 38.0, 88.0, 47.0, -92.0, 50.0, 96.0, -34.0, 11.0, -7.0, -17.0, 98.0, 94.0, -58.0, -94.0, -2.0, 83.0, -99.0, 18.0, -27.0, -74.0, -43.0, 43.0, 18.0, 68.0, -27.0, 42.0, 21.0, -73.0, -87.0, -94.0, -98.0, 73.0, -96.0, 95.0, 25.0, 27.0, 51.0, 74.0, 25.0, -54.0, -10.0, 44.0, -3.0, 41.0, 6.0, 78.0, 65.0, -64.0, -75.0, 54.0, 86.0, -92.0, -93.0, 41.0, 70.0, -45.0, 92.0, -83.0, 20.0, 39.0, 30.0, -13.0, 90.0, -45.0, -84.0, -45.0, -69.0, 8.0, -17.0, 18.0, 43.0, 98.0, -23.0, 28.0, 35.0, 34.0, 66.0, 16.0, 54.0, 40.0, -17.0, -93.0, 39.0, -69.0, -2.0, -47.0, -95.0, 80.0, -64.0, -25.0, -42.0, 28.0, 26.0],
[18.0, 69.0, -63.0, -2.0, -43.0, -18.0, 55.0, 82.0, 21.0, -89.0, -95.0, 63.0, 60.0, -65.0, -5.0, 7.0, -67.0, -95.0, -34.0, 40.0, -25.0, 10.0, -55.0, 49.0, 21.0, 37.0, 64.0, -5.0, -15.0, -85.0, -67.0, 94.0, -57.0, -53.0, -40.0, -81.0, -82.0, -69.0, -79.0, 97.0, -69.0, -30.0, 93.0, -18.0, 64.0, 24.0, -53.0, 35.0, 64.0, 21.0, -77.0, 33.0, -63.0, -29.0, 41.0, 59.0, -83.0, 59.0, -49.0, 80.0, -41.0, -6.0, -70.0, -78.0, 73.0, -21.0, -21.0, 59.0, -66.0, 86.0, -34.0, 36.0, 35.0, 25.0, 52.0, 27.0, -28.0, -89.0, 65.0, 16.0, 1.0, -82.0, 81.0, 70.0, 93.0, 44.0, -79.0, -91.0, -82.0, -80.0, -54.0, -68.0, 53.0, -88.0, -92.0, -78.0, -8.0, -91.0, 43.0, 68.0],
[55.0, -62.0, 77.0, 97.0, -87.0, -7.0, 15.0, 55.0, -22.0, -89.0, 18.0, 27.0, -97.0, 60.0, 6.0, 77.0, -45.0, 33.0, 9.0, -73.0, -23.0, 54.0, 64.0, 52.0, -96.0, 78.0, 40.0, 65.0, -82.0, 66.0, 53.0, -78.0, 15.0, 83.0, 81.0, 13.0, -23.0, 42.0, 95.0, -85.0, -7.0, -42.0, 57.0, 66.0, -92.0, 54.0, -38.0, -24.0, 26.0, 41.0, -97.0, 3.0, -81.0, 12.0, -13.0, 29.0, -12.0, 52.0, 39.0, 84.0, 19.0, -26.0, 11.0, 77.0, -83.0, 96.0, 71.0, -87.0, -35.0, -78.0, -9.0, -90.0, -64.0, -97.0, 39.0, 36.0, -84.0, -45.0, -26.0, -62.0, 2.0, 43.0, -93.0, -80.0, -86.0, 86.0, -12.0, 13.0, 38.0, 74.0, -10.0, 47.0, -36.0, -32.0, 48.0, 99.0, -3.0, 31.0, -13.0, -36.0],
[-28.0, -33.0, -97.0, -67.0, 98.0, -44.0, 89.0, -26.0, 9.0, -22.0, -8.0, -78.0, -11.0, 29.0, 93.0, -88.0, 56.0, 3.0, -35.0, 6.0, 72.0, -10.0, -22.0, 33.0, 88.0, 80.0, -38.0, -28.0, 36.0, -40.0, -79.0, -49.0, 62.0, 59.0, 87.0, -44.0, -48.0, -45.0, -55.0, 29.0, -39.0, -32.0, 63.0, -29.0, -37.0, -10.0, 19.0, -26.0, -5.0, -90.0, -30.0, -9.0, -1.0, 52.0, -58.0, 59.0, -68.0, -98.0, -50.0, -31.0, 71.0, -17.0, 13.0, 93.0, -28.0, -63.0, 82.0, -70.0, -11.0, 66.0, 62.0, -73.0, -59.0, -4.0, 31.0, -82.0, -71.0, -72.0, -99.0, -12.0, -78.0, -20.0, -76.0, 35.0, 94.0, 36.0, -89.0, 1.0, -38.0, -22.0, -39.0, -77.0, -89.0, -37.0, -24.0, -31.0, -95.0, -71.0, -12.0, 89.0],
[92.0, 35.0, 96.0, -13.0, -6.0, -47.0, 16.0, -25.0, -7.0, 27.0, 42.0, -19.0, -41.0, -72.0, 76.0, -61.0, 84.0, 6.0, -87.0, 31.0, 36.0, -50.0, -67.0, -82.0, 84.0, 71.0, 21.0, -64.0, -28.0, 1.0, -63.0, 53.0, -72.0, -54.0, -40.0, -89.0, 21.0, 100.0, 31.0, -82.0, -1.0, -13.0, 25.0, -36.0, -2.0, 21.0, -59.0, 44.0, 33.0, -18.0, -13.0, 5.0, -27.0, -33.0, 8.0, -59.0, 35.0, -71.0, 68.0, 95.0, 20.0, -13.0, -1.0, 75.0, -94.0, -71.0, 90.0, -31.0, 10.0, -53.0, -24.0, 50.0, -79.0, 79.0, -48.0, -43.0, -1.0, -92.0, 77.0, -11.0, -35.0, 21.0, 15.0, 70.0, 85.0, 60.0, -58.0, -64.0, 60.0, -31.0, -60.0, 28.0, 58.0, 45.0, -63.0, 6.0, -34.0, 77.0, 92.0, 20.0],
[82.0, -24.0, -36.0, 42.0, 60.0, 56.0, -56.0, 51.0, -95.0, -33.0, 57.0, 67.0, -82.0, -23.0, 93.0, 85.0, -33.0, 40.0, 67.0, 53.0, 36.0, 69.0, -88.0, -51.0, 44.0, -62.0, -77.0, -66.0, 45.0, -63.0, -2.0, -2.0, 37.0, -80.0, 86.0, -66.0, -13.0, 51.0, -84.0, 51.0, 55.0, -70.0, 76.0, 88.0, 50.0, 10.0, 18.0, 72.0, -16.0, 10.0, 9.0, -30.0, -89.0, 13.0, -2.0, -12.0, -23.0, 73.0, -88.0, 43.0, 7.0, -57.0, 90.0, -4.0, 3.0, 84.0, 4.0, 0.0, -37.0, 62.0, 8.0, -12.0, 18.0, 83.0, 1.0, 97.0, -70.0, -99.0, 98.0, -86.0, 45.0, -67.0, -11.0, 90.0, 67.0, -49.0, 26.0, 71.0, -50.0, 93.0, 97.0, -58.0, -69.0, -17.0, 11.0, 22.0, -96.0, 90.0, 6.0, -7.0],
[-92.0, 75.0, -12.0, 32.0, -32.0, 58.0, -57.0, 33.0, -74.0, 42.0, -28.0, 8.0, 83.0, -29.0, 32.0, 31.0, 73.0, 60.0, 26.0, -91.0, 59.0, -3.0, 28.0, -9.0, -31.0, -17.0, -90.0, 29.0, -68.0, -33.0, 32.0, -33.0, -88.0, -22.0, 70.0, -24.0, 36.0, 39.0, 74.0, -80.0, 85.0, -77.0, 26.0, -54.0, 78.0, -59.0, 7.0, -2.0, -37.0, -64.0, 53.0, 62.0, 26.0, 48.0, 51.0, 6.0, 72.0, 25.0, -99.0, 3.0, 31.0, 33.0, -31.0, 60.0, -30.0, 99.0, -45.0, -66.0, 35.0, -15.0, 84.0, 6.0, 5.0, -13.0, 80.0, 80.0, -51.0, 63.0, -50.0, 52.0, 46.0, -50.0, -52.0, -1.0, -49.0, 36.0, 37.0, 68.0, -53.0, -54.0, -77.0, -21.0, -73.0, -40.0, 87.0, -35.0, 47.0, -19.0, 92.0, 55.0],
[31.0, 29.0, 77.0, -33.0, 51.0, -2.0, 54.0, -86.0, 45.0, -32.0, 92.0, -61.0, 5.0, 39.0, -25.0, 43.0, -65.0, -48.0, -21.0, 82.0, 8.0, 58.0, 79.0, -75.0, 91.0, 33.0, -8.0, -78.0, -37.0, -42.0, -41.0, -26.0, 44.0, 9.0, 79.0, -92.0, 85.0, 9.0, 56.0, 47.0, -20.0, 39.0, -97.0, 16.0, -30.0, 10.0, -17.0, 56.0, -40.0, -10.0, 67.0, 89.0, -54.0, 84.0, -8.0, 43.0, 84.0, -47.0, -50.0, -41.0, 43.0, 71.0, 75.0, 73.0, 69.0, 87.0, -73.0, -56.0, -74.0, 32.0, -36.0, -67.0, -97.0, -28.0, -62.0, 36.0, 8.0, -12.0, 64.0, 66.0, 60.0, -58.0, 76.0, 19.0, 15.0, -3.0, 85.0, -35.0, 46.0, 62.0, -100.0, -85.0, -93.0, 17.0, -28.0, -76.0, 98.0, -15.0, -28.0, 0.0],
[-53.0, -19.0, -70.0, -96.0, 6.0, -61.0, 75.0, 78.0, 34.0, -10.0, 9.0, 88.0, 51.0, -42.0, -87.0, -80.0, 19.0, 46.0, 35.0, 65.0, 21.0, -90.0, -38.0, 82.0, 75.0, 64.0, -55.0, 33.0, 29.0, 19.0, 86.0, 72.0, -33.0, 96.0, 29.0, 93.0, 28.0, 31.0, -40.0, -14.0, 34.0, -99.0, 77.0, -62.0, -46.0, 60.0, -77.0, 34.0, -68.0, 78.0, 11.0, 8.0, -3.0, 57.0, 49.0, -39.0, 0.0, -75.0, 59.0, -31.0, -55.0, 82.0, -34.0, 30.0, -2.0, -3.0, 69.0, 80.0, 6.0, -62.0, -10.0, -86.0, 86.0, 90.0, 1.0, 81.0, 62.0, -26.0, 57.0, 24.0, 72.0, 28.0, 63.0, -21.0, -79.0, 0.0, -18.0, -64.0, -22.0, -37.0, -67.0, -25.0, 50.0, 88.0, 46.0, 42.0, -93.0, 1.0, -68.0, 81.0],
[82.0, 71.0, -52.0, -22.0, 12.0, 20.0, -61.0, 67.0, 62.0, 56.0, -31.0, -51.0, 36.0, -59.0, -76.0, 64.0, -26.0, 74.0, -40.0, 90.0, 68.0, 54.0, 32.0, -51.0, -65.0, 98.0, -44.0, -53.0, 72.0, -18.0, -66.0, 24.0, -24.0, -32.0, 65.0, 69.0, 77.0, 47.0, 63.0, 37.0, -44.0, 43.0, 92.0, 80.0, -66.0, 83.0, 57.0, 67.0, -28.0, 25.0, -39.0, 23.0, -22.0, -39.0, -96.0, 21.0, 4.0, 12.0, 7.0, 55.0, -18.0, -64.0, -7.0, -14.0, 3.0, -72.0, 91.0, -42.0, -79.0, -60.0, -57.0, 96.0, -30.0, 1.0, 46.0, 11.0, -43.0, 0.0, -69.0, -44.0, -62.0, -59.0, -82.0, -61.0, 65.0, 0.0, -75.0, 17.0, 90.0, -94.0, -73.0, 9.0, -93.0, 8.0, -18.0, 75.0, 63.0, 76.0, -25.0, 33.0],
[83.0, -51.0, 19.0, -73.0, 39.0, -12.0, -40.0, -68.0, -82.0, -47.0, -76.0, 47.0, -29.0, 42.0, 28.0, -11.0, -74.0, 23.0, -32.0, -10.0, -24.0, -29.0, 62.0, -3.0, 92.0, -6.0, 74.0, -2.0, -19.0, -53.0, 62.0, 16.0, 23.0, -43.0, -23.0, 18.0, -58.0, 5.0, 41.0, -28.0, -99.0, 38.0, -81.0, -48.0, 18.0, 35.0, 56.0, -91.0, 12.0, -77.0, 93.0, -50.0, -11.0, -79.0, 71.0, -30.0, 1.0, 90.0, 38.0, 50.0, 1.0, 60.0, -54.0, -77.0, -5.0, -86.0, -63.0, 85.0, -46.0, -38.0, 42.0, -81.0, 54.0, 53.0, -60.0, 92.0, -46.0, 83.0, 68.0, 49.0, 7.0, 64.0, -64.0, -9.0, -90.0, 63.0, 44.0, 81.0, -97.0, -82.0, -85.0, -41.0, -50.0, 93.0, 0.0, -63.0, 7.0, 56.0, 20.0, 57.0],
[29.0, -92.0, 90.0, 29.0, -39.0, -42.0, -89.0, -86.0, -79.0, 68.0, -99.0, 94.0, -73.0, 36.0, -85.0, -34.0, 73.0, -65.0, -25.0, -25.0, -67.0, 20.0, 37.0, -39.0, -77.0, -44.0, 98.0, 84.0, 78.0, -18.0, 92.0, -64.0, -64.0, 95.0, 69.0, 79.0, 31.0, -11.0, 89.0, 39.0, 0.0, -31.0, -37.0, 52.0, -71.0, -91.0, -18.0, 29.0, -99.0, -33.0, 63.0, 82.0, -23.0, -62.0, -75.0, 48.0, -95.0, 83.0, 53.0, 5.0, 74.0, 55.0, 94.0, 30.0, 55.0, 4.0, 3.0, 34.0, -79.0, 94.0, -96.0, -34.0, -13.0, -69.0, 11.0, 60.0, 45.0, -24.0, 78.0, 36.0, -65.0, 30.0, 46.0, 28.0, 34.0, 56.0, 24.0, -7.0, 69.0, 12.0, -1.0, 88.0, -8.0, 71.0, -24.0, -67.0, 70.0, -98.0, 61.0, -81.0],
[-22.0, -8.0, 67.0, 40.0, -39.0, 47.0, 46.0, 86.0, -30.0, -59.0, -41.0, 35.0, -85.0, -75.0, 0.0, 59.0, -12.0, -97.0, -5.0, -32.0, 37.0, 3.0, -19.0, -74.0, -42.0, -7.0, -30.0, -25.0, -7.0, -51.0, 32.0, -21.0, -5.0, -56.0, -5.0, 67.0, 81.0, -64.0, -84.0, 90.0, 89.0, 16.0, -92.0, 17.0, -98.0, -1.0, -21.0, -99.0, -18.0, 8.0, -46.0, -1.0, -92.0, -10.0, -97.0, 98.0, -72.0, 62.0, 15.0, -57.0, 24.0, 43.0, -87.0, 85.0, 29.0, 80.0, 31.0, 33.0, 48.0, 0.0, -98.0, 82.0, -86.0, -12.0, -29.0, -94.0, -69.0, -20.0, -37.0, -8.0, -96.0, 93.0, -18.0, -69.0, 11.0, 53.0, -46.0, 16.0, -81.0, 57.0, 47.0, 74.0, -86.0, 18.0, 73.0, 35.0, 22.0, -89.0, 22.0, 30.0],
[1.0, -20.0, 63.0, -45.0, -91.0, -82.0, -13.0, -45.0, 83.0, 42.0, -83.0, 27.0, 61.0, 51.0, -74.0, 21.0, -68.0, -48.0, -83.0, -37.0, 12.0, 74.0, -43.0, -86.0, -2.0, 37.0, -41.0, -65.0, 23.0, -41.0, -52.0, -36.0, 12.0, -42.0, 70.0, 61.0, -23.0, -27.0, 77.0, -84.0, 22.0, 53.0, -99.0, -36.0, -11.0, -87.0, -86.0, -62.0, 97.0, -51.0, -51.0, -52.0, -15.0, -29.0, 100.0, -20.0, -41.0, 50.0, -53.0, 71.0, -32.0, -43.0, 83.0, -51.0, -26.0, -36.0, -90.0, 76.0, -35.0, -91.0, 38.0, 0.0, 45.0, -87.0, -25.0, -8.0, -88.0, 18.0, -37.0, -44.0, 33.0, -96.0, -24.0, -69.0, 79.0, 58.0, -97.0, -64.0, 46.0, -59.0, -40.0, -56.0, 3.0, 75.0, 2.0, -23.0, -89.0, 34.0, -73.0, -72.0],
[20.0, 9.0, 59.0, -44.0, 14.0, 62.0, 63.0, 28.0, 81.0, 93.0, 33.0, 28.0, 85.0, 14.0, -18.0, 92.0, 81.0, -37.0, -98.0, 44.0, -52.0, -11.0, -88.0, 85.0, -70.0, 83.0, 7.0, 60.0, -26.0, -16.0, -75.0, 11.0, -47.0, 47.0, 19.0, -1.0, -80.0, -30.0, 94.0, -95.0, 28.0, -30.0, 62.0, 81.0, 35.0, 27.0, 69.0, 63.0, -4.0, 17.0, -26.0, -25.0, 18.0, 53.0, 16.0, -37.0, 17.0, 80.0, 85.0, 20.0, -81.0, 85.0, 45.0, -17.0, 15.0, -71.0, 15.0, -37.0, -30.0, 47.0, -96.0, -59.0, 65.0, -5.0, 51.0, 79.0, -3.0, -65.0, 84.0, -61.0, -26.0, 56.0, 52.0, 56.0, -5.0, -55.0, 61.0, 2.0, -74.0, -8.0, 98.0, 96.0, 33.0, 4.0, 69.0, 64.0, -35.0, 75.0, 46.0, 77.0],
[-57.0, 8.0, 20.0, -63.0, -41.0, 48.0, -40.0, 57.0, -48.0, 89.0, 22.0, -66.0, 24.0, 7.0, 31.0, 41.0, 56.0, -77.0, -78.0, -51.0, -65.0, -4.0, 12.0, -27.0, -44.0, -76.0, 86.0, -89.0, 12.0, 88.0, -31.0, -69.0, -22.0, -27.0, -68.0, -41.0, 99.0, 65.0, 58.0, -29.0, -42.0, 13.0, -8.0, 27.0, 83.0, 28.0, 38.0, 61.0, -4.0, -34.0, 50.0, 31.0, 59.0, 58.0, -21.0, -69.0, -99.0, -28.0, 69.0, 35.0, 30.0, 6.0, 23.0, 80.0, -2.0, 43.0, -44.0, -38.0, -97.0, 81.0, -21.0, -16.0, 42.0, 77.0, -11.0, -85.0, -41.0, 21.0, -74.0, 59.0, 26.0, -74.0, -29.0, 58.0, 96.0, -23.0, -40.0, -52.0, 91.0, -65.0, 2.0, 52.0, 56.0, 72.0, -35.0, -32.0, -5.0, 19.0, -75.0, -78.0],
[-1.0, -9.0, -30.0, -2.0, -25.0, -90.0, 5.0, -39.0, 32.0, 9.0, -64.0, 81.0, 22.0, -99.0, 93.0, -98.0, -23.0, 54.0, 57.0, 42.0, -87.0, 47.0, -73.0, 52.0, -71.0, -15.0, -19.0, 75.0, 77.0, 79.0, -30.0, -92.0, 39.0, 1.0, -6.0, 2.0, -37.0, 96.0, 61.0, -38.0, 1.0, 9.0, 73.0, -73.0, 18.0, 87.0, -14.0, -99.0, -42.0, 0.0, -60.0, 10.0, -30.0, -94.0, 14.0, -43.0, -47.0, 56.0, 97.0, -25.0, 34.0, 81.0, -91.0, -49.0, -45.0, 87.0, 19.0, -89.0, -12.0, 9.0, 68.0, 84.0, 28.0, 93.0, 7.0, -6.0, 68.0, -15.0, -50.0, -38.0, -13.0, -97.0, 86.0, 79.0, -74.0, 63.0, -47.0, 11.0, -34.0, 4.0, -69.0, -68.0, 37.0, -12.0, 75.0, 98.0, -79.0, -19.0, 99.0, -7.0],
[-30.0, 89.0, 92.0, 83.0, -60.0, -49.0, 36.0, -34.0, 91.0, 61.0, -69.0, -39.0, 69.0, 21.0, -73.0, 76.0, -7.0, -9.0, 69.0, -81.0, -82.0, -64.0, -26.0, -99.0, 42.0, -95.0, -4.0, -10.0, 92.0, 97.0, 4.0, -63.0, 27.0, -78.0, 75.0, -45.0, -86.0, -74.0, 74.0, -95.0, 81.0, 62.0, -10.0, -11.0, 61.0, -91.0, -86.0, -90.0, 69.0, 42.0, 10.0, 26.0, -8.0, 4.0, 19.0, -55.0, -94.0, 56.0, -66.0, -65.0, 27.0, -79.0, -6.0, 2.0, -93.0, 79.0, -50.0, 17.0, 18.0, -61.0, 43.0, -17.0, -77.0, 18.0, 88.0, -31.0, 38.0, -78.0, -35.0, 55.0, 61.0, -89.0, -61.0, -36.0, -69.0, 31.0, -57.0, 59.0, 58.0, -84.0, 30.0, 42.0, -53.0, 88.0, -33.0, 39.0, -46.0, -25.0, 86.0, 76.0],
[-71.0, 38.0, 82.0, -54.0, 26.0, 51.0, -84.0, 12.0, 44.0, -61.0, 70.0, -60.0, -74.0, 82.0, -51.0, 36.0, -5.0, 22.0, 88.0, -69.0, 68.0, 85.0, 13.0, 100.0, 20.0, 26.0, -38.0, 12.0, -92.0, 40.0, 56.0, 45.0, -60.0, 62.0, 4.0, -23.0, -4.0, 42.0, -34.0, -93.0, 72.0, 44.0, 0.0, -75.0, -16.0, 7.0, -21.0, -55.0, 92.0, 6.0, 51.0, 33.0, -81.0, 11.0, 55.0, -27.0, -92.0, 91.0, -49.0, -66.0, 7.0, -63.0, 58.0, 20.0, -35.0, -97.0, -95.0, 95.0, 12.0, 18.0, 24.0, 39.0, -92.0, 38.0, -37.0, -48.0, -99.0, -64.0, -35.0, 22.0, 93.0, -20.0, 97.0, -76.0, -10.0, -63.0, 80.0, -79.0, 56.0, 87.0, 14.0, -97.0, 0.0, -66.0, 37.0, 81.0, 71.0, -67.0, -3.0, -60.0],
[42.0, 96.0, -68.0, 6.0, 37.0, 26.0, -11.0, -25.0, 6.0, 36.0, -29.0, 53.0, -75.0, -8.0, 77.0, 36.0, -34.0, -96.0, -68.0, 8.0, -64.0, 23.0, 38.0, 64.0, -85.0, 45.0, -42.0, 38.0, -34.0, -4.0, -16.0, 50.0, 88.0, 25.0, -18.0, 67.0, -89.0, 1.0, 36.0, 54.0, -66.0, -77.0, -55.0, -16.0, -62.0, 3.0, 16.0, -92.0, 43.0, 99.0, 36.0, -66.0, 99.0, -97.0, 14.0, 28.0, -98.0, 34.0, 0.0, -19.0, 42.0, -49.0, -61.0, -32.0, -47.0, -86.0, -47.0, -79.0, -8.0, -94.0, -15.0, -74.0, -65.0, 80.0, 83.0, -10.0, 64.0, -36.0, 86.0, -67.0, 35.0, -15.0, 17.0, 76.0, 88.0, -34.0, 28.0, 55.0, 84.0, 27.0, 67.0, 13.0, -82.0, 55.0, 40.0, -78.0, 80.0, 30.0, -51.0, 34.0],
[54.0, 7.0, -14.0, 44.0, -32.0, 97.0, -48.0, 56.0, -31.0, -93.0, -5.0, -57.0, -94.0, 45.0, 51.0, -86.0, -8.0, 77.0, -57.0, -32.0, -64.0, -39.0, 53.0, -98.0, -69.0, -27.0, -5.0, -46.0, -87.0, -66.0, 94.0, -96.0, 80.0, 70.0, 0.0, 7.0, -73.0, 11.0, 73.0, 82.0, 9.0, -89.0, -84.0, -51.0, 70.0, 75.0, 80.0, -94.0, -35.0, 7.0, 61.0, -54.0, -64.0, -64.0, -21.0, 72.0, 15.0, 9.0, -21.0, -56.0, 68.0, 23.0, 18.0, -4.0, -16.0, -55.0, -23.0, 42.0, -61.0, -1.0, -6.0, -7.0, -12.0, 63.0, -69.0, 42.0, -5.0, -64.0, -10.0, -41.0, -89.0, -68.0, 50.0, -31.0, -49.0, 30.0, -21.0, 65.0, -31.0, -6.0, -70.0, 97.0, -8.0, -83.0, -77.0, -40.0, -31.0, -16.0, 70.0, -51.0],
[-44.0, -21.0, 3.0, 72.0, -56.0, 55.0, -32.0, 54.0, 2.0, 30.0, 17.0, 11.0, -51.0, -36.0, -56.0, -92.0, 55.0, -24.0, -69.0, -45.0, -49.0, -80.0, -90.0, -81.0, 57.0, 11.0, -51.0, -99.0, 74.0, 5.0, -21.0, -91.0, -96.0, -42.0, -65.0, -54.0, 7.0, -65.0, 43.0, -64.0, -56.0, 65.0, -98.0, -42.0, 33.0, 86.0, -37.0, 33.0, 55.0, -44.0, -83.0, 23.0, 27.0, -49.0, -7.0, -2.0, 6.0, 62.0, 22.0, 81.0, 3.0, 82.0, 16.0, -32.0, -63.0, 73.0, 53.0, -88.0, -45.0, -53.0, 27.0, -78.0, -3.0, -74.0, 78.0, 63.0, 8.0, 17.0, -54.0, 4.0, 55.0, 84.0, 98.0, 48.0, -93.0, 95.0, -69.0, -82.0, 51.0, -89.0, 6.0, -16.0, 38.0, 66.0, -73.0, 0.0, -51.0, -52.0, -59.0, -99.0],
[-11.0, -39.0, 6.0, 12.0, -35.0, 88.0, -41.0, 13.0, -49.0, -79.0, -9.0, -44.0, -44.0, 79.0, 50.0, 17.0, -53.0, 37.0, 82.0, -99.0, 10.0, -67.0, -94.0, 29.0, -50.0, -56.0, -48.0, 31.0, -88.0, -84.0, -55.0, 37.0, -5.0, 55.0, -97.0, -13.0, -38.0, -55.0, -75.0, -85.0, -81.0, 63.0, -35.0, 69.0, 25.0, -66.0, 83.0, -67.0, 28.0, -49.0, -97.0, -96.0, -92.0, 28.0, -16.0, 18.0, -49.0, -1.0, 38.0, -5.0, 18.0, -20.0, 51.0, -60.0, -99.0, -62.0, -94.0, 48.0, 2.0, 93.0, 96.0, -48.0, -36.0, 78.0, 58.0, -80.0, 98.0, 21.0, 30.0, 95.0, -47.0, -11.0, -59.0, -39.0, 9.0, 90.0, 68.0, -67.0, 79.0, -95.0, -98.0, 19.0, -24.0, -97.0, -95.0, -2.0, -74.0, 93.0, -92.0, 24.0],
[90.0, 8.0, -78.0, 31.0, 39.0, 81.0, -68.0, -55.0, 14.0, -81.0, 22.0, 66.0, 69.0, -61.0, -55.0, 67.0, -15.0, -39.0, 95.0, 18.0, 74.0, -33.0, 27.0, 21.0, 41.0, 5.0, -45.0, -37.0, 13.0, -20.0, -86.0, -2.0, -36.0, -61.0, 48.0, -1.0, 52.0, -25.0, -24.0, -56.0, 82.0, -28.0, 14.0, 56.0, 53.0, -48.0, -11.0, 19.0, -37.0, 75.0, -100.0, -45.0, 3.0, -100.0, -23.0, 83.0, 93.0, 58.0, 0.0, 5.0, 68.0, -4.0, -62.0, -18.0, 93.0, -29.0, -19.0, -80.0, -78.0, -70.0, -89.0, 22.0, 82.0, 42.0, 2.0, 3.0, -24.0, 2.0, 74.0, 77.0, -26.0, 86.0, 77.0, 46.0, 51.0, -13.0, 39.0, -52.0, -67.0, -8.0, 47.0, -2.0, 53.0, -67.0, 39.0, -71.0, -99.0, -31.0, 37.0, 46.0],
[-29.0, 66.0, -100.0, 89.0, -38.0, -12.0, 73.0, 12.0, 70.0, -82.0, -28.0, 31.0, -52.0, 19.0, 4.0, -43.0, 89.0, -9.0, 85.0, -67.0, -33.0, -52.0, 86.0, -57.0, 64.0, 64.0, -28.0, -13.0, -15.0, -60.0, -95.0, -26.0, -77.0, -17.0, 90.0, 65.0, 92.0, 25.0, -52.0, 7.0, 34.0, -87.0, -53.0, -78.0, -71.0, -57.0, -9.0, -16.0, -91.0, 89.0, -84.0, 60.0, 0.0, -96.0, -48.0, 94.0, -62.0, -43.0, -28.0, 86.0, 28.0, -8.0, 5.0, 3.0, 5.0, -80.0, 30.0, -88.0, -68.0, 52.0, -32.0, 84.0, -32.0, -81.0, 78.0, 65.0, 91.0, -29.0, -60.0, -4.0, 34.0, 36.0, 39.0, 72.0, -30.0, 49.0, 20.0, 53.0, -12.0, -69.0, 48.0, -95.0, 6.0, 51.0, -6.0, 33.0, -18.0, 27.0, 44.0, 80.0],
[76.0, 63.0, -16.0, -33.0, -43.0, 91.0, 80.0, -63.0, -81.0, 76.0, -8.0, 99.0, 40.0, -11.0, -16.0, -33.0, -64.0, 99.0, -86.0, 52.0, -73.0, -70.0, 37.0, 45.0, 24.0, 30.0, -22.0, -50.0, 93.0, -52.0, -97.0, -87.0, 60.0, -96.0, 99.0, 43.0, 38.0, -56.0, 24.0, -91.0, 49.0, 55.0, 96.0, 14.0, 32.0, -33.0, -24.0, 3.0, 82.0, -41.0, -47.0, -64.0, -54.0, -81.0, 2.0, -3.0, -69.0, -9.0, -51.0, -78.0, -39.0, 77.0, -6.0, 3.0, -88.0, -87.0, -58.0, -45.0, 11.0, 17.0, -46.0, 67.0, -90.0, 83.0, -68.0, 7.0, 73.0, -92.0, -88.0, -2.0, -14.0, -36.0, 72.0, -14.0, -25.0, -29.0, -67.0, 3.0, -91.0, 54.0, -77.0, -24.0, -42.0, -47.0, 90.0, -96.0, 61.0, -88.0, -51.0, -61.0],
[22.0, 61.0, -19.0, 25.0, -100.0, 18.0, -84.0, -94.0, -87.0, 26.0, 97.0, 46.0, 63.0, -43.0, 67.0, -44.0, 4.0, -69.0, 3.0, -15.0, 71.0, 24.0, -5.0, -12.0, 27.0, 19.0, -40.0, 54.0, 82.0, 63.0, 62.0, -83.0, 55.0, 68.0, 49.0, -44.0, -90.0, -86.0, -15.0, -99.0, 55.0, -65.0, -56.0, -72.0, -34.0, 14.0, 8.0, -4.0, 93.0, 52.0, -42.0, 35.0, -2.0, 26.0, -59.0, 45.0, -98.0, -72.0, -47.0, -73.0, 86.0, -3.0, 14.0, 15.0, -42.0, -71.0, -80.0, 66.0, -70.0, 77.0, -82.0, 4.0, 89.0, -51.0, -83.0, -43.0, -88.0, -96.0, -47.0, -72.0, 3.0, -36.0, 5.0, 81.0, -79.0, -22.0, -84.0, 95.0, -51.0, -46.0, -62.0, -51.0, -85.0, 70.0, 91.0, 58.0, 24.0, -80.0, -18.0, 87.0],
[-23.0, -93.0, -46.0, 81.0, 67.0, -59.0, 18.0, 37.0, 43.0, -83.0, 0.0, -39.0, -83.0, -57.0, -100.0, -14.0, -62.0, 47.0, -64.0, -91.0, -69.0, 82.0, -76.0, -24.0, 43.0, 32.0, 54.0, 24.0, 58.0, -88.0, 7.0, 9.0, -48.0, 99.0, -77.0, -11.0, 56.0, 41.0, -80.0, -29.0, 29.0, -96.0, 77.0, 24.0, -7.0, 75.0, 40.0, -38.0, 34.0, 68.0, -17.0, -75.0, -95.0, -64.0, -60.0, 6.0, 0.0, -37.0, 71.0, -2.0, -85.0, -52.0, -64.0, 90.0, -20.0, -85.0, 88.0, 16.0, 11.0, 69.0, 38.0, -53.0, 77.0, -27.0, 77.0, 33.0, 5.0, 98.0, 78.0, -44.0, 61.0, 41.0, 40.0, -72.0, 46.0, 86.0, 11.0, 79.0, 20.0, 45.0, 8.0, -32.0, -19.0, 42.0, 71.0, -62.0, -95.0, -39.0, -58.0, 59.0],
[-45.0, -36.0, -95.0, 21.0, 99.0, 37.0, -53.0, 33.0, -21.0, 59.0, -50.0, -63.0, 86.0, 29.0, 88.0, -1.0, -51.0, 14.0, 70.0, 55.0, 98.0, 12.0, 14.0, -33.0, 40.0, 49.0, 66.0, 31.0, -87.0, 45.0, -51.0, -25.0, 56.0, 19.0, -58.0, 73.0, -21.0, 37.0, -22.0, 14.0, 58.0, -25.0, 44.0, 9.0, -99.0, 99.0, -73.0, -35.0, 95.0, 63.0, -68.0, -57.0, -59.0, 96.0, 37.0, 49.0, -42.0, -66.0, -31.0, 69.0, 89.0, -43.0, 85.0, -75.0, 31.0, -41.0, -69.0, -73.0, -21.0, -62.0, -17.0, 83.0, -59.0, 67.0, -19.0, -15.0, -72.0, -30.0, 69.0, 49.0, 64.0, 72.0, 11.0, -1.0, -20.0, -91.0, -57.0, 37.0, -63.0, 98.0, -91.0, 83.0, 48.0, -33.0, 42.0, 75.0, 2.0, -11.0, -49.0, 92.0],
[91.0, -30.0, -45.0, -7.0, -83.0, -52.0, -71.0, 77.0, -9.0, 84.0, -15.0, 33.0, 60.0, -83.0, -51.0, -80.0, -91.0, 8.0, 57.0, 98.0, 65.0, -10.0, -10.0, -55.0, 91.0, -83.0, -30.0, 56.0, 72.0, -75.0, -20.0, -92.0, -96.0, -18.0, 51.0, 81.0, 5.0, -20.0, 30.0, 60.0, -40.0, -23.0, 84.0, 75.0, 89.0, -80.0, 24.0, 8.0, 98.0, -62.0, 65.0, 63.0, -36.0, 46.0, -81.0, -27.0, 4.0, -60.0, -71.0, 37.0, -93.0, 45.0, 36.0, -97.0, 25.0, -97.0, -16.0, -13.0, 88.0, -61.0, 70.0, -55.0, 41.0, 76.0, 32.0, -45.0, 1.0, 30.0, 86.0, -25.0, 75.0, -67.0, -77.0, -23.0, -50.0, 36.0, 30.0, -2.0, 96.0, -60.0, -31.0, 43.0, 7.0, -52.0, 87.0, -87.0, -91.0, 19.0, -46.0, -53.0],
[94.0, 93.0, 59.0, 75.0, 56.0, -15.0, -67.0, -28.0, 15.0, 22.0, -62.0, -90.0, 46.0, -15.0, 84.0, 55.0, 45.0, -37.0, -78.0, 52.0, -99.0, 48.0, 84.0, 20.0, -53.0, -51.0, -56.0, -60.0, -7.0, -13.0, -47.0, -52.0, 31.0, 89.0, 12.0, 62.0, 81.0, 95.0, -89.0, -83.0, 60.0, 41.0, 73.0, 72.0, 33.0, -50.0, 77.0, 36.0, -34.0, 50.0, -5.0, -72.0, 4.0, 20.0, -44.0, -25.0, 11.0, 91.0, -57.0, 47.0, 14.0, 22.0, -89.0, -73.0, -81.0, 26.0, -13.0, -28.0, -9.0, 78.0, 1.0, -3.0, 26.0, 20.0, 16.0, -21.0, 25.0, -88.0, -6.0, -9.0, 6.0, 43.0, 76.0, -41.0, 57.0, 89.0, 20.0, -48.0, -18.0, 52.0, -24.0, 58.0, 78.0, 27.0, 96.0, -21.0, 88.0, 72.0, 64.0, 52.0],
[61.0, -91.0, -48.0, -43.0, 31.0, 48.0, -30.0, -92.0, -53.0, 43.0, 31.0, -12.0, 99.0, -52.0, -68.0, 19.0, 58.0, -69.0, -88.0, 10.0, -13.0, -19.0, 56.0, 33.0, -73.0, 92.0, 98.0, -19.0, 90.0, 87.0, -13.0, 52.0, -27.0, 80.0, -81.0, 91.0, -61.0, 83.0, 62.0, -12.0, 78.0, 77.0, -56.0, -76.0, 45.0, 48.0, 50.0, -31.0, 30.0, -81.0, -52.0, 14.0, -36.0, 87.0, 6.0, 94.0, 0.0, 82.0, 98.0, 75.0, -77.0, 36.0, 19.0, 36.0, -35.0, 44.0, 90.0, 17.0, 96.0, 63.0, -100.0, -9.0, -76.0, -77.0, 96.0, 41.0, 25.0, -17.0, -50.0, 30.0, -61.0, 85.0, -79.0, -79.0, -28.0, 34.0, -13.0, 92.0, -66.0, 99.0, 78.0, 15.0, -11.0, 59.0, 51.0, -59.0, 59.0, -36.0, 44.0, 45.0],
[29.0, -9.0, -50.0, -82.0, 23.0, 3.0, -58.0, -23.0, -44.0, 98.0, 56.0, -59.0, 75.0, -50.0, -73.0, -49.0, 75.0, -98.0, -34.0, 93.0, 3.0, 58.0, 36.0, 47.0, 54.0, -78.0, -16.0, -68.0, 8.0, 65.0, -15.0, 21.0, 79.0, 90.0, 10.0, 6.0, 60.0, -59.0, 78.0, -51.0, -99.0, 86.0, -14.0, 78.0, -53.0, 63.0, -94.0, -49.0, 89.0, -79.0, -55.0, 46.0, -67.0, 93.0, -77.0, -67.0, 75.0, 80.0, -37.0, -16.0, -69.0, 8.0, -65.0, -68.0, -12.0, -60.0, 57.0, -15.0, 91.0, 50.0, 77.0, -86.0, 34.0, 40.0, -18.0, -66.0, -14.0, -72.0, 57.0, -13.0, -60.0, 13.0, -38.0, 96.0, 7.0, -64.0, 84.0, -69.0, -60.0, 65.0, -73.0, 32.0, -65.0, 38.0, -58.0, 63.0, -69.0, 20.0, 87.0, 65.0],
[-27.0, -37.0, -41.0, 0.0, 46.0, -29.0, -72.0, -55.0, 23.0, 57.0, -24.0, 93.0, 85.0, -96.0, -38.0, -42.0, -68.0, 29.0, 90.0, -35.0, 59.0, 10.0, -46.0, 65.0, -31.0, -42.0, -73.0, -32.0, -19.0, -39.0, 92.0, 82.0, 78.0, -96.0, -64.0, 82.0, -45.0, -45.0, 75.0, -88.0, -67.0, 99.0, -7.0, -71.0, -28.0, -48.0, 53.0, 6.0, -96.0, -92.0, -4.0, -34.0, 65.0, 3.0, 11.0, -45.0, -38.0, 66.0, 84.0, 41.0, 21.0, 16.0, -64.0, 21.0, 16.0, 75.0, -77.0, 4.0, 25.0, 15.0, -5.0, -35.0, 72.0, 67.0, -74.0, 35.0, 52.0, 74.0, -89.0, 63.0, 94.0, -64.0, -18.0, -43.0, 73.0, 27.0, -35.0, -31.0, -46.0, 39.0, 19.0, 73.0, 14.0, -57.0, -1.0, -59.0, 51.0, 98.0, -27.0, -71.0],
[50.0, 48.0, 22.0, -1.0, -14.0, -82.0, 38.0, -3.0, 87.0, 61.0, -42.0, -64.0, 14.0, 30.0, -75.0, 32.0, -96.0, -39.0, -45.0, -70.0, 60.0, 6.0, -77.0, 61.0, 42.0, -28.0, -97.0, 0.0, 72.0, 47.0, 16.0, -55.0, 91.0, 34.0, -59.0, -18.0, -17.0, 61.0, -27.0, 13.0, 35.0, -96.0, -34.0, 20.0, -9.0, -17.0, -78.0, 69.0, -40.0, -94.0, -85.0, -92.0, 13.0, -93.0, -89.0, -4.0, -10.0, 86.0, 48.0, 80.0, -63.0, -4.0, 34.0, -38.0, -46.0, 62.0, 6.0, 79.0, 17.0, 42.0, -5.0, -80.0, -35.0, 77.0, -7.0, 44.0, 16.0, 65.0, 30.0, 29.0, 7.0, -91.0, 93.0, 14.0, 86.0, -23.0, -95.0, 37.0, 18.0, -41.0, -98.0, 14.0, -47.0, 0.0, 60.0, -66.0, 69.0, -50.0, 14.0, -53.0],
[74.0, -38.0, 17.0, 17.0, 2.0, -43.0, -20.0, 25.0, -56.0, 60.0, 49.0, 30.0, -88.0, 1.0, -50.0, 92.0, 10.0, 16.0, -62.0, 32.0, 32.0, -33.0, -19.0, 77.0, -81.0, 25.0, -63.0, -5.0, 63.0, 35.0, -22.0, 43.0, 49.0, -31.0, 37.0, 55.0, -90.0, -4.0, -89.0, 30.0, -92.0, -7.0, 30.0, -6.0, 9.0, 50.0, -42.0, -25.0, -60.0, 13.0, -73.0, 27.0, -15.0, -18.0, -15.0, -72.0, -76.0, 87.0, -82.0, -4.0, 99.0, 25.0, 29.0, 69.0, 39.0, 64.0, 80.0, -6.0, 14.0, -88.0, 86.0, 80.0, -89.0, 46.0, -89.0, -98.0, 54.0, -39.0, -64.0, 92.0, -39.0, 19.0, -89.0, -4.0, -21.0, 5.0, 32.0, -76.0, 16.0, -77.0, 36.0, 58.0, 40.0, -14.0, -75.0, -11.0, 59.0, -36.0, 71.0, 79.0],
[71.0, -80.0, 79.0, -68.0, 59.0, 42.0, 8.0, -53.0, 71.0, -67.0, -77.0, -10.0, 46.0, 0.0, 6.0, 64.0, 22.0, 70.0, 62.0, 67.0, 43.0, -21.0, 73.0, -92.0, 10.0, -92.0, -90.0, -6.0, 69.0, 8.0, 90.0, 94.0, 64.0, 99.0, -57.0, -98.0, -11.0, 97.0, -33.0, -93.0, -12.0, 8.0, 75.0, -30.0, -96.0, -64.0, 10.0, 9.0, 10.0, -96.0, 56.0, 15.0, -4.0, 96.0, -19.0, -35.0, 91.0, -29.0, 92.0, -97.0, -3.0, -21.0, -32.0, 34.0, 67.0, 69.0, 23.0, 19.0, -79.0, -44.0, -69.0, 64.0, 63.0, -7.0, -62.0, 63.0, -15.0, 36.0, -88.0, -94.0, 45.0, 71.0, 95.0, -13.0, 10.0, -11.0, 74.0, 11.0, -3.0, -58.0, 98.0, -53.0, 15.0, -88.0, -94.0, -84.0, -48.0, 62.0, 40.0, -34.0],
[-30.0, 85.0, 48.0, -60.0, 34.0, -13.0, -87.0, -96.0, -88.0, 17.0, -28.0, 98.0, -23.0, 8.0, 37.0, 41.0, -92.0, -92.0, 92.0, 15.0, 65.0, 14.0, 53.0, -38.0, -62.0, -5.0, 0.0, -97.0, 91.0, -97.0, -76.0, 62.0, 55.0, 55.0, 23.0, -60.0, 73.0, -39.0, -55.0, 54.0, 85.0, 58.0, 16.0, -21.0, -72.0, 9.0, 50.0, 16.0, 85.0, -26.0, -48.0, -93.0, 33.0, -96.0, -11.0, 46.0, -65.0, 26.0, 1.0, -57.0, 91.0, 32.0, -58.0, -27.0, 7.0, -100.0, 55.0, -32.0, -8.0, -65.0, 64.0, -19.0, -18.0, -96.0, -96.0, -70.0, 36.0, -74.0, 6.0, -35.0, 13.0, 64.0, 58.0, 79.0, -50.0, 2.0, -20.0, 86.0, -90.0, 26.0, -90.0, -96.0, -52.0, 66.0, -43.0, 64.0, 1.0, -44.0, -12.0, 91.0],
[-49.0, 45.0, 19.0, -27.0, 25.0, -58.0, -90.0, 18.0, 44.0, 23.0, 82.0, 85.0, 54.0, 9.0, -17.0, -52.0, -3.0, 2.0, -54.0, 29.0, 79.0, 26.0, 42.0, 91.0, 24.0, -49.0, 18.0, 6.0, -87.0, -66.0, 78.0, 93.0, 39.0, -53.0, 66.0, 95.0, 2.0, 23.0, 57.0, -83.0, -8.0, 88.0, 8.0, 24.0, -15.0, 73.0, -48.0, -20.0, 62.0, -65.0, 54.0, -62.0, -95.0, -19.0, 15.0, 89.0, 99.0, 49.0, 62.0, -51.0, 24.0, 26.0, 41.0, 6.0, 75.0, 76.0, -46.0, -9.0, -86.0, -72.0, -87.0, 14.0, -46.0, 55.0, 19.0, -19.0, -84.0, 29.0, 60.0, 5.0, 69.0, 15.0, -64.0, 13.0, -54.0, 52.0, -86.0, -41.0, -65.0, 51.0, 59.0, -20.0, 4.0, -81.0, 22.0, -43.0, -74.0, -79.0, 50.0, 66.0],
[95.0, 17.0, 49.0, -96.0, -24.0, -14.0, 29.0, -79.0, -14.0, 21.0, -82.0, 35.0, -97.0, -78.0, 68.0, 52.0, 53.0, 12.0, 12.0, 18.0, -1.0, -62.0, 8.0, -31.0, -28.0, -8.0, -50.0, -44.0, 83.0, 2.0, 50.0, -10.0, 85.0, -31.0, 44.0, -49.0, 90.0, 0.0, -99.0, -21.0, -99.0, 9.0, 33.0, 17.0, -32.0, 3.0, -49.0, -43.0, -1.0, 78.0, 93.0, 32.0, 46.0, 23.0, -71.0, -68.0, -15.0, 94.0, 17.0, -24.0, -40.0, -28.0, -86.0, -9.0, 37.0, -3.0, 4.0, 52.0, -74.0, -12.0, 75.0, -70.0, 9.0, -63.0, -91.0, 51.0, 21.0, 76.0, -58.0, 53.0, 81.0, 3.0, 73.0, 36.0, 51.0, 79.0, -72.0, 59.0, -6.0, -97.0, 43.0, 95.0, -12.0, -87.0, 68.0, 27.0, -78.0, -9.0, -1.0, 77.0],
[24.0, -60.0, -40.0, 74.0, 74.0, -45.0, 29.0, -9.0, 72.0, 18.0, -85.0, -29.0, -63.0, 86.0, -4.0, 84.0, 16.0, -33.0, 78.0, -47.0, -89.0, -25.0, 7.0, -15.0, -29.0, -96.0, 74.0, -13.0, -4.0, -30.0, 82.0, -99.0, 32.0, -7.0, -23.0, -87.0, 54.0, -45.0, 5.0, 3.0, -91.0, 55.0, 25.0, 3.0, 21.0, 80.0, -81.0, -74.0, -97.0, -27.0, -94.0, 99.0, 4.0, -22.0, -90.0, -14.0, 69.0, -69.0, -52.0, -71.0, -74.0, -58.0, -58.0, -91.0, -39.0, -81.0, -64.0, 75.0, 99.0, -84.0, -6.0, 83.0, 57.0, 24.0, 50.0, 42.0, -73.0, -47.0, 80.0, -33.0, 50.0, 87.0, -25.0, -95.0, -48.0, -22.0, -71.0, 20.0, 13.0, 99.0, 23.0, 19.0, 80.0, 64.0, -26.0, -95.0, 97.0, -7.0, -38.0, -23.0],
[-81.0, 12.0, 99.0, 38.0, -60.0, -19.0, 34.0, 20.0, 9.0, -79.0, -11.0, -73.0, 79.0, 18.0, 12.0, -46.0, -76.0, -80.0, 2.0, -87.0, -15.0, -83.0, -49.0, -12.0, 87.0, -22.0, 16.0, -91.0, -15.0, 77.0, -87.0, 42.0, 30.0, -14.0, 62.0, -89.0, 53.0, 51.0, 56.0, 85.0, 4.0, -100.0, -81.0, 37.0, 72.0, -8.0, 7.0, 66.0, 9.0, 65.0, -10.0, 5.0, 10.0, 49.0, 58.0, -98.0, -93.0, -47.0, 46.0, -72.0, 91.0, 91.0, -76.0, 22.0, -23.0, 49.0, 65.0, -59.0, -83.0, 36.0, 28.0, -96.0, -65.0, 98.0, 8.0, 4.0, -7.0, 82.0, -54.0, -82.0, 67.0, 86.0, -7.0, 56.0, 28.0, 68.0, 14.0, -20.0, 41.0, 10.0, 78.0, 84.0, 85.0, -9.0, 29.0, -68.0, 100.0, 5.0, 93.0, -38.0],
[97.0, 54.0, 43.0, 29.0, -71.0, 9.0, 25.0, -43.0, -72.0, 82.0, 85.0, 13.0, -37.0, 2.0, 86.0, -56.0, -21.0, -51.0, 25.0, -43.0, 15.0, -41.0, 8.0, -84.0, 27.0, -89.0, -13.0, -63.0, 63.0, 16.0, 42.0, -92.0, -18.0, -23.0, 9.0, 55.0, -7.0, 76.0, -75.0, 65.0, -67.0, 88.0, 40.0, -15.0, -67.0, 15.0, 91.0, 91.0, 35.0, -24.0, -13.0, -46.0, -99.0, -86.0, -79.0, -23.0, 51.0, -58.0, 48.0, -71.0, -85.0, 56.0, -31.0, -15.0, 64.0, 67.0, 99.0, 63.0, -43.0, -57.0, -18.0, -66.0, 37.0, -100.0, -20.0, -66.0, -38.0, 68.0, -24.0, 64.0, 54.0, 27.0, 94.0, -38.0, -73.0, -56.0, -35.0, -88.0, 17.0, -31.0, -49.0, -71.0, -52.0, 56.0, -77.0, -93.0, -38.0, -50.0, 28.0, 28.0],
[46.0, 83.0, -75.0, 79.0, -32.0, 15.0, -8.0, 62.0, -61.0, -50.0, -45.0, 67.0, 5.0, -53.0, -20.0, 12.0, -43.0, -9.0, -62.0, 29.0, -25.0, 88.0, 7.0, 65.0, -99.0, -41.0, -32.0, 80.0, -6.0, -74.0, 23.0, 2.0, -13.0, -86.0, 41.0, 9.0, 23.0, 86.0, -34.0, -84.0, 8.0, 24.0, 94.0, 49.0, 37.0, -2.0, -59.0, -2.0, -56.0, -31.0, 85.0, 35.0, -88.0, 21.0, -17.0, -52.0, -98.0, -99.0, -89.0, -55.0, -73.0, -73.0, 16.0, -11.0, 69.0, -50.0, -63.0, 7.0, -79.0, -83.0, -15.0, 27.0, -46.0, 82.0, 55.0, -13.0, 33.0, 0.0, 32.0, -42.0, 14.0, 6.0, -26.0, -2.0, -53.0, 90.0, -74.0, 86.0, 16.0, 17.0, 97.0, 99.0, 83.0, -35.0, 40.0, 4.0, 17.0, 90.0, 42.0, -30.0],
[-26.0, 12.0, -51.0, -71.0, -2.0, -49.0, -1.0, 23.0, 79.0, 84.0, -18.0, 78.0, -56.0, -4.0, -93.0, 38.0, 35.0, 15.0, 67.0, -38.0, -41.0, 92.0, -41.0, 93.0, 3.0, -87.0, -98.0, 58.0, 54.0, -77.0, -33.0, 26.0, -48.0, 76.0, 58.0, -11.0, 12.0, 10.0, 23.0, -80.0, -17.0, 98.0, 57.0, -55.0, 10.0, 35.0, 75.0, -66.0, -8.0, -58.0, -32.0, 12.0, 38.0, 30.0, 67.0, -88.0, 20.0, -95.0, -9.0, -65.0, -34.0, 62.0, 85.0, 59.0, -30.0, -9.0, 80.0, 33.0, -80.0, 24.0, 48.0, 60.0, 57.0, 65.0, 24.0, 18.0, -14.0, -88.0, -19.0, 24.0, 62.0, 78.0, -62.0, -92.0, -42.0, -34.0, 78.0, -43.0, 0.0, 78.0, 89.0, -68.0, 47.0, -82.0, 23.0, 73.0, 67.0, -27.0, 48.0, -74.0],
[-52.0, -11.0, 26.0, 93.0, -65.0, -1.0, -83.0, 59.0, -55.0, 80.0, 58.0, 10.0, -25.0, -89.0, -63.0, -22.0, 45.0, 3.0, -87.0, -53.0, 90.0, 6.0, -5.0, -91.0, 84.0, -30.0, 22.0, 29.0, -38.0, 39.0, -75.0, 27.0, 99.0, -75.0, 31.0, 56.0, 93.0, 14.0, -45.0, -100.0, -42.0, -93.0, 44.0, 25.0, 28.0, 40.0, -21.0, -36.0, -29.0, -30.0, 12.0, 47.0, 80.0, -95.0, -97.0, -80.0, -12.0, 56.0, 87.0, 54.0, 40.0, 91.0, 96.0, -88.0, -31.0, 49.0, -89.0, -3.0, -85.0, -79.0, 59.0, 92.0, -6.0, 54.0, 92.0, 0.0, 42.0, 90.0, 35.0, 59.0, 33.0, 63.0, -25.0, -32.0, -28.0, 33.0, -40.0, -27.0, 100.0, 73.0, -93.0, 65.0, 95.0, -93.0, -17.0, -10.0, 26.0, -5.0, -87.0, 87.0],
[51.0, 12.0, 57.0, 50.0, -43.0, -71.0, -20.0, -84.0, -77.0, 92.0, -85.0, -18.0, 76.0, -40.0, -19.0, 23.0, 88.0, -17.0, -10.0, -8.0, 72.0, 83.0, -68.0, 1.0, 80.0, 12.0, 20.0, 13.0, -2.0, -48.0, -67.0, -1.0, 87.0, 68.0, 12.0, -34.0, -12.0, -88.0, 97.0, 5.0, -37.0, 41.0, -71.0, -35.0, -72.0, 97.0, -31.0, 80.0, 99.0, 89.0, 35.0, 3.0, 2.0, -90.0, -28.0, 73.0, -15.0, -97.0, 54.0, 81.0, 45.0, -58.0, 33.0, 55.0, 71.0, -43.0, -13.0, -30.0, -12.0, 64.0, 35.0, 62.0, -67.0, 13.0, 93.0, -66.0, -92.0, -52.0, 83.0, 66.0, -100.0, 49.0, 87.0, 11.0, -89.0, 43.0, -50.0, 0.0, -78.0, 77.0, -79.0, 44.0, -25.0, 84.0, 82.0, -67.0, 28.0, -49.0, -21.0, -13.0],
[66.0, 6.0, 100.0, 24.0, -10.0, 1.0, 46.0, 53.0, 82.0, 48.0, -41.0, -49.0, -100.0, -56.0, -58.0, -44.0, -17.0, -23.0, -88.0, 75.0, 37.0, 52.0, 47.0, 82.0, 32.0, 11.0, 29.0, -95.0, 48.0, 48.0, 10.0, 92.0, -32.0, 77.0, 24.0, 47.0, 50.0, 55.0, -23.0, -89.0, -69.0, -15.0, 25.0, -29.0, 89.0, -92.0, 99.0, -21.0, 22.0, 87.0, -47.0, 88.0, -84.0, -64.0, 28.0, 94.0, -58.0, -84.0, 65.0, -86.0, 73.0, 76.0, 39.0, -73.0, -52.0, 94.0, -67.0, 1.0, -37.0, 1.0, -61.0, -38.0, 84.0, -52.0, 83.0, -94.0, -65.0, -18.0, 64.0, -44.0, -42.0, 97.0, -39.0, 91.0, 58.0, -65.0, -76.0, -36.0, -8.0, 86.0, -35.0, 25.0, -35.0, -5.0, -50.0, 9.0, 22.0, 20.0, -90.0, 91.0],
[-40.0, 4.0, -65.0, 58.0, 85.0, 70.0, -34.0, -40.0, 69.0, -36.0, -44.0, 41.0, 6.0, -75.0, 52.0, 86.0, 29.0, 56.0, -28.0, -55.0, -42.0, -35.0, 57.0, 67.0, 98.0, -3.0, 7.0, -32.0, -99.0, -64.0, -22.0, 72.0, 21.0, 22.0, -83.0, 7.0, -18.0, 12.0, 7.0, 79.0, -52.0, 77.0, 62.0, -86.0, -77.0, 11.0, -7.0, 28.0, -82.0, 85.0, 30.0, -90.0, 1.0, -67.0, -85.0, 40.0, 2.0, 41.0, 12.0, -12.0, 55.0, 89.0, 59.0, -65.0, 91.0, -38.0, -44.0, 37.0, 79.0, -61.0, -39.0, 75.0, 32.0, 0.0, -26.0, -74.0, 35.0, 16.0, 42.0, 61.0, 65.0, 20.0, -96.0, 51.0, 78.0, 2.0, 6.0, 16.0, 22.0, -81.0, 75.0, 69.0, 38.0, -2.0, 33.0, 15.0, -66.0, 40.0, 97.0, -20.0],
[-91.0, -13.0, -93.0, 64.0, 10.0, 33.0, 97.0, 27.0, 63.0, -1.0, -83.0, -30.0, 9.0, 85.0, 26.0, -9.0, 91.0, -30.0, -58.0, 63.0, -72.0, 38.0, 36.0, 47.0, 14.0, -63.0, -91.0, -32.0, 5.0, 27.0, 8.0, 89.0, 78.0, -65.0, 56.0, 65.0, -43.0, -82.0, -85.0, 92.0, 44.0, 20.0, -3.0, 67.0, -22.0, -44.0, -85.0, 81.0, -71.0, 89.0, -49.0, -94.0, 83.0, -22.0, 85.0, -87.0, 53.0, -49.0, 1.0, 97.0, 31.0, 62.0, 41.0, -19.0, 30.0, 57.0, 19.0, 47.0, 15.0, -21.0, 17.0, -63.0, 4.0, -80.0, -42.0, -55.0, 30.0, -31.0, 87.0, 34.0, -47.0, -19.0, -29.0, 97.0, -35.0, 84.0, 83.0, 98.0, 46.0, 57.0, -89.0, -38.0, 74.0, 25.0, -34.0, -42.0, 31.0, 33.0, -45.0, 81.0],
[10.0, -54.0, 67.0, 51.0, 84.0, 5.0, 57.0, 59.0, -31.0, 88.0, -86.0, -38.0, 70.0, 41.0, -67.0, 11.0, 77.0, 98.0, 41.0, -16.0, -87.0, 13.0, 49.0, -17.0, 70.0, 56.0, -25.0, 12.0, -60.0, 11.0, 73.0, 46.0, -27.0, 61.0, -93.0, -13.0, 60.0, 0.0, -37.0, 59.0, 67.0, -7.0, -85.0, 87.0, -26.0, -49.0, -85.0, -29.0, -18.0, 56.0, 67.0, 27.0, -17.0, -16.0, 17.0, -8.0, -98.0, 35.0, 69.0, 27.0, 67.0, -36.0, 15.0, -43.0, 3.0, -52.0, -81.0, -32.0, 97.0, 23.0, -91.0, 71.0, 57.0, -35.0, 53.0, 90.0, 46.0, 92.0, 35.0, 70.0, -57.0, -92.0, 94.0, -83.0, 14.0, -14.0, -65.0, -81.0, -76.0, -74.0, -77.0, -93.0, 70.0, 16.0, 84.0, -69.0, -63.0, 89.0, 23.0, 79.0],
[-38.0, 3.0, 36.0, -44.0, -60.0, 6.0, 32.0, -12.0, 81.0, 24.0, 41.0, -85.0, 46.0, 56.0, 35.0, -61.0, 23.0, -84.0, 85.0, 55.0, -76.0, 59.0, -59.0, -83.0, 89.0, 47.0, 30.0, 1.0, -67.0, 15.0, 91.0, -76.0, 96.0, 18.0, 45.0, -28.0, -76.0, -94.0, 50.0, 90.0, -36.0, -38.0, -23.0, 27.0, -84.0, -31.0, 82.0, 12.0, -12.0, -62.0, 49.0, -82.0, -16.0, 100.0, 43.0, -62.0, -96.0, 12.0, 0.0, -26.0, 92.0, 33.0, -19.0, -46.0, 81.0, -47.0, -1.0, 20.0, 71.0, 86.0, -27.0, 13.0, -66.0, -90.0, -51.0, 90.0, 90.0, -16.0, 33.0, 80.0, -50.0, 40.0, 58.0, -27.0, 22.0, -27.0, -14.0, -10.0, -77.0, 84.0, 67.0, 79.0, 0.0, -2.0, -28.0, 62.0, 60.0, 40.0, -19.0, 30.0],
[90.0, -30.0, -97.0, -56.0, -3.0, 11.0, -6.0, -86.0, 59.0, 70.0, 92.0, 39.0, -50.0, -39.0, -78.0, -19.0, 18.0, 3.0, -3.0, 42.0, 58.0, -67.0, 2.0, 79.0, 49.0, -1.0, -35.0, 55.0, -22.0, -75.0, 55.0, 83.0, -91.0, -61.0, -12.0, -74.0, -54.0, -95.0, 68.0, 15.0, -66.0, -93.0, 36.0, 64.0, 47.0, -11.0, 42.0, -8.0, -50.0, -97.0, 88.0, 81.0, 23.0, -63.0, -86.0, -91.0, 78.0, 74.0, -92.0, -88.0, 99.0, -22.0, 8.0, 63.0, -23.0, 38.0, 63.0, -47.0, -70.0, -3.0, -96.0, -36.0, 40.0, -79.0, 14.0, -56.0, 0.0, -40.0, -12.0, 85.0, -36.0, -1.0, 99.0, 12.0, -71.0, -84.0, 85.0, 64.0, 45.0, 25.0, 11.0, -54.0, 37.0, -36.0, -28.0, 56.0, 77.0, -44.0, -92.0, -67.0],
[-20.0, 28.0, -24.0, -76.0, -55.0, 66.0, -13.0, 34.0, 18.0, 6.0, 34.0, -9.0, -61.0, -66.0, -6.0, 34.0, -35.0, 71.0, -24.0, 85.0, 4.0, 83.0, -80.0, 6.0, 25.0, 34.0, -32.0, -36.0, 35.0, -69.0, -29.0, -7.0, 2.0, 34.0, -66.0, 52.0, 60.0, 88.0, -38.0, 37.0, 58.0, 58.0, 83.0, -18.0, -51.0, 37.0, 70.0, -18.0, 34.0, 16.0, 38.0, 71.0, -7.0, -5.0, -15.0, -26.0, -93.0, -57.0, -26.0, -95.0, -19.0, -24.0, -36.0, 67.0, 2.0, 70.0, 49.0, -4.0, 90.0, 43.0, 57.0, -93.0, -44.0, -43.0, 80.0, -6.0, -28.0, 91.0, 41.0, 85.0, 0.0, -85.0, 25.0, -70.0, 12.0, -9.0, 65.0, 18.0, -26.0, -33.0, 29.0, 2.0, 17.0, 81.0, 28.0, 90.0, 8.0, 67.0, -23.0, -6.0],
[-45.0, 88.0, 79.0, 32.0, -41.0, 31.0, -77.0, -49.0, -7.0, 91.0, -61.0, 59.0, -56.0, 13.0, 40.0, 60.0, -75.0, 86.0, 11.0, -20.0, 56.0, -3.0, 72.0, 39.0, -60.0, -75.0, 27.0, 17.0, 33.0, 33.0, -63.0, -14.0, 61.0, 59.0, -11.0, -44.0, 59.0, 30.0, -77.0, -40.0, 61.0, 33.0, 21.0, 70.0, 88.0, 21.0, -80.0, 6.0, -98.0, -14.0, -61.0, -41.0, 27.0, 80.0, 33.0, -37.0, 65.0, 74.0, -64.0, 44.0, -88.0, 1.0, -36.0, 81.0, -14.0, 61.0, -56.0, -57.0, 76.0, -58.0, -49.0, 16.0, 0.0, 39.0, 86.0, 42.0, 68.0, 94.0, 69.0, -68.0, -96.0, -66.0, 93.0, -23.0, 96.0, 4.0, 72.0, -63.0, -37.0, 62.0, 63.0, 89.0, 58.0, -68.0, -19.0, 71.0, -19.0, 58.0, -18.0, 34.0],
[-72.0, -78.0, -81.0, -90.0, -25.0, 75.0, -3.0, 70.0, 28.0, -25.0, -82.0, 44.0, -76.0, -32.0, 97.0, -13.0, -69.0, -9.0, 17.0, -75.0, 24.0, 86.0, 76.0, 21.0, -36.0, 35.0, -49.0, -91.0, -61.0, 75.0, 80.0, -14.0, 84.0, 38.0, -37.0, -73.0, -27.0, -55.0, 98.0, -10.0, -3.0, -49.0, 75.0, -100.0, 21.0, -48.0, -93.0, 27.0, 37.0, 71.0, 79.0, 43.0, 16.0, 41.0, 26.0, -39.0, 83.0, 65.0, 5.0, -46.0, 64.0, 10.0, 75.0, -80.0, -59.0, 68.0, -88.0, 21.0, 19.0, 35.0, 28.0, 53.0, -96.0, 46.0, -20.0, -94.0, 70.0, 91.0, 94.0, 61.0, -50.0, 24.0, 82.0, -84.0, 66.0, 63.0, 19.0, 47.0, 5.0, 67.0, -49.0, 42.0, -65.0, -62.0, -94.0, -96.0, 72.0, 79.0, -71.0, 92.0],
[37.0, -70.0, 62.0, 18.0, -34.0, -1.0, -73.0, -70.0, -14.0, -80.0, 88.0, -67.0, -38.0, -13.0, 90.0, -36.0, 31.0, -74.0, 18.0, 8.0, 7.0, -24.0, 11.0, 7.0, -71.0, -99.0, 66.0, 63.0, -58.0, 72.0, -91.0, 57.0, -12.0, -21.0, -29.0, 81.0, 4.0, 35.0, -67.0, -61.0, -63.0, -48.0, -94.0, 40.0, -92.0, 96.0, -3.0, 65.0, -29.0, 78.0, 50.0, 15.0, 86.0, -92.0, -12.0, 70.0, 13.0, 12.0, -79.0, 45.0, -18.0, -50.0, -54.0, 78.0, -40.0, -44.0, -28.0, -27.0, 95.0, -14.0, -46.0, 43.0, 87.0, 17.0, -96.0, 19.0, 59.0, -55.0, -7.0, 99.0, 39.0, 83.0, -81.0, 36.0, -58.0, 83.0, 59.0, -99.0, 31.0, -34.0, -70.0, 90.0, -50.0, 74.0, -30.0, 58.0, 25.0, 10.0, -41.0, 8.0],
[-29.0, 5.0, 28.0, 2.0, 14.0, -83.0, 85.0, -47.0, -2.0, -80.0, 28.0, 79.0, 60.0, 66.0, 59.0, 96.0, -85.0, -37.0, -95.0, 11.0, 25.0, -17.0, 41.0, -38.0, -13.0, -34.0, 64.0, 45.0, 15.0, -63.0, 18.0, 74.0, -37.0, -19.0, 60.0, 50.0, 56.0, 59.0, -37.0, 79.0, 84.0, 10.0, 72.0, 3.0, 63.0, 81.0, 55.0, 38.0, 94.0, 22.0, -84.0, 6.0, 37.0, -92.0, 43.0, 99.0, -16.0, -69.0, -32.0, 8.0, -93.0, 58.0, 86.0, 93.0, -66.0, -76.0, 71.0, -69.0, 54.0, -58.0, -87.0, -40.0, 79.0, -73.0, -42.0, -51.0, 61.0, -21.0, -68.0, -14.0, -72.0, 12.0, -1.0, -98.0, 26.0, -36.0, -11.0, -90.0, -16.0, -55.0, 22.0, -91.0, 45.0, -19.0, 12.0, 21.0, 64.0, 53.0, -50.0, -25.0],
[84.0, 24.0, -28.0, -60.0, 34.0, 17.0, -73.0, -96.0, 10.0, -95.0, 77.0, 57.0, 17.0, -77.0, -48.0, -79.0, 41.0, -74.0, -53.0, 40.0, -67.0, -63.0, 42.0, 19.0, 87.0, 44.0, 15.0, -29.0, 84.0, -19.0, 81.0, 73.0, 98.0, -72.0, 12.0, 98.0, -36.0, -43.0, 30.0, 6.0, 92.0, -72.0, -98.0, -11.0, -38.0, 80.0, 3.0, -38.0, -88.0, -21.0, -19.0, -74.0, 41.0, -10.0, -17.0, -66.0, 27.0, -14.0, 46.0, -56.0, -15.0, -48.0, -61.0, -51.0, 59.0, 17.0, 1.0, 71.0, 1.0, -95.0, 80.0, 58.0, -75.0, 18.0, 88.0, -3.0, 22.0, 6.0, 33.0, 47.0, 75.0, -97.0, 27.0, 16.0, 68.0, -26.0, -91.0, -100.0, 48.0, -100.0, -14.0, 11.0, 81.0, 76.0, 24.0, -95.0, 60.0, -56.0, 46.0, -4.0],
[-86.0, -4.0, -43.0, 95.0, 55.0, 11.0, 53.0, -27.0, -4.0, -78.0, 62.0, -72.0, -89.0, 97.0, 97.0, -60.0, -19.0, -19.0, 32.0, -57.0, 7.0, -82.0, 29.0, -91.0, -8.0, -29.0, -20.0, 95.0, -10.0, 7.0, -55.0, 1.0, 99.0, 66.0, 30.0, 82.0, -52.0, -45.0, 71.0, 77.0, -63.0, 74.0, 69.0, 21.0, -11.0, -20.0, 94.0, -94.0, -87.0, 72.0, -83.0, 11.0, 38.0, 9.0, 90.0, -27.0, 57.0, -55.0, -53.0, 59.0, 42.0, 21.0, 11.0, -97.0, 31.0, 14.0, -54.0, -81.0, -3.0, 90.0, -22.0, -55.0, -96.0, -45.0, -36.0, 29.0, 85.0, -67.0, -68.0, -88.0, -67.0, 74.0, 49.0, -25.0, -10.0, 29.0, -64.0, -23.0, -28.0, 11.0, -88.0, -79.0, -43.0, 50.0, 7.0, -6.0, -28.0, -48.0, -58.0, 14.0],
[62.0, -18.0, 36.0, 75.0, 51.0, 84.0, -1.0, -10.0, -87.0, 73.0, 48.0, 21.0, 92.0, -90.0, -14.0, -5.0, -26.0, 8.0, 18.0, 34.0, -49.0, 46.0, -50.0, -13.0, 87.0, -95.0, 98.0, 6.0, 94.0, 81.0, 53.0, -78.0, 90.0, 8.0, 2.0, -91.0, -71.0, -69.0, -20.0, 74.0, 87.0, 95.0, -67.0, 22.0, 44.0, -75.0, 45.0, -84.0, -88.0, 43.0, -52.0, 65.0, -99.0, -17.0, 52.0, -44.0, 29.0, -20.0, 80.0, 92.0, -66.0, 74.0, 83.0, -22.0, 27.0, -49.0, -43.0, 89.0, 59.0, -42.0, -76.0, -45.0, -97.0, 97.0, -52.0, -8.0, -70.0, -58.0, 72.0, 60.0, 29.0, 56.0, 36.0, -49.0, -97.0, 89.0, -67.0, -68.0, -51.0, -72.0, 38.0, 94.0, -3.0, -71.0, 36.0, -8.0, 52.0, -95.0, -89.0, -54.0],
[26.0, 14.0, -15.0, -73.0, -79.0, 51.0, -98.0, -76.0, 38.0, 2.0, 72.0, -68.0, -52.0, -68.0, 38.0, -27.0, 9.0, 25.0, 91.0, -3.0, -48.0, -71.0, 84.0, 40.0, 23.0, 82.0, -96.0, 35.0, 84.0, -61.0, -38.0, 76.0, 60.0, -61.0, -7.0, 79.0, 32.0, -47.0, 79.0, 93.0, -60.0, 49.0, 9.0, -96.0, -88.0, 97.0, 21.0, 44.0, 68.0, 74.0, -38.0, 22.0, 5.0, -53.0, 29.0, 37.0, 1.0, 34.0, -73.0, 7.0, -28.0, -82.0, 56.0, 33.0, -38.0, -65.0, -88.0, 2.0, 79.0, 97.0, 17.0, -97.0, 23.0, 45.0, 8.0, 25.0, 50.0, 25.0, -65.0, 10.0, 64.0, -10.0, 90.0, 50.0, -12.0, 2.0, 0.0, -97.0, 92.0, -19.0, -94.0, 37.0, -23.0, -41.0, 16.0, -60.0, -55.0, 9.0, 85.0, 5.0],
[-68.0, 61.0, 60.0, -72.0, 65.0, -81.0, 72.0, -93.0, -61.0, 64.0, -64.0, 7.0, 33.0, 52.0, -81.0, -98.0, -66.0, 63.0, -11.0, -32.0, -19.0, -51.0, 25.0, -9.0, 55.0, 43.0, -51.0, -63.0, -57.0, 49.0, -13.0, 5.0, 12.0, 81.0, -86.0, 33.0, 36.0, 67.0, -58.0, -73.0, 15.0, 99.0, -52.0, -42.0, 46.0, 16.0, 50.0, -66.0, -85.0, -93.0, 22.0, -81.0, 50.0, 71.0, -32.0, -86.0, 25.0, 22.0, 95.0, -56.0, -93.0, 21.0, 49.0, 24.0, -57.0, -42.0, -26.0, 30.0, -10.0, 89.0, -11.0, 6.0, 29.0, -32.0, 50.0, 77.0, 68.0, -19.0, 67.0, 89.0, 19.0, -47.0, -32.0, 99.0, -51.0, 59.0, 94.0, 6.0, -40.0, -73.0, 25.0, -64.0, -65.0, 71.0, -50.0, 66.0, -22.0, 35.0, -26.0, -95.0],
[43.0, 57.0, 54.0, -4.0, -45.0, -41.0, -96.0, -73.0, 78.0, 73.0, 70.0, 34.0, -61.0, -75.0, 77.0, -41.0, -13.0, -67.0, -46.0, 82.0, -4.0, -39.0, -32.0, -95.0, -76.0, 76.0, 69.0, 35.0, 42.0, 46.0, -85.0, -45.0, -92.0, -94.0, 11.0, -33.0, 86.0, -68.0, -19.0, 91.0, 24.0, 74.0, 44.0, -3.0, -76.0, -31.0, -91.0, -11.0, 5.0, -84.0, -79.0, -71.0, -78.0, -29.0, -46.0, 60.0, -5.0, -85.0, 83.0, -30.0, -74.0, -31.0, 57.0, 90.0, -80.0, -16.0, -38.0, 16.0, 14.0, -70.0, -66.0, 27.0, -59.0, 15.0, -100.0, 39.0, 7.0, 75.0, 33.0, -33.0, 91.0, -5.0, -33.0, 50.0, 80.0, -93.0, 69.0, 63.0, 20.0, 44.0, -26.0, 84.0, -90.0, -13.0, -21.0, 14.0, -32.0, 32.0, 55.0, 80.0],
[98.0, 3.0, -67.0, -87.0, 22.0, -89.0, -58.0, -87.0, -29.0, -3.0, -26.0, 9.0, -82.0, 23.0, 58.0, 47.0, 6.0, 37.0, 49.0, -67.0, 9.0, -12.0, -5.0, -46.0, -24.0, 27.0, 16.0, 9.0, 93.0, -81.0, 76.0, -10.0, -61.0, -29.0, 67.0, 43.0, -24.0, 43.0, 17.0, 68.0, -3.0, -14.0, -53.0, -42.0, 96.0, 69.0, -64.0, 18.0, -75.0, 82.0, -36.0, 96.0, 4.0, -65.0, 98.0, -88.0, 91.0, -54.0, -5.0, 17.0, -95.0, -48.0, 45.0, -81.0, 95.0, 62.0, -89.0, 44.0, 70.0, -33.0, -31.0, 97.0, -33.0, -91.0, 10.0, 62.0, 36.0, -8.0, 10.0, -40.0, 98.0, 85.0, -88.0, 53.0, 8.0, -11.0, 96.0, 8.0, -49.0, -61.0, 96.0, -63.0, -49.0, 59.0, -78.0, -60.0, -97.0, -63.0, 87.0, 34.0],
[4.0, -80.0, 12.0, 5.0, 69.0, 67.0, -3.0, 6.0, 75.0, 25.0, 35.0, 19.0, 62.0, 0.0, 99.0, 53.0, -80.0, 13.0, -51.0, 26.0, 51.0, 28.0, -4.0, -93.0, -64.0, -5.0, 27.0, -34.0, -5.0, -90.0, -38.0, -40.0, 16.0, 39.0, -16.0, 31.0, -90.0, -82.0, 57.0, 28.0, 9.0, -90.0, -54.0, 0.0, 46.0, -71.0, -6.0, 41.0, -63.0, 60.0, 28.0, 96.0, -54.0, 21.0, -45.0, -34.0, -89.0, 100.0, 25.0, 92.0, 19.0, 43.0, -4.0, -59.0, -62.0, -87.0, -71.0, 69.0, 18.0, -24.0, -23.0, -50.0, 80.0, -29.0, -25.0, -80.0, -14.0, -84.0, -54.0, -4.0, -61.0, -5.0, -37.0, -10.0, -48.0, 65.0, 64.0, -42.0, -87.0, 65.0, 49.0, -30.0, -52.0, 40.0, -17.0, -55.0, 13.0, 31.0, 64.0, 22.0],
[-39.0, 31.0, 82.0, 31.0, 40.0, -49.0, -22.0, -31.0, 96.0, 82.0, -60.0, 14.0, -70.0, 81.0, -88.0, -40.0, -36.0, -68.0, 15.0, 79.0, -60.0, -53.0, 45.0, -35.0, 94.0, 0.0, 0.0, -65.0, -3.0, 9.0, -70.0, 66.0, -77.0, 15.0, 9.0, 14.0, 3.0, 96.0, -76.0, 72.0, 71.0, -56.0, -40.0, 34.0, 19.0, 10.0, 100.0, -48.0, 82.0, -18.0, -44.0, 93.0, 64.0, 16.0, 72.0, -61.0, -14.0, 19.0, -5.0, -3.0, 20.0, -40.0, -59.0, -9.0, 77.0, -31.0, -50.0, -5.0, 50.0, 78.0, 6.0, 71.0, 33.0, -4.0, 22.0, -88.0, -96.0, -76.0, 97.0, -60.0, -70.0, 64.0, -62.0, -12.0, 37.0, 48.0, 74.0, -63.0, 89.0, 29.0, 42.0, 85.0, -12.0, -63.0, 20.0, -28.0, -71.0, -12.0, 31.0, -74.0],
[-24.0, 74.0, 95.0, -22.0, 64.0, 9.0, -34.0, 66.0, -16.0, 30.0, -100.0, -59.0, 32.0, 69.0, -34.0, 96.0, -25.0, 63.0, -84.0, 50.0, 100.0, 77.0, 23.0, -55.0, -88.0, 41.0, 70.0, 19.0, 14.0, -51.0, 27.0, -12.0, 55.0, -31.0, -95.0, -75.0, -11.0, 12.0, -73.0, 28.0, -48.0, 68.0, -36.0, -4.0, -68.0, 42.0, 59.0, 41.0, 96.0, -23.0, 54.0, 91.0, 6.0, 10.0, -15.0, 96.0, 54.0, 35.0, 23.0, -68.0, -42.0, 41.0, 2.0, -96.0, 64.0, 18.0, 52.0, -76.0, 57.0, 72.0, -37.0, 25.0, -5.0, -97.0, 75.0, -77.0, -47.0, -86.0, -62.0, -47.0, -41.0, 10.0, -17.0, -78.0, -37.0, -69.0, 8.0, -55.0, -82.0, -65.0, 92.0, -90.0, -30.0, -38.0, 89.0, -98.0, -74.0, -77.0, 31.0, -31.0],
[77.0, -28.0, -34.0, 74.0, -86.0, 60.0, 92.0, 83.0, 43.0, 54.0, 60.0, -82.0, -43.0, 9.0, -94.0, -64.0, 42.0, -92.0, 73.0, -7.0, -2.0, -52.0, 0.0, -5.0, 69.0, 76.0, 22.0, 1.0, 76.0, 83.0, 78.0, -86.0, 0.0, 68.0, 91.0, 6.0, -64.0, 85.0, -43.0, -18.0, 90.0, -29.0, 53.0, 36.0, -13.0, -89.0, -8.0, 100.0, 18.0, -3.0, -44.0, -73.0, 98.0, -70.0, 13.0, 99.0, 87.0, -19.0, -6.0, -9.0, -36.0, -31.0, -90.0, 39.0, -53.0, 12.0, 22.0, -57.0, -45.0, 38.0, 68.0, 38.0, -4.0, -19.0, -90.0, 46.0, -52.0, -27.0, -57.0, -37.0, -63.0, -56.0, 75.0, 58.0, 81.0, 74.0, 54.0, 32.0, -34.0, 30.0, 82.0, 21.0, -74.0, -36.0, 17.0, 98.0, -55.0, -73.0, -34.0, -2.0],
[7.0, -74.0, -52.0, 90.0, -42.0, -9.0, -98.0, 85.0, -2.0, -48.0, 28.0, 35.0, -41.0, 24.0, 11.0, 23.0, 90.0, -74.0, -91.0, -63.0, -90.0, 54.0, -99.0, -14.0, 1.0, -74.0, -54.0, 14.0, -60.0, 79.0, 72.0, 89.0, -94.0, 57.0, 0.0, 90.0, 74.0, -25.0, -76.0, -59.0, 28.0, 39.0, -85.0, 57.0, 38.0, -61.0, 93.0, 76.0, -83.0, -29.0, 37.0, -69.0, 36.0, 95.0, 3.0, -12.0, -40.0, -99.0, 66.0, 18.0, 26.0, 91.0, -53.0, -4.0, -16.0, -70.0, 12.0, -21.0, -11.0, -90.0, 55.0, -79.0, 65.0, -63.0, 55.0, 87.0, -8.0, 42.0, 65.0, 63.0, -34.0, -64.0, 15.0, 70.0, -12.0, -69.0, -96.0, -99.0, 65.0, 28.0, -42.0, 82.0, 12.0, -13.0, 1.0, 46.0, 84.0, -31.0, -29.0, 26.0],
[-28.0, -86.0, -69.0, -62.0, 67.0, -92.0, 14.0, -48.0, 62.0, 77.0, -24.0, -62.0, 6.0, 28.0, 63.0, -46.0, 86.0, 72.0, -92.0, 89.0, 83.0, -33.0, -90.0, 94.0, 32.0, -38.0, 31.0, 79.0, -17.0, -28.0, -95.0, 52.0, -83.0, -72.0, -90.0, 78.0, 12.0, 62.0, 85.0, -44.0, 53.0, -23.0, -23.0, -18.0, -20.0, 53.0, -12.0, -100.0, 44.0, 96.0, -43.0, -13.0, -17.0, 56.0, 58.0, -90.0, 15.0, -11.0, 51.0, 82.0, -71.0, -74.0, -3.0, 94.0, 99.0, -17.0, -12.0, 20.0, 65.0, 86.0, 66.0, 24.0, 11.0, 91.0, -63.0, 40.0, 72.0, 48.0, -58.0, 33.0, 38.0, -5.0, -58.0, 86.0, -12.0, 45.0, 9.0, -63.0, -88.0, -5.0, 86.0, -49.0, 70.0, -7.0, -89.0, -25.0, -20.0, -30.0, -14.0, -92.0],
[27.0, 69.0, -69.0, 24.0, 76.0, -27.0, 20.0, -14.0, 46.0, -38.0, -16.0, -47.0, 66.0, -26.0, 63.0, 40.0, 82.0, 16.0, 38.0, 66.0, 17.0, -29.0, 32.0, -36.0, -25.0, -38.0, -37.0, -78.0, 2.0, 2.0, 65.0, -60.0, -65.0, -26.0, 7.0, 19.0, 63.0, -47.0, 66.0, 87.0, 11.0, 10.0, 92.0, 38.0, 73.0, 87.0, 23.0, 12.0, 21.0, 67.0, 2.0, -78.0, -52.0, 80.0, -13.0, -6.0, -71.0, -75.0, 63.0, -2.0, -39.0, -61.0, -97.0, -3.0, -46.0, -86.0, 71.0, -47.0, -31.0, -66.0, -8.0, -47.0, -42.0, 40.0, 32.0, 60.0, -10.0, -54.0, 82.0, -65.0, -35.0, 45.0, 95.0, -43.0, -87.0, -32.0, 0.0, 5.0, 78.0, -2.0, 18.0, 99.0, -24.0, 10.0, -72.0, -36.0, 47.0, -96.0, -49.0, 1.0],
[72.0, 35.0, -41.0, -63.0, 68.0, -76.0, -63.0, 64.0, 41.0, 94.0, -91.0, -53.0, 87.0, 100.0, -9.0, 26.0, 2.0, -40.0, 89.0, 99.0, 18.0, 51.0, 16.0, -30.0, -79.0, 74.0, -91.0, 86.0, -16.0, -3.0, -41.0, -59.0, 46.0, -25.0, -53.0, 56.0, -17.0, 24.0, 67.0, 44.0, 100.0, 17.0, 22.0, -96.0, 46.0, -59.0, -21.0, 50.0, 50.0, -7.0, 70.0, 88.0, -29.0, -21.0, -20.0, -21.0, -54.0, -26.0, -37.0, 31.0, -7.0, -17.0, 81.0, -53.0, 55.0, 79.0, -14.0, -7.0, 66.0, -24.0, -48.0, -26.0, 45.0, 79.0, -56.0, 49.0, 75.0, 10.0, -52.0, -87.0, 10.0, 25.0, -53.0, 88.0, 53.0, 95.0, 55.0, 57.0, 66.0, -12.0, 94.0, 23.0, 21.0, -64.0, -89.0, -96.0, 1.0, 64.0, 98.0, -42.0],
[79.0, -99.0, 5.0, 60.0, 3.0, 28.0, 67.0, 48.0, 8.0, 69.0, 47.0, 60.0, 22.0, 5.0, -5.0, 68.0, -91.0, 68.0, -26.0, 89.0, 90.0, -44.0, -30.0, -59.0, -76.0, -39.0, -16.0, 97.0, 86.0, 16.0, -54.0, -38.0, 96.0, -36.0, 36.0, -72.0, -3.0, -46.0, -84.0, 42.0, 25.0, 57.0, 98.0, 89.0, 61.0, -69.0, 56.0, 0.0, -69.0, -45.0, 84.0, -67.0, 33.0, -75.0, -32.0, 99.0, -60.0, -43.0, -43.0, -57.0, 60.0, 2.0, 96.0, -57.0, -6.0, 32.0, 30.0, -10.0, 47.0, 28.0, 31.0, -67.0, -6.0, 22.0, -37.0, -29.0, 30.0, -30.0, -55.0, -77.0, 39.0, 12.0, -74.0, 32.0, -4.0, 7.0, -69.0, -58.0, 20.0, 97.0, 26.0, -86.0, -99.0, 13.0, 25.0, -83.0, 56.0, -52.0, -79.0, -53.0],
[-70.0, 13.0, -61.0, -9.0, 58.0, -28.0, 72.0, -40.0, -20.0, -40.0, 8.0, -42.0, 99.0, -2.0, 44.0, 9.0, 14.0, -36.0, -20.0, 37.0, 87.0, -67.0, -96.0, 24.0, 93.0, -65.0, -16.0, -85.0, -26.0, -88.0, 28.0, -71.0, -83.0, 53.0, 3.0, -89.0, 65.0, -74.0, 95.0, -83.0, -21.0, -10.0, -44.0, -79.0, -47.0, 50.0, 5.0, 52.0, -64.0, -33.0, -12.0, -37.0, 5.0, 18.0, -9.0, -27.0, 11.0, 94.0, -57.0, -79.0, -68.0, 93.0, 5.0, 24.0, -77.0, 57.0, -11.0, -1.0, -82.0, -38.0, -68.0, 90.0, 100.0, -75.0, 36.0, 49.0, 6.0, 56.0, 58.0, -12.0, -39.0, 27.0, -74.0, 44.0, -57.0, -33.0, 45.0, 74.0, 18.0, 30.0, -16.0, -19.0, 36.0, -71.0, -65.0, 95.0, 11.0, 57.0, -65.0, -31.0],
[-3.0, -86.0, 59.0, 21.0, 54.0, 93.0, 51.0, 86.0, -87.0, -68.0, -1.0, 69.0, 19.0, -58.0, -70.0, 52.0, 86.0, -46.0, 77.0, 42.0, -75.0, -61.0, 94.0, -91.0, -59.0, -19.0, 85.0, -34.0, 3.0, 78.0, 19.0, 24.0, -14.0, -37.0, -22.0, 76.0, -15.0, 33.0, -36.0, 96.0, 32.0, -60.0, -51.0, -9.0, 69.0, 16.0, 7.0, 2.0, 56.0, -23.0, 17.0, -76.0, -9.0, -77.0, -63.0, 35.0, 46.0, -75.0, 31.0, -90.0, -4.0, 87.0, 38.0, -34.0, -33.0, 85.0, 16.0, -40.0, -77.0, 95.0, 46.0, -76.0, 34.0, -29.0, 60.0, 92.0, 81.0, 49.0, -81.0, 28.0, 95.0, 29.0, -10.0, -90.0, 83.0, -33.0, -65.0, -88.0, -81.0, 13.0, 43.0, 28.0, -78.0, 14.0, -24.0, 11.0, -69.0, -83.0, -33.0, -52.0],
[59.0, -12.0, -55.0, 21.0, -52.0, -87.0, -41.0, 77.0, 7.0, 74.0, -56.0, 30.0, -9.0, -60.0, 62.0, -29.0, 44.0, -8.0, -34.0, 37.0, 80.0, 99.0, 19.0, 27.0, 95.0, 72.0, 66.0, 37.0, -97.0, -71.0, 1.0, -24.0, 38.0, -45.0, -4.0, -76.0, -80.0, 33.0, 85.0, -47.0, -18.0, 27.0, 54.0, 59.0, -22.0, -47.0, -67.0, -90.0, 42.0, 92.0, 10.0, 54.0, 38.0, 34.0, 28.0, 44.0, 15.0, 81.0, 98.0, -89.0, -1.0, 69.0, 5.0, 12.0, 44.0, -57.0, -71.0, -30.0, -68.0, 87.0, -24.0, 48.0, -25.0, 100.0, -53.0, 22.0, -100.0, -95.0, -75.0, 28.0, -4.0, 65.0, 30.0, -93.0, 24.0, -32.0, 21.0, -59.0, 98.0, -40.0, 68.0, 23.0, 12.0, 99.0, 56.0, 76.0, -21.0, -46.0, -36.0, 72.0],
[-8.0, 97.0, 88.0, -82.0, 43.0, -81.0, -32.0, 38.0, -33.0, -77.0, 39.0, -40.0, -88.0, 65.0, 1.0, -86.0, -78.0, -50.0, 32.0, -43.0, 39.0, -91.0, -19.0, 75.0, -5.0, 75.0, -68.0, 66.0, -7.0, -40.0, 71.0, 63.0, -6.0, 8.0, -39.0, -28.0, -59.0, 99.0, 69.0, 73.0, -92.0, 59.0, -77.0, -81.0, -32.0, 77.0, -1.0, -50.0, 91.0, -54.0, -88.0, 95.0, 21.0, 36.0, 54.0, -57.0, -92.0, 72.0, 13.0, -9.0, 96.0, -30.0, 44.0, 5.0, -14.0, 20.0, -80.0, 66.0, 37.0, 23.0, -5.0, 45.0, -69.0, -52.0, 49.0, -3.0, 74.0, -24.0, -40.0, 59.0, 49.0, -5.0, 45.0, -6.0, 63.0, -41.0, 85.0, -71.0, -93.0, 24.0, 87.0, -44.0, -68.0, 57.0, 51.0, 82.0, -31.0, 53.0, 14.0, 47.0],
[-87.0, -81.0, -12.0, -73.0, 0.0, -36.0, -4.0, -97.0, -68.0, -84.0, -16.0, 82.0, -16.0, -84.0, -18.0, -62.0, -44.0, -79.0, -96.0, -90.0, -60.0, -22.0, 45.0, -2.0, -30.0, -91.0, 65.0, -39.0, -67.0, -93.0, -37.0, 44.0, -2.0, 91.0, 24.0, 24.0, 37.0, 43.0, -59.0, -68.0, -74.0, 45.0, -79.0, 75.0, 45.0, -44.0, 80.0, 68.0, -71.0, -36.0, 91.0, 22.0, 62.0, 99.0, -91.0, 32.0, -65.0, -63.0, 92.0, -97.0, -78.0, 77.0, 23.0, -98.0, 4.0, -91.0, 88.0, 74.0, 38.0, -2.0, -57.0, -66.0, -22.0, -14.0, 0.0, -47.0, -86.0, 46.0, 71.0, 69.0, -94.0, 17.0, -3.0, -97.0, -96.0, -74.0, -15.0, 25.0, 46.0, 18.0, 34.0, -33.0, 97.0, 60.0, -22.0, 93.0, -21.0, 65.0, 36.0, -7.0],
[90.0, 9.0, 57.0, -55.0, -93.0, -96.0, -91.0, 89.0, 75.0, 24.0, -46.0, 21.0, 4.0, -81.0, -68.0, -43.0, -44.0, -65.0, 3.0, 92.0, 8.0, -22.0, 86.0, 85.0, 87.0, 62.0, 54.0, 35.0, -25.0, -92.0, 58.0, 96.0, 58.0, -95.0, 49.0, 40.0, -47.0, 22.0, -48.0, 2.0, -64.0, 20.0, -35.0, 76.0, -71.0, -10.0, -82.0, 63.0, -24.0, -17.0, -96.0, -61.0, -74.0, -22.0, -45.0, 70.0, 68.0, 54.0, -30.0, -79.0, 92.0, -71.0, 87.0, 45.0, -29.0, 63.0, 92.0, 60.0, 73.0, -7.0, -36.0, 67.0, 97.0, 52.0, 41.0, 37.0, -80.0, 65.0, 83.0, 23.0, 28.0, -48.0, 54.0, -14.0, -60.0, -88.0, 44.0, -8.0, 50.0, -2.0, -59.0, 67.0, 47.0, -97.0, -35.0, -99.0, -33.0, 35.0, 76.0, -23.0],
[-42.0, -49.0, -77.0, 50.0, 83.0, -49.0, -65.0, 92.0, -60.0, 0.0, 54.0, 31.0, -27.0, 95.0, 46.0, -2.0, -64.0, -58.0, -46.0, 68.0, 10.0, 10.0, -7.0, -7.0, 89.0, 25.0, 89.0, 84.0, -18.0, 14.0, 69.0, 22.0, 60.0, -53.0, 45.0, -25.0, 57.0, 64.0, 22.0, -42.0, 4.0, 71.0, -92.0, -18.0, -32.0, -69.0, 64.0, 73.0, 5.0, -7.0, 24.0, -31.0, 66.0, 49.0, 71.0, -62.0, 57.0, -63.0, -95.0, -13.0, -83.0, -77.0, 30.0, 73.0, -26.0, 41.0, -86.0, 2.0, 61.0, -25.0, -93.0, 89.0, -82.0, 83.0, -63.0, -16.0, 46.0, 51.0, -41.0, -46.0, -22.0, -91.0, 84.0, 74.0, 23.0, 53.0, 79.0, -94.0, -97.0, -84.0, 82.0, 12.0, -35.0, 24.0, 19.0, 76.0, -3.0, 73.0, 12.0, -99.0],
[-31.0, 75.0, 30.0, -69.0, -53.0, 15.0, 98.0, -44.0, 62.0, 63.0, 46.0, -63.0, -82.0, 10.0, -87.0, 63.0, 0.0, 79.0, -65.0, 92.0, -29.0, 44.0, -35.0, 81.0, -49.0, 59.0, -21.0, 32.0, -5.0, 18.0, 57.0, -6.0, -77.0, 37.0, 67.0, 67.0, 10.0, 75.0, -94.0, 12.0, -97.0, -80.0, -57.0, 88.0, 23.0, 18.0, 69.0, 31.0, -80.0, 100.0, -16.0, 22.0, 63.0, -53.0, 62.0, -87.0, 53.0, -5.0, 30.0, 90.0, 11.0, -86.0, 10.0, 21.0, -86.0, -41.0, 58.0, -78.0, 48.0, 83.0, -52.0, -85.0, -40.0, 45.0, 39.0, -9.0, 11.0, -29.0, -62.0, -6.0, -25.0, -90.0, -58.0, -37.0, 49.0, 29.0, -83.0, 83.0, -12.0, 41.0, 98.0, -68.0, 99.0, -84.0, 46.0, 22.0, -24.0, 72.0, -81.0, 34.0],
[-72.0, -96.0, -92.0, -66.0, -56.0, -85.0, -12.0, -20.0, 64.0, -24.0, -56.0, 47.0, 8.0, -37.0, -24.0, -96.0, -4.0, -50.0, -23.0, 39.0, -68.0, -43.0, -30.0, -19.0, -42.0, 34.0, -64.0, 65.0, -60.0, 27.0, -47.0, -28.0, -22.0, 34.0, 73.0, -29.0, -72.0, -25.0, 20.0, -67.0, -59.0, -89.0, -20.0, -39.0, 23.0, -92.0, -35.0, -96.0, -70.0, -68.0, 58.0, -2.0, 73.0, 23.0, -26.0, 92.0, -63.0, -19.0, -51.0, 96.0, 26.0, 10.0, 91.0, 0.0, 93.0, 74.0, -27.0, -10.0, 82.0, 99.0, 81.0, -55.0, 32.0, -75.0, 16.0, 46.0, -88.0, -47.0, -50.0, 63.0, 97.0, 2.0, -20.0, -38.0, 34.0, -22.0, 93.0, -43.0, -11.0, 11.0, -16.0, 86.0, 32.0, -54.0, -97.0, -9.0, 18.0, 49.0, -89.0, -66.0],
[8.0, 8.0, -63.0, 92.0, -68.0, -84.0, -28.0, -50.0, -40.0, -63.0, -48.0, -97.0, 44.0, 73.0, -80.0, -57.0, -75.0, -32.0, -96.0, -61.0, 39.0, -93.0, 37.0, 17.0, -74.0, -2.0, 26.0, -72.0, -2.0, 85.0, 47.0, 87.0, 9.0, -82.0, 8.0, 56.0, 20.0, 71.0, -46.0, 69.0, 54.0, -73.0, 45.0, -79.0, 5.0, -27.0, 43.0, -73.0, -16.0, 71.0, -67.0, -67.0, 39.0, 9.0, 4.0, 36.0, -20.0, -40.0, 19.0, 27.0, -60.0, -77.0, 93.0, 73.0, 16.0, 94.0, -56.0, 12.0, 82.0, 39.0, -89.0, 75.0, 59.0, 80.0, 77.0, -41.0, 9.0, 44.0, -48.0, 17.0, 58.0, 43.0, 44.0, 28.0, 49.0, 76.0, 65.0, 41.0, 96.0, -85.0, -36.0, -17.0, -85.0, 43.0, 73.0, 20.0, 51.0, -61.0, -93.0, 94.0],
[-19.0, 60.0, -22.0, 26.0, 0.0, -99.0, -22.0, -47.0, -27.0, 91.0, -33.0, -9.0, -94.0, -43.0, 65.0, -85.0, 91.0, 39.0, 90.0, -4.0, 95.0, 80.0, -57.0, 98.0, 10.0, -43.0, 40.0, -74.0, -14.0, -87.0, 89.0, -2.0, 26.0, -96.0, -37.0, 84.0, -47.0, 25.0, 81.0, 40.0, 95.0, -33.0, 12.0, -90.0, 56.0, 94.0, 33.0, -96.0, 36.0, 69.0, 87.0, -33.0, 41.0, -19.0, 9.0, 50.0, 39.0, -83.0, -84.0, -94.0, -17.0, 66.0, -3.0, -34.0, -24.0, -23.0, 57.0, -12.0, -66.0, -70.0, -3.0, -64.0, 15.0, 25.0, 23.0, 23.0, 38.0, -63.0, 70.0, 13.0, 6.0, 46.0, 30.0, 93.0, -96.0, 54.0, -45.0, 33.0, -13.0, -86.0, -53.0, 52.0, -53.0, 66.0, -82.0, -59.0, 13.0, -98.0, 40.0, 13.0],
[6.0, -40.0, -12.0, -46.0, 1.0, -89.0, -26.0, 49.0, 25.0, 70.0, 26.0, 26.0, 30.0, 35.0, -64.0, -42.0, -52.0, -28.0, -64.0, -60.0, 43.0, -13.0, 19.0, -4.0, -9.0, -41.0, -34.0, -60.0, 26.0, -45.0, -72.0, 62.0, -43.0, -93.0, -80.0, 87.0, -75.0, 66.0, -19.0, -20.0, -56.0, 30.0, 7.0, -5.0, 51.0, -29.0, 72.0, -70.0, -62.0, 49.0, -45.0, 51.0, -18.0, 31.0, -66.0, 69.0, -1.0, -59.0, -11.0, -95.0, 80.0, 4.0, 98.0, 71.0, 78.0, -78.0, -78.0, 61.0, 29.0, 97.0, 12.0, 85.0, -28.0, -19.0, -40.0, 31.0, -22.0, 70.0, -27.0, -75.0, -100.0, 94.0, 65.0, -89.0, 68.0, -72.0, -53.0, -74.0, 56.0, 45.0, 98.0, -84.0, -60.0, 70.0, 30.0, -80.0, 8.0, -84.0, -73.0, 11.0],
[-86.0, 44.0, 27.0, -40.0, 99.0, 55.0, 83.0, 80.0, -80.0, -44.0, -98.0, -67.0, 92.0, 73.0, 12.0, -32.0, -3.0, -97.0, 37.0, -13.0, 96.0, -77.0, -82.0, 93.0, 39.0, 64.0, 88.0, -5.0, -95.0, -30.0, 10.0, -1.0, 51.0, 30.0, 73.0, -88.0, 41.0, 88.0, -22.0, -51.0, -57.0, 48.0, 97.0, -50.0, 66.0, -18.0, -58.0, 79.0, -93.0, 88.0, -28.0, 42.0, 39.0, -74.0, 12.0, 70.0, -98.0, 15.0, -88.0, 82.0, -20.0, 46.0, -86.0, 11.0, -14.0, -90.0, -94.0, -74.0, 74.0, 71.0, 11.0, 51.0, 9.0, 2.0, -23.0, 55.0, 63.0, 3.0, 87.0, -26.0, -36.0, -88.0, -59.0, 68.0, 28.0, -34.0, -22.0, -44.0, -17.0, 31.0, -64.0, -24.0, -33.0, 47.0, -50.0, 88.0, -75.0, -70.0, -94.0, -39.0],
[-7.0, 84.0, 48.0, 29.0, -89.0, -97.0, -46.0, 74.0, -98.0, 76.0, 14.0, 52.0, 18.0, -79.0, 3.0, 9.0, -80.0, 19.0, -96.0, 42.0, 53.0, 11.0, -83.0, 42.0, 49.0, -22.0, -89.0, 11.0, 62.0, 20.0, -66.0, 43.0, 82.0, 68.0, 37.0, -30.0, -78.0, -11.0, -76.0, -97.0, 93.0, -45.0, -89.0, -14.0, -58.0, 79.0, 24.0, -31.0, 87.0, 43.0, -10.0, -27.0, 0.0, 99.0, 60.0, 61.0, -93.0, 24.0, 50.0, 79.0, -79.0, 44.0, -49.0, -71.0, 42.0, 28.0, 39.0, 3.0, -85.0, 44.0, 1.0, 42.0, 34.0, 23.0, -31.0, -74.0, 76.0, -15.0, -33.0, -87.0, 95.0, -89.0, 85.0, 30.0, 1.0, 23.0, 21.0, 13.0, 49.0, -21.0, 26.0, -98.0, 79.0, 15.0, 37.0, 21.0, 93.0, -80.0, -70.0, 59.0]])
def __init__(self, num_variables, phenome_preprocessor=None, **kwargs):
self.is_deterministic = True
self.do_maximize = False
self.num_variables = num_variables
self.min_bounds = [-100.0] * num_variables
self.max_bounds = [100.0] * num_variables
bounds = (self.min_bounds, self.max_bounds)
preprocessor = BoundConstraintsChecker(bounds, phenome_preprocessor)
TestProblem.__init__(self, self.objective_function,
phenome_preprocessor=preprocessor,
**kwargs)
self.offsets = list(F5.offsets)
for i in range(num_variables):
if i + 1 <= math.ceil(num_variables / 4.0):
self.offsets[i] = -100.0
elif i + 1 >= math.floor((3.0 * num_variables) / 4.0):
self.offsets[i] = 100.0
self.A = F5.A[0:num_variables, 0:num_variables]
self.B = np.dot(self.A, self.offsets[:num_variables])
def objective_function(self, phenome):
values = np.dot(self.A, phenome)
max_diff = abs(values[0] - self.B[0])
for i in range(self.num_variables):
temp = abs(values[i] - self.B[i])
max_diff = max(max_diff, temp)
obj_value = max_diff + self.bias
return obj_value
def get_optimal_solutions(self, max_number=None):
return [Individual(self.offsets[:self.num_variables])]
| 361.774648
| 1,119
| 0.636378
| 28,502
| 154,116
| 3.435513
| 0.143534
| 0.002655
| 0.00527
| 0.001062
| 0.289157
| 0.03507
| 0.034038
| 0.024142
| 0.023734
| 0.022325
| 0
| 0.705499
| 0.131829
| 154,116
| 425
| 1,120
| 362.625882
| 0.026338
| 0.001415
| 0
| 0.195592
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.008264
| 1
| 0.038567
| false
| 0
| 0.013774
| 0.011019
| 0.126722
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
9fc33dac4e4c95a81c1a476f6d4147cd04617ff5
| 362
|
py
|
Python
|
three.py/helpers/__init__.py
|
Michael-Pascale/three.py
|
9912f5f850245fb9456a25b6737e12290ae54a2d
|
[
"MIT"
] | null | null | null |
three.py/helpers/__init__.py
|
Michael-Pascale/three.py
|
9912f5f850245fb9456a25b6737e12290ae54a2d
|
[
"MIT"
] | null | null | null |
three.py/helpers/__init__.py
|
Michael-Pascale/three.py
|
9912f5f850245fb9456a25b6737e12290ae54a2d
|
[
"MIT"
] | null | null | null |
from helpers.AxesHelper import *
from helpers.GridHelper import *
from helpers.BoxHelper import *
from helpers.VertexNormalHelper import *
from helpers.DirectionalLightHelper import *
from helpers.PointLightHelper import *
from helpers.OrthographicCameraHelper import *
from helpers.Pair import *
from helpers.GridGroup import *
from helpers.MetaCircle import *
| 32.909091
| 46
| 0.834254
| 40
| 362
| 7.55
| 0.325
| 0.364238
| 0.506623
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.110497
| 362
| 10
| 47
| 36.2
| 0.937888
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4c875eb02c7b237a47360adf5bdc726557658410
| 313
|
py
|
Python
|
py/locdb_v2/__init__.py
|
skepner/ae
|
d53336a561df1a46a39debb143c9f9496b222a46
|
[
"MIT"
] | null | null | null |
py/locdb_v2/__init__.py
|
skepner/ae
|
d53336a561df1a46a39debb143c9f9496b222a46
|
[
"MIT"
] | null | null | null |
py/locdb_v2/__init__.py
|
skepner/ae
|
d53336a561df1a46a39debb143c9f9496b222a46
|
[
"MIT"
] | null | null | null |
from .read import find, find_cdc_abbreviation, country, continent, find_cdc_abbreviation_for_name, location_db, check
from .read import LocationNotFound, LocationReplacement
from .geonames import geonames, geonames_make_eval
from .update import add, add_cdc_abbreviation, add_new_name, add_replacement, fix, save
| 62.6
| 117
| 0.853035
| 43
| 313
| 5.883721
| 0.55814
| 0.177866
| 0.110672
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.092652
| 313
| 4
| 118
| 78.25
| 0.890845
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4c926272d46886e2916e9a805859dae5a849c1b1
| 165
|
py
|
Python
|
contacts/forms.py
|
JoshZero87/site
|
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
|
[
"MIT"
] | 4
|
2017-01-29T00:38:41.000Z
|
2019-09-04T14:30:24.000Z
|
contacts/forms.py
|
JoshZero87/site
|
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
|
[
"MIT"
] | 74
|
2017-10-02T04:42:54.000Z
|
2022-01-13T00:44:16.000Z
|
contacts/forms.py
|
JoshZero87/site
|
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
|
[
"MIT"
] | 3
|
2017-03-24T23:26:46.000Z
|
2019-10-21T01:16:03.000Z
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
class PhoneOptOutUploadForm(forms.Form):
csv_file = forms.FileField()
| 20.625
| 40
| 0.751515
| 20
| 165
| 5.9
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.007092
| 0.145455
| 165
| 7
| 41
| 23.571429
| 0.829787
| 0.127273
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
4ca532226f8bad7121b5d6e41a2fa3f564e18030
| 2,398
|
py
|
Python
|
tests/test_replace_if_else.py
|
BBVA/python-etl
|
f4c0e613792c93fe5833f9d5e670e8fa6cf675da
|
[
"Apache-2.0"
] | 20
|
2017-11-07T15:09:45.000Z
|
2021-08-21T00:18:09.000Z
|
tests/test_replace_if_else.py
|
BBVA/python-etl
|
f4c0e613792c93fe5833f9d5e670e8fa6cf675da
|
[
"Apache-2.0"
] | 4
|
2017-11-21T13:15:30.000Z
|
2018-01-17T14:06:14.000Z
|
tests/test_replace_if_else.py
|
BBVA/python-etl
|
f4c0e613792c93fe5833f9d5e670e8fa6cf675da
|
[
"Apache-2.0"
] | 9
|
2017-11-08T10:53:43.000Z
|
2018-04-20T11:26:29.000Z
|
# Copyright 2017 BBVA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from datarefinery.TupleOperations import substitution
from datarefinery.FieldOperations import replace_if_else
def test_empty_input_if_then():
def _fn_cond(x):
return x == 0
def _fn_then(x):
return x + 1
operation = substitution(["a"], replace_if_else(_fn_cond, _fn_then))
(res, err) = operation(None)
assert res is None
assert err == {'a': 'a not found'}
def test_empty_input_if_then_else():
def _fn_cond(x):
return x == 0
def _fn_then(x):
return x + 1
def _fn_else(x):
return x + 2
operation = substitution(["a"], replace_if_else(_fn_cond, _fn_then, _fn_else))
(res, err) = operation(None)
assert res is None
assert err == {'a': 'a not found'}
def test_cond_true_replace_if_then():
def _fn_cond(x):
return x == 0
def _fn_then(x):
return x + 1
operation = substitution(["a"], replace_if_else(_fn_cond, _fn_then))
(res, err) = operation({"a": 0})
assert res is not None
assert "a" in res
assert res["a"] == 1
assert err is None
def test_cond_true_replace_if_then_default_else():
def _fn_cond(x):
return x == 0
def _fn_then(x):
return x + 1
operation = substitution(["a"], replace_if_else(_fn_cond, _fn_then))
(res, err) = operation({"a": 100})
assert res is not None
assert "a" in res
assert res["a"] == 100
assert err is None
def test_cond_false_replace_if_then_else():
def _fn_cond(x):
return x == 0
def _fn_then(x):
return x + 1
def _fn_else(x):
return x + 2
operation = substitution(["a"], replace_if_else(_fn_cond, _fn_then, _fn_else))
(res, err) = operation({"a": 100})
assert res is not None
assert "a" in res
assert res["a"] == 102
assert err is None
| 25.510638
| 82
| 0.652627
| 370
| 2,398
| 3.994595
| 0.248649
| 0.040595
| 0.064953
| 0.03383
| 0.611637
| 0.611637
| 0.593369
| 0.536536
| 0.536536
| 0.536536
| 0
| 0.018722
| 0.242702
| 2,398
| 93
| 83
| 25.784946
| 0.795154
| 0.225605
| 0
| 0.807018
| 0
| 0
| 0.020619
| 0
| 0
| 0
| 0
| 0
| 0.280702
| 1
| 0.298246
| false
| 0
| 0.035088
| 0.210526
| 0.54386
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
4cda5ab2a5855a5dd64df9f59e8fb1086913048f
| 1,544
|
py
|
Python
|
tests/test_pressure_pascals.py
|
putridparrot/PyUnits
|
4f1095c6fc0bee6ba936921c391913dbefd9307c
|
[
"MIT"
] | null | null | null |
tests/test_pressure_pascals.py
|
putridparrot/PyUnits
|
4f1095c6fc0bee6ba936921c391913dbefd9307c
|
[
"MIT"
] | null | null | null |
tests/test_pressure_pascals.py
|
putridparrot/PyUnits
|
4f1095c6fc0bee6ba936921c391913dbefd9307c
|
[
"MIT"
] | null | null | null |
# <auto-generated>
# This code was generated by the UnitCodeGenerator tool
#
# Changes to this file will be lost if the code is regenerated
# </auto-generated>
import unittest
import units.pressure.pascals
class TestPascalsMethods(unittest.TestCase):
def test_convert_known_pascals_to_atmospheres(self):
self.assertAlmostEqual(0.88823094, units.pressure.pascals.to_atmospheres(90000.0), places=1)
self.assertAlmostEqual(12.18422897, units.pressure.pascals.to_atmospheres(1234567.0), places=1)
self.assertAlmostEqual(2.01391562, units.pressure.pascals.to_atmospheres(204060.0), places=1)
def test_convert_known_pascals_to_bars(self):
self.assertAlmostEqual(0.1, units.pressure.pascals.to_bars(10000.0), places=1)
self.assertAlmostEqual(0.12345, units.pressure.pascals.to_bars(12345.0), places=1)
self.assertAlmostEqual(0.8, units.pressure.pascals.to_bars(80000.0), places=1)
def test_convert_known_pascals_to_torrs(self):
self.assertAlmostEqual(600.04935, units.pressure.pascals.to_torrs(80000.0), places=1)
self.assertAlmostEqual(9.255761, units.pressure.pascals.to_torrs(1234.0), places=1)
self.assertAlmostEqual(0.600049, units.pressure.pascals.to_torrs(80.0), places=1)
def test_convert_known_pascals_to_psi(self):
self.assertAlmostEqual(0.11603, units.pressure.pascals.to_psi(800.0), places=1)
self.assertAlmostEqual(1.257477, units.pressure.pascals.to_psi(8670.0), places=1)
self.assertAlmostEqual(0.145038, units.pressure.pascals.to_psi(1000.0), places=1)
if __name__ == '__main__':
unittest.main()
| 45.411765
| 97
| 0.795984
| 227
| 1,544
| 5.237885
| 0.290749
| 0.12111
| 0.218671
| 0.222035
| 0.592935
| 0.215307
| 0.090833
| 0.090833
| 0.090833
| 0
| 0
| 0.111736
| 0.078368
| 1,544
| 33
| 98
| 46.787879
| 0.723823
| 0.096503
| 0
| 0
| 1
| 0
| 0.00576
| 0
| 0
| 0
| 0
| 0
| 0.571429
| 1
| 0.190476
| false
| 0
| 0.095238
| 0
| 0.333333
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4cfff5e9e957eded91f80e5133123ea87f0985de
| 600
|
py
|
Python
|
stations/migrations/0011_auto_20210828_0217.py
|
dymaxionlabs/satlomas-back
|
f4568f6535755fd4a2432ecc661a264872206c6c
|
[
"Apache-2.0"
] | 1
|
2021-02-18T20:11:25.000Z
|
2021-02-18T20:11:25.000Z
|
stations/migrations/0011_auto_20210828_0217.py
|
dymaxionlabs/satlomas-back
|
f4568f6535755fd4a2432ecc661a264872206c6c
|
[
"Apache-2.0"
] | 7
|
2020-06-09T14:54:43.000Z
|
2021-09-22T21:00:13.000Z
|
stations/migrations/0011_auto_20210828_0217.py
|
dymaxionlabs/satlomas-back
|
f4568f6535755fd4a2432ecc661a264872206c6c
|
[
"Apache-2.0"
] | 1
|
2020-05-08T20:42:49.000Z
|
2020-05-08T20:42:49.000Z
|
# Generated by Django 3.1.8 on 2021-08-28 02:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('stations', '0010_auto_20210322_2029'),
]
operations = [
migrations.RemoveField(
model_name='station',
name='lat',
),
migrations.RemoveField(
model_name='station',
name='lon',
),
migrations.RemoveField(
model_name='station',
name='place',
),
migrations.DeleteModel(
name='Place',
),
]
| 20.689655
| 48
| 0.525
| 53
| 600
| 5.830189
| 0.622642
| 0.203884
| 0.252427
| 0.291262
| 0.398058
| 0.398058
| 0
| 0
| 0
| 0
| 0
| 0.080729
| 0.36
| 600
| 28
| 49
| 21.428571
| 0.723958
| 0.075
| 0
| 0.454545
| 1
| 0
| 0.122966
| 0.041591
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.045455
| 0
| 0.181818
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
980eb1c9a13d67b0861cf72a69e8b1aad234bdc7
| 493
|
py
|
Python
|
cowait/types/__init__.py
|
backtick-se/cowa
|
760ddb3ded1b3995bc68f4b74cf28af0c094481f
|
[
"Apache-2.0"
] | 51
|
2020-06-04T06:08:14.000Z
|
2022-03-28T06:59:53.000Z
|
cowait/types/__init__.py
|
backtick-se/cowa
|
760ddb3ded1b3995bc68f4b74cf28af0c094481f
|
[
"Apache-2.0"
] | 121
|
2020-06-01T12:09:32.000Z
|
2022-03-31T20:47:57.000Z
|
cowait/types/__init__.py
|
backtick-se/cowa
|
760ddb3ded1b3995bc68f4b74cf28af0c094481f
|
[
"Apache-2.0"
] | 6
|
2020-06-11T16:05:20.000Z
|
2022-03-23T06:30:17.000Z
|
# flake8: noqa: F401
from .type import Type
from .dict import Dict
from .list import List
from .custom import CustomType
from .simple import Any, String, Int, Float, Bool, DateTime, Void
from .mapping import TypeAlias
from .utils import typed_arguments, typed_return, \
typed_call, typed_async_call, serialize, deserialize, \
get_parameter_types, get_parameter_defaults, get_return_type, \
type_from_description
try:
from .numpy import *
except ModuleNotFoundError:
pass
| 27.388889
| 67
| 0.772819
| 66
| 493
| 5.575758
| 0.575758
| 0.043478
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.009685
| 0.162272
| 493
| 17
| 68
| 29
| 0.881356
| 0.036511
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.071429
| 0.571429
| 0
| 0.571429
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
e25d3a69f3a4acb190f03d5b162b09186eb9be90
| 100
|
py
|
Python
|
group_members/apps.py
|
albertocerrone/The-Bugbuster
|
b86054617dcf7ec39418b9cda04a968ffc1fc657
|
[
"CC0-1.0"
] | null | null | null |
group_members/apps.py
|
albertocerrone/The-Bugbuster
|
b86054617dcf7ec39418b9cda04a968ffc1fc657
|
[
"CC0-1.0"
] | null | null | null |
group_members/apps.py
|
albertocerrone/The-Bugbuster
|
b86054617dcf7ec39418b9cda04a968ffc1fc657
|
[
"CC0-1.0"
] | 1
|
2021-02-04T15:25:39.000Z
|
2021-02-04T15:25:39.000Z
|
from django.apps import AppConfig
class GroupMembersConfig(AppConfig):
name = 'group_members'
| 16.666667
| 36
| 0.78
| 11
| 100
| 7
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15
| 100
| 5
| 37
| 20
| 0.905882
| 0
| 0
| 0
| 0
| 0
| 0.13
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
e268d3a6265b7e9c7c77c5a1d38361d0c6b4043d
| 286
|
py
|
Python
|
examples/checkpointing/checkpoint.py
|
reguly/devito
|
543b7be41ddbf1faa90224cca3824767756c9390
|
[
"MIT"
] | 204
|
2020-01-09T11:27:58.000Z
|
2022-03-20T22:53:37.000Z
|
examples/checkpointing/checkpoint.py
|
reguly/devito
|
543b7be41ddbf1faa90224cca3824767756c9390
|
[
"MIT"
] | 949
|
2016-04-25T11:41:34.000Z
|
2019-12-27T10:43:40.000Z
|
examples/checkpointing/checkpoint.py
|
reguly/devito
|
543b7be41ddbf1faa90224cca3824767756c9390
|
[
"MIT"
] | 131
|
2020-01-08T17:43:13.000Z
|
2022-03-27T11:36:47.000Z
|
from devito import warning
warning("""The location of Devito's checkpointing has changed. This location will be
deprecated soon. Please change your imports to 'from devito import
DevitoCheckpoint, CheckpointOperato'""")
from devito.checkpointing import * # noqa
| 40.857143
| 84
| 0.741259
| 34
| 286
| 6.235294
| 0.705882
| 0.141509
| 0.150943
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.199301
| 286
| 7
| 85
| 40.857143
| 0.925764
| 0.013986
| 0
| 0
| 0
| 0
| 0.708185
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.6
| 0
| 0.6
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e276fef972c635fb1863ab495f3ca47af0250a04
| 846
|
py
|
Python
|
hackerrank/Algorithms/Two Strings/test.py
|
ATrain951/01.python-com_Qproject
|
c164dd093954d006538020bdf2e59e716b24d67c
|
[
"MIT"
] | 4
|
2020-07-24T01:59:50.000Z
|
2021-07-24T15:14:08.000Z
|
hackerrank/Algorithms/Two Strings/test.py
|
ATrain951/01.python-com_Qproject
|
c164dd093954d006538020bdf2e59e716b24d67c
|
[
"MIT"
] | null | null | null |
hackerrank/Algorithms/Two Strings/test.py
|
ATrain951/01.python-com_Qproject
|
c164dd093954d006538020bdf2e59e716b24d67c
|
[
"MIT"
] | null | null | null |
import unittest
import solution
class TestQ(unittest.TestCase):
def test_case_0(self):
self.assertEqual(solution.twoStrings('hello', 'world'), 'YES')
self.assertEqual(solution.twoStrings('hi', 'world'), 'NO')
def test_case_1(self):
self.assertEqual(solution.twoStrings('wouldyoulikefries', 'abcabcabcabcabcabc'), 'NO')
self.assertEqual(solution.twoStrings('hackerrankcommunity', 'cdecdecdecde'), 'YES')
self.assertEqual(solution.twoStrings('jackandjill', 'wentupthehill'), 'YES')
self.assertEqual(solution.twoStrings('writetoyourparents', 'fghmqzldbc'), 'NO')
def test_case_2(self):
self.assertEqual(solution.twoStrings('aardvark', 'apple'), 'YES')
self.assertEqual(solution.twoStrings('beetroot', 'sandals'), 'NO')
if __name__ == '__main__':
unittest.main()
| 35.25
| 94
| 0.691489
| 84
| 846
| 6.797619
| 0.416667
| 0.210158
| 0.322242
| 0.462347
| 0.446585
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004178
| 0.1513
| 846
| 23
| 95
| 36.782609
| 0.791086
| 0
| 0
| 0
| 0
| 0
| 0.225768
| 0
| 0
| 0
| 0
| 0
| 0.5
| 1
| 0.1875
| false
| 0
| 0.125
| 0
| 0.375
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e2a75b55d8e1a006e03744d549dfb213e6246585
| 315
|
py
|
Python
|
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/SimPy/Monitor.py
|
J-E-J-S/aaRS-Pipeline
|
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
|
[
"MIT"
] | null | null | null |
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/SimPy/Monitor.py
|
J-E-J-S/aaRS-Pipeline
|
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
|
[
"MIT"
] | null | null | null |
resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/SimPy/Monitor.py
|
J-E-J-S/aaRS-Pipeline
|
43f59f28ab06e4b16328c3bc405cdddc6e69ac44
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# $Revision: 1.1.1.12 $ $Date: 2007/01/08 14:40:09 $ kgm
"""Monitor 1.8 This dummy module is only provided for backward compatibility.
It does nothing. class Monitor is now part of Simulation
and SimulationXXX."""
__version__ ='1.8 $Revision: 1.1.1.12 $ $Date: 2007/01/08 14:40:09 $'
pass
| 39.375
| 78
| 0.701587
| 57
| 315
| 3.807018
| 0.666667
| 0.036866
| 0.092166
| 0.101382
| 0.285714
| 0.285714
| 0.285714
| 0.285714
| 0.285714
| 0.285714
| 0
| 0.157303
| 0.152381
| 315
| 7
| 79
| 45
| 0.655431
| 0.720635
| 0
| 0
| 0
| 0.5
| 0.666667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
2c7ca29398660625762ee604ac228bf83f7d19ed
| 211
|
py
|
Python
|
Hackerrank/Practice/Python/4.sets/33.Set .union() Operation.py
|
kushagra1212/Competitive-Programming
|
5b68774c617d6abdf1b29893b1b13d47f62161e8
|
[
"MIT"
] | 994
|
2017-02-28T06:13:47.000Z
|
2022-03-31T10:49:00.000Z
|
Hackerrank_python/4.sets/33.Set .union() Operation.py
|
devesh17m/Competitive-Programming
|
2d459dc8dc5ac628d94700b739988b0ea364cb71
|
[
"MIT"
] | 16
|
2018-01-01T02:59:55.000Z
|
2021-11-22T12:49:16.000Z
|
Hackerrank_python/4.sets/33.Set .union() Operation.py
|
devesh17m/Competitive-Programming
|
2d459dc8dc5ac628d94700b739988b0ea364cb71
|
[
"MIT"
] | 325
|
2017-06-15T03:32:43.000Z
|
2022-03-28T22:43:42.000Z
|
# Enter your code here. Read input from STDIN. Print output to STDOUT
n=int(input())
roll_n=set(map(int,input().split()))
m=int(input())
roll_m=set(map(int,input().split()))
s=roll_n|roll_m
print(len(s))
| 26.375
| 70
| 0.682464
| 40
| 211
| 3.5
| 0.525
| 0.228571
| 0.171429
| 0.2
| 0.271429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.123223
| 211
| 7
| 71
| 30.142857
| 0.756757
| 0.317536
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2c8a567ee3c913800f389798961dd9ff34cbf047
| 86
|
py
|
Python
|
fee/apps.py
|
masoodazhar/-school-management-system
|
6525b3d29d12f03e05d362d81b7c5855806f57d9
|
[
"Apache-2.0"
] | 1
|
2022-01-20T10:20:05.000Z
|
2022-01-20T10:20:05.000Z
|
fee/apps.py
|
masoodazhar/-school-management-system
|
6525b3d29d12f03e05d362d81b7c5855806f57d9
|
[
"Apache-2.0"
] | null | null | null |
fee/apps.py
|
masoodazhar/-school-management-system
|
6525b3d29d12f03e05d362d81b7c5855806f57d9
|
[
"Apache-2.0"
] | 1
|
2022-01-20T10:20:31.000Z
|
2022-01-20T10:20:31.000Z
|
from django.apps import AppConfig
class FeeConfig(AppConfig):
name = 'fee'
| 14.333333
| 34
| 0.686047
| 10
| 86
| 5.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.232558
| 86
| 5
| 35
| 17.2
| 0.893939
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
2c8ca17fd08b88b5ff16483af20e1c8e49f80541
| 107
|
py
|
Python
|
series_tiempo_ar_api/apps/api/apps.py
|
datosgobar/series-tiempo-ar-api
|
6b553c573f6e8104f8f3919efe79089b7884280c
|
[
"MIT"
] | 28
|
2017-12-16T20:30:52.000Z
|
2021-08-11T17:35:04.000Z
|
series_tiempo_ar_api/apps/api/apps.py
|
datosgobar/series-tiempo-ar-api
|
6b553c573f6e8104f8f3919efe79089b7884280c
|
[
"MIT"
] | 446
|
2017-11-16T15:21:40.000Z
|
2021-06-10T20:14:21.000Z
|
series_tiempo_ar_api/apps/api/apps.py
|
datosgobar/series-tiempo-ar-api
|
6b553c573f6e8104f8f3919efe79089b7884280c
|
[
"MIT"
] | 12
|
2018-08-23T16:13:32.000Z
|
2022-03-01T23:12:28.000Z
|
from django.apps import AppConfig
class ApiConfig(AppConfig):
name = 'series_tiempo_ar_api.apps.api'
| 17.833333
| 42
| 0.775701
| 15
| 107
| 5.333333
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.140187
| 107
| 5
| 43
| 21.4
| 0.869565
| 0
| 0
| 0
| 0
| 0
| 0.271028
| 0.271028
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
2c928c45591400d31187e58899e10c252587ee7a
| 77
|
py
|
Python
|
tests/sphinx.py
|
theboyslush/mila
|
274da1d3c7e7e4385fa58eb6aebd24c5ef7fed4d
|
[
"MIT"
] | 23
|
2021-01-01T16:57:01.000Z
|
2022-03-04T18:22:40.000Z
|
tests/sphinx.py
|
gangapurambhargav/baks
|
89a129ebb3cfed08c1d075b6d6ab3ee209610ca9
|
[
"MIT"
] | null | null | null |
tests/sphinx.py
|
gangapurambhargav/baks
|
89a129ebb3cfed08c1d075b6d6ab3ee209610ca9
|
[
"MIT"
] | 23
|
2021-01-05T08:24:08.000Z
|
2022-03-25T08:08:18.000Z
|
from pocketsphinx import LiveSpeech
for phrase in LiveSpeech(): print(phrase)
| 38.5
| 41
| 0.831169
| 10
| 77
| 6.4
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103896
| 77
| 2
| 41
| 38.5
| 0.927536
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
2ca110e263d8a037e41ff214f53722a2cb408b3f
| 202
|
py
|
Python
|
zaptools/__init__.py
|
NathanDraco22/zap-adapter-python
|
5b47a21f83f5379365e5d69656f924a36ed7fb79
|
[
"MIT"
] | 1
|
2022-02-26T03:10:37.000Z
|
2022-02-26T03:10:37.000Z
|
zaptools/__init__.py
|
NathanDraco22/py-zaptools
|
5b47a21f83f5379365e5d69656f924a36ed7fb79
|
[
"MIT"
] | null | null | null |
zaptools/__init__.py
|
NathanDraco22/py-zaptools
|
5b47a21f83f5379365e5d69656f924a36ed7fb79
|
[
"MIT"
] | null | null | null |
__all__ = ["EventRegister", "FastApiZapAdapter", "SocketClient"]
from .EventRegister import EventRegister
from .FastApi.Adapter import FastApiZapAdapter
from .FastApi.FastApiAdapter import SocketClient
| 40.4
| 64
| 0.836634
| 18
| 202
| 9.166667
| 0.5
| 0.133333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.084158
| 202
| 5
| 65
| 40.4
| 0.891892
| 0
| 0
| 0
| 0
| 0
| 0.206897
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
2cbf50d0abba2af172183c18ed7990a3d3b3f9bb
| 123
|
py
|
Python
|
FUNDAMENTALS_MODULE/Basic_Syntax_Conditional_Statements_and_Loops/EXERCISE/01_Jennys_Secret_Message.py
|
sleepychild/ProgramingBasicsPython
|
d96dc4662adc1c8329b731b9c9b7fa4ecf69ec16
|
[
"MIT"
] | null | null | null |
FUNDAMENTALS_MODULE/Basic_Syntax_Conditional_Statements_and_Loops/EXERCISE/01_Jennys_Secret_Message.py
|
sleepychild/ProgramingBasicsPython
|
d96dc4662adc1c8329b731b9c9b7fa4ecf69ec16
|
[
"MIT"
] | 1
|
2022-01-15T10:33:56.000Z
|
2022-01-15T10:33:56.000Z
|
FUNDAMENTALS_MODULE/Basic_Syntax_Conditional_Statements_and_Loops/EXERCISE/01_Jennys_Secret_Message.py
|
sleepychild/ProgramingBasicsPython
|
d96dc4662adc1c8329b731b9c9b7fa4ecf69ec16
|
[
"MIT"
] | null | null | null |
input_name: str = input()
if input_name == 'Johnny':
print('Hello, my love!')
else:
print(f'Hello, {input_name}!')
| 20.5
| 34
| 0.626016
| 18
| 123
| 4.111111
| 0.611111
| 0.364865
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.178862
| 123
| 5
| 35
| 24.6
| 0.732673
| 0
| 0
| 0
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0.4
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
e2baee00bdf62669890e19954e4a630896c40fea
| 131
|
py
|
Python
|
bulky/__init__.py
|
tgrx/bulky
|
8c5a41936b8ea29ed39b57ebe1a91bd85e64422d
|
[
"Apache-2.0"
] | null | null | null |
bulky/__init__.py
|
tgrx/bulky
|
8c5a41936b8ea29ed39b57ebe1a91bd85e64422d
|
[
"Apache-2.0"
] | 4
|
2020-03-24T17:19:39.000Z
|
2021-06-01T23:47:33.000Z
|
bulky/__init__.py
|
tgrx/bulky
|
8c5a41936b8ea29ed39b57ebe1a91bd85e64422d
|
[
"Apache-2.0"
] | null | null | null |
from bulky.functions.insert import insert
from bulky.functions.update import update
__all__ = ("insert", "update")
name = "bulky"
| 21.833333
| 41
| 0.763359
| 17
| 131
| 5.647059
| 0.470588
| 0.1875
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.122137
| 131
| 5
| 42
| 26.2
| 0.834783
| 0
| 0
| 0
| 0
| 0
| 0.129771
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
e2cc64992d980fbe4bdc783fa2a3114188390f73
| 340
|
py
|
Python
|
examples/05syspath/main.py
|
podhmo/magicalimport
|
b9c516d9d134ca578a85f934caa8c9f9ce6b4fa9
|
[
"MIT"
] | null | null | null |
examples/05syspath/main.py
|
podhmo/magicalimport
|
b9c516d9d134ca578a85f934caa8c9f9ce6b4fa9
|
[
"MIT"
] | 9
|
2016-10-01T15:25:20.000Z
|
2021-02-18T05:25:43.000Z
|
examples/05syspath/main.py
|
podhmo/magicalimport
|
b9c516d9d134ca578a85f934caa8c9f9ce6b4fa9
|
[
"MIT"
] | 1
|
2017-07-19T12:38:56.000Z
|
2017-07-19T12:38:56.000Z
|
import string
import magicalimport
import sys
import os.path
string2 = magicalimport.import_module(string.__file__)
print(string == string2)
assert "urlib" not in sys.modules
urllib2 = magicalimport.import_module(
os.path.join(os.path.dirname(string.__file__), "urllib/__init__.py")
)
import urllib # noqa
print(urllib == urllib2)
| 20
| 72
| 0.773529
| 45
| 340
| 5.533333
| 0.488889
| 0.228916
| 0.200803
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013378
| 0.120588
| 340
| 16
| 73
| 21.25
| 0.819398
| 0.011765
| 0
| 0
| 0
| 0
| 0.068862
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 1
| 0
| false
| 0
| 0.583333
| 0
| 0.583333
| 0.166667
| 0
| 0
| 0
| null | 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
3902a0e127e150672fd0deb34c3a72a399bc6c42
| 178
|
py
|
Python
|
test/test_basemodel.py
|
Chise1/fastapi-admin
|
74693cf8dd854d61ae5bd931ebe85f5b94f48121
|
[
"Apache-2.0"
] | null | null | null |
test/test_basemodel.py
|
Chise1/fastapi-admin
|
74693cf8dd854d61ae5bd931ebe85f5b94f48121
|
[
"Apache-2.0"
] | null | null | null |
test/test_basemodel.py
|
Chise1/fastapi-admin
|
74693cf8dd854d61ae5bd931ebe85f5b94f48121
|
[
"Apache-2.0"
] | null | null | null |
# -*- encoding: utf-8 -*-
"""
@File : test_basemodel.py
@Time : 2020/4/3 0:08
@Author : chise
@Email : chise123@live.com
@Software: PyCharm
@info :测试basemodel的继承
"""
| 17.8
| 28
| 0.61236
| 23
| 178
| 4.695652
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.091549
| 0.202247
| 178
| 9
| 29
| 19.777778
| 0.669014
| 0.94382
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
391afe28a4195bb475eaaaf54903807eb9983e42
| 153
|
py
|
Python
|
core/urls.py
|
softwaydev/fop-service
|
f6e479c17ec54d5264520e3e0797f1313a8bfe54
|
[
"Apache-2.0"
] | 4
|
2017-07-03T06:21:59.000Z
|
2020-07-21T03:35:15.000Z
|
core/urls.py
|
softwaydev/fop-service
|
f6e479c17ec54d5264520e3e0797f1313a8bfe54
|
[
"Apache-2.0"
] | 2
|
2017-07-13T11:00:54.000Z
|
2017-08-04T10:41:20.000Z
|
core/urls.py
|
softwaydev/fop-service
|
f6e479c17ec54d5264520e3e0797f1313a8bfe54
|
[
"Apache-2.0"
] | 2
|
2019-07-02T08:39:33.000Z
|
2020-11-06T21:04:56.000Z
|
from django.conf.urls import url
from core import views
urlpatterns = [
url(r'^$', views.index),
url(r'^generate_pdf/$', views.generate_pdf),
]
| 19.125
| 48
| 0.679739
| 22
| 153
| 4.636364
| 0.590909
| 0.078431
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.163399
| 153
| 7
| 49
| 21.857143
| 0.796875
| 0
| 0
| 0
| 1
| 0
| 0.111111
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
39284ecd2f12f68b9815883a55b0b51f4e1976fc
| 560
|
py
|
Python
|
tests/Get_cpu_test.py
|
ashok-arora/sms
|
50a0de68de4ebf7cf73d412bea05d6610b36e412
|
[
"MIT"
] | 3
|
2021-04-20T19:32:58.000Z
|
2021-05-20T17:28:52.000Z
|
tests/Get_cpu_test.py
|
ashok-arora/sms
|
50a0de68de4ebf7cf73d412bea05d6610b36e412
|
[
"MIT"
] | 4
|
2021-04-21T14:05:51.000Z
|
2021-04-24T14:19:56.000Z
|
tests/Get_cpu_test.py
|
ashok-arora/sms
|
50a0de68de4ebf7cf73d412bea05d6610b36e412
|
[
"MIT"
] | 4
|
2021-03-25T16:20:32.000Z
|
2021-04-06T07:49:41.000Z
|
import core
g = core.Get()
def test_cpu():
assert type(g.cpu()) is dict
def test_cpu_load_avg():
assert type(g.cpu()['load_avg']) is tuple
def test_cpu_user():
assert type(g.cpu()['user']) is float
def test_cpu_system():
assert type(g.cpu()['system']) is float
def test_cpu_idle():
assert type(g.cpu()['idle']) is float
def test_cpu_iowait():
assert type(g.cpu()['iowait']) is float
def test_cpu_num_cores():
assert type(g.cpu()['num_cores']) is int
def test_cpu_cores():
assert type(g.cpu()['cores']) is tuple
| 15.555556
| 45
| 0.646429
| 95
| 560
| 3.610526
| 0.231579
| 0.163265
| 0.233236
| 0.326531
| 0.309038
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.182143
| 560
| 35
| 46
| 16
| 0.748908
| 0
| 0
| 0
| 0
| 0
| 0.075
| 0
| 0
| 0
| 0
| 0
| 0.444444
| 1
| 0.444444
| false
| 0
| 0.055556
| 0
| 0.5
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1a3b736884198ec3b8f19d9ab7d0c7883f28fbb9
| 98
|
py
|
Python
|
CodeHS/Unit 5/5.1/triple.py
|
nitrospam/APCSP2020
|
275f576036805d244c3244f3f3646951940c9575
|
[
"MIT"
] | null | null | null |
CodeHS/Unit 5/5.1/triple.py
|
nitrospam/APCSP2020
|
275f576036805d244c3244f3f3646951940c9575
|
[
"MIT"
] | null | null | null |
CodeHS/Unit 5/5.1/triple.py
|
nitrospam/APCSP2020
|
275f576036805d244c3244f3f3646951940c9575
|
[
"MIT"
] | null | null | null |
# Enter your code here
def triple(num):
num = num*3
print(num)
triple(6)
triple(99)
| 10.888889
| 22
| 0.602041
| 16
| 98
| 3.6875
| 0.6875
| 0.20339
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.056338
| 0.27551
| 98
| 8
| 23
| 12.25
| 0.774648
| 0.204082
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.125
| 0
| 1
| 0.2
| false
| 0
| 0
| 0
| 0.2
| 0.2
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
1a72ef48b0afaf741558321781fa8209ce466939
| 73
|
py
|
Python
|
pytorch_pfn_extras/dataloaders/__init__.py
|
yasuyuky/pytorch-pfn-extras
|
febea6ded644d3b7a099ac557f06567a04b3b838
|
[
"MIT"
] | 1
|
2021-06-19T11:34:27.000Z
|
2021-06-19T11:34:27.000Z
|
pytorch_pfn_extras/dataloaders/__init__.py
|
yasuyuky/pytorch-pfn-extras
|
febea6ded644d3b7a099ac557f06567a04b3b838
|
[
"MIT"
] | 1
|
2021-07-28T05:37:50.000Z
|
2021-07-28T05:37:50.000Z
|
pytorch_pfn_extras/dataloaders/__init__.py
|
yasuyuky/pytorch-pfn-extras
|
febea6ded644d3b7a099ac557f06567a04b3b838
|
[
"MIT"
] | null | null | null |
from pytorch_pfn_extras.dataloaders.dataloader import DataLoader # NOQA
| 36.5
| 72
| 0.863014
| 9
| 73
| 6.777778
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09589
| 73
| 1
| 73
| 73
| 0.924242
| 0.054795
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
1a75d6da18b6429831c683b6d9d88009304f3d22
| 107
|
py
|
Python
|
main/campaign/admin.py
|
MahanBi/Back-End
|
5074ac1d341ad2addd1750e4aea2e6800be2bfef
|
[
"MIT"
] | null | null | null |
main/campaign/admin.py
|
MahanBi/Back-End
|
5074ac1d341ad2addd1750e4aea2e6800be2bfef
|
[
"MIT"
] | null | null | null |
main/campaign/admin.py
|
MahanBi/Back-End
|
5074ac1d341ad2addd1750e4aea2e6800be2bfef
|
[
"MIT"
] | 1
|
2021-12-06T21:36:28.000Z
|
2021-12-06T21:36:28.000Z
|
from django.contrib import admin
from .models import CampaignRanking
admin.site.register(CampaignRanking)
| 21.4
| 36
| 0.850467
| 13
| 107
| 7
| 0.692308
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.093458
| 107
| 4
| 37
| 26.75
| 0.938144
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.