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
d1b5f1dbd4e506a803f9f76d3d4538f78764fd08
36
py
Python
src/python/MLaaS4HEP/__init__.py
palamatt95/MLaaS4HEP
c5783a7be42128e6e0d126777c318fe5192a9b42
[ "MIT" ]
7
2018-11-09T12:39:43.000Z
2021-12-20T14:08:59.000Z
src/python/MLaaS4HEP/__init__.py
palamatt95/MLaaS4HEP
c5783a7be42128e6e0d126777c318fe5192a9b42
[ "MIT" ]
13
2018-11-09T12:32:49.000Z
2022-01-06T11:37:46.000Z
src/python/MLaaS4HEP/__init__.py
palamatt95/MLaaS4HEP
c5783a7be42128e6e0d126777c318fe5192a9b42
[ "MIT" ]
8
2018-11-20T13:45:46.000Z
2021-11-08T14:57:13.000Z
__version__ = '0.0.0' __all__ = []
9
21
0.583333
5
36
2.6
0.6
0.307692
0
0
0
0
0
0
0
0
0
0.103448
0.194444
36
3
22
12
0.344828
0
0
0
0
0
0.142857
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
d1eb271ec613cb3d3936eb6bdf931f638aaffcaf
153
py
Python
summaries/admin.py
reading-in-the-alps/rita-invs
21dd5a08555ea75daf39b9aeaf6b9f1446a62533
[ "MIT" ]
null
null
null
summaries/admin.py
reading-in-the-alps/rita-invs
21dd5a08555ea75daf39b9aeaf6b9f1446a62533
[ "MIT" ]
5
2019-05-20T11:47:25.000Z
2021-06-10T21:12:15.000Z
summaries/admin.py
reading-in-the-alps/rita-invs
21dd5a08555ea75daf39b9aeaf6b9f1446a62533
[ "MIT" ]
null
null
null
from django.contrib import admin from . models import VerfachBuch, InventoryEntry admin.site.register(VerfachBuch) admin.site.register(InventoryEntry)
21.857143
48
0.836601
18
153
7.111111
0.555556
0.140625
0.265625
0
0
0
0
0
0
0
0
0
0.091503
153
6
49
25.5
0.920863
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
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
d1ee3965c4ea6716547e33d4b1d25a9bffdc5649
134
py
Python
gokart_runner.py
jesa7955/context-translation
3cb1f4fdcf5a6829eea02d6008c4c4d7ba5ad993
[ "MIT" ]
2
2020-01-22T05:18:19.000Z
2021-11-14T17:18:46.000Z
gokart_runner.py
jesa7955/context-translation
3cb1f4fdcf5a6829eea02d6008c4c4d7ba5ad993
[ "MIT" ]
1
2020-03-31T11:03:22.000Z
2020-03-31T11:03:22.000Z
gokart_runner.py
jesa7955/context-translation
3cb1f4fdcf5a6829eea02d6008c4c4d7ba5ad993
[ "MIT" ]
null
null
null
import luigi import gokart import numpy as np import context_nmt if __name__ == "__main__": np.random.seed(57) gokart.run()
13.4
26
0.716418
20
134
4.35
0.75
0
0
0
0
0
0
0
0
0
0
0.018519
0.19403
134
9
27
14.888889
0.787037
0
0
0
0
0
0.059701
0
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
060f3b54069cff59cc87831c85127d3119cfa3d5
1,481
py
Python
src/com/inductiveautomation/ignition/common/script/builtin/http/__init__.py
ignition-api/jython
7255a0b6d629f14506dab9e383615aa13562044e
[ "MIT" ]
1
2022-03-16T23:22:27.000Z
2022-03-16T23:22:27.000Z
src/com/inductiveautomation/ignition/common/script/builtin/http/__init__.py
ignition-api/jython
7255a0b6d629f14506dab9e383615aa13562044e
[ "MIT" ]
4
2022-03-15T21:33:46.000Z
2022-03-22T21:25:18.000Z
src/com/inductiveautomation/ignition/common/script/builtin/http/__init__.py
ignition-api/jython
7255a0b6d629f14506dab9e383615aa13562044e
[ "MIT" ]
2
2022-03-16T18:26:29.000Z
2022-03-28T20:12:56.000Z
__all__ = ["JythonHttpClient"] from java.lang import Object class JythonHttpClient(Object): """A Jython-optimized wrapper around the base HttpClient available in Java 11+. Mostly, through convenience functions that make things easier to use from Jython. """ def delete(self, *args, **kwargs): pass def deleteAsync(self, *args, **kwargs): pass def get(self, *args, **kwargs): pass def getAsync(self, *args, **kwargs): pass def getConnectTimeout(self): pass def getCookieManager(self): pass def getJavaClient(self): pass def getRedirectPolicy(self): pass def head(self, *args, **kwargs): pass def headAsync(self, *args, **kwargs): pass def options(self, *args, **kwargs): pass def parseChart(self, contentType): pass def patch(self, *args, **kwargs): pass def patchAsync(self, *args, **kwargs): pass def post(self, *args, **kwargs): pass def postAsync(self, *args, **kwargs): pass def put(self, *args, **kwargs): pass def putAsync(self, *args, **kwargs): pass def request(self, *args, **kwargs): pass def requestAsync(self, *args, **kwargs): pass def setGson(self, gson): pass def trace(self, *args, **kwargs): pass def traceAsync(self, *args, **kwargs): pass
18.060976
72
0.569885
162
1,481
5.185185
0.364198
0.183333
0.283333
0.364286
0.4
0
0
0
0
0
0
0.001961
0.311276
1,481
81
73
18.283951
0.821569
0.10736
0
0.469388
0
0
0.012317
0
0
0
0
0
0
1
0.469388
false
0.469388
0.020408
0
0.510204
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
1
0
0
1
0
0
5
ae08d7872ab5f82bad89f017bc671fb2722ac585
24
py
Python
hello.py
StanleyHome/HelloGitHub
bd29f2e4a25e8ecfa5174fd4e6e5480e5975f0f9
[ "MIT" ]
null
null
null
hello.py
StanleyHome/HelloGitHub
bd29f2e4a25e8ecfa5174fd4e6e5480e5975f0f9
[ "MIT" ]
null
null
null
hello.py
StanleyHome/HelloGitHub
bd29f2e4a25e8ecfa5174fd4e6e5480e5975f0f9
[ "MIT" ]
null
null
null
print('Hello, GitHub!')
12
23
0.666667
3
24
5.333333
1
0
0
0
0
0
0
0
0
0
0
0
0.083333
24
1
24
24
0.727273
0
0
0
0
0
0.583333
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
ae23b856e86dec73d4df9e0f25b35ed0a4f9d310
336
py
Python
linguistictoolkit/sinhala/__init__.py
valestanov/LinguisticToolkit
a57b1ac084449cbf37ee0123b6e907a6674bece4
[ "MIT" ]
null
null
null
linguistictoolkit/sinhala/__init__.py
valestanov/LinguisticToolkit
a57b1ac084449cbf37ee0123b6e907a6674bece4
[ "MIT" ]
null
null
null
linguistictoolkit/sinhala/__init__.py
valestanov/LinguisticToolkit
a57b1ac084449cbf37ee0123b6e907a6674bece4
[ "MIT" ]
null
null
null
'''Transliterate. Two mode: "normal"(default) or "vain". 编写于2016年3月20-22日。于吉林大学图书馆1楼大厅。 Written in 20-22 March 2016 in the reading area of the 1 stock of the Library of Jilin University. ''' from linguistictoolkit.sinhala.romanization import transliterate from linguistictoolkit.sinhala.abhayaConverter import abhaya_unicode_converter
42
98
0.821429
44
336
6.227273
0.772727
0.036496
0.20438
0
0
0
0
0
0
0
0
0.063333
0.107143
336
7
99
48
0.85
0.544643
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
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
1
0
0
5
ae2e2514d42bc91cc99a8a11e7f697c0784cd3a1
42
py
Python
core/src/autogluon/core/searcher/bayesopt/gpautograd/__init__.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
4,462
2019-12-09T17:41:07.000Z
2022-03-31T22:00:41.000Z
core/src/autogluon/core/searcher/bayesopt/gpautograd/__init__.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
1,408
2019-12-09T17:48:59.000Z
2022-03-31T20:24:12.000Z
core/src/autogluon/core/searcher/bayesopt/gpautograd/__init__.py
zhiqiangdon/autogluon
71ee7ef0f05d8f0aad112d8c1719174aa33194d9
[ "Apache-2.0" ]
623
2019-12-10T02:04:18.000Z
2022-03-20T17:11:01.000Z
class SliceException(Exception): pass
14
32
0.761905
4
42
8
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
42
2
33
21
0.914286
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
ae3757e016fa480dfdd70eabd9fd2663547e0cb5
4,357
py
Python
tests/structured_document/__init___test.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
25
2017-07-25T12:44:55.000Z
2020-09-30T22:16:50.000Z
tests/structured_document/__init___test.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
192
2017-11-29T08:57:03.000Z
2022-03-29T18:44:41.000Z
tests/structured_document/__init___test.py
elifesciences/sciencebeam-gym
3ad654e08775e0c0cdd256753e14093bb5a42d44
[ "MIT" ]
6
2019-02-01T18:49:33.000Z
2020-07-26T08:18:46.000Z
from functools import partial import pytest from sciencebeam_gym.structured_document import ( SimpleStructuredDocument, SimpleLine, SimpleToken, merge_token_tag ) TEXT_1 = 'text 1' TEXT_2 = 'text 2' TAG_1 = 'tag1' TAG_2 = 'tag2' SCOPE_1 = 'scope1' class TestAbstractStructuredDocumentMergeWith(object): def test_should_merge_single_token_and_add_prefix(self): merged_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_1, tag=TAG_1) ])]) other_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_1, tag=TAG_2) ])]) merged_structured_document.merge_with( other_structured_document, partial( merge_token_tag, target_scope=SCOPE_1 ) ) merged_tokens = list(merged_structured_document.iter_all_tokens()) assert ( [merged_structured_document.get_text(t) for t in merged_tokens] == [TEXT_1] ) assert ( [merged_structured_document.get_tag(t) for t in merged_tokens] == [TAG_1] ) assert ( [merged_structured_document.get_tag(t, scope=SCOPE_1) for t in merged_tokens] == [TAG_2] ) def test_should_not_fail_with_absent_tags(self): merged_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_1, tag=TAG_1) ])]) other_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_1) ])]) merged_structured_document.merge_with( other_structured_document, partial( merge_token_tag, target_scope=SCOPE_1 ) ) merged_tokens = list(merged_structured_document.iter_all_tokens()) assert ( [merged_structured_document.get_tag(t, scope=SCOPE_1) for t in merged_tokens] == [None] ) def test_should_not_override_with_empty_tags(self): merged_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_1, tag=TAG_1) ])]) other_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_1) ])]) merged_structured_document.merge_with( other_structured_document, partial( merge_token_tag ) ) merged_tokens = list(merged_structured_document.iter_all_tokens()) assert ( [merged_structured_document.get_tag(t) for t in merged_tokens] == [TAG_1] ) def test_should_raise_assertion_error_if_tokens_mismatch(self): merged_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_1, tag=TAG_1) ])]) other_structured_document = SimpleStructuredDocument(lines=[SimpleLine([ SimpleToken(TEXT_2, tag=TAG_2) ])]) with pytest.raises(AssertionError): merged_structured_document.merge_with( other_structured_document, partial( merge_token_tag, target_scope=SCOPE_1 ) ) class TestSimpleStructuredDocument(object): def test_should_set_tag_without_scope(self): token = SimpleToken(TEXT_1) doc = SimpleStructuredDocument(lines=[SimpleLine([token])]) doc.set_tag(token, TAG_1) assert doc.get_tag(token) == TAG_1 def test_should_set_tag_with_scope(self): token = SimpleToken(TEXT_1) doc = SimpleStructuredDocument(lines=[SimpleLine([token])]) doc.set_tag(token, TAG_1, scope=SCOPE_1) assert doc.get_tag(token, scope=SCOPE_1) == TAG_1 assert doc.get_tag(token) is None def test_should_return_all_tag_by_scope(self): token = SimpleToken(TEXT_1) doc = SimpleStructuredDocument(lines=[SimpleLine([token])]) doc.set_tag(token, TAG_1) doc.set_tag(token, TAG_2, scope=SCOPE_1) assert doc.get_tag(token) == TAG_1 assert doc.get_tag(token, scope=SCOPE_1) == TAG_2 assert doc.get_tag_by_scope(token) == {None: TAG_1, SCOPE_1: TAG_2}
33.775194
92
0.633463
472
4,357
5.45339
0.144068
0.174825
0.149184
0.146076
0.783605
0.757187
0.74864
0.740482
0.725719
0.713675
0
0.01633
0.283222
4,357
128
93
34.039063
0.807877
0
0
0.584071
0
0
0.005967
0
0
0
0
0
0.115044
1
0.061947
false
0
0.026549
0
0.106195
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
ae545c286bb744c2ab21de5b902accbd371d8c37
44
py
Python
tests/sitecustomize.py
marty-2015/django-hurricane
fe05ed1360ad504167aa403c999357eb4f0cdb8b
[ "MIT" ]
30
2020-12-23T21:07:42.000Z
2022-03-24T17:09:43.000Z
tests/sitecustomize.py
marty-2015/django-hurricane
fe05ed1360ad504167aa403c999357eb4f0cdb8b
[ "MIT" ]
60
2021-02-05T13:20:32.000Z
2022-03-24T20:56:48.000Z
tests/sitecustomize.py
marty-2015/django-hurricane
fe05ed1360ad504167aa403c999357eb4f0cdb8b
[ "MIT" ]
9
2016-12-06T17:21:30.000Z
2021-11-22T07:37:10.000Z
import coverage coverage.process_startup()
11
26
0.840909
5
44
7.2
0.8
0
0
0
0
0
0
0
0
0
0
0
0.090909
44
3
27
14.666667
0.9
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
ae8d8fd16c987e340a7fe7c678136e3f3fdf3b63
50
py
Python
app/sections/toolbar/__init__.py
namuan/orkestra
83b67f7e816c94b75232691c14d91fd9d62213ed
[ "MIT" ]
null
null
null
app/sections/toolbar/__init__.py
namuan/orkestra
83b67f7e816c94b75232691c14d91fd9d62213ed
[ "MIT" ]
11
2020-06-07T12:29:21.000Z
2020-06-24T19:44:36.000Z
app/sections/toolbar/__init__.py
namuan/orkestra
83b67f7e816c94b75232691c14d91fd9d62213ed
[ "MIT" ]
null
null
null
from .toolbar_controller import ToolbarController
25
49
0.9
5
50
8.8
1
0
0
0
0
0
0
0
0
0
0
0
0.08
50
1
50
50
0.956522
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
881ce498bb443bff818b1a76a8669097087b1c6b
39
py
Python
src/lib/centipede/Task/Video/__init__.py
ramgopal99/centipede
0b1dc1f17b025f6b37c9a3cf5753a46cbbcd36ba
[ "MIT" ]
3
2018-05-28T20:56:19.000Z
2018-06-02T15:58:10.000Z
src/lib/centipede/Task/Video/__init__.py
ramgopal99/centipede
0b1dc1f17b025f6b37c9a3cf5753a46cbbcd36ba
[ "MIT" ]
2
2018-07-01T07:45:38.000Z
2018-07-11T03:15:35.000Z
src/lib/centipede/Task/Video/__init__.py
ramgopal99/centipede
0b1dc1f17b025f6b37c9a3cf5753a46cbbcd36ba
[ "MIT" ]
3
2018-07-10T14:51:13.000Z
2022-03-17T00:39:58.000Z
from .ConvertVideo import ConvertVideo
19.5
38
0.871795
4
39
8.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.102564
39
1
39
39
0.971429
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
881d5053713913856632eb6ab277e3614dbfeb7f
115
py
Python
flipkart_tracker/admin.py
Aayush452-cell/Flipkart_tracker
0885b1b630d3923e2a3b0ab8c51bb1d5ccb033c8
[ "MIT" ]
1
2022-01-13T16:59:45.000Z
2022-01-13T16:59:45.000Z
flipkart_tracker/admin.py
Aayush452-cell/Flipkart_tracker
0885b1b630d3923e2a3b0ab8c51bb1d5ccb033c8
[ "MIT" ]
null
null
null
flipkart_tracker/admin.py
Aayush452-cell/Flipkart_tracker
0885b1b630d3923e2a3b0ab8c51bb1d5ccb033c8
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Link admin.site.register(Link) # Register your models here.
16.428571
32
0.791304
17
115
5.352941
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.13913
115
6
33
19.166667
0.919192
0.226087
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
885220ca8d9b5744732f90b64a443c9e9d64a4ac
226
py
Python
mltb/pdtb.py
ghayth82/mltb
6b347678ec04ae9241e4c2d26a8dfa5fdb803ca2
[ "BSD-2-Clause" ]
1
2020-04-02T00:57:13.000Z
2020-04-02T00:57:13.000Z
mltb/pdtb.py
ghayth82/mltb
6b347678ec04ae9241e4c2d26a8dfa5fdb803ca2
[ "BSD-2-Clause" ]
null
null
null
mltb/pdtb.py
ghayth82/mltb
6b347678ec04ae9241e4c2d26a8dfa5fdb803ca2
[ "BSD-2-Clause" ]
null
null
null
def is_one_to_one(df, col1, col2): first = df.drop_duplicates([col1, col2]).groupby(col1)[col2].count().max() second = df.drop_duplicates([col1, col2]).groupby(col2)[col1].count().max() return first + second == 2
37.666667
79
0.668142
34
226
4.294118
0.470588
0.219178
0.219178
0.273973
0.424658
0.424658
0
0
0
0
0
0.05641
0.137168
226
5
80
45.2
0.692308
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
0
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
1
0
0
0
0
0
0
0
5
31f5f24743fdaeb156179e1447cd9fd3e29bace6
3,053
py
Python
preprocess/get_image_labels_majors.py
pokarats/LAP-final-project
b60bb7bd4fe07773ee3bf8edfc5011a337ac6037
[ "MIT" ]
1
2022-02-21T08:50:39.000Z
2022-02-21T08:50:39.000Z
preprocess/get_image_labels_majors.py
pokarats/LAP-final-project
b60bb7bd4fe07773ee3bf8edfc5011a337ac6037
[ "MIT" ]
null
null
null
preprocess/get_image_labels_majors.py
pokarats/LAP-final-project
b60bb7bd4fe07773ee3bf8edfc5011a337ac6037
[ "MIT" ]
null
null
null
import csv from os import listdir dir_path = 'NLMCXR_png_frontal' imgs = [] for filename in listdir(dir_path): if filename.endswith('.png'): imgs.append(filename) rep_to_img = [] with open('./files/reports_to_images.csv', 'r') as csv_file: csvReader = csv.DictReader(csv_file) for row in csvReader: report = row['Report'] img = row['Image'] rep_to_img.append((report, img)) labels = [] with open('./files/major_labels.csv', 'r') as csv_file: csvReader = csv.DictReader(csv_file) for row in csvReader: xml_id = row['Filename'] label = row['Label'] label_text = row['LabelText'] labels.append((xml_id, label, label_text)) multi_labels = [] with open('./files/major_multi_labels.csv', 'r') as csv_file: csvReader = csv.DictReader(csv_file) for row in csvReader: xml_id = row['Filename'] label = row['Label'] label_text = row['LabelText'] multi_labels.append((xml_id, label, label_text)) img_labels = [] for tpl in labels: xml_id = tpl[0] for rtpl in rep_to_img: if rtpl[0] == xml_id: img_labels.append((rtpl[1], tpl[1], tpl[2])) labels_frontal = [] for (fname, label, label_t) in img_labels: if fname in imgs: labels_frontal.append((fname, label, label_t)) img_multi_labels = [] for tpl in multi_labels: xml_id = tpl[0] for rtpl in rep_to_img: if rtpl[0] == xml_id: img_multi_labels.append((rtpl[1], tpl[1], tpl[2])) multi_labels_frontal = [] for (fname, label, label_t) in img_multi_labels: if fname in imgs: multi_labels_frontal.append((fname, label, label_t)) with open('./files/image_labels_major.csv', 'w', encoding='utf-8') as csv_file: csvWriter = csv.writer(csv_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) csvWriter.writerow(['img', 'label', 'text']) for tpl in img_labels: csvWriter.writerow([tpl[0], tpl[1], tpl[2]]) with open('./files/image_labels_major_frontal.csv', 'w', encoding='utf-8') as csvfile: csvWriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) csvWriter.writerow(['img', 'label', 'text']) for tpl in labels_frontal: csvWriter.writerow([tpl[0], tpl[1], tpl[2]]) with open('./files/image_labels_multi_major.csv', 'w', encoding='utf-8') as csv_file: csvWriter = csv.writer(csv_file, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) csvWriter.writerow(['img', 'label', 'text']) for tpl in img_multi_labels: csvWriter.writerow([tpl[0], tpl[1], tpl[2]]) with open('./files/image_labels_multi_major_frontal.csv', 'w', encoding='utf-8') as csvfile: csvWriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_MINIMAL) csvWriter.writerow(['img', 'label', 'text']) for tpl in multi_labels_frontal: csvWriter.writerow([tpl[0], tpl[1], tpl[2]])
30.53
92
0.625942
421
3,053
4.342043
0.144893
0.066193
0.049781
0.026258
0.848468
0.791575
0.778446
0.706236
0.678884
0.638403
0
0.010934
0.221094
3,053
99
93
30.838384
0.75778
0
0
0.486486
0
0
0.128071
0.075663
0
0
0
0
0
1
0
false
0
0.027027
0
0.027027
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
31f6f8a66d3227088b75360a4f942da940ce889e
203
py
Python
api/models.py
SmashKs/BarBarian
b308dcb9e24ec621abbbc121847923e14e5b6a4b
[ "MIT" ]
null
null
null
api/models.py
SmashKs/BarBarian
b308dcb9e24ec621abbbc121847923e14e5b6a4b
[ "MIT" ]
2
2020-06-05T19:25:24.000Z
2021-06-10T20:56:57.000Z
api/models.py
SmashKs/BarBarian
b308dcb9e24ec621abbbc121847923e14e5b6a4b
[ "MIT" ]
null
null
null
from dataclasses import dataclass from dataclasses_json import dataclass_json @dataclass_json @dataclass class TestData: name: str = 'jieyi' longitude: float = 33.2 latitude: float = 11.3
16.916667
43
0.743842
26
203
5.692308
0.653846
0.202703
0.297297
0
0
0
0
0
0
0
0
0.036585
0.192118
203
11
44
18.454545
0.865854
0
0
0
0
0
0.024631
0
0
0
0
0
0
1
0
true
0
0.25
0
0.75
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
5
ee29864620b1c68ba1328444aa5f86fd728af26d
204
py
Python
entities/admin.py
acdh-oeaw/vhioe
83c8bce83d7cb21150f404409477d2cd1c7ee240
[ "MIT" ]
null
null
null
entities/admin.py
acdh-oeaw/vhioe
83c8bce83d7cb21150f404409477d2cd1c7ee240
[ "MIT" ]
10
2020-02-11T23:56:16.000Z
2021-12-13T19:45:38.000Z
entities/admin.py
acdh-oeaw/vhioe
83c8bce83d7cb21150f404409477d2cd1c7ee240
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * admin.site.register(Archiv) admin.site.register(Institution) admin.site.register(Person) admin.site.register(Bearbeiter) admin.site.register(Band)
20.4
32
0.813725
28
204
5.928571
0.464286
0.271084
0.512048
0
0
0
0
0
0
0
0
0
0.073529
204
9
33
22.666667
0.878307
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.285714
0
0.285714
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
ee2c1097869c99066c76a908e16bb499bf5a6bc2
36
py
Python
tests/__init__.py
shpotes/arcliv
3b68ea08383a76231e7c2b31818ea24374daa231
[ "MIT" ]
null
null
null
tests/__init__.py
shpotes/arcliv
3b68ea08383a76231e7c2b31818ea24374daa231
[ "MIT" ]
null
null
null
tests/__init__.py
shpotes/arcliv
3b68ea08383a76231e7c2b31818ea24374daa231
[ "MIT" ]
null
null
null
"""Unit test package for arcliv."""
18
35
0.666667
5
36
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
1
36
36
0.774194
0.805556
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
ee624c7aabffbc11b997361565fd0a90f3415960
107
py
Python
graphgallery/nn/models/pyg/autoencoder/__init__.py
TobiasSchmidtDE/GraphGallery
e627e4f454e0ce3813171305a524f5190a6e6f45
[ "MIT" ]
null
null
null
graphgallery/nn/models/pyg/autoencoder/__init__.py
TobiasSchmidtDE/GraphGallery
e627e4f454e0ce3813171305a524f5190a6e6f45
[ "MIT" ]
null
null
null
graphgallery/nn/models/pyg/autoencoder/__init__.py
TobiasSchmidtDE/GraphGallery
e627e4f454e0ce3813171305a524f5190a6e6f45
[ "MIT" ]
null
null
null
from .loss import BCELoss from .autoencoder import AutoEncoder from .gae import GAE from .vgae import VGAE
21.4
36
0.813084
16
107
5.4375
0.4375
0
0
0
0
0
0
0
0
0
0
0
0.149533
107
4
37
26.75
0.956044
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
ee791f8e4b9ade5c0f0fa329fa811c89b5171c35
24
py
Python
jesse/version.py
stjordanis/jesse
ccbc8697ff51d34d62374c28e3f24db9e9feae8e
[ "MIT" ]
null
null
null
jesse/version.py
stjordanis/jesse
ccbc8697ff51d34d62374c28e3f24db9e9feae8e
[ "MIT" ]
18
2021-11-01T19:17:00.000Z
2022-03-08T19:20:59.000Z
jesse/version.py
stjordanis/jesse
ccbc8697ff51d34d62374c28e3f24db9e9feae8e
[ "MIT" ]
null
null
null
__version__ = '0.27.11'
12
23
0.666667
4
24
3
1
0
0
0
0
0
0
0
0
0
0
0.238095
0.125
24
1
24
24
0.333333
0
0
0
0
0
0.291667
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c9d20a30a7bf7759498bb76b84bd5117e4c5bfcb
2,685
py
Python
common_comment.py
chinaran/common-comment
102ee411a68cdf3c71c09d60b253b98e379497d5
[ "Apache-2.0" ]
null
null
null
common_comment.py
chinaran/common-comment
102ee411a68cdf3c71c09d60b253b98e379497d5
[ "Apache-2.0" ]
null
null
null
common_comment.py
chinaran/common-comment
102ee411a68cdf3c71c09d60b253b98e379497d5
[ "Apache-2.0" ]
1
2018-09-19T15:04:09.000Z
2018-09-19T15:04:09.000Z
import datetime, getpass import sublime, sublime_plugin import datetime import os # 优化文件路径 # 包含 github.com 的文件路径从 github.com 开始,否则只保留名字 def handle_code_file_path(file_path): i = file_path.find("github.com") if i == -1: return os.path.basename(file_path) return file_path[i:] # 添加文件开头注释 class AddFileCommentCommand(sublime_plugin.TextCommand): def run(self, edit): file_path = self.view.file_name() if file_path is None: print("Can not comment without file") return if file_path.endswith(".py"): self.view.run_command("insert_snippet", { "contents": '"""' "\n" " Author: alan (wangran@rxthinking.com)" "\n" " Created Time: " "%s" %datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n" " File Name: " "%s" %handle_code_file_path(file_path) + "\n" " Description: " "\n" '"""' } ) else: # go c/c++ self.view.run_command("insert_snippet", { "contents": "/**""\n" " * Author: alan (wangran@rxthinking.com)" "\n" " * Created Time: " "%s" %datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n" " * File Name: " "%s" %handle_code_file_path(file_path) + "\n" " * Description: " "\n" " */" } ) # 添加代码块注释 class AddCodeBlockCommentCommand(sublime_plugin.TextCommand): def run(self, edit): file_path = self.view.file_name() if file_path is None: print("Can not comment without file") return if file_path.endswith(".py"): self.view.run_command("insert_snippet", { "contents": '"""' "\n" " Author: alan (wangran@rxthinking.com)" "\n" " Code Time: " "%s" %datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n" " Description: " "\n" '"""' } ) else: # go c/c++ self.view.run_command("insert_snippet", { "contents": "/**""\n" " * Author: alan (wangran@rxthinking.com)" "\n" " * Code Time: " "%s" %datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") + "\n" " * Description: " "\n" " */" } )
36.780822
111
0.438734
260
2,685
4.4
0.253846
0.104895
0.034965
0.062937
0.777972
0.777972
0.755245
0.755245
0.755245
0.755245
0
0.000632
0.410428
2,685
72
112
37.291667
0.722047
0.031285
0
0.539683
0
0
0.252603
0.037023
0
0
0
0
0
1
0.047619
false
0.015873
0.063492
0
0.206349
0.031746
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
c9e8c4f3d383b9f818cbb35d9d7fa244a746df53
64
py
Python
abstract-factory/Example/example.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
abstract-factory/Example/example.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
abstract-factory/Example/example.py
Tomvictor/python-design-patterns
6b99607d721bbe03d26a0a451a10e88cd1c1d112
[ "MIT" ]
null
null
null
import sys print("We running Python Version: " + sys.version)
21.333333
51
0.71875
9
64
5.111111
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.171875
64
2
52
32
0.867925
0
0
0
0
0
0.435484
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
c9ee61387c5a9d37778f1cc626a025a57b0d6f14
159
py
Python
indra/ontology/virtual/__init__.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
136
2016-02-11T22:06:37.000Z
2022-03-31T17:26:20.000Z
indra/ontology/virtual/__init__.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
748
2016-02-03T16:27:56.000Z
2022-03-09T14:27:54.000Z
indra/ontology/virtual/__init__.py
zebulon2/indra
7727ddcab52ad8012eb6592635bfa114e904bd48
[ "BSD-2-Clause" ]
56
2015-08-28T14:03:44.000Z
2022-02-04T06:15:55.000Z
"""This module implements a virtual ontology which communicates with a REST service to perform all ontology functions.""" from .ontology import VirtualOntology
53
68
0.823899
21
159
6.238095
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.125786
159
3
69
53
0.942446
0.72327
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
c9f6f5036c8246da2a8b07f0d67958f6fb36bbe6
79
py
Python
python/devserver.py
OpenCIOC/communityrepo
63199a7b620f5c08624e534faf771e5dd2243adb
[ "Apache-2.0" ]
null
null
null
python/devserver.py
OpenCIOC/communityrepo
63199a7b620f5c08624e534faf771e5dd2243adb
[ "Apache-2.0" ]
null
null
null
python/devserver.py
OpenCIOC/communityrepo
63199a7b620f5c08624e534faf771e5dd2243adb
[ "Apache-2.0" ]
null
null
null
import sys from pyramid.scripts.pserve import main sys.exit(main(sys.argv))
13.166667
39
0.772152
14
79
4.428571
0.714286
0.225806
0
0
0
0
0
0
0
0
0
0
0.113924
79
5
40
15.8
0.871429
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.666667
null
null
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
1
0
0
0
1
0
0
0
0
5
c9fb23bf71dac1f7a02b88d64a40ed15c85218c6
96
py
Python
ppq/quantization/analyise/__init__.py
joker255x/ppq
51bd031b0f50b63d32c4848a2c678a7b9e3d2957
[ "Apache-2.0" ]
1
2021-12-31T10:35:50.000Z
2021-12-31T10:35:50.000Z
ppq/quantization/analyise/__init__.py
joker255x/ppq
51bd031b0f50b63d32c4848a2c678a7b9e3d2957
[ "Apache-2.0" ]
null
null
null
ppq/quantization/analyise/__init__.py
joker255x/ppq
51bd031b0f50b63d32c4848a2c678a7b9e3d2957
[ "Apache-2.0" ]
null
null
null
from .layerwise import tracing_cosine_similarity from .graphwise import graph_similarity_analyse
48
48
0.90625
12
96
6.916667
0.75
0
0
0
0
0
0
0
0
0
0
0
0.072917
96
2
49
48
0.932584
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
a01bfa726dbda1109c1efb0fee67a4f102cc8dca
9,147
py
Python
tests/ipv6_link_local_test.py
sg893052/sonic-utilities
fdb79b8d65b8ca22232f4e6b140f593dd01613d5
[ "Apache-2.0" ]
91
2016-03-23T14:24:41.000Z
2022-03-18T20:25:37.000Z
tests/ipv6_link_local_test.py
sg893052/sonic-utilities
fdb79b8d65b8ca22232f4e6b140f593dd01613d5
[ "Apache-2.0" ]
1,495
2017-02-15T10:49:10.000Z
2022-03-31T18:49:56.000Z
tests/ipv6_link_local_test.py
sg893052/sonic-utilities
fdb79b8d65b8ca22232f4e6b140f593dd01613d5
[ "Apache-2.0" ]
466
2016-04-25T09:31:23.000Z
2022-03-31T06:54:17.000Z
import os from click.testing import CliRunner import config.main as config import show.main as show from utilities_common.db import Db show_ipv6_link_local_mode_output="""\ +------------------+----------+ | Interface Name | Mode | +==================+==========+ | Ethernet0 | Disabled | +------------------+----------+ | Ethernet4 | Disabled | +------------------+----------+ | Ethernet8 | Disabled | +------------------+----------+ | Ethernet12 | Disabled | +------------------+----------+ | Ethernet16 | Disabled | +------------------+----------+ | Ethernet20 | Disabled | +------------------+----------+ | Ethernet24 | Disabled | +------------------+----------+ | Ethernet28 | Disabled | +------------------+----------+ | Ethernet32 | Disabled | +------------------+----------+ | Ethernet36 | Disabled | +------------------+----------+ | Ethernet40 | Disabled | +------------------+----------+ | Ethernet44 | Disabled | +------------------+----------+ | Ethernet48 | Disabled | +------------------+----------+ | Ethernet52 | Disabled | +------------------+----------+ | Ethernet56 | Disabled | +------------------+----------+ | Ethernet60 | Disabled | +------------------+----------+ | Ethernet64 | Disabled | +------------------+----------+ | Ethernet68 | Disabled | +------------------+----------+ | Ethernet72 | Disabled | +------------------+----------+ | Ethernet76 | Disabled | +------------------+----------+ | Ethernet80 | Disabled | +------------------+----------+ | Ethernet84 | Disabled | +------------------+----------+ | Ethernet88 | Disabled | +------------------+----------+ | Ethernet92 | Disabled | +------------------+----------+ | Ethernet96 | Disabled | +------------------+----------+ | Ethernet100 | Disabled | +------------------+----------+ | Ethernet104 | Disabled | +------------------+----------+ | Ethernet108 | Disabled | +------------------+----------+ | Ethernet112 | Disabled | +------------------+----------+ | Ethernet116 | Disabled | +------------------+----------+ | Ethernet120 | Disabled | +------------------+----------+ | Ethernet124 | Disabled | +------------------+----------+ | PortChannel1001 | Disabled | +------------------+----------+ | PortChannel0001 | Disabled | +------------------+----------+ | PortChannel0002 | Disabled | +------------------+----------+ | PortChannel0003 | Disabled | +------------------+----------+ | PortChannel0004 | Disabled | +------------------+----------+ | Vlan1000 | Disabled | +------------------+----------+ | Vlan2000 | Disabled | +------------------+----------+ | Vlan3000 | Disabled | +------------------+----------+ | Vlan4000 | Disabled | +------------------+----------+ """ class TestIPv6LinkLocal(object): @classmethod def setup_class(cls): os.environ['UTILITIES_UNIT_TESTING'] = "1" print("SETUP") def test_show_ipv6_link_local_mode(self): runner = CliRunner() db = Db() obj = {'db':db.cfgdb} # show ipv6 link-local-mode output result = runner.invoke(show.cli.commands["ipv6"].commands["link-local-mode"], [], obj=obj) print(result.output) assert result.output == show_ipv6_link_local_mode_output def test_config_enable_disable_ipv6_link_local_on_physical_interface(self): runner = CliRunner() db = Db() obj = {'db':db.cfgdb} # Enable ipv6 link local on Ethernet0 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["enable"].commands["use-link-local-only"], ["Ethernet0"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code == 0 assert result.output == '' # Disable ipv6 link local on Ethernet0 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["disable"].commands["use-link-local-only"], ["Ethernet0"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code == 0 assert result.output == '' def test_config_enable_disable_ipv6_link_local_on_portchannel_interface(self): runner = CliRunner() db = Db() obj = {'db':db.cfgdb} # Enable ipv6 link local on PortChannel0001 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["enable"].commands["use-link-local-only"], ["PortChannel0001"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code == 0 assert result.output == '' # Disable ipv6 link local on PortChannel0001 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["disable"].commands["use-link-local-only"], ["PortChannel0001"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code == 0 assert result.output == '' def test_config_enable_disable_ipv6_link_local_on_invalid_interface(self): runner = CliRunner() db = Db() obj = {'db':db.cfgdb} # Enable ipv6 link local on PortChannel1 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["enable"].commands["use-link-local-only"], ["PortChannel1"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code != 0 assert 'Error: Interface name PortChannel1 is invalid. Please enter a valid interface name!!' in result.output # Disable ipv6 link local on Ethernet500 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["disable"].commands["use-link-local-only"], ["Ethernet500"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code != 0 assert 'Error: Interface name Ethernet500 is invalid. Please enter a valid interface name!!' in result.output def test_config_enable_disable_ipv6_link_local_on_interface_which_is_member_of_vlan(self): runner = CliRunner() db = Db() obj = {'db':db.cfgdb} # Enable ipv6 link local on Ethernet16 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["enable"].commands["use-link-local-only"], ["Ethernet16"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code != 0 assert 'Error: Ethernet16 is configured as a member of vlan. Cannot configure the IPv6 link local mode!' in result.output # Disable ipv6 link local on Ethernet16 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["disable"].commands["use-link-local-only"], ["Ethernet16"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code != 0 assert 'Error: Ethernet16 is configured as a member of vlan. Cannot configure the IPv6 link local mode!' in result.output def test_config_enable_disable_ipv6_link_local_on_interface_which_is_member_of_portchannel(self): runner = CliRunner() db = Db() obj = {'db':db.cfgdb} # Enable ipv6 link local on Ethernet32 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["enable"].commands["use-link-local-only"], ["Ethernet32"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code != 0 assert 'Error: Ethernet32 is configured as a member of portchannel. Cannot configure the IPv6 link local mode!' in result.output # Disable ipv6 link local on Ethernet32 result = runner.invoke(config.config.commands["interface"].commands["ipv6"].commands["disable"].commands["use-link-local-only"], ["Ethernet32"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code != 0 assert 'Error: Ethernet32 is configured as a member of portchannel. Cannot configure the IPv6 link local mode!' in result.output def test_config_enable_disable_ipv6_link_local_on_all_valid_interfaces(self): runner = CliRunner() db = Db() obj = {'db':db.cfgdb} # Enable ipv6 link local on all interfaces result = runner.invoke(config.config.commands["ipv6"].commands["enable"].commands["link-local"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code == 0 assert result.output == '' # Disable ipv6 link local on all interfaces result = runner.invoke(config.config.commands["ipv6"].commands["disable"].commands["link-local"], obj=obj) print(result.exit_code) print(result.output) assert result.exit_code == 0 assert result.output == '' @classmethod def teardown_class(cls): os.environ['UTILITIES_UNIT_TESTING'] = "0" print("TEARDOWN")
39.426724
166
0.554171
885
9,147
5.60452
0.128814
0.070766
0.068145
0.054435
0.76129
0.748589
0.732863
0.717944
0.713508
0.706452
0
0.029307
0.201705
9,147
231
167
39.597403
0.649959
0.054772
0
0.583333
0
0
0.45325
0.159541
0
0
0
0
0.130208
1
0.046875
false
0
0.026042
0
0.078125
0.140625
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
4e7438e5c8cba699dbf5a441a23c0748173ae973
247
py
Python
src/modules/agents/__init__.py
James0618/pymarl
586e1638cb87c9b6f77ac3438dc2d44e698767f1
[ "Apache-2.0" ]
null
null
null
src/modules/agents/__init__.py
James0618/pymarl
586e1638cb87c9b6f77ac3438dc2d44e698767f1
[ "Apache-2.0" ]
null
null
null
src/modules/agents/__init__.py
James0618/pymarl
586e1638cb87c9b6f77ac3438dc2d44e698767f1
[ "Apache-2.0" ]
null
null
null
REGISTRY = {} from .rnn_agent import RNNAgent from .new_agent import StateEstimation, ValueEstimation, TransitionModel, OpponentModel REGISTRY["rnn"] = RNNAgent REGISTRY["new"] = StateEstimation, ValueEstimation, TransitionModel, OpponentModel
27.444444
87
0.809717
23
247
8.608696
0.478261
0.111111
0.454545
0.585859
0
0
0
0
0
0
0
0
0.105263
247
8
88
30.875
0.895928
0
0
0
0
0
0.024292
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
4ea53bf661db0b5423a7c7cc19f029e86e467ee6
300
py
Python
tests/test_methods/test_workflows.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
2
2020-09-24T00:07:13.000Z
2020-09-27T19:27:06.000Z
tests/test_methods/test_workflows.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
null
null
null
tests/test_methods/test_workflows.py
jackwardell/SlackTime
c40be4854a26084e1a368a975e220d613c14d8d8
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- def test_workflows_step_completed(slack_time): assert slack_time.workflows.step_completed def test_workflows_step_failed(slack_time): assert slack_time.workflows.step_failed def test_workflows_update_step(slack_time): assert slack_time.workflows.update_step
21.428571
46
0.803333
42
300
5.309524
0.309524
0.242152
0.215247
0.269058
0.479821
0.479821
0.331839
0
0
0
0
0.003774
0.116667
300
13
47
23.076923
0.837736
0.07
0
0
0
0
0
0
0
0
0
0
0.5
1
0.5
false
0
0
0
0.5
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
5
4eac613caa509d072652c37b0896e979988c8a83
184
py
Python
api/poll/admin.py
gyukebox/minivite-api
b7cbf9a95baecd50536e5f69ae0fa5bb44a2a03a
[ "MIT" ]
null
null
null
api/poll/admin.py
gyukebox/minivite-api
b7cbf9a95baecd50536e5f69ae0fa5bb44a2a03a
[ "MIT" ]
null
null
null
api/poll/admin.py
gyukebox/minivite-api
b7cbf9a95baecd50536e5f69ae0fa5bb44a2a03a
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * # Register your models here. admin.site.register(PollModel) admin.site.register(SelectionModel) admin.site.register(ResultModel)
26.285714
35
0.820652
24
184
6.291667
0.541667
0.178808
0.337748
0
0
0
0
0
0
0
0
0
0.086957
184
7
36
26.285714
0.89881
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
14d59f18389b15f335bf2ab57d548bc8c72c6a7f
72
py
Python
test/test_solve.py
rohan999chaudhary/rohan-rk4
372534c5f0a38b1f838b6cf8c57e4db2947231e2
[ "MIT" ]
null
null
null
test/test_solve.py
rohan999chaudhary/rohan-rk4
372534c5f0a38b1f838b6cf8c57e4db2947231e2
[ "MIT" ]
null
null
null
test/test_solve.py
rohan999chaudhary/rohan-rk4
372534c5f0a38b1f838b6cf8c57e4db2947231e2
[ "MIT" ]
null
null
null
import rohan-rk4 def test_solve(): assert rohan-rk4.solve() == 42
12
34
0.666667
11
72
4.272727
0.727273
0.340426
0
0
0
0
0
0
0
0
0
0.068966
0.194444
72
5
35
14.4
0.741379
0
0
0
0
0
0
0
0
0
0
0
0.333333
0
null
null
0
0.333333
null
null
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
1
0
0
0
1
0
0
0
0
5
14dccb86a4a0d3b81df5ff91e202d580ef58dc64
4,680
py
Python
mysite/webapp1/models.py
obaidr76/CKD
c92faa6e08c2a896f467a54ee5d1186a47325553
[ "Apache-2.0" ]
null
null
null
mysite/webapp1/models.py
obaidr76/CKD
c92faa6e08c2a896f467a54ee5d1186a47325553
[ "Apache-2.0" ]
2
2019-04-16T17:35:43.000Z
2019-04-27T18:34:54.000Z
mysite/webapp1/models.py
obaidr76/CKD
c92faa6e08c2a896f467a54ee5d1186a47325553
[ "Apache-2.0" ]
1
2019-04-16T06:31:14.000Z
2019-04-16T06:31:14.000Z
from django.db import models from django.utils import timezone # Create your models here. class Login(models.Model): username = models.CharField(max_length=200,primary_key=True) patient_id = models.CharField(max_length=30,default='00000000') password = models.CharField(max_length=40) email = models.CharField(max_length=50,default='abc@gmail.com') objects = models.Manager() DoesNotExist = models.ObjectDoesNotExist class Profile(models.Model): username=models.OneToOneField(Login,primary_key=True,on_delete=models.CASCADE) name=models.CharField(max_length=200) gender=models.CharField(max_length=1) dob=models.DateField() mobile=models.CharField(max_length=10) email=models.CharField(max_length=50) photo=models.CharField(max_length=50) class Address(models.Model): username=models.OneToOneField(Login,primary_key=True,on_delete=models.CASCADE) addressl1=models.CharField(max_length=60) addressl2=models.CharField(max_length=60) addcity=models.CharField(max_length=15) addstate=models.CharField(max_length=15) addzip=models.CharField(max_length=6) class Medical1(models.Model): username=models.OneToOneField(Login,primary_key=True,on_delete=models.CASCADE) fever=models.CharField(max_length=9) highbp=models.CharField(max_length=9) lowbp=models.CharField(max_length=9) seizures=models.CharField(max_length=9) heart_d=models.CharField(max_length=9) fainting=models.CharField(max_length=9) diabetes=models.CharField(max_length=9) cholestrol=models.CharField(max_length=9) palp=models.CharField(max_length=9) otherdetail=models.CharField(max_length=500,default='----') class Reports(models.Model): reference_id = models.CharField(max_length=12,primary_key=True) patient_id = models.CharField(max_length=30) #models.ForeignKey(Login,on_delete = 'CASCADE') age = models.IntegerField() albumin =models.DecimalField(decimal_places = 4,max_digits = 9) rbc = models.BooleanField() bgr = models.DecimalField(decimal_places = 4,max_digits = 9) bu = models.DecimalField(decimal_places = 4,max_digits = 9) createnine = models.DecimalField(decimal_places = 4,max_digits = 9) sodium = models.DecimalField(decimal_places = 4,max_digits = 9) patassium=models.DecimalField(decimal_places = 4,max_digits = 9) haemoglobin = models.DecimalField(decimal_places = 4,max_digits = 9) wbcc =models.DecimalField(decimal_places = 4,max_digits = 9) rbcc =models.DecimalField(decimal_places = 4,max_digits = 9) hypertension = models.BooleanField() diabetes = models.BooleanField() egfr = models.DecimalField(decimal_places = 4,max_digits = 9) acr = models.DecimalField(decimal_places = 4,max_digits = 9) pred = models.BooleanField() stage = models.CharField(max_length=5) date= models.DateField(default=timezone.now) class Review(models.Model): username = models.CharField(max_length=200) photo = models.CharField(max_length=50) review = models.CharField(max_length=100) rating = models.IntegerField(default=1) class Doc_login(models.Model): username = models.CharField(max_length=200,primary_key=True) password = models.CharField(max_length=40) email = models.CharField(max_length=50,default='abc@gmail.com') class Doc_profile(models.Model): username = models.OneToOneField(Doc_login,primary_key=True,on_delete=models.CASCADE) name=models.CharField(max_length=200) gender=models.CharField(max_length=1) qualifications=models.CharField(max_length=200) mobile=models.CharField(max_length=10) email=models.CharField(max_length=50) photo=models.CharField(max_length=50) class Doc_address(models.Model): username=models.OneToOneField(Doc_login,primary_key=True,on_delete=models.CASCADE) addressl1=models.CharField(max_length=60) addressl2=models.CharField(max_length=60) addcity=models.CharField(max_length=15) addstate=models.CharField(max_length=15) addzip=models.CharField(max_length=6) class Report_sent(models.Model): doctor = models.CharField(max_length=200) patient = models.CharField(max_length=200) patient_id = models.CharField(max_length=30,default='00000000') reference_id = models.CharField(max_length=12,primary_key=True) class Conversation(models.Model): patient_id = models.CharField(max_length=30,default='00000000') patient = models.CharField(max_length=200) doctor = models.CharField(max_length=200) photo=models.CharField(max_length=50) msg = models.CharField(max_length=500)
40
88
0.748077
611
4,680
5.561375
0.184943
0.233961
0.280753
0.374338
0.790171
0.700118
0.660388
0.660388
0.518835
0.484991
0
0.039006
0.139957
4,680
116
89
40.344828
0.805217
0.014957
0
0.456522
0
0
0.011729
0
0
0
0
0
0
1
0
false
0.021739
0.021739
0
1
0
0
0
0
null
1
1
1
0
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
1
0
0
5
09419d658ef7d7f309cfc15fbd8cc10d77b8e383
78
py
Python
tests/functional/conftest.py
soleil0-0/pyinstaller
4249a7347f6b81aba9825ded8addb92ee0f85ea9
[ "Apache-2.0" ]
2
2017-02-08T22:22:09.000Z
2020-10-08T12:28:36.000Z
tests/functional/conftest.py
jeremysanders/pyinstaller
321b24f9a9a5978337735816b36ca6b4a90a2fb4
[ "Apache-2.0" ]
3
2020-04-06T15:48:37.000Z
2021-03-23T10:22:21.000Z
tests/functional/conftest.py
jeremysanders/pyinstaller
321b24f9a9a5978337735816b36ca6b4a90a2fb4
[ "Apache-2.0" ]
4
2018-06-04T20:40:37.000Z
2020-10-13T22:38:40.000Z
# Bring all fixtures into this file. from PyInstaller.utils.conftest import *
26
40
0.794872
11
78
5.636364
1
0
0
0
0
0
0
0
0
0
0
0
0.141026
78
2
41
39
0.925373
0.435897
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
11a3b3d2544f2815355c9606872b4da5c440f8b8
143
py
Python
src/model/lib.py
mannam95/ITSEC21
43fdeed6c05c369af1460dc639adea6fbd6d0ee2
[ "MIT" ]
null
null
null
src/model/lib.py
mannam95/ITSEC21
43fdeed6c05c369af1460dc639adea6fbd6d0ee2
[ "MIT" ]
null
null
null
src/model/lib.py
mannam95/ITSEC21
43fdeed6c05c369af1460dc639adea6fbd6d0ee2
[ "MIT" ]
null
null
null
import tensorflow as tf import os import pathlib import time import datetime from matplotlib import pyplot as plt from IPython import display
15.888889
36
0.839161
22
143
5.454545
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.160839
143
9
37
15.888889
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
11b6b8e7378e5e92d4e10d187b4b38317028339d
1,851
py
Python
img2poem/code/src/symbol_sentiment.py
Novemser/GoogleAIWinterCamp-img2poem
8a5f48350861a849b2d46e5e6e8800caeb01b6b7
[ "Apache-2.0" ]
1
2019-01-17T11:02:40.000Z
2019-01-17T11:02:40.000Z
img2poem/code/src/symbol_sentiment.py
xuhuaren/GoogleAIWinterCamp-img2poem
4bb697b46f7ffa50dd45939acc9973632a3b84f8
[ "Apache-2.0" ]
null
null
null
img2poem/code/src/symbol_sentiment.py
xuhuaren/GoogleAIWinterCamp-img2poem
4bb697b46f7ffa50dd45939acc9973632a3b84f8
[ "Apache-2.0" ]
1
2019-01-16T08:02:27.000Z
2019-01-16T08:02:27.000Z
import mxnet as mx def LRN(x): lrn_kwargs = { 'knorm': 1, 'alpha': 1e-4, 'beta' : 0.75, 'nsize': 5, } x = mx.sym.LRN(data = x, **lrn_kwargs) return x def get_sym(): x = mx.sym.Variable(name = 'data') x = mx.sym.Convolution(data = x, num_filter = 96, kernel = (11, 11), stride = (4, 4), name = 'conv1_A') x = mx.sym.Activation(data = x, act_type = 'relu') x = mx.sym.Pooling(data = x, kernel = (3, 3), pool_type = 'max', stride = (2, 2), pooling_convention = 'full') x = LRN(x) # 27 * 27 x = mx.sym.Convolution(data = x, num_filter = 256, kernel = (5, 5), pad = (2, 2), num_group = 2, name = 'conv2_A') x = mx.sym.Activation(data = x, act_type = 'relu') x = mx.sym.Pooling(data = x, kernel = (3, 3), pool_type = 'max', stride = (2, 2), pooling_convention = 'full') x = LRN(x) # 13 * 13 x = mx.sym.Convolution(data = x, num_filter = 384, kernel = (3, 3), pad = (1, 1), name = 'conv3_A') x = mx.sym.Activation(data = x, act_type = 'relu') x = mx.sym.Convolution(data = x, num_filter = 384, kernel = (3, 3), pad = (1, 1), num_group = 2, name = 'conv4_A') x = mx.sym.Activation(data = x, act_type = 'relu') x = mx.sym.Convolution(data = x, num_filter = 256, kernel = (3, 3), pad = (1, 1), num_group = 2, name = 'conv5_A') x = mx.sym.Activation(data = x, act_type = 'relu') x = mx.sym.Pooling(data = x, kernel = (3, 3), pool_type = 'max', stride = (2, 2), pooling_convention = 'full') x = mx.sym.flatten(x) x = mx.sym.FullyConnected(data = x, num_hidden = 4096, name = 'fc6_A') x = mx.sym.Activation(data = x, act_type = 'relu', name = 'relu6_A') x = mx.sym.FullyConnected(data = x, num_hidden = 4096, name = 'fc7_A') x = mx.sym.Activation(data = x, act_type = 'relu', name = 'relu7_A') return x
43.046512
118
0.563479
301
1,851
3.348837
0.20598
0.059524
0.119048
0.055556
0.763889
0.763889
0.763889
0.763889
0.733135
0.733135
0
0.059626
0.247974
1,851
42
119
44.071429
0.664511
0.008104
0
0.363636
0
0
0.071468
0
0
0
0
0
0
1
0.060606
false
0
0.030303
0
0.151515
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
11b7f419a327bbf3ca9579ef9185105c3c35cf1d
105
py
Python
apps/usuarios/admin.py
franric/Controle-Visitante
5ca0c423885167c9d096e6f7ee48d238e64566f3
[ "MIT" ]
null
null
null
apps/usuarios/admin.py
franric/Controle-Visitante
5ca0c423885167c9d096e6f7ee48d238e64566f3
[ "MIT" ]
null
null
null
apps/usuarios/admin.py
franric/Controle-Visitante
5ca0c423885167c9d096e6f7ee48d238e64566f3
[ "MIT" ]
null
null
null
from django.contrib import admin from apps.usuarios.models import Usuario admin.site.register(Usuario)
17.5
40
0.828571
15
105
5.8
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.104762
105
5
41
21
0.925532
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
11f872674b3b578d03e65b79e585fa2ea5d5b770
211
py
Python
esk/controller/exceptions.py
esk8s/esk
0e559fbec7e70be140afac0c8961700f8145e704
[ "Apache-2.0" ]
1
2021-04-08T13:07:18.000Z
2021-04-08T13:07:18.000Z
esk/controller/exceptions.py
esk8s/esk
0e559fbec7e70be140afac0c8961700f8145e704
[ "Apache-2.0" ]
null
null
null
esk/controller/exceptions.py
esk8s/esk
0e559fbec7e70be140afac0c8961700f8145e704
[ "Apache-2.0" ]
null
null
null
class ESKException(Exception): def __init__(self, status_code, message): self.status = status_code self.message = message def __str__(self) -> str: return f"{ self.status }: { self.message }"
26.375
49
0.677725
26
211
5.115385
0.461538
0.225564
0
0
0
0
0
0
0
0
0
0
0.199052
211
8
49
26.375
0.786982
0
0
0
0
0
0.156398
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
ee9b8eaa1d29d10ff7fb57a677561197960b8962
20
py
Python
demisto_sdk/tests/test_files/DummyPackXsoarMPOnly/Integrations/DummyIntegration/DummyIntegration.py
SergeBakharev/demisto-sdk
17d00942a1bd33039a8aba9ddffecfd81008d275
[ "MIT" ]
null
null
null
demisto_sdk/tests/test_files/DummyPackXsoarMPOnly/Integrations/DummyIntegration/DummyIntegration.py
SergeBakharev/demisto-sdk
17d00942a1bd33039a8aba9ddffecfd81008d275
[ "MIT" ]
null
null
null
demisto_sdk/tests/test_files/DummyPackXsoarMPOnly/Integrations/DummyIntegration/DummyIntegration.py
SergeBakharev/demisto-sdk
17d00942a1bd33039a8aba9ddffecfd81008d275
[ "MIT" ]
null
null
null
# Dummy Integration
10
19
0.8
2
20
8
1
0
0
0
0
0
0
0
0
0
0
0
0.15
20
1
20
20
0.941176
0.85
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
eebcb8bbbd7cd31633982afec32f831830b59ec2
156
py
Python
advancedcbv/cbv/admin.py
barmandwaipayan/DjangoCRUD
323c0238aa22a646eb99b5ddbe94ab1773fb4ca8
[ "MIT" ]
null
null
null
advancedcbv/cbv/admin.py
barmandwaipayan/DjangoCRUD
323c0238aa22a646eb99b5ddbe94ab1773fb4ca8
[ "MIT" ]
null
null
null
advancedcbv/cbv/admin.py
barmandwaipayan/DjangoCRUD
323c0238aa22a646eb99b5ddbe94ab1773fb4ca8
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import School, Student # Register your models here. admin.site.register(School) admin.site.register(Student)
22.285714
35
0.807692
22
156
5.727273
0.545455
0.142857
0.269841
0
0
0
0
0
0
0
0
0
0.108974
156
6
36
26
0.906475
0.166667
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
eebd0252a018d5f90f8e1ae1d52b1f399e93fbc1
87
py
Python
deploy/virenv/lib/python2.7/site-packages/ptrace/__init__.py
wangvictor2012/liuwei
0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1
[ "BSD-3-Clause" ]
null
null
null
deploy/virenv/lib/python2.7/site-packages/ptrace/__init__.py
wangvictor2012/liuwei
0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1
[ "BSD-3-Clause" ]
null
null
null
deploy/virenv/lib/python2.7/site-packages/ptrace/__init__.py
wangvictor2012/liuwei
0a06f8fd56d78162f81f1e7e7def7bfdeb4472e1
[ "BSD-3-Clause" ]
null
null
null
from ptrace.signames import SIGNAMES, signalName from ptrace.error import PtraceError
21.75
48
0.850575
11
87
6.727273
0.636364
0.27027
0
0
0
0
0
0
0
0
0
0
0.114943
87
3
49
29
0.961039
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
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
1
0
0
0
0
5
010629547b5cef22ae0692c19b55eb4691af3153
32,528
py
Python
galpy/potential_src/TwoPowerTriaxialPotential.py
HaifengWangNAOC/galpyjobovy
b9eb44dffcd128e2ba3104c03757be7da15d25f9
[ "BSD-3-Clause" ]
null
null
null
galpy/potential_src/TwoPowerTriaxialPotential.py
HaifengWangNAOC/galpyjobovy
b9eb44dffcd128e2ba3104c03757be7da15d25f9
[ "BSD-3-Clause" ]
null
null
null
galpy/potential_src/TwoPowerTriaxialPotential.py
HaifengWangNAOC/galpyjobovy
b9eb44dffcd128e2ba3104c03757be7da15d25f9
[ "BSD-3-Clause" ]
1
2020-07-30T06:14:31.000Z
2020-07-30T06:14:31.000Z
############################################################################### # TwoPowerTriaxialPotential.py: General class for triaxial potentials # derived from densities with two power-laws # # amp/[4pia^3] # rho(r)= ------------------------------------ # (m/a)^\alpha (1+m/a)^(\beta-\alpha) # # with # # m^2 = x^2 + y^2/b^2 + z^2/c^2 ############################################################################### import hashlib import numpy from scipy import integrate, special from galpy.util import bovy_conversion, bovy_coords from galpy.util import _rotate_to_arbitrary_vector from galpy.potential_src.Potential import Potential, _APY_LOADED if _APY_LOADED: from astropy import units class TwoPowerTriaxialPotential(Potential): """Class that implements triaxial potentials that are derived from two-power density models .. math:: \\rho(x,y,z) = \\frac{\\mathrm{amp}}{4\\,\\pi\\,a^3}\\,\\frac{1}{(m/a)^\\alpha\\,(1+m/a)^{\\beta-\\alpha}} with .. math:: m^2 = x'^2 + \\frac{y'^2}{b^2}+\\frac{z'^2}{c^2} and :math:`(x',y',z')` is a rotated frame wrt :math:`(x,y,z)` specified by parameters ``zvec`` and ``pa`` which specify (a) ``zvec``: the location of the :math:`z'` axis in the :math:`(x,y,z)` frame and (b) ``pa``: the position angle of the :math:`x'` axis wrt the :math:`\\tilde{x}` axis, that is, the :math:`x` axis after rotating to ``zvec``. """ def __init__(self,amp=1.,a=5.,alpha=1.5,beta=3.5,b=1.,c=1., zvec=None,pa=None,glorder=50, normalize=False,ro=None,vo=None): """ NAME: __init__ PURPOSE: initialize a triaxial two-power-density potential INPUT: amp - amplitude to be applied to the potential (default: 1); can be a Quantity with units of mass or Gxmass a - scale radius (can be Quantity) alpha - inner power (0 <= alpha < 3) beta - outer power ( beta > 2) b - y-to-x axis ratio of the density c - z-to-x axis ratio of the density zvec= (None) If set, a unit vector that corresponds to the z axis pa= (None) If set, the position angle of the x axis (rad or Quantity) glorder= (50) if set, compute the relevant force and potential integrals with Gaussian quadrature of this order normalize - if True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1. ro=, vo= distance and velocity scales for translation into internal units (default from configuration file) OUTPUT: (none) HISTORY: 2016-05-30 - Started - Bovy (UofT) """ if alpha == 1 and beta == 4: Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass') HernquistSelf= TriaxialHernquistPotential(amp=1.,a=a,b=b,c=c, zvec=zvec,pa=pa, glorder=glorder, normalize=False) self.HernquistSelf= HernquistSelf self.JaffeSelf= None self.NFWSelf= None elif alpha == 2 and beta == 4: Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass') JaffeSelf= TriaxialJaffePotential(amp=1.,a=a,b=b,c=c, zvec=zvec,pa=pa,glorder=glorder, normalize=False) self.HernquistSelf= None self.JaffeSelf= JaffeSelf self.NFWSelf= None elif alpha == 1 and beta == 3: Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass') NFWSelf= TriaxialNFWPotential(amp=1.,a=a,b=b,c=c,pa=pa, glorder=glorder, zvec=zvec,normalize=False) self.HernquistSelf= None self.JaffeSelf= None self.NFWSelf= NFWSelf else: Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass') self.HernquistSelf= None self.JaffeSelf= None self.NFWSelf= None if _APY_LOADED and isinstance(a,units.Quantity): a= a.to(units.kpc).value/self._ro self.a= a self._scale= self.a if beta <= 2. or alpha < 0. or alpha >= 3.: raise IOError('TwoPowerTriaxialPotential requires 0 <= alpha < 3 and beta > 2') self.alpha= alpha self.beta= beta self._b= b self._c= c self._b2= self._b**2. self._c2= self._c**2. self._force_hash= None self._setup_zvec_pa(zvec,pa) self._setup_gl(glorder) if normalize or \ (isinstance(normalize,(int,float)) \ and not isinstance(normalize,bool)): #pragma: no cover self.normalize(normalize) if not self._aligned or numpy.fabs(self._b-1.) > 10.**-10.: self.isNonAxi= True return None def _setup_zvec_pa(self,zvec,pa): if not pa is None: if _APY_LOADED and isinstance(pa,units.Quantity): pa= pa.to(units.rad).value if zvec is None and (pa is None or numpy.fabs(pa) < 10.**-10.): self._aligned= True else: self._aligned= False if not pa is None: pa_rot= numpy.array([[numpy.cos(pa),numpy.sin(pa),0.], [-numpy.sin(pa),numpy.cos(pa),0.], [0.,0.,1.]]) else: pa_rot= numpy.eye(3) if not zvec is None: if not isinstance(zvec,numpy.ndarray): zvec= numpy.array(zvec) zvec/= numpy.sqrt(numpy.sum(zvec**2.)) zvec_rot= _rotate_to_arbitrary_vector(\ numpy.array([[0.,0.,1.]]),zvec,inv=True)[0] else: zvec_rot= numpy.eye(3) self._rot= numpy.dot(pa_rot,zvec_rot) return None def _setup_gl(self,glorder): self._glorder= glorder if self._glorder is None: self._glx, self._glw= None, None else: self._glx, self._glw=\ numpy.polynomial.legendre.leggauss(self._glorder) # Interval change self._glx= 0.5*self._glx+0.5 self._glw*= 0.5 return None def _evaluate(self,R,z,phi=0.,t=0.): """ NAME: _evaluate PURPOSE: evaluate the potential at R,z INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: Phi(R,z) HISTORY: 2016-05-30 - Started - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) if self._aligned: return self._evaluate_xyz(x,y,z) else: xyzp= numpy.dot(self._rot,numpy.array([x,y,z])) return self._evaluate_xyz(xyzp[0],xyzp[1],xyzp[2]) def _evaluate_xyz(self,x,y,z): """Evaluation of the potential as a function of (x,y,z) in the aligned coordinate frame""" if not self.HernquistSelf == None: return self.HernquistSelf._evaluate_xyz(x,y,z) elif not self.JaffeSelf == None: return self.JaffeSelf._evaluate_xyz(x,y,z) elif not self.NFWSelf == None: return self.NFWSelf._evaluate_xyz(x,y,z) else: if self.alpha == 2.: raise NotImplementedError('alpha=2 potential evaluation case not implemented') else: psi_inf=\ special.gamma(self.beta-2.)*special.gamma(3.-self.alpha)\ /special.gamma(self.beta-self.alpha) psi= lambda m:\ psi_inf-(m/self.a)**(2.-self.alpha)\ /(2.-self.alpha)\ *special.hyp2f1(2.-self.alpha, self.beta-self.alpha, 3.-self.alpha,-m/self.a) return -self._b*self._c/self.a\ *_potInt(x,y,z,psi,self._b2,self._c2,glx=self._glx,glw=self._glw) def _Rforce(self,R,z,phi=0.,t=0.): """ NAME: _Rforce PURPOSE: evaluate the radial force for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the radial force HISTORY: 2016-06-09 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) # Compute all rectangular forces new_hash= hashlib.md5(numpy.array([x,y,z])).hexdigest() if new_hash == self._force_hash: Fx= self._cached_Fx Fy= self._cached_Fy Fz= self._cached_Fz else: if self._aligned: xp, yp, zp= x, y, z else: xyzp= numpy.dot(self._rot,numpy.array([x,y,z])) xp, yp, zp= xyzp[0], xyzp[1], xyzp[2] Fx= self._xforce_xyz(xp,yp,zp) Fy= self._yforce_xyz(xp,yp,zp) Fz= self._zforce_xyz(xp,yp,zp) self._force_hash= new_hash self._cached_Fx= Fx self._cached_Fy= Fy self._cached_Fz= Fz if not self._aligned: Fxyz= numpy.dot(self._rot.T,numpy.array([Fx,Fy,Fz])) Fx, Fy= Fxyz[0], Fxyz[1] return numpy.cos(phi)*Fx+numpy.sin(phi)*Fy def _phiforce(self,R,z,phi=0.,t=0.): """ NAME: _phiforce PURPOSE: evaluate the azimuthal force for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the azimuthal force HISTORY: 2016-06-09 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) # Compute all rectangular forces new_hash= hashlib.md5(numpy.array([x,y,z])).hexdigest() if new_hash == self._force_hash: Fx= self._cached_Fx Fy= self._cached_Fy Fz= self._cached_Fz else: if self._aligned: xp, yp, zp= x, y, z else: xyzp= numpy.dot(self._rot,numpy.array([x,y,z])) xp, yp, zp= xyzp[0], xyzp[1], xyzp[2] Fx= self._xforce_xyz(xp,yp,zp) Fy= self._yforce_xyz(xp,yp,zp) Fz= self._zforce_xyz(xp,yp,zp) self._force_hash= new_hash self._cached_Fx= Fx self._cached_Fy= Fy self._cached_Fz= Fz if not self._aligned: Fxyz= numpy.dot(self._rot.T,numpy.array([Fx,Fy,Fz])) Fx, Fy= Fxyz[0], Fxyz[1] return R*(-numpy.sin(phi)*Fx+numpy.cos(phi)*Fy) def _zforce(self,R,z,phi=0.,t=0.): """ NAME: _zforce PURPOSE: evaluate the vertical force for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the vertical force HISTORY: 2016-06-09 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) # Compute all rectangular forces new_hash= hashlib.md5(numpy.array([x,y,z])).hexdigest() if new_hash == self._force_hash: Fx= self._cached_Fx Fy= self._cached_Fy Fz= self._cached_Fz else: if self._aligned: xp, yp, zp= x, y, z else: xyzp= numpy.dot(self._rot,numpy.array([x,y,z])) xp, yp, zp= xyzp[0], xyzp[1], xyzp[2] Fx= self._xforce_xyz(xp,yp,zp) Fy= self._yforce_xyz(xp,yp,zp) Fz= self._zforce_xyz(xp,yp,zp) self._force_hash= new_hash self._cached_Fx= Fx self._cached_Fy= Fy self._cached_Fz= Fz if not self._aligned: Fxyz= numpy.dot(self._rot.T,numpy.array([Fx,Fy,Fz])) Fz= Fxyz[2] return Fz def _xforce_xyz(self,x,y,z): """Evaluation of the x force as a function of (x,y,z) in the aligned coordinate frame""" return -self._b*self._c/self.a**3.\ *_forceInt(x,y,z, lambda m: (self.a/m)**self.alpha/(1.+m/self.a)**(self.beta-self.alpha), self._b2,self._c2,0,glx=self._glx,glw=self._glw) def _yforce_xyz(self,x,y,z): """Evaluation of the y force as a function of (x,y,z) in the aligned coordinate frame""" return -self._b*self._c/self.a**3.\ *_forceInt(x,y,z, lambda m: (self.a/m)**self.alpha/(1.+m/self.a)**(self.beta-self.alpha), self._b2,self._c2,1,glx=self._glx,glw=self._glw) def _zforce_xyz(self,x,y,z): """Evaluation of the z force as a function of (x,y,z) in the aligned coordinate frame""" return -self._b*self._c/self.a**3.\ *_forceInt(x,y,z, lambda m: (self.a/m)**self.alpha/(1.+m/self.a)**(self.beta-self.alpha), self._b2,self._c2,2,glx=self._glx,glw=self._glw) def _R2deriv(self,R,z,phi=0.,t=0.): """ NAME: _R2deriv PURPOSE: evaluate the second radial derivative for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the second radial derivative HISTORY: 2016-06-15 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) if not self._aligned: raise NotImplementedError("2nd potential derivatives of TwoPowerTriaxialPotential not implemented for rotated coordinated frames (non-trivial zvec and pa)") phixx= self._2ndderiv_xyz(x,y,z,0,0) phixy= self._2ndderiv_xyz(x,y,z,0,1) phiyy= self._2ndderiv_xyz(x,y,z,1,1) return numpy.cos(phi)**2.*phixx+numpy.sin(phi)**2.*phiyy\ +2.*numpy.cos(phi)*numpy.sin(phi)*phixy def _Rzderiv(self,R,z,phi=0.,t=0.): """ NAME: _Rzderiv PURPOSE: evaluate the mixed radial, vertical derivative for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the mixed radial, vertical derivative HISTORY: 2016-06-15 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) if not self._aligned: raise NotImplementedError("2nd potential derivatives of TwoPowerTriaxialPotential not implemented for rotated coordinated frames (non-trivial zvec and pa)") phixz= self._2ndderiv_xyz(x,y,z,0,2) phiyz= self._2ndderiv_xyz(x,y,z,1,2) return numpy.cos(phi)*phixz+numpy.sin(phi)*phiyz def _z2deriv(self,R,z,phi=0.,t=0.): """ NAME: _z2deriv PURPOSE: evaluate the second vertical derivative for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the second vertical derivative HISTORY: 2016-06-15 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) if not self._aligned: raise NotImplementedError("2nd potential derivatives of TwoPowerTriaxialPotential not implemented for rotated coordinated frames (non-trivial zvec and pa)") return self._2ndderiv_xyz(x,y,z,2,2) def _phi2deriv(self,R,z,phi=0.,t=0.): """ NAME: _phi2deriv PURPOSE: evaluate the second azimuthal derivative for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the second azimuthal derivative HISTORY: 2016-06-15 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) if not self._aligned: raise NotImplementedError("2nd potential derivatives of TwoPowerTriaxialPotential not implemented for rotated coordinated frames (non-trivial zvec and pa)") Fx= self._xforce_xyz(x,y,z) Fy= self._yforce_xyz(x,y,z) phixx= self._2ndderiv_xyz(x,y,z,0,0) phixy= self._2ndderiv_xyz(x,y,z,0,1) phiyy= self._2ndderiv_xyz(x,y,z,1,1) return R**2.*(numpy.sin(phi)**2.*phixx+numpy.cos(phi)**2.*phiyy\ -2.*numpy.cos(phi)*numpy.sin(phi)*phixy)\ +R*(numpy.cos(phi)*Fx+numpy.sin(phi)*Fy) def _Rphideriv(self,R,z,phi=0.,t=0.): """ NAME: _Rphideriv PURPOSE: evaluate the mixed radial, azimuthal derivative for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the mixed radial, azimuthal derivative HISTORY: 2016-06-15 - Written - Bovy (UofT) """ if not self.isNonAxi: phi= 0. x,y,z= bovy_coords.cyl_to_rect(R,phi,z) if not self._aligned: raise NotImplementedError("2nd potential derivatives of TwoPowerTriaxialPotential not implemented for rotated coordinated frames (non-trivial zvec and pa)") Fx= self._xforce_xyz(x,y,z) Fy= self._yforce_xyz(x,y,z) phixx= self._2ndderiv_xyz(x,y,z,0,0) phixy= self._2ndderiv_xyz(x,y,z,0,1) phiyy= self._2ndderiv_xyz(x,y,z,1,1) return R*numpy.cos(phi)*numpy.sin(phi)*\ (phiyy-phixx)+R*numpy.cos(2.*phi)*phixy\ +numpy.sin(phi)*Fx-numpy.cos(phi)*Fy def _2ndderiv_xyz(self,x,y,z,i,j): """General 2nd derivative of the potential as a function of (x,y,z) in the aligned coordinate frame""" return self._b*self._c/self.a**3.\ *_2ndDerivInt(x,y,z, lambda m: (self.a/m)**self.alpha/(1.+m/self.a)**(self.beta-self.alpha), lambda m: -(self.a/m)**self.alpha/(1.+m/self.a)**(self.beta-self.alpha)/self.a*(self.alpha*(self.a/m)+(self.beta-self.alpha)/(1.+m/self.a)), self._b2,self._c2,i,j,glx=self._glx,glw=self._glw) def _dens(self,R,z,phi=0.,t=0.): """ NAME: _dens PURPOSE: evaluate the density for this potential INPUT: R - Galactocentric cylindrical radius z - vertical height phi - azimuth t - time OUTPUT: the density HISTORY: 2016-05-31 - Written - Bovy (UofT) """ x,y,z= bovy_coords.cyl_to_rect(R,phi,z) if self._aligned: xp, yp, zp= x, y, z else: xyzp= numpy.dot(self._rot,numpy.array([x,y,z])) xp, yp, zp= xyzp[0], xyzp[1], xyzp[2] m= numpy.sqrt(xp**2.+yp**2./self._b2+zp**2./self._c2) return (self.a/m)**self.alpha/(1.+m/self.a)**(self.beta-self.alpha)/4./numpy.pi/self.a**3. def OmegaP(self): """ NAME: OmegaP PURPOSE: return the pattern speed INPUT: (none) OUTPUT: pattern speed HISTORY: 2016-05-31 - Written - Bovy (UofT) """ return 0. class TriaxialHernquistPotential(TwoPowerTriaxialPotential): """Class that implements the triaxial Hernquist potential .. math:: \\rho(x,y,z) = \\frac{\\mathrm{amp}}{4\\,\\pi\\,a^3}\\,\\frac{1}{(m/a)\\,(1+m/a)^{3}} with .. math:: m^2 = x'^2 + \\frac{y'^2}{b^2}+\\frac{z'^2}{c^2} and :math:`(x',y',z')` is a rotated frame wrt :math:`(x,y,z)` specified by parameters ``zvec`` and ``pa`` which specify (a) ``zvec``: the location of the :math:`z'` axis in the :math:`(x,y,z)` frame and (b) ``pa``: the position angle of the :math:`x'` axis wrt the :math:`\\tilde{x}` axis, that is, the :math:`x` axis after rotating to ``zvec``. """ def __init__(self,amp=1.,a=2.,normalize=False,b=1.,c=1.,zvec=None,pa=None, glorder=50,ro=None,vo=None): """ NAME: __init__ PURPOSE: Initialize a triaxial Hernquist potential INPUT: amp - amplitude to be applied to the potential (default: 1); can be a Quantity with units of mass or Gxmass a - scale radius (can be Quantity) b - y-to-x axis ratio of the density c - z-to-x axis ratio of the density zvec= (None) If set, a unit vector that corresponds to the z axis pa= (None) If set, the position angle of the x axis glorder= (50) if set, compute the relevant force and potential integrals with Gaussian quadrature of this order normalize - if True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1. ro=, vo= distance and velocity scales for translation into internal units (default from configuration file) OUTPUT: (none) HISTORY: 2010-07-09 - Written - Bovy (UofT) """ Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass') if _APY_LOADED and isinstance(a,units.Quantity): a= a.to(units.kpc).value/self._ro self.a= a self._scale= self.a self.alpha= 1 self.beta= 4 self._b= b self._b2= self._b**2 self._c= c self._c2= self._c**2 self._setup_gl(glorder) self._setup_zvec_pa(zvec,pa) self._force_hash= None if normalize or \ (isinstance(normalize,(int,float)) \ and not isinstance(normalize,bool)): self.normalize(normalize) self.hasC= not self._glorder is None self.hasC_dxdv= False if not self._aligned or numpy.fabs(self._b-1.) > 10.**-10.: self.isNonAxi= True return None def _evaluate_xyz(self,x,y,z): """Evaluation of the potential as a function of (x,y,z) in the aligned coordinate frame""" psi= lambda m: 1./(1.+m/self.a)**2./2. return -self._b*self._c/self.a\ *_potInt(x,y,z,psi,self._b2,self._c2,glx=self._glx,glw=self._glw) class TriaxialJaffePotential(TwoPowerTriaxialPotential): """Class that implements the Jaffe potential .. math:: \\rho(x,y,z) = \\frac{\\mathrm{amp}}{4\\,\\pi\\,a^3}\\,\\frac{1}{(m/a)^2\\,(1+m/a)^{2}} with .. math:: m^2 = x'^2 + \\frac{y'^2}{b^2}+\\frac{z'^2}{c^2} and :math:`(x',y',z')` is a rotated frame wrt :math:`(x,y,z)` specified by parameters ``zvec`` and ``pa`` which specify (a) ``zvec``: the location of the :math:`z'` axis in the :math:`(x,y,z)` frame and (b) ``pa``: the position angle of the :math:`x'` axis wrt the :math:`\\tilde{x}` axis, that is, the :math:`x` axis after rotating to ``zvec``. """ def __init__(self,amp=1.,a=2.,b=1.,c=1.,zvec=None,pa=None,normalize=False, glorder=50,ro=None,vo=None): """ NAME: __init__ PURPOSE: Initialize a Jaffe potential INPUT: amp - amplitude to be applied to the potential (default: 1); can be a Quantity with units of mass or Gxmass a - scale radius (can be Quantity) b - y-to-x axis ratio of the density c - z-to-x axis ratio of the density zvec= (None) If set, a unit vector that corresponds to the z axis pa= (None) If set, the position angle of the x axis glorder= (50) if set, compute the relevant force and potential integrals with Gaussian quadrature of this order normalize - if True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1. ro=, vo= distance and velocity scales for translation into internal units (default from configuration file) OUTPUT: (none) HISTORY: 2010-07-09 - Written - Bovy (UofT) """ Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass') if _APY_LOADED and isinstance(a,units.Quantity): a= a.to(units.kpc).value/self._ro self.a= a self._scale= self.a self.alpha= 2 self.beta= 4 self._b= b self._b2= self._b**2. self._c= c self._c2= self._c**2. self._setup_gl(glorder) self._setup_zvec_pa(zvec,pa) self._force_hash= None if normalize or \ (isinstance(normalize,(int,float)) \ and not isinstance(normalize,bool)): #pragma: no cover self.normalize(normalize) self.hasC= not self._glorder is None self.hasC_dxdv= False if not self._aligned or numpy.fabs(self._b-1.) > 10.**-10.: self.isNonAxi= True return None def _evaluate_xyz(self,x,y,z): """Evaluation of the potential as a function of (x,y,z) in the aligned coordinate frame""" psi= lambda m: -1./(1.+m/self.a)-numpy.log(m/self.a/(1.+m/self.a)) return -self._b*self._c/self.a\ *_potInt(x,y,z,psi,self._b2,self._c2,glx=self._glx,glw=self._glw) class TriaxialNFWPotential(TwoPowerTriaxialPotential): """Class that implements the triaxial NFW potential .. math:: \\rho(x,y,z) = \\frac{\\mathrm{amp}}{4\\,\\pi\\,a^3}\\,\\frac{1}{(m/a)\\,(1+m/a)^{2}} with .. math:: m^2 = x'^2 + \\frac{y'^2}{b^2}+\\frac{z'^2}{c^2} and :math:`(x',y',z')` is a rotated frame wrt :math:`(x,y,z)` specified by parameters ``zvec`` and ``pa`` which specify (a) ``zvec``: the location of the :math:`z'` axis in the :math:`(x,y,z)` frame and (b) ``pa``: the position angle of the :math:`x'` axis wrt the :math:`\\tilde{x}` axis, that is, the :math:`x` axis after rotating to ``zvec``. """ def __init__(self,amp=1.,a=2.,b=1.,c=1.,zvec=None,pa=None, normalize=False, conc=None,mvir=None, glorder=50,vo=None,ro=None, H=70.,Om=0.3,overdens=200.,wrtcrit=False): """ NAME: __init__ PURPOSE: Initialize a triaxial NFW potential INPUT: amp - amplitude to be applied to the potential (default: 1); can be a Quantity with units of mass or Gxmass a - scale radius (can be Quantity) b - y-to-x axis ratio of the density c - z-to-x axis ratio of the density zvec= (None) If set, a unit vector that corresponds to the z axis pa= (None) If set, the position angle of the x axis glorder= (50) if set, compute the relevant force and potential integrals with Gaussian quadrature of this order normalize - if True, normalize such that vc(1.,0.)=1., or, if given as a number, such that the force is this fraction of the force necessary to make vc(1.,0.)=1. Alternatively, NFW potentials can be initialized using conc= concentration mvir= virial mass in 10^12 Msolar in which case you also need to supply the following keywords H= (default: 70) Hubble constant in km/s/Mpc Om= (default: 0.3) Omega matter overdens= (200) overdensity which defines the virial radius wrtcrit= (False) if True, the overdensity is wrt the critical density rather than the mean matter density ro=, vo= distance and velocity scales for translation into internal units (default from configuration file) OUTPUT: (none) HISTORY: 2016-05-30 - Written - Bovy (UofT) """ Potential.__init__(self,amp=amp,ro=ro,vo=vo,amp_units='mass') if _APY_LOADED and isinstance(a,units.Quantity): a= a.to(units.kpc).value/self._ro self.alpha= 1 self.beta= 3 self._b= b self._b2= self._b**2. self._c= c self._c2= self._c**2. self._setup_gl(glorder) self._setup_zvec_pa(zvec,pa) self._force_hash= None if conc is None: self.a= a if normalize or \ (isinstance(normalize,(int,float)) \ and not isinstance(normalize,bool)): self.normalize(normalize) else: from galpy.potential import NFWPotential dum= NFWPotential(mvir=mvir,conc=conc,ro=self._ro,vo=self._vo, H=H,Om=Om,wrtcrit=wrtcrit,overdens=overdens) self.a= dum.a self._amp= dum._amp self._scale= self.a self.hasC= not self._glorder is None self.hasC_dxdv= False if not self._aligned or numpy.fabs(self._b-1.) > 10.**-10.: self.isNonAxi= True return None def _evaluate_xyz(self,x,y,z): """Evaluation of the potential as a function of (x,y,z) in the aligned coordinate frame""" psi= lambda m: 1./(1.+m/self.a) return -self._b*self._c/self.a\ *_potInt(x,y,z,psi,self._b2,self._c2,glx=self._glx,glw=self._glw) def _potInt(x,y,z,psi,b2,c2,glx=None,glw=None): """int_0^\infty psi~(m))/sqrt([1+tau]x[b^2+tau]x[c^2+tau])dtau, where psi~(m) = [psi(\infty)-psi(m)]/[2Aa^2], with A=amp/[4pia^3]""" def integrand(s): t= 1/s**2.-1. return psi(numpy.sqrt(x**2./(1.+t)+y**2./(b2+t)+z**2./(c2+t)))\ /numpy.sqrt((1.+(b2-1.)*s**2.)*(1.+(c2-1.)*s**2.)) if glx is None: return integrate.quad(integrand,0.,1.)[0] else: return numpy.sum(glw*integrand(glx)) def _forceInt(x,y,z,dens,b2,c2,i,glx=None,glw=None): """Integral that gives the force in x,y,z""" def integrand(s): t= 1/s**2.-1. return dens(numpy.sqrt(x**2./(1.+t)+y**2./(b2+t)+z**2./(c2+t)))\ *(x/(1.+t)*(i==0)+y/(b2+t)*(i==1)+z/(c2+t)*(i==2))\ /numpy.sqrt((1.+(b2-1.)*s**2.)*(1.+(c2-1.)*s**2.)) if glx is None: return integrate.quad(integrand,0.,1.)[0] else: return numpy.sum(glw*integrand(glx)) def _2ndDerivInt(x,y,z,dens,densDeriv,b2,c2,i,j,glx=None,glw=None): """Integral that gives the 2nd derivative of the potential in x,y,z""" def integrand(s): t= 1/s**2.-1. m= numpy.sqrt(x**2./(1.+t)+y**2./(b2+t)+z**2./(c2+t)) return (densDeriv(m) *(x/(1.+t)*(i==0)+y/(b2+t)*(i==1)+z/(c2+t)*(i==2)) *(x/(1.+t)*(j==0)+y/(b2+t)*(j==1)+z/(c2+t)*(j==2))/m\ +dens(m)*(i==j)*((1./(1.+t)*(i==0)+1./(b2+t)*(i==1)+1./(c2+t)*(i==2))))\ /numpy.sqrt((1.+(b2-1.)*s**2.)*(1.+(c2-1.)*s**2.)) if glx is None: return integrate.quad(integrand,0.,1.)[0] else: return numpy.sum(glw*integrand(glx))
36.671928
349
0.533356
4,502
32,528
3.751
0.073745
0.010304
0.015456
0.007106
0.79197
0.773909
0.754959
0.739208
0.709599
0.698585
0
0.027858
0.330146
32,528
886
350
36.713318
0.747166
0.330884
0
0.652582
0
0
0.040237
0.007798
0
0
0
0
0
1
0.07277
false
0
0.018779
0
0.190141
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
0135b8e9adf6ac9ba0fe12a04f39ea2ac8a71676
153
py
Python
booksite/admin.py
mark-graciov/bookit
dfe471efe0a1fb1e3688fdebd79a14f8113acd42
[ "Apache-2.0" ]
null
null
null
booksite/admin.py
mark-graciov/bookit
dfe471efe0a1fb1e3688fdebd79a14f8113acd42
[ "Apache-2.0" ]
null
null
null
booksite/admin.py
mark-graciov/bookit
dfe471efe0a1fb1e3688fdebd79a14f8113acd42
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from .models import Tale, TaleTag admin.site.register(Tale) admin.site.register(TaleTag) # Register your models here.
19.125
33
0.797386
22
153
5.545455
0.545455
0.147541
0.278689
0
0
0
0
0
0
0
0
0
0.117647
153
7
34
21.857143
0.903704
0.169935
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
017eb076d9ef3e5f716d4b0d30ff117506377ff7
3,130
py
Python
comvex/mlpmixer/config.py
shrenik-jain/ComVEX
93622de3a4771cda13b14f8bba52990eb47c2409
[ "Apache-2.0" ]
29
2021-06-14T08:27:43.000Z
2022-02-07T13:40:27.000Z
comvex/mlpmixer/config.py
shrenik-jain/ComVEX
93622de3a4771cda13b14f8bba52990eb47c2409
[ "Apache-2.0" ]
3
2021-11-23T16:11:51.000Z
2021-12-21T17:24:36.000Z
comvex/mlpmixer/config.py
shrenik-jain/ComVEX
93622de3a4771cda13b14f8bba52990eb47c2409
[ "Apache-2.0" ]
3
2021-06-27T08:18:57.000Z
2021-12-17T07:29:59.000Z
from comvex.utils import ConfigBase class MLPMixerConfig(ConfigBase): def __init__( self, *, image_channel: int, image_size: int, patch_size: int, depth: int, token_mlp_dim: int, channel_mlp_dim: int, num_classes: int, ff_dropout: float = 0.0, ) -> None: self.image_channel = image_channel self.image_size = image_size self.patch_size = patch_size self.depth = depth self.token_mlp_dim = token_mlp_dim self.channel_mlp_dim = channel_mlp_dim self.num_classes = num_classes self.ff_dropout = ff_dropout @classmethod def MLPMixer_S_32(cls, num_classes: int, **kwargs) -> "MLPMixerConfig": return cls( image_channel=3, image_size=224, patch_size=32, depth=8, token_mlp_dim=256, channel_mlp_dim=2048, num_classes=num_classes, **kwargs ) @classmethod def MLPMixer_S_16(cls, num_classes: int, **kwargs) -> "MLPMixerConfig": return cls( image_channel=3, image_size=224, patch_size=16, depth=8, token_mlp_dim=256, channel_mlp_dim=2048, num_classes=num_classes, **kwargs ) @classmethod def MLPMixer_B_32(cls, num_classes: int, **kwargs) -> "MLPMixerConfig": return cls( image_channel=3, image_size=224, patch_size=32, depth=12, token_mlp_dim=384, channel_mlp_dim=3072, num_classes=num_classes, **kwargs ) @classmethod def MLPMixer_B_16(cls, num_classes: int, **kwargs) -> "MLPMixerConfig": return cls( image_channel=3, image_size=224, patch_size=16, depth=12, token_mlp_dim=384, channel_mlp_dim=3072, num_classes=num_classes, **kwargs ) @classmethod def MLPMixer_L_32(cls, num_classes: int, **kwargs) -> "MLPMixerConfig": return cls( image_channel=3, image_size=224, patch_size=32, depth=24, token_mlp_dim=512, channel_mlp_dim=4096, num_classes=num_classes, **kwargs ) @classmethod def MLPMixer_L_16(cls, num_classes: int, **kwargs) -> "MLPMixerConfig": return cls( image_channel=3, image_size=224, patch_size=32, depth=24, token_mlp_dim=512, channel_mlp_dim=4096, num_classes=num_classes, **kwargs ) @classmethod def MLPMixer_H_14(cls, num_classes: int, **kwargs) -> "MLPMixerConfig": return cls( image_channel=3, image_size=224, patch_size=14, depth=32, token_mlp_dim=640, channel_mlp_dim=5120, num_classes=num_classes, **kwargs )
26.752137
75
0.534185
340
3,130
4.579412
0.15
0.154143
0.070649
0.102762
0.719974
0.703276
0.703276
0.703276
0.703276
0.700706
0
0.061499
0.381789
3,130
117
76
26.752137
0.743152
0
0
0.622642
0
0
0.0313
0
0
0
0
0
0
1
0.075472
false
0
0.009434
0.066038
0.160377
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
6dafa9103a8a825f01f5321d1481fd523b684421
49
py
Python
guillotina/contrib/memcached/exceptions.py
rboixaderg/guillotina
fcae65c2185222272f3b8fee4bc2754e81e0e983
[ "BSD-2-Clause" ]
173
2017-03-10T18:26:12.000Z
2022-03-03T06:48:56.000Z
guillotina/contrib/memcached/exceptions.py
rboixaderg/guillotina
fcae65c2185222272f3b8fee4bc2754e81e0e983
[ "BSD-2-Clause" ]
921
2017-03-08T14:04:43.000Z
2022-03-30T10:28:56.000Z
guillotina/contrib/memcached/exceptions.py
rboixaderg/guillotina
fcae65c2185222272f3b8fee4bc2754e81e0e983
[ "BSD-2-Clause" ]
60
2017-03-16T19:59:44.000Z
2022-03-03T06:48:59.000Z
class NoMemcachedConfigured(Exception): pass
16.333333
39
0.795918
4
49
9.75
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
49
2
40
24.5
0.928571
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
6df05d8b545217a0245b5b5478e835af26771e70
107
py
Python
server/tests/voicebox/test_ngram.py
maaaaaaaaaatt/voicebox
0b4124cb0e0dbe553b673d1a2c46691505a6d9b3
[ "MIT" ]
11
2017-09-15T20:15:08.000Z
2021-05-19T18:10:24.000Z
server/tests/voicebox/test_ngram.py
maaaaaaaaaatt/voicebox
0b4124cb0e0dbe553b673d1a2c46691505a6d9b3
[ "MIT" ]
1
2019-06-10T17:23:29.000Z
2019-06-10T17:23:29.000Z
server/tests/voicebox/test_ngram.py
maaaaaaaaaatt/voicebox
0b4124cb0e0dbe553b673d1a2c46691505a6d9b3
[ "MIT" ]
6
2017-07-26T12:53:53.000Z
2021-05-19T19:32:53.000Z
from __future__ import absolute_import from unittest import TestCase class TestNgram(TestCase): pass
15.285714
38
0.813084
13
107
6.307692
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.158879
107
6
39
17.833333
0.911111
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.25
0.5
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
0
0
0
5
097519609c3aca4c403bef68f8fd03cd48659060
33
py
Python
examples/standalone_proxy/plugIt/views.py
ebu/PlugIt
de5f1e870f67caaef7a4a58e4bb1ed54d9c5dc53
[ "BSD-3-Clause" ]
3
2017-07-26T08:17:20.000Z
2021-05-26T10:47:31.000Z
examples/standalone_proxy/plugIt/views.py
ebu/PlugIt
de5f1e870f67caaef7a4a58e4bb1ed54d9c5dc53
[ "BSD-3-Clause" ]
32
2015-05-27T13:26:38.000Z
2021-06-10T18:32:28.000Z
examples/standalone_proxy/plugIt/views.py
ebu/PlugIt
de5f1e870f67caaef7a4a58e4bb1ed54d9c5dc53
[ "BSD-3-Clause" ]
4
2015-02-02T12:30:38.000Z
2018-11-15T12:48:17.000Z
from plugit_proxy.views import *
16.5
32
0.818182
5
33
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.121212
33
1
33
33
0.896552
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
097bcfe7bcb674d0aba5674bfc38b632fef1ccd1
910
py
Python
11-Making a bar chart.py
mnabavi84/dcamp-intro-dscience-python
de6dbdf7328e0cdfaab218c01589db269abb100c
[ "MIT" ]
null
null
null
11-Making a bar chart.py
mnabavi84/dcamp-intro-dscience-python
de6dbdf7328e0cdfaab218c01589db269abb100c
[ "MIT" ]
null
null
null
11-Making a bar chart.py
mnabavi84/dcamp-intro-dscience-python
de6dbdf7328e0cdfaab218c01589db269abb100c
[ "MIT" ]
null
null
null
# Display the DataFrame hours using print print(hours) # Create a bar plot from the DataFrame hours plt.bar(hours.officer, hours.avg_hours_worked) # Display the plot plt.show() # Display the DataFrame hours using print print(hours) # Create a bar plot from the DataFrame hours plt.bar(hours.officer, hours.avg_hours_worked, # Add error bars yerr=hours.std_hours_worked) # Display the plot plt.show() # Plot the number of hours spent on desk work plt.bar(hours.officer, hours.desk_work, label='Desk Work') # Display the plot plt.show() # Plot the number of hours spent on desk work plt.bar(hours.officer, hours.desk_work, label='Desk Work') # Plot the hours spent on field work on top of desk work plt.bar(hours.officer, hours.field_work, bottom=hours.desk_work, label='Field Work') # Add a legend plt.legend() # Display the plot plt.show()
22.195122
85
0.70989
145
910
4.386207
0.22069
0.100629
0.086478
0.141509
0.811321
0.778302
0.778302
0.679245
0.679245
0.679245
0
0
0.202198
910
40
86
22.75
0.876033
0.443956
0
0.615385
0
0
0.061947
0
0
0
0
0
0
1
0
true
0
0
0
0
0.153846
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
1
0
0
0
0
0
0
5
61de286b1908f14c61afee1fa58f7f5148419dbc
138
py
Python
config/admin.py
mrbrazzi/django-misclientes
8017cc67e243e4384c3f52ae73d06e16f8fb8d5b
[ "Apache-2.0" ]
5
2019-11-12T20:35:37.000Z
2022-03-11T15:02:48.000Z
config/admin.py
mrbrazzi/django-misclientes
8017cc67e243e4384c3f52ae73d06e16f8fb8d5b
[ "Apache-2.0" ]
4
2019-11-11T15:33:42.000Z
2022-01-13T01:50:23.000Z
config/admin.py
mrbrazzi/django-misclientes
8017cc67e243e4384c3f52ae73d06e16f8fb8d5b
[ "Apache-2.0" ]
4
2019-11-11T16:13:20.000Z
2020-04-02T18:32:06.000Z
from django.contrib import admin from config.models import Configuracion # Register your models here. admin.site.register(Configuracion)
23
39
0.833333
18
138
6.388889
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.108696
138
6
40
23
0.934959
0.188406
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
61e0566fcfba37727592fb9634461cfa85c65b81
112
py
Python
src/extend.py
aYukiYoshida/pyigata
670db3e09e5e4a3fb430b57f213ac95801ab1996
[ "MIT" ]
null
null
null
src/extend.py
aYukiYoshida/pyigata
670db3e09e5e4a3fb430b57f213ac95801ab1996
[ "MIT" ]
null
null
null
src/extend.py
aYukiYoshida/pyigata
670db3e09e5e4a3fb430b57f213ac95801ab1996
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- class ExtendDict(dict): def __getattr__(self, name): return self.get(name)
18.666667
32
0.607143
14
112
4.571429
0.857143
0
0
0
0
0
0
0
0
0
0
0.011494
0.223214
112
5
33
22.4
0.724138
0.1875
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
61e2be1e7818c0f0d06a18f2314975e6e6ce6d74
467
py
Python
src/sierra/__init__.py
BrainStormYourWayIn/pytohtm
1c0e5f4c69e125e8e197b49d07c24342cada1e97
[ "Apache-2.0" ]
85
2021-06-16T16:09:26.000Z
2022-02-13T17:12:56.000Z
src/sierra/__init__.py
BrainStormYourWayIn/pytohtm
1c0e5f4c69e125e8e197b49d07c24342cada1e97
[ "Apache-2.0" ]
2
2021-06-17T03:33:53.000Z
2021-06-25T05:16:44.000Z
src/sierra/__init__.py
BrainStormYourWayIn/pytohtm
1c0e5f4c69e125e8e197b49d07c24342cada1e97
[ "Apache-2.0" ]
6
2021-06-29T06:05:49.000Z
2021-09-10T00:55:08.000Z
from sierra.custom_tags import * from sierra.bullets_and_lists import * from sierra.main_htm import * from sierra.table import * from sierra.tags import * from sierra.tTags import * from sierra.write import * # from custom_tags import * # from bullets_and_lists import * # Import these if you're cloning the repo to test/work with Sierra # from main_htm import * # from table import * # from tags import * # from tTags import * # from write import *
22.238095
111
0.736617
70
467
4.8
0.342857
0.357143
0.285714
0.119048
0
0
0
0
0
0
0
0
0.197002
467
20
112
23.35
0.896
0.505353
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
11280c4ed25299e777c1e2e07208dc62fd747de8
757
py
Python
webapp/config.py
britiger/simple_tracking
7b9a6b1751a701517d2b34f6cb58af5cef5db5c0
[ "MIT" ]
null
null
null
webapp/config.py
britiger/simple_tracking
7b9a6b1751a701517d2b34f6cb58af5cef5db5c0
[ "MIT" ]
1
2021-11-17T08:22:49.000Z
2021-11-19T09:42:42.000Z
webapp/config.py
britiger/simple_tracking
7b9a6b1751a701517d2b34f6cb58af5cef5db5c0
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config(object): SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess' LANGUAGES = ['en', 'de'] SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or \ 'postgresql://' + os.environ.get('PGUSER') + ':' + os.environ.get('PGPASSWORD') + '@' + os.environ.get('PGHOST') + ':' + os.environ.get('PGPORT') + '/' + os.environ.get('PGDATABASE') SQLALCHEMY_TRACK_MODIFICATIONS = False MAIL_SERVER = os.environ.get('MAIL_SERVER') MAIL_PORT = int(os.environ.get('MAIL_PORT') or 25) MAIL_USE_TLS = os.environ.get('MAIL_USE_TLS') is not None MAIL_USERNAME = os.environ.get('MAIL_USERNAME') MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')
47.3125
190
0.678996
105
757
4.67619
0.447619
0.219959
0.293279
0.162933
0
0
0
0
0
0
0
0.003086
0.143989
757
15
191
50.466667
0.75463
0
0
0
0
0
0.21004
0
0
0
0
0
0
1
0
false
0.153846
0.076923
0
0.846154
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
5
fed15d593a8d0f09aea35c57e6326bf5b6829680
3,482
py
Python
src/dataset.py
TianZerL/Data_Mining_Course
e45f93e77d91983f0265a6b3a9fa58dca0542216
[ "MIT" ]
null
null
null
src/dataset.py
TianZerL/Data_Mining_Course
e45f93e77d91983f0265a6b3a9fa58dca0542216
[ "MIT" ]
null
null
null
src/dataset.py
TianZerL/Data_Mining_Course
e45f93e77d91983f0265a6b3a9fa58dca0542216
[ "MIT" ]
null
null
null
import pandas as pd from sklearn import datasets, preprocessing, utils class DataSet(object): def __init__(self) -> None: self.org_dataset = self.get_dataset() # 连续实数 class Iris(DataSet): def __init__(self) -> None: super().__init__() self.data = self.org_dataset.data self.label = self.org_dataset.target def get_dataset(self): return datasets.load_iris() # 连续实数、整数 class Wine(DataSet): def __init__(self) -> None: super().__init__() self.data = self.org_dataset.data self.label = self.org_dataset.target def get_dataset(self): return datasets.load_wine() # 归一化 class WineNormalized(DataSet): def __init__(self) -> None: super().__init__() self.data = preprocessing.MinMaxScaler().fit_transform(self.org_dataset.data) self.label = self.org_dataset.target def get_dataset(self): return datasets.load_wine() # 类别 class Car(DataSet): def __init__(self) -> None: super().__init__() self.data = pd.get_dummies(self.org_dataset[range(0, 6)]) self.label = self.org_dataset[6] def get_dataset(self): return pd.read_table( r"https://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data", sep=",", header=None, ) # 二进制二分类 class Heart(DataSet): def __init__(self) -> None: super().__init__() self.data = self.org_dataset[range(1, 23)] self.label = self.org_dataset[0] def get_dataset(self): return pd.read_table( r"https://archive.ics.uci.edu/ml/machine-learning-databases/spect/SPECT.train", sep=",", header=None, ) # 二进制二分类 class HeartMore(DataSet): def __init__(self) -> None: super().__init__() self.data = self.org_dataset[range(1, 23)] self.label = self.org_dataset[0] def get_dataset(self): return utils.shuffle( pd.concat( [ pd.read_table( r"https://archive.ics.uci.edu/ml/machine-learning-databases/spect/SPECT.train", sep=",", header=None, ), pd.read_table( r"https://archive.ics.uci.edu/ml/machine-learning-databases/spect/SPECT.test", sep=",", header=None, ), ] ) ) # 类别, OneHotEncode class MushroomOneHotEncode(DataSet): def __init__(self) -> None: super().__init__() self.data = pd.get_dummies(self.org_dataset[range(1, 23)]) self.label = pd.Series(self.org_dataset[0]) def get_dataset(self): return pd.read_table( r"https://archive.ics.uci.edu/ml/machine-learning-databases/mushroom/agaricus-lepiota.data", sep=",", header=None, ) # 类别 class Mushroom(DataSet): def __init__(self) -> None: super().__init__() self.data = pd.DataFrame.apply( self.org_dataset[range(1, 23)], preprocessing.LabelEncoder().fit_transform ) self.label = pd.Series(self.org_dataset[0]) def get_dataset(self): return pd.read_table( r"https://archive.ics.uci.edu/ml/machine-learning-databases/mushroom/agaricus-lepiota.data", sep=",", header=None, )
26.580153
104
0.568926
401
3,482
4.673317
0.179551
0.072572
0.127001
0.072038
0.791889
0.760939
0.7492
0.7492
0.747599
0.726788
0
0.007829
0.302987
3,482
130
105
26.784615
0.764318
0.015221
0
0.659574
0
0.06383
0.139181
0
0
0
0
0
0
1
0.180851
false
0
0.021277
0.085106
0.382979
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
fed333826e9d6dd9f86bd73e346f8184effe9922
174
py
Python
tests/web_platform/CSS2/normal_flow/test_block_in_inline_remove_006_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_block_in_inline_remove_006_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
null
null
null
tests/web_platform/CSS2/normal_flow/test_block_in_inline_remove_006_ref.py
fletchgraham/colosseum
77be4896ee52b8f5956a3d77b5f2ccd2c8608e8f
[ "BSD-3-Clause" ]
1
2020-01-16T01:56:41.000Z
2020-01-16T01:56:41.000Z
from tests.utils import W3CTestCase class TestBlockInInlineRemove006Ref(W3CTestCase): vars().update(W3CTestCase.find_tests(__file__, 'block-in-inline-remove-006-ref'))
29
85
0.804598
20
174
6.75
0.85
0
0
0
0
0
0
0
0
0
0
0.05625
0.08046
174
5
86
34.8
0.7875
0
0
0
0
0
0.17341
0.17341
0
0
0
0
0
1
0
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
3a54b7747f6fd62ef41d64542fd8e26cd58dfffa
33
py
Python
api/rank/__init__.py
imustacm/OnlineJudge
5937db9b1b4f38883900f9dcc2831da362b6f7de
[ "MIT" ]
6
2018-03-14T01:15:41.000Z
2018-05-03T13:54:49.000Z
api/rank/__init__.py
imustacm/OnlineJudge-Python
5937db9b1b4f38883900f9dcc2831da362b6f7de
[ "MIT" ]
1
2018-03-14T03:48:36.000Z
2018-05-06T05:43:26.000Z
api/rank/__init__.py
imustacm/OnlineJudge-Python
5937db9b1b4f38883900f9dcc2831da362b6f7de
[ "MIT" ]
null
null
null
from .rank_num import RankNumber
16.5
32
0.848485
5
33
5.4
1
0
0
0
0
0
0
0
0
0
0
0
0.121212
33
1
33
33
0.931034
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
28ef7cd071c9d40ff82d25e1c961a0cc7e9c1a37
222
py
Python
sfms/main/routes.py
gprossignoli/Simple_File_Management_System
680c24d7ced90cc7d77964b080149fff50d1c3fa
[ "MIT" ]
null
null
null
sfms/main/routes.py
gprossignoli/Simple_File_Management_System
680c24d7ced90cc7d77964b080149fff50d1c3fa
[ "MIT" ]
null
null
null
sfms/main/routes.py
gprossignoli/Simple_File_Management_System
680c24d7ced90cc7d77964b080149fff50d1c3fa
[ "MIT" ]
null
null
null
from flask import render_template, Blueprint main = Blueprint(name='main', import_name='main') @main.route("/", methods=['GET']) @main.route("/home", methods=['GET']) def home(): return render_template('home.html')
22.2
49
0.689189
29
222
5.172414
0.517241
0.186667
0
0
0
0
0
0
0
0
0
0
0.108108
222
9
50
24.666667
0.757576
0
0
0
0
0
0.130631
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
0.666667
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
e90a257ed7da13150e522436eab7e76cc494a974
213
py
Python
genpw/__init__.py
arrai-innovations/genpw
4affefa3e2eff13b704d683236ca7f154dec37c0
[ "BSD-3-Clause" ]
null
null
null
genpw/__init__.py
arrai-innovations/genpw
4affefa3e2eff13b704d683236ca7f154dec37c0
[ "BSD-3-Clause" ]
2
2018-09-08T23:43:25.000Z
2018-09-09T00:00:27.000Z
genpw/__init__.py
arrai-innovations/genpw
4affefa3e2eff13b704d683236ca7f154dec37c0
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2020 Arrai Innovations Inc. - All Rights Reserved __version__ = "1.0.0.post2" try: from .genpw import pronounceable_passwd __all__ = ["pronounceable_passwd"] except ImportError: pass
21.3
65
0.7277
26
213
5.576923
0.846154
0.262069
0
0
0
0
0
0
0
0
0
0.045977
0.183099
213
9
66
23.666667
0.787356
0.295775
0
0
0
0
0.209459
0
0
0
0
0
0
1
0
false
0.5
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
0
0
0
5
3a99c18a1320e30edd17b3a025c304e640f5ac38
62
py
Python
dgNN/__init__.py
HenryChang213/dgNN
4c8628fd4b82783b5a5a7f429b17d1704bf183cf
[ "Apache-2.0" ]
9
2021-11-02T07:37:07.000Z
2022-03-19T08:08:39.000Z
dgNN/__init__.py
HenryChang213/dgNN
4c8628fd4b82783b5a5a7f429b17d1704bf183cf
[ "Apache-2.0" ]
null
null
null
dgNN/__init__.py
HenryChang213/dgNN
4c8628fd4b82783b5a5a7f429b17d1704bf183cf
[ "Apache-2.0" ]
2
2021-11-02T07:37:13.000Z
2021-11-05T07:27:24.000Z
# print('dgnn') from .layers import * from .operators import *
20.666667
24
0.709677
8
62
5.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.145161
62
3
24
20.666667
0.830189
0.209677
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
3aaf880fe865ee98aae7fd6f7edb191dd4903766
69
py
Python
pycontour/cnt/__init__.py
PingjunChen/pycontour
13f64b685740368605db314b0f547f9f8dd4e737
[ "BSD-3-Clause" ]
8
2018-08-30T13:13:48.000Z
2021-07-24T08:49:35.000Z
pycontour/cnt/__init__.py
PingjunChen/pycontour
13f64b685740368605db314b0f547f9f8dd4e737
[ "BSD-3-Clause" ]
1
2021-09-21T04:11:39.000Z
2021-09-21T04:11:39.000Z
pycontour/cnt/__init__.py
PingjunChen/pycontour
13f64b685740368605db314b0f547f9f8dd4e737
[ "BSD-3-Clause" ]
4
2018-09-21T20:38:26.000Z
2021-09-17T21:45:37.000Z
# -*- coding: utf-8 -*- import os, sys from .cnt_property import *
11.5
27
0.623188
10
69
4.2
0.9
0
0
0
0
0
0
0
0
0
0
0.018182
0.202899
69
5
28
13.8
0.745455
0.304348
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
3ab48ea089f2f59f5b32f1ccb5a1869e6c674b20
55
py
Python
curlylint/__main__.py
takkaria/curlylint
dd8f511581f96f707e8a2d8dc6ec8a8658db5b55
[ "MIT" ]
155
2020-03-22T14:06:31.000Z
2022-03-20T15:41:03.000Z
curlylint/__main__.py
takkaria/curlylint
dd8f511581f96f707e8a2d8dc6ec8a8658db5b55
[ "MIT" ]
57
2020-06-22T13:33:32.000Z
2022-03-30T11:44:33.000Z
curlylint/__main__.py
takkaria/curlylint
dd8f511581f96f707e8a2d8dc6ec8a8658db5b55
[ "MIT" ]
22
2020-08-11T19:51:48.000Z
2022-03-29T08:42:28.000Z
from curlylint.cli import patched_main patched_main()
13.75
38
0.836364
8
55
5.5
0.75
0.5
0
0
0
0
0
0
0
0
0
0
0.109091
55
3
39
18.333333
0.897959
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
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
1
0
0
0
0
5
3adaa4ab79a05c1b555c8ba68cff9763546dca22
6,376
py
Python
charts/views.py
SirSaleh/django-simple-charts
571ac5db9495f15f18c7d2c4d55b754c1f5189ae
[ "Apache-2.0" ]
1
2019-02-19T10:38:41.000Z
2019-02-19T10:38:41.000Z
charts/views.py
SirSaleh/django-simple-charts
571ac5db9495f15f18c7d2c4d55b754c1f5189ae
[ "Apache-2.0" ]
null
null
null
charts/views.py
SirSaleh/django-simple-charts
571ac5db9495f15f18c7d2c4d55b754c1f5189ae
[ "Apache-2.0" ]
null
null
null
from django.views.generic import TemplateView from charts.Charts import Histogram class ChartsSampleView(TemplateView): """ temporary view for charts usage sample """ template_name = 'sample_charts.html' def get_context_data(self, **kwargs): context = super().get_context_data() data_dictionary = {'col1': {'data': [6621, 3111, 8867, 2788, 3580, 9286, 7640, 3648, 3196, 1482, 8815, 1339, 6773, 2472, 4612, 3452, 8806, 7517, 2327, 8309, 4885, 1663, 7844, 1089, 551, 1966, 2170, 148, 452, 2536, 78, 6859, 2638, 7548, 3820, 4662, 3446, 9713, 819, 7910, 6147, 6724, 4833, 7420, 7131, 4040, 2439, 9086, 5620, 4919, 8883, 3887, 877, 2806, 4451, 4002, 2984, 8163, 9795, 4726, 1657, 5998, 4717, 9197, 2857, 6577, 543, 6360, 7571, 3092, 5766, 4943, 9615, 2140, 2096, 5593, 6677, 9399, 8306, 4521, 6924, 7725, 9191, 7822, 5033, 7087, 575, 6058, 4077, 5248, 8177, 4223, 4884, 9447, 8180, 735, 6376, 8270, 1142, 567, 65, 3276, 2820, 3341, 8481, 9036, 1893, 1898, 512, 5794, 372, 9623, 9359, 3863, 675, 7351, 3191, 86, 1071, 8358, 8892, 4008, 8217, 8982, 5738, 7647, 5163, 7190, 4136, 6090, 3737, 4589, 4819, 495, 9005, 4729, 785, 9270, 2296, 3042, 1545, 9044, 243, 5284, 4020, 5073, 4216, 6232, 8615, 5760, 2293, 2565, 8117, 1127, 2445, 794, 3598, 3275, 2284, 1681, 419, 1295, 6380, 8121, 5861, 8203, 5432, 5031, 4061, 1145, 3646, 2883, 836, 1716, 4414, 5802, 7957, 6751, 2268, 6447, 1421, 6558, 4816, 1994, 4349, 8445, 6839, 4467, 7277, 1430, 9907, 7154, 5614, 9664, 8238, 5897, 5780, 4845, 8136, 8779, 1934, 4492, 1269, 2934, 4371, 2605, 3656, 9570, 5964, 5076, 6674, 1827, 4177, 1710, 1116, 2666, 4118, 950, 4101, 9321, 2773, 7095, 7312, 8486, 682, 5801, 2026, 6840, 2576, 3271, 7699, 7756, 5366, 5530, 133, 3222, 988, 1438, 4570, 8069, 8500, 1941, 4068, 8775, 4435, 7534, 8887, 7875, 4523, 867, 284, 4506, 6044, 5283, 3462, 6721, 2771, 594, 2616, 32, 4809, 5402, 8602, 7014, 5417, 6999, 8524, 8582, 2952, 5070, 1976, 443, 6618, 5607, 7515, 5363, 3953, 7537, 4987, 1281, 1621, 7963, 8641, 2425, 2998, 3016, 6167, 732, 4787, 1817, 9155, 1755, 5092, 7002, 3464, 2430, 1945, 6931, 8801, 9507, 9085, 1150, 5358, 485, 371, 1914, 1330, 9213, 1995, 868, 3072, 9647, 5686, 9176, 2198, 5624, 3159, 1095, 9121, 9433, 744, 2058, 3500, 9051, 5829, 8497, 9717, 9637, 9310, 4304, 9388, 3590, 4302, 6877, 9891, 542, 3383, 6100, 582, 3258, 9596, 2077, 982, 3749, 6466, 4407, 2081, 7378, 3928, 186, 7421, 4689, 3870, 1617, 497, 6362, 1053, 3708, 6295, 2740, 7055, 4680, 8655, 2446, 6018, 1185, 5279, 1464, 5468, 4090, 4847, 1690, 3611, 1272, 2932, 9065, 6411, 1002, 2435, 5276, 9258, 2108, 8674, 5466, 3447, 8299, 2237, 4671, 8859, 300, 7982, 8011, 6715, 178, 5961, 7672, 1556, 2501, 4864, 2931, 8700, 6768, 7666, 3362, 1455, 4836, 2195, 5444, 3024, 2893, 9020, 2302, 163, 8109, 930, 6965, 9968, 7306, 3710, 7690, 6664, 1334, 6705, 9483, 6006, 7681, 4670, 7060, 5495, 1391, 195, 5902, 8192, 2432, 5975, 6946, 3758, 6472, 2882, 6796, 1693, 9513, 6300, 2955, 3853, 7008, 2308, 6457, 8131, 3375, 679, 1675, 2239, 2889, 6081, 9489, 837, 44, 9696, 3865, 4797, 1907, 1790, 158, 6941, 3587, 8862, 6865, 8218, 8417, 580, 4043, 6368, 3832, 1188, 3301, 6589, 7828, 947, 312, 9565, 3459, 6204, 9050, 9136, 8478, 653, 3696, 5135, 3416, 4497, 461, 5867, 3048, 6907, 6614, 4350, 8707, 914, 2683, 3911, 2107, 8296, 5252, 3155, 2106, 4952, 1275, 8100, 8028, 9087, 7409, 2785, 2982, 8800, 5764, 3997, 4843, 5296, 390, 1577, 8080, 8308, 8367, 2415, 1569, 4648, 6328, 7107, 6228, 9589, 1059, 212, 1783, 8289, 6401, 3405, 7172, 9092, 6020, 7851, 8588, 8729, 1611, 7546, 3797, 2822, 1104, 527, 1953, 3204, 1164, 5523, 2046, 4832, 7453, 427, 5229, 202, 8173, 3668, 8226, 9970, 8283, 1481, 5177, 8757, 589, 5672, 5540, 1000, 4659, 1216, 6, 6930, 5, 2881, 8311, 7147, 7275, 6142, 3437, 8989, 6175, 6093, 4338, 772, 9977, 6322, 9540, 3026, 5623, 1161, 6772, 9605, 7334, 7978, 1643, 8872, 2878, 9822, 7917, 200, 8600, 6281, 6494, 7552, 6926, 105, 1843, 5347, 5420, 5082, 8792, 696, 6027, 1247, 374, 5580, 4361, 929, 3915, 8901, 3954, 8704, 4066, 7424, 3148, 5736, 9955, 4839, 11, 8457, 3635, 1971, 6256, 9799, 2205, 2743, 5562, 3166, 8331, 5479, 2975, 9398, 9735, 3261, 6973, 683, 5817, 2212, 6041, 6883, 1797, 5480, 5134, 2117, 2413, 2555, 3970, 1137, 8477, 6837, 8015, 4276, 2043, 8225, 2685, 1530, 3744, 425, 481, 2210, 5409, 2713, 7160, 1460, 6126, 6935, 196, 1459, 3242, 2393, 8580, 5039, 3868, 1736, 4543, 4722, 91, 7393, 8893, 1813, 1193, 2681, 9010, 1533, 5159, 5105, 3955, 7240, 9319, 4303, 5661, 465, 4629, 2406, 4764, 3742, 6560, 1943, 7491, 8506, 3431, 6164, 9718, 7776, 4931, 4939, 4810, 4610, 6770, 5591, 8827, 6317, 6353, 9594, 7395, 3877, 9527, 2751, 2208, 9918, 3051, 613, 3031, 918, 5768, 2587, 3838, 3537, 9040, 7792, 1546, 8195, 2073, 549, 3972, 6301, 9231, 7899, 9835, 8138, 3013, 7416, 3198, 1604, 2234, 666, 3879, 9581, 4604, 6250, 3427, 3274, 2283, 4341, 6951, 716, 3943, 7443, 1851, 4840, 622, 6554, 5375, 1236, 2942, 4069, 2730, 811, 9102, 1026, 8509, 5081, 7833, 3506, 722, 8937, 2176, 7646, 7906, 7840, 899, 3034, 9324, 8258, 9972, 6827, 6241, 1195, 7298, 5392, 9080, 2852, 998, 1708, 9038, 9928, 2151, 8725, 7662, 4854, 9424, 7671, 3227, 3434, 9245, 2567, 4601, 640, 4970, 3402, 6971, 7284, 3041, 7260, 6504, 7858, 9742, 1423, 9015, 181, 4887, 1564, 6352, 632, 7449, 2585, 9400, 504, 1156, 3551, 3456, 290, 2860, 8768, 5408, 3290, 8387, 5099, 3183, 8260, 3279, 4592, 4638, 1501, 6993, 7836, 4805, 4356, 5748, 2559, 3919, 9547, 9054, 9318, 342, 2280, 9394, 1978, 5337, 6130, 3977, 6651, 6121, 8923, 1332, 4913, 1230, 1633, 6912, 874, 100, 3485, 9643, 4135, 8246, 5600, 3615, 9606, 2655, 9778, 8965, 1589, 1891, 3212, 7480, 9046, 2694, 5224, 9741, 619, 6860, 6917, 306, 4439, 3916, 5194, 4963, 763, 5737, 3652, 9221, 7428, 9593, 3534, 70, 7574, 3714, 4239, 2654, 1641, 6644, 6988, 6143, 6332, 834, 8846, 9181, 7177, 7166, 3774, 209, 8074, 8755, 8386, 9850, 4682, 1887, 5407, 9436, 4973, 830, 3992, 8889, 3743, 1834, 1310, 6686, 7234, 1753, 4222, 3931, 8421, 8593, 2070, 6445, 7540, 3179, 4417, 4254, 8720, 4227, 2544, 9856, 9903, 2457, 1246, 1021, 395, 3661, 8489, 1952, 4702, 9681, 2091, 3599, 1067, 386, 6530, 3922, 3460, 5546, 4564, 8919, 4226, 8313, 7353, 4297, 3570, 8023, 7178, 3967, 9833, 8369, 5847, 4603, 4587, 4495]}} h = Histogram(data_dictionary).set_columns(['col1']).set_breaks(10) context['histogram'] = h return context
335.578947
5,931
0.660916
1,055
6,376
3.984834
0.979147
0.004757
0.00666
0
0
0
0
0
0
0
0
0.737671
0.173149
6,376
18
5,932
354.222222
0.05975
0.00596
0
0
0
0
0.006171
0
0
0
0
0
0
1
0.1
false
0
0.2
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
aaf0656a346419fb3948ac507993ac451a0f20ab
54
py
Python
hearsay/models/__init__.py
norbert/hearsay
547fea74c2c5ad1f60fead66fd7a6479d1229e0b
[ "MIT" ]
2
2017-03-18T03:18:31.000Z
2017-04-11T07:54:05.000Z
hearsay/models/__init__.py
norbert/hearsay
547fea74c2c5ad1f60fead66fd7a6479d1229e0b
[ "MIT" ]
null
null
null
hearsay/models/__init__.py
norbert/hearsay
547fea74c2c5ad1f60fead66fd7a6479d1229e0b
[ "MIT" ]
null
null
null
from .nikolov import TrendClassifier, TrendNormalizer
27
53
0.87037
5
54
9.4
1
0
0
0
0
0
0
0
0
0
0
0
0.092593
54
1
54
54
0.959184
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
c9423cae55eb847c90991549296ad0d2e8d92442
82
py
Python
datasets/__init__.py
MrChenFeng/Project-Template
42a335c6abb710bbae6407cbb0ca461533bc12f9
[ "MIT" ]
null
null
null
datasets/__init__.py
MrChenFeng/Project-Template
42a335c6abb710bbae6407cbb0ca461533bc12f9
[ "MIT" ]
null
null
null
datasets/__init__.py
MrChenFeng/Project-Template
42a335c6abb710bbae6407cbb0ca461533bc12f9
[ "MIT" ]
null
null
null
from .HMDB51 import HMDB51 from .PennAction import PennAction from .LSP import LSP
27.333333
34
0.829268
12
82
5.666667
0.416667
0
0
0
0
0
0
0
0
0
0
0.056338
0.134146
82
3
35
27.333333
0.901408
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
a310a08a3288aec56453d38da51a082c9ef96e65
205
py
Python
kdt/__init__.py
shoaibkamil/OLD-kdt-specializer
85074ec1990df980d25096ea8c55dd81350e531e
[ "BSD-3-Clause" ]
1
2021-11-15T02:11:33.000Z
2021-11-15T02:11:33.000Z
kdt/__init__.py
shoaibkamil/OLD-kdt-specializer
85074ec1990df980d25096ea8c55dd81350e531e
[ "BSD-3-Clause" ]
null
null
null
kdt/__init__.py
shoaibkamil/OLD-kdt-specializer
85074ec1990df980d25096ea8c55dd81350e531e
[ "BSD-3-Clause" ]
null
null
null
# package marker from DiGraph import DiGraph from HyGraph import HyGraph from Graph import master, version, revision, ParVec, SpParVec from feedback import sendFeedback from UFget import UFget, UFdownload
29.285714
61
0.834146
27
205
6.333333
0.592593
0
0
0
0
0
0
0
0
0
0
0
0.136585
205
6
62
34.166667
0.966102
0.068293
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
a32722abb592b00e0b0fe7be29ff8048236cbcab
73
py
Python
ontology/neural_network/sherlock/listify_length_k38.py
ehbeam/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
15
2020-07-17T07:10:26.000Z
2022-02-18T05:51:45.000Z
ontology/neural_network/sherlock/listify_length_k38.py
YifeiCAO/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
2
2022-01-14T09:10:12.000Z
2022-01-28T17:32:42.000Z
ontology/neural_network/sherlock/listify_length_k38.py
YifeiCAO/neuro-knowledge-engine
9dc56ade0bbbd8d14f0660774f787c3f46d7e632
[ "MIT" ]
4
2021-12-22T13:27:32.000Z
2022-02-18T05:51:47.000Z
#!/bin/python import listify_length listify_length.optimize_list_len(38)
18.25
36
0.849315
11
73
5.272727
0.818182
0.448276
0
0
0
0
0
0
0
0
0
0.028986
0.054795
73
4
36
18.25
0.811594
0.164384
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
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
1
0
0
0
0
5
a37565017181feab9855aae6f65db2e2f5445864
8,633
py
Python
plivo/resources/conferences.py
loki-NK/plivo-python
67cccf718a538d97d7e0f1380d0bd5c5434bd6c4
[ "MIT" ]
null
null
null
plivo/resources/conferences.py
loki-NK/plivo-python
67cccf718a538d97d7e0f1380d0bd5c5434bd6c4
[ "MIT" ]
null
null
null
plivo/resources/conferences.py
loki-NK/plivo-python
67cccf718a538d97d7e0f1380d0bd5c5434bd6c4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Conference class - along with its list class """ from plivo.base import PlivoResource, PlivoResourceInterface from plivo.utils import to_param_dict from plivo.utils.validators import * class ConferenceMember(PlivoResource): _name = '' _identifier_string = 'member_id' class Conference(PlivoResource): _name = 'Conference' _identifier_string = 'conference_name' def hangup(self): return self.client.conferences.hangup(self.conference_name) def member_hangup(self, member_id): return self.client.conferences.member_hangup(self.conference_name, member_id) def member_kick(self, member_id): return self.client.conferences.member_kick(self.conference_name, member_id) def member_mute(self, member_id): return self.client.conferences.member_mute(self.conference_name, member_id) def member_mute_stop(self, member_id): return self.client.conferences.member_mute_stop( self.conference_name, member_id) def member_deaf(self, member_id): return self.client.conferences.member_deaf(self.conference_name, member_id) def member_deaf_stop(self, member_id): return self.client.conferences.member_deaf_stop( self.conference_name, member_id) def member_play(self, member_id, url): return self.client.conferences.member_play(self.conference_name, member_id, url) def member_play_stop(self, member_id): return self.client.conferences.member_play_stop( self.conference_name, member_id ) def member_speak(self, member_id, text, voice="WOMAN", #Changed the value to "WOMAN" since the default value is WOMAN language=None): return self.client.conferences.member_speak( self.conference_name, member_id, text, **to_param_dict( self.member_speak, locals()) ) def member_speak_stop(self, member_id): return self.client.conferences.member_speak_stop( self.conference_name, member_id ) def record(self, file_format=None, transcription_type=None, transcription_url=None, transcription_method=None, callback_url=None, callback_method=None): return self.client.conferences.record( self.conference_name, **to_param_dict(self.member_speak, locals()) ) def record_stop(self): return self.client.conferences.record_stop(self.conference_name) class Conferences(PlivoResourceInterface): _resource_type = Conference _iterable = False def list(self): return self.client.request('GET', ('Conference', )) @validate_args( conference_name=[of_type(six.text_type)] ) def get(self, conference_name): return self.client.request( 'GET', ('Conference', conference_name) ) @validate_args( conference_name=[of_type(six.text_type)] ) def delete(self, conference_name): return self.client.request( 'DELETE', ('Conference', conference_name) ) def delete_all(self): return self.client.request( 'DELETE', ('Conference', ) ) def hangup_all(self): return self.delete_all() @validate_args( conference_name=[of_type(six.text_type)] ) def hangup(self, conference_name): return self.delete(conference_name) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], text=[of_type(six.text_type)], voice=[optional(of_type(six.text_type))], language=[optional(of_type(six.text_type))], ) def member_speak(self, conference_name, member_id, text, voice="WOMAN", #Changed the value to "WOMAN" since the default value is WOMAN language=None ): return self.client.request( 'POST', ('Conference', conference_name, 'Member', member_id, 'Speak'), to_param_dict(self.member_speak, locals()) ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], url=[is_url()], ) def member_play(self, conference_name, member_id, url): return self.client.request( 'POST', ('Conference', conference_name, 'Member', member_id, 'Play'), to_param_dict(self.member_play, locals()) ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_deaf(self, conference_name, member_id): return self.client.request( 'POST', ('Conference', conference_name, 'Member', member_id, 'Deaf') ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_mute(self, conference_name, member_id): return self.client.request( 'POST', ('Conference', conference_name, 'Member', member_id, 'Mute') ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_speak_stop(self, conference_name, member_id): return self.client.request( 'DELETE', ('Conference', conference_name, 'Member', member_id, 'Speak') ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_play_stop(self, conference_name, member_id): return self.client.request( 'DELETE', ('Conference', conference_name, 'Member', member_id, 'Play') ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_deaf_stop(self, conference_name, member_id): return self.client.request( 'DELETE', ('Conference', conference_name, 'Member', member_id, 'Deaf') ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_mute_stop(self, conference_name, member_id): return self.client.request( 'DELETE', ('Conference', conference_name, 'Member', member_id, 'Mute') ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_kick(self, conference_name, member_id): return self.client.request( 'POST', ('Conference', conference_name, 'Member', member_id, 'Kick') ) @validate_args( conference_name=[of_type(six.text_type)], member_id=[of_type(six.text_type)], ) def member_hangup(self, conference_name, member_id): return self.client.request( 'DELETE', ('Conference', conference_name, 'Member', member_id) ) @validate_args( conference_name=[of_type(six.text_type)], file_format=[optional(of_type(six.text_type))], transcription_type=[ optional(of_type(six.text_type), is_in(('auto', 'hybrid'))) ], transcription_url=[optional(is_url())], #Changed the validation to 'is_url' transcription_method=[optional(of_type(six.text_type))], callback_url=[optional(is_url())], #Changed the validation to 'is_url' callback_method=[optional(of_type(six.text_type))] ) def record(self, conference_name, file_format=None, transcription_type=None, transcription_url=None, transcription_method="POST", #Changed the value to "POST" since the default value is POST callback_url=None, callback_method="POST" #Changed the value to "POST" since the default value is POST ): return self.client.request( 'POST', ('Conference', conference_name, 'Record') ) def record_stop(self, conference_name): return self.client.request( 'DELETE', ('Conference', conference_name, 'Record') )
34.394422
111
0.605699
960
8,633
5.155208
0.078125
0.164074
0.056375
0.081431
0.856133
0.798141
0.755304
0.711659
0.577288
0.507577
0
0.000162
0.286922
8,633
250
112
34.532
0.803769
0.043438
0
0.397129
0
0
0.049733
0
0
0
0
0
0
1
0.148325
false
0
0.014354
0.148325
0.354067
0
0
0
0
null
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
5
a375b53ef0783e82a579791ea359fd21032f8a2a
392
py
Python
src/classes/expressions/__init__.py
ogoes/compiler-improvement
dbed16b88ed43630480daf6fffda69805d9cb807
[ "MIT" ]
null
null
null
src/classes/expressions/__init__.py
ogoes/compiler-improvement
dbed16b88ed43630480daf6fffda69805d9cb807
[ "MIT" ]
null
null
null
src/classes/expressions/__init__.py
ogoes/compiler-improvement
dbed16b88ed43630480daf6fffda69805d9cb807
[ "MIT" ]
null
null
null
from classes.expressions.Expressao import Expressao from classes.expressions.ExpressaoAditiva import ExpressaoAditiva from classes.expressions.ExpressaoLogica import ExpressaoLogica from classes.expressions.ExpressaoMultiplicativa import ExpressaoMultiplicativa from classes.expressions.ExpressaoSimples import ExpressaoSimples from classes.expressions.ExpressaoUnaria import ExpressaoUnaria
56
79
0.908163
36
392
9.888889
0.277778
0.185393
0.370787
0
0
0
0
0
0
0
0
0
0.061224
392
6
80
65.333333
0.967391
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
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
1
0
0
5
6e73d06955fbc5c4f66677880c2f12a9c69f6485
345
py
Python
typhon/physics/__init__.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
53
2017-09-19T06:40:37.000Z
2022-03-21T07:59:30.000Z
typhon/physics/__init__.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
96
2017-09-18T12:01:42.000Z
2021-12-17T13:54:45.000Z
typhon/physics/__init__.py
tmieslinger/typhon
588539e5c4831ee18753d7ead5b2f2736e922bb1
[ "MIT" ]
32
2017-09-07T09:09:21.000Z
2021-10-01T03:54:23.000Z
# -*- coding: utf-8 -*- """Various physics-related modules.""" from typhon import constants # noqa from typhon.physics.atmosphere import * # noqa from typhon.physics.em import * # noqa from typhon.physics.metrology import * # noqa from typhon.physics.thermodynamics import * # noqa __all__ = [s for s in dir() if not s.startswith('_')]
26.538462
53
0.707246
46
345
5.195652
0.521739
0.209205
0.23431
0.351464
0.338912
0
0
0
0
0
0
0.003472
0.165217
345
12
54
28.75
0.826389
0.231884
0
0
0
0
0.003937
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
6e7acd0bcb7b02fadcaea9014af067c021bdf4d3
27
py
Python
sphinxcontrib/versioning/__main__.py
muggenhor/sphinxcontrib-versioning
d1e3a2cd33b7b91bfe0950d6318812e260f0ede0
[ "MIT" ]
3
2019-02-05T22:17:24.000Z
2019-10-24T12:59:51.000Z
sphinxcontrib/versioning/__main__.py
muggenhor/sphinxcontrib-versioning
d1e3a2cd33b7b91bfe0950d6318812e260f0ede0
[ "MIT" ]
26
2021-01-04T18:39:34.000Z
2022-03-27T03:40:56.000Z
sphinxcontrib/versioning/__main__.py
muggenhor/sphinxcontrib-versioning
d1e3a2cd33b7b91bfe0950d6318812e260f0ede0
[ "MIT" ]
11
2021-01-09T20:26:34.000Z
2022-02-14T08:53:10.000Z
from .cli import cli cli()
9
20
0.703704
5
27
3.8
0.6
0
0
0
0
0
0
0
0
0
0
0
0.185185
27
2
21
13.5
0.863636
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
6e9248de9025e2ed00f3efa639a81f70212a307f
469
py
Python
core/mocks/generated/trezorcrypto/random.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
null
null
null
core/mocks/generated/trezorcrypto/random.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
1
2019-02-08T00:22:42.000Z
2019-02-13T09:41:54.000Z
core/mocks/generated/trezorcrypto/random.py
Kayuii/trezor-crypto
6556616681a4e2d7e18817e8692d4f6e041dee01
[ "MIT" ]
2
2019-02-07T23:57:09.000Z
2020-10-21T07:07:27.000Z
from typing import * # extmod/modtrezorcrypto/modtrezorcrypto-random.h def uniform(n: int) -> int: ''' Compute uniform random number from interval 0 ... n - 1. ''' # extmod/modtrezorcrypto/modtrezorcrypto-random.h def bytes(len: int) -> bytes: ''' Generate random bytes sequence of length len. ''' # extmod/modtrezorcrypto/modtrezorcrypto-random.h def shuffle(data: list) -> None: ''' Shuffles items of given list (in-place). '''
23.45
60
0.667377
56
469
5.589286
0.553571
0.201278
0.345048
0.402556
0.440895
0.440895
0
0
0
0
0
0.005333
0.200426
469
19
61
24.684211
0.829333
0.614072
0
0
0
0
0
0
0
0
0
0
0
1
0.75
false
0
0.25
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
6ec0b42f70391d1bb0ce8150881605c1585775fd
450
py
Python
plugins/dbnd-spark/src/dbnd_spark/_plugin.py
turbaszek/dbnd
6efbf3e7ecd175645e8e58d0d015d32fe9e95ea0
[ "Apache-2.0" ]
null
null
null
plugins/dbnd-spark/src/dbnd_spark/_plugin.py
turbaszek/dbnd
6efbf3e7ecd175645e8e58d0d015d32fe9e95ea0
[ "Apache-2.0" ]
null
null
null
plugins/dbnd-spark/src/dbnd_spark/_plugin.py
turbaszek/dbnd
6efbf3e7ecd175645e8e58d0d015d32fe9e95ea0
[ "Apache-2.0" ]
null
null
null
import dbnd from dbnd import register_config_cls from dbnd_spark.livy.livy_spark_config import LivySparkConfig @dbnd.hookimpl def dbnd_setup_plugin(): from dbnd_spark.local.local_spark_config import SparkLocalEngineConfig register_config_cls(SparkLocalEngineConfig) register_config_cls(LivySparkConfig) try: from dbnd_spark.targets import register_targets register_targets() except ImportError: pass
22.5
74
0.786667
53
450
6.358491
0.377358
0.094955
0.151335
0.231454
0
0
0
0
0
0
0
0
0.173333
450
19
75
23.684211
0.905914
0
0
0
0
0
0
0
0
0
0
0
0
1
0.076923
true
0.076923
0.461538
0
0.538462
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
5
42b51150be087f7f381ce3f474426079b7be56ed
198
py
Python
emukit/samplers/__init__.py
ndalchau/emukit
eb6754ea016a7cd82b275bb4075676b5ed662634
[ "Apache-2.0" ]
272
2018-09-18T11:56:37.000Z
2020-10-10T22:21:25.000Z
emukit/samplers/__init__.py
Tony-Chiong/emukit
a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a
[ "Apache-2.0" ]
278
2018-09-19T15:38:50.000Z
2020-10-14T13:45:24.000Z
emukit/samplers/__init__.py
Tony-Chiong/emukit
a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a
[ "Apache-2.0" ]
88
2018-09-18T11:56:48.000Z
2020-09-23T13:33:55.000Z
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 from .mcmc_sampler import AffineInvariantEnsembleSampler, McmcSampler # noqa: F401
33
83
0.792929
25
198
6.24
1
0
0
0
0
0
0
0
0
0
0
0.052023
0.126263
198
5
84
39.6
0.849711
0.59596
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
42d5276e602a13508411f8bd81b56c2e26973704
190
py
Python
general-practice/Exercises solved/codingbat/List1/has_23.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
general-practice/Exercises solved/codingbat/List1/has_23.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
general-practice/Exercises solved/codingbat/List1/has_23.py
lugabrielbueno/Projeto
f012c5bb9ce6f6d7c9e8196cc7986127dba3eba0
[ "MIT" ]
null
null
null
#Given an int array length 2, return True if it contains a 2 or a 3. #has23([2, 5]) → True #has23([4, 3]) → True #has23([4, 5]) → False def has23(lis): return 2 in lis or 3 in lis
21.111111
68
0.605263
42
190
2.809524
0.52381
0.033898
0.169492
0.186441
0
0
0
0
0
0
0
0.133803
0.252632
190
9
69
21.111111
0.676056
0.673684
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
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
1
0
0
0
1
1
0
0
5
6e4368b59dcc264b585ad5e7da99ad56f2ddfc51
169
py
Python
lib/helpers.py
PrajvalRaval/PlainNotes
219fce4e19f68f96ce8b21298d89b7884d409d48
[ "MIT" ]
300
2015-01-02T21:03:17.000Z
2022-02-07T01:50:34.000Z
lib/helpers.py
PrajvalRaval/PlainNotes
219fce4e19f68f96ce8b21298d89b7884d409d48
[ "MIT" ]
54
2015-01-12T09:19:10.000Z
2021-07-06T07:59:27.000Z
lib/helpers.py
PrajvalRaval/PlainNotes
219fce4e19f68f96ce8b21298d89b7884d409d48
[ "MIT" ]
95
2015-01-24T06:16:10.000Z
2022-03-24T19:18:17.000Z
# -*- coding: utf-8 -*- # Helper functions def return_sublist(main_list, indices ): sublist = [[item[i] for i in indices] for item in main_list] return sublist
24.142857
64
0.674556
25
169
4.44
0.6
0.234234
0
0
0
0
0
0
0
0
0
0.007407
0.201183
169
7
65
24.142857
0.814815
0.224852
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
280b58fc6e7867a8328d9336c9e4c8acdbea0d3b
173
py
Python
tests/__init__.py
wstolk/alpha-vantage
d1d2d5513e5e1c204342da40019a633a5f75a3aa
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
wstolk/alpha-vantage
d1d2d5513e5e1c204342da40019a633a5f75a3aa
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
wstolk/alpha-vantage
d1d2d5513e5e1c204342da40019a633a5f75a3aa
[ "Apache-2.0" ]
null
null
null
import unittest from tests.test_client import ClientTestCase from tests.functions.test_timeseries import TimeSeriesTestCase if __name__ == '__main__': unittest.main()
21.625
62
0.815029
20
173
6.55
0.65
0.137405
0
0
0
0
0
0
0
0
0
0
0.121387
173
7
63
24.714286
0.861842
0
0
0
0
0
0.046243
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
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
28873d76d3d773cb3fe152604e5d0d80953f70c5
12,162
py
Python
api/portal_api/application.py
mkeller3/mapping_portal_api
2a7112e0ddea7c4b662f0ec1a8d7b1ee4627cdd6
[ "Apache-2.0" ]
2
2021-08-09T12:03:31.000Z
2021-09-11T08:23:22.000Z
api/portal_api/application.py
mkeller3/open_source_mapping_portal
2a7112e0ddea7c4b662f0ec1a8d7b1ee4627cdd6
[ "Apache-2.0" ]
null
null
null
api/portal_api/application.py
mkeller3/open_source_mapping_portal
2a7112e0ddea7c4b662f0ec1a8d7b1ee4627cdd6
[ "Apache-2.0" ]
null
null
null
from django.core.exceptions import ObjectDoesNotExist from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework.permissions import IsAuthenticated from .serializers import * from .helpers import * from .constants import * from django.db.models import Q from functools import reduce from drf_yasg.utils import swagger_auto_schema from rest_framework_tracking.mixins import LoggingMixin columns = ['username','app_id','app_type','app_data','created_time', 'updated_time','updated_username','read_access_list','write_access_list', 'notification_access_list','bounding_box','tags','title','basemap', 'disclaimer','description','searchable','built_from_map','map_id', 'retention_date','views','image','built_from_map','map_id'] # Class that will allow CRUD of apps class appView(LoggingMixin, APIView): permission_classes = (IsAuthenticated), @swagger_auto_schema(query_serializer=genericAppSerializer ,operation_description="Get an app with Mapping Portal") def get(self, request): serializer = genericAppSerializer(data=request.GET) serializer.is_valid(raise_exception=True) user_groups = get_user_groups(request.user.username) try: details = appData.objects.get(app_id=serializer.validated_data['app_id']) except ObjectDoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) try: details = appData.objects.filter(reduce(lambda x, y: x | y, [Q(read_access_list__icontains=group,app_id=serializer.validated_data['app_id']) for group in user_groups])) except ObjectDoesNotExist: return Response(status=status.HTTP_401_UNAUTHORIZED) details = appData.objects.get(app_id=serializer.validated_data['app_id']) details.views+=1 details.save() serializer = appDataNoImageSerializer(details) return Response(serializer.data) @swagger_auto_schema(request_body=appDataSerializer, operation_description="Create an app within Mapping Portal") def post(self, request): serializer = appDataSerializer(data=request.data) serializer.is_valid(raise_exception=True) if str(request.user.username) not in request.data['read_access_list']: return Response({"error":f"Username is not in read_access_list. Add {str(request.user.username)} to read_access_list and try again."}, status=status.HTTP_400_BAD_REQUEST) if str(request.user.username) not in request.data['write_access_list']: return Response({"error":f"Username is not in write_access_list. Add {str(request.user.username)} to write_access_list and try again."}, status=status.HTTP_400_BAD_REQUEST) serializer.save(username=request.user.username) return Response(serializer.data, status=status.HTTP_201_CREATED) @swagger_auto_schema(request_body=appDataSerializer, operation_description="Update an app within Mapping Portal") def put(self, request): user_groups = get_user_groups(request.user.username) try: details = appData.objects.get(app_id=request.data['app_id']) except ObjectDoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) try: details = appData.objects.get(reduce(lambda x, y: x | y, [Q(write_access_list__icontains=group,app_id=request.data['app_id']) for group in user_groups])) except details.DoesNotExist: return Response(status=status.HTTP_401_UNAUTHORIZED) serializer = appDataSerializer(details, data=request.data) serializer.is_valid(raise_exception=True) if details.username not in serializer.validated_data['read_access_list']: return Response({"error":f"Username is not in read_access_list. Add {details.username} to read_access_list and try again."}, status=status.HTTP_400_BAD_REQUEST) if details.username not in serializer.validated_data['write_access_list']: return Response({"error":f"Username is not in write_access_list. Add {details.username} to write_access_list and try again."}, status=status.HTTP_400_BAD_REQUEST) serializer.save(username=details.username,updated_username=request.user.username) return Response(serializer.data, status=status.HTTP_201_CREATED) @swagger_auto_schema(request_body=genericAppSerializer, operation_description="Delete an app within Mapping Portal") def delete(self, request): serializer = genericAppSerializer(data=request.data) serializer.is_valid(raise_exception=True) user_groups = get_user_groups(request.user.username) try: details = appData.objects.get(app_id=request.data['app_id']) except ObjectDoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) try: details = appData.objects.get(reduce(lambda x, y: x | y, [Q(write_access_list__icontains=group,app_id=serializer.validated_data['app_id']) for group in user_groups])) except ObjectDoesNotExist: return Response(status=status.HTTP_401_UNAUTHORIZED) details.delete() return Response(status=status.HTTP_204_NO_CONTENT) # Class that returns the image tied to an app class appImageView(LoggingMixin, APIView): @swagger_auto_schema(query_serializer=genericAppSerializer ,operation_description="Get an app image within Mapping Portal") def get(self, request): serializer = genericAppSerializer(data=request.GET) serializer.is_valid(raise_exception=True) try: details = appData.objects.get(app_id=serializer.validated_data['app_id']) except ObjectDoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) serializer = appDataImageSerializer(details) return Response(details) # Class that returns all apps created by a user class personalAppsView(LoggingMixin, APIView): permission_classes = (IsAuthenticated), @swagger_auto_schema(query_serializer=apiSearchSerializer, operation_description="Get an array of all your apps within Mapping Portal") def get(self, request): serializer = apiSearchSerializer(data=request.GET) serializer.is_valid(raise_exception=True) limit, offset = get_limit_and_offset(serializer) if 'search' in serializer.validated_data: search_term = serializer.validated_data['search'] details = appData.objects.filter(Q(username=request.user.username),Q(description__icontains=search_term)|Q(title__icontains=search_term)).values(*columns)[offset:limit] total_results = appData.objects.filter(Q(username=request.user.username),Q(description__icontains=search_term)|Q(title__icontains=search_term)).values('app_id') else: details = appData.objects.filter(username=request.user.username).values(*columns)[offset:limit] total_results = appData.objects.filter(username=request.user.username).values('app_id')[offset:limit] serializer = appDataNoImageSerializer(details, many=True) results = { 'results': serializer.data, 'count': len(serializer.data), 'total_results': len(total_results) } return Response(results) # Class that returns all apps a user has read access to class allAppsView(LoggingMixin, APIView): permission_classes = (IsAuthenticated), @swagger_auto_schema(query_serializer=apiSearchSerializer, operation_description="Get an array of all apps you have access to within Mapping Portal") def get(self, request): serializer = apiSearchSerializer(data=request.GET) serializer.is_valid(raise_exception=True) limit, offset = get_limit_and_offset(serializer) user_groups = get_user_groups(request.user.username) if 'search' in serializer.validated_data: search_term = serializer.validated_data['search'] details = appData.objects.filter(reduce(lambda x, y: x | y, [Q(read_access_list__icontains=group) for group in user_groups]),Q(description__icontains=search_term)|Q(title__icontains=search_term)).values(*columns)[offset:limit] total_results = appData.objects.filter(reduce(lambda x, y: x | y, [Q(read_access_list__icontains=group) for group in user_groups]),Q(description__icontains=search_term)|Q(title__icontains=search_term)).values('app_id') else: details = appData.objects.filter(reduce(lambda x, y: x | y, [Q(read_access_list__icontains=group) for group in user_groups])).values(*columns)[offset:limit] total_results = appData.objects.filter(reduce(lambda x, y: x | y, [Q(read_access_list__icontains=group) for group in user_groups])).values('app_id')[offset:limit] serializer = appDataNoImageSerializer(details, many=True) results = { 'results': serializer.data, 'count': len(serializer.data), 'total_results': len(total_results) } return Response(results) # Class that allows a user to duplicate an app that they have write access to class duplicateAppView(LoggingMixin, APIView): permission_classes = (IsAuthenticated), @swagger_auto_schema(request_body=genericAppSerializer, operation_description="Duplicate an app you have access to within Mapping Portal.") def post(self, request): serializer = genericAppSerializer(data=request.data) serializer.is_valid(raise_exception=True) user_groups = get_user_groups(request.user.username) try: appData.objects.get(app_id=serializer.validated_data['app_id']) except ObjectDoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) try: appData.objects.filter(reduce(lambda x, y: x | y, [Q(write_access_list__icontains=group,app_id=serializer.validated_data['app_id']) for group in user_groups])) except ObjectDoesNotExist: return Response(status=status.HTTP_401_UNAUTHORIZED) details = appData.objects.get(app_id=serializer.validated_data['app_id']) details.user_alias = request.user.username details.updated_user_alias = request.user.username details.title = f"{details.title} (Copy)" del details['app_id'] new_app_data = appData.objects.create(details) new_details = appData.objects.get(app_id=new_app_data.app_id) serializer = appDataSerializer(new_details) return Response(serializer.data) # Class that allows a users to pull back analytics for an app they have write access to class analyticsAppView(LoggingMixin, APIView): permission_classes = (IsAuthenticated), @swagger_auto_schema(query_serializer=genericAppSerializer, operation_description="Get an activity log of an app you have write access to within Mapping Portal.") def get(self, request): serializer = genericAppSerializer(data=request.data) serializer.is_valid(raise_exception=True) user_groups = get_user_groups(request.user.username) try: appData.objects.get(app_id=serializer.validated_data['app_id']) except ObjectDoesNotExist: return Response(status=status.HTTP_404_NOT_FOUND) try: appData.objects.filter(reduce(lambda x, y: x | y, [Q(write_access_list__icontains=group,app_id=serializer.validated_data['app_id']) for group in user_groups])) except ObjectDoesNotExist: return Response(status=status.HTTP_401_UNAUTHORIZED) conn = psycopg2.connect(database=api_db, user=api_db_user, password=api_db_pwd, host=api_db_host) cur = conn.cursor(cursor_factory=RealDictCursor) cur.execute(sql.SQL("SELECT b.username, a.requested_at, a.response_ms, a.method, a.host FROM rest_framework_tracking_apirequestlog a JOIN auth_user b ON b.id = a.user_id WHERE path = '/api/v1/apps/app/' AND query_params = '{''app_id'': '%s'}'"),(serializer.validated_data['app_id'],)) results = cur.fetchall() return Response({'api_calls': results}) # Transfer Ownership
56.567442
292
0.726854
1,518
12,162
5.598814
0.137681
0.021179
0.04024
0.03671
0.803742
0.777386
0.750206
0.744911
0.679256
0.660548
0
0.005693
0.176698
12,162
215
293
56.567442
0.843104
0.029518
0
0.558659
0
0.01676
0.135639
0.009919
0
0
0
0
0
1
0.050279
false
0.005587
0.067039
0
0.312849
0
0
0
0
null
0
0
0
1
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
28957016ae25b7d82503e4fae54ebbe3cb6f0b0b
54
py
Python
CodeWars/Python/7 kyu/Is It Negative Zero (-0)?/main.py
opastushkov/codewars-solutions
0132a24259a4e87f926048318332dcb4d94858ca
[ "MIT" ]
null
null
null
CodeWars/Python/7 kyu/Is It Negative Zero (-0)?/main.py
opastushkov/codewars-solutions
0132a24259a4e87f926048318332dcb4d94858ca
[ "MIT" ]
null
null
null
CodeWars/Python/7 kyu/Is It Negative Zero (-0)?/main.py
opastushkov/codewars-solutions
0132a24259a4e87f926048318332dcb4d94858ca
[ "MIT" ]
null
null
null
def is_negative_zero(n): return str(n)[:2] == '-0'
27
29
0.592593
10
54
3
0.9
0
0
0
0
0
0
0
0
0
0
0.044444
0.166667
54
2
29
27
0.622222
0
0
0
0
0
0.036364
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
2558350e7d396904fb2dddaf05cad4e67f42f00a
29
py
Python
ecs/components/defendtarget.py
joehowells/7drl2020
ec92c0870fb9ee975530d6a92c1b96634040ebc4
[ "MIT" ]
null
null
null
ecs/components/defendtarget.py
joehowells/7drl2020
ec92c0870fb9ee975530d6a92c1b96634040ebc4
[ "MIT" ]
2
2020-03-25T10:30:31.000Z
2020-03-25T20:13:43.000Z
ecs/components/defendtarget.py
joehowells/two-button-berserker
ec92c0870fb9ee975530d6a92c1b96634040ebc4
[ "MIT" ]
null
null
null
class DefendTarget: pass
9.666667
19
0.724138
3
29
7
1
0
0
0
0
0
0
0
0
0
0
0
0.241379
29
2
20
14.5
0.954545
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
c25f48645c572e528b08793b2c7b2f491546f34c
37
py
Python
test_CryoSat-Lead-ML.py
ClaudeDRT/Cryo-Lead-ML
bd31d5679c2bebdb6f72b5b6f8571b8ff014fc1d
[ "MIT" ]
null
null
null
test_CryoSat-Lead-ML.py
ClaudeDRT/Cryo-Lead-ML
bd31d5679c2bebdb6f72b5b6f8571b8ff014fc1d
[ "MIT" ]
null
null
null
test_CryoSat-Lead-ML.py
ClaudeDRT/Cryo-Lead-ML
bd31d5679c2bebdb6f72b5b6f8571b8ff014fc1d
[ "MIT" ]
null
null
null
# test for the CryoSat Lead functions
37
37
0.810811
6
37
5
1
0
0
0
0
0
0
0
0
0
0
0
0.162162
37
1
37
37
0.967742
0.945946
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
c27b74ed62a02b2a5e967bc483207b7fb170cda0
135
py
Python
__init__.py
peter-hunt/chessplusplus
209207a77767f2ae8ccd2ce05d710f355da09319
[ "MIT" ]
1
2022-03-10T13:30:09.000Z
2022-03-10T13:30:09.000Z
__init__.py
peter-hunt/chesschaos
209207a77767f2ae8ccd2ce05d710f355da09319
[ "MIT" ]
null
null
null
__init__.py
peter-hunt/chesschaos
209207a77767f2ae8ccd2ce05d710f355da09319
[ "MIT" ]
null
null
null
from sys import version_info if version_info < (3, 10): raise ValueError('at least python 3.10 is required to run this project')
22.5
76
0.733333
23
135
4.217391
0.826087
0.226804
0
0
0
0
0
0
0
0
0
0.055046
0.192593
135
5
77
27
0.834862
0
0
0
0
0
0.385185
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
c29b3bb06463c6dcd40f67f8338537f01f6c2a06
135
py
Python
config/logger/sys_logger.py
phirasit/TestcaseGenerator
443f320e927a606d9d64933b60591c67c83b6630
[ "MIT" ]
null
null
null
config/logger/sys_logger.py
phirasit/TestcaseGenerator
443f320e927a606d9d64933b60591c67c83b6630
[ "MIT" ]
null
null
null
config/logger/sys_logger.py
phirasit/TestcaseGenerator
443f320e927a606d9d64933b60591c67c83b6630
[ "MIT" ]
null
null
null
from config.logger import Logger import sys class SysLogger(Logger): def write(self, msg): sys.stderr.write(msg + "\n")
15
36
0.666667
19
135
4.736842
0.684211
0.266667
0
0
0
0
0
0
0
0
0
0
0.214815
135
8
37
16.875
0.849057
0
0
0
0
0
0.014815
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
6c079d1818c33fbb5606ba573661ab8ead5ce2d1
93
py
Python
models/__init__.py
ranusingh1993/flask_restfull
c318f7061f82e2687ec3b60ef7fa14d3a764d6c7
[ "MIT" ]
null
null
null
models/__init__.py
ranusingh1993/flask_restfull
c318f7061f82e2687ec3b60ef7fa14d3a764d6c7
[ "MIT" ]
null
null
null
models/__init__.py
ranusingh1993/flask_restfull
c318f7061f82e2687ec3b60ef7fa14d3a764d6c7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jan 25 13:57:59 2022 @author: ranusingh1993 """
11.625
35
0.602151
14
93
4
1
0
0
0
0
0
0
0
0
0
0
0.226667
0.193548
93
7
36
13.285714
0.52
0.88172
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
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
66611e919eee0b9680c9bb15a8d48ab0b773c4e1
103
py
Python
helper.py
wyliew/cs3240-labdemo
fa1ff3fe5bbf562aae20575466bcbe3287b67cb3
[ "MIT" ]
null
null
null
helper.py
wyliew/cs3240-labdemo
fa1ff3fe5bbf562aae20575466bcbe3287b67cb3
[ "MIT" ]
null
null
null
helper.py
wyliew/cs3240-labdemo
fa1ff3fe5bbf562aae20575466bcbe3287b67cb3
[ "MIT" ]
null
null
null
def greeting(name): print("Hello " + name + "!") def goodbye(name): print("Goodbye " + name + "!")
14.714286
31
0.572816
12
103
4.916667
0.5
0.305085
0
0
0
0
0
0
0
0
0
0
0.194175
103
6
32
17.166667
0.710843
0
0
0
0
0
0.156863
0
0
0
0
0
0
1
0.5
false
0
0
0
0.5
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
1
0
5
6681f8730711d301a93ce905aa8bad248b2f289e
1,516
py
Python
tests/test_collect.py
taer/sunpower-pvs-exporter
fa654f0d0ec117e61afbd538cab8e1854cb00c87
[ "MIT" ]
52
2019-06-05T23:42:54.000Z
2022-02-28T16:02:59.000Z
tests/test_collect.py
taer/sunpower-pvs-exporter
fa654f0d0ec117e61afbd538cab8e1854cb00c87
[ "MIT" ]
12
2019-06-05T23:47:35.000Z
2022-02-01T01:39:09.000Z
tests/test_collect.py
taer/sunpower-pvs-exporter
fa654f0d0ec117e61afbd538cab8e1854cb00c87
[ "MIT" ]
19
2019-08-29T14:11:50.000Z
2022-02-28T14:01:26.000Z
# -*- coding: utf-8 -*- """ pytest collector unit test """ import os import requests_mock def test_collect(collector): """ unit test: base case """ path = os.path.join(os.path.dirname(__file__), "resources", "device_list.json") url = "http://sunpowerconsole.com:80/cgi-bin/dl_cgi?Command=DeviceList" with requests_mock.mock() as mocked: with open(path) as file_handle: mocked.get(url, status_code=200, text=file_handle.read()) metrics = collector.collect() # Spot-check some values: 0.017 kw becomes 17.4w assert any(['sunpower_pvs_inverter_ac_power' in str(m) and 'value=17.4' in str(m) for m in metrics]) def test_collect_handle_error_state(collector): """ unit test: devices in error state are expected to emit NaN values """ path = os.path.join(os.path.dirname(__file__), "resources", "device_list.error.json") url = "http://sunpowerconsole.com:80/cgi-bin/dl_cgi?Command=DeviceList" with requests_mock.mock() as mocked: with open(path) as file_handle: mocked.get(url, status_code=200, text=file_handle.read()) metrics = collector.collect() # Spot-check some values: 0.017 kw becomes 17.4w assert any(['sunpower_pvs_inverter_ac_power' in str(m) and 'value=nan' in str(m) for m in metrics])
30.32
75
0.591689
197
1,516
4.380711
0.390863
0.02781
0.02781
0.032445
0.767092
0.767092
0.767092
0.723059
0.723059
0.723059
0
0.026168
0.294195
1,516
49
76
30.938776
0.780374
0.151715
0
0.692308
0
0
0.20947
0.065811
0
0
0
0
0.076923
1
0.076923
false
0
0.076923
0
0.153846
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
66866c65c0b25ec9efccef17b9f0cb7473549d33
90
py
Python
recollection/exceptions.py
mikemalinowski/recollection
531aa7e5e675906cf1a81e4c0f5e568c33d58bb2
[ "MIT" ]
null
null
null
recollection/exceptions.py
mikemalinowski/recollection
531aa7e5e675906cf1a81e4c0f5e568c33d58bb2
[ "MIT" ]
null
null
null
recollection/exceptions.py
mikemalinowski/recollection
531aa7e5e675906cf1a81e4c0f5e568c33d58bb2
[ "MIT" ]
null
null
null
class StorageError(Exception): pass class RegistrationError(Exception): pass
9
35
0.722222
8
90
8.125
0.625
0.4
0
0
0
0
0
0
0
0
0
0
0.211111
90
9
36
10
0.915493
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
6696be51cb31981dac175040ed39fee808f43ba4
127
py
Python
PythonExercicios/ex013.py
MatheusTG/python
5ec8701ffcdc5ac5a3e6e75dcd789bdec84612ad
[ "MIT" ]
null
null
null
PythonExercicios/ex013.py
MatheusTG/python
5ec8701ffcdc5ac5a3e6e75dcd789bdec84612ad
[ "MIT" ]
null
null
null
PythonExercicios/ex013.py
MatheusTG/python
5ec8701ffcdc5ac5a3e6e75dcd789bdec84612ad
[ "MIT" ]
null
null
null
n1 = int(input('Qual o seu salario? ')) print('Após receber 15% de aumento seu salario será de R$ {:.2f}!'.format(n1/100*115))
42.333333
86
0.669291
23
127
3.695652
0.826087
0.235294
0
0
0
0
0
0
0
0
0
0.100917
0.141732
127
2
87
63.5
0.678899
0
0
0
0
0
0.614173
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
66a3ad7fac25b1b69b6c333e7d2d523890e8d684
148
py
Python
tests/test_invalid.py
ongyx/otah
648a6cf2bb26e72ee5146ba513ad848f7c50d796
[ "MIT" ]
null
null
null
tests/test_invalid.py
ongyx/otah
648a6cf2bb26e72ee5146ba513ad848f7c50d796
[ "MIT" ]
null
null
null
tests/test_invalid.py
ongyx/otah
648a6cf2bb26e72ee5146ba513ad848f7c50d796
[ "MIT" ]
null
null
null
# coding: utf8 import otah import pytest def test_invalid(): with pytest.raises(RuntimeError): otah.Manifest("invalid.ipa")
14.8
38
0.655405
17
148
5.647059
0.764706
0
0
0
0
0
0
0
0
0
0
0.008929
0.243243
148
9
39
16.444444
0.848214
0.081081
0
0
0
0
0.088
0
0
0
0
0
0
1
0.2
true
0
0.4
0
0.6
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
66a6d767638ac17f88432ae5ff91c5788263ffa4
5,416
py
Python
tests/domain/test_Send_build_synthdef.py
josiah-wolf-oberholtzer/tloen
731e57f2a0634d5e472c5878ff5b9cc7b4d84974
[ "MIT" ]
3
2020-02-09T09:29:45.000Z
2021-12-29T01:37:45.000Z
tests/domain/test_Send_build_synthdef.py
josiah-wolf-oberholtzer/tloen
731e57f2a0634d5e472c5878ff5b9cc7b4d84974
[ "MIT" ]
null
null
null
tests/domain/test_Send_build_synthdef.py
josiah-wolf-oberholtzer/tloen
731e57f2a0634d5e472c5878ff5b9cc7b4d84974
[ "MIT" ]
1
2020-12-12T22:29:48.000Z
2020-12-12T22:29:48.000Z
import time import pytest from supriya import scsynth from supriya.realtime import BusGroup, Server, Synth from tloen.domain.sends import Send @pytest.fixture(autouse=True, scope="module") def shutdown_scsynth(): scsynth.kill() yield scsynth.kill() @pytest.fixture(autouse=True, scope="module") def shutdown_sync_servers(shutdown_scsynth): for server in tuple(Server._servers): server._shutdown() yield for server in tuple(Server._servers): server._shutdown() @pytest.fixture(scope="module") def server(shutdown_sync_servers): server = Server.default().boot() yield server server.quit() def prepare(server, input_count, output_count, indices): synthdef = Send.build_synthdef( input_count, output_count, calculation_rate="control" ) input_buses = BusGroup.control(input_count).allocate(server=server) output_buses = BusGroup.control(output_count).allocate(server=server) synth = Synth(synthdef=synthdef, in_=int(input_buses), out=int(output_buses)) synth.allocate(server=server) for index in indices: input_buses[index].set(1.0) time.sleep(0.1) amplitudes = output_buses.get() return [round(x, 3) for x in amplitudes] @pytest.mark.parametrize( "input_count, output_count, indices, expected", [ (1, 2, [0], [1.0, 1.0]), (1, 4, [0], [1.0, 1.0, 1.0, 1.0]), (1, 8, [0], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]), (2, 1, [0, 1], [1.0]), (2, 1, [0], [0.5]), (2, 1, [1], [0.5]), (4, 1, [0, 1, 2, 3], [1.0]), (4, 1, [0], [0.25]), (4, 1, [1], [0.25]), (4, 1, [2], [0.25]), (4, 1, [3], [0.25]), (8, 1, [0, 1, 2, 3, 4, 5, 6, 7], [1.0]), (8, 1, [0], [0.125]), (8, 1, [1], [0.125]), (8, 1, [2], [0.125]), (8, 1, [3], [0.125]), (8, 1, [4], [0.125]), (8, 1, [5], [0.125]), (8, 1, [6], [0.125]), (8, 1, [7], [0.125]), ], ) def test_uni(server, input_count, output_count, indices, expected): assert prepare(server, input_count, output_count, indices) == expected @pytest.mark.parametrize( "input_count, output_count, indices, expected", [ (1, 1, [0], [1.0]), (2, 2, [0, 1], [1.0, 1.0]), (2, 2, [0], [1.0, 0.0]), (2, 2, [1], [0.0, 1.0]), (4, 4, [0, 1, 2, 3], [1.0, 1.0, 1.0, 1.0]), (4, 4, [0], [1.0, 0.0, 0.0, 0.0]), (4, 4, [1], [0.0, 1.0, 0.0, 0.0]), (4, 4, [2], [0.0, 0.0, 1.0, 0.0]), (4, 4, [3], [0.0, 0.0, 0.0, 1.0]), (8, 8, [0, 1, 2, 3, 4, 5, 6, 7], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]), (8, 8, [0], [1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), (8, 8, [1], [0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), (8, 8, [2], [0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0]), (8, 8, [3], [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0]), (8, 8, [4], [0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0]), (8, 8, [5], [0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0]), (8, 8, [6], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0]), (8, 8, [7], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0]), ], ) def test_same(server, input_count, output_count, indices, expected): assert prepare(server, input_count, output_count, indices) == expected @pytest.mark.parametrize( "input_count, output_count, indices, expected", [ (2, 4, [0, 1], [1.0, 1.0, 1.0, 1.0]), (2, 4, [0], [1.0, 1.0, 0.0, 0.0]), (2, 4, [1], [0.0, 0.0, 1.0, 1.0]), (2, 8, [0, 1], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]), (2, 8, [0], [1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0]), (2, 8, [1], [0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0]), (4, 8, [0, 1, 2, 3], [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]), (4, 8, [0], [1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]), (4, 8, [1], [0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0]), (4, 8, [2], [0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0]), (4, 8, [3], [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0]), ], ) def test_upmix(server, input_count, output_count, indices, expected): assert prepare(server, input_count, output_count, indices) == expected @pytest.mark.parametrize( "input_count, output_count, indices, expected", [ (4, 2, [0, 1, 2, 3], [1.0, 1.0]), (4, 2, [0], [0.414, 0.0]), (4, 2, [1], [0.293, 0.293]), (4, 2, [2], [0.0, 0.414]), (4, 2, [3], [0.293, 0.293]), (8, 2, [0, 1, 2, 3, 4, 5, 6, 7], [1.0, 1.0]), (8, 2, [0], [0.199, 0.0]), (8, 2, [1], [0.184, 0.076]), (8, 2, [2], [0.141, 0.141]), (8, 2, [3], [0.076, 0.184]), (8, 2, [4], [0.0, 0.199]), (8, 2, [5], [0.076, 0.184]), (8, 2, [6], [0.141, 0.141]), (8, 2, [7], [0.184, 0.076]), (8, 4, [0, 1, 2, 3, 4, 5, 6, 7], [1.0, 1.0, 1.0, 1.0]), (8, 4, [0], [0.414, 0.0, 0.0, 0.0]), (8, 4, [1], [0.293, 0.293, 0.0, 0.0]), (8, 4, [2], [0.0, 0.414, 0.0, 0.0]), (8, 4, [3], [0.0, 0.293, 0.293, 0.0]), (8, 4, [4], [0.0, 0.0, 0.414, 0.0]), (8, 4, [5], [0.0, 0.0, 0.293, 0.293]), (8, 4, [6], [0.0, 0.0, 0.0, 0.414]), (8, 4, [7], [0.293, 0.0, 0.0, 0.293]), ], ) def test_downmix(server, input_count, output_count, indices, expected): assert prepare(server, input_count, output_count, indices) == expected
35.168831
83
0.455502
1,072
5,416
2.251866
0.073694
0.201326
0.236123
0.24855
0.659486
0.62179
0.568351
0.537283
0.454432
0.42005
0
0.225234
0.271233
5,416
153
84
35.398693
0.386369
0
0
0.192593
0
0
0.037112
0
0
0
0
0
0.02963
1
0.059259
false
0
0.037037
0
0.103704
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
dd0be2a6c625f025cf4fc1633557a0c4342695e6
510
py
Python
backend/app/tests/unit/crud/test_appearance.py
flsworld/comment-rick-n-morty
fdab96ca5d14fedd2428fbdad7e49ec8e31b4ddd
[ "MIT" ]
null
null
null
backend/app/tests/unit/crud/test_appearance.py
flsworld/comment-rick-n-morty
fdab96ca5d14fedd2428fbdad7e49ec8e31b4ddd
[ "MIT" ]
null
null
null
backend/app/tests/unit/crud/test_appearance.py
flsworld/comment-rick-n-morty
fdab96ca5d14fedd2428fbdad7e49ec8e31b4ddd
[ "MIT" ]
null
null
null
from app import crud def test_get_appearance(db, setup): assert crud.appearance.get_from_assoc(db, character_id=2, episode_id=1) assert not crud.appearance.get_from_assoc(db, character_id=5, episode_id=1) assert not crud.appearance.get(db, pk=3) def test_delete_appearance(db, setup): appearance = crud.appearance.get_from_assoc(db, character_id=2, episode_id=1) crud.appearance.remove(db, appearance.id) assert not crud.appearance.get_from_assoc(db, character_id=2, episode_id=1)
34
81
0.770588
84
510
4.440476
0.27381
0.225201
0.227882
0.225201
0.651475
0.651475
0.651475
0.651475
0.55496
0.55496
0
0.020179
0.12549
510
14
82
36.428571
0.816144
0
0
0
0
0
0
0
0
0
0
0
0.444444
1
0.222222
false
0
0.111111
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
5
dd3ae07e245cffaf2b3ee77a5c12791ce484748d
137
py
Python
category_label.py
newtonlaw18/Pytorch-Image-Classifier
9d275289425c56eb2775d64f3991f0fd0abbe4c3
[ "MIT" ]
null
null
null
category_label.py
newtonlaw18/Pytorch-Image-Classifier
9d275289425c56eb2775d64f3991f0fd0abbe4c3
[ "MIT" ]
null
null
null
category_label.py
newtonlaw18/Pytorch-Image-Classifier
9d275289425c56eb2775d64f3991f0fd0abbe4c3
[ "MIT" ]
1
2019-08-27T14:36:02.000Z
2019-08-27T14:36:02.000Z
import json def load_json_data(): with open('cat_to_name.json', 'r') as f: cat_to_name = json.load(f) return cat_to_name
22.833333
44
0.664234
25
137
3.32
0.56
0.180723
0.325301
0.313253
0
0
0
0
0
0
0
0
0.218978
137
6
45
22.833333
0.775701
0
0
0
0
0
0.123188
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
dd494d1cd67fbf2b8665dc23eed4bd148472ca06
57
py
Python
aiounifi/__init__.py
JohnLahr/aiounifi
e9313a72e7db2f486f6c12634c77fcc2e3ebc138
[ "MIT" ]
null
null
null
aiounifi/__init__.py
JohnLahr/aiounifi
e9313a72e7db2f486f6c12634c77fcc2e3ebc138
[ "MIT" ]
null
null
null
aiounifi/__init__.py
JohnLahr/aiounifi
e9313a72e7db2f486f6c12634c77fcc2e3ebc138
[ "MIT" ]
null
null
null
from .controller import Controller from .errors import *
19
34
0.807018
7
57
6.571429
0.571429
0
0
0
0
0
0
0
0
0
0
0
0.140351
57
2
35
28.5
0.938776
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
dd557ba2e7b3bd8bde3d1259d458f81985edcef6
169
py
Python
dual_rocks/chat/apps.py
dual-rocks/dual.rocks
6231833fcc36839b1dc6de79edda99d9d15c2cfe
[ "MIT" ]
null
null
null
dual_rocks/chat/apps.py
dual-rocks/dual.rocks
6231833fcc36839b1dc6de79edda99d9d15c2cfe
[ "MIT" ]
10
2020-02-18T00:37:32.000Z
2022-03-12T00:17:58.000Z
dual_rocks/chat/apps.py
dual-rocks/dual.rocks
6231833fcc36839b1dc6de79edda99d9d15c2cfe
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ChatConfig(AppConfig): name = 'dual_rocks.chat' def ready(self): import dual_rocks.chat.signals # noqa: F401
18.777778
52
0.698225
22
169
5.272727
0.772727
0.155172
0.224138
0
0
0
0
0
0
0
0
0.022556
0.213018
169
8
53
21.125
0.849624
0.059172
0
0
0
0
0.095541
0
0
0
0
0
0
1
0.2
false
0
0.4
0
1
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
dda153f6769d2c8f291c128850ba485151f7406a
6,096
py
Python
relations/routes/tests/test_ui.py
arXiv/arxiv-external-links
a92e04fb4f9f50629e241de6d64e8aa8e2be6774
[ "MIT" ]
6
2019-07-22T14:39:29.000Z
2021-11-05T12:24:36.000Z
relations/routes/tests/test_ui.py
arXiv/arxiv-external-links
a92e04fb4f9f50629e241de6d64e8aa8e2be6774
[ "MIT" ]
24
2019-06-11T01:16:38.000Z
2021-06-02T00:18:51.000Z
relations/routes/tests/test_ui.py
arXiv/arxiv-external-links
a92e04fb4f9f50629e241de6d64e8aa8e2be6774
[ "MIT" ]
5
2019-06-24T21:00:37.000Z
2021-11-05T12:24:29.000Z
"""Tests for :mod:`routes.ui`.""" import json import os from http import HTTPStatus from typing import Any, Optional from unittest import TestCase, mock from datetime import datetime import jsonschema from flask import Flask from arxiv.users.helpers import generate_token from arxiv.users import auth from arxiv.users.domain import Scope from relations.factory import create_ui_app from .. import ui class TestUIRoutes(TestCase): """tests for UI routes.""" def setUp(self) -> None: """Initialize the Flask application, and get a client for testing.""" os.environ['JWT_SECRET'] = 'foosecret' self.app = create_ui_app() self.client = self.app.test_client() @mock.patch(f'{ui.__name__}.controllers.create_new') def test_create_new(self, mock_create_new: Any) -> None: """Endpoint /<string:arxiv_id_str>v<int:arxiv_ver>/relations returns html about the newly created relation.""" post_data = {'resource_type': 'type', 'resource_id': 1012, 'description': 'test relation', 'creator': 'tester'} return_data = {'arxiv_id': 'TEST', 'arxiv_ver': 10, 'resource_type': 'type', 'description': 'test relation'} mock_create_new.return_value = return_data, HTTPStatus.OK, {} token = generate_token('1234', 'foo@user.com', 'foouser', scope=[]) response = self.client.post('/TESTv10/relations', data=json.dumps(post_data), headers={'Authorization': token}, content_type='application/json') self.assertEqual(response.status_code, HTTPStatus.OK) self.assertEqual(response.headers['Content-Type'], 'text/html; charset=utf-8') @mock.patch(f'{ui.__name__}.controllers.supercede') def test_supercede(self, mock_supercede: Any) -> None: """Endpoint /<string:arxiv_id_str>v<int:arxiv_ver>/relations/<string:relation_id_str> returns html about the newly created relation and the relation it superceded.""" post_data = {'resource_type': 'type', 'resource_id': 1012, 'description': 'test relation', 'creator': 'tester'} return_data = {'arxiv_id': 'TEST', 'arxiv_ver': 10, 'relation_id': 1012, 'resource_type': 'type', 'description': 'test relation'} mock_supercede.return_value = return_data, HTTPStatus.OK, {} token = generate_token('1234', 'foo@user.com', 'foouser', scope=[]) response = self.client.post('/TESTv10/relations/relation1', data=json.dumps(post_data), headers={'Authorization': token}, content_type='application/json') self.assertEqual(response.status_code, HTTPStatus.OK) self.assertEqual(response.headers['Content-Type'], 'text/html; charset=utf-8') @mock.patch(f'{ui.__name__}.controllers.suppress') def test_suppress(self, mock_suppress: Any) -> None: """Endpoint /<string:arxiv_id_str>v<int:arxiv_ver>/relations/<string:relation_id_str>/delete returns html about the newly created relation and the relation it suppressed.""" post_data = {'resource_type': 'type', 'resource_id': 1012, 'description': 'test relation', 'creator': 'tester'} return_data = {'arxiv_id': 'TEST', 'arxiv_ver': 10, 'relation_id': 1012, 'resource_type': 'type', 'description': 'test relation'} mock_suppress.return_value = return_data, HTTPStatus.OK, {} token = generate_token('1234', 'foo@user.com', 'foouser', scope=[]) response = self.client.post('/TESTv10/relations/relation1/delete', data=json.dumps(post_data), headers={'Authorization': token}, content_type='application/json') expected_data = return_data self.assertEqual(response.status_code, HTTPStatus.OK) self.assertEqual(response.headers['Content-Type'], 'text/html; charset=utf-8') @mock.patch(f'{ui.__name__}.controllers.retrieve') def test_get_relations(self, mock_retrieve: Any) -> None: """Endpoint /<string:arxiv_id_str>v<int:arxiv_ver> returns html about all relations belonging to an id.""" return_data = {'relations': [{'key1': 'val1'}, {'key1': 'val2'}]} mock_retrieve.return_value = return_data, HTTPStatus.OK, {} token = generate_token('1234', 'foo@user.com', 'foouser', scope=[]) response = self.client.get('/TESTv1', headers={'Authorization': token}) self.assertEqual(response.status_code, HTTPStatus.OK) self.assertEqual(response.headers['Content-Type'], 'text/html; charset=utf-8') @mock.patch(f'{ui.__name__}.controllers.retrieve') def test_get_events(self, mock_retrieve: Any) -> None: """Endpoint /<string:arxiv_id_str>v<int:arxiv_ver>/log returns html about all events belonging to an id.""" return_data = {'relations': [{'key1': 'val1'}, {'key1': 'val2'}]} mock_retrieve.return_value = return_data, HTTPStatus.OK, {} token = generate_token('1234', 'foo@user.com', 'foouser', scope=[]) response = self.client.get('/TESTv1/log', headers={'Authorization': token}) self.assertEqual(response.status_code, HTTPStatus.OK) self.assertEqual(response.headers['Content-Type'], 'text/html; charset=utf-8')
48
181
0.572835
640
6,096
5.26875
0.184375
0.032622
0.068209
0.017794
0.76809
0.76809
0.760083
0.735765
0.735765
0.735765
0
0.016163
0.299705
6,096
126
182
48.380952
0.773718
0.122867
0
0.653465
0
0
0.217113
0.044478
0
0
0
0
0.09901
1
0.059406
false
0
0.128713
0
0.19802
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
06f4b8ab6a6e34d38a1cde96e965013554d51310
99
py
Python
plotly/validators/histogram2dcontour/ybins/__init__.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/histogram2dcontour/ybins/__init__.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/histogram2dcontour/ybins/__init__.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
from ._start import StartValidator from ._size import SizeValidator from ._end import EndValidator
24.75
34
0.848485
12
99
6.75
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.121212
99
3
35
33
0.931034
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
661b79ba5eaff5f4c6fb35c6ba1ee5e6ed620f13
346
py
Python
clean.py
fsaporito/pyTriangle
fb13ea67689ffb8430df2f93c3b545ff96396c8e
[ "Apache-2.0" ]
null
null
null
clean.py
fsaporito/pyTriangle
fb13ea67689ffb8430df2f93c3b545ff96396c8e
[ "Apache-2.0" ]
null
null
null
clean.py
fsaporito/pyTriangle
fb13ea67689ffb8430df2f93c3b545ff96396c8e
[ "Apache-2.0" ]
null
null
null
import os # Make Clean os.system("cd triangle && make distclean && cd ..") os.system("cd proto && make clean && cd ..") os.system("cd proto && make clean && cd ..") os.system("cd __pycache__ && rm -f * && cd ..") os.system("cd protopy && cd __pycache__ && rm -f * && cd .. && cd ..") os.system("rm -f triangle.bin") os.system("rm -f showme.bin")
34.6
70
0.598266
54
346
3.685185
0.277778
0.281407
0.251256
0.241206
0.452261
0.321608
0.321608
0.321608
0.321608
0.321608
0
0
0.17052
346
10
71
34.6
0.69338
0.028902
0
0.25
0
0
0.671642
0
0
0
0
0
0
1
0
true
0
0.125
0
0.125
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
662deb57d34ab83175d21a90d874ab970b7253f4
167
py
Python
homebrew/test/test_cache.py
igroen/homebrew
7f97865418230d7174c17b58ec1a60f1bf84819b
[ "0BSD" ]
null
null
null
homebrew/test/test_cache.py
igroen/homebrew
7f97865418230d7174c17b58ec1a60f1bf84819b
[ "0BSD" ]
6
2020-02-24T19:05:50.000Z
2021-11-02T21:31:26.000Z
homebrew/test/test_cache.py
igroen/homebrew
7f97865418230d7174c17b58ec1a60f1bf84819b
[ "0BSD" ]
1
2020-05-02T13:56:03.000Z
2020-05-02T13:56:03.000Z
from homebrew import cache def test_read(monkeypatch): assert cache.read(None) is None def test_write(monkeypatch): assert cache.write(None, None) is None
16.7
42
0.748503
25
167
4.92
0.48
0.113821
0.357724
0
0
0
0
0
0
0
0
0
0.173653
167
9
43
18.555556
0.891304
0
0
0
0
0
0
0
0
0
0
0
0.4
1
0.4
false
0
0.2
0
0.6
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
6649f0eba0a229d78e15bf0d52f5000b24f1c7f9
71
py
Python
pydbatools/__init__.py
dfundako/pydbatools
41e5c39e65cf1e474384aabed682d18c2da7b117
[ "MIT" ]
1
2020-09-28T15:57:16.000Z
2020-09-28T15:57:16.000Z
pydbatools/__init__.py
dfundako/pydbatools
41e5c39e65cf1e474384aabed682d18c2da7b117
[ "MIT" ]
null
null
null
pydbatools/__init__.py
dfundako/pydbatools
41e5c39e65cf1e474384aabed682d18c2da7b117
[ "MIT" ]
null
null
null
from .client import SQLClient from .api import dbcc_checkdb, backup_db
23.666667
40
0.830986
11
71
5.181818
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.126761
71
2
41
35.5
0.919355
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
664d119b1d294afc9bd0c69032332c4150175747
3,652
py
Python
apps/project/models/tasks.py
rainydaygit/testtcloudserver
8037603efe4502726a4d794fb1fc0a3f3cc80137
[ "MIT" ]
349
2020-08-04T10:21:01.000Z
2022-03-23T08:31:29.000Z
apps/project/models/tasks.py
rainydaygit/testtcloudserver
8037603efe4502726a4d794fb1fc0a3f3cc80137
[ "MIT" ]
2
2021-01-07T06:17:05.000Z
2021-04-01T06:01:30.000Z
apps/project/models/tasks.py
rainydaygit/testtcloudserver
8037603efe4502726a4d794fb1fc0a3f3cc80137
[ "MIT" ]
70
2020-08-24T06:46:14.000Z
2022-03-25T13:23:27.000Z
from library.api.db import EntityWithNameModel, EntityModel, db class Task(EntityWithNameModel): # 任务状态 0:任务创建 1:任务已删除 2:任务已完成 3:任务被拒绝 ACTIVE = 0 # 任务创建,待审核状态 DISABLE = 1 # 任务已删除 FINISH = 2 # 任务已完成 REJECT = 3 # 任务被拒绝 STATUS_HOLDING = 2 # 任务审核通过,待执行 STATUS_DOING = 3 # 任务执行中 STATUS_REJECT = 4 # 任务拒绝 STATUS_DONE = 5 # 任务已完成 description = db.Column(db.String(300)) # 任务描述 testreport = db.Column(db.Text()) # 测试报告 tmethod = db.Column(db.String(50)) # 任务方法:自动化 or 人工测试 ttype = db.Column(db.String(50)) # 任务类型:功能测试,兼容性测试... status = db.Column(db.Integer, default=ACTIVE) # 任务状态 case_list = db.Column(db.Text()) # case列表 creator = db.Column(db.Integer) # 创建任务的人 executor = db.Column(db.Integer) # 执行任务的人 priority = db.Column(db.Integer) # 优先级 0:紧急 1:高 2:中 3:低 start_time = db.Column(db.TIMESTAMP) # 任务开始时间 end_time = db.Column(db.TIMESTAMP) # 任务结束时间 project_id = db.Column(db.Integer) # 项目ID version = db.Column(db.Integer) # 所属版本 ext = db.Column(db.Text()) attach = db.Column(db.Text()) # 附件: 用例测试完成后的测试附件 attachment = db.Column(db.String(300)) # 附件:新建修改任务的时候上传的 附件文件 tag = db.Column(db.String(300)) # 标签 class TaskCase(EntityModel): ACTIVE = 0 # case创建 DISABLE = 1 # case已删除 SKIP = 2 # 跳过 GOOD = 3 # case执行通过 NOTGOOD = 4 # case执行不通过 task_id = db.Column(db.Integer) # 关联的taskID executor = db.Column(db.Integer) # 用例执行者保存的为用户id exe_way = db.Column(db.Integer) # 执行方式,0:批量执行 1:单个执行 SMOKING_CASE = 0 FUNCTION_CASE = 1 title = db.Column(db.String(300)) # 标题 cnumber = db.Column(db.String(100)) # 编号 module_id = db.Column(db.Integer) # 用例模块 feature_id = db.Column(db.Integer) # 子模块 ctype = db.Column(db.String(10)) # 用例类型 description = db.Column(db.String(300)) # 用例描述 precondition = db.Column(db.Text()) # 前置条件 step_result = db.Column(db.Text()) # 用例步骤及预期结果 json->string格式存入 is_auto = db.Column(db.Integer, default=DISABLE) # 是否可转自动化 status = db.Column(db.Integer, default=ACTIVE) # 用例任务状态 comment = db.Column(db.String(300)) # 备注 version = db.Column(db.Integer) # 所属版本 project_id = db.Column(db.Integer) # 所属项目 modifier = db.Column(db.Integer) # 修改人ID handler = db.Column(db.Integer) # 处理人ID priority = db.Column(db.Integer) # 优先级 0:紧急 1:高 2:中 3:低 class TaskCaseRecord(EntityModel): ACTIVE = 0 # case创建 DISABLE = 1 # case已删除 SKIP = 2 # 跳过 GOOD = 3 # case执行通过 NOTGOOD = 4 # case执行不通过 task_case_id = db.Column(db.Integer) # 关联的task_case_id task_id = db.Column(db.Integer) # 关联的taskID executor = db.Column(db.Integer) # 用例执行者保存的为用户id exe_way = db.Column(db.Integer) # 执行方式,0:批量执行 1:单个执行 SMOKING_CASE = 0 FUNCTION_CASE = 1 title = db.Column(db.String(300)) # 标题 cnumber = db.Column(db.String(100)) # 编号 module_id = db.Column(db.Integer) # 用例模块 feature_id = db.Column(db.Integer) # 子模块 ctype = db.Column(db.String(10)) # taskcase用例类型 description = db.Column(db.String(300)) # 用例描述 precondition = db.Column(db.Text()) # 前置条件 step_result = db.Column(db.Text()) # 用例步骤及预期结果 json->string格式存入 is_auto = db.Column(db.Integer, default=DISABLE) # 是否可转自动化 status = db.Column(db.Integer, default=ACTIVE) # 用例任务状态 comment = db.Column(db.String(300)) # 备注 version = db.Column(db.Integer) # 所属版本 project_id = db.Column(db.Integer) # 所属项目 modifier = db.Column(db.Integer) # 修改人ID handler = db.Column(db.Integer) # 处理人ID priority = db.Column(db.Integer) # 优先级 0:紧急 1:高 2:中 3:低
37.265306
68
0.642114
524
3,652
4.417939
0.263359
0.193521
0.241901
0.227646
0.764147
0.693305
0.657019
0.641469
0.641469
0.641469
0
0.02937
0.226177
3,652
97
69
37.649485
0.789809
0.183461
0
0.731707
0
0
0
0
0
0
0
0
0
1
0
false
0
0.012195
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
b09fcbcd5534f6acace4122fcfd44ad41adaf1f5
250
py
Python
22.py
eliascmaciiel/infosatc-lp-avaliativo-01
d326e66a932ab17e6e5eadcc4d516923d2521ddf
[ "MIT" ]
null
null
null
22.py
eliascmaciiel/infosatc-lp-avaliativo-01
d326e66a932ab17e6e5eadcc4d516923d2521ddf
[ "MIT" ]
null
null
null
22.py
eliascmaciiel/infosatc-lp-avaliativo-01
d326e66a932ab17e6e5eadcc4d516923d2521ddf
[ "MIT" ]
1
2021-09-09T19:52:11.000Z
2021-09-09T19:52:11.000Z
print("Olá, seja muito bem vindo, peço que você digite um comprimento em jardas e iremos lhe apresentar convertido em metros.") J = float(input("Número em Jardas: ")) M = 0.91 * J print ("{} Jardas, convertido em metros é: {} metros.".format(J,M))
41.666667
127
0.7
41
250
4.268293
0.707317
0.091429
0.205714
0
0
0
0
0
0
0
0
0.014423
0.168
250
6
128
41.666667
0.826923
0
0
0
0
0.25
0.721116
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
b0d065fd34713c7fd27777098cc906eac03d2852
37
py
Python
source/src/trand/__init__.py
McIntyre-Lab/TranD
e283e7534ee05edbb756dec94d547c7d03125add
[ "RSA-MD" ]
null
null
null
source/src/trand/__init__.py
McIntyre-Lab/TranD
e283e7534ee05edbb756dec94d547c7d03125add
[ "RSA-MD" ]
null
null
null
source/src/trand/__init__.py
McIntyre-Lab/TranD
e283e7534ee05edbb756dec94d547c7d03125add
[ "RSA-MD" ]
null
null
null
"""Mark trand as a python module."""
18.5
36
0.648649
6
37
4
1
0
0
0
0
0
0
0
0
0
0
0
0.162162
37
1
37
37
0.774194
0.810811
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
b0f132459e82ba45a2dbe798e420a2d071421504
100
py
Python
tests/test_version.py
davehadley/bootstraphistogram
4f4c4e73c0209a3508a56abfe4acb4cb0e85b1bd
[ "MIT" ]
1
2020-06-26T14:29:29.000Z
2020-06-26T14:29:29.000Z
tests/test_version.py
davehadley/bootstraphistogram
4f4c4e73c0209a3508a56abfe4acb4cb0e85b1bd
[ "MIT" ]
4
2021-11-09T17:11:38.000Z
2022-02-07T11:22:05.000Z
tests/test_version.py
davehadley/bootstraphistogram
4f4c4e73c0209a3508a56abfe4acb4cb0e85b1bd
[ "MIT" ]
null
null
null
import bootstraphistogram def testversion(): assert bootstraphistogram.__version__ == "0.6.0"
16.666667
52
0.76
10
100
7.2
0.8
0
0
0
0
0
0
0
0
0
0
0.034884
0.14
100
5
53
20
0.802326
0
0
0
0
0
0.05
0
0
0
0
0
0.333333
1
0.333333
true
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
0
0
0
5
9fcfdb8228315ebca874073f095ffb7134848a27
43
py
Python
recurrentshop/__init__.py
arpitgogia/recurrentshop
5cc58af3020c19ec9597944fdd4d33dfb29e9bec
[ "MIT" ]
488
2016-09-22T00:00:05.000Z
2022-02-25T21:39:19.000Z
recurrentshop/__init__.py
arpitgogia/recurrentshop
5cc58af3020c19ec9597944fdd4d33dfb29e9bec
[ "MIT" ]
66
2016-09-22T13:54:44.000Z
2017-06-14T06:30:16.000Z
recurrentshop/__init__.py
arpitgogia/recurrentshop
5cc58af3020c19ec9597944fdd4d33dfb29e9bec
[ "MIT" ]
150
2017-07-12T22:32:43.000Z
2022-03-03T13:57:17.000Z
from .engine import * from .cells import *
14.333333
21
0.72093
6
43
5.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.186047
43
2
22
21.5
0.885714
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
b00abcd14c9b0be74038950a18f27f12b223b01c
100
py
Python
src/delt/__init__.py
delt-io/delt
9eda9ca60b6f3d8bed9400f9590863380cbc517d
[ "Apache-2.0" ]
4
2019-03-21T17:49:43.000Z
2019-04-17T19:34:20.000Z
src/delt/__init__.py
delt-io/delt
9eda9ca60b6f3d8bed9400f9590863380cbc517d
[ "Apache-2.0" ]
19
2018-11-16T19:30:41.000Z
2019-03-20T03:29:15.000Z
src/delt/__init__.py
delt-io/delt
9eda9ca60b6f3d8bed9400f9590863380cbc517d
[ "Apache-2.0" ]
null
null
null
from delt.__about__ import __version__ from delt.cli import main __all__ = ["main", "__version__"]
20
38
0.77
13
100
4.692308
0.615385
0.262295
0
0
0
0
0
0
0
0
0
0
0.13
100
4
39
25
0.701149
0
0
0
0
0
0.15
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5