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
b1617ec423d380ef6d39ecb844f07e529d1e900e
281
py
Python
test/test_resources/python-unittest/py_several_files2/Root/test/test1.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
1
2019-01-12T02:57:53.000Z
2019-01-12T02:57:53.000Z
test/test_resources/python-unittest/py_several_files2/Root/test/test1.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
1
2017-10-13T11:57:41.000Z
2017-10-13T11:57:41.000Z
test/test_resources/python-unittest/py_several_files2/Root/test/test1.py
jocelyn/codeboard_mantra
05a4c783dbae8d87b55c834382d8d12f957ffea9
[ "MIT" ]
6
2017-10-13T11:27:58.000Z
2020-10-06T19:06:22.000Z
from Root import b import unittest class test1(unittest.TestCase): def test_shuffle(self): self.assertEqual(b.add(1,2),3) def test_add(self): self.assertEqual(b.add(4,2),6) def test_addFail(self): self.assertEqual(b.add(1,2),4) if __name__ == '__main__': unittest.main()
23.416667
32
0.725979
48
281
4.020833
0.479167
0.108808
0.295337
0.310881
0.378238
0.259067
0.259067
0
0
0
0
0.040161
0.113879
281
11
33
25.545455
0.73494
0
0
0
0
0
0.02847
0
0
0
0
0
0.272727
1
0.272727
false
0
0.181818
0
0.545455
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
b167f223733c1d3f888e92631f85bada5ba538f4
31
py
Python
autokey/CapsCtrl/caps_j.py
TeX2e/dotfiles
4e39b59623067fcb09ceaa7f4892ff7a2b285374
[ "WTFPL" ]
1
2017-04-17T16:24:23.000Z
2017-04-17T16:24:23.000Z
autokey/CapsCtrl/caps_j.py
TeX2e/dotfiles
4e39b59623067fcb09ceaa7f4892ff7a2b285374
[ "WTFPL" ]
null
null
null
autokey/CapsCtrl/caps_j.py
TeX2e/dotfiles
4e39b59623067fcb09ceaa7f4892ff7a2b285374
[ "WTFPL" ]
1
2021-02-23T07:51:32.000Z
2021-02-23T07:51:32.000Z
keyboard.send_keys("<ctrl>+j")
15.5
30
0.709677
5
31
4.2
1
0
0
0
0
0
0
0
0
0
0
0
0.032258
31
1
31
31
0.7
0
0
0
0
0
0.258065
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b16ab7d571cab76e9c524767f042bc73f2b4d7bb
83
py
Python
editor/platforms/windows.py
Commander07/Magnitude
2b793d0d9946f6b35c5935ae5921592e287bbbe7
[ "MIT" ]
6
2020-12-06T20:21:39.000Z
2021-06-29T06:37:40.000Z
editor/platforms/windows.py
Commander07/Magnitude
2b793d0d9946f6b35c5935ae5921592e287bbbe7
[ "MIT" ]
null
null
null
editor/platforms/windows.py
Commander07/Magnitude
2b793d0d9946f6b35c5935ae5921592e287bbbe7
[ "MIT" ]
null
null
null
## Windows specific functions. If a function exists here it must exist in linux.py
41.5
82
0.783133
14
83
4.642857
1
0
0
0
0
0
0
0
0
0
0
0
0.168675
83
1
83
83
0.942029
0.951807
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b1746ab01205c09873f11ebd2450332cf6fbd19f
267
py
Python
sniper/tools/viz/asohelper.py
kleberkruger/donuts
99a7c5885fcb6d252a47a4cb74ca714f8ba12ca6
[ "MIT" ]
2
2015-08-04T04:07:17.000Z
2015-08-06T00:51:33.000Z
sniper/tools/viz/asohelper.py
kleberkruger/donuts
99a7c5885fcb6d252a47a4cb74ca714f8ba12ca6
[ "MIT" ]
null
null
null
sniper/tools/viz/asohelper.py
kleberkruger/donuts
99a7c5885fcb6d252a47a4cb74ca714f8ba12ca6
[ "MIT" ]
1
2021-10-04T13:53:51.000Z
2021-10-04T13:53:51.000Z
def get_fp_addsub(f): return f["addpd"] + f["addsd"] + f["addss"] + f["addps"] + f["subpd"] + f["subsd"] + f["subss"] + f["subps"] def get_fp_muldiv(f): return f["mulpd"] + f["mulsd"] + f["mulss"] + f["mulps"] + f["divpd"] + f["divsd"] + f["divss"] + f["divps"]
44.5
110
0.531835
44
267
3.136364
0.522727
0.086957
0.115942
0
0
0
0
0
0
0
0
0
0.153558
267
5
111
53.4
0.610619
0
0
0
0
0
0.299625
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
b192605b525578d6c9fe07cb2aed9dd6e6fe98f3
299
py
Python
xv_leak_tools/test_device/router_device.py
RDTCREW/expressvpn_leak_testing
da710573ccbe6472c4e4588058d9ec887e61e0a9
[ "MIT" ]
null
null
null
xv_leak_tools/test_device/router_device.py
RDTCREW/expressvpn_leak_testing
da710573ccbe6472c4e4588058d9ec887e61e0a9
[ "MIT" ]
null
null
null
xv_leak_tools/test_device/router_device.py
RDTCREW/expressvpn_leak_testing
da710573ccbe6472c4e4588058d9ec887e61e0a9
[ "MIT" ]
null
null
null
from xv_leak_tools.log import L from xv_leak_tools.test_device.device import Device class RouterDevice(Device): def os_name(self): # TODO: Make this dynamic return 'linux' def os_version(self): L.warning("TODO: Linux version") return 'TODO: Linux version'
23
51
0.67893
42
299
4.666667
0.547619
0.061224
0.102041
0.153061
0
0
0
0
0
0
0
0
0.237458
299
12
52
24.916667
0.859649
0.076923
0
0
0
0
0.156934
0
0
0
0
0.083333
0
1
0.25
false
0
0.25
0.125
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
b19889665f0ee81a193bc0063390a65e19a1320c
59
py
Python
wiremock/tests/resource_tests/scenarios_tests/serialization_tests.py
sp1rs/python-wiremock
b570b0ebc60ac0d873812f21f78f2a8a4353792f
[ "Apache-2.0" ]
22
2017-07-01T14:44:04.000Z
2021-09-08T08:45:21.000Z
wiremock/tests/resource_tests/scenarios_tests/serialization_tests.py
sp1rs/python-wiremock
b570b0ebc60ac0d873812f21f78f2a8a4353792f
[ "Apache-2.0" ]
37
2017-04-24T15:28:27.000Z
2021-09-20T08:58:26.000Z
wiremock/tests/resource_tests/scenarios_tests/serialization_tests.py
sp1rs/python-wiremock
b570b0ebc60ac0d873812f21f78f2a8a4353792f
[ "Apache-2.0" ]
22
2017-04-24T14:58:06.000Z
2021-09-09T09:22:31.000Z
# Purposefully left blank as there are no specific models.
29.5
58
0.79661
9
59
5.222222
1
0
0
0
0
0
0
0
0
0
0
0
0.169492
59
1
59
59
0.959184
0.949153
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
4951f4dd0bb9dd7897a5719b630e1ba4c44100e2
2,168
py
Python
Lib/site-packages/mysqlx/dbdoc.py
jmsnur/mytaxi-test
eb7f70d0ac1c4df32aaebaab118a25c83683ce13
[ "bzip2-1.0.6" ]
7
2022-03-10T07:03:14.000Z
2022-03-24T09:42:46.000Z
Lib/site-packages/mysqlx/dbdoc.py
jmsnur/mytaxi-test
eb7f70d0ac1c4df32aaebaab118a25c83683ce13
[ "bzip2-1.0.6" ]
7
2019-12-04T22:51:59.000Z
2022-02-10T08:28:35.000Z
Lib/site-packages/mysqlx/dbdoc.py
jmsnur/mytaxi-test
eb7f70d0ac1c4df32aaebaab118a25c83683ce13
[ "bzip2-1.0.6" ]
3
2020-07-22T23:41:29.000Z
2020-09-02T16:40:32.000Z
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptions to the terms and # conditions of the GPLv2 as it is applied to this software, see the # FOSS License Exception # <http://www.mysql.com/about/legal/licensing/foss-exception.html>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA """Implementation of the DbDoc.""" import json import uuid from .compat import STRING_TYPES class DbDoc(object): """Represents a generic document in JSON format. Args: value (object): The value can be a JSON string or a dict. Raises: ValueError: If ``value`` type is not a basestring or dict. """ def __init__(self, value): # TODO: Handle exceptions. What happens if it doesn't load properly? if isinstance(value, dict): self.__dict__ = value elif isinstance(value, STRING_TYPES): self.__dict__ = json.loads(value) else: raise ValueError("Unable to handle type: {0}".format(type(value))) def __getitem__(self, index): return self.__dict__[index] def keys(self): return self.__dict__.keys() def ensure_id(self): if "_id" not in self.__dict__: self.__dict__["_id"] = uuid.uuid4().hex return self.__dict__["_id"] def __str__(self): return json.dumps(self.__dict__)
34.412698
78
0.697417
314
2,168
4.656051
0.496815
0.043776
0.026676
0.038988
0.077291
0.038304
0
0
0
0
0
0.012353
0.215867
2,168
62
79
34.967742
0.847647
0.62869
0
0
0
0
0.046543
0
0
0
0
0.016129
0
1
0.238095
false
0
0.142857
0.142857
0.619048
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
499173929547adad9f80fb5bb89afaef0c631b1d
237
py
Python
venv/Lib/site-packages/bootstrap3/templates/bootstrap3/form_errors.html.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
venv/Lib/site-packages/bootstrap3/templates/bootstrap3/form_errors.html.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
venv/Lib/site-packages/bootstrap3/templates/bootstrap3/form_errors.html.py
roshanba/mangal
f7b428811dc07214009cc33f0beb665ead402038
[ "bzip2-1.0.6", "MIT" ]
null
null
null
XXXX XXXXXXXXXXXX XXXXXXXXXXXX XXXXXXXXXXXXXXXXX XXXXXXXXXXXX XXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX BBB BBBBB BB BBBBBB BB BBB BBBBBBBBBBBBXXXXBBBBB BBBBBB XXXXXX
33.857143
95
0.835443
19
237
10.421053
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.164557
237
6
96
39.5
1
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
4
49a27d8df1fa80afe142635c112bacef76b19c83
46
py
Python
venv/lib/python3.6/encodings/unicode_escape.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2019-04-17T13:35:50.000Z
2021-12-21T00:11:36.000Z
venv/lib/python3.6/encodings/unicode_escape.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2021-03-31T19:51:24.000Z
2021-06-10T23:05:09.000Z
venv/lib/python3.6/encodings/unicode_escape.py
JamesMusyoka/Blog
fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5
[ "Unlicense" ]
2
2019-10-01T08:47:35.000Z
2020-07-11T06:32:16.000Z
/usr/lib/python3.6/encodings/unicode_escape.py
46
46
0.847826
8
46
4.75
1
0
0
0
0
0
0
0
0
0
0
0.043478
0
46
1
46
46
0.782609
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
b8f2861ad65e733005d740bd1e4ef27fa1421324
300
py
Python
text_embeddings/byte/__init__.py
ChenghaoMou/embeddings
e63c2f2f4a688302de37bb8ccfd37a0170e2c374
[ "MIT" ]
12
2021-04-18T02:32:55.000Z
2021-12-19T13:49:23.000Z
text_embeddings/byte/__init__.py
ChenghaoMou/embeddings
e63c2f2f4a688302de37bb8ccfd37a0170e2c374
[ "MIT" ]
1
2021-07-04T09:06:34.000Z
2021-07-25T03:45:43.000Z
text_embeddings/byte/__init__.py
ChenghaoMou/embeddings
e63c2f2f4a688302de37bb8ccfd37a0170e2c374
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Date : 2021-07-18 14:36:09 # @Author : Chenghao Mou (mouchenghao@gmail.com) from text_embeddings.byte.byt5 import ByT5Tokenizer from text_embeddings.byte.charformer import ByteTokenizer, GBST __all__ = ['ByT5Tokenizer', 'GBST', 'ByteTokenizer']
30
63
0.726667
39
300
5.435897
0.794872
0.075472
0.169811
0.207547
0
0
0
0
0
0
0
0.068702
0.126667
300
9
64
33.333333
0.740458
0.403333
0
0
0
0
0.171429
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b8f97ce9a4d92ac7394a34ba9d8586d3c1b540e4
22
py
Python
alerta/version.py
panpann/alerta
95961df969aa803d3c08c5839178f034b5f87ebb
[ "Apache-2.0" ]
null
null
null
alerta/version.py
panpann/alerta
95961df969aa803d3c08c5839178f034b5f87ebb
[ "Apache-2.0" ]
null
null
null
alerta/version.py
panpann/alerta
95961df969aa803d3c08c5839178f034b5f87ebb
[ "Apache-2.0" ]
null
null
null
__version__ = '8.4.1'
11
21
0.636364
4
22
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.136364
22
1
22
22
0.368421
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b8fdd828a5b8c58e572fae07ebdd31154aa63e69
38
py
Python
models/ACT/__init__.py
for-ai/ACT
efe259117a11d0583434d09440702fd75ebcdb99
[ "MIT" ]
18
2018-09-30T13:30:12.000Z
2021-04-14T15:18:51.000Z
models/ACT/__init__.py
for-ai/ACT
efe259117a11d0583434d09440702fd75ebcdb99
[ "MIT" ]
4
2020-01-28T21:59:56.000Z
2021-08-25T14:42:58.000Z
models/ACT/__init__.py
for-ai/ACT
efe259117a11d0583434d09440702fd75ebcdb99
[ "MIT" ]
4
2018-11-25T14:12:36.000Z
2019-12-02T03:07:02.000Z
__all__ = ["act"] from .act import *
9.5
18
0.605263
5
38
3.8
0.8
0
0
0
0
0
0
0
0
0
0
0
0.210526
38
3
19
12.666667
0.633333
0
0
0
0
0
0.078947
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
4
7712bea8a5466c59e23f22f1997b489414053997
550
py
Python
app/main/models/pedido.py
amandapersampa/Franguinho
940b6601a821ab4857de7f0a5a0ac53f6f54a564
[ "MIT" ]
null
null
null
app/main/models/pedido.py
amandapersampa/Franguinho
940b6601a821ab4857de7f0a5a0ac53f6f54a564
[ "MIT" ]
8
2017-03-14T11:55:07.000Z
2017-04-03T00:53:32.000Z
app/main/models/pedido.py
amandapersampa/MicroGerencia
940b6601a821ab4857de7f0a5a0ac53f6f54a564
[ "MIT" ]
null
null
null
# coding=utf-8 from app import db from sqlalchemy.orm import relationship class pedido_dao: __tablename__ = "pedido" # id_pedido = db.Column(db.Integer, primary_key=True) # nome = db.Column(db.String) # valor = db.Column(db.Float) # qtd_ingrediente = db.Column(db.Integer) # qtd_item_extra = db.Column(db.Integer) # tipo_item = db.Column(db.String) # item_extra = db.Column(db.String) # id_produto = db.Column(db.Integer, db.ForeignKey('produto.id_produto')) # produto = relationship("Produto_dao", back_populates="")
34.375
76
0.707273
78
550
4.782051
0.423077
0.171582
0.214477
0.182306
0.101877
0
0
0
0
0
0
0.002155
0.156364
550
16
77
34.375
0.801724
0.767273
0
0
0
0
0.050847
0
0
0
0
0
0
1
0
false
0
0.5
0
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
0
0
0
1
0
1
0
0
4
7720594be1fbbd83a062b7329a8a5ccdccc54065
109
py
Python
social_oauth_token/apps.py
khasbilegt/django-social-auth-token
2562c12b2747207557bda9e0fff39b15bbb22537
[ "MIT" ]
null
null
null
social_oauth_token/apps.py
khasbilegt/django-social-auth-token
2562c12b2747207557bda9e0fff39b15bbb22537
[ "MIT" ]
null
null
null
social_oauth_token/apps.py
khasbilegt/django-social-auth-token
2562c12b2747207557bda9e0fff39b15bbb22537
[ "MIT" ]
1
2021-11-08T07:09:45.000Z
2021-11-08T07:09:45.000Z
from django.apps import AppConfig class SocialOauthTokenConfig(AppConfig): name = "social_oauth_token"
18.166667
40
0.798165
12
109
7.083333
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.137615
109
5
41
21.8
0.904255
0
0
0
0
0
0.165138
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
772cfe056716b53af0adc4c83c16484233dec372
167
py
Python
rlsuite/envs/gridworld/__init__.py
christopher-wolff/lab
3e26beb30bfb88fef79558a8c1584ddb6c1843e9
[ "MIT" ]
2
2019-03-28T16:47:50.000Z
2019-04-08T04:50:50.000Z
rlsuite/envs/gridworld/__init__.py
christopher-wolff/rlsuite
3e26beb30bfb88fef79558a8c1584ddb6c1843e9
[ "MIT" ]
null
null
null
rlsuite/envs/gridworld/__init__.py
christopher-wolff/rlsuite
3e26beb30bfb88fef79558a8c1584ddb6c1843e9
[ "MIT" ]
null
null
null
from gym.envs.registration import register register( id='GridWorld-v0', entry_point='rlsuite.envs.gridworld.gridworld:GridWorld', max_episode_steps=50, )
20.875
61
0.754491
21
167
5.857143
0.761905
0.292683
0
0
0
0
0
0
0
0
0
0.02069
0.131737
167
7
62
23.857143
0.827586
0
0
0
0
0
0.323353
0.251497
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
773cd0599249be90c24256de7dfd60ee4a466e7b
86
py
Python
test/first.py
zyj2614187/CANGKU01
9718e7fd8e5882914a69e1181dae07a9257d13dc
[ "MIT" ]
null
null
null
test/first.py
zyj2614187/CANGKU01
9718e7fd8e5882914a69e1181dae07a9257d13dc
[ "MIT" ]
null
null
null
test/first.py
zyj2614187/CANGKU01
9718e7fd8e5882914a69e1181dae07a9257d13dc
[ "MIT" ]
null
null
null
a = 1 b = 2 c = a+b print(c) d= 5 e = 6 f = 7 k = 6 h = 50 j =522022 l= 5050 你是猪
4.777778
9
0.453488
24
86
1.625
0.833333
0
0
0
0
0
0
0
0
0
0
0.346154
0.395349
86
17
10
5.058824
0.403846
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.083333
1
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
774b737ce0ea4ccd49cf8c0f34d0766cc8c27e5c
76
py
Python
plotly/graph_objs/layout/polar/angularaxis/__init__.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/graph_objs/layout/polar/angularaxis/__init__.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/graph_objs/layout/polar/angularaxis/__init__.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
from ._tickformatstop import Tickformatstop from ._tickfont import Tickfont
25.333333
43
0.868421
8
76
8
0.5
0
0
0
0
0
0
0
0
0
0
0
0.105263
76
2
44
38
0.941176
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
620f0621fbc1841939002f3e397639cd6abdebdb
3,482
py
Python
al/experiments/object_detection.py
kili-technology/active-learning
72dce7d91b988264dd7fa1a972d9af45e9648c4c
[ "Apache-2.0" ]
3
2020-09-11T07:30:54.000Z
2021-04-17T07:45:05.000Z
al/experiments/object_detection.py
kili-technology/active-learning
72dce7d91b988264dd7fa1a972d9af45e9648c4c
[ "Apache-2.0" ]
null
null
null
al/experiments/object_detection.py
kili-technology/active-learning
72dce7d91b988264dd7fa1a972d9af45e9648c4c
[ "Apache-2.0" ]
null
null
null
import os import numpy as np from ..model.model_zoo import * from ..model.ssd import SSDLearner from ..dataset.pascal_voc import PascalVOCObjectDataset from ..dataset.coco import COCOObjectDataset from ..model.configs import cfg def set_up_pascalvoc_detection(config, output_dir, logger, device=0, queries_name='queries.txt'): logger.info('Setting up datasets...') backbone = config['model']['backbone'] model, cfg = get_model_config(backbone, 'voc') init_size = config['active_learning']['init_size'] index_train = np.arange(config['dataset']['train_size']) index_test = np.arange(config['dataset']['test_size']) logger_name = config['experiment']['logger_name'] dataset = PascalVOCObjectDataset( index_train, n_init=init_size, output_dir=output_dir, cfg=cfg, queries_name=queries_name) test_dataset = PascalVOCObjectDataset( index_test, n_init=init_size, output_dir=output_dir, cfg=cfg, train=False, queries_name=queries_name) dataset.set_validation_dataset(test_dataset.dataset) logger.info(f'Dataset initial train size : {len(dataset.init_dataset)}') logger.info(f'Dataset used train size : {len(dataset.dataset)}') logger.info(f'Dataset initial test size : {len(test_dataset.init_dataset)}') logger.info(f'Dataset test size : {len(test_dataset.dataset)}') logger.info('Setting up models...') learner = SSDLearner(model=model, cfg=cfg, logger_name=logger_name, device=device, dataset='voc') return dataset, learner def set_up_coco_object_detection(config, output_dir, logger, device=0, queries_name='queries.txt'): logger.info('Setting up datasets...') backbone = config['model']['backbone'] model, cfg = get_model_config(backbone, 'coco') init_size = config['active_learning']['init_size'] index_train = np.arange(config['dataset']['train_size']) index_test = np.arange(config['dataset']['test_size']) logger_name = config['experiment']['logger_name'] dataset = COCOObjectDataset( index_train, n_init=init_size, output_dir=output_dir, cfg=cfg, queries_name=queries_name) test_dataset = COCOObjectDataset( index_test, n_init=init_size, output_dir=output_dir, cfg=cfg, train=False, queries_name=queries_name) logger.info(f'Dataset initial train size : {len(dataset.init_dataset)}') logger.info(f'Dataset used train size : {len(dataset.dataset)}') logger.info(f'Dataset initial test size : {len(test_dataset.init_dataset)}') logger.info(f'Dataset test size : {len(test_dataset.dataset)}') dataset.set_validation_dataset(test_dataset.dataset) logger.info('Setting up models...') learner = SSDLearner(model=model, cfg=cfg, logger_name=logger_name, device=device, dataset='coco') return dataset, learner def get_model_config(backbone, dataset): config_path = os.getenv('MODULE_PATH') if dataset == 'voc': if backbone == 'mobilenet_v2': config_file = 'mobilenet_v2_ssd320_voc0712.yaml' elif backbone == 'vgg': config_file = 'vgg_ssd300_voc0712.yaml' elif dataset == 'coco': if backbone == 'vgg': config_file = 'vgg_ssd300_coco_trainval35k.yaml' elif backbone == 'mobilenet_v2': config_file = 'mobilenet_v2_ssd320_coco.yaml' path = os.path.expanduser(os.path.join(config_path, config_file)) cfg.merge_from_file(path) model = SSDDetector(cfg, backbone) cfg.freeze() return model, cfg
41.951807
109
0.716255
459
3,482
5.198257
0.165577
0.050293
0.064124
0.060352
0.740151
0.740151
0.715004
0.715004
0.676446
0.64627
0
0.009547
0.157668
3,482
83
110
41.951807
0.803955
0
0
0.46875
0
0
0.254953
0.09532
0
0
0
0
0
1
0.046875
false
0
0.109375
0
0.203125
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
621ab5790701b88e269ef5a4c9b8c64356f52746
72
py
Python
__init__.py
5x/cryptography-gui-app
a65539cc59276da831cc9f401c77b19de2fe18ea
[ "MIT" ]
1
2021-08-03T09:50:02.000Z
2021-08-03T09:50:02.000Z
__init__.py
5x/cryptography-gui-app
a65539cc59276da831cc9f401c77b19de2fe18ea
[ "MIT" ]
null
null
null
__init__.py
5x/cryptography-gui-app
a65539cc59276da831cc9f401c77b19de2fe18ea
[ "MIT" ]
null
null
null
#!/usr/bin/python3,4 # -*- coding: utf-8 -*- """cryptography-gui-app"""
18
26
0.583333
10
72
4.2
1
0
0
0
0
0
0
0
0
0
0
0.046154
0.097222
72
3
27
24
0.6
0.861111
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
623cda82dc78bcb7c0c0435e69a56d92bf23248b
124
py
Python
setup.py
goude/thxtime
ecc41913624c1e3836ab4f2fcfeb23c377450061
[ "MIT" ]
null
null
null
setup.py
goude/thxtime
ecc41913624c1e3836ab4f2fcfeb23c377450061
[ "MIT" ]
null
null
null
setup.py
goude/thxtime
ecc41913624c1e3836ab4f2fcfeb23c377450061
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name="thxtime", version="2.0.0", packages=find_packages(), )
17.714286
43
0.685484
16
124
5.1875
0.6875
0.289157
0
0
0
0
0
0
0
0
0
0.029412
0.177419
124
6
44
20.666667
0.784314
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
62410e0fbb6abd0a88275e5da44046fea2fed835
123
py
Python
Socket/Socket/udp/udp_client.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
Socket/Socket/udp/udp_client.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
Socket/Socket/udp/udp_client.py
RolandBalabekyan1994/socket-socketserver
94ca247d1aa0e84b970d49b7e974e67932440b11
[ "MIT" ]
null
null
null
import socket sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.sendto(b'Test message', ('localhost', 8888))
30.75
56
0.747967
18
123
5
0.666667
0.222222
0
0
0
0
0
0
0
0
0
0.036364
0.105691
123
4
57
30.75
0.781818
0
0
0
0
0
0.173554
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
6256e27a027c2617019ef8c7c0b4d00633bfd944
112
py
Python
20180616/templating_01.py
bijitchakraborty12/MyProjects01
503af4cd6e8fa0576add7ac64393f1b4a16456c7
[ "MIT" ]
null
null
null
20180616/templating_01.py
bijitchakraborty12/MyProjects01
503af4cd6e8fa0576add7ac64393f1b4a16456c7
[ "MIT" ]
null
null
null
20180616/templating_01.py
bijitchakraborty12/MyProjects01
503af4cd6e8fa0576add7ac64393f1b4a16456c7
[ "MIT" ]
null
null
null
sentence='I am interested in {num}' pi=3.14 print(sentence.format(num=pi)) e=2.712 print(sentence.format(num=e))
22.4
35
0.741071
22
112
3.772727
0.636364
0.120482
0.457831
0.53012
0
0
0
0
0
0
0
0.067308
0.071429
112
5
36
22.4
0.730769
0
0
0
0
0
0.212389
0
0
0
0
0
0
1
0
false
0
0
0
0
0.4
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
65504a54c18f87bed505d7919f810fcb92470f5c
93
py
Python
mvouchers/apps.py
silverline99/meal-voucher-app
baa629004c205732114f7b35ff4f93a2a461cbd1
[ "MIT" ]
null
null
null
mvouchers/apps.py
silverline99/meal-voucher-app
baa629004c205732114f7b35ff4f93a2a461cbd1
[ "MIT" ]
null
null
null
mvouchers/apps.py
silverline99/meal-voucher-app
baa629004c205732114f7b35ff4f93a2a461cbd1
[ "MIT" ]
null
null
null
from django.apps import AppConfig class MvouchersConfig(AppConfig): name = 'mvouchers'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6554c4524c237637492692e8b047f3d227565fe2
96
py
Python
quickcert.py
dedickinson/hub-util-tls
cff25cf45455f97c5654110b7b4ad903380b9d0e
[ "BSD-2-Clause" ]
null
null
null
quickcert.py
dedickinson/hub-util-tls
cff25cf45455f97c5654110b7b4ad903380b9d0e
[ "BSD-2-Clause" ]
4
2020-03-24T16:58:15.000Z
2021-06-01T23:28:02.000Z
quickcert.py
dedickinson/hub-util-tls
cff25cf45455f97c5654110b7b4ad903380b9d0e
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # PYTHON_ARGCOMPLETE_OK import quickcert quickcert.QuickCertCli().run()
16
30
0.791667
12
96
6.166667
0.916667
0
0
0
0
0
0
0
0
0
0
0.011364
0.083333
96
6
30
16
0.829545
0.447917
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
65578b35b3e8467e311e7c6e421a770a28a92ea0
88
py
Python
dialog/apps.py
asmadotgh/neural_chat_web
1ef29cae7349ad945180adbd0a6d005087fe1365
[ "MIT" ]
26
2019-06-26T06:15:35.000Z
2022-01-24T16:06:21.000Z
dialog/apps.py
asmadotgh/neural_chat_web
1ef29cae7349ad945180adbd0a6d005087fe1365
[ "MIT" ]
2
2020-02-12T00:40:46.000Z
2021-06-10T21:36:22.000Z
dialog/apps.py
asmadotgh/neural_chat_web
1ef29cae7349ad945180adbd0a6d005087fe1365
[ "MIT" ]
2
2019-09-18T08:06:42.000Z
2019-09-19T18:14:54.000Z
from django.apps import AppConfig class DialogConfig(AppConfig): name = 'dialog'
12.571429
33
0.738636
10
88
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.181818
88
6
34
14.666667
0.902778
0
0
0
0
0
0.069767
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
657ae7301cc5259ff530c0acb108f3507a549fab
277
py
Python
string_apostraphe.py
CrazyJ36/python
4cff6e7240672a273d978521bb511065f45d4312
[ "MIT" ]
null
null
null
string_apostraphe.py
CrazyJ36/python
4cff6e7240672a273d978521bb511065f45d4312
[ "MIT" ]
null
null
null
string_apostraphe.py
CrazyJ36/python
4cff6e7240672a273d978521bb511065f45d4312
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Testing apostraphes' in single quotes # if I were to: print('he's done') # error: compiler thinks the statement # is ended at the apostraphe after 'he'. # In order to print apostraphes and other # characters like it, escape them: print('he\'s done')
27.7
41
0.722022
45
277
4.444444
0.777778
0.07
0.08
0.12
0
0
0
0
0
0
0
0.004348
0.169675
277
9
42
30.777778
0.865217
0.873646
0
0
0
0
0.107143
0
0
0
0
0
0
1
0
true
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
6580f66c87dc9a69012d50e7be434424964d3d52
54
py
Python
python/testData/completion/beforeImport/beforeImportAs.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/completion/beforeImport/beforeImportAs.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/completion/beforeImport/beforeImportAs.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
m<caret> from source import my_foo as my_renamed_foo
13.5
43
0.814815
11
54
3.727273
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.148148
54
3
44
18
0.891304
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.5
null
null
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
1
0
0
0
1
0
0
0
0
4
6594981e278002d85bb3afe0cdcda0bfc6660714
332
py
Python
raylab/utils/types.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
29
2020-05-05T13:25:33.000Z
2022-01-03T14:12:29.000Z
raylab/utils/types.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
215
2019-11-26T12:59:39.000Z
2022-02-01T12:38:31.000Z
raylab/utils/types.py
angelolovatto/raylab
ebaea8df1a391fb844e75df62ccf1e2e07311d88
[ "MIT" ]
7
2020-06-12T01:42:02.000Z
2021-05-27T03:40:42.000Z
"""Collection of type annotations.""" from typing import Callable, Dict, Tuple, Union from torch import Tensor DynamicsFn = Callable[[Tensor, Tensor], Tuple[Tensor, Tensor]] RewardFn = Callable[[Tensor, Tensor, Tensor], Tensor] StatDict = Dict[str, Union[float, int]] TerminationFn = Callable[[Tensor, Tensor, Tensor], Tensor]
25.538462
62
0.740964
40
332
6.15
0.5
0.390244
0.292683
0.211382
0.260163
0
0
0
0
0
0
0
0.129518
332
12
63
27.666667
0.851211
0.093373
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
659ae4eaf4c548a9ce8a6b81c0345c320f9bbce7
17,578
py
Python
tests/test_pipeline.py
scottmhamilton/phoenix_pipeline
a531696b83c5a3201b89df555e4e81d5a35a73b3
[ "MIT" ]
42
2015-01-06T18:32:44.000Z
2021-09-08T22:31:34.000Z
tests/test_pipeline.py
scottmhamilton/phoenix_pipeline
a531696b83c5a3201b89df555e4e81d5a35a73b3
[ "MIT" ]
24
2015-01-12T20:56:11.000Z
2017-05-01T14:55:00.000Z
tests/test_pipeline.py
scottmhamilton/phoenix_pipeline
a531696b83c5a3201b89df555e4e81d5a35a73b3
[ "MIT" ]
29
2015-01-06T18:44:51.000Z
2020-07-13T02:57:01.000Z
from bson.objectid import ObjectId import datetime from petrarch import petrarch from petrarch2 import petrarch2 formatted = [{u'language': u'english', u'title': u'6 killed in attacks in Iraqi capital Friday', u'url': u'http://www.menafn.com/1094827896/6-killed-in-attacks-in-Iraqi-capital-Friday?src=RSS', u'stanford': 1, u'content': u'BAGHDAD: At least six people, including a soldier, were killed in a spate of attacks across Iraqi capital Baghdad on Friday. A sniper opened fire on soldiers manning a checkpoint in southern Baghdad, killing a soldier and injuring three others, police officer Nader al-Janabi told Anadolu Agency. Two civilians were killed and six others injured in a bomb blast in al-Zafarana district in south-eastern Baghdad, he said. Three more civilians were killed and seven others injured in two bomb blasts in southern and northern Baghdad, according to al-Janabi. Iraqi officials often blame the attacks on the Daesh terrorist group, which overran vast swathes of territory in Iraq in 2014. ', u'source': u'menafn_iraq', u'parsed_sents': [u'(ROOT (S (NP (NNP BAGHDAD)) (: :) (NP (NP (QP (IN At) (JJS least) (CD six)) (NNS people)) (, ,) (PP (VBG including) (NP (DT a) (NN soldier))) (, ,)) (VP (VBD were) (VP (VBN killed) (PP (IN in) (NP (NP (DT a) (NN spate)) (PP (IN of) (NP (NNS attacks))))) (PP (IN across) (NP (JJ Iraqi) (NN capital) (NNP Baghdad))) (PP (IN on) (NP (NNP Friday))))) (. .)))', u'(ROOT (S (NP (DT A) (NN sniper)) (VP (VBD opened) (NP (NN fire)) (PP (IN on) (S (S (NP (NNS soldiers)) (VP (VBG manning) (NP (NP (DT a) (NN checkpoint)) (PP (IN in) (NP (JJ southern) (NNP Baghdad)))) (, ,) (S (VP (VP (VBG killing) (NP (DT a) (NN soldier))) (CC and) (VP (VBG injuring) (NP (CD three) (NNS others))))))) (, ,) (NP (NNS police) (NN officer) (NNP Nader) (NNP al-Janabi)) (VP (VBD told) (NP (NNP Anadolu) (NNP Agency))) (. .))))))', u'(ROOT (S (S (NP (CD Two) (NNS civilians)) (VP (VBD were) (VP (VP (VBN killed)) (CC and) (NP (NP (CD six) (NNS others)) (VP (VBN injured) (PP (IN in) (NP (NP (DT a) (NN bomb) (NN blast)) (PP (IN in) (NP (NP (NN al-Zafarana) (NN district)) (PP (IN in) (NP (JJ south-eastern) (NNP Baghdad)))))))))))) (, ,) (NP (PRP he)) (VP (VBD said)) (. .)))', u'(ROOT (S (NP (CD Three) (JJR more) (NNS civilians)) (VP (VBD were) (VP (VP (VBN killed)) (CC and) (NP (NP (CD seven) (NNS others)) (VP (VBN injured) (PP (IN in) (NP (NP (CD two) (NN bomb) (NNS blasts)) (PP (IN in) (NP (ADJP (JJ southern) (CC and) (JJ northern)) (NNP Baghdad))))))) (, ,) (PP (VBG according) (PP (TO to) (NP (NNP al-Janabi)))))) (. .)))', u'(ROOT (S (NP (JJ Iraqi) (NNS officials)) (ADVP (RB often)) (VP (VBP blame) (NP (NP (DT the) (NNS attacks)) (PP (IN on) (NP (NP (DT the) (NNP Daesh) (JJ terrorist) (NN group)) (, ,) (SBAR (WHNP (WDT which)) (S (VP (VBD overran) (NP (NP (JJ vast) (NNS swathes)) (PP (IN of) (NP (NP (NN territory)) (PP (IN in) (NP (NNP Iraq)))))) (PP (IN in) (NP (CD 2014)))))))))) (. .)))'], u'date': u'160626', u'date_added': datetime.datetime(2016, 6, 26, 19, 0, 17, 640000), u'_id': ObjectId('57702641172ab87eb7dc98fa')}, {u'language': u'english', u'title': u'Soldiers, Policemen Fight Over Rice', u'url': u'http://www.thetidenewsonline.com/2016/06/24/soldiers-policemen-fight-over-rice/', u'stanford': 1, u'content': u'There was chaos at the Borno State Government House in Maiduguri, yesterday, as soldiers and policemen engaged in gun battle over rice meant for internally displaced persons. The Government House is besieged daily by thousands of internally displaced persons within Maiduguri metropolis, who choose to stay outside of the designated camps. The IDPs, who queue for hours to receive rice and other relief items, often cause gridlock around the Government House with many of them having to go back empty handed each day. The situation, however, turned violent, yesterday afternoon when the soldiers that were deployed to maintain law and order tried to benefit from the largese. The soldiers were said to have tried to force their way into the Deputy Governor\u2019s office, the place designated for the distribution, to get their vehicles filled. An attempt by the mobile policemen attached to the office to prevent the soldiers from achieving their goal led to a shootout. It was gathered that the soldiers fired several warning shots and the mobile policemen shot back in return, while also firing canisters of tear gas. Lucky Irabor, to get the furious soldiers to withdraw from the battle, which caused panic across Maiduguri. It was gathered that Irabor, the most senior military officer around, and the Commissioner of Police, Aminchi Baraya, subsequently visited the injured policeman at the hospital.', u'source': u'nigeria_tidenews', u'parsed_sents': [u'(ROOT (S (NP (EX There)) (VP (VBD was) (NP (NP (NN chaos)) (PP (IN at) (NP (NP (DT the) (NNP Borno) (NNP State) (NNP Government) (NNP House)) (PP (IN in) (NP (NNP Maiduguri))))) (, ,) (NP (NN yesterday)) (, ,)) (PP (IN as) (NP (NP (NNS soldiers) (CC and) (NNS policemen)) (VP (VBN engaged) (PP (IN in) (NP (NP (NN gun) (NN battle)) (PP (IN over) (NP (NP (NN rice)) (VP (VBN meant) (PP (IN for) (NP (ADJP (RB internally) (JJ displaced)) (NNS persons)))))))))))) (. .)))', u'(ROOT (S (NP (DT The) (NNP Government) (NNP House)) (VP (VBZ is) (VP (VBN besieged) (ADVP (RB daily)) (PP (IN by) (NP (NP (NNS thousands)) (PP (IN of) (NP (NP (ADJP (RB internally) (JJ displaced)) (NNS persons)) (PP (IN within) (NP (NP (NNP Maiduguri) (NN metropolis)) (, ,) (SBAR (WHNP (WP who)) (S (VP (VBP choose) (S (VP (TO to) (VP (VB stay) (ADVP (IN outside) (PP (IN of) (NP (DT the) (VBN designated) (NNS camps)))))))))))))))))) (. .)))', u'(ROOT (NP (NP (NP (DT The) (NNS IDPs)) (, ,) (SBAR (WHNP (WP who)) (S (VP (VB queue) (SBAR (IN for) (S (NP (NNS hours)) (VP (TO to) (VP (VB receive) (NP (NP (NN rice) (CC and) (JJ other) (NN relief) (NNS items)) (, ,) (S (ADVP (RB often)) (VP (VBP cause) (NP (NN gridlock)) (PP (IN around) (S (NP (NP (DT the) (NNP Government) (NNP House)) (PP (IN with) (NP (NP (JJ many)) (PP (IN of) (NP (PRP them)))))) (VP (VBG having) (S (VP (TO to) (VP (VB go) (NP (ADJP (RB back) (JJ empty)) (NN handed)) (NP (DT each) (NN day))))))))))))))))))) (. .)))', u'(ROOT (S (S (NP (DT The) (NN situation)) (, ,) (ADVP (RB however)) (, ,) (VP (VBD turned) (ADJP (JJ violent)))) (, ,) (NP (NP (NN yesterday) (NN afternoon)) (SBAR (WHADVP (WRB when)) (S (NP (NP (DT the) (NNS soldiers)) (SBAR (WHNP (WDT that)) (S (VP (VBD were) (VP (VBN deployed) (S (VP (TO to) (VP (VP (VB maintain) (NP (NN law))) (CC and) (VP (NN order) (VP (VBD tried) (S (VP (TO to) (VP (VB benefit) (PP (IN from) (NP (DT the) (NN largese))))))))))))))))))) (. .)))', u"(ROOT (S (NP (DT The) (NNS soldiers)) (VP (VBD were) (VP (VBN said) (S (VP (TO to) (VP (VB have) (VP (VBN tried) (S (VP (TO to) (VP (VB force) (NP (PRP$ their) (NN way)) (PP (IN into) (NP (NP (NP (DT the) (NNP Deputy) (NNP Governor) (POS 's)) (NN office)) (, ,) (NP (NP (DT the) (NN place)) (VP (VBN designated) (PP (IN for) (NP (DT the) (NN distribution))))) (, ,)))))) (S (VP (TO to) (VP (VB get) (S (NP (PRP$ their) (NNS vehicles)) (VP (VBN filled)))))))))))) (. .)))", u'(ROOT (S (NP (NP (DT An) (NN attempt)) (PP (IN by) (NP (NP (DT the) (JJ mobile) (NNS policemen)) (VP (VBN attached) (PP (TO to) (NP (DT the) (NN office))) (S (VP (TO to) (VP (VB prevent) (NP (DT the) (NNS soldiers)) (PP (IN from) (S (VP (VBG achieving) (NP (PRP$ their) (NN goal)))))))))))) (VP (VBD led) (PP (TO to) (NP (DT a) (NN shootout)))) (. .)))', u'(ROOT (S (NP (PRP It)) (VP (VBD was) (VP (VBN gathered) (SBAR (IN that) (S (NP (DT the) (NNS soldiers)) (VP (VBD fired) (SBAR (S (NP (NP (JJ several) (VBG warning) (NNS shots)) (CC and) (NP (DT the) (JJ mobile) (NNS policemen))) (VP (VBD shot) (ADVP (RB back)) (PP (IN in) (NP (NN return))) (, ,) (SBAR (IN while) (S (ADVP (RB also)) (VP (NN firing) (NP (NP (NNS canisters)) (PP (IN of) (S (VP (VB tear) (NP (NN gas))))))))))))))))) (. .)))'], u'date': u'160624', u'date_added': datetime.datetime(2016, 6, 26, 19, 0, 18), u'_id': ObjectId('57702642172ab87eb5dc98e9')}, { "_id" : ObjectId("57702678172ab87ec2dc9933"), "content" : "BAGHDAD - A senior Iraqi commander said the city of Fallujah was \"fully liberated\" from Islamic State of Iraq and Syria (ISIS) militants on Sunday, after a more than monthlong military operation. Iraqi troops have entered the northwestern al-Julan neighborhood, the last area of Fallujah to remain under ISIS control, the head of the counterterrorism forces in the operation, Lt. Gen. Abdul-Wahab al-Saadi, told The Associated Press. Al-Saadi said the operation, which began in late May, \"is done and the city is fully liberated.\" The Iraqi army was backed by U.S.-led airstrikes and paramilitary troops, mostly Shiite militias. \"From the center of al-Julan neighborhood, we congratulate the Iraqi people and the commander in chief...and declare that the Fallujah fight is over,\" he told Iraqi state TV, flanked by military officers and soldiers. Some of the soldiers were shooting in the air, chanting and waving the Iraqi flag. He added that troops will start working on removing bombs from the city's streets and buildings. In a statement, the U.S. central military command overseeing the U.S.-led coalition in Iraq said: \"The Coalition continues to provide support through strikes, intelligence, and advice and assistance to the Iraqi Security Forces operating in Fallujah and will continue to do so through deliberate clearing operations.\" Prime Minister Haider al-Abadi declared victory in Fallujah over a week ago, after Iraqi forces advanced into the city center and took control of a government complex. He pledged that remaining pockets of ISIS fighters would be cleared out within hours, but fierce clashes on the city's northern and western edges persisted for days. Tens of thousands of people have fled the fighting, overwhelming camps for the displaced run by the government and aid groups. According to the U.N. refugee agency, more than 85,000 people have fled Fallujah and the surrounding area since the offensive began. The UNHCR and others have warned of dire conditions in the camps -- where temperatures are well over 40 degrees Celsius (104 F) and shelter is limited -- and have called for more funds to meet mounting needs. Fallujah, which is located about 40 miles west of Baghdad, was the first city to fall to IS, in January 2014. Fallujah was also a stronghold of Sunni insurgents following the U.S.-led invasion in 2003. More than 100 American soldiers died and hundreds more were wounded in intense, house-by-house fighting in Fallujah in 2004. ISIS extremists still control significant areas in northern and western Iraq, including the country's second-largest city, Mosul. The group declared an Islamic caliphate on the territory it holds in Iraq and Syria and at the height of its power was estimated to hold nearly a third of each country. More than 3.3 million Iraqis have fled their homes since ISIS swept across northern and western Iraq in the summer of 2014, according to U.N. figures. More than 40 percent of the displaced are from Anbar province, where Fallujah is located.", "source" : "cbs_world", "date" : "Sun, 26 Jun 2016 17:37:27 -0400", "language" : "english", "title" : "Iraq: Fallujah \"fully liberated\" after monthlong fight", "url" : "http://www.cbsnews.com/news/iraqi-commander-fallujah-fully-liberated-after-a-month/", "date_added" : datetime.datetime(2016, 6, 26, 19, 0, 18), "stanford" : 1, "parsed_sents" : [ "(ROOT (S (NP (NNP BAGHDAD) (: -) (NN A) (JJ senior) (JJ Iraqi) (NN commander)) (VP (VBD said) (SBAR (S (NP (NP (DT the) (NN city)) (PP (IN of) (NP (NNP Fallujah)))) (VP (VBD was) (`` ``) (VP (ADVP (RB fully)) (VBN liberated) ('' '') (PP (IN from) (NP (NP (JJ Islamic) (NN State) (PP (IN of) (NP (NP (NNP Iraq)) (CC and) (NP (NNP Syria) (PRN (-LRB- -LRB-) (NNP ISIS) (-RRB- -RRB-)) (NNS militants))))) (PP (IN on) (NP (NNP Sunday)))))) (, ,) (PP (IN after) (NP (DT a) (ADVP (JJR more) (IN than)) (JJ monthlong) (JJ military) (NN operation))))))) (. .)))", "(ROOT (S (S (NP (JJ Iraqi) (NNS troops)) (VP (VBP have) (VP (VBN entered) (NP (DT the) (JJ northwestern) (JJ al-Julan) (NN neighborhood))))) (, ,) (NP (NP (NP (DT the) (JJ last) (NN area)) (PP (IN of) (NP (NNP Fallujah))) (S (VP (TO to) (VP (VB remain) (PP (IN under) (NP (NNP ISIS) (NN control))))))) (, ,) (NP (NP (DT the) (NN head)) (PP (IN of) (NP (NP (DT the) (NN counterterrorism) (NNS forces)) (PP (IN in) (NP (DT the) (NN operation)))))) (, ,) (NP (NNP Lt.) (NNP Gen.) (NNP Abdul-Wahab) (NNP al-Saadi)) (, ,)) (VP (VBD told) (NP (DT The) (NNP Associated) (NNP Press))) (. .)))", "(ROOT (S (NP (NNP Al-Saadi)) (VP (VBD said) (SBAR (S (S (NP (NP (DT the) (NN operation)) (, ,) (SBAR (WHNP (WDT which)) (S (VP (VBD began) (PP (IN in) (NP (JJ late) (NNP May)))))) (, ,)) (`` ``) (VP (VBZ is) (VP (VBN done)))) (CC and) (S (NP (DT the) (NN city)) (VP (VBZ is) (ADVP (RB fully)) (VP (VBN liberated))))))) (. .) ('' '')))", "(ROOT (S (`` ``) (S (PP (IN From) (NP (NP (DT the) (NN center)) (PP (IN of) (NP (JJ al-Julan) (NN neighborhood))))) (, ,) (NP (PRP we)) (VP (VP (VBP congratulate) (NP (NP (DT the) (JJ Iraqi) (NNS people)) (CC and) (NP (NP (DT the) (NN commander)) (PP (IN in) (NP (NN chief)))))) (: ...) (CC and) (VP (VB declare) (SBAR (IN that) (S (NP (DT the) (NNP Fallujah) (NN fight)) (VP (VBZ is) (ADVP (IN over)))))))) (, ,) ('' '') (NP (PRP he)) (VP (VBD told) (NP (JJ Iraqi) (NN state) (NN TV)) (, ,) (S (VP (VBN flanked) (PP (IN by) (NP (JJ military) (NNS officers) (CC and) (NNS soldiers)))))) (. .)))", "(ROOT (S (PP (IN In) (NP (DT a) (NN statement))) (, ,) (NP (NP (DT the) (NNP U.S.) (JJ central) (JJ military) (NN command)) (VP (VBG overseeing) (NP (NP (DT the) (JJ U.S.-led) (NN coalition)) (PP (IN in) (NP (NNP Iraq)))))) (VP (VBD said) (: :) (`` ``) (S (NP (DT The) (NNP Coalition)) (VP (VP (VBZ continues) (S (VP (TO to) (VP (VB provide) (NP (NN support)) (PP (IN through) (NP (NP (NP (NNS strikes)) (, ,) (NP (NN intelligence)) (, ,) (CC and) (NP (NN advice))) (CC and) (NP (NP (NN assistance)) (PP (TO to) (NP (NP (DT the) (JJ Iraqi) (NN Security) (NNS Forces)) (VP (VBG operating) (PP (IN in) (NP (NNP Fallujah))))))))))))) (CC and) (VP (MD will) (VP (VB continue) (S (VP (TO to) (VP (VB do) (ADVP (RB so))))) (PP (IN through) (NP (JJ deliberate) (NN clearing) (NNS operations)))))))) (. .) ('' '')))", "(ROOT (S (NP (PRP He)) (VP (VP (VBD pledged) (SBAR (IN that) (S (NP (NP (VBG remaining) (NNS pockets)) (PP (IN of) (NP (NNP ISIS) (NNS fighters)))) (VP (MD would) (VP (VB be) (VP (VBN cleared) (PRT (RP out)) (PP (IN within) (NP (NNS hours))))))))) (, ,) (CC but) (S (NP (NP (JJ fierce) (NNS clashes)) (PP (IN on) (NP (NP (DT the) (NN city) (POS 's)) (ADJP (JJ northern) (CC and) (JJ western)) (NNS edges)))) (VP (VBD persisted) (PP (IN for) (NP (NNS days)))))) (. .)))", "(ROOT (S (NP (NP (NNS Tens)) (PP (IN of) (NP (NP (NNS thousands)) (PP (IN of) (NP (NNS people)))))) (VP (VBP have) (VP (VBN fled) (NP (NP (DT the) (NN fighting)) (, ,) (NP (NP (JJ overwhelming) (NNS camps)) (PP (IN for) (NP (DT the) (JJ displaced) (NN run)))) (PP (IN by) (NP (DT the) (NN government) (CC and) (NN aid) (NNS groups)))))) (. .)))" ] }] def test_petr1_formatted_to_results(): petr1_results = petrarch.run_pipeline(formatted, write_output=False, parsed=True) correct1_results = {'57702678172ab87ec2dc9933': [(u'20160626', u'IRQ', u'MED', u'010', u'57702678172ab87ec2dc9933_1', 'http://www.cbsnews.com/news/iraqi-commander-fallujah-fully-liberated-after-a-month/', 'cbs_world'), (u'20160626', u'IRQMIL', u'IRQ', u'010', u'NAMED_TERROR_GROUP,1', u'57702678172ab87ec2dc9933_0', 'http://www.cbsnews.com/news/iraqi-commander-fallujah-fully-liberated-after-a-month/', 'cbs_world') ]} assert petr1_results == correct1_results def test_petr2_formatted_to_results(): petr2_results = petrarch2.run_pipeline(formatted, write_output=False, parsed=True) correct2_results = {'57702678172ab87ec2dc9933': [(u'20160626', u'IRQMIL', u'MED', u'010', u'57702678172ab87ec2dc9933_1', 'http://www.cbsnews.com/news/iraqi-commander-fallujah-fully-liberated-after-a-month/', 'cbs_world'), (u'20160626', u'IRQMIL', u'IRQ', u'010', u'NAMED_TERROR_GROUP,1', u'57702678172ab87ec2dc9933_0', 'http://www.cbsnews.com/news/iraqi-commander-fallujah-fully-liberated-after-a-month/', 'cbs_world') ], '57702642172ab87eb5dc98e9': [(u'20160624', u'NGAPPL', u'---GOV', u'191', u'REFUGEES,1', u'57702642172ab87eb5dc98e9_1', u'http://www.thetidenewsonline.com/2016/06/24/soldiers-policemen-fight-over-rice/', u'nigeria_tidenews')], '57702641172ab87eb7dc98fa': [(u'20160626', u'IRQ', u'IMGMUSISIUAF', u'111', u'TERROR,1', u'57702641172ab87eb7dc98fa_4', u'http://www.menafn.com/1094827896/6-killed-in-attacks-in-Iraqi-capital-Friday?src=RSS', u'menafn_iraq'), (u'20160626', u'---CVL', u'IRQ', u'190', u'57702641172ab87eb7dc98fa_3', u'http://www.menafn.com/1094827896/6-killed-in-attacks-in-Iraqi-capital-Friday?src=RSS', u'menafn_iraq')]} assert petr2_results == correct2_results
191.065217
3,050
0.641313
2,829
17,578
3.967126
0.180983
0.022097
0.024949
0.017642
0.290386
0.207075
0.16582
0.14105
0.107191
0.107191
0
0.035612
0.182103
17,578
91
3,051
193.164835
0.745009
0
0
0.16092
0
0.402299
0.870342
0.025147
0
0
0
0
0.022989
1
0.022989
false
0
0.045977
0
0.068966
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
65a778d34add6253eb7bc11de616c677109c2362
93
py
Python
ImageWork/apps.py
imsks/ImageN
58d45280985799361de002cb5d1460c2a7dc6ecd
[ "MIT" ]
1
2021-08-05T09:10:49.000Z
2021-08-05T09:10:49.000Z
ImageWork/apps.py
imsks/ImageN
58d45280985799361de002cb5d1460c2a7dc6ecd
[ "MIT" ]
null
null
null
ImageWork/apps.py
imsks/ImageN
58d45280985799361de002cb5d1460c2a7dc6ecd
[ "MIT" ]
null
null
null
from django.apps import AppConfig class ImageworkConfig(AppConfig): name = 'ImageWork'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
65a7bc1b40d4add37a7b00a107311cc01ffdb566
2,613
py
Python
resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtGui/QGroupBox.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
1
2020-04-20T02:27:20.000Z
2020-04-20T02:27:20.000Z
resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QGroupBox.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
resources/dot_PyCharm/system/python_stubs/cache/8cdc475d469a13122bc4bc6c3ac1c215d93d5f120f5cc1ef33a8f3088ee54d8e/PySide/QtGui/QGroupBox.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
# encoding: utf-8 # module PySide.QtGui # from C:\Python27\lib\site-packages\PySide\QtGui.pyd # by generator 1.147 # no doc # imports import PySide.QtCore as __PySide_QtCore import Shiboken as __Shiboken from QWidget import QWidget class QGroupBox(QWidget): # no doc def alignment(self, *args, **kwargs): # real signature unknown pass def changeEvent(self, *args, **kwargs): # real signature unknown pass def childEvent(self, *args, **kwargs): # real signature unknown pass def clicked(self, *args, **kwargs): # real signature unknown """ Signal """ pass def event(self, *args, **kwargs): # real signature unknown pass def focusInEvent(self, *args, **kwargs): # real signature unknown pass def initStyleOption(self, *args, **kwargs): # real signature unknown pass def isCheckable(self, *args, **kwargs): # real signature unknown pass def isChecked(self, *args, **kwargs): # real signature unknown pass def isFlat(self, *args, **kwargs): # real signature unknown pass def minimumSizeHint(self, *args, **kwargs): # real signature unknown pass def mouseMoveEvent(self, *args, **kwargs): # real signature unknown pass def mousePressEvent(self, *args, **kwargs): # real signature unknown pass def mouseReleaseEvent(self, *args, **kwargs): # real signature unknown pass def paintEvent(self, *args, **kwargs): # real signature unknown pass def resizeEvent(self, *args, **kwargs): # real signature unknown pass def setAlignment(self, *args, **kwargs): # real signature unknown pass def setCheckable(self, *args, **kwargs): # real signature unknown pass def setChecked(self, *args, **kwargs): # real signature unknown pass def setFlat(self, *args, **kwargs): # real signature unknown pass def setTitle(self, *args, **kwargs): # real signature unknown pass def title(self, *args, **kwargs): # real signature unknown pass def toggled(self, *args, **kwargs): # real signature unknown """ Signal """ pass def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(S, *more): # real signature unknown; restored from __doc__ """ T.__new__(S, ...) -> a new object with type S, a subtype of T """ pass staticMetaObject = None # (!) real value is '<PySide.QtCore.QMetaObject object at 0x0000000003FAD6C8>'
26.663265
106
0.63452
299
2,613
5.461538
0.270903
0.19902
0.306185
0.264544
0.608083
0.608083
0.608083
0.584813
0.057563
0
0
0.010283
0.255645
2,613
97
107
26.938144
0.829306
0.346345
0
0.446429
0
0
0
0
0
0
0
0
0
1
0.446429
false
0.446429
0.053571
0
0.535714
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
65b249377623a307c87db1a62945b62ba3b4ab64
1,091
py
Python
data/train/python/65b249377623a307c87db1a62945b62ba3b4ab64fabfile.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/train/python/65b249377623a307c87db1a62945b62ba3b4ab64fabfile.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/train/python/65b249377623a307c87db1a62945b62ba3b4ab64fabfile.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
from fabric.api import local, run, env, settings from fabric.context_managers import lcd def less(): local("lessc mcmun/static/css/mcmun.less -x > mcmun/static/css/mcmun.css") def up(): local("python manage.py runserver") def dump(): local("python manage.py dumpdata --indent=4 > backup.json") def static(): local("python manage.py collectstatic --noinput") def restart(): local('kill -HUP `cat /tmp/gunicorn.pid`') def stats(): local('python manage.py get_registration_stats') def pubcrawl(): local('python manage.py get_pubcrawl_stats') def sh(): local('python manage.py shell') def awards(): local('python manage.py generate_awards_slideshow awards.svg') local('inkscapeslide updated_awards.svg') def check(): local('python manage.py check_assignments') def badges(): local('python manage.py get_badge_names') local('cp badges.csv badges') # Generate additions and deletions since last commit with lcd('badges'): local('git diff | grep "^-" > deleted.csv') local('git diff | grep "^+" > added.csv')
24.795455
78
0.683776
149
1,091
4.932886
0.463087
0.134694
0.208163
0.232653
0.089796
0
0
0
0
0
0
0.001112
0.175985
1,091
43
79
25.372093
0.816463
0.04583
0
0
0
0.034483
0.532243
0.096246
0
0
0
0
0
1
0.37931
true
0
0.068966
0
0.448276
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
1
0
0
0
0
0
0
4
65bf77b6d01ccda5cc2c02dde4df96904a41bd27
174
py
Python
newsCrawl/fakeNews/index/views.py
ARIF-KHAN-420/Fake_News
acfbffcce454afc09c4a7b06205c1a632c11f822
[ "MIT" ]
1
2022-01-03T17:54:03.000Z
2022-01-03T17:54:03.000Z
newsCrawl/fakeNews/index/views.py
arifkhan-silicornya/Fake_News
acfbffcce454afc09c4a7b06205c1a632c11f822
[ "MIT" ]
null
null
null
newsCrawl/fakeNews/index/views.py
arifkhan-silicornya/Fake_News
acfbffcce454afc09c4a7b06205c1a632c11f822
[ "MIT" ]
null
null
null
from django.shortcuts import render # Create your views here. def index(request): data = {'d' : "Copy a NEWS and paste it."} return render(request,'index.html',data)
29
46
0.695402
26
174
4.653846
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.178161
174
6
47
29
0.846154
0.132184
0
0
0
0
0.24
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
029c17f331537c0184fca697765c9274a96aca9f
23
py
Python
fastai/__init__.py
janvdp/fastai
ec06bc4e5e445b9d963d4e029466050bfeb1db6c
[ "Apache-2.0" ]
null
null
null
fastai/__init__.py
janvdp/fastai
ec06bc4e5e445b9d963d4e029466050bfeb1db6c
[ "Apache-2.0" ]
null
null
null
fastai/__init__.py
janvdp/fastai
ec06bc4e5e445b9d963d4e029466050bfeb1db6c
[ "Apache-2.0" ]
null
null
null
__version__ = "2.1.9"
7.666667
21
0.608696
4
23
2.5
1
0
0
0
0
0
0
0
0
0
0
0.157895
0.173913
23
2
22
11.5
0.368421
0
0
0
0
0
0.227273
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
02beacd61f9882a976c73d37846fb6635b38fca9
28
py
Python
maglearn_back/api/__init__.py
maglearn/maglearn-back
cb5d8623f26e207b870c09c80cbc59911ab23794
[ "MIT" ]
null
null
null
maglearn_back/api/__init__.py
maglearn/maglearn-back
cb5d8623f26e207b870c09c80cbc59911ab23794
[ "MIT" ]
null
null
null
maglearn_back/api/__init__.py
maglearn/maglearn-back
cb5d8623f26e207b870c09c80cbc59911ab23794
[ "MIT" ]
null
null
null
""" API implementation. """
7
19
0.607143
2
28
8.5
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
28
3
20
9.333333
0.708333
0.678571
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
02bf1efa9fc21b10ade5e916aca00ef29f6df74d
2,010
py
Python
tests/admin_docs/models.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
19
2015-07-07T02:08:59.000Z
2021-11-08T11:05:40.000Z
tests/admin_docs/models.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
57
2018-10-08T12:37:30.000Z
2018-10-08T17:39:26.000Z
tests/admin_docs/models.py
ni-ning/django
2e7ba6057cfc82a15a22b6021cd60cf307152e2d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
145
2019-03-14T18:54:45.000Z
2022-03-04T20:25:31.000Z
""" Models for testing various aspects of the djang.contrib.admindocs app """ from django.db import models class Company(models.Model): name = models.CharField(max_length=200) class Group(models.Model): name = models.CharField(max_length=200) class Family(models.Model): last_name = models.CharField(max_length=200) class Person(models.Model): """ Stores information about a person, related to :model:`myapp.Company`. **Notes** Use ``save_changes()`` when saving this object. ``company`` Field storing :model:`myapp.Company` where the person works. (DESCRIPTION) .. raw:: html :file: admin_docs/evilfile.txt .. include:: admin_docs/evilfile.txt """ first_name = models.CharField(max_length=200, help_text="The person's first name") last_name = models.CharField(max_length=200, help_text="The person's last name") company = models.ForeignKey(Company, models.CASCADE, help_text="place of work") family = models.ForeignKey(Family, models.SET_NULL, related_name='+', null=True) groups = models.ManyToManyField(Group, help_text="has membership") def _get_full_name(self): return "%s %s" % (self.first_name, self.last_name) def rename_company(self, new_name): self.company.name = new_name self.company.save() return new_name def dummy_function(self, baz, rox, *some_args, **some_kwargs): return some_kwargs @property def a_property(self): return 'a_property' def suffix_company_name(self, suffix='ltd'): return self.company.name + suffix def add_image(self): pass def delete_image(self): pass def save_changes(self): pass def set_status(self): pass def get_full_name(self): """ Get the full name of the person """ return self._get_full_name() def get_status_count(self): return 0 def get_groups_list(self): return []
23.647059
86
0.656716
264
2,010
4.82197
0.359848
0.037706
0.074627
0.08641
0.213669
0.185389
0.185389
0.150825
0.150825
0.076984
0
0.010369
0.232338
2,010
84
87
23.928571
0.814647
0.204975
0
0.15
0
0
0.059868
0
0
0
0
0
0
1
0.3
false
0.1
0.025
0.15
0.825
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
02d0ddb6f5072c58acc6615cd782451b199d2579
796
py
Python
test/e2e2/spec/test_api_domains.py
peterthomassen/desec-stack
436e48e8fc3f55ecf0b0e6a57a735a899a736f19
[ "MIT" ]
197
2016-10-13T16:44:54.000Z
2022-03-24T08:33:25.000Z
test/e2e2/spec/test_api_domains.py
peterthomassen/desec-stack
436e48e8fc3f55ecf0b0e6a57a735a899a736f19
[ "MIT" ]
455
2016-12-08T15:23:04.000Z
2022-03-29T12:58:02.000Z
test/e2e2/spec/test_api_domains.py
peterthomassen/desec-stack
436e48e8fc3f55ecf0b0e6a57a735a899a736f19
[ "MIT" ]
25
2016-10-13T16:45:02.000Z
2022-02-23T17:57:04.000Z
from conftest import DeSECAPIV1Client, NSLordClient, random_domainname def test_create(api_user: DeSECAPIV1Client): assert len(api_user.domain_list()) == 0 assert api_user.domain_create(random_domainname()).status_code == 201 assert len(api_user.domain_list()) == 1 def test_get(api_user_domain: DeSECAPIV1Client): domain = api_user_domain.get(f"/domains/{api_user_domain.domain}/").json() assert NSLordClient.query(api_user_domain.domain, 'CDS')[1] == set(domain['keys'][0]['ds']) assert domain['name'] == api_user_domain.domain def test_destroy(api_user_domain: DeSECAPIV1Client): n = len(api_user_domain.domain_list()) assert api_user_domain.domain_destroy(api_user_domain.domain).status_code == 204 assert len(api_user_domain.domain_list()) == n - 1
39.8
95
0.753769
113
796
4.982301
0.300885
0.174068
0.300178
0.236234
0.195382
0.184725
0
0
0
0
0
0.021368
0.11809
796
19
96
41.894737
0.780627
0
0
0
0
0
0.059045
0.042714
0
0
0
0
0.538462
1
0.230769
false
0
0.076923
0
0.307692
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
02d73060a3dcc8c2a05ca0f279e7fec13e835925
220
py
Python
classifiers/abs_classifier.py
eyalho/NetML-Competition2020
cdf7b21642a8ce1ff8cc4c3ba7ed7fc6e1a91a81
[ "BSD-2-Clause" ]
null
null
null
classifiers/abs_classifier.py
eyalho/NetML-Competition2020
cdf7b21642a8ce1ff8cc4c3ba7ed7fc6e1a91a81
[ "BSD-2-Clause" ]
null
null
null
classifiers/abs_classifier.py
eyalho/NetML-Competition2020
cdf7b21642a8ce1ff8cc4c3ba7ed7fc6e1a91a81
[ "BSD-2-Clause" ]
null
null
null
from abc import abstractmethod, ABC class ABSClassifier(ABC): @abstractmethod def train(self, X_train, y_train, X_val=None, y_val=None): pass @abstractmethod def predict(self, X): pass
18.333333
62
0.663636
29
220
4.896552
0.517241
0.239437
0
0
0
0
0
0
0
0
0
0
0.25
220
11
63
20
0.860606
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.125
0
0.5
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
1
0
0
0
0
0
4
02ddcdd1aebe365b91caeb3d21bf2eeeb7c0ad2f
174
py
Python
min_number.py
tpaul93/LearningPython
b537ebbb4c14910a90245ef5956ab2b5af122084
[ "MIT" ]
null
null
null
min_number.py
tpaul93/LearningPython
b537ebbb4c14910a90245ef5956ab2b5af122084
[ "MIT" ]
null
null
null
min_number.py
tpaul93/LearningPython
b537ebbb4c14910a90245ef5956ab2b5af122084
[ "MIT" ]
null
null
null
def min_number(num_list): min_num = None for num in num_list: if min_num is None or min_num > num: min_num = num return min_num
19.333333
44
0.563218
28
174
3.214286
0.428571
0.333333
0.2
0
0
0
0
0
0
0
0
0
0.390805
174
8
45
21.75
0.849057
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
02f6706a83d53aa25257f2f4d7aa07828505aa38
141
py
Python
sol_validator/apps.py
kushtrimmh/sol_validator
904e6a89cb8a5b332bf03602903fc9f3ee724e82
[ "BSD-2-Clause" ]
null
null
null
sol_validator/apps.py
kushtrimmh/sol_validator
904e6a89cb8a5b332bf03602903fc9f3ee724e82
[ "BSD-2-Clause" ]
null
null
null
sol_validator/apps.py
kushtrimmh/sol_validator
904e6a89cb8a5b332bf03602903fc9f3ee724e82
[ "BSD-2-Clause" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class SolValidatorConfig(AppConfig): name = 'sol_validator'
17.625
39
0.808511
16
141
6.75
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.141844
141
7
40
20.142857
0.892562
0
0
0
0
0
0.092199
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f30be977831e8d7d5d52cff5dcb1ef91e7ff4c2b
6,606
py
Python
seed_services_cli/tests/test_auth.py
praekeltfoundation/seed-services-cli
943fca5e70be086d4f29fd580103d7647a81f99a
[ "BSD-3-Clause" ]
null
null
null
seed_services_cli/tests/test_auth.py
praekeltfoundation/seed-services-cli
943fca5e70be086d4f29fd580103d7647a81f99a
[ "BSD-3-Clause" ]
null
null
null
seed_services_cli/tests/test_auth.py
praekeltfoundation/seed-services-cli
943fca5e70be086d4f29fd580103d7647a81f99a
[ "BSD-3-Clause" ]
null
null
null
""" Tests for seed_services_cli.identity_store """ from unittest import TestCase from click.testing import CliRunner from seed_services_cli.main import cli import responses import json class TestSendCommand(TestCase): def setUp(self): self.runner = CliRunner() def tearDown(self): pass def invoke_user_add(self, args, first_name="First", last_name="Last", email="test@example.com", password="pass", admin=False): if admin: args = args + ["--admin"] return self.runner.invoke(cli, [ 'auth-user-add', '--first_name', first_name, '--last_name', last_name, '--email', email, '--password', password, ] + args) def invoke_user_change_password(self, args, email, password): return self.runner.invoke(cli, [ 'auth-user-change-password', '--email', email, '--password', password, ] + args) def invoke_user_add_team(self, args, user=2, team=3): return self.runner.invoke(cli, [ 'auth-user-add-team', '--user', user, '--team', team, ] + args) def test_user_add_help(self): result = self.runner.invoke(cli, ['auth-user-add', '--help']) self.assertEqual(result.exit_code, 0) self.assertTrue( "Create a user" in result.output) @responses.activate def test_user_add_no_details(self): # setup login_response = { "token": "3e6de6f2cace86d3ac22d0a58e652f4b283ab58c" } responses.add(responses.POST, "http://auth.example.org/user/tokens/", json=login_response, status=201) result = self.runner.invoke(cli, ['auth-user-add']) self.assertEqual(result.exit_code, 2) self.assertTrue( "Please specify all new user information. See --help." in result.output) @responses.activate def test_user_add(self): # setup login_response = { "token": "3e6de6f2cace86d3ac22d0a58e652f4b283ab58c" } responses.add(responses.POST, "http://auth.example.org/user/tokens/", json=login_response, status=201) user_response = { "id": "3", "url": "http://auth.example.org/users/9/", "first_name": "First", "last_name": "Last", "email": "test@example.com", "admin": False, "teams": [], "organizations": [], "active": False } responses.add(responses.POST, "http://auth.example.org/users/", json=user_response, status=200) # Execute result = self.invoke_user_add([]) # Check self.assertEqual(result.exit_code, 0) self.assertTrue("Creating account for test@example.com" in result.output) self.assertTrue("Created user. ID is 3." in result.output) self.assertEqual(len(responses.calls), 2) self.assertEqual(responses.calls[1].request.url, "http://auth.example.org/users/") @responses.activate def test_user_add_admin(self): # setup login_response = { "token": "3e6de6f2cace86d3ac22d0a58e652f4b283ab58c" } responses.add(responses.POST, "http://auth.example.org/user/tokens/", json=login_response, status=201) user_response = { "id": "3", "url": "http://auth.example.org/users/9/", "first_name": "First", "last_name": "Last", "email": "test@example.com", "admin": False, "teams": [], "organizations": [], "active": True } responses.add(responses.POST, "http://auth.example.org/users/", json=user_response, status=200) # Execute result = self.invoke_user_add([], admin=True) # Check self.assertEqual(result.exit_code, 0) self.assertTrue("Creating account for test@example.com" in result.output) self.assertTrue("Created user. ID is 3." in result.output) self.assertEqual(len(responses.calls), 2) self.assertEqual(responses.calls[1].request.url, "http://auth.example.org/users/") @responses.activate def test_user_change_password(self): login_response = { "token": "3e6de6f2cace86d3ac22d0a58e652f4b283ab58c" } responses.add(responses.POST, "http://auth.example.org/user/tokens/", json=login_response, status=201) users_response = [{ 'email': 'test@example.org', }, { 'id': 2, 'email': 'test2@example.org' }] responses.add(responses.GET, "http://auth.example.org/users/", json=users_response, status=200) responses.add(responses.PUT, "http://auth.example.org/users/2/", json={}, status=200) result = self.invoke_user_change_password( [], email='test2@example.org', password='testpass') self.assertEqual(result.exit_code, 0) self.assertTrue( 'Changing password for test2@example.org' in result.output) self.assertEqual(len(responses.calls), 3) self.assertEqual( json.loads(responses.calls[2].request.body)['password'], 'testpass') def test_user_add_team_help(self): result = self.runner.invoke(cli, ['auth-user-add-team', '--help']) self.assertEqual(result.exit_code, 0) self.assertTrue( "Add a user to a team" in result.output) @responses.activate def test_user_add_user_team_no_details(self): # setup login_response = { "token": "3e6de6f2cace86d3ac22d0a58e652f4b283ab58c" } responses.add(responses.POST, "http://auth.example.org/user/tokens/", json=login_response, status=201) result = self.runner.invoke(cli, ['auth-user-add-team']) self.assertEqual(result.exit_code, 2) self.assertTrue( "Please specify user and team. See --help." in result.output)
34.768421
74
0.54284
666
6,606
5.267267
0.156156
0.048461
0.055587
0.066705
0.754846
0.737172
0.72862
0.719213
0.647377
0.579247
0
0.035779
0.331517
6,606
189
75
34.952381
0.758605
0.014532
0
0.57764
0
0
0.219058
0.034637
0
0
0
0
0.136646
1
0.074534
false
0.074534
0.031056
0.012422
0.130435
0
0
0
0
null
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
f31d784af40847e1252eed057778d97c47adecaf
122
py
Python
mix-printlist.py
Wikinaut/auto3mix
220ebafcd5ca231918da5eb878b4187be960f10f
[ "Unlicense" ]
2
2020-04-06T13:56:59.000Z
2021-01-21T22:49:24.000Z
mix-printlist.py
Wikinaut/auto3mix
220ebafcd5ca231918da5eb878b4187be960f10f
[ "Unlicense" ]
null
null
null
mix-printlist.py
Wikinaut/auto3mix
220ebafcd5ca231918da5eb878b4187be960f10f
[ "Unlicense" ]
1
2020-04-06T13:57:48.000Z
2020-04-06T13:57:48.000Z
from glob import glob from pydub import AudioSegment i = 0 for name in sorted(glob("*.mp3")): i = i+1 print name
15.25
34
0.663934
21
122
3.857143
0.666667
0
0
0
0
0
0
0
0
0
0
0.032258
0.237705
122
7
35
17.428571
0.83871
0
0
0
0
0
0.040984
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.166667
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
0
0
4
f3237c5bfd14d351a17d41d6ba9c263015e28fed
808
py
Python
djangoplicity/contacts/migrations/0009_auto_20201222_2252.py
djangoplicity/djangoplicity-contacts
e873b0d6dad3e04adfb567380df092460984b25c
[ "BSD-3-Clause" ]
null
null
null
djangoplicity/contacts/migrations/0009_auto_20201222_2252.py
djangoplicity/djangoplicity-contacts
e873b0d6dad3e04adfb567380df092460984b25c
[ "BSD-3-Clause" ]
4
2021-01-07T05:30:10.000Z
2021-12-08T16:23:09.000Z
djangoplicity/contacts/migrations/0009_auto_20201222_2252.py
djangoplicity/djangoplicity-contacts
e873b0d6dad3e04adfb567380df092460984b25c
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-01-07 00:36 # IMPORTANT: This file was renamed on purpose to keep the same naming as release/python3, TODO: Check conflicts from __future__ import unicode_literals import django.core.files.storage from django.db import migrations, models import djangoplicity.contacts.models class Migration(migrations.Migration): dependencies = [ ('contacts', '0008_auto_20190926_1400'), ] operations = [ migrations.AlterField( model_name='import', name='data_file', field=models.FileField(storage=django.core.files.storage.FileSystemStorage(base_url=None, location=b'/home/noirlabadmin/shared/contacts_import'), upload_to=djangoplicity.contacts.models.handle_uploaded_file), ), ]
33.666667
220
0.719059
99
808
5.717172
0.717172
0.035336
0.053004
0.077739
0
0
0
0
0
0
0
0.052711
0.178218
808
23
221
35.130435
0.799699
0.221535
0
0
1
0
0.1392
0.1024
0
0
0
0.043478
0
1
0
false
0
0.4
0
0.6
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
1
0
0
0
0
0
1
0
1
0
0
4
b8237cffc6518198ff69b80625832c608685ab1f
43
py
Python
src/nd2/_sdk/__init__.py
VolkerH/nd2
3fb449d28c10b975cd6773be8aa5802b3cb976f6
[ "BSD-3-Clause" ]
6
2021-09-29T14:10:27.000Z
2022-03-26T13:34:47.000Z
src/nd2/_sdk/__init__.py
VolkerH/nd2
3fb449d28c10b975cd6773be8aa5802b3cb976f6
[ "BSD-3-Clause" ]
33
2021-09-26T03:19:52.000Z
2022-03-14T22:39:47.000Z
src/nd2/_sdk/__init__.py
VolkerH/nd2
3fb449d28c10b975cd6773be8aa5802b3cb976f6
[ "BSD-3-Clause" ]
2
2021-11-10T10:19:43.000Z
2022-03-17T13:30:46.000Z
from . import latest __all__ = ["latest"]
10.75
20
0.674419
5
43
5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.186047
43
3
21
14.333333
0.714286
0
0
0
0
0
0.139535
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
4
b823e0670c4053630a8c6d56b1aa8294c629879c
25
py
Python
data/studio21_generated/interview/1752/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/interview/1752/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/interview/1752/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
def get_pins(observed):
12.5
23
0.76
4
25
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.12
25
2
24
12.5
0.818182
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
b83efa9f1db180af9059814e2bbda91481094f8b
57
py
Python
mocks/xmodule/__init__.py
appsembler/course-cccess-groups
d9c59dc55a3d021196c50e1080d3a251b4751780
[ "MIT" ]
4
2020-03-09T15:47:17.000Z
2021-09-08T09:17:42.000Z
mocks/xmodule/__init__.py
appsembler/course-cccess-groups
d9c59dc55a3d021196c50e1080d3a251b4751780
[ "MIT" ]
51
2019-11-26T14:09:33.000Z
2022-03-09T08:27:59.000Z
mocks/xmodule/__init__.py
appsembler/course-cccess-groups
d9c59dc55a3d021196c50e1080d3a251b4751780
[ "MIT" ]
3
2020-04-12T22:33:24.000Z
2021-09-30T20:28:03.000Z
""" Mocks for the `xmodule` module so tests can run. """
14.25
48
0.649123
9
57
4.111111
1
0
0
0
0
0
0
0
0
0
0
0
0.192982
57
3
49
19
0.804348
0.842105
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b8493cecc9ea7ce4c2f1d305cd603358f9a1a571
232
py
Python
gcm/conf.py
ruckit-dev/django-gcm
9a98fbc60de544c7dc40c458ecc6684da5301370
[ "BSD-2-Clause" ]
59
2015-01-14T18:39:18.000Z
2020-11-13T07:25:53.000Z
gcm/conf.py
ruckit-dev/django-gcm
9a98fbc60de544c7dc40c458ecc6684da5301370
[ "BSD-2-Clause" ]
38
2015-01-24T10:42:45.000Z
2018-03-30T05:51:34.000Z
gcm/conf.py
ruckit-dev/django-gcm
9a98fbc60de544c7dc40c458ecc6684da5301370
[ "BSD-2-Clause" ]
26
2015-01-24T10:34:59.000Z
2019-01-04T10:42:12.000Z
from django.conf import settings GCM_DEVICE_MODEL = getattr(settings, 'GCM_DEVICE_MODEL', 'gcm.models.Device') GCM_APIKEY = getattr(settings, 'GCM_APIKEY', None) GCM_MAX_RECIPIENTS = getattr(settings, 'GCM_MAX_RECIPIENTS', 1000)
29
77
0.793103
32
232
5.4375
0.46875
0.252874
0.310345
0.252874
0
0
0
0
0
0
0
0.019048
0.094828
232
7
78
33.142857
0.809524
0
0
0
0
0
0.262931
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b880b35d65928e2a0e5efaa66ca90fcfd10bcaca
537
py
Python
eurofx/test_eurofx.py
supercoderz/pyeurofx
3f579bb6e4836dadb187df8c74a9d186ae7e39e7
[ "MIT" ]
2
2018-07-14T11:58:35.000Z
2018-11-19T22:47:58.000Z
eurofx/test_eurofx.py
supercoderz/pyeurofx
3f579bb6e4836dadb187df8c74a9d186ae7e39e7
[ "MIT" ]
null
null
null
eurofx/test_eurofx.py
supercoderz/pyeurofx
3f579bb6e4836dadb187df8c74a9d186ae7e39e7
[ "MIT" ]
2
2017-01-03T11:50:45.000Z
2019-11-01T14:33:40.000Z
from .eurofx import * from .eurofx_pandas import * def test_get_daily(): #just call this function which covers all get_daily_data() def test_get_historical(): #just call this function which covers all get_historical_data() def test_get_daily_df(): #just call this function which covers all get_daily_data_df() def test_get_historical_df(): #just call this function which covers all get_historical_data_df() def test_get_currency_list_df(): get_currency_list_df() def test_get_currency_list(): get_currency_list()
22.375
42
0.783985
85
537
4.564706
0.235294
0.108247
0.154639
0.206186
0.664948
0.634021
0.510309
0.510309
0.510309
0.5
0
0
0.145251
537
24
43
22.375
0.845316
0.297952
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
true
0
0.142857
0
0.571429
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
1
0
0
0
1
0
0
4
b89dd3bd00c8c35a1ddfe08b8b97032f14abaf5b
4,753
py
Python
sp2d/models/sp2d_simda.py
aagusti/sp2d
51122cdbb9f85bee91d08c3dd29fb1f7d1ae3d90
[ "MIT" ]
null
null
null
sp2d/models/sp2d_simda.py
aagusti/sp2d
51122cdbb9f85bee91d08c3dd29fb1f7d1ae3d90
[ "MIT" ]
null
null
null
sp2d/models/sp2d_simda.py
aagusti/sp2d
51122cdbb9f85bee91d08c3dd29fb1f7d1ae3d90
[ "MIT" ]
null
null
null
from ..models import SipkdBase, SipkdDBSession from datetime import datetime from sqlalchemy import ( Column, Integer, BigInteger, SmallInteger, Text, DateTime, Date, String, ForeignKey, text, UniqueConstraint, Numeric, ForeignKeyConstraint, PrimaryKeyConstraint ) from sqlalchemy.orm import ( relationship,backref ) class SimdaBank(SipkdBase): __tablename__ = 'ref_bank' kd_bank = Column(Integer, nullable=False, primary_key=True) nm_bank = Column(String(50), nullable=False) no_rekening = Column(String(50)) kd_rek_1 = Column(Integer, nullable=False) kd_rek_2 = Column(Integer, nullable=False) kd_rek_3 = Column(Integer, nullable=False) kd_rek_4 = Column(Integer, nullable=False) kd_rek_5 = Column(Integer, nullable=False) class SimdaSpm(SipkdBase): __tablename__ = 'ta_spm' __table_args__ = (PrimaryKeyConstraint('tahun', 'no_spm'),) tahun = Column(Integer, nullable=False) no_spm = Column(String(50), nullable=False) kd_urusan = Column(Integer, nullable=False) kd_bidang = Column(Integer, nullable=False) kd_unit = Column(Integer, nullable=False) kd_sub = Column(Integer, nullable=False) no_spp = Column(String(50)) jn_spm = Column(Integer, nullable=False) tgl_spm = Column(DateTime, nullable=False) uraian = Column(String(255)) nm_penerima = Column(String(100)) bank_penerima = Column(String(50)) rek_penerima = Column(String(50)) npwp = Column(String(20)) bank_pembayar = Column(Integer) nm_verifikator = Column(String(50)) nm_penandatangan = Column(String(50)) nip_penandatangan = Column(String(21)) jbt_penandatangan = Column(String(75)) kd_edit = Column(Integer) class SimdaSpmDet(SipkdBase): __tablename__ = 'ta_spm_rinc' __table_args__ = (PrimaryKeyConstraint('tahun', 'no_spm', 'no_id'), ForeignKeyConstraint(['tahun', 'no_spm'], ['ta_spm.tahun', 'ta_spm.no_spm']),) tahun = Column(Integer, nullable=False) no_spm = Column(String(50), nullable=False) no_id = Column(Integer, nullable=False) kd_urusan = Column(Integer, nullable=False) kd_bidang = Column(Integer, nullable=False) kd_unit = Column(Integer, nullable=False) kd_sub = Column(Integer, nullable=False) kd_prog = Column(Integer, nullable=False) id_prog = Column(Integer, nullable=False) kd_keg = Column(Integer, nullable=False) kd_rek_1 = Column(Integer, nullable=False) kd_rek_2 = Column(Integer, nullable=False) kd_rek_3 = Column(Integer, nullable=False) kd_rek_4 = Column(Integer, nullable=False) kd_rek_5 = Column(Integer, nullable=False) nilai = Column(Numeric, nullable=False) class SimdaSpmInfo(SipkdBase): __tablename__ = 'ta_spm_info' __table_args__ = (PrimaryKeyConstraint('tahun', 'no_spm', 'kd_pot_rek'), ForeignKeyConstraint(['tahun', 'no_spm'], ['ta_spm.tahun', 'ta_spm.no_spm']),) tahun = Column(Integer, nullable=False) no_spm = Column(String(50), nullable=False) kd_pot_rek = Column(Integer, ForeignKey("ref_pot_spm.kd_pot"), nullable=False) nilai = Column(Numeric, nullable=False) class SimdaSpmPot(SipkdBase): __tablename__ = 'ta_spm_pot' __table_args__ = (PrimaryKeyConstraint('tahun', 'no_spm', 'kd_pot_rek'), ForeignKeyConstraint(['tahun', 'no_spm'], ['ta_spm.tahun', 'ta_spm.no_spm']),) tahun = Column(Integer, nullable=False) no_spm = Column(String(50), nullable=False) kd_pot_rek = Column(Integer, ForeignKey("ref_pot_spm.kd_pot"), nullable=False) nilai = Column(Numeric, nullable=False) class SimdaRefSpmPot(SipkdBase): __tablename__ = 'ref_pot_spm' kd_pot = Column(Integer, nullable=False, primary_key=True) nm_pot = Column(String(50), nullable=False) kd_map = Column(String(6)) class SimdaSp2d(SipkdBase): __tablename__ = 'ta_sp2d' __table_args__ = (ForeignKeyConstraint(['tahun', 'no_spm'], ['ta_spm.tahun', 'ta_spm.no_spm']),) tahun = Column(Integer, nullable=False, primary_key=True) no_sp2d = Column(String(50), nullable=False, primary_key=True) no_spm = Column(String(50), nullable=False) tgl_sp2d = Column(DateTime, nullable=False) kd_bank = Column(Integer, nullable=False) no_bku = Column(Integer, nullable=False) nm_penandatangan = Column(String(50)) nip_penandatangan = Column(String(21)) jbt_penandatangan = Column(String(75)) keterangan = Column(String(255), nullable=False) spm = relationship(SimdaSpm, foreign_keys=[tahun, no_spm])
39.941176
109
0.676836
569
4,753
5.360281
0.156415
0.20459
0.220328
0.272787
0.670164
0.634426
0.560328
0.545246
0.505902
0.505902
0
0.016913
0.203871
4,753
118
110
40.279661
0.789112
0
0
0.398148
0
0
0.06753
0
0
0
0
0
0
1
0
false
0
0.037037
0
0.824074
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
b229ca91836555f8ba2fa27d11ad07160aa7a7aa
121
py
Python
src/__init__.py
joeypauls/sandbox-editor
b8d4ff7fc94e7777dd3305673a20b78f3db8f952
[ "BSD-3-Clause" ]
null
null
null
src/__init__.py
joeypauls/sandbox-editor
b8d4ff7fc94e7777dd3305673a20b78f3db8f952
[ "BSD-3-Clause" ]
null
null
null
src/__init__.py
joeypauls/sandbox-editor
b8d4ff7fc94e7777dd3305673a20b78f3db8f952
[ "BSD-3-Clause" ]
null
null
null
import os here = os.path.abspath(os.path.dirname(__file__)) os.chdir(here) def hello_world(): return "Hello World"
15.125
49
0.719008
19
121
4.315789
0.631579
0.146341
0
0
0
0
0
0
0
0
0
0
0.140496
121
7
50
17.285714
0.788462
0
0
0
0
0
0.090909
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
b260375841d00f1aa1872bd196f9dd9117c8105e
16,177
py
Python
network/network_models.py
oshopgiri/depth_sensing_navigation
80f4f82ebf77ea391f3ca9845eb45539f22df028
[ "MIT" ]
null
null
null
network/network_models.py
oshopgiri/depth_sensing_navigation
80f4f82ebf77ea391f3ca9845eb45539f22df028
[ "MIT" ]
null
null
null
network/network_models.py
oshopgiri/depth_sensing_navigation
80f4f82ebf77ea391f3ca9845eb45539f22df028
[ "MIT" ]
null
null
null
# Author: Aqeel Anwar(ICSRL) # Created: 4/14/2020, 7:15 AM # Email: aqeel.anwar@gatech.edu import tensorflow as tf import numpy as np from network.loss_functions import huber_loss, mse_loss from network.network import * from numpy import linalg as LA class initialize_network_DeepQLearning(): def __init__(self, cfg, name, vehicle_name): self.g = tf.Graph() self.vehicle_name = vehicle_name self.first_frame = True self.last_frame = [] with self.g.as_default(): stat_writer_path = cfg.network_path + self.vehicle_name + '/return_plot/' loss_writer_path = cfg.network_path + self.vehicle_name + '/loss' + name + '/' self.stat_writer = tf.summary.FileWriter(stat_writer_path) # name_array = 'D:/train/loss'+'/'+name self.loss_writer = tf.summary.FileWriter(loss_writer_path) self.env_type = cfg.env_type self.input_size = cfg.input_size self.num_actions = cfg.num_actions # Placeholders self.batch_size = tf.placeholder(tf.int32, shape=()) self.learning_rate = tf.placeholder(tf.float32, shape=()) self.X1 = tf.placeholder(tf.float32, [None, cfg.input_size, cfg.input_size, 3], name='States') # self.X = tf.image.resize_images(self.X1, (227, 227)) self.X = tf.map_fn(lambda frame: tf.image.per_image_standardization(frame), self.X1) self.target = tf.placeholder(tf.float32, shape=[None], name='Qvals') self.actions = tf.placeholder(tf.int32, shape=[None], name='Actions') # self.model = AlexNetDuel(self.X, cfg.num_actions, cfg.train_fc) self.model = C3F2(self.X, cfg.num_actions, cfg.train_fc) self.predict = self.model.output ind = tf.one_hot(self.actions, cfg.num_actions) pred_Q = tf.reduce_sum(tf.multiply(self.model.output, ind), axis=1) self.loss = huber_loss(pred_Q, self.target) self.train = tf.train.AdamOptimizer(learning_rate=self.learning_rate, beta1=0.9, beta2=0.99).minimize( self.loss, name="train") self.sess = tf.InteractiveSession() tf.global_variables_initializer().run() tf.local_variables_initializer().run() self.saver = tf.train.Saver() self.all_vars = tf.trainable_variables() self.sess.graph.finalize() # Load custom weights from custom_load_path if required if cfg.custom_load: print('Loading weights from: ', cfg.custom_load_path) self.load_network(cfg.custom_load_path) def get_vars(self): return self.sess.run(self.all_vars) def initialize_graphs_with_average(self, agent, agent_on_same_network): values = {} var = {} all_assign = {} for name_agent in agent_on_same_network: values[name_agent] = agent[name_agent].network_model.get_vars() var[name_agent] = agent[name_agent].network_model.all_vars all_assign[name_agent] = [] for i in range(len(values[name_agent])): val = [] for name_agent in agent_on_same_network: val.append(values[name_agent][i]) # Take mean here mean_val = np.average(val, axis=0) for name_agent in agent_on_same_network: # all_assign[name_agent].append(tf.assign(var[name_agent][i], mean_val)) var[name_agent][i].load(mean_val, agent[name_agent].network_model.sess) def Q_val(self, xs): target = np.zeros(shape=[xs.shape[0]], dtype=np.float32) actions = np.zeros(dtype=int, shape=[xs.shape[0]]) return self.sess.run(self.predict, feed_dict={self.batch_size: xs.shape[0], self.learning_rate: 0, self.X1: xs, self.target: target, self.actions: actions}) def train_n(self, xs, ys, actions, batch_size, dropout_rate, lr, epsilon, iter): _, loss, Q = self.sess.run([self.train, self.loss, self.predict], feed_dict={self.batch_size: batch_size, self.learning_rate: lr, self.X1: xs, self.target: ys, self.actions: actions}) meanQ = np.mean(Q) maxQ = np.max(Q) # Log to tensorboard self.log_to_tensorboard(tag='Loss', group=self.vehicle_name, value=LA.norm(loss) / batch_size, index=iter) self.log_to_tensorboard(tag='Epsilon', group=self.vehicle_name, value=epsilon, index=iter) self.log_to_tensorboard(tag='Learning Rate', group=self.vehicle_name, value=lr, index=iter) self.log_to_tensorboard(tag='MeanQ', group=self.vehicle_name, value=meanQ, index=iter) self.log_to_tensorboard(tag='MaxQ', group=self.vehicle_name, value=maxQ, index=iter) def action_selection(self, state): target = np.zeros(shape=[state.shape[0]], dtype=np.float32) actions = np.zeros(dtype=int, shape=[state.shape[0]]) qvals = self.sess.run(self.predict, feed_dict={self.batch_size: state.shape[0], self.learning_rate: 0.0001, self.X1: state, self.target: target, self.actions: actions}) if qvals.shape[0] > 1: # Evaluating batch action = np.argmax(qvals, axis=1) else: # Evaluating one sample action = np.zeros(1) action[0] = np.argmax(qvals) return action.astype(int) def log_to_tensorboard(self, tag, group, value, index): summary = tf.Summary() tag = group + '/' + tag summary.value.add(tag=tag, simple_value=value) self.stat_writer.add_summary(summary, index) def save_network(self, save_path, episode=''): save_path = save_path + self.vehicle_name + '/' + self.vehicle_name + '_' + str(episode) self.saver.save(self.sess, save_path) print('Model Saved: ', save_path) def load_network(self, load_path): self.saver.restore(self.sess, load_path) def get_weights(self): xs = np.zeros(shape=(32, 227, 227, 3)) actions = np.zeros(dtype=int, shape=[xs.shape[0]]) ys = np.zeros(shape=[xs.shape[0]], dtype=np.float32) return self.sess.run(self.weights, feed_dict={self.batch_size: xs.shape[0], self.learning_rate: 0, self.X1: xs, self.target: ys, self.actions: actions}) ########################################################################### # DeepREINFORCE: Class ########################################################################### class initialize_network_DeepREINFORCE(): def __init__(self, cfg, name, vehicle_name): self.g = tf.Graph() self.vehicle_name = vehicle_name self.iter_baseline = 0 self.iter_policy = 0 self.first_frame = True self.last_frame = [] self.iter_combined = 0 with self.g.as_default(): stat_writer_path = cfg.network_path + self.vehicle_name + '/return_plot/' loss_writer_path = cfg.network_path + self.vehicle_name + '/loss' + name + '/' self.stat_writer = tf.summary.FileWriter(stat_writer_path) # name_array = 'D:/train/loss'+'/'+name self.loss_writer = tf.summary.FileWriter(loss_writer_path) self.env_type = cfg.env_type self.input_size = cfg.input_size self.num_actions = cfg.num_actions # Placeholders self.batch_size = tf.placeholder(tf.int32, shape=()) self.learning_rate = tf.placeholder(tf.float32, shape=()) self.X1 = tf.placeholder(tf.float32, [None, cfg.input_size, cfg.input_size, 3], name='States') # self.X = tf.image.resize_images(self.X1, (227, 227)) self.X = tf.map_fn(lambda frame: tf.image.per_image_standardization(frame), self.X1) # self.target = tf.placeholder(tf.float32, shape=[None], name='action_probs') # self.target_baseline = tf.placeholder(tf.float32, shape=[None], name='baseline') self.actions = tf.placeholder(tf.int32, shape=[None, 1], name='Actions') self.G = tf.placeholder(tf.float32, shape=[None, 1], name='G') self.B = tf.placeholder(tf.float32, shape=[None, 1], name='B') # Select the deep network self.model = C3F2_REINFORCE_with_baseline(self.X, cfg.num_actions, cfg.train_fc) self.predict = self.model.output self.baseline = self.model.baseline self.ind = tf.one_hot(tf.squeeze(self.actions), cfg.num_actions) self.prob_action = tf.reduce_sum(tf.multiply(self.predict, self.ind), axis=1) loss_policy = tf.reduce_mean(tf.log(tf.transpose([self.prob_action])) * (self.G - self.B)) loss_entropy = -tf.reduce_mean(tf.multiply((tf.log(self.predict) + 1e-8), self.predict)) self.loss_main = -loss_policy - .2 * loss_entropy self.loss_branch = mse_loss(self.baseline, self.G) self.train_main = tf.train.AdamOptimizer(learning_rate=self.learning_rate, beta1=0.9, beta2=0.99).minimize( self.loss_main, name="train_main") self.train_branch = tf.train.AdamOptimizer(learning_rate=self.learning_rate, beta1=0.9, beta2=0.99).minimize( self.loss_branch, name="train_branch") # self.train_combined = tf.train.AdamOptimizer(learning_rate=self.learning_rate, beta1=0.9, # beta2=0.99).minimize( # self.loss_combined, name="train_combined") self.sess = tf.InteractiveSession() tf.global_variables_initializer().run() tf.local_variables_initializer().run() self.saver = tf.train.Saver() self.all_vars = tf.trainable_variables() self.sess.graph.finalize() # Load custom weights from custom_load_path if required if cfg.custom_load: print('Loading weights from: ', cfg.custom_load_path) self.load_network(cfg.custom_load_path) def get_vars(self): return self.sess.run(self.all_vars) def initialize_graphs_with_average(self, agent, agent_on_same_network): values = {} var = {} all_assign = {} for name_agent in agent_on_same_network: values[name_agent] = agent[name_agent].network_model.get_vars() var[name_agent] = agent[name_agent].network_model.all_vars all_assign[name_agent] = [] for i in range(len(values[name_agent])): val = [] for name_agent in agent_on_same_network: val.append(values[name_agent][i]) # Take mean here mean_val = np.average(val, axis=0) for name_agent in agent_on_same_network: # all_assign[name_agent].append(tf.assign(var[name_agent][i], mean_val)) var[name_agent][i].load(mean_val, agent[name_agent].network_model.sess) def prob_actions(self, xs): G = np.zeros(shape=[1], dtype=np.float32) B = np.zeros(shape=[1], dtype=np.float32) actions = np.zeros(dtype=int, shape=[xs.shape[0]]) return self.sess.run(self.predict, feed_dict={self.batch_size: xs.shape[0], self.learning_rate: 0, self.X1: xs, self.actions: actions, self.B: B, self.G: G}) def train_baseline(self, xs, G, actions, lr, iter): self.iter_baseline += 1 batch_size = xs.shape[0] B = np.zeros(shape=[xs.shape[0], 1], dtype=np.float32) _, loss, baseline_val = self.sess.run([self.train_branch, self.loss_branch, self.baseline], feed_dict={self.batch_size: xs.shape[0], self.learning_rate: lr, self.X1: xs, self.actions: actions, self.B: B, self.G: G}) max_baseline = np.max(baseline_val) # Log to tensorboard self.log_to_tensorboard(tag='Loss_Baseline', group=self.vehicle_name, value=loss / batch_size, index=self.iter_baseline) # self.log_to_tensorboard(tag='Epsilon', group=self.vehicle_name, value=epsilon, index=iter) self.log_to_tensorboard(tag='Learning Rate', group=self.vehicle_name, value=lr, index=self.iter_baseline) # self.log_to_tensorboard(tag='MeanQ', group=self.vehicle_name, value=meanQ, index=iter) self.log_to_tensorboard(tag='Max_baseline', group=self.vehicle_name, value=max_baseline, index=self.iter_baseline) return baseline_val def get_baseline(self, xs): lr = 0 actions = np.zeros(dtype=int, shape=[xs.shape[0], 1]) B = np.zeros(shape=[xs.shape[0], 1], dtype=np.float32) G = np.zeros(shape=[xs.shape[0], 1], dtype=np.float32) baseline = self.sess.run(self.baseline, feed_dict={self.batch_size: xs.shape[0], self.learning_rate: lr, self.X1: xs, self.actions: actions, self.B: B, self.G: G}) return baseline def train_policy(self, xs, actions, B, G, lr, iter): self.iter_policy += 1 batch_size = xs.shape[0] train_eval = self.train_main loss_eval = self.loss_main predict_eval = self.predict _, loss, ProbActions = self.sess.run([train_eval, loss_eval, predict_eval], feed_dict={self.batch_size: xs.shape[0], self.learning_rate: lr, self.X1: xs, self.actions: actions, self.B: B, self.G: G}) MaxProbActions = np.max(ProbActions) # Log to tensorboard self.log_to_tensorboard(tag='Loss_Policy', group=self.vehicle_name, value=LA.norm(loss) / batch_size, index=self.iter_policy) self.log_to_tensorboard(tag='Learning Rate', group=self.vehicle_name, value=lr, index=self.iter_policy) self.log_to_tensorboard(tag='MaxProb', group=self.vehicle_name, value=MaxProbActions, index=self.iter_policy) def action_selection(self, state): action = np.zeros(dtype=int, shape=[state.shape[0], 1]) probs = self.sess.run(self.predict, feed_dict={self.batch_size: state.shape[0], self.learning_rate: 0.0001, self.X1: state, self.actions: action}) for j in range(probs.shape[0]): action[j] = np.random.choice(self.num_actions, 1, p=probs[j])[0] return action.astype(int) def log_to_tensorboard(self, tag, group, value, index): summary = tf.Summary() tag = group + '/' + tag summary.value.add(tag=tag, simple_value=value) self.stat_writer.add_summary(summary, index) def save_network(self, save_path, episode=''): save_path = save_path + self.vehicle_name + '/' + self.vehicle_name + '_' + str(episode) self.saver.save(self.sess, save_path) print('Model Saved: ', save_path) def load_network(self, load_path): self.saver.restore(self.sess, load_path)
45.441011
119
0.572912
2,011
16,177
4.411238
0.105917
0.028407
0.038891
0.029309
0.790328
0.766204
0.741517
0.722016
0.698117
0.652012
0
0.016659
0.302405
16,177
355
120
45.569014
0.769428
0.081226
0
0.626016
0
0
0.018809
0
0
0
0
0
0
1
0.085366
false
0
0.020325
0.00813
0.150407
0.01626
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b26b10cd196ec2fcfed1232182c377221b62edeb
1,868
py
Python
galaxychop/dataset/__init__.py
vcristiani/galaxy-chop
6a854ee8701001ab0f15d6b0112401c123d0c6b2
[ "MIT" ]
6
2020-09-25T19:31:52.000Z
2021-10-09T19:47:46.000Z
galaxychop/dataset/__init__.py
vcristiani/galaxy-chop
6a854ee8701001ab0f15d6b0112401c123d0c6b2
[ "MIT" ]
98
2020-10-05T20:52:22.000Z
2022-02-11T15:28:43.000Z
galaxychop/dataset/__init__.py
vcristiani/galaxy-chop
6a854ee8701001ab0f15d6b0112401c123d0c6b2
[ "MIT" ]
1
2022-01-17T23:07:33.000Z
2022-01-17T23:07:33.000Z
# This file is part of # the galxy-chop project (https://github.com/vcristiani/galaxy-chop) # Copyright (c) 2020, Valeria Cristiani # License: MIT # Full Text: https://github.com/vcristiani/galaxy-chop/blob/master/LICENSE.txt """Load tutorial files Module.""" # ##################################################### # IMPORTS # ##################################################### import os from pathlib import Path import numpy as np # ============================================================================= # PATHS # ============================================================================= PATH = Path(os.path.abspath(os.path.dirname(__file__))) # ##################################################### # FUNCTIONS # ##################################################### def load_star(): """Input for testing.""" path = PATH / "star.dat" return np.loadtxt(path) def load_dark(): """Input for testing.""" path = PATH / "dark.dat" return np.loadtxt(path) def load_gas(): """Input for testing.""" path = PATH / "gas_.dat" return np.loadtxt(path) def load_star_394242(): """Input for testing.""" path = PATH / "star_ID_394242.npy" return np.load(path) def load_dark_394242(): """Input for testing.""" path = PATH / "dark_ID_394242.npy" return np.load(path) def load_gas_394242(): """Input for testing.""" path = PATH / "gas_ID_394242.npy" return np.load(path) def load_pot_star_394242(): """Input for testing.""" path = PATH / "potential_star_ID_394242.npy" return np.load(path) def load_pot_dark_394242(): """Input for testing.""" path = PATH / "potential_dark_ID_394242.npy" return np.load(path) def load_pot_gas_394242(): """Input for testing.""" path = PATH / "potential_gas_ID_394242.npy" return np.load(path)
20.304348
79
0.519807
210
1,868
4.442857
0.27619
0.085745
0.144695
0.18328
0.735263
0.735263
0.576635
0.244373
0.209003
0.209003
0
0.048812
0.166488
1,868
91
80
20.527473
0.550417
0.320128
0
0.290323
0
0
0.161128
0.083585
0
0
0
0
0
1
0.290323
false
0
0.096774
0
0.677419
0
0
0
0
null
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
b2804185fe9d840edc2c55a2884879b1f3d717bd
169
py
Python
Python/Numpy/Easy/Zeros and Ones/zerosonee.py
navjindervirdee/hackerrank
d0d0f77f770e4b092440a15f2740f63b65deb60b
[ "MIT" ]
2
2017-10-12T13:28:42.000Z
2020-07-28T11:25:05.000Z
Python/Numpy/Easy/Zeros and Ones/zerosonee.py
navjindervirdee/hackerrank
d0d0f77f770e4b092440a15f2740f63b65deb60b
[ "MIT" ]
null
null
null
Python/Numpy/Easy/Zeros and Ones/zerosonee.py
navjindervirdee/hackerrank
d0d0f77f770e4b092440a15f2740f63b65deb60b
[ "MIT" ]
5
2018-02-05T21:53:18.000Z
2021-10-03T06:27:45.000Z
import numpy as np shape = tuple(map(int,input().strip().split())) zeros = np.zeros(shape,dtype=np.int32) ones = np.ones(shape,dtype=np.int32) print(zeros) print(ones)
21.125
47
0.715976
29
169
4.172414
0.551724
0.165289
0.198347
0.280992
0
0
0
0
0
0
0
0.026144
0.094675
169
7
48
24.142857
0.764706
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.333333
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
b289c5b3bcd8430b11427dd9fa1d7f3ff593af41
28
py
Python
custom_components/wort_des_tages/__init__.py
Ludy87/astra_germany_wort_des_tages
c5da8b57bfe3cd4638d304c8cea4af1dbb19d0fc
[ "MIT" ]
null
null
null
custom_components/wort_des_tages/__init__.py
Ludy87/astra_germany_wort_des_tages
c5da8b57bfe3cd4638d304c8cea4af1dbb19d0fc
[ "MIT" ]
null
null
null
custom_components/wort_des_tages/__init__.py
Ludy87/astra_germany_wort_des_tages
c5da8b57bfe3cd4638d304c8cea4af1dbb19d0fc
[ "MIT" ]
null
null
null
"""Wort des Tages Sensor."""
28
28
0.642857
4
28
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.107143
28
1
28
28
0.72
0.785714
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b2a6d9e0f643a91987b8343b7bbd608814ec17df
34,825
py
Python
Features/Analyse_IR_Command.py
Fionnoch/TV-Relay-PyQt5
657d4cfe5626364db68d6ca530ebef4ed4381a15
[ "MIT" ]
null
null
null
Features/Analyse_IR_Command.py
Fionnoch/TV-Relay-PyQt5
657d4cfe5626364db68d6ca530ebef4ed4381a15
[ "MIT" ]
null
null
null
Features/Analyse_IR_Command.py
Fionnoch/TV-Relay-PyQt5
657d4cfe5626364db68d6ca530ebef4ed4381a15
[ "MIT" ]
null
null
null
import numpy as np #these are commands taken from noting on off times however this needs to be automated up1 = [0.0042328250128775835, 0.004402360995300114, 0.0006506040226668119, 0.0015164930373430252, 0.0007461849600076675, 0.0015520340530201793, 0.0005174840334802866, 0.001726362039335072, 0.0004908168921247125, 0.0007498929044231772, 0.0005441079847514629, 0.0005015679635107517, 0.000501818023622036, 0.0004861509660258889, 0.0007358930306509137, 0.0004907350521534681, 0.0005868570879101753, 0.0004303610185161233, 0.0005750650307163596, 0.0017712349072098732, 0.0005280250916257501, 0.0016786130145192146, 0.0005001510726287961, 0.0017166539328172803, 0.0004876510938629508, 0.0004890259588137269, 0.0006176470778882504, 0.0005106920143589377, 0.0004951090086251497, 0.0007391850231215358, 0.0004928179550915956, 0.0004878180334344506, 0.000767142977565527, 0.0002751159481704235, 0.0007655599620193243, 0.0004912759177386761, 0.0005001929821446538, 0.00048644293565303087, 0.0007440589834004641, 0.0004918599734082818, 0.0005858979420736432, 0.0005126079777255654, 0.0004946510307490826, 0.0004936930490657687, 0.0007292269729077816, 0.001501660910435021, 0.0005250669782981277, 0.0017380699282512069, 0.0005045259604230523, 0.0007408930687233806, 0.000529648968949914, 0.0014889950398355722, 0.0007538100471720099, 0.001668988959863782, 0.0005226499633863568, 0.0015223269583657384, 0.0007419351022690535, 0.0016125739784911275, 0.0005171500379219651, 0.0017277790466323495, 0.000489110010676086, 0.0004895259626209736, 0.0005525660235434771, 0.0005081510171294212, 0.0007381848990917206, 0.0014685789356008172, 0.0007334770634770393] up2 = [0.004342613043263555, 0.004348653950728476, 0.0007725169416517019, 0.0015468669589608908, 0.0004888600669801235, 0.0017591940704733133, 0.0005482330452650785, 0.0014511620393022895, 0.0007215599762275815, 0.0004794429987668991, 0.0004792769905179739, 0.0005870229797437787, 0.000737476977519691, 0.0004835679428651929, 0.0004871099954470992, 0.00048210902605205774, 0.0007220190018415451, 0.0004804020281881094, 0.0005480659892782569, 0.0017792349681258202, 0.0005049430765211582, 0.0016208660090342164, 0.0005985649768263102, 0.0014954940415918827, 0.0007319350261241198, 0.0005983139853924513, 0.0004135699709877372, 0.0005955229280516505, 0.0005139010027050972, 0.0004982759710401297, 0.0007411850383505225, 0.0004854429280385375, 0.0004994010087102652, 0.0004909849958494306, 0.0005864390404894948, 0.0005020260578021407, 0.0007375179557129741, 0.0004841929767280817, 0.0004798590671271086, 0.00048523489385843277, 0.0007165609858930111, 0.0006308549782261252, 0.0004922338994219899, 0.00048160902224481106, 0.0004776099231094122, 0.001675614039413631, 0.0007830590475350618, 0.0015098690055310726, 0.0005016090581193566, 0.0007206440204754472, 0.0004806929500773549, 0.0015861580614000559, 0.0007234360091388226, 0.0014389539137482643, 0.0007823089836165309, 0.0014893689658492804, 0.000722976983524859, 0.001430455013178289, 0.0005726070376113057, 0.0016972379526123405, 0.0007128099678084254, 0.0004773190012201667, 0.000490234000608325, 0.0005332749569788575, 0.0007346440106630325, 0.001437745988368988, 0.0007196859223768115] up3 = [0.004289948032237589, 0.004526524106040597, 0.0005169420037418604, 0.0015418679686263204, 0.0007273930823430419, 0.0014387039700523019, 0.0007558509241789579, 0.001527619082480669, 0.000724768964573741, 0.0004876099992543459, 0.00048344291280955076, 0.00048215093556791544, 0.0006053979741409421, 0.0005134419770911336, 0.0007400190224871039, 0.0004944850225001574, 0.00048327597323805094, 0.00048581790179014206, 0.0007166019640862942, 0.0015827000606805086, 0.0005097339162603021, 0.0016969469143077731, 0.0005637319991365075, 0.0017108209431171417, 0.0004835680592805147, 0.00047652702778577805, 0.0007261439459398389, 0.0005222749896347523, 0.0005182760069146752, 0.0004985680570825934, 0.0007318930001929402, 0.0004798190202564001, 0.00048265198711305857, 0.00048031797632575035, 0.0008096819510683417, 0.0005396080669015646, 0.0005060669500380754, 0.0004969419678673148, 0.00048210995737463236, 0.00048331799916923046, 0.0007160189561545849, 0.00048627599608153105, 0.0005300251068547368, 0.0004905679961666465, 0.0007253109943121672, 0.0016914039151743054, 0.00048473395872861147, 0.0015848249895498157, 0.0005063589196652174, 0.0007282269652932882, 0.0004850259283557534, 0.0017166960751637816, 0.0004889010451734066, 0.0016809470253065228, 0.00048152601812034845, 0.0017508609453216195, 0.000487983925268054, 0.0016790300142019987, 0.0004927759291604161, 0.0017699860036373138, 0.000490942969918251, 0.0007190610049292445, 0.00048331799916923046, 0.0004858180182054639, 0.0005367329576984048, 0.0017034050542861223, 0.00048198411241173744] down1 = [0.00436965306289494, 0.00435190403368324, 0.0006680209189653397, 0.0015353680355474353, 0.0004829849349334836, 0.0018091090023517609, 0.0004947340348735452, 0.001672780024819076, 0.00047719397116452456, 0.0007647679885849357, 0.0005257750162854791, 0.0004921510117128491, 0.000485943048261106, 0.0004826509393751621, 0.000717935967259109, 0.0004835679428651929, 0.0004812349798157811, 0.0005551490467041731, 0.0004988599102944136, 0.001939231064170599, 0.000557232997380197, 0.0015520340530201793, 0.0004924009554088116, 0.001682113972492516, 0.0004817349836230278, 0.0008432650938630104, 0.0002584499306976795, 0.0007287680637091398, 0.0004911100259050727, 0.00047669303603470325, 0.0007153520127758384, 0.0004811519756913185, 0.0005221919855102897, 0.0005270669935271144, 0.0004900679923593998, 0.0016631560865789652, 0.0007182690314948559, 0.00047869305126369, 0.0005272750277072191, 0.0004902350483462214, 0.0007268100744113326, 0.000477610039524734, 0.0004854010185226798, 0.0007223109714686871, 0.0004824430216103792, 0.0017281119944527745, 0.0004828600212931633, 0.0017488199518993497, 0.0005723570939153433, 0.0005014010239392519, 0.00048736005555838346, 0.0004824839998036623, 0.0007123099640011787, 0.0017174460226669908, 0.0005076510133221745, 0.0016790720401331782, 0.00047948502469807863, 0.001766944071277976, 0.00048219296149909496, 0.001675906009040773, 0.0008077240781858563, 0.0005901060067117214, 0.000545607996173203, 0.0004781510215252638, 0.00047435995656996965, 0.0015631589340046048, 0.0005264839855954051] down2 = [0.004171702079474926, 0.004558981047011912, 0.0006627700058743358, 0.001505495049059391, 0.0005526910535991192, 0.0015894080279394984, 0.0007370189996436238, 0.0014492450281977654, 0.0005790649447590113, 0.0005124839954078197, 0.0007422689814120531, 0.0004812759580090642, 0.0004835260333493352, 0.0007192280609160662, 0.0004861090565100312, 0.0005886070430278778, 0.0005016929935663939, 0.0004937349585816264, 0.0007250180933624506, 0.0014900360256433487, 0.000559399020858109, 0.0017421121010556817, 0.00048690091352909803, 0.0017559860134497285, 0.0005018169758841395, 0.000484527088701725, 0.0007257680408656597, 0.00048319308552891016, 0.0004812339320778847, 0.00047790200915187597, 0.0007511010626330972, 0.0005047760205343366, 0.0004903179360553622, 0.0004853180143982172, 0.0007159360684454441, 0.001706488081254065, 0.0005013180198147893, 0.00048606807831674814, 0.0004841509507969022, 0.000722976983524859, 0.0004826940130442381, 0.0004756939597427845, 0.000716143986210227, 0.0005412750178948045, 0.000496608903631568, 0.0016766969347372651, 0.00048277596943080425, 0.0016224069986492395, 0.0007416430162265897, 0.0004872760036960244, 0.0004776519490405917, 0.00048610998783260584, 0.0007233519572764635, 0.0015236599138006568, 0.0007264359155669808, 0.00144307897426188, 0.0009044299367815256, 0.0014983690343797207, 0.0004818589659407735, 0.0016868209931999445, 0.0005577319534495473, 0.000496859080158174, 0.0007296439725905657, 0.0004793599946424365, 0.0004818598972633481, 0.0017499870155006647, 0.0004999430384486914] down3 = [0.004308364004828036, 0.004740517004393041, 0.0002971569774672389, 0.001693321974016726, 0.000502775888890028, 0.0016777380369603634, 0.0007148110307753086, 0.0016605310374870896, 0.0004814009880647063, 0.00048548507038503885, 0.000719018978998065, 0.0004803600022569299, 0.0004826509393751621, 0.0006478539435192943, 0.0004955260083079338, 0.00048615189734846354, 0.0007204359862953424, 0.00047956802882254124, 0.00047531898599117994, 0.0018244419479742646, 0.0005056919762864709, 0.00167823804076761, 0.0004756100242957473, 0.001768611022271216, 0.0004826509393751621, 0.0004834849387407303, 0.0007166441064327955, 0.00047498499043285847, 0.0005251910770311952, 0.0005008169682696462, 0.0007209769682958722, 0.00047744298353791237, 0.0004781930474564433, 0.0004768599756062031, 0.0007092279847711325, 0.0015071600209921598, 0.0007294770330190659, 0.00047131895553320646, 0.00047844299115240574, 0.0007139360532164574, 0.00048127700574696064, 0.0005557750118896365, 0.0004816938890144229, 0.0007132269674912095, 0.0004770269151777029, 0.001660780981183052, 0.0005280249752104282, 0.0017591529758647084, 0.00047981797251850367, 0.00048081809654831886, 0.0007177280494943261, 0.0005645659985020757, 0.0004934009630233049, 0.0016614480409771204, 0.0004834430292248726, 0.0017521110130473971, 0.0005010680761188269, 0.0016896140296012163, 0.0004769429797306657, 0.0017867760034278035, 0.000487983925268054, 0.0004787349607795477, 0.0007211850024759769, 0.00048019306268543005, 0.0004762350581586361, 0.0017587780021131039, 0.00048102601431310177] left1 = [0.004411194007843733, 0.004468025988899171, 0.00044602807611227036, 0.0017979010008275509, 0.0004883600631728768, 0.001796610071323812, 0.000511318095959723, 0.0017009880393743515, 0.0004939429927617311, 0.00048619299195706844, 0.000568899093195796, 0.0005057749804109335, 0.0007404759526252747, 0.0004891090793535113, 0.0004872760036960244, 0.0004836099687963724, 0.000718727009370923, 0.0005424410337582231, 0.0005133169470354915, 0.001758861937560141, 0.0005129430210217834, 0.0015437849797308445, 0.0004941510269418359, 0.001690029981546104, 0.0005119009874761105, 0.0007669338956475258, 0.0005378579953685403, 0.0005012340843677521, 0.0004978170618414879, 0.0004864430520683527, 0.0007258940022438765, 0.0004842759808525443, 0.0004888599505648017, 0.000579564948566258, 0.0005036919610574841, 0.0016930709825828671, 0.0004925259854644537, 0.0007249349728226662, 0.0005309419939294457, 0.0017196950502693653, 0.0004910259740427136, 0.00048685900401324034, 0.0004879009211435914, 0.0007945159450173378, 0.0005109009798616171, 0.0014637029962614179, 0.0007910580607131124, 0.0015589098911732435, 0.0005011509638279676, 0.0004951090086251497, 0.0007283519953489304, 0.0004845680668950081, 0.00047781807370483875, 0.0017710690153762698, 0.0004921510117128491, 0.0004971090238541365, 0.0007294350070878863, 0.001535826944746077, 0.0004949839785695076, 0.0017109049949795008, 0.000486567965708673, 0.0007271430222317576, 0.0005391499726101756, 0.0005022749537602067, 0.0004949430003762245, 0.0016984459944069386, 0.00048269296530634165] left2 = [0.004380361991934478, 0.004422942991368473, 0.0005615230184048414, 0.001478660968132317, 0.000729143968783319, 0.0015642839716747403, 0.0005039840470999479, 0.0017033630283549428, 0.0006102720508351922, 0.0005876061040908098, 0.0005056930240243673, 0.0004943179665133357, 0.0004936509067192674, 0.000722685013897717, 0.0004935679025948048, 0.0004789429949596524, 0.0006248960271477699, 0.0005054010543972254, 0.0004940680228173733, 0.0017291540279984474, 0.0005134419770911336, 0.0017833600286394358, 0.0004876920720562339, 0.001677029998973012, 0.0005645239725708961, 0.0004922350635752082, 0.0007296849507838488, 0.0004894430749118328, 0.00048202695325016975, 0.00048506795428693295, 0.0007360189920291305, 0.0005288579268381, 0.000534399994648993, 0.0004970680456608534, 0.0004918590420857072, 0.0016815300332382321, 0.0007900999626144767, 0.0002552419900894165, 0.0008928879396989942, 0.0015544090420007706, 0.0004932759329676628, 0.0005867310101166368, 0.0005460239481180906, 0.0004978590877726674, 0.0004943179665133357, 0.001701862900517881, 0.0005465249996632338, 0.0017780270427465439, 0.0004894019803032279, 0.00048569298814982176, 0.0004912759177386761, 0.0007230599876493216, 0.0006087729707360268, 0.001481953077018261, 0.0007316849660128355, 0.0004857350140810013, 0.00048327608965337276, 0.0015619919868186116, 0.0007231860654428601, 0.0018156920559704304, 0.00034153100568801165, 0.0005535240052267909, 0.0005070260958746076, 0.0004964841064065695, 0.0007307269843295217, 0.0017851939192041755, 0.0005169839132577181] left3 = [0.0043522369815036654, 0.0044757750583812594, 0.0004988180007785559, 0.0015819499967619777, 0.000493567087687552, 0.0016949049895629287, 0.0007986829150468111, 0.00147970300167799, 0.0004933589370921254, 0.0007281020516529679, 0.0004859429318457842, 0.0005723569775000215, 0.0005276090232655406, 0.000491234939545393, 0.0004916100297123194, 0.0007341849850490689, 0.0004787769867107272, 0.0004937340272590518, 0.0007543510291725397, 0.0015588670503348112, 0.0005142330192029476, 0.0017029050504788756, 0.0005785649409517646, 0.001705738017335534, 0.0004805270582437515, 0.00048556807450950146, 0.0004918179474771023, 0.0007808090886101127, 0.0004984419792890549, 0.00048619299195706844, 0.0004846099764108658, 0.0007251439383253455, 0.00048331799916923046, 0.00048123509623110294, 0.0005303989164531231, 0.0017361530335620046, 0.0004911510040983558, 0.0004843589849770069, 0.0007256439421325922, 0.001564783975481987, 0.0007348099024966359, 0.0004876090679317713, 0.0005266920197755098, 0.0005160670261830091, 0.0004860679619014263, 0.0017686939099803567, 0.0005304829683154821, 0.0017257370054721832, 0.0005288999527692795, 0.000487359007820487, 0.0004806929500773549, 0.000720101990737021, 0.0004813179839402437, 0.0017439860384911299, 0.0005039839306846261, 0.0004909849958494306, 0.0004871510900557041, 0.0016996960621327162, 0.0008183489553630352, 0.0014672869583591819, 0.0004893590230494738, 0.0007196851074695587, 0.0004799010930582881, 0.0005119009874761105, 0.0005172759993001819, 0.0017091130139306188, 0.0004878180334344506] right1 = [0.004143967991694808, 0.004556915024295449, 0.0005152769153937697, 0.0018216579919680953, 0.0005556510295718908, 0.0014744589570909739, 0.0007349379593506455, 0.0015654150629416108, 0.0004919029306620359, 0.0004965700209140778, 0.0007304380415007472, 0.0004843199858441949, 0.00048427795991301537, 0.0007748950738459826, 0.0005125689785927534, 0.0004916120087727904, 0.0004919859347864985, 0.0004905690439045429, 0.0007312709931284189, 0.0015738310758024454, 0.0005265269428491592, 0.0017285350477322936, 0.0004884450463578105, 0.001571955974213779, 0.0007353129331022501, 0.000483277952298522, 0.0004931950243189931, 0.000726854894310236, 0.0004951530136168003, 0.0005391520680859685, 0.0005027359584346414, 0.000491610961034894, 0.0007301460718736053, 0.0004937360063195229, 0.0004854040453210473, 0.0004900280619040132, 0.0008262270130217075, 0.001487332978285849, 0.0004910690477117896, 0.00048827799037098885, 0.000724105047993362, 0.0005132360383868217, 0.0005245270440354943, 0.0005002360558137298, 0.0007261880673468113, 0.0014506669249385595, 0.0007832699920982122, 0.0015565810026600957, 0.0004906529793515801, 0.0007306460756808519, 0.0004826539661735296, 0.0016577040078118443, 0.0004860699409618974, 0.0004806120414286852, 0.0007251050556078553, 0.001537290052510798, 0.0007556870114058256, 0.0014645010232925415, 0.0007286469917744398, 0.0017545759910717607, 0.0002903669374063611, 0.0005189439980313182, 0.0007411049446091056, 0.0004913610173389316, 0.0004866949748247862, 0.001590539002791047, 0.0007315210532397032] right2 =[0.004346086992882192, 0.004325921065174043, 0.0005010270979255438, 0.0018171159317716956, 0.0005010280292481184, 0.0017198680434376001, 0.00048632000107318163, 0.0015693309251219034, 0.0007447300013154745, 0.000499943969771266, 0.0004914440214633942, 0.0004929029382765293, 0.0007298128912225366, 0.00036636495497077703, 0.000755936955101788, 0.00048765295650810003, 0.00048598600551486015, 0.0004873609868809581, 0.0006294399499893188, 0.0016158720245584846, 0.000532901962287724, 0.0016963690286502242, 0.0007294799434021115, 0.001550999004393816, 0.00048752804286777973, 0.0007252709474414587, 0.0004907780094072223, 0.0004847790114581585, 0.00048298598267138004, 0.0005338179180398583, 0.0007358959410339594, 0.0004925280809402466, 0.0004826110089197755, 0.0007291050860658288, 0.0004838199820369482, 0.0004891110584139824, 0.0006526489742100239, 0.0014767509419471025, 0.0007294380338862538, 0.00048694503493607044, 0.00048577901907265186, 0.0005806500557810068, 0.0005105279851704836, 0.0007367709185928106, 0.0004897780017927289, 0.0016964939422905445, 0.0005164020694792271, 0.001541998004540801, 0.0007286049658432603, 0.00048465305007994175, 0.0004931529983878136, 0.0017759919865056872, 0.00048694503493607044, 0.0004871530691161752, 0.0007187720621004701, 0.00152637402061373, 0.0007306470070034266, 0.0014581260038539767, 0.0007311049848794937, 0.0015109999803826213, 0.000722187920473516, 0.0004856949672102928, 0.00048527796752750874, 0.0004806120414286852, 0.0007278959965333343, 0.0015854970552027225, 0.0005240680184215307] right3 =[0.004327670903876424, 0.004697368945926428, 0.0002889919560402632, 0.0017262439941987395, 0.0006019410211592913, 0.001508207991719246, 0.0007296459516510367, 0.0018487399211153388, 0.0002566600451245904, 0.0004972780589014292, 0.000730187981389463, 0.00048107001930475235, 0.00047819502651691437, 0.000717896968126297, 0.0005274020368233323, 0.0005097350804135203, 0.0004905699752271175, 0.0004836530424654484, 0.0007198960520327091, 0.0018245739629492164, 0.00026603403966873884, 0.0016869530081748962, 0.0007146050920709968, 0.0017016609199345112, 0.0005094020161777735, 0.0005007360596209764, 0.0004938199417665601, 0.0004866949748247862, 0.0007226050365716219, 0.0004798609297722578, 0.0005267360247671604, 0.0004888619296252728, 0.0007253959774971008, 0.00047140405513346195, 0.0004820280009880662, 0.0004808619851246476, 0.0007200639229267836, 0.001501083024777472, 0.0007167720468714833, 0.0004778619622811675, 0.00048636109568178654, 0.0007176470244303346, 0.00056910899002105, 0.0005014858907088637, 0.0004821530310437083, 0.0016691199271008372, 0.0007195209618657827, 0.0015576230362057686, 0.0004853189457207918, 0.00048231997061520815, 0.0007181890541687608, 0.001503666047938168, 0.000725897029042244, 0.0004814449930563569, 0.0004889870760962367, 0.0016542449593544006, 0.0007698120316490531, 0.0014526681043207645, 0.0007168129086494446, 0.0017079940298572183, 0.0004848620155826211, 0.0004833610728383064, 0.0007137720240280032, 0.00047886103857308626, 0.00047931994777172804, 0.0017330769915133715, 0.0004861530615016818] enter1 = [0.004426126950420439, 0.0042586729396134615, 0.0007457300089299679, 0.0014448760775849223, 0.0008027700241655111, 0.0014858749927952886, 0.0007116879569366574, 0.0016497450415045023, 0.0005549839697778225, 0.0004898200277239084, 0.0004979450022801757, 0.0004827779484912753, 0.000719312927685678, 0.0004741540178656578, 0.000476112007163465, 0.0005344439996406436, 0.0007385630160570145, 0.00047794508282095194, 0.0004789449740201235, 0.0017122849822044373, 0.0005445269634947181, 0.0017000359948724508, 0.00048273708671331406, 0.001684578019194305, 0.0007363129407167435, 0.00047615310177206993, 0.0004796109860762954, 0.0004729870706796646, 0.0007151468889787793, 0.00047631992492824793, 0.0004770290106534958, 0.0007561459206044674, 0.0004827779484912753, 0.00047215400263667107, 0.0004744449397549033, 0.0007073549786582589, 0.0004784030606970191, 0.0007144389674067497, 0.0006271910388022661, 0.000256284954957664, 0.0007337289862334728, 0.0016610369784757495, 0.00047577801160514355, 0.0005693170242011547, 0.0004928199341520667, 0.0016807439969852567, 0.000715813017450273, 0.0015581230400130153, 0.0004901119973510504, 0.000714771100319922, 0.00048044498544186354, 0.0017653250833973289, 0.0005219019949436188, 0.0016497449250891805, 0.0004946109838783741, 0.0017792840953916311, 0.00048632000107318163, 0.0004820280009880662, 0.00047631992492824793, 0.0016587449936196208, 0.0007793110562488437, 0.0004920279607176781, 0.00048123602755367756, 0.0004792779218405485, 0.0007156879873946309, 0.001503207953646779, 0.0007426459342241287] enter2 = [0.0043407540069893, 0.004504290991462767, 0.0007075220346450806, 0.001499583013355732, 0.0004866119707003236, 0.0017706590006127954, 0.0005132770165801048, 0.001690785982646048, 0.0004810699028894305, 0.0007251879433169961, 0.0005509430775418878, 0.0005155690014362335, 0.0004945279797539115, 0.0004846950760111213, 0.0007243129657581449, 0.0004798199515789747, 0.00047811202239245176, 0.0008128100307658315, 0.0002574090613052249, 0.0017304930370301008, 0.0005063610151410103, 0.0017390759894624352, 0.0004857360618188977, 0.0016782450256869197, 0.0007170629687607288, 0.00048173603136092424, 0.0005367350531741977, 0.00049269397277385, 0.000721895950846374, 0.00048448704183101654, 0.00048227806109935045, 0.0004774449625983834, 0.0007163139525800943, 0.0005678589222952724, 0.0005006949650123715, 0.0004905699752271175, 0.000493069994263351, 0.000725438934750855, 0.00048077793326228857, 0.00048032007180154324, 0.0007796860300004482, 0.0014540009433403611, 0.000713521963916719, 0.0004826949443668127, 0.0004896109458059072, 0.0017532010097056627, 0.00048781896475702524, 0.0017469099257141352, 0.000507485936395824, 0.0005026529543101788, 0.0007271879585459828, 0.0014254600973799825, 0.0007217290112748742, 0.0014812919544056058, 0.0007157719228416681, 0.001661079004406929, 0.00048165395855903625, 0.0005603169556707144, 0.0005021110409870744, 0.0016914530424401164, 0.0007186470320448279, 0.0006071079988032579, 0.0005614430410787463, 0.0005010690074414015, 0.0004884869558736682, 0.0016882449854165316, 0.0004836530424654484] enter3 = [0.004107177024707198, 0.004506665980443358, 0.0005030280444771051, 0.0016853699926286936, 0.00048369390424340963, 0.0018393239006400108, 0.00048298691399395466, 0.0016640779795125127, 0.0005248601082712412, 0.0005142359295859933, 0.0007369789527729154, 0.0004852371057495475, 0.00047756999265402555, 0.0007146470015868545, 0.0004801120376214385, 0.0005334849702194333, 0.0005106109892949462, 0.0004944020183756948, 0.0007208130555227399, 0.0017376190517097712, 0.0005682760383933783, 0.0014675010461360216, 0.00048598600551486015, 0.001664286945015192, 0.0007808530936017632, 0.00048661103937774897, 0.00048261205665767193, 0.0004810279933735728, 0.0007251040078699589, 0.00048415292985737324, 0.00047827803064137697, 0.0005642760079354048, 0.0005084020085632801, 0.0007278129924088717, 0.00048290297854691744, 0.0004807370714843273, 0.0007236039964482188, 0.00047515309415757656, 0.0005276099545881152, 0.0005056109512224793, 0.0007268959889188409, 0.0014435850316658616, 0.000707480008713901, 0.0005064440192654729, 0.0004884449299424887, 0.0016749949427321553, 0.0007261049468070269, 0.0015615819720551372, 0.000494944048114121, 0.0007335210684686899, 0.00047919503413140774, 0.0016739120474085212, 0.0005579420831054449, 0.0016737449914216995, 0.0004909440176561475, 0.0017192020313814282, 0.0004872780991718173, 0.0004796530120074749, 0.0007194799836724997, 0.0016763280145823956, 0.0005366510013118386, 0.0004959029611200094, 0.0004894440062344074, 0.0004898610059171915, 0.0007298130076378584, 0.0017571180360391736, 0.0004926950205117464] back1 = [0.0045251649571582675, 0.004377128090709448, 0.0005335679743438959, 0.001709118951112032, 0.0007345209596678615, 0.0014642090536653996, 0.0004950279835611582, 0.001693952945061028, 0.0005414009792730212, 0.0005269850371405482, 0.0004940279759466648, 0.0004841950722038746, 0.0007235630182549357, 0.00048227806109935045, 0.00048236094880849123, 0.0007857698947191238, 0.0005076099187135696, 0.0004971940070390701, 0.0004917780170217156, 0.0017420349176973104, 0.0005058189854025841, 0.0017646589549258351, 0.0004928190028294921, 0.0016828279476612806, 0.0006780639523640275, 0.0002593670506030321, 0.0007507289992645383, 0.0004929450806230307, 0.0004884029040113091, 0.0004784029442816973, 0.0006516489665955305, 0.0005943999858573079, 0.0005149439675733447, 0.0004934030584990978, 0.000733103952370584, 0.0004919859347864985, 0.0004881529603153467, 0.0004866949748247862, 0.0008057280210778117, 0.0005006109131500125, 0.000490527949295938, 0.0016950360732153058, 0.0004831949481740594, 0.001733618089929223, 0.0004895279416814446, 0.0004914860473945737, 0.000728728948161006, 0.001544081955216825, 0.0004922359948977828, 0.000725146965123713, 0.0004815279971808195, 0.0016869528917595744, 0.0005350270075723529, 0.001703453017398715, 0.000488403020426631, 0.001740284962579608, 0.0004918610211461782, 0.0004900700878351927, 0.000722646014764905, 0.00048656994476914406, 0.00048406992573291063, 0.0017611590446904302, 0.0004857779713347554, 0.0004819040186703205, 0.0007220209809020162, 0.001782326027750969, 0.00025903398636728525] back2 = [0.0043988770339637995, 0.00442608492448926, 0.0005449019372463226, 0.001670912024565041, 0.0004844039212912321, 0.0016946610994637012, 0.0005625670310109854, 0.0017088280292227864, 0.0004844029899686575, 0.0004826119402423501, 0.0007211460033431649, 0.0005721510387957096, 0.0005019860109314322, 0.0004850280238315463, 0.0004863189533352852, 0.0007246049353852868, 0.00048757006879895926, 0.0004872779827564955, 0.0007721029687672853, 0.0015399570111185312, 0.0005146100884303451, 0.0017637839773669839, 0.000542942900210619, 0.0014917500084266067, 0.0007288960041478276, 0.0004913610173389316, 0.0004914440214633942, 0.0005609840154647827, 0.0005020700627937913, 0.0007335629779845476, 0.000483029056340456, 0.00048719404730945826, 0.0007251049391925335, 0.0004790700040757656, 0.000527067924849689, 0.0004921120125800371, 0.00048681895714253187, 0.0007286049658432603, 0.0004896529717370868, 0.0004940270446240902, 0.0007350220112130046, 0.001523166080005467, 0.0004889030242338777, 0.0016737859696149826, 0.0007945200195536017, 0.0005026940489187837, 0.0004887779941782355, 0.0015116240829229355, 0.0007362710312008858, 0.00051473593339324, 0.0005162350134924054, 0.0016883698990568519, 0.00048765295650810003, 0.001787074957974255, 0.0005035700742155313, 0.0016803690232336521, 0.00048107001930475235, 0.0004826940130442381, 0.0007846859516575933, 0.0004917370388284326, 0.000483736046589911, 0.0016822450561448932, 0.00048011098988354206, 0.000539442989975214, 0.000754979089833796, 0.0014382930239662528, 0.0007274800445884466] back3 = [0.004321587039157748, 0.004440875956788659, 0.00046736199874430895, 0.001592705026268959, 0.0008825170807540417, 0.0014548340113833547, 0.0004948610439896584, 0.001679744920693338, 0.0007141049718484282, 0.00057565001770854, 0.0004950700094923377, 0.0004916529869660735, 0.0004825700307264924, 0.0007113970350474119, 0.0004766950150951743, 0.0004760699812322855, 0.0007802279433235526, 0.0004975280025973916, 0.000486528966575861, 0.001727786031551659, 0.0004943199455738068, 0.0015302080428227782, 0.0007316460832953453, 0.0016809949884191155, 0.0005309439729899168, 0.000507193966768682, 0.0004925699904561043, 0.00048032007180154324, 0.000719396979548037, 0.00048044498544186354, 0.0004790279781445861, 0.0007126890122890472, 0.0005316099850460887, 0.0004971949383616447, 0.0004960700171068311, 0.0007225630106404424, 0.0004826949443668127, 0.00048056989908218384, 0.0007153550395742059, 0.0005381519440561533, 0.0004964030813425779, 0.0016870370600372553, 0.00047594495117664337, 0.0017749510006979108, 0.0004851529374718666, 0.0004800281021744013, 0.0007182719418779016, 0.0016238288953900337, 0.0005443179979920387, 0.0004955279873684049, 0.0005013189511373639, 0.0016669540200382471, 0.000800768961198628, 0.0014565419405698776, 0.0004850280238315463, 0.0018538649892434478, 0.0005946509772911668, 0.000509736011736095, 0.0004955281037837267, 0.000495568965561688, 0.0004776950227096677, 0.0017459510127082467, 0.0005003189435228705, 0.0004873619182035327, 0.0007182720582932234, 0.0016662459820508957, 0.000527193071320653] exit1 = [0.004299880005419254, 0.004643870051950216, 0.0006061081076040864, 0.0014701669570058584, 0.00048752804286777973, 0.0017553670331835747, 0.0005591510562226176, 0.0017091609770432115, 0.0004832360427826643, 0.0004868200048804283, 0.0008300599874928594, 0.0002722840290516615, 0.0007499799830839038, 0.0004893610021099448, 0.0004929449642077088, 0.00048148597124964, 0.0007240640698000789, 0.00048469402827322483, 0.0005471509648486972, 0.001746825990267098, 0.0004981110105291009, 0.001485458924435079, 0.0007404380012303591, 0.0016817450523376465, 0.000478986999951303, 0.00047623703721910715, 0.0007814780110493302, 0.0004943190142512321, 0.0004902359796687961, 0.00048715295270085335, 0.0007242299616336823, 0.0004785700002685189, 0.00048023706767708063, 0.0005567760672420263, 0.0005226519424468279, 0.0016853699926286936, 0.0004789030645042658, 0.0007240629056468606, 0.00048169505316764116, 0.0017588259652256966, 0.00048356992192566395, 0.0016735779354348779, 0.0005965669406577945, 0.00048577808775007725, 0.0004812780534848571, 0.0017239940352737904, 0.0005023609846830368, 0.0005327359540387988, 0.0007421460468322039, 0.0004867360694333911, 0.0004859870532527566, 0.0004802360199391842, 0.0007172300247475505, 0.0018401159904897213, 0.0004389879759401083, 0.00033544900361448526, 0.0007856030715629458, 0.0004926109686493874, 0.00048161193262785673, 0.001574538997374475, 0.000737478956580162, 0.0004883609944954515, 0.0004784449702128768, 0.0018250320572406054, 0.0004923200467601418, 0.0016865769866853952, 0.0004894869634881616] exit2 = [0.004420085111632943, 0.004380169091746211, 0.000556733924895525, 0.0017029530135914683, 0.0004868609830737114, 0.0016188300214707851, 0.0007271460490301251, 0.0016728700138628483, 0.00048436096403747797, 0.0005641099996864796, 0.0004991110181435943, 0.0004754860419780016, 0.0007141879759728909, 0.00047456996981054544, 0.0004846950760111213, 0.0007180629763752222, 0.0005851919995620847, 0.0004931950243189931, 0.0004830700345337391, 0.0017203690949827433, 0.0005023609846830368, 0.001754408935084939, 0.0004747780039906502, 0.0016518710181117058, 0.0005476929945871234, 0.000502444920130074, 0.0007299380376935005, 0.0004759030416607857, 0.0004775290144607425, 0.0007094800239428878, 0.0004783610347658396, 0.0004965279949828982, 0.0005095690721645951, 0.0007242719875648618, 0.00048190297093242407, 0.001799033023416996, 0.0006459819851443172, 0.00027307600248605013, 0.0005036939401179552, 0.0016832869732752442, 0.0007180629763752222, 0.0014870830345898867, 0.0007274380186572671, 0.0004771529929712415, 0.0004808199591934681, 0.0017853250028565526, 0.0005154029931873083, 0.0004896529717370868, 0.0007188550662249327, 0.0004796949215233326, 0.0004831950645893812, 0.00047965405974537134, 0.000762854004278779, 0.0014453759649768472, 0.0007196050137281418, 0.00047473690938204527, 0.0007182719418779016, 0.0005438189255073667, 0.0004984029801562428, 0.001673370017670095, 0.00048540299758315086, 0.0004724039463326335, 0.0007441870402544737, 0.0014716261066496372, 0.0007147300057113171, 0.0016717449761927128, 0.0005535261007025838] exit3 = [0.00442821008618921, 0.0047562000108882785, 0.00029415800236165524, 0.0017326599918305874, 0.0004862359492108226, 0.0015649560373276472, 0.0007331880042329431, 0.0016731199575588107, 0.00048698706086724997, 0.0004944030661135912, 0.0005493588978424668, 0.0004880279302597046, 0.0007282710867002606, 0.00047819502651691437, 0.0004801949253305793, 0.0007149380398914218, 0.0004772779066115618, 0.0005185690242797136, 0.0004968610592186451, 0.0017169930506497622, 0.0005006940336897969, 0.0017550759948790073, 0.000490986043587327, 0.0016905359225347638, 0.00048065301962196827, 0.0008335600141435862, 0.0004994020564481616, 0.00048586202319711447, 0.0004939869977533817, 0.000796478008851409, 0.0004695700481534004, 0.0003625729586929083, 0.0006027339259162545, 0.000554360100068152, 0.0005079020047560334, 0.0016606199787929654, 0.000636023934930563, 0.0006347320741042495, 0.0005859000375494361, 0.0015703310491517186, 0.0007091050501912832, 0.0015303740510717034, 0.0006087750662118196, 0.000577858998440206, 0.0003212409792467952, 0.001828783075325191, 0.0005960660055279732, 0.0005154020618647337, 0.00048811209853738546, 0.000484112068079412, 0.00048157002311199903, 0.0007195639191195369, 0.0004807780496776104, 0.0017822830704972148, 0.0004834029823541641, 0.0004785700002685189, 0.0007252299692481756, 0.00048477796372026205, 0.0005240689497441053, 0.001684703049249947, 0.0005304430378600955, 0.0004944029496982694, 0.0004866120871156454, 0.0018359479727223516, 0.0004929018905386329, 0.001695368904620409, 0.00048757006879895926] up1 = np.array(up1) up2 = np.array(up2) up3 = np.array(up3) down1 = np.array(down1) down2 = np.array(down2) down3 = np.array(down3) left1 = np.array(left1) left2 = np.array(left2) left3 = np.array(left3) right1 = np.array(right1) right2 = np.array(right2) right3 = np.array(right3) enter1 = np.array(enter1) enter2 = np.array(enter2) enter3 = np.array(enter3) back1 = np.array(back1) back2 = np.array(back2) back3 = np.array(back3) exit1 = np.array(exit1) exit2 = np.array(exit2) exit3 = np.array(exit3) up = np.array([up1, up2, up3]) down = np.array([down1, down2, down3]) left = np.array([left1, left2, left3]) right = np.array([right1, right2, right3]) enter = np.array([enter1, enter2, enter3]) back = np.array([back1, back2, back3]) exit = np.array([exit1, exit2, exit3]) text_ref = ["up", "down", "left", "right", "enter", "back", "return"] input_matrix = [up, down, left, right, enter, back, exit] counter = -1 for i in input_matrix: counter = counter+1 maxInColumns = np.amax(i, axis=0) minInColumns = np.amin(i, axis=0) meanInColumns = np.mean(i, axis=0) top_diff = abs(maxInColumns-meanInColumns) bottom_diff = abs(minInColumns-meanInColumns) max_diff_in_col = np.zeros(len(meanInColumns)) for j in range(len(top_diff)): if top_diff[j]>bottom_diff[j]: max_diff_in_col[j] = top_diff[j] else: max_diff_in_col[j] = bottom_diff[j] max_diff = max(max_diff_in_col) f = open("ir_command.txt", "a") print(" ", text_ref[counter], " Summary ", file=f) print("-----------------------------", file=f) print("Average = ", file=f) np.savetxt(f, meanInColumns, newline=", ", fmt='%1.6f') #level of precision is 6 #print(meanInColumns, file=f) print("", file=f) print("", file=f) print("Differneces = ", file=f) np.savetxt(f, max_diff_in_col, newline=", ", fmt='%1.6f') #level of precision is 6 print("", file=f) print("", file=f) print("Max Differnece = ", file=f) print("{0:.6f}".format(max_diff), file=f) #level of precision is 6 print("", file=f) print("Length of Command", file=f) print(i.shape[1], file=f) print("", file=f) f.close()
316.590909
1,556
0.851256
3,189
34,825
9.286924
0.456883
0.006618
0.003714
0.003039
0.011041
0.008914
0.005166
0.003984
0.003984
0.002499
0
0.855845
0.054817
34,825
109
1,557
319.495413
0.0439
0.005197
0
0.070588
0
0
0.00511
0.000837
0
0
0
0
0
1
0
false
0
0.011765
0
0.011765
0.164706
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a2432502210df61b5853a6fa0dbcb3736e094f35
736
py
Python
tests/test_project/test_app/migrations/0004_auto_20210829_1154.py
domandinho/SmartSecurity
d8e92f8412aafdc513b6b7a25b54b1dca9afe52b
[ "MIT" ]
null
null
null
tests/test_project/test_app/migrations/0004_auto_20210829_1154.py
domandinho/SmartSecurity
d8e92f8412aafdc513b6b7a25b54b1dca9afe52b
[ "MIT" ]
null
null
null
tests/test_project/test_app/migrations/0004_auto_20210829_1154.py
domandinho/SmartSecurity
d8e92f8412aafdc513b6b7a25b54b1dca9afe52b
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-29 11:54 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("test_app", "0003_alter_testbroker_options"), ] operations = [ migrations.AlterModelOptions( name="testbroker", options={ "permissions": [ ("unique_permission", "Unique permission"), ("not_unique_permission", "Not unique permission"), ] }, ), migrations.AlterModelOptions( name="testowner", options={ "permissions": [("not_unique_permission", "Not unique permission")] }, ), ]
25.37931
83
0.521739
57
736
6.578947
0.578947
0.256
0.202667
0.2
0.245333
0.202667
0
0
0
0
0
0.040773
0.366848
736
28
84
26.285714
0.763949
0.061141
0
0.272727
1
0
0.28447
0.103048
0
0
0
0
0
1
0
false
0
0.045455
0
0.181818
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a243378cc1154ec25933b7cb6a9b0ab6c1b2ccc7
89
py
Python
setup.py
emay2022/fraplib
9c580ea6c9405bcf2dbf50cdbf66e39bfbad0b06
[ "BSD-3-Clause" ]
null
null
null
setup.py
emay2022/fraplib
9c580ea6c9405bcf2dbf50cdbf66e39bfbad0b06
[ "BSD-3-Clause" ]
null
null
null
setup.py
emay2022/fraplib
9c580ea6c9405bcf2dbf50cdbf66e39bfbad0b06
[ "BSD-3-Clause" ]
null
null
null
import setuptools setuptools.setup(use_scm_version={"write_to": "fraplib/_version.py"})
22.25
69
0.797753
12
89
5.583333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.05618
89
3
70
29.666667
0.797619
0
0
0
0
0
0.303371
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
a27faed7306f5f792049b1b67e3247ff5b63d922
107
py
Python
9461.py
FelisCatusKR/Baekjoon_Python3
d84dc9421fe956001864d138b6d6ec9ebd793edf
[ "MIT" ]
null
null
null
9461.py
FelisCatusKR/Baekjoon_Python3
d84dc9421fe956001864d138b6d6ec9ebd793edf
[ "MIT" ]
null
null
null
9461.py
FelisCatusKR/Baekjoon_Python3
d84dc9421fe956001864d138b6d6ec9ebd793edf
[ "MIT" ]
null
null
null
# 9461.py P=[1,1,1,2,2] for _ in range(95):P+=[P[-1]+P[-5]] exec("print(P[int(input())-1]);"*int(input()))
26.75
46
0.53271
26
107
2.192308
0.576923
0.070175
0
0
0
0
0
0
0
0
0
0.14
0.065421
107
4
46
26.75
0.42
0.065421
0
0
0
0
0.255102
0.255102
0
0
0
0
0
0
null
null
0
0
null
null
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
a28a3a7828d5e8b9e81681c7ccefa015c66dcaab
25
py
Python
lib/grpc/_grpcio_metadata.py
kylevigil/SportsFeed
661bc9197974e69eb5b42c845940317a0569a03c
[ "Apache-2.0" ]
null
null
null
lib/grpc/_grpcio_metadata.py
kylevigil/SportsFeed
661bc9197974e69eb5b42c845940317a0569a03c
[ "Apache-2.0" ]
null
null
null
lib/grpc/_grpcio_metadata.py
kylevigil/SportsFeed
661bc9197974e69eb5b42c845940317a0569a03c
[ "Apache-2.0" ]
null
null
null
__version__ = """1.6.3"""
25
25
0.56
4
25
2.5
1
0
0
0
0
0
0
0
0
0
0
0.130435
0.08
25
1
25
25
0.304348
0
0
0
0
0
0.192308
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a2a55846f481474539515cd90a8f4660cc1c4ac7
617
py
Python
wasm/tests/test_exec_mode.py
dbrgn/RustPython
6d371cea8a62d84dbbeec5a53cfd040f45899211
[ "CC-BY-4.0", "MIT" ]
11,058
2018-05-29T07:40:06.000Z
2022-03-31T11:38:42.000Z
wasm/tests/test_exec_mode.py
dbrgn/RustPython
6d371cea8a62d84dbbeec5a53cfd040f45899211
[ "CC-BY-4.0", "MIT" ]
2,105
2018-06-01T10:07:16.000Z
2022-03-31T14:56:42.000Z
wasm/tests/test_exec_mode.py
dbrgn/RustPython
6d371cea8a62d84dbbeec5a53cfd040f45899211
[ "CC-BY-4.0", "MIT" ]
914
2018-07-27T09:36:14.000Z
2022-03-31T19:56:34.000Z
def test_eval_mode(wdriver): assert wdriver.execute_script("return window.rp.pyEval('1+1')") == 2 def test_exec_mode(wdriver): assert wdriver.execute_script("return window.rp.pyExec('1+1')") is None def test_exec_single_mode(wdriver): assert wdriver.execute_script("return window.rp.pyExecSingle('1+1')") == 2 stdout = wdriver.execute_script( """ let output = ""; save_output = function(text) {{ output += text }}; window.rp.pyExecSingle('1+1\\n2+2',{stdout: save_output}); return output; """ ) assert stdout == "2\n4\n"
28.045455
78
0.614263
79
617
4.632911
0.367089
0.153005
0.218579
0.196721
0.516393
0.418033
0.418033
0.418033
0.418033
0
0
0.029536
0.231767
617
21
79
29.380952
0.742616
0
0
0
0
0
0.25
0.183824
0
0
0
0
0.444444
1
0.333333
false
0
0
0
0.333333
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
a2aa997c4ccfdf190f0e8e359c313949f01f6f09
92
py
Python
ex002.py
GuilhermeAntony14/Estudando-Python
b020f6d2625e7fcc42d30658bcbd881b093434dd
[ "MIT" ]
null
null
null
ex002.py
GuilhermeAntony14/Estudando-Python
b020f6d2625e7fcc42d30658bcbd881b093434dd
[ "MIT" ]
null
null
null
ex002.py
GuilhermeAntony14/Estudando-Python
b020f6d2625e7fcc42d30658bcbd881b093434dd
[ "MIT" ]
null
null
null
nome = str(input('Qual seu nome: ')) print(f'E um prazer te conhecer \033[32m{nome}\033[m!')
46
55
0.673913
18
92
3.444444
0.833333
0
0
0
0
0
0
0
0
0
0
0.098765
0.119565
92
2
55
46
0.666667
0
0
0
0
0
0.645161
0.225806
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
a2ee914020a34aca9de78c09ec58237b0df94c11
46
py
Python
PyClassEx/modulfructe/fructe3.py
mhcrnl/PmwTkEx
6ef8ed8743bbb74f30e33e33d7894d9d1afedd87
[ "Apache-2.0" ]
null
null
null
PyClassEx/modulfructe/fructe3.py
mhcrnl/PmwTkEx
6ef8ed8743bbb74f30e33e33d7894d9d1afedd87
[ "Apache-2.0" ]
null
null
null
PyClassEx/modulfructe/fructe3.py
mhcrnl/PmwTkEx
6ef8ed8743bbb74f30e33e33d7894d9d1afedd87
[ "Apache-2.0" ]
null
null
null
import fructe2 as f b = f.Fructe2() b.mar()
7.666667
19
0.630435
9
46
3.222222
0.666667
0
0
0
0
0
0
0
0
0
0
0.055556
0.217391
46
5
20
9.2
0.75
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
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
0
0
0
1
0
0
0
0
4
a2f2761d2efb468fd6eeab9af77f7ac57033e3fd
88
py
Python
egs/wsj/s5/utils/convert_lexicon.py
chizhang0814/kaldi
b9798677e07975f3fbdddf635947047012314ad0
[ "Apache-2.0" ]
null
null
null
egs/wsj/s5/utils/convert_lexicon.py
chizhang0814/kaldi
b9798677e07975f3fbdddf635947047012314ad0
[ "Apache-2.0" ]
null
null
null
egs/wsj/s5/utils/convert_lexicon.py
chizhang0814/kaldi
b9798677e07975f3fbdddf635947047012314ad0
[ "Apache-2.0" ]
null
null
null
import os old_lexicon = '/data3/voxforge/s5/data/local/dict/lexicon.txt' map_file = ''
17.6
62
0.738636
14
88
4.5
0.928571
0
0
0
0
0
0
0
0
0
0
0.025316
0.102273
88
4
63
22
0.772152
0
0
0
0
0
0.522727
0.522727
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
0c0d1fb1ad6f4350bbf089622f58d07b811d6e6f
15
py
Python
2/22.py
Seaoftrees/Session2019
86d61f190979ea9be205a3bbde1deac85de26997
[ "MIT" ]
null
null
null
2/22.py
Seaoftrees/Session2019
86d61f190979ea9be205a3bbde1deac85de26997
[ "MIT" ]
null
null
null
2/22.py
Seaoftrees/Session2019
86d61f190979ea9be205a3bbde1deac85de26997
[ "MIT" ]
null
null
null
a = 5 print(a)
5
8
0.533333
4
15
2
0.75
0
0
0
0
0
0
0
0
0
0
0.090909
0.266667
15
2
9
7.5
0.636364
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
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
0
0
0
0
0
0
0
1
0
4
0c0e12f5c99cc6bffd1e6cfb23cf8ad80b8b88f0
124
py
Python
2._Learning_Python/A._Basic_-_no_OOP/7._Functions_and_Modules/1._Functions/5._Underscores_in_Python/underscores.py
sanjarcode/python3_notes
b844515a021c2b75a4066b6d4cad239fdd13e3a7
[ "MIT" ]
null
null
null
2._Learning_Python/A._Basic_-_no_OOP/7._Functions_and_Modules/1._Functions/5._Underscores_in_Python/underscores.py
sanjarcode/python3_notes
b844515a021c2b75a4066b6d4cad239fdd13e3a7
[ "MIT" ]
null
null
null
2._Learning_Python/A._Basic_-_no_OOP/7._Functions_and_Modules/1._Functions/5._Underscores_in_Python/underscores.py
sanjarcode/python3_notes
b844515a021c2b75a4066b6d4cad239fdd13e3a7
[ "MIT" ]
null
null
null
personal_details = ('Sanjar', 22, 'India') print(personal_details) name, _, country = personal_details print(name, country)
24.8
42
0.758065
15
124
6
0.533333
0.5
0
0
0
0
0
0
0
0
0
0.018018
0.104839
124
4
43
31
0.792793
0
0
0
0
0
0.08871
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
0c2278b3f4c129ec051af6fcb12ae396c19d4500
58
py
Python
neural_lambda_calculus/__init__.py
brandontrabucco/neural_lambda_calculus
f796961730a84f21a427297ae903e7ed6e71a4c4
[ "MIT" ]
null
null
null
neural_lambda_calculus/__init__.py
brandontrabucco/neural_lambda_calculus
f796961730a84f21a427297ae903e7ed6e71a4c4
[ "MIT" ]
null
null
null
neural_lambda_calculus/__init__.py
brandontrabucco/neural_lambda_calculus
f796961730a84f21a427297ae903e7ed6e71a4c4
[ "MIT" ]
null
null
null
"""Author: Brandon Trabucco, Kavi Gupta, Copyright 2019"""
58
58
0.741379
7
58
6.142857
1
0
0
0
0
0
0
0
0
0
0
0.076923
0.103448
58
1
58
58
0.75
0.896552
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
0c3081ff7bca1e7d585a05ac34483bec39073bce
208
py
Python
gistio/urls.py
Teino1978-Corp/gistio
405f95bf16c2be4b9d9f6e209d49f873823ea5ca
[ "BSD-3-Clause" ]
1
2019-05-07T15:13:11.000Z
2019-05-07T15:13:11.000Z
gistio/urls.py
Teino1978-Corp/gistio
405f95bf16c2be4b9d9f6e209d49f873823ea5ca
[ "BSD-3-Clause" ]
null
null
null
gistio/urls.py
Teino1978-Corp/gistio
405f95bf16c2be4b9d9f6e209d49f873823ea5ca
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls import patterns, include, url urlpatterns = patterns('', url(r'^', include('gists.urls')), # url(r'^', include('githubauth.urls')), url(r'^', include('publicsite.urls')), )
26
51
0.629808
25
208
5.24
0.52
0.091603
0.251908
0.229008
0
0
0
0
0
0
0
0
0.144231
208
7
52
29.714286
0.735955
0.182692
0
0
0
0
0.160714
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0c463a141c39e1036e59e5cd02b57e251f9f9f1b
215
py
Python
ex11.py
Nandarlynnn/python-exercises
8f5e529b45b5d6174f6859561b49c3dafb86d221
[ "MIT" ]
null
null
null
ex11.py
Nandarlynnn/python-exercises
8f5e529b45b5d6174f6859561b49c3dafb86d221
[ "MIT" ]
null
null
null
ex11.py
Nandarlynnn/python-exercises
8f5e529b45b5d6174f6859561b49c3dafb86d221
[ "MIT" ]
null
null
null
print ("how old are you?.",) age=raw_input() print("How tall are you?.",) height=raw_input() print("How much do you weight?.",) weight=raw_input() print("So you're %r old,%r tall and %r heavy."%(age,height,weight))
26.875
67
0.674419
39
215
3.641026
0.461538
0.169014
0.274648
0.225352
0
0
0
0
0
0
0
0
0.116279
215
7
68
30.714286
0.747368
0
0
0
0
0
0.451163
0
0
0
0
0
0
1
0
false
0
0
0
0
0.571429
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
a74331741c2daf4341f13c1f6a978c11752b08c3
203
py
Python
apps/posts/admin.py
cmput404F21/CMPUT404-project-socialdistribution
47f108b43886a4e482c6b6f9c6fdef6dcc005c3f
[ "W3C-20150513" ]
null
null
null
apps/posts/admin.py
cmput404F21/CMPUT404-project-socialdistribution
47f108b43886a4e482c6b6f9c6fdef6dcc005c3f
[ "W3C-20150513" ]
48
2021-10-12T21:41:39.000Z
2021-12-08T19:40:25.000Z
apps/posts/admin.py
cmput404F21/CMPUT404-project-socialdistribution
47f108b43886a4e482c6b6f9c6fdef6dcc005c3f
[ "W3C-20150513" ]
1
2022-01-11T04:07:43.000Z
2022-01-11T04:07:43.000Z
from django.contrib import admin from .models import Like, Post from .models import Comment # Register your models here. admin.site.register(Post) admin.site.register(Comment) admin.site.register(Like)
22.555556
32
0.802956
30
203
5.433333
0.433333
0.165644
0.312883
0
0
0
0
0
0
0
0
0
0.108374
203
9
33
22.555556
0.900552
0.128079
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
a751315aab70d74732e74401579640ecbb2031e8
360
py
Python
yunionclient/api/federatedclusterrolebindings.py
yunionyun/python_yunionsdk
40a567b80f6fb3ebc72d8cc6313b334a201b2f00
[ "Apache-2.0" ]
3
2021-09-22T11:34:08.000Z
2022-03-13T04:55:17.000Z
yunionclient/api/federatedclusterrolebindings.py
yunionyun/python_yunionsdk
40a567b80f6fb3ebc72d8cc6313b334a201b2f00
[ "Apache-2.0" ]
13
2019-06-06T08:25:41.000Z
2021-07-16T07:26:10.000Z
yunionclient/api/federatedclusterrolebindings.py
yunionyun/python_yunionsdk
40a567b80f6fb3ebc72d8cc6313b334a201b2f00
[ "Apache-2.0" ]
7
2019-03-31T05:43:36.000Z
2021-03-04T09:59:05.000Z
from yunionclient.common import base class Federatedclusterrolebinding(base.ResourceBase): pass class FederatedclusterrolebindingManager(base.StandaloneManager): resource_class = Federatedclusterrolebinding keyword = 'federatedclusterrolebinding' keyword_plural = 'federatedclusterrolebindings' _columns = ["Id", "Name", "Description"]
27.692308
65
0.794444
26
360
10.884615
0.730769
0.226148
0
0
0
0
0
0
0
0
0
0
0.130556
360
12
66
30
0.904153
0
0
0
0
0
0.200557
0.153203
0
0
0
0
0
1
0
false
0.125
0.125
0
0.875
0
1
0
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
4
a756ee785eec3e83d4eb737191d8fd35a1a37b54
214
py
Python
treex/nn/flatten.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
treex/nn/flatten.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
treex/nn/flatten.py
ptigwe/treex
c46687376ccc50c8fea6cb8617e22e4b4dd1924a
[ "MIT" ]
null
null
null
import einops import jax.numpy as jnp from treex.module import Module class Flatten(Module): def __call__(self, x: jnp.ndarray) -> jnp.ndarray: return einops.rearrange(x, "batch ... -> batch (...)")
21.4
62
0.672897
29
214
4.827586
0.655172
0.142857
0
0
0
0
0
0
0
0
0
0
0.186916
214
9
63
23.777778
0.804598
0
0
0
0
0
0.11215
0
0
0
0
0
0
1
0.166667
false
0
0.5
0.166667
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
0
0
0
4
a79214147c4900ea5accdb8115154b307a9101a1
9,906
py
Python
tests/test_model_building.py
wahab2604/ESPEI
70a4185ce87a125e926f88e7ef93c02276fd6e90
[ "MIT" ]
39
2017-11-03T03:07:46.000Z
2022-03-17T02:41:59.000Z
tests/test_model_building.py
richardotis/ESPEI
70a4185ce87a125e926f88e7ef93c02276fd6e90
[ "MIT" ]
122
2017-06-23T16:34:13.000Z
2022-02-21T18:26:01.000Z
tests/test_model_building.py
richardotis/ESPEI
70a4185ce87a125e926f88e7ef93c02276fd6e90
[ "MIT" ]
21
2017-06-18T02:36:38.000Z
2022-03-29T00:17:21.000Z
""" Tests for building models for parameter selection """ from collections import OrderedDict import sympy from pycalphad import variables as v from espei.parameter_selection.model_building import build_feature_sets, build_candidate_models from espei.sublattice_tools import generate_symmetric_group, sorted_interactions def test_build_feature_sets_generates_desired_binary_features_for_cp_like(): """Binary feature sets can be correctly generated for heat capacity-like features""" binary_temp_features = ['TlogT', 'T**2', '1/T', 'T**3'] binary_excess_features= ['YS', 'YS*Z', 'YS*Z**2', 'YS*Z**3'] feat_sets = build_feature_sets(binary_temp_features, binary_excess_features) assert len(feat_sets) == 340 assert feat_sets[0] == ((['TlogT'], 'YS'),) assert feat_sets[5] == ((['TlogT'], 'YS'), (['TlogT', 'T**2'], 'YS*Z')) assert feat_sets[-1] == ((['TlogT', 'T**2', '1/T', 'T**3'], 'YS'), (['TlogT', 'T**2', '1/T', 'T**3'], 'YS*Z'), (['TlogT', 'T**2', '1/T', 'T**3'], 'YS*Z**2'), (['TlogT', 'T**2', '1/T', 'T**3'], 'YS*Z**3')) def test_build_feature_sets_generates_desired_binary_features_for_h_like(): """Binary feature sets can be correctly generated for enthalpy-like models""" binary_temp_features = ['1'] binary_excess_features= ['YS', 'YS*Z', 'YS*Z**2', 'YS*Z**3'] feat_sets = build_feature_sets(binary_temp_features, binary_excess_features) assert len(feat_sets) == 4 assert feat_sets[0] == ((['1'], 'YS'),) assert feat_sets[1] == ((['1'], 'YS'), (['1'], 'YS*Z')) assert feat_sets[2] == ((['1'], 'YS'), (['1'], 'YS*Z'), (['1'], 'YS*Z**2')) assert feat_sets[3] == ((['1'], 'YS'), (['1'], 'YS*Z'), (['1'], 'YS*Z**2'), (['1'], 'YS*Z**3')) def test_build_feature_sets_generates_desired_ternary_features(): """Ternary feature sets can be correctly generated""" ternary_temp_features = ['1'] ternary_excess_features= [('YS',), ('YS*V_I', 'YS*V_J', 'YS*V_K')] feat_sets = build_feature_sets(ternary_temp_features, ternary_excess_features) assert len(feat_sets) == 2 assert feat_sets[0] == ((['1'], ('YS',)),) assert feat_sets[1] == ((['1'], ('YS',)), (['1'], ('YS*V_I', 'YS*V_J', 'YS*V_K'))) def test_binary_candidate_models_are_constructed_correctly(): """Candidate models should be generated for all valid combinations of possible models in the binary case""" features = OrderedDict([("CPM_FORM", (v.T*sympy.log(v.T), v.T**2)), ("SM_FORM", (v.T,)), ("HM_FORM", (sympy.S.One,)) ]) YS = sympy.Symbol('YS') Z = sympy.Symbol('Z') candidate_models = build_candidate_models((('A', 'B'), 'A'), features) assert candidate_models == OrderedDict([ ('CPM_FORM', [ [v.T*YS*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS, v.T*YS*Z*sympy.log(v.T), v.T**2*YS*Z, v.T*YS*Z**2*sympy.log(v.T), v.T**2*YS*Z**2, v.T*YS*Z**3*sympy.log(v.T), v.T**2*YS*Z**3] ]), ('SM_FORM', [ [v.T*YS], [v.T*YS, v.T*YS*Z], [v.T*YS, v.T*YS*Z, v.T*YS*Z**2], [v.T*YS, v.T*YS*Z, v.T*YS*Z**2, v.T*YS*Z**3] ]), ('HM_FORM', [ [YS], [YS, YS*Z], [YS, YS*Z, YS*Z**2], [YS, YS*Z, YS*Z**2, YS*Z**3] ]) ]) def test_ternary_candidate_models_are_constructed_correctly(): """Candidate models should be generated for all valid combinations of possible models in the ternary case""" features = OrderedDict([("CPM_FORM", (v.T*sympy.log(v.T), v.T**2)), ("SM_FORM", (v.T,)), ("HM_FORM", (sympy.S.One,)) ]) YS = sympy.Symbol('YS') V_I, V_J, V_K = sympy.Symbol('V_I'), sympy.Symbol('V_J'), sympy.Symbol('V_K') candidate_models = build_candidate_models((('A', 'B', 'C'), 'A'), features) assert candidate_models == OrderedDict([ ('CPM_FORM', [ [v.T*YS*sympy.log(v.T)], [v.T*YS*sympy.log(v.T), v.T**2*YS], [v.T*V_I*YS*sympy.log(v.T), v.T*V_J*YS*sympy.log(v.T), v.T*V_K*YS*sympy.log(v.T)], [v.T*V_I*YS*sympy.log(v.T), v.T*V_J*YS*sympy.log(v.T), v.T*V_K*YS*sympy.log(v.T), v.T**2*V_I*YS, v.T**2*V_J*YS, v.T**2*V_K*YS], ]), ('SM_FORM', [ [v.T*YS], [v.T*V_I*YS, v.T*V_J*YS, v.T*V_K*YS] ]), ('HM_FORM', [ [YS], [V_I*YS, V_J*YS, V_K*YS] ]) ]) def test_symmetric_group_can_be_generated_for_2_sl_mixing_with_symmetry(): """A phase with two sublattices that are mixing should generate a cross interaction""" symm_groups = generate_symmetric_group((('AL', 'CO'), ('AL', 'CO')), [[0, 1]]) assert symm_groups == [(('AL', 'CO'), ('AL', 'CO'))] def test_symmetric_group_can_be_generated_for_2_sl_endmembers_with_symmetry(): """A phase with symmetric sublattices should find a symmetric endmember """ symm_groups = generate_symmetric_group(('AL', 'CO'), [[0, 1]]) assert symm_groups == [('AL', 'CO'), ('CO', 'AL')] def test_interaction_sorting_is_correct(): """High order (order >= 3) interactions should sort correctly""" # Correct sorting of n-order interactions should sort first by number of # interactions of order n, then n-1, then n-2... to 1 unsorted_interactions = [ ('AL', ('AL', 'CO', 'CR')), (('AL', 'CO'), ('AL', 'CO', 'CR')), (('AL', 'CO', 'CR'), ('AL', 'CO', 'CR')), (('AL', 'CO', 'CR'), 'AL'), (('AL', 'CO', 'CR'), ('AL', 'CO')), (('AL', 'CO', 'CR'), ('AL', 'CR')), (('AL', 'CO', 'CR'), 'CO'), (('AL', 'CO', 'CR'), ('CO', 'CR')), (('AL', 'CO', 'CR'), 'CR'), (('AL', 'CR'), ('AL', 'CO', 'CR')), ('CO', ('AL', 'CO', 'CR')), (('CO', 'CR'), ('AL', 'CO', 'CR')), ('CR', ('AL', 'CO', 'CR')), ] interactions = sorted_interactions(unsorted_interactions, max_interaction_order=3, symmetry=None) # the numbers are the different sort scores. Two of the same sort scores mean # the order doesn't matter assert interactions == [ ('AL', ('AL', 'CO', 'CR')), # (1, 0, 1) (('AL', 'CO', 'CR'), 'AL'), # (1, 0, 1) (('AL', 'CO', 'CR'), 'CO'), # (1, 0, 1) (('AL', 'CO', 'CR'), 'CR'), # (1, 0, 1) ('CO', ('AL', 'CO', 'CR')), # (1, 0, 1) ('CR', ('AL', 'CO', 'CR')), # (1, 0, 1) ]
55.966102
208
0.519887
1,971
9,906
2.521563
0.063927
0.115493
0.070624
0.217304
0.772233
0.74004
0.715895
0.678873
0.675654
0.624145
0
0.025761
0.200586
9,906
176
209
56.284091
0.601844
0.0957
0
0.371429
0
0
0.064045
0
0
0
0
0
0.121429
1
0.057143
false
0
0.035714
0
0.092857
0
0
0
0
null
0
0
1
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a793d30af0730653e95a962efbfe175eb6c5aed2
142
py
Python
torch_scope/__main__.py
LiyuanLucasLiu/PyScope
d6366e604f9a7763279310149b154ea1cc22f4c1
[ "Apache-2.0" ]
62
2018-09-11T01:04:38.000Z
2022-03-19T13:00:38.000Z
torch_scope/__main__.py
jainaayush05/Torch-Scope
bbc8b6e2562cbc6305ea6d937bcd6f96542755f6
[ "Apache-2.0" ]
3
2019-03-16T16:25:52.000Z
2021-05-10T14:02:13.000Z
torch_scope/__main__.py
jainaayush05/Torch-Scope
bbc8b6e2562cbc6305ea6d937bcd6f96542755f6
[ "Apache-2.0" ]
9
2018-10-04T00:30:17.000Z
2020-12-28T05:54:36.000Z
#!/usr/bin/env python import logging import os import sys import argparse from torch_scope import run if __name__ == "__main__": run()
11.833333
27
0.732394
21
142
4.52381
0.761905
0
0
0
0
0
0
0
0
0
0
0
0.183099
142
11
28
12.909091
0.818966
0.140845
0
0
0
0
0.066116
0
0
0
0
0
0
1
0
true
0
0.714286
0
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
a7c7b453410bb1602137c476d542cc616ada50fc
91
py
Python
LectioEx/apps.py
danielrhj123/LectioBadges
b266f1fe65f53e6f41fa53ee15cce0235fc26f1b
[ "Apache-2.0" ]
null
null
null
LectioEx/apps.py
danielrhj123/LectioBadges
b266f1fe65f53e6f41fa53ee15cce0235fc26f1b
[ "Apache-2.0" ]
null
null
null
LectioEx/apps.py
danielrhj123/LectioBadges
b266f1fe65f53e6f41fa53ee15cce0235fc26f1b
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class LectioexConfig(AppConfig): name = 'LectioEx'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
a7cae359630b219619c556f9bbeed8a262622b88
256
py
Python
backend/project/posts/utils/PostAlbumUtil.py
winoutt/winoutt-django
f48dfd933b3c12286f973701676eb2c2ab2bff73
[ "MIT" ]
null
null
null
backend/project/posts/utils/PostAlbumUtil.py
winoutt/winoutt-django
f48dfd933b3c12286f973701676eb2c2ab2bff73
[ "MIT" ]
null
null
null
backend/project/posts/utils/PostAlbumUtil.py
winoutt/winoutt-django
f48dfd933b3c12286f973701676eb2c2ab2bff73
[ "MIT" ]
null
null
null
from project.posts.models import PostAlbum def create(post, photos): for photo in photos: PostAlbum.objects.create(post=post, photo=photo, photo_original=photo) def get_post_album(post): return PostAlbum.objects.filter(post=post)
28.444444
79
0.734375
35
256
5.285714
0.542857
0.108108
0
0
0
0
0
0
0
0
0
0
0.171875
256
9
80
28.444444
0.872642
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.166667
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
a7cc8cbafb3b6554e6da16e394dcc09278a0a24e
14,288
py
Python
mofa/scheduler/tests/test_data.py
BoxInABoxICT/BoxPlugin
ad351978faa37ab867a86d2f4023a2b3e5a2ce19
[ "Apache-2.0" ]
null
null
null
mofa/scheduler/tests/test_data.py
BoxInABoxICT/BoxPlugin
ad351978faa37ab867a86d2f4023a2b3e5a2ce19
[ "Apache-2.0" ]
null
null
null
mofa/scheduler/tests/test_data.py
BoxInABoxICT/BoxPlugin
ad351978faa37ab867a86d2f4023a2b3e5a2ce19
[ "Apache-2.0" ]
null
null
null
# This program has been developed by students from the bachelor Computer Science at Utrecht University within the # Software and Game project course # ©Copyright Utrecht University Department of Information and Computing Sciences. """Contains test data.""" test_get_assignments_data = \ { "courses": [ { "assignments": [ { "cmid": 6, "name": "Learning basic loops", "duedate": 1573776060, }, { "cmid": 9, "name": "Learning booleans", "duedate": 1573776060, }, ] } ], "warnings": [] } test_get_assignments_check = \ [ { "cmid": 6, "name": "Learning basic loops", "duedate": 1573776060, }, { "cmid": 9, "name": "Learning booleans", "duedate": 1573776060, }, ] test_assignment_completion_check = \ { "statuses": [ { "cmid": 6, "state": 1 }, { "cmid": 9, "state": 0 } ], "warnings": [] } test_get_enrolled_users = \ [ { "id": 4, "username": "WS", "firstname": "Will", "lastname": "Smith", "fullname": "Will Smith", } ] test_inactivity_get_enrolled_users = \ [ { "id": 2 }, { "id": 3 }, { "id": 4 }, { "id": 5 } ] test_get_courses_by_id = \ { 'courses': [ { 'id': 2, 'fullname': 'BeginningCourse' } ] } test_get_courses_by_id_ended = \ { 'courses': [ { 'id': 2, 'fullname': 'No view course', 'displayname': 'No view course', 'shortname': 'nvc', 'categoryid': 1, 'categoryname': 'Miscellaneous', 'sortorder': 10001, 'summary': '', 'summaryformat': 1, 'summaryfiles': [], 'overviewfiles': [], 'contacts': [ {'id': 4, 'fullname': 'Saskia Restful Notificaties'}], 'enrollmentmethods': ['manual'], 'idnumber': '', 'format': 'topics', 'showgrades': 1, 'newsitems': 5, 'startdate': 1605740400, 'enddate': 1637276800, 'maxbytes': 0, 'showreports': 0, 'visible': 1, 'groupmode': 0, 'groupmodeforce': 0, 'defaultgroupingid': 0, 'enablecompletion': 1, 'completionnotify': 0, 'lang': '', 'theme': '', 'marker': 0, 'legacyfiles': 0, 'calendartype': '', 'timecreated': 1605708824, 'timemodified': 1605708824, 'requested': 0, 'cacherev': 1605801045, 'filters': [{'filter': 'displayh5p', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'activitynames', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mathjaxloader', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'emoticon', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'urltolink', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mediaplugin', 'localstate': 0, 'inheritedstate': 1}], 'courseformatoptions': [{'name': 'hiddensections', 'value': 0}, {'name': 'coursedisplay', 'value': 0}]}] } test_get_courses_by_id_live = \ { 'courses': [ { 'id': 2, 'fullname': 'No view course', 'displayname': 'No view course', 'shortname': 'nvc', 'categoryid': 1, 'categoryname': 'Miscellaneous', 'sortorder': 10001, 'summary': '', 'summaryformat': 1, 'summaryfiles': [], 'overviewfiles': [], 'contacts': [ {'id': 4, 'fullname': 'Saskia Restful Notificaties'}], 'enrollmentmethods': ['manual'], 'idnumber': '', 'format': 'topics', 'showgrades': 1, 'newsitems': 5, 'startdate': 1605740400, 'enddate': 1637276400, 'maxbytes': 0, 'showreports': 0, 'visible': 1, 'groupmode': 0, 'groupmodeforce': 0, 'defaultgroupingid': 0, 'enablecompletion': 1, 'completionnotify': 0, 'lang': '', 'theme': '', 'marker': 0, 'legacyfiles': 0, 'calendartype': '', 'timecreated': 1605708824, 'timemodified': 1605708824, 'requested': 0, 'cacherev': 1605801045, 'filters': [{'filter': 'displayh5p', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'activitynames', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mathjaxloader', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'emoticon', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'urltolink', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mediaplugin', 'localstate': 0, 'inheritedstate': 1}], 'courseformatoptions': [{'name': 'hiddensections', 'value': 0}, {'name': 'coursedisplay', 'value': 0}]}] } test_get_courses_by_id_young = \ { 'courses': [ { 'id': 2, 'fullname': 'No view course', 'displayname': 'No view course', 'shortname': 'nvc', 'categoryid': 1, 'categoryname': 'Miscellaneous', 'sortorder': 10001, 'summary': '', 'summaryformat': 1, 'summaryfiles': [], 'overviewfiles': [], 'contacts': [ {'id': 4, 'fullname': 'Saskia Restful Notificaties'}], 'enrollmentmethods': ['manual'], 'idnumber': '', 'format': 'topics', 'showgrades': 1, 'newsitems': 5, 'startdate': 1605740400, 'enddate': 1606487200, 'maxbytes': 0, 'showreports': 0, 'visible': 1, 'groupmode': 0, 'groupmodeforce': 0, 'defaultgroupingid': 0, 'enablecompletion': 1, 'completionnotify': 0, 'lang': '', 'theme': '', 'marker': 0, 'legacyfiles': 0, 'calendartype': '', 'timecreated': 1606400370, 'timemodified': 1605708824, 'requested': 0, 'cacherev': 1605801045, 'filters': [{'filter': 'displayh5p', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'activitynames', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mathjaxloader', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'emoticon', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'urltolink', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mediaplugin', 'localstate': 0, 'inheritedstate': 1}], 'courseformatoptions': [{'name': 'hiddensections', 'value': 0}, {'name': 'coursedisplay', 'value': 0}]}] } test_get_courses_by_id_old = \ { 'courses': [ { 'id': 2, 'fullname': 'No view course', 'displayname': 'No view course', 'shortname': 'nvc', 'categoryid': 1, 'categoryname': 'Miscellaneous', 'sortorder': 10001, 'summary': '', 'summaryformat': 1, 'summaryfiles': [], 'overviewfiles': [], 'contacts': [ {'id': 4, 'fullname': 'Saskia Restful Notificaties'}], 'enrollmentmethods': ['manual'], 'idnumber': '', 'format': 'topics', 'showgrades': 1, 'newsitems': 5, 'startdate': 1605740400, 'enddate': 1637276400, 'maxbytes': 0, 'showreports': 0, 'visible': 1, 'groupmode': 0, 'groupmodeforce': 0, 'defaultgroupingid': 0, 'enablecompletion': 1, 'completionnotify': 0, 'lang': '', 'theme': '', 'marker': 0, 'legacyfiles': 0, 'calendartype': '', 'timecreated': 1605708824, 'timemodified': 1605708824, 'requested': 0, 'cacherev': 1605801045, 'filters': [{'filter': 'displayh5p', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'activitynames', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mathjaxloader', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'emoticon', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'urltolink', 'localstate': 0, 'inheritedstate': 1}, {'filter': 'mediaplugin', 'localstate': 0, 'inheritedstate': 1}], 'courseformatoptions': [{'name': 'hiddensections', 'value': 0}, {'name': 'coursedisplay', 'value': 0}]}] } test_learning_locker_viewed_course = \ { "more": "", "statements": [ { "actor": { "name": "Admin User", "account": { "homePage": "http://127.0.0.1:80", "name": "2" }, "objectType": "Assistant" }, "verb": { "id": "http://id.tincanapi.com/verb/viewed", "display": { "en": "viewed" } }, "object": { "id": "http://127.0.0.1:80/course/view.php?id=2", "definition": { "type": "http://id.tincanapi.com/activitytype/lms/course", "name": { "en": "BeginningCourse" }, "extensions": { "https://w3id.org/learning-analytics/learning-management-system/short-id": "BC", "https://w3id.org/learning-analytics/learning-management-system/external-id": "7" } }, "objectType": "Activity" }, "timestamp": "2019-10-16T11:26:19+01:00", "context": { "platform": "Moodle", "language": "en", "extensions": { "http://lrs.learninglocker.net/define/extensions/info": { "http://moodle.org": "3.7.2 (Build: 20190909)", "https://github.com/xAPI-vle/moodle-logstore_xapi": "v4.4.0", "event_name": "\\core\\event\\course_viewed", "event_function": "\\src\\transformer\\events\\core\\course_viewed" } }, "contextActivities": { "grouping": [ { "id": "http://127.0.0.1:80", "definition": { "type": "http://id.tincanapi.com/activitytype/lms", "name": { "en": "\"New Site\"" } }, "objectType": "Activity" } ], "category": [ { "id": "http://moodle.org", "definition": { "type": "http://id.tincanapi.com/activitytype/source", "name": { "en": "Moodle" } }, "objectType": "Activity" } ] } }, "id": "c98c8522-3d43-4098-9b5d-812392458328", "stored": "2019-10-16T10:27:02.866Z", "authority": { "objectType": "Assistant", "name": "New Client", "mbox": "mailto:hello@learninglocker.net" }, "version": "1.0.0" } ] }
37.208333
113
0.369611
843
14,288
6.207592
0.26809
0.050449
0.114657
0.119243
0.749857
0.742977
0.740684
0.726925
0.688706
0.688706
0
0.070219
0.491671
14,288
383
114
37.305483
0.650145
0.017147
0
0.589674
0
0.002717
0.323691
0.013609
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ac0c8729aa498249703102ea0f30adabcd30e835
54
py
Python
anonymizer/__init__.py
jjhuang/django-anonymizer
2d25bb6e8b5e4230c58031c4b6d10cc536669b3e
[ "MIT" ]
13
2016-05-24T07:40:17.000Z
2021-09-07T20:38:18.000Z
anonymizer/__init__.py
jjhuang/django-anonymizer
2d25bb6e8b5e4230c58031c4b6d10cc536669b3e
[ "MIT" ]
32
2015-02-02T23:39:32.000Z
2021-01-14T06:29:05.000Z
anonymizer/__init__.py
jjhuang/django-anonymizer
2d25bb6e8b5e4230c58031c4b6d10cc536669b3e
[ "MIT" ]
14
2015-03-22T15:22:24.000Z
2020-01-09T19:03:01.000Z
# flake8: noqa from anonymizer.base import Anonymizer
18
38
0.814815
7
54
6.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0.021277
0.12963
54
2
39
27
0.914894
0.222222
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ac15f226c90d4ebb8e381060da094ff5c3be1e8d
678
py
Python
game_object_factory.py
cxong/Slappa
bb601734db07ee1f1e1d3763d2c5f6146248fd76
[ "MIT" ]
7
2015-02-24T22:24:45.000Z
2021-05-15T16:39:27.000Z
game_object_factory.py
cxong/Slappa
bb601734db07ee1f1e1d3763d2c5f6146248fd76
[ "MIT" ]
null
null
null
game_object_factory.py
cxong/Slappa
bb601734db07ee1f1e1d3763d2c5f6146248fd76
[ "MIT" ]
1
2016-06-22T11:50:22.000Z
2016-06-22T11:50:22.000Z
from group import * from image import * from sound import * from sprite import * from text import * class GameObjectFactory(object): def __init__(self, game): self.game = game def audio(self, key): return Sound(self.game, key) def group(self): return self.game.world.add(Group()) def image(self, x, y, key, scale=Point(1, 1)): return self.game.world.add(Image(self.game, x, y, key, scale)) def sprite(self, x, y, key, scale=Point(1, 1)): return self.game.world.add(Sprite(self.game, x, y, key, scale)) def text(self, x, y, text, style): return self.game.world.add(Text(self.game, x, y, text, style))
27.12
71
0.629794
106
678
3.990566
0.235849
0.189125
0.132388
0.179669
0.406619
0.3026
0.3026
0.20331
0.20331
0.20331
0
0.007634
0.227139
678
25
72
27.12
0.799618
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.277778
0.277778
0.944444
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
ac19ff3ff344feb5dbc15a2c9076538f3416b5bb
248
py
Python
doppel/__init__.py
bburns632/doppel-cli
e0c708f565db0f558bca6f2fbe28a41d45121344
[ "BSD-3-Clause" ]
null
null
null
doppel/__init__.py
bburns632/doppel-cli
e0c708f565db0f558bca6f2fbe28a41d45121344
[ "BSD-3-Clause" ]
null
null
null
doppel/__init__.py
bburns632/doppel-cli
e0c708f565db0f558bca6f2fbe28a41d45121344
[ "BSD-3-Clause" ]
null
null
null
__all__ = [ 'PackageAPI', 'PackageCollection' ] from doppel.PackageAPI import PackageAPI from doppel.PackageCollection import PackageCollection from doppel.DoppelTestError import DoppelTestError from doppel.reporters import SimpleReporter
24.8
54
0.826613
23
248
8.73913
0.391304
0.199005
0.268657
0
0
0
0
0
0
0
0
0
0.125
248
9
55
27.555556
0.926267
0
0
0
0
0
0.108871
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ac62cf229bd1d4301ba72c65982f715066b302c5
79
py
Python
setup.py
symonk/zentinel
6ec390dc8947e81a867b5fdbcf0993cd3471a9f4
[ "Apache-2.0" ]
null
null
null
setup.py
symonk/zentinel
6ec390dc8947e81a867b5fdbcf0993cd3471a9f4
[ "Apache-2.0" ]
31
2021-08-03T03:24:27.000Z
2022-03-28T03:21:52.000Z
setup.py
symonk/zentinel
6ec390dc8947e81a867b5fdbcf0993cd3471a9f4
[ "Apache-2.0" ]
null
null
null
import setuptools setuptools.setup() # still required for editable installs.
19.75
59
0.797468
9
79
7
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.139241
79
3
60
26.333333
0.926471
0.468354
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ac6ad863be46a739ea8270a4b77f8c43b55f6302
621
py
Python
inferelator_prior/motifs/__init__.py
cskokgibbs/srrTomat0
9cfdf620bc6d8741587e59e017046c3e7e169fd7
[ "MIT" ]
4
2020-10-26T14:19:04.000Z
2022-02-16T21:36:28.000Z
inferelator_prior/motifs/__init__.py
flatironinstitute/srrTomat0
9255d5a52bc4425346f578841004955c72b4ba76
[ "MIT" ]
3
2022-02-01T04:38:26.000Z
2022-03-24T14:37:17.000Z
inferelator_prior/motifs/__init__.py
flatironinstitute/srrTomat0
9255d5a52bc4425346f578841004955c72b4ba76
[ "MIT" ]
1
2021-09-23T01:09:17.000Z
2021-09-23T01:09:17.000Z
from inferelator_prior.motifs._motif import (Motif, motifs_to_dataframe, chunk_motifs, select_motifs, truncate_motifs, fuzzy_merge_motifs, shuffle_motifs, INFO_COL, MOTIF_COL, ENTROPY_COL, LEN_COL, OCC_COL, MOTIF_NAME_COL, SCAN_SCORE_COL, SCORE_PER_BASE, MOTIF_OBJ_COL, MOTIF_CONSENSUS_COL, MOTIF_ORIGINAL_NAME_COL) from inferelator_prior.motifs.motif_scan import MotifScan from inferelator_prior.motifs.motif_loader import load_motif_file
69
118
0.621578
68
621
5.176471
0.455882
0.090909
0.170455
0.221591
0.264205
0
0
0
0
0
0
0
0.338164
621
8
119
77.625
0.856448
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.428571
0
0.428571
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ac808334f93c0b8f4faf9c689f174cfb852454e7
4,906
py
Python
Laelia/apps/base/migrations/0007_auto_20201001_1747.py
arantesdv/LaeliaAppProject
93fca5393cb8406694903d9adde02067480c792e
[ "MIT" ]
null
null
null
Laelia/apps/base/migrations/0007_auto_20201001_1747.py
arantesdv/LaeliaAppProject
93fca5393cb8406694903d9adde02067480c792e
[ "MIT" ]
null
null
null
Laelia/apps/base/migrations/0007_auto_20201001_1747.py
arantesdv/LaeliaAppProject
93fca5393cb8406694903d9adde02067480c792e
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2020-10-01 17:47 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('base', '0006_auto_20201001_1731'), ] operations = [ migrations.CreateModel( name='City', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('en_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='English Name')), ('pt_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Portuguese Name')), ('es_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Spanish Name')), ('_search_names', models.CharField(blank=True, editable=False, max_length=255, null=True)), ], options={ 'ordering': ['pt_name'], 'abstract': False, }, ), migrations.CreateModel( name='Nation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('en_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='English Name')), ('pt_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Portuguese Name')), ('es_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Spanish Name')), ('_search_names', models.CharField(blank=True, editable=False, max_length=255, null=True)), ('abrev', models.CharField(max_length=3, verbose_name='Nation Abreviation')), ], options={ 'ordering': ['pt_name'], 'abstract': False, }, ), migrations.AlterModelOptions( name='patient', options={'verbose_name': 'Patient', 'verbose_name_plural': 'Patients'}, ), migrations.AlterModelOptions( name='professional', options={'verbose_name': 'Professional', 'verbose_name_plural': 'Professionals'}, ), migrations.RemoveField( model_name='patient', name='main_phone', ), migrations.RemoveField( model_name='patient', name='other_phone', ), migrations.RemoveField( model_name='professional', name='main_phone', ), migrations.RemoveField( model_name='professional', name='other_phone', ), migrations.CreateModel( name='Region', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('en_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='English Name')), ('pt_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Portuguese Name')), ('es_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Spanish Name')), ('_search_names', models.CharField(blank=True, editable=False, max_length=255, null=True)), ('abrev', models.CharField(max_length=2, verbose_name='Region Abreviation')), ('nation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='base.Nation')), ], options={ 'ordering': ['pt_name'], 'abstract': False, }, ), migrations.AddConstraint( model_name='nation', constraint=models.UniqueConstraint(fields=('pt_name',), name='unique_nation'), ), migrations.AddField( model_name='city', name='region', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='base.Region'), ), migrations.AddField( model_name='patient', name='city', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='base.City'), ), migrations.AddField( model_name='professional', name='city', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='base.City'), ), migrations.AddConstraint( model_name='region', constraint=models.UniqueConstraint(fields=('pt_name',), name='unique_region'), ), migrations.AddConstraint( model_name='city', constraint=models.UniqueConstraint(fields=('pt_name',), name='unique_city'), ), ]
44.198198
133
0.578679
494
4,906
5.566802
0.17004
0.072
0.087273
0.104727
0.730909
0.730909
0.713455
0.611273
0.552364
0.552364
0
0.019586
0.2819
4,906
110
134
44.6
0.760999
0.009172
0
0.730769
1
0
0.153735
0.004733
0
0
0
0
0
1
0
false
0
0.019231
0
0.048077
0
0
0
0
null
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ac8bf56ac51206c7a84e0866931cdf513a3b552d
563
py
Python
problems/image_text_to_class/__init__.py
aasseman/mi-prometheus
c655c88cc6aec4d0724c19ea95209f1c2dd6770d
[ "Apache-2.0" ]
null
null
null
problems/image_text_to_class/__init__.py
aasseman/mi-prometheus
c655c88cc6aec4d0724c19ea95209f1c2dd6770d
[ "Apache-2.0" ]
null
null
null
problems/image_text_to_class/__init__.py
aasseman/mi-prometheus
c655c88cc6aec4d0724c19ea95209f1c2dd6770d
[ "Apache-2.0" ]
null
null
null
from .clevr import CLEVR from .clevr_dataset import CLEVRDataset from .generate_feature_maps import GenerateFeatureMaps from .image_text_to_class_problem import ImageTextTuple, SceneDescriptionTuple, ObjectRepresentation, \ ImageTextToClassProblem from .sort_of_clevr import SortOfCLEVR from .shape_color_query import ShapeColorQuery __all__ = [ 'CLEVR', 'CLEVRDataset', 'GenerateFeatureMaps', 'ImageTextTuple', 'SceneDescriptionTuple', 'ObjectRepresentation', 'ImageTextToClassProblem', 'SortOfCLEVR', 'ShapeColorQuery']
29.631579
103
0.786856
48
563
8.916667
0.541667
0.042056
0.257009
0.364486
0
0
0
0
0
0
0
0
0.143872
563
18
104
31.277778
0.887967
0
0
0
1
0
0.248668
0.078153
0
0
0
0
0
1
0
false
0
0.352941
0
0.352941
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ce16fbb00f62e84f4f5aca7b25c9bfee0eab6d55
113
py
Python
DeepLearning/Python/Chapter 2/Ch02-02-perceptron.py
BlueWay-KU/Study
a86405cdc3011eaed1b980b562b75df1e9ce90a8
[ "MIT" ]
null
null
null
DeepLearning/Python/Chapter 2/Ch02-02-perceptron.py
BlueWay-KU/Study
a86405cdc3011eaed1b980b562b75df1e9ce90a8
[ "MIT" ]
null
null
null
DeepLearning/Python/Chapter 2/Ch02-02-perceptron.py
BlueWay-KU/Study
a86405cdc3011eaed1b980b562b75df1e9ce90a8
[ "MIT" ]
null
null
null
import numpy as np x = np.array([0, 1]) w = np.array([0.5, 0.5]) b = -0.7 w * b np.sum(w*x) np.sum(w*x) + b
16.142857
25
0.504425
30
113
1.9
0.433333
0.105263
0.280702
0.245614
0
0
0
0
0
0
0
0.093023
0.238938
113
7
26
16.142857
0.569767
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
0
0
1
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
ce27c499b433c15c668c2ace26e7f7faefe6633e
89
py
Python
courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/bookone/apps.py
Nahid-Hassan/fullstack-software-development
892ffb33e46795061ea63378279a6469de317b1a
[ "CC0-1.0" ]
297
2019-01-25T08:44:08.000Z
2022-03-29T18:46:08.000Z
courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/bookone/apps.py
Nahid-Hassan/fullstack-software-development
892ffb33e46795061ea63378279a6469de317b1a
[ "CC0-1.0" ]
22
2019-05-06T14:21:04.000Z
2022-02-21T10:05:25.000Z
courses/backend/django-for-everybody/Web Application Technologies and Django/resources/dj4e-samples/bookone/apps.py
Nahid-Hassan/fullstack-software-development
892ffb33e46795061ea63378279a6469de317b1a
[ "CC0-1.0" ]
412
2019-02-12T20:44:43.000Z
2022-03-30T04:23:25.000Z
from django.apps import AppConfig class BookoneConfig(AppConfig): name = 'bookone'
14.833333
33
0.752809
10
89
6.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.168539
89
5
34
17.8
0.905405
0
0
0
0
0
0.078652
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ce360663122039f12cbec525f04adceb270da9d5
546
py
Python
svhn_32x32_download.py
vrishabh22/OCR-Minor-Project
ea717f2b6aa1618742b6697dd7f8dc40cb3450c2
[ "MIT" ]
null
null
null
svhn_32x32_download.py
vrishabh22/OCR-Minor-Project
ea717f2b6aa1618742b6697dd7f8dc40cb3450c2
[ "MIT" ]
null
null
null
svhn_32x32_download.py
vrishabh22/OCR-Minor-Project
ea717f2b6aa1618742b6697dd7f8dc40cb3450c2
[ "MIT" ]
null
null
null
import urllib print("Downloading Test Folder") urllib.urlretrieve("http://ufldl.stanford.edu/housenumbers/test_32x32.mat", "data/test_32x32.mat") print("Test Folder Images Download Done") print("Downloading Train Folder") urllib.urlretrieve("http://ufldl.stanford.edu/housenumbers/train_32x32.mat", "data/train_32x32.mat") print("Train Folder Images Download Done") print("Downloading Extra Folder") urllib.urlretrieve("http://ufldl.stanford.edu/housenumbers/extra_32x32.mat", "data/extra_32x32.mat") print("Extra Folder Images Download Done")
42
100
0.794872
74
546
5.783784
0.27027
0.11215
0.161215
0.189252
0.57243
0.57243
0.385514
0.385514
0
0
0
0.046875
0.062271
546
13
101
42
0.789063
0
0
0
0
0
0.711152
0
0
0
0
0
0
1
0
true
0
0.1
0
0.1
0.6
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
ce407be83429722c411e95e51697c641146a6ffa
341
py
Python
hooks/webkitpy/common/checkout/scm/__init__.py
nizovn/luna-sysmgr
48b7e2546e81d6ad1604353f2e5ab797a7d1667c
[ "Apache-2.0" ]
3
2018-11-16T14:51:17.000Z
2019-11-21T10:55:24.000Z
hooks/webkitpy/common/checkout/scm/__init__.py
nizovn/luna-sysmgr
48b7e2546e81d6ad1604353f2e5ab797a7d1667c
[ "Apache-2.0" ]
1
2021-02-20T13:12:15.000Z
2021-02-20T13:12:15.000Z
hooks/webkitpy/common/checkout/scm/__init__.py
ericblade/luna-sysmgr
82d5d7ced4ba21d3802eb2c8ae063236b6562331
[ "Apache-2.0" ]
null
null
null
# Required for Python to search this directory for module files # We only export public API here. from .commitmessage import CommitMessage from .detection import find_checkout_root, default_scm, detect_scm_system from .git import Git, AmbiguousCommitError from .scm import SCM, AuthenticationError, CheckoutNeedsUpdate from .svn import SVN
37.888889
73
0.832845
46
341
6.065217
0.673913
0
0
0
0
0
0
0
0
0
0
0
0.129032
341
8
74
42.625
0.939394
0.272727
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
022a770977389b7ec27848553cbc49bab53d1500
174
py
Python
nestedtensor/version.py
swolchok/nestedtensor
3300e3bc42394ab4bb226cef8acc631012a72ef0
[ "BSD-3-Clause" ]
null
null
null
nestedtensor/version.py
swolchok/nestedtensor
3300e3bc42394ab4bb226cef8acc631012a72ef0
[ "BSD-3-Clause" ]
null
null
null
nestedtensor/version.py
swolchok/nestedtensor
3300e3bc42394ab4bb226cef8acc631012a72ef0
[ "BSD-3-Clause" ]
null
null
null
__version__ = '0.1.4+5b45731' git_version = '5b457313bfb6578b43d76282b321657bf85ee1b3' from nestedtensor import _C if hasattr(_C, 'CUDA_VERSION'): cuda = _C.CUDA_VERSION
29
56
0.787356
21
174
6.047619
0.666667
0.07874
0.188976
0
0
0
0
0
0
0
0
0.24026
0.114943
174
5
57
34.8
0.584416
0
0
0
0
0
0.373563
0.229885
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
65f095568508eb3d1e1246c7aecfc59075f5d3b8
72
py
Python
test/test_find_the_difference.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_find_the_difference.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
test/test_find_the_difference.py
spencercjh/sync-leetcode-today-problem-python3-example
4957e5eadb697334741df0fc297bec2edaa9e2ab
[ "Apache-2.0" ]
null
null
null
solution = FindTheDifference() assert X == solution.findTheDifference( )
36
41
0.791667
6
72
9.5
0.666667
0.877193
0
0
0
0
0
0
0
0
0
0
0.097222
72
2
41
36
0.876923
0
0
0
0
0
0
0
0
0
0
0
0.5
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
4
65f5bce50e98aea9183af893c3ec3e7b75d3d5a4
20
py
Python
stock/quant/__init__.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
2
2016-10-31T04:05:11.000Z
2017-04-17T08:46:53.000Z
stock/quant/__init__.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
null
null
null
stock/quant/__init__.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
null
null
null
__all__ = ['covar']
10
19
0.6
2
20
4
1
0
0
0
0
0
0
0
0
0
0
0
0.15
20
1
20
20
0.470588
0
0
0
0
0
0.25
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
5a0650eab0fc64033085b16aad8e3094c165d5c2
76
py
Python
Seman4/Dia1/04-programas.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
null
null
null
Seman4/Dia1/04-programas.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
40
2021-03-10T16:58:17.000Z
2022-03-26T01:55:17.000Z
Seman4/Dia1/04-programas.py
GuidoTorres/codigo8
7fdff4f677f048de7d7877b96ec3a688d3dde163
[ "MIT" ]
null
null
null
#Añadir un modulo a nuestro programa import modulo modulo.saludar("Guido")
15.2
36
0.789474
11
76
5.454545
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.131579
76
5
37
15.2
0.909091
0.460526
0
0
0
0
0.121951
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5a17699849990e9a2eb1334957d27180b197290a
89
py
Python
regform/apps.py
elishaking/django-form
97f25aa2e54238d2432ce60a77e248da06af3745
[ "MIT" ]
null
null
null
regform/apps.py
elishaking/django-form
97f25aa2e54238d2432ce60a77e248da06af3745
[ "MIT" ]
1
2020-01-28T14:18:41.000Z
2020-01-28T14:18:41.000Z
regform/apps.py
elishaking/django-form
97f25aa2e54238d2432ce60a77e248da06af3745
[ "MIT" ]
null
null
null
from django.apps import AppConfig class RegformConfig(AppConfig): name = 'regform'
14.833333
33
0.752809
10
89
6.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.168539
89
5
34
17.8
0.905405
0
0
0
0
0
0.078652
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
5a2e54cfc025b9dad0981d3f6cc37e639122523a
39
py
Python
discord/const.py
BenitzCoding/Fusion.py
ed57645f4bcb7f961a7738c27aceecb920266404
[ "MIT" ]
8
2021-10-15T01:05:49.000Z
2022-01-02T11:07:05.000Z
discord/const.py
BenitzCoding/Fusion.py
ed57645f4bcb7f961a7738c27aceecb920266404
[ "MIT" ]
3
2021-10-10T16:48:05.000Z
2021-10-10T16:48:48.000Z
discord/const.py
BenitzCoding/Fusion.py
ed57645f4bcb7f961a7738c27aceecb920266404
[ "MIT" ]
1
2021-12-09T03:15:09.000Z
2021-12-09T03:15:09.000Z
BASE_API = "https://discord.com/api/v8"
39
39
0.717949
7
39
3.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0.027027
0.051282
39
1
39
39
0.702703
0
0
0
0
0
0.65
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
5a2e85c7ff6e36b86f97ca35fbab87f972af553d
115
py
Python
exercise/test1.py
D2MAC-dev/self_education
b4c8011db3995d8947c40416ef76a023162c09c3
[ "Apache-2.0" ]
null
null
null
exercise/test1.py
D2MAC-dev/self_education
b4c8011db3995d8947c40416ef76a023162c09c3
[ "Apache-2.0" ]
null
null
null
exercise/test1.py
D2MAC-dev/self_education
b4c8011db3995d8947c40416ef76a023162c09c3
[ "Apache-2.0" ]
null
null
null
day = "день" night = "ночь" uran_sightings = '{0} {1} {0} {1} {1} {1} {0}'.format(day, night) print(uran_sightings)
28.75
65
0.608696
19
115
3.578947
0.526316
0.382353
0
0
0
0
0
0
0
0
0
0.070707
0.13913
115
4
66
28.75
0.616162
0
0
0
0
0.25
0.301724
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
5a3082e3117b50d8f1a06e806849f145b76c2f1b
1,986
py
Python
tests/test_time_hours.py
putridparrot/PyUnits
4f1095c6fc0bee6ba936921c391913dbefd9307c
[ "MIT" ]
null
null
null
tests/test_time_hours.py
putridparrot/PyUnits
4f1095c6fc0bee6ba936921c391913dbefd9307c
[ "MIT" ]
null
null
null
tests/test_time_hours.py
putridparrot/PyUnits
4f1095c6fc0bee6ba936921c391913dbefd9307c
[ "MIT" ]
null
null
null
# <auto-generated> # This code was generated by the UnitCodeGenerator tool # # Changes to this file will be lost if the code is regenerated # </auto-generated> import unittest import units.time.hours class TestHoursMethods(unittest.TestCase): def test_convert_known_hours_to_seconds(self): self.assertAlmostEqual(43200.0, units.time.hours.to_seconds(12.0), places=1) self.assertAlmostEqual(11520.0, units.time.hours.to_seconds(3.2), places=1) self.assertAlmostEqual(1080.0, units.time.hours.to_seconds(0.3), places=1) def test_convert_known_hours_to_minutes(self): self.assertAlmostEqual(18.0, units.time.hours.to_minutes(0.3), places=1) self.assertAlmostEqual(42000.0, units.time.hours.to_minutes(700.0), places=1) self.assertAlmostEqual(288.0, units.time.hours.to_minutes(4.8), places=1) def test_convert_known_hours_to_days(self): self.assertAlmostEqual(0.2, units.time.hours.to_days(4.8), places=1) self.assertAlmostEqual(7.91667, units.time.hours.to_days(190.0), places=1) self.assertAlmostEqual(0.354167, units.time.hours.to_days(8.5), places=1) def test_convert_known_hours_to_weeks(self): self.assertAlmostEqual(4.7619, units.time.hours.to_weeks(800.0), places=1) self.assertAlmostEqual(0.535714, units.time.hours.to_weeks(90.0), places=1) self.assertAlmostEqual(0.607143, units.time.hours.to_weeks(102.0), places=1) def test_convert_known_hours_to_months(self): self.assertAlmostEqual(0.139726, units.time.hours.to_months(102.0), places=1) self.assertAlmostEqual(13.52875, units.time.hours.to_months(9876.0), places=1) self.assertAlmostEqual(0.13808204, units.time.hours.to_months(100.8), places=1) def test_convert_known_hours_to_years(self): self.assertAlmostEqual(1.027397, units.time.hours.to_years(9000.0), places=1) self.assertAlmostEqual(0.1144977, units.time.hours.to_years(1003.0), places=1) self.assertAlmostEqual(0.0923516, units.time.hours.to_years(809.0), places=1) if __name__ == '__main__': unittest.main()
45.136364
81
0.77996
321
1,986
4.65109
0.242991
0.112525
0.178165
0.1929
0.573342
0.346283
0.111855
0.111855
0.045546
0
0
0.103448
0.08006
1,986
43
82
46.186047
0.713738
0.075025
0
0
1
0
0.004369
0
0
0
0
0
0.62069
1
0.206897
false
0
0.068966
0
0.310345
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
1
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
4
5a64f00ef803f46300b15c1b73472a1fe3eabc0b
72
py
Python
imgreco/__init__.py
Pakirisu/ArknightsAutoHelper
8b136c82794cfe9f364788d9c92f1e4c5b38c6cb
[ "MIT" ]
1
2020-01-15T01:05:28.000Z
2020-01-15T01:05:28.000Z
imgreco/__init__.py
ZhouZiHao-Moon/ArknightsAutoHelper
3135b54d69f2255f99c13d42dc936065701c3129
[ "MIT" ]
null
null
null
imgreco/__init__.py
ZhouZiHao-Moon/ArknightsAutoHelper
3135b54d69f2255f99c13d42dc936065701c3129
[ "MIT" ]
null
null
null
from . import common, before_operation, end_operation, item, main, task
36
71
0.791667
10
72
5.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.125
72
1
72
72
0.873016
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
5a71e514f2914d17a8066d51ab4fa1a534ade856
17
py
Python
network_crawler/__main__.py
luigi-riefolo/network_crawler
376fb5860c573416ac71a0dfe5437011858398b6
[ "MIT" ]
null
null
null
network_crawler/__main__.py
luigi-riefolo/network_crawler
376fb5860c573416ac71a0dfe5437011858398b6
[ "MIT" ]
null
null
null
network_crawler/__main__.py
luigi-riefolo/network_crawler
376fb5860c573416ac71a0dfe5437011858398b6
[ "MIT" ]
null
null
null
"""Main stub."""
8.5
16
0.470588
2
17
4
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
17
1
17
17
0.533333
0.588235
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5a781142b8937e0d4c1fceb3ccfcc1ea2a2155a5
120
py
Python
src/optimizations/models.py
etianen/django-optimizations
c9614c3eeb1cb3482eb2db84d3951356d7fb44a3
[ "BSD-3-Clause" ]
12
2015-05-06T21:34:11.000Z
2021-07-31T04:49:25.000Z
src/optimizations/models.py
etianen/django-optimizations
c9614c3eeb1cb3482eb2db84d3951356d7fb44a3
[ "BSD-3-Clause" ]
3
2015-02-11T16:23:13.000Z
2018-04-17T09:07:36.000Z
src/optimizations/models.py
etianen/django-optimizations
c9614c3eeb1cb3482eb2db84d3951356d7fb44a3
[ "BSD-3-Clause" ]
4
2015-02-11T10:21:31.000Z
2019-07-24T20:29:28.000Z
"""Models used by django-optimizations.""" # Nothing to see here. This module needs to exist for the testing framework.
40
76
0.758333
18
120
5.055556
0.944444
0
0
0
0
0
0
0
0
0
0
0
0.15
120
3
76
40
0.892157
0.933333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
5a7f0664983deedb1089c92f3f76f1064998c012
92
py
Python
src/notifi/apps.py
earth-emoji/love
3617bd47c396803c411e136b3e1de87c18e03890
[ "BSD-2-Clause" ]
null
null
null
src/notifi/apps.py
earth-emoji/love
3617bd47c396803c411e136b3e1de87c18e03890
[ "BSD-2-Clause" ]
7
2021-03-19T10:46:09.000Z
2022-03-12T00:28:55.000Z
src/notifi/apps.py
earth-emoji/love
3617bd47c396803c411e136b3e1de87c18e03890
[ "BSD-2-Clause" ]
null
null
null
from django.apps import AppConfig class NotifiConfig(AppConfig): name = 'notifi'
15.333333
34
0.706522
10
92
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.217391
92
5
35
18.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ce5702741d1e40427dbd5cad5a4dff6a13549e5f
146
py
Python
alicebot/plugins/guild_basic/config.py
Erisu0014/yuniBot
b6d6a35abb63a2de57375dee6a1cd6258b3a7a95
[ "Apache-2.0" ]
null
null
null
alicebot/plugins/guild_basic/config.py
Erisu0014/yuniBot
b6d6a35abb63a2de57375dee6a1cd6258b3a7a95
[ "Apache-2.0" ]
null
null
null
alicebot/plugins/guild_basic/config.py
Erisu0014/yuniBot
b6d6a35abb63a2de57375dee6a1cd6258b3a7a95
[ "Apache-2.0" ]
1
2022-02-11T12:46:43.000Z
2022-02-11T12:46:43.000Z
from pydantic import BaseSettings class Config(BaseSettings): bot_id: str bot_guild_id: str class Config: extra = "ignore"
14.6
33
0.678082
18
146
5.333333
0.666667
0.229167
0
0
0
0
0
0
0
0
0
0
0.260274
146
9
34
16.222222
0.888889
0
0
0
0
0
0.041096
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.833333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4