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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
569266cad93419bd023cb20e34f11ff9f314e035
| 37
|
py
|
Python
|
unittesting/__init__.py
|
SpaceAppsXploration/semantic-data-chronos
|
f7908f50892781154d623f46303812e88fdecb57
|
[
"Apache-2.0"
] | 1
|
2017-06-15T17:51:19.000Z
|
2017-06-15T17:51:19.000Z
|
unittesting/__init__.py
|
SpaceAppsXploration/semantic-data-chronos
|
f7908f50892781154d623f46303812e88fdecb57
|
[
"Apache-2.0"
] | null | null | null |
unittesting/__init__.py
|
SpaceAppsXploration/semantic-data-chronos
|
f7908f50892781154d623f46303812e88fdecb57
|
[
"Apache-2.0"
] | null | null | null |
__author__ = 'lorenzo@pramantha.net'
| 18.5
| 36
| 0.783784
| 4
| 37
| 6.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.081081
| 37
| 1
| 37
| 37
| 0.735294
| 0
| 0
| 0
| 0
| 0
| 0.567568
| 0.567568
| 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
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5692d1cd965e3ff52311afc499308dc44d46db86
| 1,608
|
py
|
Python
|
galaxylearning/entity/job.py
|
ZJU-DistributedAI/GalaxyLearning
|
b56b7f6d74a93a06f439ffb8c206b3152b916e92
|
[
"Apache-2.0"
] | 4
|
2020-03-16T14:02:16.000Z
|
2021-10-03T10:24:29.000Z
|
galaxylearning/entity/job.py
|
ZJU-DistributedAI/GalaxyLearning
|
b56b7f6d74a93a06f439ffb8c206b3152b916e92
|
[
"Apache-2.0"
] | null | null | null |
galaxylearning/entity/job.py
|
ZJU-DistributedAI/GalaxyLearning
|
b56b7f6d74a93a06f439ffb8c206b3152b916e92
|
[
"Apache-2.0"
] | 3
|
2020-04-10T10:52:42.000Z
|
2021-11-23T04:01:43.000Z
|
class Job(object):
def __init__(self, server_host, job_id, train_strategy, train_model, train_model_class_name, aggregate_strategy,
distillation_alpha=None):
self.server_host = server_host
self.job_id = job_id
self.train_strategy = train_strategy
self.train_model = train_model
self.train_model_class_name = train_model_class_name
self.aggregate_strategy = aggregate_strategy
self.alpha = distillation_alpha
def set_server_host(self, server_host):
self.server_host = server_host
def set_job_id(self, job_id):
self.job_id = job_id
def get_job_id(self):
return self.job_id
def set_train_strategy(self, train_strategy):
self.train_strategy = train_strategy
def set_train_model(self, train_model):
self.train_model = train_model
def set_train_model_class_name(self, train_model_class_name):
self.train_model_class_name = train_model_class_name
def get_train_model_class_name(self):
return self.train_model_class_name
def get_server_host(self):
return self.server_host
def get_train_strategy(self):
return self.train_strategy
def get_train_model(self):
return self.train_model
def set_aggregate_stragety(self, aggregate_strategy):
self.aggregate_strategy = aggregate_strategy
def get_aggregate_strategy(self):
return self.aggregate_strategy
def set_distillation_alpha(self, alpha):
self.alpha = alpha
def get_distillation_alpha(self):
return self.alpha
| 29.777778
| 116
| 0.71393
| 216
| 1,608
| 4.87963
| 0.097222
| 0.170778
| 0.128083
| 0.162239
| 0.537002
| 0.148956
| 0.119545
| 0.119545
| 0.119545
| 0
| 0
| 0
| 0.225124
| 1,608
| 53
| 117
| 30.339623
| 0.845907
| 0
| 0
| 0.315789
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.394737
| false
| 0
| 0
| 0.184211
| 0.605263
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
569ff61758ff561abcce52bab2761526d2be0631
| 70
|
py
|
Python
|
test/test_cases/bad_end_google.py
|
PFacheris/flake8-function-definition
|
74e7ee29dd3bccb08e5636603e60aaa4b7e505af
|
[
"MIT"
] | null | null | null |
test/test_cases/bad_end_google.py
|
PFacheris/flake8-function-definition
|
74e7ee29dd3bccb08e5636603e60aaa4b7e505af
|
[
"MIT"
] | 1
|
2016-09-19T14:01:13.000Z
|
2016-09-20T00:36:41.000Z
|
test/test_cases/bad_end_google.py
|
PFacheris/flake8-function-definition
|
74e7ee29dd3bccb08e5636603e60aaa4b7e505af
|
[
"MIT"
] | null | null | null |
def foo(bar1, bar2, bar3,
bar4
): # FD102
return
| 14
| 25
| 0.471429
| 8
| 70
| 4.125
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.175
| 0.428571
| 70
| 4
| 26
| 17.5
| 0.65
| 0.071429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0
| 0.25
| 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
| 1
| 0
| 0
|
0
| 4
|
3b2175cbf600f0cbe87045aa53de5d1e55177e39
| 3,921
|
py
|
Python
|
iocage/tests/unit_tests/1000_cli_activate_test.py
|
project-fifo/iocage
|
1b8669bc2119718dbea8f2707a4eb4c92197c0f0
|
[
"BSD-2-Clause"
] | null | null | null |
iocage/tests/unit_tests/1000_cli_activate_test.py
|
project-fifo/iocage
|
1b8669bc2119718dbea8f2707a4eb4c92197c0f0
|
[
"BSD-2-Clause"
] | null | null | null |
iocage/tests/unit_tests/1000_cli_activate_test.py
|
project-fifo/iocage
|
1b8669bc2119718dbea8f2707a4eb4c92197c0f0
|
[
"BSD-2-Clause"
] | 1
|
2022-03-06T10:09:18.000Z
|
2022-03-06T10:09:18.000Z
|
import mock
import pytest
from iocage.cli.activate import\
(get_zfs_pools, set_zfs_pool_active_property, set_zfs_pool_comment)
@mock.patch('iocage.cli.activate.Popen.communicate')
def test_get_zfs_pools_multiple_pools(mock_communicate):
""" Fake the expected output from zpool list -H -o name
on a system with 3 ZFS pools
"""
mock_communicate.return_value = (b'tank0\ntank1\ntank2\n', None)
zpools = get_zfs_pools()
mock_communicate.assert_called()
assert zpools == ['tank0', 'tank1', 'tank2']
@mock.patch('iocage.cli.activate.Popen.communicate')
def test_get_zfs_pools_one_pool(mock_communicate):
""" Fake the expected output from zpool list -H -o name
on a system with 1 ZFS pool
"""
mock_communicate.return_value = (b'tank0\n', None)
zpools = get_zfs_pools()
mock_communicate.assert_called()
assert zpools == ['tank0']
@mock.patch('iocage.cli.activate.Popen.communicate')
def test_get_zfs_pools_no_pool(mock_communicate):
""" Fake the expected output from zpool list -H -o name
on a system with zero ZFS pool
"""
mock_communicate.return_value = (b'', None)
zpools = get_zfs_pools()
mock_communicate.assert_called()
assert zpools == []
@mock.patch('iocage.cli.activate.Popen.communicate')
def test_get_zfs_pools_bad_parameter(mock_communicate):
""" Fake zpool called with an incorrect parameter
(there is something in stderr), can save us when
updating the code
"""
mock_communicate.return_value = (b'',
b"""cannot open 'nope-parameter': no such pool\ncannot open '-o':
name must begin with a letter\ncannot open 'name': no such pool\n""")
with pytest.raises(RuntimeError):
zpools = get_zfs_pools()
mock_communicate.assert_called()
def test_set_zfs_pool_active_property_bad_param_zpool_name():
with pytest.raises(ValueError):
set_zfs_pool_active_property(None, True)
with pytest.raises(ValueError):
set_zfs_pool_active_property("", True)
with pytest.raises(ValueError):
set_zfs_pool_active_property(1, True)
with pytest.raises(ValueError):
set_zfs_pool_active_property([], True)
def test_set_zfs_pool_active_property_bad_param_activate():
with pytest.raises(ValueError):
set_zfs_pool_active_property("pool_name", None)
with pytest.raises(ValueError):
set_zfs_pool_active_property("pool_name", [])
with pytest.raises(ValueError):
set_zfs_pool_active_property("pool_name", 1)
@mock.patch('iocage.cli.activate.Popen.communicate')
def test_set_zfs_pool_active_property_ok(mock_communicate):
mock_communicate.return_value = (b'', b'')
set_zfs_pool_active_property("pool_name", True)
assert mock_communicate.called
@mock.patch('iocage.cli.activate.Popen.communicate')
def test_set_zfs_pool_active_property_fail(mock_communicate):
mock_communicate.return_value = (b'', b"cannot set property for 'tank0': invalid property 'foo'\n")
with pytest.raises(RuntimeError):
set_zfs_pool_active_property("pool_name", True)
with pytest.raises(RuntimeError):
set_zfs_pool_active_property("pool_name", False)
def test_set_zfs_pool_comment_bad_param ():
with pytest.raises(ValueError):
set_zfs_pool_comment(None, "comment")
with pytest.raises(ValueError):
set_zfs_pool_comment("", "comment")
with pytest.raises(ValueError):
set_zfs_pool_comment("pool", None)
with pytest.raises(ValueError):
set_zfs_pool_comment("pool", "")
@mock.patch('iocage.cli.activate.Popen.communicate')
def test_set_zfs_pool_comment_fail(mock_communicate):
mock_communicate.return_value = (b'', b"cannot set property for 'tank0': permission denied\n")
with pytest.raises(RuntimeError):
set_zfs_pool_comment("pool", "comment")
| 32.404959
| 106
| 0.713849
| 529
| 3,921
| 4.973535
| 0.166352
| 0.066515
| 0.087419
| 0.09122
| 0.831623
| 0.807298
| 0.781452
| 0.742683
| 0.659825
| 0.572786
| 0
| 0.004356
| 0.180311
| 3,921
| 121
| 107
| 32.404959
| 0.81425
| 0.091303
| 0
| 0.450704
| 0
| 0
| 0.151689
| 0.084439
| 0
| 0
| 0
| 0
| 0.112676
| 1
| 0.140845
| false
| 0
| 0.042254
| 0
| 0.183099
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3b32fdf75b3467d431db1e7094a2923c61191900
| 266
|
py
|
Python
|
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/shutnoshut/vlan/shutnoshut.py
|
miott/genielibs
|
6464642cdd67aa2367bdbb12561af4bb060e5e62
|
[
"Apache-2.0"
] | 94
|
2018-04-30T20:29:15.000Z
|
2022-03-29T13:40:31.000Z
|
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/shutnoshut/vlan/shutnoshut.py
|
miott/genielibs
|
6464642cdd67aa2367bdbb12561af4bb060e5e62
|
[
"Apache-2.0"
] | 67
|
2018-12-06T21:08:09.000Z
|
2022-03-29T18:00:46.000Z
|
pkgs/sdk-pkg/src/genie/libs/sdk/triggers/shutnoshut/vlan/shutnoshut.py
|
miott/genielibs
|
6464642cdd67aa2367bdbb12561af4bb060e5e62
|
[
"Apache-2.0"
] | 49
|
2018-06-29T18:59:03.000Z
|
2022-03-10T02:07:59.000Z
|
''' implementation for Vlan shut/noshut triggers'''
# import python
import time
# Genie Libs
from genie.libs.sdk.libs.utils.mapping import Mapping
from genie.libs.sdk.triggers.shutnoshut.shutnoshut import \
TriggerShutNoShut
| 24.181818
| 59
| 0.684211
| 30
| 266
| 6.066667
| 0.566667
| 0.148352
| 0.142857
| 0.175824
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.240602
| 266
| 10
| 60
| 26.6
| 0.90099
| 0.263158
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.75
| 0
| 0.75
| 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
| 1
| 0
| 1
| 0
|
0
| 4
|
3b390b33fcbd46bea207077a003fc21fc51b0b4a
| 25,211
|
py
|
Python
|
sos_trades_core/sos_processes/test/test_architecture/usecase_simple_architecture.py
|
os-climate/sostrades-core
|
bcaa9b5e393ffbd0963e75a9315b27caf8b0abd9
|
[
"Apache-2.0"
] | 8
|
2022-01-10T14:44:28.000Z
|
2022-03-31T08:57:14.000Z
|
sos_trades_core/sos_processes/test/test_architecture/usecase_simple_architecture.py
|
os-climate/sostrades-core
|
bcaa9b5e393ffbd0963e75a9315b27caf8b0abd9
|
[
"Apache-2.0"
] | null | null | null |
sos_trades_core/sos_processes/test/test_architecture/usecase_simple_architecture.py
|
os-climate/sostrades-core
|
bcaa9b5e393ffbd0963e75a9315b27caf8b0abd9
|
[
"Apache-2.0"
] | 1
|
2022-02-21T14:51:45.000Z
|
2022-02-21T14:51:45.000Z
|
'''
Copyright 2022 Airbus SAS
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.
'''
# mode: python; py-indent-offset: 4; tab-width: 8; coding:utf-8
from sos_trades_core.tools.post_processing.post_processing_factory import PostProcessingFactory
from sos_trades_core.study_manager.study_manager import StudyManager
import pandas as pd
class Study(StudyManager):
def __init__(self, execution_engine=None):
super().__init__(__file__, execution_engine=execution_engine)
def setup_usecase(self):
setup_data_list = []
rc = {'years': {0: 2020, 1: 2021, 2: 2022, 3: 2023, 4: 2024, 5: 2025, 6: 2026,
7: 2027, 8: 2028, 9: 2029, 10: 2030, 11: 2031, 12: 2032, 13: 2033,
14: 2034, 15: 2035, 16: 2036, 17: 2037, 18: 2038, 19: 2039, 20: 2040,
21: 2041, 22: 2042, 23: 2043, 24: 2044, 25: 2045, 26: 2046, 27: 2047,
28: 2048, 29: 2049, 30: 2050},
'RC': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0,
8: 0.0, 9: 0.0, 10: 64323897.55428336, 11: 57409078.5671979, 12: 54620637.608219706,
13: 54207292.24253589, 14: 54779480.32731821, 15: 55352873.01859482, 16: 55927289.62539155,
17: 55959248.076606065, 18: 56524273.4940786, 19: 57089516.22901938, 20: 58231306.553599775,
21: 59395932.68467176, 22: 60583851.3383652, 23: 61795528.36513251, 24: 63031438.93243516,
25: 64292067.71108387, 26: 65577909.06530554, 27: 66889467.246611655, 28: 68227256.5915439,
29: 69591801.72337477, 30: 70983637.75784227}}
rc_df = pd.DataFrame.from_dict(rc)
nrc = {'years': {0: 2020, 1: 2021, 2: 2022, 3: 2023, 4: 2024, 5: 2025, 6: 2026, 7: 2027, 8: 2028,
9: 2029, 10: 2030, 11: 2031, 12: 2032, 13: 2033, 14: 2034, 15: 2035, 16: 2036,
17: 2037, 18: 2038, 19: 2039, 20: 2040, 21: 2041, 22: 2042, 23: 2043, 24: 2044,
25: 2045, 26: 2046, 27: 2047, 28: 2048, 29: 2049, 30: 2050},
'NRC_wo_cont_dev': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 682667146.2192988,
5: 1044480733.7155272, 6: 1065370348.3898377, 7: 2173355510.715269,
8: 1108411310.4647872, 9: 1130579536.674083, 10: 384397042.4691883,
11: 392084983.318572, 12: 399926682.9849434, 13: 407925216.64464235,
14: 83216744.19550702, 15: 84881079.07941718, 16: 86578700.66100553,
17: 88310274.67422564, 18: 90076480.16771016, 19: 91878009.77106436,
20: 93715569.96648565, 21: 95589881.36581536, 22: 97501678.99313167,
23: 99451712.57299429, 24: 101440746.8244542, 25: 103469561.76094328,
26: 105538952.99616215, 27: 107649732.0560854, 28: 109802726.6972071,
29: 111998781.23115124, 30: 114238756.85577427},
'cont_dev': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0,
10: 179624454.04635397, 11: 254058239.99323192, 12: 299239460.53412145,
13: 277091094.04186505, 14: 253440357.1557377, 15: 232514278.0927365,
16: 236912462.07217875, 17: 237047840.62193426, 18: 239441333.3816121,
19: 246564378.63444492, 20: 251495666.20713386, 21: 256525579.53127646,
22: 261656091.12190202, 23: 266889212.9443401, 24: 272226997.2032269,
25: 277671537.1472915, 26: 283224967.8902373, 27: 288889467.24804205,
28: 294667256.5930029, 29: 300560601.72486293, 30: 306571813.75936025},
'PPE_LB_Airframe': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 109226743.39508781,
5: 167116917.39448434, 6: 170459255.74237403, 7: 347736881.714443,
8: 177345809.67436597, 9: 180892725.86785325, 10: 61503526.79507012,
11: 62733597.33097152, 12: 63988269.277590945, 13: 65268034.66314278,
14: 13314679.071281124, 15: 13580972.652706748, 16: 13852592.105760884,
17: 14129643.947876101, 18: 14412236.826833624, 19: 14700481.563370297,
20: 14994491.194637703, 21: 15294381.018530456, 22: 15600268.638901066,
23: 15912274.011679089, 24: 16230519.491912672, 25: 16555129.881750925,
26: 16886232.479385942, 27: 17223957.128973663, 28: 17568436.271553136,
29: 17919804.9969842, 30: 18278201.096923884},
'PPE_Machinery_Airframe': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 75093386.08412287, 5: 114892880.70870799,
6: 117190738.32288216, 7: 239069106.17867956, 8: 121925244.1511266,
9: 124363749.03414913, 10: 42283674.671610706, 11: 43129348.16504292,
12: 43991935.128343776, 13: 44871773.83091065, 14: 9153841.861505773,
15: 9336918.698735889, 16: 9523657.072710607, 17: 9714130.21416482,
18: 9908412.818448117, 19: 10106581.074817078, 20: 10308712.696313422,
21: 10514886.95023969, 22: 10725184.689244483, 23: 10939688.383029373,
24: 11158482.150689961, 25: 11381651.793703761, 26: 11609284.829577835,
27: 11841470.526169393, 28: 12078299.936692782, 29: 12319865.935426638,
30: 12566263.25413517},
'NRC_wo_Contingency': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 866987275.6985096, 5: 1326490531.8187196,
6: 1353020342.4550939, 7: 2760161498.608392, 8: 1407682364.2902799,
9: 1435836011.5760853, 10: 667808697.9822232, 11: 752006168.8078183,
12: 807146347.9249997, 13: 795156119.180561, 14: 359125622.28403157,
15: 340313248.52359635, 16: 346867411.9116558, 17: 349201889.4582008,
18: 353838463.194604, 19: 363249451.04369664, 20: 370514440.06457067,
21: 377924728.86586195, 22: 385483223.44317925, 23: 393192887.9120429,
24: 401056745.67028373, 25: 409077880.58368945, 26: 417259438.1953632,
27: 425604626.95927054, 28: 434116719.49845594, 29: 442799053.888425,
30: 451655034.9661936},
'NRC': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 866987275.6985093, 5: 1326490531.8187194,
6: 1353020342.4550939, 7: 2760161498.6083913, 8: 1407682364.2902799, 9: 1435836011.5760853,
10: 577996470.9590461, 11: 624977048.8112023, 12: 657526617.657939, 13: 656610572.1596284,
14: 232405443.70616278, 15: 224056109.47722805, 16: 228411180.87556636, 17: 230677969.1472337,
18: 234117796.50379798, 19: 239967261.7264742, 20: 244766606.96100372, 21: 249661939.10022375,
22: 254655177.8822282, 23: 259748281.43987283, 24: 264943247.0686703, 25: 270242112.0100437,
26: 275646954.2502446, 27: 281159893.3352495, 28: 286783091.20195454, 29: 292518753.0259935,
30: 298369128.08651346},
'NRC_amort': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 331087161.90935975, 5: 506563357.7213204,
6: 516694624.8757468, 7: 1054057034.7465235, 8: 537569087.7207271, 9: 548320469.4751415,
10: 186428959.62154815, 11: 190157538.8139791, 12: 193960689.59025866,
13: 197839903.3820639, 14: 40359340.28994103, 15: 41166527.09573985,
16: 41989857.63765465, 17: 42829654.79040775, 18: 43686247.886215895,
19: 44559972.84394021, 20: 45451172.300819024, 21: 46360195.746835396,
22: 47287399.66177211, 23: 48233147.655007556, 24: 49197810.60810771,
25: 50181766.82026986, 26: 51185402.156675264, 27: 52209110.19980877,
28: 53253292.40380495, 29: 54318358.25188104, 30: 55404725.416918665},
'NRC_non_amort': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 351579984.3099389, 5: 537917375.9942067,
6: 548675723.5140909, 7: 1119298475.9687455, 8: 570842222.7440602,
9: 582259067.1989413, 10: 108155855.82446316, 11: 74898324.5079768,
12: 56346263.127624154, 13: 71539766.24164599, 14: -83862774.67230287,
15: -72542587.06269094, 16: -73867388.01273853, 17: -73043300.42714924,
18: -73330434.40931177, 19: -75964152.39009833, 20: -77483435.4379003,
21: -79033104.14665824, 22: -80613766.22959146, 23: -82226041.5541833,
24: -83870562.38526696, 25: -85547973.63297233, 26: -87258933.10563171,
27: -89004111.76774439, 28: -90784194.00309923, 29: -92599877.88316125,
30: -94451875.44082451}}
nrc_df = pd.DataFrame.from_dict(nrc)
sale_price = {'years': {0: 2020, 1: 2021, 2: 2022, 3: 2023, 4: 2024, 5: 2025, 6: 2026, 7: 2027, 8: 2028,
9: 2029, 10: 2030, 11: 2031, 12: 2032, 13: 2033, 14: 2034, 15: 2035, 16: 2036,
17: 2037, 18: 2038, 19: 2039, 20: 2040, 21: 2041, 22: 2042, 23: 2043, 24: 2044,
25: 2045, 26: 2046, 27: 2047, 28: 2048, 29: 2049, 30: 2050},
'sale_price': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0,
7: 0.0, 8: 0.0, 9: 0.0, 10: 134820782.85142016, 11: 137517198.50844857,
12: 140267542.47861752, 13: 143072893.3281899, 14: 145934351.19475368,
15: 148853038.21864876, 16: 151830098.98302174, 17: 154866700.9626822, 18: 157964034.98193583, 19: 161123315.68157455,
20: 164345781.99520606, 21: 167632697.63511017, 22: 170985351.58781236, 23: 174405058.61956865, 24: 177893159.79196,
25: 181451022.9877992, 26: 185080043.44755518, 27: 188781644.3165063, 28: 192557277.20283645, 29: 196408422.74689317,
30: 200336591.20183104}}
sale_price_df = pd.DataFrame.from_dict(sale_price)
sls_qty = {'years': {0: 2020.0, 1: 2021.0, 2: 2022.0, 3: 2023.0, 4: 2024.0, 5: 2025.0, 6: 2026.0,
7: 2027.0, 8: 2028.0, 9: 2029.0, 10: 2030.0, 11: 2031.0, 12: 2032.0, 13: 2033.0,
14: 2034.0, 15: 2035.0, 16: 2036.0, 17: 2037.0, 18: 2038.0, 19: 2039.0, 20: 2040.0,
21: 2041.0, 22: 2042.0, 23: 2043.0, 24: 2044.0, 25: 2045.0, 26: 2046.0, 27: 2047.0,
28: 2048.0, 29: 2049.0, 30: 2050.0},
'quantity': {0: 331.0, 1: 303.0, 2: 275.0, 3: 247.0, 4: 219.0, 5: 191.0, 6: 163.0,
7: 135.0, 8: 107.0, 9: 79.0, 10: 51.0, 11: 23.0, 12: 131.0, 13: 481.0,
14: 658.0, 15: 731.0, 16: 757.0, 17: 810.0, 18: 790.0, 19: 784.0,
20: 741.0, 21: 731.0, 22: 715.0, 23: 713.0, 24: 678.0, 25: 625.0,
26: 585.0, 27: 561.0, 28: 551.0, 29: 496.0, 30: 498.0}}
sls_qty_df = pd.DataFrame.from_dict(sls_qty)
dmc = {'years': {0: 2020, 1: 2021, 2: 2022, 3: 2023, 4: 2024, 5: 2025, 6: 2026, 7: 2027, 8: 2028, 9: 2029,
10: 2030, 11: 2031, 12: 2032, 13: 2033, 14: 2034, 15: 2035, 16: 2036, 17: 2037, 18: 2038,
19: 2039, 20: 2040, 21: 2041, 22: 2042, 23: 2043, 24: 2044, 25: 2045, 26: 2046,
27: 2047, 28: 2048, 29: 2049, 30: 2050},
'DMC_age0': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0,
9: 0.0, 10: 176.619935113722, 11: 178.78693659961485, 12: 181.01311738890735,
13: 183.29907123382858, 14: 185.6454137741956, 15: 188.05278279336608,
16: 190.52183848110934, 17: 193.05326370331213, 18: 195.6477642784601,
19: 198.30606926086307, 20: 201.02893123061625, 21: 203.81712659031302,
22: 206.6714558685501, 23: 209.59274403028456, 24: 212.58184079412524,
25: 215.6396209566598, 26: 218.7669847239352, 27: 221.96485805022928,
28: 225.23419298426273, 29: 228.57596802301873, 30: 231.9911884733479},
'DMC_age1': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0, 10: 210.8044386841198, 11: 213.39085981244347, 12: 216.0479143028894, 13: 218.7763108274728, 14: 221.5767841821044, 15: 224.4500955920821, 16: 227.3970330258402, 17: 230.41841151685642, 18: 233.5150734936459, 19: 236.68788911780436, 20: 239.93775663009035, 21: 243.26560270456716, 22: 246.67238281085014, 23: 250.15908158453314, 24: 253.72671320589143, 25: 257.37632178698107, 26: 261.10898176727756, 27: 264.9257983180156, 28: 268.82790775541037, 29: 272.81647796295783, 30: 276.89270882302816}, 'DMC_age2': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0, 10: 353.239870227444, 11: 357.5738731992297, 12: 362.0262347778147, 13: 366.59814246765717, 14: 371.2908275483912, 15: 376.10556558673215, 16: 381.0436769622187, 17: 386.10652740662425, 18: 391.2955285569202, 19: 396.61213852172614, 20: 402.0578624612325, 21: 407.63425318062605, 22: 413.3429117371002, 23: 419.1854880605691, 24: 425.1636815882505, 25: 431.2792419133196, 26: 437.5339694478704, 27: 443.92971610045856, 28: 450.46838596852547, 29: 457.15193604603746, 30: 463.9823769466958}, 'DMC_age3': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0, 10: 415.9114601065067, 11: 421.01439908941546, 12: 426.2566957867819, 13: 431.63974838933825, 14: 437.16500662955735, 15: 442.83397238437817, 16: 448.64820029422526, 17: 454.60929839812206, 18: 460.7189287847609, 19: 466.9788082594518, 20: 473.39070902693504, 21: 479.95645939009194, 22: 486.6779444646503, 23: 493.5571069100249, 24: 500.5959476764885, 25: 507.7965267689085, 26: 515.1609640273314, 27: 522.6914399247335, 28: 530.390196382296, 29: 538.2595376025926, 30: 546.3018309211096}, 'DMC_age4': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0, 10: 478.5830499855693, 11: 484.4549249796014, 12: 490.487156795749, 13: 496.6813543110194, 14: 503.0391857107235, 15: 509.56237918202424, 16: 516.2527236262317, 17: 523.1120693896198, 18: 530.1423290126016, 19: 537.3454779971773, 20: 544.7235555926376, 21: 552.2786655995579, 22: 560.0129771922003, 23: 567.9287257594807, 24: 576.0282137647265, 25: 584.3138116244976, 26: 592.7879586067922, 27: 601.4531637490084, 28: 610.3120067960667, 29: 619.3671391591475, 30: 628.6212848955234}, 'DMC_age5': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0, 10: 569.7417261732968, 11: 576.7320535471445, 12: 583.9132818997011, 13: 591.2873265607375, 14: 598.8561734651471, 15: 606.6218799786003, 16: 614.5865757455141, 17: 622.7524635590715, 18: 631.1218202530971, 19: 639.6969976156873, 20: 648.4804233245685, 21: 657.4746019042357, 22: 666.6821157050003, 23: 676.1056259041437, 24: 685.7478735294363, 25: 695.6116805053542, 26: 705.6999507223717, 27: 716.0156711297719, 28: 726.5619128524604, 29: 737.3418323323186, 30: 748.3586724946707}, 'dmc_age': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0, 10: 149385.59431872598, 11: 333839.40227577987, 12: 652254.1689622328, 13: 1048116.013629717, 14: 1530521.9001072291, 15: 2126546.456794179, 16: 2761894.333916144, 17: 3435223.7930332934, 18: 4154540.3103080066, 19: 4911998.3925092295, 20: 5707151.813341541, 21: 6535872.008547012, 22: 7397855.571462019, 23: 8292975.251583261, 24: 9216509.434593195, 25: 10167775.383483423, 26: 11145556.259457968, 27: 12148618.87899763, 28: 13175244.301179323, 29: 14223140.29507968, 30: 14656387.873685045}, 'NRC_wo_cont_dev': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 992621085.028061, 5: 1518710260.0929334, 6: 1549084465.294792, 7: 3160132309.2013755, 8: 1611667477.6927018, 9: 1643900827.2465558, 10: 558926281.263829, 11: 570104806.8891057, 12: 581506903.0268877, 13: 593137041.0874255, 14: 120999956.3818348, 15: 123419955.5094715, 16: 125888354.61966093, 17: 128406121.71205416, 18: 130974244.14629523, 19: 133593729.02922115, 20: 136265603.60980558, 21: 138990915.68200168, 22: 141770733.99564174, 23: 144606148.67555454, 24: 147498271.6490657, 25: 150448237.082047, 26: 153457201.82368788, 27: 156526345.8601617, 28: 159656872.77736494, 29: 162850010.2329122, 30: 166107010.43757048}, 'cont_dev': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 0.0, 5: 0.0, 6: 0.0, 7: 0.0, 8: 0.0, 9: 0.0, 10: 132709405.85282089, 11: 186809472.0643056, 12: 218947900.1827935, 13: 201723477.3617778, 14: 183588823.26678458, 15: 167626101.52193978, 16: 170013584.4328817, 17: 169375808.7700985, 18: 170362966.2145667, 19: 174719437.5663355, 20: 177504162.6620391, 21: 180361514.83447984, 22: 183292542.61395732, 23: 186298325.1410851, 24: 189379972.5489935, 25: 192538626.35866466, 26: 195775459.8875309, 27: 199091678.6714741, 28: 202488520.90036955, 29: 205967257.8673235, 30: 209529194.43175867}, 'PPE_LB_Airframe': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 158819373.60448977, 5: 242993641.61486936, 6: 247853514.44716677, 7: 505621169.4722201, 8: 257866796.4308323, 9: 263024132.35944897, 10: 89428205.00221264, 11: 91216769.1022569, 12: 93041104.48430203, 13: 94901926.5739881, 14: 19359993.02109357, 15: 19747192.88151544, 16: 20142136.73914575, 17: 20544979.473928668, 18: 20955879.06340724, 19: 21374996.644675385, 20: 21802496.577568892, 21: 22238546.509120267, 22: 22683317.439302675, 23: 23136983.78808873, 24: 23599723.463850506, 25: 24071717.93312752, 26: 24553152.291790064, 27: 25044215.337625872, 28: 25545099.644378386, 29: 26056001.637265954, 30: 26577121.670011275}, 'PPE_Machinery_Airframe': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 109188319.35308671, 5: 167058128.61022267, 6: 170399291.18242714, 7: 347614554.01215136, 8: 177283422.5461972, 9: 180829090.99712116, 10: 61481890.93902119, 11: 62711528.757801615, 12: 63965759.33295765, 13: 65245074.519616805, 14: 13309995.202001829, 15: 13576195.106041864, 16: 13847719.008162702, 17: 14124673.388325958, 18: 14407166.856092477, 19: 14695310.193214327, 20: 14989216.397078615, 21: 15289000.725020185, 22: 15594780.739520589, 23: 15906676.354311002, 24: 16224809.881397223, 25: 16549306.079025166, 26: 16880292.200605668, 27: 17217898.044617783, 28: 17562256.005510144, 29: 17913501.125620343, 30: 18271771.148132753}, 'NRC_wo_Contingency': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 1260628777.9856374, 5: 1928762030.3180254, 6: 1967337270.9243858, 7: 4013368032.6857467, 8: 2046817696.6697314, 9: 2087754050.6031258, 10: 842545783.0578837, 11: 910842576.8134699, 12: 957461667.0269408, 13: 955007519.5428082, 14: 337258767.8717148, 15: 324369445.0189686, 16: 329891794.79985106, 17: 332451583.3444073, 18: 336700256.28036165, 19: 344383473.4334463, 20: 350561479.2464922, 21: 356879977.750622, 22: 363341374.78842235, 23: 369948133.9590394, 24: 376702777.54330695, 25: 383607887.4528643, 26: 390666106.20361453, 27: 397880137.9138794, 28: 405252749.327623, 29: 412786770.86312205, 30: 420485097.6874732}, 'NRC': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 1260628777.9856377, 5: 1928762030.3180254, 6: 1967337270.9243858, 7: 4013368032.685747, 8: 2046817696.6697314, 9: 2087754050.603126, 10: 842545783.0578837, 11: 910842576.8134698, 12: 957461667.026941, 13: 955007519.5428082, 14: 337258767.8717148, 15: 324369445.0189686, 16: 329891794.79985106, 17: 332451583.34440726, 18: 336700256.2803617, 19: 344383473.43344635, 20: 350561479.2464922, 21: 356879977.7506219, 22: 363341374.7884223, 23: 369948133.9590394, 24: 376702777.5433069, 25: 383607887.4528643, 26: 390666106.2036145, 27: 397880137.91387945, 28: 405252749.32762307, 29: 412786770.863122, 30: 420485097.6874731}, 'NRC_amort': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 372713207.41053647, 5: 570251207.3381208, 6: 581656231.4848832, 7: 1186578712.2291617, 8: 605155143.2368726, 9: 617258246.1016101, 10: 209867803.67454743, 11: 214065159.74803835, 12: 218346462.94299912, 13: 222713392.20185915, 14: 45433532.00917926, 15: 46342202.64936285, 16: 47269046.7023501, 17: 48214427.63639711, 18: 49178716.18912505, 19: 50162290.51290756, 20: 51165536.32316571, 21: 52188847.04962902, 22: 53232623.990621604, 23: 54297276.47043403, 24: 55383221.999842726, 25: 56490886.43983958, 26: 57620704.16863636, 27: 58773118.252009094, 28: 59948580.617049284, 29: 61147552.22939026, 30: 62370503.27397808}, 'NRC_non_amort': {0: 0.0, 1: 0.0, 2: 0.0, 3: 0.0, 4: 619907877.6175246, 5: 948459052.7548127, 6: 967428233.8099087, 7: 1973553596.972214, 8: 1006512334.4558295, 9: 1026642581.1449459, 10: 349058477.58928156, 11: 356039647.1410672, 12: 363160440.08388865, 13: 370423648.88556635, 14: 75566424.37265557, 15: 77077752.86010864, 16: 78619307.91731083, 17: 80191694.07565704, 18: 81795527.95717025, 19: 83431438.51631361, 20: 85100067.28663987, 21: 86802068.63237262, 22: 88538110.00502005, 23: 90308872.20512056, 24: 92115049.64922294, 25: 93957350.64220735, 26: 95836497.65505144, 27: 97753227.60815263, 28: 99708292.16031572, 29: 101702458.00352189, 30: 103736507.16359237}}
dmc_df = pd.DataFrame.from_dict(dmc)
activ_df = pd.DataFrame({'Business': ['Airbus', 'Airbus', 'Boeing'],
'AC_list': ['A320', 'A321', 737],
'AC_Sales': [True, True, True],
'Services': [True, True, False],
'FHS': [True, False, False]})
values_dict = {
f'{self.study_name}.Business.activation_df': activ_df,
f'{self.study_name}.nrc': nrc_df,
f'{self.study_name}.Business.A320.nrc': nrc_df,
f'{self.study_name}.Business.A321.nrc': nrc_df,
f'{self.study_name}.rc': rc_df,
f'{self.study_name}.dmc_df': dmc_df,
f'{self.study_name}.Business.A320.dmc_df': dmc_df,
f'{self.study_name}.Business.A321.dmc_df': dmc_df,
f'{self.study_name}.yearly_fh': 3306.723109872893,
f'{self.study_name}.Business.A320.yearly_fh': 3306.723109872893,
f'{self.study_name}.Business.A321.yearly_fh': 3306.723109872893,
f'{self.study_name}.sales_qty_df_ramped': sls_qty_df,
f'{self.study_name}.sale_price': sale_price_df,
f'{self.study_name}.WACC_actor': 8,
f'{self.study_name}.actor_name': 'Airbus',
f'{self.study_name}.actor_wacc': 8,
f'{self.study_name}.escalation_revenue_period2': 2.0,
f'{self.study_name}.year_start_escalation_revenue': 2020,
f'{self.study_name}.year_start_escalation_rc': 2020,
f'{self.study_name}.year_start_escalation_price': 2020,
f'{self.study_name}.manufacturer_name': 'Airbus',
f'{self.study_name}.EIS': 2030}
setup_data_list.append(values_dict)
return setup_data_list
if '__main__' == __name__:
uc_cls = Study()
uc_cls.load_data()
print(uc_cls.execution_engine.dm.get_value(
'usecase_simple_architecture.Business.activation_df'))
uc_cls.run()
# ppf = PostProcessingFactory()
# for disc in uc_cls.execution_engine.root_process.sos_disciplines:
# if disc.sos_name == 'Airbus':
# filters = ppf.get_post_processing_filters_by_discipline(
# disc)
# graph_list = ppf.get_post_processing_by_discipline(
# disc, filters, as_json=False)
#
# for graph in graph_list:
# graph.to_plotly()
| 116.179724
| 8,845
| 0.610606
| 3,321
| 25,211
| 4.580548
| 0.431497
| 0.025112
| 0.00493
| 0.006574
| 0.189982
| 0.150736
| 0.147055
| 0.137392
| 0.118328
| 0.108073
| 0
| 0.683593
| 0.256356
| 25,211
| 216
| 8,846
| 116.717593
| 0.1278
| 0.040736
| 0
| 0.034483
| 0
| 0
| 0.048788
| 0.033808
| 0
| 0
| 0
| 0
| 0
| 1
| 0.011494
| false
| 0
| 0.017241
| 0
| 0.04023
| 0.005747
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3b67741092ee08f64764247dcb3517f76f517e1b
| 113
|
py
|
Python
|
elvia/types/common.py
|
andersem/elvia-python
|
cd71d13e1200845c93222dffed53baaa3a136bd4
|
[
"MIT"
] | null | null | null |
elvia/types/common.py
|
andersem/elvia-python
|
cd71d13e1200845c93222dffed53baaa3a136bd4
|
[
"MIT"
] | null | null | null |
elvia/types/common.py
|
andersem/elvia-python
|
cd71d13e1200845c93222dffed53baaa3a136bd4
|
[
"MIT"
] | null | null | null |
from typing_extensions import TypedDict
class CustomerContract(TypedDict):
startTime: str
endTime: str
| 16.142857
| 39
| 0.778761
| 12
| 113
| 7.25
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176991
| 113
| 6
| 40
| 18.833333
| 0.935484
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
3b6f12acccf4f926a75b0719a710025ee03bc50f
| 169
|
py
|
Python
|
problem0669.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
problem0669.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
problem0669.py
|
kmarcini/Project-Euler-Python
|
d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3
|
[
"BSD-3-Clause"
] | null | null | null |
###########################
#
# #669 The King's Banquet - Project Euler
# https://projecteuler.net/problem=669
#
# Code by Kevin Marciniak
#
###########################
| 18.777778
| 41
| 0.473373
| 16
| 169
| 5
| 0.9375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.040268
| 0.118343
| 169
| 8
| 42
| 21.125
| 0.496644
| 0.585799
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3b933563fc80b8fe68d1b6435ab7769cf6846aab
| 90
|
py
|
Python
|
contak/apps.py
|
dasfrosty/contak-service
|
49808b6232e751138e0e17683045540fbe5861d1
|
[
"MIT"
] | null | null | null |
contak/apps.py
|
dasfrosty/contak-service
|
49808b6232e751138e0e17683045540fbe5861d1
|
[
"MIT"
] | null | null | null |
contak/apps.py
|
dasfrosty/contak-service
|
49808b6232e751138e0e17683045540fbe5861d1
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class ContakAppConfig(AppConfig):
name = "contak"
| 15
| 33
| 0.755556
| 10
| 90
| 6.8
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 90
| 5
| 34
| 18
| 0.906667
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8e8b09c131ac6da52f50590d3b1d0a6f68847c9b
| 636
|
py
|
Python
|
libotp/__init__.py
|
SuperM0use24/TT-CL-Edition
|
fdad8394f0656ae122b687d603f72afafd220c65
|
[
"MIT"
] | null | null | null |
libotp/__init__.py
|
SuperM0use24/TT-CL-Edition
|
fdad8394f0656ae122b687d603f72afafd220c65
|
[
"MIT"
] | 1
|
2021-06-08T17:16:48.000Z
|
2021-06-08T17:16:48.000Z
|
libotp/__init__.py
|
SuperM0use24/TT-CL-Edition
|
fdad8394f0656ae122b687d603f72afafd220c65
|
[
"MIT"
] | 3
|
2021-06-03T05:36:36.000Z
|
2021-06-22T15:07:31.000Z
|
from movement.CImpulse import CImpulse
from movement.CMover import CMover
from nametag import NametagGlobals
from nametag.ChatBalloon import ChatBalloon
from nametag.ClickablePopup import ClickablePopup
from nametag.MarginManager import MarginManager
from nametag.MarginPopup import MarginPopup
from nametag.Nametag import Nametag
from nametag.Nametag2d import Nametag2d
from nametag.Nametag3d import Nametag3d
from nametag.NametagFloat2d import NametagFloat2d
from nametag.NametagFloat3d import NametagFloat3d
from nametag.NametagGroup import NametagGroup
from nametag.WhisperPopup import WhisperPopup
from nametag._constants import *
| 39.75
| 49
| 0.882075
| 73
| 636
| 7.671233
| 0.246575
| 0.255357
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.013889
| 0.09434
| 636
| 15
| 50
| 42.4
| 0.958333
| 0
| 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
| 1
| 0
|
0
| 4
|
8ebc0a6c65ad600577cb9ece01e067e35c86155e
| 156
|
py
|
Python
|
app/__init__.py
|
paulmunyao/Daily-Dossier-News
|
84deac7e58148dc2a2e539ccf670d945b34c6d6b
|
[
"Unlicense"
] | null | null | null |
app/__init__.py
|
paulmunyao/Daily-Dossier-News
|
84deac7e58148dc2a2e539ccf670d945b34c6d6b
|
[
"Unlicense"
] | null | null | null |
app/__init__.py
|
paulmunyao/Daily-Dossier-News
|
84deac7e58148dc2a2e539ccf670d945b34c6d6b
|
[
"Unlicense"
] | null | null | null |
from flask import Flask
from config import DevelopmentConfig
app = Flask(__name__)
app.config.from_object(DevelopmentConfig)
from app import routes,errors
| 22.285714
| 41
| 0.839744
| 21
| 156
| 6
| 0.47619
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.108974
| 156
| 7
| 42
| 22.285714
| 0.906475
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.6
| 0
| 0.6
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d90ba9911ad6ab56814a796a79d97402a9504f8f
| 18
|
py
|
Python
|
monte_carlo_tree_search/constants.py
|
TomaszOdrzygozdz/gym-splendor
|
aeb00605e105628188143a4bbd6280e9eb41c4f9
|
[
"MIT"
] | 1
|
2020-03-09T18:56:01.000Z
|
2020-03-09T18:56:01.000Z
|
monte_carlo_tree_search/constants.py
|
TomaszOdrzygozdz/gym-splendor
|
aeb00605e105628188143a4bbd6280e9eb41c4f9
|
[
"MIT"
] | null | null | null |
monte_carlo_tree_search/constants.py
|
TomaszOdrzygozdz/gym-splendor
|
aeb00605e105628188143a4bbd6280e9eb41c4f9
|
[
"MIT"
] | 1
|
2019-10-25T13:09:40.000Z
|
2019-10-25T13:09:40.000Z
|
INFINITY = 10 ** 4
| 18
| 18
| 0.611111
| 3
| 18
| 3.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 0.222222
| 18
| 1
| 18
| 18
| 0.571429
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d91c58edfa632d450e7b4251fff4c575497a2fac
| 112
|
py
|
Python
|
tests/run_win32.py
|
gitter-badger/pywebview
|
2770330bc265b65dedd7874d579c2c9fde22159e
|
[
"BSD-3-Clause"
] | 1
|
2021-11-22T05:24:27.000Z
|
2021-11-22T05:24:27.000Z
|
tests/run_win32.py
|
gitter-badger/pywebview
|
2770330bc265b65dedd7874d579c2c9fde22159e
|
[
"BSD-3-Clause"
] | null | null | null |
tests/run_win32.py
|
gitter-badger/pywebview
|
2770330bc265b65dedd7874d579c2c9fde22159e
|
[
"BSD-3-Clause"
] | 3
|
2021-02-09T22:27:34.000Z
|
2021-12-28T14:49:23.000Z
|
import os
import pytest
if __name__ == '__main__':
os.environ['PYWEBVIEW_GUI'] = 'win32'
pytest.main()
| 16
| 41
| 0.669643
| 14
| 112
| 4.714286
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.021978
| 0.1875
| 112
| 7
| 42
| 16
| 0.703297
| 0
| 0
| 0
| 0
| 0
| 0.230089
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 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
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d9221f490274b6d01c3d8715693bbdf9e1bb0e14
| 215
|
py
|
Python
|
backend/forum/rating/apps.py
|
karolyi/forum-django
|
a498be3123deb836e0108258c493b88c645b2163
|
[
"MIT"
] | 7
|
2016-09-20T11:49:49.000Z
|
2017-06-24T23:51:56.000Z
|
backend/forum/rating/apps.py
|
karolyi/forum-django
|
a498be3123deb836e0108258c493b88c645b2163
|
[
"MIT"
] | 17
|
2019-12-22T10:41:48.000Z
|
2021-11-17T10:58:50.000Z
|
backend/forum/rating/apps.py
|
karolyi/forum-django
|
a498be3123deb836e0108258c493b88c645b2163
|
[
"MIT"
] | 1
|
2016-09-20T11:50:57.000Z
|
2016-09-20T11:50:57.000Z
|
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class RatingConfig(AppConfig):
name = 'forum.rating'
verbose_name = _('Forum: Ratings')
label = 'forum_rating'
| 23.888889
| 55
| 0.744186
| 26
| 215
| 5.961538
| 0.692308
| 0.129032
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.167442
| 215
| 8
| 56
| 26.875
| 0.865922
| 0
| 0
| 0
| 0
| 0
| 0.176744
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d939e72704fcce76236bc784a19c4d674e6ae773
| 739
|
py
|
Python
|
modules/eris/problem2.py
|
Datsmir/eris-calibration
|
3af4691b948fb076e2bb49bd1e367bd6315beae6
|
[
"Apache-2.0"
] | null | null | null |
modules/eris/problem2.py
|
Datsmir/eris-calibration
|
3af4691b948fb076e2bb49bd1e367bd6315beae6
|
[
"Apache-2.0"
] | null | null | null |
modules/eris/problem2.py
|
Datsmir/eris-calibration
|
3af4691b948fb076e2bb49bd1e367bd6315beae6
|
[
"Apache-2.0"
] | null | null | null |
class Problem2:
def __init__(self, campoints=None, campoints_true = None, robposes=None):
self._campoints = campoints
self._robposes = robposes
self._campoints_true = campoints_true
@property
def campoints(self):
return self._campoints
@campoints.setter
def campoints(self, campoints):
self._campoints = campoints
@property
def campoints_true(self):
return self._campoints_true
@campoints_true.setter
def campoints_true(self, campoints_true):
self._campoints_true = campoints_true
@property
def robposes(self):
return self._robposes
@robposes.setter
def robposes(self, robposes):
self._robposes = robposes
| 25.482759
| 77
| 0.67253
| 78
| 739
| 6.076923
| 0.153846
| 0.274262
| 0.14346
| 0.164557
| 0.299578
| 0.172996
| 0.172996
| 0
| 0
| 0
| 0
| 0.001812
| 0.253045
| 739
| 29
| 78
| 25.482759
| 0.856884
| 0
| 0
| 0.391304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.304348
| false
| 0
| 0
| 0.130435
| 0.478261
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
|
0
| 4
|
d93c68b7594e29fecfa2bfa50b8038a9a3d2d4b1
| 320
|
py
|
Python
|
pypy/translator/cli/test/test_backendopt.py
|
camillobruni/pygirl
|
ddbd442d53061d6ff4af831c1eab153bcc771b5a
|
[
"MIT"
] | 12
|
2016-01-06T07:10:28.000Z
|
2021-05-13T23:02:02.000Z
|
pypy/translator/cli/test/test_backendopt.py
|
woodrow/pyoac
|
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
|
[
"MIT"
] | null | null | null |
pypy/translator/cli/test/test_backendopt.py
|
woodrow/pyoac
|
b5dc59e6a38e7912db47f26fb23ffa4764a3c0e7
|
[
"MIT"
] | 2
|
2016-07-29T07:09:50.000Z
|
2016-10-16T08:50:26.000Z
|
import py
from pypy.translator.cli.test.runtest import compile_function
from pypy.translator.oosupport.test_template.backendopt import BaseTestOptimizedSwitch
class TestOptimizedSwitch(BaseTestOptimizedSwitch):
def getcompiled(self, fn, annotation):
return compile_function(fn, annotation, backendopt=True)
| 40
| 86
| 0.83125
| 35
| 320
| 7.514286
| 0.657143
| 0.060837
| 0.136882
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.103125
| 320
| 7
| 87
| 45.714286
| 0.916376
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.5
| 0.166667
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
d93f089d4756a20eb4d6209bed2de2de89f12410
| 103
|
py
|
Python
|
atws/monkeypatch/__init__.py
|
cyclops26/python-atws
|
764f93a35982c49066f03354c79670d7defe0bb7
|
[
"MIT"
] | 34
|
2016-04-17T13:11:53.000Z
|
2021-12-30T21:39:34.000Z
|
atws/monkeypatch/__init__.py
|
cyclops26/python-atws
|
764f93a35982c49066f03354c79670d7defe0bb7
|
[
"MIT"
] | 68
|
2015-10-23T08:11:49.000Z
|
2021-11-29T15:58:59.000Z
|
atws/monkeypatch/__init__.py
|
cyclops26/python-atws
|
764f93a35982c49066f03354c79670d7defe0bb7
|
[
"MIT"
] | 21
|
2016-08-02T20:33:25.000Z
|
2022-01-04T21:56:20.000Z
|
from __future__ import absolute_import
from .duckpunch import DuckPunch
monkey_patch = DuckPunch()
| 25.75
| 38
| 0.815534
| 12
| 103
| 6.5
| 0.583333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.145631
| 103
| 4
| 39
| 25.75
| 0.886364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.666667
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
d946ff722b5918ac722789e72e96cf22287cecf4
| 18
|
py
|
Python
|
tornado/version.py
|
hhru/tornado
|
0faa69c3c98049f4542546a686d03bd94bdf070a
|
[
"Apache-2.0"
] | 1
|
2016-07-01T07:48:01.000Z
|
2016-07-01T07:48:01.000Z
|
tornado/version.py
|
hhru/tornado
|
0faa69c3c98049f4542546a686d03bd94bdf070a
|
[
"Apache-2.0"
] | 2
|
2016-07-01T08:00:14.000Z
|
2017-11-23T07:36:05.000Z
|
tornado/version.py
|
hhru/tornado
|
0faa69c3c98049f4542546a686d03bd94bdf070a
|
[
"Apache-2.0"
] | null | null | null |
version = '5.1.1'
| 9
| 17
| 0.555556
| 4
| 18
| 2.5
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.2
| 0.166667
| 18
| 1
| 18
| 18
| 0.466667
| 0
| 0
| 0
| 0
| 0
| 0.277778
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d95e97b4ced928aaccfed63f85bbb85da1796d04
| 217
|
py
|
Python
|
maintenance_calendar/parser/json/json_node_collection_parser.py
|
Fiware/ops.Maintenance-calendar
|
636244f70e03ba45c943b68b847cad16ce3b66c8
|
[
"Apache-2.0"
] | null | null | null |
maintenance_calendar/parser/json/json_node_collection_parser.py
|
Fiware/ops.Maintenance-calendar
|
636244f70e03ba45c943b68b847cad16ce3b66c8
|
[
"Apache-2.0"
] | null | null | null |
maintenance_calendar/parser/json/json_node_collection_parser.py
|
Fiware/ops.Maintenance-calendar
|
636244f70e03ba45c943b68b847cad16ce3b66c8
|
[
"Apache-2.0"
] | null | null | null |
from flask import json
from maintenance_calendar.parser.json.json_parser import JSONParser
class JSONNodeCollectionParser(JSONParser):
def __init__(self):
super(JSONNodeCollectionParser, self).__init__()
| 31
| 67
| 0.806452
| 23
| 217
| 7.173913
| 0.608696
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.124424
| 217
| 7
| 68
| 31
| 0.868421
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
8dcc191251e9bb591b28f0c72e65d435581689d5
| 1,062
|
py
|
Python
|
General.py
|
AllVides/DB_EDD_G9
|
2ad5805ac1a2e37a09466cc4e30026ea90c6ad03
|
[
"MIT"
] | null | null | null |
General.py
|
AllVides/DB_EDD_G9
|
2ad5805ac1a2e37a09466cc4e30026ea90c6ad03
|
[
"MIT"
] | null | null | null |
General.py
|
AllVides/DB_EDD_G9
|
2ad5805ac1a2e37a09466cc4e30026ea90c6ad03
|
[
"MIT"
] | null | null | null |
import MainG as j
# LLAMADA DE METODOS COMO EL EJEMPLO DEL INGE
print(j.createDatabase('db1')) # 0
print(j.createDatabase('db1')) # 2
print(j.createDatabase('db4')) # 0
print(j.createDatabase('db5')) # 0
print(j.alterDatabase('db5','db1')) # 3
print(j.alterDatabase('db5','db2')) # 0
print(j.dropDatabase('db4')) # 0
print(j.showDatabases()) # ['db1','db2']
# test Tables CRUD
print(j.createTable('db1','tb4',3)) # 0
print(j.createTable('db1','tb4',3)) # 3
print(j.createTable('db1','tb1',3)) # 0
print(j.createTable('db1','tb2',3)) # 0
print(j.alterTable('db1','tb4','tb3')) # 0
print(j.dropTable('db1','tb3')) # 0
#print(j.alterAddPK('db1','tb1',0)) # 1
#print(j.alterAddPK('db1','tb1',[0])) # 0
print(j.showTables('db1')) # ['tb1', 'tb2']
# test Registers CRUD
print(j.insert('db1','tb1',[1,1])) # 5
print(j.insert('db1','tb1',['1','line','one'])) # 0
print(j.loadCSV('tb1.csv','db1','tb1')) # [0, 0, 0, 0, 0]
print(j.extractTable('db1','tb1'))
| 36.62069
| 65
| 0.56403
| 155
| 1,062
| 3.864516
| 0.290323
| 0.210351
| 0.15192
| 0.133556
| 0.258765
| 0.258765
| 0
| 0
| 0
| 0
| 0
| 0.082462
| 0.189266
| 1,062
| 29
| 66
| 36.62069
| 0.61324
| 0.225989
| 0
| 0.2
| 0
| 0
| 0.135508
| 0
| 0
| 0
| 0
| 0.034483
| 0
| 1
| 0
| true
| 0
| 0.05
| 0
| 0.05
| 0.95
| 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
8ddc6898208aa7308717de4ab718df136226f243
| 285
|
py
|
Python
|
UnityEngine/MaterialGlobalIlluminationFlags/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
UnityEngine/MaterialGlobalIlluminationFlags/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
UnityEngine/MaterialGlobalIlluminationFlags/__init__.py
|
Grim-es/udon-pie-auto-completion
|
c2cd86554ed615cdbbb01e19fa40665eafdfaedc
|
[
"MIT"
] | null | null | null |
from UdonPie import UnityEngine
from UdonPie.Undefined import *
class MaterialGlobalIlluminationFlags:
def __new__(cls, arg1=None):
'''
:returns: MaterialGlobalIlluminationFlags
:rtype: UnityEngine.MaterialGlobalIlluminationFlags
'''
pass
| 23.75
| 59
| 0.701754
| 21
| 285
| 9.333333
| 0.714286
| 0.112245
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.004566
| 0.231579
| 285
| 11
| 60
| 25.909091
| 0.890411
| 0.326316
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.4
| 0
| 0.8
| 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
| 1
| 0
| 1
| 0
|
0
| 4
|
8df8932a9ee1c0e6b032f6fe22dd32a5d4ea9300
| 38,295
|
py
|
Python
|
BancoDeDados_Local.py
|
gpenello/ControleDeUso
|
9b9a26879a43459c56b8f7e3292f144745f13c5c
|
[
"MIT"
] | null | null | null |
BancoDeDados_Local.py
|
gpenello/ControleDeUso
|
9b9a26879a43459c56b8f7e3292f144745f13c5c
|
[
"MIT"
] | null | null | null |
BancoDeDados_Local.py
|
gpenello/ControleDeUso
|
9b9a26879a43459c56b8f7e3292f144745f13c5c
|
[
"MIT"
] | null | null | null |
import sqlite3
from sqlite3 import Error
import datetime
import csv
import urllib.request as urllib2
import os
dir_path = os.path.dirname(os.path.realpath(__file__))
class BancoDeDados():
def __init__(self, arquivo):
try:
os.makedirs(os.path.join(dir_path, 'log'))
except FileExistsError:
# directory already exists
pass
self.conn = self.create_connection(arquivo)
if self.rpi_online():
self.hora_inicio = str(datetime.datetime.now())[:-7]
else:
self.hora_inicio = '[RPI OFFLINE]' + str(datetime.datetime.now())[:-7]
def rpi_online(self):
try:
urllib2.urlopen('http://www.google.com', timeout=1)
return True
# except urllib2.URLError:
except:
return False
def fechar_conn(self):
self.conn.close()
def create_table_admin(self):
nova_tabela = "CREATE TABLE IF NOT EXISTS admin(id INTEGER PRIMARY " +\
"KEY, tag TEXT, login TEXT, nome TEXT UNIQUE, email TEXT, " +\
"senha TEXT)"
try:
c = self.conn.cursor()
c.execute(nova_tabela)
except Error as e:
print(e)
def create_table_variaveis(self):
nova_tabela = "CREATE TABLE IF NOT EXISTS variaveis(id INTEGER PRIMARY " +\
"KEY, variavel TEXT UNIQUE, valor TEXT)"
try:
c = self.conn.cursor()
c.execute(nova_tabela)
except Error as e:
print(e)
def create_table_usuarios(self):
nova_tabela = "CREATE TABLE IF NOT EXISTS usuarios(id INTEGER PRIMARY " +\
"KEY, tag TEXT UNIQUE, login TEXT UNIQUE, nome TEXT UNIQUE, email TEXT, adicionado_por TEXT, " +\
"permissao TEXT, senha TEXT, grupo TEXT)"
try:
c = self.conn.cursor()
c.execute(nova_tabela)
except Error as e:
print(e)
def create_table_usuarios_antigos(self):
nova_tabela = "CREATE TABLE IF NOT EXISTS usuarios_antigos(id INTEGER PRIMARY " +\
"KEY, tag TEXT UNIQUE, login TEXT UNIQUE, nome TEXT UNIQUE, email TEXT, adicionado_por TEXT, " +\
"permissao TEXT, senha TEXT, grupo TEXT)"
try:
c = self.conn.cursor()
c.execute(nova_tabela)
except Error as e:
print(e)
def create_table_autorizacao_equip(self):
nova_tabela = '''CREATE TABLE IF NOT EXISTS autorizacao_equip(id INTEGER
PRIMARY KEY, equipamento TEXT, login TEXT, nome TEXT, super TEXT,
UNIQUE(login, equipamento))'''
try:
c = self.conn.cursor()
c.execute(nova_tabela)
except Error as e:
print(e)
def create_table_presenca(self):
nova_tabela = '''CREATE TABLE IF NOT EXISTS presenca(id INTEGER
PRIMARY KEY, login TEXT, nome TEXT, tag TEXT, hora_entrada TEXT,
hora_saida TEXT)'''
try:
c = self.conn.cursor()
c.execute(nova_tabela)
except Error as e:
print(e)
def create_table_uso_equip(self):
nova_tabela = '''CREATE TABLE IF NOT EXISTS uso_equip(id INTEGER PRIMARY
KEY, login TEXT, nome TEXT, equipamento TEXT, hora_inicio TEXT, hora_fim TEXT,
tempo_total TEXT, comentario TEXT, situacao Text)'''
try:
c = self.conn.cursor()
c.execute(nova_tabela)
except Error as e:
print(e)
def create_connection(self, arquivo):
""" create a database connection to a SQLite database """
try:
self.conn = sqlite3.connect(arquivo)
if self.conn is not None:
self.create_table_usuarios() # criando tabela usuarios
self.create_table_usuarios_antigos() # criando tabela usuarios antigos
self.create_table_admin()
self.create_table_variaveis()
self.create_table_autorizacao_equip() # tabela de autorizacoes
# criando controle de uso de equip.
self.create_table_uso_equip()
self.create_table_presenca()
self.create_csv_files()
# password = cript.hash_password(password)
# self.add_novo_admin("sem tag", "admin", "Administrador-Germano", "gpenello@gmail.com", password)
else:
print("Error! cannot create the database connection.")
return self.conn
except Error as e:
print(e)
return None
def create_csv_files(self):
try:
open(os.path.join(dir_path, 'log/tabela_uso_equip.csv'), 'r')
except IOError:
with open(
os.path.join(dir_path, 'log/tabela_uso_equip.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow([
"id", "login", "nome", "equipamento", "hora_inicio", "hora_fim",
"tempo_total", "comentário", "situação"
])
try:
open(os.path.join(dir_path, 'log/tabela_presenca.csv'), 'r')
except IOError:
with open(os.path.join(dir_path, 'log/tabela_presenca.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow(
["id", "login","nome", "tag", "hora_entrada", "hora_saida"])
try:
open(os.path.join(dir_path, 'log/tabela_autorizacao_equip.csv'),'r')
except IOError:
with open(
os.path.join(dir_path, 'log/tabela_autorizacao_equip.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow(["id", "equipamento", "login", "nome", "super"])
try:
open(os.path.join(dir_path, 'log/tabela_usuarios.csv'), 'r')
except IOError:
with open(os.path.join(dir_path, 'log/tabela_usuarios.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow([
"id", "tag", "login", "nome", "email", "adicionado_por",
"permissao", "senha", "grupo/orientador"
])
try:
open(os.path.join(dir_path, 'log/tabela_usuarios_antigos.csv'), 'r')
except IOError:
with open(os.path.join(dir_path, 'log/tabela_usuarios_antigos.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow([
"id", "tag", "login", "nome", "email", "adicionado_por",
"permissao", "senha", "grupo/orientador"
])
def check_tabela_presenca(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM presenca")
rows = cur.fetchall()
return rows
except Error as e:
print(e)
def check_tabela_variaveis(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM variaveis")
rows = cur.fetchall()
return rows
except Error as e:
print(e)
def check_tabela_usuarios(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM usuarios")
rows = cur.fetchall()
return rows
except Error as e:
print(e)
def check_tabela_usuarios_antigos(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM usuarios_antigos")
rows = cur.fetchall()
return rows
except Error as e:
print(e)
# def check_lista_usuarios(self):
def check_lista_nomes_usuarios(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT nome FROM usuarios")
rows = cur.fetchall()
return [item[0] for item in rows]
except Error as e:
print(e)
def check_lista_logins_usuarios(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT login FROM usuarios")
rows = cur.fetchall()
return [item[0] for item in rows]
except Error as e:
print(e)
def check_tabela_autorizacao_equip(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM autorizacao_equip")
rows = cur.fetchall()
return rows
except Error as e:
print(e)
def check_tabela_uso_equip(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM uso_equip")
rows = cur.fetchall()
return rows
except Error as e:
print(e)
def export_all_db_to_csv(self):
tabela_uso_equip = self.check_tabela_uso_equip()
tabela_autorizacao_equip = self.check_tabela_autorizacao_equip()
tabela_usuarios = self.check_tabela_usuarios()
tabela_usuarios_antigos = self.check_tabela_usuarios_antigos()
tabela_presenca = self.check_tabela_presenca()
with open(os.path.join(dir_path, 'log/tabela_uso_equip.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow([
"id", "login", "nome", "equipamento", "hora_inicio", "hora_fim",
"tempo_total", "comentario", "situacao"
])
for row in tabela_uso_equip:
spamwriter.writerow(row)
with open(
os.path.join(dir_path, 'log/tabela_autorizacao_equip.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow(["id", "equipamento", "login", "nome", "super"])
for row in tabela_autorizacao_equip:
spamwriter.writerow(row)
with open(os.path.join(dir_path, 'log/tabela_usuarios.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow([
"id", "tag", "login", "nome", "email", "adicionado_por", "permissao",
"senha", "grupo/orientador"
])
for row in tabela_usuarios:
spamwriter.writerow(row)
with open(os.path.join(dir_path, 'log/tabela_usuarios_antigos.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow([
"id", "tag", "login", "nome", "email", "adicionado_por", "permissao",
"senha", "grupo/orientador"
])
for row in tabela_usuarios_antigos:
spamwriter.writerow(row)
with open(os.path.join(dir_path, 'log/tabela_presenca.csv'),
'w+') as csv_file:
spamwriter = csv.writer(csv_file, delimiter=';')
spamwriter.writerow(
["id", "login", "nome", "tag", "hora_entrada", "hora_saida"])
for row in tabela_presenca:
spamwriter.writerow(row)
def add_novo_admin(self,nome,email,password):
try:
sql = "INSERT INTO admin(tag, login, nome, email, senha) VALUES(?,?,?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, ("sem tag", "admin", nome, email, password))
self.conn.commit()
return True
except Error as e:
print(e)
return False
def add_variavel(self,variavel_txt, valor):
try:
sql = "INSERT INTO variaveis(variavel, valor) VALUES(?,?)"
cur = self.conn.cursor()
cur.execute(sql, (variavel_txt, valor))
self.conn.commit()
return True
except Error as e:
print(e)
return False
def add_novo_usuario(self,
tag_novo,
login,
nome,
email,
password,
tag_autorizacao,
grupo,
permissao='apenas uso'):
try:
sql = "INSERT INTO usuarios(tag, login, nome, email, senha ,adicionado_por, permissao, grupo) VALUES(?,?,?,?,?,?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, (tag_novo, login, nome, email, password, tag_autorizacao,
permissao, grupo))
self.conn.commit()
return True
except Error as e:
print(e)
return False
def usuario_aposentado(self,
tag_novo,
login,
nome,
email,
password,
tag_autorizacao,
grupo,
permissao):
try:
sql = "INSERT INTO usuarios_antigos(tag, login, nome, email, senha ,adicionado_por, permissao, grupo) VALUES(?,?,?,?,?,?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, (tag_novo, login, nome, email, password, tag_autorizacao,
permissao, grupo))
self.conn.commit()
return True
except Error as e:
print(e)
return False
def remove_usuario_para_recadastro(self, login):
try:
sql = 'DELETE FROM usuarios WHERE login=?'
cur = self.conn.cursor()
cur.execute(sql, (login, ))
sql = 'DELETE FROM autorizacao_equip WHERE login=?'
cur = self.conn.cursor()
cur.execute(sql, (login, ))
self.conn.commit()
except Error as e:
print(e)
def remove_usuario_por_login(self, login):
dados = self.check_usuario(login)
idx, tag, login, nome, email, add_por, permissao, senha, grupo = dados
try:
self.usuario_aposentado(tag,login,nome,email,senha,add_por,grupo,permissao)
sql = 'DELETE FROM usuarios WHERE login=?'
cur = self.conn.cursor()
cur.execute(sql, (login, ))
sql = 'DELETE FROM autorizacao_equip WHERE login=?'
cur = self.conn.cursor()
cur.execute(sql, (login, ))
self.conn.commit()
except Error as e:
print(e)
#
# def check_usuario(self, tag_ou_nome):
# try:
# cur = self.conn.cursor()
# cur.execute("SELECT * FROM usuarios WHERE nome=?", (tag_ou_nome, ))
# row = cur.fetchall()
# if row == []:
# cur = self.conn.cursor()
# cur.execute("SELECT * FROM usuarios WHERE tag=?",
# (tag_ou_nome, ))
# row = cur.fetchall()
# return row
# except Error as e:
# print(e)
def check_variavel(self, variavel_txt):
try:
cur = self.conn.cursor()
cur.execute("SELECT valor FROM variaveis WHERE variavel=?", (variavel_txt, ))
row = cur.fetchall()
if row == []:
return row
return row[0][0]
except Error as e:
print(e)
def check_admin(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM admin WHERE login='admin'")
row = cur.fetchall()
if row == []:
return row
return [item for item in row[0]]
except Error as e:
print(e)
def check_usuario(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT * FROM usuarios WHERE login=?", (login, ))
row = cur.fetchall()
if row == []:
return row
return [item for item in row[0]]
except Error as e:
print(e)
def check_senha(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT senha FROM usuarios WHERE login=?", (login, ))
rows = cur.fetchall()
if rows:
return [item[0] for item in rows][0]
except Error as e:
print(e)
def set_senha(self, login, senha):
try:
sql = "UPDATE usuarios SET senha = ? WHERE login = ? "
cur = self.conn.cursor()
cur.execute(sql, (senha, login))
self.conn.commit()
except Error as e:
print(e)
def set_tag(self, login, tag):
try:
sql = "UPDATE usuarios SET tag = ? WHERE login = ? "
cur = self.conn.cursor()
cur.execute(sql, (tag, login))
self.conn.commit()
return True
except Error as e:
print(e)
return e
def remove_tag(self, login):
try:
sql = "UPDATE usuarios SET tag = ? WHERE login = ? "
cur = self.conn.cursor()
cur.execute(sql, (None, login))
self.conn.commit()
except Error as e:
print(e)
def check_permissao(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT permissao FROM usuarios WHERE login=?",
(login, ))
rows = cur.fetchall()
if rows:
return [item[0] for item in rows][0]
except Error as e:
print(e)
def set_permissao(self, login):
try:
sql = "UPDATE usuarios SET permissao = 'Registrar' WHERE login = ? "
cur = self.conn.cursor()
cur.execute(sql, (login, ))
self.conn.commit()
except Error as e:
print(e)
# def check_todos_usuarios(self):
# try:
# cur = self.conn.cursor()
# cur.execute("SELECT DISTINCT nome FROM usuarios")
# rows = cur.fetchall()
# if rows:
# return [item[0] for item in rows]
# return []
# except Error as e:
# print(e)
def get_nome_from_login_antigo(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT nome FROM usuarios_antigos WHERE login=?", (login, ))
rows = cur.fetchall()
if rows:
return rows[0][0]
else:
return 'Login sem nome associado'
except Error as e:
print(e)
return False
def get_nome_from_login(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT nome FROM usuarios WHERE login=?", (login, ))
rows = cur.fetchall()
if rows:
return rows[0][0]
else:
return 'Login sem nome associado'
except Error as e:
print(e)
return False
def get_nome_from_tag(self, tag):
try:
cur = self.conn.cursor()
cur.execute("SELECT nome FROM usuarios WHERE tag=?", (tag, ))
rows = cur.fetchall()
if rows:
return rows[0][0]
else:
return 'Tag sem nome associado'
except Error as e:
print(e)
return False
def get_login_from_tag(self, tag):
try:
cur = self.conn.cursor()
cur.execute("SELECT login FROM usuarios WHERE tag=?", (tag, ))
rows = cur.fetchall()
if rows:
return rows[0][0]
else:
return 'Tag sem login associado'
except Error as e:
print(e)
return False
def get_email_from_login(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT email FROM usuarios WHERE login=?", (login, ))
rows = cur.fetchall()
if rows:
return rows[0][0]
else:
return 'Login sem email associado'
except Error as e:
print(e)
return False
def get_grupo_from_login(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT grupo FROM usuarios WHERE login=?", (login, ))
rows = cur.fetchall()
if rows:
return rows[0][0]
else:
return 'Login sem grupo associado'
except Error as e:
print(e)
return False
def add_autorizacao_equip(self, login, nome, equipamento, superusuario="False"):
try:
sql = "INSERT INTO autorizacao_equip(login, nome, equipamento, super) VALUES(?,?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, (login, nome, equipamento, superusuario))
self.conn.commit()
print('adicionado na linha ' + str(cur.lastrowid))
return True
except Error as e:
print(login, nome, equipamento, superusuario)
print(e)
return False
def add_autorizacao_nome_equip(self, nome, equipamento, superusuario="False"):
try:
sql = "INSERT INTO autorizacao_equip(nome, equipamento, super) VALUES(?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, (nome, equipamento, superusuario))
self.conn.commit()
print('adicionado na linha ' + str(cur.lastrowid))
return True
except Error as e:
print(e)
return False
def add_autorizacao_login_equip(self, login, equipamento, superusuario="False"):
try:
sql = "INSERT INTO autorizacao_equip(login, equipamento, super) VALUES(?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, (login, equipamento, superusuario))
self.conn.commit()
print('adicionado na linha ' + str(cur.lastrowid))
return True
except Error as e:
print(e)
return False
def check_superusuario(self, login):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT equipamento, super FROM autorizacao_equip WHERE login=?",
(login, ))
rows = cur.fetchall()
return rows
except Error as e:
print(e)
def set_superusuario(self, login, equipamento):
try:
sql = "UPDATE autorizacao_equip SET super = 'True' WHERE login = ? " +\
"AND equipamento = ?"
cur = self.conn.cursor()
cur.execute(sql, (login, equipamento))
self.conn.commit()
except Error as e:
print(e)
def check_todos_usuarios_do_equip(self, equip):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT DISTINCT login FROM autorizacao_equip WHERE equipamento=?",
(equip, ))
rows = cur.fetchall()
if rows:
return [item[0] for item in rows]
return []
except Error as e:
print(e)
def check_todos_grupos_do_equip(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT DISTINCT grupo FROM usuarios")
rows = cur.fetchall()
if rows:
return [item[0] for item in rows]
return []
except Error as e:
print(e)
def check_todos_usuarios_do_grupo(self, grupo):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT DISTINCT login FROM usuarios WHERE grupo=?",
(grupo, ))
rows = cur.fetchall()
if rows:
return [item[0] for item in rows]
return []
except Error as e:
print(e)
def check_todos_usuarios_antigos_do_grupo(self, grupo):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT DISTINCT login FROM usuarios_antigos WHERE grupo=?",
(grupo, ))
rows = cur.fetchall()
if rows:
return [item[0] for item in rows]
return []
except Error as e:
print(e)
def check_todos_superusuarios_do_equip(self, equip):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT DISTINCT login FROM autorizacao_equip WHERE equipamento=? AND super='True'",
(equip, ))
rows = cur.fetchall()
if rows:
return [item[0] for item in rows]
return []
except Error as e:
print(e)
def check_autorizacao_equip(self, login, equipamento):
try:
logins = self.check_todos_usuarios_do_equip(equipamento)
if login in logins:
return True
else:
return False
except Error as e:
print(e)
def set_hora_inicio(self, login, equipamento):
try:
em_uso = self.check_equip_em_uso()
if em_uso:
login_em_uso = em_uso[0][1]
if equipamento in [item[0] for item in em_uso]:
return False, login_em_uso
if self.check_autorizacao_equip(login, equipamento) is True:
if self.rpi_online():
self.hora_inicio = str(datetime.datetime.now())[:-7]
else:
self.hora_inicio = '[RPI OFFLINE]' + str(datetime.datetime.now())[:-7]
nome = self.get_nome_from_login(login)
sql = "INSERT INTO uso_equip(login, nome, equipamento, hora_inicio) VALUES(?,?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, (login, nome, equipamento, self.hora_inicio))
self.conn.commit()
print('Usuário: ' + login + '\tInicio: ' + self.hora_inicio)
return True, "Uso liberado"
except Error as e:
print(e)
def check_comentario(self, login, equipamento):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT comentario FROM uso_equip WHERE login=? AND equipamento=? AND hora_inicio=?",
(login, equipamento, self.hora_inicio))
row = cur.fetchall()
if row[0][0] == None:
return ""
else:
return str(row[0][0]) + '\n\n'
except Error as e:
print(e)
def set_comentario(self, login, equipamento, comentario):
try:
comentario_antigo = self.check_comentario(login, equipamento)
sql = "UPDATE uso_equip SET comentario = ? WHERE login = ? " +\
"AND equipamento = ? AND hora_inicio = ?"
novo_comentario = comentario_antigo + comentario
cur = self.conn.cursor()
cur.execute(sql,
(novo_comentario, login, equipamento, self.hora_inicio))
self.conn.commit()
except Error as e:
print(e)
def check_id_inicio(self, login, equipamento):
try:
if self.check_autorizacao_equip(login, equipamento) is True:
cur = self.conn.cursor()
cur.execute(
"SELECT DISTINCT id, hora_inicio, hora_fim FROM uso_equip WHERE login=? AND equipamento=? AND hora_fim IS NULL",
(login, equipamento))
rows = cur.fetchall()
if rows:
# retorna a linha (id) do equip com hora_inicio e sem hora_fim
return str(
[item[0] for item in rows if item[2] is None][0])
return rows
except Error as e:
print(e)
def set_hora_fim(self, login, equipamento, tempo_total, situacao='Uso normal.'):
try:
if self.check_autorizacao_equip(login, equipamento) is True:
# linha_id = self.check_id_inicio(login, equipamento)
linha_id = self.ultima_linha_registrada(login, equipamento)
if linha_id == []:
print("ERRO! " + login + ' não está usando o equipamento.')
return False
if self.rpi_online():
hora = str(datetime.datetime.now())[:-7]
else:
hora = '[RPI OFFLINE]' + str(datetime.datetime.now())[:-7]
sql = "UPDATE uso_equip SET hora_fim = ?, tempo_total = ?, situacao = ? WHERE id = ?"
cur = self.conn.cursor()
cur.execute(sql, (hora, tempo_total, situacao, linha_id))
self.conn.commit()
print('Usuário: ' + login + '\tFim: ' + hora)
except Error as e:
print(e)
def force_hora_fim(self, login, equipamento):
# funcinando por enquanto apenas para um equipamento
try:
em_uso = self.check_equip_em_uso()
if equipamento in [item[0] for item in em_uso]:
inicio = em_uso[0][2][-8:]
fim_forcado = str(datetime.datetime.now())[:-7][-8:]
tempo_forcado = self.subtrair_tempo(fim_forcado, inicio)
self.set_hora_fim(em_uso[0][1], em_uso[0][0], tempo_forcado, situacao="Esqueceu logado! Saída forçada por " + login)
except Error as e:
print(e)
def ultima_linha_registrada(self, login, equipamento):
try:
cur = self.conn.cursor()
cur.execute("SELECT id FROM uso_equip WHERE login = ? and equipamento = ?",(login, equipamento))
row = cur.fetchall()
return row[-1][0]
except Error as e:
print(e)
def set_hora_fim_seguranca(self, login, equipamento, tempo_total, situacao='ERRO! REGISTRO DE SEGURANÇA A CADA MINUTO ATIVADO!.'):
try:
id = self.ultima_linha_registrada(login, equipamento)
if self.rpi_online():
hora = str(datetime.datetime.now())[:-7]
else:
hora = '[RPI OFFLINE]' + str(datetime.datetime.now())[:-7]
sql = "UPDATE uso_equip SET hora_fim = ?, tempo_total = ?, situacao = ? WHERE id = ?"
cur = self.conn.cursor()
cur.execute(sql, (hora, tempo_total, situacao, id))
self.conn.commit()
except Error as e:
print(e)
def subtrair_tempo(self, tempo1, tempo2):
t1_seg = int(tempo1[-2:])
t1_min = int(tempo1[-5:-3])
t1_hora = int(tempo1[-8:-6])
t2_seg = int(tempo2[-2:])
t2_min = int(tempo2[-5:-3])
t2_hora = int(tempo2[-8:-6])
t1 = t1_seg + 60*t1_min + 60*60*t1_hora
t2 = t2_seg + 60*t2_min + 60*60*t2_hora
dt = t1 - t2
dt_hora = int(dt/3600)
dt_min = int((dt%3600)/60)
dt_seg = int((dt%3600)%60)
if dt_seg < 10:
s = '0' + str(dt_seg)
else:
s = str(dt_seg)
if dt_min < 10:
m = '0' + str(dt_min)
else:
m = str(dt_min)
if dt_hora < 10:
h = '0' + str(dt_hora)
else:
h = str(dt_hora)
return h + ':' + m + ':' + s
def check_equip_em_uso(self):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT DISTINCT equipamento, login, hora_inicio FROM uso_equip WHERE hora_fim IS NULL"
)
rows = cur.fetchall()
return rows
except Error as e:
print(e)
def set_entrada_ou_saida(self, tag):
try:
login = self.get_login_from_tag(tag)
check_presenca = self.check_tag_presenca_em_aberto(tag)
if check_presenca == "Usuário não identificado!":
return "Usuário não identificado!"
elif check_presenca == "Não esta presente":
if self.rpi_online():
hora_entrada = str(datetime.datetime.now())[:-7]
else:
hora_entrada = '[RPI OFFLINE]' + str(datetime.datetime.now())[:-7]
nome = self.get_nome_from_login(login)
sql = "INSERT INTO presenca(login, nome, tag, hora_entrada, " +\
"hora_saida) VALUES(?,?,?,?,?)"
cur = self.conn.cursor()
cur.execute(sql, (login, nome, tag, hora_entrada, None))
self.conn.commit()
print('Usuário: ' + login + '\tEntrada: ' + hora_entrada)
return "Entrada liberada! " + hora_entrada
else:
linha_db = check_presenca
if self.rpi_online():
hora_saida = str(datetime.datetime.now())[:-7]
else:
hora_saida = '[RPI OFFLINE]' + str(datetime.datetime.now())[:-7]
sql = "UPDATE presenca SET hora_saida=? WHERE id = ?"
cur = self.conn.cursor()
cur.execute(sql, (hora_saida, linha_db))
self.conn.commit()
print('Usuário: ' + login + '\tSaída: ' + hora_saida)
return "Saída registrada! " + hora_saida
except Error as e:
print(e)
def check_tag_presenca_em_aberto(self, tag):
try:
login = self.get_login_from_tag(tag)
if login == 'Tag sem login associado':
return "Usuário não identificado!"
cur = self.conn.cursor()
cur.execute("SELECT DISTINCT id FROM presenca WHERE login = ? AND "
+ "hora_saida IS NULL", (login, ))
row = cur.fetchall()
if row:
return row[0][0]
else:
return "Não esta presente"
except Error as e:
print(e)
def check_login_presenca_em_aberto(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT DISTINCT id FROM presenca WHERE login = ? AND "
+ "hora_saida IS NULL", (login, ))
row = cur.fetchall()
if row:
return True
else:
return False
except Error as e:
print(e)
return False
def check_lista_presentes(self):
try:
cur = self.conn.cursor()
cur.execute(
"SELECT DISTINCT login FROM presenca WHERE hora_saida IS NULL")
rows = cur.fetchall()
if rows:
return [item[0] for item in rows]
else:
return []
except Error as e:
print(e)
return False
def check_uso_equip(self, login):
try:
cur = self.conn.cursor()
cur.execute("SELECT login, nome, hora_inicio, hora_fim, tempo_total, situacao, comentario FROM uso_equip WHERE login=?", (login, ))
dados = cur.fetchall()
if dados == []:
return dados
return dados
except Error as e:
print(e)
def todas_linhas_de_uso(self, equipamento):
try:
cur = self.conn.cursor()
cur.execute("SELECT id FROM uso_equip WHERE equipamento=?",(equipamento,))
row = cur.fetchall()
return row
except Error as e:
print(e)
def get_nome_from_id(self, id):
try:
cur = self.conn.cursor()
cur.execute("SELECT nome FROM uso_equip WHERE id=?", (id, ))
rows = cur.fetchall()
if rows:
return rows[0][0]
else:
return 'Login sem nome associado'
except Error as e:
print(e)
return False
def check_uso_equip_id(self, id):
try:
cur = self.conn.cursor()
cur.execute("SELECT login, nome, hora_inicio, hora_fim, tempo_total, situacao, comentario FROM uso_equip WHERE id=?", (id, ))
dados = cur.fetchall()
if dados == []:
return dados
return dados
except Error as e:
print(e)
def check_tempo_total_de_uso_equip(self):
try:
cur = self.conn.cursor()
cur.execute("SELECT tempo_total FROM uso_equip ")
dados = cur.fetchall()
if dados == []:
return dados
return dados
except Error as e:
print(e)
if __name__ == '__main__':
db = BancoDeDados('arquivo.db') #exemplo de uso
# %%
| 36.195652
| 144
| 0.499804
| 4,069
| 38,295
| 4.57041
| 0.061932
| 0.040437
| 0.051944
| 0.051191
| 0.756251
| 0.723181
| 0.70264
| 0.681562
| 0.65231
| 0.624079
| 0
| 0.006305
| 0.399426
| 38,295
| 1,057
| 145
| 36.229896
| 0.802252
| 0.032328
| 0
| 0.687919
| 0
| 0.002237
| 0.173022
| 0.014957
| 0
| 0
| 0
| 0.000946
| 0
| 0
| null | null | 0.00783
| 0.006711
| null | null | 0.085011
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
5c39338b2aff426a99da3489a29c420317da734b
| 68
|
py
|
Python
|
src/pages/db/__init__.py
|
kryvokhyzha/bert-for-ukranian-ner
|
48da40f09cb216ad51a97c303998157858fbe8bc
|
[
"MIT"
] | null | null | null |
src/pages/db/__init__.py
|
kryvokhyzha/bert-for-ukranian-ner
|
48da40f09cb216ad51a97c303998157858fbe8bc
|
[
"MIT"
] | null | null | null |
src/pages/db/__init__.py
|
kryvokhyzha/bert-for-ukranian-ner
|
48da40f09cb216ad51a97c303998157858fbe8bc
|
[
"MIT"
] | null | null | null |
from pages.db.db import db_clean, db_creation, db_insert, db_select
| 34
| 67
| 0.823529
| 13
| 68
| 4
| 0.615385
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102941
| 68
| 1
| 68
| 68
| 0.852459
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
308e1a6afb02da02569e46c7f2764bcdc0d6f48c
| 107
|
py
|
Python
|
src/quocslib/__init__.py
|
marcorossignolo/QuOCS
|
5ed631e2aebc42b226f5992daf27e2da75a89af9
|
[
"Apache-2.0"
] | null | null | null |
src/quocslib/__init__.py
|
marcorossignolo/QuOCS
|
5ed631e2aebc42b226f5992daf27e2da75a89af9
|
[
"Apache-2.0"
] | null | null | null |
src/quocslib/__init__.py
|
marcorossignolo/QuOCS
|
5ed631e2aebc42b226f5992daf27e2da75a89af9
|
[
"Apache-2.0"
] | null | null | null |
from __future__ import absolute_import, division, print_function, unicode_literals
__VERSION__ = "0.0.a7"
| 26.75
| 82
| 0.82243
| 14
| 107
| 5.5
| 0.857143
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.03125
| 0.102804
| 107
| 3
| 83
| 35.666667
| 0.770833
| 0
| 0
| 0
| 0
| 0
| 0.056075
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0.5
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
|
0
| 4
|
308fe16f0e128b44dd435ae0ddd91af9119d86c8
| 249
|
py
|
Python
|
src/utils/encryption_utils.py
|
tomgilbertson/script-server-v1
|
bbdf289d3d993a0c81f20c36bce5f3eb064b0261
|
[
"Apache-2.0",
"CC0-1.0"
] | 833
|
2016-09-08T13:27:36.000Z
|
2022-03-27T07:10:48.000Z
|
src/utils/encryption_utils.py
|
tomgilbertson/script-server-v1
|
bbdf289d3d993a0c81f20c36bce5f3eb064b0261
|
[
"Apache-2.0",
"CC0-1.0"
] | 528
|
2016-05-23T09:17:04.000Z
|
2022-03-30T12:45:50.000Z
|
src/utils/encryption_utils.py
|
tomgilbertson/script-server-v1
|
bbdf289d3d993a0c81f20c36bce5f3eb064b0261
|
[
"Apache-2.0",
"CC0-1.0"
] | 214
|
2016-09-08T14:46:41.000Z
|
2022-03-25T01:04:14.000Z
|
import base64
import hashlib
from utils.apr1 import hash_apr1
def md5_apr1(salt, text):
return hash_apr1(salt, text)
def sha1(text):
result = hashlib.sha1(text.encode('utf8'))
return base64.b64encode(result.digest()).decode('utf8')
| 17.785714
| 59
| 0.722892
| 36
| 249
| 4.916667
| 0.527778
| 0.090395
| 0.135593
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.07109
| 0.15261
| 249
| 13
| 60
| 19.153846
| 0.767773
| 0
| 0
| 0
| 0
| 0
| 0.032129
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.375
| 0.125
| 0.875
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
30a2375a14b5b4c6764ea4ac5055710385af2615
| 10,387
|
py
|
Python
|
2021/day1.py
|
Sujatha-Nagarajan/AdventOfCode
|
afce23c74fd0a72caa29c1604a582b21806e794e
|
[
"CC0-1.0"
] | 1
|
2020-12-05T06:14:37.000Z
|
2020-12-05T06:14:37.000Z
|
2021/day1.py
|
Sujatha-Nagarajan/AdventOfCode
|
afce23c74fd0a72caa29c1604a582b21806e794e
|
[
"CC0-1.0"
] | null | null | null |
2021/day1.py
|
Sujatha-Nagarajan/AdventOfCode
|
afce23c74fd0a72caa29c1604a582b21806e794e
|
[
"CC0-1.0"
] | null | null | null |
#https://adventofcode.com/2021/day/1
input2="""131
140
136
135
155
175
178
186
187
189
194
195
203
193
178
179
180
188
204
214
215
252
253
261
281
294
293
299
300
301
307
333
324
322
323
335
319
312
313
312
320
323
324
336
341
347
357
358
363
357
334
348
364
365
367
370
369
373
344
328
330
327
339
340
341
335
342
347
349
355
348
359
360
341
342
322
321
324
323
322
324
327
340
341
353
383
387
391
422
424
422
426
429
427
428
445
421
423
429
414
411
407
409
402
422
425
423
427
424
430
428
432
433
434
429
430
406
407
411
420
412
419
422
424
425
426
428
430
432
431
432
433
449
450
453
457
459
462
482
470
471
488
495
496
499
503
516
526
531
532
541
555
554
567
558
557
560
561
566
580
581
582
594
595
598
599
582
589
593
589
592
593
590
606
615
623
627
628
630
636
641
657
658
693
695
698
707
713
714
720
721
723
721
720
707
679
699
676
667
663
664
666
660
663
673
677
662
660
663
683
681
674
689
698
699
704
705
696
697
702
693
694
700
699
681
684
690
669
673
688
691
692
691
688
685
656
638
634
651
665
670
672
685
689
709
711
714
715
735
734
738
737
738
744
765
769
776
809
819
812
814
821
794
793
796
794
815
827
831
834
840
850
846
849
842
847
846
849
850
857
885
887
888
887
883
894
895
913
917
913
915
917
918
920
929
959
961
958
954
956
962
966
959
966
967
969
972
978
993
998
1006
1007
1010
1011
1015
1037
1047
1051
1029
1050
1052
1054
1033
1040
1036
1021
1031
1033
1058
1070
1066
1064
1052
1051
1057
1058
1059
1060
1071
1080
1081
1083
1086
1075
1083
1092
1095
1101
1113
1078
1080
1075
1077
1080
1083
1090
1092
1091
1092
1093
1097
1099
1103
1104
1105
1109
1084
1101
1103
1109
1101
1099
1096
1099
1103
1104
1105
1119
1123
1095
1096
1095
1132
1149
1164
1165
1182
1180
1198
1207
1210
1213
1218
1239
1235
1236
1242
1243
1276
1279
1282
1283
1299
1301
1294
1298
1304
1301
1303
1313
1312
1316
1317
1319
1320
1315
1318
1326
1330
1332
1331
1334
1319
1316
1308
1306
1309
1312
1310
1329
1318
1321
1335
1310
1311
1313
1329
1331
1335
1341
1355
1356
1357
1360
1378
1373
1374
1373
1377
1378
1383
1379
1380
1376
1370
1369
1380
1381
1382
1381
1383
1377
1401
1403
1408
1417
1406
1407
1409
1411
1414
1420
1419
1426
1456
1452
1453
1454
1453
1450
1442
1430
1434
1435
1439
1440
1441
1442
1463
1464
1471
1469
1471
1472
1433
1436
1434
1440
1446
1447
1452
1454
1441
1434
1420
1404
1396
1412
1423
1424
1437
1450
1452
1457
1458
1422
1423
1433
1436
1453
1484
1485
1460
1457
1458
1464
1465
1467
1468
1475
1476
1471
1470
1471
1473
1470
1473
1474
1490
1482
1484
1508
1515
1522
1521
1514
1518
1520
1522
1530
1528
1523
1535
1537
1539
1541
1533
1528
1531
1538
1539
1541
1547
1551
1550
1545
1546
1548
1551
1566
1577
1586
1587
1588
1613
1615
1631
1638
1639
1640
1645
1648
1642
1640
1643
1673
1679
1669
1673
1666
1669
1674
1682
1683
1700
1698
1709
1717
1729
1743
1745
1746
1744
1714
1722
1727
1734
1735
1745
1752
1751
1772
1788
1794
1798
1804
1798
1793
1796
1806
1809
1815
1816
1815
1813
1812
1817
1818
1821
1825
1821
1853
1827
1822
1825
1834
1833
1830
1836
1837
1838
1840
1841
1846
1841
1842
1845
1862
1863
1896
1898
1884
1885
1893
1892
1895
1896
1894
1903
1902
1907
1915
1919
1922
1923
1921
1924
1925
1927
1931
1932
1939
1940
1939
1959
1965
1975
1973
1974
1982
1983
1988
1992
1995
1994
1995
1994
2000
2001
2029
2030
2005
2006
2009
2013
2017
2014
2041
2042
2052
2047
2048
2052
2051
2053
2052
2069
2058
2059
2060
2061
2063
2062
2065
2066
2070
2072
2075
2061
2038
2037
2024
2022
2023
2011
2032
2037
2026
2027
2028
2034
2038
2039
2029
2042
2031
2033
2046
2048
2041
2049
2050
2052
2063
2064
2065
2067
2086
2070
2078
2087
2086
2089
2075
2076
2101
2103
2115
2095
2109
2112
2115
2126
2152
2129
2132
2117
2116
2119
2128
2127
2139
2140
2141
2145
2146
2125
2136
2132
2121
2125
2126
2134
2135
2142
2148
2149
2133
2137
2156
2160
2161
2162
2164
2176
2177
2179
2183
2184
2186
2187
2190
2195
2216
2210
2209
2206
2214
2211
2216
2223
2224
2225
2230
2242
2246
2248
2268
2272
2273
2278
2279
2280
2281
2275
2276
2282
2283
2278
2285
2288
2289
2286
2290
2285
2291
2294
2287
2293
2315
2314
2315
2325
2323
2328
2308
2312
2322
2361
2364
2366
2364
2369
2368
2384
2387
2390
2396
2370
2371
2377
2378
2377
2379
2395
2384
2381
2395
2401
2412
2411
2412
2414
2420
2422
2408
2425
2427
2428
2438
2442
2445
2456
2462
2461
2469
2467
2472
2471
2469
2449
2448
2442
2459
2460
2474
2477
2478
2480
2483
2468
2444
2442
2444
2460
2456
2445
2437
2430
2432
2457
2463
2467
2474
2477
2475
2478
2477
2478
2480
2485
2471
2495
2509
2514
2522
2523
2533
2515
2518
2539
2535
2543
2580
2586
2601
2602
2600
2602
2598
2597
2598
2605
2597
2596
2600
2602
2599
2605
2613
2614
2611
2603
2602
2601
2607
2608
2606
2598
2599
2602
2597
2605
2611
2612
2613
2645
2657
2662
2668
2669
2652
2655
2661
2663
2662
2664
2677
2695
2702
2738
2739
2738
2740
2728
2720
2714
2720
2712
2724
2725
2736
2745
2742
2747
2749
2744
2746
2750
2753
2759
2760
2761
2731
2733
2735
2736
2737
2741
2739
2740
2744
2745
2755
2744
2746
2748
2752
2750
2755
2736
2740
2742
2753
2752
2755
2780
2781
2783
2786
2788
2786
2796
2790
2789
2798
2816
2817
2815
2817
2819
2820
2825
2823
2827
2853
2856
2861
2862
2854
2873
2887
2884
2888
2884
2885
2893
2902
2901
2902
2904
2908
2909
2911
2914
2929
2931
2935
2934
2935
2934
2917
2918
2921
2926
2932
2937
2947
2928
2946
2971
2973
2972
2969
2972
2973
2978
2977
2968
2961
2962
2982
2987
2989
2990
2993
2995
2987
2991
2992
3002
3003
3004
3005
3011
3012
3031
3029
3036
3041
3069
3070
3087
3077
3090
3087
3066
3078
3080
3081
3071
3074
3075
3074
3069
3070
3078
3086
3080
3086
3088
3096
3098
3103
3117
3114
3143
3148
3149
3150
3149
3151
3165
3169
3172
3183
3184
3185
3190
3204
3218
3230
3231
3248
3249
3252
3249
3246
3268
3273
3274
3277
3289
3257
3269
3279
3267
3284
3312
3315
3314
3317
3310
3315
3314
3304
3305
3308
3322
3326
3331
3336
3339
3345
3348
3349
3348
3350
3348
3350
3362
3363
3373
3368
3349
3347
3344
3362
3364
3365
3374
3380
3390
3387
3389
3391
3392
3390
3388
3389
3395
3415
3416
3414
3415
3416
3417
3420
3418
3422
3421
3428
3421
3422
3424
3421
3422
3419
3416
3392
3396
3408
3399
3400
3403
3392
3398
3393
3415
3436
3458
3459
3467
3469
3472
3480
3489
3491
3490
3521
3518
3517
3518
3502
3510
3505
3506
3508
3509
3510
3506
3504
3505
3522
3525
3531
3524
3522
3517
3523
3526
3512
3516
3521
3535
3544
3539
3514
3519
3525
3523
3530
3529
3534
3526
3523
3525
3522
3509
3510
3523
3522
3516
3518
3522
3539
3540
3546
3551
3556
3566
3545
3573
3574
3576
3581
3582
3602
3604
3606
3590
3596
3598
3599
3607
3573
3592
3599
3607
3609
3617
3621
3606
3602
3599
3609
3602
3598
3607
3612
3613
3630
3632
3634
3636
3642
3651
3655
3662
3687
3688
3689
3684
3664
3663
3667
3645
3647
3649
3660
3673
3665
3663
3633
3656
3658
3669
3672
3673
3675
3683
3684
3685
3683
3687
3699
3703
3707
3717
3749
3763
3767
3771
3774
3790
3801
3808
3813
3814
3819
3835
3834
3835
3836
3837
3836
3837
3839
3844
3845
3831
3830
3828
3829
3830
3846
3844
3825
3811
3806
3809
3807
3826
3836
3847
3848
3849
3850
3863
3869
3868
3869
3870
3871
3867
3868
3872
3871
3874
3875
3874
3876
3879
3884
3901
3904
3901
3915
3905
3904
3889
3914
3917
3931
3932
3930
3932
3937
3943
3939
3941
3943
3930
3929
3945
3954
3972
3996
3997
4000
4001
3995
4025
4027
4034
4035
4050
4074
4071
4077
4078
4085
4087
4088
4091
4090
4091
4092
4089
4091
4096
4094
4095
4107
4109
4130
4131
4124
4136
4139
4153
4161
4173
4149
4154
4148
4150
4128
4160
4164
4168
4169
4158
4165
4174
4171
4195
4200
4201
4195
4198
4201
4202
4196
4203
4211
4209
4210
4217
4220
4203
4193
4194
4197
4193
4195
4196
4195
4197
4218
4222
4236
4223
4225
4242
4262
4265
4256
4260
4270
4271
4276
4272
4275
4297
4304
4297
4299
4302
4303
4301
4306
4337
4341
4342
4343
4345
4346
4351
4350
4338
4331
4337
4331
4345
4309
4311
4327
4328
4335
4360
4362
4364
4360
4357
4359
4367
4368
4352
4351
4347
4360
4356
4357
4362
4363
4357
4362
4367
4385
4388
4392
4395
4397
4398
4387
4395
4399
4402
4403
4424
4434
4443
4444
4445
4456
4457
4466
4470
4469
4470
4471
4505
4499
4500
4476
4483
4475
4476
4486
4496
4495
4504
4503
4516
4518
4517
4525
4527
4530
4532
4533
4535
4537
4541
4544
4546
4549
4551
4552
4555
4556
4563
4580
4583
4600
4589
4581
4585
4583
4585
4592
4585
4595
4605
4598
4601
4600
4603
4598
4628
4630
4626
4630
4632
4631
4632
4619
4633
4643
4630
4640
4660
4671
4675
4682
4697
4695
4700
4704
4705
4710
4721
4727
4732
4728
4729
4735
4743
4744
4754
4760
4766
4758
4762
4760
4763
4782
4786
4787
4789
4801
4804
4782
4752
4755
4757
4758
4757
4766
4778
4779
4769
4781
4777
4785
4786
4788
4796
4795
4796
4797
4805
4804
4814
4812
4815
4806
4805
4807
4805
4806
4807
4810
4845
4846
4855
4853
4859
4862
4867
4873
4879
4881
4880
4883
4880
4886
4892
4898
4903
4902
4905
4909
4914
4915
4917
4939
4941
4933
4932
4940
4945
4961
4966
4955
4960
4979
4980
4981
4970
4968
4970
4989
4996
5003
4983
4984
5006
5014
5018
5023
5042
5043
5050
5051
5076
5052
5055
5068
5059
5058
5035
5059
5060
5061
5068
5044
5043
5044
5045
5047
5048
5051
5044
5045
5049
5072
5080
5078
5101
5100
5092
5112
5111
5107
5113
5116
5123
5129
5127
5151
5176
5188
5189
5202
5204
5197
5199
5196
5201
5200
5203
5207
5209
5217
5218
5204
5206
5207
5208
5195
5201
5202
5199
5229
5228
5229
5233
5232
5227
5228
5229
5238
5236
5238
5243
5245
5244
5245
5230
5244
5258
5259
5268
5271
5274
5271
5272
5277
5300
5327
5358
5359
5360
5361
5364
5370
5375
5376
5384
5383
5384
5385
5389
5390
5395
5397
5413
5418
5434
5433
5449
5445
5447
5453
5454
5458
5460
5448
5452
5464
5469
5480
5481
5482
5486
5496
5499
5500
5527
5501
5476
5474
5475
5463
5462
5458
5459
5470
5473
5481
5493
5494
5495
5496
5497
5498
5495
5498
5496
5490
5491
5493
5495
5489
5514
5533
5541
5531
5537
5513
5531
5532
5533
5532
5526
5535
5553
5551
5554
5553
5555
5551
5557
5556
5558
5555
5554
5552
5566
5574
5577
5583
5584
5588
5590
5603
5610
5617
5619
5618
5619
5618
5630
5635
5638
5650
5659
5660
5672
5670
5676
5673
5675
5680
5682
5685
5688
5682
5683
5696
5700
5722
5714
5713
5710
5712
5740
5741
5739
5740
5746
5756
5769
5770
5757
5748
5766
5770"""
input1="""199
200
208
210
200
207
240
269
260
263"""
entries = list(map(int, input1.split('\n')))
entries = list(map(int, input2.split('\n')))
count = 0
for i in range(len(entries)):
if i > 0:
count = count + 1 if entries[i] > entries[i-1] else count
print('a', count)
# Part 2
entries = list(map(int, input1.split('\n')))
entries = list(map(int, input2.split('\n')))
count = 0
for i in range(len(entries)):
if i > 0 and i + 1 < len(entries) and i + 2 < len(entries):
count = count + 1 if (entries[i] + entries[i+1] + entries[i+2]) > (entries[i-1] + entries[i] + entries[i+1]) else count
print('b', count)
| 5.10167
| 127
| 0.780591
| 2,119
| 10,387
| 3.826333
| 0.772534
| 0.007893
| 0.006907
| 0.008387
| 0.037
| 0.034904
| 0.034904
| 0.034904
| 0.029354
| 0.021954
| 0
| 0.939016
| 0.20593
| 10,387
| 2,035
| 128
| 5.104177
| 0.044011
| 0.004044
| 0
| 0.36413
| 0
| 0
| 0.941506
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.000988
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
30ccb829ad766d8012210f355baec225b2c1fc29
| 226
|
py
|
Python
|
fleet_management/core/vehicle/serializers.py
|
nahidsaikat/Fleet-Management-Backend
|
d3a20a9b971600eb039bcc62068599cbbc72537e
|
[
"MIT"
] | 3
|
2018-08-09T14:06:09.000Z
|
2021-10-31T08:49:56.000Z
|
fleet_management/core/vehicle/serializers.py
|
nahidsaikat/Fleet-Management-Backend
|
d3a20a9b971600eb039bcc62068599cbbc72537e
|
[
"MIT"
] | null | null | null |
fleet_management/core/vehicle/serializers.py
|
nahidsaikat/Fleet-Management-Backend
|
d3a20a9b971600eb039bcc62068599cbbc72537e
|
[
"MIT"
] | 2
|
2018-10-09T08:38:28.000Z
|
2022-01-19T12:27:58.000Z
|
from rest_framework import serializers
from .models import Vehicle
class VehicleSerializer(serializers.ModelSerializer):
class Meta:
model = Vehicle
fields = ('id', 'serial', 'fleet', 'status', 'driver')
| 25.111111
| 62
| 0.699115
| 23
| 226
| 6.826087
| 0.782609
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.19469
| 226
| 8
| 63
| 28.25
| 0.862637
| 0
| 0
| 0
| 0
| 0
| 0.110619
| 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
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
30d7351cc290ebbec3b32593c1c331e40980c0bc
| 85
|
py
|
Python
|
memit/apps.py
|
russlbrown/memit
|
cf89bb91264008d554602a6f44f2e0404a7903fc
|
[
"MIT"
] | null | null | null |
memit/apps.py
|
russlbrown/memit
|
cf89bb91264008d554602a6f44f2e0404a7903fc
|
[
"MIT"
] | null | null | null |
memit/apps.py
|
russlbrown/memit
|
cf89bb91264008d554602a6f44f2e0404a7903fc
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class MemitConfig(AppConfig):
name = 'memit'
| 14.166667
| 33
| 0.741176
| 10
| 85
| 6.3
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.176471
| 85
| 5
| 34
| 17
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0.058824
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
30d773cd2d2e649aa8ce3ac7f8de4ec183f36637
| 106
|
py
|
Python
|
djstripe/management/__init__.py
|
iqbalabd/dj-stripe
|
0ae6b39e31e27f6e8076f3dd4f7d8f459380bdec
|
[
"MIT"
] | 2
|
2020-09-01T20:05:28.000Z
|
2021-07-22T08:20:42.000Z
|
djstripe/management/__init__.py
|
iqbalabd/dj-stripe
|
0ae6b39e31e27f6e8076f3dd4f7d8f459380bdec
|
[
"MIT"
] | 2
|
2019-07-29T08:40:11.000Z
|
2019-08-01T09:45:30.000Z
|
djstripe/management/__init__.py
|
iqbalabd/dj-stripe
|
0ae6b39e31e27f6e8076f3dd4f7d8f459380bdec
|
[
"MIT"
] | 2
|
2020-01-31T14:26:09.000Z
|
2020-07-14T04:24:15.000Z
|
"""
.. module:: djstripe.management.
:synopsis: dj-stripe - management module, contains commands.
"""
| 17.666667
| 63
| 0.679245
| 10
| 106
| 7.2
| 0.8
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.150943
| 106
| 5
| 64
| 21.2
| 0.8
| 0.915094
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
30ebf33e0faa078b85d47b49afaaae1831ba665e
| 303
|
py
|
Python
|
src/model/Point.py
|
DaDudek/Tetris
|
b3848132fd315e883e714e1882ec4bfd38b890e1
|
[
"MIT"
] | 2
|
2022-01-16T20:44:08.000Z
|
2022-01-18T13:41:32.000Z
|
src/model/Point.py
|
DaDudek/Tetris
|
b3848132fd315e883e714e1882ec4bfd38b890e1
|
[
"MIT"
] | null | null | null |
src/model/Point.py
|
DaDudek/Tetris
|
b3848132fd315e883e714e1882ec4bfd38b890e1
|
[
"MIT"
] | null | null | null |
class Point:
def __init__(self, x: int, y: int):
self.x = x
self.y = y
def getX(self) -> int:
return self.x
def getY(self) -> int:
return self.y
def setX(self, x: int) -> None:
self.x = x
def setY(self, y: int) -> None:
self.y = y
| 17.823529
| 39
| 0.478548
| 47
| 303
| 3
| 0.297872
| 0.177305
| 0.113475
| 0.241135
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.382838
| 303
| 16
| 40
| 18.9375
| 0.754011
| 0
| 0
| 0.333333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.416667
| false
| 0
| 0
| 0.166667
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
a5023b5db7050e68a3d0b05b54dbb45f33ca5013
| 27
|
py
|
Python
|
homeassistant/components/fixer/__init__.py
|
domwillcode/home-assistant
|
f170c80bea70c939c098b5c88320a1c789858958
|
[
"Apache-2.0"
] | 30,023
|
2016-04-13T10:17:53.000Z
|
2020-03-02T12:56:31.000Z
|
homeassistant/components/fixer/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 31,101
|
2020-03-02T13:00:16.000Z
|
2022-03-31T23:57:36.000Z
|
homeassistant/components/fixer/__init__.py
|
jagadeeshvenkatesh/core
|
1bd982668449815fee2105478569f8e4b5670add
|
[
"Apache-2.0"
] | 11,956
|
2016-04-13T18:42:31.000Z
|
2020-03-02T09:32:12.000Z
|
"""The fixer component."""
| 13.5
| 26
| 0.62963
| 3
| 27
| 5.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.111111
| 27
| 1
| 27
| 27
| 0.708333
| 0.740741
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
a507717714986cd0a25bfc921288a4d277b88b23
| 186
|
py
|
Python
|
jira_webhook/apps.py
|
uw-it-aca/jira-webhook
|
2c90f8073bc85be499b1c892486083fcdaff56f4
|
[
"Apache-2.0"
] | null | null | null |
jira_webhook/apps.py
|
uw-it-aca/jira-webhook
|
2c90f8073bc85be499b1c892486083fcdaff56f4
|
[
"Apache-2.0"
] | 19
|
2021-04-07T22:48:56.000Z
|
2021-07-06T18:34:14.000Z
|
jira_webhook/apps.py
|
uw-it-aca/jira-webhook
|
2c90f8073bc85be499b1c892486083fcdaff56f4
|
[
"Apache-2.0"
] | null | null | null |
# Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from django.apps import AppConfig
class JiraWebhookConfig(AppConfig):
name = 'jira_webhook'
| 20.666667
| 48
| 0.774194
| 24
| 186
| 5.958333
| 0.958333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0375
| 0.139785
| 186
| 8
| 49
| 23.25
| 0.85625
| 0.44086
| 0
| 0
| 0
| 0
| 0.118812
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
eb4b8f2ac102e07bdbb3c924d9cf3966e3910efa
| 81
|
py
|
Python
|
box/apps.py
|
mamalmaleki/maktab-community
|
8ce25053ea0f6f0a6c082617c9ff306d1ada9707
|
[
"MIT"
] | null | null | null |
box/apps.py
|
mamalmaleki/maktab-community
|
8ce25053ea0f6f0a6c082617c9ff306d1ada9707
|
[
"MIT"
] | 18
|
2020-06-05T19:16:00.000Z
|
2022-03-01T17:55:00.000Z
|
box/apps.py
|
mamalmaleki/maktab-community
|
8ce25053ea0f6f0a6c082617c9ff306d1ada9707
|
[
"MIT"
] | 1
|
2020-07-01T20:55:16.000Z
|
2020-07-01T20:55:16.000Z
|
from django.apps import AppConfig
class BoxConfig(AppConfig):
name = 'box'
| 13.5
| 33
| 0.728395
| 10
| 81
| 5.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.185185
| 81
| 5
| 34
| 16.2
| 0.893939
| 0
| 0
| 0
| 0
| 0
| 0.037037
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
eba8c920e6c6913b87771e6f659a4e3e12957800
| 87
|
py
|
Python
|
Python tripartite framework/Django/code/mysite/cookie/apps.py
|
Ljazz/studyspace
|
b235e7d16fecf93dd64ad785833d4de5bb17db64
|
[
"MIT"
] | null | null | null |
Python tripartite framework/Django/code/mysite/cookie/apps.py
|
Ljazz/studyspace
|
b235e7d16fecf93dd64ad785833d4de5bb17db64
|
[
"MIT"
] | null | null | null |
Python tripartite framework/Django/code/mysite/cookie/apps.py
|
Ljazz/studyspace
|
b235e7d16fecf93dd64ad785833d4de5bb17db64
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class CookieConfig(AppConfig):
name = 'cookie'
| 14.5
| 33
| 0.747126
| 10
| 87
| 6.5
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.172414
| 87
| 5
| 34
| 17.4
| 0.902778
| 0
| 0
| 0
| 0
| 0
| 0.068966
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ebe3e2a14fcdd453ac2feecbbc353167ada3fa26
| 1,362
|
py
|
Python
|
bloodbank_rl/tianshou_utils/policies.py
|
joefarrington/bloodbank_rl
|
f285581145034b498f01c9b44f95437ceddb042a
|
[
"MIT"
] | null | null | null |
bloodbank_rl/tianshou_utils/policies.py
|
joefarrington/bloodbank_rl
|
f285581145034b498f01c9b44f95437ceddb042a
|
[
"MIT"
] | null | null | null |
bloodbank_rl/tianshou_utils/policies.py
|
joefarrington/bloodbank_rl
|
f285581145034b498f01c9b44f95437ceddb042a
|
[
"MIT"
] | null | null | null |
from tianshou.policy import A2CPolicy, PPOPolicy
from typing import Any, Dict, List, Optional, Type
from tianshou.data import Batch
# Normal key structure for output doesn't work with MLFlow logging nicely
# loss used as a key and also parent
class A2CPolicyforMLFlow(A2CPolicy):
def learn(
self, batch: Batch, batch_size: int, repeat: int, **kwargs: Any
) -> Dict[str, List[float]]:
loss_dict = super().learn(batch, batch_size, repeat, **kwargs)
output_loss_dict = {}
output_loss_dict["loss"] = loss_dict["loss"]
output_loss_dict["loss_component/actor"] = loss_dict["loss/actor"]
output_loss_dict["loss_component/vf"] = loss_dict["loss/vf"]
output_loss_dict["loss_component/ent"] = loss_dict["loss/ent"]
return output_loss_dict
class PPOPolicyforMLFlow(PPOPolicy):
def learn(
self, batch: Batch, batch_size: int, repeat: int, **kwargs: Any
) -> Dict[str, List[float]]:
loss_dict = super().learn(batch, batch_size, repeat, **kwargs)
output_loss_dict = {}
output_loss_dict["loss"] = loss_dict["loss"]
output_loss_dict["loss_component/clip"] = loss_dict["loss/clip"]
output_loss_dict["loss_component/vf"] = loss_dict["loss/vf"]
output_loss_dict["loss_component/ent"] = loss_dict["loss/ent"]
return output_loss_dict
| 41.272727
| 74
| 0.680617
| 183
| 1,362
| 4.825137
| 0.284153
| 0.199321
| 0.217441
| 0.16308
| 0.659117
| 0.659117
| 0.659117
| 0.659117
| 0.659117
| 0.659117
| 0
| 0.00274
| 0.196035
| 1,362
| 32
| 75
| 42.5625
| 0.803653
| 0.077827
| 0
| 0.72
| 0
| 0
| 0.138867
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.08
| false
| 0
| 0.12
| 0
| 0.36
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
69128f6bc458ac39e3300728584ec2ef1746d8e2
| 85
|
py
|
Python
|
aiodine/datatypes.py
|
Olegt0rr/aiodine
|
89f6207e780ec2c08d62e9ec20372658af7ccef9
|
[
"MIT"
] | 61
|
2019-02-27T21:07:54.000Z
|
2021-09-23T01:38:26.000Z
|
aiodine/datatypes.py
|
Olegt0rr/aiodine
|
89f6207e780ec2c08d62e9ec20372658af7ccef9
|
[
"MIT"
] | 30
|
2019-02-28T22:27:42.000Z
|
2021-09-07T04:49:47.000Z
|
aiodine/datatypes.py
|
Olegt0rr/aiodine
|
89f6207e780ec2c08d62e9ec20372658af7ccef9
|
[
"MIT"
] | 2
|
2019-10-14T15:51:59.000Z
|
2021-09-07T04:28:22.000Z
|
from typing import Callable, Awaitable
CoroutineFunction = Callable[..., Awaitable]
| 21.25
| 44
| 0.788235
| 8
| 85
| 8.375
| 0.75
| 0.507463
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.117647
| 85
| 3
| 45
| 28.333333
| 0.893333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
691e2c9a525b58a08be0c332c7a1b2358826383f
| 77
|
py
|
Python
|
refinenet/__init__.py
|
Best-of-ACRV/pytorch-refinenet
|
4365ff6734d8dc397e3a072dd47cb2f4091d065a
|
[
"BSD-3-Clause"
] | 3
|
2021-06-09T04:33:00.000Z
|
2022-03-30T07:28:38.000Z
|
refinenet/__init__.py
|
Best-of-ACRV/pytorch-refinenet
|
4365ff6734d8dc397e3a072dd47cb2f4091d065a
|
[
"BSD-3-Clause"
] | 1
|
2021-06-11T09:52:51.000Z
|
2021-06-11T09:52:51.000Z
|
refinenet/__init__.py
|
Best-of-ACRV/pytorch-refinenet
|
4365ff6734d8dc397e3a072dd47cb2f4091d065a
|
[
"BSD-3-Clause"
] | 2
|
2021-07-30T03:08:17.000Z
|
2022-03-30T07:28:40.000Z
|
from .refinenet import RefineNet
from .__main__ import main as run_from_args
| 25.666667
| 43
| 0.844156
| 12
| 77
| 4.916667
| 0.583333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.12987
| 77
| 2
| 44
| 38.5
| 0.880597
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6924b4090d78c8aee27eece8f33501d1b69d3f77
| 46
|
py
|
Python
|
tests/issues/issue_6.py
|
jparise/flake8_tuple
|
adf0510e66f80edda523861e9ac7a2e44f514fd5
|
[
"BSD-3-Clause"
] | 30
|
2016-02-20T23:13:44.000Z
|
2022-01-13T07:41:42.000Z
|
tests/issues/issue_6.py
|
jparise/flake8_tuple
|
adf0510e66f80edda523861e9ac7a2e44f514fd5
|
[
"BSD-3-Clause"
] | 26
|
2015-09-06T23:04:46.000Z
|
2021-10-17T10:31:09.000Z
|
tests/issues/issue_6.py
|
jparise/flake8_tuple
|
adf0510e66f80edda523861e9ac7a2e44f514fd5
|
[
"BSD-3-Clause"
] | 9
|
2016-02-29T14:57:05.000Z
|
2020-11-15T20:33:08.000Z
|
# -*- coding: utf-8 -*-
"""
foo
"""
bah = 1
| 5.75
| 23
| 0.369565
| 6
| 46
| 2.833333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.060606
| 0.282609
| 46
| 7
| 24
| 6.571429
| 0.454545
| 0.565217
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
695714573a64ea71a47266d0763ae4c9a0396e67
| 175
|
py
|
Python
|
EcomWebsite/ecom/blog/urls.py
|
ShibanandaJena/MyShop
|
7a925da10c9f6b86f1f9ebe4f3837b94bb800ec7
|
[
"Apache-2.0"
] | 1
|
2022-03-17T12:37:38.000Z
|
2022-03-17T12:37:38.000Z
|
EcomWebsite/ecom/blog/urls.py
|
ShibanandaJena/MyShop
|
7a925da10c9f6b86f1f9ebe4f3837b94bb800ec7
|
[
"Apache-2.0"
] | null | null | null |
EcomWebsite/ecom/blog/urls.py
|
ShibanandaJena/MyShop
|
7a925da10c9f6b86f1f9ebe4f3837b94bb800ec7
|
[
"Apache-2.0"
] | null | null | null |
from . import views
from django.urls import path
urlpatterns = [
path("",views.index ,name="blogpost"),
path("blogpost/<int:id>",views.blogpost ,name="blogpost"),
]
| 19.444444
| 62
| 0.674286
| 22
| 175
| 5.363636
| 0.545455
| 0.20339
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.148571
| 175
| 8
| 63
| 21.875
| 0.791946
| 0
| 0
| 0
| 0
| 0
| 0.188571
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
6970329be1cd8b7833dc0a503f07d7671a021ec3
| 136
|
py
|
Python
|
InvenTree/stock/__init__.py
|
ArakniD/InvenTree
|
0ebf2ebd832b2d736e895abe054ca56bfd1cc477
|
[
"MIT"
] | 656
|
2017-03-29T22:06:14.000Z
|
2022-03-30T11:23:52.000Z
|
InvenTree/stock/__init__.py
|
ArakniD/InvenTree
|
0ebf2ebd832b2d736e895abe054ca56bfd1cc477
|
[
"MIT"
] | 1,545
|
2017-04-10T23:26:04.000Z
|
2022-03-31T18:32:10.000Z
|
InvenTree/stock/__init__.py
|
fablabbcn/InvenTree
|
1d7ea7716cc96c6ffd151c822b01cd1fb5dcfecd
|
[
"MIT"
] | 196
|
2017-03-28T03:06:21.000Z
|
2022-03-28T11:53:29.000Z
|
"""
The Stock module is responsible for Stock management.
It includes models for:
- StockLocation
- StockItem
- StockItemTracking
"""
| 13.6
| 53
| 0.757353
| 15
| 136
| 6.866667
| 0.866667
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161765
| 136
| 9
| 54
| 15.111111
| 0.903509
| 0.933824
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c621672629105291c992dcb04293d7d2adc31741
| 104
|
py
|
Python
|
Keywords/pass.py
|
GowthamPrasad/py_thon
|
302a21fcfd553bb59c0084860100efee5e2dca0e
|
[
"MIT"
] | null | null | null |
Keywords/pass.py
|
GowthamPrasad/py_thon
|
302a21fcfd553bb59c0084860100efee5e2dca0e
|
[
"MIT"
] | null | null | null |
Keywords/pass.py
|
GowthamPrasad/py_thon
|
302a21fcfd553bb59c0084860100efee5e2dca0e
|
[
"MIT"
] | null | null | null |
#pass is just a placeholder which does nothing
def func():
pass
for i in [1,2,3,4,5]:
pass
| 17.333333
| 47
| 0.615385
| 20
| 104
| 3.2
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.066667
| 0.278846
| 104
| 6
| 48
| 17.333333
| 0.786667
| 0.432692
| 0
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0.5
| 0
| 0
| 0.25
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
c63c130a1c7cc9a7a02240c82dc89cfe40bd3f77
| 104
|
py
|
Python
|
venv/Lib/site-packages/notebook/prometheus/__init__.py
|
ajayiagbebaku/NFL-Model
|
afcc67a85ca7138c58c3334d45988ada2da158ed
|
[
"MIT"
] | 76
|
2020-07-06T14:44:05.000Z
|
2022-02-14T15:30:21.000Z
|
venv/Lib/site-packages/notebook/prometheus/__init__.py
|
ajayiagbebaku/NFL-Model
|
afcc67a85ca7138c58c3334d45988ada2da158ed
|
[
"MIT"
] | 24
|
2020-03-25T19:35:43.000Z
|
2022-02-10T11:46:50.000Z
|
venv/Lib/site-packages/notebook/prometheus/__init__.py
|
ajayiagbebaku/NFL-Model
|
afcc67a85ca7138c58c3334d45988ada2da158ed
|
[
"MIT"
] | 11
|
2020-06-29T08:40:24.000Z
|
2022-02-24T17:39:16.000Z
|
"""
A package containing all the functionality and
configuration connected to the prometheus metrics
"""
| 26
| 49
| 0.807692
| 13
| 104
| 6.461538
| 0.923077
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.134615
| 104
| 4
| 50
| 26
| 0.933333
| 0.923077
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
c6509454f8ee4295dfb01cbdb4b9e84ff49bf2a1
| 52
|
py
|
Python
|
setup.py
|
piotrantosz/siege-engine
|
aca9193aa72d9b899bef4da613b99e75136f49b1
|
[
"MIT"
] | null | null | null |
setup.py
|
piotrantosz/siege-engine
|
aca9193aa72d9b899bef4da613b99e75136f49b1
|
[
"MIT"
] | null | null | null |
setup.py
|
piotrantosz/siege-engine
|
aca9193aa72d9b899bef4da613b99e75136f49b1
|
[
"MIT"
] | null | null | null |
from setuptools import setup
setup(version='1.5')
| 10.4
| 28
| 0.75
| 8
| 52
| 4.875
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.044444
| 0.134615
| 52
| 4
| 29
| 13
| 0.822222
| 0
| 0
| 0
| 0
| 0
| 0.057692
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d66f44f2eb17ad9f2cc6383fe1cc7e6f4a144df4
| 888
|
py
|
Python
|
api/serializers.py
|
choi-jiwoo/capstone-project-django
|
fd6ab61da4f636dc6192de3c298a474342ffa371
|
[
"MIT"
] | null | null | null |
api/serializers.py
|
choi-jiwoo/capstone-project-django
|
fd6ab61da4f636dc6192de3c298a474342ffa371
|
[
"MIT"
] | null | null | null |
api/serializers.py
|
choi-jiwoo/capstone-project-django
|
fd6ab61da4f636dc6192de3c298a474342ffa371
|
[
"MIT"
] | null | null | null |
from rest_framework.serializers import ModelSerializer
from api.models import Stay, Cafe, Res, CafeTag, ResTag, CafeKwrd, ResKwrd
class StaySerializer(ModelSerializer):
class Meta:
model = Stay
fields = '__all__'
class CafeSerializer(ModelSerializer):
class Meta:
model = Cafe
fields = '__all__'
class ResSerializer(ModelSerializer):
class Meta:
model = Res
fields = '__all__'
class CafeTagSerializer(ModelSerializer):
class Meta:
model = CafeTag
fields = '__all__'
class ResTagSerializer(ModelSerializer):
class Meta:
model = ResTag
fields = '__all__'
class CafeKwrdSerializer(ModelSerializer):
class Meta:
model = CafeKwrd
fields = '__all__'
class ResKwrdSerializer(ModelSerializer):
class Meta:
model = ResKwrd
fields = '__all__'
| 19.304348
| 74
| 0.658784
| 80
| 888
| 6.95
| 0.3375
| 0.251799
| 0.302158
| 0.365108
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.269144
| 888
| 45
| 75
| 19.733333
| 0.856703
| 0
| 0
| 0.466667
| 0
| 0
| 0.055242
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.066667
| 0
| 0.533333
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
d67155021b306149a63c2d55ca90e812dcc37392
| 65
|
py
|
Python
|
src/visualization/config.py
|
charity-sotero/apartment_atmosphere
|
c3147c15e3cf3020f14da0bd88ebaa196fc974c7
|
[
"MIT"
] | null | null | null |
src/visualization/config.py
|
charity-sotero/apartment_atmosphere
|
c3147c15e3cf3020f14da0bd88ebaa196fc974c7
|
[
"MIT"
] | null | null | null |
src/visualization/config.py
|
charity-sotero/apartment_atmosphere
|
c3147c15e3cf3020f14da0bd88ebaa196fc974c7
|
[
"MIT"
] | null | null | null |
GOOGLE_PLACES_API_KEY = 'AIzaSyCfOAU3yAeFisvLFwNCjI4bujevR29cYm0'
| 65
| 65
| 0.923077
| 5
| 65
| 11.4
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.079365
| 0.030769
| 65
| 1
| 65
| 65
| 0.825397
| 0
| 0
| 0
| 0
| 0
| 0.590909
| 0.590909
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d6b756077aa80cbde66d9fbcac2f9155733645a3
| 103
|
py
|
Python
|
xsdata/logger.py
|
nimish/xsdata
|
7afe2781b66982428cc1731f53c065086acd35c1
|
[
"MIT"
] | null | null | null |
xsdata/logger.py
|
nimish/xsdata
|
7afe2781b66982428cc1731f53c065086acd35c1
|
[
"MIT"
] | null | null | null |
xsdata/logger.py
|
nimish/xsdata
|
7afe2781b66982428cc1731f53c065086acd35c1
|
[
"MIT"
] | null | null | null |
import logging
import click_log
logger = logging.getLogger(__name__)
click_log.basic_config(logger)
| 12.875
| 36
| 0.825243
| 14
| 103
| 5.571429
| 0.642857
| 0.205128
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.106796
| 103
| 7
| 37
| 14.714286
| 0.847826
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d6d99a925abfc9232d6b76ee91e76a355d52e3ac
| 300
|
py
|
Python
|
petstagram/petstagram/main/admin.py
|
DimOps/Django-demo-2022
|
385e65b867be95f828de2810d94a074c536403b5
|
[
"MIT"
] | null | null | null |
petstagram/petstagram/main/admin.py
|
DimOps/Django-demo-2022
|
385e65b867be95f828de2810d94a074c536403b5
|
[
"MIT"
] | null | null | null |
petstagram/petstagram/main/admin.py
|
DimOps/Django-demo-2022
|
385e65b867be95f828de2810d94a074c536403b5
|
[
"MIT"
] | null | null | null |
from django.contrib import admin
from petstagram.main.models import Profile, Pet, PetPhoto
@admin.register(Profile)
class UserAdmin(admin.ModelAdmin):
pass
@admin.register(Pet)
class UserAdmin(admin.ModelAdmin):
pass
@admin.register(PetPhoto)
class UserAdmin(admin.ModelAdmin):
pass
| 17.647059
| 57
| 0.773333
| 37
| 300
| 6.27027
| 0.432432
| 0.168103
| 0.24569
| 0.375
| 0.538793
| 0.396552
| 0.396552
| 0
| 0
| 0
| 0
| 0
| 0.13
| 300
| 16
| 58
| 18.75
| 0.888889
| 0
| 0
| 0.545455
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.272727
| 0.181818
| 0
| 0.454545
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
d6dec51face04fd7537b7edb9071e169e6ab2d45
| 26
|
py
|
Python
|
examples/miniapps/flask-blueprints/githubnavigator/blueprints/__init__.py
|
whysage/python-dependency-injector
|
cef6d35cfdf5f39438a89f000d11a21860bc8c5f
|
[
"BSD-3-Clause"
] | 1,997
|
2016-04-26T13:41:45.000Z
|
2022-03-31T16:17:53.000Z
|
examples/miniapps/flask-blueprints/githubnavigator/blueprints/__init__.py
|
whysage/python-dependency-injector
|
cef6d35cfdf5f39438a89f000d11a21860bc8c5f
|
[
"BSD-3-Clause"
] | 399
|
2016-05-16T07:20:07.000Z
|
2022-03-31T18:23:49.000Z
|
examples/miniapps/flask-blueprints/githubnavigator/blueprints/__init__.py
|
whysage/python-dependency-injector
|
cef6d35cfdf5f39438a89f000d11a21860bc8c5f
|
[
"BSD-3-Clause"
] | 162
|
2016-05-16T09:21:43.000Z
|
2022-03-30T23:00:26.000Z
|
"""Blueprints package."""
| 13
| 25
| 0.653846
| 2
| 26
| 8.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.076923
| 26
| 1
| 26
| 26
| 0.708333
| 0.730769
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d6dff6c5e6f979b4a69f0acb7511000cb0e96283
| 17
|
py
|
Python
|
python/version.py
|
tied/rest-api-samples
|
41cb468f0e9465b0becb4e3a8b3b9a6a606287bb
|
[
"MIT"
] | 1
|
2022-01-04T20:53:25.000Z
|
2022-01-04T20:53:25.000Z
|
python/version.py
|
tied/rest-api-samples
|
41cb468f0e9465b0becb4e3a8b3b9a6a606287bb
|
[
"MIT"
] | null | null | null |
python/version.py
|
tied/rest-api-samples
|
41cb468f0e9465b0becb4e3a8b3b9a6a606287bb
|
[
"MIT"
] | null | null | null |
VERSION = '3.14'
| 8.5
| 16
| 0.588235
| 3
| 17
| 3.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.214286
| 0.176471
| 17
| 1
| 17
| 17
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0.235294
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
d6e3ef567d5d7dcaa2fa157b1e87bc4fb9e87ba8
| 72
|
py
|
Python
|
polling_bot/__init__.py
|
balemessenger/poll_bot
|
672ed66aa376ac1580c48c119ca2743a16976326
|
[
"Apache-2.0"
] | null | null | null |
polling_bot/__init__.py
|
balemessenger/poll_bot
|
672ed66aa376ac1580c48c119ca2743a16976326
|
[
"Apache-2.0"
] | null | null | null |
polling_bot/__init__.py
|
balemessenger/poll_bot
|
672ed66aa376ac1580c48c119ca2743a16976326
|
[
"Apache-2.0"
] | null | null | null |
import os
MAIN_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
| 18
| 60
| 0.791667
| 11
| 72
| 4.727273
| 0.727273
| 0.230769
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.083333
| 72
| 3
| 61
| 24
| 0.787879
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
d6f10d1de392e146fd03e99907693bc13ac069df
| 166
|
py
|
Python
|
217.py
|
RafaelHuang87/Leet-Code-Practice
|
7754dcee38ffda18a5759113ef06d7becf4fe728
|
[
"MIT"
] | null | null | null |
217.py
|
RafaelHuang87/Leet-Code-Practice
|
7754dcee38ffda18a5759113ef06d7becf4fe728
|
[
"MIT"
] | null | null | null |
217.py
|
RafaelHuang87/Leet-Code-Practice
|
7754dcee38ffda18a5759113ef06d7becf4fe728
|
[
"MIT"
] | null | null | null |
class Solution:
def containsDuplicate(self, nums: [int]) -> bool:
return len(nums) != len(set(nums))
s = Solution()
print(s.containsDuplicate([1,2,3,1]))
| 27.666667
| 53
| 0.644578
| 23
| 166
| 4.652174
| 0.695652
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.028986
| 0.168675
| 166
| 6
| 54
| 27.666667
| 0.746377
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0
| 0.2
| 0.6
| 0.2
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
ba40235a1a77eb9198bb5a914d34655860cdd7ec
| 102
|
py
|
Python
|
Ishtar/Ishtar/scripts/objects.py
|
rsc-dev/ishtar
|
f7a8eb7f720e820e594facf4b975a96d1cffb5e5
|
[
"MIT"
] | 15
|
2017-04-03T09:37:40.000Z
|
2022-01-31T08:32:49.000Z
|
Ishtar/Ishtar/scripts/objects.py
|
rsc-dev/ishtar
|
f7a8eb7f720e820e594facf4b975a96d1cffb5e5
|
[
"MIT"
] | null | null | null |
Ishtar/Ishtar/scripts/objects.py
|
rsc-dev/ishtar
|
f7a8eb7f720e820e594facf4b975a96d1cffb5e5
|
[
"MIT"
] | 1
|
2019-01-16T16:22:15.000Z
|
2019-01-16T16:22:15.000Z
|
import clr
clr.AddReferenceToFile('ObjectUtils.dll')
import ObjectUtils
print '[+] Added ObjectUtils'
| 20.4
| 41
| 0.803922
| 11
| 102
| 7.454545
| 0.636364
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088235
| 102
| 4
| 42
| 25.5
| 0.88172
| 0
| 0
| 0
| 0
| 0
| 0.352941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.5
| null | null | 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
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
ba49a269b1e62c02c4101bd34999b2de07f4d863
| 839
|
py
|
Python
|
MBook/app/models.py
|
orzbhbdsb/gitlab3
|
6d6c66ba3196f9c920f34ec03492775fa022bdba
|
[
"MIT"
] | null | null | null |
MBook/app/models.py
|
orzbhbdsb/gitlab3
|
6d6c66ba3196f9c920f34ec03492775fa022bdba
|
[
"MIT"
] | null | null | null |
MBook/app/models.py
|
orzbhbdsb/gitlab3
|
6d6c66ba3196f9c920f34ec03492775fa022bdba
|
[
"MIT"
] | null | null | null |
"""
Definition of models.
"""
from django.db import models
# Create your models here.
class Author(models.Model):
AuthorID = models.CharField(max_length = 10, blank = False, primary_key = True)
Name = models.CharField(max_length = 20, blank = False)
Age = models.CharField(max_length = 3, blank = True)
Country = models.CharField(max_length = 10, blank = True)
ST = models.IntegerField(default = 0)
class Book(models.Model):
ISBN = models.CharField(max_length = 13, blank = False, primary_key = True)
Title = models.CharField(max_length = 50,blank = True)
AuthorID = models.ForeignKey(Author)
Publisher = models.CharField(max_length = 20, blank = True)
PublishDate = models.DateField()
Price = models.CharField(max_length = 8, blank = True)
ST = models.IntegerField(default = 0);
| 32.269231
| 83
| 0.691299
| 108
| 839
| 5.287037
| 0.407407
| 0.210158
| 0.252189
| 0.336252
| 0.41331
| 0.338004
| 0.129597
| 0
| 0
| 0
| 0
| 0.023599
| 0.191895
| 839
| 26
| 84
| 32.269231
| 0.817109
| 0.028605
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | null | 0
| 0.066667
| null | null | 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
ba54f696e07e25d20a0050aa514d93808a75178e
| 344
|
py
|
Python
|
src/python/peanoclaw/__init__.py
|
unterweg/peanoclaw
|
2d8b45727e3b26d824f8afc6a8772736176083af
|
[
"BSD-3-Clause"
] | 1
|
2015-07-14T10:05:52.000Z
|
2015-07-14T10:05:52.000Z
|
src/python/peanoclaw/__init__.py
|
unterweg/peanoclaw
|
2d8b45727e3b26d824f8afc6a8772736176083af
|
[
"BSD-3-Clause"
] | null | null | null |
src/python/peanoclaw/__init__.py
|
unterweg/peanoclaw
|
2d8b45727e3b26d824f8afc6a8772736176083af
|
[
"BSD-3-Clause"
] | 1
|
2019-12-03T15:58:53.000Z
|
2019-12-03T15:58:53.000Z
|
__all__ = []
__all__.extend(['Solver', 'Solution', 'State', 'SubgridSolver', 'Peano'])
from peanoclaw.peano import Peano
from peanoclaw.solver import Solver
from peanoclaw.solution import Solution
from peanoclaw.subgridsolver import SubgridSolver
from peanoclaw.internalsettings import InternalSettings
from clawpack.pyclaw.state import State
| 34.4
| 73
| 0.819767
| 39
| 344
| 7.025641
| 0.333333
| 0.237226
| 0.131387
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.09593
| 344
| 9
| 74
| 38.222222
| 0.881029
| 0
| 0
| 0
| 0
| 0
| 0.107558
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.75
| 0
| 0.75
| 0
| 0
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ba7353764d55420ec74c5ccbe75b2fc2d3f29ab9
| 267
|
py
|
Python
|
Implementation/python/forms.py
|
ADA-Inc/autentication-web
|
89850479f9b6f6663c172add6fb6bcc166156d68
|
[
"MIT"
] | null | null | null |
Implementation/python/forms.py
|
ADA-Inc/autentication-web
|
89850479f9b6f6663c172add6fb6bcc166156d68
|
[
"MIT"
] | 7
|
2018-08-17T21:51:14.000Z
|
2022-03-31T19:13:53.000Z
|
Implementation/python/forms.py
|
ADA-Inc/autentication-web
|
89850479f9b6f6663c172add6fb6bcc166156d68
|
[
"MIT"
] | null | null | null |
from flask_wtf import FlaskForm
from wtforms import *
from wtforms.validators import InputRequired
class LoginForm(FlaskForm):
username = TextField('username',validators=[InputRequired()])
password = PasswordField('password',validators=[InputRequired()])
| 38.142857
| 66
| 0.779026
| 26
| 267
| 7.961538
| 0.538462
| 0.10628
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11985
| 267
| 7
| 66
| 38.142857
| 0.880851
| 0
| 0
| 0
| 0
| 0
| 0.059701
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
ba9319bd3328cbb4c536001b79a501c346398585
| 428
|
py
|
Python
|
scrubby/db/provider/null_provider.py
|
typerandom/scrubby
|
5cccfad6c735828e6eec1452162a4e58aea917a9
|
[
"MIT"
] | 2
|
2019-05-27T22:28:21.000Z
|
2021-02-19T11:37:11.000Z
|
scrubby/db/provider/null_provider.py
|
typerandom/scrubby
|
5cccfad6c735828e6eec1452162a4e58aea917a9
|
[
"MIT"
] | 1
|
2021-03-25T21:27:34.000Z
|
2021-03-25T21:27:34.000Z
|
scrubby/db/provider/null_provider.py
|
typerandom/scrubby
|
5cccfad6c735828e6eec1452162a4e58aea917a9
|
[
"MIT"
] | null | null | null |
from .provider import Provider
class NullProvider(Provider):
def connect(self):
pass
def close(self):
pass
def get_table_columns(self, table_name):
return []
def get_tables(self):
return []
def execute(self, query, **kwargs):
return None
def clear_table(self, table_name):
pass
def clear_table_column(self, table_name, column_name):
pass
| 18.608696
| 58
| 0.619159
| 52
| 428
| 4.903846
| 0.423077
| 0.082353
| 0.152941
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.294393
| 428
| 23
| 59
| 18.608696
| 0.844371
| 0
| 0
| 0.375
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.4375
| false
| 0.25
| 0.0625
| 0.1875
| 0.75
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 1
| 0
|
0
| 4
|
ba9c63feb2e1fedc7fddccb154246959a728718d
| 34
|
py
|
Python
|
src/qsiprep_analyses/tensors/__init__.py
|
GalBenZvi/qsiprep_analyses
|
51512cffca218210f6b85e5eadd593b382963bbd
|
[
"Apache-2.0"
] | null | null | null |
src/qsiprep_analyses/tensors/__init__.py
|
GalBenZvi/qsiprep_analyses
|
51512cffca218210f6b85e5eadd593b382963bbd
|
[
"Apache-2.0"
] | 6
|
2022-03-04T15:28:20.000Z
|
2022-03-30T09:37:12.000Z
|
src/qsiprep_analyses/tensors/__init__.py
|
GalBenZvi/qsiprep_analyses
|
51512cffca218210f6b85e5eadd593b382963bbd
|
[
"Apache-2.0"
] | 2
|
2022-03-13T11:07:48.000Z
|
2022-03-13T11:50:40.000Z
|
"""
Tensor estimation module.
"""
| 8.5
| 25
| 0.647059
| 3
| 34
| 7.333333
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.147059
| 34
| 3
| 26
| 11.333333
| 0.758621
| 0.735294
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2410e1a67686b8e447aec4cf28d0622950fdf8f2
| 293
|
py
|
Python
|
rdp/__init__.py
|
emulbreh/rdp
|
73e974c88604b59f6a5aacf6664cc27669e6de6e
|
[
"MIT"
] | null | null | null |
rdp/__init__.py
|
emulbreh/rdp
|
73e974c88604b59f6a5aacf6664cc27669e6de6e
|
[
"MIT"
] | 2
|
2017-05-04T12:51:21.000Z
|
2017-06-21T06:27:43.000Z
|
rdp/__init__.py
|
emulbreh/rdp
|
73e974c88604b59f6a5aacf6664cc27669e6de6e
|
[
"MIT"
] | null | null | null |
from rdp.grammar import Grammar, GrammarBuilder, ignore
from rdp.symbols import Terminal, repeat, Regexp, Optional, Lookahead
from rdp.symbols import epsilon, flatten, drop, keep
from rdp.parser import Parser
from rdp.exceptions import ParseError, LeftRecursion, InvalidGrammar, TokenizeError
| 48.833333
| 83
| 0.832765
| 37
| 293
| 6.594595
| 0.594595
| 0.143443
| 0.114754
| 0.163934
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.109215
| 293
| 5
| 84
| 58.6
| 0.934866
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
242558f70eb57dcf9a66564a8d01e8e023f92612
| 5,205
|
py
|
Python
|
sampyl/tests/test_samplers.py
|
wilsonify/sampyl
|
fb05a0d04393e4f1691bcc9bc664dbc1b688fc97
|
[
"MIT"
] | 308
|
2015-06-30T18:16:04.000Z
|
2022-03-14T17:21:59.000Z
|
sampyl/tests/test_samplers.py
|
wilsonify/sampyl
|
fb05a0d04393e4f1691bcc9bc664dbc1b688fc97
|
[
"MIT"
] | 20
|
2015-07-02T06:12:20.000Z
|
2020-11-26T16:06:57.000Z
|
sampyl/tests/test_samplers.py
|
wilsonify/sampyl
|
fb05a0d04393e4f1691bcc9bc664dbc1b688fc97
|
[
"MIT"
] | 66
|
2015-07-27T11:19:03.000Z
|
2022-03-24T03:35:53.000Z
|
from ..core import np
from ..exceptions import *
from .logps import *
import sampyl as smp
import pytest
#TODO: Make tests to check correctness of samplers
np_source = np.__package__
n_samples = 100
def test_logp_with_grad():
logp = poisson_with_grad
start = {'lam1':1., 'lam2': 1.}
nuts = smp.NUTS(logp, start, grad_logp=True)
chain = nuts.sample(n_samples)
assert(len(chain)==n_samples)
def test_parallel_lin_model():
logp = linear_model_logp
start = {'b':np.zeros(5), 'sig': 1.}
metro = smp.Metropolis(logp, start)
nuts = smp.NUTS(logp, start)
metro_chains = metro.sample(n_samples, n_chains=2)
nuts_chains = nuts.sample(n_samples, n_chains=2)
assert(len(metro_chains) == 2)
assert(len(nuts_chains) == 2)
def test_parallel_2D():
start = {'lam1': 1., 'lam2': 1.}
metro = smp.Metropolis(poisson_logp, start)
nuts = smp.NUTS(poisson_logp, start)
metro_chains = metro.sample(n_samples, n_chains=2)
nuts_chains = nuts.sample(n_samples, n_chains=2)
assert(len(metro_chains) == 2)
assert(len(nuts_chains) == 2)
def test_sample_chain():
start = {'lam1': 1., 'lam2': 1.}
step1 = smp.Metropolis(poisson_logp, start, condition=['lam2'])
step2 = smp.NUTS(poisson_logp, start, condition=['lam1'])
chain = smp.Chain([step1, step2], start)
trace = chain.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_conditional_chain():
logp = poisson_logp
start = {'lam1': 1., 'lam2': 2.}
metro = smp.Metropolis(logp, start, condition=['lam2'])
nuts = smp.NUTS(logp, start, condition=['lam1'])
state = metro._conditional_step()
assert(state['lam2'] == 2.)
nuts.state.update(state)
state = nuts._conditional_step()
assert(len(state) == 2)
def test_conditional():
logp = poisson_logp
start = {'lam1': 1., 'lam2': 2.}
metro = smp.Metropolis(logp, start, condition=['lam2'])
state = metro._conditional_step()
assert(len(state) == 2)
assert(state['lam2'] == 2.)
def test_metropolis_linear_model():
logp = linear_model_logp
start = {'b':np.zeros(5), 'sig': 1.}
metro = smp.Metropolis(logp, start)
trace = metro.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_hamiltonian_linear_model():
logp = linear_model_logp
start = {'b': np.zeros(5), 'sig': 1.}
hmc = smp.Hamiltonian(logp, start)
trace = hmc.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_nuts_linear_model():
logp = linear_model_logp
start = {'b': np.zeros(5), 'sig': 1.}
nuts = smp.NUTS(logp, start)
trace = nuts.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_metropolis():
logp = normal_1D_logp
start = {'x': 1.}
metro = smp.Metropolis(logp, start)
trace = metro.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_hmc_autograd():
logp = normal_1D_logp
start = {'x': 1.}
if np_source == 'autograd.numpy':
hmc = smp.Hamiltonian(logp, start)
trace = hmc.sample(n_samples)
assert(trace.shape == (n_samples,))
elif np_source == 'numpy':
with pytest.raises(AutogradError):
hmc = smp.Hamiltonian(logp, start)
def test_hmc_pass_grad_logp():
logp, grad_logp = normal_1D_logp, normal_1D_grad_logp
start = {'x': 1.}
hmc = smp.Hamiltonian(logp, start, grad_logp=grad_logp)
trace = hmc.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_NUTS_autograd():
logp = normal_1D_logp
start = {'x': 1.}
if np_source == 'autograd.numpy':
nuts = smp.NUTS(logp, start)
trace = nuts.sample(n_samples)
assert(trace.shape == (n_samples,))
elif np_source == 'numpy':
with pytest.raises(AutogradError):
nuts = smp.NUTS(logp, start)
def test_NUTS_pass_grad_logp():
logp, grad_logp = normal_1D_logp, normal_1D_grad_logp
start = {'x': 1.}
nuts = smp.NUTS(logp, start, grad_logp=grad_logp)
trace = nuts.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_sampler_num_logp():
logp = 1.
start = {'x': None}
with pytest.raises(TypeError):
metro = smp.Metropolis(logp, start)
def test_sampler_no_args_logp():
def logp():
return x
start = {'x': None}
with pytest.raises(ValueError):
metro = smp.Metropolis(logp, start)
def test_metropolis_two_vars():
logp = poisson_logp
start = {'lam1':1., 'lam2':1.}
metro = smp.Metropolis(logp, start)
trace = metro.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_metropolis_two_vars_start():
logp = poisson_logp
start = {'lam1':1., 'lam2':1.}
metro = smp.Metropolis(logp, start)
trace = metro.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_slice():
logp = normal_1D_logp
start = {'x': 1.}
slice = smp.Slice(logp, start)
trace = slice.sample(n_samples)
assert(trace.shape == (n_samples,))
def test_slice_two_vars():
logp = poisson_logp
start = {'lam1': 1., 'lam2': 1.}
slice = smp.Slice(logp, start)
trace = slice.sample(n_samples)
assert(trace.shape == (n_samples,))
| 26.287879
| 67
| 0.642459
| 716
| 5,205
| 4.451117
| 0.117318
| 0.115783
| 0.079071
| 0.087857
| 0.826483
| 0.740508
| 0.700031
| 0.654534
| 0.626294
| 0.626294
| 0
| 0.019908
| 0.208646
| 5,205
| 197
| 68
| 26.42132
| 0.753824
| 0.009414
| 0
| 0.675862
| 0
| 0
| 0.029891
| 0
| 0
| 0
| 0
| 0.005076
| 0.151724
| 1
| 0.144828
| false
| 0.013793
| 0.034483
| 0.006897
| 0.186207
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 1
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
24396e451c566b95f96a4f42a0d15fe8d3816af6
| 2,322
|
py
|
Python
|
test/dpt_tests/dpt_1byte_signed_test.py
|
kistlin/xknx
|
a402c4609a8f3d5d96d83af271db52cb9006d6ec
|
[
"MIT"
] | 1
|
2022-03-06T14:42:39.000Z
|
2022-03-06T14:42:39.000Z
|
test/dpt_tests/dpt_1byte_signed_test.py
|
kistlin/xknx
|
a402c4609a8f3d5d96d83af271db52cb9006d6ec
|
[
"MIT"
] | 11
|
2022-03-14T22:32:38.000Z
|
2022-03-31T22:35:08.000Z
|
test/dpt_tests/dpt_1byte_signed_test.py
|
kistlin/xknx
|
a402c4609a8f3d5d96d83af271db52cb9006d6ec
|
[
"MIT"
] | null | null | null |
"""Unit test for KNX DPT 1 byte relative value objects."""
import pytest
from xknx.dpt import DPTPercentV8, DPTSignedRelativeValue, DPTValue1Count
from xknx.exceptions import ConversionError
class TestDPTRelativeValue:
"""Test class for KNX DPT Relative Value."""
def test_from_knx_positive(self):
"""Test positive value from KNX."""
assert DPTSignedRelativeValue.from_knx((0x00,)) == 0
assert DPTSignedRelativeValue.from_knx((0x01,)) == 1
assert DPTSignedRelativeValue.from_knx((0x02,)) == 2
assert DPTSignedRelativeValue.from_knx((0x64,)) == 100
assert DPTSignedRelativeValue.from_knx((0x7F,)) == 127
def test_from_knx_negative(self):
"""Test negative value from KNX."""
assert DPTSignedRelativeValue.from_knx((0x80,)) == -128
assert DPTSignedRelativeValue.from_knx((0x9C,)) == -100
assert DPTSignedRelativeValue.from_knx((0xFE,)) == -2
assert DPTSignedRelativeValue.from_knx((0xFF,)) == -1
def test_to_knx_positive(self):
"""Test positive value to KNX."""
assert DPTSignedRelativeValue.to_knx(0) == (0x00,)
assert DPTSignedRelativeValue.to_knx(1) == (0x01,)
assert DPTSignedRelativeValue.to_knx(2) == (0x02,)
assert DPTSignedRelativeValue.to_knx(100) == (0x64,)
assert DPTSignedRelativeValue.to_knx(127) == (0x7F,)
def test_to_knx_negative(self):
"""Test negative value to KNX."""
assert DPTSignedRelativeValue.to_knx(-128) == (0x80,)
assert DPTSignedRelativeValue.to_knx(-100) == (0x9C,)
assert DPTSignedRelativeValue.to_knx(-2) == (0xFE,)
assert DPTSignedRelativeValue.to_knx(-1) == (0xFF,)
def test_assert_min_exceeded(self):
"""Test initialization with wrong value (Underflow)."""
with pytest.raises(ConversionError):
DPTSignedRelativeValue.to_knx(-129)
def test_assert_max_exceeded(self):
"""Test initialization with wrong value (Overflow)."""
with pytest.raises(ConversionError):
DPTSignedRelativeValue.to_knx(128)
def test_unit(self):
"""Test unit of 1 byte relative value objects."""
assert DPTSignedRelativeValue.unit == ""
assert DPTPercentV8.unit == "%"
assert DPTValue1Count.unit == "counter pulses"
| 41.464286
| 73
| 0.673127
| 248
| 2,322
| 6.145161
| 0.217742
| 0.349081
| 0.194882
| 0.206693
| 0.589239
| 0.322835
| 0.251969
| 0
| 0
| 0
| 0
| 0.047852
| 0.20801
| 2,322
| 55
| 74
| 42.218182
| 0.780859
| 0.151163
| 0
| 0.055556
| 0
| 0
| 0.007792
| 0
| 0
| 0
| 0.037403
| 0
| 0.638889
| 1
| 0.194444
| false
| 0
| 0.083333
| 0
| 0.305556
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
2458954d674d6056bdc55fd538cbb23ce4a8e88b
| 717
|
py
|
Python
|
models/secrets.py
|
thevickypedia/api_file_handler
|
8920b9bb230588d56b8eb2a4d0c2eb59e5296e9a
|
[
"MIT"
] | 2
|
2021-12-13T06:20:06.000Z
|
2022-03-22T21:33:23.000Z
|
models/secrets.py
|
thevickypedia/api_file_handler
|
8920b9bb230588d56b8eb2a4d0c2eb59e5296e9a
|
[
"MIT"
] | null | null | null |
models/secrets.py
|
thevickypedia/api_file_handler
|
8920b9bb230588d56b8eb2a4d0c2eb59e5296e9a
|
[
"MIT"
] | 1
|
2021-12-13T06:20:07.000Z
|
2021-12-13T06:20:07.000Z
|
import getpass
import os
import pwd
from tortoise.models import Model
class Secrets(Model):
"""Looks for the env vars ``USER`` and ``PASSWORD``, requests from the user if unavailable.
>>> Secrets
"""
USERNAME: str = os.environ.get('USER', getpass.getuser() or pwd.getpwuid(os.getuid())[0])
PASSWORD: str = os.environ.get('PASSWORD')
if not USERNAME:
USERNAME: str = input(__prompt='Enter username: ')
os.environ['USER'] = USERNAME # Store as env var so, value remains despite restart
if not PASSWORD:
PASSWORD: str = getpass.getpass(prompt='Enter PASSWORD: ')
os.environ['PASSWORD'] = PASSWORD # Store as env var so, value remains despite restart
| 28.68
| 95
| 0.665272
| 94
| 717
| 5.053191
| 0.446809
| 0.075789
| 0.050526
| 0.063158
| 0.172632
| 0.172632
| 0.172632
| 0.172632
| 0.172632
| 0
| 0
| 0.001776
| 0.214784
| 717
| 24
| 96
| 29.875
| 0.841918
| 0.284519
| 0
| 0
| 0
| 0
| 0.112903
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0.461538
| 0.307692
| 0
| 0.538462
| 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
| 1
| 1
| 0
| 1
| 0
|
0
| 4
|
032d6c600fbcdae76913b5fb1347461373aefd62
| 96
|
py
|
Python
|
images/MER/create_lexicon.py
|
nleguillarme/snr_tools_and_methods
|
0a62b411989289a72b2dbf8e3a60bcdc32306dae
|
[
"Apache-2.0"
] | 2
|
2021-08-24T14:57:26.000Z
|
2022-02-07T19:46:48.000Z
|
images/MER/create_lexicon.py
|
nleguillarme/snr_tools_and_methods
|
0a62b411989289a72b2dbf8e3a60bcdc32306dae
|
[
"Apache-2.0"
] | null | null | null |
images/MER/create_lexicon.py
|
nleguillarme/snr_tools_and_methods
|
0a62b411989289a72b2dbf8e3a60bcdc32306dae
|
[
"Apache-2.0"
] | null | null | null |
import merpy
merpy.create_lexicon_from_file("ncbi.txt", "ncbi")
merpy.process_lexicon("ncbi")
| 16
| 50
| 0.78125
| 14
| 96
| 5.071429
| 0.642857
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.072917
| 96
| 5
| 51
| 19.2
| 0.797753
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
032ffdd156f2bdf9468433191d431081b171a1df
| 107
|
py
|
Python
|
StatisticsFunctions/variance.py
|
mkm99/TeamProject_StatsCalculator
|
81085c1af47f38d3e49b43d667e312016c44ad10
|
[
"MIT"
] | null | null | null |
StatisticsFunctions/variance.py
|
mkm99/TeamProject_StatsCalculator
|
81085c1af47f38d3e49b43d667e312016c44ad10
|
[
"MIT"
] | 7
|
2020-03-03T21:37:57.000Z
|
2020-03-06T04:11:42.000Z
|
StatisticsFunctions/variance.py
|
mkm99/TeamProject_StatsCalculator
|
81085c1af47f38d3e49b43d667e312016c44ad10
|
[
"MIT"
] | null | null | null |
import numpy as np
class Variance():
@staticmethod
def variance(data):
return np.var(data)
| 17.833333
| 27
| 0.654206
| 14
| 107
| 5
| 0.785714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.252336
| 107
| 6
| 27
| 17.833333
| 0.875
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
033ea47fa2e5daf9936636fbdb0490a19908fa20
| 604
|
py
|
Python
|
foxylib/tools/socialmedia/naver/foxylib_naver.py
|
foxytrixy-com/foxylib
|
94b8c5b9f8b12423393c68f7d9f910258840ed18
|
[
"BSD-3-Clause"
] | null | null | null |
foxylib/tools/socialmedia/naver/foxylib_naver.py
|
foxytrixy-com/foxylib
|
94b8c5b9f8b12423393c68f7d9f910258840ed18
|
[
"BSD-3-Clause"
] | 3
|
2019-12-12T05:17:44.000Z
|
2022-03-11T23:40:50.000Z
|
foxylib/tools/socialmedia/naver/foxylib_naver.py
|
foxytrixy-com/foxylib
|
94b8c5b9f8b12423393c68f7d9f910258840ed18
|
[
"BSD-3-Clause"
] | 2
|
2019-10-16T17:39:34.000Z
|
2020-02-10T06:32:08.000Z
|
import os
from functools import lru_cache
from foxylib.tools.function.function_tool import FunctionTool
class FoxylibNaver:
@classmethod
@FunctionTool.wrapper2wraps_applied(lru_cache(maxsize=1))
def client_id(cls):
return os.environ.get("NAVER_APP_ID")
@classmethod
@FunctionTool.wrapper2wraps_applied(lru_cache(maxsize=1))
def secret_id(cls):
return os.environ.get("NAVER_SECRET_ID")
@classmethod
@FunctionTool.wrapper2wraps_applied(lru_cache(maxsize=1))
def foxytrixy_auth_token(cls):
return os.environ.get("NAVER_FOXYTRIXY_AUTH_TOKEN")
| 27.454545
| 61
| 0.751656
| 76
| 604
| 5.723684
| 0.407895
| 0.073563
| 0.248276
| 0.296552
| 0.625287
| 0.625287
| 0.565517
| 0.436782
| 0.436782
| 0.294253
| 0
| 0.011788
| 0.157285
| 604
| 21
| 62
| 28.761905
| 0.842829
| 0
| 0
| 0.375
| 0
| 0
| 0.087748
| 0.043046
| 0
| 0
| 0
| 0
| 0
| 1
| 0.1875
| false
| 0
| 0.1875
| 0.1875
| 0.625
| 0
| 0
| 0
| 0
| null | 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
300af3b861bc474f69ddd334c432b9fe20f915b6
| 25
|
py
|
Python
|
promgen/version.py
|
PeterDaveHello/promgen
|
45bfd728748b371af758a7c7f3c341900e8425fd
|
[
"MIT"
] | null | null | null |
promgen/version.py
|
PeterDaveHello/promgen
|
45bfd728748b371af758a7c7f3c341900e8425fd
|
[
"MIT"
] | null | null | null |
promgen/version.py
|
PeterDaveHello/promgen
|
45bfd728748b371af758a7c7f3c341900e8425fd
|
[
"MIT"
] | null | null | null |
__version__ = "0.39.dev"
| 12.5
| 24
| 0.68
| 4
| 25
| 3.25
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 0.12
| 25
| 1
| 25
| 25
| 0.454545
| 0
| 0
| 0
| 0
| 0
| 0.32
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
301633bf6660e5b20a368a5a441b5eb35662808d
| 203
|
py
|
Python
|
myroot/apps.py
|
pinoylearnpython/dev
|
3fd904c594a8c5cab7fd1fe2ad775fd519410a8a
|
[
"MIT"
] | 2
|
2019-10-29T07:41:38.000Z
|
2020-01-31T16:46:15.000Z
|
myroot/apps.py
|
pinoylearnpython/dev
|
3fd904c594a8c5cab7fd1fe2ad775fd519410a8a
|
[
"MIT"
] | null | null | null |
myroot/apps.py
|
pinoylearnpython/dev
|
3fd904c594a8c5cab7fd1fe2ad775fd519410a8a
|
[
"MIT"
] | 2
|
2019-04-23T04:40:07.000Z
|
2020-02-17T09:11:48.000Z
|
from django.apps import AppConfig
from django.conf import settings
class myrootConfig(AppConfig):
""" Class to call our 'myroot' app structural name """
name = settings.APP_LABEL_MYROOT
| 25.375
| 59
| 0.729064
| 26
| 203
| 5.615385
| 0.653846
| 0.136986
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.197044
| 203
| 7
| 60
| 29
| 0.895706
| 0.226601
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
301b35005139a6709168c59a00e0e7d293501b06
| 374
|
py
|
Python
|
test/test_topology.py
|
fyumoto/MHGAN
|
a484fba54d73839770ea74f462505b056b71c32b
|
[
"MIT"
] | 17
|
2019-02-01T21:15:47.000Z
|
2020-06-03T22:20:22.000Z
|
test/test_topology.py
|
fyumoto/MHGAN
|
a484fba54d73839770ea74f462505b056b71c32b
|
[
"MIT"
] | null | null | null |
test/test_topology.py
|
fyumoto/MHGAN
|
a484fba54d73839770ea74f462505b056b71c32b
|
[
"MIT"
] | 9
|
2019-03-29T01:52:53.000Z
|
2020-10-22T09:24:40.000Z
|
import unittest
from mhgan import *
class Test_Topology(unittest.TestCase):
def test_io_tensors(self):
gan = WGAN(Generator([100], [28, 28, 1]), Discriminator())
self.assertEqual(type(gan.G), tf.Tensor)
self.assertEqual(type(gan.G), tf.Tensor)
self.assertEqual(type(gan.x), tf.Tensor)
self.assertEqual(type(gan.z), tf.Tensor)
| 26.714286
| 66
| 0.657754
| 51
| 374
| 4.764706
| 0.509804
| 0.246914
| 0.312757
| 0.36214
| 0.469136
| 0.469136
| 0.345679
| 0.345679
| 0.345679
| 0.345679
| 0
| 0.026578
| 0.195187
| 374
| 13
| 67
| 28.769231
| 0.780731
| 0
| 0
| 0.222222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.444444
| 1
| 0.111111
| false
| 0
| 0.222222
| 0
| 0.444444
| 0
| 0
| 0
| 0
| null | 1
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
3025a8eba14e5ed4be539875aa79c93954d0bcb0
| 326
|
py
|
Python
|
src/modules/network/python/__init__.py
|
ivanmurashko/kalinka
|
58a3f774c414dfc408aa06f560dde455c2271c6b
|
[
"MIT"
] | null | null | null |
src/modules/network/python/__init__.py
|
ivanmurashko/kalinka
|
58a3f774c414dfc408aa06f560dde455c2271c6b
|
[
"MIT"
] | null | null | null |
src/modules/network/python/__init__.py
|
ivanmurashko/kalinka
|
58a3f774c414dfc408aa06f560dde455c2271c6b
|
[
"MIT"
] | null | null | null |
from net import *
from defines import *
import cli
import proto
""" Creates a module instance
@param[in] server - the server instance
"""
def createModuleInstance(server):
return Net(server)
def importCLI(parent):
""" Import a CLI instance to main CLI
"""
netcli = cli.CLI(parent)
return netcli
| 18.111111
| 43
| 0.677914
| 42
| 326
| 5.261905
| 0.52381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.230061
| 326
| 17
| 44
| 19.176471
| 0.880478
| 0.101227
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.555556
| 0.111111
| 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
| 1
| 1
| 0
|
0
| 4
|
3028a6e6b3f33031ae273f28a9cbb77fcff3d614
| 96
|
py
|
Python
|
backend/secret_base/apps.py
|
tanzhiquan/DragonGoods
|
d247770b6c277e616a172af0ffad6490c1bc04c3
|
[
"MIT"
] | null | null | null |
backend/secret_base/apps.py
|
tanzhiquan/DragonGoods
|
d247770b6c277e616a172af0ffad6490c1bc04c3
|
[
"MIT"
] | 3
|
2020-07-18T23:04:47.000Z
|
2021-05-10T20:19:09.000Z
|
backend/secret_base/apps.py
|
tanzhiquan/DragonGoods
|
d247770b6c277e616a172af0ffad6490c1bc04c3
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class SecretBaseConfig(AppConfig):
name = 'secret_base'
| 16
| 34
| 0.770833
| 11
| 96
| 6.636364
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.15625
| 96
| 5
| 35
| 19.2
| 0.901235
| 0
| 0
| 0
| 0
| 0
| 0.114583
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
30328b30a486124d27d64a35d648d22e4f79a1d3
| 69
|
py
|
Python
|
src/sas/sascalc/pr/c_extensions/__init__.py
|
andyfaff/sasview
|
c00a797ab9c4ddc60f0fa8a64ae8a2067c225921
|
[
"BSD-3-Clause"
] | null | null | null |
src/sas/sascalc/pr/c_extensions/__init__.py
|
andyfaff/sasview
|
c00a797ab9c4ddc60f0fa8a64ae8a2067c225921
|
[
"BSD-3-Clause"
] | null | null | null |
src/sas/sascalc/pr/c_extensions/__init__.py
|
andyfaff/sasview
|
c00a797ab9c4ddc60f0fa8a64ae8a2067c225921
|
[
"BSD-3-Clause"
] | null | null | null |
"""
C extensions to provide the P(r) inversion computations.
"""
| 17.25
| 60
| 0.666667
| 9
| 69
| 5.111111
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.202899
| 69
| 3
| 61
| 23
| 0.836364
| 0.811594
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
304ff7fa2a5bf42cff4dc9b84f76e0bcbbf6a138
| 117
|
py
|
Python
|
dnbpy/policy.py
|
lantunes/dnbpy
|
23536c70678575afd19000b69d047ee4b7a2bb40
|
[
"Apache-2.0"
] | 2
|
2018-04-23T22:59:15.000Z
|
2020-08-17T09:32:26.000Z
|
dnbpy/policy.py
|
lantunes/dnbpy
|
23536c70678575afd19000b69d047ee4b7a2bb40
|
[
"Apache-2.0"
] | null | null | null |
dnbpy/policy.py
|
lantunes/dnbpy
|
23536c70678575afd19000b69d047ee4b7a2bb40
|
[
"Apache-2.0"
] | null | null | null |
class Policy:
def select_edge(self, board_state, score=None, opp_score=None):
raise NotImplementedError
| 23.4
| 67
| 0.735043
| 15
| 117
| 5.533333
| 0.866667
| 0.216867
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188034
| 117
| 4
| 68
| 29.25
| 0.873684
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0
| 0
| 0.666667
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
30674212f78351c59efbaa9713de821666a19b18
| 157
|
py
|
Python
|
pyFT/FTDate.py
|
lesibius/pyFT
|
509bb047d629d8de5049df74e02b09fb91610347
|
[
"MIT"
] | null | null | null |
pyFT/FTDate.py
|
lesibius/pyFT
|
509bb047d629d8de5049df74e02b09fb91610347
|
[
"MIT"
] | null | null | null |
pyFT/FTDate.py
|
lesibius/pyFT
|
509bb047d629d8de5049df74e02b09fb91610347
|
[
"MIT"
] | null | null | null |
import pyFT.FTError
import datetime as dt
strfRFC3339 = '%Y-%m-%dT%H:%M:%S.000Z'
def FTdateTime(val):
return dt.datetime.strftime(val,strfRFC3339)
| 13.083333
| 48
| 0.707006
| 24
| 157
| 4.625
| 0.708333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.08209
| 0.146497
| 157
| 11
| 49
| 14.272727
| 0.746269
| 0
| 0
| 0
| 0
| 0
| 0.142857
| 0.142857
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.4
| 0.2
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 1
| 0
|
0
| 4
|
061c6600f5a5c5abece665a0b8a26a932f6aee3a
| 49
|
py
|
Python
|
ensign_multicat/__init__.py
|
phoughton/ensign_multicat
|
82a3b73d2af7abdda3c323ce6a6546f647666df3
|
[
"MIT"
] | null | null | null |
ensign_multicat/__init__.py
|
phoughton/ensign_multicat
|
82a3b73d2af7abdda3c323ce6a6546f647666df3
|
[
"MIT"
] | null | null | null |
ensign_multicat/__init__.py
|
phoughton/ensign_multicat
|
82a3b73d2af7abdda3c323ce6a6546f647666df3
|
[
"MIT"
] | null | null | null |
import ensign_multicat.utils
__all__ = ["utils"]
| 16.333333
| 28
| 0.77551
| 6
| 49
| 5.5
| 0.833333
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.102041
| 49
| 3
| 29
| 16.333333
| 0.75
| 0
| 0
| 0
| 0
| 0
| 0.1
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
066b5183f57d7bf9b790518e47a0088317ed4064
| 3,145
|
py
|
Python
|
series_tiempo_ar_api/apps/management/migrations/0001_auto_20180507_1500.py
|
datosgobar/series-tiempo-ar-api
|
6b553c573f6e8104f8f3919efe79089b7884280c
|
[
"MIT"
] | 28
|
2017-12-16T20:30:52.000Z
|
2021-08-11T17:35:04.000Z
|
series_tiempo_ar_api/apps/management/migrations/0001_auto_20180507_1500.py
|
datosgobar/series-tiempo-ar-api
|
6b553c573f6e8104f8f3919efe79089b7884280c
|
[
"MIT"
] | 446
|
2017-11-16T15:21:40.000Z
|
2021-06-10T20:14:21.000Z
|
series_tiempo_ar_api/apps/management/migrations/0001_auto_20180507_1500.py
|
datosgobar/series-tiempo-ar-api
|
6b553c573f6e8104f8f3919efe79089b7884280c
|
[
"MIT"
] | 12
|
2018-08-23T16:13:32.000Z
|
2022-03-01T23:12:28.000Z
|
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-05-07 18:00
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('management', 'py3_empty_failed_queue'),
]
operations = [
migrations.AlterField(
model_name='indicator',
name='type',
field=models.CharField(choices=[('catalogos_nuevos_cant', 'Catálogos nuevos'), ('catalogos_actualizados_cant', 'Catálogos actualizados'), ('catalogos_no_actualizados_cant', 'Catálogos no actualizados'), ('catalogos_cant', 'Catálogos totales'), ('catalogos_error_cant', 'Catálogos con error'), ('datasets_actualizados_cant', 'Datasets actualizados'), ('datasets_no_actualizados_cant', 'Datasets no actualizados'), ('datasets_indexables_discontinuados_cant', 'Datasets indexables (discontinuados)'), ('datasets_indexables_cant', 'Datasets indexables'), ('datasets_error_cant', 'Datasets con errores'), ('datasets_nuevos_cant', 'Datasets no indexables (nuevos)'), ('datasets_no_indexables_anteriores_cant', 'Datasets no indexables (anteriores)'), ('datasets_no_indexables_discontinuados_cant', 'Datasets no indexables (discontinuados)'), ('datasets_no_indexables_cant', 'Datasets no indexables (total)'), ('datasets_disponibles_cant', 'Datasets disponibles'), ('datasets_cant', 'Datasets totales'), ('distribuciones_actualizadas_cant', 'Distribuciones actualizadas'), ('distribuciones_no_actualizadas_cant', 'Distribuciones no actualizadas'), ('distribuciones_indexables_discontinuadas_cant', 'Distribuciones indexables (discontinuadas)'), ('distribuciones_indexables_cant', 'Distribuciones indexables'), ('distribuciones_error_cant', 'Distribuciones con error'), ('distribuciones_nuevas_cant', 'Distribuciones no indexables (nuevas)'), ('distribuciones_no_indexables_anteriores_cant', 'Distribuciones no indexables (anteriores)'), ('distribuciones_no_indexables_discontinuadas_cant', 'Distribuciones no indexables (discontinuadas)'), ('distribuciones_no_indexables_cant', 'Distribuciones no indexables'), ('distribuciones_disponibles_cant', 'Distribuciones disponibles'), ('distribuciones_cant', 'Distribuciones totales'), ('series_actualizadas_cant', 'Series actualizadas'), ('series_no_actualizadas_cant', 'Series no actualizadas'), ('series_indexables_discontinuadas_cant', 'Series indexables (discontinuadas)'), ('series_indexables_cant', 'Series indexables'), ('series_error_cant', 'Series con error'), ('series_nuevas_cant', 'Series no indexables (nuevas)'), ('series_no_indexables_anteriores_cant', 'Series no indexables (anteriores)'), ('series_no_indexables_discontinuadas_cant', 'Series no indexables (discontinuadas)'), ('series_no_indexables_cant', 'Series no indexables'), ('series_disponibles_cant', 'Series disponibles'), ('field_cant', 'Series totales')], max_length=100),
),
migrations.DeleteModel(
name='BaseRegisterFile',
),
migrations.DeleteModel(
name='DatasetIndexingFile',
),
migrations.DeleteModel(
name='NodeRegisterFile',
),
]
| 104.833333
| 2,498
| 0.755167
| 304
| 3,145
| 7.470395
| 0.223684
| 0.110964
| 0.061647
| 0.042272
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.00754
| 0.114467
| 3,145
| 29
| 2,499
| 108.448276
| 0.807899
| 0.021622
| 0
| 0.318182
| 1
| 0
| 0.70039
| 0.303513
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.090909
| 0
| 0.227273
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
067ca4cfe72619554aed330c5ecd958232bb9c52
| 52
|
py
|
Python
|
packages/vaex-ml/vaex/ml/_version.py
|
mgbin088/vaex
|
2849255ac66f9d0d45374fc49ffd2b9157eae46a
|
[
"MIT"
] | 1
|
2019-12-20T01:50:04.000Z
|
2019-12-20T01:50:04.000Z
|
packages/vaex-ml/vaex/ml/_version.py
|
mgbin088/vaex
|
2849255ac66f9d0d45374fc49ffd2b9157eae46a
|
[
"MIT"
] | null | null | null |
packages/vaex-ml/vaex/ml/_version.py
|
mgbin088/vaex
|
2849255ac66f9d0d45374fc49ffd2b9157eae46a
|
[
"MIT"
] | null | null | null |
__version__ = '0.7.0'
__version_tuple__ = (0, 7, 0)
| 17.333333
| 29
| 0.653846
| 9
| 52
| 2.777778
| 0.444444
| 0.16
| 0.24
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.136364
| 0.153846
| 52
| 2
| 30
| 26
| 0.431818
| 0
| 0
| 0
| 0
| 0
| 0.096154
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0688250be182c5280ae55dce431cade3b63d838d
| 100
|
py
|
Python
|
facet/network/__init__.py
|
edponce/FACET
|
0dca2d728813a4865e72b2e8fd6b114a0c63d5b0
|
[
"MIT"
] | 2
|
2020-10-16T19:27:21.000Z
|
2021-11-04T15:06:54.000Z
|
facet/network/__init__.py
|
edponce/FACET
|
0dca2d728813a4865e72b2e8fd6b114a0c63d5b0
|
[
"MIT"
] | 24
|
2020-07-13T01:49:36.000Z
|
2020-10-30T21:54:00.000Z
|
facet/network/__init__.py
|
edponce/FACET
|
0dca2d728813a4865e72b2e8fd6b114a0c63d5b0
|
[
"MIT"
] | null | null | null |
from .client import SocketClient
from .server import (
SocketServer,
SocketServerHandler,
)
| 16.666667
| 32
| 0.75
| 9
| 100
| 8.333333
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.19
| 100
| 5
| 33
| 20
| 0.925926
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
0696c1c45eaaeeb3de7634e0c2293e5fc954b9de
| 140
|
py
|
Python
|
coilutils/__init__.py
|
rehohoho/coiltraine
|
c3ce77d13fdf8f96eed3de0dae4c01be65cb5656
|
[
"MIT"
] | 204
|
2019-01-28T13:31:53.000Z
|
2022-03-23T23:57:18.000Z
|
coilutils/__init__.py
|
rehohoho/coiltraine
|
c3ce77d13fdf8f96eed3de0dae4c01be65cb5656
|
[
"MIT"
] | 39
|
2019-02-02T22:14:14.000Z
|
2022-01-30T08:21:51.000Z
|
coilutils/__init__.py
|
rehohoho/coiltraine
|
c3ce77d13fdf8f96eed3de0dae4c01be65cb5656
|
[
"MIT"
] | 64
|
2019-02-24T10:26:04.000Z
|
2022-03-04T12:49:59.000Z
|
from .attribute_dict import AttributeDict
#from .experiment_schedule import mount_experiment_heap, get_free_gpus, pop_half_gpu, pop_one_gpu
| 46.666667
| 97
| 0.878571
| 21
| 140
| 5.380952
| 0.761905
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.078571
| 140
| 3
| 97
| 46.666667
| 0.875969
| 0.685714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
2308799566efe86b61bb6284f93f97a76f631278
| 80
|
py
|
Python
|
__init__.py
|
LAIRLAB/libpyarr
|
9e973a4045519fa6aedae3aaabd8267f6f796a8c
|
[
"BSD-3-Clause"
] | 1
|
2016-04-09T02:37:03.000Z
|
2016-04-09T02:37:03.000Z
|
__init__.py
|
LAIRLAB/libpyarr
|
9e973a4045519fa6aedae3aaabd8267f6f796a8c
|
[
"BSD-3-Clause"
] | null | null | null |
__init__.py
|
LAIRLAB/libpyarr
|
9e973a4045519fa6aedae3aaabd8267f6f796a8c
|
[
"BSD-3-Clause"
] | null | null | null |
__all__ = ['gen_everything', 'code_gen', 't_code_gen', 'boost_util', 'pdbwrap']
| 40
| 79
| 0.7
| 11
| 80
| 4.272727
| 0.727273
| 0.297872
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.0875
| 80
| 1
| 80
| 80
| 0.643836
| 0
| 0
| 0
| 0
| 0
| 0.6125
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
231a85effee438fa001e40691bb86f63653ca667
| 397
|
py
|
Python
|
test/test_base.py
|
artemyk/dynpy
|
c2914ac315083ad76707a7fcb2c8800a2ec52944
|
[
"BSD-2-Clause"
] | 6
|
2015-03-05T04:13:22.000Z
|
2021-09-24T02:46:09.000Z
|
test/test_base.py
|
artemyk/dynpy
|
c2914ac315083ad76707a7fcb2c8800a2ec52944
|
[
"BSD-2-Clause"
] | null | null | null |
test/test_base.py
|
artemyk/dynpy
|
c2914ac315083ad76707a7fcb2c8800a2ec52944
|
[
"BSD-2-Clause"
] | 6
|
2015-03-05T04:16:06.000Z
|
2021-07-03T13:26:26.000Z
|
from __future__ import division, print_function, absolute_import
import six
range = six.moves.range
import numpy as np
import scipy.sparse as ss
import dynpy
class ExampleSystem(dynpy.dynsys.DiscreteStateDynamicalSystem):
def states(self):
return [1,2]
def _iterate_1step_discrete(self, x):
return 2 if x == 1 else 2
def test_dynsys():
d = ExampleSystem()
d.print_attractor_basins()
| 18.904762
| 64
| 0.7733
| 58
| 397
| 5.086207
| 0.637931
| 0.027119
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.017699
| 0.146096
| 397
| 20
| 65
| 19.85
| 0.852507
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.214286
| false
| 0
| 0.357143
| 0.142857
| 0.785714
| 0.142857
| 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
| 1
| 1
| 0
|
0
| 4
|
23287f533d6f2e66845d2d794d79d14554726464
| 881
|
wsgi
|
Python
|
adapter.wsgi
|
nabajour/DrinkingBuddyServer
|
376ede417b799165a03a990acb5a9423931cb784
|
[
"MIT"
] | 2
|
2016-01-23T00:15:44.000Z
|
2016-11-17T16:01:03.000Z
|
adapter.wsgi
|
nabajour/DrinkingBuddyServer
|
376ede417b799165a03a990acb5a9423931cb784
|
[
"MIT"
] | 9
|
2016-02-28T16:12:09.000Z
|
2016-12-31T21:05:58.000Z
|
adapter.wsgi
|
nabajour/DrinkingBuddyServer
|
376ede417b799165a03a990acb5a9423931cb784
|
[
"MIT"
] | 1
|
2019-01-26T01:57:25.000Z
|
2019-01-26T01:57:25.000Z
|
#!/usr/bin/python3
import sys
sys.path.insert(0, '/path/to/drinkingbuddy/')
from drinkingbuddy import app as application
### Example configuration for apache 2 webserver ###
#<VirtualHost *:80>
# ServerName drinkingbuddy.lan.posttenebraslab.ch
#
# WSGIDaemonProcess drinkingbuddy user=www-data group=www-data processes=1 threads=1
# WSGIScriptAlias / /data/www_app/drinkingbuddy/adapter.wsgi
#
# <Directory /data/www_app/drinkingbuddy>
# WSGIProcessGroup drinkingbuddy
# WSGIApplicationGroup %{GLOBAL}
# Order deny,allow
# Allow from all
# Require all granted
# </Directory>
#
# ErrorLog /var/log/apache2/drinkingbuddy.posttenebraslab.ch-error.log
# CustomLog /var/log/apache2/drinkingbuddy.posttenebraslab.ch-access.log combined
#
#</VirtualHost>
####
| 30.37931
| 91
| 0.668558
| 89
| 881
| 6.595506
| 0.617978
| 0.086882
| 0.034072
| 0.078365
| 0.146508
| 0.146508
| 0
| 0
| 0
| 0
| 0
| 0.013177
| 0.224745
| 881
| 28
| 92
| 31.464286
| 0.846266
| 0.822928
| 0
| 0
| 0
| 0
| 0.181102
| 0.181102
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.666667
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
2336258913cdae3881e4328795163527fd883de2
| 2,734
|
py
|
Python
|
06/LaborSupplyModel.py
|
AskerNC/lectures-2021
|
d152450b2fee7be775892dde1a467639aa5e35ea
|
[
"MIT"
] | 9
|
2020-11-30T22:25:38.000Z
|
2021-10-05T12:17:11.000Z
|
06/LaborSupplyModel.py
|
AskerNC/lectures-2021
|
d152450b2fee7be775892dde1a467639aa5e35ea
|
[
"MIT"
] | 1
|
2021-04-12T14:15:49.000Z
|
2021-04-12T15:03:55.000Z
|
06/LaborSupplyModel.py
|
AskerNC/lectures-2021
|
d152450b2fee7be775892dde1a467639aa5e35ea
|
[
"MIT"
] | 30
|
2021-02-08T16:18:01.000Z
|
2022-02-05T17:02:35.000Z
|
import numpy as np
from scipy import optimize
def implied_tax(l,w,tau0,tau1,kappa):
""" calculate implied tax of labor supply choice
Args:
l (float): labor supply
w (float): wage
tau0 (float): standard labor tax
tau1 (float): top bracket labor income tax
kappa (float): cut-off for the top labor income bracket
Returns:
(float): total tax bill
"""
return tau0*w*l + tau1*np.fmax(w*l-kappa,0)
def implied_c(l,m,w,tau0,tau1,kappa):
""" calculate implied optimal consumption of labor supply choice
Args:
l (float): labor supply
m (float): cash-on-hand
w (float): wage
tau0 (float): standard labor tax
tau1 (float): top bracket labor income tax
kappa (float): cut-off for the top labor income bracket
Returns:
(float): consumption
"""
return m + w*l - implied_tax(l,w,tau0,tau1,kappa)
def utility(c,l,nu,frisch):
""" utility of consumption and labor supply decision
Args:
c (float): consumption
l (float): labor supply
nu (float): disutility of labor supply
frisch (float): frisch elasticity of labor supply
Returns:
(float): utility
"""
return np.log(c) - nu*l**(1+1/frisch)/(1+1/frisch)
def value_of_choice(l,nu,frisch,m,w,tau0,tau1,kappa):
""" calculate implied utlity of consumption and labor supply choice
Args:
l (float): labor supply
nu (float): disutility of labor supply
frisch (float): frisch elasticity of labor supply
m (float): cash-on-hand
w (float): wage
tau0 (float): standard labor tax
tau1 (float): top bracket labor income tax
kappa (float): cut-off for the top labor income bracket
Returns:
(float): utility
"""
c = implied_c(l,m,w,tau0,tau1,kappa)
return utility(c,l,nu,frisch)
def find_optimal_labor_supply(nu,frisch,m,w,tau0,tau1,kappa):
""" find optimal labor supply choice
Args:
nu (float): disutility of labor supply
frisch (float): frisch elasticity of labor supply
m (float): cash-on-hand
w (float): wage
tau0 (float): standard labor tax
tau1 (float): top bracket labor income tax
kappa (float): cut-off for the top labor income bracket
Returns:
(float): utility
"""
obj = lambda l: -value_of_choice(l,nu,frisch,m,w,tau0,tau1,kappa)
res = optimize.minimize_scalar(obj,bounds=(1e-8,1),method='bounded')
return res.x
| 25.792453
| 72
| 0.581931
| 363
| 2,734
| 4.349862
| 0.184573
| 0.111463
| 0.065864
| 0.062065
| 0.772008
| 0.723243
| 0.71311
| 0.646612
| 0.602913
| 0.559215
| 0
| 0.017195
| 0.319312
| 2,734
| 106
| 73
| 25.792453
| 0.831274
| 0.611924
| 0
| 0
| 0
| 0
| 0.009749
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.333333
| false
| 0
| 0.133333
| 0
| 0.8
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
233f28031f95c6ccee423019ab70967705f52c83
| 117
|
py
|
Python
|
djangocms_versioning/test_utils/polls/forms.py
|
NarenderRajuB/djangocms-versioning
|
aa7a16fe275a6d8a41781ffb1e10427de917c2d5
|
[
"BSD-3-Clause"
] | 12
|
2018-09-04T10:33:16.000Z
|
2021-09-07T14:30:12.000Z
|
djangocms_versioning/test_utils/polls/forms.py
|
NarenderRajuB/djangocms-versioning
|
aa7a16fe275a6d8a41781ffb1e10427de917c2d5
|
[
"BSD-3-Clause"
] | 46
|
2018-07-31T08:45:17.000Z
|
2021-09-08T15:45:05.000Z
|
djangocms_versioning/test_utils/polls/forms.py
|
NarenderRajuB/djangocms-versioning
|
aa7a16fe275a6d8a41781ffb1e10427de917c2d5
|
[
"BSD-3-Clause"
] | 16
|
2018-08-30T19:08:45.000Z
|
2021-07-13T11:31:43.000Z
|
from django import forms
from .models import PollContent
class PollForm(forms.ModelForm):
model = PollContent
| 14.625
| 32
| 0.777778
| 14
| 117
| 6.5
| 0.714286
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.17094
| 117
| 7
| 33
| 16.714286
| 0.938144
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.5
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
233f6e95766bccfb7821181e72486ec02a300270
| 167
|
py
|
Python
|
tests/authorization/tests.py
|
ninumedia/django-tastypie
|
4e4de4dddff9feeda4bed9d1e334ed286c409792
|
[
"BSD-3-Clause"
] | null | null | null |
tests/authorization/tests.py
|
ninumedia/django-tastypie
|
4e4de4dddff9feeda4bed9d1e334ed286c409792
|
[
"BSD-3-Clause"
] | 2
|
2017-04-07T16:28:25.000Z
|
2017-05-23T04:52:17.000Z
|
tests/authorization/tests.py
|
ninumedia/django-tastypie
|
4e4de4dddff9feeda4bed9d1e334ed286c409792
|
[
"BSD-3-Clause"
] | null | null | null |
from django.test import TestCase
from tastypie.authorization import Authorization
class PerUserAuthorizationTestCase(TestCase):
def test_get(self):
pass
| 20.875
| 48
| 0.790419
| 18
| 167
| 7.277778
| 0.722222
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.161677
| 167
| 7
| 49
| 23.857143
| 0.935714
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0.2
| 0.4
| 0
| 0.8
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| 0
| 0
|
0
| 4
|
235f25dbfac887621ae07adb4af2b0785a2a29b1
| 101
|
py
|
Python
|
astr-119-hw-2/useful_modules.py
|
cnojiri/astr-119
|
e4fae90e75276c1800fda5bb559f988767c0d870
|
[
"MIT"
] | 1
|
2021-12-07T07:41:33.000Z
|
2021-12-07T07:41:33.000Z
|
astr-119-hw-2/useful_modules.py
|
cnojiri/astr-119
|
e4fae90e75276c1800fda5bb559f988767c0d870
|
[
"MIT"
] | 6
|
2021-09-29T22:13:31.000Z
|
2021-11-24T16:00:50.000Z
|
astr-119-hw-2/useful_modules.py
|
cnojiri/astr-119
|
e4fae90e75276c1800fda5bb559f988767c0d870
|
[
"MIT"
] | null | null | null |
import test_module as tm
tm.hello_world() #imported module that we made, this is what numby does
| 25.25
| 73
| 0.762376
| 18
| 101
| 4.166667
| 0.888889
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.188119
| 101
| 3
| 74
| 33.666667
| 0.914634
| 0.524752
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.5
| 0
| 0.5
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
88e45f9b91eb0e05bce26c0ac7fadfa77f6e50e6
| 514
|
py
|
Python
|
examples/ordering.py
|
F483/easyapi
|
f05ce1509030764721cc3393410fa12b609e88f2
|
[
"MIT"
] | null | null | null |
examples/ordering.py
|
F483/easyapi
|
f05ce1509030764721cc3393410fa12b609e88f2
|
[
"MIT"
] | null | null | null |
examples/ordering.py
|
F483/easyapi
|
f05ce1509030764721cc3393410fa12b609e88f2
|
[
"MIT"
] | null | null | null |
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) 2015 Fabian Barkhau <fabian.barkhau@gmail.com>
# License: MIT (see LICENSE file)
import apigen
class Ordering(apigen.Definition):
@apigen.command()
def first(self):
return "first"
@apigen.command()
def second(self):
return "second"
@apigen.command()
def third(self):
return "third"
@apigen.command()
def fourth(self):
return "fourth"
if __name__ == "__main__":
apigen.run(Ordering)
| 16.580645
| 62
| 0.624514
| 61
| 514
| 5.131148
| 0.57377
| 0.166134
| 0.204473
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.012853
| 0.243191
| 514
| 30
| 63
| 17.133333
| 0.791774
| 0.247082
| 0
| 0.25
| 0
| 0
| 0.078329
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.0625
| 0.25
| 0.625
| 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
| 0
| 0
| 1
| 1
| 0
|
0
| 4
|
88e4c9cfb55b315625ea1e6d6120db088f49e8cb
| 214
|
py
|
Python
|
src/czml3/__init__.py
|
mstill3/czml3
|
20e3b70f230c73b3ee2638a85da5721a6d5359b2
|
[
"MIT"
] | 28
|
2019-06-10T21:37:09.000Z
|
2022-02-27T14:44:47.000Z
|
src/czml3/__init__.py
|
mstill3/czml3
|
20e3b70f230c73b3ee2638a85da5721a6d5359b2
|
[
"MIT"
] | 95
|
2019-06-10T21:32:21.000Z
|
2022-02-26T21:27:58.000Z
|
src/czml3/__init__.py
|
mstill3/czml3
|
20e3b70f230c73b3ee2638a85da5721a6d5359b2
|
[
"MIT"
] | 24
|
2019-06-10T15:08:03.000Z
|
2022-02-17T19:35:01.000Z
|
from ._version import get_versions
from .core import CZML_VERSION, Document, Packet, Preamble
__version__ = get_versions()["version"]
del get_versions
__all__ = ["Document", "Preamble", "Packet", "CZML_VERSION"]
| 26.75
| 60
| 0.766355
| 26
| 214
| 5.769231
| 0.461538
| 0.22
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.11215
| 214
| 7
| 61
| 30.571429
| 0.789474
| 0
| 0
| 0
| 0
| 0
| 0.191589
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.4
| 0
| 0.4
| 0
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
88e6225ba8ada869b6a4f78042fb8abd5320fac3
| 412
|
py
|
Python
|
src/libs/best_individual.py
|
ronaldpereira/symbolic-regression
|
6896865e27d66403c86ecd53a11f0fa12ce7fe6a
|
[
"MIT"
] | null | null | null |
src/libs/best_individual.py
|
ronaldpereira/symbolic-regression
|
6896865e27d66403c86ecd53a11f0fa12ce7fe6a
|
[
"MIT"
] | null | null | null |
src/libs/best_individual.py
|
ronaldpereira/symbolic-regression
|
6896865e27d66403c86ecd53a11f0fa12ce7fe6a
|
[
"MIT"
] | null | null | null |
#!/usr/bin/python3
import math
import copy
class BestIndividual:
def __init__(self):
self.individual = None
self.fitness = math.inf
def check_best_individual(self, newInd):
if newInd.fitness < self.fitness:
self.individual = copy.deepcopy(newInd)
self.fitness = self.individual.fitness
def get_best_individual(self):
return self.individual
| 22.888889
| 51
| 0.662621
| 48
| 412
| 5.520833
| 0.458333
| 0.211321
| 0.135849
| 0.188679
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.003247
| 0.252427
| 412
| 17
| 52
| 24.235294
| 0.857143
| 0.041262
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.25
| false
| 0
| 0.166667
| 0.083333
| 0.583333
| 0
| 0
| 0
| 0
| null | 1
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 1
| 0
|
0
| 4
|
00160bb2ea95dd1a830c5f43131457c8b9be22f1
| 98
|
py
|
Python
|
CBCS_Tickets/apps.py
|
tjdolan121/tickets
|
b938eaf8de2c692204e896ef68c000adcd920849
|
[
"MIT"
] | 1
|
2018-11-18T18:40:51.000Z
|
2018-11-18T18:40:51.000Z
|
CBCS_Tickets/apps.py
|
tjdolan121/tickets
|
b938eaf8de2c692204e896ef68c000adcd920849
|
[
"MIT"
] | null | null | null |
CBCS_Tickets/apps.py
|
tjdolan121/tickets
|
b938eaf8de2c692204e896ef68c000adcd920849
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class CbcsTicketsConfig(AppConfig):
name = 'CBCS_Tickets'
| 16.333333
| 35
| 0.77551
| 11
| 98
| 6.818182
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.153061
| 98
| 5
| 36
| 19.6
| 0.903614
| 0
| 0
| 0
| 0
| 0
| 0.122449
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
003c4cf34167da574eda3ea05414c132f9de9f46
| 60
|
py
|
Python
|
backend/app/auth/__init__.py
|
bcbecker/Datta-Dashboard
|
14f77ce166500996888ebdc0e8d3f977fe060547
|
[
"FTL"
] | null | null | null |
backend/app/auth/__init__.py
|
bcbecker/Datta-Dashboard
|
14f77ce166500996888ebdc0e8d3f977fe060547
|
[
"FTL"
] | null | null | null |
backend/app/auth/__init__.py
|
bcbecker/Datta-Dashboard
|
14f77ce166500996888ebdc0e8d3f977fe060547
|
[
"FTL"
] | null | null | null |
#For packaging
'''
Users api handles JWT auth for users
'''
| 12
| 36
| 0.7
| 9
| 60
| 4.666667
| 0.777778
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.183333
| 60
| 4
| 37
| 15
| 0.857143
| 0.833333
| 0
| null | 0
| null | 0
| 0
| null | 0
| 0
| 0
| null | 1
| null | true
| 0
| 0
| null | null | null | 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
0043a030fa16b00ae86055dc40bbe018927c300e
| 50
|
py
|
Python
|
figures/__init__.py
|
dvordrova/jumping-circle
|
c8332961ffa60c9d9e1ce6489eae6cf24ad1b2ae
|
[
"MIT"
] | null | null | null |
figures/__init__.py
|
dvordrova/jumping-circle
|
c8332961ffa60c9d9e1ce6489eae6cf24ad1b2ae
|
[
"MIT"
] | null | null | null |
figures/__init__.py
|
dvordrova/jumping-circle
|
c8332961ffa60c9d9e1ce6489eae6cf24ad1b2ae
|
[
"MIT"
] | null | null | null |
from .circle import Circle
from .rope import Rope
| 16.666667
| 26
| 0.8
| 8
| 50
| 5
| 0.5
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.16
| 50
| 2
| 27
| 25
| 0.952381
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 1
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
cc65d16a635bf7c038a924345825b45750868ec9
| 159
|
py
|
Python
|
pets/models.py
|
Gornstats/HTMX-Django-Experiments
|
14553a6086412b243dfcc1f2c2a71f9e17adf82a
|
[
"BSD-2-Clause"
] | null | null | null |
pets/models.py
|
Gornstats/HTMX-Django-Experiments
|
14553a6086412b243dfcc1f2c2a71f9e17adf82a
|
[
"BSD-2-Clause"
] | null | null | null |
pets/models.py
|
Gornstats/HTMX-Django-Experiments
|
14553a6086412b243dfcc1f2c2a71f9e17adf82a
|
[
"BSD-2-Clause"
] | null | null | null |
from django.db import models
class Pet(models.Model):
pet_name = models.CharField(max_length=20)
def __str__(self):
return self.pet_name
| 19.875
| 46
| 0.691824
| 23
| 159
| 4.478261
| 0.73913
| 0.135922
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.016129
| 0.220126
| 159
| 7
| 47
| 22.714286
| 0.814516
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.2
| false
| 0
| 0.2
| 0.2
| 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
| 1
| 1
| 0
|
0
| 4
|
cc87c8cf5bf35c6f543a960e45dc356bf00a5698
| 312
|
py
|
Python
|
service/renderers.py
|
johnpooch/diplomacy
|
567db5c5cfefa99f176bacbfe469977474aa8a86
|
[
"MIT"
] | 1
|
2020-07-21T18:10:29.000Z
|
2020-07-21T18:10:29.000Z
|
service/renderers.py
|
johnpooch/diplomacy
|
567db5c5cfefa99f176bacbfe469977474aa8a86
|
[
"MIT"
] | 142
|
2020-04-07T17:36:34.000Z
|
2021-06-07T00:20:47.000Z
|
service/renderers.py
|
johnpooch/diplomacy
|
567db5c5cfefa99f176bacbfe469977474aa8a86
|
[
"MIT"
] | 3
|
2018-08-30T08:58:27.000Z
|
2021-02-28T03:34:26.000Z
|
from rest_framework import renderers
from service.utils.cases import deep_camel_case_transform
class CamelCaseRenderer(renderers.JSONRenderer):
def render(self, data, *args, **kwargs):
camelized_data = deep_camel_case_transform(data)
return super().render(camelized_data, *args, **kwargs)
| 31.2
| 62
| 0.766026
| 38
| 312
| 6.052632
| 0.631579
| 0.078261
| 0.113043
| 0.191304
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 312
| 9
| 63
| 34.666667
| 0.861423
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.833333
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
cc966cb26b2f9ec6dfca27518de0c74c7d2e8b10
| 350
|
py
|
Python
|
async_signalr_client/models/messages/cancel_invocation.py
|
jvillacorta/async-signalr-client
|
5cdb9d8f89c37a0ad5ba6e85df541b1346cbf50d
|
[
"MIT"
] | 2
|
2020-04-21T09:09:33.000Z
|
2021-02-06T21:26:27.000Z
|
async_signalr_client/models/messages/cancel_invocation.py
|
jvillacorta/async-signalr-client
|
5cdb9d8f89c37a0ad5ba6e85df541b1346cbf50d
|
[
"MIT"
] | 1
|
2020-07-09T09:22:52.000Z
|
2020-07-09T09:22:52.000Z
|
async_signalr_client/models/messages/cancel_invocation.py
|
jvillacorta/async-signalr-client
|
5cdb9d8f89c37a0ad5ba6e85df541b1346cbf50d
|
[
"MIT"
] | null | null | null |
from async_signalr_client.models.messages.base import BaseSignalRMessage
from async_signalr_client.models.messages.types import SignalRMessageType
class CancelInvocationMessage(BaseSignalRMessage):
def __init__(self, invocation_id: str):
super().__init__(SignalRMessageType.CANCEL_INVOCATION)
self.invocation_id = invocation_id
| 38.888889
| 73
| 0.822857
| 37
| 350
| 7.351351
| 0.567568
| 0.132353
| 0.117647
| 0.161765
| 0.264706
| 0.264706
| 0
| 0
| 0
| 0
| 0
| 0
| 0.114286
| 350
| 8
| 74
| 43.75
| 0.877419
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0.166667
| false
| 0
| 0.333333
| 0
| 0.666667
| 0
| 0
| 0
| 0
| null | 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
ccb6eebfd86844e940fb88a37daab2f61b26f64c
| 1,177
|
py
|
Python
|
fiepipehoudini/shell/installs.py
|
leith-bartrich/fiellc
|
1c02690538f442dede5d6afc8926355cb2ac838e
|
[
"MIT"
] | null | null | null |
fiepipehoudini/shell/installs.py
|
leith-bartrich/fiellc
|
1c02690538f442dede5d6afc8926355cb2ac838e
|
[
"MIT"
] | null | null | null |
fiepipehoudini/shell/installs.py
|
leith-bartrich/fiellc
|
1c02690538f442dede5d6afc8926355cb2ac838e
|
[
"MIT"
] | null | null | null |
import typing
from fiepipedesktoplib.locallymanagedtypes.shells.AbstractLocalManagedTypeCommand import LocalManagedTypeCommand
from fiepipedesktoplib.shells.AbstractShell import AbstractShell
from fiepipehoudini.data.installs import HoudiniInstall
from fiepipehoudini.routines.installs import HoudiniInstallsInteractiveRoutines
from fiepipedesktoplib.shells.ui.abspath_input_ui import AbspathInputDefaultUI
from fiepipedesktoplib.shells.ui.subpath_input_ui import SubpathInputDefaultUI
class HoudiniInstallsCommand(LocalManagedTypeCommand[HoudiniInstall]):
def get_routines(self) -> HoudiniInstallsInteractiveRoutines:
return HoudiniInstallsInteractiveRoutines(self.get_feedback_ui(), AbspathInputDefaultUI(self), SubpathInputDefaultUI(self))
def get_shell(self, item) -> AbstractShell:
return super(HoudiniInstallsCommand, self).get_shell()
def get_plugin_names_v1(self) -> typing.List[str]:
ret = super(HoudiniInstallsCommand, self).get_plugin_names_v1()
ret.append("houdini_installs_command")
return ret
def get_prompt_text(self) -> str:
return self.prompt_separator.join(['fiepipe','houdini_installs'])
| 47.08
| 131
| 0.817332
| 114
| 1,177
| 8.254386
| 0.394737
| 0.089267
| 0.086079
| 0.061637
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.001912
| 0.1113
| 1,177
| 24
| 132
| 49.041667
| 0.897706
| 0
| 0
| 0
| 0
| 0
| 0.039932
| 0.020391
| 0
| 0
| 0
| 0
| 0
| 1
| 0.222222
| false
| 0
| 0.388889
| 0.166667
| 0.888889
| 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
| 1
| 1
| 0
|
0
| 4
|
aeab41fb052ac6284f87172ee549228767e865e2
| 132
|
py
|
Python
|
Chapter 01/Chap01_Example1.157.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.157.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
Chapter 01/Chap01_Example1.157.py
|
Anancha/Programming-Techniques-using-Python
|
e80c329d2a27383909d358741a5cab03cb22fd8b
|
[
"MIT"
] | null | null | null |
#implicit type conversion
num1 = 12
num2= 13.5
num3 = num1 + num2
print(type(num1))
print(type(num2))
print(num3)
print(type(num3))
| 14.666667
| 25
| 0.719697
| 22
| 132
| 4.318182
| 0.454545
| 0.284211
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.121739
| 0.128788
| 132
| 8
| 26
| 16.5
| 0.704348
| 0.181818
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0
| 0
| 0
| 0.571429
| 1
| 0
| 0
| null | 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
|
0
| 4
|
4e04c072f75fb9292e2d313dd1ae71ae63b12288
| 30
|
py
|
Python
|
modules/2.79/bpy/types/TextCurve.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/TextCurve.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
modules/2.79/bpy/types/TextCurve.py
|
cmbasnett/fake-bpy-module
|
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
|
[
"MIT"
] | null | null | null |
TextCurve.text_boxes = None
| 7.5
| 27
| 0.766667
| 4
| 30
| 5.5
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.166667
| 30
| 3
| 28
| 10
| 0.88
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0
| 0
| 0
| 0
| 1
| 1
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
|
0
| 4
|
4e15706f4a20f000dbde4cef576b8962fdfad9d3
| 113
|
py
|
Python
|
rasa/core/training/converters/__init__.py
|
chaneyjd/rasa
|
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
|
[
"Apache-2.0"
] | 37
|
2019-06-07T07:39:00.000Z
|
2022-01-27T08:32:57.000Z
|
rasa/core/training/converters/__init__.py
|
chaneyjd/rasa
|
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
|
[
"Apache-2.0"
] | 209
|
2020-03-18T18:28:12.000Z
|
2022-03-01T13:42:29.000Z
|
rasa/core/training/converters/__init__.py
|
chaneyjd/rasa
|
104a9591fc10b96eaa7fe402b6d64ca652b7ebe2
|
[
"Apache-2.0"
] | 65
|
2019-05-21T12:16:53.000Z
|
2022-02-23T10:54:15.000Z
|
from rasa.core.training.converters.story_markdown_to_yaml_converter import (
StoryMarkdownToYamlConverter,
)
| 28.25
| 76
| 0.849558
| 12
| 113
| 7.666667
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.088496
| 113
| 3
| 77
| 37.666667
| 0.893204
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| true
| 0
| 0.333333
| 0
| 0.333333
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
| 0
| 0
|
0
| 4
|
4e257913ee7059009715ab66433995ecd01d00d3
| 91
|
py
|
Python
|
taskscraper/scalprum/apps.py
|
YlmRdm/TaskScraper
|
564ad3e8ef9d6e8de638e8ba767809e1c76f6e6d
|
[
"BSD-3-Clause"
] | 1
|
2021-03-04T16:43:13.000Z
|
2021-03-04T16:43:13.000Z
|
taskscraper/scalprum/apps.py
|
YlmRdm/TaskScraper
|
564ad3e8ef9d6e8de638e8ba767809e1c76f6e6d
|
[
"BSD-3-Clause"
] | null | null | null |
taskscraper/scalprum/apps.py
|
YlmRdm/TaskScraper
|
564ad3e8ef9d6e8de638e8ba767809e1c76f6e6d
|
[
"BSD-3-Clause"
] | null | null | null |
from django.apps import AppConfig
class ScalprumConfig(AppConfig):
name = 'scalprum'
| 15.166667
| 33
| 0.758242
| 10
| 91
| 6.9
| 0.9
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.164835
| 91
| 5
| 34
| 18.2
| 0.907895
| 0
| 0
| 0
| 0
| 0
| 0.087912
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9d69ea049d3ec15344bc76ac6a2f5719acece748
| 104
|
py
|
Python
|
velkoz_web_application_django/stock_dashboard/apps.py
|
MatthewTe/velkoz-airflow-pipeline
|
023dbcfbf64a79316e389b109e8a2069a2a8f7cc
|
[
"MIT"
] | null | null | null |
velkoz_web_application_django/stock_dashboard/apps.py
|
MatthewTe/velkoz-airflow-pipeline
|
023dbcfbf64a79316e389b109e8a2069a2a8f7cc
|
[
"MIT"
] | null | null | null |
velkoz_web_application_django/stock_dashboard/apps.py
|
MatthewTe/velkoz-airflow-pipeline
|
023dbcfbf64a79316e389b109e8a2069a2a8f7cc
|
[
"MIT"
] | null | null | null |
from django.apps import AppConfig
class StockDashboardConfig(AppConfig):
name = 'stock_dashboard'
| 17.333333
| 38
| 0.788462
| 11
| 104
| 7.363636
| 0.909091
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 104
| 5
| 39
| 20.8
| 0.910112
| 0
| 0
| 0
| 0
| 0
| 0.144231
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0
| 0.333333
| 0
| 1
| 0
| 1
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 1
| 0
|
0
| 4
|
9d6a7cf5ee11eebad92a15fccf35267af639ee5e
| 219
|
py
|
Python
|
terrascript/resource/drarko/mssql.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 507
|
2017-07-26T02:58:38.000Z
|
2022-01-21T12:35:13.000Z
|
terrascript/resource/drarko/mssql.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 135
|
2017-07-20T12:01:59.000Z
|
2021-10-04T22:25:40.000Z
|
terrascript/resource/drarko/mssql.py
|
mjuenema/python-terrascript
|
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
|
[
"BSD-2-Clause"
] | 81
|
2018-02-20T17:55:28.000Z
|
2022-01-31T07:08:40.000Z
|
# terrascript/resource/drarko/mssql.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:21:59 UTC)
import terrascript
class mssql_login(terrascript.Resource):
pass
__all__ = [
"mssql_login",
]
| 16.846154
| 73
| 0.744292
| 29
| 219
| 5.413793
| 0.758621
| 0.242038
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0
| 0.064171
| 0.146119
| 219
| 12
| 74
| 18.25
| 0.775401
| 0.493151
| 0
| 0
| 1
| 0
| 0.101852
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| false
| 0.166667
| 0.166667
| 0
| 0.333333
| 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
| 1
| 0
| 0
| 0
| null | 0
| 0
| 0
| 0
| 0
| 0
| 0
| 1
| 0
| 0
| 0
| 0
|
0
| 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.