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
b631edba215b7694e62a8a6a02571a3439680191
100
py
Python
products/admin.py
Walachul/milestone4
ce3be4d39b5d28141f41d4783d3e7211480ce64d
[ "MIT" ]
null
null
null
products/admin.py
Walachul/milestone4
ce3be4d39b5d28141f41d4783d3e7211480ce64d
[ "MIT" ]
7
2020-02-12T03:15:31.000Z
2022-03-12T00:01:18.000Z
products/admin.py
Code-Institute-Submissions/Walachul-milestone4
ce3be4d39b5d28141f41d4783d3e7211480ce64d
[ "MIT" ]
1
2020-01-12T12:49:10.000Z
2020-01-12T12:49:10.000Z
from django.contrib import admin from .models import Merchandise admin.site.register(Merchandise)
16.666667
32
0.83
13
100
6.384615
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.11
100
5
33
20
0.932584
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
b63e74ae43183a84046cec7a2a02b85530f63c8d
25
py
Python
src/masonite/events/Listener.py
cercos/masonite
f7f220efa7fae833683e9f07ce13c3795a87d3b8
[ "MIT" ]
1,816
2018-02-14T01:59:51.000Z
2022-03-31T17:09:20.000Z
src/masonite/events/Listener.py
cercos/masonite
f7f220efa7fae833683e9f07ce13c3795a87d3b8
[ "MIT" ]
340
2018-02-11T00:27:26.000Z
2022-03-21T12:00:24.000Z
src/masonite/events/Listener.py
cercos/masonite
f7f220efa7fae833683e9f07ce13c3795a87d3b8
[ "MIT" ]
144
2018-03-18T00:08:16.000Z
2022-02-26T01:51:58.000Z
class Listener: pass
8.333333
15
0.68
3
25
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.28
25
2
16
12.5
0.944444
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
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
1
0
0
0
0
0
5
fcccbb128da0eb77727a1ba6cfada08101242877
7,724
py
Python
tests/test_typology.py
tristan0x/hub-dispatch
e6870f73797cbea8798052d2780be924710df2de
[ "Apache-2.0" ]
null
null
null
tests/test_typology.py
tristan0x/hub-dispatch
e6870f73797cbea8798052d2780be924710df2de
[ "Apache-2.0" ]
null
null
null
tests/test_typology.py
tristan0x/hub-dispatch
e6870f73797cbea8798052d2780be924710df2de
[ "Apache-2.0" ]
null
null
null
import unittest from hub_dispatch import HubDispatch class TestTopology(unittest.TestCase): def test_empty_graph(self): h = HubDispatch() with self.assertRaises(Exception) as exc: h.remove_hub('foo') self.assertEqual( exc.exception.message, "Hub 'foo' does not exist" ) with self.assertRaises(Exception) as exc: h.link('foo', 'bar') self.assertEqual( exc.exception.message, "Hub 'foo' does not exist" ) with self.assertRaises(Exception) as exc: h.unlink('foo', 'bar') self.assertEqual( exc.exception.message, "Hub 'foo' does not exist" ) def test_add_hub_linked_to_node(self): h = HubDispatch() h.add_hub('foo') self.assertEqual(h._changes.assignments, [('foo', 'foo')]) h.link('foo', 'bar') self.assertEqual( h._topology.nodes, {'bar': 'foo', 'foo': 'foo'}, ) self.assertEqual( h._topology.hubs, {'foo': 2}, ) self.assertEqual(h._changes.assignments, [ ('foo', 'foo'), ('foo', 'bar') ]) h._changes._clear() def test_unlink_hub_with_lonely_node(self): h = HubDispatch().add_hub('foo').link('foo', 'bar') h._changes._clear() with self.assertRaises(Exception) as exc: h.unlink('foo', 'unknown-node') self.assertEqual( exc.exception.message, "Hub 'foo' is not connected to node 'unknown-node'" ) h.unlink('foo', 'bar') self.assertEqual(h._topology.nodes, {'foo': 'foo'}) self.assertEqual(h._topology.hubs, {'foo': 1}) self.assertEqual(h._changes.assignments, []) self.assertEqual(h._changes.unassignments, [('foo', 'bar')]) def test_unlink_hub_with_lonely_nodes(self): h = HubDispatch().add_hub('foo').link('foo', 'n1').link('foo', 'n2') h._changes._clear() h.unlink('foo', 'n1') self.assertEqual(h._topology.nodes, {'n2': 'foo', 'foo': 'foo'}) self.assertEqual(h._topology.hubs, {'foo': 2}) self.assertEqual(h._changes.assignments, []) self.assertEqual(h._changes.unassignments, [('foo', 'n1')]) def test_remove_hub_with_lonely_links(self): h = HubDispatch().add_hub('foo').link('foo', 'bar') h._changes._clear() h.remove_hub('foo') self.assertEqual(h._topology.nodes, {}) self.assertEqual(h._topology.hubs, {}) self.assertEqual(h._changes.assignments, []) self.assertEqual(h._changes.unassignments, [ ('foo', 'foo'), ('foo', 'bar') ]) def test_remove_hub_following_hub(self): h = HubDispatch().add_hub('foo', 'bar').link('foo', 'bar') self.assertEqual(h._topology.nodes, {'bar': 'bar', 'foo': 'foo'}) self.assertEqual(h._topology.hubs, {'foo': 1, 'bar': 1}) self.assertEqual(h._changes.assignments, [ ('foo', 'foo'), ('bar', 'bar') ]) self.assertEqual(h._changes.unassignments, []) h._changes._clear() h.remove_hub('foo') self.assertEqual(h._topology.nodes, {'bar': 'bar'}) self.assertEqual(h._topology.hubs, {'bar': 1}) self.assertEqual(h._changes.assignments, []) self.assertEqual(h._changes.unassignments, [('foo', 'foo')]) def test_hub_follows_followee(self): h = HubDispatch().add_hub('foo', 'bar')\ .link('foo', 'bar').link('bar', 'foo') self.assertEqual(h._topology.nodes, {'foo': 'foo', 'bar': 'bar'}) self.assertEqual(h._topology.hubs, {'foo': 1, 'bar': 1}) self.assertEqual(h._changes.assignments, [ ('foo', 'foo'), ('bar', 'bar'), ]) self.assertEqual(h._changes.unassignments, []) def test_remove_hub_with_shared_link(self): h = HubDispatch()\ .add_hub('h1', 'h2')\ .link('h1', 'node').link('h2', 'node') self.assertEqual(h._topology.nodes, {'node': 'h1', 'h1': 'h1', 'h2': 'h2'}) self.assertEqual(h._topology.hubs, {'h1': 2, 'h2': 1}) self.assertEqual(h._changes.assignments, [('h1', 'h1'), ('h2', 'h2'), ('h1', 'node')]) self.assertEqual(h._changes.unassignments, []) h._changes._clear() # remove assigned hub h.unlink('h1', 'node') self.assertEqual(h._topology.nodes, {'h1': 'h1', 'h2': 'h2', 'node': 'h2'}) self.assertEqual(h._topology.hubs, {'h2': 2, 'h1': 1}) self.assertEqual(h._changes.assignments, [('h2', 'node')]) self.assertEqual(h._changes.unassignments, [('h1', 'node')]) def test_remove_unassigned_hub(self): h = HubDispatch()\ .add_hub('h1', 'h2')\ .link('h1', 'node').link('h2', 'node') h._changes._clear() h.unlink('h2', 'node') self.assertEqual(h._topology.nodes, { 'node': 'h1', 'h1': 'h1', 'h2': 'h2', }) self.assertEqual(h._topology.hubs, {'h1': 2, 'h2': 1}) def test_assign_to_least_loaded(self): h = HubDispatch()\ .add_hub('h1', 'h2', 'h3', 'h4')\ .link('h1', 'node')\ .link('h4', 'node', 'foo', 'plop', 'pika')\ .link('h2', 'node', 'foo', 'bar')\ .link('h3', 'node') h._changes._clear() h.unlink('h1', 'node') self.assertEqual( h._topology.nodes, {'h1': 'h1', 'h2': 'h2', 'h3': 'h3', 'h4': 'h4', 'foo': 'h4', 'bar': 'h2', 'node': 'h3', 'plop': 'h4', 'pika': 'h4'} ) self.assertEqual(h._topology.hubs, {'h2': 2, 'h3': 2, 'h4': 4, 'h1': 1}) self.assertEqual(h._changes.assignments, [('h3', 'node')]) self.assertEqual(h._changes.unassignments, [('h1', 'node')]) def test_reassign_node_on_hub_removal(self): h = HubDispatch().add_hub('A', 'C').link('A', 'B').link('C', 'B') self.assertEqual(h._topology.nodes, { 'A': 'A', 'B': 'A', 'C': 'C' }) h._changes._clear() h.remove_hub('A') self.assertEqual(h._topology.nodes, { 'B': 'C', 'C': 'C' }) self.assertEqual(h._changes.unassignments, [('A', 'A'), ('A', 'B')]) self.assertEqual(h._changes.assignments, [('C', 'B')]) def test_promote_hub_a_followed_node(self): h = HubDispatch().add_hub('A').link('A', 'B') h._changes._clear() h.add_hub('B') self.assertEqual(h._topology.nodes, { 'A': 'A', 'B': 'A' }) self.assertEqual(h._topology.hubs, {'A': 2}) def test_reassignment_when_hub_have_multiple_assignees(self): h = HubDispatch()\ .add_hub('h1', 'h2')\ .link('h1', 'n1', 'n2')\ .link('h2', 'n1') h._changes._clear() h.unlink('h1', 'n1') self.assertEqual(h._topology.nodes, { 'h1': 'h1', 'h2': 'h2', 'n1': 'h2', 'n2': 'h1', }) self.assertEqual(h._topology.hubs, {'h1': 2, 'h2': 2}) self.assertEqual(h._changes.assignments, [('h2', 'n1')]) self.assertEqual(h._changes.unassignments, [('h1', 'n1')]) def test_least_loaded_func(self): h = HubDispatch() h._topology.hubs['foo'] = 0 h._topology.hubs['bar'] = 42 self.assertEqual('foo', h._least_loaded('foo', 'bar')) self.assertEqual('foo', h._least_loaded('bar', 'foo')) if __name__ == '__main__': unittest.main()
37.31401
76
0.522398
877
7,724
4.411631
0.096921
0.224864
0.215043
0.173688
0.803308
0.740501
0.629103
0.525976
0.496511
0.435513
0
0.021265
0.28159
7,724
206
77
37.495146
0.675978
0.00246
0
0.486631
0
0
0.096716
0
0
0
0
0
0.331551
1
0.074866
false
0
0.010695
0
0.090909
0
0
0
0
null
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
fce6d0c487391734e8cdd6c6b47ccc6419b8acee
44
py
Python
hello_pynetclass.py
ericchou-python/pynet_class
26ac816a2cdc1671d62c6fd0773e142dc2e49d54
[ "Apache-2.0" ]
null
null
null
hello_pynetclass.py
ericchou-python/pynet_class
26ac816a2cdc1671d62c6fd0773e142dc2e49d54
[ "Apache-2.0" ]
null
null
null
hello_pynetclass.py
ericchou-python/pynet_class
26ac816a2cdc1671d62c6fd0773e142dc2e49d54
[ "Apache-2.0" ]
null
null
null
#!/usr/env/bin python print "hello pynet"
8.8
21
0.681818
7
44
4.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.159091
44
4
22
11
0.810811
0.454545
0
0
0
0
0.5
0
0
0
0
0
0
0
null
null
0
0
null
null
1
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
1
0
5
fcf009e35eeb86fd428a9649a82f42e6bc1e7a7c
285
py
Python
tic-tac-toe.py
NageshJ2014/TestRepor
bea3c5feca4fda196f43797d12bf752d7c97959a
[ "MIT" ]
null
null
null
tic-tac-toe.py
NageshJ2014/TestRepor
bea3c5feca4fda196f43797d12bf752d7c97959a
[ "MIT" ]
null
null
null
tic-tac-toe.py
NageshJ2014/TestRepor
bea3c5feca4fda196f43797d12bf752d7c97959a
[ "MIT" ]
null
null
null
def display(array): print ("\n__________________________\n|\t" + array[0] + "|\tarray[1]|\tarray[2]|") print ("_\t_\t_\t_\n|\t|\t|\t|") print ("_\t_\t_\t_\n|\t|\t|\t|") print ("__________________________\n") array =["1","2","3","4","5","6","7","8","9"] display(array)
31.666667
86
0.557895
43
285
2.302326
0.395349
0.161616
0.121212
0.161616
0.292929
0.292929
0.292929
0.292929
0.292929
0
0
0.047809
0.119298
285
8
87
35.625
0.346614
0
0
0.285714
0
0
0.480702
0.449123
0
0
0
0
0
1
0.142857
false
0
0
0
0.142857
0.571429
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
1e0fcfacc14cf4319f50523a27c81fe3750533fa
297
py
Python
arepo/templatetags/arepo_extras.py
Vargdalf/Restaurant-App
7a8f983061351e8e4e87f7909ecb1829980a5941
[ "MIT" ]
2
2019-11-27T18:05:19.000Z
2019-11-29T16:16:59.000Z
arepo/templatetags/arepo_extras.py
Vargdalf/Restaurant-App
7a8f983061351e8e4e87f7909ecb1829980a5941
[ "MIT" ]
3
2020-01-04T17:10:58.000Z
2022-01-13T01:50:30.000Z
arepo/templatetags/arepo_extras.py
Vargdalf/Restaurant-App
7a8f983061351e8e4e87f7909ecb1829980a5941
[ "MIT" ]
1
2019-11-27T18:05:21.000Z
2019-11-27T18:05:21.000Z
from django.template.defaulttags import register @register.filter def get_item(dictionary, key): return dictionary[key][0] @register.filter def get_item_int(dictionary, key): return int(dictionary[key][1]) @register.simple_tag() def multiply(a, b, *args, **kwargs): return a * b
17.470588
48
0.723906
42
297
5.02381
0.547619
0.246446
0.161137
0.189573
0.227488
0
0
0
0
0
0
0.007905
0.148148
297
16
49
18.5625
0.826087
0
0
0.2
0
0
0
0
0
0
0
0
0
1
0.3
false
0
0.1
0.3
0.7
0
0
0
0
null
1
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
5
1e7d4a02282c1eef2ca88222ac1d800351f62866
259
py
Python
simple/{{cookiecutter.repo_name}}/{{cookiecutter.model_name}}/generators/__init__.py
modelyst/dbgen-model-template
39c3b84527bc4f01ea3f810d7873e6edf8f056c3
[ "Apache-2.0" ]
null
null
null
simple/{{cookiecutter.repo_name}}/{{cookiecutter.model_name}}/generators/__init__.py
modelyst/dbgen-model-template
39c3b84527bc4f01ea3f810d7873e6edf8f056c3
[ "Apache-2.0" ]
null
null
null
simple/{{cookiecutter.repo_name}}/{{cookiecutter.model_name}}/generators/__init__.py
modelyst/dbgen-model-template
39c3b84527bc4f01ea3f810d7873e6edf8f056c3
[ "Apache-2.0" ]
null
null
null
from dbgen import Model {% if cookiecutter.clean=="false" %}# Add generators here from .io import add_io_gens def add_generators(model: Model): add_io_gens(model) {% else %}def add_generators(model: Model): # Add generators here pass {% endif %}
23.545455
57
0.710425
37
259
4.810811
0.459459
0.292135
0.191011
0.235955
0.325843
0.325843
0
0
0
0
0
0
0.173745
259
10
58
25.9
0.831776
0.150579
0
0
0
0
0.023041
0
0
0
0
0
0
0
null
null
0.125
0.25
null
null
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
1
0
0
1
0
0
0
0
0
5
1e83baad13db2f2aa9cf2e43bf9787fca52cd9fc
153
py
Python
console.py
durovda/tdd_training
47a154a9f546e2b854a48c17acc817d751d22f17
[ "Apache-2.0" ]
null
null
null
console.py
durovda/tdd_training
47a154a9f546e2b854a48c17acc817d751d22f17
[ "Apache-2.0" ]
null
null
null
console.py
durovda/tdd_training
47a154a9f546e2b854a48c17acc817d751d22f17
[ "Apache-2.0" ]
null
null
null
class Console: @staticmethod def input(request): return input(request) @staticmethod def print(message): print(message)
17
29
0.627451
15
153
6.4
0.6
0.3125
0
0
0
0
0
0
0
0
0
0
0.287582
153
8
30
19.125
0.880734
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0
0.142857
0.571429
0.285714
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
1
0
0
0
5
1e8f8bc603e1cb301e8a80716d15a034629e7ca5
211
py
Python
deconvolution/utils/__init__.py
JustinLin610/DeconvDec
e3835e140ab52d86d1045f2fd5a685cac123d0cc
[ "MIT" ]
26
2018-06-10T15:31:55.000Z
2021-02-26T18:00:55.000Z
deconvolution/utils/__init__.py
JustinLin610/DeconvDec
e3835e140ab52d86d1045f2fd5a685cac123d0cc
[ "MIT" ]
1
2019-10-24T07:44:45.000Z
2019-10-26T10:03:05.000Z
deconvolution/utils/__init__.py
JustinLin610/DeconvDec
e3835e140ab52d86d1045f2fd5a685cac123d0cc
[ "MIT" ]
2
2019-03-12T20:58:04.000Z
2021-11-01T13:31:23.000Z
''' @Date : 2017/12/18 @Author: Shuming Ma @mail : shumingma@pku.edu.cn @homepage: shumingma.com ''' from .data_helper import * from .dict_helper import * from .misc_utils import * from .metrics import *
19.181818
31
0.696682
30
211
4.8
0.733333
0.208333
0.222222
0
0
0
0
0
0
0
0
0.045714
0.170616
211
10
32
21.1
0.777143
0.450237
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
1ec8c3a6650082e2bd9d10437eeac34d9deb4201
822
py
Python
sparkdq/suggestions/SuggestionSuite.py
PasaLab/SparkDQ
16d50210747ef7de03cf36d689ce26ff7445f63a
[ "Apache-2.0" ]
1
2021-02-08T07:49:54.000Z
2021-02-08T07:49:54.000Z
sparkdq/suggestions/SuggestionSuite.py
PasaLab/SparkDQ
16d50210747ef7de03cf36d689ce26ff7445f63a
[ "Apache-2.0" ]
null
null
null
sparkdq/suggestions/SuggestionSuite.py
PasaLab/SparkDQ
16d50210747ef7de03cf36d689ce26ff7445f63a
[ "Apache-2.0" ]
null
null
null
from sparkdq.suggestions.SuggestionRunBuilder import SuggestionRunBuilder from sparkdq.suggestions.rules.ApproximatelyUniqueRule import ApproximatelyUniqueRule from sparkdq.suggestions.rules.CategoricalRangeRule import CategoricalRangeRule from sparkdq.suggestions.rules.CompleteRule import CompleteRule from sparkdq.suggestions.rules.NonNegativeNumbersRule import NonNegativeNumbersRule from sparkdq.suggestions.rules.RetainCompletenessRule import RetainCompletenessRule from sparkdq.suggestions.rules.RetainTypeRule import RetainTypeRule DEFAULT_RULES = [CompleteRule(), RetainCompletenessRule(), RetainTypeRule(), CategoricalRangeRule(), NonNegativeNumbersRule(), ApproximatelyUniqueRule()] class SuggestionSuite: @staticmethod def on_data(data): return SuggestionRunBuilder(data)
43.263158
100
0.844282
66
822
10.484848
0.30303
0.111272
0.222543
0.234104
0
0
0
0
0
0
0
0
0.09854
822
18
101
45.666667
0.933873
0
0
0
0
0
0
0
0
0
0
0
0
1
0.076923
false
0
0.538462
0.076923
0.769231
0
0
0
1
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
94d5c15c2dc12349bb8e3c03e757d0694f0ca9f5
42
py
Python
gaiavision/label_space/matchers/__init__.py
NickChang97/GAIA-cv
b691af89813ffa6a1d1e1719c6dd0ec4c253d2bf
[ "Apache-2.0" ]
49
2021-06-21T06:20:40.000Z
2022-01-03T14:01:01.000Z
gaiavision/label_space/matchers/__init__.py
NickChang97/GAIA-cv
b691af89813ffa6a1d1e1719c6dd0ec4c253d2bf
[ "Apache-2.0" ]
null
null
null
gaiavision/label_space/matchers/__init__.py
NickChang97/GAIA-cv
b691af89813ffa6a1d1e1719c6dd0ec4c253d2bf
[ "Apache-2.0" ]
5
2021-07-13T09:52:34.000Z
2022-03-21T04:18:39.000Z
# add visual/language/manual_matcher here
21
41
0.833333
6
42
5.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.095238
42
1
42
42
0.894737
0.928571
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
a2172227daeb7aa8a7ec501736bed20d71ecada6
10,931
py
Python
tests/unit/test_api_tasks_unit.py
sh8121att/airship-drydock
def51688e49c40d398c6adff7c4ff9cec9a38a3b
[ "Apache-2.0" ]
14
2017-03-07T17:00:22.000Z
2021-04-02T14:15:04.000Z
tests/unit/test_api_tasks_unit.py
sh8121att/airship-drydock
def51688e49c40d398c6adff7c4ff9cec9a38a3b
[ "Apache-2.0" ]
82
2017-02-16T16:54:18.000Z
2018-06-04T13:40:32.000Z
tests/unit/test_api_tasks_unit.py
att-comdev/drydock
506e06623a5f1c11c0d34f2089851cc8381f06ae
[ "Apache-2.0" ]
16
2017-02-14T19:47:00.000Z
2018-04-26T10:13:05.000Z
# Copyright 2018 AT&T Intellectual Property. All other rights reserved. # # 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. """Test Tasks API""" from falcon import testing from unittest.mock import Mock import pytest import json import logging from drydock_provisioner import policy from drydock_provisioner.control.api import start_api import drydock_provisioner.objects as objects import drydock_provisioner.objects.fields as hd_fields import falcon LOG = logging.getLogger(__name__) class TestTasksApiUnit(object): def test_get_tasks_id_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111111' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr) assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) assert response_json['task_id'] == '11111111-1111-1111-1111-111111111111' try: response_json['build_data'] key_error = False except KeyError as ex: key_error = True assert key_error try: response_json['subtask_errors'] key_error = False except KeyError as ex: key_error = True assert key_error def test_get_tasks_id_subtaskerror_noerrors_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111111' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr, query_string='subtaskerrors=true') assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) assert response_json['task_id'] == '11111111-1111-1111-1111-111111111111' assert response_json['subtask_errors'] == {} def test_get_tasks_id_subtaskerror_errors_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111113' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr, query_string='subtaskerrors=true') assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) assert response_json['task_id'] == '11111111-1111-1111-1111-111111111113' assert response_json['subtask_errors']['11111111-1111-1111-1111-111111111116']['details']['errorCount'] == 1 def test_get_tasks_id_builddata_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111111' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr, query_string='builddata=true') LOG.debug(result.text) assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) assert response_json['build_data'] try: response_json['subtask_errors'] key_error = False except KeyError as ex: key_error = True assert key_error def test_get_tasks_id_builddata_subtaskerrors_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111111' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr, query_string='builddata=true&subtaskerrors=true') LOG.debug(result.text) assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) assert response_json['build_data'] assert response_json['subtask_errors'] == {} def test_get_tasks_id_layers_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111113' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr, query_string='layers=2') LOG.debug(result.text) assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) init_task_id = '11111111-1111-1111-1111-111111111113' sub_task_id_1 = '11111111-1111-1111-1111-111111111114' sub_task_id_2 = '11111111-1111-1111-1111-111111111115' assert response_json['init_task_id'] == init_task_id assert response_json[init_task_id]['task_id'] == init_task_id assert response_json[sub_task_id_1]['task_id'] == sub_task_id_1 assert response_json[sub_task_id_2]['task_id'] == sub_task_id_2 try: response_json['11111111-1111-1111-1111-111111111116'] key_error = False except KeyError as ex: key_error = True assert key_error def test_get_tasks_id_layers_all_noerrors_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111113' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr, query_string='layers=-1') LOG.debug(result.text) assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) init_task_id = '11111111-1111-1111-1111-111111111113' sub_task_id_1 = '11111111-1111-1111-1111-111111111114' sub_task_id_2 = '11111111-1111-1111-1111-111111111115' assert response_json['init_task_id'] == init_task_id assert response_json[init_task_id]['task_id'] == init_task_id assert response_json[sub_task_id_1]['task_id'] == sub_task_id_1 assert response_json[sub_task_id_2]['task_id'] == sub_task_id_2 try: response_json['11111111-1111-1111-1111-111111111116'] key_error = False except KeyError as ex: key_error = True assert key_error is False try: response_json['subtask_errors'] key_error = False except KeyError as ex: key_error = True assert key_error def test_get_tasks_id_layers_all_errors_resp(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111113' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr, query_string='layers=-1&subtaskerrors=true') LOG.debug(result.text) assert result.status == falcon.HTTP_200 response_json = json.loads(result.text) init_task_id = '11111111-1111-1111-1111-111111111113' sub_task_id_1 = '11111111-1111-1111-1111-111111111114' sub_task_id_2 = '11111111-1111-1111-1111-111111111115' assert response_json['init_task_id'] == init_task_id assert response_json[init_task_id]['task_id'] == init_task_id assert response_json[sub_task_id_1]['task_id'] == sub_task_id_1 assert response_json[sub_task_id_2]['task_id'] == sub_task_id_2 try: response_json['11111111-1111-1111-1111-111111111116'] key_error = False except KeyError as ex: key_error = True assert key_error is False assert response_json['subtask_errors']['11111111-1111-1111-1111-111111111116']['details']['errorCount'] == 1 def test_input_not_found(self, falcontest): url = '/api/v1.0/tasks/11111111-1111-1111-1111-111111111112' hdr = self.get_standard_header() result = falcontest.simulate_get(url, headers=hdr) LOG.debug(result.text) assert result.status == falcon.HTTP_404 @pytest.fixture() def falcontest(self, drydock_state, deckhand_ingester, deckhand_orchestrator, mock_get_build_data, mock_get_task): """Create a test harness for the the Falcon API framework.""" policy.policy_engine = policy.DrydockPolicy() policy.policy_engine.register_policy() return testing.TestClient( start_api( state_manager=drydock_state, ingester=deckhand_ingester, orchestrator=deckhand_orchestrator)) def get_standard_header(self): hdr = { 'Content-Type': 'application/json', 'X-IDENTITY-STATUS': 'Confirmed', 'X-USER-NAME': 'Test', 'X-ROLES': 'admin' } return hdr @pytest.fixture() def mock_get_task(drydock_state): def side_effect(*args): task_id = str(args[0]) LOG.debug(task_id) # Basic task if task_id == '11111111-1111-1111-1111-111111111111': new_task = objects.Task() new_task.task_id = '11111111-1111-1111-1111-111111111111' new_task.result = objects.TaskStatus() new_task.result.set_status(hd_fields.ActionResult.Failure) new_task.result.add_status_msg(msg='Test', error=True, ctx_type='N/A', ctx='N/A') return new_task # Task not found if task_id == '11111111-1111-1111-1111-111111111112': return None # Task layers if task_id == '11111111-1111-1111-1111-111111111113': new_task = objects.Task() new_task.task_id = '11111111-1111-1111-1111-111111111113' new_task.subtask_id_list = ['11111111-1111-1111-1111-111111111114', '11111111-1111-1111-1111-111111111115'] return new_task if task_id == '11111111-1111-1111-1111-111111111114': new_task = objects.Task() new_task.task_id = '11111111-1111-1111-1111-111111111114' return new_task if task_id == '11111111-1111-1111-1111-111111111115': new_task = objects.Task() new_task.task_id = '11111111-1111-1111-1111-111111111115' new_task.subtask_id_list = ['11111111-1111-1111-1111-111111111116', '11111111-1111-1111-1111-111111111117'] return new_task if task_id == '11111111-1111-1111-1111-111111111116': new_task = objects.Task() new_task.task_id = '11111111-1111-1111-1111-111111111116' new_task.result = objects.TaskStatus() new_task.result.set_status(hd_fields.ActionResult.Failure) new_task.result.add_status_msg(msg='Test', error=True, ctx_type='N/A', ctx='N/A') LOG.debug('error_count') LOG.debug(new_task.result.error_count) return new_task LOG.debug('returning None') return None drydock_state.real_get_task = drydock_state.get_task drydock_state.get_task = Mock(side_effect=side_effect) yield drydock_state.get_task = Mock(wraps=None, side_effect=None) drydock_state.get_task = drydock_state.real_get_task
41.405303
116
0.664989
1,403
10,931
4.926586
0.139701
0.094907
0.094907
0.118634
0.768519
0.746672
0.727286
0.717737
0.716869
0.677228
0
0.166049
0.234745
10,931
263
117
41.562738
0.660251
0.064221
0
0.642512
0
0
0.21131
0.164755
0
0
0
0
0.178744
1
0.062802
false
0
0.048309
0
0.15942
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
a21ac58aa7cde96c022982c685f57ff35c3f534d
39
py
Python
models/cells/DummyTest/__init__.py
HarshKhilawala/cerebmodels
d2a2f2ef947ef9dc23ddce6e55159240cd3233cb
[ "BSD-3-Clause" ]
null
null
null
models/cells/DummyTest/__init__.py
HarshKhilawala/cerebmodels
d2a2f2ef947ef9dc23ddce6e55159240cd3233cb
[ "BSD-3-Clause" ]
9
2020-03-24T17:09:03.000Z
2021-05-17T16:11:17.000Z
models/cells/DummyTest/__init__.py
myHBPwork/cerebmodels
371ea7f1bbe388f1acade17c7128b8ca6ab8fb7a
[ "BSD-3-Clause" ]
1
2021-05-21T03:08:41.000Z
2021-05-21T03:08:41.000Z
# ~/models/cells/DummyTest/__init__.py
19.5
38
0.769231
5
39
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.051282
39
1
39
39
0.702703
0.923077
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
bf716f21cae6e7398c62c80ff1921c835f26e173
20
py
Python
examples/tuple/ex1.py
mcorne/python-by-example
15339c0909c84b51075587a6a66391100971c033
[ "MIT" ]
null
null
null
examples/tuple/ex1.py
mcorne/python-by-example
15339c0909c84b51075587a6a66391100971c033
[ "MIT" ]
null
null
null
examples/tuple/ex1.py
mcorne/python-by-example
15339c0909c84b51075587a6a66391100971c033
[ "MIT" ]
null
null
null
print(tuple('abc'))
10
19
0.65
3
20
4.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.05
20
1
20
20
0.684211
0
0
0
0
0
0.15
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
5
bf7caf580b55a96b998792695efa69fe5538c151
200
py
Python
models_manager.py
pdefromont/test_panda3d
c8db5e0aa979ebece91bfa754cee145293e87e3e
[ "MIT" ]
null
null
null
models_manager.py
pdefromont/test_panda3d
c8db5e0aa979ebece91bfa754cee145293e87e3e
[ "MIT" ]
null
null
null
models_manager.py
pdefromont/test_panda3d
c8db5e0aa979ebece91bfa754cee145293e87e3e
[ "MIT" ]
null
null
null
class ModelManager: def __init__(self, main_engine): self.engine = main_engine self.loader = self.engine.loader def spawn(self, model_path, snap_to_grid=True): pass
20
51
0.66
26
200
4.730769
0.615385
0.162602
0.227642
0
0
0
0
0
0
0
0
0
0.255
200
9
52
22.222222
0.825503
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.166667
0
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
1
0
1
0
0
0
0
0
5
bf7f58415e46693852f05e6ce87d221d446f6dd6
192
py
Python
_modules/utils/cache/patch_response_headers/views.py
looking-for-a-job/django-examples
dfafa450668cac5c0351f6c7238b8886511229bf
[ "Unlicense" ]
null
null
null
_modules/utils/cache/patch_response_headers/views.py
looking-for-a-job/django-examples
dfafa450668cac5c0351f6c7238b8886511229bf
[ "Unlicense" ]
null
null
null
_modules/utils/cache/patch_response_headers/views.py
looking-for-a-job/django-examples
dfafa450668cac5c0351f6c7238b8886511229bf
[ "Unlicense" ]
null
null
null
from django.http import HttpResponse from django.views.decorators.cache import cache_control @cache_control(max_age=3600) def my_view(request): return HttpResponse("return this string")
24
55
0.8125
27
192
5.62963
0.703704
0.131579
0
0
0
0
0
0
0
0
0
0.023392
0.109375
192
7
56
27.428571
0.865497
0
0
0
0
0
0.09375
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
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
1
1
0
0
5
bf9b0b859e68203def453978ebfb186974461160
944
py
Python
tests/unit/test_message.py
EclipseTrading/ksnap
d882cfe47cdfd3e9594ed0396dbaa3cbf8efd057
[ "MIT" ]
2
2020-06-26T06:59:32.000Z
2021-06-03T17:28:17.000Z
tests/unit/test_message.py
EclipseTrading/ksnap
d882cfe47cdfd3e9594ed0396dbaa3cbf8efd057
[ "MIT" ]
9
2020-07-03T08:42:38.000Z
2021-10-05T08:04:40.000Z
tests/unit/test_message.py
EclipseTrading/ksnap
d882cfe47cdfd3e9594ed0396dbaa3cbf8efd057
[ "MIT" ]
2
2020-11-02T18:26:08.000Z
2021-03-23T06:44:58.000Z
from ksnap.message import Message def test_message_to_row(): msg = Message(100, 'key_1', 'val_1', 123456789, [('key_1', b'val_1'), ('key_2', None)]) row = msg.to_row() assert len(row) == 5 assert row == (100, 'key_1', 'val_1', 123456789, '[{"key": "key_1", "val": "dmFsXzE="}, {"key": "key_2", "val": null}]') def test_message_from_row(): msg = Message.from_row(100, 'key_1', 'val_1', 123456789, None) assert msg assert msg.offset == 100 assert msg.key == 'key_1' assert msg.value == 'val_1' assert msg.timestamp == 123456789 assert msg.headers is None msg = Message.from_row(100, 'key_1', 'val_1', 123456789, '[{"key": "key_1", "val": "dmFsXzE="}, {"key": "key_2", "val": null}]') assert msg assert msg.offset == 100 assert msg.key == 'key_1' assert msg.value == 'val_1' assert msg.timestamp == 123456789 assert msg.headers == [('key_1', b'val_1'), ('key_2', None)]
34.962963
132
0.604873
144
944
3.75
0.1875
0.2
0.077778
0.074074
0.77963
0.77963
0.77963
0.742593
0.67963
0.67963
0
0.125165
0.195975
944
26
133
36.307692
0.586298
0
0
0.47619
0
0.095238
0.239407
0
0
0
0
0
0.666667
1
0.095238
false
0
0.047619
0
0.142857
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
1
0
0
0
0
0
0
0
0
0
5
bfa0c015545d5847022dc4554e43ebdf29294e0e
184
py
Python
website/admin.py
p-koskey/awwards
9738a7260c3fd401707990124edf2e321b3d2a43
[ "MIT", "Unlicense" ]
null
null
null
website/admin.py
p-koskey/awwards
9738a7260c3fd401707990124edf2e321b3d2a43
[ "MIT", "Unlicense" ]
null
null
null
website/admin.py
p-koskey/awwards
9738a7260c3fd401707990124edf2e321b3d2a43
[ "MIT", "Unlicense" ]
null
null
null
from django.contrib import admin from .models import Profile, Post, Rate # Register your models here. admin.site.register(Profile) admin.site.register(Post) admin.site.register(Rate)
23
39
0.798913
27
184
5.444444
0.481481
0.183673
0.346939
0
0
0
0
0
0
0
0
0
0.103261
184
7
40
26.285714
0.890909
0.141304
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
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
1
0
1
0
0
0
0
5
781de6dc9a04fb60e9e6964b7130044f07e99b90
363
py
Python
capstone/capapi/__init__.py
rachelaus/capstone
2affa02706f9b1a99d032c66f258a7421c40a35e
[ "MIT" ]
134
2017-07-12T17:03:06.000Z
2022-03-27T06:38:29.000Z
capstone/capapi/__init__.py
rachelaus/capstone
2affa02706f9b1a99d032c66f258a7421c40a35e
[ "MIT" ]
1,362
2017-06-22T17:42:49.000Z
2022-03-31T15:28:00.000Z
capstone/capapi/__init__.py
rachelaus/capstone
2affa02706f9b1a99d032c66f258a7421c40a35e
[ "MIT" ]
38
2017-06-22T14:46:23.000Z
2022-03-16T05:32:54.000Z
import django.shortcuts import rest_framework.reverse from capapi.resources import api_reverse from capweb.helpers import reverse # Monkeypatch rest_framework.reverse._reverse to use our api_reverse function rest_framework.reverse._reverse = api_reverse # Monkeypatch django.shortcuts.resolve_url to use our reverse function django.shortcuts.reverse = reverse
30.25
77
0.853994
49
363
6.142857
0.387755
0.149502
0.199336
0.179402
0
0
0
0
0
0
0
0
0.101928
363
11
78
33
0.923313
0.396694
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
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
1
0
1
0
1
0
0
5
783a180895c2fae0a05bfc5543adf8b9681dd03b
221
py
Python
itbit.py
Tulip-HFT/market-crawler
a6572459a1b6dd1609d61e01c01f197911c8b144
[ "MIT" ]
null
null
null
itbit.py
Tulip-HFT/market-crawler
a6572459a1b6dd1609d61e01c01f197911c8b144
[ "MIT" ]
null
null
null
itbit.py
Tulip-HFT/market-crawler
a6572459a1b6dd1609d61e01c01f197911c8b144
[ "MIT" ]
null
null
null
import interface class Itbit(interface.MarketExplorer): def __init__(self): pass def exchange_name(self): return 'itbit' def markets(self): return ['btc/usd', 'btc/sgd', 'btc/eur']
17
48
0.615385
26
221
5.038462
0.653846
0.152672
0
0
0
0
0
0
0
0
0
0
0.257919
221
12
49
18.416667
0.79878
0
0
0
0
0
0.118182
0
0
0
0
0
0
1
0.375
false
0.125
0.125
0.25
0.875
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
5
7858b3e7858d94546c44d41a270082613f001d35
39
py
Python
__main__.py
sebastianschramm/calendar_api
88e2f59ed23b48d7b270bba50c0cdc6ea3b1f412
[ "Apache-2.0" ]
null
null
null
__main__.py
sebastianschramm/calendar_api
88e2f59ed23b48d7b270bba50c0cdc6ea3b1f412
[ "Apache-2.0" ]
null
null
null
__main__.py
sebastianschramm/calendar_api
88e2f59ed23b48d7b270bba50c0cdc6ea3b1f412
[ "Apache-2.0" ]
null
null
null
from app.webserver import main main()
9.75
30
0.769231
6
39
5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.153846
39
3
31
13
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
0
0
0
5
786ba1f00ebd1a017c1c70ca0fc063ff47f6fd53
12,899
py
Python
tests/conftest.py
emcek/pyerge
f89924ca7091f262869cedfcbb8c982145cfa3a3
[ "MIT" ]
null
null
null
tests/conftest.py
emcek/pyerge
f89924ca7091f262869cedfcbb8c982145cfa3a3
[ "MIT" ]
30
2021-11-29T13:47:26.000Z
2022-01-15T07:51:24.000Z
tests/conftest.py
emcek/pyerge
f89924ca7091f262869cedfcbb8c982145cfa3a3
[ "MIT" ]
2
2019-04-27T19:27:11.000Z
2019-08-23T14:57:04.000Z
from pytest import fixture @fixture def str_no_sync(): return """1548194358: === sync 1548194358: >>> Syncing repository 'gentoo' into '/usr/portage'... 1548194361: >>> Starting rsync with rsync://[2a01:90:200:10::1a]/gentoo-portage""" @fixture def str_sync(): return """1548194361: >>> Starting rsync with rsync://[2a01:90:200:10::1a]/gentoo-portage 1548194466: === Sync completed for gentoo 1548194466: *** terminating.""" @fixture def str_curr(): return """1571086865: *** emerge --nospinner --oneshot sys-kernel/linux-firmware 1571086944: >>> emerge (1 of 1) sys-kernel/linux-firmware-20191008 to / 1571086944: === (1 of 1) Cleaning (sys-kernel/linux-firmware-20191008::/usr/portage/sys-kernel/linux-firmware/linux-firmware-20191008.ebuild) 1571086985: === (1 of 1) Compiling/Merging (sys-kernel/linux-firmware-20191008::/usr/portage/sys-kernel/linux-firmware/linux-firmware-20191008.ebuild) 1571086996: === (1 of 1) Merging (sys-kernel/linux-firmware-20191008::/usr/portage/sys-kernel/linux-firmware/linux-firmware-20191008.ebuild) 1571087012: >>> AUTOCLEAN: sys-kernel/linux-firmware:0 1571087012: === Unmerging... (sys-kernel/linux-firmware-20191004)""" @fixture def str_curr_empty(): return """1571086865: *** emerge --nospinner --oneshot sys-kernel/linux-firmware 1571086944: >>> emerge (1 of 1) sys-kernel/linux-firmware-20191008 to / 1571086944: === (1 of 1) Cleaning (sys-kernel/linux-firmware-20191008::/usr/portage/sys-kernel/linux-firmware/linux-firmware-20191008.ebuild) 1571086996: === (1 of 1) Merging (sys-kernel/linux-firmware-20191008::/usr/portage/sys-kernel/linux-firmware/linux-firmware-20191008.ebuild) 1571087012: >>> AUTOCLEAN: sys-kernel/linux-firmware:0 1571087012: === Unmerging... (sys-kernel/linux-firmware-20191004)""" @fixture def str_dl_gt_0(): return """[ebuild U ] xfce-extra/thunar-archive-plugin-0.4.0::gentoo [0.3.1-r3::gentoo] 342 KiB [ebuild U ] xfce-extra/thunar-shares-plugin-0.3.0::gentoo [0.2.0_p20101105-r1::gentoo] 333 KiB [ebuild U ] xfce-base/xfce4-meta-4.14-r1::gentoo [4.12-r1::gentoo] USE="svg upower%* -minimal" 0 KiB Total: 44 packages (42 upgrades, 2 new), Size of downloads: 283,699 KiB """ @fixture def str_dl_eq_0(): return "Total: 0 packages, Size of downloads: 0 KiB" @fixture def str_dl_unknown(): return "" @fixture def str_eut(): return """[ebuild U ] xfce-base/xfdesktop-4.14.1::gentoo [4.12.4::gentoo] USE="libnotify thunar -debug" 1,498 KiB [ebuild U ] xfce-extra/thunar-archive-plugin-0.4.0::gentoo [0.3.1-r3::gentoo] 342 KiB [ebuild U ] xfce-extra/thunar-shares-plugin-0.3.0::gentoo [0.2.0_p20101105-r1::gentoo] 333 KiB [ebuild U ] xfce-base/xfce4-meta-4.14-r1::gentoo [4.12-r1::gentoo] USE="svg upower%* -minimal" 0 KiB !!! Error: couldn't get previous merge of libXpresent; skipping... Estimated update time: 1 hour, 9 minutes. """ @fixture def str_eut_unknown(): return """[ebuild U ] xfce-base/xfdesktop-4.14.1::gentoo [4.12.4::gentoo] USE="libnotify thunar -debug" 1,498 KiB [ebuild U ] xfce-extra/thunar-archive-plugin-0.4.0::gentoo [0.3.1-r3::gentoo] 342 KiB [ebuild U ] xfce-extra/thunar-shares-plugin-0.3.0::gentoo [0.2.0_p20101105-r1::gentoo] 333 KiB [ebuild U ] xfce-base/xfce4-meta-4.14-r1::gentoo [4.12-r1::gentoo] USE="svg upower%* -minimal" 0 KiB !!! Error: couldn't get previous merge of libXpresent; skipping... """ @fixture def orginal_html_xml(): html = b'<?xml version="1.0" encoding="UTF-8"?>\n<rdf:RDF xmlns="http://purl.org/rss/1.0/"\n ' \ b'xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"\n ' \ b'xmlns:content="http://purl.org/rss/1.0/modules/content/"\n ' \ b'xmlns:dc="http://purl.org/dc/elements/1.1/"\n ' \ b'xmlns:image="http://purl.org/rss/1.0/modules/image/"\n ' \ b'xmlns:slash="http://purl.org/rss/1.0/modules/slash/"\n ' \ b'xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"\n ' \ b'xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/"\n ' \ b'xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">\n' \ b'<channel rdf:about="https://security.gentoo.org/glsa">\n ' \ b'<title>Gentoo Linux security advisories</title>\n ' \ b'<link>https://security.gentoo.org/glsa</link>\n ' \ b'<description>This feed contains new Gentoo Linux security advisories. ' \ b'Contact security@gentoo.org with questions.</description>\n' \ b'<items>\n <rdf:Seq>\n' \ b'<rdf:li resource="https://security.gentoo.org/glsa/201904-25"/>\n' \ b'<rdf:li resource="https://security.gentoo.org/glsa/201904-24"/>\n' \ b'<rdf:li resource="https://security.gentoo.org/glsa/201904-23"/>\n' \ b'</items>\n <dc:date>2019-04-24T00:00:00+00:00</dc:date>\n </channel>\n' \ b'<item rdf:about="https://security.gentoo.org/glsa/201904-25">\n ' \ b'<title>GLSA 201904-25: QEMU: Multiple vulnerabilities</title>\n ' \ b'<link>https://security.gentoo.org/glsa/201904-25</link>\n ' \ b'<dc:date>2019-04-24T00:00:00+00:00</dc:date>\n </item>\n' \ b'<item rdf:about="https://security.gentoo.org/glsa/201904-24">\n ' \ b'<title>GLSA 201904-24: Ming: Multiple vulnerabilities</title>\n ' \ b'<link>https://security.gentoo.org/glsa/201904-24</link>\n ' \ b'<dc:date>2019-04-24T00:00:00+00:00</dc:date>\n </item>\n' \ b'<item rdf:about="https://security.gentoo.org/glsa/201904-23">\n ' \ b'<title>GLSA 201904-23: GLib: Multiple vulnerabilities</title>\n ' \ b'<link>https://security.gentoo.org/glsa/201904-23</link>\n ' \ b'<dc:date>2019-04-22T00:00:00+00:00</dc:date>\n </item>\n' \ b'</rdf:RDF>' return html @fixture() def html_xlm_as_str(): return """ <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:image="http://purl.org/rss/1.0/modules/image/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/"> <channel rdf:about="https://security.gentoo.org/glsa"> <title>Gentoo Linux security advisories</title> <link>https://security.gentoo.org/glsa</link> <description>This feed contains new Gentoo Linux security advisories. Contact security@gentoo.org with questions.</description> <items> <rdf:Seq> <rdf:li resource="https://security.gentoo.org/glsa/201904-23"/> <rdf:li resource="https://security.gentoo.org/glsa/201904-22"/> </rdf:Seq> </items> <dc:date>2019-04-24T00:00:00+00:00</dc:date> </channel> <item rdf:about="https://security.gentoo.org/glsa/201904-23"> <title>GLSA 201904-23: GLib: Multiple vulnerabilities</title> <link>https://security.gentoo.org/glsa/201904-23</link> <dc:date>2019-04-22T00:00:00+00:00</dc:date> </item> <item rdf:about="https://security.gentoo.org/glsa/201904-22"> <title>GLSA 201904-22: OpenDKIM: Root privilege escalation</title> <link>https://security.gentoo.org/glsa/201904-22</link> <dc:date>2019-04-22T00:00:00+00:00</dc:date> </item> </rdf:RDF> """ @fixture() def opt_emerge_nonlocal_with_1g(): from argparse import Namespace return Namespace(action='emerge', local=False, size='1G', verbose=2) @fixture def str_e_upd_calc(): return """""" @fixture def str_e_upd_none(): return "'Total: 0 packages, Size of downloads: 0 KiB'" @fixture def str_e_upd_total(): return """[blocks b ] kde-apps/kcalcore:5 ("kde-apps/kcalcore:5" is blocking kde-frameworks/kcalendarcore-5.64.0) [ebuild U ] kde-apps/libkgapi-19.08.3:5::gentoo [19.04.3:5::gentoo] USE="nls -debug -test" 229 KiB [ebuild U ] kde-misc/kio-gdrive-1.2.7:5::gentoo [1.2.6:5::gentoo] USE="handbook kaccounts -debug -test" 46 KiB Total: 347 packages (327 upgrades, 10 new, 1 in new slot, 9 reinstalls, 2 uninstalls), Size of downloads: 642,505 KiB """ @fixture def str_e_upd_conflict(): return """[blocks b ] kde-apps/kcalcore:5 ("kde-apps/kcalcore:5" is blocking kde-frameworks/kcalendarcore-5.64.0) [ebuild U ] kde-apps/libkgapi-19.08.3:5::gentoo [19.04.3:5::gentoo] USE="nls -debug -test" 229 KiB [ebuild U ] kde-misc/kio-gdrive-1.2.7:5::gentoo [1.2.6:5::gentoo] USE="handbook kaccounts -debug -test" 46 KiB Total: 347 packages (327 upgrades, 10 new, 2 in new slots, 9 reinstalls, 2 uninstalls), Size of downloads: 642,505 KiB Conflict: 2 blocks """ @fixture def str_e_prog_5_6(): return """1637618618: >>> emerge (5 of 6) www-client/vivaldi-4.3.2439.71-r1 to / 1637618618: === (5 of 6) Cleaning (www-client/vivaldi-4.3.2439.71-r1::/usr/portage/www-client/vivaldi/vivaldi-4.3.2439.71-r1.ebuild) 1637618619: === (5 of 6) Compiling/Merging (www-client/vivaldi-4.3.2439.71-r1::/usr/portage/www-client/vivaldi/vivaldi-4.3.2439.71-r1.ebuild) 1637618637: === (5 of 6) Merging (www-client/vivaldi-4.3.2439.71-r1::/usr/portage/www-client/vivaldi/vivaldi-4.3.2439.71-r1.ebuild) 1637618646: >>> AUTOCLEAN: www-client/vivaldi:0 1637618646: === Unmerging... (www-client/vivaldi-4.3.2439.63) 1637618651: >>> unmerge success: www-client/vivaldi-4.3.2439.63 1637618659: === (5 of 6) Post-Build Cleaning (www-client/vivaldi-4.3.2439.71-r1::/usr/portage/www-client/vivaldi/vivaldi-4.3.2439.71-r1.ebuild) 1637618659: ::: completed emerge (5 of 6) www-client/vivaldi-4.3.2439.71-r1 to /""" @fixture def str_e_prog_1_1(): return """1637631921: *** emerge --regex-search-auto=y dev-python/pyerge 1637631930: >>> emerge (1 of 1) dev-python/pyerge-0.4.0 to / 1637631930: === (1 of 1) Cleaning (dev-python/pyerge-0.4.0::/usr/local/portage/dev-python/pyerge/pyerge-0.4.0.ebuild) 1637631930: === (1 of 1) Compiling/Merging (dev-python/pyerge-0.4.0::/usr/local/portage/dev-python/pyerge/pyerge-0.4.0.ebuild) 1637631937: === (1 of 1) Merging (dev-python/pyerge-0.4.0::/usr/local/portage/dev-python/pyerge/pyerge-0.4.0.ebuild) 1637631941: >>> AUTOCLEAN: dev-python/pyerge:0""" @fixture def str_e_sta_compiling(): return """sr/portage/dev-perl/Mozilla-CA/Mozilla-CA-20999999-r1.ebuild) 1637618600: === (4 of 6) Compiling/Merging (dev-perl/Mozilla-CA-20999999-r1::/usr/portage/dev-perl/Mozilla-CA/Mozilla-CA-20999999-r1.ebuild) 1637618606: === (4 of """ @fixture def str_e_sta_cleaning(): return """Compat-0.130.0-r1 to / 1637618599: === (4 of 6) Cleaning (dev-perl/Mozilla-CA-20999999-r1::/usr/portage/dev-perl/Mozilla-CA/Mozilla-CA-20999999-r1.ebuild) 1637618600: === (4 of 6)""" @fixture def str_e_sta_autoclean(): return """hesis-6.25.0::/usr/portage/dev-python/hypothesis/hypothesis-6.25.0.ebuild) 1637618672: >>> AUTOCLEAN: dev-python/hypothesis:0 1637618672: === """ @fixture def str_e_sta_completed_emerge(): return """v-perl/Mozilla-CA/Mozilla-CA-20999999-r1.ebuild) 1637618618: ::: completed emerge (4 of 6) dev-perl/Mozilla-CA-20999999-r1 to / 1637618618: === (5 of 6""" @fixture def str_e_sta_finished(): return """othesis-6.25.0 to / 1637618682: *** Finished. Cleaning up... 1637618686: *** terminating. 1637631776: *** em""" @fixture def str_e_sta_starting_rsync(): return """pository 'gentoo' into '/usr/portage'... 1548195587: >>> Starting rsync with rsync://[2a00:1828:a00d:ffff::6]/gentoo-portage 1548195642: === Sync com""" @fixture def str_e_sta_sync_completed(): return """1604197444: >>> Syncing repository 'gentoo' into '/usr/portage'... 1604197446: >>> Starting rsync with rsync://[2001:470:1f14:104f::2]/gentoo-portage 1604197788: === Sync completed for gentoo 1604197788: >>> Syncing repository 'tor""" @fixture def str_e_sta_unmerging(): return """perl/Mozilla-CA:0 1637618610: === Unmerging... (dev-perl/Mozilla-CA-20999999) 1637618618: === (4 of 6""" @fixture def str_e_sta_merging(): return """zilla-CA-20999999-r1::/usr/portage/dev-perl/Mozilla-CA/Mozilla-CA-20999999-r1.ebuild) 1637618606: === (4 of 6) Merging (dev-perl/Mozilla-CA-20999999-r1::/usr/portage/dev-perl/Mozilla-CA/Mozilla-CA-20999999-r1.ebuild) 1637618610: >>>""" @fixture def str_e_sta_unmerge(): return """erging... (dev-perl/Tie-IxHash-1.230.0) 1604167130: >>> unmerge success: dev-perl/Tie-IxHash-1.230.0 1604167130: *** exiting successfully. 1604167131: *** terminating.""" @fixture def str_e_sta_unknown(): return """portage/eix:0 1548195548: === (3 of 3) Updating world file (app-portage/eix-0.33.5) 1548195548: === (3 of 3) Post-Build Cle"""
43.430976
151
0.672843
2,006
12,899
4.284148
0.159023
0.006982
0.03933
0.048639
0.775076
0.739469
0.712241
0.681173
0.642658
0.594019
0
0.151172
0.13691
12,899
296
152
43.577703
0.620767
0
0
0.306034
0
0.297414
0.83115
0.292658
0
0
0
0
0
1
0.125
false
0
0.008621
0.116379
0.258621
0
0
0
0
null
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
5
7873702395dfc58ec1d7fe7e2c0672cda7e5b394
464
py
Python
pysol/io/Output.py
lotfio/pysol
34fac6d1ec246a7a037d8237e00974a9a9548faa
[ "MIT" ]
2
2019-10-09T21:58:20.000Z
2020-01-08T07:29:28.000Z
pysol/io/Output.py
lotfio/pysol
34fac6d1ec246a7a037d8237e00974a9a9548faa
[ "MIT" ]
null
null
null
pysol/io/Output.py
lotfio/pysol
34fac6d1ec246a7a037d8237e00974a9a9548faa
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #| This file is part of cony #| #| @package pysol python cli application #| @author <lotfio lakehal> #| @license MIT #| @version 0.1.0 #| @copyright 2019 lotfio lakehal import sys class Output: def __init__(self): pass # writeLine method # this method writes to the output # TODO::adding colors support def writeLn(self, line = '', color = 'white'): return sys.stdout.write(line)
21.090909
50
0.609914
58
464
4.810345
0.827586
0.09319
0
0
0
0
0
0
0
0
0
0.023599
0.269397
464
22
51
21.090909
0.79941
0.588362
0
0
0
0
0.027933
0
0
0
0
0.045455
0
1
0.333333
false
0.166667
0.166667
0.166667
0.833333
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
1
0
1
1
0
0
5
15ae9f0ce903032fc57703270b8695e08efff1c2
102
py
Python
monitoring-center-backend/monitoring_center/views/__init__.py
Heimdall-monitoring/monitoring-center
acf56a796c25fb6804fd16b1ff8c93645bc77ff3
[ "MIT" ]
null
null
null
monitoring-center-backend/monitoring_center/views/__init__.py
Heimdall-monitoring/monitoring-center
acf56a796c25fb6804fd16b1ff8c93645bc77ff3
[ "MIT" ]
10
2020-09-09T14:37:05.000Z
2020-11-26T13:14:09.000Z
monitoring-center-backend/monitoring_center/views/__init__.py
Heimdall-monitoring/monitoring-center
acf56a796c25fb6804fd16b1ff8c93645bc77ff3
[ "MIT" ]
null
null
null
""" Handle all views for the application """ from .api import API_VIEWS from .main import MAIN_VIEWS
14.571429
36
0.754902
16
102
4.6875
0.625
0
0
0
0
0
0
0
0
0
0
0
0.166667
102
6
37
17
0.882353
0.352941
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
1
0
0
5
ec59846e9803688bdecbaf1a7723610f0e230b5e
7,652
py
Python
thorpy/painting/mousecursor.py
YannThorimbert/PyMap2D
c4ddb6bb4651f19b6ad1b4149f38e64de2daf120
[ "MIT" ]
27
2018-04-05T13:06:22.000Z
2022-01-24T08:14:47.000Z
thorpy/painting/mousecursor.py
YannThorimbert/PyMap2D
c4ddb6bb4651f19b6ad1b4149f38e64de2daf120
[ "MIT" ]
6
2019-11-23T07:02:53.000Z
2021-04-12T19:08:35.000Z
thorpy/painting/mousecursor.py
YannThorimbert/PyMap2D
c4ddb6bb4651f19b6ad1b4149f38e64de2daf120
[ "MIT" ]
7
2018-11-20T01:01:41.000Z
2022-01-24T08:14:50.000Z
import pygame from thorpy.miscgui import constants # default pygame black arrow arrow = ( (16, 16), (0, 0), (0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00, 0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00, 0x7F, 0x80, 0x7C, 0x00, 0x6C, 0x00, 0x46, 0x00, 0x06, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00), (0x40, 0x00, 0xE0, 0x00, 0xF0, 0x00, 0xF8, 0x00, 0xFC, 0x00, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x80, 0xFF, 0xC0, 0xFF, 0x80, 0xFE, 0x00, 0xEF, 0x00, 0x4F, 0x00, 0x07, 0x80, 0x07, 0x80, 0x03, 0x00)) diamond = ((16, 16), (7, 7), (0, 0, 1, 0, 3, 128, 7, 192, 14, 224, 28, 112, 56, 56, 112, 28, 56, 56, 28, 112, 14, 224, 7, 192, 3, 128, 1, 0, 0, 0, 0, 0), (1, 0, 3, 128, 7, 192, 15, 224, 31, 240, 62, 248, 124, 124, 248, 62, 124, 124, 62, 248, 31, 240, 15, 224, 7, 192, 3, 128, 1, 0, 0, 0)) ball = ((16, 16), (7, 7), (0, 0, 3, 192, 15, 240, 24, 248, 51, 252, 55, 252, 127, 254, 127, 254, 127, 254, 127, 254, 63, 252, 63, 252, 31, 248, 15, 240, 3, 192, 0, 0), (3, 192, 15, 240, 31, 248, 63, 252, 127, 254, 127, 254, 255, 255, 255, 255, 255, 255, 255, 255, 127, 254, 127, 254, 63, 252, 31, 248, 15, 240, 3, 192)) broken_x = ((16, 16), (7, 7), (0, 0, 96, 6, 112, 14, 56, 28, 28, 56, 12, 48, 0, 0, 0, 0, 0, 0, 0, 0, 12, 48, 28, 56, 56, 28, 112, 14, 96, 6, 0, 0), (224, 7, 240, 15, 248, 31, 124, 62, 62, 124, 30, 120, 14, 112, 0, 0, 0, 0, 14, 112, 30, 120, 62, 124, 124, 62, 248, 31, 240, 15, 224, 7)) tri_left = ( (16, 16), (1, 1), (0, 0, 96, 0, 120, 0, 62, 0, 63, 128, 31, 224, 31, 248, 15, 254, 15, 254, 7, 128, 7, 128, 3, 128, 3, 128, 1, 128, 1, 128, 0, 0), (224, 0, 248, 0, 254, 0, 127, 128, 127, 224, 63, 248, 63, 254, 31, 255, 31, 255, 15, 254, 15, 192, 7, 192, 7, 192, 3, 192, 3, 192, 1, 128)) tri_right = ( (16, 16), (14, 1), (0, 0, 0, 6, 0, 30, 0, 124, 1, 252, 7, 248, 31, 248, 127, 240, 127, 240, 1, 224, 1, 224, 1, 192, 1, 192, 1, 128, 1, 128, 0, 0), (0, 7, 0, 31, 0, 127, 1, 254, 7, 254, 31, 252, 127, 252, 255, 248, 255, 248, 127, 240, 3, 240, 3, 224, 3, 224, 3, 192, 3, 192, 1, 128)) tower = ( # sized 24x24 "XXXXXXXXXXXXXXXXXXXXXXXX", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "X X", "XXXXXXXXXXXXXXXXXXXXXXXX", ) strings_chablon = ( # sized 24x24 "XX ", "XXX ", "XXXX ", "XX.XX ", "XX..XX ", "XX...XX ", "XX....XX ", "XX.....XX ", "XX......XX ", "XX.......XX ", "XX........XX ", "XX........XXX ", "XX......XXXXX ", "XX.XXX..XX ", "XXXX XX..XX ", "XX XX..XX ", " XX..XX ", " XX..XX ", " XX..XX ", " XXXX ", " XX ", " ", " ", " ", ) strings_sizerX = ( # sized 24x16 " X X ", " XX XX ", " X.X X.X ", " X..X X..X ", " X...XXXXXXXX...X ", "X................X ", " X...XXXXXXXX...X ", " X..X X..X ", " X.X X.X ", " XX XX ", " X X ", " ", " ", " ", " ", " ", ) strings_sizerY = ( # sized 16x24 " X ", " X.X ", " X...X ", " X.....X ", " X.......X ", "XXXXX.XXXXX ", " X.X ", " X.X ", " X.X ", " X.X ", " X.X ", " X.X ", " X.X ", "XXXXX.XXXXX ", " X.......X ", " X.....X ", " X...X ", " X.X ", " X ", " ", " ", " ", " ", " ", ) strings_sizerXY = ( # sized 24x16 "XXXXXXXX ", "X.....X ", "X....X ", "X...X ", "X..X.X ", "X.X X.X ", "XX X.X X ", "X X.X XX ", " X.XX.X ", " X...X ", " X...X ", " X....X ", " X.....X ", " XXXXXXXX ", " ", " ", ) strings_txt = ( # sized 8x16 "ooo ooo ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", " o ", "ooo ooo ", " ", " ", ) class MouseCursor: """Object defining a cursor that can be used in place of the standard mouse cursor, through the function mousecursor.change_cursor(cursor). """ def __init__(self, strings, size, hotspot): self.strings = strings self.size = size self.hotspot = hotspot def get_cursor(self): curs, mask = pygame.cursors.compile(self.strings, 'X', '.', 'o') return (self.size, self.hotspot, curs, mask) text_cursor = MouseCursor(strings_txt, (8, 16), (0, 0)).get_cursor() tower_cursor = MouseCursor(tower, (24,24), (0,0)).get_cursor() cursors = {constants.CURSOR_NORMAL: arrow, constants.CURSOR_TEXT: text_cursor, constants.CURSOR_BROKEN: broken_x, constants.CURSOR_BALL: ball} def change_cursor(cursor): if isinstance(cursor, int): cursor = cursors[cursor] pygame.mouse.set_cursor(*cursor)
19.082294
83
0.284762
770
7,652
2.794805
0.166234
0.109665
0.14777
0.178439
0.284387
0.276022
0.201208
0.186338
0.153346
0.139405
0
0.276724
0.565996
7,652
400
84
19.13
0.371274
0.030711
0
0.744
0
0
0.329232
0.00649
0
0
0.034613
0
0
1
0.008
false
0
0.005333
0
0.018667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
ec6d16c8255c712a415e8d48321e6e8731775c92
125
py
Python
kloppy/infra/serializers/event/__init__.py
dmallory42/kloppy
418aae2a7a4e67499cfb74177b830daa38b065b6
[ "BSD-3-Clause" ]
null
null
null
kloppy/infra/serializers/event/__init__.py
dmallory42/kloppy
418aae2a7a4e67499cfb74177b830daa38b065b6
[ "BSD-3-Clause" ]
null
null
null
kloppy/infra/serializers/event/__init__.py
dmallory42/kloppy
418aae2a7a4e67499cfb74177b830daa38b065b6
[ "BSD-3-Clause" ]
null
null
null
from .base import EventDataSerializer #from .metrica import MetricaEventSerializer from .statsbomb import StatsBombSerializer
41.666667
44
0.88
12
125
9.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.088
125
3
45
41.666667
0.964912
0.344
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
1
0
0
5
ece1f62705f6b8961a679dd0f7b4c4a13dce5f27
35
py
Python
main.py
TheD3vel0per/CoviDonate
33e85d090bcdae9e317cb1d8a92f286e0874e2e4
[ "MIT" ]
3
2020-06-14T04:54:38.000Z
2021-01-24T06:40:46.000Z
main.py
TheD3vel0per/CoviDonate
33e85d090bcdae9e317cb1d8a92f286e0874e2e4
[ "MIT" ]
null
null
null
main.py
TheD3vel0per/CoviDonate
33e85d090bcdae9e317cb1d8a92f286e0874e2e4
[ "MIT" ]
null
null
null
import server server.App.app.run()
11.666667
20
0.771429
6
35
4.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.085714
35
3
20
11.666667
0.84375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
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
1
0
0
0
0
5
ecef896937249c86482ffe819342e20f03a27b3a
81
py
Python
terminal-print-codes/clear.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
140
2017-02-21T22:49:04.000Z
2022-03-22T17:51:58.000Z
terminal-print-codes/clear.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
5
2017-12-02T19:55:00.000Z
2021-09-22T23:18:39.000Z
terminal-print-codes/clear.py
whitmans-max/python-examples
881a8f23f0eebc76816a0078e19951893f0daaaa
[ "MIT" ]
79
2017-01-25T10:53:33.000Z
2022-03-11T16:13:57.000Z
# clear screen print("\033[2J") # move to (10,0) (row,col) print("\033[10;0H")
11.571429
26
0.592593
15
81
3.2
0.8
0.333333
0
0
0
0
0
0
0
0
0
0.188406
0.148148
81
6
27
13.5
0.507246
0.45679
0
0
0
0
0.425
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
5
01cabd77181128eeef9a62b37165f8b9fd4b2e8f
57
py
Python
aft/vesselregistration/models.py
InDeepShip/InDeepShip
856f868a6c20223a6b0f221158813059a4479264
[ "MIT" ]
1
2021-01-03T18:59:29.000Z
2021-01-03T18:59:29.000Z
aft/vesselregistration/models.py
InDeepShip/InDeepShip
856f868a6c20223a6b0f221158813059a4479264
[ "MIT" ]
null
null
null
aft/vesselregistration/models.py
InDeepShip/InDeepShip
856f868a6c20223a6b0f221158813059a4479264
[ "MIT" ]
null
null
null
from djongo import models from api.models import Vessel
14.25
29
0.824561
9
57
5.222222
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.157895
57
3
30
19
0.979167
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
1
0
0
5
bf00bca317edfb3c693efd56879e24adad2e4eb1
13
py
Python
test/integration/ListLength/list length.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
30
2019-10-29T12:47:50.000Z
2022-02-12T06:41:39.000Z
test/integration/ListLength/list length.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
247
2017-09-21T17:11:18.000Z
2019-10-08T12:59:07.000Z
test/integration/ListLength/list length.py
HighSchoolHacking/GLS-Draft
9e418b6290e7c8e3f2da87668784bdba1cde5a76
[ "MIT" ]
17
2017-10-01T16:53:20.000Z
2018-11-28T07:20:35.000Z
# len(foo) #
3.25
8
0.461538
2
13
3
1
0
0
0
0
0
0
0
0
0
0
0
0.230769
13
3
9
4.333333
0.6
0
0
0
0
0
0
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
1
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
bf2ce50204085878978eb5cf5c145ae96b7731cd
245
py
Python
certsign/__init__.py
nilsfr/certsign
496dedc391a6a417ae16ce0b27b14103418466bc
[ "BSD-3-Clause" ]
11
2018-10-04T10:13:28.000Z
2021-11-15T10:09:57.000Z
certsign/__init__.py
nilsfr/certsign
496dedc391a6a417ae16ce0b27b14103418466bc
[ "BSD-3-Clause" ]
null
null
null
certsign/__init__.py
nilsfr/certsign
496dedc391a6a417ae16ce0b27b14103418466bc
[ "BSD-3-Clause" ]
1
2021-04-30T07:28:36.000Z
2021-04-30T07:28:36.000Z
try: import __builtin__ if not hasattr(__builtin__, 'FileExistsError'): class FileExistsError(OSError): """ File already exists. """ __builtin__.FileExistsError = FileExistsError except ImportError: pass
24.5
53
0.669388
20
245
7.6
0.75
0.289474
0
0
0
0
0
0
0
0
0
0
0.24898
245
9
54
27.222222
0.826087
0.081633
0
0
0
0
0.069124
0
0
0
0
0
0
1
0
true
0.142857
0.285714
0
0.428571
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
1
0
0
0
0
0
5
170fc5ae06cc4d7536cdffafd85e597dac258912
435
py
Python
core/test/__init__.py
OctopusRice/LineNet
a03ce3bf741dc497ae6bc680cd779128bda1a34b
[ "BSD-3-Clause" ]
1
2020-12-03T03:07:15.000Z
2020-12-03T03:07:15.000Z
core/test/__init__.py
OctopusRice/LineNet
a03ce3bf741dc497ae6bc680cd779128bda1a34b
[ "BSD-3-Clause" ]
1
2019-08-23T09:27:33.000Z
2019-08-29T01:46:12.000Z
core/test/__init__.py
OctopusRice/LineNet
a03ce3bf741dc497ae6bc680cd779128bda1a34b
[ "BSD-3-Clause" ]
null
null
null
from .cornernet import cornernet from .linenet import linenet from .cornernet_saccade import cornernet_saccade from .cornernet_ifp_saccade import cornernet_ifp_saccade from .cornernet_ifp_squeeze3 import cornernet_ifp_squeeze3 from .cornernet_ifp_squeeze2 import cornernet_ifp_squeeze2 def test_func(sys_config, db, nnet, result_dir, debug=False): return globals()[sys_config.sampling_function](db, nnet, result_dir, debug=debug)
43.5
85
0.850575
61
435
5.737705
0.377049
0.205714
0.137143
0.131429
0.114286
0
0
0
0
0
0
0.010127
0.091954
435
9
86
48.333333
0.875949
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0.75
0.125
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
17342bce93f053c4c85553d6042a3d75831239ac
93
py
Python
asistance/classrooms/models/__init__.py
Daniel1404/Registration-program
42dbe8871915b7b6f5be8ce173870f75ef0d79bf
[ "MIT" ]
null
null
null
asistance/classrooms/models/__init__.py
Daniel1404/Registration-program
42dbe8871915b7b6f5be8ce173870f75ef0d79bf
[ "MIT" ]
null
null
null
asistance/classrooms/models/__init__.py
Daniel1404/Registration-program
42dbe8871915b7b6f5be8ce173870f75ef0d79bf
[ "MIT" ]
null
null
null
"""classrooms/Import models""" from .classroom import Classroom from .students import Student
31
32
0.806452
11
93
6.818182
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.096774
93
3
33
31
0.892857
0.258065
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
1
0
0
5
17458cd32ffe843fe44f13b20ce51d1f402445ff
67
py
Python
env/lib64/python3.8/site-packages/openpyxl/comments/__init__.py
albixhafa/balance-sheet-integrity
bc7edef8ac7d7e57375a26f9edf9c7235722a2ac
[ "MIT" ]
11
2020-06-28T04:30:26.000Z
2022-03-26T08:40:47.000Z
env/lib64/python3.8/site-packages/openpyxl/comments/__init__.py
albixhafa/balance-sheet-integrity
bc7edef8ac7d7e57375a26f9edf9c7235722a2ac
[ "MIT" ]
10
2020-09-30T12:49:45.000Z
2020-10-04T10:26:33.000Z
venv/Lib/site-packages/openpyxl/comments/__init__.py
aklauritzen/bilago
276b1c11e259dd77260c74fc013f59eb1eb42d2f
[ "MIT" ]
1
2021-11-16T19:06:53.000Z
2021-11-16T19:06:53.000Z
# Copyright (c) 2010-2020 openpyxl from .comments import Comment
13.4
34
0.761194
9
67
5.666667
1
0
0
0
0
0
0
0
0
0
0
0.142857
0.164179
67
4
35
16.75
0.767857
0.477612
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
1
0
0
5
17655ddac3571e4456e5f8f9202f2d5622269657
4,174
py
Python
New/Robot/Function.py
qs2042/-gocqhttp-
9de8495b3af0ebfde166a3e8cb98cee7dfe87665
[ "MIT" ]
1
2022-03-31T02:53:47.000Z
2022-03-31T02:53:47.000Z
New/Robot/Function.py
qs2042/handle-gocqhttp-Event-service
9de8495b3af0ebfde166a3e8cb98cee7dfe87665
[ "MIT" ]
null
null
null
New/Robot/Function.py
qs2042/handle-gocqhttp-Event-service
9de8495b3af0ebfde166a3e8cb98cee7dfe87665
[ "MIT" ]
null
null
null
import random,requests,json,time,re # 工具类 class CQCode: # 未被go-cqhttp支持的CQcode def __init__(self) -> None: # [CQ:rps] 猜拳魔法表情 # [CQ:dice] 掷骰子魔法表情 # [CQ:shake] 窗口抖动(戳一戳) # [CQ:anonymous] 匿名发消息 # [CQ:contact,type=qqID,id=10001000] 推荐好友 # [CQ:contact,type=groupID,id=100100] 推荐群 # [CQ:location,lat=39.8969426,lon=116.3109099] 位置 pass # 表情 @staticmethod def face(id:str): # https://github.com/kyubotics/coolq-http-api/wiki/%E8%A1%A8%E6%83%85-CQ-%E7%A0%81-ID-%E8%A1%A8 if not id.isdigit(): id = random.randint(0, 221) id = int(id) if id < 0 or id > 221: id = random.randint(0, 221) return "[CQ:face,id=%d]" % id # 语音 @staticmethod def record(file="http://baidu.com/1.mp3"): # magic 0=正常(Default), 1=变声 # url 语音URL # cache 只在通过网络 URL 发送时有效, 表示是否使用已缓存的文件, 0=不使用, 1=使用(Default) # Proxy 只在通过网络 URL 发送时有效, 表示是否通过代理下载文件(需通过环境变量或配置文件配置代理), 0=不使用, 1=使用(Default) # timeout 只在通过网络 URL 发送时有效, 单位秒, 表示下载网络文件的超时时间 , 默认不超时 return "[CQ:record,file=%s]" % file # 短视频 @staticmethod def video(file="http://baidu.com/1.mp4", cover="http://baidu.com/1.jpg"): # c 通过网络下载视频时的线程数, 默认单线程. (在资源不支持并发时会自动处理), params=2or3 return "[CQ:video,file=%s,cover=%s]" % (file, cover) # @ @staticmethod def at(qq=2042136767, name="at的群友不在当前群里"): return "[CQ:at,qq=%s,name=%s]" % (qq, name) # 链接分享 @staticmethod def share(url, title, content=None, image=None): # content 内容描述 # image 图片URL return "[CQ:share,url=%s,title=%s]" % (url, title) # 音乐分享 @staticmethod def music(type="163", id=28949129): # qq, 163, xm return "[CQ:music,type=%s,id=%s]" % (type, id) def musicCustom(self, url="http://baidu.com", audio="http://baidu.com/1.mp3", title="音乐标题", content=None, image=None): return "[CQ:music,type=custom,url=%s,audio=%s,title=%s]" % (url, audio, title) # 图片 @staticmethod def image(file="http://baidu.com/1.jpg", type="show", id="40004"): # value = 图片文件名 # flash = 闪照, show = 秀图 (默认普通图片) # value = 发送秀图时的特效id, 默认为40000 return "[CQ:image,file=%s,type=%s,id=%s]" % (file,type,id) # [CQ:reply,id=123456] 回复 # [CQ:reply,text=Hello World,qq=10086,time=3376656000,seq=5123] 自定义回复 # [CQ:redbag,title=恭喜发财] 红包 # 戳一戳 @staticmethod def poke(qq): return "[CQ:poke,qq=%s]" % qq # [CQ:gift,qq=123456,id=8] 发送礼物 # [CQ:forward,id=xxxx] 合并转发 # ... 合并转发消息节点 # [CQ:xml,data=xxxx] XML消息 # [CQ:json,data={"app":"com.tencent.miniapp"&#44;"desc":""&#44;"view":"notification"&#44;"ver":"0.0.0.1"&#44;"prompt":"&#91;应用&#93;"&#44;"appID":""&#44;"sourceName":""&#44;"actionData":""&#44;"actionData_A":""&#44;"sourceUrl":""&#44;"meta":{"notification":{"appInfo":{"appName":"全国疫情数据统计"&#44;"appType":4&#44;"appid":1109659848&#44;"iconUrl":"http:\/\/gchat.qpic.cn\/gchatpic_new\/719328335\/-2010394141-6383A777BEB79B70B31CE250142D740F\/0"}&#44;"data":&#91;{"title":"确诊"&#44;"value":"80932"}&#44;{"title":"今日确诊"&#44;"value":"28"}&#44;{"title":"疑似"&#44;"value":"72"}&#44;{"title":"今日疑似"&#44;"value":"5"}&#44;{"title":"治愈"&#44;"value":"60197"}&#44;{"title":"今日治愈"&#44;"value":"1513"}&#44;{"title":"死亡"&#44;"value":"3140"}&#44;{"title":"今**亡"&#44;"value":"17"}&#93;&#44;"title":"中国加油, 武汉加油"&#44;"button":&#91;{"name":"病毒 : SARS-CoV-2, 其导致疾病命名 COVID-19"&#44;"action":""}&#44;{"name":"传染源 : 新冠肺炎的患者。无症状感染者也可能成为传染源。"&#44;"action":""}&#93;&#44;"emphasis_keyword":""}}&#44;"text":""&#44;"sourceAd":""}] JSON消息 # [CQ:cardimage,file=https://i.pixiv.cat/img-master/img/2020/03/25/00/00/08/80334602_p0_master1200.jpg] cardimage # 文本转语音 @staticmethod def tts(text="大家好我是萌新"): return "[CQ:tts,text=%s]" % text class Function:pass
44.88172
1,008
0.546239
550
4,174
4.129091
0.461818
0.035227
0.031704
0.028622
0.068252
0
0
0
0
0
0
0.106952
0.23838
4,174
93
1,009
44.88172
0.607424
0.520604
0
0.282051
0
0.025641
0.220153
0.096933
0
0
0
0
0
1
0.282051
false
0.051282
0.025641
0.230769
0.615385
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
5
17865694e6526b8ffbed6b1bf0d3dd28eb28a5cf
6,750
py
Python
tests/flow/test_Richards_empirical.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
3
2020-11-27T03:18:28.000Z
2022-03-18T01:29:58.000Z
tests/flow/test_Richards_empirical.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
null
null
null
tests/flow/test_Richards_empirical.py
kimjaed/simpeg
b8d716f86a4ea07ba3085fabb24c2bc974788040
[ "MIT" ]
1
2020-05-26T17:00:53.000Z
2020-05-26T17:00:53.000Z
from __future__ import print_function import unittest import numpy as np from discretize.Tests import checkDerivative from SimPEG import Mesh from SimPEG import Maps from SimPEG.FLOW import Richards TOL = 1E-8 np.random.seed(2) class TestModels(unittest.TestCase): def test_haverkamp_theta_u(self): mesh = Mesh.TensorMesh([50]) hav = Richards.Empirical.Haverkamp_theta(mesh) passed = checkDerivative( lambda u: (hav(u), hav.derivU(u)), np.random.randn(50), plotIt=False ) self.assertTrue(passed, True) def test_haverkamp_theta_m(self): mesh = Mesh.TensorMesh([50]) idnmap = Maps.IdentityMap(nP=mesh.nC) seeds = { 'theta_r': np.random.rand(mesh.nC), 'theta_s': np.random.rand(mesh.nC), 'alpha': np.random.rand(mesh.nC), 'beta': np.random.rand(mesh.nC), } opts = [ ('theta_r', dict(theta_rMap=idnmap), 1), ('theta_s', dict(theta_sMap=idnmap), 1), ('alpha', dict(alphaMap=idnmap), 1), ('beta', dict(betaMap=idnmap), 1), ] u = np.random.randn(mesh.nC) for name, opt, nM in opts: van = Richards.Empirical.Haverkamp_theta(mesh, **opt) x0 = np.concatenate([seeds[n] for n in name.split('-')]) def fun(m): van.model = m return van(u), van.derivM(u) print('Haverkamp_theta test m deriv: ', name) passed = checkDerivative( fun, x0, plotIt=False ) self.assertTrue(passed, True) def test_vangenuchten_theta_u(self): mesh = Mesh.TensorMesh([50]) van = Richards.Empirical.Vangenuchten_theta(mesh) passed = checkDerivative( lambda u: (van(u), van.derivU(u)), np.random.randn(50), plotIt=False ) self.assertTrue(passed, True) def test_vangenuchten_theta_m(self): mesh = Mesh.TensorMesh([50]) idnmap = Maps.IdentityMap(nP=mesh.nC) seeds = { 'theta_r': np.random.rand(mesh.nC), 'theta_s': np.random.rand(mesh.nC), 'n': np.random.rand(mesh.nC) + 1, 'alpha': np.random.rand(mesh.nC), } opts = [ ('theta_r', dict(theta_rMap=idnmap), 1), ('theta_s', dict(theta_sMap=idnmap), 1), ('n', dict(nMap=idnmap), 1), ('alpha', dict(alphaMap=idnmap), 1), ] u = np.random.randn(mesh.nC) for name, opt, nM in opts: van = Richards.Empirical.Vangenuchten_theta(mesh, **opt) x0 = np.concatenate([seeds[n] for n in name.split('-')]) def fun(m): van.model = m return van(u), van.derivM(u) print('Vangenuchten_theta test m deriv: ', name) passed = checkDerivative( fun, x0, plotIt=False ) self.assertTrue(passed, True) def test_haverkamp_k_u(self): mesh = Mesh.TensorMesh([5]) hav = Richards.Empirical.Haverkamp_k(mesh) print('Haverkamp_k test u deriv') passed = checkDerivative( lambda u: (hav(u), hav.derivU(u)), np.random.randn(mesh.nC), plotIt=False ) self.assertTrue(passed, True) def test_haverkamp_k_m(self): mesh = Mesh.TensorMesh([5]) expmap = Maps.IdentityMap(nP=mesh.nC) wires2 = Maps.Wires(('one', mesh.nC), ('two', mesh.nC)) wires3 = Maps.Wires( ('one', mesh.nC), ('two', mesh.nC), ('three', mesh.nC) ) opts = [ ('Ks', dict(KsMap=expmap), 1), ('A', dict(AMap=expmap), 1), ('gamma', dict(gammaMap=expmap), 1), ('Ks-A', dict(KsMap=expmap*wires2.one, AMap=expmap*wires2.two), 2), ('Ks-gamma', dict(KsMap=expmap*wires2.one, gammaMap=expmap*wires2.two), 2), ('A-gamma', dict(AMap=expmap*wires2.one, gammaMap=expmap*wires2.two), 2), ('Ks-A-gamma', dict( KsMap=expmap*wires3.one, AMap=expmap*wires3.two, gammaMap=expmap*wires3.three), 3), ] u = np.random.randn(mesh.nC) for name, opt, nM in opts: np.random.seed(2) hav = Richards.Empirical.Haverkamp_k(mesh, **opt) def fun(m): hav.model = m return hav(u), hav.derivM(u) print('Haverkamp_k test m deriv: ', name) passed = checkDerivative( fun, np.random.randn(mesh.nC * nM), plotIt=False ) self.assertTrue(passed, True) def test_vangenuchten_k_u(self): mesh = Mesh.TensorMesh([50]) van = Richards.Empirical.Vangenuchten_k(mesh) print('Vangenuchten_k test u deriv') passed = checkDerivative( lambda u: (van(u), van.derivU(u)), np.random.randn(mesh.nC), plotIt=False ) self.assertTrue(passed, True) def test_vangenuchten_k_m(self): mesh = Mesh.TensorMesh([50]) expmap = Maps.ExpMap(nP=mesh.nC) idnmap = Maps.IdentityMap(nP=mesh.nC) seeds = { 'Ks': np.random.triangular( np.log(1e-7), np.log(1e-6), np.log(1e-5), mesh.nC ), 'I': np.random.rand(mesh.nC), 'n': np.random.rand(mesh.nC) + 1, 'alpha': np.random.rand(mesh.nC), } opts = [ ('Ks', dict(KsMap=expmap), 1), ('I', dict(IMap=idnmap), 1), ('n', dict(nMap=idnmap), 1), ('alpha', dict(alphaMap=idnmap), 1), ] u = np.random.randn(mesh.nC) for name, opt, nM in opts: van = Richards.Empirical.Vangenuchten_k(mesh, **opt) x0 = np.concatenate([seeds[n] for n in name.split('-')]) def fun(m): van.model = m return van(u), van.derivM(u) print('Vangenuchten_k test m deriv: ', name) passed = checkDerivative( fun, x0, plotIt=False ) self.assertTrue(passed, True) if __name__ == '__main__': unittest.main()
27.663934
78
0.490667
754
6,750
4.309019
0.135279
0.053555
0.040628
0.054171
0.805479
0.764851
0.707602
0.680517
0.606648
0.603878
0
0.015737
0.378667
6,750
243
79
27.777778
0.758941
0
0
0.581152
0
0
0.050667
0
0
0
0
0
0.041885
1
0.062827
false
0.08377
0.036649
0
0.125654
0.036649
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
17a52e94c8e6800b3676f1a239c0da6d1c3d394c
163
py
Python
somework/mainapp/admin.py
XtremeGood/somework
52fa01d48538e32a8afb85f4ddbaadac3e3cd154
[ "Apache-2.0" ]
null
null
null
somework/mainapp/admin.py
XtremeGood/somework
52fa01d48538e32a8afb85f4ddbaadac3e3cd154
[ "Apache-2.0" ]
null
null
null
somework/mainapp/admin.py
XtremeGood/somework
52fa01d48538e32a8afb85f4ddbaadac3e3cd154
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Dematad , Demathol # Register your models here. admin.site.register(Dematad) admin.site.register(Demathol)
20.375
39
0.797546
22
163
5.909091
0.545455
0.138462
0.261538
0
0
0
0
0
0
0
0
0
0.122699
163
8
40
20.375
0.909091
0.159509
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
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
1
0
0
0
0
5
bd88a63df6aa5bbbb9977a5a3b802cd56934d7c0
130
py
Python
Code/YOLO/darkflow/darkflow/utils/process.py
kalvin-osoro/ml_project
bf0bdc5719f2712682dd070045a5f1edf933a0c4
[ "Apache-2.0" ]
null
null
null
Code/YOLO/darkflow/darkflow/utils/process.py
kalvin-osoro/ml_project
bf0bdc5719f2712682dd070045a5f1edf933a0c4
[ "Apache-2.0" ]
null
null
null
Code/YOLO/darkflow/darkflow/utils/process.py
kalvin-osoro/ml_project
bf0bdc5719f2712682dd070045a5f1edf933a0c4
[ "Apache-2.0" ]
null
null
null
version https://git-lfs.github.com/spec/v1 oid sha256:b7e8d585076c795bbcb5be78241001de3ba37c934f920b343400ff698eecaadd size 10049
32.5
75
0.884615
13
130
8.846154
1
0
0
0
0
0
0
0
0
0
0
0.379032
0.046154
130
3
76
43.333333
0.548387
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
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
1
0
0
0
1
0
0
0
0
0
0
0
0
5
bdbb40bbf8449770703931f37f387af247ea123f
237
py
Python
t/test_sample.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
14
2015-03-04T12:40:25.000Z
2021-07-07T04:06:09.000Z
t/test_sample.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
43
2015-01-27T13:52:39.000Z
2020-10-17T19:51:20.000Z
t/test_sample.py
texttheater/produce
202e3196daf7ac53c1998ac2ee9b0f8cbb1c6615
[ "MIT" ]
2
2015-11-23T08:59:07.000Z
2019-04-17T13:04:49.000Z
import prodtest class SampleTest(prodtest.ProduceTestCase): def test(self): self.assertDirectoryContents(['produce.ini']) self.produce('hello.txt') self.assertDirectoryContents(['produce.ini', 'hello.txt'])
26.333333
66
0.691983
23
237
7.130435
0.565217
0.329268
0.414634
0.45122
0
0
0
0
0
0
0
0
0.168776
237
8
67
29.625
0.832487
0
0
0
0
0
0.168776
0
0
0
0
0
0.333333
1
0.166667
false
0
0.166667
0
0.5
0
1
0
0
null
1
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
0
0
0
0
0
5
bdc1dbe4d021a56b569d6de452e28b8ea6e8107a
49
py
Python
dfetch/commands/__init__.py
Rohitth007/dfetch
947ba95e79451c8c7dc82eeb4e5b4b117addf7bd
[ "MIT" ]
11
2020-10-14T14:51:02.000Z
2022-02-07T18:40:43.000Z
dfetch/commands/__init__.py
Rohitth007/dfetch
947ba95e79451c8c7dc82eeb4e5b4b117addf7bd
[ "MIT" ]
138
2020-11-02T21:18:40.000Z
2022-03-31T20:44:08.000Z
dfetch/commands/__init__.py
Rohitth007/dfetch
947ba95e79451c8c7dc82eeb4e5b4b117addf7bd
[ "MIT" ]
5
2020-10-31T12:35:04.000Z
2022-01-27T12:51:55.000Z
"""Contains all commandline-related commands."""
24.5
48
0.755102
5
49
7.4
1
0
0
0
0
0
0
0
0
0
0
0
0.081633
49
1
49
49
0.822222
0.857143
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
da64f88e9e0d5e6369b2e3b6988ed606853a60ae
127
py
Python
backend/home/admin.py
crowdbotics-apps/nextwavecovidnews-28441
e05429721b6026b82c93e4c7df6c41d30e481d51
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/admin.py
crowdbotics-apps/nextwavecovidnews-28441
e05429721b6026b82c93e4c7df6c41d30e481d51
[ "FTL", "AML", "RSA-MD" ]
2
2021-07-04T22:30:11.000Z
2021-07-04T22:31:01.000Z
backend/home/admin.py
crowdbotics-apps/nextwavecovidnews-28441
e05429721b6026b82c93e4c7df6c41d30e481d51
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.contrib import admin from .models import CustomText admin.site.register(CustomText) # Register your models here.
18.142857
32
0.811024
17
127
6.058824
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.125984
127
6
33
21.166667
0.927928
0.204724
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
da861a020456d77788ee9757867f9b5acbe72d6b
48
py
Python
experiments/sql2nl/__init__.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
69
2021-04-14T06:35:07.000Z
2022-03-31T18:35:05.000Z
experiments/sql2nl/__init__.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
11
2021-04-16T11:16:04.000Z
2022-03-22T21:21:29.000Z
experiments/sql2nl/__init__.py
chenyangh/tensor2struct-public
d3257cba6d76d3c658a58a78f687d986bdc755cf
[ "MIT" ]
18
2021-04-14T07:19:56.000Z
2022-03-23T19:26:18.000Z
# from experiments.sql2nl import data_scheduler
24
47
0.854167
6
48
6.666667
1
0
0
0
0
0
0
0
0
0
0
0.023256
0.104167
48
1
48
48
0.906977
0.9375
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
e5aeb3d28c03746c6d0e3ecc201c9c2b64aaf2e9
3,200
py
Python
pirates/leveleditor/worldData/VolcanoSmallIsland.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
3
2021-02-25T06:38:13.000Z
2022-03-22T07:00:15.000Z
pirates/leveleditor/worldData/VolcanoSmallIsland.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
null
null
null
pirates/leveleditor/worldData/VolcanoSmallIsland.py
itsyaboyrocket/pirates
6ca1e7d571c670b0d976f65e608235707b5737e3
[ "BSD-3-Clause" ]
1
2021-02-25T06:38:17.000Z
2021-02-25T06:38:17.000Z
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: pirates.leveleditor.worldData.VolcanoSmallIsland from pandac.PandaModules import Point3, VBase3 objectStruct = {'Objects': {'1141153785.89sdnaik': {'Type': 'Island', 'Name': 'VolcanoSmallIsland', 'Objects': {'1141154634.53sdnaik': {'Type': 'Rock', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-1048.453, 118.341, 38.314), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/zz_dont_use_rocks_LT_group_1F'}}, '1141154639.13sdnaik': {'Type': 'Rock', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-1053.665, 151.9, 37.458), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/zz_dont_use_rock_Dk_1F'}}, '1141154653.08sdnaik': {'Type': 'Rock', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-1127.113, 128.661, 34.376), 'Scale': VBase3(1.0, 1.0, 1.0), 'Visual': {'Model': 'models/props/zz_dont_use_rock_Dk_1F'}}, '1141154674.09sdnaik': {'Type': 'Tree - Animated', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-1085.864, 144.671, 36.053), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': [{'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}], 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1141154679.2sdnaik': {'Type': 'Tree - Animated', 'Animate': 'models/vegetation/palm_trunk_a_idle', 'Hpr': VBase3(-40.642, 0.0, 0.0), 'Pos': Point3(-1093.491, 148.268, 35.624), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': [{'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}], 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_a_hi', 'PartName': 'trunk'}}, '1141154683.27sdnaik': {'Type': 'Tree - Animated', 'Animate': 'models/vegetation/palm_trunk_a_idle', 'Hpr': Point3(0.0, 0.0, 0.0), 'Pos': Point3(-1086.865, 135.491, 36.172), 'Scale': VBase3(1.0, 1.0, 1.0), 'SubObjs': [{'Visual': {'Animate': 'models/vegetation/palm_leaf_a_idle', 'Attach': ['trunk', 'def_trunk_attach'], 'Model': 'models/vegetation/palm_leaf_a_hi', 'PartName': 'leaf'}}], 'Visual': {'Animate': 'models/vegetation/palm_trunk_a_idle', 'Model': 'models/vegetation/palm_trunk_b_hi', 'PartName': 'trunk'}}}}}, 'Node Links': [], 'Layers': {}, 'ObjectIds': {'1141153785.89sdnaik': '["Objects"]["1141153785.89sdnaik"]', '1141154634.53sdnaik': '["Objects"]["1141153785.89sdnaik"]["Objects"]["1141154634.53sdnaik"]', '1141154639.13sdnaik': '["Objects"]["1141153785.89sdnaik"]["Objects"]["1141154639.13sdnaik"]', '1141154653.08sdnaik': '["Objects"]["1141153785.89sdnaik"]["Objects"]["1141154653.08sdnaik"]', '1141154674.09sdnaik': '["Objects"]["1141153785.89sdnaik"]["Objects"]["1141154674.09sdnaik"]', '1141154679.2sdnaik': '["Objects"]["1141153785.89sdnaik"]["Objects"]["1141154679.2sdnaik"]', '1141154683.27sdnaik': '["Objects"]["1141153785.89sdnaik"]["Objects"]["1141154683.27sdnaik"]'}}
533.333333
2,920
0.680938
447
3,200
4.731544
0.288591
0.026478
0.031206
0.03026
0.511584
0.511584
0.505437
0.505437
0.505437
0.505437
0
0.191597
0.070313
3,200
6
2,920
533.333333
0.519328
0.07
0
0
0
0
0.618775
0.344886
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
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
1
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
e5f035049beb0fdfb0917f12457b94e6615d1661
1,501
py
Python
rvpvp/isa/rvv/vwxxx_wv.py
ultrafive/riscv-pvp
843e38422c3d545352b955764927d5e7847e5453
[ "Unlicense" ]
5
2021-05-10T09:57:00.000Z
2021-10-05T14:39:20.000Z
rvpvp/isa/rvv/vwxxx_wv.py
ultrafive/riscv-pvp
843e38422c3d545352b955764927d5e7847e5453
[ "Unlicense" ]
null
null
null
rvpvp/isa/rvv/vwxxx_wv.py
ultrafive/riscv-pvp
843e38422c3d545352b955764927d5e7847e5453
[ "Unlicense" ]
1
2021-05-14T20:24:11.000Z
2021-05-14T20:24:11.000Z
from ...isa.inst import * import numpy as np class Vwadd_wv(Inst): name = 'vwadd.wv' # vwadd.wv vd, vs2, vs1, vm def golden(self): if self['vl']==0: return self['ori'] result = self['ori'].copy() maskflag = 1 if 'mask' in self else 0 vstart = self['vstart'] if 'vstart' in self else 0 if self['vs2'].dtype == self['vs1'].dtype: self['vs1'].dtype = self.intdtype() for ii in range(vstart, self['vl']): if (maskflag == 0) or (maskflag == 1 and np.unpackbits(self['mask'], bitorder='little')[ii] ): result[ii] = self['vs2'][ii].astype(object) + self['vs1'][ii]#.astype(intdtype(self['sew'])) return result class Vwaddu_wv(Vwadd_wv): name = 'vwaddu.wv' class Vwsub_wv(Inst): name = 'vwsub.wv' # vwsub.wv vd, vs2, vs1, vm def golden(self): if self['vl']==0: return self['ori'] result = self['ori'].copy() maskflag = 1 if 'mask' in self else 0 vstart = self['vstart'] if 'vstart' in self else 0 if self['vs2'].dtype == self['vs1'].dtype: self['vs1'].dtype = self.uintdtype() for ii in range(vstart, self['vl']): if (maskflag == 0) or (maskflag == 1 and np.unpackbits(self['mask'], bitorder='little')[ii] ): result[ii] = self['vs2'][ii].astype(object) - self['vs1'][ii] return result class Vwsubu_wv(Vwsub_wv): name = 'vwsubu.wv'
35.738095
109
0.538308
206
1,501
3.893204
0.23301
0.067332
0.049875
0.054863
0.723192
0.723192
0.723192
0.723192
0.723192
0.723192
0
0.024367
0.289141
1,501
41
110
36.609756
0.727273
0.055296
0
0.588235
0
0
0.096249
0
0
0
0
0
0
1
0.058824
false
0
0.058824
0
0.470588
0
0
0
0
null
0
0
0
0
1
1
1
1
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
5
006649073e8f0e0fe171e207cb3f6bf627350050
36
py
Python
brigadier/exceptions/command_expection.py
NickNackGus/brigadier.py
43b315446711af3e313bdbb4b0b13a75f6f3a19e
[ "MIT" ]
null
null
null
brigadier/exceptions/command_expection.py
NickNackGus/brigadier.py
43b315446711af3e313bdbb4b0b13a75f6f3a19e
[ "MIT" ]
1
2020-11-03T00:20:41.000Z
2020-11-04T06:16:16.000Z
brigadier/exceptions/command_expection.py
NickNackGus/brigadier.py
43b315446711af3e313bdbb4b0b13a75f6f3a19e
[ "MIT" ]
1
2020-11-02T23:55:34.000Z
2020-11-02T23:55:34.000Z
class CommandExceptionType: pass
18
27
0.805556
3
36
9.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
36
2
28
18
0.966667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
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
1
0
0
0
0
0
5
0094fea6d8745b7596d268d4df581034d2d69e46
4,145
py
Python
tests/test_postgres.py
CalgaryMichael/branchdb-python
77b467105cdcaa7346c19c3882f05d85bc238268
[ "MIT" ]
null
null
null
tests/test_postgres.py
CalgaryMichael/branchdb-python
77b467105cdcaa7346c19c3882f05d85bc238268
[ "MIT" ]
null
null
null
tests/test_postgres.py
CalgaryMichael/branchdb-python
77b467105cdcaa7346c19c3882f05d85bc238268
[ "MIT" ]
null
null
null
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import pytest import mock from psycopg2.sql import Composed, Identifier, SQL from branchdb.errors import DatabaseError from branchdb.engines.postgres import postgres_engine, PostgresEngine from .mocking import mock_postgres_cursor, MockConnection def test_all_databases(): engine = PostgresEngine() with mock.patch.object(engine, "get_cursor") as mock_cursor: mock_cursor.return_value.__enter__ = mock_postgres_cursor([["db1"], ["db2"]]) result = engine.all_databases() assert result == ["db1", "db2"] @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine._execute") @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine.database_exists") def test_create_database(mock_exists, mock_execute): mock_exists.return_value = False engine = PostgresEngine() engine.connection = MockConnection() with mock.patch.object(engine, "get_cursor") as mock_cursor: cursor = mock_postgres_cursor() mock_cursor.return_value.__enter__ = cursor result = engine.create_database("jazz", template=None) composed_create = Composed([ SQL("CREATE DATABASE "), Identifier("jazz"), SQL("\n")]) mock_execute.assert_any_call(mock.ANY, composed_create) composed_grant = Composed([ SQL("GRANT ALL PRIVILEGES ON DATABASE "), Identifier("jazz"), SQL(" TO "), Identifier("user"), SQL("\n")]) mock_execute.assert_any_call(mock.ANY, composed_grant) assert result is True @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine._execute") @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine.database_exists") def test_create_database__with_template(mock_exists, mock_execute): mock_exists.return_value = False engine = PostgresEngine() engine.connection = MockConnection() with mock.patch.object(engine, "get_cursor") as mock_cursor: cursor = mock_postgres_cursor() mock_cursor.return_value.__enter__ = cursor result = engine.create_database("jazz2", template="jazz1") composed_create = Composed([ SQL("CREATE DATABASE "), Identifier("jazz2"), SQL(" TEMPLATE "), Identifier("jazz1"), SQL("\n")]) mock_execute.assert_any_call(mock.ANY, composed_create) composed_grant = Composed([ SQL("GRANT ALL PRIVILEGES ON DATABASE "), Identifier("jazz2"), SQL(" TO "), Identifier("user"), SQL("\n")]) mock_execute.assert_any_call(mock.ANY, composed_grant) assert result is True @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine.database_exists") def test_create_database__existing(mock_exists): mock_exists.return_value = True engine = PostgresEngine() with pytest.raises(DatabaseError, match="Database 'jazz' already exists."): engine.create_database("jazz") @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine._execute") @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine.database_exists") def test_delete_database(mock_exists, mock_execute): mock_exists.return_value = True engine = PostgresEngine() engine.connection = MockConnection() with mock.patch.object(engine, "get_cursor") as mock_cursor: cursor = mock_postgres_cursor() mock_cursor.return_value.__enter__ = cursor result = engine.delete_database("jazz") composed_delete = Composed([ SQL("DROP DATABASE "), Identifier("jazz"), SQL("\n")]) mock_execute.assert_any_call(mock.ANY, composed_delete) assert result is True @mock.patch("branchdb.engines.postgres.postgres_engine.PostgresEngine.database_exists") def test_delete_database__existing(mock_exists): mock_exists.return_value = False engine = PostgresEngine() with pytest.raises(DatabaseError, match="Database 'jazz' does not exist."): engine.delete_database("jazz")
36.043478
87
0.724246
479
4,145
5.962422
0.154489
0.105042
0.072479
0.067227
0.771709
0.771709
0.762605
0.730042
0.702731
0.641807
0
0.003186
0.166948
4,145
114
88
36.359649
0.823921
0.002895
0
0.663043
0
0
0.210603
0.13435
0
0
0
0
0.097826
1
0.065217
false
0
0.108696
0
0.173913
0.01087
0
0
0
null
0
0
0
0
1
1
1
1
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
5
00b533a9f58a56f599ac3b416131477a9574518e
213
py
Python
pypga/core/__init__.py
lneuhaus/pypga
836932e4a5abbc9d52eb824b446f176af65485c0
[ "MIT" ]
1
2021-04-25T08:06:09.000Z
2021-04-25T08:06:09.000Z
pypga/core/__init__.py
lneuhaus/pypga
836932e4a5abbc9d52eb824b446f176af65485c0
[ "MIT" ]
null
null
null
pypga/core/__init__.py
lneuhaus/pypga
836932e4a5abbc9d52eb824b446f176af65485c0
[ "MIT" ]
null
null
null
from .logic_function import logic, is_logic from .register import Register from .module import Module, TopModule from .migen import MigenModule from .common import CustomizableMixin from .settings import settings
30.428571
43
0.840376
28
213
6.321429
0.464286
0
0
0
0
0
0
0
0
0
0
0
0.122066
213
6
44
35.5
0.946524
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
1
0
0
5
00d1a9a1a0914723472eccb299025eb1d851a2b3
239
py
Python
ml/knn/run.py
maxis1314/pyutils
7e0666c650209155b3da186d09c54cf14825df1e
[ "Apache-2.0" ]
2
2017-06-12T07:58:51.000Z
2018-03-08T09:43:35.000Z
ml/knn/run.py
maxis1314/pyutils
7e0666c650209155b3da186d09c54cf14825df1e
[ "Apache-2.0" ]
1
2017-06-10T02:05:52.000Z
2017-07-04T03:57:28.000Z
ml/knn/run.py
maxis1314/pyutils
7e0666c650209155b3da186d09c54cf14825df1e
[ "Apache-2.0" ]
null
null
null
#encoding=utf-8 import sys from numpy import * import kNN #datingDataMat,datingLabels = kNN.file2matrix('thefile.csv','\t') #print datingDataMat #bayes.testingNB2(datingDataMat,datingLabels) kNN.commonClassTest('input.csv','\t',0.2);
17.071429
65
0.761506
30
239
6.066667
0.7
0.274725
0.307692
0
0
0
0
0
0
0
0
0.022936
0.087866
239
13
66
18.384615
0.811927
0.589958
0
0
0
0
0.117021
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
dadac72e7a58cd6e599ea8dadbb766a9021c30a9
44
py
Python
src/mixt/scripts/__init__.py
adrienbrunet/mixt
d725ec752ce430d135e993bc988bfdf2b8457c4b
[ "MIT" ]
27
2018-06-04T19:11:42.000Z
2022-02-23T22:46:39.000Z
src/mixt/scripts/__init__.py
adrienbrunet/mixt
d725ec752ce430d135e993bc988bfdf2b8457c4b
[ "MIT" ]
7
2018-06-09T15:27:51.000Z
2021-03-11T20:00:35.000Z
src/mixt/scripts/__init__.py
adrienbrunet/mixt
d725ec752ce430d135e993bc988bfdf2b8457c4b
[ "MIT" ]
3
2018-07-29T10:20:02.000Z
2021-11-18T19:55:07.000Z
"""Home for scripts of the mixt project."""
22
43
0.681818
7
44
4.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.159091
44
1
44
44
0.810811
0.840909
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
daf3b659ba59d5d6db45266d2aa72aa4d6b41182
1,093
py
Python
test/test_change_requests_page.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
test/test_change_requests_page.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
test/test_change_requests_page.py
CiscoDevNet/python-msx-sdk
d7e0a08c656504b4f4551d263e67c671a2a04b3f
[ "MIT" ]
null
null
null
""" MSX SDK MSX SDK client. # noqa: E501 The version of the OpenAPI document: 1.0.9 Generated by: https://openapi-generator.tech """ import sys import unittest import python_msx_sdk from python_msx_sdk.model.change_request_summary import ChangeRequestSummary from python_msx_sdk.model.change_requests_page_all_of import ChangeRequestsPageAllOf from python_msx_sdk.model.page_header import PageHeader globals()['ChangeRequestSummary'] = ChangeRequestSummary globals()['ChangeRequestsPageAllOf'] = ChangeRequestsPageAllOf globals()['PageHeader'] = PageHeader from python_msx_sdk.model.change_requests_page import ChangeRequestsPage class TestChangeRequestsPage(unittest.TestCase): """ChangeRequestsPage unit test stubs""" def setUp(self): pass def tearDown(self): pass def testChangeRequestsPage(self): """Test ChangeRequestsPage""" # FIXME: construct object with mandatory attributes with example values # model = ChangeRequestsPage() # noqa: E501 pass if __name__ == '__main__': unittest.main()
26.02381
84
0.747484
120
1,093
6.583333
0.483333
0.053165
0.075949
0.081013
0.159494
0.132911
0.098734
0.098734
0
0
0
0.009945
0.172004
1,093
41
85
26.658537
0.862983
0.273559
0
0.157895
1
0
0.080475
0.030343
0
0
0
0.02439
0
1
0.157895
false
0.157895
0.368421
0
0.578947
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
1
0
0
0
0
1
1
0
1
0
0
5
daf43177d133abda2451ec532e44d048c554ca90
305
py
Python
src/config.py
bgalde-dev/dinism
a8c5c85b446c38f5146766be09e7d4d939c9cf29
[ "MIT" ]
null
null
null
src/config.py
bgalde-dev/dinism
a8c5c85b446c38f5146766be09e7d4d939c9cf29
[ "MIT" ]
null
null
null
src/config.py
bgalde-dev/dinism
a8c5c85b446c38f5146766be09e7d4d939c9cf29
[ "MIT" ]
null
null
null
sql_conn="Driver={SQL Server};Server=nhl-db.chuct8n1xntr.us-west-1.rds.amazonaws.com;Database=nhl_db;uid=admin;pwd=hd##WWWWRY77" # IF USING LOCAL HOST THE CONNECTION STRING WILL BE AS FOLLOWS pg_username="admin" pg_password="hd##WWWWRY77" # The name of the database you are connecting to db_name="nhl_db"
43.571429
128
0.790164
54
305
4.351852
0.722222
0.06383
0
0
0
0
0
0
0
0
0
0.02518
0.088525
305
6
129
50.833333
0.820144
0.35082
0
0
0
0.25
0.717949
0.538462
0
0
0
0
0
1
0
false
0.25
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
1
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
97010aec1a2a1aa487a12637dda6e0a08d9f18c3
24
py
Python
archive/tkgl.py
HackerDaGreat57/mcpy
959c3180c724ab2039d4bd98d0a8f0fae30b6b3c
[ "MIT" ]
1
2021-06-09T02:53:33.000Z
2021-06-09T02:53:33.000Z
archive/tkgl.py
HackerDaGreat57/mcpy
959c3180c724ab2039d4bd98d0a8f0fae30b6b3c
[ "MIT" ]
1
2021-06-09T03:02:42.000Z
2022-01-03T02:15:11.000Z
archive/tkgl.py
HackerDaGreat57/mcpy
959c3180c724ab2039d4bd98d0a8f0fae30b6b3c
[ "MIT" ]
null
null
null
from OpenGL.Tk import *
12
23
0.75
4
24
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
24
1
24
24
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
0
0
0
5
9709a66bdede4ace286bd4a888ae8f6a77e86d08
511
py
Python
Teacher/DigitalHistory/Assignments_To_Be_Graded/016993270/Week_Two/Now_Try_This/1.py
ShayanRiyaz/BitUGrading
ecc069de292d371cf6805df70be94408d5c7894b
[ "MIT" ]
null
null
null
Teacher/DigitalHistory/Assignments_To_Be_Graded/016993270/Week_Two/Now_Try_This/1.py
ShayanRiyaz/BitUGrading
ecc069de292d371cf6805df70be94408d5c7894b
[ "MIT" ]
null
null
null
Teacher/DigitalHistory/Assignments_To_Be_Graded/016993270/Week_Two/Now_Try_This/1.py
ShayanRiyaz/BitUGrading
ecc069de292d371cf6805df70be94408d5c7894b
[ "MIT" ]
null
null
null
# Please note that if you uncomment and press multiple times, the program will keep appending to the file. s = 'Amsterdam' # Print out 'e' using indexing answer1 = s[2] print(answer1)# Please note that if you uncomment and press multiple times, the program will keep appending to the file. s ='Amsterdam' # Reverse the string using slicing answer2 = s[1] print(answer2)# Please note that if you uncomment and press multiple times, the program will keep appending to the file. answer3 = s[::-1] print(answer3)
36.5
120
0.759295
83
511
4.674699
0.385542
0.07732
0.108247
0.123711
0.708763
0.708763
0.708763
0.708763
0.708763
0.708763
0
0.021176
0.168297
511
14
121
36.5
0.891765
0.735812
0
0.25
0
0
0.138462
0
0
0
0
0
0
1
0
false
0
0
0
0
0.375
0
0
0
null
0
0
0
0
1
1
1
1
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
5
970a28ba60acad15c1a4daf73644b07d7d7c5bc4
6,195
py
Python
search/tests.py
kimyou7/ParkGoGreen
a0b21210823d711af56d76226919950aa01a2b92
[ "MIT" ]
null
null
null
search/tests.py
kimyou7/ParkGoGreen
a0b21210823d711af56d76226919950aa01a2b92
[ "MIT" ]
null
null
null
search/tests.py
kimyou7/ParkGoGreen
a0b21210823d711af56d76226919950aa01a2b92
[ "MIT" ]
null
null
null
""" tests.py Automated tests that are written here are run with the manage.py test command. Included is an automated Selenium test written by Jaimes Subroto. """ from django.test import TestCase # Create your tests here. # -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException import unittest, time, re chromedriver_path = '<C:/YOUR/chromedriver.exe_path>' class ChromePark(unittest.TestCase): def setUp(self): # self.driver = webdriver.Firefox() self.driver = webdriver.Chrome(chromedriver_path) self.driver.implicitly_wait(30) self.base_url = "https://www.katalon.com/" self.verificationErrors = [] self.accept_next_alert = True def test_chrome_park(self): driver = self.driver driver.get("http://35.230.88.48/") driver.find_element_by_name("q").clear() driver.find_element_by_name("q").send_keys("head") driver.find_element_by_name("q").send_keys(Keys.ENTER) self.assertEqual("Heron's Head Park", driver.find_element_by_xpath("//div/div[2]/p/strong").text) self.assertEqual("April 24, 2018, 9:52 a.m.", driver.find_element_by_xpath("//div/div[2]/p[2]/strong").text) self.assertEqual("Bathroom", driver.find_element_by_xpath("//p[3]/strong").text) self.assertEqual("Weird toilet signs", driver.find_element_by_xpath("//p[4]/strong").text) self.assertEqual("Park: Heron's Head Park", driver.find_element_by_xpath("//div[2]/div[2]/p").text) self.assertEqual("Date: April 24, 2018, 9:56 a.m.", driver.find_element_by_xpath("//div[2]/div[2]/p[2]").text) self.assertEqual("Category: Medical Waste", driver.find_element_by_xpath("//div[2]/div[2]/p[3]").text) self.assertEqual("Issue: Park is entirely giant pills", driver.find_element_by_xpath("//div[2]/div[2]/p[4]").text) def is_element_present(self, how, what): try: self.driver.find_element(by=how, value=what) except NoSuchElementException as e: return False return True def is_alert_present(self): try: self.driver.switch_to_alert() except NoAlertPresentException as e: return False return True def close_alert_and_get_its_text(self): try: alert = self.driver.switch_to_alert() alert_text = alert.text if self.accept_next_alert: alert.accept() else: alert.dismiss() return alert_text finally: self.accept_next_alert = True def tearDown(self): self.driver.quit() self.assertEqual([], self.verificationErrors) if __name__ == "__main__": unittest.main() class ChromeInvalid(unittest.TestCase): def setUp(self): self.driver = webdriver.Chrome(chromedriver_path) self.driver.implicitly_wait(30) self.base_url = "https://www.katalon.com/" self.verificationErrors = [] self.accept_next_alert = True def test_chrome_invalid(self): driver = self.driver driver.get("http://35.230.88.48/") driver.find_element_by_name("q").clear() driver.find_element_by_name("q").send_keys("-1234") driver.find_element_by_name("q").send_keys(Keys.ENTER) self.assertEqual("Please enter alphanumeric characters only. Search either by zip code or park name.", driver.find_element_by_xpath("//p[3]").text) def is_element_present(self, how, what): try: self.driver.find_element(by=how, value=what) except NoSuchElementException as e: return False return True def is_alert_present(self): try: self.driver.switch_to_alert() except NoAlertPresentException as e: return False return True def close_alert_and_get_its_text(self): try: alert = self.driver.switch_to_alert() alert_text = alert.text if self.accept_next_alert: alert.accept() else: alert.dismiss() return alert_text finally: self.accept_next_alert = True def tearDown(self): self.driver.quit() self.assertEqual([], self.verificationErrors) if __name__ == "__main__": unittest.main() class ChromeSimilar(unittest.TestCase): def setUp(self): self.driver = webdriver.Chrome(chromedriver_path) self.driver.implicitly_wait(30) self.base_url = "https://www.katalon.com/" self.verificationErrors = [] self.accept_next_alert = True def test_chrome_similar(self): driver = self.driver driver.get("http://35.230.88.48/") Select(driver.find_element_by_name("dropdown")).select_by_visible_text("Bathroom") driver.find_element_by_name("q").clear() driver.find_element_by_name("q").send_keys("94110") driver.find_element_by_name("q").send_keys(Keys.ENTER) self.assertEqual("No parks matched your zip code, here are reports that share the bathroom category.", driver.find_element_by_xpath("//div[1]/p[2]").text) def is_element_present(self, how, what): try: self.driver.find_element(by=how, value=what) except NoSuchElementException as e: return False return True def is_alert_present(self): try: self.driver.switch_to_alert() except NoAlertPresentException as e: return False return True def close_alert_and_get_its_text(self): try: alert = self.driver.switch_to_alert() alert_text = alert.text if self.accept_next_alert: alert.accept() else: alert.dismiss() return alert_text finally: self.accept_next_alert = True def tearDown(self): self.driver.quit() self.assertEqual([], self.verificationErrors) if __name__ == "__main__": unittest.main()
37.77439
162
0.656497
799
6,195
4.869837
0.197747
0.064251
0.100488
0.11231
0.756361
0.728861
0.715497
0.702133
0.689026
0.679517
0
0.01674
0.228571
6,195
163
163
38.006135
0.797447
0.038095
0
0.773438
0
0
0.123886
0.012775
0
0
0
0
0.101563
1
0.140625
false
0
0.0625
0
0.296875
0
0
0
0
null
0
0
0
0
1
1
1
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
0
0
0
0
0
0
5
9731da18e66cff2d06671b3b61678d8c2be506fc
46
py
Python
pretrained-model/fastformer/fast_transformer/__init__.py
AetherPrior/malaya
45d37b171dff9e92c5d30bd7260b282cd0912a7d
[ "MIT" ]
88
2021-01-06T10:01:31.000Z
2022-03-30T17:34:09.000Z
pretrained-model/fastformer/fast_transformer/__init__.py
AetherPrior/malaya
45d37b171dff9e92c5d30bd7260b282cd0912a7d
[ "MIT" ]
43
2021-01-14T02:44:41.000Z
2022-03-31T19:47:42.000Z
pretrained-model/fastformer/fast_transformer/__init__.py
AetherPrior/malaya
45d37b171dff9e92c5d30bd7260b282cd0912a7d
[ "MIT" ]
38
2021-01-06T07:15:03.000Z
2022-03-19T05:07:50.000Z
from .fast_transformer import FastTransformer
23
45
0.891304
5
46
8
1
0
0
0
0
0
0
0
0
0
0
0
0.086957
46
1
46
46
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
0
0
0
5
97326bd9cf004152e2b90dbd7493f8fe7913a577
94
py
Python
fun.py
henrik2706/cli
5a21278eb323a9fe54fd48dbba827e7a923fc443
[ "MIT" ]
null
null
null
fun.py
henrik2706/cli
5a21278eb323a9fe54fd48dbba827e7a923fc443
[ "MIT" ]
null
null
null
fun.py
henrik2706/cli
5a21278eb323a9fe54fd48dbba827e7a923fc443
[ "MIT" ]
null
null
null
print("Her kommer en vits") print("Katta med slips") print("Det var en vits") print("hei")
11.75
27
0.670213
16
94
3.9375
0.6875
0.190476
0.349206
0
0
0
0
0
0
0
0
0
0.159574
94
7
28
13.428571
0.797468
0
0
0
0
0
0.548387
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
1
0
0
0
0
1
0
5
9739e144ab1182beb89d2e994758e697a485090a
60
py
Python
dragonfire/sr/__init__.py
Pavan77750/Dragonfire
902240dff586ce38a8ca779b5e587959206b83f9
[ "MIT" ]
1
2018-08-27T11:49:35.000Z
2018-08-27T11:49:35.000Z
dragonfire/sr/__init__.py
Pavan77750/Dragonfire
902240dff586ce38a8ca779b5e587959206b83f9
[ "MIT" ]
null
null
null
dragonfire/sr/__init__.py
Pavan77750/Dragonfire
902240dff586ce38a8ca779b5e587959206b83f9
[ "MIT" ]
null
null
null
from __future__ import absolute_import from .kaldi import *
20
38
0.833333
8
60
5.625
0.625
0
0
0
0
0
0
0
0
0
0
0
0.133333
60
2
39
30
0.865385
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
1
0
0
5
9740c967b2c69d58e0b5caae3b1f1f7522810c13
80
py
Python
session_server/services/ai_service.py
w359405949/browserquest_py
20c2569431db9dca74a986efa9bc0ce69ed5a8fc
[ "WTFPL" ]
1
2019-03-27T07:46:15.000Z
2019-03-27T07:46:15.000Z
session_server/services/ai_service.py
w359405949/browserquest_py
20c2569431db9dca74a986efa9bc0ce69ed5a8fc
[ "WTFPL" ]
null
null
null
session_server/services/ai_service.py
w359405949/browserquest_py
20c2569431db9dca74a986efa9bc0ce69ed5a8fc
[ "WTFPL" ]
null
null
null
from ai_service_pb2 import AIService class AIServiceImpl(AIService): pass
13.333333
36
0.8
10
80
6.2
0.9
0
0
0
0
0
0
0
0
0
0
0.014925
0.1625
80
5
37
16
0.910448
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
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
1
1
1
0
0
0
0
5
9750027f2189b052a5f13caa8a7762774b3d563b
112
py
Python
dataprocessing/__init__.py
swip3798/TankDB
78646d476dde86bfc9e70f6860d40f83652d7501
[ "MIT" ]
null
null
null
dataprocessing/__init__.py
swip3798/TankDB
78646d476dde86bfc9e70f6860d40f83652d7501
[ "MIT" ]
null
null
null
dataprocessing/__init__.py
swip3798/TankDB
78646d476dde86bfc9e70f6860d40f83652d7501
[ "MIT" ]
null
null
null
from .csv_import import get_prices_by_date, get_stations_by_date from .data_manager import DataManager, FuelType
56
64
0.883929
18
112
5.055556
0.666667
0.131868
0
0
0
0
0
0
0
0
0
0
0.080357
112
2
65
56
0.883495
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
1
0
0
5
97b0a01bd72483b73c4f27f94b36711edc3e5b08
164
py
Python
tests/marker.py
nryotaro/han
ed78f6772f4bf6923d9a3f52dbcc8a55e757631b
[ "MIT" ]
null
null
null
tests/marker.py
nryotaro/han
ed78f6772f4bf6923d9a3f52dbcc8a55e757631b
[ "MIT" ]
null
null
null
tests/marker.py
nryotaro/han
ed78f6772f4bf6923d9a3f52dbcc8a55e757631b
[ "MIT" ]
null
null
null
"""Provide the flag that run integration tests.""" import os run_integration_tests: bool = os.getenv("HAN_TEST_ALL") is not None skip_reason = "Take much time."
20.5
67
0.743902
26
164
4.5
0.846154
0.239316
0.324786
0
0
0
0
0
0
0
0
0
0.146341
164
7
68
23.428571
0.835714
0.268293
0
0
0
0
0.236842
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
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
1
0
0
0
0
5
8adb2702d684089a281eb32326caf55f8382f954
1,079
py
Python
models/__init__.py
rmarcacini/LC-ABSA
90ae7f41b3766761005caf015292926127fe3949
[ "MIT" ]
1
2021-08-12T07:20:41.000Z
2021-08-12T07:20:41.000Z
models/__init__.py
rmarcacini/LC-ABSA
90ae7f41b3766761005caf015292926127fe3949
[ "MIT" ]
null
null
null
models/__init__.py
rmarcacini/LC-ABSA
90ae7f41b3766761005caf015292926127fe3949
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # file: __init__.py # author: yangheng <yangheng@m.scnu.edu.cn> # Copyright (C) 2019. All Rights Reserved. # LC-APC # Most of the following models are easy to adapted to target-level tasks. from models.lc_apc.bert_spc import BERT_SPC from models.lc_apc.bert_base import BERT_BASE from models.lc_apc.lcf_glove import LCF_GLOVE from models.lc_apc.lcf_bert import LCF_BERT from models.lc_apc.lca_lstm import LCA_LSTM from models.lc_apc.lca_glove import LCA_GLOVE from models.lc_apc.lca_bert import LCA_BERT from models.lc_apc.hlcf_glove import HLCF_GLOVE from models.lc_apc.hlcf_bert import HLCF_BERT # APC from models.apc.lstm import LSTM from models.apc.ian import IAN from models.apc.memnet import MemNet from models.apc.ram import RAM from models.apc.td_lstm import TD_LSTM from models.apc.tc_lstm import TC_LSTM from models.apc.cabasc import Cabasc from models.apc.atae_lstm import ATAE_LSTM from models.apc.tnet_lf import TNet_LF from models.apc.aoa import AOA from models.apc.mgan import MGAN # ATEPC from models.lc_atepc.lcf_atepc import LCF_ATEPC
33.71875
73
0.816497
200
1,079
4.195
0.27
0.250298
0.170441
0.160906
0.225268
0
0
0
0
0
0
0.005236
0.114921
1,079
32
74
33.71875
0.873298
0.195551
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
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
5
c10345721da2973eb56c76eaa510bf4b78ce0cab
116
py
Python
Assignments/Modules/Lab/02. ASCII Art.py
KaloyankerR/python-advanced-repository
711672d0f033a5adffc3ca689d02d2a7a9a26bfb
[ "MIT" ]
null
null
null
Assignments/Modules/Lab/02. ASCII Art.py
KaloyankerR/python-advanced-repository
711672d0f033a5adffc3ca689d02d2a7a9a26bfb
[ "MIT" ]
null
null
null
Assignments/Modules/Lab/02. ASCII Art.py
KaloyankerR/python-advanced-repository
711672d0f033a5adffc3ca689d02d2a7a9a26bfb
[ "MIT" ]
null
null
null
from pyfiglet import figlet_format def draw_figure(txt): print(figlet_format(txt)) draw_figure(txt=input())
12.888889
34
0.758621
17
116
4.941176
0.647059
0.285714
0.309524
0
0
0
0
0
0
0
0
0
0.137931
116
8
35
14.5
0.84
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0.25
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
1
0
0
0
0
0
0
0
5
c12038fdb8fbd9ad873f4d44a6cffb0125e6af8a
305
py
Python
health/health_app/views.py
oxhagolli/k8s-health
1e855672c2ef8760ef61fbcc746ffdbd91362ab7
[ "MIT" ]
null
null
null
health/health_app/views.py
oxhagolli/k8s-health
1e855672c2ef8760ef61fbcc746ffdbd91362ab7
[ "MIT" ]
null
null
null
health/health_app/views.py
oxhagolli/k8s-health
1e855672c2ef8760ef61fbcc746ffdbd91362ab7
[ "MIT" ]
null
null
null
from .main import app from .constants import HOME_TEMPLATE, StatusCode from flask import render_template @app.route("/") def home(): try: return render_template(HOME_TEMPLATE, status_code=StatusCode.OK) except: return render_template(HOME_TEMPLATE, status_code=StatusCode.ERROR)
25.416667
75
0.754098
39
305
5.692308
0.487179
0.162162
0.18018
0.216216
0.468468
0.468468
0.468468
0.468468
0
0
0
0
0.163934
305
11
76
27.727273
0.870588
0
0
0
0
0
0.003279
0
0
0
0
0
0
1
0.111111
true
0
0.333333
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c1335954c95f7cef5f08fd4b63576801bd7fe88d
159
py
Python
Assignments/2.2/D2.py
cRohda/Comp-Sci
07e36fdcca242f5aa4f3e11440e9c77616973031
[ "Apache-2.0" ]
null
null
null
Assignments/2.2/D2.py
cRohda/Comp-Sci
07e36fdcca242f5aa4f3e11440e9c77616973031
[ "Apache-2.0" ]
null
null
null
Assignments/2.2/D2.py
cRohda/Comp-Sci
07e36fdcca242f5aa4f3e11440e9c77616973031
[ "Apache-2.0" ]
null
null
null
my_string = "incredible" # Create string variable print(my_string[-6]) # Prints the first e (index -6) print(my_string[-1]) # Prints the second e (index -1)
53
54
0.704403
26
159
4.192308
0.538462
0.220183
0.238532
0
0
0
0
0
0
0
0
0.029851
0.157233
159
3
54
53
0.783582
0.522013
0
0
0
0
0.136986
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
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
1
0
5
c13f034cda554fd93845980c4d5b83aa5be50b20
72
py
Python
sdl2/test/__init__.py
papagiannakis/py-sdl2
c8ff267761ce19d7714e72a4a3eb97a375c06fc6
[ "CC0-1.0" ]
222
2017-08-19T00:51:59.000Z
2022-02-05T19:39:33.000Z
sdl2/test/__init__.py
Sahil-pixel/py-sdl2
e5c8cbaccfda4f20f35f58bc8d00e0f533b30c3b
[ "CC0-1.0" ]
103
2017-08-20T17:13:05.000Z
2022-02-05T20:20:01.000Z
sdl2/test/__init__.py
Sahil-pixel/py-sdl2
e5c8cbaccfda4f20f35f58bc8d00e0f533b30c3b
[ "CC0-1.0" ]
54
2017-08-20T17:13:00.000Z
2022-01-14T23:51:13.000Z
"""Unit tests SDL2. This package contains the unit tests for SDL2. """
14.4
46
0.708333
11
72
4.636364
0.727273
0.352941
0
0
0
0
0
0
0
0
0
0.033898
0.180556
72
4
47
18
0.830508
0.888889
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
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
5
c1619cde51ed2bce4071408f2d57af7212511620
255
py
Python
postmark_inbound/signals.py
skulegirl/django-postmark-inbound
e60e88ca4adbf733cf60b5ebee1183904cdd3054
[ "MIT" ]
null
null
null
postmark_inbound/signals.py
skulegirl/django-postmark-inbound
e60e88ca4adbf733cf60b5ebee1183904cdd3054
[ "MIT" ]
null
null
null
postmark_inbound/signals.py
skulegirl/django-postmark-inbound
e60e88ca4adbf733cf60b5ebee1183904cdd3054
[ "MIT" ]
null
null
null
import django.dispatch inbound_mail_received = django.dispatch.Signal(providing_args=["mail_data", "mail_object"]) inbound_mail_filtered = django.dispatch.Signal(providing_args=["mail_data"])
51
78
0.623529
25
255
6
0.48
0.28
0.266667
0.386667
0.546667
0.546667
0.546667
0
0
0
0
0
0.282353
255
5
79
51
0.819672
0
0
0
0
0
0.113281
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
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
0
0
0
0
0
5
c169b4155c7300335b641d9a8956927563c1324c
179
py
Python
bin/cubes/solid-pentominoes-three-walls.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
null
null
null
bin/cubes/solid-pentominoes-three-walls.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
null
null
null
bin/cubes/solid-pentominoes-three-walls.py
tiwo/puzzler
7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e
[ "Intel" ]
1
2022-01-02T16:54:14.000Z
2022-01-02T16:54:14.000Z
#!/usr/bin/env python # $Id$ """90 solutions""" import puzzler from puzzler.puzzles.solid_pentominoes import SolidPentominoesThreeWalls puzzler.run(SolidPentominoesThreeWalls)
17.9
72
0.804469
19
179
7.526316
0.789474
0
0
0
0
0
0
0
0
0
0
0.01227
0.089385
179
9
73
19.888889
0.865031
0.212291
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c1a34bbb88733a228cdde0d8893e099536f7b1b3
148
py
Python
aml_utils.py
MeilinaR/aml
769d0946c9a25ebc02304b7bd4ac21def453ef87
[ "Apache-2.0" ]
null
null
null
aml_utils.py
MeilinaR/aml
769d0946c9a25ebc02304b7bd4ac21def453ef87
[ "Apache-2.0" ]
null
null
null
aml_utils.py
MeilinaR/aml
769d0946c9a25ebc02304b7bd4ac21def453ef87
[ "Apache-2.0" ]
null
null
null
LAMBDA: float = None def set_lambda(value: float = None): global LAMBDA LAMBDA = float(value) def get_lambda() -> float: return LAMBDA
18.5
36
0.675676
20
148
4.9
0.45
0.336735
0
0
0
0
0
0
0
0
0
0
0.222973
148
8
37
18.5
0.852174
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
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
1
0
0
0
5
c1ae54244b79bab725a74ed186583a7617051cde
4,485
py
Python
tests/trainer/test_dynamic_values.py
897615138/tfsnippet-jill
2fc898a4def866c8d3c685168df1fa22083bb143
[ "MIT" ]
63
2018-06-06T11:56:40.000Z
2022-03-22T08:00:59.000Z
tests/trainer/test_dynamic_values.py
897615138/tfsnippet-jill
2fc898a4def866c8d3c685168df1fa22083bb143
[ "MIT" ]
39
2018-07-04T12:40:53.000Z
2022-02-09T23:48:44.000Z
tests/trainer/test_dynamic_values.py
897615138/tfsnippet-jill
2fc898a4def866c8d3c685168df1fa22083bb143
[ "MIT" ]
34
2018-06-25T09:59:22.000Z
2022-02-23T12:46:33.000Z
import unittest import pytest from mock import Mock from tfsnippet.trainer import * class DynamicValuesTestCase(unittest.TestCase): def test_DynamicValue(self): x = [1] class MyValue(DynamicValue): def get(self): return x[0] v = MyValue() self.assertEqual(v.get(), 1) x[0] = 123 self.assertEqual(v.get(), 123) class AnnealingScalarTestCase(unittest.TestCase): def test_freq_1(self): loop = Mock(steps=100) v = AnnealingScalar(loop, initial_value=1., ratio=.5, epochs=1) loop.epoch = 0 self.assertEqual(v.get(), 1.) loop.epoch = 1 self.assertEqual(v.get(), 1.) loop.epoch = 2 self.assertEqual(v.get(), .5) loop.epoch = 3 self.assertEqual(v.get(), .25) # test cache self.assertEqual(v.get(), .25) def test_freq_3(self): loop = Mock(epochs=100) v = AnnealingScalar(loop, initial_value=1., ratio=.5, steps=3) loop.step = 0 self.assertEqual(v.get(), 1.) loop.step = 1 self.assertEqual(v.get(), 1.) loop.step = 2 self.assertEqual(v.get(), 1.) loop.step = 3 self.assertEqual(v.get(), 1.) loop.step = 4 self.assertEqual(v.get(), .5) loop.step = 5 self.assertEqual(v.get(), .5) loop.step = 6 self.assertEqual(v.get(), .5) loop.step = 7 self.assertEqual(v.get(), .25) # test cache self.assertEqual(v.get(), .25) def test_min_value(self): loop = Mock(steps=100) v = AnnealingScalar(loop, initial_value=1., ratio=.5, epochs=1, min_value=.1) loop.epoch = 0 self.assertEqual(v.get(), 1.) loop.epoch = 1 self.assertEqual(v.get(), 1.) loop.epoch = 2 self.assertEqual(v.get(), .5) loop.epoch = 3 self.assertEqual(v.get(), .25) loop.epoch = 4 self.assertEqual(v.get(), .125) loop.epoch = 5 self.assertEqual(v.get(), .1) # test cache self.assertEqual(v.get(), .1) def test_max_value(self): loop = Mock(epochs=100) v = AnnealingScalar(loop, initial_value=1., ratio=1.5, steps=1, max_value=3.) loop.step = 0 self.assertEqual(v.get(), 1.) loop.step = 1 self.assertEqual(v.get(), 1.) loop.step = 2 self.assertEqual(v.get(), 1.5) loop.step = 3 self.assertEqual(v.get(), 2.25) loop.step = 4 self.assertEqual(v.get(), 3.) # test cache self.assertEqual(v.get(), 3.) def test_errors(self): loop = Mock() with pytest.raises(ValueError, match='`initial_value` must >= `min_value`: ' 'initial_value 1.0 vs min_value 2.0'): _ = AnnealingScalar(loop, initial_value=1., ratio=.5, min_value=2.) with pytest.raises(ValueError, match='`initial_value` must <= `max_value`: ' 'initial_value 1.0 vs max_value 0.5'): _ = AnnealingScalar(loop, initial_value=1., ratio=.5, max_value=.5) with pytest.raises(ValueError, match='`min_value` must <= `max_value`: ' 'min_value 1.0 vs max_value 0.5'): _ = AnnealingScalar(loop, initial_value=1., ratio=.5, min_value=1.0, max_value=.5) with pytest.raises(ValueError, match='One and only one of `epochs` and `steps` ' 'should be specified'): _ = AnnealingScalar(loop, initial_value=1., ratio=.5) with pytest.raises(ValueError, match='One and only one of `epochs` and `steps` ' 'should be specified'): _ = AnnealingScalar(loop, initial_value=1., ratio=.5, epochs=1, steps=1) with pytest.raises(ValueError, match='`epochs` must be positive: -1'): _ = AnnealingScalar(loop, initial_value=1., ratio=.5, epochs=-1) with pytest.raises(ValueError, match='`steps` must be positive: -1'): _ = AnnealingScalar(loop, initial_value=1., ratio=.5, steps=-1)
32.266187
80
0.51505
532
4,485
4.255639
0.114662
0.192138
0.204947
0.243375
0.808746
0.780035
0.712898
0.634276
0.567138
0.536661
0
0.046929
0.353846
4,485
138
81
32.5
0.7343
0.009588
0
0.522936
0
0
0.086094
0
0
0
0
0
0.266055
1
0.06422
false
0
0.036697
0.009174
0.137615
0
0
0
0
null
0
1
1
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
5
c1c29d3450fa9de663b26e83c6457e281b767ab7
133
py
Python
beluga/symbolic/special_functions/__init__.py
doublefloyd/beluga
740bda376634945ef51bf1cf946fcbe002e9bc7f
[ "MIT" ]
20
2017-10-02T13:09:58.000Z
2022-03-28T20:50:35.000Z
beluga/symbolic/special_functions/__init__.py
doublefloyd/beluga
740bda376634945ef51bf1cf946fcbe002e9bc7f
[ "MIT" ]
187
2018-02-04T20:35:03.000Z
2021-01-27T15:04:18.000Z
beluga/symbolic/special_functions/__init__.py
doublefloyd/beluga
740bda376634945ef51bf1cf946fcbe002e9bc7f
[ "MIT" ]
12
2018-01-19T04:00:09.000Z
2022-03-28T16:44:17.000Z
from .tables import SymTable, SymTableGenerator, TableSpline1D from .custom_functions import CustomFunction, CustomFunctionGenerator
44.333333
69
0.879699
12
133
9.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0.008197
0.082707
133
2
70
66.5
0.942623
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
1
0
0
5
c1e687937aa586dac1ecee0c22b3d0883c0a7caa
145
py
Python
dupdetectorML/__init__.py
vamas/DupDetectorML
a0db6f24519f19a72f9bc7ac226d6a37734564ae
[ "CC0-1.0" ]
null
null
null
dupdetectorML/__init__.py
vamas/DupDetectorML
a0db6f24519f19a72f9bc7ac226d6a37734564ae
[ "CC0-1.0" ]
null
null
null
dupdetectorML/__init__.py
vamas/DupDetectorML
a0db6f24519f19a72f9bc7ac226d6a37734564ae
[ "CC0-1.0" ]
null
null
null
from datasetbuilder import DatasetBuilder from trainer import Trainer from predictor import Predictor from helpers import SaveModel, RestoreModel
36.25
43
0.882759
17
145
7.529412
0.470588
0
0
0
0
0
0
0
0
0
0
0
0.110345
145
4
43
36.25
0.992248
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
1
0
0
5
a9dbf25d80e23673f5e4882640d323bb6f084ec8
49
py
Python
clueless/client/errors.py
arthurtucker/Clue-Less
cf082f5c3b1baf2e93a94984100b6ca58e761383
[ "Apache-2.0" ]
4
2016-09-21T04:59:05.000Z
2020-09-23T03:12:52.000Z
clueless/client/errors.py
arthurtucker/Clue-Less
cf082f5c3b1baf2e93a94984100b6ca58e761383
[ "Apache-2.0" ]
null
null
null
clueless/client/errors.py
arthurtucker/Clue-Less
cf082f5c3b1baf2e93a94984100b6ca58e761383
[ "Apache-2.0" ]
1
2020-04-01T23:27:44.000Z
2020-04-01T23:27:44.000Z
class GameClientException(Exception): pass
9.8
37
0.755102
4
49
9.25
1
0
0
0
0
0
0
0
0
0
0
0
0.183673
49
4
38
12.25
0.925
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
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
1
0
0
0
0
0
5
e73efb33172240fc00479521177caae1e86d2adb
593
py
Python
app/errorhandlers.py
PAPA-allen/econline
1ed90f4d082f12d6a1419b02b392ae71da1c751a
[ "FTL", "CNRI-Python" ]
null
null
null
app/errorhandlers.py
PAPA-allen/econline
1ed90f4d082f12d6a1419b02b392ae71da1c751a
[ "FTL", "CNRI-Python" ]
null
null
null
app/errorhandlers.py
PAPA-allen/econline
1ed90f4d082f12d6a1419b02b392ae71da1c751a
[ "FTL", "CNRI-Python" ]
null
null
null
from flask import render_template from enum import Enum def page_not_found(e): return render_template('404.html'), 404 def method_not_allowed(e): return render_template('405.html'), 405 def internal_server_error(e): return render_template('500.html'), 500 def forbidden(e): return render_template('403.html'), 403 #Proxy design pattern AppErrors = { "PAGE_NOT_FOUND":404, "METHOD_NOT_ALLOWED":405, "INTERNAL_SERVER_ERROR":500, "FORBIDDEN":403 } def handle_error(e): return render_template(f'{AppErrors[e]}.html'),AppErrors[e]
17.441176
64
0.696459
82
593
4.804878
0.353659
0.213198
0.164975
0.266497
0.13198
0
0
0
0
0
0
0.074534
0.185497
593
33
65
17.969697
0.741201
0.033727
0
0
0
0
0.210821
0.039179
0
0
0
0
0
1
0.277778
false
0
0.111111
0.277778
0.666667
0
0
0
0
null
1
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
5
e746e3e882a13039821b69df85fd494747ee113b
161
py
Python
test/conftest.py
makci97/hangman
1f7fd84951dd10129b075bfa2a33fc295407a210
[ "MIT" ]
null
null
null
test/conftest.py
makci97/hangman
1f7fd84951dd10129b075bfa2a33fc295407a210
[ "MIT" ]
null
null
null
test/conftest.py
makci97/hangman
1f7fd84951dd10129b075bfa2a33fc295407a210
[ "MIT" ]
null
null
null
import pytest from hangman.hangman import Hangman @pytest.fixture def prepare_hangman(): hangman = Hangman() hangman.word = 'hello' return hangman
16.1
35
0.726708
19
161
6.105263
0.526316
0.482759
0.362069
0
0
0
0
0
0
0
0
0
0.192547
161
9
36
17.888889
0.892308
0
0
0
0
0
0.031056
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0
0.571429
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
1
0
0
5
e79cdd1eedba1f427929757f7acd452e8761bfb9
1,312
py
Python
src/bioinformatics-stronghold/revc-complementing-a-strand-of-dna.py
spencerking/rosalind
66c50378813abf7b9cc535a963aeb9249d8a3ed7
[ "BSD-3-Clause" ]
null
null
null
src/bioinformatics-stronghold/revc-complementing-a-strand-of-dna.py
spencerking/rosalind
66c50378813abf7b9cc535a963aeb9249d8a3ed7
[ "BSD-3-Clause" ]
null
null
null
src/bioinformatics-stronghold/revc-complementing-a-strand-of-dna.py
spencerking/rosalind
66c50378813abf7b9cc535a963aeb9249d8a3ed7
[ "BSD-3-Clause" ]
null
null
null
def reverseComplement(s): result = "" for base in s[::-1]: if base == "A": result += "T" elif base == "T": result += "A" elif base == "C": result += "G" elif base == "G": result += "C" return result print(reverseComplement("AGGATAGCCGTCTGTCTTTCTCACTTGAGTACTGATGAAAAGGCAAGTGAGAAGGACAGGATTATCCTGAACCGCCTAGCTTCGTTTTGAGCCGGCATATCGCCTGCCTGATGTCGTGTTTACTTACGCGCCCGCAAAGTTTCCAGGAAAAGCCATCGGTTTTAATGGAGATCGTCCGTGTCGGCGTATGCAGCATACTCCTAGTGAGTGGTCGGCCGCGGTATGGCTGATACCTAGCACCCGCTACGGCCTGAGAGCTCAGACAACTGAGGCAATATTATAAAACTCATAAAAGTGCCTCTTTGTCTCCGAGCGGAGTGTTCCGCATTTCGCATTCCAGTATGGGCTGCACCCGGGCAACTGGGGCGCGGCCGATCTTTCGAATAGCATATGGGTGAGTATGGTGGAATTTCTGGAGACTCACACCTGCATTAGAAGACAAAGTGAAACTGATTCATCAGCTGTACCCGTACCAAAGGCGTAAGCTGCCTGCTCCTGTCCGGGGAGTGGAGTCTGATGGGATTAGTTACTATGATTGAGTGCGACCACCCCCAAGCAACGCGCTCTAGACTAGATTACCGAGTCCAACGACTTGCCCTCTGTACTCGTAGGTGCCTCCCTTCGCACAGACGTGGCGCTCTTTTGTCCAACTTTGTGTTAAGTAAGCGTTTTTACGTACTATATACGCACGCAAACGCGGCTCTGTTTATGTATCGGGGTCATTGGCTCCCACAAAAACGTCTTACATTACTTGGCCAGGTAATTGGAGAATCGATTACAAGCGCCTAGTAACGACAAGATCTTGCCACGTCCCAAGCTCCCAACGTTACTGGGACTACCATGCGGTGGCTTGGGATGAAGTGAGATTCTCAGAAAGAGATAAGGGGTTTCTGGTTTGGCGCATAATGCTAACTTTGCCTCTATACAAGCGAATGCGTGGGATCAATTGTCACGTAATGTCTTACGGCACAGATGCATTCAATACTAAGA"))
82
1,018
0.856707
34
1,312
33.058824
0.5
0.021352
0
0
0
0
0
0
0
0
0
0.000849
0.102134
1,312
15
1,019
87.466667
0.953311
0
0
0
0
0
0.760671
0.754573
0
1
0
0
0
1
0.076923
false
0
0
0
0.153846
0.076923
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
5
e7ba060ab5f09b67f72cc7cfb8e50ec25509f165
86
py
Python
RobinhoodTrader/session/__init__.py
jaxbulsara/RobinhoodTrader
a22b4056b8786c1405e3cb06519f17e9ef685dac
[ "MIT" ]
1
2021-04-17T16:24:11.000Z
2021-04-17T16:24:11.000Z
RobinhoodTrader/session/__init__.py
jaxbulsara/RobinhoodTrader
a22b4056b8786c1405e3cb06519f17e9ef685dac
[ "MIT" ]
null
null
null
RobinhoodTrader/session/__init__.py
jaxbulsara/RobinhoodTrader
a22b4056b8786c1405e3cb06519f17e9ef685dac
[ "MIT" ]
1
2021-04-17T16:24:16.000Z
2021-04-17T16:24:16.000Z
from .RobinhoodSession import RobinhoodSession from .TokenFactory import TokenFactory
28.666667
46
0.883721
8
86
9.5
0.5
0
0
0
0
0
0
0
0
0
0
0
0.093023
86
2
47
43
0.974359
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
1
0
0
5
99de3be8355e722191df6f57dedb558088acaafd
3,215
py
Python
textAnalysis.py
Bissenmann/txt_analysis
9a90cf53ea2020352c889b256f9f0b9692e893ed
[ "MIT" ]
1
2016-10-20T01:46:56.000Z
2016-10-20T01:46:56.000Z
textAnalysis.py
Bissenmann/txt-analysis
9a90cf53ea2020352c889b256f9f0b9692e893ed
[ "MIT" ]
null
null
null
textAnalysis.py
Bissenmann/txt-analysis
9a90cf53ea2020352c889b256f9f0b9692e893ed
[ "MIT" ]
null
null
null
import nltk from nltk.tokenize import word_tokenize from nltk.corpus import stopwords # Necessary if you haven't downloaded nltk packages # nltk.download() # Put your own text file to analyze below ##text = open("sampleText.txt", "r") ##text.read() sampleText = "“Dreams don't work unless you do.” Personal statement stil' underway, 2800 extra letters I need to get rid of. Here’s what it looks like at the moment: I launched my own graphic design business the day I turned up 16, the minimum legal age to be paid. Needless to say I was eager to start. My unyielding passion for design began at a young age but has developed and honed over the last few years. I used this personal strength as an opportunity to start something I would be proud of. So, for over a year and a half, I sold logos, animations and websites to companies and individuals online. I just created visual identities that enabled organisations to put their best face forward to their audience. But unlike most small online agencies, I tailored my designs exclusively to my client’s needs. I achieved this by examining thoroughly their business and industry in order to best visually interpret their company, thus to better communicate their values, and most importantly, to distinguish them from their competitors. This actually means that before designing and selling my products I figured out, along with my clients, what was the target audience we had to appeal to. Working with wide sets of data was not only incredibly exciting, it has also given me key informations about the markets I had to understand; and by deciphering these datas I strengthened my analysing skills. I have really enjoyed this marketing process of my job because it relied on my ability to interpret data in a meaningful way. Nonetheless, early this september I decided to put a stop to this thrilling and profitable business to better focus on my studies. I believe that having such an early approach to the business world is a priceless bonus for my career. Through prototyping websites for my clients, I also merged my appeal for programing to my business. With the magic of HTML and CSS, I could combine design, maths and interaction altogether. I see programing as a fantastic form of expression and I firmly believe it should be taught at school early on, like any other languages. I was born in the US, I have traveled in 21 countries and I have lived in Canada, Belgium and France. I am bilingual in French and English and fluent in Spanish. Moving in different countries in my youth has enabled me to discover a variety of cultures. I love to be internationally surrounded, it’s the way I’ve been growing. My current school offers me a broad cultural experience with the ability to connect with students from all around the world, and I would love to find this multicultural experience at University." # Importing stop words ('useless' words) from the nltk corpus stop_words = set(stopwords.words("english")) words = word_tokenize(sampleText) filteredText = [w for w in words if w not in stop_words] print(filteredText) # print(word_tokenize(sampleText)) # To print the most common words use print("Most common words", sampleText.most_common(15))
114.821429
2,610
0.796267
545
3,215
4.686239
0.522936
0.014096
0.017228
0
0
0
0
0
0
0
0
0.003736
0.167341
3,215
27
2,611
119.074074
0.950318
0.08647
0
0
0
0.111111
0.895079
0
0
0
0
0
0
1
0
false
0.111111
0.444444
0
0.444444
0.222222
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
5
99deed7ca1f1e471be9f0114c1768a173c86970e
335
py
Python
tap_udemy_for_business/schemas/__init__.py
immuta/tap-udemy-for-business
d331651154341960aa7aa7376ffc466f10cb42e2
[ "MIT" ]
1
2021-06-28T05:01:51.000Z
2021-06-28T05:01:51.000Z
tap_udemy_for_business/schemas/__init__.py
immuta/tap-udemy-for-business
d331651154341960aa7aa7376ffc466f10cb42e2
[ "MIT" ]
1
2021-05-18T10:47:26.000Z
2021-05-19T06:03:27.000Z
tap_udemy_for_business/schemas/__init__.py
immuta/tap-udemy-for-business
d331651154341960aa7aa7376ffc466f10cb42e2
[ "MIT" ]
1
2021-09-20T15:43:54.000Z
2021-09-20T15:43:54.000Z
from tap_udemy_for_business.schemas.courses import schema as courses from tap_udemy_for_business.schemas.user_activity import schema as user_activity from tap_udemy_for_business.schemas.user_course_activity import ( schema as user_course_activity, ) from tap_udemy_for_business.schemas.user_progress import schema as user_progress
47.857143
80
0.877612
52
335
5.269231
0.269231
0.10219
0.175182
0.218978
0.729927
0.540146
0.430657
0.306569
0
0
0
0
0.089552
335
6
81
55.833333
0.898361
0
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
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
99ecf42f5ebcc1ac814725bf88f5f89ba3461d12
991
py
Python
tests/test_lager.py
jessekrubin/lager
942d8b158495b5d782a159f36ef801abb972a87f
[ "BSD-2-Clause" ]
1
2020-05-14T03:51:40.000Z
2020-05-14T03:51:40.000Z
tests/test_lager.py
dynamic-graphics-inc/lager
942d8b158495b5d782a159f36ef801abb972a87f
[ "MIT" ]
6
2020-05-02T18:20:18.000Z
2020-06-16T23:31:25.000Z
tests/test_lager.py
jessekrubin/lager
942d8b158495b5d782a159f36ef801abb972a87f
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ test_lager ---------------------------------- Tests for `lager` module. """ # from lager import pour_lager # from os import remove, chdir, path # def test_write_to_logfile(tmpdir): # """ # Should log to a file. # """ # chdir(tmpdir) # temp_file = 'sometempfile.log' # logger = pour_lager(filepath=temp_file) # logger.info('yeah yeah yeah') # logger.info('no no no') # logger.warning('yeah yeah yeah') # logger.warning('no no no') # logger.error('yeah yeah yeah') # logger.error('no no no') # logger.debug('yeah yeah yeah') # logger.debug('no no no') # assert path.exists('sometempfile.log') # with open('sometempfile.log') as f: # a = f.read() # print(a) # assert len(a.splitlines()) == 8 # def test_write_stdthing(): # logger = pour_lager() # logger.info('yeah yeah yeah') def test_lager_port(): from lager import const assert const.LAGER_PORT == 52437
20.645833
45
0.586276
129
991
4.395349
0.372093
0.141093
0.10582
0.126984
0.077601
0
0
0
0
0
0
0.009186
0.23108
991
47
46
21.085106
0.734908
0.838547
0
0
0
0
0
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
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
1
1
0
1
0
1
0
0
5
412f901d72bf26e63834524eb934233171179c6f
375
py
Python
tests/list/pop.py
chrivers/pyjaco
8ad793dce34ab7aed3b973aae729d6a943a2381c
[ "MIT" ]
38
2015-01-01T18:08:59.000Z
2022-02-18T08:57:27.000Z
tests/list/pop.py
chrivers/pyjaco
8ad793dce34ab7aed3b973aae729d6a943a2381c
[ "MIT" ]
1
2020-01-08T04:32:52.000Z
2020-01-08T04:32:52.000Z
tests/list/pop.py
chrivers/pyjaco
8ad793dce34ab7aed3b973aae729d6a943a2381c
[ "MIT" ]
12
2016-03-07T09:30:49.000Z
2021-09-05T20:38:47.000Z
x = [1, True, "foo", "bar"] print x.pop() == "bar" print x.pop() == "foo" print x.pop() == True print x.pop() == 1 x = [1, True, "foo", "bar"] print x.pop(0) == 1 print x.pop(0) == True print x.pop(0) == "foo" print x.pop(0) == "bar" try: x.pop() except IndexError, E: print "Done:", E x = [1, 2, 3] try: x.pop(4) except IndexError, E: print "Done:", E
14.423077
27
0.52
69
375
2.826087
0.231884
0.205128
0.369231
0.205128
0.492308
0.492308
0.215385
0.215385
0
0
0
0.041667
0.232
375
25
28
15
0.635417
0
0
0.421053
0
0
0.090667
0
0
0
0
0
0
0
null
null
0
0
null
null
0.526316
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
1
0
5
412fc891adb40a4035829fa1547f15b44503ad7b
3,312
py
Python
stubs/micropython-v1_18-rp2/rp2.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_18-rp2/rp2.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
stubs/micropython-v1_18-rp2/rp2.py
mattytrentini/micropython-stubs
4d596273823b69e9e5bcf5fa67f249c374ee0bbc
[ "MIT" ]
null
null
null
""" Module: 'rp2' on micropython-v1.18-rp2 """ # MCU: {'family': 'micropython', 'sysname': 'rp2', 'version': '1.18.0', 'build': '', 'mpy': 5637, 'port': 'rp2', 'platform': 'rp2', 'name': 'micropython', 'arch': 'armv7m', 'machine': 'Arduino Nano RP2040 Connect with RP2040', 'nodename': 'rp2', 'ver': 'v1.18', 'release': '1.18.0'} # Stubber: 1.5.3 from typing import Any def const(*args, **kwargs) -> Any: ... class Flash(): '' def __init__(self, *argv, **kwargs) -> None: '' ... def ioctl(self, *args, **kwargs) -> Any: ... def readblocks(self, *args, **kwargs) -> Any: ... def writeblocks(self, *args, **kwargs) -> Any: ... class PIO(): '' def __init__(self, *argv, **kwargs) -> None: '' ... IN_HIGH = 1 # type: int IN_LOW = 0 # type: int IRQ_SM0 = 256 # type: int IRQ_SM1 = 512 # type: int IRQ_SM2 = 1024 # type: int IRQ_SM3 = 2048 # type: int JOIN_NONE = 0 # type: int JOIN_RX = 2 # type: int JOIN_TX = 1 # type: int OUT_HIGH = 3 # type: int OUT_LOW = 2 # type: int SHIFT_LEFT = 0 # type: int SHIFT_RIGHT = 1 # type: int def add_program(self, *args, **kwargs) -> Any: ... def irq(self, *args, **kwargs) -> Any: ... def remove_program(self, *args, **kwargs) -> Any: ... def state_machine(self, *args, **kwargs) -> Any: ... class StateMachine(): '' def __init__(self, *argv, **kwargs) -> None: '' ... def exec(self, *args, **kwargs) -> Any: ... def get(self, *args, **kwargs) -> Any: ... def active(self, *args, **kwargs) -> Any: ... def init(self, *args, **kwargs) -> Any: ... def irq(self, *args, **kwargs) -> Any: ... def put(self, *args, **kwargs) -> Any: ... def restart(self, *args, **kwargs) -> Any: ... def rx_fifo(self, *args, **kwargs) -> Any: ... def tx_fifo(self, *args, **kwargs) -> Any: ... def asm_pio_encode(*args, **kwargs) -> Any: ... def dht_readinto(*args, **kwargs) -> Any: ... class PIOASMError(Exception): '' class PIOASMEmit(): '' def __init__(self, *argv, **kwargs) -> None: '' ... def set(self, *args, **kwargs) -> Any: ... def irq(self, *args, **kwargs) -> Any: ... def label(self, *args, **kwargs) -> Any: ... def mov(self, *args, **kwargs) -> Any: ... def nop(self, *args, **kwargs) -> Any: ... def pull(self, *args, **kwargs) -> Any: ... def push(self, *args, **kwargs) -> Any: ... def wrap_target(self, *args, **kwargs) -> Any: ... def wrap(self, *args, **kwargs) -> Any: ... def word(self, *args, **kwargs) -> Any: ... def jmp(self, *args, **kwargs) -> Any: ... def wait(self, *args, **kwargs) -> Any: ... def in_(self, *args, **kwargs) -> Any: ... def out(self, *args, **kwargs) -> Any: ... def start_pass(self, *args, **kwargs) -> Any: ... def delay(self, *args, **kwargs) -> Any: ... def side(self, *args, **kwargs) -> Any: ... def asm_pio(*args, **kwargs) -> Any: ...
20.830189
282
0.476449
380
3,312
4.044737
0.276316
0.240729
0.312947
0.364997
0.536109
0.260247
0.172414
0.08393
0.08393
0.08393
0
0.027644
0.311896
3,312
158
283
20.962025
0.646775
0.140399
0
0.518182
0
0
0
0
0
0
0
0
0
1
0.372727
false
0.009091
0.009091
0
0.545455
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
1
0
0
0
0
1
0
0
5
4168810f720968b69bd374253adf77b32ab34ee1
3,308
py
Python
customsepomex/seeder/curlSepomex.py
edgarhurtado27/custom-sepomex
0a9d9c52f27619e028e3c56f05e2343912935061
[ "MIT" ]
null
null
null
customsepomex/seeder/curlSepomex.py
edgarhurtado27/custom-sepomex
0a9d9c52f27619e028e3c56f05e2343912935061
[ "MIT" ]
null
null
null
customsepomex/seeder/curlSepomex.py
edgarhurtado27/custom-sepomex
0a9d9c52f27619e028e3c56f05e2343912935061
[ "MIT" ]
null
null
null
import requests import logging from zipfile import ZipFile import sys, os sys.path.append(os.path.join(sys.path[0], '..')) from mongoclient import CustomMongoClient logging.basicConfig(level=logging.INFO) HEADERS = {'Content-Type': 'application/x-www-form-urlencoded'} API_ENDPOINT = "https://www.correosdemexico.gob.mx/SSLServicios/ConsultaCP/CodigoPostal_Exportar.aspx" DATA = "__EVENTTARGET=&__EVENTARGUMENT=&__LASTFOCUS=&__VIEWSTATE=%2FwEPDwUINzcwOTQyOTgPZBYCAgEPZBYCAgEPZBYGAgMPDxYCHgRUZXh0BTnDmmx0aW1hIEFjdHVhbGl6YWNpw7NuIGRlIEluZm9ybWFjacOzbjogQWdvc3RvIDE1IGRlIDIwMjFkZAIHDxAPFgYeDURhdGFUZXh0RmllbGQFA0Vkbx4ORGF0YVZhbHVlRmllbGQFBUlkRWRvHgtfIURhdGFCb3VuZGdkEBUhIy0tLS0tLS0tLS0gVCAgbyAgZCAgbyAgcyAtLS0tLS0tLS0tDkFndWFzY2FsaWVudGVzD0JhamEgQ2FsaWZvcm5pYRNCYWphIENhbGlmb3JuaWEgU3VyCENhbXBlY2hlFENvYWh1aWxhIGRlIFphcmFnb3phBkNvbGltYQdDaGlhcGFzCUNoaWh1YWh1YRFDaXVkYWQgZGUgTcOpeGljbwdEdXJhbmdvCkd1YW5hanVhdG8IR3VlcnJlcm8HSGlkYWxnbwdKYWxpc2NvB03DqXhpY28UTWljaG9hY8OhbiBkZSBPY2FtcG8HTW9yZWxvcwdOYXlhcml0C051ZXZvIExlw7NuBk9heGFjYQZQdWVibGEKUXVlcsOpdGFybwxRdWludGFuYSBSb28QU2FuIEx1aXMgUG90b3PDrQdTaW5hbG9hBlNvbm9yYQdUYWJhc2NvClRhbWF1bGlwYXMIVGxheGNhbGEfVmVyYWNydXogZGUgSWduYWNpbyBkZSBsYSBMbGF2ZQhZdWNhdMOhbglaYWNhdGVjYXMVIQIwMAIwMQIwMgIwMwIwNAIwNQIwNgIwNwIwOAIwOQIxMAIxMQIxMgIxMwIxNAIxNQIxNgIxNwIxOAIxOQIyMAIyMQIyMgIyMwIyNAIyNQIyNgIyNwIyOAIyOQIzMAIzMQIzMhQrAyFnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dkZAIdDzwrAAsAZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQULYnRuRGVzY2FyZ2G2iMbH35u3WADeV8JN3PTuofYbzw%3D%3D&__VIEWSTATEGENERATOR=BE1A6D2E&__EVENTVALIDATION=%2FwEWKAKe5L2iBwLG%2FOLvBgLWk4iCCgLWk4SCCgLWk4CCCgLWk7yCCgLWk7iCCgLWk7SCCgLWk7CCCgLWk6yCCgLWk%2BiBCgLWk%2BSBCgLJk4iCCgLJk4SCCgLJk4CCCgLJk7yCCgLJk7iCCgLJk7SCCgLJk7CCCgLJk6yCCgLJk%2BiBCgLJk%2BSBCgLIk4iCCgLIk4SCCgLIk4CCCgLIk7yCCgLIk7iCCgLIk7SCCgLIk7CCCgLIk6yCCgLIk%2BiBCgLIk%2BSBCgLLk4iCCgLLk4SCCgLLk4CCCgLL%2BuTWBALa4Za4AgK%2BqOyRAQLI56b6CwL1%2FKjtBYL74Dewt%2F4T3RA0oKJjVZ0%2FcjO2&cboEdo=00&rblTipo=txt&btnDescarga.x=18&btnDescarga.y=14" # Getting data from SEPOMEX r = requests.post(url = API_ENDPOINT, data = DATA, headers = HEADERS) # Saving zip file with open(r'/tmp/salida.zip','wb') as f: f.write(r.content) # Extract data with ZipFile('/tmp/salida.zip', 'r') as myzip: myzip.extractall('/tmp/') logging.info('Reading file') zipCodesFile = open('/tmp/CPdescarga.txt', encoding='latin-1') zipCodesMap = {} count = 0 while True: count += 1 line = zipCodesFile.readline() # if line is empty end of file is reached if not line: break if count > 2: register = {} data = line.strip().split('|') cp = data[0] if zipCodesMap.get(cp) is not None : register = zipCodesMap.get(cp) register.get('colonias').append(data[1]) else : register = { "codigoPostal": cp, "estado": data[4], "municipio": data[3], "colonias": [data[1]] } zipCodesMap[cp] = register logging.info('Closing file') zipCodesFile.close() logging.info('Begin import') for key in zipCodesMap: CustomMongoClient.insertOne('zipCodes', zipCodesMap[key]) logging.info('Deleting files') os.remove('/tmp/salida.zip') os.remove('/tmp/CPdescarga.txt') logging.info('Import finished')
46.591549
1,623
0.804716
242
3,308
10.938017
0.53719
0.024934
0.0136
0
0
0
0
0
0
0
0
0.057483
0.111245
3,308
70
1,624
47.257143
0.842857
0.028416
0
0
0
0.021277
0.611094
0.513244
0
1
0
0
0
1
0
false
0
0.148936
0
0.148936
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
5
417e3d959e5506bedaaf6b18f46365ee8fa486de
42
py
Python
opsdroid/testing/mockmodules/skills/__init__.py
JiahnChoi/opsdroid.kr
0893456b0f9f6c70edf7c330a7593d87450538cc
[ "Apache-2.0" ]
712
2016-08-09T21:30:07.000Z
2022-03-24T09:38:21.000Z
opsdroid/testing/mockmodules/skills/__init__.py
JiahnChoi/opsdroid.kr
0893456b0f9f6c70edf7c330a7593d87450538cc
[ "Apache-2.0" ]
1,767
2016-07-27T13:01:25.000Z
2022-03-29T04:25:10.000Z
opsdroid/testing/mockmodules/skills/__init__.py
JiahnChoi/opsdroid.kr
0893456b0f9f6c70edf7c330a7593d87450538cc
[ "Apache-2.0" ]
536
2016-07-31T14:23:41.000Z
2022-03-22T17:35:15.000Z
"""Mocked skills for testing opsdroid."""
21
41
0.714286
5
42
6
1
0
0
0
0
0
0
0
0
0
0
0
0.119048
42
1
42
42
0.810811
0.833333
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
41821af2a76b3e22f6f71a6ae8d96831d2ebf10b
121
py
Python
restfulpy/messaging/__init__.py
maryayi/restfulpy
df4a88a7cc2740c37fd8d80c310e0372b83cd8e0
[ "MIT" ]
1
2021-06-11T21:39:44.000Z
2021-06-11T21:39:44.000Z
restfulpy/messaging/__init__.py
maryayi/restfulpy
df4a88a7cc2740c37fd8d80c310e0372b83cd8e0
[ "MIT" ]
null
null
null
restfulpy/messaging/__init__.py
maryayi/restfulpy
df4a88a7cc2740c37fd8d80c310e0372b83cd8e0
[ "MIT" ]
null
null
null
from .models import Email, BaseEmail from .providers import Messenger, create_messenger, SmtpProvider, ConsoleMessenger
30.25
82
0.842975
13
121
7.769231
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.107438
121
3
83
40.333333
0.935185
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
1
0
0
5
41b611d41234f90412cdc0880a8765a25d93371b
172
py
Python
pytheons/pyunit/suites/test_runner.py
pytheons/pyunit
e8b9104b6c7ff0c6cd3b702262f6fb0f3c2c2d45
[ "MIT" ]
1
2021-01-14T14:35:31.000Z
2021-01-14T14:35:31.000Z
pytheons/pyunit/suites/test_runner.py
pytheons/pyunit
e8b9104b6c7ff0c6cd3b702262f6fb0f3c2c2d45
[ "MIT" ]
null
null
null
pytheons/pyunit/suites/test_runner.py
pytheons/pyunit
e8b9104b6c7ff0c6cd3b702262f6fb0f3c2c2d45
[ "MIT" ]
1
2021-12-23T07:58:47.000Z
2021-12-23T07:58:47.000Z
from pytheons.pyunit.user_interface.command_line_interface.command.run import RunCommand class TestRunner: @staticmethod def run(): RunCommand().handle()
21.5
88
0.75
19
172
6.631579
0.789474
0.253968
0
0
0
0
0
0
0
0
0
0
0.162791
172
7
89
24.571429
0.875
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
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
1
0
0
0
1
0
0
5
41c2f6f1b97b6f932bb63e47727a7102438e598c
53
py
Python
source/FnAssetAPI/ui/dialogs/__init__.py
IngenuityEngine/ftrack-connect-foundry
a0d5ba788e3dc5c1536ebe9740bcf4393e3f5e1d
[ "MIT" ]
1
2019-10-22T06:33:08.000Z
2019-10-22T06:33:08.000Z
source/FnAssetAPI/ui/dialogs/__init__.py
IngenuityEngine/ftrack-connect-foundry
a0d5ba788e3dc5c1536ebe9740bcf4393e3f5e1d
[ "MIT" ]
null
null
null
source/FnAssetAPI/ui/dialogs/__init__.py
IngenuityEngine/ftrack-connect-foundry
a0d5ba788e3dc5c1536ebe9740bcf4393e3f5e1d
[ "MIT" ]
null
null
null
from .TabbedBrowserDialog import TabbedBrowserDialog
26.5
52
0.90566
4
53
12
0.75
0
0
0
0
0
0
0
0
0
0
0
0.075472
53
1
53
53
0.979592
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
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
1
0
1
0
0
0
0
5
68bcde70e04c9373c6ff4f2316389feb0e862a5c
205
py
Python
analysis/functions/get_names.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
7
2020-04-12T14:02:08.000Z
2021-10-09T07:52:08.000Z
analysis/functions/get_names.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
11
2020-02-16T22:15:28.000Z
2020-03-28T09:35:38.000Z
analysis/functions/get_names.py
N-Wouda/OR-Analysis
2070e2dee49f1556fcaa00044d3512e4ba08550f
[ "MIT" ]
2
2020-05-21T23:19:44.000Z
2020-09-04T05:22:45.000Z
from typing import Callable, List def get_names(operators: List[Callable]): """ Gets the operator names from the passed-in function list. """ return [func.__name__ for func in operators]
22.777778
61
0.702439
28
205
4.964286
0.678571
0
0
0
0
0
0
0
0
0
0
0
0.209756
205
8
62
25.625
0.858025
0.278049
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
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
1
0
0
1
0
1
0
0
5
6b6151e33b4c3e32eba3cf7d817f109e09866ff5
330
py
Python
tests/util/test_suppress_slots_meta.py
LeeeeT/valtypes
0c5df3cbab296bf9ca34544604fbb9496a41e01a
[ "MIT" ]
3
2022-02-22T12:59:59.000Z
2022-03-10T14:12:25.000Z
tests/util/test_suppress_slots_meta.py
LeeeeT/valtypes
0c5df3cbab296bf9ca34544604fbb9496a41e01a
[ "MIT" ]
3
2022-03-08T13:33:38.000Z
2022-03-25T03:31:56.000Z
tests/util/test_suppress_slots_meta.py
LeeeeT/valtypes
0c5df3cbab296bf9ca34544604fbb9496a41e01a
[ "MIT" ]
null
null
null
from valtypes.util import SuppressSlotsMeta def test_multiple_inheritance() -> None: """ It allows multiple inheritance from classes with __slots__ defined """ class A(int, metaclass=SuppressSlotsMeta): pass class B(int, metaclass=SuppressSlotsMeta): pass class AB(A, B): pass
19.411765
70
0.666667
36
330
5.944444
0.638889
0.17757
0.271028
0.308411
0.35514
0
0
0
0
0
0
0
0.254545
330
16
71
20.625
0.869919
0.2
0
0.375
0
0
0
0
0
0
0
0
0
1
0.125
true
0.375
0.125
0
0.625
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
1
0
0
5
6b6ac7e1694c82e2879b7fe523e19b9a67b2f05a
46
py
Python
script/lib/__init__.py
FRG-UPC-Deliverables/tsk-js
9dd4fcd1c88cb690361cc2a8429cdd127684acea
[ "MIT" ]
null
null
null
script/lib/__init__.py
FRG-UPC-Deliverables/tsk-js
9dd4fcd1c88cb690361cc2a8429cdd127684acea
[ "MIT" ]
5
2021-05-08T07:21:28.000Z
2021-09-21T03:54:39.000Z
script/lib/__init__.py
FRG-UPC-Deliverables/tsk-js
9dd4fcd1c88cb690361cc2a8429cdd127684acea
[ "MIT" ]
null
null
null
from utils import execute, file_exists, rmdir
23
45
0.826087
7
46
5.285714
1
0
0
0
0
0
0
0
0
0
0
0
0.130435
46
1
46
46
0.925
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
0
0
0
5
6b713bb3be403657004cfcabd1f2825af27803d6
94
py
Python
comments/admin.py
daedaldan/hackerthoughts
d6d15b88933b2c8caa76fd3fe5335f3d434353f6
[ "MIT" ]
null
null
null
comments/admin.py
daedaldan/hackerthoughts
d6d15b88933b2c8caa76fd3fe5335f3d434353f6
[ "MIT" ]
null
null
null
comments/admin.py
daedaldan/hackerthoughts
d6d15b88933b2c8caa76fd3fe5335f3d434353f6
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Interest admin.site.register(Interest)
15.666667
32
0.819149
13
94
5.923077
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.117021
94
5
33
18.8
0.927711
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6b9891a6793c1531a51ee4310da353feaf471a42
152
py
Python
example.py
jenswehnerteaching/code-refinery-bq
ab6a82bd86a03631bcb2b42030538f9e8eb12751
[ "Apache-2.0" ]
null
null
null
example.py
jenswehnerteaching/code-refinery-bq
ab6a82bd86a03631bcb2b42030538f9e8eb12751
[ "Apache-2.0" ]
1
2021-06-07T09:26:07.000Z
2021-06-07T10:14:18.000Z
example.py
jenswehnerteaching/code-refinery-bq
ab6a82bd86a03631bcb2b42030538f9e8eb12751
[ "Apache-2.0" ]
2
2021-06-07T09:21:56.000Z
2021-06-07T09:24:00.000Z
import pytest def add(a,b): return a + b def test_add(): assert add(1,2)==3 def subtract(a,b): return a - b def product(a,b): return a * b
11.692308
20
0.605263
31
152
2.935484
0.451613
0.131868
0.263736
0.296703
0.395604
0.285714
0
0
0
0
0
0.026087
0.243421
152
12
21
12.666667
0.765217
0
0
0
0
0
0
0
0
0
0
0
0.111111
1
0.444444
false
0
0.111111
0.333333
0.888889
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d42c31c2321a20375a7896ec8f469ca50ad02862
202
py
Python
docker_hadoop/conexer/src/space_expl_framework/abs_classes/__init__.py
rahlk/ConEX
4dd03a394694257dcd29a0f35cea83b656988830
[ "Apache-2.0" ]
1
2020-07-15T19:42:22.000Z
2020-07-15T19:42:22.000Z
docker_hadoop/conexer/src/space_expl_framework/abs_classes/__init__.py
rahlk/ConEX
4dd03a394694257dcd29a0f35cea83b656988830
[ "Apache-2.0" ]
1
2020-01-31T00:41:17.000Z
2020-01-31T00:41:17.000Z
docker_hadoop/conexer/src/space_expl_framework/abs_classes/__init__.py
rahlk/ConEX__Replication_Package
4dd03a394694257dcd29a0f35cea83b656988830
[ "Apache-2.0" ]
null
null
null
from expl_algo import AbstractAlgo from profiler import AbstractProfiler from component import AbsComponents from conf_space import AbsConfSpace from sampling_strategies import AbstractSamplingStrategy
33.666667
56
0.90099
23
202
7.782609
0.652174
0
0
0
0
0
0
0
0
0
0
0
0.09901
202
5
57
40.4
0.983516
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
1
0
0
5
d48484be3e2b0001b444a485e546f8aa8b80123b
42
py
Python
convolupy/__init__.py
dwf/convolupy
2cb5ed9f2f86ae6d8f59363bf01278fa8916c968
[ "BSD-3-Clause" ]
6
2015-02-24T01:06:08.000Z
2020-04-07T17:22:37.000Z
convolupy/__init__.py
dwf/convolupy
2cb5ed9f2f86ae6d8f59363bf01278fa8916c968
[ "BSD-3-Clause" ]
1
2019-10-06T13:50:36.000Z
2019-10-06T13:50:36.000Z
convolupy/__init__.py
dwf/convolupy
2cb5ed9f2f86ae6d8f59363bf01278fa8916c968
[ "BSD-3-Clause" ]
6
2015-11-02T13:21:40.000Z
2020-04-07T17:22:37.000Z
"""Dummy module for namespace package."""
21
41
0.714286
5
42
6
1
0
0
0
0
0
0
0
0
0
0
0
0.119048
42
1
42
42
0.810811
0.833333
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
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
d486ca8a832fd710af72b1e4aa176062dbf3e0fb
89
py
Python
pokerl/agents/__init__.py
sneppy/pokerl
2ea8cd6c3dad7531ac5cad79aa0dc8879f771e2c
[ "MIT" ]
6
2020-05-26T23:04:39.000Z
2022-03-01T18:11:08.000Z
pokerl/agents/__init__.py
sneppy/pokerl
2ea8cd6c3dad7531ac5cad79aa0dc8879f771e2c
[ "MIT" ]
14
2020-05-26T23:30:13.000Z
2020-05-28T20:50:32.000Z
pokerl/agents/__init__.py
sneppy/pokerl
2ea8cd6c3dad7531ac5cad79aa0dc8879f771e2c
[ "MIT" ]
null
null
null
from .agent import PokerAgent from .human import CLIAgent from .random import RandomAgent
29.666667
31
0.842697
12
89
6.25
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.123596
89
3
31
29.666667
0.961538
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
1
0
0
5
2e15defca9426339f9a639fcdeda7736a72aa315
296
py
Python
allennlp/data/dataset_readers/nlvr.py
YoPatapon/allennlp
d50964b1f5b6887c74855a4fbbd1e948d406d206
[ "Apache-2.0" ]
6
2019-03-19T02:05:35.000Z
2019-09-25T07:24:52.000Z
allennlp/data/dataset_readers/nlvr.py
shanesyy/allennlp
4c99f8e82f7fd70c86652109bfca5282d470e981
[ "Apache-2.0" ]
1
2019-07-08T15:28:04.000Z
2019-07-08T15:28:04.000Z
allennlp/data/dataset_readers/nlvr.py
shanesyy/allennlp
4c99f8e82f7fd70c86652109bfca5282d470e981
[ "Apache-2.0" ]
1
2020-03-12T06:53:53.000Z
2020-03-12T06:53:53.000Z
# pylint: disable=unused-import import warnings from allennlp.data.dataset_readers.semantic_parsing.nlvr import NlvrDatasetReader warnings.warn("allennlp.data.dataset_readers.nlvr.* has been moved." "Please use allennlp.data.dataset_reader.semantic_parsing.nlvr.*", FutureWarning)
42.285714
95
0.797297
36
296
6.416667
0.611111
0.155844
0.246753
0.225108
0
0
0
0
0
0
0
0
0.108108
296
6
96
49.333333
0.875
0.097973
0
0
0
0
0.433962
0.332075
0
0
0
0
0
1
0
true
0
0.5
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
0
1
0
1
0
0
0
0
5
2e2626ffcf2540a325ba557009f028e47b301b9a
248
py
Python
tests/utils/with_number_inheritance.py
ontherivt/versionary
f9ae71b5614d42f1f9c587f23259c09670f154b1
[ "MIT" ]
6
2017-07-03T18:42:13.000Z
2021-09-22T18:28:44.000Z
tests/utils/with_number_inheritance.py
ontherivt/versionary
f9ae71b5614d42f1f9c587f23259c09670f154b1
[ "MIT" ]
1
2017-09-22T15:39:41.000Z
2017-09-22T15:39:41.000Z
tests/utils/with_number_inheritance.py
ontherivt/versionary
f9ae71b5614d42f1f9c587f23259c09670f154b1
[ "MIT" ]
1
2021-11-13T08:47:10.000Z
2021-11-13T08:47:10.000Z
from versionary.decorators import versioned @versioned(1) class MyClass(object): pass @versioned(2) class MyClass(MyClass.v1): pass @versioned(3) class MyClass(MyClass.v2): pass @versioned(4) class MyClass(MyClass.v1): pass
11.272727
43
0.709677
32
248
5.5
0.46875
0.272727
0.323864
0.238636
0.284091
0
0
0
0
0
0
0.034314
0.177419
248
21
44
11.809524
0.828431
0
0
0.461538
0
0
0
0
0
0
0
0
0
1
0
true
0.307692
0.076923
0
0.384615
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
1
1
0
0
0
0
0
5
5cfbc6fc557123ab32e36c471954c9c7f2e51d6f
87
py
Python
dashboard/plot/__init__.py
sorice/flasked-altair
603047ff9ac8494cd9a4df8bb7d2db4a6eded7e9
[ "MIT" ]
null
null
null
dashboard/plot/__init__.py
sorice/flasked-altair
603047ff9ac8494cd9a4df8bb7d2db4a6eded7e9
[ "MIT" ]
null
null
null
dashboard/plot/__init__.py
sorice/flasked-altair
603047ff9ac8494cd9a4df8bb7d2db4a6eded7e9
[ "MIT" ]
null
null
null
from .py2html import Div from .altair import make_static_chart, make_interactive_chart
29
61
0.862069
13
87
5.461538
0.692308
0
0
0
0
0
0
0
0
0
0
0.012821
0.103448
87
2
62
43.5
0.897436
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
1
0
0
5
cf14fcef3de1f8a3bb920962d79471f5ebceb3cd
4,250
py
Python
models.py
nortics/stepik-flask4
4d1aaee69edda7a9286a80e3c8ac83e7192f6573
[ "MIT" ]
null
null
null
models.py
nortics/stepik-flask4
4d1aaee69edda7a9286a80e3c8ac83e7192f6573
[ "MIT" ]
null
null
null
models.py
nortics/stepik-flask4
4d1aaee69edda7a9286a80e3c8ac83e7192f6573
[ "MIT" ]
null
null
null
from sqlalchemy import Column, Integer, String, Numeric, Text, Time, Boolean from database import Base class Dows(Base): __tablename__ = "dows" dow = Column(String(45), primary_key=True, nullable=False) dow_name = Column(String(45), nullable=False) dow_order = Column(Integer, nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.dow) class Goals(Base): __tablename__ = "goals" goal = Column(String(45), primary_key=True, nullable=False) goal_name = Column(String(45), nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.goal) class Scheduler(Base): __tablename__ = "scheduler" row_id = Column(Integer, primary_key=True, autoincrement=True, nullable=False) teacher_id = Column(Integer, nullable=False) dow_id = Column(String(45), nullable=False) time = Column(Time, nullable=False) occupied = Column(Boolean, nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.row_id) class TeacherGoals(Base): __tablename__ = "teacher_goals" row_id = Column(Integer, primary_key=True, autoincrement=True, nullable=False) teacher_id = Column(Integer, nullable=False) goal_id = Column(String(45), nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.row_id) class Teachers(Base): __tablename__ = "teachers" row_id = Column(Integer, primary_key=True, autoincrement=True, nullable=False) id = Column(Integer, nullable=False) name = Column(String(100), nullable=False) about = Column(Text, nullable=False) rating = Column(Numeric(4, 1), nullable=False) picture = Column(String(120), nullable=False) price = Column(Numeric(6, 2), nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.row_id) class ViewSchedulerDows(Base): __tablename__ = "view_scheduler_dows" row_id = Column(Integer, primary_key=True, autoincrement=True, nullable=False) teacher_id = Column(Integer, nullable=False) id = Column(Integer, nullable=False) dow_id = Column(Integer, nullable=False) time = Column(Time, nullable=False) occupied = Column(Boolean, nullable=False) dow_name = Column(String(45), nullable=False) dow_order = Column(Integer, nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.row_id) class ViewTeacherGoals(Base): __tablename__ = "view_teacher_goals" row_id = Column(Integer, primary_key=True, autoincrement=True, nullable=False) teacher_id = Column(Integer, nullable=False) goal_id = Column(String(45), nullable=False) goal_name = Column(String(45), nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.row_id) class TeacherRequests(Base): __tablename__ = "view_teacher_requests" request_uid = Column(Integer, primary_key=True, nullable=False) goal = Column(String(45), nullable=False) time = Column(String(45), nullable=False) customer_name = Column(String(45), nullable=False) customer_phone = Column(String(45), nullable=False) def __init__(self, **kwargs): for key, value in kwargs.items(): setattr(self, key, value) def __repr__(self): return '<{} {!r}>'.format(type(self).__name__, self.row_id)
33.203125
82
0.662588
527
4,250
5.018975
0.127135
0.181853
0.068809
0.091493
0.798866
0.791304
0.753875
0.726276
0.6862
0.6862
0
0.010598
0.200706
4,250
127
83
33.464567
0.768031
0
0
0.642105
0
0
0.039765
0.004941
0
0
0
0
0
1
0.168421
false
0
0.021053
0.084211
0.831579
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
1
0
0
5
d8579b2267c58abccf3dc28e92946181ec45f830
85
py
Python
mist/guuid.py
BBVA/MIST
3821ccd089e78cefe78282ac7297a6b4882cc53c
[ "Apache-2.0" ]
13
2021-03-09T15:34:37.000Z
2021-07-27T21:21:24.000Z
mist/guuid.py
JavDomGom/mist
83ae9f67df61ff2387a7d424cff0f8591a6a645f
[ "Apache-2.0" ]
12
2020-10-16T10:17:22.000Z
2020-10-20T12:28:17.000Z
mist/guuid.py
JavDomGom/mist
83ae9f67df61ff2387a7d424cff0f8591a6a645f
[ "Apache-2.0" ]
3
2021-04-23T17:09:27.000Z
2021-06-23T02:22:56.000Z
import uuid def guuid() -> str: return uuid.uuid4().hex __all__ = ("guuid", )
10.625
27
0.6
11
85
4.272727
0.818182
0
0
0
0
0
0
0
0
0
0
0.015152
0.223529
85
7
28
12.142857
0.69697
0
0
0
0
0
0.058824
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d88155d8631223b8d781a0c031ed7f2a691d6596
2,180
py
Python
test/test_ezsigntemplatesignature_request_compound.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
test/test_ezsigntemplatesignature_request_compound.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
test/test_ezsigntemplatesignature_request_compound.py
ezmaxinc/eZmax-SDK-python
6794b8001abfb7d9ae18a3b87aba164839b925a0
[ "MIT" ]
null
null
null
""" eZmax API Definition (Full) This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501 The version of the OpenAPI document: 1.1.7 Contact: support-api@ezmax.ca Generated by: https://openapi-generator.tech """ import sys import unittest import eZmaxApi from eZmaxApi.model.ezsigntemplatesignature_request import EzsigntemplatesignatureRequest from eZmaxApi.model.ezsigntemplatesignature_request_compound_all_of import EzsigntemplatesignatureRequestCompoundAllOf from eZmaxApi.model.ezsigntemplatesignaturecustomdate_request_compound import EzsigntemplatesignaturecustomdateRequestCompound from eZmaxApi.model.field_e_ezsigntemplatesignature_font import FieldEEzsigntemplatesignatureFont from eZmaxApi.model.field_e_ezsigntemplatesignature_tooltipposition import FieldEEzsigntemplatesignatureTooltipposition from eZmaxApi.model.field_e_ezsigntemplatesignature_type import FieldEEzsigntemplatesignatureType globals()['EzsigntemplatesignatureRequest'] = EzsigntemplatesignatureRequest globals()['EzsigntemplatesignatureRequestCompoundAllOf'] = EzsigntemplatesignatureRequestCompoundAllOf globals()['EzsigntemplatesignaturecustomdateRequestCompound'] = EzsigntemplatesignaturecustomdateRequestCompound globals()['FieldEEzsigntemplatesignatureFont'] = FieldEEzsigntemplatesignatureFont globals()['FieldEEzsigntemplatesignatureTooltipposition'] = FieldEEzsigntemplatesignatureTooltipposition globals()['FieldEEzsigntemplatesignatureType'] = FieldEEzsigntemplatesignatureType from eZmaxApi.model.ezsigntemplatesignature_request_compound import EzsigntemplatesignatureRequestCompound class TestEzsigntemplatesignatureRequestCompound(unittest.TestCase): """EzsigntemplatesignatureRequestCompound unit test stubs""" def setUp(self): pass def tearDown(self): pass def testEzsigntemplatesignatureRequestCompound(self): """Test EzsigntemplatesignatureRequestCompound""" # FIXME: construct object with mandatory attributes with example values # model = EzsigntemplatesignatureRequestCompound() # noqa: E501 pass if __name__ == '__main__': unittest.main()
44.489796
126
0.840826
162
2,180
11.154321
0.45679
0.046486
0.065855
0.066408
0.163254
0.137244
0
0
0
0
0
0.004606
0.10367
2,180
48
127
45.416667
0.920164
0.216972
0
0.12
0
0
0.143371
0.138572
0
0
0
0.020833
0
1
0.12
false
0.12
0.4
0
0.56
0
0
0
1
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
0
0
1
1
0
1
0
0
5