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
697f6486b8e21013351bc2c5662ea00e53746a08
15
py
Python
base/secret_code.py
ashutoshpurushottam/wishper-blog
670c409798a88c5a828218221902d8b401dbea77
[ "Apache-2.0" ]
null
null
null
base/secret_code.py
ashutoshpurushottam/wishper-blog
670c409798a88c5a828218221902d8b401dbea77
[ "Apache-2.0" ]
null
null
null
base/secret_code.py
ashutoshpurushottam/wishper-blog
670c409798a88c5a828218221902d8b401dbea77
[ "Apache-2.0" ]
null
null
null
secret = "ashu"
15
15
0.666667
2
15
5
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
15
1
15
15
0.769231
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
6990b0a29b50c68d4d28c4ac3eda53cf9dfeeb04
641
py
Python
tests/conftest.py
donalrinho/zfit
9769ef7d56a6be9a5d438e47b80ea5a8f772bc24
[ "BSD-3-Clause" ]
null
null
null
tests/conftest.py
donalrinho/zfit
9769ef7d56a6be9a5d438e47b80ea5a8f772bc24
[ "BSD-3-Clause" ]
null
null
null
tests/conftest.py
donalrinho/zfit
9769ef7d56a6be9a5d438e47b80ea5a8f772bc24
[ "BSD-3-Clause" ]
null
null
null
"""Used to make pytest functions available globally""" # Copyright (c) 2020 zfit # # # def pytest_generate_tests(metafunc): # if metafunc.config.option.all_jit_levels: # # # We're going to duplicate these tests by parametrizing them, # # which requires that each test has a fixture to accept the parameter. # # We can add a new fixture like so: # metafunc.fixturenames.append('tmp_ct') # # # Now we parametrize. This is what happens when we do e.g., # # @pytest.mark.parametrize('tmp_ct', range(count)) # # def test_foo(): pass # metafunc.parametrize('tmp_ct', range(2))
35.611111
80
0.648986
87
641
4.689655
0.747126
0.036765
0.078431
0.102941
0
0
0
0
0
0
0
0.010267
0.24025
641
17
81
37.705882
0.827515
0.932917
0
null
1
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
6992e5f7fd086eb383e3e2efbd84f3e597529cfe
1,147
py
Python
orchestra/contrib/saas/serializers.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
68
2015-02-09T10:28:44.000Z
2022-03-12T11:08:36.000Z
orchestra/contrib/saas/serializers.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
17
2015-05-01T18:10:03.000Z
2021-03-19T21:52:55.000Z
orchestra/contrib/saas/serializers.py
RubenPX/django-orchestra
5ab4779e1ae12ec99569d682601b7810587ed381
[ "Unlicense" ]
29
2015-03-31T04:51:03.000Z
2022-02-17T02:58:50.000Z
from django.forms import widgets from django.core.validators import RegexValidator from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from orchestra.api.serializers import SetPasswordHyperlinkedSerializer from orchestra.contrib.accounts.serializers import AccountSerializerMixin from orchestra.core import validators from .models import SaaS class SaaSSerializer(AccountSerializerMixin, SetPasswordHyperlinkedSerializer): data = serializers.DictField(required=False) password = serializers.CharField(write_only=True, required=False, style={'widget': widgets.PasswordInput}, validators=[ validators.validate_password, RegexValidator(r'^[^"\'\\]+$', _('Enter a valid password. ' 'This value may contain any ascii character except for ' ' \'/"/\\/ characters.'), 'invalid'), ]) class Meta: model = SaaS fields = ('url', 'id', 'name', 'service', 'is_active', 'data', 'password') postonly_fields = ('name', 'service', 'password')
39.551724
85
0.666957
106
1,147
7.141509
0.603774
0.03963
0
0
0
0
0
0
0
0
0
0
0.231909
1,147
28
86
40.964286
0.859251
0
0
0
0
0
0.130776
0
0
0
0
0
0
1
0
false
0.347826
0.347826
0
0.521739
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
0
0
1
1
0
1
0
0
3
6994976a52f0273b5abb9242055b6e34f052f618
249
py
Python
lib/util/file_utils.py
overholts/tuner
761a40d152d3c7afc681aaaecf1660bc93d68a97
[ "MIT" ]
1
2020-12-26T21:56:50.000Z
2020-12-26T21:56:50.000Z
lib/util/file_utils.py
overholts/tuner
761a40d152d3c7afc681aaaecf1660bc93d68a97
[ "MIT" ]
3
2019-10-28T18:16:25.000Z
2019-11-23T07:50:28.000Z
lib/util/file_utils.py
overholts/tuner
761a40d152d3c7afc681aaaecf1660bc93d68a97
[ "MIT" ]
null
null
null
import os import shutil from pathlib import Path def copy(source: Path, destination: Path): os.makedirs(destination.parent, 0o755, exist_ok=True) shutil.copy(str(source), str(destination)) def remove(target: Path): os.remove(target)
19.153846
57
0.73494
35
249
5.2
0.542857
0.065934
0
0
0
0
0
0
0
0
0
0.018957
0.15261
249
12
58
20.75
0.843602
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.375
0
0.625
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
0
1
0
1
0
0
3
699a15451c3ddcbb4167810748ccb98dca475d3d
78
py
Python
Python/Fundamentals/Strange Zoo.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/Strange Zoo.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
Python/Fundamentals/Strange Zoo.py
EduardV777/Softuni-Python-Exercises
79db667028aea7dfecb3dbbd834c752180c50f44
[ "Unlicense" ]
null
null
null
tail=input(); body=input(); head=input() body=[head,body,tail] print(body)
19.5
41
0.666667
12
78
4.333333
0.416667
0.346154
0
0
0
0
0
0
0
0
0
0
0.102564
78
3
42
26
0.742857
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
0
0
3
699ade1a7eeab2bcf96cb57b4bf3d8094aee37e2
188
py
Python
sagas/tests/basic/test_fixtures.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
3
2020-01-11T13:55:38.000Z
2020-08-25T22:34:15.000Z
sagas/tests/basic/test_fixtures.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
null
null
null
sagas/tests/basic/test_fixtures.py
samlet/stack
47db17fd4fdab264032f224dca31a4bb1d19b754
[ "Apache-2.0" ]
1
2021-01-01T05:21:44.000Z
2021-01-01T05:21:44.000Z
""" $ pytest -q test_fixtures.py """ import pytest @pytest.fixture() def hello(): return "hello" def test_string(hello): assert hello == "hello", "fixture should return hello"
13.428571
58
0.664894
24
188
5.125
0.541667
0.178862
0
0
0
0
0
0
0
0
0
0
0.18617
188
13
59
14.461538
0.803922
0.148936
0
0
0
0
0.245033
0
0
0
0
0
0.166667
1
0.333333
false
0
0.166667
0.166667
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
69b2b6d82ab1ad7e440cde8afce2c3415b6294ed
305
py
Python
django_settings/config.py
aderugin/django-settings
ba4a062eb64a8aa826b02ea6996e4fcab1de454b
[ "MIT" ]
null
null
null
django_settings/config.py
aderugin/django-settings
ba4a062eb64a8aa826b02ea6996e4fcab1de454b
[ "MIT" ]
null
null
null
django_settings/config.py
aderugin/django-settings
ba4a062eb64a8aa826b02ea6996e4fcab1de454b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from django.conf import settings SETTINGS_TITLE = getattr(settings, 'DJANGO_SETTINGS_TITLE', u'Настройки сайта') MODEL = getattr(settings, 'DJANGO_SETTINGS_MODEL', None) if not MODEL: raise Exception("You have to define DJANGO_SETTINGS_MODEL variable in your settings file")
33.888889
94
0.767213
42
305
5.404762
0.642857
0.185022
0.185022
0.255507
0
0
0
0
0
0
0
0.003774
0.131148
305
8
95
38.125
0.85283
0.068852
0
0
0
0
0.453901
0.223404
0
0
0
0
0
1
0
false
0
0.2
0
0.2
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
69c5e8fb6e120abc97f935ab661f0d85156a95fe
256
py
Python
eots/serializers.py
lextoumbourou/eyeofthestorm
bbcb5b535c0a051e63ad1949b7107bc617094279
[ "Unlicense" ]
null
null
null
eots/serializers.py
lextoumbourou/eyeofthestorm
bbcb5b535c0a051e63ad1949b7107bc617094279
[ "Unlicense" ]
null
null
null
eots/serializers.py
lextoumbourou/eyeofthestorm
bbcb5b535c0a051e63ad1949b7107bc617094279
[ "Unlicense" ]
null
null
null
""" Eventually we'll probably want to add some decent serialization support. For now - this is a pass through. Patches accepted :) """ class Serializer(object): def serialize(cls, obj): return obj def is_valid(self): return True
19.692308
72
0.675781
35
256
4.914286
0.885714
0
0
0
0
0
0
0
0
0
0
0
0.238281
256
12
73
21.333333
0.882051
0.496094
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0.4
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
69eee8eadab9abbe0ac89fcc874ab36e92b8ac42
2,430
py
Python
tests/mem/test_magic_memset_tlb_miss.py
capt-hb/cheritest
d3b3637a81a0005ee7272eca0f33a9f9911fdb32
[ "Apache-2.0" ]
null
null
null
tests/mem/test_magic_memset_tlb_miss.py
capt-hb/cheritest
d3b3637a81a0005ee7272eca0f33a9f9911fdb32
[ "Apache-2.0" ]
2
2020-06-02T13:44:55.000Z
2020-06-02T14:06:29.000Z
tests/mem/test_magic_memset_tlb_miss.py
capt-hb/cheritest
d3b3637a81a0005ee7272eca0f33a9f9911fdb32
[ "Apache-2.0" ]
null
null
null
#- # Copyright (c) 2018 Alex Richardson # All rights reserved. # # This software was developed by the University of Cambridge Computer # Laboratory as part of the Rigorous Engineering of Mainstream Systems (REMS) # project, funded by EPSRC grant EP/K008528/1. # # @BERI_LICENSE_HEADER_START@ # # Licensed to BERI Open Systems C.I.C. (BERI) under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. BERI licenses this # file to you under the BERI Hardware-Software License, Version 1.0 (the # "License"); you may not use this file except in compliance with the # License. You may obtain a copy of the License at: # # http://www.beri-open-systems.org/legal/license-1-0.txt # # Unless required by applicable law or agreed to in writing, Work distributed # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR # CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # # @BERI_LICENSE_HEADER_END@ # from beritest_tools import BaseBERITestCase, attr, HexInt @attr("qemu_magic_nops") class test_magic_memset_tlb_miss(BaseBERITestCase): EXPECTED_EXCEPTIONS = 1 def test_badvaddr(self): self.assertRegisterEqual(self.MIPS.s0, self.MIPS.a4, "Wrong BadVaddr") def test_context(self): self.assertRegisterEqual(self.MIPS.s1, (self.MIPS.a4 & 0xffffe000)>>9, "Wrong Context") # TODO test page table base def test_xcontext(self): self.assertRegisterEqual(self.MIPS.s2, (self.MIPS.a4 & 0xffffe000)>>9, "Wrong XContext") # TODO test page table base def test_entryhi(self): self.assertRegisterMaskEqual(self.MIPS.a4, 0xfffff000, self.MIPS.s3, "Wrong EntryHi") def test_status(self): self.assertRegisterMaskEqual(self.MIPS.s4, 2, 2, "Wrong EXL") def test_epc(self): '''Test EPC after TLB Invalid exception''' # plus 12 since check_instruction_traps uses 3 instructions before invoking the actual insn self.assertRegisterEqual(self.MIPS.a6 + 12, self.MIPS.s6, "Wrong EPC") def test_testdata(self): self.assertRegisterEqual(self.MIPS.a7, 0xfedcba9876543210, "Wrong testdata") def test_trap_info(self): self.assertCompressedTrapInfo(self.MIPS.s5, mips_cause=self.MIPS.Cause.TLB_Store, trap_count=1)
41.186441
124
0.743621
343
2,430
5.186589
0.510204
0.062957
0.075885
0.087128
0.183249
0.060708
0.031478
0
0
0
0
0.030617
0.166667
2,430
58
125
41.896552
0.847901
0.513992
0
0
0
0
0.088056
0
0
0
0.041848
0.017241
0.4
1
0.4
false
0
0.05
0
0.55
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
0
1
0
0
3
0e07c9e354ebece1a10554ccf30b3c030751ef46
89
py
Python
test.py
rwinslow/cellanalysis
cc933c5e169d1b7baed204208373e84e3f32dde7
[ "Unlicense" ]
1
2020-10-23T09:20:41.000Z
2020-10-23T09:20:41.000Z
test.py
rwinslow/cellanalysis
cc933c5e169d1b7baed204208373e84e3f32dde7
[ "Unlicense" ]
null
null
null
test.py
rwinslow/cellanalysis
cc933c5e169d1b7baed204208373e84e3f32dde7
[ "Unlicense" ]
null
null
null
import ardustat as a test = a.Ardustat('test.dat') test.plot_capacity() test.plot_power()
22.25
29
0.764045
15
89
4.4
0.6
0.242424
0
0
0
0
0
0
0
0
0
0
0.089888
89
4
30
22.25
0.814815
0
0
0
0
0
0.088889
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
0
0
0
3
386724eb8880a1ca361d93d965e3d83920503a7f
411
py
Python
LeetCode/0812. Largest Triangle Area/solution.py
InnoFang/oh-my-algorithms
f559dba371ce725a926725ad28d5e1c2facd0ab2
[ "Apache-2.0" ]
1
2017-03-31T15:24:01.000Z
2017-03-31T15:24:01.000Z
LeetCode/0812. Largest Triangle Area/solution.py
InnoFang/Algorithm-Library
1896b9d8b1fa4cd73879aaecf97bc32d13ae0169
[ "Apache-2.0" ]
null
null
null
LeetCode/0812. Largest Triangle Area/solution.py
InnoFang/Algorithm-Library
1896b9d8b1fa4cd73879aaecf97bc32d13ae0169
[ "Apache-2.0" ]
null
null
null
""" 57 / 57 test cases passed. Runtime: 104 ms Memory Usage: 14.9 MB """ class Solution: def largestTriangleArea(self, points: List[List[int]]) -> float: def triangleArea(x1, y1, x2, y2, x3, y3): return abs(x1 * y2 + x2 * y3 + x3 * y1 - x1 * y3 - x2 * y1 - x3 * y2) / 2 return max(triangleArea(x1, y1, x2, y2, x3, y3) for (x1, y1), (x2, y2), (x3, y3) in combinations(points, 3))
37.363636
116
0.579075
66
411
3.606061
0.545455
0.05042
0.07563
0.10084
0.252101
0.252101
0.201681
0
0
0
0
0.137255
0.255474
411
10
117
41.1
0.640523
0.155718
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0.2
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
3884703674d725ea9a283168def22c677cc0f51d
58
py
Python
credentials.py
Tawfiq-MoonHacker/metis_video
8d63ac458b8b6bfa48a1ec5476dc47be1987f42a
[ "Apache-2.0" ]
null
null
null
credentials.py
Tawfiq-MoonHacker/metis_video
8d63ac458b8b6bfa48a1ec5476dc47be1987f42a
[ "Apache-2.0" ]
null
null
null
credentials.py
Tawfiq-MoonHacker/metis_video
8d63ac458b8b6bfa48a1ec5476dc47be1987f42a
[ "Apache-2.0" ]
null
null
null
email_user = '' email_password = '' address_owner = ''
14.5
20
0.637931
6
58
5.666667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.206897
58
3
21
19.333333
0.73913
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0.333333
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
3889caf94688acf693a126febe14a32273a0de1d
322
py
Python
catkin_ws/src/simple_robot/src/ros_simple_robot_node.py
delmann/simple_robot_world
e55e95529b48054eedc1edf5c80881ea7947f73c
[ "MIT" ]
null
null
null
catkin_ws/src/simple_robot/src/ros_simple_robot_node.py
delmann/simple_robot_world
e55e95529b48054eedc1edf5c80881ea7947f73c
[ "MIT" ]
null
null
null
catkin_ws/src/simple_robot/src/ros_simple_robot_node.py
delmann/simple_robot_world
e55e95529b48054eedc1edf5c80881ea7947f73c
[ "MIT" ]
null
null
null
#!/usr/bin/env python import rospy def spam(): rospy.loginfo("spam foo") def eggs(): rospy.loginfo("eggs foo") if __name__ == '__main__': try: rospy.loginfo("do something") except rospy.ROSInterruptException: spam() eggs() rospy.loginfo("something went wrong!") pass finally: rospy.loginfo("finished")
16.1
40
0.692547
41
322
5.243902
0.585366
0.27907
0.148837
0
0
0
0
0
0
0
0
0
0.152174
322
19
41
16.947368
0.787546
0.062112
0
0
0
0
0.215947
0
0
0
0
0
0
1
0.133333
true
0.066667
0.066667
0
0.2
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
3
388c17907e13f1a313ab074390c2c4033910f33e
12,060
py
Python
large-repo-master/test-3/nb24.py
victorsun123/numpy
1fb036758b4035ab2c132d26f420e5bc3ffc917e
[ "BSD-3-Clause" ]
null
null
null
large-repo-master/test-3/nb24.py
victorsun123/numpy
1fb036758b4035ab2c132d26f420e5bc3ffc917e
[ "BSD-3-Clause" ]
null
null
null
large-repo-master/test-3/nb24.py
victorsun123/numpy
1fb036758b4035ab2c132d26f420e5bc3ffc917e
[ "BSD-3-Clause" ]
null
null
null
# Databricks notebook source HLRIOWYITKFDP GOQFOEKSZNF BQRYZYCEYRHRVDKCQSN BELVHHTEWWKFYTNTWJIIYUQTBHUMOCJNDBBIPBOVCDIKTUPVXZRIUC AUVGECGGHDZPJPMFEZWDFYYDXYGEMHXRHYXXGEMXTCZOPGPGSRCIQNPHCUONPPCBOWTFOZEYCXCQKKUNDSXSBAKSMWIPUKICUWX HDCWKJXOZHPPXWBBPLIGLXMBATYPTDTCAACKEEWURDREVIIUPRJXDFNDLSHBZEBMWQOMYFWARMGERQAXVLFREGTYUXPABORSDUP XPSNALKIEEH TNRJVKVUADXUMYRVMHWANRYEQXHWTJQWRWKSYUM JZXPNGKLOBUHKSQBTCTPEDKMXFIBBGGHRJQHBBORPGAUUQJRVXCIPMMFYYLRYN KGQOIYGOLOQKPGZJQOZBYIDIZHPVDGNQIBWMZKLFVEICEQCZJBCOJNRCFYZBKW XUCXWMRZSJZGGPFDQVRHQYDXFQAKRUAMZMPYIXPFUWMHCMC HXYLXLGHGJHSABRRKKPNEFJQTIUKHUWMRZSWZBPACLASFINSC # COMMAND ---------- MGRAAFOYIJMFRVFOSRGMGFXXEKYADNRPHTYWJOWZMVBJ PWDILGWYEWDFNEZFZBSMBFRSQHNLFXXJUYMSTDBXBZOLDBSROW VJZKPBXNXVNNTANWQWAUITCXBBBVPROZOINGKOJBTSWCDOPYBLDTEKAQGMWCUARJGWQY ZPFVDMMLPYPQAMSJLQQWEDSYPZHXSYKENJIJMLMRAAFISKLL ROYFOFXVCMBAZZIRVCWXHAWKILJJYAWWISQPHOVCWIGSYJ # COMMAND ---------- YEGVKOKXNRAKWSMIJGQICYIXPZDXALZLGNOTGYHVESTP # COMMAND ---------- EUIJSXZYUPDQQFSWCACJADRNZGSJIYRAJ # COMMAND ---------- UGFQNBEQJETM PUPRVDQIOHSKMQPCGUNVESHCJHXEIFWUQSSWSEQKNNTNTRKRZMGONRPFCVLHTPHBXYLRHZFAIGHWOLLWFDZNMEUGIWAKGTAVBKZFUAQLEGNUKNDZBMSOQSLCDALHWSQO IPFRYPASTQSOMGKIAEUMKUMOCUVDHIVXZUOXHYOUQNZOLJSMRJDCMJTPLRHWDOKLBBXNBCTLUSFYRRHZDCASUGABWYSQ UQAVLZHFFQGREDQGYLLDKMRWGIKJHXTGBIAVZDZSXLFBNERWVEKHOMZAGGXWWNAGGYGIESTGFCNWGZKXZWICBDCWXYQDABJSDCOEN QWQQEHTLBUKHKBMGSNSJIAIMEXKQBVECIGTODUHRROXAIMVKIQXBBFICPJAVMYVPZVBLSMDBYTFHNAMXNITSIMHFQNBIPYAOLR GHUYEXMAQAHQFFYPWBUBRHJVKXAFDGVHXBYXPZLLTKQHWXIHIDAPURJUFJRDIIDEMMXOZSSWHLGQRTRFWHJMMDZECZRBCF G # COMMAND ---------- HLYXINLAZVEFIXCTTQNFUVRS # COMMAND ---------- TTXHRRLOCWDLVNKZRCVYWBLCAOTMQCDWHXEUCNSBCOKEM UYQEGQGRHRAEDNYXMPSRZETETIVYAN RSINMZPJMBPZSJMEAEZLKHAKSHDWUFVBFAXM UIDJIHTYSNFGCQEHGBAETBNXDTHDOQXKNHCBPT KRUNMFOIWPIPZUMRGXYSXJPRPRQBXANWXYYZZVN # COMMAND ---------- KXOYFKLPJZVZENIQOONHWZLDRJ # COMMAND ---------- HNJKYFTKQDDCVXTULFGJJLCSTCFFYWMCJDVMRAKICWPFPRHGYF WXHCWSXVEAMYVSGRVDLBHWJVQDYRSQKDLONEFRNKEIWWWOYGXLRBBMRLRLUMZMNUNTXHGQPDGW WWXGRBQDFHU VJNXHAEWBZKVZTQFIRAIBHGWLQHAHJUSDKRQMRYCMJQERHNFMICNFRMDYKPICZEKGCPKXSDVDFKBBYQKZYRWHQKTZKQWAHUNCIHJERDIDNTVMHZRQTTP STBEHDGYLALHLMPNDDEHDHLFJUJPTQUEHCGBWVZQCRTEKOYFVNMYFKDWX NNGJGRTQDUNZAODUBXPZSOB QWPRIYUUQUDGEBX CDDTEPCISHNGHQIOGWTUKGQQQUYHMVTOXA QJSQFZXSMQJYFSHKIXGTUIE YIRDQUCWCLADQDOTVN # COMMAND ---------- XJUMTZMHQRTHEJMKZZYQ # COMMAND ---------- HRLMTGAHKAHAIIEEPNJVTJEWY # COMMAND ---------- SLZUQJQUPAXEEIIRIBUDGNZJS YIEONXHQAYNVRXJERVXEDKEIBPJXEHYODJBDWBQWHTAHCAHZHKFPYSMXPEKQHQGRUQTUNIPGBSSXQEGCONRSWPRUBWNSJENSJAASJJSRHMWNIJVGGUXVJHTWKHPFHXBAPQQBEWAAKZDMEIXSQJWCMJPZRBBKIWQRXBSJQRAUBHF DWKHDARZBRTZGJQNOXRRXOSOVWUWMVNFDXZOE BGOIUSLOKNQCFDRBHBUCBSVEPGTHAHPYVBCYIGEFBMNJTAXZDUAPPCSWONVOUCLBVALGDKDMCSPSOOESVMYRYTNEPDCLEMKQGVPPWOWDKFJSNUQTFKMOQUOUZIMUZFIHPIYDKDAAOGQSFDPLGJRQDIURASFLJFKFRCJKFWMDOWUHASNRBOVMTWSKQDSAMYDWUUNYYOBHHOJHIHAXLPJFEGRSLZTZWXW LSICUAWWGUNUVLTZQXWAQVU PPDELDMMFZMMLYPRAPSRRTKDOIZWSCWVMMKHM ZGEMVCHIFFGIJKPHDSWPOGNVIBOCRKZGFVX BWRYOJLMTQGPRDWRBJGFBFUBAISPWJAQIHKWOU # COMMAND ---------- VIFVDLALCKTCPHTRMEJZGVAZHAQCXIEHAHGHDMKSCRYKNXBJCDQPO HRTQEDHPCHCAHHPYEMYBPYRTQOJUBIPXZZYFVAIVIYBMPHBWKZLOUCSLQFHCWFRZFTDTGQXILVXRETJIBFPJFZRRFFYY BYEBDPVEFSQYDONJZZJVQHGBMUYDE SRERPGRVVQNDCSOCQVQCRHBSTHFAWMSMDNVIGBCJAGLFISOIGSSDFDPTHAED PNDKPXBJVTKTMIBMVGHNRLFMYGGYHGDQVBVJDVNRXQURFGWO MELCTFIXAKTOGXIQSKQNOZVVXPES # COMMAND ---------- AIHJL VRGPJGNIYGKMYDTFGGRJEJHTNANVRWBHSRMUU EVSSYCGUYDDPHYLYDRACLZKWDQSUZIWUYBJ EIOYQFELGXGWZXXNDQBAMBKUVRVISOYNMAGZCMDTKD FIRHJUJHKJTAZAWMPOJQZXYPXHSGNQSSZXZULZGANE RWPPRADKIDSOTXOPDYXMDLDVBFXSBIGMOZH JRAUFKLITEUKHQURJSYLRVWPIPSIZ OYGOHZVFTKRGLVBACJYWSQQRGEAKPJJXBMPTSUSFYEAVAYU TEFQFNEWNFTXXMHKSVASRAYDRFANOFNN KAQUXECQRTKJSKVOMDZKHUSYLOUPNIYEJ ZPXPYEQTJIYBESQVRGHFFTJCGMLIUWBZJYHXKFLQUNWMVTHZQFHEYYMTOODMGJBIUIQRTGREHIQETWJZTBQJQDRHT TNPXYMMBEAEBTSUNAVXUSHVDJKAYYELBMXUIALPQAOEBNPGPTMQVHPDLDZWFMQ ZBZDBURQQVMTWUXUCYYBLZLHTXXVULVQWGJHCCCIPJANAQYLYQODC ZOLPYJRNAARTFFFFYGIOSYPOYGKSQQSWUFOBHHAULQEDIKBHOXCEWOWPHR BQSPSPPKJYEBRABXVPDGQWZQBPJNLXXNTQJSJNIAXLBROXVATFNCMMYIHYOTZFPAHSMWBMBQASHQPMNDJKZAMWPARUDMGJYMN ZCASMFRILFCRHYNSNPI FXNBRWYBFAWDJGXGXMHIVYALOHGFVPEDLYZMXNLHTJHQRPENLNWXZEYVXUHETCTMLQCDEVN GTRXQFGWDDQNNOSAFQRTWCMPITIRZQOWNHFCFONPVGRNQTRXRVUKLDXLFFWKGCQIMMDAMRV BCSIMCHGYDQBHNCNZRVMRFDNFCZYRIB GIAVLZDNAFEGNUNXXWQKXAMIPCEXRALZHUSVFXRIIOVHPWXWVGQJDZIQRDAWMHSMZFFWMNBAIFICIPCUHIIHLOJYRJSXGQOQUS OALQOFHQFNFBUOPDEDDSTMWMGSNBAAPHVMIWVAHYSWMGPUMEPZBDVTAMZSLOQTXKFAINYQPNSGPZHGHKROCLXFUZKETLR ESVNERUCXQPFHOICQARUMSWGLYLTIHLVIJHIYHGRRZVMJWSYHOIOXNHMDLGXWMHIFYEKIFDLRXCHCJFXDKVCMDU KQEIBKXAOATCNPVTWLVVZGDHXXRTLETKXDWJWSHWXCIQRXJEVRRUFSHYAUXK WMCVHVIQYRHDBRTYJBFJXGKFHFPHIDWSWUKSIXCILQBKBEZYAKIKYNQBAPGHLOPPHQGDOC XHIIGAMOSXVHTJZIWIJHNXMLFGQGTXSJDALDJWFCJDBSCTCAKMRVNIDJVONYDO QRRUTDRYRWINKFBYWDSHFMZZIFOOFUFUHJLRTUVLSOQXIREYFNTZJDGDORQRHQLMRDJA HXHOTUNTLSLELWLILUKKANAHSQZFXGUPISRGUFJGR ONZRYCXPHSIAXFSNLGUEUAFGOAYKYSTYKZGFZAJMTJPJCUFARTYODQRVG PKLEQJLGHKPFNHNCYHLAPUWYAGXCKEUUKNVWONEXPMBQX HSSBACYPEZCHNGZJAQBQURACUMBTGITBCDA ZIDANRQYEQWAABYWBPMXSWYQZTODHJAHZCZNEXHMFTNWHMSRVFVDBZEPZCLBZDJCJQVPTBGZAVNPLOF CIUDURAWGQQWCGMPFJGNMMWPQQXTPBZDHSLEHHXVYMHCWFYGMECFNGQFIOGHHUPMNLOIWUTRSBULHEBZ KAQLMKOTQZRNMBPMXDCSXEIFYZLUZZLUDAWWS NFFFAWDLRYUVKZQCTJPHHN CINNNGJTVWRPQWWERLSVWQE ERKZANUAMBPQRWUIBQFQKMJMWOPDCKZVBSHBXUXNJWEMGW MFLNVKMJYZTZZKKMRJBAGSXGRJYEKXMUK XBTHDVCTDUVZVBMNRWOHETTAWANCLAQPVYQAFOKAAZMNVQCYMTNKNXXKFZTGRGAYHTVXRUDMBUHTVXLJYQXQNMZPRXNNRK IKSUFLZSEDKQRDACPSBIHBK IBXXDEJPSXRPGDDAYUAQVHWUYROWDSJAI FFYWSYQJDMJTTHDAHKMBQRFDQMGERXKHNCBTTSETANWUVOHWSMZKKZAEMPITYDIJUHRYXRYHVQUXONLWQMZUADRNY PEPOGORZKBHKDYQRCHDHHSFLGMVILJRVJRRXFJZECZOADPGSPMWFQLXRSOAQGFFBRI YUJAVPQVOKQHMFESFBPUTBSNNJIJHFOEIWVAGLIDOKHNSEKGTEPUZNRGWACQWPKZGTPFTNGMVHLIKVZAL WMDYVMTQHGYNEMMGOBGMARSZINCZFSC AZDFXEDLDRYTPKLJXABAABXMBXAUYUWKLEDWVNXSCQELPGFJMCDJZNCQAJOQQBEACDT # COMMAND ---------- IPPSZAEXXYOUKLMEPDOGXJHNCDFZHWDCVKA # COMMAND ---------- VLEG NKYHPROGHFOJHNCNXLIQBZG HYLQPUFVADJJBONIUQYXOHSRJUEXXWWFVJOSIJBWHQXXFCLZIXZUHSKKWBGHLLBJNFLIWQOLUSMBPLJDEFMHXHWSIUOQZURJNNP NDJOQXHQRDFEICUZYEGWJILNOKXKLGZI MLTBEAYEKUNLEOJPHZGRZEEJFKDLIENRQRNHXCQFVHQXZNYNJUOMBBZYHSDRBKH TDITMWIHYWWMEKNNRPUZWNAKDIFQXJAUNJEIJ HSETBLSOCMUIMKKIUCNSLXDLXZBYYWNFKWSETOTXYSARBGUQZWRADHVQNWRQNJENPPTBNTOTNUCBCRLVDIYAHOYJ WZNPVJWJVLPVZLWHOFSTXLBE OKIEUNGRUHVDFXKQKKKAFZMFKJRLTREAHQNEV SQUJJWYONOAWOOMUCXSXNYJQGVEZIHECASJHQXGWSRYBXWX AONVSXVKWLFMNJAWPSOT ZXDCQQIOOJGNLKAEUMPXDWPBXDHMFXVVJCUURICJAXPFGTFDWCFITDJVQNMZZTTVDFYLECVXJSTFRWAXHFLAZ SWTXLXOQZUYMINIAQPUSUORBYHOBFHKFEFQUISUNISXHATPIPVWUIONSLFRKNQHZLEDLZIHGRBZULZBYQTDXLIUGDFCNMTWRDCPQATTRMVZDADIYVUHYTZDCRBJTUONKDLEXDHDQEZPGPORNHGSKWZFZWTIFXVLFWXGOOFFOA CWZEBRESMUGUCRYTHQFZHLBCYBYCFWIRBKJEOAAKUEXLU USIIFVVBQETYIFOOWNXLACNBXXKFMACXSVKTEZZEWAREADAKUZGLXTOCRDVBHYXWVQQJTGYSCKNHTRHFIIDULKJZWBTVYLGDTSIQLFNHFVSTPQEFEHACMR IRGLRXDQDBZBQZITNZHFXZAUCJREGJRPHZZBWQZISARTKXTDTS TFCNLZTRFCHBULAAQCLKSVYUQMDNACFGYEDCVWECMKMIYUPXMSPLKVPOTIISMUHGQIVLYUOFQJLXGYBNBMCIXYLHA YGCUBGLLFJWZVBILCADQEOYZCQNJHHBYEYFIJXYQXROPNDBTCZRRSQO EBOXGMVANYBABVJQPCPAQLNUWCQPBPFAYZ WNGYNILQBBNKIOLVCNZRXBLNDUHEFLMGKKILSIMHAQDGPMYRAJBQRMUWWTB WYDXHERKOOTFQBTQJYNZYWIAJHNUERQEZJQYTTEVAKQKFWJCOQWEFHTFORVLIDCBEAYGHEOY RXJJCGJYEVUPVGCSLRIGJFOXEFWEATXKQUVWYHBKIPLDZWGHXURWDWLZBLKIHJXHBECQZYN QHZJVAPISQDQDUWVQVNBT HZVVAPCVUZMXUFEWKSWVQMWWQBLMMIYKJEOACLTYTNXIATZZUGJTKAKNGWWVYVPLWTDRWEPWJLW UVNXUUATPKWWUGBNTEQNQQDBFTIHWKYJGWXIGZAAUMQAFUCHZQOSSEULCKRIXIESWYPBSAW MJDNPNHWJEKANJZYROBTIAVIPH EFBJVVEPQCLANXLDUFOVFIRGEUKVFNUUSIHAHJMACPTCNKFBBAA DVUOKEVLWXYRGUFFROWKLIILZLQLJFILKGJNXGFDTEVWAUJYJGCRUGXEYUVAAUUJ KNQKUBXOK HEVVIDPNOPHQMINJEPFNVEJULXOYGXBXORPSNGEYUQCHJMUFRMEJCSRIXFGYQSBYFMLIPUJSOHBAU DLIZWNVENFSFITBMFDXUV TZVVREDOLTWCYYLGKADIJZVXMSOBBCTDJPTSOZVDKFFYUJLTLLMQOTWCIYFLAPBBZEDIKHHAQUJWLF YEJDVKFBVFVCZSOYYFPSRWLGXJPUUXNBYHDXYXMDMDMTBRYDUNYGOWVEXAAGDCGBGXZOBMR LMMWWAWDEOXWIQVQZPQEDAFC YNETHXOIFXBAYHAUMFKGKMWUZUXLIEXUJCNBXYCOEMVENVBPGYJOTKLXJBXMYK VYPCSXM IALGXLMGZFIWSZWZVBC CQRVHHHXDBSSSYHENOTOESXKKUANSWNJUOBMTTIUMBWVLPHALJTWABFRNBQYLQWOEXGOJVZYSRIW TDCVKCKHRXRPQFLYIWZWBOGSURJDNELLJFCAFRXKQILDNFYTQHMAKPSAWKABUIOVJLJLI RUJOAIUXVXIFURLXMBNDAW LMFXKLJOURZFXATWNSXYRTENCJEMHXAODECMKGXBMRAJGD XBSOERUBNDFOAIZVJJUFWZOJMOUXARHEI MSBDAQICHNEGMUHMGYDHJUODAHMVDSDWHULJZKBWATRDTZGDYKZGYZUSCJJOVRMUBIZMYVUUAOTJZQMTPDMLNFVAAOKBYT OXYDAWCVDQEDPTYTEOMKFLD DQMZLLSQXCMNELFYIMTKMCMSYJMFZVHKX YCZTUYYDPKQIDXBOSRJOOBWYZZOJJRNKDIJVUXVKXAKJIKAJTNHQJEZSJFBKZNQXRIGONFHXGNLCQUBEIJRZFCFSS GNURMKMZNWKLHYKGMXWHGYUSKZOJYBQWCJMAZKPGZNSQWTKXXYOPKNKAUMVRJSNGVC ESKLCRUQPWEISOCASCIHBZPBIGWXIFEOXEWZRQRLNZKOQJFEJWHORQLSNIOEFTQKBTNIXOKFPSFXTXNXB JCMUPPHQALLXHCWAGZLRLBSSVXZADTX MNMVBTMVGMORBUUYJWWYFBQDRZIZNEOQIQYWUTGULBRLQEKXVVIITZDPGUDGBLHNPRO # COMMAND ---------- VEWFGZQTZIXFACEPSFAVDIUZEBAMTVGIKAKXLXNAXE # COMMAND ---------- GCAQAIWAIQBDSKUDFHIIIYQMMLUZWEDWFMWYSBRQSIIBOPZMZIXWOOYBQQEJCGNQUZTKJSENKFBNQFPYSDCZPPMUHKKWCLPLOVLFDTHKDUO # COMMAND ---------- PQVBRQWXGNGENRXSAMKBIDFXYHUTUIQOTKFNHZMQ FUATNEBFFTCFGJPTKSXHKFPXGWQBUOTUCVKTFDLLBKCDHPAMGJOCRQZOCNJKJLBSPJEQLDHGBDZSCHQBRKKVKVJUALFLQOSSCANGUKCIEFIHXCNFXCAZIMBINHHZJ # COMMAND ---------- ATWW AOPFSGPGURGCOAOHTXYQYU LWOIJDBDAJEBPJETJXBBMTNZ CHIYGGKMRUOXFFKTKNN NDIPKHEKMERMBCWDPKEQJVOOKSZKFRMFAAMELDKJFUOPJVZXZSHKZSNHMPENJFDMEXBJAWSBPTUFSZAAEDKARMERGQNWYBQJDIXBEDFDMOQBKKOEIOAMDKZXPECSMLQPDWCRULMPZTVSILXZMXQNNMSVAESQQWRBSVUMRCTLF PRARYINYZFHKIHLOZSIDGEWCIXEZGDQBXVEZOFJRQOQ NRGCVJRTAIYQQEIUFQPGTPFBPDEAXYYT KUXCZSETLNTMSJOSBAPEUSASMWUABXPDH RWRONSWHLGIGITTRVTGOKAJCTDJVWDMFNMFUHZKNUNXEJFQTPCGPVVYHKBCAVEASLXSYJCPVGBHSLQJLIXTNFXIMBQOWPXORJNDXZYSZQQE KDDBTOWG QOJSCXPLHRWOMPJZNMTCWBMWAZDVKMCHAYFNSMPYSZQUZEKPJUQQEHVMYRJRNJXSXODJAXBOTSQOTHTUZLYIQSLB XDSNTQYVPEUQOXUGANGJPGPRVYKUQOYKCJWFTCCIH VQVUGKASQYIIBBMHKTYANDXXZSXZMHGFYRQMMZIEVHNUAEXBWVKIPOKAVBGENSBQHYOEWJNXHSCELAOLLGIBERIRNDEKVYZZQTDAYLVOYQJYEQLWDQMLRIHLGDTETLVDDZZSBAZSUPDFOJDAWRXQBQPBSIWCEQHIBMJAGQBZQRATPGHM POTSDJDGXSZLXPCTVGUQGCNGAODHTPKZRTIEGBG ETQXYFBKTJELNYBVCYXRAYKJVEQMWZTMPKCEXRQBETQOZPQVINNGYSIVZGULFLDYIZQWNCDFTMFNSYZERLBHTEUSFDZRPVBVUXIAKERCCRJ RIGNLZFHJGWVUOSJRPWSFVYCRJRWPZDOBAQHHLJYBKMWYYEXBMSFRNFNWUVOFTGURSRMWIPLVQMHBFAGPI CJZQZXKBOCQFZXKQIYDJQAGJSKCLWWKVRILFPASPCPYWFWCPMEFTSSPUNYHQZHTKVCFYVMKEFAGSLYDZCVZHPQEPG VHJDAFAYUYLSWCFHLQOCJKQUEXGKFIQH QAEOMQK EVMCXBXTUJNQKWMHBUNRFVRNWQYPGVCJYJPHANESXMWVNPKAZZQTJRSFPXJFEDGACFZDQMAMWFLKVLHNEJHVYWQ DUIWQPHWDSYQSMQOPFSNAMTASGRWXTEDHPKUCAYV HKGDBUHPDVKTFTRVQHWWNRNCWGQXEFWHIEIVMOKUENDYBNHSXAZMIDBCBHHCYLZLFPZCVOKNOMTWHQCNJOLKVZENVBEOHVCIYWVCZBMNECMTUUHVDLEBQVMTXKESGSYKVPABBKLXHOEFTLMSRVFRIIOAEBLXUFSJXQCGNWCOCWMIFMW OYBROLJWMAGYYHYUUBDHQEJJMQCKVGTRFMFGYQ OWETFBSQXWRXFCRZDKEMAELCDZPHBRUSHCSGJSLCFIYIIICBMTFYGGBPRZGBRXZJBDQQEZHUEQDFEQFXTTEPOXUOMDVVPVOJSNAXQMEDGX KBTVCFEVCTMZBDPNFEWXKDPPIKXBSYJHCASLRRGKOTNODLMVDKATWOAVYETRHWBMWRTSEOCPUBWEAYRQZ QDIBWLZNGTIEBHTYRGKOPCMUTDHOCKGEOFTDUACZINUDVYSRHLYCOPZMIEPPGTMZXGGOIXOQGTANMKKYITQEBCZC SKAQFUFOPMRPTZBRDLTWYSGZSUEFCDJ FDZUPE JNELVMFAWZJZYPLKRGIKMCZYIOBCLJEPLNCSANGDAGPDTQHSRKQBPQDNGAOIUC KBGFRVLEJWJIQFVIJLFGQT UKPSHDPBDOYSSEETQJAPNLBBGENTGLCYHCVZWVGGXSYUEM ZNLSDNFHATMZMUDUNJECNOWTLDDQPUHCN FZQQTLNELEVMAOBIURFJRCHVTIJROEHXBONWBFEOAOFFHFEFHDPVUXASUNCTYVZNQSVZHSLHAURMLRLMNTOYHMJEBLZLRA FUIZYPUFUHYPNGQZEVLNJRM RPAZKAACOMSTWJOSOXSHDZMXXAINYXIYM XDDKWJUKVVEQGYJQOCIKLHMHAKGBIQ JVEDEHNYAMSATUGVAHOMEMBQLJWIPDXTQSCSHJYZZWXAUCMPKOSMDPSNEZNJHZXDLGBTRQOZJTUJEEANTNEINJZKE FKEIGQOIZREFLTLFOIJNOWKXBNEOTAWXUOFJNOQDHWPLCHXCZOJJEXBVISOAWMKWNF CFMEUOWFOIGOKVAUAAEFTREATXGHSXAHWDMLFJWGSDPCRPDLLDGTUEWDPWTOSIWAJBMRMIGCXPRKDDLQN NYCZPLFBNFCEOQNMDERNLXFHVFPRBGB NGFPWVKYWHFAZROCPCIQGOMKFRQVKCNRJCSBPLLDURZLLFVPVHDHLZGYCSNMFVOFDLR # COMMAND ---------- UKZXZUEPDEPUJMJPKLZZHMJGNWHBVCMRHEDUSDBOBWVSTHIYFRKOIBKVORNRLGCUPKSXQLNRWJPRBRII ASQHRUROYUSINQWRBDTXJUSOKOBZACFFAWDWEREVAUCLILARUWYHKULERWCTZAUJFQ FWHFQOMZGEMRZZSCJAZJPTICZZUVORFEERPPQMBACIGCOMTRIWRIEKXVHBFBVDKZTINQNZAJKLBWVJMWO LRDLGVNCRARLYWVJUQJVOFVESVFVDSP ELJBIAZHUEZBFFJCEIUZEDYVVGUCSXSTDTSPUCWQHAYKOWBDKDKNXMTNACFLYZGKXBCUAQHKNXNJQZANGZUXRFPZVJZC JVEUTEBRDFTQAOGHHARDX OFNHZGSVOQPLGCMIVZKODBVBLQRZK
44.501845
223
0.955721
230
12,060
50.113043
0.917391
0
0
0
0
0
0
0
0
0
0
0
0.025954
12,060
271
224
44.501845
0.981187
0.033665
0
0
0
0
0
0
0
1
0
0
0
1
0
true
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
1
0
0
0
0
0
0
3
3897cdb9f49467dc943611bbcb5a995975d64568
254
py
Python
aula69/main.py
jessicsous/Curso_Python
94c9b70ec03022b21ac23bf85918aa20ce4cfdd1
[ "MIT" ]
1
2021-09-21T01:50:10.000Z
2021-09-21T01:50:10.000Z
aula69/main.py
jessicsous/Curso_Python
94c9b70ec03022b21ac23bf85918aa20ce4cfdd1
[ "MIT" ]
null
null
null
aula69/main.py
jessicsous/Curso_Python
94c9b70ec03022b21ac23bf85918aa20ce4cfdd1
[ "MIT" ]
1
2021-10-04T19:49:04.000Z
2021-10-04T19:49:04.000Z
import uma_linhas import varias_linhas import funçoes import funcoes_2 import typehints import classes #help(uma_linhas) #help(varias_linhas) #help(funçoes) #help(funcoes_2) #help(funcoes_2.multiplica) #print(funcoes_2.multiplica.__doc__) #help(classes)
18.142857
36
0.830709
37
254
5.378378
0.351351
0.160804
0.120603
0
0
0
0
0
0
0
0
0.017021
0.074803
254
14
37
18.142857
0.829787
0.53937
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
38a35c0cb099169eca536a7938acf9b4c0509abf
488
py
Python
SimG4CMS/Calo/python/GeometryAPD_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
SimG4CMS/Calo/python/GeometryAPD_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
SimG4CMS/Calo/python/GeometryAPD_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms # # Geometry master configuration # forStandalone APD # # Ideal geometry, needed for simulation from Geometry.EcalTestBeam.APDXML_cfi import * # Calorimeters from Geometry.CaloEventSetup.CaloTopology_cfi import * from Geometry.CaloEventSetup.CaloGeometry_cff import * from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import * from Geometry.EcalMapping.EcalMapping_cfi import * from Geometry.EcalMapping.EcalMappingRecord_cfi import *
30.5
67
0.846311
53
488
7.679245
0.509434
0.176904
0.176904
0.154791
0.157248
0
0
0
0
0
0
0
0.098361
488
15
68
32.533333
0.925
0.202869
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
38b6f93829450fa507ee573e9222533b77f9b80a
150
py
Python
assign_2.3.py
tramontana-software/Python_Coding_Carlos
9bba043e54ebc1604b39b0b81dbc3d4a313f5927
[ "MIT" ]
null
null
null
assign_2.3.py
tramontana-software/Python_Coding_Carlos
9bba043e54ebc1604b39b0b81dbc3d4a313f5927
[ "MIT" ]
6
2021-05-24T23:27:02.000Z
2021-05-26T12:12:13.000Z
assign_2.3.py
tramontana-software/Python_Coding_Carlos
9bba043e54ebc1604b39b0b81dbc3d4a313f5927
[ "MIT" ]
null
null
null
# My Script: hrs=input('Enter Hours: ') hrs=float(hrs) rph=input('Enter your rate per hour: ') rph=float(rph) pay=hrs*rph print('Pay:', pay)
16.666667
40
0.64
25
150
3.84
0.56
0.208333
0
0
0
0
0
0
0
0
0
0
0.173333
150
8
41
18.75
0.774194
0.066667
0
0
0
0
0.330769
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
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
0
0
3
38b76deeed27bce887a10f8f4d3f7928d80bdec2
5,030
py
Python
src/ast_node.py
ethe/elanus
528ef897f8bad80bcda072206e8e01516532ed75
[ "MIT" ]
4
2016-10-29T10:37:23.000Z
2020-09-22T13:13:10.000Z
src/ast_node.py
ethe/elanus
528ef897f8bad80bcda072206e8e01516532ed75
[ "MIT" ]
null
null
null
src/ast_node.py
ethe/elanus
528ef897f8bad80bcda072206e8e01516532ed75
[ "MIT" ]
1
2020-07-13T03:18:51.000Z
2020-07-13T03:18:51.000Z
# -*- coding: utf-8 -*- from utils.singleton import Singleton class Node(object): def __init__(self, line=0): self.line = line class Expressions(Node): def __init__(self, expressions, line=0): super(Expressions, self).__init__(line) self.expressions = expressions def __eq__(self, another): if not isinstance(another, Expressions): return False return self.expressions == another.expressions def __getitem__(self, key): return self.expressions.__getitem__(key) def __repr__(self): return "<Expressions {}>".format(self.expressions) class Expression(Node): def __repr__(self): return "<{} {}>".format(self.__class__, self.value if hasattr(self, "value") else self.__hash__()) class Function(Expression): def __init__(self, name=None, args=[], expressions=Expressions([]), line=0): self.name = name self.args = args self.expressions = expressions def __eq__(self, another): if not isinstance(another, Function): return False return self.name == another.name and self.args == another.args and self.expressions == another.expressions def __repr__(self): return "<Function {}>".format(self.name) class Call(Expression): def __init__(self, name="", args=[], line=0): super(Call, self).__init__(line) self.name = name self.args = args def __eq__(self, another): if not isinstance(another, Call): return False return self.name == another.name and self.args == another.args def __repr__(self): return "<Call {} {}>".format(self.name, self.args) class Bind(Expression): def __init__(self, name, value, line=0): super(Expression, self).__init__(line) self.name = name self.value = value def __eq__(self, another): if not isinstance(another, Bind): return False return self.name == another.name and self.value == another.value def __repr__(self): return "<Bind {} {}>".format(self.name, self.value) class Unit(Expression): def __init__(self, call=None, line=0): super(Expression, self).__init__(line) self.call = call def __eq__(self, another): if not isinstance(another, Unit): return False return self.call == another.call def __repr__(self): return "<Unit {}>".format(self.call) class Number(Expression): def __init__(self, number, line=0): super(Number, self).__init__(line) self.value = number def __eq__(self, another): if not isinstance(another, Number): return False return self.value == another.value def __repr__(self): return str(self.value) class Int(Number): def __init__(self, number, line=0): super(Int, self).__init__(int(number), line) class Float(Number): def __init__(self, number, line=0): super(Float, self).__init__(float(number), line) class Return(Expression): def __init__(self, expression, line=0): self.expression = expression self.line = line def __repr__(self): return "<Return {}>".format(self.expression) def __eq__(self, another): if isinstance(another, Return): return self.expression == self.expression return False class Void(Expression): def __init__(self, line=0): self.line = line def __repr__(self): return "<Void void>" def __eq__(self, another): if isinstance(another, Void): return True return False class Nil(Singleton, Expression): def __init__(self, line=0): self.line = line def __repr__(self): return 'nil' def __eq__(self, another): return self is another class Bool(Singleton, Expression): def __init__(self, line=0): self.line = line def __eq__(self, another): return self is another class TrueType(Bool): def __init__(self, line=0): super(TrueType, self).__init__(line=line) self.value = True def __repr__(self): return "true" class FalseType(Bool): def __init__(self, line=0): super(FalseType, self).__init__(line=line) self.value = False def __repr__(self): return "false" class Closure(object): def __init__(self, function, environment): self.function = function self.environment = environment def __repr__(self): return "<Closure {}>".format(self.function.name) class BuiltinFunction(Function): def __init__(self, name=None, args=[], expressions=Expressions([]), line=0): super(BuiltinFunction, self).__init__(name=name, args=args, expressions=expressions, line=line) def call(self, interpret, environment): self.values = [] for i in self.args: self.values.append(interpret(environment[i], environment).value) return self.oprate()
25.532995
114
0.625249
589
5,030
4.972835
0.105263
0.040628
0.063844
0.075452
0.496074
0.451007
0.423011
0.349266
0.216115
0.175145
0
0.00453
0.253877
5,030
196
115
25.663265
0.775913
0.004175
0
0.42963
0
0
0.023966
0
0
0
0
0
0
1
0.311111
false
0
0.007407
0.118519
0.696296
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
0
0
1
1
0
0
3
38bb8b71c3fbc113ab45d267a429ad198c879ced
2,260
py
Python
sdp_2021_03/model/user.py
iproduct/intro-python
8fcf682286dad3fc65f46ccff33aefab9c601306
[ "Apache-2.0" ]
3
2022-01-10T07:56:37.000Z
2022-02-14T16:37:56.000Z
sdp_2021_03/model/user.py
iproduct/intro-python
8fcf682286dad3fc65f46ccff33aefab9c601306
[ "Apache-2.0" ]
null
null
null
sdp_2021_03/model/user.py
iproduct/intro-python
8fcf682286dad3fc65f46ccff33aefab9c601306
[ "Apache-2.0" ]
1
2022-02-14T16:36:46.000Z
2022-02-14T16:36:46.000Z
from functools import total_ordering # from decorators import trace_get_attributes import decorators as dec # @dec.trace_get_attributes @total_ordering class User: next_id = 0 # @staticmethod # def increment_next_id(): # User.next_id += 1 @classmethod def increment_next_id(cls): cls.next_id += 1 def __init__(self, name, email, password, role = 'user'): self.__class__.increment_next_id() self.id = self.__class__.next_id self.name = name self.email = email self.password = password self.role = role def __str__(self): return f'ID: {self.id}, Name: {self.name}, Email: {self.email}, Role: {self.role}' def __repr__(self): return f'User[ ID: {self.id}, Name: {self.name}, Email: {self.email}, Role: {self.role}]' def __eq__(self, other): return self.id == other.id def __lt__(self, other): return (self.name, self.id) < (other.name, other.id) def check_password(self, password: str) -> bool: return password == self.password class Author(User): def __init__(self, name, email, password, rank = 'beginner'): super().__init__(name, email, password, 'user') self.rank = rank def __str__(self): return f'Author({super().__str__()}, Rank: {self.rank})' class Admin(User): def __init__(self, name, email, password, phone): super().__init__(name, email, password, 'admin') self.phone = phone def __str__(self): return f'Admin({super().__str__()}, Phone: {self.phone})' default_admin = Admin('Admin Admin', 'admin@mycompany.com', 'admin123', '35928976564') if __name__ == '__main__': users: list[User] = [ Author('Ivan Petrov', 'ivanp@abv.bg', 'ivanp123'), Admin('Admin Admin', 'admin@mycompany.com', 'admin123', '35928976564'), Admin('Nadezda Hristova', 'nadia@mycompany.com', 'nadia123', '3592754632'), Admin('Admin Admin', 'admin2@mycompany.com', 'admin123', '3592897655'), ] for user in sorted(users): print(user) print(users[0].check_password('ivanp123')) # True print(users[0].check_password('ivanpetrov')) # False # print(users[0].__dict__) # print(User.__dict__)
30.540541
97
0.627876
280
2,260
4.725
0.260714
0.068027
0.068027
0.034014
0.334845
0.220711
0.199546
0.151172
0.074074
0.074074
0
0.038068
0.221239
2,260
73
98
30.958904
0.713636
0.082743
0
0.061224
0
0.040816
0.25303
0.025691
0
0
0
0
0
1
0.22449
false
0.204082
0.040816
0.142857
0.489796
0.061224
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
0
0
0
3
38c26ce1ae370cab839ce8dd7dc6845e62f0610f
115
py
Python
dashboard/code/dashboard/events/urls.py
thedeo/terraform-aws-trailwatch
c0852d40c4c5d7524d9e61486d2b2c6d936a445b
[ "Apache-2.0" ]
null
null
null
dashboard/code/dashboard/events/urls.py
thedeo/terraform-aws-trailwatch
c0852d40c4c5d7524d9e61486d2b2c6d936a445b
[ "Apache-2.0" ]
null
null
null
dashboard/code/dashboard/events/urls.py
thedeo/terraform-aws-trailwatch
c0852d40c4c5d7524d9e61486d2b2c6d936a445b
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from events import views urlpatterns = [ url('', views.search, name='events'), ]
19.166667
38
0.721739
16
115
5.1875
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.13913
115
6
39
19.166667
0.838384
0
0
0
0
0
0.051724
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
0
0
0
3
2a04baa0aa3d9d81fa12d31e345c4566eac2e1dd
964
py
Python
sonia_hardware_states/src/sonia_hardware_states/imu_tare.py
sonia-auv/sonia-behaviors
28519551f954616e83b474e6cab6ba3762d238f2
[ "BSD-3-Clause" ]
null
null
null
sonia_hardware_states/src/sonia_hardware_states/imu_tare.py
sonia-auv/sonia-behaviors
28519551f954616e83b474e6cab6ba3762d238f2
[ "BSD-3-Clause" ]
1
2022-02-16T01:31:51.000Z
2022-02-21T22:30:46.000Z
sonia_hardware_states/src/sonia_hardware_states/imu_tare.py
sonia-auv/sonia-behaviors
28519551f954616e83b474e6cab6ba3762d238f2
[ "BSD-3-Clause" ]
1
2021-11-09T13:34:43.000Z
2021-11-09T13:34:43.000Z
#!/usr/bin/env python #-*- coding: utf-8 -*- import rospy from flexbe_core import EventState, Logger from sonia_common.srv import ImuTareSrv class imu_tare(EventState): ''' State to tare the IMU <= continue Activation successful <= failed Failed to call the service ''' def __init__(self): super(imu_tare, self).__init__(outcomes=['continue', 'failed']) def on_enter(self, userdata): rospy.wait_for_service('/provider_imu/tare') self.tare = rospy.ServiceProxy('/provider_imu/tare', ImuTareSrv) try: self.tare({}) except rospy.ServiceException as exc: rospy.loginfo('Service did not process request: ' + str(exc)) return 'failed' def execute(self, userdata): Logger.log('Tare completed', Logger.REPORT_HINT) return 'continue' def end(self, userdata): pass
26.054054
73
0.595436
107
964
5.196262
0.570093
0.05036
0.039568
0
0
0
0
0
0
0
0
0.001477
0.297718
964
37
74
26.054054
0.819793
0.192946
0
0
0
0
0.149798
0
0
0
0
0
0
1
0.210526
false
0.052632
0.157895
0
0.526316
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
0
1
0
0
3
2a0df5b7e14464d8d34a7ffff0c0e04638149606
633
py
Python
python/scripts/print_toto_3.py
dzertus/Helpers-Interface
e242fb4b387addc6d34c8e07dea3184eed235002
[ "MIT" ]
null
null
null
python/scripts/print_toto_3.py
dzertus/Helpers-Interface
e242fb4b387addc6d34c8e07dea3184eed235002
[ "MIT" ]
null
null
null
python/scripts/print_toto_3.py
dzertus/Helpers-Interface
e242fb4b387addc6d34c8e07dea3184eed235002
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import os from models import model_abstract class Script(model_abstract.ScriptAbstract): def __init__(self, path): super().__init__(path) self.path = path self.name = 'Print Toto 3' self.dcc = ['maya'] self.icon = os.path.join(r"C:\Users\youss\Documents\GitHub\Maya-Helper-Interface\icons", '{0}.{1}'.format(self.module_name, 'png')) def run(self): print('Print Toto 3') def get_name(self): return type(self) def get_dcc(self): return self.dcc def get_icon(self): return self.icon
24.346154
96
0.592417
84
633
4.297619
0.52381
0.049862
0.055402
0
0
0
0
0
0
0
0
0.010941
0.278041
633
25
97
25.32
0.778993
0.033175
0
0
0
0
0.158756
0.096563
0
0
0
0
0
1
0.277778
false
0
0.111111
0.166667
0.611111
0.055556
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
0
0
1
1
0
0
3
2a0f751c5788f70289f4d29c7040df8d7f01e1bb
115
py
Python
answers/x_8_1.py
ofl/kuku
76eefc0d3d859051473ee0d5f48b5d42d17d05a6
[ "MIT" ]
null
null
null
answers/x_8_1.py
ofl/kuku
76eefc0d3d859051473ee0d5f48b5d42d17d05a6
[ "MIT" ]
4
2021-09-23T03:19:52.000Z
2021-11-13T10:38:21.000Z
answers/x_8_1.py
ofl/kuku
76eefc0d3d859051473ee0d5f48b5d42d17d05a6
[ "MIT" ]
null
null
null
# x_8_1 # # 実行する度にランダムで「num」の値が変わります。1〜6の数字から選ばれるように修正してください import random num = random.randint(1, 6) print(num)
12.777778
50
0.756522
18
115
4.777778
0.722222
0
0
0
0
0
0
0
0
0
0
0.059406
0.121739
115
8
51
14.375
0.782178
0.469565
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
2a415878bf55853722c7ad918d5a7a0aab83fd74
977
py
Python
savu/plugins/segmentation/morphological_operations/morph_proc_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
39
2015-03-30T14:03:42.000Z
2022-03-16T16:50:33.000Z
savu/plugins/segmentation/morphological_operations/morph_proc_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
670
2015-02-11T11:08:09.000Z
2022-03-21T09:27:57.000Z
savu/plugins/segmentation/morphological_operations/morph_proc_tools.py
elainehoml/Savu
e4772704606f71d6803d832084e10faa585e7358
[ "Apache-2.0" ]
54
2015-02-13T14:09:52.000Z
2022-01-24T13:57:09.000Z
from savu.plugins.plugin_tools import PluginTools class MorphProcTools(PluginTools): """A Plugin to perform morphological operations on grayscale images (use: erosion, dilation, opening, closing) or binary images (use: binary_erosion, binary_dilation, binary_opening, binary_closing) """ def define_parameters(self): """ disk_radius: visibility: basic dtype: int description: The radius of the disk-shaped structuring element for morphology. default: 5 morph_operation: visibility: intermediate dtype: int description: The type of morphological operation. default: 'binary_opening' options: [binary_erosion, binary_dilation, binary_opening, binary_closing] pattern: visibility: intermediate dtype: str description: Pattern to apply this to. default: 'VOLUME_XZ' """
33.689655
90
0.63869
97
977
6.28866
0.56701
0.063934
0.062295
0.088525
0.17377
0.17377
0.17377
0.17377
0
0
0
0.00146
0.298874
977
29
91
33.689655
0.889051
0.711361
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
3
2a563032b2110392e8d225778510ff4eae0390b4
16,002
py
Python
jaxbo/mcmc_models.py
PredictiveIntelligenceLab/JAX-BO
0b78cce465f808149c88cb8a49c5702c8449ec84
[ "Apache-2.0" ]
27
2021-05-12T03:34:19.000Z
2022-03-18T16:27:07.000Z
jaxbo/mcmc_models.py
PredictiveIntelligenceLab/JAX-BO
0b78cce465f808149c88cb8a49c5702c8449ec84
[ "Apache-2.0" ]
null
null
null
jaxbo/mcmc_models.py
PredictiveIntelligenceLab/JAX-BO
0b78cce465f808149c88cb8a49c5702c8449ec84
[ "Apache-2.0" ]
null
null
null
import jax.numpy as np import jax.random as random from jax import vmap, jit from jax.scipy.linalg import cholesky, solve_triangular from jax.scipy.special import expit as sigmoid from jaxbo.models import GPmodel import jaxbo.kernels as kernels from numpyro import sample, deterministic, handlers import numpyro.distributions as dist from numpyro.infer import MCMC, NUTS from functools import partial # A minimal MCMC model class (inherits from GPmodel) class MCMCmodel(GPmodel): # Initialize the class def __init__(self, options): super().__init__(options) # helper function for doing hmc inference def train(self, batch, rng_key, settings, verbose = False): kernel = NUTS(self.model, target_accept_prob = settings['target_accept_prob']) mcmc = MCMC(kernel, num_warmup = settings['num_warmup'], num_samples = settings['num_samples'], num_chains = settings['num_chains'], progress_bar=True, jit_model_args=True) mcmc.run(rng_key, batch) if verbose: mcmc.print_summary() return mcmc.get_samples() @partial(jit, static_argnums=(0,)) def predict(self, X_star, **kwargs): # Normalize to [0,1] bounds = kwargs['bounds'] X_star = (X_star - bounds['lb'])/(bounds['ub'] - bounds['lb']) # Vectorized predictions rng_keys = kwargs['rng_keys'] samples = kwargs['samples'] sample_fn = lambda key, sample: self.posterior_sample(key, sample, X_star, **kwargs) means, predictions = vmap(sample_fn)(rng_keys, samples) mean_prediction = np.mean(means, axis=0) std_prediction = np.std(predictions, axis=0) return mean_prediction, std_prediction # A minimal Gaussian process regression class (inherits from MCMCmodel) class GP(MCMCmodel): # Initialize the class def __init__(self, options): super().__init__(options) def model(self, batch): X = batch['X'] y = batch['y'] N, D = X.shape # set uninformative log-normal priors var = sample('kernel_var', dist.LogNormal(0.0, 10.0)) length = sample('kernel_length', dist.LogNormal(np.zeros(D), 10.0*np.ones(D))) noise = sample('noise_var', dist.LogNormal(0.0, 10.0)) theta = np.concatenate([np.array([var]), np.array(length)]) # compute kernel K = self.kernel(X, X, theta) + np.eye(N)*(noise + 1e-8) # sample Y according to the standard gaussian process formula sample("y", dist.MultivariateNormal(loc=np.zeros(N), covariance_matrix=K), obs=y) @partial(jit, static_argnums=(0,)) def compute_cholesky(self, params, batch): X = batch['X'] N, D = X.shape # Fetch params sigma_n = params[-1] theta = params[:-1] # Compute kernel K = self.kernel(X, X, theta) + np.eye(N)*(sigma_n + 1e-8) L = cholesky(K, lower=True) return L @partial(jit, static_argnums=(0,)) def posterior_sample(self, key, sample, X_star, **kwargs): # Fetch training data norm_const = kwargs['norm_const'] batch = kwargs['batch'] X, y = batch['X'], batch['y'] # Fetch params var = sample['kernel_var'] length = sample['kernel_length'] noise = sample['noise_var'] params = np.concatenate([np.array([var]), np.array(length), np.array([noise])]) theta = params[:-1] # Compute kernels k_pp = self.kernel(X_star, X_star, theta) + np.eye(X_star.shape[0])*(noise + 1e-8) k_pX = self.kernel(X_star, X, theta) L = self.compute_cholesky(params, batch) alpha = solve_triangular(L.T,solve_triangular(L, y, lower=True)) beta = solve_triangular(L.T,solve_triangular(L, k_pX.T, lower=True)) # Compute predictive mean, std mu = np.matmul(k_pX, alpha) cov = k_pp - np.matmul(k_pX, beta) std = np.sqrt(np.clip(np.diag(cov), a_min=0.)) sample = mu + std * random.normal(key, mu.shape) mu = mu*norm_const['sigma_y'] + norm_const['mu_y'] sample = sample*norm_const['sigma_y'] + norm_const['mu_y'] return mu, sample # A minimal Gaussian process classification class (inherits from MCMCmodel) class GPclassifier(MCMCmodel): # Initialize the class def __init__(self, options): super().__init__(options) def model(self, batch): X = batch['X'] y = batch['y'] N, D = X.shape # set uninformative log-normal priors var = sample('kernel_var', dist.LogNormal(0.0, 1.0), sample_shape = (1,)) length = sample('kernel_length', dist.LogNormal(0.0, 1.0), sample_shape = (D,)) theta = np.concatenate([var, length]) # compute kernel K = self.kernel(X, X, theta) + np.eye(N)*1e-8 L = cholesky(K, lower=True) # Generate latent function beta = sample('beta', dist.Normal(0.0, 1.0)) eta = sample('eta', dist.Normal(0.0, 1.0), sample_shape=(N,)) f = np.matmul(L, eta) + beta # Bernoulli likelihood sample('y', dist.Bernoulli(logits=f), obs=y) @partial(jit, static_argnums=(0,)) def posterior_sample(self, key, sample, X_star, **kwargs): # Fetch training data batch = kwargs['batch'] X = batch['X'] # Fetch params var = sample['kernel_var'] length = sample['kernel_length'] beta = sample['beta'] eta = sample['eta'] theta = np.concatenate([var, length]) # Compute kernels K_xx = self.kernel(X, X, theta) + np.eye(X.shape[0])*1e-8 k_pp = self.kernel(X_star, X_star, theta) + np.eye(X_star.shape[0])*1e-8 k_pX = self.kernel(X_star, X, theta) L = cholesky(K_xx, lower=True) f = np.matmul(L, eta) + beta tmp_1 = solve_triangular(L.T,solve_triangular(L, f, lower=True)) tmp_2 = solve_triangular(L.T,solve_triangular(L, k_pX.T, lower=True)) # Compute predictive mean mu = np.matmul(k_pX, tmp_1) cov = k_pp - np.matmul(k_pX, tmp_2) std = np.sqrt(np.clip(np.diag(cov), a_min=0.)) sample = mu + std * random.normal(key, mu.shape) return mu, sample # A minimal Gaussian process classification class (inherits from MCMCmodel) class MultifidelityGPclassifier(MCMCmodel): # Initialize the class def __init__(self, options): super().__init__(options) def model(self, batch): XL, XH = batch['XL'], batch['XH'] y = batch['y'] NL, NH = XL.shape[0], XH.shape[0] D = XH.shape[1] # set uninformative log-normal priors for low-fidelity kernel var_L = sample('kernel_var_L', dist.LogNormal(0.0, 1.0), sample_shape = (1,)) length_L = sample('kernel_length_L', dist.LogNormal(0.0, 1.0), sample_shape = (D,)) theta_L = np.concatenate([var_L, length_L]) # set uninformative log-normal priors for high-fidelity kernel var_H = sample('kernel_var_H', dist.LogNormal(0.0, 1.0), sample_shape = (1,)) length_H = sample('kernel_length_H', dist.LogNormal(0.0, 1.0), sample_shape = (D,)) theta_H = np.concatenate([var_H, length_H]) # prior for rho rho = sample('rho', dist.Normal(0.0, 10.0), sample_shape = (1,)) # Compute kernels K_LL = self.kernel(XL, XL, theta_L) + np.eye(NL)*1e-8 K_LH = rho*self.kernel(XL, XH, theta_L) K_HH = rho**2 * self.kernel(XH, XH, theta_L) + \ self.kernel(XH, XH, theta_H) + np.eye(NH)*1e-8 K = np.vstack((np.hstack((K_LL,K_LH)), np.hstack((K_LH.T,K_HH)))) L = cholesky(K, lower=True) # Generate latent function beta_L = sample('beta_L', dist.Normal(0.0, 1.0)) beta_H = sample('beta_H', dist.Normal(0.0, 1.0)) eta_L = sample('eta_L', dist.Normal(0.0, 1.0), sample_shape=(NL,)) eta_H = sample('eta_H', dist.Normal(0.0, 1.0), sample_shape=(NH,)) beta = np.concatenate([beta_L*np.ones(NL), beta_H*np.ones(NH)]) eta = np.concatenate([eta_L, eta_H]) f = np.matmul(L, eta) + beta # Bernoulli likelihood sample('y', dist.Bernoulli(logits=f), obs=y) @partial(jit, static_argnums=(0,)) def posterior_sample(self, key, sample, X_star, **kwargs): # Fetch training data batch = kwargs['batch'] XL, XH = batch['XL'], batch['XH'] NL, NH = XL.shape[0], XH.shape[0] # Fetch params var_L = sample['kernel_var_L'] var_H = sample['kernel_var_H'] length_L = sample['kernel_length_L'] length_H = sample['kernel_length_H'] beta_L = sample['beta_L'] beta_H = sample['beta_H'] eta_L = sample['eta_L'] eta_H = sample['eta_H'] rho = sample['rho'] theta_L = np.concatenate([var_L, length_L]) theta_H = np.concatenate([var_H, length_H]) beta = np.concatenate([beta_L*np.ones(NL), beta_H*np.ones(NH)]) eta = np.concatenate([eta_L, eta_H]) # Compute kernels k_pp = rho**2 * self.kernel(X_star, X_star, theta_L) + \ self.kernel(X_star, X_star, theta_H) + \ np.eye(X_star.shape[0])*1e-8 psi1 = rho*self.kernel(X_star, XL, theta_L) psi2 = rho**2 * self.kernel(X_star, XH, theta_L) + \ self.kernel(X_star, XH, theta_H) k_pX = np.hstack((psi1,psi2)) # Compute K_xx K_LL = self.kernel(XL, XL, theta_L) + np.eye(NL)*1e-8 K_LH = rho*self.kernel(XL, XH, theta_L) K_HH = rho**2 * self.kernel(XH, XH, theta_L) + \ self.kernel(XH, XH, theta_H) + np.eye(NH)*1e-8 K_xx = np.vstack((np.hstack((K_LL,K_LH)), np.hstack((K_LH.T,K_HH)))) L = cholesky(K_xx, lower=True) # Sample latent function f = np.matmul(L, eta) + beta tmp_1 = solve_triangular(L.T,solve_triangular(L, f, lower=True)) tmp_2 = solve_triangular(L.T,solve_triangular(L, k_pX.T, lower=True)) # Compute predictive mean mu = np.matmul(k_pX, tmp_1) cov = k_pp - np.matmul(k_pX, tmp_2) std = np.sqrt(np.clip(np.diag(cov), a_min=0.)) sample = mu + std * random.normal(key, mu.shape) return mu, sample # A minimal Gaussian process regression class (inherits from MCMCmodel) class BayesianMLP(MCMCmodel): # Initialize the class def __init__(self, options, layers): super().__init__(options) self.layers = layers def model(self, batch): X = batch['X'] y = batch['y'] N, D = X.shape H = X # Forward pass num_layers = len(self.layers) for l in range(0,num_layers-2): D_X, D_H = self.layers[l], self.layers[l+1] W = sample('w%d' % (l+1), dist.Normal(np.zeros((D_X, D_H)), np.ones((D_X, D_H)))) b = sample('b%d' % (l+1), dist.Normal(np.zeros(D_H), np.ones(D_H))) H = np.tanh(np.add(np.matmul(H, W), b)) D_X, D_H = self.layers[-2], self.layers[-1] # Output mean W = sample('w%d_mu' % (num_layers-1), dist.Normal(np.zeros((D_X, D_H)), np.ones((D_X, D_H)))) b = sample('b%d_mu' % (num_layers-1), dist.Normal(np.zeros(D_H), np.ones(D_H))) mu = np.add(np.matmul(H, W), b) # Output std W = sample('w%d_std' % (num_layers-1), dist.Normal(np.zeros((D_X, D_H)), np.ones((D_X, D_H)))) b = sample('b%d_std' % (num_layers-1), dist.Normal(np.zeros(D_H), np.ones(D_H))) sigma = np.exp(np.add(np.matmul(H, W), b)) mu, sigma = mu.flatten(), sigma.flatten() # Likelihood sample("y", dist.Normal(mu, sigma), obs=y) @partial(jit, static_argnums=(0,)) def forward(self, H, sample): num_layers = len(self.layers) for l in range(0,num_layers-2): W = sample['w%d'%(l+1)] b = sample['b%d'%(l+1)] H = np.tanh(np.add(np.matmul(H, W), b)) W = sample['w%d_mu'%(num_layers-1)] b = sample['b%d_mu'%(num_layers-1)] mu = np.add(np.matmul(H, W), b) W = sample['w%d_std'%(num_layers-1)] b = sample['b%d_std'%(num_layers-1)] sigma = np.exp(np.add(np.matmul(H, W), b)) return mu, sigma @partial(jit, static_argnums=(0,)) def posterior_sample(self, key, sample, X_star, **kwargs): mu, sigma = self.forward(X_star, sample) sample = mu + np.sqrt(sigma) * random.normal(key, mu.shape) # De-normalize norm_const = kwargs['norm_const'] mu = mu*norm_const['sigma_y'] + norm_const['mu_y'] sample = sample*norm_const['sigma_y'] + norm_const['mu_y'] return mu.flatten(), sample.flatten() # A minimal Gaussian process regression class (inherits from MCMCmodel) # Work in progress.. class MissingInputsGP(MCMCmodel): # Initialize the class def __init__(self, options, dim_H, latent_bounds): super().__init__(options) self.dim_H = dim_H self.latent_bounds = latent_bounds def model(self, batch): X = batch['X'] y = batch['y'] N = y.shape[0] dim_X = X.shape[1] dim_H = self.dim_H D = dim_X + dim_H # Generate latent inputs H = sample('H', dist.Normal(np.zeros((N, dim_H)), np.ones((N, dim_H)))) X = np.concatenate([X, H], axis = 1) # set uninformative log-normal priors on GP hyperparameters var = sample('kernel_var', dist.LogNormal(0.0, 10.0)) length = sample('kernel_length', dist.LogNormal(np.zeros(D), 10.0*np.ones(D))) noise = sample('noise_var', dist.LogNormal(0.0, 10.0)) theta = np.concatenate([np.array([var]), np.array(length)]) # compute kernel K = self.kernel(X, X, theta) + np.eye(N)*(noise + 1e-8) # sample Y according to the GP likelihood sample("y", dist.MultivariateNormal(loc=np.zeros(N), covariance_matrix=K), obs=y) @partial(jit, static_argnums=(0,)) def compute_cholesky(self, params, batch): X = batch['X'] N, D = X.shape # Fetch params sigma_n = params[-1] theta = params[:-1] # Compute kernel K = self.kernel(X, X, theta) + np.eye(N)*(sigma_n + 1e-8) L = cholesky(K, lower=True) return L @partial(jit, static_argnums=(0,)) def posterior_sample(self, key, sample, X_star, **kwargs): batch = kwargs['batch'] X, y = batch['X'], batch['y'] # Fetch missing inputs H = sample['H'] X = np.concatenate([X, H], axis=1) # Fetch GP params var = sample['kernel_var'] length = sample['kernel_length'] noise = sample['noise_var'] params = np.concatenate([np.array([var]), np.array(length), np.array([noise])]) theta = params[:-1] # Compute kernels k_pp = self.kernel(X_star, X_star, theta) + np.eye(X_star.shape[0])*(noise + 1e-8) k_pX = self.kernel(X_star, X, theta) L = self.compute_cholesky(params, batch) alpha = solve_triangular(L.T,solve_triangular(L, y, lower=True)) beta = solve_triangular(L.T,solve_triangular(L, k_pX.T, lower=True)) # Compute predictive mean, std mu = np.matmul(k_pX, alpha) cov = k_pp - np.matmul(k_pX, beta) std = np.sqrt(np.clip(np.diag(cov), a_min=0.)) sample = mu + std * random.normal(key, mu.shape) # De-normalize norm_const = kwargs['norm_const'] mu = mu*norm_const['sigma_y'] + norm_const['mu_y'] sample = sample*norm_const['sigma_y'] + norm_const['mu_y'] return mu, sample
42.110526
102
0.577928
2,324
16,002
3.813683
0.090361
0.016924
0.021099
0.005416
0.779194
0.760916
0.703825
0.685772
0.627214
0.61108
0
0.015769
0.274778
16,002
379
103
42.221636
0.747953
0.102925
0
0.611684
0
0
0.044291
0
0
0
0
0
0
1
0.072165
false
0
0.037801
0
0.164948
0.003436
0
0
0
null
0
0
0
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
3
2a5904bad4ef014ffd79ef6c66230986bc0739bf
1,194
py
Python
utils/log.py
skal1ozz/AI-WordOfWarcraft-Bot
1d9659e76d1107909d6ca27b573d0dd83a25fce4
[ "Apache-2.0" ]
null
null
null
utils/log.py
skal1ozz/AI-WordOfWarcraft-Bot
1d9659e76d1107909d6ca27b573d0dd83a25fce4
[ "Apache-2.0" ]
null
null
null
utils/log.py
skal1ozz/AI-WordOfWarcraft-Bot
1d9659e76d1107909d6ca27b573d0dd83a25fce4
[ "Apache-2.0" ]
null
null
null
import logging import traceback class Log(object): loggers = {} @staticmethod def log(level, tag, source, message="", exc_info=None): logger = Log.loggers.get(tag, logging.getLogger(tag)) line = "{source}{message}{ex}" ex = "" if isinstance(exc_info, (list, tuple)): ex_type, ex_value, ex_traceback = exc_info ex = ": " + ''.join( traceback.format_exception(ex_type, ex_value, ex_traceback) ) message = "::{}".format(message) if message else "" logger.log(level, line.format(source=source, message=message, ex=ex)) @staticmethod def w(tag, source, message="", exc_info=None): return Log.log(logging.WARN, tag, source, message, exc_info) @staticmethod def d(tag, source, message="", exc_info=None): return Log.log(logging.DEBUG, tag, source, message, exc_info) @staticmethod def i(tag, source, message="", exc_info=None): return Log.log(logging.INFO, tag, source, message, exc_info) @staticmethod def e(tag, source, message="error", exc_info=None): return Log.log(logging.ERROR, tag, source, message, exc_info)
32.27027
77
0.621441
150
1,194
4.826667
0.26
0.197514
0.198895
0.209945
0.524862
0.493094
0.389503
0.190608
0.190608
0.190608
0
0
0.241206
1,194
36
78
33.166667
0.799117
0
0
0.178571
0
0
0.026801
0.017588
0
0
0
0
0
1
0.178571
false
0
0.071429
0.142857
0.464286
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
0
1
0
0
0
3
2a67f05d2d906a0c73f9a73e7830d3055c520156
173
py
Python
src/waldur_pid/apps.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_pid/apps.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_pid/apps.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
from django.apps import AppConfig class PIDConfig(AppConfig): name = 'waldur_pid' verbose_name = 'PID' service_name = 'PID' def ready(self): pass
15.727273
33
0.647399
21
173
5.190476
0.761905
0.12844
0
0
0
0
0
0
0
0
0
0
0.260116
173
10
34
17.3
0.851563
0
0
0
0
0
0.092486
0
0
0
0
0
0
1
0.142857
false
0.142857
0.142857
0
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
3
2a75d7332e66dd251223ccdf53c0f9dec35541d0
398
py
Python
graviti/__init__.py
Lee-000/graviti-python-sdk
46b19a4a74949a957da3e72261b1403bbeeac01a
[ "MIT" ]
12
2022-01-26T06:51:02.000Z
2022-03-22T21:28:35.000Z
graviti/__init__.py
Lee-000/graviti-python-sdk
46b19a4a74949a957da3e72261b1403bbeeac01a
[ "MIT" ]
51
2022-02-22T07:19:34.000Z
2022-03-31T11:39:51.000Z
graviti/__init__.py
Lee-000/graviti-python-sdk
46b19a4a74949a957da3e72261b1403bbeeac01a
[ "MIT" ]
5
2022-01-26T06:51:49.000Z
2022-03-08T03:41:11.000Z
#!/usr/bin/env python3 # # Copyright 2022 Graviti. Licensed under MIT License. # """Graviti Python SDK.""" from graviti.__version__ import __version__ from graviti.dataframe import ColumnSeriesBase as Series from graviti.dataframe import DataFrame from graviti.utility import engine from graviti.workspace import Workspace __all__ = ["__version__", "DataFrame", "Workspace", "Series", "engine"]
26.533333
71
0.78392
47
398
6.297872
0.510638
0.185811
0.135135
0.175676
0
0
0
0
0
0
0
0.014245
0.11809
398
14
72
28.428571
0.82906
0.233668
0
0
0
0
0.138514
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
2a7ac6fe891c65d9cce3b235087c8a6511328586
200
py
Python
rwb/kwbrowser/__main__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
11
2015-03-09T01:53:21.000Z
2021-03-29T08:33:05.000Z
rwb/kwbrowser/__main__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
1
2016-08-24T06:20:11.000Z
2016-08-24T06:20:11.000Z
rwb/kwbrowser/__main__.py
boakley/robotframework-workbench
92f15845d6fa4baedd4f3c4346fb8ff5cf9149a6
[ "Apache-2.0" ]
5
2016-03-03T15:27:09.000Z
2019-03-26T13:05:32.000Z
import sys from app import KwBrowserApp import rwb try: rwb.app = KwBrowserApp() rwb.app.mainloop() except KeyboardInterrupt: print "program quit at request of the user" sys.exit(0)
16.666667
47
0.715
28
200
5.107143
0.714286
0.083916
0
0
0
0
0
0
0
0
0
0.006329
0.21
200
11
48
18.181818
0.898734
0
0
0
0
0
0.175879
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.111111
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
1
0
0
0
1
0
0
0
0
3
2a8351dfd55d24c60482315c8afa231ac08a7f4f
240
py
Python
grepUrl.py
andrebalen/mineNugget
0399cd666a81bc6136c9bd09e1574fd83885f9ea
[ "Apache-2.0" ]
null
null
null
grepUrl.py
andrebalen/mineNugget
0399cd666a81bc6136c9bd09e1574fd83885f9ea
[ "Apache-2.0" ]
null
null
null
grepUrl.py
andrebalen/mineNugget
0399cd666a81bc6136c9bd09e1574fd83885f9ea
[ "Apache-2.0" ]
null
null
null
import re import urllib2 stuff = urllib2.urlopen('http://python.org').read() # stuff will contain the *entire* page # Replace the string Python with your desired regex results = re.findall('(Python)',stuff) for i in results: print i
24
91
0.725
36
240
4.833333
0.722222
0
0
0
0
0
0
0
0
0
0
0.00995
0.1625
240
9
92
26.666667
0.855721
0.358333
0
0
0
0
0.165563
0
0
0
0
0
0
0
null
null
0
0.333333
null
null
0.166667
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
3
aa68b18b77b5bc5459c4f5ef85ab6a8f377f5920
72
py
Python
calm/dsl/providers/plugins/existing_vm/__init__.py
opywan/calm-dsl
1d89436d039a39265a0ae806022be5b52e757ac0
[ "Apache-2.0" ]
37
2019-12-23T15:23:20.000Z
2022-03-15T11:12:11.000Z
calm/dsl/providers/plugins/existing_vm/__init__.py
opywan/calm-dsl
1d89436d039a39265a0ae806022be5b52e757ac0
[ "Apache-2.0" ]
144
2020-03-09T11:22:09.000Z
2022-03-28T21:34:09.000Z
calm/dsl/providers/plugins/existing_vm/__init__.py
opywan/calm-dsl
1d89436d039a39265a0ae806022be5b52e757ac0
[ "Apache-2.0" ]
46
2020-01-23T14:28:04.000Z
2022-03-09T04:17:10.000Z
from .main import ExistingVmProvider __all__ = ["ExistingVmProvider"]
14.4
36
0.791667
6
72
8.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.125
72
4
37
18
0.84127
0
0
0
0
0
0.25
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
aa89fe01a87ed3712385d7e934e60a0af15ebe15
32,103
py
Python
test/test_snap_schedule.py
point85/PyShift
46d0e1c23d3c570416633f68d416abd587b8e22f
[ "MIT" ]
null
null
null
test/test_snap_schedule.py
point85/PyShift
46d0e1c23d3c570416633f68d416abd587b8e22f
[ "MIT" ]
null
null
null
test/test_snap_schedule.py
point85/PyShift
46d0e1c23d3c570416633f68d416abd587b8e22f
[ "MIT" ]
null
null
null
from datetime import datetime, time, timedelta from PyShift.test.base_test import BaseTest from PyShift.workschedule.work_schedule import WorkSchedule class TestSnapSchedule(BaseTest): def testLowNight(self): description = "Low night demand" self.workSchedule = WorkSchedule("Low Night Demand Plan", description) # 3 shifts day = self.workSchedule.createShift("Day", "Day shift", time(7, 0, 0), timedelta(hours=8)) swing = self.workSchedule.createShift("Swing", "Swing shift", time(15, 0, 0), timedelta(hours=8)) night = self.workSchedule.createShift("Night", "Night shift", time(23, 0, 0), timedelta(hours=8)) # Team rotation rotation = self.workSchedule.createRotation("Low night demand", "Low night demand") rotation.addSegment(day, 3, 0) rotation.addSegment(swing, 4, 3) rotation.addSegment(day, 4, 0) rotation.addSegment(swing, 3, 4) rotation.addSegment(day, 3, 0) rotation.addSegment(night, 4, 3) rotation.addSegment(day, 4, 0) rotation.addSegment(night, 3, 4) # 6 teams self.workSchedule.createTeam("Team1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team2", "Second team", rotation, self.referenceDate - timedelta(days=21)) self.workSchedule.createTeam("Team3", "Third team", rotation, self.referenceDate - timedelta(days=7)) self.workSchedule.createTeam("Team4", "Fourth team", rotation, self.referenceDate - timedelta(days=28)) self.workSchedule.createTeam("Team5", "Fifth team", rotation, self.referenceDate - timedelta(days=14)) self.workSchedule.createTeam("Team6", "Sixth team", rotation, self.referenceDate - timedelta(days=35)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 896 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 6048 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 1344 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 1008 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 22.22, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 224 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 37.33, 2) self.runBaseTest(timedelta(hours=224), timedelta(days=42)) def test3TeamFixed24(self): description = "Fire departments" self.workSchedule = WorkSchedule("3 Team Fixed 24 Plan", description) # starts at 00:00 for 24 hours shift = self.workSchedule.createShift("24 Hour", "24 hour shift", time(0, 0, 0), timedelta(hours=24)) # Team rotation rotation = self.workSchedule.createRotation("3 Team Fixed 24 Plan", "3 Team Fixed 24 Plan") rotation.addSegment(shift, 1, 1) rotation.addSegment(shift, 1, 1) rotation.addSegment(shift, 1, 4) # 3 teams self.workSchedule.createTeam("Team1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team2", "Second team", rotation, self.referenceDate - timedelta(days=3)) self.workSchedule.createTeam("Team3", "Third team", rotation, self.referenceDate - timedelta(days=6)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 672 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 648 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 216 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 216 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 33.33, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 72 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 56, 1) self.runBaseTest(timedelta(hours=72), timedelta(days=9)) def test549(self): description = "Compressed work workSchedule." self.workSchedule = WorkSchedule("5/4/9 Plan", description) # 1 starts at 07:00 for 9 hours day1 = self.workSchedule.createShift("Day1", "Day shift #1", time(7, 0, 0), timedelta(hours=9)) # 2 starts at 07:00 for 8 hours day2 = self.workSchedule.createShift("Day2", "Day shift #2", time(7, 0, 0), timedelta(hours=8)) # Team rotation (28 days) rotation = self.workSchedule.createRotation("5/4/9 ", "5/4/9 ") rotation.addSegment(day1, 4, 0) rotation.addSegment(day2, 1, 3) rotation.addSegment(day1, 4, 3) rotation.addSegment(day1, 4, 2) rotation.addSegment(day1, 4, 0) rotation.addSegment(day2, 1, 2) # 2 teams self.workSchedule.createTeam("Team1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team2", "Second team", rotation, self.referenceDate - timedelta(days=14)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 320 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 1344 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 320 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 672 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 23.81, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 160 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 40, 1) self.runBaseTest(timedelta(hours=160), timedelta(days=28)) def test9to5(self): description = "This is the basic 9 to 5 workSchedule plan for office employees. Every employee works 8 hrs a day from Monday to Friday." self.workSchedule = WorkSchedule("9 To 5 Plan", description) # starts at 09:00 for 8 hours day = self.workSchedule.createShift("Day", "Day shift", time(9, 0, 0), timedelta(hours=8)) # Team1 rotation (5 days) rotation = self.workSchedule.createRotation("9 To 5 ", "9 To 5 ") rotation.addSegment(day, 5, 2) # 1 team, 1 shift self.workSchedule.createTeam("Team", "One team", rotation, self.referenceDate) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 160 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 168 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 40 * 3600) fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=1), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 168 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 23.81, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 40 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 40, 1) self.runBaseTest(timedelta(hours=40), timedelta(days=7)) def test8Plus12(self): description = "This is a fast rotation plan that uses 4 teams and a combination of three 8-hr shifts on weekdays and two 12-hr shifts on weekends to provide 24/7 coverage." self.workSchedule = WorkSchedule("8 Plus 12 Plan", description) # Day shift #1, starts at 07:00 for 12 hours day1 = self.workSchedule.createShift("Day1", "Day shift #1", time(7, 0, 0), timedelta(hours=12)) # Day shift #2, starts at 07:00 for 8 hours day2 = self.workSchedule.createShift("Day2", "Day shift #2", time(7, 0, 0), timedelta(hours=8)) # Swing shift, starts at 15:00 for 8 hours swing = self.workSchedule.createShift("Swing", "Swing shift", time(15, 0, 0), timedelta(hours=8)) # Night shift #1, starts at 19:00 for 12 hours night1 = self.workSchedule.createShift("Night1", "Night shift #1", time(19, 0, 0), timedelta(hours=12)) # Night shift #2, starts at 23:00 for 8 hours night2 = self.workSchedule.createShift("Night2", "Night shift #2", time(23, 0, 0), timedelta(hours=8)) # shift rotation (28 days) rotation = self.workSchedule.createRotation("8 Plus 12", "8 Plus 12") rotation.addSegment(day2, 5, 0) rotation.addSegment(day1, 2, 3) rotation.addSegment(night2, 2, 0) rotation.addSegment(night1, 2, 0) rotation.addSegment(night2, 3, 4) rotation.addSegment(swing, 5, 2) # 4 teams, rotating through 5 shifts self.workSchedule.createTeam("Team 1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team 2", "Second team", rotation, self.referenceDate - timedelta(days=7)) self.workSchedule.createTeam("Team 3", "Third team", rotation, self.referenceDate - timedelta(days=14)) self.workSchedule.createTeam("Team 4", "Fourth team", rotation, self.referenceDate - timedelta(days=21)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 672 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 2688 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 672 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 672 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 25.00, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 168 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 42, 1) self.runBaseTest(timedelta(hours=168), timedelta(days=28)) def testICUInterns(self): description = "This plan supports a combination of 14-hr day shift , 15.5-hr cross-cover shift , and a 14-hr night shift for medical interns. " description = description + "The day shift and the cross-cover shift have the same start time (7:00AM). " description = description + "The night shift starts at around 10:00PM and ends at 12:00PM on the next day." self.workSchedule = WorkSchedule("ICU Interns Plan", description) # Day shift #1, starts at 07:00 for 15.5 hours crossover = self.workSchedule.createShift("Crossover", "Day shift #1 cross-over", time(7, 0, 0), timedelta(hours=15) + timedelta(minutes=30)) # Day shift #2, starts at 07:00 for 14 hours day = self.workSchedule.createShift("Day", "Day shift #2", time(7, 0, 0), timedelta(hours=14)) # Night shift, starts at 22:00 for 14 hours night = self.workSchedule.createShift("Night", "Night shift", time(22, 0, 0), timedelta(hours=14)) # Team1 rotation rotation = self.workSchedule.createRotation("ICU", "ICU") rotation.addSegment(day, 1, 0) rotation.addSegment(crossover, 1, 0) rotation.addSegment(night, 1, 1) self.workSchedule.createTeam("Team 1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team 2", "Second team", rotation, self.referenceDate - timedelta(days=3)) self.workSchedule.createTeam("Team 3", "Third team", rotation, self.referenceDate - timedelta(days=2)) self.workSchedule.createTeam("Team 4", "Forth team", rotation, self.referenceDate - timedelta(days=1)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 1223 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 384 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 174 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 96 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 45.31, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 43 * 3600 + 30 * 60) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 76.125, 1) self.runBaseTest(timedelta(minutes=2610), timedelta(days=4)) def testDupont(self): description = "The DuPont 12-hour rotating shift workSchedule uses 4 teams (crews) and 2 twelve-hour shifts to provide 24/7 coverage. " description = description + "It consists of a 4-week cycle where each team works 4 consecutive night shifts, " description = description + "followed by 3 days off duty, works 3 consecutive day shifts, followed by 1 day off duty, works 3 consecutive night shifts, " description = description + "followed by 3 days off duty, work 4 consecutive day shift, then have 7 consecutive days off duty. " description = description + "Personnel works an average 42 hours per week." self.workSchedule = WorkSchedule("DuPont Schedule", description) # Day shift, starts at 07:00 for 12 hours day = self.workSchedule.createShift("Day", "Day shift", time(7, 0, 0), timedelta(hours=12)) # Night shift, starts at 19:00 for 12 hours night = self.workSchedule.createShift("Night", "Night shift", time(19, 0, 0), timedelta(hours=12)) # Team1 rotation rotation =self.workSchedule.createRotation("DuPont", "DuPont") rotation.addSegment(night, 4, 3) rotation.addSegment(day, 3, 1) rotation.addSegment(night, 3, 3) rotation.addSegment(day, 4, 7) self.workSchedule.createTeam("Team 1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team 2", "Second team", rotation, self.referenceDate - timedelta(days=7)) self.workSchedule.createTeam("Team 3", "Third team", rotation, self.referenceDate - timedelta(days=14)) self.workSchedule.createTeam("Team 4", "Forth team", rotation, self.referenceDate - timedelta(days=21)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 672 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 2688 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 672 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 672 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 25.00, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 168 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 42.0, 1) self.runBaseTest(timedelta(hours=168), timedelta(days=28)) def testDNO(self): description = "This is a fast rotation plan that uses 3 teams and two 12-hr shifts to provide 24/7 coverage. " description = description + "Each team rotates through the following sequence every three days: 1 day shift, 1 night shift, and 1 day off." self.workSchedule = WorkSchedule("DNO Plan", description) # Day shift, starts at 07:00 for 12 hours day = self.workSchedule.createShift("Day", "Day shift", time(7, 0, 0), timedelta(hours=12)) # Night shift, starts at 19:00 for 12 hours night = self.workSchedule.createShift("Night", "Night shift", time(19, 0, 0), timedelta(hours=12)) # rotation rotation = self.workSchedule.createRotation("DNO", "DNO") rotation.addSegment(day, 1, 0) rotation.addSegment(night, 1, 1) self.workSchedule.createTeam("Team 1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team 2", "Second team", rotation, self.referenceDate - timedelta(days=1)) self.workSchedule.createTeam("Team 3", "Third team", rotation, self.referenceDate - timedelta(days=2)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 672 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 216 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 72 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 72 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 33.33, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 24 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 56.0, 1) self.runBaseTest(timedelta(hours=24), timedelta(days=3)) def test21TeamFixed(self): description = "".join(["This plan is a fixed (no rotation) plan that uses 21 teams and three 8-hr shifts to provide 24/7 coverage. " ,"It maximizes the number of consecutive days off while still averaging 40 hours per week. " ,"Over a 7 week cycle, each employee has two 3 consecutive days off and is required to work 6 consecutive days on 5 of the 7 weeks. " ,"On any given day, 15 teams will be scheduled to work and 6 teams will be off. " ,"Each shift will be staffed by 5 teams so the minimum number of employees per shift is five. "]) self.workSchedule = WorkSchedule("21 Team Fixed 8 6D Plan", description) # Day shift, starts at 07:00 for 8 hours day = self.workSchedule.createShift("Day", "Day shift", time(7, 0, 0), timedelta(hours=8)) # Swing shift, starts at 15:00 for 8 hours swing = self.workSchedule.createShift("Swing", "Swing shift", time(15, 0, 0), timedelta(hours=8)) # Night shift, starts at 15:00 for 8 hours night = self.workSchedule.createShift("Night", "Night shift", time(23, 0, 0), timedelta(hours=8)) # day rotation dayRotation = self.workSchedule.createRotation("Day", "Day") dayRotation.addSegment(day, 6, 3) dayRotation.addSegment(day, 5, 3) dayRotation.addSegment(day, 6, 2) dayRotation.addSegment(day, 6, 2) dayRotation.addSegment(day, 6, 2) dayRotation.addSegment(day, 6, 2) # swing rotation swingRotation = self.workSchedule.createRotation("Swing", "Swing") swingRotation.addSegment(swing, 6, 3) swingRotation.addSegment(swing, 5, 3) swingRotation.addSegment(swing, 6, 2) swingRotation.addSegment(swing, 6, 2) swingRotation.addSegment(swing, 6, 2) swingRotation.addSegment(swing, 6, 2) # night rotation nightRotation = self.workSchedule.createRotation("Night", "Night") nightRotation.addSegment(night, 6, 3) nightRotation.addSegment(night, 5, 3) nightRotation.addSegment(night, 6, 2) nightRotation.addSegment(night, 6, 2) nightRotation.addSegment(night, 6, 2) nightRotation.addSegment(night, 6, 2) # day teams self.workSchedule.createTeam("Team 1", "1st day team", dayRotation, self.referenceDate) self.workSchedule.createTeam("Team 2", "2nd day team", dayRotation, self.referenceDate + timedelta(days=7)) self.workSchedule.createTeam("Team 3", "3rd day team", dayRotation, self.referenceDate + timedelta(days=14)) self.workSchedule.createTeam("Team 4", "4th day team", dayRotation, self.referenceDate + timedelta(days=21)) self.workSchedule.createTeam("Team 5", "5th day team", dayRotation, self.referenceDate + timedelta(days=28)) self.workSchedule.createTeam("Team 6", "6th day team", dayRotation, self.referenceDate + timedelta(days=35)) self.workSchedule.createTeam("Team 7", "7th day team", dayRotation, self.referenceDate + timedelta(days=42)) # swing teams self.workSchedule.createTeam("Team 8", "1st swing team", swingRotation, self.referenceDate) self.workSchedule.createTeam("Team 9", "2nd swing team", swingRotation, self.referenceDate + timedelta(days=7)) self.workSchedule.createTeam("Team 10", "3rd swing team", swingRotation, self.referenceDate + timedelta(days=14)) self.workSchedule.createTeam("Team 11", "4th swing team", swingRotation, self.referenceDate + timedelta(days=21)) self.workSchedule.createTeam("Team 12", "5th swing team", swingRotation, self.referenceDate + timedelta(days=28)) self.workSchedule.createTeam("Team 13", "6th swing team", swingRotation, self.referenceDate + timedelta(days=35)) self.workSchedule.createTeam("Team 14", "7th swing team", swingRotation, self.referenceDate + timedelta(days=42)) # night teams self.workSchedule.createTeam("Team 15", "1st night team", nightRotation, self.referenceDate) self.workSchedule.createTeam("Team 16", "2nd night team", nightRotation, self.referenceDate + timedelta(days=7)) self.workSchedule.createTeam("Team 17", "3rd night team", nightRotation, self.referenceDate + timedelta(days=14)) self.workSchedule.createTeam("Team 18", "4th night team", nightRotation, self.referenceDate + timedelta(days=21)) self.workSchedule.createTeam("Team 19", "5th night team", nightRotation, self.referenceDate + timedelta(days=28)) self.workSchedule.createTeam("Team 20", "6th night team", nightRotation, self.referenceDate + timedelta(days=35)) self.workSchedule.createTeam("Team 21", "7th night team", nightRotation, self.referenceDate + timedelta(days=42)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 3360 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 24696 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 5880 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 1176 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 23.81, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 280 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 40.0, 1) self.runBaseTest(timedelta(hours=280), timedelta(days=49), self.referenceDate + timedelta(days=49)) def testTwoTeam(self): description = "".join(["This is a fixed (no rotation) plan that uses 2 teams and two 12-hr shifts to provide 24/7 coverage. " ,"One team will be permanently on the day shift and the other will be on the night shift."]) self.workSchedule = WorkSchedule("2 Team Fixed 12 Plan", description) # Day shift, starts at 07:00 for 12 hours day = self.workSchedule.createShift("Day", "Day shift", time(7, 0, 0), timedelta(hours=12)) # Night shift, starts at 19:00 for 12 hours night = self.workSchedule.createShift("Night", "Night shift", time(19, 0, 0), timedelta(hours=12)) # Team1 rotation team1Rotation = self.workSchedule.createRotation("Team1", "Team1") team1Rotation.addSegment(day, 1, 0) # Team1 rotation team2Rotation = self.workSchedule.createRotation("Team2", "Team2") team2Rotation.addSegment(night, 1, 0) self.workSchedule.createTeam("Team 1", "First team", team1Rotation, self.referenceDate) self.workSchedule.createTeam("Team 2", "Second team", team2Rotation, self.referenceDate) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 1320 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 48 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 24 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 24 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 50.00, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 12 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 84.0, 1) self.runBaseTest(timedelta(hours=12), timedelta(days=1)) def testPanama(self): description = "".join(["This is a slow rotation plan that uses 4 teams and two 12-hr shifts to provide 24/7 coverage. " , "The working and non-working days follow this pattern: 2 days on, 2 days off, 3 days on, 2 days off, 2 days on, 3 days off. " , "Each team works the same shift (day or night) for 28 days then switches over to the other shift for the next 28 days. " , "After 56 days, the same sequence starts over."]) self.workSchedule = WorkSchedule("Panama", description) # Day shift, starts at 07:00 for 12 hours day = self.workSchedule.createShift("Day", "Day shift", time(7, 0, 0), timedelta(hours=12)) # Night shift, starts at 19:00 for 12 hours night = self.workSchedule.createShift("Night", "Night shift", time(19, 0, 0), timedelta(hours=12)) # rotation rotation = self.workSchedule.createRotation("Panama", "2 days on, 2 days off, 3 days on, 2 days off, 2 days on, 3 days off") # 2 days on, 2 off, 3 on, 2 off, 2 on, 3 off (and repeat) rotation.addSegment(day, 2, 2) rotation.addSegment(day, 3, 2) rotation.addSegment(day, 2, 3) rotation.addSegment(day, 2, 2) rotation.addSegment(day, 3, 2) rotation.addSegment(day, 2, 3) # 2 nights on, 2 off, 3 on, 2 off, 2 on, 3 off (and repeat) rotation.addSegment(night, 2, 2) rotation.addSegment(night, 3, 2) rotation.addSegment(night, 2, 3) rotation.addSegment(night, 2, 2) rotation.addSegment(night, 3, 2) rotation.addSegment(night, 2, 3) self.workSchedule.createTeam("Team 1", "First team", rotation, self.referenceDate) self.workSchedule.createTeam("Team 2", "Second team", rotation, self.referenceDate - timedelta(days=28)) self.workSchedule.createTeam("Team 3", "Third team", rotation, self.referenceDate - timedelta(days=7)) self.workSchedule.createTeam("Team 4", "Fourth team", rotation, self.referenceDate - timedelta(days=35)) # specific checks fromDateTime = datetime.combine(self.laterDate, self.laterTime) toDateTime = datetime.combine(self.laterDate + timedelta(days=28), self.laterTime) workingTime = self.workSchedule.calculateWorkingTime(fromDateTime, toDateTime) nonWorkingTime = self.workSchedule.calculateNonWorkingTime(fromDateTime, toDateTime) self.assertTrue(workingTime.total_seconds() == 672 * 3600) self.assertTrue(nonWorkingTime.total_seconds() == 0) self.assertTrue(self.workSchedule.getRotationDuration().total_seconds() == 5376 * 3600) self.assertTrue(self.workSchedule.getRotationWorkingTime().total_seconds() == 1344 * 3600) for team in self.workSchedule.teams: self.assertTrue(team.rotation.getDuration().total_seconds() == 1344 * 3600) self.assertAlmostEqual(team.getPercentageWorked(), 25.00, 2) self.assertTrue(team.rotation.getWorkingTime().total_seconds() == 336 * 3600) self.assertAlmostEqual(team.getAverageHoursWorkedPerWeek(), 42.0, 1) self.runBaseTest(timedelta(hours=336), timedelta(days=56))
56.321053
180
0.674392
3,635
32,103
5.937276
0.07868
0.119359
0.065054
0.059772
0.81012
0.77472
0.748355
0.699935
0.655871
0.595867
0
0.053527
0.210884
32,103
570
181
56.321053
0.798405
0.047784
0
0.462162
0
0.040541
0.135327
0
0
0
0
0
0.237838
1
0.02973
false
0
0.008108
0
0.040541
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
aa97aff8076d9999a2f8046ae42aa369d313d0ed
1,119
py
Python
kArmedBandit/envs/TenArmedBanditGaussianReward_env.py
SasankYadati/kArmedBandit
ed9aacad48b2063661f7281b288ae269d2a8120e
[ "MIT" ]
null
null
null
kArmedBandit/envs/TenArmedBanditGaussianReward_env.py
SasankYadati/kArmedBandit
ed9aacad48b2063661f7281b288ae269d2a8120e
[ "MIT" ]
null
null
null
kArmedBandit/envs/TenArmedBanditGaussianReward_env.py
SasankYadati/kArmedBandit
ed9aacad48b2063661f7281b288ae269d2a8120e
[ "MIT" ]
null
null
null
import gym from gym import error, spaces, utils from gym.utils import seeding import numpy as np import random class TenArmedBanditGaussianRewardEnv(gym.Env): metadata = {'render.modes': ['human']} def __init__(self, seed=42): self._seed(seed) self.num_bandits = 10 # each reward distribution is a gaussian described using mean and standard deviation self.reward_dist = [[random.uniform(0, 1), 0.5] for _ in range(self.num_bandits)] self.action_space = spaces.Discrete(self.num_bandits) self.observation_space = spaces.Discrete(1) def _seed(self, seed=None): self.np_random, seed = seeding.np_random(seed) return [seed] def step(self, action): assert self.action_space.contains(action) done = True # sample reward using the corresponding reward distribution reward = np.random.normal(self.reward_dist[action][0], self.reward_dist[action][1]) return 0, reward, done, {} def reset(self): return 0 def render(self, mode='human'): pass def close(self): pass
28.692308
92
0.659517
147
1,119
4.897959
0.442177
0.033333
0.058333
0.05
0
0
0
0
0
0
0
0.015294
0.240393
1,119
38
93
29.447368
0.831765
0.125112
0
0.074074
0
0
0.022541
0
0
0
0
0
0.037037
1
0.222222
false
0.074074
0.185185
0.037037
0.592593
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
0
1
0
0
3
aa99aad1fdc79542ef3470565bb0f1459823e3f0
94
py
Python
3.3homework/py04.py
beautyShang/learn-python
ee133ba4b81281f5b69a96010c540efc711af289
[ "Apache-2.0" ]
null
null
null
3.3homework/py04.py
beautyShang/learn-python
ee133ba4b81281f5b69a96010c540efc711af289
[ "Apache-2.0" ]
null
null
null
3.3homework/py04.py
beautyShang/learn-python
ee133ba4b81281f5b69a96010c540efc711af289
[ "Apache-2.0" ]
null
null
null
a = "Hello World" b = a[3] c = a[-2] d = a[5::] e = a[:5] print(b) print(c) print(d) print(e)
9.4
17
0.5
23
94
2.043478
0.478261
0.085106
0
0
0
0
0
0
0
0
0
0.054054
0.212766
94
9
18
10.444444
0.581081
0
0
0
0
0
0.117021
0
0
0
0
0
0
1
0
false
0
0
0
0
0.444444
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
0
0
1
0
3
aac7208cf43e5ab16cbe5f17432b6ef825d613f0
296
py
Python
semseg/models/heads/__init__.py
Genevievekim/semantic-segmentation-1
f28b026e44cff80fe3ca4cac94cea27e4073821b
[ "BSD-3-Clause" ]
196
2021-08-22T10:01:34.000Z
2022-03-29T09:59:51.000Z
semseg/models/heads/__init__.py
Genevievekim/semantic-segmentation-1
f28b026e44cff80fe3ca4cac94cea27e4073821b
[ "BSD-3-Clause" ]
21
2021-08-22T09:59:02.000Z
2022-03-29T15:22:46.000Z
semseg/models/heads/__init__.py
Genevievekim/semantic-segmentation-1
f28b026e44cff80fe3ca4cac94cea27e4073821b
[ "BSD-3-Clause" ]
36
2021-08-22T08:59:40.000Z
2022-03-28T10:13:20.000Z
from .upernet import UPerHead from .segformer import SegFormerHead from .sfnet import SFHead from .fpn import FPNHead from .fapn import FaPNHead from .fcn import FCNHead from .condnet import CondHead __all__ = ['UPerHead', 'SegFormerHead', 'SFHead', 'FPNHead', 'FaPNHead', 'FCNHead', 'CondHead']
32.888889
95
0.773649
36
296
6.25
0.472222
0
0
0
0
0
0
0
0
0
0
0
0.125
296
9
95
32.888889
0.868726
0
0
0
0
0
0.191919
0
0
0
0
0
0
1
0
false
0
0.875
0
0.875
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
0
0
1
0
1
0
0
3
2a9fd6737b08cddb91b3c59b26c31580c9c4ae56
6,762
py
Python
temboo/core/Library/Utilities/Dates/GetTimestamp.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
7
2016-03-07T02:07:21.000Z
2022-01-21T02:22:41.000Z
temboo/core/Library/Utilities/Dates/GetTimestamp.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
null
null
null
temboo/core/Library/Utilities/Dates/GetTimestamp.py
jordanemedlock/psychtruths
52e09033ade9608bd5143129f8a1bfac22d634dd
[ "Apache-2.0" ]
8
2016-06-14T06:01:11.000Z
2020-04-22T09:21:44.000Z
# -*- coding: utf-8 -*- ############################################################################### # # GetTimestamp # Returns the current date and time, expressed as seconds or milliseconds since January 1, 1970 (epoch time). # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, # either express or implied. See the License for the specific # language governing permissions and limitations under the License. # # ############################################################################### from temboo.core.choreography import Choreography from temboo.core.choreography import InputSet from temboo.core.choreography import ResultSet from temboo.core.choreography import ChoreographyExecution import json class GetTimestamp(Choreography): def __init__(self, temboo_session): """ Create a new instance of the GetTimestamp Choreo. A TembooSession object, containing a valid set of Temboo credentials, must be supplied. """ super(GetTimestamp, self).__init__(temboo_session, '/Library/Utilities/Dates/GetTimestamp') def new_input_set(self): return GetTimestampInputSet() def _make_result_set(self, result, path): return GetTimestampResultSet(result, path) def _make_execution(self, session, exec_id, path): return GetTimestampChoreographyExecution(session, exec_id, path) class GetTimestampInputSet(InputSet): """ An InputSet with methods appropriate for specifying the inputs to the GetTimestamp Choreo. The InputSet object is used to specify input parameters when executing this Choreo. """ def set_AddDays(self, value): """ Set the value of the AddDays input for this Choreo. ((optional, integer) Adds the specified number of days to the specified date serial number. A negative number will subtract.) """ super(GetTimestampInputSet, self)._set_input('AddDays', value) def set_AddHours(self, value): """ Set the value of the AddHours input for this Choreo. ((optional, integer) Adds the specified number of hours to the specified date serial number. A negative number will subtract.) """ super(GetTimestampInputSet, self)._set_input('AddHours', value) def set_AddMinutes(self, value): """ Set the value of the AddMinutes input for this Choreo. ((optional, integer) Adds the specified number of minutes to the specified date serial number. A negative number will subtract.) """ super(GetTimestampInputSet, self)._set_input('AddMinutes', value) def set_AddMonths(self, value): """ Set the value of the AddMonths input for this Choreo. ((optional, integer) Adds the specified number of months to the specified date serial number. A negative number will subtract.) """ super(GetTimestampInputSet, self)._set_input('AddMonths', value) def set_AddSeconds(self, value): """ Set the value of the AddSeconds input for this Choreo. ((optional, integer) Adds the specified number of seconds to the specified date serial number. A negative number will subtract.) """ super(GetTimestampInputSet, self)._set_input('AddSeconds', value) def set_AddYears(self, value): """ Set the value of the AddYears input for this Choreo. ((optional, integer) Adds the specified number of years to the specified date serial number. A negative number will subtract.) """ super(GetTimestampInputSet, self)._set_input('AddYears', value) def set_Granularity(self, value): """ Set the value of the Granularity input for this Choreo. ((optional, string) Set to "seconds" to return the number of seconds since the epoch. Defaults to "milliseconds".) """ super(GetTimestampInputSet, self)._set_input('Granularity', value) def set_SetDay(self, value): """ Set the value of the SetDay input for this Choreo. ((optional, integer) Sets the day of month (1-31) of the specified date serial number.) """ super(GetTimestampInputSet, self)._set_input('SetDay', value) def set_SetHour(self, value): """ Set the value of the SetHour input for this Choreo. ((optional, integer) Sets the hours (0-23) of the specified date serial number.) """ super(GetTimestampInputSet, self)._set_input('SetHour', value) def set_SetMinute(self, value): """ Set the value of the SetMinute input for this Choreo. ((optional, integer) Sets the minutes (0-59) of the specified date serial number.) """ super(GetTimestampInputSet, self)._set_input('SetMinute', value) def set_SetMonth(self, value): """ Set the value of the SetMonth input for this Choreo. ((optional, integer) Sets the month (1-12) of the specified date serial number.) """ super(GetTimestampInputSet, self)._set_input('SetMonth', value) def set_SetSecond(self, value): """ Set the value of the SetSecond input for this Choreo. ((optional, integer) Sets the seconds (0-59) of the specified date serial number.) """ super(GetTimestampInputSet, self)._set_input('SetSecond', value) def set_SetYear(self, value): """ Set the value of the SetYear input for this Choreo. ((optional, integer) Sets the year (such as 1989) of the specified date serial number.) """ super(GetTimestampInputSet, self)._set_input('SetYear', value) class GetTimestampResultSet(ResultSet): """ A ResultSet with methods tailored to the values returned by the GetTimestamp Choreo. The ResultSet object is used to retrieve the results of a Choreo execution. """ def getJSONFromString(self, str): return json.loads(str) def get_Timestamp(self): """ Retrieve the value for the "Timestamp" output from this Choreo execution. ((date) A the current timestamp, expressed as the number of seconds or milliseconds since January 1, 1970 (epoch time). The Granularity input is used to indicate seconds or milliseconds.) """ return self._output.get('Timestamp', None) class GetTimestampChoreographyExecution(ChoreographyExecution): def _make_result_set(self, response, path): return GetTimestampResultSet(response, path)
47.286713
269
0.683673
844
6,762
5.402844
0.223934
0.023026
0.034211
0.042763
0.483333
0.432675
0.432675
0.361404
0.308772
0.288158
0
0.008048
0.209849
6,762
142
270
47.619718
0.845405
0.522626
0
0
0
0
0.058336
0.013925
0
0
0
0
0
1
0.408163
false
0
0.102041
0.102041
0.714286
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
0
0
1
1
0
0
3
2aa03f33d960179a0bb79d6a45adc86bd9f35336
76
py
Python
finmath/__init__.py
renanamp/FinanceHub
55b06577a431e7e53de17183444456d28a096bc1
[ "MIT" ]
1
2019-09-23T22:00:18.000Z
2019-09-23T22:00:18.000Z
finmath/__init__.py
renanamp/FinanceHub
55b06577a431e7e53de17183444456d28a096bc1
[ "MIT" ]
null
null
null
finmath/__init__.py
renanamp/FinanceHub
55b06577a431e7e53de17183444456d28a096bc1
[ "MIT" ]
null
null
null
__all__ = ['SwapCurve'] from finmath.SwapCurve.SwapCurve import SwapCurve
15.2
49
0.789474
8
76
7
0.625
0
0
0
0
0
0
0
0
0
0
0
0.118421
76
4
50
19
0.835821
0
0
0
0
0
0.12
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
2aa1d4e0efc50466a1cc284317c5ad15c071d1fc
89
py
Python
Mathematics/Exponentiation.py
charlie219/CSES-Solutions
e082380cbb3ad74eaa9a55f71a2f9df904477ef2
[ "MIT" ]
null
null
null
Mathematics/Exponentiation.py
charlie219/CSES-Solutions
e082380cbb3ad74eaa9a55f71a2f9df904477ef2
[ "MIT" ]
null
null
null
Mathematics/Exponentiation.py
charlie219/CSES-Solutions
e082380cbb3ad74eaa9a55f71a2f9df904477ef2
[ "MIT" ]
null
null
null
n=int(input()) while n: n-=1 print(pow(*map(int,input().split()),10**9+7))
14.833333
50
0.505618
16
89
2.8125
0.75
0.355556
0
0
0
0
0
0
0
0
0
0.071429
0.213483
89
5
51
17.8
0.571429
0
0
0
0
0
0
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
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
2aa7a1c3c3e3ec2b8d1afbc91b85d7cc5e637af1
301
py
Python
ex036 - analisador triangulos.py
fblaz/Python-ex---curso-em-video
794d1f7b9fa0803b168aaf973007906b66a02e2d
[ "MIT" ]
null
null
null
ex036 - analisador triangulos.py
fblaz/Python-ex---curso-em-video
794d1f7b9fa0803b168aaf973007906b66a02e2d
[ "MIT" ]
null
null
null
ex036 - analisador triangulos.py
fblaz/Python-ex---curso-em-video
794d1f7b9fa0803b168aaf973007906b66a02e2d
[ "MIT" ]
null
null
null
x = float(input('digite o segmento 1: ')) y = float(input('digite o segmento 2: ')) z = float(input('digite o segmento 3: ')) if x < y + z and y < x + z and z < x + y: print(f'os segmentos {x, y, z} formam um Triangulo') else: print(f'os segmentos {x, y, z} NÃO formam um Triangulo')
33.444444
61
0.594684
55
301
3.254545
0.4
0.044693
0.268156
0.284916
0.642458
0.223464
0.223464
0
0
0
0
0.013216
0.245847
301
8
62
37.625
0.77533
0
0
0
0
0
0.515358
0
0
0
0
0
0
1
0
false
0
0
0
0
0.285714
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
0
0
3
2ab09eabfe924117e3d3a652ef2a8ea813d9dea2
1,115
py
Python
client/channellog.py
heartsoso/Discline
e2cee4322d8e9ff3d269954ebc5ceb812473d79b
[ "WTFPL" ]
535
2017-12-11T12:42:03.000Z
2019-07-27T18:09:26.000Z
client/channellog.py
heartsoso/Discline
e2cee4322d8e9ff3d269954ebc5ceb812473d79b
[ "WTFPL" ]
54
2017-12-11T13:39:39.000Z
2019-07-20T23:14:31.000Z
client/channellog.py
heartsoso/Discline
e2cee4322d8e9ff3d269954ebc5ceb812473d79b
[ "WTFPL" ]
33
2017-12-22T09:07:56.000Z
2019-07-21T16:00:02.000Z
# Wrapper class to make dealing with logs easier class ChannelLog(): __channel = "" __logs = [] unread = False mentioned_in = False # the index of where to start printing the messages __index = 0 def __init__(self, channel, logs): self.__channel = channel self.__logs = list(logs) def get_server(self): return self.__channel.server def get_channel(self): return self.__channel def get_logs(self): return self.__logs def get_name(self): return self.__channel.name def get_server_name(self): return self.__channel.server.name def append(self, message): self.__logs.append(message) def index(self, message): return self.__logs.index(message) def insert(self, i, message): self.__logs.insert(i, message) def len(self): return len(self.__logs) def get_index(self): return self.__index def set_index(self, int): self.__index = int def inc_index(self, int): self.__index += int def dec_index(self, int): self.__index -= int
22.3
55
0.632287
145
1,115
4.510345
0.268966
0.107034
0.12844
0.12844
0.246177
0.119266
0.082569
0
0
0
0
0.001235
0.273543
1,115
49
56
22.755102
0.806173
0.086099
0
0
0
0
0
0
0
0
0
0
0
1
0.424242
false
0
0
0.242424
0.787879
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
0
0
1
1
0
0
3
2ab99af9bb6c3090ad786980e8ef1ad5ab34acb2
1,093
py
Python
game/opengl/interface.py
cassiersg/elec-2103
f0152c81e8d808a1ab62c78e9324fb99b341638a
[ "Apache-2.0" ]
null
null
null
game/opengl/interface.py
cassiersg/elec-2103
f0152c81e8d808a1ab62c78e9324fb99b341638a
[ "Apache-2.0" ]
null
null
null
game/opengl/interface.py
cassiersg/elec-2103
f0152c81e8d808a1ab62c78e9324fb99b341638a
[ "Apache-2.0" ]
null
null
null
import pygame import cubes import time import font import PIL t0 = time.time() grid = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [3, 3, 0, 0, 0, 3, 3, 0, 3, 3, 0, 0, 0, 3, 3], [3, 3, 0, 0, 0, 3, 3, 3, 3, 4, 0, 0, 0, 3, 3], [3, 3, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 4, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3], [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3]] grid = bytearray(x for y in grid for x in y) t1 = time.time() cubes.cubes_init() t2 = time.time() cubes.draw_cubes(grid, cubes.n, cubes.m, 0, 1, 14, 1, 2, 20000, 0xffffff) buf = bytearray(cubes.width*cubes.height*4) cubes.cubes_image_export(buf) mask = font.render_text('a') font.blit_mask(buf, 800, 480, mask, 100, 200, 0xff0000) t3 = time.time() cubes.cubes_exit() pygame.init() s = pygame.display.set_mode((800, 480)) s.fill((0, 0, 0)) b = s.get_buffer() t4 = time.time() b.write(bytes(buf)) pygame.display.flip() t5 = time.time() print("dt gen_grid", t1-t0) print("dt init_cubes", t2-t1) print("dt draw&recover buf", t3-t2) print("dt blit buf", t5-t4) time.sleep(10)
28.763158
336
0.58097
246
1,093
2.536585
0.256098
0.205128
0.269231
0.326923
0.168269
0.168269
0.165064
0.165064
0.152244
0.113782
0
0.180383
0.188472
1,093
37
337
29.540541
0.523112
0
0
0
0
0
0.050366
0
0
0
0.014652
0
0
1
0
false
0
0.16129
0
0.16129
0.129032
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
0
0
0
3
2af316434f459e01963799b897bd4f6d92aa7dfb
232
py
Python
linguistics/document/Sentence.py
idin/mercurius
48a4ed7843fb5d1946ef8051f23da7b32ab52ca3
[ "MIT" ]
7
2019-02-24T16:56:46.000Z
2022-01-30T03:26:49.000Z
linguistics/document/Sentence.py
idin/mercurius
48a4ed7843fb5d1946ef8051f23da7b32ab52ca3
[ "MIT" ]
1
2020-07-14T21:00:57.000Z
2021-02-25T07:12:11.000Z
linguistics/document/Sentence.py
idin/linguistics
ab9568d81b225928beab353174fd97ccb0fe369c
[ "MIT" ]
null
null
null
from .TokenSpan import TokenSpan class Sentence(TokenSpan): def __init__(self, obj, document): super().__init__(obj=obj, document=document) @property def id(self): return self.document.id, 'sentence', self.start, self.end
21.090909
59
0.741379
31
232
5.290323
0.516129
0.134146
0
0
0
0
0
0
0
0
0
0
0.12931
232
10
60
23.2
0.811881
0
0
0
0
0
0.034483
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.714286
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
0
0
1
1
0
0
3
2af663664e00135c4ce97ed2eecd5d71b7b19c64
787
py
Python
Section2/strings.py
joranbeasley/Getting-Started-with-Modern-Python
f9ac143fa5f23ea087b8af73f6665b58273b1697
[ "MIT" ]
8
2018-07-09T16:08:19.000Z
2021-11-08T13:10:38.000Z
Section2/strings.py
joranbeasley/Getting-Started-with-Modern-Python
f9ac143fa5f23ea087b8af73f6665b58273b1697
[ "MIT" ]
null
null
null
Section2/strings.py
joranbeasley/Getting-Started-with-Modern-Python
f9ac143fa5f23ea087b8af73f6665b58273b1697
[ "MIT" ]
7
2018-06-16T20:16:13.000Z
2019-03-20T05:05:43.000Z
"{variable_name:format_description}" print('{a:<10}|{a:^10}|{a:>10}'.format(a='test')) print('{a:~<10}|{a:~^10}|{a:~>10}'.format(a='test')) person = {"first":"Joran","last":"Beasley"} print("{p[first]} {p[last]}".format(p=person)) data = range(100) print("{d[0]}...{d[99]}".format(d=data)) print("normal:{num:d}".format(num=33)) print("normal:{num:f}".format(num=33)) print("binary:{num:b}".format(num=33)) print("binary:{num:08b}".format(num=33)) print("hex:{num:x}".format(num=33)) print("hex:0x{num:0<4x}".format(num=33)) print("octal:{num:o}".format(num=33)) print("{num:f}".format(num=22/7)) print("${num:0.2f}".format(num=22/7)) print("{num:.2e}".format(num=22/7)) print("{num:.1%}".format(num=22/7)) print("{num:g}".format(num=5.1200001)) variable=27 print(f"{variable}")
26.233333
52
0.620076
140
787
3.471429
0.3
0.222222
0.158436
0.230453
0.44856
0.37037
0.102881
0.102881
0.102881
0.102881
0
0.083665
0.043202
787
29
53
27.137931
0.561753
0.043202
0
0
0
0
0.380892
0.105732
0
0
0
0
0
1
0
false
0
0
0
0
0.809524
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
2af849686285c5c0193e91508af6e0ba66ab21b6
329
py
Python
yt/fake-random-on-to-derived.py
lindsayad/python
4b63a8b02de6a7c0caa7bb770f3f22366e066a7f
[ "MIT" ]
null
null
null
yt/fake-random-on-to-derived.py
lindsayad/python
4b63a8b02de6a7c0caa7bb770f3f22366e066a7f
[ "MIT" ]
null
null
null
yt/fake-random-on-to-derived.py
lindsayad/python
4b63a8b02de6a7c0caa7bb770f3f22366e066a7f
[ "MIT" ]
null
null
null
import yt from yt.testing import fake_random_ds, assert_equal def _test(field, data): return data[('stream', 'velocity_x')] ds = fake_random_ds() ds.add_field(('stream, density'), function=_test, units='cm/s', force_override=True) assert_equal(ds.all_data()[('stream', 'density')], ds.all_data()[('stream', 'velocity_x')])
32.9
91
0.717325
50
329
4.44
0.54
0.135135
0.108108
0.171171
0
0
0
0
0
0
0
0
0.094225
329
9
92
36.555556
0.744966
0
0
0
0
0
0.194529
0
0
0
0
0
0.285714
1
0.142857
false
0
0.285714
0.142857
0.571429
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
0
1
0
0
0
3
2af88c30ff1cf39c8df7fd5cec63d28d34537561
267
py
Python
project_template/project_name/rentals/adminx.py
glasslion/django-sakila
4a8b3419b649767e7d215590b2bb9824b6685edb
[ "MIT" ]
5
2017-10-20T06:19:53.000Z
2020-05-30T02:12:18.000Z
project_template/project_name/rentals/adminx.py
glasslion/django-sakila
4a8b3419b649767e7d215590b2bb9824b6685edb
[ "MIT" ]
null
null
null
project_template/project_name/rentals/adminx.py
glasslion/django-sakila
4a8b3419b649767e7d215590b2bb9824b6685edb
[ "MIT" ]
3
2015-09-05T03:11:25.000Z
2020-05-30T02:12:24.000Z
import xadmin from .models import Customer, Inventory, Rental, Payment, Staff, Store xadmin.site.register(Customer) xadmin.site.register(Inventory) xadmin.site.register(Rental) xadmin.site.register(Payment) xadmin.site.register(Staff) xadmin.site.register(Store)
22.25
71
0.808989
35
267
6.171429
0.342857
0.277778
0.5
0
0
0
0
0
0
0
0
0
0.078652
267
11
72
24.272727
0.878049
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
6309cb248b1b826e1979d5aeac8da58bb5211bd7
887
py
Python
codemaster/models/actors/npcs/__init__.py
japinol7/the-codemaster
35f1c53a431b2fddf851c7fbf155cae968f1bad7
[ "MIT" ]
null
null
null
codemaster/models/actors/npcs/__init__.py
japinol7/the-codemaster
35f1c53a431b2fddf851c7fbf155cae968f1bad7
[ "MIT" ]
null
null
null
codemaster/models/actors/npcs/__init__.py
japinol7/the-codemaster
35f1c53a431b2fddf851c7fbf155cae968f1bad7
[ "MIT" ]
null
null
null
"""Package npcs.""" from codemaster.models.actors.npcs.bats import ( BatBlue, BatLilac, BatRed, BatBlack, ) from codemaster.models.actors.npcs.skulls import ( SkullGreen, SkullBlue, SkullYellow, SkullRed, ) from codemaster.models.actors.npcs.ghosts import ( GhostGreen, GhostBlue, GhostYellow, GhostRed, ) from codemaster.models.actors.npcs.vampires import ( VampireMale, VampireFemale, ) from codemaster.models.actors.npcs.demons import ( DemonMale, ) from codemaster.models.actors.npcs.wolfmen import ( WolfManMale, ) from codemaster.models.actors.npcs.terminator_eyes import ( TerminatorEyeGreen, TerminatorEyeBlue, TerminatorEyeYellow, TerminatorEyeRed, ) from codemaster.models.actors.npcs.snakes import ( SnakeGreen, SnakeBlue, SnakeYellow, SnakeRed, )
21.119048
59
0.692221
83
887
7.385542
0.481928
0.182708
0.261011
0.339315
0.391517
0
0
0
0
0
0
0
0.218715
887
41
60
21.634146
0.88456
0.014656
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.2
0
0.2
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
630b8bdc1ca9842989623aa8a26806eb73524765
221
py
Python
healthgen/data_access/preprocessing/base_processor.py
simonbing/HealthGen
d5886a5a41dc36c6a70dece3dba3c60a90bf1fdd
[ "MIT" ]
null
null
null
healthgen/data_access/preprocessing/base_processor.py
simonbing/HealthGen
d5886a5a41dc36c6a70dece3dba3c60a90bf1fdd
[ "MIT" ]
null
null
null
healthgen/data_access/preprocessing/base_processor.py
simonbing/HealthGen
d5886a5a41dc36c6a70dece3dba3c60a90bf1fdd
[ "MIT" ]
null
null
null
""" 2021 Simon Bing, ETHZ, MPI IS """ import numpy as np from absl import flags class BaseProcessor(object): def __init__(self): self.name = None def transform(self, x): raise NotImplementedError
18.416667
33
0.669683
29
221
4.965517
0.862069
0
0
0
0
0
0
0
0
0
0
0.02381
0.239819
221
12
33
18.416667
0.833333
0.131222
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.285714
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
1
0
0
0
0
1
0
0
3
63232cbcd99d62acdd24af24172c2125ae6ba020
58
py
Python
Types/Enums/Preprocessing_Mode.py
SBCV/PythonUtility
0062e1e60dc151776b963d13bc4c1763eb90d333
[ "MIT" ]
2
2019-02-20T14:56:13.000Z
2020-05-19T12:31:53.000Z
Types/Enums/Preprocessing_Mode.py
SBCV/PythonUtility
0062e1e60dc151776b963d13bc4c1763eb90d333
[ "MIT" ]
null
null
null
Types/Enums/Preprocessing_Mode.py
SBCV/PythonUtility
0062e1e60dc151776b963d13bc4c1763eb90d333
[ "MIT" ]
1
2021-01-07T08:32:07.000Z
2021-01-07T08:32:07.000Z
class PreprocessingMode: VIDEO = 1 FOLDER_LIST = 2
19.333333
24
0.689655
7
58
5.571429
1
0
0
0
0
0
0
0
0
0
0
0.046512
0.258621
58
3
25
19.333333
0.860465
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
63255499e65964a28a12c77f2be3fdd224d73d23
8,565
py
Python
tests/test_all.py
waadnakhleh/pythonformatter
5f622986aa4e2fcdf03e49041a7ddc14e66d1a2f
[ "MIT" ]
null
null
null
tests/test_all.py
waadnakhleh/pythonformatter
5f622986aa4e2fcdf03e49041a7ddc14e66d1a2f
[ "MIT" ]
19
2020-12-28T17:17:12.000Z
2021-12-22T20:44:42.000Z
tests/test_all.py
waadnakhleh/pythonformatter
5f622986aa4e2fcdf03e49041a7ddc14e66d1a2f
[ "MIT" ]
1
2021-03-20T17:41:14.000Z
2021-03-20T17:41:14.000Z
import filecmp import os import pathlib import pytest from lib import _rewrite from _exceptions import NoSolutionError import main def confirm(output): compare_to = "modified_file.py" try: assert filecmp.cmp(output, compare_to) except AssertionError as e: with open(compare_to) as f: if not os.path.isdir("logs"): os.mkdir("logs") lines = f.readlines() lines = [l for l in lines] with open( f"logs/log_{output[:len(output)-len('/output.py')]}.py", "w" ) as f1: f1.writelines(lines) raise e finally: open(compare_to, "w").close() # Empty file def make_test( input_file, output_file, max_line=88, space_between_arguments=False, multiple_imports=False, vertical_definition_lines=2, nested_lines=1, ): input_file = pathlib.Path(__file__).parent.absolute().joinpath(input_file) output_file = pathlib.Path(__file__).parent.absolute().joinpath(output_file) args = ( "--target-file", input_file, "--max-line", max_line, "--vertical-definition-lines", vertical_definition_lines, "--nested-lines", nested_lines, ) if space_between_arguments: args = args + ("--space-between-arguments",) if multiple_imports: args = args + ("--multiple-imports",) main.main(*args) confirm(output_file) _rewrite.file = open("modified_file.py", "a") def test_syntax_error(): with pytest.raises(SyntaxError): input_file = "syntax_error/file.py" input_file = pathlib.Path(__file__).parent.absolute().joinpath(input_file) main.main("--target-file", input_file) def test_import(): input_file, output_file = "test_import/input.py", "test_import/output.py" make_test(input_file, output_file) def test_from_import(): input_file, output_file = "test_from_import/input.py", "test_from_import/output.py" make_test(input_file, output_file) def test_constant(): # TODO: fix bug, binary and hex values change to decimal. input_file, output_file = "test_constant/input.py", "test_constant/output.py" make_test(input_file, output_file) def test_unaryop(): input_file, output_file = "test_unaryop/input.py", "test_unaryop/output.py" make_test(input_file, output_file) def test_name(): input_file, output_file = "test_name/input.py", "test_name/output.py" make_test(input_file, output_file) def test_boolop(): input_file, output_file = "test_boolop/input.py", "test_boolop/output.py" make_test(input_file, output_file) def test_list(): input_file, output_file = "test_list/input.py", "test_list/output.py" make_test(input_file, output_file) def test_tuple(): input_file, output_file = "test_tuple/input.py", "test_tuple/output.py" make_test(input_file, output_file) def test_pass(): input_file, output_file = "test_pass/input.py", "test_pass/output.py" make_test(input_file, output_file) def test_assignment(): input_file, output_file = "test_assignment/input.py", "test_assignment/output.py" make_test(input_file, output_file) def test_binop(): input_file, output_file = "test_binop/input.py", "test_binop/output.py" make_test(input_file, output_file) def test_namedexpr(): input_file, output_file = "test_namedexpr/input.py", "test_namedexpr/output.py" make_test(input_file, output_file) def test_compare(): input_file, output_file = "test_compare/input.py", "test_compare/output.py" make_test(input_file, output_file) def test_assert(): input_file, output_file = "test_assert/input.py", "test_assert/output.py" make_test(input_file, output_file) def test_if(): input_file, output_file = "test_if/input.py", "test_if/output.py" make_test(input_file, output_file) def test_while(): input_file, output_file = "test_while/input.py", "test_while/output.py" make_test(input_file, output_file) def test_break(): input_file, output_file = "test_break/input.py", "test_break/output.py" make_test(input_file, output_file) def test_continue(): input_file, output_file = "test_continue/input.py", "test_continue/output.py" make_test(input_file, output_file) def test_return(): input_file, output_file = "test_return/input.py", "test_return/output.py" make_test(input_file, output_file) def test_call(): input_file, output_file = "test_call/input.py", "test_call/output.py" make_test(input_file, output_file) def test_functiondef(): input_file, output_file = "test_functiondef/input.py", "test_functiondef/output.py" make_test(input_file, output_file) def test_for(): input_file, output_file = "test_for/input.py", "test_for/output.py" make_test(input_file, output_file) def test_augassign(): input_file, output_file = "test_augassign/input.py", "test_augassign/output.py" make_test(input_file, output_file) def test_classdef(): input_file, output_file = "test_classdef/input.py", "test_classdef/output.py" make_test(input_file, output_file) def test_with(): input_file, output_file = "test_with/input.py", "test_with/output.py" make_test(input_file, output_file) def test_delete(): input_file, output_file = "test_delete/input.py", "test_delete/output.py" make_test(input_file, output_file) def test_attribute(): input_file, output_file = "test_attribute/input.py", "test_attribute/output.py" make_test(input_file, output_file) def test_try(): input_file, output_file = "test_try/input.py", "test_try/output.py" make_test(input_file, output_file) def test_raise(): input_file, output_file = "test_raise/input.py", "test_raise/output.py" make_test(input_file, output_file) def test_global(): input_file, output_file = "test_global/input.py", "test_global/output.py" make_test(input_file, output_file) def test_nonlocal(): input_file, output_file = "test_nonlocal/input.py", "test_nonlocal/output.py" make_test(input_file, output_file) def test_subscript(): input_file, output_file = "test_subscript/input.py", "test_subscript/output.py" make_test(input_file, output_file) def test_listcomp(): input_file, output_file = "test_listcomp/input.py", "test_listcomp/output.py" make_test(input_file, output_file) def test_docstring(): input_file, output_file = "test_docstring/input.py", "test_docstring/output.py" make_test(input_file, output_file) def test_ifexpr(): input_file, output_file = "test_ifexpr/input.py", "test_ifexpr/output.py" make_test(input_file, output_file) def test_dict(): input_file, output_file = "test_dict/input.py", "test_dict/output.py" make_test(input_file, output_file) def test_general(): input_file, output_file = "test_general/input.py", "test_general/output.py" make_test(input_file, output_file) def test_command_line_args(): input_file, output_file = ( "test_command_line_args/input.py", "test_command_line_args/output.py", ) make_test(input_file, output_file, max_line=100) def test_bad_arguments(): with pytest.raises(ValueError, match="unknown argument --unsupported-argument"): main.main("--target-file", "input_file", "--unsupported-argument", "") def test_bad_max_line_length(): input_file, output_file = ( "test_command_line_args/input.py", "test_command_line_args/output.py", ) with pytest.raises(NoSolutionError, match="check maximum line length"): make_test(input_file, output_file, max_line=30) def test_space_arguments(): input_file, output_file = ( "test_space_arguments/input.py", "test_space_arguments/output.py", ) make_test(input_file, output_file, max_line=100, space_between_arguments=True) def test_multiple_imports(): input_file, output_file = ( "test_multiple_imports/input.py", "test_multiple_imports/output.py", ) make_test(input_file, output_file, multiple_imports=True) def test_vertical_definition_lines(): input_file, output_file = ( "test_vertical_definition_lines/input.py", "test_vertical_definition_lines/output.py", ) make_test(input_file, output_file, vertical_definition_lines=3) def test_nested_lines(): input_file, output_file = ( "test_nested_lines/input.py", "test_nested_lines/output.py", ) make_test(input_file, output_file, nested_lines=3)
28.174342
87
0.709165
1,208
8,565
4.664735
0.105132
0.15173
0.23425
0.296717
0.569654
0.407098
0.377285
0.370009
0.35173
0.337533
0
0.002255
0.171629
8,565
303
88
28.267327
0.791966
0.007706
0
0.245192
0
0
0.267067
0.166314
0
0
0
0.0033
0.019231
1
0.225962
false
0.009615
0.086538
0
0.3125
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
0
0
0
3
6326c7a8a208e98565f72a4a6b233c7a564c35a3
123
py
Python
cride/rides/apps.py
LhernerRemon/Rider
30783cf58513698d23730f5fa477dfeddda8ee6b
[ "MIT" ]
null
null
null
cride/rides/apps.py
LhernerRemon/Rider
30783cf58513698d23730f5fa477dfeddda8ee6b
[ "MIT" ]
null
null
null
cride/rides/apps.py
LhernerRemon/Rider
30783cf58513698d23730f5fa477dfeddda8ee6b
[ "MIT" ]
null
null
null
#Django from django.apps import AppConfig class RidesAppConfig(AppConfig): name="cride.rides" verbose_name="Rides"
20.5
33
0.764228
15
123
6.2
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.138211
123
6
34
20.5
0.877358
0.04878
0
0
0
0
0.136752
0
0
0
0
0
0
1
0
false
0
0.25
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
0
0
1
0
0
3
2d5e4f9e64b8f31e4730fca32c36434095cee023
15,971
py
Python
models.py
perSEVERE-5962/SEVEREscout
f2191bdf52a0d7302666ce38fe3cc31f64b0216a
[ "MIT" ]
null
null
null
models.py
perSEVERE-5962/SEVEREscout
f2191bdf52a0d7302666ce38fe3cc31f64b0216a
[ "MIT" ]
2
2021-02-08T20:42:33.000Z
2021-04-30T21:08:27.000Z
models.py
perSEVERE-5962/SEVEREscout
f2191bdf52a0d7302666ce38fe3cc31f64b0216a
[ "MIT" ]
1
2020-02-22T17:25:03.000Z
2020-02-22T17:25:03.000Z
from app import db from sqlalchemy.sql import func from sqlalchemy.dialects.postgresql import ARRAY class PitReport(db.Model): __tablename__ = "pit_report" id = db.Column(db.Integer, primary_key=True, autoincrement=True) # team relationship team_id = db.Column(db.Integer, db.ForeignKey("team.id"), nullable=False) # metadata event = db.Column(db.String) time_created = db.Column(db.DateTime(timezone=True), server_default=func.now()) time_updated = db.Column(db.DateTime(timezone=True), onupdate=func.now()) created_by = db.Column(db.String) # drivetrain drivetrain_type = db.Column(db.String) drivetrain_type_other = db.Column(db.String) wheel_type = db.Column((ARRAY(db.String))) wheel_type_other = db.Column(db.String) wheel_number = db.Column(db.Integer) motor_type = db.Column((ARRAY(db.String))) motor_type_other = db.Column(db.String) motor_number = db.Column(db.String) drivetrain_notes = db.Column(db.String) # physical characteristics weight = db.Column(db.Float) height = db.Column(db.Float) width = db.Column(db.Float) length = db.Column(db.Float) speed = db.Column(db.Float) # auto auto_move = db.Column(db.Boolean) auto_score_bottom = db.Column(db.Boolean) auto_score_outer = db.Column(db.Boolean) auto_score_inner = db.Column(db.Boolean) auto_collect_balls = db.Column(db.Boolean) auto_consistency = db.Column(db.Integer) auto_prefered_position = db.Column((ARRAY(db.String))) # teleop teleop_score_bottom = db.Column(db.Boolean) teleop_score_outer = db.Column(db.Boolean) teleop_score_inner = db.Column(db.Boolean) teleop_consistency = db.Column(db.Integer) teleop_ball_capacity = db.Column(db.Integer) teleop_prefered_position = db.Column(db.String) # control panel control_panel_rotation = db.Column(db.Boolean) control_panel_position = db.Column(db.Boolean) # hang hang_able = db.Column(db.Boolean) hang_level = db.Column(db.Boolean) hang_prefered_position = db.Column((ARRAY(db.String))) hang_consistency = db.Column(db.Integer) hang_time = db.Column(db.Float) hang_active = db.Column(db.Boolean) # personnel personnel_honesty = db.Column(db.Integer) personnel_answering = db.Column(db.Integer) personnel_notes = db.Column(db.String) # notes notes = db.Column(db.String) class Match(db.Model): __tablename__ = "match" id = db.Column(db.Integer, primary_key=True, autoincrement=True) match = db.Column(db.Integer) event = db.Column(db.String) match_reports = db.relationship("MatchReport", backref="match", lazy=True) class MatchReport(db.Model): __tablename__ = "match_report" id = db.Column(db.Integer, primary_key=True, autoincrement=True) # match relationship match_id = db.Column(db.Integer, db.ForeignKey("match.id"), nullable=False) # team relationship team_id = db.Column(db.Integer, db.ForeignKey("team.id"), nullable=False) # metadata alliance = db.Column(db.String) station = db.Column(db.Integer) time_created = db.Column(db.DateTime(timezone=True), server_default=func.now()) time_updated = db.Column(db.DateTime(timezone=True), onupdate=func.now()) created_by = db.Column(db.String) # auto auto_move = db.Column(db.Boolean) auto_score_bottom = db.Column(db.Integer) auto_score_upper = db.Column(db.Integer) auto_collect_balls = db.Column(db.Boolean) auto_points = db.Column(db.Integer) # teleop teleop_score_bottom = db.Column(db.Integer) teleop_score_upper = db.Column(db.Integer) teleop_points = db.Column(db.Integer) teleop_attempts = db.Column (db.Integer) teleop_success_rate = db.Column(db.Float) # control panel control_panel_rotation = db.Column(db.Boolean) control_panel_position = db.Column(db.Boolean) control_panel_points = db.Column(db.Integer) # hang hang_able = db.Column(db.Boolean) hang_level = db.Column(db.Boolean) hang_position = db.Column(db.String) hang_active = db.Column(db.Boolean) hang_points = db.Column(db.Integer) # defense defense_performance = db.Column(db.Integer) defense_penalties = db.Column(db.Integer) # comms connection_issues = db.Column(db.Boolean) brownouts = db.Column(db.Boolean) emergency_stop = db.Column(db.Boolean) #notes notes = db.Column(db.String) class Bookmark(db.Model): __tablename__ = "bookmark" id = db.Column(db.Integer, primary_key=True, autoincrement=True) team_number = db.Column(db.Integer) time_created = db.Column(db.DateTime(timezone=True), server_default=func.now()) user_id = db.Column(db.Integer, db.ForeignKey("user.id"), nullable=False) class User(db.Model): __tablename__ = "user" id = db.Column(db.Integer, primary_key=True, autoincrement=True) user_id = db.Column(db.String) first_name = db.Column(db.String) last_name = db.Column(db.String) bookmarks = db.relationship("Bookmark", backref="user", lazy=True) alliance_suggestions = db.relationship("AllianceSuggestion", backref="user", lazy=True) team_photos = db.relationship("TeamPhoto", backref="user", lazy=True) class AllianceSuggestion(db.Model): __tablename__ = "alliance_suggestion" id = db.Column(db.Integer, primary_key=True, autoincrement=True) pick_number = db.Column(db.Integer) team_number = db.Column(db.Integer) time_created = db.Column(db.DateTime(timezone=True), server_default=func.now()) already_selected = db.Column(db.Boolean, default=False) accepted = db.Column(db.Boolean, default=False) denied = db.Column(db.Boolean, default = False) user_id = db.Column(db.Integer, db.ForeignKey("user.id"), nullable=False) team_id = db.Column(db.Integer, db.ForeignKey("team.id"), nullable=False) class Team(db.Model): __tablename__ = "team" id = db.Column(db.Integer, primary_key=True, autoincrement=True) team_number = db.Column(db.Integer) team_stats = db.relationship("TeamStats", backref="team", lazy=True) alliance_suggestions = db.relationship("AllianceSuggestion", backref="team", lazy=True) pit_reports = db.relationship("PitReport", backref="team", lazy=True) match_reports = db.relationship("MatchReport", backref="team", lazy=True) team_photos = db.relationship("TeamPhoto", backref="team", lazy=True) class TeamPhoto(db.Model): __tablename__ = "team_photo" id = db.Column(db.Integer, primary_key=True, autoincrement=True) team_id = db.Column(db.Integer, db.ForeignKey("team.id"), nullable=False) user_id = db.Column(db.Integer, db.ForeignKey("user.id"), nullable=False) url = db.Column(db.String) height = db.Column(db.Integer) width = db.Column(db.Integer) public_id = db.Column(db.String) format = db.Column(db.String) version = db.Column(db.String) class TeamStats(db.Model): __tablename__ = "team_stats" id = db.Column(db.Integer, primary_key=True, autoincrement=True) team_id = db.Column(db.Integer, db.ForeignKey("team.id"), nullable=False) auto_points = db.Column(db.Integer) auto_points_avg = db.Column(db.Float) teleop_points = db.Column(db.Integer) teleop_points_avg = db.Column(db.Float) teleop_score_bottom = db.Column(db.Integer) teleop_score_bottom_avg = db.Column(db.Float) teleop_score_upper = db.Column(db.Integer) teleop_score_upper_avg = db.Column(db.Float) teleop_successful_attempts = db.Column(db.Integer) teleop_attempts = db.Column(db.Integer) teleop_success_rate = db.Column(db.Float) control_panel_points = db.Column(db.Integer) control_panel_points_avg = db.Column(db.Float) hang_points = db.Column(db.Integer) hang_points_avg = db.Column(db.Float) hang_able = db.Column(db.Integer) hang_success_rate = db.Column(db.Float) defense_penalties = db.Column(db.Integer) defense_penalties_avg = db.Column(db.Float) connection_issues = db.Column(db.Integer) connection_issues_avg = db.Column(db.Float) brownouts = db.Column(db.Integer) brownouts_avg = db.Column(db.Float) emergency_stops = db.Column(db.Integer) emergency_stops_avg = db.Column(db.Float) num_matches = db.Column(db.Integer) """ class TeamPit(db.Model): __tablname__ = "team_pit" id = db.Column(db.Integer, primary_key=True) team_number = db.Column(db.Integer) auto = db.relationship("Auto", back_populates="team_pit") drivetrain_configuration_id = db.Column(db.Integer, db.ForeignKey("drivetrain_configuration.id")) drivetrain_configuration = db.relationship("drivetrain_configuration", backref="team_pit") physical_characteristics_id = db.Column(db.Integer, db.ForeignKey("physical_characteristics.id")) physical_characteristics = db.relationship("physical_characteristics", backref="team_pit") teleop_id = db.Column(db.Integer, db.ForeignKey("teleop.id")) teleop = db.relationship("teleop", backref="team_pit") hang_id = db.Column(db.Integer, db.ForeignKey("hang.id")) hang = db.relationship("hang", backref="team_pit") personnel_id = db.Column(db.Integer, db.ForeignKey("personnel.id")) personnel = db.relationship("personnel", backref="team_pit") control_panel_id = db.Column(db.Integer, db.ForeignKey("control_panel.id")) control_panel = db.relationship("control_panel", backref="team_pit") event_id = db.Column(db.Integer, db.ForeignKey("event.id")) event = db.relationship("event", backref="team_pit") notes = db.Column(db.String) def __repr__(self): return(self.id) class DrivetrainType(db.Model): __tablename__ = "drivetrain_type" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String) def __repr__(self): return(self.id) class WheelType(db.Model): __tablename__ = "wheel_type" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String) def __repr__(self): return(self.id) class MotorType(db.Model): __tablename__ = "motor_type" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String) def __repr__(self): return(self.id) class DrivetrainConfiguration(db.Model): __tablename__ = "drivetrain_configuration" id = db.Column(db.Integer, primary_key=True) drivetrain_type_id = db.Column(db.Integer, db.ForeignKey("drivetrain_type.id")) drivetrain_type = db.relationship("drivetrain_type") wheel_type_id = db.Column(db.Integer, db.ForeignKey("wheel_type.id")) wheel_type = db.relationship("wheel_type") motor_type_id = db.Column(db.Integer, db.ForeignKey("motor_type.id")) motor_type = db.relationship("motor_type") notes = db.Column(db.String) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) def __repr__(self): return(self.id) class PhysicalCharacteristics(db.Model): __tablename__ = "physical_characteristics" id = db.Column(db.Integer, primary_key=True) weight = db.Column(db.Float) height = db.Column(db.Float) width = db.Column(db.Float) length = db.Column(db.Float) speed = db.Column(db.Float) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) def __repr__(self): return(self.id) class Auto(db.Model): __tablename__ = "auto" id = db.Column(db.Integer, primary_key=True) move = db.Column(db.Boolean) score_bottom = db.Column(db.Boolean) score_outer = db.Column(db.Boolean) score_inner = db.Column(db.Boolean) collect_balls = db.Column(db.Boolean) consistency = db.Column(db.Integer) starting_position = db.Column(db.String) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) team_pit = db.relationship("Parent", back_populates="children") def __repr__(self): return(self.id) class Teleop(db.Model): __tablename__ = "teleop" id = db.Column(db.Integer, primary_key=True) score_bottom = db.Column(db.Boolean) score_outer = db.Column(db.Boolean) score_inner = db.Column(db.Boolean) consistency = db.Column(db.Integer) shooting_position db.Column(db.String) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) def __repr__(self): return(self.id) class ControlPanel(db.Model): __tablename__ = "control_panel" id = db.Column(db.Integer, primary_key=True) rotation = db.Column(db.Boolean) postition = db.Column(db.Boolean) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) def __repr__(self): return(self.id) class Hang(db.Model): __tablename__ = "hang" id = db.Column(db.Integer, primary_key=True) able = db.Column(db.Boolean) level = db.Column(db.Boolean) prefered_position = db.Column(db.String) consistency = db.Column(db.Integer) time = db.Column(db.Float) active = db.Column(db.Boolean) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) def __repr__(self): return(self.id) class Event(db.Model): __tablename__ = "event" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) def __repr__(self): return(self.id) class Personnel(db.Model): __tablename__ = "personnel" id = db.Column(db.Integer, primary_key=True) honest = db.Column(db.Integer) answer = db.Column(db.Integer) notes = db.Column(db.String) team_pit_id = db.Column(db.Integer, db.ForeignKey("team_pit.id")) def __repr__(self): return(self.id) class Match(db.Model): __tablename__ = "match" id = db.Column(db.Integer, primary_key=True) auto = db.Column(db.Integer, db.ForeignKey("drivetrain_configuration.id")) drivetrain_configuration = db.relationship("drivetrain_configuration", backref="team_pit") notes = db.Column(db.String) class TeamMatch(db.Model): __tablename__ = "team_match" id = db.Column(db.Integer, primary_key=True) team_number = db.Column(db.Integer) notes = db.Column(db.String) class Alliance(db.Model): __tablename__ = "alliance" id = db.Column(db.Integer, primary_key=True) color = db.Column(db.String) class Station(db.Model): __tablename__ = "station" id = db.Column(db.Integer, primary_key=True) number = db.Column(db.Integer) class AutoPoints(db.Model): __tablename__ = "auto_points" id = db.Column(db.Integer, primary_key=True) move = db.Column(db.Boolean) score_bottom = db.Column(db.Integer) score_upper = db.Column(db.Integer) collect_balls = db.Column(db.Boolean) points = db.Column(db.Integer) class TeleopPoints(db.Model): __tablename__ = "auto_points" id = db.Column(db.Integer, primary_key=True) score_bottom = db.Column(db.Integer) score_upper = db.Column(db.Integer) points = db.Column(db.Integer) attempts = db.Column (db.Integer) class ControlPanelPoints(db.Model): __tablename__ = "control_panel_points" id = db.Column(db.Integer, primary_key=True) rotation = db.Column(db.Boolean) position = db.Column(db.Boolean) class HangPoints(db.Model): __tablename__ = "hang_points" id = db.Column(db.Integer, primary_key=True) able = db.Column(db.Boolean) level = db.Column(db.Boolean) position = db.Column(db.String) active = db.Column(db.Boolean) class Defense(db.Model): __tablename__ = "defense" id = db.Column(db.Integer, primary_key=True) performance = db.Column(db.Integer) penalties = db.Column(db.Integer) class Comms(db.Model): __tablename__ = "comms" id = db.Column(db.Integer, primary_key=True) connection_issues = db.Column(db.Integer) brownouts = db.Column(db.Integer) emergency_stop = db.Column(db.Integer) """
38.391827
94
0.700019
2,180
15,971
4.911009
0.072477
0.177097
0.217635
0.188959
0.79731
0.691575
0.597702
0.516533
0.442462
0.4221
0
0
0.168994
15,971
416
95
38.391827
0.806661
0.012836
0
0.385542
0
0
0.035312
0
0
0
0
0
0
1
0
false
0
0.018072
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
0
0
1
0
0
3
2d602eee31f100a10c2cbb071beeed48aa7e25eb
323
py
Python
sources/dashboard/application/dataclasses.py
variasov/classic_demo_low_difficulty
3a07743a8e78ac35aa3f98cfa9c138dbcdef0494
[ "MIT" ]
5
2021-10-08T08:33:02.000Z
2022-03-31T20:11:11.000Z
sources/dashboard/application/dataclasses.py
variasov/classic_demo_low_difficulty
3a07743a8e78ac35aa3f98cfa9c138dbcdef0494
[ "MIT" ]
null
null
null
sources/dashboard/application/dataclasses.py
variasov/classic_demo_low_difficulty
3a07743a8e78ac35aa3f98cfa9c138dbcdef0494
[ "MIT" ]
null
null
null
from dataclasses import dataclass from datetime import date @dataclass class DayOrdersInfo: report_date: date total_orders: int total_lines: int total_cost: float @dataclass class PeriodOrdersInfo: start_date: date end_date: date total_orders: int total_lines: int total_cost: float
16.15
33
0.736842
41
323
5.585366
0.439024
0.139738
0.113537
0.165939
0.427948
0.427948
0.427948
0.427948
0.427948
0.427948
0
0
0.22291
323
19
34
17
0.912351
0
0
0.533333
0
0
0
0
0
0
0
0
0
1
0
true
0
0.133333
0
0.866667
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
3
2d7ce3e4150423d1eded4ee73951d019d237148e
62
py
Python
code/learn-AI/pandas/A_Series/create/D_create_from_number.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
1
2019-03-27T23:22:44.000Z
2019-03-27T23:22:44.000Z
code/learn-AI/pandas/A_Series/create/D_create_from_number.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
code/learn-AI/pandas/A_Series/create/D_create_from_number.py
lsieun/learn-AI
0a164bc2e6317de3aa03c747c0e6f15d93e7f49a
[ "Apache-2.0" ]
null
null
null
import pandas as pd s = pd.Series(5,index=[0,1,3,3]) print(s)
15.5
32
0.66129
15
62
2.733333
0.8
0
0
0
0
0
0
0
0
0
0
0.092593
0.129032
62
4
33
15.5
0.666667
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
2d984dc3cb6885ecd9e043074f12f3165a197cba
196
py
Python
pkg/Python27/Lib/site-packages/clint/textui/__init__.py
jkolokotronis/ds_mod_tools
d9fd4def34f6adfd0e2b176d0a9bf2a3dfd43f93
[ "MIT" ]
null
null
null
pkg/Python27/Lib/site-packages/clint/textui/__init__.py
jkolokotronis/ds_mod_tools
d9fd4def34f6adfd0e2b176d0a9bf2a3dfd43f93
[ "MIT" ]
null
null
null
pkg/Python27/Lib/site-packages/clint/textui/__init__.py
jkolokotronis/ds_mod_tools
d9fd4def34f6adfd0e2b176d0a9bf2a3dfd43f93
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ clint.textui ~~~~~~~~~~~~ This module provides the text output helper system. """ from . import colored from . import progress from .core import *
12.25
52
0.576531
22
196
5.136364
0.818182
0.176991
0
0
0
0
0
0
0
0
0
0.006849
0.255102
196
15
53
13.066667
0.767123
0.515306
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
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
2dc44b4a3b103092ec880c849c7d56eb6ea5bb75
12,499
py
Python
nitrogen/pes/library/h2o2_mk2012_ad.py
bchangala/nitrogen
94f8828a51aa536fe93fe6a8bdd8da04eb6fdce8
[ "MIT" ]
7
2021-02-09T04:09:58.000Z
2022-03-13T20:47:27.000Z
nitrogen/pes/library/h2o2_mk2012_ad.py
bchangala/nitrogen
94f8828a51aa536fe93fe6a8bdd8da04eb6fdce8
[ "MIT" ]
null
null
null
nitrogen/pes/library/h2o2_mk2012_ad.py
bchangala/nitrogen
94f8828a51aa536fe93fe6a8bdd8da04eb6fdce8
[ "MIT" ]
1
2021-10-01T12:42:35.000Z
2021-10-01T12:42:35.000Z
""" h2o2_mk2012_ad.py Hydrogen peroxide, H2O2, ground state surface from Ref [1]_. The coefficients are available from the references supplementary information as the 'adiabatic PES', which corresponds to the "V+C+R+H+D" results. The surface is implemented in internal coordinates. X1 ... O1 -- H1 bond length (Angstroms) X2 ... O2 -- H2 bond length ( " " ) X3 ... O1 -- O2 bond length ( " " ) X4 ... O2-O1-H1 bond angle (degrees) X5 ... O1-O2-H2 bond angle ( " " ) X6 ... dihedral angle ( " " ) References ---------- .. [1] P. Malyszek and J. Koput. J. Comp. Chem. 34, 337-344 (2013). https://doi.org/10.1002/jcc.23137 """ import nitrogen as n2 import nitrogen.autodiff.forward as adf import numpy as np def Vfun(X, deriv = 0, out = None, var = None): """ expected order : r1, r2, R, a1, a2, tau """ x = n2.dfun.X2adf(X, deriv, var) r1 = x[0] r2 = x[1] R = x[2] a1 = x[3] a2 = x[4] tau = x[5] # Define reference values Re = 1.45538654 # Angstroms re = 0.96257063 # Angstroms ae = 101.08307909 # degrees q1 = (r1 - re) / r1 # Simons-Parr-Finlan coordinates q2 = (r2 - re) / r2 q3 = (R - Re) / R q4 = (a1 - ae) * np.pi/180.0 # radians q5 = (a2 - ae) * np.pi/180.0 # radians q6 = tau * np.pi/180.0 # radians # Calculate surface v = calcsurf([q1,q2,q3,q4,q5,q6]) * n2.constants.Eh return n2.dfun.adf2array([v], out) ###################################### # # Define module-scope PES DFun object # PES = n2.dfun.DFun(Vfun, nf = 1, nx = 6) # # ###################################### def calcsurf(q): max_pow = [5,5,5,6,6,6] # max_pow[5] is really the max freq. of dihedral qpow = [] for i in range(5): qi = [adf.const_like(1.0, q[i]), q[i]] for p in range(2,max_pow[i]+1): qi.append(qi[1] * qi[p-1]) # qi ** p qpow.append(qi) # Calculate cos(n*q6) cosq = [ adf.cos(n * q[5]) for n in range(max_pow[5] + 1)] qpow.append(cosq) v = 0.0 nterms = powers.shape[0] for i in range(nterms): c = coeffs[i] v += c * \ qpow[0][powers[i,0]] * \ qpow[1][powers[i,1]] * \ qpow[2][powers[i,2]] * \ qpow[3][powers[i,3]] * \ qpow[4][powers[i,4]] * \ qpow[5][powers[i,5]] return v powers = np.array([ [0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 3], [0, 0, 0, 0, 0, 4], [0, 0, 0, 0, 0, 5], [0, 0, 0, 0, 0, 6], [0, 0, 2, 0, 0, 0], [2, 0, 0, 0, 0, 0], [0, 2, 0, 0, 0, 0], [0, 0, 0, 2, 0, 0], [0, 0, 0, 0, 2, 0], [1, 0, 1, 0, 0, 0], [0, 1, 1, 0, 0, 0], [0, 0, 1, 1, 0, 0], [0, 0, 1, 0, 1, 0], [1, 1, 0, 0, 0, 0], [1, 0, 0, 1, 0, 0], [0, 1, 0, 0, 1, 0], [1, 0, 0, 0, 1, 0], [0, 1, 0, 1, 0, 0], [0, 0, 0, 1, 1, 0], [0, 0, 3, 0, 0, 0], [3, 0, 0, 0, 0, 0], [0, 3, 0, 0, 0, 0], [0, 0, 0, 3, 0, 0], [0, 0, 0, 0, 3, 0], [1, 0, 2, 0, 0, 0], [0, 1, 2, 0, 0, 0], [0, 0, 2, 1, 0, 0], [0, 0, 2, 0, 1, 0], [2, 0, 1, 0, 0, 0], [0, 2, 1, 0, 0, 0], [0, 0, 1, 2, 0, 0], [0, 0, 1, 0, 2, 0], [1, 2, 0, 0, 0, 0], [2, 1, 0, 0, 0, 0], [1, 0, 0, 2, 0, 0], [0, 1, 0, 0, 2, 0], [2, 0, 0, 1, 0, 0], [0, 2, 0, 0, 1, 0], [1, 0, 0, 0, 2, 0], [0, 1, 0, 2, 0, 0], [2, 0, 0, 0, 1, 0], [0, 2, 0, 1, 0, 0], [0, 0, 0, 1, 2, 0], [0, 0, 0, 2, 1, 0], [1, 1, 1, 0, 0, 0], [1, 0, 1, 1, 0, 0], [0, 1, 1, 0, 1, 0], [1, 0, 1, 0, 1, 0], [0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0], [1, 1, 0, 1, 0, 0], [1, 1, 0, 0, 1, 0], [1, 0, 0, 1, 1, 0], [0, 1, 0, 1, 1, 0], [0, 0, 4, 0, 0, 0], [4, 0, 0, 0, 0, 0], [0, 4, 0, 0, 0, 0], [0, 0, 0, 4, 0, 0], [0, 0, 0, 0, 4, 0], [2, 0, 2, 0, 0, 0], [0, 2, 2, 0, 0, 0], [0, 0, 2, 2, 0, 0], [0, 0, 2, 0, 2, 0], [2, 2, 0, 0, 0, 0], [2, 0, 0, 2, 0, 0], [0, 2, 0, 0, 2, 0], [0, 0, 0, 2, 2, 0], [1, 0, 3, 0, 0, 0], [0, 1, 3, 0, 0, 0], [0, 0, 3, 1, 0, 0], [0, 0, 3, 0, 1, 0], [3, 0, 0, 1, 0, 0], [0, 3, 0, 0, 1, 0], [3, 0, 1, 0, 0, 0], [0, 3, 1, 0, 0, 0], [0, 0, 1, 3, 0, 0], [0, 0, 1, 0, 3, 0], [1, 3, 0, 0, 0, 0], [3, 1, 0, 0, 0, 0], [1, 0, 0, 3, 0, 0], [0, 1, 0, 0, 3, 0], [1, 0, 0, 0, 3, 0], [0, 1, 0, 3, 0, 0], [0, 0, 0, 1, 3, 0], [0, 0, 0, 3, 1, 0], [1, 1, 2, 0, 0, 0], [1, 0, 2, 1, 0, 0], [0, 1, 2, 0, 1, 0], [1, 0, 2, 0, 1, 0], [0, 1, 2, 1, 0, 0], [0, 0, 2, 1, 1, 0], [2, 0, 0, 1, 1, 0], [0, 2, 0, 1, 1, 0], [1, 0, 1, 2, 0, 0], [0, 1, 1, 0, 2, 0], [1, 0, 0, 1, 2, 0], [0, 1, 0, 2, 1, 0], [1, 0, 0, 2, 1, 0], [0, 1, 0, 1, 2, 0], [0, 0, 5, 0, 0, 0], [5, 0, 0, 0, 0, 0], [0, 5, 0, 0, 0, 0], [0, 0, 0, 5, 0, 0], [0, 0, 0, 0, 5, 0], [0, 0, 0, 6, 0, 0], [0, 0, 0, 0, 6, 0], [0, 0, 0, 4, 1, 0], [0, 0, 0, 1, 4, 0], [0, 0, 0, 3, 2, 0], [0, 0, 0, 2, 3, 0], [0, 0, 1, 4, 0, 0], [0, 0, 1, 0, 4, 0], [0, 0, 2, 3, 0, 0], [0, 0, 2, 0, 3, 0], [1, 0, 0, 4, 0, 0], [0, 1, 0, 0, 4, 0], [2, 0, 0, 3, 0, 0], [0, 2, 0, 0, 3, 0], [0, 0, 1, 0, 0, 1], [1, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 1], [0, 0, 0, 1, 0, 1], [0, 0, 0, 0, 1, 1], [0, 0, 2, 0, 0, 1], [2, 0, 0, 0, 0, 1], [0, 2, 0, 0, 0, 1], [0, 0, 0, 2, 0, 1], [0, 0, 0, 0, 2, 1], [1, 0, 1, 0, 0, 1], [0, 1, 1, 0, 0, 1], [0, 0, 1, 1, 0, 1], [0, 0, 1, 0, 1, 1], [1, 1, 0, 0, 0, 1], [1, 0, 0, 1, 0, 1], [0, 1, 0, 0, 1, 1], [1, 0, 0, 0, 1, 1], [0, 1, 0, 1, 0, 1], [0, 0, 0, 1, 1, 1], [0, 0, 3, 0, 0, 1], [3, 0, 0, 0, 0, 1], [0, 3, 0, 0, 0, 1], [0, 0, 0, 3, 0, 1], [0, 0, 0, 0, 3, 1], [1, 0, 2, 0, 0, 1], [0, 1, 2, 0, 0, 1], [0, 0, 2, 1, 0, 1], [0, 0, 2, 0, 1, 1], [0, 0, 1, 2, 0, 1], [0, 0, 1, 0, 2, 1], [1, 2, 0, 0, 0, 1], [2, 1, 0, 0, 0, 1], [1, 0, 0, 2, 0, 1], [0, 1, 0, 0, 2, 1], [1, 0, 0, 0, 2, 1], [0, 1, 0, 2, 0, 1], [0, 0, 0, 1, 2, 1], [0, 0, 0, 2, 1, 1], [1, 1, 1, 0, 0, 1], [1, 0, 0, 1, 1, 1], [0, 1, 0, 1, 1, 1], [0, 0, 0, 4, 0, 1], [0, 0, 0, 0, 4, 1], [0, 0, 0, 5, 0, 1], [0, 0, 0, 0, 5, 1], [0, 0, 1, 3, 0, 1], [0, 0, 1, 0, 3, 1], [0, 0, 2, 2, 0, 1], [0, 0, 2, 0, 2, 1], [0, 0, 0, 1, 3, 1], [0, 0, 0, 3, 1, 1], [0, 0, 0, 2, 2, 1], [1, 0, 0, 3, 0, 1], [0, 1, 0, 0, 3, 1], [1, 0, 0, 0, 3, 1], [0, 1, 0, 3, 0, 1], [2, 0, 0, 2, 0, 1], [0, 2, 0, 0, 2, 1], [2, 0, 0, 0, 2, 1], [0, 2, 0, 2, 0, 1], [1, 0, 2, 1, 0, 1], [0, 1, 2, 0, 1, 1], [2, 0, 1, 1, 0, 1], [0, 2, 1, 0, 1, 1], [1, 0, 1, 2, 0, 1], [0, 1, 1, 0, 2, 1], [0, 0, 1, 0, 0, 2], [1, 0, 0, 0, 0, 2], [0, 1, 0, 0, 0, 2], [0, 0, 0, 1, 0, 2], [0, 0, 0, 0, 1, 2], [0, 0, 2, 0, 0, 2], [2, 0, 0, 0, 0, 2], [0, 2, 0, 0, 0, 2], [0, 0, 0, 2, 0, 2], [0, 0, 0, 0, 2, 2], [1, 0, 1, 0, 0, 2], [0, 1, 1, 0, 0, 2], [0, 0, 1, 1, 0, 2], [0, 0, 1, 0, 1, 2], [1, 1, 0, 0, 0, 2], [1, 0, 0, 1, 0, 2], [0, 1, 0, 0, 1, 2], [1, 0, 0, 0, 1, 2], [0, 1, 0, 1, 0, 2], [0, 0, 0, 1, 1, 2], [0, 0, 3, 0, 0, 2], [3, 0, 0, 0, 0, 2], [0, 3, 0, 0, 0, 2], [0, 0, 0, 3, 0, 2], [0, 0, 0, 0, 3, 2], [0, 0, 0, 2, 1, 2], [0, 0, 0, 1, 2, 2], [0, 0, 1, 2, 0, 2], [0, 0, 1, 0, 2, 2], [1, 0, 2, 0, 0, 2], [0, 1, 2, 0, 0, 2], [2, 0, 1, 0, 0, 2], [0, 2, 1, 0, 0, 2], [0, 0, 0, 4, 0, 2], [0, 0, 0, 0, 4, 2], [0, 0, 0, 1, 3, 2], [0, 0, 0, 3, 1, 2], [0, 0, 0, 2, 2, 2], [2, 0, 0, 1, 0, 2], [0, 2, 0, 0, 1, 2], [1, 0, 0, 2, 0, 2], [0, 1, 0, 0, 2, 2], [1, 0, 0, 0, 2, 2], [0, 1, 0, 2, 0, 2], [1, 0, 1, 1, 0, 2], [0, 1, 1, 0, 1, 2], [1, 0, 1, 0, 1, 2], [0, 1, 1, 1, 0, 2], [0, 0, 1, 3, 0, 2], [0, 0, 1, 0, 3, 2], [0, 0, 1, 0, 0, 3], [1, 0, 0, 0, 0, 3], [0, 1, 0, 0, 0, 3], [0, 0, 0, 1, 0, 3], [0, 0, 0, 0, 1, 3], [0, 0, 2, 0, 0, 3], [2, 0, 0, 0, 0, 3], [0, 2, 0, 0, 0, 3], [0, 0, 0, 2, 0, 3], [0, 0, 0, 0, 2, 3], [0, 0, 0, 1, 1, 3], [0, 0, 3, 0, 0, 3], [0, 0, 0, 3, 0, 3], [0, 0, 0, 0, 3, 3], [0, 0, 0, 1, 2, 3], [0, 0, 0, 2, 1, 3], [0, 0, 1, 1, 0, 3], [0, 0, 1, 0, 1, 3], [1, 0, 0, 1, 0, 3], [0, 1, 0, 0, 1, 3], [1, 0, 0, 0, 1, 3], [0, 1, 0, 1, 0, 3], [0, 0, 2, 1, 0, 3], [0, 0, 2, 0, 1, 3], [0, 0, 1, 0, 0, 4], [1, 0, 0, 0, 0, 4], [0, 1, 0, 0, 0, 4], [0, 0, 0, 1, 0, 4], [0, 0, 0, 0, 1, 4], [0, 0, 2, 0, 0, 4], [0, 0, 0, 2, 0, 4], [0, 0, 0, 0, 2, 4], [0, 0, 0, 1, 1, 4], [0, 0, 1, 1, 0, 4], [0, 0, 1, 0, 1, 4], [0, 0, 1, 0, 0, 5], [1, 0, 0, 0, 0, 5], [0, 1, 0, 0, 0, 5], [0, 0, 0, 1, 0, 5], [0, 0, 0, 0, 1, 5] ]) coeffs = np.array([ 0.00396159 , 0.00481490 , 0.00318934 , 0.00027018 , 0.00005307 , 0.00001047 , 0.00000198 , 1.07103383 , 0.85671785 , 0.85671785 , 0.11105339 , 0.11105339 , -0.03876908 , -0.03876908 , 0.18430247 , 0.18430247 , 0.00036727 , -0.00663756 , -0.00663756 , -0.00196944 , -0.00196944 , 0.01747081 , -1.18343510 , -0.23735539 , -0.23735539 , -0.02611900 , -0.02611900 , -0.15438002 , -0.15438002 , -0.35516368 , -0.35516368 , 0.07899067 , 0.07899067 , -0.26776532 , -0.26776532 , -0.00406083 , -0.00406083 , -0.01925971 , -0.01925971 , -0.01107079 , -0.01107079 , -0.00816282 , -0.00816282 , 0.00337183 , 0.00337183 , -0.01352772 , -0.01352772 , 0.01289325 , -0.07449808 , -0.07449808 , -0.03379136 , -0.03379136 , -0.01672271 , -0.00495469 , -0.00495469 , -0.00453600 , -0.00453600 , -0.91033894 , -0.38779590 , -0.38779590 , -0.00503640 , -0.00503640 , -0.46416302 , -0.46416302 , 0.07527264 , 0.07527264 , -0.00799835 , -0.04029912 , -0.04029912 , 0.00364088 , 0.47561739 , 0.47561739 , -0.41647359 , -0.41647359 , -0.06425296 , -0.06425296 , 0.26125142 , 0.26125142 , 0.10336257 , 0.10336257 , -0.01680055 , -0.01680055 , 0.04984239 , 0.04984239 , 0.00354416 , 0.00354416 , 0.00452574 , 0.00452574 , -0.05423804 , 0.06564708 , 0.06564708 , 0.03801095 , 0.03801095 , -0.09161667 , -0.01589965 , -0.01589965 , 0.01341203 , 0.01341203 , -0.01342635 , -0.01342635 , -0.00671149 , -0.00671149 , -0.73562441 , -0.30455894 , -0.30455894 , 0.00582616 , 0.00582616 , -0.00547701 , -0.00547701 , 0.00280896 , 0.00280896 , 0.00674263 , 0.00674263 , 0.06845098 , 0.06845098 , 0.04193747 , 0.04193747 , -0.05190213 , -0.05190213 , 0.04168912 , 0.04168912 , -0.01682379 , -0.00098759 , -0.00098759 , -0.01176361 , -0.01176361 , 0.01742527 , -0.00533832 , -0.00533832 , 0.00542779 , 0.00542779 , 0.00263732 , 0.00263732 , 0.01859551 , 0.01859551 , 0.00511361 , -0.00973834 , -0.00973834 , -0.00511467 , -0.00511467 , -0.01356281 , 0.00352911 , -0.00964293 , -0.00964293 , -0.00113452 , -0.00113452 , 0.01028106 , 0.01028106 , -0.03748145 , -0.03748145 , -0.00708628 , -0.00708628 , 0.00742831 , 0.00742831 , 0.00419281 , 0.00419281 , -0.00555253 , -0.00555253 , -0.02044897 , -0.02044897 , -0.02429936 , 0.00148383 , 0.00148383 , 0.00050075 , 0.00050075 , 0.00149142 , 0.00149142 , 0.02232416 , 0.02232416 , 0.07164353 , 0.07164353 , 0.01644870 , 0.01644870 , 0.01815537 , 0.01605919 , 0.01605919 , 0.00735028 , 0.00735028 , 0.02670612 , 0.02670612 , 0.01548269 , 0.01548269 , -0.13042235 , -0.13042235 , 0.07364926 , 0.07364926 , -0.08874645 , -0.08874645 , -0.01177248 , 0.00172223 , 0.00172223 , -0.00154074 , -0.00154074 , 0.01965194 , 0.00409752 , 0.00409752 , 0.00301573 , 0.00301573 , -0.00734859 , -0.00734859 , 0.00350247 , 0.00350247 , -0.00037121 , 0.00249543 , 0.00249543 , -0.00168725 , -0.00168725 , 0.00914785 , -0.02015559 , 0.00925238 , 0.00925238 , -0.00593037 , -0.00593037 , -0.01230679 , -0.01230679 , 0.00829575 , 0.00829575 , 0.03735453 , 0.03735453 , -0.04328977 , -0.04328977 , 0.00458548 , 0.00458548 , 0.00364501 , 0.00364501 , 0.00986809 , 0.01437361 , 0.01437361 , 0.00072674 , 0.00072674 , -0.00158409 , -0.00158409 , -0.03961996 , -0.03961996 , -0.01732246 , -0.01732246 , 0.02668498 , 0.02668498 , -0.00188286 , 0.00052265 , 0.00052265 , -0.00089442 , -0.00089442 , 0.00481644 , 0.00031496 , 0.00031496 , 0.00103249 , 0.00103249 , 0.00224998 , -0.00366693 , -0.00033429 , -0.00033429 , -0.00319598 , -0.00319598 , 0.00447145 , 0.00447145 , -0.00147544 , -0.00147544 , -0.00085521 , -0.00085521 , -0.01099915 , -0.01099915 , -0.00042972 , 0.00013538 , 0.00013538 , -0.00019221 , -0.00019221 , 0.00121114 , 0.00026755 , 0.00026755 , 0.00054596 , 0.00057513 , 0.00057513 , -0.00009041 , 0.00002274 , 0.00002274 , -0.00004075 , -0.00004075 ])
18.73913
76
0.435075
2,598
12,499
2.090069
0.120477
0.208471
0.163536
0.098711
0.316022
0.301657
0.273112
0.243831
0.210681
0.162063
0
0.491389
0.293864
12,499
667
77
18.73913
0.123839
0.073846
0
0.393388
0
0
0
0
0
0
0
0
0
1
0.003306
false
0
0.004959
0
0.01157
0
0
0
0
null
1
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
3
2de4ad0ebff5992a259f8a6bf7ef93b3acf5182a
102
py
Python
setup.py
1ucky40nc3/medicus
4d72b42abddfde1bded9a2003c11948d6acb390e
[ "MIT" ]
1
2022-03-30T16:58:29.000Z
2022-03-30T16:58:29.000Z
setup.py
1ucky40nc3/medicus
4d72b42abddfde1bded9a2003c11948d6acb390e
[ "MIT" ]
1
2022-03-30T20:43:11.000Z
2022-03-30T20:43:11.000Z
setup.py
1ucky40nc3/medicus
4d72b42abddfde1bded9a2003c11948d6acb390e
[ "MIT" ]
null
null
null
from setuptools import setup setup( name="medicus", version="0.1", packages=["medicus"] )
14.571429
28
0.637255
12
102
5.416667
0.833333
0
0
0
0
0
0
0
0
0
0
0.024691
0.205882
102
7
29
14.571429
0.777778
0
0
0
0
0
0.165049
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
2dea313a3efcef6e0fdc5c670edb6b0142da5322
757
py
Python
ddtrace/ext/__init__.py
mykytarudenko/new-project
e06a912382239739dd3f93b54d545b9506102372
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
ddtrace/ext/__init__.py
mykytarudenko/new-project
e06a912382239739dd3f93b54d545b9506102372
[ "Apache-2.0", "BSD-3-Clause" ]
1
2021-01-27T04:53:24.000Z
2021-01-27T04:53:24.000Z
ddtrace/ext/__init__.py
mykytarudenko/new-project
e06a912382239739dd3f93b54d545b9506102372
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
from enum import Enum from ..utils import removed_classproperty from ..vendor.debtcollector import removals class SpanTypes(Enum): CACHE = "cache" CASSANDRA = "cassandra" ELASTICSEARCH = "elasticsearch" GRPC = "grpc" HTTP = "http" MONGODB = "mongodb" REDIS = "redis" SQL = "sql" TEMPLATE = "template" TEST = "test" WEB = "web" WORKER = "worker" @removals.removed_class("AppTypes") class AppTypes(object): @removed_classproperty def web(cls): return SpanTypes.WEB @removed_classproperty def db(cls): return "db" @removed_classproperty def cache(cls): return SpanTypes.CACHE @removed_classproperty def worker(cls): return SpanTypes.WORKER
19.410256
43
0.647292
79
757
6.126582
0.367089
0.206612
0.190083
0
0
0
0
0
0
0
0
0
0.254954
757
38
44
19.921053
0.858156
0
0
0.133333
0
0
0.107001
0
0
0
0
0
0
1
0.133333
false
0
0.1
0.133333
0.833333
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
3
2df065629e404af27259676f8e707e341dda1bff
188
py
Python
ex046.py
BrianBeyer/pythonExercicios
062e2c6a9e6e6f513185f1fb1d4269d8ca1d9e89
[ "MIT" ]
null
null
null
ex046.py
BrianBeyer/pythonExercicios
062e2c6a9e6e6f513185f1fb1d4269d8ca1d9e89
[ "MIT" ]
null
null
null
ex046.py
BrianBeyer/pythonExercicios
062e2c6a9e6e6f513185f1fb1d4269d8ca1d9e89
[ "MIT" ]
null
null
null
from time import sleep print('Contagem regressiva','='*20) for a in range(10, 0-1, -1): print(a, end='-') sleep(1) print('Fogos estourando \nBOOM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
26.857143
64
0.531915
25
188
4
0.76
0.12
0
0
0
0
0
0
0
0
0
0.049383
0.138298
188
6
65
31.333333
0.567901
0
0
0
0
0
0.404255
0.202128
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
9303b6729128acbb771343c1e9270209cb331506
617
py
Python
ecommerce/api/domain/domain_base.py
MayaraMachado/sns_and_sqs_project
4fcc5bbb5f6841543ea8dda353dd85a43024f683
[ "MIT" ]
5
2020-06-22T21:29:54.000Z
2021-11-01T20:12:04.000Z
ecommerce/api/domain/domain_base.py
MayaraMachado/sns_and_sqs_project
4fcc5bbb5f6841543ea8dda353dd85a43024f683
[ "MIT" ]
5
2021-03-30T13:38:15.000Z
2021-09-22T19:10:27.000Z
ecommerce/api/domain/domain_base.py
MayaraMachado/sns_and_sqs_project
4fcc5bbb5f6841543ea8dda353dd85a43024f683
[ "MIT" ]
null
null
null
class DomainServiceBase: def __init__(self, repository): self.repository = repository def update(self, obj, updated_data={}): self.repository.update(obj, updated_data) def delete(self, obj): self.repository.delete(obj) def create(self, obj): obj = self.repository.create(obj) return obj def get_all(self, query_params={}, orderby=[], select_related=[]): return self.repository.get_all(query_params, orderby, select_related) def get(self, query_params={}, select_related=[]): return self.repository.get(query_params, select_related)
30.85
77
0.67423
74
617
5.405405
0.27027
0.245
0.07
0.12
0.3025
0.18
0
0
0
0
0
0
0.205835
617
19
78
32.473684
0.816327
0
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0.142857
0.714286
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
9342af82f1cb2c17d9d428608f08d06906c8cdc8
941
py
Python
labs/7/py/dashpot.py
Sky-Nik/numerical-analysis
97e1ab4ee8737e2eaba91084f8775089f13ec4dd
[ "MIT" ]
1
2019-05-19T08:08:41.000Z
2019-05-19T08:08:41.000Z
labs/7/py/dashpot.py
csc-knu/numerical-analysis
97e1ab4ee8737e2eaba91084f8775089f13ec4dd
[ "MIT" ]
4
2018-09-02T05:48:27.000Z
2018-09-02T06:02:22.000Z
labs/7/py/dashpot.py
Sky-Nik/numerical-analysis
97e1ab4ee8737e2eaba91084f8775089f13ec4dd
[ "MIT" ]
2
2021-05-21T09:12:51.000Z
2021-06-16T01:06:12.000Z
#!/usr/bin/env python from math import sqrt class Dashpot: def __init__(self, k: float, r_0: float, c: float): assert r_0 > 0, "r_0 must be positive" assert k > 0, "k must be positive" self._k, self._r_0, self._c = k, r_0, c @property def k(self): return self._k @property def r_0(self): return self._r_0 @property def c(self): return self._c def __repr__(self): return f'Dashpot(k={self.k}, r_0={self.r_0}, c={self.c})' def r(self, dot_x: float, dot_x_0: float) -> float: return self.r_0 * (1 + self.c * abs(dot_x - dot_x_0)) def xi(self, r: float, m: float) -> float: return r / (2 * sqrt(self.k * m)) def xi(self, dot_x: float, dot_x_0: float, m: float) -> float: return self.r(dot_x, dot_x_0) / (2 * sqrt(self.k * m)) if __name__ == '__main__': pass # TODO(nsk): write tests and unittest main
24.763158
66
0.57067
163
941
3.02454
0.263804
0.040568
0.048682
0.048682
0.296146
0.093306
0.093306
0.093306
0
0
0
0.028274
0.285866
941
37
67
25.432432
0.705357
0.064825
0
0.12
0
0
0.105923
0
0
0
0
0.027027
0.08
1
0.32
false
0.04
0.04
0.28
0.68
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
0
0
0
3
934dfa4315cb2ff1c9dee478276d4c9eaf722449
643
py
Python
CPAC/nuisance/__init__.py
gkiar/C-PAC
0926b451dd8622b25eb68c7bcc770f0156238b23
[ "BSD-3-Clause" ]
125
2015-03-04T09:14:46.000Z
2022-03-29T07:46:12.000Z
CPAC/nuisance/__init__.py
gkiar/C-PAC
0926b451dd8622b25eb68c7bcc770f0156238b23
[ "BSD-3-Clause" ]
1,018
2015-01-04T16:01:29.000Z
2022-03-31T19:23:09.000Z
CPAC/nuisance/__init__.py
gkiar/C-PAC
0926b451dd8622b25eb68c7bcc770f0156238b23
[ "BSD-3-Clause" ]
117
2015-01-10T08:05:52.000Z
2022-01-18T05:16:51.000Z
from .utils import ( find_offending_time_points, temporal_variance_mask, generate_summarize_tissue_mask, NuisanceRegressor ) from .nuisance import ( create_regressor_workflow, create_nuisance_regression_workflow, filtering_bold_and_regressors ) from .bandpass import ( bandpass_voxels ) from .utils.compcor import ( cosine_filter ) __all__ = [ 'create_regressor_workflow', 'create_nuisance_regression_workflow', 'filtering_bold_and_regressors', 'find_offending_time_points', 'temporal_variance_mask', 'generate_summarize_tissue_mask', 'bandpass_voxels', 'cosine_filter' ]
20.741935
42
0.757387
67
643
6.671642
0.432836
0.040268
0.076063
0.102908
0.675615
0.675615
0.675615
0.675615
0.675615
0.675615
0
0
0.174184
643
31
43
20.741935
0.841808
0
0
0
1
0
0.302795
0.259317
0
0
0
0
0
1
0
false
0.111111
0.148148
0
0.148148
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
9358cdc73a349a04ce1de7626c072a050c3ec91a
58
py
Python
test_write.py
esspee39/gtest-demo
844a79d3724e07b72ff1c2dbd049edafd3b392a7
[ "BSD-3-Clause" ]
null
null
null
test_write.py
esspee39/gtest-demo
844a79d3724e07b72ff1c2dbd049edafd3b392a7
[ "BSD-3-Clause" ]
null
null
null
test_write.py
esspee39/gtest-demo
844a79d3724e07b72ff1c2dbd049edafd3b392a7
[ "BSD-3-Clause" ]
1
2021-11-20T18:48:23.000Z
2021-11-20T18:48:23.000Z
with open('test.html',"w+") as f: f.write("test")
19.333333
33
0.517241
10
58
3
0.8
0
0
0
0
0
0
0
0
0
0
0
0.224138
58
2
34
29
0.666667
0
0
0
0
0
0.258621
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
935f559eeb2f80e02f374b96d7b61a3325ced81a
275
py
Python
pyleecan/Methods/Machine/LamSquirrelCage/__init__.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
95
2019-01-23T04:19:45.000Z
2022-03-17T18:22:10.000Z
pyleecan/Methods/Machine/LamSquirrelCage/__init__.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
366
2019-02-20T07:15:08.000Z
2022-03-31T13:37:23.000Z
pyleecan/Methods/Machine/LamSquirrelCage/__init__.py
IrakozeFD/pyleecan
5a93bd98755d880176c1ce8ac90f36ca1b907055
[ "Apache-2.0" ]
74
2019-01-24T01:47:31.000Z
2022-02-25T05:44:42.000Z
from ....Methods.Machine.LamSlotWind import Lam_WindCheckError class SquirrelCageCheckError(Lam_WindCheckError): """ """ pass class SCC_NotARotor(SquirrelCageCheckError): """ """ pass class SCC_WrongCond(SquirrelCageCheckError): """ """ pass
13.75
62
0.690909
22
275
8.454545
0.590909
0.182796
0.129032
0
0
0
0
0
0
0
0
0
0.189091
275
19
63
14.473684
0.834081
0
0
0.428571
0
0
0
0
0
0
0
0
0
1
0
true
0.428571
0.142857
0
0.571429
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
1
0
0
0
0
0
3
93623fa124e1fe3afa3694fbd7e48b33c4e20604
1,615
py
Python
src/tests/test_calculate_chek.py
Almateyko/learn-duet2s
5004583f629b81bf1eabb5de69f01da202308036
[ "MIT" ]
null
null
null
src/tests/test_calculate_chek.py
Almateyko/learn-duet2s
5004583f629b81bf1eabb5de69f01da202308036
[ "MIT" ]
null
null
null
src/tests/test_calculate_chek.py
Almateyko/learn-duet2s
5004583f629b81bf1eabb5de69f01da202308036
[ "MIT" ]
null
null
null
import unittest from src.main_program import * class TestMainProgram(unittest.TestCase): def test_calculate_chek_1(self): a = dict(gas=0, water=0, electricity=0) self.assertEqual('Verification was successful', calculate_chek('gas', 3, a)) self.assertEqual('Verification was successful', calculate_chek('water', 12, a)) self.assertEqual('Verification was successful', calculate_chek('electricity', 124, a)) self.assertEqual('Verification was successful', calculate_chek('gas', 10, a)) self.assertEqual('Verification was successful', calculate_chek('water', 88, a)) def test_calculate_chek_2(self): a = dict(gas=0, water=0, electricity=0) self.assertEqual('ValueError', calculate_chek('gas', -2, a)) self.assertEqual('ValueError', calculate_chek('water', -20, a)) self.assertEqual('ValueError', calculate_chek('gas', 1342, a)) self.assertEqual('ValueError', calculate_chek('gas', 1042354, a)) self.assertEqual('ValueError', calculate_chek('water', 'a', a)) self.assertEqual('ValueError', calculate_chek('water', 'qwerty', a)) def test_calculate_chek_3(self): a = dict(gas=0, water=0, electricity=0) self.assertEqual('TypeError', calculate_chek('gas', [1, 2, 3], a)) self.assertEqual('TypeError', calculate_chek('water', {'one': 12, 15: 'adds'}, a)) def test_calculate_chek_4(self): a = dict(gas=0, water=0, electricity=0) self.assertEqual('Verification was unsuccessful', calculate_chek('gas', '', a)) if __name__ == '__main__': unittest.main()
44.861111
94
0.669969
200
1,615
5.235
0.22
0.223496
0.152818
0.17192
0.795606
0.679083
0.65425
0.447947
0.317096
0.204394
0
0.035365
0.17709
1,615
35
95
46.142857
0.752445
0
0
0.148148
0
0
0.201858
0
0
0
0
0
0.518519
1
0.148148
false
0
0.074074
0
0.259259
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
3
fa7a17b16277b55311602db31f0a4d9c0e04f12a
11,375
py
Python
ninja/router.py
aprilahijriyan/django-ninja
df2716c7f5fc2ec008163048cc9a41103aeebabe
[ "MIT" ]
null
null
null
ninja/router.py
aprilahijriyan/django-ninja
df2716c7f5fc2ec008163048cc9a41103aeebabe
[ "MIT" ]
1
2021-04-25T07:00:55.000Z
2021-04-25T07:00:55.000Z
ninja/router.py
aprilahijriyan/django-ninja
df2716c7f5fc2ec008163048cc9a41103aeebabe
[ "MIT" ]
null
null
null
from typing import ( TYPE_CHECKING, Any, Callable, Dict, Iterator, List, Optional, Tuple, cast, ) from django.urls import URLPattern, path as django_path from ninja.constants import NOT_SET from ninja.operation import PathView from ninja.types import TCallable from ninja.utils import normalize_path if TYPE_CHECKING: from ninja import NinjaAPI # pragma: no cover __all__ = ["Router"] class Router: def __init__( self, *, auth: Any = NOT_SET, tags: Optional[List[str]] = None ) -> None: self.api: Optional["NinjaAPI"] = None self.auth = auth self.tags = tags self.path_operations: Dict[str, PathView] = {} self._routers: List[Tuple[str, Router]] = [] def get( self, path: str, *, auth: Any = NOT_SET, response: Any = NOT_SET, operation_id: Optional[str] = None, summary: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, deprecated: Optional[bool] = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, url_name: Optional[str] = None, include_in_schema: bool = True, ) -> Callable[[TCallable], TCallable]: return self.api_operation( ["GET"], path, auth=auth, response=response, operation_id=operation_id, summary=summary, description=description, tags=tags, deprecated=deprecated, by_alias=by_alias, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, url_name=url_name, include_in_schema=include_in_schema, ) def post( self, path: str, *, auth: Any = NOT_SET, response: Any = NOT_SET, operation_id: Optional[str] = None, summary: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, deprecated: Optional[bool] = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, url_name: Optional[str] = None, include_in_schema: bool = True, ) -> Callable[[TCallable], TCallable]: return self.api_operation( ["POST"], path, auth=auth, response=response, operation_id=operation_id, summary=summary, description=description, tags=tags, deprecated=deprecated, by_alias=by_alias, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, url_name=url_name, include_in_schema=include_in_schema, ) def delete( self, path: str, *, auth: Any = NOT_SET, response: Any = NOT_SET, operation_id: Optional[str] = None, summary: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, deprecated: Optional[bool] = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, url_name: Optional[str] = None, include_in_schema: bool = True, ) -> Callable[[TCallable], TCallable]: return self.api_operation( ["DELETE"], path, auth=auth, response=response, operation_id=operation_id, summary=summary, description=description, tags=tags, deprecated=deprecated, by_alias=by_alias, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, url_name=url_name, include_in_schema=include_in_schema, ) def patch( self, path: str, *, auth: Any = NOT_SET, response: Any = NOT_SET, operation_id: Optional[str] = None, summary: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, deprecated: Optional[bool] = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, url_name: Optional[str] = None, include_in_schema: bool = True, ) -> Callable[[TCallable], TCallable]: return self.api_operation( ["PATCH"], path, auth=auth, response=response, operation_id=operation_id, summary=summary, description=description, tags=tags, deprecated=deprecated, by_alias=by_alias, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, url_name=url_name, include_in_schema=include_in_schema, ) def put( self, path: str, *, auth: Any = NOT_SET, response: Any = NOT_SET, operation_id: Optional[str] = None, summary: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, deprecated: Optional[bool] = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, url_name: Optional[str] = None, include_in_schema: bool = True, ) -> Callable[[TCallable], TCallable]: return self.api_operation( ["PUT"], path, auth=auth, response=response, operation_id=operation_id, summary=summary, description=description, tags=tags, deprecated=deprecated, by_alias=by_alias, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, url_name=url_name, include_in_schema=include_in_schema, ) def api_operation( self, methods: List[str], path: str, *, auth: Any = NOT_SET, response: Any = NOT_SET, operation_id: Optional[str] = None, summary: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, deprecated: Optional[bool] = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, url_name: Optional[str] = None, include_in_schema: bool = True, ) -> Callable[[TCallable], TCallable]: def decorator(view_func: TCallable) -> TCallable: self.add_api_operation( path, methods, view_func, auth=auth, response=response, operation_id=operation_id, summary=summary, description=description, tags=tags, deprecated=deprecated, by_alias=by_alias, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, url_name=url_name, include_in_schema=include_in_schema, ) return view_func return decorator def add_api_operation( self, path: str, methods: List[str], view_func: Callable, *, auth: Any = NOT_SET, response: Any = NOT_SET, operation_id: Optional[str] = None, summary: Optional[str] = None, description: Optional[str] = None, tags: Optional[List[str]] = None, deprecated: Optional[bool] = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, url_name: Optional[str] = None, include_in_schema: bool = True, ) -> None: if path not in self.path_operations: path_view = PathView() self.path_operations[path] = path_view else: path_view = self.path_operations[path] if not url_name: url_name = view_func.__name__ path_view.add_operation( path=path, methods=methods, view_func=view_func, auth=auth, response=response, operation_id=operation_id, summary=summary, description=description, tags=tags, deprecated=deprecated, by_alias=by_alias, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, url_name=url_name, include_in_schema=include_in_schema, ) if self.api: path_view.set_api_instance(self.api, self) return None def set_api_instance( self, api: "NinjaAPI", parent_router: Optional["Router"] = None ) -> None: # TODO: check - parent_router seems not used self.api = api for path_view in self.path_operations.values(): path_view.set_api_instance(self.api, self) for _, router in self._routers: router.set_api_instance(api, self) def urls_paths(self, prefix: str) -> Iterator[URLPattern]: for path, path_view in self.path_operations.items(): path = path.replace("{", "<").replace("}", ">") route = "/".join([i for i in (prefix, path) if i]) # to skip lot of checks we simply treat double slash as a mistake: route = normalize_path(route) route = route.lstrip("/") yield django_path( route, path_view.get_view(), name=cast(str, path_view.url_name) ) def add_router( self, prefix: str, router: "Router", *, auth: Any = NOT_SET, tags: Optional[List[str]] = None, ) -> None: if self.api: # we are already attached to an api self.api.add_router( prefix=prefix, router=router, auth=auth, tags=tags, parent_router=self ) else: # we are not attached to an api if auth != NOT_SET: router.auth = auth if tags is not None: router.tags = tags self._routers.append((prefix, router)) def build_routers(self, prefix: str) -> List[Tuple[str, "Router"]]: assert self.api is None internal_routes = [] for inter_prefix, inter_router in self._routers: _route = normalize_path("/".join((prefix, inter_prefix))).lstrip("/") internal_routes.extend(inter_router.build_routers(_route)) return [(prefix, self), *internal_routes]
31.422652
86
0.555165
1,185
11,375
5.098734
0.098734
0.042867
0.069513
0.019364
0.705561
0.702085
0.692817
0.692817
0.681893
0.681893
0
0
0.353055
11,375
361
87
31.509695
0.821035
0.016527
0
0.708709
0
0
0.006171
0
0
0
0
0.00277
0.003003
1
0.039039
false
0
0.021021
0.015015
0.09009
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
fa7ef445622742250bd30b58f2eeb1b1ba97d14f
183
py
Python
website/forms.py
ksamuel/smit
a7cf54f2953678804f69182951bbe98214d5c9f6
[ "MIT" ]
null
null
null
website/forms.py
ksamuel/smit
a7cf54f2953678804f69182951bbe98214d5c9f6
[ "MIT" ]
null
null
null
website/forms.py
ksamuel/smit
a7cf54f2953678804f69182951bbe98214d5c9f6
[ "MIT" ]
null
null
null
from django.forms import ModelForm from .models import Settings class SettingsForm(ModelForm): class Meta: model = Settings exclude = ('id', 'active', 'name')
16.636364
42
0.661202
20
183
6.05
0.75
0
0
0
0
0
0
0
0
0
0
0
0.240437
183
10
43
18.3
0.870504
0
0
0
0
0
0.065574
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
3
fa889b74b7245628083510ed48ce28fb454a0527
292
py
Python
students/k3340/laboratory_works/Nurdinov_Rostislav/laboratory_work_1/conference_engine/conference/admin.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
10
2020-03-20T09:06:12.000Z
2021-07-27T13:06:02.000Z
students/k3340/laboratory_works/Nurdinov_Rostislav/laboratory_work_1/conference_engine/conference/admin.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
134
2020-03-23T09:47:48.000Z
2022-03-12T01:05:19.000Z
students/k3340/laboratory_works/Nurdinov_Rostislav/laboratory_work_1/conference_engine/conference/admin.py
TonikX/ITMO_ICT_-WebProgramming_2020
ba566c1b3ab04585665c69860b713741906935a0
[ "MIT" ]
71
2020-03-20T12:45:56.000Z
2021-10-31T19:22:25.000Z
from django.contrib import admin from .models import * admin.site.register(Location) admin.site.register(Conference) admin.site.register(Section) admin.site.register(Speaker) admin.site.register(Lecture) admin.site.register(Speech) admin.site.register(Comment) # Register your models here.
22.461538
32
0.811644
40
292
5.925
0.425
0.265823
0.50211
0
0
0
0
0
0
0
0
0
0.075342
292
12
33
24.333333
0.877778
0.089041
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.222222
0
0.222222
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
fab692eddd82765e94d5136049870945eaab87e9
452
py
Python
dpipe/predict/tests/test_functional.py
samokhinv/deep_pipe
9461b02f5f32c3e9f24490619ebccf417979cffc
[ "MIT" ]
38
2017-09-08T04:51:17.000Z
2022-03-29T17:34:22.000Z
dpipe/predict/tests/test_functional.py
samokhinv/deep_pipe
9461b02f5f32c3e9f24490619ebccf417979cffc
[ "MIT" ]
41
2017-09-29T22:06:21.000Z
2021-12-03T09:31:57.000Z
dpipe/predict/tests/test_functional.py
samokhinv/deep_pipe
9461b02f5f32c3e9f24490619ebccf417979cffc
[ "MIT" ]
12
2017-09-08T04:40:39.000Z
2021-01-19T19:19:37.000Z
from dpipe.predict.functional import * def test_chain_decorators(): def append(num): def decorator(func): def wrapper(): return func() + [num] return wrapper return decorator @append(1) @append(2) @append(3) def f(): return [] chained = chain_decorators( append(1), append(2), append(3), predict=lambda: [] ) assert f() == chained()
17.384615
40
0.524336
47
452
4.978723
0.468085
0.128205
0.111111
0.119658
0.179487
0.179487
0
0
0
0
0
0.020478
0.35177
452
25
41
18.08
0.778157
0
0
0
0
0
0
0
0
0
0
0
0.055556
1
0.277778
false
0
0.055556
0.111111
0.555556
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
0
0
1
1
0
0
3
fabc83440c421319a5a249333586d96d3ab74d4d
180
py
Python
run.py
yeyintminthuhtut/scoring_engine
679021c00fcab5032078665d17d4b102346347f1
[ "MIT" ]
1
2021-01-11T07:10:42.000Z
2021-01-11T07:10:42.000Z
run.py
yeyintminthuhtut/scoring_engine
679021c00fcab5032078665d17d4b102346347f1
[ "MIT" ]
null
null
null
run.py
yeyintminthuhtut/scoring_engine
679021c00fcab5032078665d17d4b102346347f1
[ "MIT" ]
null
null
null
from scoring_engine.web import app as application if __name__ == '__main__': if application.debug: application.run() else: application.run(host='0.0.0.0')
22.5
49
0.661111
24
180
4.583333
0.666667
0.054545
0.054545
0
0
0
0
0
0
0
0
0.028571
0.222222
180
7
50
25.714286
0.757143
0
0
0
0
0
0.083333
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
fad080517ecf09ec4a8c3e425b1088d073fd7d94
319
py
Python
flask_app/tests/test_myapp.py
odysseyhack/pines-and-electronics
82465582fd24bbb249215bdea23ff853fab0b1b4
[ "Apache-2.0" ]
null
null
null
flask_app/tests/test_myapp.py
odysseyhack/pines-and-electronics
82465582fd24bbb249215bdea23ff853fab0b1b4
[ "Apache-2.0" ]
null
null
null
flask_app/tests/test_myapp.py
odysseyhack/pines-and-electronics
82465582fd24bbb249215bdea23ff853fab0b1b4
[ "Apache-2.0" ]
null
null
null
from flask_app.camera.gcp_vision_multi_img import proccess_picture # def test_status(client): # assert client.get('/api/status').data == b"status" # # client.get('/api/snap') # def test_register_in_ocean(client): client.get('/api/register') # def test_process_pictures(): # result = proccess_picture()
29
66
0.717868
44
319
4.931818
0.613636
0.096774
0.165899
0
0
0
0
0
0
0
0
0
0.134796
319
11
67
29
0.786232
0.529781
0
0
0
0
0.090909
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
3
fad7cd2725ebf047ccd9dadc546c41e1801922db
190
py
Python
wagtail/documents/tests/utils.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
1
2022-02-09T05:25:30.000Z
2022-02-09T05:25:30.000Z
wagtail/documents/tests/utils.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
wagtail/documents/tests/utils.py
stevedya/wagtail
52e5abfe62547cdfd90ea7dfeb8bf5a52f16324c
[ "BSD-3-Clause" ]
null
null
null
from django.core.files.base import ContentFile def get_test_document_file(): fake_file = ContentFile(b"A boring example document") fake_file.name = "test.txt" return fake_file
23.75
57
0.752632
28
190
4.892857
0.714286
0.175182
0
0
0
0
0
0
0
0
0
0
0.163158
190
7
58
27.142857
0.861635
0
0
0
0
0
0.173684
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
faee6021777a2f82e738f49da5ca5a5102da766a
718
py
Python
msldap/external/aiocmd/setup.py
zhuby1973/msldap
6ff0566112b965d61c43da1dff61b9b8476dded9
[ "MIT" ]
6
2019-08-20T21:40:28.000Z
2021-05-22T18:45:41.000Z
msldap/external/aiocmd/setup.py
zhuby1973/msldap
6ff0566112b965d61c43da1dff61b9b8476dded9
[ "MIT" ]
3
2020-01-15T17:32:23.000Z
2021-05-22T04:07:42.000Z
msldap/external/aiocmd/setup.py
zhuby1973/msldap
6ff0566112b965d61c43da1dff61b9b8476dded9
[ "MIT" ]
5
2019-08-09T04:03:57.000Z
2020-03-19T10:22:56.000Z
from setuptools import setup, find_packages setup(name='aiocmd', packages=find_packages("."), version='0.1.4', author='Dor Green', author_email='dorgreen1@gmail.com', description='Coroutine-based CLI generator using prompt_toolkit', url='http://github.com/KimiNewt/aiocmd', keywords=['asyncio', 'cmd'], license='MIT', install_requires=[ 'prompt_toolkit>=2.0.9' ], classifiers=[ 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7' ])
31.217391
71
0.584958
75
718
5.52
0.666667
0.183575
0.241546
0.251208
0
0
0
0
0
0
0
0.026515
0.264624
718
22
72
32.636364
0.757576
0
0
0
0
0
0.47493
0.029248
0
0
0
0
0
1
0
true
0
0.05
0
0.05
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
faef03dc30912b796e9bba0498ce2118d6cfc21c
2,138
py
Python
home/models.py
dikshaRaj/Diksha
0086d89a39c272670e8e499934d7bea93af438c4
[ "bzip2-1.0.6" ]
null
null
null
home/models.py
dikshaRaj/Diksha
0086d89a39c272670e8e499934d7bea93af438c4
[ "bzip2-1.0.6" ]
8
2019-12-04T23:24:47.000Z
2022-02-10T09:14:21.000Z
home/models.py
dikshaRaj/Diksha
0086d89a39c272670e8e499934d7bea93af438c4
[ "bzip2-1.0.6" ]
null
null
null
from django.db import models import uuid # Create your models here. class Book(models.Model): id = models.UUIDField('Book Id',primary_key=True, default = uuid.uuid4, help_text="generated unique id for book") name = models.CharField(max_length=100, help_text='Book Name',null=True) purchase_date = models.DateField(null=True, blank=True) genre = models.ManyToManyField('Genre', help_text='genre of book') book_author = models.ForeignKey('Author',on_delete=models.SET_NULL ,help_text='Book Author', null=True) timestamp = models.DateTimeField(auto_now=True) def __str__(self): return self.name class Author(models.Model): #id = models.AutoField(primary_key=True) author_name = models.CharField(max_length=100, help_text='Name of Author',null=True) numChoice = ( ('1','One'), ('2','Two'), ('3','Three'), ('4','Four'), ('5', 'Five') ) total_book_written = models.CharField(max_length=1, choices=numChoice) date_of_birth = models.DateField('Birth',null=True, blank=True) date_of_death = models.DateField('Death',null=True, blank=True) timestamp = models.DateTimeField(auto_now=True) def __str__(self): return self.author_name +' (Written books - '+ self.total_book_written +')' class Genre(models.Model): name = models.CharField(max_length=100, help_text='Genre',null=True) timestamp = models.DateTimeField(auto_now=True) def __str__(self): return self.name class Student(models.Model): usn = models.IntegerField('USN',primary_key=True, help_text="Enter USN for Student") name = models.CharField(max_length=100, help_text='Student Name',null=True) book_name = models.ForeignKey('Book',on_delete=models.SET_NULL, help_text='Book Name',null=True) purchase_date = models.DateField(null=True, blank=True) #genre = models.ManyToManyField('Genre', help_text='genre of book') #book_author = models.ForeignKey('Author',on_delete=models.SET_NULL ,help_text='Book Author', null=True) timestamp = models.DateTimeField(auto_now=True) def __str__(self): return self.name
44.541667
117
0.703929
291
2,138
4.965636
0.247423
0.0609
0.062284
0.083045
0.576471
0.576471
0.576471
0.576471
0.459516
0.459516
0
0.010567
0.159027
2,138
48
118
44.541667
0.793103
0.108513
0
0.333333
1
0
0.105152
0
0
0
0
0
0
1
0.102564
false
0
0.051282
0.102564
0.846154
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
3
faf67d3deadf4abc84d3fd62b8e391e064c99ddf
173
py
Python
Zad_FactoryMethod/BazaDanychOracle.py
Paarzivall/Wzorce-Projektowe
aa4136f140ad02c0fc0de45709b5a01ca42b417f
[ "MIT" ]
null
null
null
Zad_FactoryMethod/BazaDanychOracle.py
Paarzivall/Wzorce-Projektowe
aa4136f140ad02c0fc0de45709b5a01ca42b417f
[ "MIT" ]
null
null
null
Zad_FactoryMethod/BazaDanychOracle.py
Paarzivall/Wzorce-Projektowe
aa4136f140ad02c0fc0de45709b5a01ca42b417f
[ "MIT" ]
null
null
null
from BazaDanych import BazaDanych class BazaDanychOracle(BazaDanych): def WykonajSelect(self, zapytanie): print(f"Oracle\> {zapytanie}\n\tWykonano pomyślnie")
24.714286
60
0.751445
18
173
7.222222
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.150289
173
6
61
28.833333
0.884354
0
0
0
0
0
0.242775
0.132948
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
4f08b890e4ed202f05c786143d67462ade8cd06b
40,016
py
Python
MJ_per_SAE_STAT_GRAPH.py
GrantRoss-Tenki/Malawi-CQC-CSC-OSU-Work
a720e0451579945ba10eafdafe2e0d59a86d5cfb
[ "MIT" ]
null
null
null
MJ_per_SAE_STAT_GRAPH.py
GrantRoss-Tenki/Malawi-CQC-CSC-OSU-Work
a720e0451579945ba10eafdafe2e0d59a86d5cfb
[ "MIT" ]
null
null
null
MJ_per_SAE_STAT_GRAPH.py
GrantRoss-Tenki/Malawi-CQC-CSC-OSU-Work
a720e0451579945ba10eafdafe2e0d59a86d5cfb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Mar 17 11:02:24 2022 @author: rossgra """ import numpy as np from numpy.core.fromnumeric import std import pandas as pd import seaborn as sns import matplotlib.pyplot as plt import scipy from scipy.stats import mannwhitneyu import statistics as stat metric = input('SAE or Non - ') # I am goign to bring in the NO- hood section first #for Megajouels #No_hood_MJ_path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/MJ per SAE - No_Hood.csv" #rossgra or gvros #Hood_MJ_Path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/MJ per SAE - Hood.csv" #### for FUEL_REMOVED _perd if metric== 'SAE': No_hood_MJ_path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/24 Hour Remove SAE - No_Hood.csv" #rossgra or gvros Hood_MJ_Path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/24 Hour Remove SAE - Hood.csv" #No_hood_MJ_path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/MJ per SAE - No_Hood.csv" #rossgra or gvros #Hood_MJ_Path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/MJ per SAE - Hood.csv" else: #No_hood_MJ_path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/24 Hour Remove - No_Hood.csv" #rossgra or gvros #Hood_MJ_Path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/24 Hour Remove - Hood.csv" No_hood_MJ_path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/MJ per Day - No_Hood.csv" #rossgra or gvros Hood_MJ_Path = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/MJ per Day - Hood.csv" ######For Fuel removed per 24 hours per SAE Level_of_confidence = 0.05 No_hood_MJ = pd.read_csv(No_hood_MJ_path) Hood_MJ = pd.read_csv(Hood_MJ_Path) #C:\Users\rossgra\Box\Classes\Software Dev C:\Users\rossgra\Box\OSU, CSC, CQC Project files HH_1N = [x for x in No_hood_MJ.iloc[:, 0] if x != -1] HH_2N = [x for x in No_hood_MJ.iloc[:, 11] if x != -1] HH_3N = [x for x in No_hood_MJ.iloc[:, 22] if x != -1] HH_4N = [x for x in No_hood_MJ.iloc[:, 33] if x != -1] HH_1H = [x for x in Hood_MJ.iloc[:, 0] if x != -1] HH_2H = [x for x in Hood_MJ.iloc[:, 11] if x != -1] HH_3H = [x for x in Hood_MJ.iloc[:, 22] if x != -1] Mj_1N_Phase = [x for x in No_hood_MJ.iloc[:, 5] if x != -1] Mj_2N_Phase = [x for x in No_hood_MJ.iloc[:, 16] if x != -1] Mj_3N_Phase = [x for x in No_hood_MJ.iloc[:, 27] if x != -1] Mj_4N_Phase = [x for x in No_hood_MJ.iloc[:, 38] if x != -1] Mj_1H_Phase = [x for x in Hood_MJ.iloc[:, 5] if x != -1] Mj_2H_Phase = [x for x in Hood_MJ.iloc[:, 16] if x != -1] Mj_3H_Phase = [x for x in Hood_MJ.iloc[:, 27] if x != -1] Mj_filter_1N_Phase = [x for x in No_hood_MJ.iloc[:, 6] if x != -1] Mj_filter_2N_Phase = [x for x in No_hood_MJ.iloc[:, 17] if x != -1] Mj_filter_3N_Phase = [x for x in No_hood_MJ.iloc[:, 28] if x != -1] Mj_filter_4N_Phase = [x for x in No_hood_MJ.iloc[:, 39] if x != -1] Mj_filter_1H_Phase = [x for x in Hood_MJ.iloc[:, 6] if x != -1] Mj_filter_2H_Phase = [x for x in Hood_MJ.iloc[:, 17] if x != -1] Mj_filter_3H_Phase = [x for x in Hood_MJ.iloc[:, 28] if x != -1] Fuel_1N_Phase = [x for x in No_hood_MJ.iloc[:, 3] if x != -1] Fuel_2N_Phase = [x for x in No_hood_MJ.iloc[:, 14] if x != -1] Fuel_3N_Phase = [x for x in No_hood_MJ.iloc[:, 25] if x != -1] Fuel_4N_Phase = [x for x in No_hood_MJ.iloc[:, 36] if x != -1] Fuel_1H_Phase = [x for x in Hood_MJ.iloc[:, 3] if x != -1] Fuel_2H_Phase = [x for x in Hood_MJ.iloc[:, 14] if x != -1] Fuel_3H_Phase = [x for x in Hood_MJ.iloc[:, 25] if x != -1] Avg_Fuel_1N = [x for x in No_hood_MJ.iloc[:, 2] if x != -1] Avg_Fuel_2N = [x for x in No_hood_MJ.iloc[:, 13] if x != -1] Avg_Fuel_3N = [x for x in No_hood_MJ.iloc[:, 24] if x != -1] Avg_Fuel_4N = [x for x in No_hood_MJ.iloc[:, 35] if x != -1] Avg_Fuel_1H = [x for x in Hood_MJ.iloc[:, 2] if x != -1] Avg_Fuel_2H = [x for x in Hood_MJ.iloc[:, 13] if x != -1] Avg_Fuel_3H = [x for x in Hood_MJ.iloc[:, 24] if x != -1] Phase_1N_day_count = [x for x in No_hood_MJ.iloc[:, 1] if x != -1] Phase_2N_day_count = [x for x in No_hood_MJ.iloc[:, 12] if x != -1] Phase_3N_day_count = [x for x in No_hood_MJ.iloc[:, 23] if x != -1] Phase_4N_day_count = [x for x in No_hood_MJ.iloc[:, 34] if x != -1] Phase_1H_day_count = [x for x in Hood_MJ.iloc[:, 1] if x != -1] Phase_2H_day_count = [x for x in Hood_MJ.iloc[:, 12] if x != -1] Phase_3H_day_count = [x for x in Hood_MJ.iloc[:, 23] if x != -1] Filter_1N_day_count = [x for x in No_hood_MJ.iloc[:, 7] if x != -1] Filter_2N_day_count = [x for x in No_hood_MJ.iloc[:, 18] if x != -1] Filter_3N_day_count = [x for x in No_hood_MJ.iloc[:, 29] if x != -1] Filter_4N_day_count = [x for x in No_hood_MJ.iloc[:, 40] if x != -1] Filter_1H_day_count = [x for x in Hood_MJ.iloc[:, 7] if x != -1] Filter_2H_day_count = [x for x in Hood_MJ.iloc[:, 18] if x != -1] Filter_3H_day_count = [x for x in Hood_MJ.iloc[:, 29] if x != -1] cooking_times_1N = [x for x in No_hood_MJ.iloc[:, 8] if x != -1] cooking_times_2N = [x for x in No_hood_MJ.iloc[:, 19] if x != -1] cooking_times_3N = [x for x in No_hood_MJ.iloc[:, 30] if x != -1] cooking_times_4N = [x for x in No_hood_MJ.iloc[:, 41] if x != -1] cooking_times_1H = [x for x in Hood_MJ.iloc[:, 8] if x != -1] cooking_times_2H = [x for x in Hood_MJ.iloc[:, 19] if x != -1] cooking_times_3H = [x for x in Hood_MJ.iloc[:, 30] if x != -1] ## data frames of metrics no_hood_df = {'1N': Mj_1N_Phase,'2N':Mj_2N_Phase,'3N':Mj_3N_Phase,'4N':Mj_4N_Phase} no_hood_filter_df = {'1N':Mj_filter_1N_Phase,'2N':Mj_filter_2N_Phase,'3N':Mj_filter_3N_Phase,'4N':Mj_filter_4N_Phase} Hood_df = {'1H':Mj_1H_Phase,'2H':Mj_2H_Phase,'3H':Mj_3H_Phase } Hood_Filter_df = {'1H':Mj_1H_Phase,'2H':Mj_2H_Phase,'3H':Mj_3H_Phase } # Graphing if metric== 'SAE': sns.displot((Mj_1N_Phase, Mj_2N_Phase, Mj_3N_Phase,Mj_4N_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day/SAE No-Hood') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() sns.displot((Mj_filter_1N_Phase, Mj_filter_2N_Phase, Mj_filter_3N_Phase,Mj_filter_4N_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day/SAE No-Hood - Filtered') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() sns.displot((Mj_1H_Phase, Mj_2H_Phase, Mj_3H_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day/SAE Hood') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() sns.displot((Mj_filter_1H_Phase, Mj_filter_2H_Phase, Mj_filter_3H_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day/SAE ood - Filtered') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() else: sns.displot((Mj_1N_Phase, Mj_2N_Phase, Mj_3N_Phase,Mj_4N_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day No-Hood') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() sns.displot((Mj_filter_1N_Phase, Mj_filter_2N_Phase, Mj_filter_3N_Phase,Mj_filter_4N_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day No-Hood - Filtered') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() sns.displot((Mj_1H_Phase, Mj_2H_Phase, Mj_3H_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day Hood') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() sns.displot((Mj_filter_1H_Phase, Mj_filter_2H_Phase, Mj_filter_3H_Phase), kind="kde", common_norm=False) plt.title('Fuel/Day Hood - Filtered') #plt.legend(labels=['1N', '2N', '3N', '4N']) plt.show() #1N to 2N # for Phase MJ_Phase_1N_to_2_comon = [] MJ_Phase_2N_to_1_comon = [] Day_count_MJ_Phase_1N_2N = [] count_n = 0 for row_1N, hh_1N in enumerate(HH_1N): if hh_1N == str(-1): break for row_2N, hh_2N in enumerate(HH_2N): if hh_1N == hh_2N: MJ_Phase_1N_to_2_comon.append(Mj_1N_Phase[row_1N]) MJ_Phase_2N_to_1_comon.append(Mj_2N_Phase[row_2N]) Day_count_MJ_Phase_1N_2N.append(Phase_1N_day_count[row_1N] +Phase_2N_day_count[row_2N] ) count_n = count_n + 1 N_MJ_Phase_1N_2N = count_n -1 #for filter MJ_filter_1N_to_2_comon = [] MJ_filter_2N_to_1_comon = [] Day_count_MJ_filter_1N_2N = [] count_n = 0 for row_1N, hh_1N in enumerate(HH_1N): if hh_1N == str(-1): break for row_2N, hh_2N in enumerate(HH_2N): if hh_1N == hh_2N: MJ_filter_1N_to_2_comon.append(Mj_filter_1N_Phase[row_1N]) MJ_filter_2N_to_1_comon.append(Mj_filter_2N_Phase[row_2N]) Day_count_MJ_filter_1N_2N.append(Filter_1N_day_count[row_1N] +Filter_2N_day_count[row_2N] ) count_n = count_n + 1 N_MJ_filter_1N_2N = count_n -1 #1N to 2N ###################____________________HOOOD # for Phase MJ_Phase_1H_to_2_comon = [] MJ_Phase_2H_to_1_comon = [] Day_count_MJ_Phase_1H_2H = [] count_n = 0 for row_1H, hh_1H in enumerate(HH_1H): if hh_1H == str(-1): break for row_2H, hh_2H in enumerate(HH_2H): if hh_1H == hh_2H: MJ_Phase_1H_to_2_comon.append(Mj_1H_Phase[row_1H]) MJ_Phase_2H_to_1_comon.append(Mj_2H_Phase[row_2H]) Day_count_MJ_Phase_1H_2H.append(Phase_1H_day_count[row_1H] +Phase_2H_day_count[row_2H] ) count_n = count_n + 1 N_MJ_Phase_1H_2H = count_n -1 #for filter MJ_filter_1H_to_2_comon = [] MJ_filter_2H_to_1_comon = [] Day_count_MJ_filter_1H_2H = [] count_n = 0 for row_1H, hh_1H in enumerate(HH_1H): if hh_1H == str(-1): break for row_2H, hh_2H in enumerate(HH_2H): if hh_1H == hh_2H: MJ_filter_1H_to_2_comon.append(Mj_filter_1H_Phase[row_1H]) MJ_filter_2H_to_1_comon.append(Mj_filter_2H_Phase[row_2H]) Day_count_MJ_filter_1H_2H.append(Filter_1H_day_count[row_1H] +Filter_2H_day_count[row_2H] ) count_n = count_n + 1 N_MJ_filter_1H_2H = count_n -1 #1N to 3N MJ_Phase_1N_to_3_comon = [] MJ_Phase_3N_to_1_comon = [] Day_count_MJ_Phase_1N_3N = [] count_n = 0 breakme = 0 for row_1N, hh_1N in enumerate(HH_1N): if hh_1N == (-1) : break for row_3N, hh_3N in enumerate(HH_3N): if hh_1N == hh_3N: MJ_Phase_1N_to_3_comon.append(Mj_1N_Phase[row_1N]) MJ_Phase_3N_to_1_comon.append(Mj_3N_Phase[row_3N]) Day_count_MJ_Phase_1N_3N.append(Phase_1N_day_count[row_1N] + Phase_3N_day_count[row_3N]) count_n = count_n + 1 N_MJ_Phase_1N_3N = count_n -1 #for filter MJ_filter_1N_to_3_comon = [] MJ_filter_3N_to_1_comon = [] Day_count_MJ_filter_1N_3N = [] count_n = 0 for row_1N, hh_1N in enumerate(HH_1N): if hh_1N == str(-1): break for row_3N, hh_3N in enumerate(HH_3N): if hh_1N == hh_3N: MJ_filter_1N_to_3_comon.append(Mj_filter_1N_Phase[row_1N]) MJ_filter_3N_to_1_comon.append(Mj_filter_3N_Phase[row_3N]) Day_count_MJ_filter_1N_3N.append(Filter_1N_day_count[row_1N] +Filter_3N_day_count[row_3N] ) count_n = count_n + 1 N_MJ_filter_1N_3N = count_n -1 #1N to 3N ###################____________________HOOOD # for Phase MJ_Phase_1H_to_3_comon = [] MJ_Phase_3H_to_1_comon = [] Day_count_MJ_Phase_1H_3H = [] count_n = 0 breakme = 0 for row_1H, hh_1H in enumerate(HH_1H): if hh_1H == (-1) : break for row_3H, hh_3H in enumerate(HH_3H): if hh_1H == hh_3H: MJ_Phase_1H_to_3_comon.append(Mj_1H_Phase[row_1H]) MJ_Phase_3H_to_1_comon.append(Mj_3H_Phase[row_3H]) Day_count_MJ_Phase_1H_3H.append(Phase_1H_day_count[row_1H] + Phase_3H_day_count[row_3H]) count_n = count_n + 1 N_MJ_Phase_1H_3H = count_n -1 #for filter MJ_filter_1H_to_3_comon = [] MJ_filter_3H_to_1_comon = [] Day_count_MJ_filter_1H_3H = [] count_n = 0 for row_1H, hh_1H in enumerate(HH_1H): if hh_1H == str(-1): break for row_3H, hh_3H in enumerate(HH_3H): if hh_1H == hh_3H: MJ_filter_1H_to_3_comon.append(Mj_filter_1H_Phase[row_1H]) MJ_filter_3H_to_1_comon.append(Mj_filter_3H_Phase[row_3H]) Day_count_MJ_filter_1H_3H.append(Filter_1H_day_count[row_1H] +Filter_3H_day_count[row_3H] ) count_n = count_n + 1 N_MJ_filter_1H_3H = count_n -1 #1N to 4N MJ_Phase_1N_to_4_comon = [] MJ_Phase_4N_to_1_comon = [] Day_count_MJ_Phase_1N_4N = [] count_n = 0 for row_1N, hh_1N in enumerate(HH_1N): if hh_1N == str(-1): break for row_4N, hh_4N in enumerate(HH_4N): if hh_1N == hh_4N: MJ_Phase_1N_to_4_comon.append(Mj_1N_Phase[row_1N]) MJ_Phase_4N_to_1_comon.append(Mj_4N_Phase[row_4N]) Day_count_MJ_Phase_1N_4N.append(Phase_1N_day_count[row_1N] +Phase_4N_day_count[row_4N] ) count_n = count_n + 1 print('length of 1n and 4 n:', len(MJ_Phase_1N_to_4_comon), len(MJ_Phase_4N_to_1_comon) ) N_MJ_Phase_1N_4N = count_n -1 #for filter MJ_filter_1N_to_4_comon = [] MJ_filter_4N_to_1_comon = [] Day_count_MJ_filter_1N_4N = [] count_n = 0 for row_1N, hh_1N in enumerate(HH_1N): if hh_1N == str(-1): break for row_4N, hh_4N in enumerate(HH_4N): if hh_1N == hh_4N: MJ_filter_1N_to_4_comon.append(Mj_filter_1N_Phase[row_1N]) MJ_filter_4N_to_1_comon.append(Mj_filter_4N_Phase[row_4N]) Day_count_MJ_filter_1N_4N.append(Filter_1N_day_count[row_1N] +Filter_4N_day_count[row_4N] ) count_n = count_n + 1 N_MJ_filter_1N_4N = count_n -1 #2N to 3N MJ_Phase_2N_to_3_comon = [] MJ_Phase_3N_to_2_comon = [] Day_count_MJ_Phase_2N_3N = [] count_n = 0 for row_2N, hh_2N in enumerate(HH_2N): if hh_2N == str(-1): break for row_3N, hh_3N in enumerate(HH_3N): if hh_2N == hh_3N: MJ_Phase_2N_to_3_comon.append(Mj_2N_Phase[row_2N]) MJ_Phase_3N_to_2_comon.append(Mj_3N_Phase[row_3N]) Day_count_MJ_Phase_2N_3N.append(Phase_2N_day_count[row_2N] +Phase_3N_day_count[row_3N] ) print(hh_2N,Mj_2N_Phase[row_2N],hh_3N,Mj_3N_Phase[row_3N]) count_n = count_n + 1 N_MJ_Phase_2N_3N = count_n -1 #for filter MJ_filter_2N_to_3_comon = [] MJ_filter_3N_to_2_comon = [] Day_count_MJ_filter_2N_3N = [] count_n = 0 for row_2N, hh_2N in enumerate(HH_2N): if hh_2N == str(-1): break for row_3N, hh_3N in enumerate(HH_3N): if hh_2N == hh_3N: MJ_filter_2N_to_3_comon.append(Mj_filter_2N_Phase[row_2N]) MJ_filter_3N_to_2_comon.append(Mj_filter_3N_Phase[row_3N]) print(hh_2N,Mj_filter_2N_Phase[row_2N],hh_3N,Mj_filter_3N_Phase[row_3N]) Day_count_MJ_filter_2N_3N.append(Filter_2N_day_count[row_2N] +Filter_3N_day_count[row_3N] ) count_n = count_n + 1 N_MJ_filter_2N_3N = count_n - 1 #2N to 3N ###################____________________HOOOD # for Phase MJ_Phase_2H_to_3_comon = [] MJ_Phase_3H_to_2_comon = [] Day_count_MJ_Phase_2H_3H = [] count_n = 0 for row_2H, hh_2H in enumerate(HH_2H): if hh_2H == str(-1): break for row_3H, hh_3H in enumerate(HH_3H): if hh_2H == hh_3H: MJ_Phase_2H_to_3_comon.append(Mj_2H_Phase[row_2H]) MJ_Phase_3H_to_2_comon.append(Mj_3H_Phase[row_3H]) Day_count_MJ_Phase_2H_3H.append(Phase_2H_day_count[row_2H] +Phase_3H_day_count[row_3H] ) count_n = count_n + 1 N_MJ_Phase_2H_3H = count_n -1 #for filter MJ_filter_2H_to_3_comon = [] MJ_filter_3H_to_2_comon = [] Day_count_MJ_filter_2H_3H = [] count_n = 0 for row_2H, hh_2H in enumerate(HH_2H): if hh_2H == str(-1): break for row_3H, hh_3H in enumerate(HH_3H): if hh_2H == hh_3H: MJ_filter_2H_to_3_comon.append(Mj_filter_2H_Phase[row_2H]) MJ_filter_3H_to_2_comon.append(Mj_filter_3H_Phase[row_3H]) Day_count_MJ_filter_2H_3H.append(Filter_2H_day_count[row_2H] +Filter_3H_day_count[row_3H] ) count_n = count_n + 1 N_MJ_filter_2H_3H = count_n - 1 #2N to 4N MJ_Phase_2N_to_4_comon = [] MJ_Phase_4N_to_2_comon = [] Day_count_MJ_Phase_2N_4N = [] count_n = 0 for row_2N, hh_2N in enumerate(HH_2N): if hh_2N == str(-1): break for row_4N, hh_4N in enumerate(HH_4N): if hh_2N == hh_4N: MJ_Phase_2N_to_4_comon.append(Mj_2N_Phase[row_2N]) MJ_Phase_4N_to_2_comon.append(Mj_4N_Phase[row_4N]) Day_count_MJ_Phase_2N_4N.append(Phase_2N_day_count[row_2N] +Phase_4N_day_count[row_4N] ) count_n = count_n + 1 N_MJ_Phase_2N_4N = count_n -1 #for filter MJ_filter_2N_to_4_comon = [] MJ_filter_4N_to_2_comon = [] Day_count_MJ_filter_2N_4N = [] count_n = 0 for row_2N, hh_2N in enumerate(HH_2N): if hh_2N == str(-1): break for row_4N, hh_4N in enumerate(HH_4N): if hh_2N == hh_4N: MJ_filter_2N_to_4_comon.append(Mj_filter_2N_Phase[row_2N]) MJ_filter_4N_to_2_comon.append(Mj_filter_4N_Phase[row_4N]) Day_count_MJ_filter_2N_4N.append(Filter_2N_day_count[row_2N] +Filter_4N_day_count[row_4N] ) count_n = count_n + 1 N_MJ_filter_2N_4N = count_n - 1 #3N to 4N MJ_Phase_3N_to_4_comon = [] MJ_Phase_4N_to_3_comon = [] Day_count_MJ_Phase_3N_4N = [] count_n = 0 for row_3N, hh_3N in enumerate(HH_3N): if hh_3N == str(-1): break for row_4N, hh_4N in enumerate(HH_4N): if hh_3N == hh_4N: MJ_Phase_3N_to_4_comon.append(Mj_3N_Phase[row_3N]) MJ_Phase_4N_to_3_comon.append(Mj_4N_Phase[row_4N]) Day_count_MJ_Phase_3N_4N.append(Phase_3N_day_count[row_3N] +Phase_4N_day_count[row_4N] ) count_n = count_n + 1 N_MJ_Phase_3N_4N = count_n -1 #for filter MJ_filter_3N_to_4_comon = [] MJ_filter_4N_to_3_comon = [] Day_count_MJ_filter_3N_4N = [] count_n = 0 for row_3N, hh_3N in enumerate(HH_3N): if hh_3N == str(-1): break for row_4N, hh_4N in enumerate(HH_4N): if hh_3N == hh_4N: MJ_filter_3N_to_4_comon.append(Mj_filter_3N_Phase[row_3N]) MJ_filter_4N_to_3_comon.append(Mj_filter_4N_Phase[row_4N]) Day_count_MJ_filter_3N_4N.append(Filter_3N_day_count[row_3N] +Filter_4N_day_count[row_4N] ) count_n = count_n + 1 N_MJ_filter_3N_4N = count_n - 1 T_stat_1N_2N, P_val_1N_2N = scipy.stats.ttest_ind(MJ_Phase_1N_to_2_comon,MJ_Phase_2N_to_1_comon, axis=0, equal_var=True) degree_1N_2N = (N_MJ_Phase_1N_2N -1) *Level_of_confidence if degree_1N_2N < abs(T_stat_1N_2N): print('1N and 2N Phase rejects the null', T_stat_1N_2N,'P-value', P_val_1N_2N,'Sample size N', N_MJ_Phase_1N_2N) else: print('1N and 2N Phase accepts the null', T_stat_1N_2N,'P-value', P_val_1N_2N,'Sample size N', N_MJ_Phase_1N_2N) T_sign_1N_2N, P_sign_1N_2N = scipy.stats.wilcoxon(MJ_Phase_1N_to_2_comon, MJ_Phase_2N_to_1_comon) T_stat_1N_2N_filter, P_val_1N_2N_filter = scipy.stats.ttest_ind(MJ_filter_1N_to_2_comon,MJ_filter_2N_to_1_comon, axis=0, equal_var=True) degree_1N_2N_filter = (N_MJ_filter_1N_2N -1) *Level_of_confidence if degree_1N_2N_filter < abs(T_stat_1N_2N_filter): print('1N and 2N Filter rejects the null', T_stat_1N_2N_filter,'P-value', P_val_1N_2N_filter,'Sample size N', N_MJ_filter_1N_2N) else: print('1N and 2N Filter accepts the null', T_stat_1N_2N_filter,'P-value', P_val_1N_2N_filter,'Sample size N', N_MJ_filter_1N_2N) T_sign_1N_2N_filter, P_sign_1N_2N_filter = scipy.stats.wilcoxon(MJ_filter_1N_to_2_comon, MJ_filter_2N_to_1_comon) # 1n to 2n HOOOOOOD T_stat_1H_2H, P_val_1H_2H = scipy.stats.ttest_ind(MJ_Phase_1H_to_2_comon,MJ_Phase_2H_to_1_comon, axis=0, equal_var=True) degree_1H_2H = (N_MJ_Phase_1H_2H -1) *Level_of_confidence if degree_1H_2H < abs(T_stat_1H_2H): print('1H and 2H Phase rejects the null', T_stat_1H_2H,'P-value', P_val_1H_2H,'Sample size N', N_MJ_Phase_1H_2H) else: print('1H and 2H Phase accepts the null', T_stat_1H_2H,'P-value', P_val_1H_2H,'Sample size N', N_MJ_Phase_1H_2H) T_sign_1H_2H, P_sign_1H_2H = scipy.stats.wilcoxon(MJ_Phase_1H_to_2_comon, MJ_Phase_2H_to_1_comon) T_stat_1H_2H_filter, P_val_1H_2H_filter = scipy.stats.ttest_ind(MJ_filter_1H_to_2_comon,MJ_filter_2H_to_1_comon, axis=0, equal_var=True) degree_1H_2H_filter = (N_MJ_filter_1H_2H -1) *Level_of_confidence if degree_1H_2H_filter < abs(T_stat_1H_2H_filter): print('1H and 2H Filter rejects the null', T_stat_1H_2H_filter,'P-value', P_val_1H_2H_filter,'Sample size N', N_MJ_filter_1H_2H) else: print('1H and 2H Filter accepts the null', T_stat_1H_2H_filter,'P-value', P_val_1H_2H_filter,'Sample size N', N_MJ_filter_1H_2H) T_sign_1H_2H_filter, P_sign_1H_2H_filter = scipy.stats.wilcoxon(MJ_filter_1H_to_2_comon, MJ_filter_2H_to_1_comon) T_stat_1N_3N, P_val_1N_3N = scipy.stats.ttest_ind(MJ_Phase_1N_to_3_comon,MJ_Phase_3N_to_1_comon, axis=0, equal_var=True) degree_1N_3N = (N_MJ_Phase_1N_3N -1) *Level_of_confidence if degree_1N_3N < abs(T_stat_1N_3N): print('1N and 3N Phase rejects the null', T_stat_1N_3N,'P-value', P_val_1N_3N,'Sample size N', N_MJ_Phase_1N_3N) else: print('1N and 3N Phase accepts the null', T_stat_1N_3N,'P-value', P_val_1N_3N,'Sample size N', N_MJ_Phase_1N_3N) T_sign_1N_3N, P_sign_1N_3N = scipy.stats.wilcoxon(MJ_Phase_1N_to_3_comon, MJ_Phase_3N_to_1_comon) T_stat_1N_3N_filter, P_val_1N_3N_filter = scipy.stats.ttest_ind(MJ_filter_1N_to_3_comon,MJ_filter_3N_to_1_comon, axis=0, equal_var=True) degree_1N_3N_filter = (N_MJ_filter_1N_3N -1) *Level_of_confidence if degree_1N_3N_filter < abs(T_stat_1N_3N_filter): print('1N and 3N Filter rejects the null', T_stat_1N_3N_filter,'P-value', P_val_1N_3N_filter,'Sample size N', N_MJ_filter_1N_3N) else: print('1N and 3N Filter accepts the null', T_stat_1N_3N_filter,'P-value', P_val_1N_3N_filter,'Sample size N', N_MJ_filter_1N_3N) T_sign_1N_3N_filter, P_sign_1N_3N_filter = scipy.stats.wilcoxon(MJ_filter_1N_to_3_comon, MJ_filter_3N_to_1_comon) # 1n to 3n HOOOOOOD T_stat_1H_3H, P_val_1H_3H = scipy.stats.ttest_ind(MJ_Phase_1H_to_3_comon,MJ_Phase_3H_to_1_comon, axis=0, equal_var=True) degree_1H_3H = (N_MJ_Phase_1H_3H -1) *Level_of_confidence if degree_1H_3H < abs(T_stat_1H_3H): print('1H and 3H Phase rejects the null', T_stat_1H_3H,'P-value', P_val_1H_3H,'Sample size N', N_MJ_Phase_1H_3H) else: print('1H and 3H Phase accepts the null', T_stat_1H_3H,'P-value', P_val_1H_3H,'Sample size N', N_MJ_Phase_1H_3H) T_sign_1H_3H, P_sign_1H_3H = scipy.stats.wilcoxon(MJ_Phase_1H_to_3_comon, MJ_Phase_3H_to_1_comon) T_stat_1H_3H_filter, P_val_1H_3H_filter = scipy.stats.ttest_ind(MJ_filter_1H_to_3_comon,MJ_filter_3H_to_1_comon, axis=0, equal_var=True) degree_1H_3H_filter = (N_MJ_filter_1H_3H -1) *Level_of_confidence if degree_1H_3H_filter < abs(T_stat_1H_3H_filter): print('1H and 3H Filter rejects the null', T_stat_1H_3H_filter,'P-value', P_val_1H_3H_filter,'Sample size N', N_MJ_filter_1H_3H) else: print('1H and 3H Filter accepts the null', T_stat_1H_3H_filter,'P-value', P_val_1H_3H_filter,'Sample size N', N_MJ_filter_1H_3H) T_sign_1H_3H_filter, P_sign_1H_3H_filter = scipy.stats.wilcoxon(MJ_filter_1H_to_3_comon, MJ_filter_3H_to_1_comon) T_stat_1N_4N, P_val_1N_4N = scipy.stats.ttest_ind(MJ_Phase_1N_to_4_comon,MJ_Phase_4N_to_1_comon, axis=0, equal_var=True) degree_1N_4N = (N_MJ_Phase_1N_4N -1) *Level_of_confidence if degree_1N_4N < abs(T_stat_1N_4N): print('1N and 4N Phase rejects the null', T_stat_1N_4N,'P-value', P_val_1N_4N,'Sample size N', N_MJ_Phase_1N_4N) else: print('1N and 4N Phase accepts the null', T_stat_1N_4N,'P-value', P_val_1N_4N,'Sample size N', N_MJ_Phase_1N_4N) T_sign_1N_4N, P_sign_1N_4N = scipy.stats.wilcoxon(MJ_Phase_1N_to_4_comon, MJ_Phase_4N_to_1_comon) T_stat_1N_4N_filter, P_val_1N_4N_filter = scipy.stats.ttest_ind(MJ_filter_1N_to_4_comon,MJ_filter_4N_to_1_comon, axis=0, equal_var=True) degree_1N_4N_filter = (N_MJ_filter_1N_4N -1) *Level_of_confidence if degree_1N_4N_filter < abs(T_stat_1N_4N_filter): print('1N and 4N Filter rejects the null', T_stat_1N_4N_filter,'P-value', P_val_1N_4N_filter,'Sample size N', N_MJ_filter_1N_4N) else: print('1N and 4N Filter accepts the null', T_stat_1N_4N_filter,'P-value', P_val_1N_4N_filter,'Sample size N', N_MJ_filter_1N_4N) T_sign_1N_4N_filter, P_sign_1N_4N_filter = scipy.stats.wilcoxon(MJ_filter_1N_to_4_comon, MJ_filter_4N_to_1_comon) T_stat_2N_3N, P_val_2N_3N = scipy.stats.ttest_ind(MJ_Phase_2N_to_3_comon,MJ_Phase_3N_to_2_comon, axis=0, equal_var=True) degree_2N_3N = (N_MJ_Phase_2N_3N -1) *Level_of_confidence if degree_2N_3N < abs(T_stat_2N_3N): print('2N and 3N Phase rejects the null', T_stat_2N_3N,'P-value', P_val_2N_3N,'Sample size N', N_MJ_Phase_2N_3N) else: print('2N and 3N Phase accepts the null', T_stat_2N_3N,'P-value', P_val_2N_3N,'Sample size N', N_MJ_Phase_2N_3N) T_sign_2N_3N, P_sign_2N_3N = scipy.stats.wilcoxon(MJ_Phase_2N_to_3_comon, MJ_Phase_3N_to_2_comon) T_stat_2N_3N_filter, P_val_2N_3N_filter = scipy.stats.ttest_ind(MJ_filter_2N_to_3_comon,MJ_filter_3N_to_2_comon, axis=0, equal_var=True) degree_2N_3N_filter = (N_MJ_filter_2N_3N -1) *Level_of_confidence if degree_2N_3N_filter < abs(T_stat_2N_3N_filter): print('2N and 3N Filter rejects the null', T_stat_2N_3N_filter,'P-value', P_val_2N_3N_filter,'Sample size N', N_MJ_filter_2N_3N) else: print('2N and 3N Filter accepts the null', T_stat_2N_3N_filter,'P-value', P_val_2N_3N_filter,'Sample size N', N_MJ_filter_2N_3N) T_sign_2N_3N_filter, P_sign_2N_3N_filter = scipy.stats.wilcoxon(MJ_filter_2N_to_3_comon, MJ_filter_3N_to_2_comon) # 2n to 3n HOOOOOOD T_stat_2H_3H, P_val_2H_3H = scipy.stats.ttest_ind(MJ_Phase_2H_to_3_comon,MJ_Phase_3H_to_2_comon, axis=0, equal_var=True) degree_2H_3H = (N_MJ_Phase_2H_3H -1) *Level_of_confidence if degree_2H_3H < abs(T_stat_2H_3H): print('2H and 3H Phase rejects the null', T_stat_2H_3H,'P-value', P_val_2H_3H,'Sample size N', N_MJ_Phase_2H_3H) else: print('2H and 3H Phase accepts the null', T_stat_2H_3H,'P-value', P_val_2H_3H,'Sample size N', N_MJ_Phase_2H_3H) T_sign_2H_3H, P_sign_2H_3H = scipy.stats.wilcoxon(MJ_Phase_2H_to_3_comon, MJ_Phase_3H_to_2_comon) T_stat_2H_3H_filter, P_val_2H_3H_filter = scipy.stats.ttest_ind(MJ_filter_2H_to_3_comon,MJ_filter_3H_to_2_comon, axis=0, equal_var=True) degree_2H_3H_filter = (N_MJ_filter_2H_3H -1) *Level_of_confidence if degree_2H_3H_filter < abs(T_stat_2H_3H_filter): print('2H and 3H Filter rejects the null', T_stat_2H_3H_filter,'P-value', P_val_2H_3H_filter,'Sample size N', N_MJ_filter_2H_3H) else: print('2H and 3H Filter accepts the null', T_stat_2H_3H_filter,'P-value', P_val_2H_3H_filter,'Sample size N', N_MJ_filter_2H_3H) T_sign_2H_3H_filter, P_sign_2H_3H_filter = scipy.stats.wilcoxon(MJ_filter_2H_to_3_comon, MJ_filter_3H_to_2_comon) #2N to 4N T_stat_2N_4N, P_val_2N_4N = scipy.stats.ttest_ind(MJ_Phase_2N_to_4_comon,MJ_Phase_4N_to_2_comon, axis=0, equal_var=True) degree_2N_4N = (N_MJ_Phase_2N_4N -1) *Level_of_confidence if degree_2N_4N < abs(T_stat_2N_4N): print('2N and 4N Phase rejects the null', T_stat_2N_4N,'P-value', P_val_2N_4N,'Sample size N', N_MJ_Phase_2N_4N) else: print('2N and 4N Phase accepts the null', T_stat_2N_4N,'P-value', P_val_2N_4N,'Sample size N', N_MJ_Phase_2N_4N) T_sign_2N_4N, P_sign_2N_4N = scipy.stats.wilcoxon(MJ_Phase_2N_to_4_comon, MJ_Phase_4N_to_2_comon) T_stat_2N_4N_filter, P_val_2N_4N_filter = scipy.stats.ttest_ind(MJ_filter_2N_to_4_comon,MJ_filter_4N_to_2_comon, axis=0, equal_var=True) degree_2N_4N_filter = (N_MJ_filter_2N_4N -1) *Level_of_confidence if degree_2N_4N_filter < abs(T_stat_2N_4N_filter): print('2N and 4N Filter rejects the null', T_stat_2N_4N_filter,'P-value', P_val_2N_4N_filter,'Sample size N', N_MJ_filter_2N_4N) else: print('2N and 4N Filter accepts the null', T_stat_2N_4N_filter,'P-value', P_val_2N_4N_filter,'Sample size N', N_MJ_filter_2N_4N) T_sign_2N_4N_filter, P_sign_2N_4N_filter = scipy.stats.wilcoxon(MJ_filter_2N_to_4_comon, MJ_filter_4N_to_2_comon) #3N to 4N T_stat_3N_4N, P_val_3N_4N = scipy.stats.ttest_ind(MJ_Phase_3N_to_4_comon,MJ_Phase_4N_to_3_comon, axis=0, equal_var=True) degree_3N_4N = (N_MJ_Phase_3N_4N -1) *Level_of_confidence if degree_3N_4N < abs(T_stat_3N_4N): print('3N and 4N Phase rejects the null', T_stat_3N_4N,'P-value', P_val_3N_4N,'Sample size N', N_MJ_Phase_3N_4N) else: print('3N and 4N Phase accepts the null', T_stat_3N_4N,'P-value', P_val_3N_4N,'Sample size N', N_MJ_Phase_3N_4N) T_sign_3N_4N, P_sign_3N_4N = scipy.stats.wilcoxon(MJ_Phase_3N_to_4_comon, MJ_Phase_4N_to_3_comon) T_stat_3N_4N_filter, P_val_3N_4N_filter = scipy.stats.ttest_ind(MJ_filter_3N_to_4_comon,MJ_filter_4N_to_3_comon, axis=0, equal_var=True) degree_3N_4N_filter = (N_MJ_filter_3N_4N -1) *Level_of_confidence if degree_3N_4N_filter < abs(T_stat_3N_4N_filter): print('3N and 4N Filter rejects the null', T_stat_3N_4N_filter,'P-value', P_val_3N_4N_filter,'Sample size N', N_MJ_filter_3N_4N) else: print('3N and 4N Filter accepts the null', T_stat_3N_4N_filter,'P-value', P_val_3N_4N_filter,'Sample size N', N_MJ_filter_3N_4N) T_sign_3N_4N_filter, P_sign_3N_4N_filter = scipy.stats.wilcoxon(MJ_filter_3N_to_4_comon, MJ_filter_4N_to_3_comon) whole_t_stat = [T_stat_1N_2N, T_stat_1N_3N, T_stat_1N_4N, T_stat_2N_3N, T_stat_3N_4N,T_stat_2N_4N] whole_p_test = [P_val_1N_2N,P_val_1N_3N,P_val_1N_4N,P_val_2N_3N,P_val_3N_4N,P_val_2N_4N] Whole_sample = [N_MJ_Phase_1N_2N, N_MJ_Phase_1N_3N, N_MJ_Phase_1N_4N, N_MJ_Phase_2N_3N, N_MJ_Phase_3N_4N,N_MJ_Phase_2N_4N] Whole_degree = [degree_1N_2N, degree_1N_3N, degree_1N_4N, degree_2N_3N, degree_3N_4N, degree_2N_4N] Whole_sighn_t_stat = [T_sign_1N_2N,T_sign_1N_3N,T_sign_1N_4N,T_sign_2N_3N,T_sign_3N_4N,T_sign_2N_4N] Whole_sighn_p_test = [P_sign_1N_2N,P_sign_1N_3N,P_sign_1N_4N,P_sign_2N_3N,P_sign_3N_4N, P_sign_3N_4N] STD_1 = [np.std(MJ_Phase_1N_to_2_comon), np.std(MJ_Phase_1N_to_3_comon),np.std(MJ_Phase_1N_to_4_comon),np.std(MJ_Phase_2N_to_3_comon),np.std(MJ_Phase_3N_to_4_comon),np.std(MJ_Phase_2N_to_4_comon)] Median_1 = [stat.median(MJ_Phase_1N_to_2_comon), stat.median(MJ_Phase_1N_to_3_comon),stat.median(MJ_Phase_1N_to_4_comon),stat.median(MJ_Phase_2N_to_3_comon),stat.median(MJ_Phase_3N_to_4_comon), stat.median(MJ_Phase_2N_to_4_comon)] Mean_1 = [np.average(MJ_Phase_1N_to_2_comon),np.average(MJ_Phase_1N_to_3_comon),np.average(MJ_Phase_1N_to_4_comon),np.average(MJ_Phase_2N_to_3_comon),np.average(MJ_Phase_3N_to_4_comon),np.average(MJ_Phase_2N_to_4_comon)] STD_2 = [np.std(MJ_Phase_2N_to_1_comon), np.std(MJ_Phase_3N_to_1_comon),np.std(MJ_Phase_4N_to_1_comon),np.std(MJ_Phase_3N_to_2_comon),np.std(MJ_Phase_4N_to_3_comon),np.std(MJ_Phase_4N_to_2_comon)] Median_2 = [stat.median(MJ_Phase_2N_to_1_comon), stat.median(MJ_Phase_3N_to_1_comon),stat.median(MJ_Phase_4N_to_1_comon),stat.median(MJ_Phase_3N_to_2_comon),stat.median(MJ_Phase_4N_to_3_comon),stat.median(MJ_Phase_4N_to_2_comon)] Mean_2 = [np.average(MJ_Phase_2N_to_1_comon),np.average(MJ_Phase_3N_to_1_comon),np.average(MJ_Phase_4N_to_1_comon),np.average(MJ_Phase_3N_to_2_comon),np.average(MJ_Phase_4N_to_3_comon),np.average(MJ_Phase_4N_to_2_comon)] No_hood_percent_days_Filtered = [sum(Filter_1N_day_count)/sum(Phase_1N_day_count),sum(Filter_2N_day_count)/sum(Phase_2N_day_count),sum(Filter_3N_day_count)/sum(Phase_3N_day_count),sum(Filter_4N_day_count)/sum(Phase_4N_day_count) ] hood_percent_days_Filtered = [sum(Filter_1H_day_count)/sum(Phase_1H_day_count),sum(Filter_2H_day_count)/sum(Phase_2H_day_count),sum(Filter_3H_day_count)/sum(Phase_3H_day_count)] Hood_percentage = {'Phase':['1H','2H','3H'], 'Percentatges of hood filter':hood_percent_days_Filtered} No_Hood_percentage = {'Phase':['1N','2N','3N','4N'],'Percentatges of No hood filter':No_hood_percent_days_Filtered} df_percent_hood = pd.DataFrame(Hood_percentage) df_percent_No_hood = pd.DataFrame(No_Hood_percentage) whole_t_stat_H = [T_stat_1H_2H, T_stat_1H_3H, T_stat_2H_3H] whole_p_test_H = [P_val_1H_2H,P_val_1H_3H,P_val_2H_3H] Whole_sample_H = [N_MJ_Phase_1H_2H, N_MJ_Phase_1H_3H,N_MJ_Phase_2H_3H] Whole_degree_H = [degree_1H_2H, degree_1H_3H, degree_2H_3H] Whole_sighn_t_stat_H = [T_sign_1H_2H,T_sign_1H_3H,T_sign_2H_3H] Whole_sighn_p_test_H = [P_sign_1H_2H,P_sign_1H_3H,P_sign_2H_3H] STD_1_H = [np.std(MJ_Phase_1H_to_2_comon), np.std(MJ_Phase_1H_to_3_comon),np.std(MJ_Phase_2H_to_3_comon)] Median_1_H = [stat.median(MJ_Phase_1H_to_2_comon), stat.median(MJ_Phase_1H_to_3_comon),stat.median(MJ_Phase_2H_to_3_comon)] Mean_1_H = [np.average(MJ_Phase_1H_to_2_comon),np.average(MJ_Phase_1H_to_3_comon),np.average(MJ_Phase_2H_to_3_comon)] STD_2_H = [np.std(MJ_Phase_2H_to_1_comon), np.std(MJ_Phase_3H_to_1_comon),np.std(MJ_Phase_3H_to_2_comon)] Median_2_H = [stat.median(MJ_Phase_2H_to_1_comon), stat.median(MJ_Phase_3H_to_1_comon),stat.median(MJ_Phase_3H_to_2_comon)] Mean_2_H = [np.average(MJ_Phase_2H_to_1_comon),np.average(MJ_Phase_3H_to_1_comon),np.average(MJ_Phase_3H_to_2_comon)] Non_filtered_no_hood = {'Phase':['1n-2N','1n-3n','1n-4n','2n-3n', '3n-4n','2n-4n'],'T-statistic':whole_t_stat, 'P Value':whole_p_test, 'T-statistic-Sign-Test':Whole_sighn_t_stat, 'P Vaue-Sign Test':Whole_sighn_p_test, 'Deggree of Confidence':Whole_degree, 'Sample Size':Whole_sample,'Std _1':STD_1,'median _1':Median_1,'mean _1':Mean_1,'Std _2':STD_2,'median _2':Median_2,'mean _2':Mean_2 } df_Non_filtered_no_hood = pd.DataFrame(Non_filtered_no_hood, columns=['Phase','T-statistic','P Value','T-statistic-Sign-Test', 'P Vaue-Sign Test','Deggree of Confidence','Sample Size', 'Std _1','median _1','mean _1','Std _2','median _2','mean _2']) Non_filtered_hood = {'Phase _Hood':['1H-2H','1H-3H','2H-3H'],'T-statistic':whole_t_stat_H, 'P Value':whole_p_test_H, 'T-statistic-Sign-Test':Whole_sighn_t_stat_H, 'P Vaue-Sign Test':Whole_sighn_p_test_H, 'Deggree of Confidence':Whole_degree_H, 'Sample Size':Whole_sample_H,'Std _1':STD_1_H,'median _1':Median_1_H,'mean _1':Mean_1_H,'Std _2':STD_2_H,'median _2':Median_2_H,'mean _2':Mean_2_H } df_Non_filtered_hood = pd.DataFrame(Non_filtered_hood, columns=['Phase _Hood','T-statistic','P Value','T-statistic-Sign-Test', 'P Vaue-Sign Test','Deggree of Confidence','Sample Size', 'Std _1','median _1','mean _1','Std _2','median _2','mean _2']) whole_t_stat_filter = [T_stat_1N_2N_filter, T_stat_1N_3N_filter, T_stat_1N_4N_filter, T_stat_2N_3N_filter, T_stat_3N_4N_filter, T_stat_2N_4N_filter] whole_p_test_filter = [P_val_1N_2N_filter,P_val_1N_3N_filter,P_val_1N_4N_filter,P_val_2N_3N_filter,P_val_3N_4N_filter, P_val_2N_4N_filter] Whole_sample_filter = [N_MJ_Phase_1N_2N, N_MJ_Phase_1N_3N, N_MJ_Phase_1N_4N, N_MJ_Phase_2N_3N, N_MJ_Phase_3N_4N, N_MJ_Phase_2N_4N] Whole_degree_filter = [degree_1N_2N, degree_1N_3N, degree_1N_4N, degree_2N_3N, degree_3N_4N, degree_2N_4N] Whole_sighn_t_stat_filter = [T_sign_1N_2N_filter,T_sign_1N_3N_filter,T_sign_1N_4N_filter,T_sign_2N_3N_filter,T_sign_3N_4N_filter,T_sign_2N_4N_filter] Whole_sighn_p_test_filter = [P_sign_1N_2N_filter ,P_sign_1N_3N_filter,P_sign_1N_4N_filter,P_sign_2N_3N_filter,P_sign_3N_4N_filter,P_sign_2N_4N_filter] whole_t_stat_filter_H = [T_stat_1H_2H_filter, T_stat_1H_3H_filter, T_stat_2H_3H_filter] whole_p_test_filter_H = [P_val_1H_2H_filter,P_val_1H_3H_filter,P_val_2H_3H_filter] Whole_sample_filter_H = [N_MJ_Phase_1H_2H, N_MJ_Phase_1H_3H, N_MJ_Phase_2H_3H] Whole_degree_filter_H = [degree_1H_2H, degree_1H_3H, degree_2H_3H] Whole_sighn_t_stat_filter_H = [T_sign_1H_2H_filter,T_sign_1H_3H_filter,T_sign_2H_3H_filter] Whole_sighn_p_test_filter_H = [P_sign_1H_2H_filter ,P_sign_1H_3H_filter,P_sign_2H_3H_filter] filtered_No_hood = {'Phase Filtered ':['1n-2N - Filter','1n-3n - Filter','1n-4n - Filter','2n-3n - Filter', '3n-4n - Filter','2n-4n - Filter'],'T-statistic':whole_t_stat_filter, 'P Value':whole_p_test_filter, 'T-statistic-Sign-Test':Whole_sighn_t_stat_filter, 'P Vaue-Sign Test':Whole_sighn_p_test_filter, 'Deggree of Confidence':Whole_degree_filter, 'Sample Size':Whole_sample_filter } df_filtered_No_hood = pd.DataFrame(filtered_No_hood, columns=['Phase Filtered ' ,'T-statistic','P Value','T-statistic-Sign-Test', 'P Vaue-Sign Test','Deggree of Confidence','Sample Size']) filtered_hood = {'Phase Filtered HOOD':['1H-2H - Filter','1H-3H - Filter','2H-3H - Filter'],'T-statistic':whole_t_stat_filter_H, 'P Value':whole_p_test_filter_H, 'T-statistic-Sign-Test':Whole_sighn_t_stat_filter_H, 'P Vaue-Sign Test':Whole_sighn_p_test_filter_H, 'Deggree of Confidence':Whole_degree_filter_H, 'Sample Size':Whole_sample_filter_H } df_filtered_hood = pd.DataFrame(filtered_hood, columns=['Phase Filtered HOOD' ,'T-statistic','P Value','T-statistic-Sign-Test', 'P Vaue-Sign Test','Deggree of Confidence','Sample Size']) Kj_per_sae_no_hood = {'median':[np.median(Mj_1N_Phase),np.median(Mj_2N_Phase),np.median(Mj_3N_Phase),np.median(Mj_4N_Phase)], 'Phase':['1n','2n','3n','4n']} df_Kj_per_sae_no_hood = pd.DataFrame(Kj_per_sae_no_hood) print(' this is the median filter for 1N----=-==-=-=-=-=-=-=-',np.mean(Mj_filter_1N_Phase) ) Kj_per_sae_filter_no_hood = {'median filter':[np.median(Mj_filter_1N_Phase),np.median(Mj_filter_2N_Phase),np.median(Mj_filter_3N_Phase),np.median(Mj_filter_4N_Phase)], 'Phase':['1n','2n','3n','4n']} df_Kj_per_sae_filter_no_hood = pd.DataFrame(Kj_per_sae_filter_no_hood) Kj_per_sae_mean_filter_no_hood = {'Mean filter':[np.mean(Mj_filter_1N_Phase),np.mean(Mj_filter_2N_Phase),np.mean(Mj_filter_3N_Phase),np.mean(Mj_filter_4N_Phase)], 'Phase':['1n','2n','3n','4n']} df_Kj_per_sae_mean_filter_no_hood = pd.DataFrame(Kj_per_sae_mean_filter_no_hood) Kj_per_sae_mean_no_hood = {'mean':[np.mean(Mj_1N_Phase),np.mean(Mj_2N_Phase),np.mean(Mj_3N_Phase),np.mean(Mj_4N_Phase)], 'Phase':['1n','2n','3n','4n']} df_Kj_per_sae_mean_no_hood = pd.DataFrame(Kj_per_sae_mean_no_hood) ###hood print('Hood section') Kj_per_sae_Hood = {'median':[np.median(Mj_1H_Phase),np.median(Mj_2H_Phase),np.median(Mj_3H_Phase)], 'Phase':['1H','2H','3H']} df_Kj_per_sae_Hood = pd.DataFrame(Kj_per_sae_Hood) Kj_per_sae_filter_Hood = {'median filter':[np.median(Mj_filter_1H_Phase),np.median(Mj_filter_2H_Phase),np.median(Mj_filter_3H_Phase)], 'Phase':['1H','2H','3H']} df_Kj_per_sae_filter_Hood = pd.DataFrame(Kj_per_sae_filter_Hood) Kj_per_sae_mean_filter_Hood = {'Mean filter':[np.mean(Mj_filter_1H_Phase),np.mean(Mj_filter_2H_Phase),np.mean(Mj_filter_3H_Phase)], 'Phase':['1H','2H','3H']} df_Kj_per_mean_filter_Hood = pd.DataFrame(Kj_per_sae_mean_filter_Hood) Kj_per_sae_mean_Hood = {'mean':[np.mean(Mj_1H_Phase),np.mean(Mj_2H_Phase),np.mean(Mj_3H_Phase)], 'Phase':['1H','2H','3H']} df_Kj_per_sae_mean_Hood = pd.DataFrame(Kj_per_sae_mean_Hood) pATH = "C:/Users/gvros/Box/OSU, CSC, CQC Project files/P_TEST_NO_HOOD_MJ_DAY_CHECH 2N_3N.csv" df_Non_filtered_no_hood.to_csv(pATH, index=False,mode='a') df_filtered_No_hood.to_csv(pATH, index=False,mode='a') df_Non_filtered_hood.to_csv(pATH, index=False,mode='a') df_filtered_hood.to_csv(pATH, index=False,mode='a') df_percent_hood.to_csv(pATH, index=False,mode='a') df_percent_No_hood.to_csv(pATH, index=False,mode='a') df_Kj_per_sae_no_hood.to_csv(pATH, index=False,mode='a') df_Kj_per_sae_filter_no_hood.to_csv(pATH, index=False,mode='a') df_Kj_per_sae_mean_filter_no_hood.to_csv(pATH, index=False,mode='a') df_Kj_per_sae_mean_no_hood.to_csv(pATH, index=False,mode='a') df_Kj_per_sae_Hood.to_csv(pATH, index=False,mode='a') df_Kj_per_sae_filter_Hood.to_csv(pATH, index=False,mode='a') df_Kj_per_sae_mean_Hood.to_csv(pATH, index=False,mode='a') df_Kj_per_mean_filter_Hood.to_csv(pATH, index=False,mode='a') MJ_Phase_1N_to_3_comon Mj_filter_3N_Phase
49.159705
230
0.735681
8,082
40,016
3.136105
0.02487
0.055512
0.011047
0.015466
0.920264
0.826915
0.752111
0.659631
0.57228
0.494989
0
0.065897
0.147491
40,016
813
231
49.220172
0.677083
0.041109
0
0.297297
0
0.006757
0.104736
0.008865
0
0
0
0
0
1
0
false
0
0.013514
0
0.013514
0.069257
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
877f631146ad69921013186190b9d5db6822a9f0
1,088
py
Python
build/lib/abp/openai/wrappers/reward_wrapper.py
LinearZoetrope/abp
2459c1b4d77606c1d70715ce8378d738ba102f37
[ "MIT" ]
null
null
null
build/lib/abp/openai/wrappers/reward_wrapper.py
LinearZoetrope/abp
2459c1b4d77606c1d70715ce8378d738ba102f37
[ "MIT" ]
9
2018-11-14T23:35:05.000Z
2019-05-22T18:31:30.000Z
build/lib/abp/openai/wrappers/reward_wrapper.py
Zaerei/abp
2459c1b4d77606c1d70715ce8378d738ba102f37
[ "MIT" ]
1
2018-11-14T22:34:09.000Z
2018-11-14T22:34:09.000Z
from gym import Wrapper import inspect import logging from functools import partial logger = logging.getLogger(__name__) class RewardWrapper(Wrapper): """ Adds support for reward decomposition of the environment. To support reward decompisition the environment has to return reward as a list of dictionary values Example: [ { "id": "unique ID of the type", "value": integer value indicating the reward got for this type, "description": description of the type (Can be used for explanation) } ] By default returns decomposed reward. It can be turned off by setting decompose_reward = False """ def __init__(self, env): super(RewardWrapper, self).__init__(env) def step(self, action, decompose_reward = True): #TODO THIS DOES NOT WORK!!!! args , _ = inspect.getargspec(self.unwrapped._step, ) if "decompose_reward" in args: self.unwrapped._step = partial(self.unwrapped._step, decompose_reward = decompose_reward) return self.env.step(action)
29.405405
103
0.67739
133
1,088
5.383459
0.533835
0.104749
0.071229
0
0
0
0
0
0
0
0
0
0.248162
1,088
36
104
30.222222
0.875306
0.448529
0
0
0
0
0.02952
0
0
0
0
0.027778
0
1
0.153846
false
0
0.307692
0
0.615385
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
0
0
0
1
0
1
0
0
3
878d95a107f2258d9e8294a80a09f8cc1dd09451
6,157
py
Python
apps/device/models.py
joewen85/mycmdb
b4855192a92c0a1f28f2af84d4f8cf7b215ff27c
[ "Apache-2.0" ]
2
2019-05-24T03:48:10.000Z
2020-07-01T14:58:31.000Z
apps/device/models.py
joewen85/mycmdb
b4855192a92c0a1f28f2af84d4f8cf7b215ff27c
[ "Apache-2.0" ]
null
null
null
apps/device/models.py
joewen85/mycmdb
b4855192a92c0a1f28f2af84d4f8cf7b215ff27c
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth.models import User from django.db import models # Create your models here. class Cloudips(models.Model): """服务器运营商""" cloudipsname = models.CharField(max_length=10, verbose_name="服务器运营商") describe = models.CharField(max_length=10, verbose_name="描述") created_at = models.DateTimeField(auto_now_add=True, verbose_name="创建时间") updated_at = models.DateTimeField(auto_now=True, verbose_name="修改时间") class Meta: verbose_name = "服务器运营商" verbose_name_plural = verbose_name def __str__(self): return self.describe class Envirment(models.Model): """服务器环境""" envname = models.CharField(max_length=20, verbose_name="服务器运行环境") describe = models.CharField(max_length=20, verbose_name="描述") created_at = models.DateTimeField(auto_now_add=True, verbose_name="创建时间") updated_at = models.DateTimeField(auto_now=True, verbose_name="修改时间") phpbin = models.CharField(max_length=100, verbose_name="PHP环境路径", null=True) vhost_path = models.CharField(max_length=100, verbose_name="网站虚拟目录路径", null=True) fastcgi_pass = models.CharField(max_length=64, verbose_name="后端PHP处理方式", null=True, blank=True) class Meta: verbose_name = "运行环境" verbose_name_plural = verbose_name def __str__(self): return self.describe class Jobs(models.Model): """任务""" jid = models.AutoField(primary_key=True) name = models.CharField(max_length=50, verbose_name="任务名称") path = models.CharField(max_length=100, verbose_name="任务路径") describe = models.CharField(max_length=50, verbose_name="描述") class Meta: verbose_name = "任务" verbose_name_plural = verbose_name def __str__(self): return self.name class Device(models.Model): """服务器详情""" hostname = models.CharField(max_length=50, verbose_name="服务器名称", null=False, unique=True, db_index=True) ipaddress = models.GenericIPAddressField(verbose_name='服务器IP地址', db_index=True) sshuser = models.CharField(max_length=20, verbose_name="服务器登陆用户") sshpassword = models.CharField(max_length=50, verbose_name="服务器登陆密码", null=False) websitepath = models.CharField(max_length=200, verbose_name="网站存放位置", null=False) envirment = models.ForeignKey(Envirment, verbose_name="运行环境", on_delete=models.DO_NOTHING) cloudips = models.ForeignKey(Cloudips, verbose_name="服务器运营商", on_delete=models.DO_NOTHING) customer_name = models.CharField(max_length=50, verbose_name="客户用户名", null=True) sshport = models.PositiveSmallIntegerField(verbose_name="服务器登陆端口", default=22) created_at = models.DateTimeField(auto_now_add=True, verbose_name="创建时间") updated_at = models.DateTimeField(auto_now=True, verbose_name="修改时间") # is_monitor = models.BooleanField(verbose_name="是否监控") is_maintenance = models.BooleanField(verbose_name="是否维护", default=0) maintenance_duration = models.CharField(max_length=25, verbose_name="维护期限", null=True, blank=True) deploy_times = models.IntegerField(verbose_name="部署队列和计划任务次数", default=0) deploy_weiqingshop_times = models.SmallIntegerField(verbose_name="部署框架与商城次数", default=0) deploy_frameworkshop_times = models.SmallIntegerField(verbose_name="部署微擎与商城次数", default=0) others = models.TextField(verbose_name="其他内容", null=True, blank=True) paid = models.BooleanField(verbose_name="商城收费客户", default=0) ftpuser = models.CharField(max_length=32, default='www', verbose_name="ftp用户名") ftppassword = models.CharField(max_length=32, verbose_name="ftp密码", null=True) mysqluser = models.CharField(max_length=32, default='root', verbose_name="mysql用户名") mysqlpassword = models.CharField(max_length=32, verbose_name="mysql密码", null=True) mysqladdress = models.CharField(max_length=64, default='127.0.0.1', verbose_name="mysql连接地址") # 商城版本 0为独立版,1为微擎版 shop_version = models.BooleanField(verbose_name="商城版本", default=0) mongodbuser = models.CharField(max_length=32, verbose_name='mongodb用户名', default='root') mongodbaddress = models.CharField(max_length=64, verbose_name='mongodb连接地址', default='127.0.0.1') class Meta: verbose_name = "用户设备信息" verbose_name_plural = verbose_name def __str__(self): return self.hostname class Deploy_record(models.Model): """部署队列和计划任务记录""" hostname = models.ForeignKey(Device, related_name='deploy_record', verbose_name="服务器名称", on_delete=models.CASCADE) # hostname = models.CharField(verbose_name="服务器名称", max_length=32, null=True) deploy_datetime = models.DateTimeField(auto_now_add=True, verbose_name="部署时间") desc = models.CharField(max_length=100, verbose_name="描述", null=True) operator = models.CharField(max_length=20, verbose_name="操作员", null=True) # operator = models.ForeignKey(User, verbose_name="操作员", on_delete=models.DO_NOTHING, null=True) remote_ip = models.GenericIPAddressField(verbose_name="远程访问地址", null=True) # jobname = models.ForeignKey(Jobs, on_delete=models.DO_NOTHING, null=True, verbose_name="任务名称") jobname = models.CharField(max_length=32, null=True, verbose_name="任务名称") result = models.TextField(null=True, verbose_name="执行任务结果") class Meta: verbose_name = "部署记录" verbose_name_plural = verbose_name def __str__(self): return "结果" class Password_record(models.Model): """独立密码表""" ipaddress = models.ForeignKey(Device, db_column="server_ip", related_name="PASSWORD", on_delete=models.CASCADE) sshpassword = models.CharField(max_length=600, verbose_name="服务器登陆密码", null=False) ftppassword = models.CharField(max_length=600, verbose_name="ftp密码", null=True) mysqlpassword = models.CharField(max_length=600, verbose_name="mysql密码", null=True) mongodbpassword = models.CharField(max_length=600, verbose_name="mongodb密码", null=True) def __str__(self): return "密码表" class Meta: verbose_name = "密码表" verbose_name_plural = verbose_name default_permissions = () permissions = ( ("select_table", "查看密码表"), ("change_table", "修改密码表"), ("decode_password", "解密加密密码") )
44.615942
118
0.726653
769
6,157
5.572172
0.231469
0.187398
0.126021
0.168028
0.502217
0.392765
0.377363
0.193932
0.144924
0.134656
0
0.017768
0.149911
6,157
137
119
44.941606
0.800917
0.065292
0
0.268041
0
0
0.076587
0
0
0
0
0
0
1
0.061856
false
0.113402
0.020619
0.061856
0.814433
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
3
87a1011f125122dd3d04b6f8cf1b937e02c1e3dd
171
py
Python
polls/apps.py
lesspointless/Shakal-NG
eee491af94527228735c2bca7644605effd74b37
[ "MIT" ]
null
null
null
polls/apps.py
lesspointless/Shakal-NG
eee491af94527228735c2bca7644605effd74b37
[ "MIT" ]
null
null
null
polls/apps.py
lesspointless/Shakal-NG
eee491af94527228735c2bca7644605effd74b37
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import AppConfig class PollConfig(AppConfig): name = 'polls' verbose_name = 'Ankety'
17.1
39
0.736842
21
171
5.714286
0.809524
0
0
0
0
0
0
0
0
0
0
0.006897
0.152047
171
9
40
19
0.82069
0.122807
0
0
0
0
0.074324
0
0
0
0
0
0
1
0
false
0
0.4
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
0
0
0
3
87a278be1ccedb0628c9ef1157d19b2e6b3c1e25
293
py
Python
examples/score_info.py
vnpnh/Pyvalo
ca9594ab4eb5620c0c5ef4d0fe0e139353986520
[ "MIT" ]
null
null
null
examples/score_info.py
vnpnh/Pyvalo
ca9594ab4eb5620c0c5ef4d0fe0e139353986520
[ "MIT" ]
null
null
null
examples/score_info.py
vnpnh/Pyvalo
ca9594ab4eb5620c0c5ef4d0fe0e139353986520
[ "MIT" ]
null
null
null
import valorant from valorant.utils.gameplay import enemy_score_info, own_score_info import time custom_config = valorant.config(tesseract=r'D:\Program Files\Tesseract-OCR\tesseract.exe') time.sleep(1) print(enemy_score_info(config=custom_config)) print(own_score_info(config=custom_config))
32.555556
90
0.843003
45
293
5.244444
0.488889
0.152542
0.118644
0.177966
0.228814
0
0
0
0
0
0
0.003623
0.05802
293
9
91
32.555556
0.851449
0
0
0
0
0
0.14966
0.112245
0
0
0
0
0
1
0
false
0
0.428571
0
0.428571
0.285714
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
0
0
0
3
87c92d8d5da39b66d6ed707eefdf2818509138ec
194
py
Python
mundo1/aula07e.py
dilsonm/CeV
8043be36b2da187065691d23ed5cb40fd65f806f
[ "MIT" ]
null
null
null
mundo1/aula07e.py
dilsonm/CeV
8043be36b2da187065691d23ed5cb40fd65f806f
[ "MIT" ]
null
null
null
mundo1/aula07e.py
dilsonm/CeV
8043be36b2da187065691d23ed5cb40fd65f806f
[ "MIT" ]
null
null
null
#entre com 2 notas e calcule a media n1 = int(input('Entre com a primeira nota : ')) n2 = int(input('Entre com a segun da nota : ')) m = (n1 + n2) / 2 print('A média das notas é: {}'.format(m))
32.333333
47
0.628866
37
194
3.297297
0.594595
0.196721
0.213115
0.262295
0.278689
0
0
0
0
0
0
0.038961
0.206186
194
5
48
38.8
0.753247
0.180412
0
0
0
0
0.5
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
0
0
3
87d94775dfc269bfd5b53a7776fb318972e95d87
413
py
Python
python/code_challenges/insertion_sort/insertion_sort.py
skrambelled/data-structures-and-algorithms
8eb55a75ecedd71433d0994b5128a34a3b1df3d1
[ "MIT" ]
null
null
null
python/code_challenges/insertion_sort/insertion_sort.py
skrambelled/data-structures-and-algorithms
8eb55a75ecedd71433d0994b5128a34a3b1df3d1
[ "MIT" ]
null
null
null
python/code_challenges/insertion_sort/insertion_sort.py
skrambelled/data-structures-and-algorithms
8eb55a75ecedd71433d0994b5128a34a3b1df3d1
[ "MIT" ]
1
2020-11-19T11:01:14.000Z
2020-11-19T11:01:14.000Z
def insertion_sort(the_list): """ In-place list sorting method """ i = 1 while i < len(the_list): elem = the_list[i] sorted_iterator = i-1 while elem < the_list[sorted_iterator] and sorted_iterator >= 0: the_list[sorted_iterator+1] = the_list[sorted_iterator] sorted_iterator -= 1 the_list[sorted_iterator + 1] = elem i += 1
22.944444
72
0.585956
55
413
4.127273
0.327273
0.215859
0.229075
0.370044
0.352423
0.317181
0.317181
0
0
0
0
0.024823
0.317191
413
17
73
24.294118
0.780142
0.067797
0
0
0
0
0
0
0
0
0
0
0
1
0.1
false
0
0
0
0.1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
87efad2af17b3cd2adfd43bbf0b9f344bb7234ab
1,940
py
Python
notebooks/OtherFiles/test_stats.py
johnnyhchen/EPEtutorials
861910248e0c47619103332897ff2732fc41c5b5
[ "MIT" ]
null
null
null
notebooks/OtherFiles/test_stats.py
johnnyhchen/EPEtutorials
861910248e0c47619103332897ff2732fc41c5b5
[ "MIT" ]
null
null
null
notebooks/OtherFiles/test_stats.py
johnnyhchen/EPEtutorials
861910248e0c47619103332897ff2732fc41c5b5
[ "MIT" ]
null
null
null
from nose.tools import assert_equal, assert_almost_equal, assert_true, \ assert_false, assert_raises, assert_is_instance from stats import mean, median, mode, std, var # mean tests def test_mean1(): obs = mean([0, 0, 0, 0]) exp = 0 assert_equal(obs, exp) obs = mean([0, 200]) exp = 100 assert_equal(obs, exp) obs = mean([0, -200]) exp = -100 assert_equal(obs, exp) obs = mean([0]) exp = 0 assert_equal(obs, exp) def test_floating_mean1(): obs = mean([1, 2]) exp = 1.5 assert_equal(obs, exp) # median tests def test_median1(): obs = median([0, 0, 0, 0]) exp = 0 assert_equal(obs, exp) obs = median([0, 0, 0, 1]) exp = 0 assert_equal(obs, exp) obs = median([0, 0, 1, 0, 0]) exp = 0 assert_equal(obs, exp) obs = median([0, 1, 2, 3, 4]) exp = 2 assert_equal(obs, exp) obs = median([0, 1, -1, 2, 3]) exp = 1 assert_equal(obs, exp) obs = median([0, 200]) exp = 100 assert_equal(obs, exp) obs = median([0, -200]) exp = -100 assert_equal(obs, exp) obs = median([0]) exp = 0 assert_equal(obs, exp) def test_floating_median1(): obs = mean([1, 2]) exp = 1.5 assert_equal(obs, exp) # FIXME Put Mode tests here def test_std1(): obs = std([0.0, 2.0]) exp = 1.0 assert_equal(obs, exp) def test_std2(): obs = std([]) exp = 0.0 assert_equal(obs, exp) def test_std3(): obs = std([0.0, 4.0]) exp = 2.0 assert_equal(obs, exp) def test_std4(): obs = std([1.0, 3.0]) exp = 1.0 assert_equal(obs, exp) def test_std5(): obs = std([1.0, 1.0, 1.0]) exp = 0.0 assert_equal(obs, exp) def test_std6(): obs = std([1e500]) exp = NotImplemented assert_equal(obs, exp) def test_std7(): obs = std([0.0, 1e4242]) exp = NotImplemented assert_equal(obs, exp) # FIXME Put Variance tests here
18.130841
72
0.568041
313
1,940
3.386581
0.153355
0.228302
0.277358
0.336792
0.667925
0.658491
0.572642
0.549057
0.521698
0.466981
0
0.088235
0.281443
1,940
106
73
18.301887
0.672166
0.040722
0
0.532468
0
0
0
0
0
0
0
0.009434
0.298701
1
0.142857
false
0
0.025974
0
0.168831
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
0
0
0
3
87f46acc417d33549fb22fa8d6f6aaf631b6c130
324
py
Python
stellarobservatory/stellarbeat_test.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
14
2019-05-29T09:45:00.000Z
2021-04-22T20:11:15.000Z
stellarobservatory/stellarbeat_test.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
10
2019-05-29T09:47:01.000Z
2020-09-15T20:34:55.000Z
stellarobservatory/stellarbeat_test.py
andrenarchy/stellar-observatory
0e1f6af4cdacae19248353f902686d8192130436
[ "MIT" ]
5
2019-05-29T07:33:02.000Z
2021-11-24T18:46:03.000Z
"""Stellarbeat tests""" from .stellarbeat import get_nodes_from_stellarbeat def test_stellarbeat_nodes(): """Test get_nodes_from_stellarbeat()""" nodes = get_nodes_from_stellarbeat() assert isinstance(nodes, list) for node in nodes: assert isinstance(node, dict) assert 'publicKey' in node
27
51
0.719136
39
324
5.692308
0.410256
0.27027
0.162162
0.310811
0
0
0
0
0
0
0
0
0.188272
324
11
52
29.454545
0.844106
0.157407
0
0
0
0
0.034351
0
0
0
0
0
0.428571
1
0.142857
false
0
0.142857
0
0.285714
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
3
87f61bd36c6c7e6b6a9b160a78c2024ba555ea14
2,125
gyp
Python
binding.gyp
satorumpen/node-pdfium-native
90e5bf8bc69c80620f9f4231ebf8e39ef1178b8c
[ "BSD-2-Clause" ]
69
2015-03-27T14:37:54.000Z
2022-01-05T10:04:01.000Z
binding.gyp
satorumpen/node-pdfium-native
90e5bf8bc69c80620f9f4231ebf8e39ef1178b8c
[ "BSD-2-Clause" ]
15
2015-04-03T02:33:53.000Z
2020-01-28T10:42:29.000Z
binding.gyp
satorumpen/node-pdfium-native
90e5bf8bc69c80620f9f4231ebf8e39ef1178b8c
[ "BSD-2-Clause" ]
21
2015-05-14T12:59:43.000Z
2021-12-11T16:31:21.000Z
{ 'includes': [ './common.gypi' ], 'target_defaults': { 'defines' : [ 'PNG_PREFIX', 'PNGPREFIX_H', 'PNG_USE_READ_MACROS', ], # 'include_dirs': [ # '<(DEPTH)/third_party/pdfium', # '<(DEPTH)/third_party/pdfium/third_party/freetype/include', # ], 'conditions': [ ['OS=="linux"', { 'conditions': [ ['target_arch=="x64"', { 'defines' : [ '_FX_CPU_=_FX_X64_', ], 'cflags': [ '-fPIC', ], }], ['target_arch=="ia32"', { 'defines' : [ '_FX_CPU_=_FX_X86_', ], }], ], }] ], 'msvs_disabled_warnings': [ 4005, 4018, 4146, 4333, 4345, 4267 ] }, 'targets': [ { 'target_name': 'node_pdfium', 'dependencies' : [ 'fx_lpng', './third_party/pdfium/pdfium.gyp:pdfium' ], 'sources': [ # is like "ls -1 src/*.cc", but gyp does not support direct patterns on # sources '<!@(["python", "tools/getSourceFiles.py", "src", "cc"])' ] }, { 'target_name': 'fx_lpng', 'type': 'static_library', 'dependencies': [ 'third_party/pdfium/pdfium.gyp:fxcodec', ], 'include_dirs': [ 'third_party/pdfium/core/src/fxcodec/fx_zlib/include/', ], 'sources': [ 'third_party/fx_lpng/include/fx_png.h', 'third_party/fx_lpng/src/fx_png.c', 'third_party/fx_lpng/src/fx_pngerror.c', 'third_party/fx_lpng/src/fx_pngget.c', 'third_party/fx_lpng/src/fx_pngmem.c', 'third_party/fx_lpng/src/fx_pngpread.c', 'third_party/fx_lpng/src/fx_pngread.c', 'third_party/fx_lpng/src/fx_pngrio.c', 'third_party/fx_lpng/src/fx_pngrtran.c', 'third_party/fx_lpng/src/fx_pngrutil.c', 'third_party/fx_lpng/src/fx_pngset.c', 'third_party/fx_lpng/src/fx_pngtrans.c', 'third_party/fx_lpng/src/fx_pngwio.c', 'third_party/fx_lpng/src/fx_pngwrite.c', 'third_party/fx_lpng/src/fx_pngwtran.c', 'third_party/fx_lpng/src/fx_pngwutil.c', ] } ] }
28.333333
79
0.542118
249
2,125
4.285141
0.341365
0.206186
0.179944
0.239925
0.355202
0.308341
0.28866
0
0
0
0
0.021583
0.280471
2,125
74
80
28.716216
0.676259
0.095059
0
0.220588
0
0
0.580763
0.392054
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
35527caa2b6732da28ddfecea002370d0e3ec4b8
287
py
Python
sshserveraudit/controller/abstract.py
zwiazeksyndykalistowpolski/ssh-server-audit
b493f3ea6117d9567310857cdf567c159f848cf8
[ "Apache-2.0" ]
2
2018-11-13T17:05:26.000Z
2019-04-14T08:07:02.000Z
sshserveraudit/controller/abstract.py
zwiazeksyndykalistowpolski/ssh-server-audit
b493f3ea6117d9567310857cdf567c159f848cf8
[ "Apache-2.0" ]
4
2018-11-05T06:31:22.000Z
2019-02-10T16:19:23.000Z
sshserveraudit/controller/abstract.py
zwiazeksyndykalistowpolski/ssh-server-audit
b493f3ea6117d9567310857cdf567c159f848cf8
[ "Apache-2.0" ]
null
null
null
from ..entity.host import Node class AbstractLoopController: configured_nodes = {} # type: dict[Node] def __init__(self, configured_volumes: dict): self.configured_nodes = configured_volumes @staticmethod def perform_check(node: Node) -> bool: pass
20.5
50
0.689895
31
287
6.096774
0.645161
0.15873
0
0
0
0
0
0
0
0
0
0
0.222997
287
13
51
22.076923
0.847534
0.055749
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.125
0.125
0
0.625
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
0
1
0
0
3
35618eee2c4b532209dc3ab971e134b0988be776
517
py
Python
thinc/neural/__init__.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
thinc/neural/__init__.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
thinc/neural/__init__.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
from ._classes.model import Model from ._classes.affine import Affine from ._classes.relu import ReLu from ._classes.softmax import Softmax from ._classes.elu import ELU from ._classes.maxout import Maxout from ._classes.embed import Embed from ._classes.static_vectors import StaticVectors #from ._classes.embed import HashEmbed #from .pooling import Pooling, mean_pool, max_pool from ._classes.convolution import ExtractWindow #from ._classes.batchnorm import BatchNorm #from ._classes.difference import Siamese
30.411765
50
0.829787
69
517
6
0.333333
0.318841
0.077295
0.10628
0
0
0
0
0
0
0
0
0.110251
517
16
51
32.3125
0.9
0.323017
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
357769ad55f826125a15326f5ebecefb6630c6b4
1,792
py
Python
tests/test_sets.py
r2evans/rediserver
329c24f3f57c99b00c25e89387790038c328ed1b
[ "MIT" ]
28
2018-02-13T12:45:00.000Z
2022-03-16T04:27:07.000Z
tests/test_sets.py
r2evans/rediserver
329c24f3f57c99b00c25e89387790038c328ed1b
[ "MIT" ]
1
2018-02-16T09:56:50.000Z
2018-02-16T09:56:50.000Z
tests/test_sets.py
r2evans/rediserver
329c24f3f57c99b00c25e89387790038c328ed1b
[ "MIT" ]
2
2018-08-12T12:50:23.000Z
2019-05-10T16:16:49.000Z
import pytest from redis.exceptions import ResponseError def test_add(redis): client = redis.ext.client assert client.sadd('test_key1', 10) == 1 assert redis.dict == {b'test_key1': {b'10'}} def test_add_multiple(redis): client = redis.ext.client assert client.sadd('test_key1', 10, 11) == 2 assert redis.dict == {b'test_key1': {b'10', b'11'}} def test_add_existing(redis): client = redis.ext.client client.sadd('test_key1', 10, 11) assert client.sadd('test_key1', 10, 11, 12) == 1 assert redis.dict == {b'test_key1': {b'10', b'11', b'12'}} def test_add_wrongtype(redis): client = redis.ext.client client.set('test_key1', 1) with pytest.raises(ResponseError, match='WRONGTYPE'): client.sadd('test_key1', 2) assert redis.dict == {b'test_key1': b'1'} assert client.get('test_key1') == b'1' def test_pop(redis): client = redis.ext.client client.sadd('test_key1', 10, 20) result = client.spop('test_key1') assert result in (b'10', b'20') assert redis.dict == {b'test_key1': {b'10', b'20'} - {result}} def test_pop_to_none(redis): client = redis.ext.client client.sadd('test_key1', 20) client.spop('test_key1') assert redis.dict == {} def test_pop_wrongtype(redis): client = redis.ext.client client.set('test_key1', 1) with pytest.raises(ResponseError, match='WRONGTYPE'): client.spop('test_key1') assert redis.dict == {b'test_key1': b'1'} assert client.get('test_key1') == b'1' def test_pop_empty(redis): client = redis.ext.client result = client.spop('test_key1') assert result is None assert redis.dict == {} def test_scard(redis): client = redis.ext.client client.sadd('test', 1) assert client.scard('test') == 1
25.239437
66
0.646205
269
1,792
4.167286
0.144981
0.149866
0.128457
0.152542
0.820696
0.772525
0.77074
0.639607
0.603033
0.513827
0
0.051831
0.192522
1,792
71
67
25.239437
0.722875
0
0
0.469388
0
0
0.133296
0
0
0
0
0
0.326531
1
0.183673
false
0
0.040816
0
0.22449
0
0
0
0
null
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
3580ac82d171260f7ba3546746c7eb16ebc44c94
612
bzl
Python
source/bazel/deps/buildfarm/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
33
2019-05-30T07:43:32.000Z
2021-12-30T13:12:32.000Z
source/bazel/deps/buildfarm/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
371
2019-05-16T15:23:50.000Z
2021-09-04T15:45:27.000Z
source/bazel/deps/buildfarm/get.bzl
luxe/unilang
6c8a431bf61755f4f0534c6299bd13aaeba4b69e
[ "MIT" ]
6
2019-08-22T17:37:36.000Z
2020-11-07T07:15:32.000Z
# Do not edit this file directly. # It was auto-generated by: code/programs/reflexivity/reflexive_refresh load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def buildfarm(): http_archive( name="buildfarm" , build_file="//bazel/deps/buildfarm:build.BUILD" , sha256="de2a18bbe1e6770be0cd54e93630fb1ee7bce937bff708eed16329033fbfe32b" , strip_prefix="bazel-buildfarm-355f816acf3531e9e37d860acf9ebbb89c9041c2" , urls = [ "https://github.com/Unilang/bazel-buildfarm/archive/355f816acf3531e9e37d860acf9ebbb89c9041c2.tar.gz", ], )
36
113
0.718954
58
612
7.465517
0.706897
0.050808
0
0
0
0
0
0
0
0
0
0.166994
0.168301
612
16
114
38.25
0.683694
0.165033
0
0
1
0
0.624016
0.389764
0
0
0
0
0
1
0.090909
true
0
0
0
0.090909
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
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
359b88d74a1e486fc0a836a15b483bf67c80bb0d
1,252
py
Python
slash/reporting/reporter_interface.py
omergertel/slash
7dd5710a05822bbbaadc6c6517cefcbaa6397eab
[ "BSD-3-Clause" ]
null
null
null
slash/reporting/reporter_interface.py
omergertel/slash
7dd5710a05822bbbaadc6c6517cefcbaa6397eab
[ "BSD-3-Clause" ]
null
null
null
slash/reporting/reporter_interface.py
omergertel/slash
7dd5710a05822bbbaadc6c6517cefcbaa6397eab
[ "BSD-3-Clause" ]
null
null
null
class ReporterInterface(object): def notify_before_console_output(self): pass def notify_after_console_output(self): pass def report_session_start(self, session): pass def report_session_end(self, session): pass def report_file_start(self, filename): pass def report_file_end(self, filename): pass def report_collection_start(self): pass def report_test_collected(self, all_tests, test): pass def report_collection_end(self, collected): pass def report_test_start(self, test): pass def report_test_end(self, test, result): if result.is_success(): self.report_test_success(test, result) elif result.is_skip(): self.report_test_skip(test, result) elif result.is_error(): self.report_test_error(test, result) else: assert result.is_failure() self.report_test_failure(test, result) def report_test_success(self, test, result): pass def report_test_skip(self, test, result): pass def report_test_error(self, test, result): pass def report_test_failure(self, test, result): pass
22.763636
53
0.634185
154
1,252
4.863636
0.207792
0.121495
0.208278
0.136182
0.377837
0.124166
0.124166
0
0
0
0
0
0.28754
1,252
54
54
23.185185
0.839686
0
0
0.358974
0
0
0
0
0
0
0
0
0.025641
1
0.384615
false
0.358974
0
0
0.410256
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
3
35a6d0f5162090af5143cd194d923e57d1d9678d
3,124
py
Python
autobahn/wamp/gen/wamp/proto/PublisherFeatures.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
1,670
2015-10-12T15:46:22.000Z
2022-03-30T22:12:53.000Z
autobahn/wamp/gen/wamp/proto/PublisherFeatures.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
852
2015-10-16T22:11:03.000Z
2022-03-27T07:57:01.000Z
autobahn/wamp/gen/wamp/proto/PublisherFeatures.py
rapyuta-robotics/autobahn-python
c08e9e352d526a7fd0885bb94706366a432ada1a
[ "MIT" ]
790
2015-10-15T08:46:12.000Z
2022-03-30T12:22:13.000Z
# automatically generated by the FlatBuffers compiler, do not modify # namespace: proto import flatbuffers class PublisherFeatures(object): __slots__ = ['_tab'] @classmethod def GetRootAsPublisherFeatures(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) x = PublisherFeatures() x.Init(buf, n + offset) return x # PublisherFeatures def Init(self, buf, pos): self._tab = flatbuffers.table.Table(buf, pos) # PublisherFeatures def PublisherIdentification(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False # PublisherFeatures def PublisherExclusion(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False # PublisherFeatures def SubscriberBlackwhiteListing(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False # PublisherFeatures def AcknowledgeEventReceived(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False # PublisherFeatures def PayloadTransparency(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False # PublisherFeatures def PayloadEncryptionCryptobox(self): o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) if o != 0: return bool(self._tab.Get(flatbuffers.number_types.BoolFlags, o + self._tab.Pos)) return False def PublisherFeaturesStart(builder): builder.StartObject(6) def PublisherFeaturesAddPublisherIdentification(builder, publisherIdentification): builder.PrependBoolSlot(0, publisherIdentification, 0) def PublisherFeaturesAddPublisherExclusion(builder, publisherExclusion): builder.PrependBoolSlot(1, publisherExclusion, 0) def PublisherFeaturesAddSubscriberBlackwhiteListing(builder, subscriberBlackwhiteListing): builder.PrependBoolSlot(2, subscriberBlackwhiteListing, 0) def PublisherFeaturesAddAcknowledgeEventReceived(builder, acknowledgeEventReceived): builder.PrependBoolSlot(3, acknowledgeEventReceived, 0) def PublisherFeaturesAddPayloadTransparency(builder, payloadTransparency): builder.PrependBoolSlot(4, payloadTransparency, 0) def PublisherFeaturesAddPayloadEncryptionCryptobox(builder, payloadEncryptionCryptobox): builder.PrependBoolSlot(5, payloadEncryptionCryptobox, 0) def PublisherFeaturesEnd(builder): return builder.EndObject()
44
149
0.736236
319
3,124
7.07837
0.22884
0.058902
0.116918
0.058459
0.405669
0.405669
0.405669
0.405669
0.405669
0.405669
0
0.010819
0.171575
3,124
70
150
44.628571
0.861669
0.066901
0
0.367347
1
0
0.001377
0
0
0
0
0
0
1
0.326531
false
0
0.020408
0.020408
0.653061
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
35ab6bb46d5ea3a3428510a20d49d4e18ba330d8
93
py
Python
setup.py
CerealBoxMedia/chunked_media
324d9b7d76323fa1ca5296d733b82dc5ab5f98c0
[ "BSD-2-Clause" ]
null
null
null
setup.py
CerealBoxMedia/chunked_media
324d9b7d76323fa1ca5296d733b82dc5ab5f98c0
[ "BSD-2-Clause" ]
null
null
null
setup.py
CerealBoxMedia/chunked_media
324d9b7d76323fa1ca5296d733b82dc5ab5f98c0
[ "BSD-2-Clause" ]
null
null
null
from setuptools import setup setup( install_requires = [ 'wagtail>=2.2', ] )
13.285714
28
0.591398
10
93
5.4
0.8
0
0
0
0
0
0
0
0
0
0
0.030303
0.290323
93
7
29
13.285714
0.787879
0
0
0
0
0
0.12766
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
35b7a9f37db695d8601da7acb4cafce29b1e1fba
121
py
Python
Modulo 2/Lista06/6.py
BelfortJoao/Programacao-1
2d463744379ad3e4b0f5882ad923aae7ff80197a
[ "MIT" ]
2
2021-08-17T14:02:13.000Z
2021-08-19T02:37:28.000Z
Modulo 2/Lista06/6.py
BelfortJoao/Programacao-1
2d463744379ad3e4b0f5882ad923aae7ff80197a
[ "MIT" ]
null
null
null
Modulo 2/Lista06/6.py
BelfortJoao/Programacao-1
2d463744379ad3e4b0f5882ad923aae7ff80197a
[ "MIT" ]
1
2021-09-05T20:18:45.000Z
2021-09-05T20:18:45.000Z
n = int(input("Qual o tamanho do vetor?")) x = [int(input()) for x in range(n)] for i in range(0, n, 2): print(x[i])
24.2
42
0.578512
26
121
2.692308
0.615385
0.228571
0
0
0
0
0
0
0
0
0
0.020833
0.206612
121
4
43
30.25
0.708333
0
0
0
0
0
0.198347
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
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
35b83d6804fa9ceddca70f6c9a575d60a1166523
955
py
Python
Examples/AppKit/CocoaBindings/ControlledPreferences/FontNameToDisplayNameTransformer.py
Khan/pyobjc-framework-Cocoa
f8b015ea2a72d8d78be6084fb12925c4785b8f1f
[ "MIT" ]
132
2015-01-01T10:02:42.000Z
2022-03-09T12:51:01.000Z
mac/pyobjc-framework-Cocoa/Examples/AppKit/CocoaBindings/ControlledPreferences/FontNameToDisplayNameTransformer.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
6
2015-01-06T08:23:19.000Z
2019-03-14T12:22:06.000Z
mac/pyobjc-framework-Cocoa/Examples/AppKit/CocoaBindings/ControlledPreferences/FontNameToDisplayNameTransformer.py
mba811/music-player
7998986b34cfda2244ef622adefb839331b81a81
[ "BSD-2-Clause" ]
27
2015-02-23T11:51:43.000Z
2022-03-07T02:34:18.000Z
# # FontNameToDisplayNameTransformer.py # ControlledPreferences # # Converted by u.fiedler on 04.02.05. # with great help from Bob Ippolito - Thank you Bob! # # The original version was written in Objective-C by Malcolm Crawford # at http://homepage.mac.com/mmalc/CocoaExamples/controllers.html from Foundation import * from AppKit import * class FontNameToDisplayNameTransformer(NSValueTransformer): """ Takes as input the fontName of a font as stored in user defaults, returns the displayed font name of the font to show to the user. """ def transformedValueClass(cls): return NSString transformedValueClass = classmethod(transformedValueClass) def allowsReverseTransformation(cls): return False allowsReverseTransformation = classmethod(allowsReverseTransformation) def transformedValue_(self, aValue): font = NSFont.fontWithName_size_(aValue, 12) return font.displayName()
31.833333
74
0.748691
104
955
6.846154
0.711538
0.025281
0
0
0
0
0
0
0
0
0
0.010283
0.18534
955
29
75
32.931034
0.904884
0.433508
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.166667
0.166667
0.916667
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
0
0
1
1
0
0
3
35bf440f5db6992617f0af44c679da91411cdc46
314
py
Python
source/ex12.py
aurelo/lphw
8e1ecddc52a7c91fd0f53d4174c1079c63a10a81
[ "MIT" ]
null
null
null
source/ex12.py
aurelo/lphw
8e1ecddc52a7c91fd0f53d4174c1079c63a10a81
[ "MIT" ]
null
null
null
source/ex12.py
aurelo/lphw
8e1ecddc52a7c91fd0f53d4174c1079c63a10a81
[ "MIT" ]
null
null
null
''' Already did exercise refactoring in file ex11 pydoc => module that automatically generates documentation from Python modules Usage on this file in windows, assuming file is on path, or you're in the same dir: python -m pydoc ex12 ''' def dummy(): """ function documentation """ print "dummy"
22.428571
83
0.713376
44
314
5.090909
0.795455
0
0
0
0
0
0
0
0
0
0
0.016129
0.210191
314
13
84
24.153846
0.887097
0
0
0
1
0
0.131579
0
0
0
0
0
0
0
null
null
0
0
null
null
0.5
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
3
35ca4b460f265963556c34b0a78ea63661c41efd
759
py
Python
sleap/__init__.py
Tyelab/sleap
67b4b3e762571e70beadf940a64ed62d9481dafe
[ "BSD-3-Clause-Clear" ]
null
null
null
sleap/__init__.py
Tyelab/sleap
67b4b3e762571e70beadf940a64ed62d9481dafe
[ "BSD-3-Clause-Clear" ]
null
null
null
sleap/__init__.py
Tyelab/sleap
67b4b3e762571e70beadf940a64ed62d9481dafe
[ "BSD-3-Clause-Clear" ]
null
null
null
import logging import sys # Setup logging to stdout logging.basicConfig(stream=sys.stdout, level=logging.INFO) # Import submodules we want available at top-level from sleap.version import __version__, versions from sleap.io.dataset import Labels, load_file from sleap.io.video import Video, load_video from sleap.instance import LabeledFrame, Instance, PredictedInstance, Track from sleap.skeleton import Skeleton import sleap.nn from sleap.nn.data import pipelines from sleap.nn import inference from sleap.nn.inference import load_model from sleap.nn.system import use_cpu_only, disable_preallocation from sleap.nn.system import summary as system_summary from sleap.nn.config import TrainingJobConfig, load_config from sleap.nn.evals import load_metrics
34.5
75
0.839262
114
759
5.473684
0.421053
0.173077
0.123397
0.054487
0.073718
0
0
0
0
0
0
0
0.108037
759
21
76
36.142857
0.921713
0.094862
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.9375
0
0.9375
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
0
1
0
1
0
1
0
0
3
35cc3dd135149af2098bb42e7ac3102a5e2dce14
137
py
Python
Medical-Record-Managment-System/notifications/urls.py
AtluriNikhil/College_Projects
23fa5d05e3c93691faa618a22fca858ba030ee5d
[ "Apache-2.0" ]
null
null
null
Medical-Record-Managment-System/notifications/urls.py
AtluriNikhil/College_Projects
23fa5d05e3c93691faa618a22fca858ba030ee5d
[ "Apache-2.0" ]
null
null
null
Medical-Record-Managment-System/notifications/urls.py
AtluriNikhil/College_Projects
23fa5d05e3c93691faa618a22fca858ba030ee5d
[ "Apache-2.0" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('remainder/', views.notification,name='blog-notifications'), ]
22.833333
69
0.737226
16
137
6.3125
0.75
0
0
0
0
0
0
0
0
0
0
0
0.131387
137
6
70
22.833333
0.84874
0
0
0
0
0
0.202899
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
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
0
0
0
3
ea23fdc25062e17a9ab20e8fc93b5205665b4662
174
py
Python
tests/step_1_unit/test_app.py
logikal-code/pyorbs
f43d15efd957c9b3fa68fde64ceab3c54f3016e7
[ "MIT" ]
7
2019-07-19T15:14:56.000Z
2019-07-31T01:57:41.000Z
tests/step_1_unit/test_app.py
logikal-code/pyorbs
f43d15efd957c9b3fa68fde64ceab3c54f3016e7
[ "MIT" ]
2
2019-09-16T07:29:42.000Z
2020-05-15T13:19:52.000Z
tests/step_1_unit/test_app.py
wbrp/pyorbs
f43d15efd957c9b3fa68fde64ceab3c54f3016e7
[ "MIT" ]
null
null
null
from pyorbs.app import main def test_keyboard_interrupt(mocker): mocker.patch('pyorbs.orbs.Orbs.list', side_effect=KeyboardInterrupt) assert main(args=['-l']) == 1
24.857143
72
0.735632
24
174
5.208333
0.833333
0
0
0
0
0
0
0
0
0
0
0.006579
0.126437
174
6
73
29
0.815789
0
0
0
0
0
0.132184
0.12069
0
0
0
0
0.25
1
0.25
false
0
0.25
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
1
0
0
0
0
0
0
0
3
ea468d39aa2592702058269c9e67946975d6af2c
514
py
Python
class_composition.py
nitinkumar0108/oops
73302b6fd230fa90ecb5f0981483c2991f05c4b4
[ "Apache-2.0" ]
1
2021-12-12T18:40:04.000Z
2021-12-12T18:40:04.000Z
class_composition.py
nitinkumar0108/oops
73302b6fd230fa90ecb5f0981483c2991f05c4b4
[ "Apache-2.0" ]
null
null
null
class_composition.py
nitinkumar0108/oops
73302b6fd230fa90ecb5f0981483c2991f05c4b4
[ "Apache-2.0" ]
null
null
null
#counter part of inheritance #inheritance means by this program- a bookself is a book #composition is - class Bookself: def __init__(self, *books): self.books=books def __str__(self): return f"Bookself with {len(self.books)} books." class Book: def __init__(self,name): self.name=name def __str__(self): return f"Book {self.name}" book=Book("Harry potter") book2=Book("Python") shelf=Bookself(book,book2) print(shelf)
22.347826
57
0.618677
66
514
4.575758
0.454545
0.089404
0.072848
0.10596
0.112583
0
0
0
0
0
0
0.005362
0.274319
514
23
58
22.347826
0.80429
0.190661
0
0.142857
0
0
0.184143
0
0
0
0
0
0
1
0.285714
false
0
0
0.142857
0.571429
0.071429
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
0
0
1
1
0
0
3
ea4cd3c26b422f73d8dc31f27b28df537a403e0c
308
py
Python
consensus/apps/user/views.py
OmidFarvid/Application-consensus
546e00991601e5da25ff3f6b4927379f2daec60b
[ "MIT" ]
null
null
null
consensus/apps/user/views.py
OmidFarvid/Application-consensus
546e00991601e5da25ff3f6b4927379f2daec60b
[ "MIT" ]
null
null
null
consensus/apps/user/views.py
OmidFarvid/Application-consensus
546e00991601e5da25ff3f6b4927379f2daec60b
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.views import View class IndexView(View): def get(self, request, *args, **kwargs): return redirect('/static/index.html') class LoginView(View): def get(self, request, *args, **kwargs): return redirect('/static/index.html')
23.692308
45
0.688312
39
308
5.435897
0.538462
0.09434
0.09434
0.132075
0.566038
0.566038
0.566038
0.566038
0.566038
0.566038
0
0
0.178571
308
12
46
25.666667
0.837945
0
0
0.5
0
0
0.116883
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
ea7a68e4009501e5937a4720cb48410ff4dcd159
281
py
Python
sphecius/__init__.py
douglasdaly/sphecius
df8fc8dd2add157c6360c2b66cb22ac6f0241051
[ "MIT" ]
1
2019-09-26T01:08:20.000Z
2019-09-26T01:08:20.000Z
sphecius/__init__.py
douglasdaly/sphecius
df8fc8dd2add157c6360c2b66cb22ac6f0241051
[ "MIT" ]
null
null
null
sphecius/__init__.py
douglasdaly/sphecius
df8fc8dd2add157c6360c2b66cb22ac6f0241051
[ "MIT" ]
1
2019-09-26T01:08:19.000Z
2019-09-26T01:08:19.000Z
# # Imports # from . import alphabets from . import ciphers from . import cryptanalysis from . import translators from . import data from .string_helpers import * # # All Setup # __all__ = [ 'alphabets', 'ciphers', 'cryptanalysis', 'translators', 'data' ]
13.380952
29
0.654804
28
281
6.392857
0.428571
0.27933
0
0
0
0
0
0
0
0
0
0
0.238434
281
20
30
14.05
0.836449
0.067616
0
0
0
0
0.173913
0
0
0
0
0
0
1
0
false
0
0.461538
0
0.461538
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3