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
93c1eb1f4991f66af28e8e0ada73101223f8803a
1,287
py
Python
008/largestproduct.py
efarr/euler
cba51045542b2d93f20633d9fc74444be821bdaf
[ "MIT" ]
1
2015-12-16T18:40:21.000Z
2015-12-16T18:40:21.000Z
008/largestproduct.py
efarr/euler
cba51045542b2d93f20633d9fc74444be821bdaf
[ "MIT" ]
null
null
null
008/largestproduct.py
efarr/euler
cba51045542b2d93f20633d9fc74444be821bdaf
[ "MIT" ]
null
null
null
digits = ( "73167176531330624919225119674426574742355349194934" "96983520312774506326239578318016984801869478851843" "85861560789112949495459501737958331952853208805511" "12540698747158523863050715693290963295227443043557" "66896648950445244523161731856403098711121722383113" "62229893423380308135336276614282806444486645238749" "30358907296290491560440772390713810515859307960866" "70172427121883998797908792274921901699720888093776" "65727333001053367881220235421809751254540594752243" "52584907711670556013604839586446706324415722155397" "53697817977846174064955149290862569321978468622482" "83972241375657056057490261407972968652414535100474" "82166370484403199890008895243450658541227588666881" "16427171479924442928230863465674813919123162824586" "17866458359124566529476545682848912883142607690042" "24219022671055626321111109370544217506941658960408" "07198403850962455444362981230987879927244284909188" "84580156166097919133875499200524063689912560717606" "05886116467109405077541002256983155200055935729725" "71636269561882670428252483600823257530420752963450" ) largestProduct = 0 def product(factors): prod = 1 for i in factors: prod *= int(i) return prod for i in range(0,1000-13): largestProduct = max(product(digits[i:i+13]), largestProduct) print(largestProduct)
37.852941
62
0.900544
54
1,287
21.462963
0.703704
0.018982
0.010354
0
0
0
0
0
0
0
0
0.82262
0.045066
1,287
34
63
37.852941
0.120423
0
0
0
0
0
0.776398
0.776398
0
0
0
0
0
1
0.033333
false
0
0
0
0.066667
0.033333
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
93c8aafe39b32c17a80187be31e58c901581fdd8
219
py
Python
djsuperadmin/serializers.py
bnznamco/insuperadmin
5817d8e46feeec757cc874485690e02600036a7c
[ "MIT" ]
1
2019-04-30T15:21:24.000Z
2019-04-30T15:21:24.000Z
djsuperadmin/serializers.py
bnznamco/insuperadmin
5817d8e46feeec757cc874485690e02600036a7c
[ "MIT" ]
null
null
null
djsuperadmin/serializers.py
bnznamco/insuperadmin
5817d8e46feeec757cc874485690e02600036a7c
[ "MIT" ]
null
null
null
from .models import Content from hvad.contrib.restframework import TranslatableModelSerializer class ContentSerializer(TranslatableModelSerializer): class Meta: model = Content fields = '__all__'
21.9
66
0.762557
19
219
8.578947
0.736842
0.392638
0
0
0
0
0
0
0
0
0
0
0.187215
219
9
67
24.333333
0.91573
0
0
0
0
0
0.031963
0
0
0
0
0
0
1
0
false
0
0.333333
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
93dbf87e215efb6e088b2492512847d704db4cae
63
py
Python
tests/test_where.py
nickdrozd/experimental
e4532800939935cb2ebaec12d0e0fcc63cd7ea78
[ "MIT" ]
21
2018-06-19T00:57:38.000Z
2022-02-20T22:52:53.000Z
tests/test_where.py
nickdrozd/experimental
e4532800939935cb2ebaec12d0e0fcc63cd7ea78
[ "MIT" ]
3
2018-07-21T14:48:15.000Z
2019-03-06T15:29:20.000Z
tests/test_where.py
nickdrozd/experimental
e4532800939935cb2ebaec12d0e0fcc63cd7ea78
[ "MIT" ]
4
2017-08-18T18:08:05.000Z
2018-07-21T14:04:20.000Z
from .common import experimental from .where_testfile import *
21
32
0.825397
8
63
6.375
0.75
0
0
0
0
0
0
0
0
0
0
0
0.126984
63
2
33
31.5
0.927273
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
9e190b4eb30244928f6abf24352b3cf33dc06ed3
72
py
Python
telegram_bot/keyboard/default/__init__.py
alenworld/django_telegram_bot
aa9a3570787feaaf474086a8cee66155f749983e
[ "MIT" ]
3
2021-07-07T02:30:56.000Z
2021-12-19T07:48:35.000Z
telegram_bot/keyboard/default/__init__.py
alenworld/django_telegram_bot
aa9a3570787feaaf474086a8cee66155f749983e
[ "MIT" ]
null
null
null
telegram_bot/keyboard/default/__init__.py
alenworld/django_telegram_bot
aa9a3570787feaaf474086a8cee66155f749983e
[ "MIT" ]
1
2021-07-07T02:42:23.000Z
2021-07-07T02:42:23.000Z
from .menus import menu, user_menu from .utils import getPhone, getCity
24
36
0.805556
11
72
5.181818
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.138889
72
2
37
36
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
f50e1958c9e4f1faef4cd08692d643e23f100145
34
py
Python
tools/server-side/svnpubsub/svnpubsub/__init__.py
timgates42/subversion
0f088f530747140c6783c2eeb77ceff8e8613c42
[ "Apache-2.0" ]
7
2018-01-18T06:13:21.000Z
2020-07-09T03:46:16.000Z
tools/server-side/svnpubsub/svnpubsub/__init__.py
timgates42/subversion
0f088f530747140c6783c2eeb77ceff8e8613c42
[ "Apache-2.0" ]
4
2015-01-12T22:23:41.000Z
2015-01-12T22:33:52.000Z
tools/server-side/svnpubsub/svnpubsub/__init__.py
timgates42/subversion
0f088f530747140c6783c2eeb77ceff8e8613c42
[ "Apache-2.0" ]
6
2015-10-24T06:23:10.000Z
2022-03-07T11:25:05.000Z
# Turn svnpubsub/ into a package.
17
33
0.735294
5
34
5
1
0
0
0
0
0
0
0
0
0
0
0
0.176471
34
1
34
34
0.892857
0.911765
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
f5321177dff80b7212f2dfc988c12f565008d8eb
124
py
Python
jupyter_MyGo_kernel/__main__.py
nufeng1999/jupyter-MyGo-kernel
d879179ded13d253b82f243e4188c23929d196bc
[ "MIT" ]
null
null
null
jupyter_MyGo_kernel/__main__.py
nufeng1999/jupyter-MyGo-kernel
d879179ded13d253b82f243e4188c23929d196bc
[ "MIT" ]
null
null
null
jupyter_MyGo_kernel/__main__.py
nufeng1999/jupyter-MyGo-kernel
d879179ded13d253b82f243e4188c23929d196bc
[ "MIT" ]
null
null
null
from ipykernel.kernelapp import IPKernelApp from .kernel import GoKernel IPKernelApp.launch_instance(kernel_class=GoKernel)
31
50
0.879032
15
124
7.133333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.072581
124
3
51
41.333333
0.930435
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
f55832e47ed7e149112fa688860fbee41597dbe4
7,503
py
Python
tests/pinball/repository/github_repository_test.py
DotModus/pinball
deeb4ec20bbd000ad44f7b44e6a7c0fa900dbbea
[ "Apache-2.0" ]
1,143
2015-03-06T22:10:53.000Z
2022-02-23T21:16:47.000Z
tests/pinball/repository/github_repository_test.py
DotModus/pinball
deeb4ec20bbd000ad44f7b44e6a7c0fa900dbbea
[ "Apache-2.0" ]
70
2015-03-06T00:44:39.000Z
2019-05-01T13:15:10.000Z
tests/pinball/repository/github_repository_test.py
Betterment/pinball
11120b54fcc25b2857631a5de65a1195ffcffb5c
[ "Apache-2.0" ]
169
2015-03-09T21:27:12.000Z
2022-03-19T08:09:13.000Z
# Copyright 2015, Pinterest, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Validation tests for Github repository.""" import base64 import httplib import mock import unittest from pinball.repository.github_repository import GithubRepository __author__ = 'Pawel Garbacki' __copyright__ = 'Copyright 2015, Pinterest, Inc.' __credits__ = [__author__] __license__ = 'Apache' __version__ = '2.0' class GithubRepositoryTestCase(unittest.TestCase): def setUp(self): self._call_count = 0 @mock.patch('pinball.repository.github_repository.httplib.' 'HTTPSConnection') def test_get_config(self, httpsconnection_mock): conn = mock.Mock() httpsconnection_mock.return_value = conn response = mock.Mock() conn.getresponse.return_value = response response.status = httplib.OK encoded_content = base64.b64encode('some_content') response.read.return_value = '{"content": "%s"}' % encoded_content repository = GithubRepository() content = repository._get_config('/some_path') self.assertEqual('some_content', content) self.assertEqual('GET', conn.request.call_args[0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args[0][1]) self.assertIsNone(conn.request.call_args[0][2]) @mock.patch('pinball.repository.github_repository.httplib.' 'HTTPSConnection') def test_put_new_config(self, httpsconnection_mock): def _getresponse(): self.assertLessEqual(self._call_count, 1) result = mock.Mock() if self._call_count == 0: result.status = httplib.NOT_FOUND result.read.return_value = '{"message":"Not Found"}' else: result.status = httplib.CREATED # result.read.return_value = '{"type":"file"}' self._call_count += 1 return result conn = mock.Mock() httpsconnection_mock.return_value = conn conn.getresponse = _getresponse repository = GithubRepository() repository._put_config('/some_path', 'some_content') self.assertEqual('GET', conn.request.call_args_list[0][0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args_list[0][0][1]) self.assertIsNone(conn.request.call_args_list[0][0][2]) self.assertEqual('PUT', conn.request.call_args_list[1][0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args_list[1][0][1]) encoded_content = base64.b64encode('some_content') self.assertEqual('{"content": "%s", "committer": {"name": "Pinball", ' '"email": "workflows@pinterest.com"}, "message": ' '"updating config"}' % encoded_content, conn.request.call_args_list[1][0][2]) @mock.patch('pinball.repository.github_repository.httplib.' 'HTTPSConnection') def test_put_replace_config(self, httpsconnection_mock): def _getresponse(): self.assertLessEqual(self._call_count, 1) result = mock.Mock() if self._call_count == 0: result.status = httplib.OK result.read.return_value = '{"type":"file", "sha":"abc"}' else: result.status = httplib.CREATED self._call_count += 1 return result conn = mock.Mock() httpsconnection_mock.return_value = conn conn.getresponse = _getresponse repository = GithubRepository() repository._put_config('/some_path', 'some_content') self.assertEqual('GET', conn.request.call_args_list[0][0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args_list[0][0][1]) self.assertIsNone(conn.request.call_args_list[0][0][2]) self.assertEqual('PUT', conn.request.call_args_list[1][0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args_list[1][0][1]) encoded_content = base64.b64encode('some_content') self.assertEqual('{"content": "%s", "committer": {"name": "Pinball", ' '"email": "workflows@pinterest.com"}, "message": ' '"updating config", "sha": "abc"}' % encoded_content, conn.request.call_args_list[1][0][2]) @mock.patch('pinball.repository.github_repository.httplib.' 'HTTPSConnection') def test_delete_config(self, httpsconnection_mock): def _getresponse(): self.assertLessEqual(self._call_count, 1) result = mock.Mock() result.status = httplib.OK if self._call_count == 0: result.read.return_value = '{"type":"file", "sha":"abc"}' self._call_count += 1 return result conn = mock.Mock() httpsconnection_mock.return_value = conn conn.getresponse = _getresponse repository = GithubRepository() repository._delete_config('/some_path') self.assertEqual('GET', conn.request.call_args_list[0][0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args_list[0][0][1]) self.assertIsNone(conn.request.call_args_list[0][0][2]) self.assertEqual('DELETE', conn.request.call_args_list[1][0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args_list[1][0][1]) self.assertEqual('{"committer": {"name": "Pinball", ' '"email": "workflows@pinterest.com"}, "message": ' '"updating config", "sha": "abc"}', conn.request.call_args_list[1][0][2]) @mock.patch('pinball.repository.github_repository.httplib.' 'HTTPSConnection') def test_list_directory(self, httpsconnection_mock): conn = mock.Mock() httpsconnection_mock.return_value = conn response = mock.Mock() conn.getresponse.return_value = response response.status = httplib.OK response.read.return_value = ('[{"type":"dir", "name":"some_dir"},' ' {"type":"file", "name":"some_file"}]') repository = GithubRepository() paths = repository._list_directory('/some_path/', False) self.assertEqual(['some_dir/', 'some_file'], paths) self.assertEqual('GET', conn.request.call_args[0][0]) self.assertEqual('/api/v3/repos/data/configs/contents/some_path', conn.request.call_args[0][1]) self.assertIsNone(conn.request.call_args[0][2])
42.389831
78
0.615487
840
7,503
5.291667
0.169048
0.059393
0.08099
0.102587
0.743757
0.720585
0.701462
0.701462
0.684139
0.684139
0
0.020029
0.254698
7,503
176
79
42.630682
0.774857
0.085166
0
0.753731
0
0
0.206282
0.097297
0
0
0
0
0.216418
1
0.067164
false
0
0.037313
0
0.134328
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
1956c251fd36ef4563791c4246dcd3002d523401
94
py
Python
new-file.py
omattei/cs3240-labdemo
26e9b9849368a3a1008f2cb74dbfb03230bc4c04
[ "MIT" ]
null
null
null
new-file.py
omattei/cs3240-labdemo
26e9b9849368a3a1008f2cb74dbfb03230bc4c04
[ "MIT" ]
null
null
null
new-file.py
omattei/cs3240-labdemo
26e9b9849368a3a1008f2cb74dbfb03230bc4c04
[ "MIT" ]
null
null
null
import datetime print("The current date is", datetime.datetime.today().strftime('%Y-%m-%d'))
23.5
76
0.712766
14
94
4.785714
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.085106
94
3
77
31.333333
0.77907
0
0
0
0
0
0.287234
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
1956ece2c454508b2a9ced6a7b5628d7fa99a0b0
26
py
Python
src/wai/annotations/imgaug/isp/scale/component/__init__.py
waikato-ufdl/wai-annotations-processors
9dcd5d421983cd717f738f54fcbae04ede2954d1
[ "Apache-2.0" ]
null
null
null
src/wai/annotations/imgaug/isp/scale/component/__init__.py
waikato-ufdl/wai-annotations-processors
9dcd5d421983cd717f738f54fcbae04ede2954d1
[ "Apache-2.0" ]
2
2020-06-17T01:59:38.000Z
2020-06-17T02:03:06.000Z
src/wai/annotations/imgaug/isp/scale/component/__init__.py
waikato-ufdl/wai-annotations-processors
9dcd5d421983cd717f738f54fcbae04ede2954d1
[ "Apache-2.0" ]
null
null
null
from ._Scale import Scale
13
25
0.807692
4
26
5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.153846
26
1
26
26
0.909091
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
2706c2fd301e3f666b4e2601cb9e2045148837d2
5,271
py
Python
Algorithm.Python/stubs/QuantConnect/Exceptions.py
gaoxiaojun/Lean
9dca43bccb720d0df91e4bfc1d363b71e3a36cb5
[ "Apache-2.0" ]
2
2020-12-08T11:27:20.000Z
2021-04-06T13:21:15.000Z
Algorithm.Python/stubs/QuantConnect/Exceptions.py
gaoxiaojun/Lean
9dca43bccb720d0df91e4bfc1d363b71e3a36cb5
[ "Apache-2.0" ]
null
null
null
Algorithm.Python/stubs/QuantConnect/Exceptions.py
gaoxiaojun/Lean
9dca43bccb720d0df91e4bfc1d363b71e3a36cb5
[ "Apache-2.0" ]
1
2020-12-08T11:27:21.000Z
2020-12-08T11:27:21.000Z
# encoding: utf-8 # module QuantConnect.Exceptions calls itself Exceptions # from QuantConnect.Common, Version=2.4.0.0, Culture=neutral, PublicKeyToken=null # by generator 1.145 # no doc # imports import datetime import QuantConnect.Exceptions import System import System.Reflection import typing # no functions # classes class DllNotFoundPythonExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets QuantConnect.Exceptions.DllNotFoundPythonExceptionInterpreter instances DllNotFoundPythonExceptionInterpreter() """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int class IExceptionInterpreter: """ Defines an exception interpreter. Interpretations are invoked on QuantConnect.Interfaces.IAlgorithm.RunTimeError """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int class InvalidTokenPythonExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets QuantConnect.Exceptions.InvalidTokenPythonExceptionInterpreter instances InvalidTokenPythonExceptionInterpreter() """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int class KeyErrorPythonExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets QuantConnect.Exceptions.KeyErrorPythonExceptionInterpreter instances KeyErrorPythonExceptionInterpreter() """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int class NoMethodMatchPythonExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets QuantConnect.Exceptions.NoMethodMatchPythonExceptionInterpreter instances NoMethodMatchPythonExceptionInterpreter() """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int class PythonExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets QuantConnect.Exceptions.PythonExceptionInterpreter instances PythonExceptionInterpreter() """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int class ScheduledEventExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets QuantConnect.Scheduling.ScheduledEventException instances ScheduledEventExceptionInterpreter() """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int class StackExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets exceptions using the configured interpretations StackExceptionInterpreter(interpreters: IEnumerable[IExceptionInterpreter]) """ def CanInterpret(self, exception: System.Exception) -> bool: pass @staticmethod def CreateFromAssemblies(assemblies: typing.List[System.Reflection.Assembly]) -> QuantConnect.Exceptions.StackExceptionInterpreter: pass def GetExceptionMessageHeader(self, exception: System.Exception) -> str: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass def __init__(self, interpreters: typing.List[QuantConnect.Exceptions.IExceptionInterpreter]) -> QuantConnect.Exceptions.StackExceptionInterpreter: pass Interpreters: typing.List[QuantConnect.Exceptions.IExceptionInterpreter] Order: int class UnsupportedOperandPythonExceptionInterpreter(System.object, QuantConnect.Exceptions.IExceptionInterpreter): """ Interprets QuantConnect.Exceptions.UnsupportedOperandPythonExceptionInterpreter instances UnsupportedOperandPythonExceptionInterpreter() """ def CanInterpret(self, exception: System.Exception) -> bool: pass def Interpret(self, exception: System.Exception, innerInterpreter: QuantConnect.Exceptions.IExceptionInterpreter) -> System.Exception: pass Order: int
31.189349
150
0.763802
412
5,271
9.762136
0.194175
0.158628
0.203133
0.132273
0.601193
0.601193
0.55271
0.533565
0.391099
0.391099
0
0.002028
0.158035
5,271
168
151
31.375
0.904236
0.246443
0
0.716418
0
0
0
0
0
0
0
0
0
1
0.313433
false
0.313433
0.074627
0
0.671642
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
27257f50c186a819a5dc8fb1625efc47d46f8786
19
py
Python
12_module_basic/11_package/pack1/pack1_mod.py
hemuke/python
bc99f2b5aee997083ae31f59a2b33db48c8255f3
[ "Apache-2.0" ]
null
null
null
12_module_basic/11_package/pack1/pack1_mod.py
hemuke/python
bc99f2b5aee997083ae31f59a2b33db48c8255f3
[ "Apache-2.0" ]
null
null
null
12_module_basic/11_package/pack1/pack1_mod.py
hemuke/python
bc99f2b5aee997083ae31f59a2b33db48c8255f3
[ "Apache-2.0" ]
null
null
null
print('pack1_mod')
9.5
18
0.736842
3
19
4.333333
1
0
0
0
0
0
0
0
0
0
0
0.055556
0.052632
19
1
19
19
0.666667
0
0
0
0
0
0.473684
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
275e3d73aae6d830664a2ca3964c7e9f76e16769
13
py
Python
src/__init__.py
Heringer-Epson/IR_forecaster
c255cdf93fb2d554188eaa3925dfe26704a8095f
[ "MIT" ]
null
null
null
src/__init__.py
Heringer-Epson/IR_forecaster
c255cdf93fb2d554188eaa3925dfe26704a8095f
[ "MIT" ]
3
2019-12-01T17:22:21.000Z
2019-12-04T15:31:42.000Z
src/__init__.py
Heringer-Epson/IR_forecaster
c255cdf93fb2d554188eaa3925dfe26704a8095f
[ "MIT" ]
null
null
null
#blank-file.
6.5
12
0.692308
2
13
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.076923
13
1
13
13
0.75
0.846154
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
276398e5ac59f945e5606de86b3674be06cd0e39
164
py
Python
src/config.py
ahlinist/bobby-py
3b55a68a1eaaf6688c3a94494a8f39d7187c3174
[ "MIT" ]
null
null
null
src/config.py
ahlinist/bobby-py
3b55a68a1eaaf6688c3a94494a8f39d7187c3174
[ "MIT" ]
null
null
null
src/config.py
ahlinist/bobby-py
3b55a68a1eaaf6688c3a94494a8f39d7187c3174
[ "MIT" ]
null
null
null
import os class Config: ws_connection_url = os.getenv("WS_CONNECTION_URL") video_streaming_endpoint = "/video" motion_control_topic = "/topic/motion"
20.5
54
0.737805
21
164
5.380952
0.666667
0.212389
0.265487
0
0
0
0
0
0
0
0
0
0.164634
164
7
55
23.428571
0.824818
0
0
0
0
0
0.219512
0
0
0
0
0
0
1
0
false
0
0.2
0
1
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
27941c5e2d76cb45cd0871cb2724d66737961a17
207
py
Python
app/blog/blog_auth/permisions.py
Risoko/DRF-Auth-With-Blog-Entries
ba903d1eba1d1f774bfa3782d51d292430d84dbd
[ "MIT" ]
null
null
null
app/blog/blog_auth/permisions.py
Risoko/DRF-Auth-With-Blog-Entries
ba903d1eba1d1f774bfa3782d51d292430d84dbd
[ "MIT" ]
null
null
null
app/blog/blog_auth/permisions.py
Risoko/DRF-Auth-With-Blog-Entries
ba903d1eba1d1f774bfa3782d51d292430d84dbd
[ "MIT" ]
null
null
null
from rest_framework.permissions import IsAuthenticated class IsNotAuthenticated(IsAuthenticated): def has_permission(self, request, view): return not super().has_permission(request, view)
25.875
56
0.768116
22
207
7.090909
0.772727
0.166667
0
0
0
0
0
0
0
0
0
0
0.15942
207
8
57
25.875
0.896552
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
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
27af1f76c249b6e286fcf83cdd5cf38ad87b631e
213
py
Python
doc/test/test-data-provider/weibo_spider/parser/__init__.py
baijunhan/data-flow
7cba999c49dd38a4d4afe9f9076cda80b3c6ea7c
[ "Apache-2.0" ]
1
2021-01-16T16:21:20.000Z
2021-01-16T16:21:20.000Z
doc/test/test-data-provider/weibo_spider/parser/__init__.py
baijunhan/data-flow
7cba999c49dd38a4d4afe9f9076cda80b3c6ea7c
[ "Apache-2.0" ]
6
2021-08-31T21:49:48.000Z
2022-03-02T10:13:08.000Z
doc/test/test-data-provider/weibo_spider/parser/__init__.py
baijunhan/data-flow
7cba999c49dd38a4d4afe9f9076cda80b3c6ea7c
[ "Apache-2.0" ]
null
null
null
from .index_parser import IndexParser from .page_parser import PageParser from .photo_parser import PhotoParser from .album_parser import AlbumParser __all__ = [IndexParser, PageParser, PhotoParser, AlbumParser]
30.428571
61
0.84507
25
213
6.88
0.48
0.27907
0
0
0
0
0
0
0
0
0
0
0.107981
213
6
62
35.5
0.905263
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.8
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
7e032aee8693798e93b1224ded85ff06a0c55bb1
153
py
Python
2018/01/part1.py
timofurrer/aoc-2020
446b688a57601d9891f520e43b7f822c373a6ff4
[ "MIT" ]
null
null
null
2018/01/part1.py
timofurrer/aoc-2020
446b688a57601d9891f520e43b7f822c373a6ff4
[ "MIT" ]
null
null
null
2018/01/part1.py
timofurrer/aoc-2020
446b688a57601d9891f520e43b7f822c373a6ff4
[ "MIT" ]
null
null
null
from pathlib import Path puzzle_input_raw = (Path(__file__).parent / "input.txt").read_text() print(sum(int(x) for x in puzzle_input_raw.splitlines()))
30.6
68
0.75817
25
153
4.28
0.76
0.205607
0.261682
0
0
0
0
0
0
0
0
0
0.098039
153
5
69
30.6
0.775362
0
0
0
0
0
0.058442
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
fd8dc6416b5762288e07c77401c498214c9a28ea
63
py
Python
app/wordle/__init__.py
toanphan19/playgroundapi
857753bc0618defb1df8e1369c0bac0d10ebb558
[ "MIT" ]
null
null
null
app/wordle/__init__.py
toanphan19/playgroundapi
857753bc0618defb1df8e1369c0bac0d10ebb558
[ "MIT" ]
null
null
null
app/wordle/__init__.py
toanphan19/playgroundapi
857753bc0618defb1df8e1369c0bac0d10ebb558
[ "MIT" ]
null
null
null
from . import dictionary, solver, models from .models import *
21
40
0.761905
8
63
6
0.625
0
0
0
0
0
0
0
0
0
0
0
0.15873
63
2
41
31.5
0.90566
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
fd8ebb0da99e1ffe5fe219b409bb7f81463dea17
62
py
Python
python/testData/multipleArgumentsCompletion/notSuggestIfTargetOutOfScopeFunction.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/multipleArgumentsCompletion/notSuggestIfTargetOutOfScopeFunction.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/multipleArgumentsCompletion/notSuggestIfTargetOutOfScopeFunction.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
def foo(x, y, z): z = 42 x = 42 y = 100500 foo(<caret>)
7.75
17
0.483871
13
62
2.307692
0.615385
0
0
0
0
0
0
0
0
0
0
0.238095
0.322581
62
7
18
8.857143
0.47619
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
fdbfb50531f99612e8676f93ce977a19eda058fc
7,410
py
Python
odoo-13.0/addons/mrp/tests/test_cancel_mo.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
12
2021-03-26T08:39:40.000Z
2022-03-16T02:20:10.000Z
odoo-13.0/addons/mrp/tests/test_cancel_mo.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
13
2020-12-20T16:00:21.000Z
2022-03-14T14:55:30.000Z
odoo-13.0/addons/mrp/tests/test_cancel_mo.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
17
2020-08-31T11:18:49.000Z
2022-02-09T05:57:31.000Z
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import Form from datetime import datetime, timedelta from odoo.fields import Datetime as Dt from odoo.exceptions import UserError from odoo.addons.mrp.tests.common import TestMrpCommon class TestMrpCancelMO(TestMrpCommon): def test_cancel_mo_without_routing_1(self): """ Cancel a Manufacturing Order with no routing, no production. """ # Create MO manufacturing_order = self.generate_mo()[0] # Do nothing, cancel it manufacturing_order.action_cancel() # Check the MO and its moves are cancelled self.assertEqual(manufacturing_order.state, 'cancel', "MO should be in cancel state.") self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'cancel', "Cancelled MO raw moves must be cancelled as well.") self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'cancel', "Cancelled MO raw moves must be cancelled as well.") self.assertEqual(manufacturing_order.move_finished_ids.state, 'cancel', "Cancelled MO finished move must be cancelled as well.") def test_cancel_mo_without_routing_2(self): """ Cancel a Manufacturing Order with no routing but some productions. """ # Create MO manufacturing_order = self.generate_mo()[0] # Produce some quantity produce_form = Form(self.env['mrp.product.produce'].with_context(active_id=manufacturing_order.id)) produce_form.qty_producing = 2 produce = produce_form.save() produce.do_produce() # Cancel it manufacturing_order.action_cancel() # Check it's cancelled self.assertEqual(manufacturing_order.state, 'cancel', "MO should be in cancel state.") self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'cancel', "Cancelled MO raw moves must be cancelled as well.") self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'cancel', "Cancelled MO raw moves must be cancelled as well.") self.assertEqual(manufacturing_order.move_finished_ids.state, 'cancel', "Cancelled MO finished move must be cancelled as well.") def test_cancel_mo_without_routing_3(self): """ Cancel a Manufacturing Order with no routing but some productions after post inventory. """ # Create MO manufacturing_order = self.generate_mo()[0] # Produce some quantity (not all to avoid to done the MO when post inventory) produce_form = Form(self.env['mrp.product.produce'].with_context(active_id=manufacturing_order.id)) produce_form.qty_producing = 2 produce = produce_form.save() produce.do_produce() # Post Inventory manufacturing_order.post_inventory() # Cancel the MO manufacturing_order.action_cancel() # Check MO is marked as done and its SML are done or cancelled self.assertEqual(manufacturing_order.state, 'done', "MO should be in done state.") self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'done', "Due to 'post_inventory', some move raw must stay in done state") self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'done', "Due to 'post_inventory', some move raw must stay in done state") self.assertEqual(manufacturing_order.move_raw_ids[2].state, 'cancel', "The other move raw are cancelled like their MO.") self.assertEqual(manufacturing_order.move_raw_ids[3].state, 'cancel', "The other move raw are cancelled like their MO.") self.assertEqual(manufacturing_order.move_finished_ids[0].state, 'done', "Due to 'post_inventory', a move finished must stay in done state") self.assertEqual(manufacturing_order.move_finished_ids[1].state, 'cancel', "The other move finished is cancelled like its MO.") def test_cancel_mo_with_routing(self): """ Cancel a Manufacturing Order with routing (so generate a Work Order) and produce some quantities. When cancelled, the MO must be marked as done and the WO must be cancelled. """ # Create MO mo_data = self.generate_mo() manufacturing_order = mo_data[0] bom = mo_data[1] bom.routing_id = self.routing_1 manufacturing_order.button_plan() workorder = manufacturing_order.workorder_ids # Produce some quantity workorder.button_start() workorder.qty_producing = 2 workorder._apply_update_workorder_lines() workorder.record_production() # Post Inventory manufacturing_order.post_inventory() # Cancel it manufacturing_order.action_cancel() # Check MO is done, WO is cancelled and its SML are done or cancelled self.assertEqual(manufacturing_order.state, 'done', "MO should be in done state.") self.assertEqual(workorder.state, 'cancel', "WO should be cancelled.") self.assertEqual(manufacturing_order.move_raw_ids[0].state, 'done', "Due to 'post_inventory', some move raw must stay in done state") self.assertEqual(manufacturing_order.move_raw_ids[1].state, 'done', "Due to 'post_inventory', some move raw must stay in done state") self.assertEqual(manufacturing_order.move_raw_ids[2].state, 'cancel', "The other move raw are cancelled like their MO.") self.assertEqual(manufacturing_order.move_raw_ids[3].state, 'cancel', "The other move raw are cancelled like their MO.") self.assertEqual(manufacturing_order.move_finished_ids[0].state, 'done', "Due to 'post_inventory', a move finished must stay in done state") self.assertEqual(manufacturing_order.move_finished_ids[1].state, 'cancel', "The other move finished is cancelled like its MO.") def test_unlink_mo(self): """ Try to unlink a Manufacturing Order, and check it's possible or not depending of the MO state (must be in cancel state to be unlinked, but the unlink method will try to cancel MO before unlink them). """ # Case #1: Create MO, do nothing and try to unlink it (can be deleted) manufacturing_order = self.generate_mo()[0] self.assertEqual(manufacturing_order.exists().state, 'confirmed') manufacturing_order.unlink() # Check the MO is deleted. self.assertEqual(manufacturing_order.exists().state, False) # Case #2: Create MO, make and post some production, then try to unlink # it (cannot be deleted) manufacturing_order = self.generate_mo()[0] # Produce some quantity (not all to avoid to done the MO when post inventory) produce_form = Form(self.env['mrp.product.produce'].with_context(active_id=manufacturing_order.id)) produce_form.qty_producing = 2 produce = produce_form.save() produce.do_produce() # Post Inventory manufacturing_order.post_inventory() # Unlink the MO must raises an UserError since it cannot be really cancelled self.assertEqual(manufacturing_order.exists().state, 'progress') with self.assertRaises(UserError): manufacturing_order.unlink()
51.103448
107
0.681242
960
7,410
5.095833
0.147917
0.183974
0.143091
0.168643
0.745503
0.741823
0.702167
0.656787
0.629395
0.629395
0
0.005987
0.233603
7,410
144
108
51.458333
0.855432
0.201215
0
0.717391
0
0
0.223507
0
0
0
0
0
0.293478
1
0.054348
false
0
0.054348
0
0.119565
0
0
0
0
null
0
0
1
0
1
1
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
0
0
0
5
fdc65708917afb2021e8f48a0b2bb91b62ceb29b
204
py
Python
sogou_mrc/dataset/base_dataset.py
ishine/SMRCToolkit
8a81410225b85a126f1535f5b1aa1137d6948e98
[ "Apache-2.0" ]
1,238
2019-03-31T11:10:31.000Z
2020-03-11T09:22:24.000Z
sogou_mrc/dataset/base_dataset.py
ishine/SMRCToolkit
8a81410225b85a126f1535f5b1aa1137d6948e98
[ "Apache-2.0" ]
36
2019-04-07T05:38:04.000Z
2020-03-12T15:38:26.000Z
sogou_mrc/dataset/base_dataset.py
ishine/SMRCToolkit
8a81410225b85a126f1535f5b1aa1137d6948e98
[ "Apache-2.0" ]
162
2019-03-31T11:07:13.000Z
2020-03-11T09:23:16.000Z
# coding: utf-8 class BaseReader(object): def read(self, *input): raise NotImplementedError class BaseEvaluator(object): def get_score(self, *input): raise NotImplementedError
17
33
0.686275
22
204
6.318182
0.681818
0.129496
0.201439
0.47482
0
0
0
0
0
0
0
0.006289
0.220588
204
11
34
18.545455
0.867925
0.063725
0
0.333333
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
fddbcccbca6487f2584da9964fd8c4610cbc9330
101
py
Python
sites/pycharm-guide/demos/tutorials/visual_pytest/tdd_flow/test_guardian02.py
stevewhitmore/jetbrains_guide
234eb44a3ecc670048e4d02b3b5b39affe4a9e31
[ "Apache-2.0", "CC-BY-4.0" ]
16
2019-02-01T14:03:53.000Z
2019-08-18T13:57:33.000Z
sites/pycharm-guide/demos/tutorials/visual_pytest/tdd_flow/test_guardian02.py
stevewhitmore/jetbrains_guide
234eb44a3ecc670048e4d02b3b5b39affe4a9e31
[ "Apache-2.0", "CC-BY-4.0" ]
3
2019-03-22T07:40:33.000Z
2019-04-03T16:04:35.000Z
sites/pycharm-guide/demos/tutorials/visual_pytest/tdd_flow/test_guardian02.py
stevewhitmore/jetbrains_guide
234eb44a3ecc670048e4d02b3b5b39affe4a9e31
[ "Apache-2.0", "CC-BY-4.0" ]
2
2019-03-25T15:00:12.000Z
2019-08-18T13:57:36.000Z
from laxleague.guardian import Guardian def test_construction(): g = Guardian('Mary', 'Jones')
16.833333
39
0.722772
12
101
6
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.158416
101
5
40
20.2
0.847059
0
0
0
0
0
0.089109
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
fdf16f7438be5090290d6ee1c0d4e1afde42c9f3
203
py
Python
overrides/__init__.py
ashwin153/overrides
cfb00222553c426a03099e723a505033ea3353b5
[ "Apache-2.0" ]
null
null
null
overrides/__init__.py
ashwin153/overrides
cfb00222553c426a03099e723a505033ea3353b5
[ "Apache-2.0" ]
null
null
null
overrides/__init__.py
ashwin153/overrides
cfb00222553c426a03099e723a505033ea3353b5
[ "Apache-2.0" ]
null
null
null
from overrides.enforce import EnforceOverrides from overrides.final import final from overrides.overrides import __VERSION__, overrides __all__ = ["__VERSION__", "overrides", "final", "EnforceOverrides"]
50.75
67
0.82266
21
203
7.380952
0.380952
0.251613
0
0
0
0
0
0
0
0
0
0
0.08867
203
4
67
50.75
0.837838
0
0
0
0
0
0.20098
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
e339d3b24a7eaa1e48e42095371f49cf366d4eb5
117
py
Python
samples/bitmex/trade.py
Snufkin0866/btc_bot_framework
164db3924ec2126e71cfac4be96acc65fb47d1d6
[ "MIT" ]
3
2020-10-17T14:08:57.000Z
2021-07-08T03:30:52.000Z
samples/bitmex/trade.py
Snufkin0866/btc_bot_framework
164db3924ec2126e71cfac4be96acc65fb47d1d6
[ "MIT" ]
null
null
null
samples/bitmex/trade.py
Snufkin0866/btc_bot_framework
164db3924ec2126e71cfac4be96acc65fb47d1d6
[ "MIT" ]
2
2021-01-07T15:12:38.000Z
2021-04-01T19:11:50.000Z
from botfw.base.trade import test_trade from botfw.bitmex.trade import BitmexTrade test_trade(BitmexTrade('XBTUSD'))
29.25
42
0.837607
17
117
5.647059
0.529412
0.1875
0
0
0
0
0
0
0
0
0
0
0.076923
117
3
43
39
0.888889
0
0
0
0
0
0.051282
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
e372cc5cad08eca3fbf7c476cf2084848e6ad161
89
py
Python
bin/detection/__init__.py
wew84/cnn_bridge
7cd98e204922174ea9293d8c52c30d00733a7ed2
[ "BSD-3-Clause" ]
4
2019-05-16T01:30:24.000Z
2021-04-13T13:55:44.000Z
bin/detection/__init__.py
wew84/cnn_bridge
7cd98e204922174ea9293d8c52c30d00733a7ed2
[ "BSD-3-Clause" ]
2
2020-01-23T23:39:45.000Z
2021-12-17T02:32:11.000Z
bin/detection/__init__.py
wew84/cnn_bridge
7cd98e204922174ea9293d8c52c30d00733a7ed2
[ "BSD-3-Clause" ]
null
null
null
from yolo_detector import YoloDetector from detection_publisher import DetectionPublisher
44.5
50
0.921348
10
89
8
0.8
0
0
0
0
0
0
0
0
0
0
0
0.078652
89
2
50
44.5
0.97561
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
8b8534c754989738a880975e0666edfddda54466
1,353
py
Python
house_prices_learning/model_api/libs/io/data_adapter.py
AndreaUrgolo/machinelearningwebservices
7729b7429a879f4aa19b68b1c33ce19b754ab86b
[ "MIT" ]
null
null
null
house_prices_learning/model_api/libs/io/data_adapter.py
AndreaUrgolo/machinelearningwebservices
7729b7429a879f4aa19b68b1c33ce19b754ab86b
[ "MIT" ]
null
null
null
house_prices_learning/model_api/libs/io/data_adapter.py
AndreaUrgolo/machinelearningwebservices
7729b7429a879f4aa19b68b1c33ce19b754ab86b
[ "MIT" ]
null
null
null
#Author: Andrea Urgolo @ Space1 class DataAdapter(object): #Abstract DEFAULT_BATCH_SIZE = 100 def __init__(self, batch_size=DEFAULT_BATCH_SIZE): self.batch_size=batch_size def is_present(self, source): raise NotImplementedError() def save_new_record(self, record): raise NotImplementedError() def clear_data(self, source): raise NotImplementedError() def clear_dataframe_with_field(self, where, field): raise NotImplementedError() def save_dataframe(self, where, data, overwrite=True): raise NotImplementedError() def load_dataframe(self, source, columns=None): raise NotImplementedError() def save_model(self, where, model_kw, data, overwrite): raise NotImplementedError() def load_last_model(self, source): raise NotImplementedError() def load_best_model(self, source): raise NotImplementedError() def get_best_model_info(self, source): raise NotImplementedError() def get_last_batch(self): raise NotImplementedError() def is_batch_ready(self): raise NotImplementedError() # factory method @staticmethod def create_data_adapter(**kwargs): raise NotImplementedError()
27.612245
60
0.648928
136
1,353
6.198529
0.345588
0.370107
0.352313
0.201661
0.238434
0.150652
0
0
0
0
0
0.004077
0.274945
1,353
48
61
28.1875
0.85525
0.039911
0
0.419355
0
0
0
0
0
0
0
0
0
1
0.451613
false
0
0
0
0.516129
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
8b9177f784e44c0fabdf9842ed288b9e80f7bffe
28
py
Python
py/desidatamodel/_version.py
aureliocarnero/desidatamodel
49425cd0d430581ff6ecca777092edb7bf023825
[ "BSD-3-Clause" ]
1
2016-07-08T16:07:35.000Z
2016-07-08T16:07:35.000Z
py/desidatamodel/_version.py
aureliocarnero/desidatamodel
49425cd0d430581ff6ecca777092edb7bf023825
[ "BSD-3-Clause" ]
81
2015-11-04T21:18:46.000Z
2022-03-23T00:07:38.000Z
py/desidatamodel/_version.py
aureliocarnero/desidatamodel
49425cd0d430581ff6ecca777092edb7bf023825
[ "BSD-3-Clause" ]
7
2016-06-01T16:04:39.000Z
2022-01-22T10:12:16.000Z
__version__ = '19.2.dev632'
14
27
0.714286
4
28
4
1
0
0
0
0
0
0
0
0
0
0
0.24
0.107143
28
1
28
28
0.4
0
0
0
0
0
0.392857
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
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
8bb71c1954353a7d6a902109fe1cf986a09f8511
65
py
Python
pyre_/__init__.py
ChillFish8/Pyre
dc17ffd11e53c0dd75c88cba4e7ed6887e2e7f64
[ "MIT" ]
null
null
null
pyre_/__init__.py
ChillFish8/Pyre
dc17ffd11e53c0dd75c88cba4e7ed6887e2e7f64
[ "MIT" ]
null
null
null
pyre_/__init__.py
ChillFish8/Pyre
dc17ffd11e53c0dd75c88cba4e7ed6887e2e7f64
[ "MIT" ]
null
null
null
from . import framework from .pyre import * # Overriding import
21.666667
40
0.753846
8
65
6.125
0.625
0
0
0
0
0
0
0
0
0
0
0
0.184615
65
2
41
32.5
0.924528
0.261538
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
8bd5a12a45bf57ac136d66d9804c0891b161e6c6
54
py
Python
Django_Server/Raspberry_server_django/test_it.py
ManasUniyal/Friday
6e1ff6541cca98f073e3fd07218b22da165a613b
[ "MIT" ]
1
2021-03-01T11:25:32.000Z
2021-03-01T11:25:32.000Z
Django_Server/Raspberry_server_django/test_it.py
ManasUniyal/Friday
6e1ff6541cca98f073e3fd07218b22da165a613b
[ "MIT" ]
null
null
null
Django_Server/Raspberry_server_django/test_it.py
ManasUniyal/Friday
6e1ff6541cca98f073e3fd07218b22da165a613b
[ "MIT" ]
null
null
null
from pythonScripts import abc/printHello printHello()
18
40
0.851852
6
54
7.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.092593
54
2
41
27
0.938776
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.5
null
null
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
1
0
5
8bea193157f5bb5af6bf14720152f5615474073c
132
py
Python
app/base/models/__init__.py
JhonatanPatrocinio/GLAB
7e328d6eeae56e8c86918c6e007aff3563fac2da
[ "MIT" ]
null
null
null
app/base/models/__init__.py
JhonatanPatrocinio/GLAB
7e328d6eeae56e8c86918c6e007aff3563fac2da
[ "MIT" ]
5
2020-11-24T23:44:56.000Z
2020-11-24T23:45:06.000Z
app/base/models/__init__.py
JhonatanPatrocinio/GLAB
7e328d6eeae56e8c86918c6e007aff3563fac2da
[ "MIT" ]
null
null
null
from .request import Requester from .base import BaseModel, Department, Hall, Place, TypePlace from .reservation import Reservation
33
63
0.825758
16
132
6.8125
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.121212
132
3
64
44
0.939655
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
476c46046fce6707931fe716e3253b6fa113bd15
51
py
Python
smt_switch/util/__init__.py
makaimann/ezSMT
e4f7ffd1adb35f6a5e8a9c5aabb3143c24ab0aad
[ "BSD-3-Clause" ]
1
2020-06-24T02:12:24.000Z
2020-06-24T02:12:24.000Z
smt_switch/util/__init__.py
makaimann/ezSMT
e4f7ffd1adb35f6a5e8a9c5aabb3143c24ab0aad
[ "BSD-3-Clause" ]
null
null
null
smt_switch/util/__init__.py
makaimann/ezSMT
e4f7ffd1adb35f6a5e8a9c5aabb3143c24ab0aad
[ "BSD-3-Clause" ]
1
2019-10-10T22:21:19.000Z
2019-10-10T22:21:19.000Z
from .utils import * from .reversabledict import *
17
29
0.764706
6
51
6.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.156863
51
2
30
25.5
0.906977
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
476d5a2cfcfbe259698db0281db029e1ae95ac35
154
py
Python
navycut/http/response.py
navycut/navycut
1d49621105c7c4683d52a3d2c853ae7165b9dc0d
[ "MIT" ]
13
2021-04-26T04:00:36.000Z
2021-09-18T19:57:58.000Z
navycut/http/response.py
FlaskAio/navycut
40f378f1710a26645df8d726c4d1caf33097da50
[ "MIT" ]
21
2021-09-27T03:19:21.000Z
2022-03-31T03:20:59.000Z
navycut/http/response.py
FlaskAio/navycut
40f378f1710a26645df8d726c4d1caf33097da50
[ "MIT" ]
7
2021-07-21T06:21:55.000Z
2021-09-02T17:58:04.000Z
from flask_express.response import Response as ResponseBase class Response(ResponseBase): """ The default response class for navycut app. """
25.666667
59
0.74026
18
154
6.277778
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.188312
154
6
60
25.666667
0.904
0.279221
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
4784c8d66dbc9d110c96e56b6379fede7ef4a2c7
47
py
Python
PlayStore/AppNotFoundException.py
geoffduong/PlayStoreLinks_Bot
710867fcb7df08a07fec357b9d3c424464531ae0
[ "MIT" ]
81
2015-06-01T10:05:12.000Z
2021-11-16T13:49:10.000Z
PlayStore/AppNotFoundException.py
geoffduong/PlayStoreLinks_Bot
710867fcb7df08a07fec357b9d3c424464531ae0
[ "MIT" ]
13
2015-05-19T17:39:03.000Z
2021-12-13T19:43:55.000Z
PlayStore/AppNotFoundException.py
geoffduong/PlayStoreLinks_Bot
710867fcb7df08a07fec357b9d3c424464531ae0
[ "MIT" ]
22
2015-11-17T00:59:08.000Z
2020-04-19T22:37:42.000Z
class AppNotFoundException(Exception): pass
23.5
38
0.808511
4
47
9.5
1
0
0
0
0
0
0
0
0
0
0
0
0.12766
47
2
39
23.5
0.926829
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
47e2051c95430efcf67898103e6a2bc865767000
178
py
Python
src/UnitTests/TestData/AstAnalysis/ForwardRefProp1.py
jamesralstin/python-language-server
53eb5886776c9e75590bf2f5a787ba4015879c4d
[ "Apache-2.0" ]
695
2019-05-06T23:49:37.000Z
2022-03-30T01:56:00.000Z
src/UnitTests/TestData/AstAnalysis/ForwardRefProp1.py
jamesralstin/python-language-server
53eb5886776c9e75590bf2f5a787ba4015879c4d
[ "Apache-2.0" ]
1,043
2019-05-07T02:24:11.000Z
2022-03-31T22:21:24.000Z
src/UnitTests/TestData/AstAnalysis/ForwardRefProp1.py
jamesralstin/python-language-server
53eb5886776c9e75590bf2f5a787ba4015879c4d
[ "Apache-2.0" ]
131
2019-05-09T15:34:23.000Z
2022-03-23T17:52:35.000Z
class A(object): def methodA(self): return 's' class B(object): def getA(self): return self.propA @property def propA(self): return A()
14.833333
25
0.550562
23
178
4.26087
0.521739
0.306122
0
0
0
0
0
0
0
0
0
0
0.331461
178
11
26
16.181818
0.823529
0
0
0
0
0
0.005618
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.888889
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
47ebb1e63cb509835026ae7073d00233080d1597
105
py
Python
lightnet/network/loss/__init__.py
WildMeOrg/wbia-deprecate-tpl-lightnet
b910aaa88f31d0bb4ca220229852a7f58f4ca905
[ "MIT" ]
null
null
null
lightnet/network/loss/__init__.py
WildMeOrg/wbia-deprecate-tpl-lightnet
b910aaa88f31d0bb4ca220229852a7f58f4ca905
[ "MIT" ]
null
null
null
lightnet/network/loss/__init__.py
WildMeOrg/wbia-deprecate-tpl-lightnet
b910aaa88f31d0bb4ca220229852a7f58f4ca905
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Lightnet loss functions # Copyright EAVISE # from ._regionloss import *
13.125
27
0.638095
11
105
6
1
0
0
0
0
0
0
0
0
0
0
0.012195
0.219048
105
7
28
15
0.792683
0.628571
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
47f6e31484c7c532f3c532c3a825ab12e5946d59
146
py
Python
scrapy/contrib/linkextractors/__init__.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
1
2015-09-03T18:30:10.000Z
2015-09-03T18:30:10.000Z
scrapy/contrib/linkextractors/__init__.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
2
2021-12-13T20:51:32.000Z
2022-02-11T03:47:35.000Z
scrapy/contrib/linkextractors/__init__.py
emschorsch/scrapy
acb7bad1ff4037b4a613ac94e2d3357bf92bdb8f
[ "BSD-3-Clause" ]
1
2017-11-09T20:33:59.000Z
2017-11-09T20:33:59.000Z
""" scrapy.contrib.linkextractors This package contains a collection of Link Extractors. For more info see docs/topics/link-extractors.rst """
18.25
55
0.780822
20
146
5.7
0.9
0.245614
0
0
0
0
0
0
0
0
0
0
0.130137
146
7
56
20.857143
0.897638
0.938356
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
47fe78e66ce3f607257bab4a404cff4d890356a5
54
py
Python
fpms/__main__.py
joshschmelzle/wlanpi-fpms
0f57519170f8c164aa8420c98ee4a3f63a6673c1
[ "BSD-3-Clause" ]
2
2021-08-04T13:52:46.000Z
2021-11-04T06:17:55.000Z
fpms/__main__.py
joshschmelzle/wlanpi-fpms
0f57519170f8c164aa8420c98ee4a3f63a6673c1
[ "BSD-3-Clause" ]
27
2021-10-29T19:55:51.000Z
2022-03-19T16:32:38.000Z
fpms/__main__.py
joshschmelzle/wlanpi-fpms
0f57519170f8c164aa8420c98ee4a3f63a6673c1
[ "BSD-3-Clause" ]
1
2021-12-02T12:50:45.000Z
2021-12-02T12:50:45.000Z
import sys from fpms import fpms sys.exit(fpms.main())
18
21
0.777778
10
54
4.2
0.6
0
0
0
0
0
0
0
0
0
0
0
0.111111
54
3
22
18
0.875
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
9a2e5568bb1c498a1ef2fe824ba0ca9e7f3bb12e
13,103
py
Python
checker/checker.py
enowars/service-switzerland
465e4c4ca973c8fc3539891b5b523492d569d056
[ "MIT" ]
null
null
null
checker/checker.py
enowars/service-switzerland
465e4c4ca973c8fc3539891b5b523492d569d056
[ "MIT" ]
1
2019-11-04T20:43:13.000Z
2019-11-04T20:43:13.000Z
checker/checker.py
enowars/service-switzerland
465e4c4ca973c8fc3539891b5b523492d569d056
[ "MIT" ]
2
2019-10-23T12:27:18.000Z
2019-11-05T17:49:44.000Z
from enochecker import * import secrets import random import string import urllib import hashlib import requests def generate_content(amount): return "".join(random.choice(string.ascii_letters + string.digits + " ") for _ in range(amount)) def generate_content_no_whitespace(amount): return "".join(random.choice(string.ascii_letters + string.digits) for _ in range(amount)) class VotingChecker(BaseChecker): port = 8003 flag_count = 1 noise_count = 1 havoc_count = 1 service_name = "voting" def putflag(self) -> None: # TODO generate fake user content user = generate_content_no_whitespace(random.randint(8, 32)) password = secrets.token_hex(24) title = generate_content(random.randint(5, 48)) description = generate_content(random.randint(6, 128)) # register for i in range(6): # try to find an unique username up to 5 times if i == 5: raise BrokenServiceException("usernames already used") response = self.http_post(route="/register.html", data={"user": user, "password": password}, allow_redirects=False) if response.status_code != 302: if "Username already exists" in response.text: user = generate_content_no_whitespace(random.randint(8, 32)) else: raise BrokenServiceException("registration is broken") else: break # create vote response = self.http_post(route="/create.html", data={"title": title, "description": description, "notes": self.flag}, allow_redirects=False) assert_equals(302, response.status_code, "create is broken") try: response_query = urllib.parse.parse_qs(urllib.parse.urlparse(response.headers["Location"]).query, strict_parsing=True) vote_id = int(response_query.get("v")[0]) except Exception: raise BrokenServiceException("create redirects wrong") self.team_db[self.flag] = (vote_id, user, password) def getflag(self) -> None: try: (vote_id, user, password) = self.team_db[self.flag] except KeyError: return Result.MUMBLE # login response = self.http_post(route="/login.html", data={"user": user, "password": password}, allow_redirects=False) assert_equals(302, response.status_code, "login failed") # get vote response = self.http_get(route="/vote.html", params={"v": vote_id}) assert_equals(200, response.status_code, "get vote failed") assert_in(self.flag, response.text, "flag not found") def putnoise(self) -> None: # TODO generate fake user content user = generate_content_no_whitespace(random.randint(8, 32)) password = secrets.token_hex(24) title = generate_content(random.randint(5, 48)) # register for i in range(6): # try to find an unique username up to 5 times if i == 5: raise BrokenServiceException("usernames already used") response = self.http_post(route="/register.html", data={"user": user, "password": password}, allow_redirects=False) if response.status_code != 302: if "Username already exists" in response.text: user = generate_content_no_whitespace(random.randint(8, 32)) else: raise BrokenServiceException("registration is broken") else: break # create vote response = self.http_post(route="/create.html", data={"title": title, "description": self.flag, "notes": ""}, allow_redirects=False) assert_equals(302, response.status_code, "create is broken") try: response_query = urllib.parse.parse_qs(urllib.parse.urlparse(response.headers["Location"]).query, strict_parsing=True) vote_id = int(response_query.get("v")[0]) except Exception: raise BrokenServiceException("create redirects wrong") self.team_db[self.flag + str(self.flag_idx)] = vote_id def getnoise(self) -> None: try: vote_id = self.team_db[self.flag + str(self.flag_idx)] except KeyError: return Result.MUMBLE # get vote response = self.http_get(route="/vote.html", params={"v": vote_id}) assert_equals(200, response.status_code, "get vote failed") assert_in(self.flag, response.text, "noise not found") def havoc(self) -> None: # check "/" returns a permanent redirect to "/index.html" response = self.http_get(route="/", allow_redirects=False) assert_equals(301, response.status_code, "'/' broken") assert_equals("/index.html", urllib.parse.urlparse(response.headers["Location"]).path, "'/' broken") # check "/index.html" response = self.http_get(route="/index.html", allow_redirects=False) assert_equals(200, response.status_code, "'/index.html' broken") # check "/vote.html" for most recent vote found (if any) vote_link_start = response.text.find('href="/vote.html?v=') if vote_link_start > 0: vote_link_end = response.text.find('"', vote_link_start + len('href="/vote.html?v=')) vote_id = response.text[vote_link_start + len('href="/vote.html?v='):vote_link_end] self.info("Parsed vote id: {}".format(vote_id)) # check most recent vote reachable response = self.http_get(route="/vote.html", params={"v": vote_id}, allow_redirects=False) assert_equals(200, response.status_code, "'/vote.html' broken") # check vote created by user_start = response.text.find("<p>Vote created by: ") if user_start > 0: user_end = response.text.find("</p>", user_start + len("<p>Vote created by: ")) parsed_user = response.text[user_start + len("<p>Vote created by: "):user_end] self.info("Parsed user: {}".format(parsed_user)) else: raise BrokenServiceException("'/vote.html' created by broken") # check "/login.html" reachable response = self.http_get(route="/login.html", allow_redirects=False) assert_equals(200, response.status_code, "'/login.html' broken") # check "/register.html" reachable response = self.http_get(route="/register.html", allow_redirects=False) assert_equals(200, response.status_code, "'/register.html' broken") # register # TODO generate fake user content user = generate_content_no_whitespace(random.randint(8, 32)) password = secrets.token_hex(24) for i in range(6): # try to find an unique username up to 5 times if i == 5: raise BrokenServiceException("usernames already used") response = self.http_post(route="/register.html", data={"user": user, "password": password}, allow_redirects=False) if response.status_code != 302: if "Username already exists" in response.text: user = generate_content_no_whitespace(random.randint(8, 32)) else: raise BrokenServiceException("registration is broken") else: break # check auth'ed "/index.html" response = self.http_get(route="/index.html", allow_redirects=False) assert_equals(200, response.status_code, "'/index.html' broken") assert_in("<span>Welcome, {}!</span>".format(user), response.text, "'/index.html' broken") # logout response = self.http_post(route="/logout.html", allow_redirects=False) assert_equals(302, response.status_code, "'/logout.html' broken") assert_equals("/index.html", urllib.parse.urlparse(response.headers["Location"]).path, "'/logout.html' broken") response = self.http_get(route="/index.html", allow_redirects=False) assert_equals(200, response.status_code, "'/index.html' broken") if "<span>Welcome, {}!</span>".format(user) in response.text: raise BrokenServiceException("'/index.html' broken") # login again response = self.http_post(route="/login.html", data={"user": user, "password": password}, allow_redirects=False) assert_equals(302, response.status_code, "'login' broken") assert_equals("/index.html", urllib.parse.urlparse(response.headers["Location"]).path, "'/login.html' redirect broken") # check auth'ed "/index.html" response = self.http_get(route="/index.html", allow_redirects=False) assert_equals(200, response.status_code, "'/index.html' broken") assert_in("<span>Welcome, {}!</span>".format(user), response.text, "'/index.html' broken") # check "/create.html" reachable response = self.http_get(route="/create.html", allow_redirects=False) assert_equals(200, response.status_code, "'/create.html' broken") # create a vote # TODO generate fake user content title = generate_content(random.randint(5, 48)) description = generate_content(random.randint(6, 128)) notes = generate_content(random.randint(6, 48)) response = self.http_post(route="/create.html", data={"title": title, "description": description, "notes": notes}, allow_redirects=False) assert_equals(302, response.status_code, "'/create.html' is broken") vote_location = urllib.parse.urlparse(response.headers["Location"]) assert_equals("/vote.html", vote_location.path, "'/vote.html' is broken (GET)") try: response_query = urllib.parse.parse_qs(vote_location.query, strict_parsing=True) vote_id = int(response_query.get("v")[0]) except Exception: raise BrokenServiceException("'/create.html' redirects wrong") # check vote created response = self.http_get(route="/vote.html?v={}".format(vote_id), allow_redirects=False) assert_equals(200, response.status_code, "'/vote.html' is broken (GET)") assert_in(title, response.text, "'/vote.html' don't contain title") assert_in(description, response.text, "'/vote.html' don't contain description") assert_in(notes, response.text, "'/vote.html' don't contain notes") assert_in("<p>Vote created by: {}</p>".format(user), response.text, "'/vote.html' don't contain user created by") # vote yes response = self.http_post(route="/vote.html?v={}".format(vote_id), data={"vote": "Yes"}, allow_redirects=False) assert_equals(302, response.status_code, "'/vote.html' is broken (POST)") assert_equals(vote_location.path, urllib.parse.urlparse(response.headers["Location"]).path, "'/vote.html' is broken (POST)") def exploit(self) -> None: vote_id = 1 response = self.http_get(route="/vote.html?v={}".format(vote_id), allow_redirects=False) # status code turns into 404 if we reach unused vote ids while (response.status_code == 200): # parse user created the vote user_start = response.text.find("<p>Vote created by: ") user_end = response.text.find("</p>", user_start + len("<p>Vote created by: ")) parsed_user = response.text[user_start + len("<p>Vote created by: "):user_end] self.info("Parsed user: {}".format(parsed_user)) # the exploit: 'login' as the parsed user h = hashlib.sha512() h.update(str.encode(parsed_user)) sid = h.hexdigest() requests.utils.add_dict_to_cookiejar(self.http_session.cookies, {"session": sid}) # request the vote as the creator to check success response = self.http_get(route="/vote.html?v={}".format(vote_id), allow_redirects=False) if "<span>Welcome, {}!</span>".format(parsed_user) not in response.text: # this could happen due to a fix of the vulnerability # or if the creator logged out or the session expired self.info("Could not exploit vote {}.".format(vote_id)) else: self.info("Successfully exploited vote {}.".format(vote_id)) requests.utils.add_dict_to_cookiejar(self.http_session.cookies, {"session": None}) # request next possible vote vote_id += 1 response = self.http_get(route="/vote.html?v={}".format(vote_id), allow_redirects=False) app = VotingChecker.service if __name__ == "__main__": run(VotingChecker)
44.416949
132
0.610242
1,542
13,103
5.036316
0.133593
0.027814
0.051507
0.054726
0.778007
0.736029
0.723281
0.672032
0.672032
0.634175
0
0.014746
0.265054
13,103
294
133
44.568027
0.791693
0.079142
0
0.541667
1
0
0.166112
0
0
0
0
0.003401
0.166667
1
0.041667
false
0.052083
0.036458
0.010417
0.130208
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
9a4585294df8589184cf440420dee72a6792f260
900
py
Python
data_structures/entry.py
danisafta/sdn
61fe230fbf469b4f1d6d02a44652752630bc244e
[ "MIT" ]
null
null
null
data_structures/entry.py
danisafta/sdn
61fe230fbf469b4f1d6d02a44652752630bc244e
[ "MIT" ]
null
null
null
data_structures/entry.py
danisafta/sdn
61fe230fbf469b4f1d6d02a44652752630bc244e
[ "MIT" ]
null
null
null
import ipaddress class Entry: def __init__(self, address, available, last_used): """ Constructor for Entry data structure. self.address -> str self.available -> bool self.last_used -> datetime """ self.address = address self.available = available self.last_used = last_used def dot_to_decimal(self, ip): return int(ipaddress.ip_address(ip)) def __eq__(self, other): return self.dot_to_decimal(self.address) == self.dot_to_decimal(other.address) def __ne__(self, other): return self.dot_to_decimal(self.address) != self.dot_to_decimal(other.address) def __lt__(self, other): return self.dot_to_decimal(self.address) < self.dot_to_decimal(other.address) def __gt__(self, other): return self.dot_to_decimal(self.address) > self.dot_to_decimal(other.address)
28.125
86
0.662222
117
900
4.726496
0.247863
0.081374
0.195298
0.231465
0.522604
0.522604
0.522604
0.522604
0.522604
0.522604
0
0
0.235556
900
31
87
29.032258
0.803779
0.12
0
0
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0.0625
0.3125
0.8125
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d021da7f8919fe23dbb35df22969fb3b82cb45c5
51
py
Python
LoadTesting/load_testing_je/utils/exception/exception.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
LoadTesting/load_testing_je/utils/exception/exception.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
LoadTesting/load_testing_je/utils/exception/exception.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
class LocustNotFoundException(Exception): pass
17
41
0.803922
4
51
10.25
1
0
0
0
0
0
0
0
0
0
0
0
0.137255
51
2
42
25.5
0.931818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
d0268047500880db6c6b48d349d43d8bee83e75a
289
py
Python
b9y/test.py
u1i/b9y-python
631005f1ac7c0632302791723601a4b5bbb29689
[ "MIT" ]
null
null
null
b9y/test.py
u1i/b9y-python
631005f1ac7c0632302791723601a4b5bbb29689
[ "MIT" ]
null
null
null
b9y/test.py
u1i/b9y-python
631005f1ac7c0632302791723601a4b5bbb29689
[ "MIT" ]
null
null
null
from b9y import B9y b9y = B9y() # Get info print b9y.info() # Set and get key b9y.set('foo', 'bar') print b9y.get('foo') # Try the counter print b9y.incr('counter') print b9y.incr('counter') print b9y.incr('counter') # Push and pop b9y.push('super', 'trouper') print b9y.pop('super')
14.45
28
0.67128
49
289
3.959184
0.387755
0.247423
0.231959
0.293814
0.329897
0.329897
0.329897
0.329897
0.329897
0
0
0.04898
0.152249
289
19
29
15.210526
0.742857
0.183391
0
0.3
0
0
0.203463
0
0
0
0
0
0
0
null
null
0
0.1
null
null
0.6
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
d035e5a7e924339ec73fd74f22fa1a2f6cd0773d
124
py
Python
EduSim/Envs/TMS/tms_os.py
bigdata-ustc/EduSim
849eed229c24615e5f2c3045036311e83c22ea68
[ "MIT" ]
18
2019-11-11T03:45:35.000Z
2022-02-09T15:31:51.000Z
EduSim/Envs/TMS/tms_os.py
ghzhao78506/EduSim
cb10e952eb212d8a9344143f889207b5cd48ba9d
[ "MIT" ]
3
2020-10-23T01:05:57.000Z
2021-03-16T12:12:24.000Z
EduSim/Envs/TMS/tms_os.py
bigdata-ustc/EduSim
849eed229c24615e5f2c3045036311e83c22ea68
[ "MIT" ]
6
2020-06-09T21:32:00.000Z
2022-03-12T00:25:18.000Z
# coding: utf-8 # 2021/2/7 @ tongshiwei from EduSim.SimOS import train_eval as tms_train_eval __all__ = ["tms_train_eval"]
20.666667
53
0.758065
21
124
4.047619
0.761905
0.317647
0.282353
0
0
0
0
0
0
0
0
0.065421
0.137097
124
5
54
24.8
0.728972
0.282258
0
0
0
0
0.162791
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
d040f6c5ecd88a9db3a5b8fce190a8955987ba77
99
py
Python
keras_maskrcnn/layers/__init__.py
hachreak/keras-maskrcnn
129b7d0892b145628f45695650b5fed3aeee09a1
[ "Apache-2.0" ]
432
2018-03-12T10:19:23.000Z
2022-02-26T15:15:43.000Z
keras_maskrcnn/layers/__init__.py
hachreak/keras-maskrcnn
129b7d0892b145628f45695650b5fed3aeee09a1
[ "Apache-2.0" ]
108
2018-03-14T05:47:07.000Z
2021-11-29T10:44:48.000Z
keras_maskrcnn/layers/__init__.py
hachreak/keras-maskrcnn
129b7d0892b145628f45695650b5fed3aeee09a1
[ "Apache-2.0" ]
157
2018-04-04T07:27:48.000Z
2022-01-15T14:52:11.000Z
from .misc import Shape, ConcatenateBoxes from .roi import RoiAlign from .upsample import Upsample
24.75
41
0.828283
13
99
6.307692
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.131313
99
3
42
33
0.953488
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
d044ecad48edb12bc98abd66ed20b4ca25ea70b0
118
py
Python
typesafe_conductr_cli/conduct_version.py
huntc/conductr-cli
3f76962d31bcd7e01f1afd472b724f5419f65168
[ "Apache-2.0" ]
null
null
null
typesafe_conductr_cli/conduct_version.py
huntc/conductr-cli
3f76962d31bcd7e01f1afd472b724f5419f65168
[ "Apache-2.0" ]
null
null
null
typesafe_conductr_cli/conduct_version.py
huntc/conductr-cli
3f76962d31bcd7e01f1afd472b724f5419f65168
[ "Apache-2.0" ]
null
null
null
from typesafe_conductr_cli import __version__ # `conduct version` command def version(args): print(__version__)
16.857143
45
0.788136
14
118
5.928571
0.785714
0
0
0
0
0
0
0
0
0
0
0
0.144068
118
6
46
19.666667
0.821782
0.211864
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
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
1
0
0
1
0
1
0
0
5
d0501a5b3f05a3d9da767b5fd9dc4dd881fce88d
172
py
Python
scripts/db/drop_all_test_db_tables.py
jearistiz/guane-intern-fastapi
2ebb30edfb9d5b28244095e3d3f4d90b265d1124
[ "MIT" ]
50
2021-06-04T16:16:28.000Z
2022-03-31T18:32:04.000Z
scripts/db/drop_all_test_db_tables.py
honghuynhit/guane-intern-fastapi
2ebb30edfb9d5b28244095e3d3f4d90b265d1124
[ "MIT" ]
42
2021-05-24T05:13:54.000Z
2021-08-17T15:23:42.000Z
scripts/db/drop_all_test_db_tables.py
honghuynhit/guane-intern-fastapi
2ebb30edfb9d5b28244095e3d3f4d90b265d1124
[ "MIT" ]
8
2021-06-04T16:19:02.000Z
2022-03-27T13:32:12.000Z
from app.db.db_manager import drop_all_tables from tests.mock.db_session import test_engine if __name__ == '__main__': drop_all_tables(engine=test_engine, drop=True)
24.571429
50
0.802326
28
172
4.357143
0.607143
0.114754
0.213115
0
0
0
0
0
0
0
0
0
0.116279
172
6
51
28.666667
0.802632
0
0
0
0
0
0.046512
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
d05085218a05826030893ea9b2f649614511a502
214
py
Python
AWS_Autoscale/lambda_code/autoscale/autoscale/fos_api.py
fortinetsolutions/CloudFormationTemplates
6d163c1a69629a87e3975b9ddfe679a8fc836de9
[ "Unlicense" ]
31
2017-05-18T19:01:00.000Z
2022-01-25T00:14:10.000Z
AWS_Autoscale/lambda_code/autoscale/autoscale/fos_api.py
fortinetsolutions/CloudFormationTemplates
6d163c1a69629a87e3975b9ddfe679a8fc836de9
[ "Unlicense" ]
32
2017-10-03T17:24:10.000Z
2022-02-10T12:09:52.000Z
AWS_Autoscale/lambda_code/autoscale/autoscale/fos_api.py
fortinetsolutions/CloudFormationTemplates
6d163c1a69629a87e3975b9ddfe679a8fc836de9
[ "Unlicense" ]
33
2018-03-22T15:35:57.000Z
2021-11-18T17:42:29.000Z
from .fos_restapi import FortiOSREST class FortiOSAPI(FortiOSREST): def __init__(self, admin_sport): FortiOSREST.__init__(self, admin_sport) return def run_command(self): return
17.833333
47
0.691589
24
214
5.666667
0.625
0.117647
0.191176
0.264706
0
0
0
0
0
0
0
0
0.238318
214
11
48
19.454545
0.834356
0
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.857143
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
d05156529fb79fe9794e5614f7aa9f5f14d0b9ca
439
py
Python
ggpy/cruft/autocode/Subject.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
1
2015-01-26T19:07:45.000Z
2015-01-26T19:07:45.000Z
ggpy/cruft/autocode/Subject.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
null
null
null
ggpy/cruft/autocode/Subject.py
hobson/ggpy
4e6e6e876c3a4294cd711647051da2d9c1836b60
[ "MIT" ]
null
null
null
#!/usr/bin/env python """ generated source for module Subject """ # package: org.ggp.base.util.observer class Subject(object): """ generated source for interface Subject """ __metaclass__ = ABCMeta @abstractmethod def addObserver(self, observer): """ generated source for method addObserver """ @abstractmethod def notifyObservers(self, event): """ generated source for method notifyObservers """
29.266667
59
0.687927
45
439
6.622222
0.6
0.201342
0.241611
0.161074
0
0
0
0
0
0
0
0
0.200456
439
14
60
31.357143
0.849003
0.498861
0
0.333333
1
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
d0cd96c667836132a4b8b7d17e11e423917471ac
518
py
Python
db_create.py
pwgraham91/Coffee-Connection
7f22aa3ae67f800bf09695396f84ccc4a5c0d211
[ "MIT" ]
1
2018-06-27T02:16:24.000Z
2018-06-27T02:16:24.000Z
db_create.py
pwgraham91/Coffee-Connection
7f22aa3ae67f800bf09695396f84ccc4a5c0d211
[ "MIT" ]
14
2018-04-10T04:41:27.000Z
2022-02-10T18:28:32.000Z
db_create.py
pwgraham91/Coffee-Connection
7f22aa3ae67f800bf09695396f84ccc4a5c0d211
[ "MIT" ]
null
null
null
#!flask/bin/python from migrate.versioning import api from config_director import Config from app import db import os.path db.create_all() if not os.path.exists(Config.SQLALCHEMY_MIGRATE_REPO): api.create(Config.SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_control(Config.SQLALCHEMY_DATABASE_URI, Config.SQLALCHEMY_MIGRATE_REPO) else: api.version_control(Config.SQLALCHEMY_DATABASE_URI, Config.SQLALCHEMY_MIGRATE_REPO, api.version(Config.SQLALCHEMY_MIGRATE_REPO))
32.375
87
0.793436
69
518
5.695652
0.391304
0.284987
0.292621
0.343511
0.445293
0.361323
0.361323
0.361323
0.361323
0.361323
0
0
0.129344
518
15
88
34.533333
0.871397
0.032819
0
0
0
0
0.038
0
0
0
0
0
0
1
0
true
0
0.363636
0
0.363636
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
efbd2088987af2d018f1e15b53972f64856c9642
22
py
Python
inputexpression.py
ranjithvbr/test
37cb7a876c402fc68e4624071924b2851ab7b1c4
[ "MIT" ]
1
2018-07-15T13:36:22.000Z
2018-07-15T13:36:22.000Z
inputexpression.py
ranjithvbr/test
37cb7a876c402fc68e4624071924b2851ab7b1c4
[ "MIT" ]
null
null
null
inputexpression.py
ranjithvbr/test
37cb7a876c402fc68e4624071924b2851ab7b1c4
[ "MIT" ]
1
2018-07-15T13:39:05.000Z
2018-07-15T13:39:05.000Z
str=input() print str
7.333333
11
0.727273
4
22
4
0.75
0
0
0
0
0
0
0
0
0
0
0
0.136364
22
2
12
11
0.842105
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
efcb8a2a6a6811553e7ac2a4fa0d14108f9d5030
105
py
Python
dlex/torch/__init__.py
dvtrung/dl-torch
b49e57d10d32bb223e2d7643f2579ccc32c63a9a
[ "MIT" ]
null
null
null
dlex/torch/__init__.py
dvtrung/dl-torch
b49e57d10d32bb223e2d7643f2579ccc32c63a9a
[ "MIT" ]
null
null
null
dlex/torch/__init__.py
dvtrung/dl-torch
b49e57d10d32bb223e2d7643f2579ccc32c63a9a
[ "MIT" ]
null
null
null
from .datatypes import Batch, BatchItem from .models import BaseModel from .backend import PytorchBackend
35
39
0.847619
13
105
6.846154
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.114286
105
3
40
35
0.956989
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
efe188b9df092cb51691a59f270ef3bb92490945
300
py
Python
model/loss.py
bobvo23/DANN-Plant-Counting
8e40fecbbeb4fc949524fd758b19af38c3b30c48
[ "MIT" ]
1
2022-01-11T07:35:52.000Z
2022-01-11T07:35:52.000Z
model/loss.py
bobvo23/DANN-Plant-Counting
8e40fecbbeb4fc949524fd758b19af38c3b30c48
[ "MIT" ]
null
null
null
model/loss.py
bobvo23/DANN-Plant-Counting
8e40fecbbeb4fc949524fd758b19af38c3b30c48
[ "MIT" ]
null
null
null
import torch.nn.functional as F import torch.nn as nn def nll_loss(output, target): return F.nll_loss(output, target) def mse_loss(output, target): loss = nn.MSELoss() return loss(output, target) def bce_loss(output, target): loss = nn.BCELoss() return loss(output, target)
17.647059
37
0.696667
46
300
4.456522
0.347826
0.292683
0.468293
0.185366
0.214634
0
0
0
0
0
0
0
0.193333
300
16
38
18.75
0.847107
0
0
0.2
0
0
0
0
0
0
0
0
0
1
0.3
false
0
0.2
0.1
0.8
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
4bd36d35e4ab9bb7968badce7d6f6eb3894cb8e4
58
py
Python
cnas/torchutils/__init__.py
lilujunai/CNAS
f68bb46031597725196c3be3c301dd5853eaf08d
[ "BSD-3-Clause" ]
17
2020-06-23T10:41:23.000Z
2021-11-10T13:39:03.000Z
cnas/torchutils/__init__.py
guoyongcs/CNAS
f68bb46031597725196c3be3c301dd5853eaf08d
[ "BSD-3-Clause" ]
null
null
null
cnas/torchutils/__init__.py
guoyongcs/CNAS
f68bb46031597725196c3be3c301dd5853eaf08d
[ "BSD-3-Clause" ]
4
2021-04-16T08:31:41.000Z
2021-09-14T10:56:46.000Z
from .log import output_directory, logger, summary_writer
29
57
0.844828
8
58
5.875
1
0
0
0
0
0
0
0
0
0
0
0
0.103448
58
1
58
58
0.903846
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
ef16253c0ad71a2ce7395ee3b3e0737dba9e5147
411
py
Python
src/test.py
3bhady/UnFlow
efaba92f51d6ae46dbe6445180b476e2b6b7b451
[ "MIT" ]
281
2017-12-02T13:52:16.000Z
2022-03-24T06:42:09.000Z
src/test.py
3bhady/UnFlow
efaba92f51d6ae46dbe6445180b476e2b6b7b451
[ "MIT" ]
73
2017-12-14T09:12:42.000Z
2021-12-04T09:21:51.000Z
src/test.py
3bhady/UnFlow
efaba92f51d6ae46dbe6445180b476e2b6b7b451
[ "MIT" ]
67
2017-12-04T01:49:08.000Z
2021-11-03T20:08:34.000Z
import tensorflow as tf #from e2eflow.test.test_image_warp import ImageWarpTest #from e2eflow.test.test_losses import LossesTest #from e2eflow.test.ops.backward_warp import BackwardWarpTest #from e2eflow.test.ops.forward_warp import ForwardWarpTest #from e2eflow.test.ops.downsample import DownsampleTest from e2eflow.test.ops.correlation import CorrelationTest if __name__ == "__main__": tf.test.main()
31.615385
60
0.829684
55
411
5.963636
0.436364
0.20122
0.27439
0.219512
0
0
0
0
0
0
0
0.016173
0.097324
411
12
61
34.25
0.867925
0.659367
0
0
0
0
0.059259
0
0
0
0
0
0
1
0
true
0
0.5
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
0
0
0
1
0
1
0
0
0
0
5
3275151b5bddf77c6db5b1c3a14a8948404c1aa1
184
py
Python
scrapy_frontera/utils.py
datafields/scrapy-frontera
bb966d0b2860289db4d42d1f44bd1fc25a8a3886
[ "BSD-3-Clause" ]
28
2018-09-29T21:46:59.000Z
2021-12-26T17:11:04.000Z
scrapy_frontera/utils.py
datafields/scrapy-frontera
bb966d0b2860289db4d42d1f44bd1fc25a8a3886
[ "BSD-3-Clause" ]
null
null
null
scrapy_frontera/utils.py
datafields/scrapy-frontera
bb966d0b2860289db4d42d1f44bd1fc25a8a3886
[ "BSD-3-Clause" ]
5
2019-04-22T16:05:44.000Z
2021-06-30T15:49:57.000Z
def get_callback_name(request): if request.callback is None: return 'parse' if hasattr(request.callback, '__func__'): return request.callback.__func__.__name__
30.666667
49
0.706522
22
184
5.272727
0.545455
0.387931
0.327586
0
0
0
0
0
0
0
0
0
0.201087
184
5
50
36.8
0.789116
0
0
0
0
0
0.070652
0
0
0
0
0
0
1
0.2
false
0
0
0
0.6
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
3281c9a3c69205e280fb7212f9c009498656b8bd
109
py
Python
models/__init__.py
ashishpatel26/spokenlanguages
76dea5d21a56a8303091d1aad5fa099543ab507f
[ "MIT" ]
5
2018-05-08T06:37:05.000Z
2020-07-12T22:30:11.000Z
models/__init__.py
dhpollack/spokenlanguages
76dea5d21a56a8303091d1aad5fa099543ab507f
[ "MIT" ]
null
null
null
models/__init__.py
dhpollack/spokenlanguages
76dea5d21a56a8303091d1aad5fa099543ab507f
[ "MIT" ]
3
2018-09-08T09:14:15.000Z
2019-09-04T12:25:25.000Z
import models.resnet import models.squeezenet import models.attn __all__ = ["resnet", "squeezenet", "attn"]
18.166667
42
0.761468
13
109
6.076923
0.461538
0.455696
0
0
0
0
0
0
0
0
0
0
0.110092
109
5
43
21.8
0.814433
0
0
0
0
0
0.183486
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
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
3285c89da39a8e5fc5848985b42b471c800d599c
48
py
Python
tests/__init__.py
Jerry2990/sklearn_keras_wrap
5d4a5f8df114bcb6e2cd23e00ed655d16ab6bc9a
[ "MIT" ]
1
2020-05-11T10:17:53.000Z
2020-05-11T10:17:53.000Z
tests/__init__.py
Jerry2990/sklearn_keras_wrap
5d4a5f8df114bcb6e2cd23e00ed655d16ab6bc9a
[ "MIT" ]
null
null
null
tests/__init__.py
Jerry2990/sklearn_keras_wrap
5d4a5f8df114bcb6e2cd23e00ed655d16ab6bc9a
[ "MIT" ]
null
null
null
"""Unit test package for sklearn_keras_wrap."""
24
47
0.75
7
48
4.857143
1
0
0
0
0
0
0
0
0
0
0
0
0.104167
48
1
48
48
0.790698
0.854167
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
086625ebff7e186abca6688d1aedcdcb60db26c5
21,072
py
Python
src/lexicography/parsetab.py
harry1911/CoolCompiler
0eb4636bb50341d94f757b36d2362e9d03959046
[ "MIT" ]
null
null
null
src/lexicography/parsetab.py
harry1911/CoolCompiler
0eb4636bb50341d94f757b36d2362e9d03959046
[ "MIT" ]
null
null
null
src/lexicography/parsetab.py
harry1911/CoolCompiler
0eb4636bb50341d94f757b36d2362e9d03959046
[ "MIT" ]
null
null
null
# parsetab.py # This file is automatically generated. Do not edit. # pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' _lr_signature = 'rightASSIGNrightNOTnonassocLESSEQUALLESSEQUALleftPLUSMINUSleftSTARDIVrightISVOIDrightCOMPLEMENTleftATleftDOTARROW ASSIGN AT CASE CBRACKET CCURLY CLASS COLON COMMA COMPLEMENT DIV DOT ELSE EQUAL ESAC FALSE FI IDENTIFIER IF IN INHERITS INTEGER ISVOID LESS LESSEQUAL LET LOOP MINUS NEW NOT OBRACKET OCURLY OF PLUS POOL SEMICOLON STAR STRING THEN TRUE TYPE WHILE\n program : class SEMICOLON class_list\n \n class_list : class SEMICOLON class_list\n \n class_list : empty\n \n class : CLASS TYPE inherits OCURLY feature_list CCURLY\n \n inherits : INHERITS TYPE\n \n inherits : empty\n \n feature_list : feature_attribute SEMICOLON feature_list\n \n feature_list : feature_method SEMICOLON feature_list\n \n feature_list : empty\n \n feature_method : IDENTIFIER OBRACKET formal_params_list CBRACKET COLON TYPE OCURLY expression CCURLY\n \n feature_attribute : IDENTIFIER COLON TYPE ASSIGN expression\n \n feature_attribute : IDENTIFIER COLON TYPE\n \n formal_params_list : formal more_formal_params_list\n \n formal_params_list : empty\n \n more_formal_params_list : COMMA formal more_formal_params_list\n \n more_formal_params_list : empty\n \n formal : IDENTIFIER COLON TYPE\n \n expression_list : expression more_expression_list\n \n expression_list : empty\n \n more_expression_list : COMMA expression more_expression_list\n \n more_expression_list : empty\n \n block_expression_list : expression SEMICOLON\n \n block_expression_list : expression SEMICOLON block_expression_list\n \n let_expressions : IDENTIFIER COLON TYPE let_list\n \n let_expressions : IDENTIFIER COLON TYPE ASSIGN expression let_list\n \n let_list : COMMA IDENTIFIER COLON TYPE let_list\n \n let_list : COMMA IDENTIFIER COLON TYPE ASSIGN expression let_list\n \n let_list : empty\n \n branch_list : branch branch_list\n \n branch_list : branch\n \n branch : IDENTIFIER COLON TYPE ARROW expression SEMICOLON\n \n expression : IDENTIFIER\n \n expression : NEW TYPE\n \n expression : OCURLY block_expression_list CCURLY\n \n expression : IF expression THEN expression ELSE expression FI\n \n expression : WHILE expression LOOP expression POOL\n \n expression : CASE expression OF branch_list ESAC\n \n expression : expression DOT IDENTIFIER OBRACKET expression_list CBRACKET\n \n expression : expression AT TYPE DOT IDENTIFIER OBRACKET expression_list CBRACKET\n \n expression : IDENTIFIER OBRACKET expression_list CBRACKET\n \n expression : LET let_expressions IN expression\n \n expression : INTEGER\n \n expression : STRING\n \n expression : TRUE\n \n expression : FALSE\n \n expression : IDENTIFIER ASSIGN expression\n \n expression : expression PLUS expression\n \n expression : expression MINUS expression\n \n expression : expression STAR expression\n \n expression : expression DIV expression\n \n expression : expression EQUAL expression\n \n expression : expression LESS expression\n \n expression : expression LESSEQUAL expression\n \n expression : COMPLEMENT expression\n \n expression : NOT expression\n \n expression : ISVOID expression\n \n expression : OBRACKET expression CBRACKET\n \n empty : \n ' _lr_action_items = {'CLASS':([0,4,12,],[3,3,3,]),'$end':([1,4,7,8,12,15,],[0,-58,-1,-3,-58,-2,]),'SEMICOLON':([2,6,17,18,21,28,39,40,48,49,50,51,69,71,78,79,80,86,89,90,91,92,93,94,95,96,101,105,117,124,125,132,134,141,145,146,],[4,12,22,23,-4,-12,-32,-11,-42,-43,-44,-45,-33,97,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-41,-36,-37,-10,-38,-35,-39,148,]),'TYPE':([3,10,24,34,41,56,61,103,127,144,],[5,14,28,55,69,81,88,118,137,147,]),'INHERITS':([5,],[10,]),'OCURLY':([5,9,11,14,33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,81,97,98,99,102,104,107,109,123,129,135,142,150,],[-58,13,-6,-5,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,42,104,42,42,42,42,42,42,42,42,42,42,42,42,]),'IDENTIFIER':([13,22,23,25,33,37,42,43,44,45,46,47,52,53,54,58,59,60,62,63,64,65,66,67,68,97,98,99,100,102,104,107,109,110,115,123,129,130,135,142,148,150,],[20,20,20,29,39,29,39,39,39,39,39,77,39,39,39,39,39,87,39,39,39,39,39,39,39,39,39,39,116,39,39,39,39,122,116,39,39,139,39,39,-31,39,]),'CCURLY':([13,16,19,22,23,26,27,39,48,49,50,51,69,70,78,79,80,86,89,90,91,92,93,94,95,96,97,101,105,111,117,119,124,125,134,141,145,],[-58,21,-9,-58,-58,-7,-8,-32,-42,-43,-44,-45,-33,96,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-22,-57,-40,-23,-41,132,-36,-37,-38,-35,-39,]),'COLON':([20,29,35,77,116,139,],[24,34,56,103,127,144,]),'OBRACKET':([20,33,39,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,87,97,98,99,102,104,107,109,122,123,129,135,142,150,],[25,46,58,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,109,46,46,46,46,46,46,46,135,46,46,46,46,46,]),'CBRACKET':([25,30,31,32,36,38,39,48,49,50,51,55,57,58,69,75,78,79,80,82,83,84,85,86,89,90,91,92,93,94,95,96,101,105,106,108,109,117,120,121,124,125,133,134,135,140,141,145,],[-58,35,-58,-14,-13,-16,-32,-42,-43,-44,-45,-17,-58,-58,-33,101,-54,-55,-56,-15,105,-58,-19,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-18,-21,-58,-41,-58,134,-36,-37,-20,-38,-58,145,-35,-39,]),'ASSIGN':([28,39,118,147,],[33,59,129,150,]),'COMMA':([31,39,48,49,50,51,55,57,69,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,117,118,120,124,125,134,138,141,145,147,151,],[37,-32,-42,-43,-44,-45,-17,37,-33,-54,-55,-56,107,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-41,130,107,-36,-37,-38,130,-35,-39,130,130,]),'NEW':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,]),'IF':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,]),'WHILE':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,]),'CASE':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,]),'LET':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,]),'INTEGER':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,]),'STRING':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,49,]),'TRUE':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,]),'FALSE':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,51,]),'COMPLEMENT':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,]),'NOT':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,53,]),'ISVOID':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,54,]),'DOT':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,88,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,60,-42,-43,-44,-45,-33,60,60,60,60,60,60,60,60,60,60,110,60,60,60,60,60,60,60,-34,-57,-40,60,60,60,60,60,-36,-37,-38,60,60,-35,-39,60,60,]),'AT':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,61,-42,-43,-44,-45,-33,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,61,-34,-57,-40,61,61,61,61,61,-36,-37,-38,61,61,-35,-39,61,61,]),'PLUS':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,62,-42,-43,-44,-45,-33,62,62,62,62,62,-54,62,-56,62,62,-47,-48,-49,-50,62,62,62,-34,-57,-40,62,62,62,62,62,-36,-37,-38,62,62,-35,-39,62,62,]),'MINUS':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,63,-42,-43,-44,-45,-33,63,63,63,63,63,-54,63,-56,63,63,-47,-48,-49,-50,63,63,63,-34,-57,-40,63,63,63,63,63,-36,-37,-38,63,63,-35,-39,63,63,]),'STAR':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,64,-42,-43,-44,-45,-33,64,64,64,64,64,-54,64,-56,64,64,64,64,-49,-50,64,64,64,-34,-57,-40,64,64,64,64,64,-36,-37,-38,64,64,-35,-39,64,64,]),'DIV':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,65,-42,-43,-44,-45,-33,65,65,65,65,65,-54,65,-56,65,65,65,65,-49,-50,65,65,65,-34,-57,-40,65,65,65,65,65,-36,-37,-38,65,65,-35,-39,65,65,]),'EQUAL':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,66,-42,-43,-44,-45,-33,66,66,66,66,66,-54,66,-56,66,66,-47,-48,-49,-50,None,None,None,-34,-57,-40,66,66,66,66,66,-36,-37,-38,66,66,-35,-39,66,66,]),'LESS':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,67,-42,-43,-44,-45,-33,67,67,67,67,67,-54,67,-56,67,67,-47,-48,-49,-50,None,None,None,-34,-57,-40,67,67,67,67,67,-36,-37,-38,67,67,-35,-39,67,67,]),'LESSEQUAL':([39,40,48,49,50,51,69,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,96,101,105,112,113,117,119,120,124,125,134,136,138,141,145,146,151,],[-32,68,-42,-43,-44,-45,-33,68,68,68,68,68,-54,68,-56,68,68,-47,-48,-49,-50,None,None,None,-34,-57,-40,68,68,68,68,68,-36,-37,-38,68,68,-35,-39,68,68,]),'THEN':([39,48,49,50,51,69,72,78,79,80,86,89,90,91,92,93,94,95,96,101,105,117,124,125,134,141,145,],[-32,-42,-43,-44,-45,-33,98,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-41,-36,-37,-38,-35,-39,]),'LOOP':([39,48,49,50,51,69,73,78,79,80,86,89,90,91,92,93,94,95,96,101,105,117,124,125,134,141,145,],[-32,-42,-43,-44,-45,-33,99,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-41,-36,-37,-38,-35,-39,]),'OF':([39,48,49,50,51,69,74,78,79,80,86,89,90,91,92,93,94,95,96,101,105,117,124,125,134,141,145,],[-32,-42,-43,-44,-45,-33,100,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-41,-36,-37,-38,-35,-39,]),'ELSE':([39,48,49,50,51,69,78,79,80,86,89,90,91,92,93,94,95,96,101,105,112,117,124,125,134,141,145,],[-32,-42,-43,-44,-45,-33,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,123,-41,-36,-37,-38,-35,-39,]),'POOL':([39,48,49,50,51,69,78,79,80,86,89,90,91,92,93,94,95,96,101,105,113,117,124,125,134,141,145,],[-32,-42,-43,-44,-45,-33,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,124,-41,-36,-37,-38,-35,-39,]),'FI':([39,48,49,50,51,69,78,79,80,86,89,90,91,92,93,94,95,96,101,105,117,124,125,134,136,141,145,],[-32,-42,-43,-44,-45,-33,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-41,-36,-37,-38,141,-35,-39,]),'IN':([39,48,49,50,51,69,76,78,79,80,86,89,90,91,92,93,94,95,96,101,105,117,118,124,125,128,131,134,138,141,143,145,147,149,151,152,],[-32,-42,-43,-44,-45,-33,102,-54,-55,-56,-46,-47,-48,-49,-50,-51,-52,-53,-34,-57,-40,-41,-58,-36,-37,-24,-28,-38,-58,-35,-25,-39,-58,-26,-58,-27,]),'ESAC':([114,115,126,148,],[125,-30,-29,-31,]),'ARROW':([137,],[142,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): for _x,_y in zip(_v[0],_v[1]): if not _x in _lr_action: _lr_action[_x] = {} _lr_action[_x][_k] = _y del _lr_action_items _lr_goto_items = {'program':([0,],[1,]),'class':([0,4,12,],[2,6,6,]),'class_list':([4,12,],[7,15,]),'empty':([4,5,12,13,22,23,25,31,57,58,84,109,118,120,135,138,147,151,],[8,11,8,19,19,19,32,38,38,85,108,85,131,108,85,131,131,131,]),'inherits':([5,],[9,]),'feature_list':([13,22,23,],[16,26,27,]),'feature_attribute':([13,22,23,],[17,17,17,]),'feature_method':([13,22,23,],[18,18,18,]),'formal_params_list':([25,],[30,]),'formal':([25,37,],[31,57,]),'more_formal_params_list':([31,57,],[36,82,]),'expression':([33,42,43,44,45,46,52,53,54,58,59,62,63,64,65,66,67,68,97,98,99,102,104,107,109,123,129,135,142,150,],[40,71,72,73,74,75,78,79,80,84,86,89,90,91,92,93,94,95,71,112,113,117,119,120,84,136,138,84,146,151,]),'block_expression_list':([42,97,],[70,111,]),'let_expressions':([47,],[76,]),'expression_list':([58,109,135,],[83,121,140,]),'more_expression_list':([84,120,],[106,133,]),'branch_list':([100,115,],[114,126,]),'branch':([100,115,],[115,115,]),'let_list':([118,138,147,151,],[128,143,149,152,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): for _x, _y in zip(_v[0], _v[1]): if not _x in _lr_goto: _lr_goto[_x] = {} _lr_goto[_x][_k] = _y del _lr_goto_items _lr_productions = [ ("S' -> program","S'",1,None,None,None), ('program -> class SEMICOLON class_list','program',3,'p_program','grammar_rules.py',49), ('class_list -> class SEMICOLON class_list','class_list',3,'p_class_list','grammar_rules.py',55), ('class_list -> empty','class_list',1,'p_class_list_empty','grammar_rules.py',61), ('class -> CLASS TYPE inherits OCURLY feature_list CCURLY','class',6,'p_class','grammar_rules.py',67), ('inherits -> INHERITS TYPE','inherits',2,'p_class_inherits','grammar_rules.py',73), ('inherits -> empty','inherits',1,'p_class_inherits_empty','grammar_rules.py',79), ('feature_list -> feature_attribute SEMICOLON feature_list','feature_list',3,'p_feature_list_attribute','grammar_rules.py',85), ('feature_list -> feature_method SEMICOLON feature_list','feature_list',3,'p_feature_list_method','grammar_rules.py',91), ('feature_list -> empty','feature_list',1,'p_feature_list_empty','grammar_rules.py',97), ('feature_method -> IDENTIFIER OBRACKET formal_params_list CBRACKET COLON TYPE OCURLY expression CCURLY','feature_method',9,'p_feature_method','grammar_rules.py',103), ('feature_attribute -> IDENTIFIER COLON TYPE ASSIGN expression','feature_attribute',5,'p_feature_attribute_initialized','grammar_rules.py',110), ('feature_attribute -> IDENTIFIER COLON TYPE','feature_attribute',3,'p_feature_attribute','grammar_rules.py',116), ('formal_params_list -> formal more_formal_params_list','formal_params_list',2,'p_formal_params_list','grammar_rules.py',122), ('formal_params_list -> empty','formal_params_list',1,'p_formal_params_list_empty','grammar_rules.py',128), ('more_formal_params_list -> COMMA formal more_formal_params_list','more_formal_params_list',3,'p_more_formal_params_list','grammar_rules.py',134), ('more_formal_params_list -> empty','more_formal_params_list',1,'p_more_formal_params_list_empty','grammar_rules.py',140), ('formal -> IDENTIFIER COLON TYPE','formal',3,'p_formal','grammar_rules.py',146), ('expression_list -> expression more_expression_list','expression_list',2,'p_expression_list','grammar_rules.py',153), ('expression_list -> empty','expression_list',1,'p_expression_list_empty','grammar_rules.py',159), ('more_expression_list -> COMMA expression more_expression_list','more_expression_list',3,'p_more_expression_list','grammar_rules.py',165), ('more_expression_list -> empty','more_expression_list',1,'p_more_expression_list_empty','grammar_rules.py',171), ('block_expression_list -> expression SEMICOLON','block_expression_list',2,'p_block_expression_list_simple','grammar_rules.py',177), ('block_expression_list -> expression SEMICOLON block_expression_list','block_expression_list',3,'p_block_expression_list','grammar_rules.py',183), ('let_expressions -> IDENTIFIER COLON TYPE let_list','let_expressions',4,'p_let_expressions_simple','grammar_rules.py',189), ('let_expressions -> IDENTIFIER COLON TYPE ASSIGN expression let_list','let_expressions',6,'p_let_expressions','grammar_rules.py',195), ('let_list -> COMMA IDENTIFIER COLON TYPE let_list','let_list',5,'p_let_list_simple','grammar_rules.py',201), ('let_list -> COMMA IDENTIFIER COLON TYPE ASSIGN expression let_list','let_list',7,'p_let_list','grammar_rules.py',207), ('let_list -> empty','let_list',1,'p_let_list_empty','grammar_rules.py',213), ('branch_list -> branch branch_list','branch_list',2,'p_branch_list','grammar_rules.py',219), ('branch_list -> branch','branch_list',1,'p_branch_list_simple','grammar_rules.py',225), ('branch -> IDENTIFIER COLON TYPE ARROW expression SEMICOLON','branch',6,'p_branch','grammar_rules.py',231), ('expression -> IDENTIFIER','expression',1,'p_expression_object_id','grammar_rules.py',240), ('expression -> NEW TYPE','expression',2,'p_expression_new','grammar_rules.py',246), ('expression -> OCURLY block_expression_list CCURLY','expression',3,'p_expression_block','grammar_rules.py',252), ('expression -> IF expression THEN expression ELSE expression FI','expression',7,'p_expression_if','grammar_rules.py',259), ('expression -> WHILE expression LOOP expression POOL','expression',5,'p_expression_while','grammar_rules.py',265), ('expression -> CASE expression OF branch_list ESAC','expression',5,'p_expression_case','grammar_rules.py',271), ('expression -> expression DOT IDENTIFIER OBRACKET expression_list CBRACKET','expression',6,'p_expression_dynamic_dispatch','grammar_rules.py',278), ('expression -> expression AT TYPE DOT IDENTIFIER OBRACKET expression_list CBRACKET','expression',8,'p_expression_static_dispatch','grammar_rules.py',284), ('expression -> IDENTIFIER OBRACKET expression_list CBRACKET','expression',4,'p_expression_self_dispatch','grammar_rules.py',291), ('expression -> LET let_expressions IN expression','expression',4,'p_expression_let','grammar_rules.py',298), ('expression -> INTEGER','expression',1,'p_expression_integer_constant','grammar_rules.py',305), ('expression -> STRING','expression',1,'p_expression_string_constant','grammar_rules.py',311), ('expression -> TRUE','expression',1,'p_expression_BOOLEAN_true_constant','grammar_rules.py',317), ('expression -> FALSE','expression',1,'p_expression_BOOLEAN_false_constant','grammar_rules.py',323), ('expression -> IDENTIFIER ASSIGN expression','expression',3,'p_expression_assign','grammar_rules.py',329), ('expression -> expression PLUS expression','expression',3,'p_expression_plus','grammar_rules.py',336), ('expression -> expression MINUS expression','expression',3,'p_expression_minus','grammar_rules.py',342), ('expression -> expression STAR expression','expression',3,'p_expression_star','grammar_rules.py',348), ('expression -> expression DIV expression','expression',3,'p_expression_div','grammar_rules.py',354), ('expression -> expression EQUAL expression','expression',3,'p_expression_equal','grammar_rules.py',360), ('expression -> expression LESS expression','expression',3,'p_expression_lessthan','grammar_rules.py',366), ('expression -> expression LESSEQUAL expression','expression',3,'p_expression_lessequal','grammar_rules.py',372), ('expression -> COMPLEMENT expression','expression',2,'p_expression_complement','grammar_rules.py',379), ('expression -> NOT expression','expression',2,'p_expression_negation','grammar_rules.py',385), ('expression -> ISVOID expression','expression',2,'p_expression_isvoid','grammar_rules.py',391), ('expression -> OBRACKET expression CBRACKET','expression',3,'p_expression_parenthesis','grammar_rules.py',398), ('empty -> <empty>','empty',0,'p_empty','grammar_rules.py',405), ]
236.764045
9,027
0.670653
4,171
21,072
3.27907
0.071685
0.050888
0.05937
0.021057
0.629012
0.51444
0.461066
0.407984
0.345251
0.326607
0
0.307115
0.082906
21,072
88
9,028
239.454545
0.400621
0.003986
0
0.025641
1
0.012821
0.456131
0.06286
0
0
0
0
0
1
0
false
0
0
0
0
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
08a9e4668afe8e6daf4d3a7fdd533015ccfc7d34
178
py
Python
crmsystem/utilities/__init__.py
iomegak12/pythondockertry
dd91dc57a09141f94cb0a73e18a8ad9da4d5aa85
[ "MIT" ]
null
null
null
crmsystem/utilities/__init__.py
iomegak12/pythondockertry
dd91dc57a09141f94cb0a73e18a8ad9da4d5aa85
[ "MIT" ]
null
null
null
crmsystem/utilities/__init__.py
iomegak12/pythondockertry
dd91dc57a09141f94cb0a73e18a8ad9da4d5aa85
[ "MIT" ]
null
null
null
from .error_provider import ErrorProvider from .customer_encoder import CustomerEncoder from .order_encoder import OrderEncoder from .table_generator import PrettyTableGenerator
35.6
49
0.88764
20
178
7.7
0.65
0.168831
0
0
0
0
0
0
0
0
0
0
0.089888
178
4
50
44.5
0.950617
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
08b1cd98449ef90b740ae44989ef52f813070a21
4,622
py
Python
threshold_scheme.py
abdulmcajh/secret-sharing
7cd61c6b9146675baf1abc4e9f285a3e45f5465d
[ "MIT" ]
5
2018-02-19T16:44:32.000Z
2019-07-22T14:05:20.000Z
threshold_scheme.py
abdulmcajh/secret-sharing
7cd61c6b9146675baf1abc4e9f285a3e45f5465d
[ "MIT" ]
2
2018-04-24T07:00:40.000Z
2018-12-25T15:50:46.000Z
threshold_scheme.py
skhakimov/secret-sharing
7cd61c6b9146675baf1abc4e9f285a3e45f5465d
[ "MIT" ]
2
2015-10-15T20:16:44.000Z
2016-01-08T09:50:15.000Z
import random import sys import argparse from secret import SECRET from interpolate import INTERPOLATE def rand_prime(n): #generate random prime one bit greater than number n bits = len(bin(n))-1 #number of bits of number n, plus one. (this is because binary representation starts with 0b) ok = 0 while ok is 0: p = random.randrange(pow(2, bits - 1), pow(2, bits) - 1, 2) - 1#random odd number ok = miller_rabin(p, 10)#check primality return p def miller_rabin(number, tries): #miller_rabin test for primality s = 0 d = number - 1 while 1: if d % 2 == 0: s += 1 d = d / 2 else: break for _ in range(1, tries): ok = 0 a = random.randint(2, number - 2) x = pow(a, d, number) if x == 1 or x == number - 1: continue else: for _ in range(1, s - 1): x = pow(x, 2, number) if x == 1: return 0 if x == number - 1: ok = 1 break if (ok == 0): return 0 else: continue return 1 def dist_shares(k,n,secret): #Method to distribute n shares based on the secret and number k required to assemble field = 257 #default field size shares = {} #share in dictionary format if n > 257: field = rand_prime(n) #select a random prime greater than n field_hex = hex(field)[2:] #field in hex format for i in xrange(n): shares[i+1]=str(k)+'|'+field_hex+'|' #share format is <number-required|field_size|share> for char in xrange(len(secret)): #for every character in the secret sub_secret = SECRET(k,n,field,secret[char]) #use Secret class points = sub_secret.create_points() #generate shares for this character for i in xrange(n): x = i+1 temp = str(hex(points[x]))[2:] #convert point values to hex if len(temp) == len(field_hex): shares[x]+=temp #concatenate character point to each share else: shares[x]+=temp + (len(field_hex)-len(temp))*'#' return shares def recover_secret(input): #Method to recover secret based on provided shares shares = {} points = {} final_secret = '' for item in input: #in each share share_index = item.find('-') #delimiter for share number req_index = item.find('|') #delimiter for required number of shares field_index = item.find('|',req_index+1) #delimiter for field value if int(item[share_index+1:req_index]) > len(input): print 'Need more shares to recover!' return 1 shares[int(item[0:share_index])] = item[field_index+1:] field = item[req_index+1:field_index] word_size = len(str(field)) secret_length = len(shares.values()[0])/word_size for i in xrange(secret_length): index = i*word_size for x in shares.keys(): temp = shares[x][index:index+word_size] points[x]=temp.strip('#') ASCII = INTERPOLATE(int(field,16),points) secret = ASCII.lagrange() final_secret+=secret return final_secret def main(): #Allows to be used as command line. There's also a GUI that is more convenient to use parser = argparse.ArgumentParser(description='Threshold Secret Sharing', usage = 'threshold_scheme.py [options]') subparsers = parser.add_subparsers(title = 'subcommands', dest = 'action') parser_create = subparsers.add_parser('generate', help = 'Generates new shares. Input filename with required, total and secret in separate lines. Result is in out.txt') parser_create.add_argument('filename') parser_create.add_argument('-o','--result', help='File where shares will be saved to',required=True) parser_recover = subparsers.add_parser('recover', help = 'Recover the secret. Input filename with shares and output filename') parser_recover.add_argument('filename') parser_recover.add_argument('-o','--result', help='File where recovered secret will be saved to',required=True) args = parser.parse_args() if args.action == 'generate': inputs = [line.strip() for line in open(args.filename)] k = int(inputs[0]) n = int(inputs[1]) secret = inputs[2] shares = dist_shares(k,n,secret) with open(args.result,'w') as output: for share in shares: output.write("%d-%s" % (share,shares[share])+'\n') output.close() elif args.action == 'recover': shares = [line.strip() for line in open(args.filename)] secret=recover_secret(shares) with open(args.result,'w') as output: output.write(secret) output.close() else: usage() if __name__ == "__main__": main()
4,622
4,622
0.638468
674
4,622
4.287834
0.25816
0.011073
0.006228
0.012457
0.138062
0.080969
0.063668
0.023529
0
0
0
0.016295
0.243185
4,622
1
4,622
4,622
0.809891
0.181523
0
0.20354
1
0.00885
0.117225
0
0
0
0
0
0
0
null
null
0
0.044248
null
null
0.00885
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
1
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
08e8032e62f84fbeaf7594804db70a3296ff3304
27,511
py
Python
venv/lib/python3.8/site-packages/spaceone/api/config/v1/domain_config_pb2.py
choonho/plugin-prometheus-mon-webhook
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/spaceone/api/config/v1/domain_config_pb2.py
choonho/plugin-prometheus-mon-webhook
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
[ "Apache-2.0" ]
null
null
null
venv/lib/python3.8/site-packages/spaceone/api/config/v1/domain_config_pb2.py
choonho/plugin-prometheus-mon-webhook
afa7d65d12715fd0480fb4f92a9c62da2d6128e0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: spaceone/api/config/v1/domain_config.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from spaceone.api.core.v1 import query_pb2 as spaceone_dot_api_dot_core_dot_v1_dot_query__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='spaceone/api/config/v1/domain_config.proto', package='spaceone.api.config.v1', syntax='proto3', serialized_options=None, create_key=_descriptor._internal_create_key, serialized_pb=b'\n*spaceone/api/config/v1/domain_config.proto\x12\x16spaceone.api.config.v1\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1cgoogle/api/annotations.proto\x1a spaceone/api/core/v1/query.proto\"\x9a\x01\n\x19\x43reateDomainConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04tags\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0e\n\x06schema\x18\x04 \x01(\t\x12\x11\n\tdomain_id\x18\x05 \x01(\t\"\x9a\x01\n\x19UpdateDomainConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04tags\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0e\n\x06schema\x18\x04 \x01(\t\x12\x11\n\tdomain_id\x18\x05 \x01(\t\"6\n\x13\x44omainConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\"G\n\x16GetDomainConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x11\n\tdomain_id\x18\x02 \x01(\t\x12\x0c\n\x04only\x18\x03 \x03(\t\"`\n\x11\x44omainConfigQuery\x12*\n\x05query\x18\x01 \x01(\x0b\x32\x1b.spaceone.api.core.v1.Query\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x11\n\tdomain_id\x18\x03 \x01(\t\"\xa5\x01\n\x10\x44omainConfigInfo\x12\x0c\n\x04name\x18\x01 \x01(\t\x12%\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x17.google.protobuf.Struct\x12%\n\x04tags\x18\x03 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0e\n\x06schema\x18\x04 \x01(\t\x12\x11\n\tdomain_id\x18\x05 \x01(\t\x12\x12\n\ncreated_at\x18\x06 \x01(\t\"c\n\x11\x44omainConfigsInfo\x12\x39\n\x07results\x18\x01 \x03(\x0b\x32(.spaceone.api.config.v1.DomainConfigInfo\x12\x13\n\x0btotal_count\x18\x02 \x01(\x05\"`\n\x15\x44omainConfigStatQuery\x12\x34\n\x05query\x18\x01 \x01(\x0b\x32%.spaceone.api.core.v1.StatisticsQuery\x12\x11\n\tdomain_id\x18\x02 \x01(\t2\xc8\x06\n\x0c\x44omainConfig\x12\x88\x01\n\x06\x63reate\x12\x31.spaceone.api.config.v1.CreateDomainConfigRequest\x1a(.spaceone.api.config.v1.DomainConfigInfo\"!\x82\xd3\xe4\x93\x02\x1b\"\x19/config/v1/domain-configs\x12\x8e\x01\n\x06update\x12\x31.spaceone.api.config.v1.UpdateDomainConfigRequest\x1a(.spaceone.api.config.v1.DomainConfigInfo\"\'\x82\xd3\xe4\x93\x02!\x1a\x1f/config/v1/domain-config/{name}\x12v\n\x06\x64\x65lete\x12+.spaceone.api.config.v1.DomainConfigRequest\x1a\x16.google.protobuf.Empty\"\'\x82\xd3\xe4\x93\x02!*\x1f/config/v1/domain-config/{name}\x12\x88\x01\n\x03get\x12..spaceone.api.config.v1.GetDomainConfigRequest\x1a(.spaceone.api.config.v1.DomainConfigInfo\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/config/v1/domain-config/{name}\x12\xa1\x01\n\x04list\x12).spaceone.api.config.v1.DomainConfigQuery\x1a).spaceone.api.config.v1.DomainConfigsInfo\"C\x82\xd3\xe4\x93\x02=\x12\x18/config/v1/domain-configZ!\"\x1f/config/v1/domain-config/search\x12u\n\x04stat\x12-.spaceone.api.config.v1.DomainConfigStatQuery\x1a\x17.google.protobuf.Struct\"%\x82\xd3\xe4\x93\x02\x1f\"\x1d/config/v1/domain-config/statb\x06proto3' , dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,spaceone_dot_api_dot_core_dot_v1_dot_query__pb2.DESCRIPTOR,]) _CREATEDOMAINCONFIGREQUEST = _descriptor.Descriptor( name='CreateDomainConfigRequest', full_name='spaceone.api.config.v1.CreateDomainConfigRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='spaceone.api.config.v1.CreateDomainConfigRequest.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='data', full_name='spaceone.api.config.v1.CreateDomainConfigRequest.data', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tags', full_name='spaceone.api.config.v1.CreateDomainConfigRequest.tags', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='schema', full_name='spaceone.api.config.v1.CreateDomainConfigRequest.schema', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain_id', full_name='spaceone.api.config.v1.CreateDomainConfigRequest.domain_id', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=194, serialized_end=348, ) _UPDATEDOMAINCONFIGREQUEST = _descriptor.Descriptor( name='UpdateDomainConfigRequest', full_name='spaceone.api.config.v1.UpdateDomainConfigRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='spaceone.api.config.v1.UpdateDomainConfigRequest.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='data', full_name='spaceone.api.config.v1.UpdateDomainConfigRequest.data', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tags', full_name='spaceone.api.config.v1.UpdateDomainConfigRequest.tags', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='schema', full_name='spaceone.api.config.v1.UpdateDomainConfigRequest.schema', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain_id', full_name='spaceone.api.config.v1.UpdateDomainConfigRequest.domain_id', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=351, serialized_end=505, ) _DOMAINCONFIGREQUEST = _descriptor.Descriptor( name='DomainConfigRequest', full_name='spaceone.api.config.v1.DomainConfigRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='spaceone.api.config.v1.DomainConfigRequest.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain_id', full_name='spaceone.api.config.v1.DomainConfigRequest.domain_id', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=507, serialized_end=561, ) _GETDOMAINCONFIGREQUEST = _descriptor.Descriptor( name='GetDomainConfigRequest', full_name='spaceone.api.config.v1.GetDomainConfigRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='spaceone.api.config.v1.GetDomainConfigRequest.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain_id', full_name='spaceone.api.config.v1.GetDomainConfigRequest.domain_id', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='only', full_name='spaceone.api.config.v1.GetDomainConfigRequest.only', index=2, number=3, type=9, cpp_type=9, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=563, serialized_end=634, ) _DOMAINCONFIGQUERY = _descriptor.Descriptor( name='DomainConfigQuery', full_name='spaceone.api.config.v1.DomainConfigQuery', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='query', full_name='spaceone.api.config.v1.DomainConfigQuery.query', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='name', full_name='spaceone.api.config.v1.DomainConfigQuery.name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain_id', full_name='spaceone.api.config.v1.DomainConfigQuery.domain_id', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=636, serialized_end=732, ) _DOMAINCONFIGINFO = _descriptor.Descriptor( name='DomainConfigInfo', full_name='spaceone.api.config.v1.DomainConfigInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='name', full_name='spaceone.api.config.v1.DomainConfigInfo.name', index=0, number=1, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='data', full_name='spaceone.api.config.v1.DomainConfigInfo.data', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='tags', full_name='spaceone.api.config.v1.DomainConfigInfo.tags', index=2, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='schema', full_name='spaceone.api.config.v1.DomainConfigInfo.schema', index=3, number=4, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain_id', full_name='spaceone.api.config.v1.DomainConfigInfo.domain_id', index=4, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='created_at', full_name='spaceone.api.config.v1.DomainConfigInfo.created_at', index=5, number=6, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=735, serialized_end=900, ) _DOMAINCONFIGSINFO = _descriptor.Descriptor( name='DomainConfigsInfo', full_name='spaceone.api.config.v1.DomainConfigsInfo', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='results', full_name='spaceone.api.config.v1.DomainConfigsInfo.results', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='total_count', full_name='spaceone.api.config.v1.DomainConfigsInfo.total_count', index=1, number=2, type=5, cpp_type=1, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=902, serialized_end=1001, ) _DOMAINCONFIGSTATQUERY = _descriptor.Descriptor( name='DomainConfigStatQuery', full_name='spaceone.api.config.v1.DomainConfigStatQuery', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='query', full_name='spaceone.api.config.v1.DomainConfigStatQuery.query', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='domain_id', full_name='spaceone.api.config.v1.DomainConfigStatQuery.domain_id', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1003, serialized_end=1099, ) _CREATEDOMAINCONFIGREQUEST.fields_by_name['data'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _CREATEDOMAINCONFIGREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _UPDATEDOMAINCONFIGREQUEST.fields_by_name['data'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _UPDATEDOMAINCONFIGREQUEST.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _DOMAINCONFIGQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._QUERY _DOMAINCONFIGINFO.fields_by_name['data'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _DOMAINCONFIGINFO.fields_by_name['tags'].message_type = google_dot_protobuf_dot_struct__pb2._STRUCT _DOMAINCONFIGSINFO.fields_by_name['results'].message_type = _DOMAINCONFIGINFO _DOMAINCONFIGSTATQUERY.fields_by_name['query'].message_type = spaceone_dot_api_dot_core_dot_v1_dot_query__pb2._STATISTICSQUERY DESCRIPTOR.message_types_by_name['CreateDomainConfigRequest'] = _CREATEDOMAINCONFIGREQUEST DESCRIPTOR.message_types_by_name['UpdateDomainConfigRequest'] = _UPDATEDOMAINCONFIGREQUEST DESCRIPTOR.message_types_by_name['DomainConfigRequest'] = _DOMAINCONFIGREQUEST DESCRIPTOR.message_types_by_name['GetDomainConfigRequest'] = _GETDOMAINCONFIGREQUEST DESCRIPTOR.message_types_by_name['DomainConfigQuery'] = _DOMAINCONFIGQUERY DESCRIPTOR.message_types_by_name['DomainConfigInfo'] = _DOMAINCONFIGINFO DESCRIPTOR.message_types_by_name['DomainConfigsInfo'] = _DOMAINCONFIGSINFO DESCRIPTOR.message_types_by_name['DomainConfigStatQuery'] = _DOMAINCONFIGSTATQUERY _sym_db.RegisterFileDescriptor(DESCRIPTOR) CreateDomainConfigRequest = _reflection.GeneratedProtocolMessageType('CreateDomainConfigRequest', (_message.Message,), { 'DESCRIPTOR' : _CREATEDOMAINCONFIGREQUEST, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.CreateDomainConfigRequest) }) _sym_db.RegisterMessage(CreateDomainConfigRequest) UpdateDomainConfigRequest = _reflection.GeneratedProtocolMessageType('UpdateDomainConfigRequest', (_message.Message,), { 'DESCRIPTOR' : _UPDATEDOMAINCONFIGREQUEST, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.UpdateDomainConfigRequest) }) _sym_db.RegisterMessage(UpdateDomainConfigRequest) DomainConfigRequest = _reflection.GeneratedProtocolMessageType('DomainConfigRequest', (_message.Message,), { 'DESCRIPTOR' : _DOMAINCONFIGREQUEST, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.DomainConfigRequest) }) _sym_db.RegisterMessage(DomainConfigRequest) GetDomainConfigRequest = _reflection.GeneratedProtocolMessageType('GetDomainConfigRequest', (_message.Message,), { 'DESCRIPTOR' : _GETDOMAINCONFIGREQUEST, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.GetDomainConfigRequest) }) _sym_db.RegisterMessage(GetDomainConfigRequest) DomainConfigQuery = _reflection.GeneratedProtocolMessageType('DomainConfigQuery', (_message.Message,), { 'DESCRIPTOR' : _DOMAINCONFIGQUERY, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.DomainConfigQuery) }) _sym_db.RegisterMessage(DomainConfigQuery) DomainConfigInfo = _reflection.GeneratedProtocolMessageType('DomainConfigInfo', (_message.Message,), { 'DESCRIPTOR' : _DOMAINCONFIGINFO, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.DomainConfigInfo) }) _sym_db.RegisterMessage(DomainConfigInfo) DomainConfigsInfo = _reflection.GeneratedProtocolMessageType('DomainConfigsInfo', (_message.Message,), { 'DESCRIPTOR' : _DOMAINCONFIGSINFO, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.DomainConfigsInfo) }) _sym_db.RegisterMessage(DomainConfigsInfo) DomainConfigStatQuery = _reflection.GeneratedProtocolMessageType('DomainConfigStatQuery', (_message.Message,), { 'DESCRIPTOR' : _DOMAINCONFIGSTATQUERY, '__module__' : 'spaceone.api.config.v1.domain_config_pb2' # @@protoc_insertion_point(class_scope:spaceone.api.config.v1.DomainConfigStatQuery) }) _sym_db.RegisterMessage(DomainConfigStatQuery) _DOMAINCONFIG = _descriptor.ServiceDescriptor( name='DomainConfig', full_name='spaceone.api.config.v1.DomainConfig', file=DESCRIPTOR, index=0, serialized_options=None, create_key=_descriptor._internal_create_key, serialized_start=1102, serialized_end=1942, methods=[ _descriptor.MethodDescriptor( name='create', full_name='spaceone.api.config.v1.DomainConfig.create', index=0, containing_service=None, input_type=_CREATEDOMAINCONFIGREQUEST, output_type=_DOMAINCONFIGINFO, serialized_options=b'\202\323\344\223\002\033\"\031/config/v1/domain-configs', create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name='update', full_name='spaceone.api.config.v1.DomainConfig.update', index=1, containing_service=None, input_type=_UPDATEDOMAINCONFIGREQUEST, output_type=_DOMAINCONFIGINFO, serialized_options=b'\202\323\344\223\002!\032\037/config/v1/domain-config/{name}', create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name='delete', full_name='spaceone.api.config.v1.DomainConfig.delete', index=2, containing_service=None, input_type=_DOMAINCONFIGREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, serialized_options=b'\202\323\344\223\002!*\037/config/v1/domain-config/{name}', create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name='get', full_name='spaceone.api.config.v1.DomainConfig.get', index=3, containing_service=None, input_type=_GETDOMAINCONFIGREQUEST, output_type=_DOMAINCONFIGINFO, serialized_options=b'\202\323\344\223\002!\022\037/config/v1/domain-config/{name}', create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name='list', full_name='spaceone.api.config.v1.DomainConfig.list', index=4, containing_service=None, input_type=_DOMAINCONFIGQUERY, output_type=_DOMAINCONFIGSINFO, serialized_options=b'\202\323\344\223\002=\022\030/config/v1/domain-configZ!\"\037/config/v1/domain-config/search', create_key=_descriptor._internal_create_key, ), _descriptor.MethodDescriptor( name='stat', full_name='spaceone.api.config.v1.DomainConfig.stat', index=5, containing_service=None, input_type=_DOMAINCONFIGSTATQUERY, output_type=google_dot_protobuf_dot_struct__pb2._STRUCT, serialized_options=b'\202\323\344\223\002\037\"\035/config/v1/domain-config/stat', create_key=_descriptor._internal_create_key, ), ]) _sym_db.RegisterServiceDescriptor(_DOMAINCONFIG) DESCRIPTOR.services_by_name['DomainConfig'] = _DOMAINCONFIG # @@protoc_insertion_point(module_scope)
47.351119
2,959
0.76991
3,487
27,511
5.767135
0.068827
0.036599
0.041024
0.069915
0.772452
0.722576
0.703033
0.625858
0.619642
0.607708
0
0.042552
0.10563
27,511
580
2,960
47.432759
0.774761
0.03246
0
0.659735
1
0.017013
0.249474
0.219399
0
0
0
0
0
1
0
false
0
0.015123
0
0.015123
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
3ebbeffae17a3fc4a346bcba5b2ee580a1773ced
185
py
Python
class4/demo.py
sanderslhc/python-learing
2769f72c9b6de24d768175bed1aa9851d0469d19
[ "MIT" ]
1
2021-07-20T09:52:55.000Z
2021-07-20T09:52:55.000Z
class4/demo.py
sanderslhc/python-learning
2769f72c9b6de24d768175bed1aa9851d0469d19
[ "MIT" ]
null
null
null
class4/demo.py
sanderslhc/python-learning
2769f72c9b6de24d768175bed1aa9851d0469d19
[ "MIT" ]
null
null
null
print('-------------------获取元素索引-------------------') lst=['hello',84,'world'] print(lst.index('hello')) #列表中有相同元素,只返回第一个的索引 print(lst.index('python')) #不存在的元素会报错 print(lst.index())
37
54
0.551351
20
185
5.1
0.55
0.235294
0.382353
0
0
0
0
0
0
0
0
0.011429
0.054054
185
5
55
37
0.571429
0.145946
0
0
0
0
0.424837
0.287582
0
0
0
0
0
1
0
false
0
0
0
0
0.8
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
3ebda036f3c2542adc182486c1d7ebe6485204a4
47
py
Python
Python/name3.py
Dhushyanths/Hacktoberfest-Beginner-level
37f2220e050482490b91ff445bbee9394571f06c
[ "MIT" ]
null
null
null
Python/name3.py
Dhushyanths/Hacktoberfest-Beginner-level
37f2220e050482490b91ff445bbee9394571f06c
[ "MIT" ]
null
null
null
Python/name3.py
Dhushyanths/Hacktoberfest-Beginner-level
37f2220e050482490b91ff445bbee9394571f06c
[ "MIT" ]
null
null
null
def a(): print("i am dhushyanth") a()
9.4
28
0.489362
7
47
3.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.319149
47
4
29
11.75
0.71875
0
0
0
0
0
0.319149
0
0
0
0
0
0
1
0.333333
true
0
0
0
0.333333
0.333333
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
1
1
0
0
0
0
0
0
5
3edca4d29ef968891383aabd0fbd93c8184c03fb
52
py
Python
service/app/config.py
GeoJosh/tipapp
f4b0b10ef44261f3e20df2f87d202a3fe3751ce6
[ "MIT" ]
null
null
null
service/app/config.py
GeoJosh/tipapp
f4b0b10ef44261f3e20df2f87d202a3fe3751ce6
[ "MIT" ]
8
2021-03-10T13:43:32.000Z
2022-03-02T08:04:08.000Z
service/app/config.py
GeoJosh/tipapp
f4b0b10ef44261f3e20df2f87d202a3fe3751ce6
[ "MIT" ]
null
null
null
from peewee import Proxy db_proxy: Proxy = Proxy()
13
25
0.75
8
52
4.75
0.625
0.526316
0
0
0
0
0
0
0
0
0
0
0.173077
52
3
26
17.333333
0.883721
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
3ef69a23bab80ee908d1b305ddec59a59426c822
54
py
Python
deeplearning/__init__.py
bobbywlindsey/data-science
8c67abd75a1f70ce37a04aff074cc3416260a296
[ "MIT" ]
1
2018-07-17T08:23:29.000Z
2018-07-17T08:23:29.000Z
deeplearning/__init__.py
bobbywlindsey/zenml
8c67abd75a1f70ce37a04aff074cc3416260a296
[ "MIT" ]
null
null
null
deeplearning/__init__.py
bobbywlindsey/zenml
8c67abd75a1f70ce37a04aff074cc3416260a296
[ "MIT" ]
null
null
null
# import all functions from .deep_neural_net import *
18
30
0.796296
8
54
5.125
0.875
0
0
0
0
0
0
0
0
0
0
0
0.148148
54
2
31
27
0.891304
0.37037
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
f5e16516f067abf3abcf7cbf830422801f9b53a3
64
py
Python
exploration/sycamore_architecture.py
rzhang404/CirqTrit
a617f8a34707fb89f5ef7bc57abb0a52b716f56b
[ "MIT" ]
null
null
null
exploration/sycamore_architecture.py
rzhang404/CirqTrit
a617f8a34707fb89f5ef7bc57abb0a52b716f56b
[ "MIT" ]
null
null
null
exploration/sycamore_architecture.py
rzhang404/CirqTrit
a617f8a34707fb89f5ef7bc57abb0a52b716f56b
[ "MIT" ]
null
null
null
import pytket print(pytket.routing.SquareGrid(3, 3).to_dict())
16
48
0.765625
10
64
4.8
0.8
0
0
0
0
0
0
0
0
0
0
0.033898
0.078125
64
3
49
21.333333
0.779661
0
0
0
0
0
0
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
f5ee3ad572543e3f424ca576fc30a4e0169a2e35
190
py
Python
0x02-python-import_modules/5-variable_load.py
C-distin/alx-higher_level_programming
ee018135b24ac07d40f2309a4febf21b8a25aee4
[ "MIT" ]
null
null
null
0x02-python-import_modules/5-variable_load.py
C-distin/alx-higher_level_programming
ee018135b24ac07d40f2309a4febf21b8a25aee4
[ "MIT" ]
null
null
null
0x02-python-import_modules/5-variable_load.py
C-distin/alx-higher_level_programming
ee018135b24ac07d40f2309a4febf21b8a25aee4
[ "MIT" ]
null
null
null
#!/usr/bin/python3 if __name__ == "__main__": # Import variable 'a' from file 'variable_load_5.py' from variable_load_5 import a # print the value of variable 'a' print(a)
21.111111
56
0.668421
29
190
3.965517
0.62069
0.156522
0.226087
0
0
0
0
0
0
0
0
0.02027
0.221053
190
8
57
23.75
0.756757
0.526316
0
0
0
0
0.091954
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.333333
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
f5ef03b9faf04d52ad7e07b2f386a12bf4dddba6
34
py
Python
src/mykrobe/version.py
Phelimb/mykrobe-atlas-cli
866471d0c2d7030698d37f5c90fd232cafc261d5
[ "MIT" ]
1
2020-01-10T06:43:22.000Z
2020-01-10T06:43:22.000Z
src/mykrobe/version.py
Phelimb/mykrobe-atlas-cli
866471d0c2d7030698d37f5c90fd232cafc261d5
[ "MIT" ]
null
null
null
src/mykrobe/version.py
Phelimb/mykrobe-atlas-cli
866471d0c2d7030698d37f5c90fd232cafc261d5
[ "MIT" ]
null
null
null
__version__ = "v0.6.4-0-gb0374e1"
17
33
0.705882
6
34
3.333333
1
0
0
0
0
0
0
0
0
0
0
0.290323
0.088235
34
1
34
34
0.354839
0
0
0
0
0
0.5
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
f5efc573205b1d66f66aec5a4951f0a4a73c51b8
78
py
Python
tests/compile/python-test.py
wmacevoy/kattis-docker
c3d392799a2d22aa7589b969257f6c528a66341c
[ "MIT" ]
2
2021-05-16T09:53:25.000Z
2022-02-20T01:59:26.000Z
tests/compile/python-test.py
wmacevoy/kattis-docker
c3d392799a2d22aa7589b969257f6c528a66341c
[ "MIT" ]
3
2019-02-07T03:18:52.000Z
2019-02-09T22:29:34.000Z
tests/compile/python-test.py
icpc/kattis-docker
c3d392799a2d22aa7589b969257f6c528a66341c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import platform print("v" + platform.python_version())
15.6
38
0.730769
11
78
5.090909
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.102564
78
4
39
19.5
0.8
0.25641
0
0
0
0
0.017857
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
f5f2c12344de9bf6e9f3596c6a779aa9a0ca966b
8,187
py
Python
tests/test_mapping.py
codacy-badger/rowan
dd999363df59daa8d2f69fe56665b88092bae46f
[ "BSD-3-Clause" ]
null
null
null
tests/test_mapping.py
codacy-badger/rowan
dd999363df59daa8d2f69fe56665b88092bae46f
[ "BSD-3-Clause" ]
null
null
null
tests/test_mapping.py
codacy-badger/rowan
dd999363df59daa8d2f69fe56665b88092bae46f
[ "BSD-3-Clause" ]
null
null
null
"""Test algorithms for point-cloud mapping.""" from __future__ import division, print_function, absolute_import import unittest import numpy as np from rowan import mapping, random, rotate, from_matrix, from_axis_angle zero = np.array([0, 0, 0, 0]) one = np.array([1, 0, 0, 0]) half = np.array([0.5, 0.5, 0.5, 0.5]) class TestMapping(unittest.TestCase): """Test mapping functions""" def test_kabsch(self): """Perform a rotation and ensure that we can recover it""" np.random.seed(0) for i in range(1, 12): num_points = 2**i points = np.random.rand(num_points, 3) rotation = random.rand(1) translation = np.random.rand(1, 3) transformed_points = rotate(rotation, points) + translation R, t = mapping.kabsch(points, transformed_points) q = from_matrix(R) # In the case of just two points, the mapping is not unique, # so we don't check the mapping itself, just the result. if i > 1: self.assertTrue( np.logical_or( np.allclose(rotation, q), np.allclose(rotation, -q), ) ) self.assertTrue(np.allclose(translation, t)) self.assertTrue( np.allclose( transformed_points, rotate(q, points) + t ) ) def test_horn(self): """Perform a rotation and ensure that we can recover it""" np.random.seed(0) for i in range(1, 12): num_points = 2**i points = np.random.rand(num_points, 3) rotation = random.rand(1) translation = np.random.rand(1, 3) transformed_points = rotate(rotation, points) + translation q, t = mapping.horn(points, transformed_points) # In the case of just two points, the mapping is not unique, # so we don't check the mapping itself, just the result. if i > 1: self.assertTrue( np.logical_or( np.allclose(rotation, q), np.allclose(rotation, -q), ) ) self.assertTrue(np.allclose(translation, t)) self.assertTrue( np.allclose( transformed_points, rotate(q, points) + t ) ) def test_davenport(self): """Perform a rotation and ensure that we can recover it""" np.random.seed(0) for i in range(1, 12): num_points = 2**i points = np.random.rand(num_points, 3) rotation = random.rand(1) translation = np.random.rand(1, 3) transformed_points = rotate(rotation, points) + translation q, t = mapping.davenport(points, transformed_points) # In the case of just two points, the mapping is not unique, # so we don't check the mapping itself, just the result. if i > 1: self.assertTrue( np.logical_or( np.allclose(rotation, q), np.allclose(rotation, -q), ) ) self.assertTrue(np.allclose(translation, t)) self.assertTrue( np.allclose( transformed_points, rotate(q, points) + t ) ) def test_procrustes(self): """Perform a rotation and ensure that we can recover it""" np.random.seed(0) for i in range(1, 12): num_points = 2**i points = np.random.rand(num_points, 3) rotation = random.rand(1) translation = np.random.rand(1, 3) transformed_points = rotate(rotation, points) + translation q, t = mapping.procrustes(points, transformed_points) # In the case of just two points, the mapping is not unique, # so we don't check the mapping itself, just the result. if i > 1: self.assertTrue( np.logical_or( np.allclose(rotation, q), np.allclose(rotation, -q), ) ) self.assertTrue(np.allclose(translation, t)) self.assertTrue( np.allclose( transformed_points, rotate(q, points) + t ) ) @unittest.skip("This feature is currently broken and must be fixed") def test_equivalent(self): """Perform a rotation and ensure that we can recover it""" # Test on an octahedron points = [[1, 0, 0], [-1, 0, 0], [0, 1, 0], [0, -1, 0], [0, 0, 1], [0, 0, -1]] # This is just a selected subset eq = [from_axis_angle([0, 0, 1], a) for a in [0, 2*np.pi/3, 4*np.pi/3]] np.random.seed(0) rotation = random.rand(1) translation = np.random.rand(1, 3) transformed_points = rotate(rotation, points) + translation q, t = mapping.procrustes(points, transformed_points, equivalent_quaternions=eq) self.assertTrue( np.allclose( transformed_points, rotate(q, points) + t ) ) def test_icp_exact(self): """Ensure that ICP is exact for corresponding inputs""" # Note that we do not bother to test the non-unique matching since we # know it provides very poor results. np.random.seed(0) # First test using unique matching, which should work for i in range(2, 6): num_points = 2**i points = np.random.rand(num_points, 3) rotation = from_axis_angle([0.3, 0.3, 0.3], 0.3) translation = np.random.rand(1, 3) transformed_points = rotate(rotation, points) + translation q, t = mapping.icp(points, transformed_points) q = from_matrix(q) # In the case of just two points, the mapping is not unique, # so we don't check the mapping itself, just the result. if i > 1: self.assertTrue( np.logical_or( np.allclose(rotation, q), np.allclose(rotation, -q), ) ) self.assertTrue(np.allclose(translation, t)) self.assertTrue( np.allclose( transformed_points, rotate(q, points) + t ) ) def test_icp_mismatched(self): """See how ICP works for non-corresponding inputs. Have set some reasonable threshold for testing purposes.""" np.random.seed(0) # First test using unique matching, which should work for i in range(2, 6): num_points = 2**i points = np.random.rand(num_points, 3) rotation = from_axis_angle([0.3, 0.3, 0.3], 0.3) translation = np.random.rand(1, 3) transformed_points = rotate(rotation, points) + translation indices = np.arange(num_points) np.random.shuffle(indices) shuffled_points = points[indices] q, t = mapping.icp(shuffled_points, transformed_points) q = from_matrix(q) deltas = transformed_points - (rotate(q, shuffled_points) + t) norms = np.linalg.norm(deltas, axis=-1) # This is purely a heuristic, since we can't guarantee exact matches self.assertTrue(np.mean(norms) < 1)
34.25523
80
0.496275
917
8,187
4.354417
0.160305
0.042074
0.068119
0.066116
0.748059
0.748059
0.737541
0.72001
0.72001
0.72001
0
0.024776
0.413338
8,187
238
81
34.39916
0.806579
0.168804
0
0.625767
0
0
0.007424
0
0
0
0
0
0.104294
1
0.042945
false
0
0.02454
0
0.07362
0.006135
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
eb1781e788a7f3b91da935bda28f56f3b8634560
249
py
Python
atomic6ghg/exceptions.py
GE-Atomic6/ghg
feea44a4a4bd1f6674a9c8be807f2c9f59f5da08
[ "BSD-3-Clause" ]
3
2022-03-30T00:06:06.000Z
2022-03-30T15:56:45.000Z
atomic6ghg/exceptions.py
GE-Atomic6/ghg
feea44a4a4bd1f6674a9c8be807f2c9f59f5da08
[ "BSD-3-Clause" ]
null
null
null
atomic6ghg/exceptions.py
GE-Atomic6/ghg
feea44a4a4bd1f6674a9c8be807f2c9f59f5da08
[ "BSD-3-Clause" ]
null
null
null
""" Custom exceptions """ class YearMapException(Exception): """ This exception is raised if a year can't be mapped to factors """ class YearValueException(Exception): """ This exception is raised if a year cannot be typed as an int """
24.9
73
0.702811
34
249
5.147059
0.676471
0.148571
0.251429
0.274286
0.422857
0.422857
0.422857
0.422857
0
0
0
0
0.196787
249
9
74
27.666667
0.875
0.570281
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
5
eb2671d0910bf967d58a5d24b1e4a4b9241c73bd
561
py
Python
white_matter/utils/projection_namer.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
9
2019-05-01T13:12:17.000Z
2021-11-23T10:34:56.000Z
white_matter/utils/projection_namer.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
2
2022-02-03T13:56:22.000Z
2022-02-04T07:16:37.000Z
white_matter/utils/projection_namer.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
1
2022-02-03T12:05:12.000Z
2022-02-03T12:05:12.000Z
class ProjectionNamer(object): def __init__(self): pass def projection(self, src_region, src_type, tgt_region, hemi=None): return self.half_projection(src_region, src_type, tgt_region) + '_' + hemi @staticmethod def half_projection(src_region, src_type, tgt_region): return src_region + '_' + src_type + '_to_' + tgt_region @staticmethod def comb_pop(reg_name, src_type): return reg_name + '_' + src_type @staticmethod def comb_hemi(region_name, hemi): return region_name + '_' + hemi
29.526316
82
0.670232
71
561
4.84507
0.309859
0.122093
0.139535
0.186047
0.322674
0.322674
0.322674
0.226744
0
0
0
0
0.231729
561
18
83
31.166667
0.798144
0
0
0.214286
0
0
0.01426
0
0
0
0
0
0
1
0.357143
false
0.071429
0
0.285714
0.714286
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
5
eb2a7c5c90612550850cdbbd9340abb3eb46ce02
59
py
Python
archive/MCQ/abstracts/__init__.py
dreinq/DeepQ
abb6d8b492f802fefbc0095e8719377dc708069c
[ "Apache-2.0" ]
null
null
null
archive/MCQ/abstracts/__init__.py
dreinq/DeepQ
abb6d8b492f802fefbc0095e8719377dc708069c
[ "Apache-2.0" ]
null
null
null
archive/MCQ/abstracts/__init__.py
dreinq/DeepQ
abb6d8b492f802fefbc0095e8719377dc708069c
[ "Apache-2.0" ]
1
2020-11-23T09:13:58.000Z
2020-11-23T09:13:58.000Z
from .HotPatch import HotPatch from .Dataset import Dataset
29.5
30
0.847458
8
59
6.25
0.5
0
0
0
0
0
0
0
0
0
0
0
0.118644
59
2
31
29.5
0.961538
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
de17b6a759015e6067104012a4292b4841fdf559
206
py
Python
ebarber/admin.py
LoukasPap/university_assignment-django
c0ccdcb5f12e536037b211c564eab049847175bb
[ "MIT" ]
2
2020-08-02T21:23:43.000Z
2020-08-05T22:14:57.000Z
ebarber/admin.py
LoukasPap/university_assignment-django
c0ccdcb5f12e536037b211c564eab049847175bb
[ "MIT" ]
null
null
null
ebarber/admin.py
LoukasPap/university_assignment-django
c0ccdcb5f12e536037b211c564eab049847175bb
[ "MIT" ]
null
null
null
from django.contrib import admin from ebarber.models import Area, Customer, Barbershop # Register your models here. admin.site.register(Area) admin.site.register(Customer) admin.site.register(Barbershop)
22.888889
53
0.815534
28
206
6
0.5
0.160714
0.303571
0
0
0
0
0
0
0
0
0
0.097087
206
8
54
25.75
0.903226
0.126214
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
de624c8d0c2d0de7c3c09952d702f69a2b81af55
28,611
py
Python
backend/api/views/ProyectoViewSet.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
1
2022-03-02T02:28:49.000Z
2022-03-02T02:28:49.000Z
backend/api/views/ProyectoViewSet.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
22
2021-09-01T17:44:25.000Z
2021-10-07T19:39:09.000Z
backend/api/views/ProyectoViewSet.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
null
null
null
from rest_framework.decorators import action from rest_framework import viewsets, status from rest_framework.response import Response from backend.api.models import Miembro, Proyecto, RolProyecto, Sprint, SprintBacklog, UserStory, Usuario, Horario from backend.api.models.ProductBacklog import ProductBacklog from backend.api.serializers import \ ProyectoSerializer, \ PermisoProyectoSerializer, \ RolProyectoSerializer, \ MiembroSerializer, \ ImportarRolSerializer, \ UserStorySerializer, \ SprintSerializer, \ ProductBacklogSerializer from backend.api.forms import CreateProyectoForm, UpdateProyectoForm from backend.api.decorators import FormValidator from django.db import transaction from django.db.models import Q from backend.api.serializers.SprintBacklogSerializer import SprintBacklogSerializer class ProyectoViewSet(viewsets.ViewSet): """ ProyectoViewSet View para el modelo Proyecto """ def list(self, request): """ list Lista todos los proyectos al que el usuario pertenece Args: request (Any): request Returns: json: Proyecto[] """ usuario_request = Usuario.objects.get(user=request.user) if usuario_request.tiene_permiso("ver_proyectos"): proyectos = Proyecto.objects.all() else: proyectos = Proyecto.objects.filter(miembros__usuario=usuario_request) serializer = ProyectoSerializer(proyectos, many=True) return Response(serializer.data) def retrieve(self, request, pk=None): """ retrieve Obtiene un proyecto Args: request (Any): request pk (integer, optional): primary key. Defaults to None. Returns: json: Proyecto """ try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) if not usuario_request.tiene_permiso("ver_proyectos") and \ not Miembro.es_miembro(usuario_request, proyecto): response = { "message": "Debe ser miembro y tener permiso para realizar esta acción", "permission_required": ["ver_proyectos"], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) serializer = ProyectoSerializer(proyecto, many=False) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "No existe el proyecto", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) @transaction.atomic @FormValidator(form=CreateProyectoForm) def create(self, request): """ create Crea un proyecto Args: request (Any): request Returns: json: Proyecto """ try: usuario_request = Usuario.objects.get(user=request.user) if not usuario_request.tiene_permiso("crear_proyectos") or \ not usuario_request.tiene_permiso("ver_usuarios"): response = { "message": "No tiene permiso para realizar esta accion", "permission_required": ["crear_proyectos", "ver_usuarios"], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) proyecto = Proyecto.create( nombre=request.data['nombre'], fecha_inicio=request.data['fecha_inicio'], fecha_fin=request.data['fecha_fin'], scrum_master=Usuario.objects.get(pk=request.data['scrum_master_id']), roles_handler=RolProyecto.from_plantilla, scrum_master_handler=Miembro.asignar_scrum_master ) miembro = Miembro.objects.get(rol__nombre="Scrum Master", proyecto=proyecto) horario = Horario.objects.create( lunes=0, martes=0, miercoles=0, jueves=0, viernes=0, sabado=0, domingo=0, ) horario.asignar_horario(miembro) serializer = ProyectoSerializer(proyecto, many=False) return Response(serializer.data) except Usuario.DoesNotExist: response = { "message": "No existe el usuario asignado como Scrum Master", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) @transaction.atomic @FormValidator(UpdateProyectoForm) def update(self, request, pk=None): """ update Modifica un Proyecto Args: request (Any): request pk (integer, optional): primary key. Defaults to None. Returns: json: Proyecto """ try: usuario_request = Usuario.objects.get(user=request.user) if not usuario_request.tiene_permiso("modificar_proyectos") or \ not usuario_request.tiene_permiso("ver_proyectos") or \ not usuario_request.tiene_permiso("ver_usuarios"): response = { "message": "No tiene permiso para realizar esta accion", "permission_required": [ "modificar_proyectos", "ver_proyectos", "ver_usuarios" ], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) proyecto = Proyecto.objects.get(pk=pk) if proyecto.estado != 'P': response = { "message": "Solo puedes modificar un proyecto en estado Pendiente", "error": "bad_request" } return Response(response, status=status.HTTP_400_BAD_REQUEST) scrum_master = Usuario.objects.get(pk=request.data["scrum_master_id"]) p = Proyecto.objects.filter(~Q(id=pk), nombre=request.data['nombre']) if len(p) > 0: response = { "message": "Ya existe un proyecto con ese nombre", "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) miembro = Miembro.objects.get(rol__nombre="Scrum Master", proyecto=proyecto) miembro.horario.delete() proyecto.update( nombre=request.data['nombre'], fecha_inicio=request.data['fecha_inicio'], fecha_fin=request.data['fecha_fin'], scrum_master=scrum_master, scrum_master_handler=Miembro.actualizar_scrum_master ) miembro = Miembro.objects.get(usuario=scrum_master, proyecto=proyecto) horario = Horario.objects.create( lunes=0, martes=0, miercoles=0, jueves=0, viernes=0, sabado=0, domingo=0, ) horario.asignar_horario(miembro) serializer = ProyectoSerializer(proyecto, many=False) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "El proyecto no existe", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) except Usuario.DoesNotExist: response = { "message": "No existe el Scrum Master", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) def destroy(self, request, pk=None): """ destroy Elimina un Proyecto Args: request (Any): request pk (integer, optional): primary key. Defaults to None. Returns: http request: 200 """ try: usuario_request = Usuario.objects.get(user=request.user) if not usuario_request.tiene_permiso("ver_proyectos") or \ not usuario_request.tiene_permiso("eliminar_proyectos"): response = { "message": "No tiene permiso para realizar esta accion", "permission_required": [ "ver_proyectos", "eliminar_proyectos" ], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) proyecto = Proyecto.objects.get(pk=pk) if proyecto.estado != 'P': response = { "message": "El proyecto debe estar en estado Pendiente para ser eliminado", "error": "bad_request" } return Response(response, status=status.HTTP_400_BAD_REQUEST) proyecto.delete() response = {"message": "Proyecto Eliminado"} return Response(response, status=status.HTTP_200_OK) except Proyecto.DoesNotExist: response = { "message": "El proyecto no existe", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) @action(detail=True, methods=['POST']) def activar(self, request, pk=None): """ activar Activa el Proyecto Args: request (Any): request pk (integer, optional): primary key. Defaults to None. Returns: json: Proyecto """ try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto=proyecto) if not miembro.tiene_permiso("activar_proyecto"): response = { "message": "No tiene permiso para realizar esta accion", "permission_required": ["activar_proyecto"], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) if proyecto.estado != 'P' and proyecto.estado != "A": response = { "message": "No puedes activar el Proyecto en su estado actual", "estado": dict(proyecto.ESTADO)[proyecto.estado], "error": "bad_request" } return Response(response, status=status.HTTP_400_BAD_REQUEST) proyecto.iniciar() serializer = ProyectoSerializer(proyecto, many=False) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "El proyecto no existe", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) @action(detail=True, methods=["GET"]) def mis_permisos(self, request, pk=None): try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto=proyecto) rol = miembro.rol serializer = PermisoProyectoSerializer(rol.permisos.all()) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "No existe el proyecto", "error": "not_found" } return Response(response, status.HTTP_404_NOT_FOUND) except Miembro.DoesNotExist: response = { "message": "Usted no es miembro de este proyecto", "error": "forbidden" } return Response(response, status.HTTP_403_FORBIDDEN) @action(detail=True, methods=['GET']) def roles(self, request, pk=None): """ list Lista todos los roles de proyecto del proyecto especificado Args: request (Any): request pk (integer, opcional): Primary Key Return: json: lista de roles de proyecto en formato json """ try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto=proyecto) if not miembro.tiene_permiso("ver_roles_proyecto"): response = { "message": "No tiene permiso para realizar esta acción", "permission_required": ["ver_roles_proyecto"] } return Response(response, status=status.HTTP_403_FORBIDDEN) roles = RolProyecto.objects.filter(proyecto=proyecto) serializer = RolProyectoSerializer(roles, many=True) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "El proyecto no existe", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) except Miembro.DoesNotExist: response = {"message": "Usted no es miembro de este proyecto"} return Response(response, status=status.HTTP_403_FORBIDDEN) @action(detail=True, methods=['GET']) def me(self, request, pk=None): """ me Obtiene el modelo miembro del usuario logueado en el proyecto especificado Args: request (Any): request pk (integer, opcional): Primary Key Return: JSON: Miembro solicitado en formato json """ try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto=proyecto) serializer = MiembroSerializer(miembro, many=False) return Response(serializer.data) except Miembro.DoesNotExist: response = {"message": "Usted no es miembro de este proyecto"} return Response(response, status=status.HTTP_403_FORBIDDEN) except Proyecto.DoesNotExist: response = { "message": "El proyecto no existe", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) @action(detail=True, methods=["GET"]) def miembros(self, request, pk=None): """ miembros Lista todos los miembros del proyecto especificado Args: request (Any): request pk (integer, opcional): Primary Key Returns: JSON: Miembros del proyecto especificado en formato json """ try: usuario_request = Usuario.objects.get(user=request.user) miembro = Miembro.objects.get(usuario=usuario_request, proyecto_id=pk) if not miembro.tiene_permiso("ver_miembros"): response = { "message": "No tiene permiso para realizar esta acción", "permission_required": ["ver_miembros"] } return Response(response, status=status.HTTP_403_FORBIDDEN) proyecto = Proyecto.objects.get(pk=pk) miembros = Miembro.objects.filter(proyecto=proyecto) serializer = MiembroSerializer(miembros, many=True) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "No existe el proyecto", "error": "not_found" } return Response(response, status.HTTP_404_NOT_FOUND) except Miembro.DoesNotExist: response = { "message": "Usted no es miembro de este proyecto", "error": "forbidden" } return Response(response, status.HTTP_403_FORBIDDEN) @action(detail=True, methods=["GET"]) def importar_rol(self, request, pk=None): """ importar_rol Importa un rol de proyecto de otro proyecto Args: request (Any): request pk (integer, opcional): Primary Key Return: JSON: Roles de proyecto en formato json """ try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto=proyecto) if not miembro.tiene_permiso("importar_rol_proyecto"): response = { "message": "No tiene permiso para realizar esta acción", "permission_required": ["importar_rol_proyecto"] } return Response(response, status=status.HTTP_403_FORBIDDEN) proyecto = Proyecto.objects.filter(~Q(pk=proyecto.pk)) serializer = ImportarRolSerializer(proyecto, many=True) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "No existe el proyecto", "error": "not_found" } return Response(response, status.HTTP_404_NOT_FOUND) except Miembro.DoesNotExist: response = {"message": "Usted no es miembro de este proyecto"} return Response(response, status=status.HTTP_403_FORBIDDEN) @transaction.atomic @importar_rol.mapping.post def crear_importado_rol(self, request, pk=None): """ crear_importado_rol Clona un rol especificado de otro proyecto al proyecto Args: request (Any): request pk (integer, opcional): Primary Key Return: JSON: Rol nuevo importado en formato json """ try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto=proyecto) if not miembro.tiene_permiso("importar_rol_proyecto"): response = { "message": "No tiene permiso para realizar esta acción", "permission_required": ["importar_rol_proyecto"] } return Response(response, status=status.HTTP_403_FORBIDDEN) rol_importado = RolProyecto.objects.get(pk=request.data["id"]) rol = RolProyecto.objects.create(nombre=rol_importado.nombre, proyecto=proyecto) permisos = rol_importado.permisos.all() for p in permisos: rol.agregar_permiso(p) serializer = RolProyectoSerializer(rol, many=False) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "No existe el proyecto", "error": "not_found" } return Response(response, status.HTTP_404_NOT_FOUND) except Miembro.DoesNotExist: response = {"message": "Usted no es miembro de este proyecto"} return Response(response, status=status.HTTP_403_FORBIDDEN) @action(detail=True, methods=["GET"]) def user_stories(self, request, pk=None): """ user_stories Lista todos los User Stories de este Proyecto Args: request (Any): Request del Usuario pk (int, optional): Primary Key del Proyecto. Defaults to None. Returns: list(JSON): Lista de todos los User Story de este Proyecto en formato JSON """ try: usuario_request = Usuario.objects.get(user=request.user) miembro_request = Miembro.objects.get(usuario=usuario_request, proyecto_id=pk) if not miembro_request.tiene_permiso("ver_user_stories"): response = { "message": "No tiene permiso para realizar esta acción", "permission_required": ["ver_user_stories"], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) user_stories = UserStory.objects.filter(product_backlogs__proyecto_id=pk) serializer = UserStorySerializer(user_stories, many=True) return Response(serializer.data) except Miembro.DoesNotExist: response = { "message": "No existe el Proyecto", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) @action(detail=True, methods=["GET"]) def sprints(self, request, pk=None): try: usuario = Usuario.objects.get(user=request.user) miembro = Miembro.objects.get(usuario=usuario, proyecto_id=pk) if not miembro.tiene_permiso("ver_sprints"): sprints = Sprint.objects.filter(miembro_sprints__miembro_proyecto=miembro) serializer = SprintSerializer(sprints, many=True) return Response(serializer.data) sprints = Sprint.objects.filter(proyecto_id=pk) serializer = SprintSerializer(sprints, many=True) return Response(serializer.data) except Miembro.DoesNotExist: response = { "message": "Usted no es miembro de este Proyecto", "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) @action(detail=True, methods=["GET"]) def product_backlogs(self, request, pk=None): try: usuario = Usuario.objects.get(user=request.user) miembro = Miembro.objects.get(usuario=usuario, proyecto_id=pk) if not usuario.tiene_permiso("ver_proyectos") or \ not miembro.tiene_permiso("ver_user_stories"): response = { "message": "No tiene permiso para realizar esta acción", "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) product_backlogs = ProductBacklog.objects.filter(proyecto_id=pk) serializer = ProductBacklogSerializer(product_backlogs, many=True) return Response(serializer.data) except Miembro.DoesNotExist: response = { "message": "Usted no es miembro de este Proyecto", "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) @action(detail=True, methods=["GET"]) def estimaciones_pendientes(self, request, pk=None): """ estimaciones_pendientes Devuelve los Sprint Backlogs parcialmente estimados asignados al Usuario. Args: request (Any): Request que se solicita Returns: JSON: Sprint Backlogs """ try: usuario = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario, proyecto=proyecto) us = SprintBacklog.objects.filter(estado_estimacion='p', desarrollador__miembro_proyecto=miembro) serializer = SprintBacklogSerializer(us, many=True) return Response(serializer.data) except Miembro.DoesNotExist: response = { "message": "Usted no es miembro de este Proyecto", "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) except Proyecto.DoesNotExist: response = { "message": "No existe el Proyecto", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) @action(detail=True, methods=['POST']) def finalizar(self, request, pk=None): try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto_id=pk) if not miembro.tiene_permiso("finalizar_proyecto"): response = { "message": "No tiene permiso para realizar esta accion", "permission_required": ["finalizar_proyecto"], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) if proyecto.estado != 'A': response = { "message": "No puedes finalizar el Proyecto en su estado actual", "estado": dict(proyecto.ESTADO)[proyecto.estado], "error": "bad_request" } return Response(response, status=status.HTTP_400_BAD_REQUEST) sprints_activos = Sprint.objects.filter(proyecto=proyecto, estado='A') if len(sprints_activos) > 0: response = { "message": "No puedes finalizar el Proyecto hasta que todos los Sprints esten finalizados", "error": "bad_request" } return Response(response, status=status.HTTP_400_BAD_REQUEST) user_stories_pendientes = UserStory.objects.filter(proyecto=proyecto, estado='P') if len(user_stories_pendientes) > 0: response = { "message": "No puedes finalizar el Proyecto hasta" + " que todos los User Stories esten lanzados o cancelados", "error": "bad_request" } return Response(response, status=status.HTTP_400_BAD_REQUEST) proyecto.finalizar() serializer = ProyectoSerializer(proyecto, many=False) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "El proyecto no existe", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) except Miembro.DoesNotExist: response = { "message": "Usted no es miembro de este Proyecto", "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) @transaction.atomic @action(detail=True, methods=['POST']) def cancelar(self, request, pk=None): try: usuario_request = Usuario.objects.get(user=request.user) proyecto = Proyecto.objects.get(pk=pk) miembro = Miembro.objects.get(usuario=usuario_request, proyecto_id=pk) if not miembro.tiene_permiso("cancelar_proyecto"): response = { "message": "No tiene permiso para realizar esta acción", "permission_required": ["cancelar_proyecto"], "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN) if proyecto.estado != 'A': response = { "message": "No puedes cancelar el Proyecto en su estado actual", "estado": dict(proyecto.ESTADO)[proyecto.estado], "error": "bad_request" } return Response(response, status=status.HTTP_400_BAD_REQUEST) sprints_activos = Sprint.objects.filter(proyecto=proyecto, estado='A') for sprint in sprints_activos: sprint.finalizar() proyecto.cancelar() serializer = ProyectoSerializer(proyecto, many=False) return Response(serializer.data) except Proyecto.DoesNotExist: response = { "message": "El proyecto no existe", "error": "not_found" } return Response(response, status=status.HTTP_404_NOT_FOUND) except Miembro.DoesNotExist: response = { "message": "Usted no es miembro de este Proyecto", "error": "forbidden" } return Response(response, status=status.HTTP_403_FORBIDDEN)
41.951613
113
0.575932
2,724
28,611
5.921806
0.082599
0.058149
0.066828
0.085054
0.77007
0.756494
0.738516
0.730767
0.718244
0.7038
0
0.008784
0.335535
28,611
681
114
42.013216
0.839724
0.080528
0
0.653992
0
0
0.145121
0.003295
0
0
0
0.007342
0
1
0.034221
false
0
0.043726
0
0.207224
0.032319
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
de6eae682bd861cbbdfb5088c1ee7f234b57055d
96
py
Python
venv/lib/python3.8/site-packages/cryptography/x509/base.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
1
2021-11-07T22:40:27.000Z
2021-11-07T22:40:27.000Z
venv/lib/python3.8/site-packages/cryptography/x509/base.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/cryptography/x509/base.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/a7/dc/e4/401d3bd34e725dad9dd97ce9fa85c80a50e6a9cae672942a66da6c8129
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.375
0
96
1
96
96
0.520833
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
5
de8c0315258048f93c033b4295fe2ea28864b5e1
48
py
Python
src/dstoolm4/__init__.py
ctogle/dstoolm
38789f08d3c1679c21f396832008108a5f04cab9
[ "MIT" ]
null
null
null
src/dstoolm4/__init__.py
ctogle/dstoolm
38789f08d3c1679c21f396832008108a5f04cab9
[ "MIT" ]
null
null
null
src/dstoolm4/__init__.py
ctogle/dstoolm
38789f08d3c1679c21f396832008108a5f04cab9
[ "MIT" ]
null
null
null
import dstoolm as dm simmodule = dm.simmodule
9.6
24
0.770833
7
48
5.285714
0.714286
0.594595
0
0
0
0
0
0
0
0
0
0
0.1875
48
4
25
12
0.948718
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
deaa83f536dcfc32d6878ea41bb6ca4c295a185a
106
py
Python
consumers/models/__init__.py
marcusholmgren/optimizing-public-transportation
9c03a4aad83e57b77343d87ffcd61aa02801cd7e
[ "MIT" ]
24
2020-02-27T11:41:54.000Z
2022-02-12T11:39:28.000Z
consumers/models/__init__.py
marcusholmgren/optimizing-public-transportation
9c03a4aad83e57b77343d87ffcd61aa02801cd7e
[ "MIT" ]
4
2020-07-19T18:19:05.000Z
2020-08-09T03:45:27.000Z
consumers/models/__init__.py
marcusholmgren/optimizing-public-transportation
9c03a4aad83e57b77343d87ffcd61aa02801cd7e
[ "MIT" ]
10
2020-02-27T17:58:44.000Z
2022-03-23T21:51:06.000Z
from .station import Station from .line import Line from .lines import Lines from .weather import Weather
21.2
28
0.811321
16
106
5.375
0.375
0
0
0
0
0
0
0
0
0
0
0
0.150943
106
4
29
26.5
0.955556
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
decf103b0516cb8992c0e7d736e3e477ca7322da
75
py
Python
TestCases/W42/jobshop.py
lizhicq/Quanttools
f70c6d74150cf2ca1ae70da56719b4a9f9a09f47
[ "Apache-2.0" ]
1
2018-11-30T15:46:02.000Z
2018-11-30T15:46:02.000Z
TestCases/W42/jobshop.py
rouseway/QuantDev
f70c6d74150cf2ca1ae70da56719b4a9f9a09f47
[ "Apache-2.0" ]
null
null
null
TestCases/W42/jobshop.py
rouseway/QuantDev
f70c6d74150cf2ca1ae70da56719b4a9f9a09f47
[ "Apache-2.0" ]
2
2020-12-10T05:24:48.000Z
2021-06-21T11:09:46.000Z
class Solution(object): def short_time(self, invtervals): pass
18.75
37
0.666667
9
75
5.444444
1
0
0
0
0
0
0
0
0
0
0
0
0.24
75
4
38
18.75
0.859649
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0.333333
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
deeb41a5148819398b7bd00b0151dd0812275075
819
py
Python
boexplain/optuna/optuna/__init__.py
sfu-db/BOExplain
a933badd9af1e039579927e41233f824c59db3f8
[ "MIT" ]
8
2021-02-15T09:21:17.000Z
2021-12-21T20:37:21.000Z
boexplain/optuna/optuna/__init__.py
sfu-db/BOExplain
a933badd9af1e039579927e41233f824c59db3f8
[ "MIT" ]
null
null
null
boexplain/optuna/optuna/__init__.py
sfu-db/BOExplain
a933badd9af1e039579927e41233f824c59db3f8
[ "MIT" ]
2
2021-02-15T09:17:35.000Z
2021-06-21T16:50:58.000Z
import importlib import types from typing import Any # from optuna import distributions # NOQA # from optuna import exceptions # NOQA # from optuna import logging # NOQA # from optuna import pruners # NOQA # from optuna import samplers # NOQA # from optuna import storages # NOQA # from optuna import study # NOQA # from optuna import trial # NOQA from . import distributions # NOQA from . import exceptions # NOQA from . import logging # NOQA from . import pruners # NOQA from . import samplers # NOQA from . import storages # NOQA from . import study # NOQA from . import trial # NOQA from .study import create_study # NOQA from .study import Study # NOQA from .trial import Trial # NOQA # from study import create_study # NOQA # from study import Study # NOQA # from trial import Trial # NOQA
30.333333
42
0.733822
112
819
5.348214
0.151786
0.280467
0.213689
0.233723
0.285476
0.285476
0.285476
0.285476
0.285476
0.285476
0
0
0.212454
819
27
43
30.333333
0.928682
0.528694
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
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
7210d6ac748d5a31a843d27d0b08dad0379f7ce3
179
py
Python
DA2Lite/compression/__init__.py
nota-github/DA2Lite
d7cdcf9d1e409f11ba1c5ece41f8b4c20db44aab
[ "MIT" ]
9
2021-04-04T05:02:36.000Z
2022-03-22T08:42:23.000Z
DA2Lite/compression/__init__.py
nota-github/DA2Lite
d7cdcf9d1e409f11ba1c5ece41f8b4c20db44aab
[ "MIT" ]
2
2022-03-14T05:20:51.000Z
2022-03-15T02:35:36.000Z
DA2Lite/compression/__init__.py
nota-github/DA2Lite
d7cdcf9d1e409f11ba1c5ece41f8b4c20db44aab
[ "MIT" ]
6
2021-04-30T09:26:13.000Z
2022-01-27T11:25:50.000Z
from .pruning.prune import Pruner from .filter_decomposition.fd import FilterDecomposition #from .clustering.cluster import Clustering from .clustering.cluster2 import Clustering
35.8
56
0.860335
21
179
7.285714
0.571429
0.183007
0
0
0
0
0
0
0
0
0
0.006135
0.089385
179
4
57
44.75
0.932515
0.234637
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
721cd67dfef5f85343e63a46ecfbb24b2d3f0a06
36
py
Python
wicope/__main__.py
diepala/wicope
5ba32a4587f9d46bd1711a7fe202577f29a8fd95
[ "Unlicense" ]
12
2021-03-28T12:50:07.000Z
2022-03-26T23:24:20.000Z
wicope/__main__.py
diepala/wicope
5ba32a4587f9d46bd1711a7fe202577f29a8fd95
[ "Unlicense" ]
null
null
null
wicope/__main__.py
diepala/wicope
5ba32a4587f9d46bd1711a7fe202577f29a8fd95
[ "Unlicense" ]
4
2021-09-30T15:27:43.000Z
2022-02-19T16:45:58.000Z
from wicope.app import main main()
9
27
0.75
6
36
4.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.166667
36
3
28
12
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
7244ad33649fa535a79551d101df41d1b2b50b8b
133
py
Python
tests/obj_test.py
skywalk163/vaex
f5e38f1fa448ef78936e2cb6b3d026fda1f2a1c5
[ "MIT" ]
2
2020-12-01T09:41:54.000Z
2020-12-13T14:10:19.000Z
tests/obj_test.py
skywalk163/vaex
f5e38f1fa448ef78936e2cb6b3d026fda1f2a1c5
[ "MIT" ]
1
2019-06-03T21:25:01.000Z
2019-06-03T21:25:01.000Z
tests/obj_test.py
skywalk163/vaex
f5e38f1fa448ef78936e2cb6b3d026fda1f2a1c5
[ "MIT" ]
null
null
null
from common import * def test_count_obj(ds_local): df = ds_local # df.count('x') df.count('obj', delay=True) # dsa
14.777778
31
0.609023
21
133
3.666667
0.666667
0.207792
0.233766
0
0
0
0
0
0
0
0
0
0.24812
133
8
32
16.625
0.77
0.12782
0
0
0
0
0.026549
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
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
1
0
0
0
0
0
0
0
5
a0d585a469c2ff4141542b454fc9bcb6fb4dc977
143
py
Python
src/courses/admin.py
Ameesha2001/Ekyam-scl-maxo
d9a8ec0e2d297d20fcf9139cfe50a7c814cdb2f5
[ "MIT" ]
10
2021-01-02T14:54:33.000Z
2022-02-09T07:11:05.000Z
src/courses/admin.py
Ameesha2001/Ekyam-scl-maxo
d9a8ec0e2d297d20fcf9139cfe50a7c814cdb2f5
[ "MIT" ]
2
2021-01-06T09:04:24.000Z
2021-01-08T06:20:34.000Z
src/courses/admin.py
Ameesha2001/Ekyam-scl-maxo
d9a8ec0e2d297d20fcf9139cfe50a7c814cdb2f5
[ "MIT" ]
8
2020-12-24T07:58:24.000Z
2022-01-04T15:22:30.000Z
from django.contrib import admin from .models import Course, FavouriteCourse admin.site.register(Course) admin.site.register(FavouriteCourse)
23.833333
43
0.839161
18
143
6.666667
0.555556
0.15
0.283333
0
0
0
0
0
0
0
0
0
0.083916
143
5
44
28.6
0.916031
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
9d180b01525aad295656607315c5735c2578cabb
99
py
Python
test/test_generate/__init__.py
afspies/otter-grader
5d5ba1b049596eaee1fd9c039bb1cd15f6786f4f
[ "BSD-3-Clause" ]
76
2020-01-24T07:18:34.000Z
2022-03-16T01:16:28.000Z
test/test_generate/__init__.py
afspies/otter-grader
5d5ba1b049596eaee1fd9c039bb1cd15f6786f4f
[ "BSD-3-Clause" ]
413
2019-10-07T03:49:51.000Z
2022-03-29T18:23:05.000Z
test/test_generate/__init__.py
afspies/otter-grader
5d5ba1b049596eaee1fd9c039bb1cd15f6786f4f
[ "BSD-3-Clause" ]
41
2020-01-24T21:45:43.000Z
2022-03-14T16:11:55.000Z
################################ ##### Otter Generate Tests ##### ################################
24.75
32
0.181818
3
99
6
1
0
0
0
0
0
0
0
0
0
0
0
0.070707
99
3
33
33
0.195652
0.20202
0
null
1
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
9d2442a42f6e959ed1bf949c6bdabbd59e2489dd
457
py
Python
matchzoo/preprocessors/__init__.py
matthew-z/MatchZoo-py
014e33d7c4ae05dc5296ebd1d600baf7e9cb9dec
[ "Apache-2.0" ]
null
null
null
matchzoo/preprocessors/__init__.py
matthew-z/MatchZoo-py
014e33d7c4ae05dc5296ebd1d600baf7e9cb9dec
[ "Apache-2.0" ]
null
null
null
matchzoo/preprocessors/__init__.py
matthew-z/MatchZoo-py
014e33d7c4ae05dc5296ebd1d600baf7e9cb9dec
[ "Apache-2.0" ]
null
null
null
from . import units from .naive_preprocessor import NaivePreprocessor from .basic_preprocessor import BasicPreprocessor from .bert_preprocessor import BertPreprocessor from .numeralize_preprocessor import NumeralizePreprocessor def list_available() -> list: from matchzoo.engine.base_preprocessor import BasePreprocessor from matchzoo.utils import list_recursive_concrete_subclasses return list_recursive_concrete_subclasses(BasePreprocessor)
38.083333
66
0.862144
48
457
7.958333
0.5
0.235602
0.109948
0.162304
0
0
0
0
0
0
0
0
0.105033
457
11
67
41.545455
0.933985
0
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
true
0
0.777778
0
1
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
19c378d231afe21cfffcc3f299470ad60e3c1f13
29
py
Python
run.py
imsurinder90/metaclasses_and_patterns_in_python
456a2d25eb1a46f9029fe83ed7d2ed14919beaa5
[ "MIT" ]
null
null
null
run.py
imsurinder90/metaclasses_and_patterns_in_python
456a2d25eb1a46f9029fe83ed7d2ed14919beaa5
[ "MIT" ]
null
null
null
run.py
imsurinder90/metaclasses_and_patterns_in_python
456a2d25eb1a46f9029fe83ed7d2ed14919beaa5
[ "MIT" ]
null
null
null
# run.py - Project main file
14.5
28
0.689655
5
29
4
1
0
0
0
0
0
0
0
0
0
0
0
0.206897
29
1
29
29
0.869565
0.896552
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
19e282344b1c59fe6499b1cc9f76ad9bb0287f65
27,542
py
Python
scripts/slave/recipes/bisection/android_bisect.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipes/bisection/android_bisect.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
null
null
null
scripts/slave/recipes/bisection/android_bisect.py
bopopescu/chromium-build
f8e42c70146c1b668421ee6358dc550a955770a3
[ "BSD-3-Clause" ]
1
2020-07-22T09:16:32.000Z
2020-07-22T09:16:32.000Z
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import contextlib from recipe_engine.types import freeze DEPS = [ 'auto_bisect', 'bisect_tester', 'depot_tools/bot_update', 'chromium', 'chromium_android', 'chromium_tests', 'depot_tools/gclient', 'recipe_engine/json', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/raw_io', 'recipe_engine/step', ] REPO_URL = 'https://chromium.googlesource.com/chromium/src.git' BUILDERS = freeze({ 'tryserver.chromium.perf': { 'builders': { 'android_one_perf_bisect': { 'recipe_config': 'main_builder_rel_mb', 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', }, 'android_nexus5_perf_bisect': { 'recipe_config': 'main_builder_rel_mb', 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', }, 'android_nexus5X_perf_bisect': { 'recipe_config': 'arm64_builder_rel_mb', 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', }, 'android_nexus6_perf_bisect': { 'recipe_config': 'main_builder_rel_mb', 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', }, 'android_nexus7_perf_bisect': { 'recipe_config': 'main_builder_rel_mb', 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', }, 'android_fyi_perf_bisect': { 'recipe_config': 'main_builder_rel_mb', 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', }, 'android_webview_arm64_aosp_perf_bisect': { 'recipe_config': 'main_builder_rel_mb', 'android_apply_config': ['remove_all_system_webviews'], 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', 'webview': True, }, 'android_webview_nexus6_aosp_perf_bisect': { 'recipe_config': 'main_builder_rel_mb', 'android_apply_config': ['remove_all_system_webviews'], 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', 'webview': True, }, 'staging_android_nexus5X_perf_bisect': { 'recipe_config': 'arm64_builder_rel_mb', 'gclient_apply_config': ['android', 'perf'], 'bucket': 'chrome-perf', }, }, }, }) from recipe_engine.recipe_api import Property PROPERTIES = {'mastername': Property(), 'buildername': Property(),} def RunSteps(api, mastername, buildername): master_dict = BUILDERS.get(mastername, {}) bot_config = master_dict.get('builders', {}).get(buildername) # The following lines configures android bisect bot to to checkout codes, # executes runhooks, provisions devices and runs legacy bisect script. recipe_config = bot_config.get('recipe_config', 'perf') kwargs = { 'REPO_NAME': 'src', 'REPO_URL': REPO_URL, 'INTERNAL': False, 'BUILD_CONFIG': 'Release', 'TARGET_PLATFORM': 'android', } kwargs.update(bot_config.get('kwargs', {})) api.chromium_android.configure_from_properties(recipe_config, **kwargs) api.chromium_android.apply_config('use_devil_provision') api.chromium.set_config(recipe_config, **kwargs) api.chromium.ensure_goma() api.chromium_android.c.set_val({'deps_file': 'DEPS'}) api.gclient.set_config('tryserver_chromium_perf') for c in bot_config.get('android_apply_config', []): api.chromium_android.apply_config(c) for c in bot_config.get('gclient_apply_config', []): api.gclient.apply_config(c) update_step = api.auto_bisect.ensure_checkout() api.path.c.dynamic_paths['catapult'] = ( api.m.auto_bisect.working_dir.join('catapult')) api.path.c.dynamic_paths['bisect_results'] = api.path['start_dir'].join( 'bisect_results') api.chromium_android.clean_local_files() bot_db = api.chromium_tests.create_bot_db_from_master_dict(mastername, master_dict) api.chromium_android.use_devil_adb() @contextlib.contextmanager def android_bisect_build_wrapper(new_api): """A context manager for use as auto_bisect's build_context_mgr. This wraps each individual bisect test. We use new_api here to disambiguate from RunSteps' api object. Otherwise calling auto_bisect from within auto_bisect causes a module to require itself. """ with api.chromium_android.android_build_wrapper()(new_api): try: yield finally: api.auto_bisect.ensure_checkout() @contextlib.contextmanager def android_bisect_test_wrapper(new_api): """A context manager for use as auto_bisect's test_context_mgr. This wraps each individual bisect test. We use new_api here to disambiguate from RunSteps' api object. """ with api.chromium_android.android_test_wrapper()(new_api): yield # Make sure the bisect build and individual test runs are wrapped. api.auto_bisect.build_context_mgr = android_bisect_build_wrapper api.auto_bisect.test_context_mgr = android_bisect_test_wrapper api.auto_bisect.start_try_job(api, update_step=update_step, bot_db=bot_db, do_not_nest_wait_for_revision=True) def GenTests(api): config_json_main = { 'command': ('./tools/perf/run_benchmark -v --browser=android-chrome ' '--output-format=chartjson sunspider'), 'max_time_minutes': '25', 'client_operation_id': '12345726327327', 'repeat_count': '1', 'truncate_percent': '25', 'target_arch': 'ia32', } results_with_patch = """*RESULT dummy: dummy= [5.83,6.013,5.573]ms Avg dummy: 5.907711ms Sd dummy: 0.255921ms RESULT telemetry_page_measurement_results: num_failed= 0 count RESULT telemetry_page_measurement_results: num_errored= 0 count View online at https://console.developers.google.com/\ m/cloudstorage/b/chromium-telemetry/o/html-results/results-with """ results_without_patch = """*RESULT dummy: dummy= [5.83,6.013,5.573]ms Avg dummy: 5.907711ms Sd dummy: 0.255921ms RESULT telemetry_page_measurement_results: num_failed= 0 count RESULT telemetry_page_measurement_results: num_errored= 0 count View online at https://console.developers.google.com/\ m/cloudstorage/b/chromium-telemetry/o/html-results/results-without """ buildbucket_put_response = { "results":[{ "build":{ "status": "SCHEDULED", "created_ts": "1459200369835900", "bucket": "user.username", "result_details_json": "null", "status_changed_ts": "1459200369835930", "created_by": "user:username@example.com", "updated_ts": "1459200369835940", "utcnow_ts": "1459200369962370", "parameters_json": "{\"This_has_been\": \"removed\"}", "id": "9016911228971028736" }, "kind": "buildbucket#resourcesItem", "etag": "\"8uCIh8TRuYs4vPN3iWmly9SJMqw\"" }] } buildbucket_get_response = { "build":{ "bucket": "master.tryserver.chromium.perf", "id": "9009962699124567824", "result": "SUCCESS", "status": "COMPLETED", "status_changed_utc": "Mon Jun 13 19:32:37 2016", "updated_utc": "Mon Jun 13 19:32:37 2016", "url": "http://build.chromium.org/p/tryserver.chromium.perf/builders/linux_perf_bisect/builds/6537", "utcnow_utc": "Tue Jun 21 21:33:56 2016" } } for _, master_dict in BUILDERS.items(): for buildername in master_dict.get('builders', {}): config_json = config_json_main.copy() yield ( api.test('basic_perf_tryjob_' + buildername) + api.properties.tryserver( path_config='kitchen', mastername='tryserver.chromium.perf', buildername=buildername, patch_storage='rietveld', patchset='20001', issue='12345', is_test=True, rietveld="https://codereview.chromium.org") + api.override_step_data( 'git diff to analyze patch', api.raw_io.stream_output('tools/run-perf-test.cfg')) + api.override_step_data('load config', api.json.output(config_json)) + api.step_data('Running WITHOUT patch.gsutil exists', retcode=1) + api.step_data( 'Running WITH patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITHOUT patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITH patch.buildbucket.get', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITH patch.buildbucket.get (2)', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITH patch.Performance Test (With Patch) 1 of 1', stdout=api.raw_io.output_text(str(results_without_patch))) + api.step_data( 'Running WITHOUT patch.Performance Test (Without Patch) 1 of 1', stdout=api.raw_io.output_text(str(results_with_patch))) + api.step_data( 'Notify dashboard.Post bisect results', api.json.output({'status_code': 200}))) config_json.update({'metric': 'dummy/dummy'}) yield ( api.test('basic_perf_tryjob_with_metric_' + buildername) + api.properties.tryserver( path_config='kitchen', mastername='tryserver.chromium.perf', buildername=buildername, patch_storage='rietveld', patchset='20001', issue='12345', is_test=True, rietveld="https://codereview.chromium.org") + api.override_step_data( 'git diff to analyze patch', api.raw_io.stream_output('tools/run-perf-test.cfg')) + api.override_step_data('load config', api.json.output(config_json)) + api.step_data('Running WITHOUT patch.gsutil exists', retcode=1) + api.step_data( 'Running WITH patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITHOUT patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITH patch.buildbucket.get', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITH patch.buildbucket.get (2)', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITH patch.Performance Test (With Patch) 1 of 1', api.raw_io.output_text( str(results_with_patch), name='stdout_proxy')) + api.step_data( 'Running WITHOUT patch.Performance Test (Without Patch) 1 of 1', api.raw_io.output_text( str(results_without_patch), name='stdout_proxy')) + api.step_data( 'Notify dashboard.Post bisect results', api.json.output({'status_code': 200}))) yield ( api.test('perf_tryjob_failed_test_' + buildername) + api.properties.tryserver( path_config='kitchen', mastername='tryserver.chromium.perf', buildername=buildername, patch_storage='rietveld', patchset='20001', issue='12345', is_test=True, rietveld="https://codereview.chromium.org") + api.override_step_data( 'git diff to analyze patch', api.raw_io.stream_output('tools/run-perf-test.cfg')) + api.override_step_data('load config', api.json.output(config_json)) + api.step_data('Running WITHOUT patch.gsutil exists', retcode=1) + api.step_data( 'Running WITH patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITHOUT patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITH patch.buildbucket.get', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITH patch.buildbucket.get (2)', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITH patch.Performance Test (With Patch) 1 of 1', retcode=1)) config_json.update({'good_revision': '306475', 'bad_revision': '306476'}) yield ( api.test('basic_perf_tryjob_with_revisions_' + buildername) + api.properties.tryserver( path_config='kitchen', mastername='tryserver.chromium.perf', buildername=buildername, patch_storage='rietveld', patchset='20001', issue='12345', is_test=True, rietveld="https://codereview.chromium.org") + api.override_step_data( 'git diff to analyze patch', api.raw_io.stream_output('tools/run-perf-test.cfg')) + api.override_step_data('load config', api.json.output(config_json)) + api.step_data('resolving commit_pos ' + config_json['good_revision'], stdout=api.raw_io.output_text( 'hash:d49c331def2a3bbf3ddd0096eb51551155')) + api.step_data('resolving commit_pos ' + config_json['bad_revision'], stdout=api.raw_io.output_text( 'hash:bad49c331def2a3bbf3ddd0096eb51551155')) + api.step_data('Running WITHOUT patch.gsutil exists', retcode=1) + api.step_data( 'Running WITH patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITHOUT patch.buildbucket.put', stdout=api.json.output(buildbucket_put_response)) + api.step_data( 'Running WITH patch.buildbucket.get', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITH patch.buildbucket.get (2)', stdout=api.json.output(buildbucket_get_response)) + api.step_data( 'Running WITHOUT patch.Performance Test ' + '(Without Patch) 1 of 1', api.raw_io.output_text( str(results_without_patch), name='stdout_proxy')) + api.step_data( 'Running WITH patch.Performance Test ' + '(With Patch) 1 of 1', api.raw_io.output_text( str(results_with_patch), name='stdout_proxy')) + api.step_data('Notify dashboard.Post bisect results', api.json.output({'status_code': 200}))) config_json = { 'max_time_minutes': '25', 'repeat_count': '1', 'truncate_percent': '25', 'target_arch': 'ia32', } yield ( api.test('perf_tryjob_config_error_' + buildername) + api.properties.tryserver( path_config='kitchen', mastername='tryserver.chromium.perf', buildername=buildername) + api.properties( requester='abcdxyz@chromium.org') + api.override_step_data( 'git diff to analyze patch', api.raw_io.stream_output('tools/run-perf-test.cfg')) + api.override_step_data('load config', api.json.output(config_json))) bisect_config = { 'test_type': 'perf', 'command': './tools/perf/run_benchmark -v ' '--browser=android-chromium --output-format=valueset ' 'page_cycler_v2.intl_ar_fa_he', 'metric': 'warm_times/page_load_time', 'repeat_count': '2', 'max_time_minutes': '5', 'truncate_percent': '25', 'bug_id': '425582', 'gs_bucket': 'chrome-perf', 'builder_host': 'master4.golo.chromium.org', 'builder_port': '8341' } yield (api.test('basic_recipe_' + buildername) + api.properties.tryserver( path_config='kitchen', mastername='tryserver.chromium.perf', buildername=buildername) + api.properties( bisect_config=bisect_config) + api.properties( job_name='f7a7b4135624439cbd27fdd5133d74ec') + api.bisect_tester(tempfile='/tmp/dummy') + api.properties(parent_got_revision='1111111') + api.properties( parent_build_archive_url='gs://test-domain/test-archive.zip')) local_bisect_config = { 'test_type': 'perf', 'command': './tools/perf/run_benchmark -v ' '--browser=android-chromium --output-format=valueset ' 'page_cycler_v2.intl_ar_fa_he', 'metric': 'warm_times/page_load_time', 'repeat_count': '2', 'max_time_minutes': '5', 'truncate_percent': '25', 'bug_id': '425582', 'gs_bucket': 'chrome-perf', 'builder_host': 'master4.golo.chromium.org', 'builder_port': '8341', 'good_revision': '306475', 'bad_revision': '306476', 'dummy_job_names': True } buildername = 'android_one_perf_bisect' working_device = [ { "battery": { "status": "5", "scale": "100", "temperature": "249", "level": "100", "AC powered": "false", "health": "2", "voltage": "4286", "Wireless powered": "false", "USB powered": "true", "technology": "Li-ion", "present": "true" }, "wifi_ip": "", "imei_slice": "Unknown", "ro.build.id": "LRX21O", "ro.build.product": "product_name", "build_detail": "google/razor/flo:5.0/LRX21O/1570415:userdebug/dev-keys", "serial": "1111", "adb_status": "device", "blacklisted": False, "usb_status": True, }, { "adb_status": "offline", "blacklisted": True, "serial": "03e0363a003c6ad4", "usb_status": False, }, { "adb_status": "unauthorized", "blacklisted": True, "serial": "03e0363a003c6ad5", "usb_status": True, }, { "adb_status": "device", "blacklisted": True, "serial": "03e0363a003c6ad6", "usb_status": True, } ] two_devices = [ { "battery": { "status": "5", "scale": "100", "temperature": "249", "level": "100", "AC powered": "false", "health": "2", "voltage": "4286", "Wireless powered": "false", "USB powered": "true", "technology": "Li-ion", "present": "true" }, "wifi_ip": "", "imei_slice": "Unknown", "ro.build.id": "LRX21O", "ro.build.product": "product_name", "build_detail": "google/razor/flo:5.0/LRX21O/1570415:userdebug/dev-keys", "serial": "2222", "adb_status": "device", "blacklisted": False, "usb_status": True, }, { "battery": { "status": "5", "scale": "100", "temperature": "249", "level": "100", "AC powered": "false", "health": "2", "voltage": "4286", "Wireless powered": "false", "USB powered": "true", "technology": "Li-ion", "present": "true" }, "wifi_ip": "", "imei_slice": "Unknown", "ro.build.id": "LRX21O", "ro.build.product": "product_name", "build_detail": "google/razor/flo:5.0/LRX21O/1570415:userdebug/dev-keys", "serial": "1111", "adb_status": "device", "blacklisted": False, "usb_status": True, }, { "adb_status": "offline", "blacklisted": True, "serial": "03e0363a003c6ad4", "usb_status": False, }, { "adb_status": "unauthorized", "blacklisted": True, "serial": "03e0363a003c6ad5", "usb_status": True, }, { "adb_status": "device", "blacklisted": True, "serial": "03e0363a003c6ad6", "usb_status": True, } ] # simulate the scenario when the first tested device works yield (api.test('local_basic_recipe_basic_device') + api.properties.tryserver( mastername='tryserver.chromium.perf', buildername=buildername) + api.properties( path_config='kitchen', bisect_config=local_bisect_config, job_name='f7a7b4135624439cbd27fdd5133d74ec', local_test=True, parent_got_revision='1111111', parent_build_archive_url='gs://test-domain/test-archive.zip') + api.bisect_tester(tempfile='/tmp/dummy') + api.override_step_data('device_status', api.json.output(two_devices)) + api.override_step_data('device_status (2)', api.json.output(two_devices)) + api.step_data('Post bisect results', api.json.output({'status_code': 200})) + api.auto_bisect([ { 'hash': 'e28dc0d49c331def2a3bbf3ddd0096eb51551155', 'commit_pos': '306475', 'parsed_values': [12, 13, 14, 15, 1], 'test_results': 5 * [{'stdout': 'benchmark text', 'retcode': 0}], }, { 'hash': 'fc6dfc7ff5b1073408499478969261b826441144', 'commit_pos': '306476', 'parsed_values': [212, 213, 214, 215, 7], 'test_results': 5 * [{'stdout': 'benchmark text', 'retcode': 0}], }])) # simulate the scenario when the no device is connected. yield (api.test('local_basic_recipe_no_device') + api.properties.tryserver( mastername='tryserver.chromium.perf', buildername=buildername) + api.properties( path_config='kitchen', bisect_config=local_bisect_config, job_name='f7a7b4135624439cbd27fdd5133d74ec', local_test=True, parent_got_revision='1111111', parent_build_archive_url='gs://test-domain/test-archive.zip') + api.bisect_tester(tempfile='/tmp/dummy') + api.override_step_data('device_status', api.json.output([])) + api.override_step_data('device_status (2)', api.json.output([])) + api.auto_bisect([ { 'hash': 'e28dc0d49c331def2a3bbf3ddd0096eb51551155', 'commit_pos': '306475', }, { 'hash': 'fc6dfc7ff5b1073408499478969261b826441144', 'commit_pos': '306476', }])) # simulate the scenario when tests fail not because of device # disconnection. yield (api.test('local_basic_recipe_failed_device') + api.properties.tryserver( mastername='tryserver.chromium.perf', buildername=buildername) + api.properties( path_config='kitchen', bisect_config=local_bisect_config, job_name='f7a7b4135624439cbd27fdd5133d74ec', local_test=True, parent_got_revision='1111111', parent_build_archive_url='gs://test-domain/test-archive.zip') + api.bisect_tester(tempfile='/tmp/dummy') + api.override_step_data('device_status', api.json.output(working_device)) + api.override_step_data('device_status (2)', api.json.output(working_device)) + api.step_data('Debug Info', retcode=1) + api.step_data('Post bisect results', api.json.output({'status_code': 200})) + api.override_step_data('device_status (3)', api.json.output(working_device)) + api.auto_bisect([ { 'hash': 'e28dc0d49c331def2a3bbf3ddd0096eb51551155', 'commit_pos': '306475', 'parsed_values': [12, 13, 14, 15, 1], 'test_results': 5 * [{'stdout': 'benchmark text', 'retcode': 0}], }, { 'hash': 'fc6dfc7ff5b1073408499478969261b826441144', 'commit_pos': '306476', 'parsed_values': [212, 213, 214, 215, 7], 'test_results': 5 * [{'stdout': 'benchmark text', 'retcode': 0}], }])) # simulate the scenario when tests fail because of device disconnection. yield (api.test('local_basic_recipe_disconnected_device') + api.properties.tryserver( mastername='tryserver.chromium.perf', buildername=buildername) + api.properties( path_config='kitchen', bisect_config={ 'test_type': 'perf', 'command': './tools/perf/run_benchmark -v ' '--browser=android-chromium --output-format=valueset ' 'page_cycler_v2.intl_ar_fa_he', 'metric': 'warm_times/page_load_time', 'bug_id': '425582', 'gs_bucket': 'chrome-perf', 'good_revision': '306474', 'bad_revision': '306476', }, job_name='f7a7b4135624439cbd27fdd5133d74ec', local_test=True, parent_got_revision='1111111', parent_build_archive_url='gs://test-domain/test-archive.zip') + api.bisect_tester(tempfile='/tmp/dummy') + api.override_step_data('device_status', api.json.output(two_devices)) + api.override_step_data('device_status (2)', api.json.output(two_devices)) + # Simulating disconnect by raising failure and changing the output of # multiple_device_status api.step_data('Debug Info', retcode=1) + api.override_step_data('device_status (3)', api.json.output(working_device)) + api.step_data('Post bisect results', api.json.output({'status_code': 200})) + api.auto_bisect([ { 'hash': '0000000000000000000000000000000000000000', 'commit_pos': '306474', 'parsed_values': [12, 13, 14, 15, 1], 'test_results': 5 * [{'stdout': 'benchmark text', 'retcode': 0}], }, { 'hash': 'e28dc0d49c331def2a3bbf3ddd0096eb51551155', 'commit_pos': '306475', 'parsed_values': [12, 13, 14, 15, 1], 'test_results': 5 * [{'stdout': 'benchmark text', 'retcode': 1}], }, { 'hash': 'fc6dfc7ff5b1073408499478969261b826441144', 'commit_pos': '306476', 'parsed_values': [212, 213, 214, 215, 7], 'test_results': 5 * [{'stdout': 'benchmark text', 'retcode': 0}], }]))
38.791549
106
0.581258
2,857
27,542
5.355268
0.151558
0.029804
0.031438
0.031765
0.784706
0.754052
0.73817
0.73
0.703268
0.696275
0
0.058466
0.288941
27,542
709
107
38.846262
0.722784
0.04121
0
0.660465
0
0.00155
0.36267
0.11917
0
0
0
0
0
1
0.006202
false
0
0.004651
0
0.010853
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
19ee41e8416c5506a4a30f2e48858ec6748142d1
85
py
Python
Deep Learning Library/dnet/tensor.py
abhirooptalasila/ML-Projects
b3a862ba5a4218eee58c9ae5b0d5deabe0a11295
[ "MIT" ]
2
2021-03-31T05:57:38.000Z
2021-07-23T13:26:11.000Z
Deep Learning Library/dnet/tensor.py
abhirooptalasila/ML-Projects
b3a862ba5a4218eee58c9ae5b0d5deabe0a11295
[ "MIT" ]
null
null
null
Deep Learning Library/dnet/tensor.py
abhirooptalasila/ML-Projects
b3a862ba5a4218eee58c9ae5b0d5deabe0a11295
[ "MIT" ]
1
2021-02-16T23:30:01.000Z
2021-02-16T23:30:01.000Z
""" A tensor is just an n-dimensional array """ from numpy import ndarray as Tensor
17
39
0.729412
14
85
4.428571
0.928571
0
0
0
0
0
0
0
0
0
0
0
0.188235
85
5
40
17
0.898551
0.458824
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
c23413168087cca1388ecb013182cd2b96243eea
537
py
Python
pages/views.py
GSri30/LostAndFound-Web
99882187b6eeb0aa74dc3547bc8889dac9a499dc
[ "MIT" ]
null
null
null
pages/views.py
GSri30/LostAndFound-Web
99882187b6eeb0aa74dc3547bc8889dac9a499dc
[ "MIT" ]
null
null
null
pages/views.py
GSri30/LostAndFound-Web
99882187b6eeb0aa74dc3547bc8889dac9a499dc
[ "MIT" ]
3
2020-01-05T12:01:21.000Z
2021-11-18T06:07:13.000Z
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def home_view(request,*args,**kwargs): return render(request,"index.html",{}) def lost_view(request,*args,**kwargs): return render(request,"lost.html",{}) def found_view(request,*args,**kwargs): return render(request,"found.html",{}) def about_view(request,*args,**kwargs): return render(request,"about us.html",{}) '''def home_after_login_view(request,*args,**kwargs): return render(request,"index1.html",{})'''
28.263158
53
0.713222
72
537
5.222222
0.375
0.146277
0.199468
0.279255
0.531915
0.531915
0.531915
0
0
0
0
0.002092
0.10987
537
19
54
28.263158
0.784519
0.042831
0
0
0
0
0.101695
0
0
0
0
0
0
1
0.4
false
0
0.2
0.4
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
a06527896352956ffa92980b9eb780ecd5af9537
193
py
Python
Dynamic_Programming/254.Drop Eggs/Solution.py
Zhenye-Na/LxxxCode
afd79d790d0a7495d75e6650f80adaa99bd0ff07
[ "MIT" ]
12
2019-05-04T04:21:27.000Z
2022-03-02T07:06:57.000Z
Dynamic_Programming/254.Drop Eggs/Solution.py
Zhenye-Na/LxxxCode
afd79d790d0a7495d75e6650f80adaa99bd0ff07
[ "MIT" ]
1
2019-07-24T18:43:53.000Z
2019-07-24T18:43:53.000Z
Dynamic_Programming/254.Drop Eggs/Solution.py
Zhenye-Na/LxxxCode
afd79d790d0a7495d75e6650f80adaa99bd0ff07
[ "MIT" ]
10
2019-07-01T04:03:04.000Z
2022-03-09T03:57:37.000Z
class Solution: """ @param n: An integer @return: An integer """ def dropEggs(self, n): # write your code here return math.ceil((math.sqrt(8 * n) - 1) / 2)
19.3
52
0.528497
26
193
3.923077
0.769231
0.176471
0
0
0
0
0
0
0
0
0
0.023256
0.331606
193
9
53
21.444444
0.767442
0.321244
0
0
0
0
0
0
0
0
0
0.111111
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
1
0
0
1
0
0
0
1
0
0
0
5
2623585f5493ed41dbdd987df2fc360ef88125c3
70
py
Python
cmdline/manageservice.py
williamscraigm/arcrest
5a381988fe0035678dc94703d857c6ecb4194738
[ "Apache-2.0" ]
11
2015-02-06T23:35:49.000Z
2021-11-28T21:26:46.000Z
cmdline/manageservice.py
williamscraigm/arcrest
5a381988fe0035678dc94703d857c6ecb4194738
[ "Apache-2.0" ]
1
2015-06-24T13:46:44.000Z
2015-07-01T07:46:28.000Z
cmdline/manageservice.py
williamscraigm/arcrest
5a381988fe0035678dc94703d857c6ecb4194738
[ "Apache-2.0" ]
6
2015-02-23T22:51:53.000Z
2021-01-17T05:57:24.000Z
#! python import arcrest.admin arcrest.admin.cmdline.manageservice()
14
37
0.8
8
70
7
0.75
0.428571
0
0
0
0
0
0
0
0
0
0
0.085714
70
4
38
17.5
0.875
0.114286
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
264dd5d9d335c37cafcb2953872eb55ce6d714ea
1,246
py
Python
01-basics/test_mask.py
ayaka14732/tpu-starter
c0108d13b97bf19129e55f646708b617cd5d5ec5
[ "CC0-1.0" ]
57
2022-03-29T06:43:20.000Z
2022-03-31T23:41:22.000Z
01-basics/test_mask.py
ayaka14732/tpu-starter
c0108d13b97bf19129e55f646708b617cd5d5ec5
[ "CC0-1.0" ]
1
2022-03-02T03:02:41.000Z
2022-03-30T12:17:36.000Z
01-basics/test_mask.py
ayaka14732/tpu-starter
c0108d13b97bf19129e55f646708b617cd5d5ec5
[ "CC0-1.0" ]
1
2022-03-29T16:06:06.000Z
2022-03-29T16:06:06.000Z
# `np.NINF` is a common trick if you want to 'zero out' something in the softmax function import jax.nn as nn import jax.numpy as np a = np.array([[[3.2, 1.4, 0.5, 2.3, 4.3], [7.5, 0.6, 5.9, 0.9, 7.0], [0.4, 0.9, 7.1, 7.0, 3.2], [6.4, 2.1, 0.7, 0.6, 2.8], [0.8, 0.6, 0.5, 7.5, 2.3]], [[3.2, 1.4, 0.5, 2.3, 4.3], [7.5, 0.6, 5.9, 0.9, 7.0], [0.4, 0.9, 7.1, 7.0, 3.2], [6.4, 2.1, 0.7, 0.6, 2.8], [0.8, 0.6, 0.5, 7.5, 2.3]]]) b = np.array([[1, 1, 1, 0, 0], [1, 1, 0, 0, 0]], dtype=np.bool_) mask = np.einsum('bi,bj->bij', b, b) print('mask:', mask) ''' This is equal to: mask = np.array([[[1, 1, 1, 0, 0], [1, 1, 1, 0, 0], [1, 1, 1, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]], [[1, 1, 0, 0, 0], [1, 1, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]]], dtype=np.bool_) ''' c = np.where(mask, a, np.NINF) print('c:', c) d = nn.softmax(c) print('d:', d) e = np.where(mask, d, 0.) print('e:', e) f = e.sum(-1) print('f:', f)
25.958333
89
0.34992
250
1,246
1.736
0.2
0.170507
0.193548
0.221198
0.451613
0.451613
0.400922
0.394009
0.382488
0.334101
0
0.216578
0.399679
1,246
47
90
26.510638
0.363636
0.069823
0
0.25
0
0
0.030184
0
0
0
0
0
0
1
0
false
0
0.083333
0
0.083333
0.208333
0
0
1
null
0
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
2683457346c0d2a0cc7c65e3946332dfd72e981d
178
py
Python
clusterapp/features/TimeParameters/TimeParameter.py
ealmuina/thesis
d436ae0c6f775c56b2072889ceafae1507291c74
[ "MIT" ]
1
2018-02-11T07:36:31.000Z
2018-02-11T07:36:31.000Z
clusterapp/features/TimeParameters/TimeParameter.py
ealmuina/thesis
d436ae0c6f775c56b2072889ceafae1507291c74
[ "MIT" ]
null
null
null
clusterapp/features/TimeParameters/TimeParameter.py
ealmuina/thesis
d436ae0c6f775c56b2072889ceafae1507291c74
[ "MIT" ]
null
null
null
class TimeParameter: name = 'TimeParameter' """docstring for TimeParameter""" def __init__(self): pass def measure(self, segment): return None
16.181818
37
0.617978
17
178
6.235294
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.286517
178
10
38
17.8
0.834646
0
0
0
0
0
0.089655
0
0
0
0
0
0
1
0.333333
false
0.166667
0
0.166667
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
5
26875d4fac39c2985ffd9daf48a04a24d97ffd91
206
py
Python
caspy/domain/command.py
altaurog/django-caspy
c4ec0d39ed94b74a68784878018d6a3ff5e2dba3
[ "BSD-3-Clause" ]
1
2017-01-30T23:37:27.000Z
2017-01-30T23:37:27.000Z
caspy/domain/command.py
altaurog/django-caspy
c4ec0d39ed94b74a68784878018d6a3ff5e2dba3
[ "BSD-3-Clause" ]
null
null
null
caspy/domain/command.py
altaurog/django-caspy
c4ec0d39ed94b74a68784878018d6a3ff5e2dba3
[ "BSD-3-Clause" ]
null
null
null
def prepare_book(book, now): created_at = book.created_at or now return book.copy(created_at=created_at) def sort_transactions(transactions): return sorted(transactions, key=lambda t: t.date)
25.75
53
0.757282
31
206
4.83871
0.516129
0.24
0
0
0
0
0
0
0
0
0
0
0.150485
206
7
54
29.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.8
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
cd04efbef08c88a0e4da49ffeee8a38ebaefac7f
145
py
Python
bot/__init__.py
chrisvaughn/tetrisAI
8eedae9e7030d1adf5d46fad894e78ee41ad3a2c
[ "MIT" ]
null
null
null
bot/__init__.py
chrisvaughn/tetrisAI
8eedae9e7030d1adf5d46fad894e78ee41ad3a2c
[ "MIT" ]
null
null
null
bot/__init__.py
chrisvaughn/tetrisAI
8eedae9e7030d1adf5d46fad894e78ee41ad3a2c
[ "MIT" ]
null
null
null
from .detect import Detectorist from .evaluate import Evaluator, Weights from .evaluation_pool import get_pool from .evolution import GA, Genome
29
40
0.834483
20
145
5.95
0.65
0
0
0
0
0
0
0
0
0
0
0
0.124138
145
4
41
36.25
0.937008
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
cd501c7dabe08cc63e4103de926ac83d52fd504d
159
py
Python
manage_it/organizations/admin.py
ShangShungInstitute/django-manage-it
13cb23b57ce3577db7f69250741bcbfe82b69a57
[ "MIT", "Unlicense" ]
1
2015-01-20T14:34:32.000Z
2015-01-20T14:34:32.000Z
manage_it/organizations/admin.py
ShangShungInstitute/django-manage-it
13cb23b57ce3577db7f69250741bcbfe82b69a57
[ "MIT", "Unlicense" ]
null
null
null
manage_it/organizations/admin.py
ShangShungInstitute/django-manage-it
13cb23b57ce3577db7f69250741bcbfe82b69a57
[ "MIT", "Unlicense" ]
null
null
null
from django.contrib import admin from models import Organization, OrganizationGroup admin.site.register(Organization) admin.site.register(OrganizationGroup)
22.714286
50
0.855346
18
159
7.555556
0.555556
0.132353
0.25
0
0
0
0
0
0
0
0
0
0.081761
159
6
51
26.5
0.931507
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
cd506715ee4671801e167aa3336f16b268ea6906
247
py
Python
aaaaaa/hello-world.py
alexgoal/Python
577dd3580450764ae829f664e3ba1ac7aa19eb77
[ "MIT" ]
null
null
null
aaaaaa/hello-world.py
alexgoal/Python
577dd3580450764ae829f664e3ba1ac7aa19eb77
[ "MIT" ]
null
null
null
aaaaaa/hello-world.py
alexgoal/Python
577dd3580450764ae829f664e3ba1ac7aa19eb77
[ "MIT" ]
null
null
null
import keyword keyword.kwlist print("hello world") print("世界,你好") print(__name__) if False: print("True") else: print("False") # 第一个注释 ''' 这是多行注释,使用单引号。 这是多行注释,使用单引号。 这是多行注释,使用单引号。 ''' """ 这是多行注释,使用双引号。 这是多行注释,使用双引号。 这是多行注释,使用双引号。 """
9.88
20
0.663968
32
247
5
0.53125
0.20625
0.31875
0.275
0.24375
0
0
0
0
0
0
0
0.145749
247
24
21
10.291667
0.758294
0.020243
0
0
0
0
0.178571
0
0
0
0
0
0
1
0
true
0
0.111111
0
0.111111
0.555556
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
cd8aee0c6d5d09c3fcf51bb14c912c037187de5d
143
py
Python
uwsgiconf/contrib/django/__init__.py
graceshaw/uwsgiconf
205289bb279dfbcc1d9bfd599dd8ca5d6c527077
[ "BSD-3-Clause" ]
77
2017-07-15T21:14:24.000Z
2021-09-02T13:35:44.000Z
uwsgiconf/contrib/django/__init__.py
graceshaw/uwsgiconf
205289bb279dfbcc1d9bfd599dd8ca5d6c527077
[ "BSD-3-Clause" ]
5
2017-12-01T05:41:02.000Z
2022-03-23T07:46:19.000Z
uwsgiconf/contrib/django/__init__.py
graceshaw/uwsgiconf
205289bb279dfbcc1d9bfd599dd8ca5d6c527077
[ "BSD-3-Clause" ]
1
2021-05-20T01:33:04.000Z
2021-05-20T01:33:04.000Z
import sys from os import path # To support 'uwsgiconf.contrib.django.uwsgify' in INSTALLED_APPS: sys.path.insert(0, path.dirname(__file__))
20.428571
66
0.783217
22
143
4.863636
0.818182
0
0
0
0
0
0
0
0
0
0
0.007874
0.111888
143
6
67
23.833333
0.834646
0.447552
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
26af2944fe9168fe7e7f30f826e403c143edaa47
62
py
Python
yeetrigrain.py
uccimichael/Yeetbix
dd2e5c7f6986ea6004dd58ad16a1fae6a5042c87
[ "MIT" ]
null
null
null
yeetrigrain.py
uccimichael/Yeetbix
dd2e5c7f6986ea6004dd58ad16a1fae6a5042c87
[ "MIT" ]
null
null
null
yeetrigrain.py
uccimichael/Yeetbix
dd2e5c7f6986ea6004dd58ad16a1fae6a5042c87
[ "MIT" ]
null
null
null
from problem_solver import solve_problem solve_problem(life)
15.5
40
0.870968
9
62
5.666667
0.666667
0.470588
0
0
0
0
0
0
0
0
0
0
0.096774
62
3
41
20.666667
0.910714
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
26d38df54a1adc16ab51a581ab0aa1b35e6c3e5d
40
py
Python
python/ql/test/library-tests/stmts/raise_stmt/test.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
4,036
2020-04-29T00:09:57.000Z
2022-03-31T14:16:38.000Z
python/ql/test/library-tests/stmts/raise_stmt/test.py
vadi2/codeql
a806a4f08696d241ab295a286999251b56a6860c
[ "MIT" ]
2,970
2020-04-28T17:24:18.000Z
2022-03-31T22:40:46.000Z
python/ql/test/library-tests/stmts/raise_stmt/test.py
ScriptBox99/github-codeql
2ecf0d3264db8fb4904b2056964da469372a235c
[ "MIT" ]
794
2020-04-29T00:28:25.000Z
2022-03-30T08:21:46.000Z
def f(): raise raise Exception
8
19
0.575
5
40
4.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.35
40
4
20
10
0.884615
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
true
0
0
0
0.333333
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
1
1
0
0
0
0
0
0
5
26d87976701c505f1058870831e1ec9be329cfce
61
py
Python
utils/__init__.py
chenwenxiao/DOI
14bdedd0b1b886efe77737cfb62695f03ee17c58
[ "MIT" ]
1
2021-08-13T22:14:10.000Z
2021-08-13T22:14:10.000Z
utils/__init__.py
chenwenxiao/DOI
14bdedd0b1b886efe77737cfb62695f03ee17c58
[ "MIT" ]
null
null
null
utils/__init__.py
chenwenxiao/DOI
14bdedd0b1b886efe77737cfb62695f03ee17c58
[ "MIT" ]
null
null
null
from . import cli, data, viz, evaluation from .misc import *
20.333333
40
0.721311
9
61
4.888889
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.180328
61
2
41
30.5
0.88
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