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
74647036a5709ec733e4418ea7ad107cdac66dde
107
py
Python
ndpatch/__init__.py
ashkarin/ndpatch
3ee2f10d373881842b3d90fd04a0b29f2c805e90
[ "MIT" ]
1
2021-07-06T05:44:10.000Z
2021-07-06T05:44:10.000Z
ndpatch/__init__.py
ashkarin/ndpatch
3ee2f10d373881842b3d90fd04a0b29f2c805e90
[ "MIT" ]
null
null
null
ndpatch/__init__.py
ashkarin/ndpatch
3ee2f10d373881842b3d90fd04a0b29f2c805e90
[ "MIT" ]
1
2021-07-06T05:44:14.000Z
2021-07-06T05:44:14.000Z
__version__ = '0.0.1' try: from ndpatch.ndpatch import * except ImportError: from ndpatch import *
17.833333
33
0.700935
14
107
5.071429
0.642857
0.309859
0
0
0
0
0
0
0
0
0
0.035294
0.205607
107
6
34
17.833333
0.8
0
0
0
0
0
0.046296
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
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
7465069b51826c9304569f1db42fb386ff0ce63f
60
py
Python
utils/__init__.py
bcodegard/xrd-analysis
ee0f1db4d139b278245ddc158aaf822c35fe2fa3
[ "MIT" ]
null
null
null
utils/__init__.py
bcodegard/xrd-analysis
ee0f1db4d139b278245ddc158aaf822c35fe2fa3
[ "MIT" ]
null
null
null
utils/__init__.py
bcodegard/xrd-analysis
ee0f1db4d139b278245ddc158aaf822c35fe2fa3
[ "MIT" ]
null
null
null
""" This module exists to make the directory importable """
15
51
0.733333
8
60
5.5
1
0
0
0
0
0
0
0
0
0
0
0
0.166667
60
3
52
20
0.88
0.85
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
7769afa83719fab345f4ff7aa98ed30ba98d4a1d
988
py
Python
assessment/middlewares/validators/errors.py
kenware/Assessment
69f5e3fbf18dfa2c59eaf3b083ebdba7ca66c9b7
[ "MIT" ]
null
null
null
assessment/middlewares/validators/errors.py
kenware/Assessment
69f5e3fbf18dfa2c59eaf3b083ebdba7ca66c9b7
[ "MIT" ]
3
2020-02-11T23:31:01.000Z
2021-06-10T21:04:34.000Z
assessment/middlewares/validators/errors.py
kenware/Assessment
69f5e3fbf18dfa2c59eaf3b083ebdba7ca66c9b7
[ "MIT" ]
null
null
null
from rest_framework import serializers from assessment.middlewares.validators.messages import error_messages def raises(error_key, status_code, *args, **kwargs): """ Raises a serialization error Parameters: error_key (str): the key for accessing the correct error message args (*): variable number of arguments kwargs (**): variable number of keyword arguments """ raise serializers.ValidationError( error_messages[error_key].format(*args, **kwargs), status_code) def raises_error(error_key, status_code, *args, **kwargs): """ Raises a serialization error Parameters: error_key (str): the key for accessing the correct error message args (*): variable number of arguments kwargs (**): variable number of keyword arguments """ raise serializers.ValidationError({ 'message': error_messages[error_key].format(*args, **kwargs), 'status': 'error'}, status_code)
30.875
72
0.678138
111
988
5.900901
0.306306
0.073282
0.09771
0.054962
0.778626
0.778626
0.778626
0.778626
0.647328
0.647328
0
0
0.224696
988
31
73
31.870968
0.855091
0.42004
0
0
0
0
0.035294
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.4
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
777aa3f0b62f4a473ee9ab04e0478a1a0876ec24
2,563
py
Python
shapSD/pysubgroup/fi_target.py
XiaoqiMa/shapSD
545f61c9e8329c7271051f22f99ba32508ba74a1
[ "MIT" ]
2
2019-06-26T21:31:03.000Z
2019-06-27T16:59:58.000Z
shapSD/pysubgroup/fi_target.py
XiaoqiMa/shapSD
545f61c9e8329c7271051f22f99ba32508ba74a1
[ "MIT" ]
null
null
null
shapSD/pysubgroup/fi_target.py
XiaoqiMa/shapSD
545f61c9e8329c7271051f22f99ba32508ba74a1
[ "MIT" ]
null
null
null
''' Created on 29.09.2017 @author: lemmerfn ''' from functools import total_ordering from .measures import AbstractInterestingnessMeasure, BoundedInterestingnessMeasure @total_ordering class FITarget(object): def __init__(self): pass def __repr__(self): return "T: Frequent Itemsets" def __eq__(self, other): return self.__dict__ == other.__dict__ def __lt__(self, other): return str(self) < str(other) def get_attributes(self): return [] def get_base_statistics(self, data, subgroup, weighting_attribute=None): if weighting_attribute is None: sg_instances = subgroup.subgroup_description.covers(data) return sg_instances.sum() else: raise NotImplemented("Attribute weights with numeric targets are not yet implemented.") def calculate_statistics(self, subgroup, data, weighting_attribute=None): if weighting_attribute is not None: raise NotImplemented("Attribute weights with numeric targets are not yet implemented.") sg_instances = subgroup.subgroup_description.covers(data) subgroup.statistics['size_sg'] = len(sg_instances) subgroup.statistics['size_dataset'] = len(data) class CountQF(AbstractInterestingnessMeasure, BoundedInterestingnessMeasure): def __init__(self): pass def evaluate_from_dataset(self, data, subgroup, weighting_attribute=None): return subgroup.subgroup_description.covers(data).sum() def optimistic_estimate_from_dataset(self, data, subgroup): return subgroup.subgroup_description.covers(data).sum() def evaluate_from_statistics(self, instances_dataset, positives_dataset, instances_subgroup, positives_subgroup): return instances_subgroup def optimistic_estimate_from_statistics(self, instances_dataset, positives_dataset, instances_subgroup, positives_subgroup): return instances_subgroup def is_applicable(self, subgroup): return isinstance(subgroup.target, FITarget) def supports_weights(self): return False class AreaQF(AbstractInterestingnessMeasure): def __init__(self): pass def evaluate_from_dataset(self, data, subgroup, weighting_attribute=None): return len(subgroup.subgroup_description) * subgroup.subgroup_description.covers(data).sum() def is_applicable(self, subgroup): return isinstance(subgroup.target, FITarget) def supports_weights(self): return False
32.0375
117
0.715568
273
2,563
6.417582
0.271062
0.067922
0.092466
0.094178
0.626712
0.601027
0.591895
0.464041
0.41153
0.41153
0
0.003941
0.207959
2,563
79
118
32.443038
0.859113
0.015607
0
0.470588
0
0
0.065606
0
0
0
0
0
0
1
0.352941
false
0.058824
0.039216
0.254902
0.72549
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
77822e0d58158a2e1827e3f24b969e63279ec30f
450
py
Python
bitmovin/errors/__init__.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
44
2016-12-12T17:37:23.000Z
2021-03-03T09:48:48.000Z
bitmovin/errors/__init__.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
38
2017-01-09T14:45:45.000Z
2022-02-27T18:04:33.000Z
bitmovin/errors/__init__.py
camberbridge/bitmovin-python
3af4c6e79b0291fda05fd1ceeb5bed1bba9f3c95
[ "Unlicense" ]
27
2017-02-02T22:49:31.000Z
2019-11-21T07:04:57.000Z
from .bitmovin_error import BitmovinError from .bitmovin_api_error import BitmovinApiError from .invalid_status_error import InvalidStatusError from .invalid_type_error import InvalidTypeError from .unique_constraint_violation_error import UniqueConstraintViolationException from .missing_argument_error import MissingArgumentError from .functionality_not_available_error import FunctionalityNotAvailableError from .timeout_error import TimeoutError
50
81
0.911111
48
450
8.208333
0.520833
0.22335
0
0
0
0
0
0
0
0
0
0
0.071111
450
8
82
56.25
0.942584
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
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
77d7834b641dc34263a38ec76d0c755155c21351
523
py
Python
tests/test_Import.py
Florian201985/GGGC
b27b7386ce3df0be63fa977a3785e14761574a92
[ "MIT" ]
null
null
null
tests/test_Import.py
Florian201985/GGGC
b27b7386ce3df0be63fa977a3785e14761574a92
[ "MIT" ]
null
null
null
tests/test_Import.py
Florian201985/GGGC
b27b7386ce3df0be63fa977a3785e14761574a92
[ "MIT" ]
null
null
null
import unittest from src import Import class ImportTest(unittest.TestCase): def test_extract_value_from_line_value1(self): line = "*wxyz 10.0 ** test line" exp_value = "10.0" actual = Import.extract_value_from_line(line) self.assertEqual(exp_value, actual) def test_extract_value_from_line_value2(self): line = "*wxyz 11.0 ** test line" exp_value = "11.0" actual = Import.extract_value_from_line(line) self.assertEqual(exp_value, actual)
27.526316
53
0.665392
70
523
4.685714
0.314286
0.146341
0.195122
0.243902
0.670732
0.567073
0.402439
0.402439
0.402439
0.402439
0
0.035354
0.24283
523
18
54
29.055556
0.792929
0
0
0.307692
0
0
0.118547
0
0
0
0
0
0.153846
1
0.153846
false
0
0.384615
0
0.615385
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
bb082de4295bacbc1953b17224b6a8f6bef04c7e
142
py
Python
scrape/remove_nametext.py
nihakue/ilwhack
46db9ce08d2032f16720a225db670882ef8cf008
[ "Apache-2.0", "MIT" ]
null
null
null
scrape/remove_nametext.py
nihakue/ilwhack
46db9ce08d2032f16720a225db670882ef8cf008
[ "Apache-2.0", "MIT" ]
1
2016-01-03T02:00:34.000Z
2016-01-03T09:10:30.000Z
scrape/remove_nametext.py
nihakue/ilwhack
46db9ce08d2032f16720a225db670882ef8cf008
[ "Apache-2.0", "MIT" ]
null
null
null
def remove_nametext(speech, name): if speech.startswith(name) remove_to_index = speech.find(':') return speech[remove_to_index:]
23.666667
38
0.71831
19
142
5.105263
0.578947
0.164948
0.268041
0
0
0
0
0
0
0
0
0
0.161972
142
5
39
28.4
0.815126
0
0
0
0
0
0.007092
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
bb26d665ba45b95948e17c48a8f7bfcb6722a5c3
124
py
Python
Python_ver/Vertex.py
SCARLETRAIN511/Subdivision
c07acf2ec96be4f6ea34588f5dc5e059f57546ab
[ "MIT" ]
null
null
null
Python_ver/Vertex.py
SCARLETRAIN511/Subdivision
c07acf2ec96be4f6ea34588f5dc5e059f57546ab
[ "MIT" ]
null
null
null
Python_ver/Vertex.py
SCARLETRAIN511/Subdivision
c07acf2ec96be4f6ea34588f5dc5e059f57546ab
[ "MIT" ]
null
null
null
import numpy as np from Vector3d import Vector3d class Vertex: index = 0 vector3d = Vector3d() coordinates = []
17.714286
29
0.685484
15
124
5.666667
0.733333
0
0
0
0
0
0
0
0
0
0
0.053763
0.25
124
7
30
17.714286
0.860215
0
0
0
0
0
0
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
bb3d95d3f26200c6f36e99849c583de5fa6f12cb
78
py
Python
apps/__init__.py
ZREDU-007/mooc
1a1f4f92e029da68e032db0005ac955fc1ca3e8c
[ "Apache-2.0" ]
5
2020-01-04T01:21:22.000Z
2020-11-19T09:10:50.000Z
apps/__init__.py
ZREDU-007/mooc
1a1f4f92e029da68e032db0005ac955fc1ca3e8c
[ "Apache-2.0" ]
6
2020-02-12T03:25:29.000Z
2021-09-08T01:33:43.000Z
apps/__init__.py
ZREDU-007/mooc
1a1f4f92e029da68e032db0005ac955fc1ca3e8c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'ethan' __date__ = '2019/01/20 23:03'
19.5
30
0.576923
11
78
3.363636
1
0
0
0
0
0
0
0
0
0
0
0.206349
0.192308
78
3
31
26
0.380952
0.269231
0
0
0
0
0.403846
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
bb561649fa38a6958bff477d9348b17762b6ed6a
192
py
Python
kombi/forms.py
geneseme/boxer
d8aa59464e606d4d49f5f52779bea5f6adfc7fbd
[ "MIT" ]
1
2020-10-17T09:59:29.000Z
2020-10-17T09:59:29.000Z
kombi/forms.py
williamlagos/lightweight-django
d8aa59464e606d4d49f5f52779bea5f6adfc7fbd
[ "MIT" ]
null
null
null
kombi/forms.py
williamlagos/lightweight-django
d8aa59464e606d4d49f5f52779bea5f6adfc7fbd
[ "MIT" ]
null
null
null
from django.forms import ModelForm from kombi.models import Freighter class RegisterForm(ModelForm): class Meta: model = Freighter fields = ['name','code','phone']
24
41
0.666667
21
192
6.095238
0.761905
0
0
0
0
0
0
0
0
0
0
0
0.239583
192
7
42
27.428571
0.876712
0
0
0
0
0
0.07027
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
24a79cca7ceb725f80ef24de76777cfd6a67597a
901
py
Python
setup.py
tropicoo/ffbinaries-api-client
a1d0d60d3b4adbac296044c15d36ec5a1f0fb693
[ "MIT" ]
1
2019-10-26T14:38:46.000Z
2019-10-26T14:38:46.000Z
setup.py
tropicoo/ffbinaries-api-client
a1d0d60d3b4adbac296044c15d36ec5a1f0fb693
[ "MIT" ]
null
null
null
setup.py
tropicoo/ffbinaries-api-client
a1d0d60d3b4adbac296044c15d36ec5a1f0fb693
[ "MIT" ]
null
null
null
from distutils.core import setup from ffbinaries import __version__ as version setup( name='ffbinaries-api-client', packages=['ffbinaries'], version=version, license='MIT', description='ffbinaries api client', author='tropicoo', url='https://github.com/tropicoo/ffbinaries-api', keywords=['ffbinaries', 'ffmpeg', 'api'], install_requires=['requests'], classifiers=[ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', 'Topic :: Software Development :: Build Tools', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ], )
32.178571
55
0.614872
89
901
6.168539
0.539326
0.20765
0.273224
0.284153
0
0
0
0
0
0
0
0.017442
0.236404
901
27
56
33.37037
0.780523
0
0
0
0
0
0.550499
0.023307
0
0
0
0
0
1
0
true
0
0.08
0
0.08
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
24c48a73b20e316dc81f37ca9fa2b1f8cdd7f752
72
py
Python
instance/config.py
berylonyancha/newshighlight
e41d372413020ba5b7d2c63dd6120c3e5a6eb85d
[ "MIT" ]
null
null
null
instance/config.py
berylonyancha/newshighlight
e41d372413020ba5b7d2c63dd6120c3e5a6eb85d
[ "MIT" ]
null
null
null
instance/config.py
berylonyancha/newshighlight
e41d372413020ba5b7d2c63dd6120c3e5a6eb85d
[ "MIT" ]
null
null
null
NEWS_API_KEY = '93517dc7d5b04bbd8157a2b6d0a4030f' SECRET_KEY = "beryl55"
36
49
0.847222
7
72
8.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0.328358
0.069444
72
2
50
36
0.537313
0
0
0
0
0
0.534247
0.438356
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
24d3925aef6c89c2d3c90fd08366c5bc0dccee70
43
py
Python
crossfit_registration/scripts/__init__.py
laurentguilbert/crossfit-registration
0492e81861938cd48909b8c3ca933a48eb145d05
[ "MIT" ]
null
null
null
crossfit_registration/scripts/__init__.py
laurentguilbert/crossfit-registration
0492e81861938cd48909b8c3ca933a48eb145d05
[ "MIT" ]
null
null
null
crossfit_registration/scripts/__init__.py
laurentguilbert/crossfit-registration
0492e81861938cd48909b8c3ca933a48eb145d05
[ "MIT" ]
null
null
null
""" Scripts for crossfit_registration. """
10.75
34
0.72093
4
43
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.116279
43
3
35
14.333333
0.789474
0.790698
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
24f3ab8158d75f32b7d4df74ed2d18db14639ba5
861
py
Python
clovars/simulation/__init__.py
jfaccioni/clovars
64e24286a2dc185490384aeb08027d88eb9462c4
[ "MIT" ]
null
null
null
clovars/simulation/__init__.py
jfaccioni/clovars
64e24286a2dc185490384aeb08027d88eb9462c4
[ "MIT" ]
null
null
null
clovars/simulation/__init__.py
jfaccioni/clovars
64e24286a2dc185490384aeb08027d88eb9462c4
[ "MIT" ]
null
null
null
# Classes are imported first from clovars.simulation.run.simulation_runner import SimulationRunner from clovars.simulation.view.treatment_drawer import TreatmentDrawer from clovars.simulation.view.tree_drawer_2D import TreeDrawer2D from clovars.simulation.view.tree_drawer_3D import TreeDrawer3D from clovars.simulation.view.simulation_viewer import SimulationViewer from clovars.simulation.analysis.simulation_analyzer import SimulationAnalyzer from clovars.simulation.fit.data_fitter import DataFitter # Functions are imported later from clovars.simulation.run.run_simulation import run_simulation_function from clovars.simulation.view.view_simulation import view_simulation_function from clovars.simulation.analysis.analyse_simulation import analyse_simulation_function from clovars.simulation.fit.fit_experimental_data import fit_experimental_data_function
61.5
87
0.896632
108
861
6.935185
0.314815
0.161549
0.308411
0.166889
0.249666
0.093458
0
0
0
0
0
0.004957
0.062718
861
13
88
66.230769
0.923172
0.063879
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
24fba91c5788f36a911fac11ada3eb88ec617bf0
23,992
py
Python
mocasin/representations/test/test_permutations.py
tud-ccc/mocasin
6cf0a169e24d65d0fc859398f181dd500f928340
[ "0BSD" ]
1
2022-03-13T19:27:50.000Z
2022-03-13T19:27:50.000Z
mocasin/representations/test/test_permutations.py
tud-ccc/mocasin
6cf0a169e24d65d0fc859398f181dd500f928340
[ "0BSD" ]
null
null
null
mocasin/representations/test/test_permutations.py
tud-ccc/mocasin
6cf0a169e24d65d0fc859398f181dd500f928340
[ "0BSD" ]
null
null
null
# Copyright (C) 2017 TU Dresden # Licensed under the ISC license (see LICENSE.txt) # # Authors: Andrés Goens, Felix Teweleit from mocasin.representations.permutations import ( Permutation, PermutationGroup, ProductGroup, SymmetricGroupTranspositions, DuplicateGroup, TrivialGroup, PermutationGroupFromGens, ) class TestPermutation(object): def setUp(self): pass def tearDown(self): pass def test_get_cycles(self): permutation = Permutation.fromLists([[0, 1, 2], [4, 5]]) assert permutation.get_cycles() == [[4, 5], [0, 1, 2]] def test_point_orbit(self): permutation = Permutation.fromLists([[0, 1, 2], [4, 5]]) permutation_group = PermutationGroup([permutation]) assert frozenset(permutation_group.point_orbit(5)) == frozenset({4, 5}) def test_enumerate_orbits(self): permutation = Permutation.fromLists([[0, 1, 2], [4, 5]]) permutation_group = PermutationGroup([permutation]) assert permutation_group.enumerate_orbits() == [ frozenset({0, 1, 2}), frozenset({3}), frozenset({4, 5}), ] def test_tuple_orbit(self): permutation = Permutation.fromLists([[0, 1, 2], [4, 5]]) permutation_group = PermutationGroup([permutation]) expected = {(1, 4), (1, 5), (0, 5), (0, 4), (2, 5), (2, 4)} for perm in permutation_group.tuple_orbit([0, 5]): assert perm in expected expected.remove(perm) assert len(expected) == 0 def test_generators(self): s4xs8 = ProductGroup( [SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4)] ) s4xs8_double = DuplicateGroup(s4xs8) assert s4xs8_double.generators() == [ [[12, 13], [0, 1]], [[12, 14], [0, 2]], [[12, 15], [0, 3]], [[12, 16], [0, 4]], [[12, 17], [0, 5]], [[12, 18], [0, 6]], [[12, 19], [0, 7]], [[13, 14], [1, 2]], [[13, 15], [1, 3]], [[13, 16], [1, 4]], [[13, 17], [1, 5]], [[13, 18], [1, 6]], [[13, 19], [1, 7]], [[14, 15], [2, 3]], [[14, 16], [2, 4]], [[14, 17], [2, 5]], [[14, 18], [2, 6]], [[14, 19], [2, 7]], [[15, 16], [3, 4]], [[15, 17], [3, 5]], [[15, 18], [3, 6]], [[15, 19], [3, 7]], [[16, 17], [4, 5]], [[16, 18], [4, 6]], [[16, 19], [4, 7]], [[17, 18], [5, 6]], [[17, 19], [5, 7]], [[18, 19], [6, 7]], [[20, 21], [8, 9]], [[20, 22], [8, 10]], [[20, 23], [8, 11]], [[21, 22], [9, 10]], [[21, 23], [9, 11]], [[22, 23], [10, 11]], ] def test_ProductGroup(self): s4xs8 = ProductGroup( [SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4)] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) # fmt: off assert(arch_group == [ [1, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [2, 1, 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 13, 12, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [3, 1, 2, 0, 4, 5, 6, 7, 8, 9, 10, 11, 15, 13, 14, 12, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [4, 1, 2, 3, 0, 5, 6, 7, 8, 9, 10, 11, 16, 13, 14, 15, 12, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [5, 1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, 17, 13, 14, 15, 16, 12, 18, 19, 20, 21, 22, 23, 24, 25, 26], [6, 1, 2, 3, 4, 5, 0, 7, 8, 9, 10, 11, 18, 13, 14, 15, 16, 17, 12, 19, 20, 21, 22, 23, 24, 25, 26], [7, 1, 2, 3, 4, 5, 6, 0, 8, 9, 10, 11, 19, 13, 14, 15, 16, 17, 18, 12, 20, 21, 22, 23, 24, 25, 26], [0, 2, 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 3, 2, 1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 14, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 4, 2, 3, 1, 5, 6, 7, 8, 9, 10, 11, 12, 16, 14, 15, 13, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 5, 2, 3, 4, 1, 6, 7, 8, 9, 10, 11, 12, 17, 14, 15, 16, 13, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 6, 2, 3, 4, 5, 1, 7, 8, 9, 10, 11, 12, 18, 14, 15, 16, 17, 13, 19, 20, 21, 22, 23, 24, 25, 26], [0, 7, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 19, 14, 15, 16, 17, 18, 13, 20, 21, 22, 23, 24, 25, 26], [0, 1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 4, 3, 2, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 15, 14, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 5, 3, 4, 2, 6, 7, 8, 9, 10, 11, 12, 13, 17, 15, 16, 14, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 6, 3, 4, 5, 2, 7, 8, 9, 10, 11, 12, 13, 18, 15, 16, 17, 14, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 7, 3, 4, 5, 6, 2, 8, 9, 10, 11, 12, 13, 19, 15, 16, 17, 18, 14, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 4, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 5, 4, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17, 16, 15, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 6, 4, 5, 3, 7, 8, 9, 10, 11, 12, 13, 14, 18, 16, 17, 15, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 7, 4, 5, 6, 3, 8, 9, 10, 11, 12, 13, 14, 19, 16, 17, 18, 15, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 3, 5, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 3, 6, 5, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18, 17, 16, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 3, 7, 5, 6, 4, 8, 9, 10, 11, 12, 13, 14, 15, 19, 17, 18, 16, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 3, 4, 6, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 17, 19, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 19, 18, 17, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 3, 4, 5, 7, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 19, 18, 20, 21, 22, 23, 24, 25, 26], [0, 1, 2, 3, 4, 5, 6, 7, 9, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 20, 22, 23, 24, 25, 26], [0, 1, 2, 3, 4, 5, 6, 7, 10, 9, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 21, 20, 23, 24, 25, 26], [0, 1, 2, 3, 4, 5, 6, 7, 11, 9, 10, 8, 12, 13, 14, 15, 16, 17, 18, 19, 23, 21, 22, 20, 24, 25, 26], [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 21, 23, 24, 25, 26], [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 10, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 22, 21, 24, 25, 26], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 22, 24, 25, 26]]) # fmt: on def test_tuple_orbit_2(self): s4xs8 = ProductGroup( [SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4)] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) assert ( len( list( arch_group.tuple_orbit( [1, 10, 1, 9, 7, 1, 1, 1, 22, 25, 24] ) ) ) == 672 ) def test_tuple_normalize(self): s4xs8 = ProductGroup( [SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4)] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) assert arch_group.tuple_normalize( [1, 10, 1, 9, 7, 1, 1, 1, 22, 25, 24] ) == [0, 8, 0, 9, 1, 0, 0, 0, 20, 25, 24] def test_tuple_normalize_2(self): s4xs8 = ProductGroup( [SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4)] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) assert arch_group.tuple_normalize( [ 0, 8, 0, 0, 0, 0, 0, 0, 0, 25, 25, 24, 25, 24, 25, 0, 0, 24, 0, 0, ], verbose=True, ) == [ 0, 8, 0, 0, 0, 0, 0, 0, 0, 25, 25, 24, 25, 24, 25, 0, 0, 24, 0, 0, ] def test_duplicate_group(self): app_group = DuplicateGroup( ProductGroup( [ TrivialGroup(1, action=1), SymmetricGroupTranspositions(4, action=1), ] ), times=4, ) # fmt: off assert(app_group == [ [0, 2, 1, 3, 4, 5, 7, 6, 8, 9, 10, 12, 11, 13, 14, 15, 17, 16, 18, 19], [0, 3, 2, 1, 4, 5, 8, 7, 6, 9, 10, 13, 12, 11, 14, 15, 18, 17, 16, 19], [0, 4, 2, 3, 1, 5, 9, 7, 8, 6, 10, 14, 12, 13, 11, 15, 19, 17, 18, 16], [0, 1, 3, 2, 4, 5, 6, 8, 7, 9, 10, 11, 13, 12, 14, 15, 16, 18, 17, 19], [0, 1, 4, 3, 2, 5, 6, 9, 8, 7, 10, 11, 14, 13, 12, 15, 16, 19, 18, 17], [0, 1, 2, 4, 3, 5, 6, 7, 9, 8, 10, 11, 12, 14, 13, 15, 16, 17, 19, 18] ]) # fmt: on def test_tuple_normalize_3(self): app_group = DuplicateGroup( ProductGroup( [ TrivialGroup(1, action=1), SymmetricGroupTranspositions(4, action=1), ] ), times=4, ) assert app_group.tuple_normalize( [ 0, 8, 0, 0, 0, 0, 0, 0, 0, 25, 25, 24, 25, 24, 25, 0, 0, 24, 0, 0, ] ) == [ 0, 0, 0, 0, 8, 0, 0, 0, 25, 0, 25, 24, 25, 25, 24, 0, 0, 24, 0, 0, ] def test_tuple_normalize_4(self): s4xs8 = ProductGroup( [ SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4), ] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) app_group = DuplicateGroup( ProductGroup( [ TrivialGroup(1, action=1), SymmetricGroupTranspositions(4, action=1), ] ), times=4, ) full_group = PermutationGroupFromGens( list(app_group) + list(arch_group) ) assert full_group.tuple_normalize( [ 2, 2, 8, 2, 2, 2, 2, 2, 2, 25, 25, 24, 25, 24, 25, 2, 2, 24, 2, 2, ] ) == [ 0, 0, 0, 0, 8, 0, 0, 0, 25, 0, 25, 24, 24, 25, 25, 0, 0, 0, 0, 24, ] def test_tuple_normalize_5(self): s4xs8 = ProductGroup( [ SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4), ] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) mandelbrot_group = DuplicateGroup( SymmetricGroupTranspositions(16, action=1), times=3, trivials=[16, 17], ) mandelbrot_full_group = PermutationGroupFromGens( list(arch_group) + list(mandelbrot_group) ) assert mandelbrot_full_group.tuple_normalize( [ 6, 6, 1, 2, 7, 6, 9, 10, 6, 11, 9, 0, 1, 0, 4, 3, 5, 0, 18, 24, 25, 14, 24, 24, 25, 24, 24, 24, 25, 12, 13, 25, 25, 15, 25, 24, 25, 25, 24, 12, 25, 25, 25, 24, 12, 0, 24, 0, 24, 12, ] ) == [ 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 5, 6, 8, 8, 9, 10, 7, 5, 12, 24, 24, 24, 13, 25, 14, 15, 25, 17, 25, 24, 25, 25, 24, 24, 25, 17, 24, 25, 24, 25, 25, 17, 24, 5, 5, 24, 17, 25, 24, 25, ] def test_tuple_normalize_6(self): s4xs8 = ProductGroup( [ SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4), ] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) mjpeg_gens_func = lambda l: [ (i, j) for i in l for j in l[l.index(i) :] ] mjpeg_procs_gens = mjpeg_gens_func([6, 8, 10, 1]) + mjpeg_gens_func( [5, 7, 9, 11] ) mjpeg_chans_gens = ( mjpeg_gens_func([16, 17, 18, 19]) + mjpeg_gens_func([20, 22, 24, 26]) + mjpeg_gens_func([21, 23, 25, 14]) ) mjpeg_group = PermutationGroupFromGens( list( map( lambda trans: Permutation.fromLists( [list(trans)], action=1, n=27 ), (mjpeg_chans_gens + mjpeg_procs_gens), ) ) ) mjpeg_full_group = PermutationGroupFromGens( list(arch_group) + list(mjpeg_group) ) assert mjpeg_full_group.tuple_normalize( [ 11, 6, 10, 7, 10, 10, 5, 8, 10, 8, 11, 2, 24, 24, 18, 24, 10, 22, 24, 22, 22, 24, 20, 10, 20, 24, 24, ], verbose=True, ) == [ 8, 0, 9, 1, 9, 2, 3, 9, 8, 10, 9, 10, 24, 24, 9, 24, 9, 21, 21, 24, 21, 12, 22, 24, 22, 24, 24, ] def test_tuple_normalize_7(self): s4xs8 = ProductGroup( [ SymmetricGroupTranspositions(8), SymmetricGroupTranspositions(4), ] ) s4xs8_double = DuplicateGroup(s4xs8) arch_group = ProductGroup([s4xs8_double, TrivialGroup(3)]) assert arch_group.tuple_normalize( [ 11, 6, 10, 7, 10, 10, 5, 8, 10, 8, 11, 2, 24, 24, 18, 24, 10, 22, 24, 22, 22, 24, 20, 10, 20, 24, 24, ], verbose=True, ) == [ 8, 0, 9, 1, 9, 9, 2, 10, 9, 10, 8, 3, 24, 24, 12, 24, 9, 21, 24, 21, 21, 24, 22, 9, 22, 24, 24, ] def test_tuple_normalize_8(self): mjpeg_gens_func = lambda l: [ (i, j) for i in l for j in l[l.index(i) :] ] mjpeg_procs_gens = mjpeg_gens_func([6, 8, 10, 1]) + mjpeg_gens_func( [5, 7, 9, 11] ) mjpeg_chans_gens = ( mjpeg_gens_func([16, 17, 18, 19]) + mjpeg_gens_func([20, 22, 24, 26]) + mjpeg_gens_func([21, 23, 25, 14]) ) mjpeg_group = PermutationGroupFromGens( list( map( lambda trans: Permutation.fromLists( [list(trans)], action=1, n=27 ), (mjpeg_chans_gens + mjpeg_procs_gens), ) ) ) assert mjpeg_group.tuple_normalize( [ 8, 0, 9, 1, 9, 9, 2, 10, 9, 10, 8, 3, 24, 24, 12, 24, 9, 21, 24, 21, 21, 24, 22, 9, 22, 24, 24, ], verbose=True, ) == [ 8, 0, 9, 1, 9, 3, 2, 9, 8, 10, 9, 10, 24, 24, 9, 24, 9, 21, 21, 24, 21, 12, 22, 24, 22, 24, 24, ] assert mjpeg_group.tuple_normalize( [ 8, 0, 9, 1, 9, 9, 2, 10, 9, 10, 8, 3, 24, 24, 12, 24, 9, 21, 24, 21, 21, 24, 22, 9, 22, 24, 24, ], verbose=True, ) == [ 8, 0, 9, 1, 9, 3, 2, 9, 8, 10, 9, 10, 24, 24, 9, 24, 9, 21, 21, 24, 21, 12, 22, 24, 22, 24, 24, ] def test_DuplicateGroup(self): assert ( DuplicateGroup( SymmetricGroupTranspositions(2, action=1), times=7, trivials=[6, 7], ) == [[1, 0, 3, 2, 5, 4, 6, 7, 9, 8, 11, 10, 13, 12, 15, 14]] )
29.693069
112
0.292472
2,383
23,992
2.879144
0.048259
0.030899
0.029733
0.036146
0.719283
0.684886
0.668999
0.631978
0.605597
0.552252
0
0.294826
0.591572
23,992
807
113
29.729864
0.405347
0.006252
0
0.727273
0
0
0
0
0
0
0
0
0.024675
1
0.024675
false
0.002597
0.001299
0
0.027273
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
70149a718c28dcea96c202cf01764c9ac7b5f59b
381
py
Python
src/BookingsCache/BookingsAPI/RedisDbContext/DbContext.py
fengints/BookingsCache
6a28de80920492a8710ec145245597f2e89791db
[ "Apache-2.0" ]
null
null
null
src/BookingsCache/BookingsAPI/RedisDbContext/DbContext.py
fengints/BookingsCache
6a28de80920492a8710ec145245597f2e89791db
[ "Apache-2.0" ]
null
null
null
src/BookingsCache/BookingsAPI/RedisDbContext/DbContext.py
fengints/BookingsCache
6a28de80920492a8710ec145245597f2e89791db
[ "Apache-2.0" ]
null
null
null
import redis from .settings import SETTINGS as s class RedisDbContext: def __init__(self): self.context = redis.Redis(s["host"], s["port"], s["db"]) def get(self, key): return self.context.get(key) def mset(self, **kwargs): return self.context.mset(kwargs) def set(self, key, value): return self.context.set(key, value)
18.142857
65
0.614173
52
381
4.423077
0.423077
0.191304
0.221739
0
0
0
0
0
0
0
0
0
0.249344
381
20
66
19.05
0.804196
0
0
0
0
0
0.026247
0
0
0
0
0
0
1
0.363636
false
0
0.181818
0.272727
0.909091
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
701d87ab2eabeacb158f011eae7e52837bc4a132
296
py
Python
PyOpenGL-3.0.2/OpenGL/raw/GL/VERSION/GL_4_1.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/VERSION/GL_4_1.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
PyOpenGL-3.0.2/OpenGL/raw/GL/VERSION/GL_4_1.py
frederica07/Dragon_Programming_Process
c0dff2e20c1be6db5adc6f9977efae8f7f888ef5
[ "BSD-2-Clause" ]
null
null
null
'''Autogenerated by get_gl_extensions script, do not edit!''' from OpenGL import platform as _p, constants as _cs, arrays from OpenGL.GL import glget import ctypes EXTENSION_NAME = 'GL_VERSION_GL_4_1' def _f( function ): return _p.createFunction( function,_p.GL,'GL_VERSION_GL_4_1',False)
26.909091
71
0.777027
48
296
4.458333
0.645833
0.093458
0.102804
0.11215
0.121495
0
0
0
0
0
0
0.015625
0.135135
296
10
72
29.6
0.820313
0.185811
0
0
1
0
0.146552
0
0
0
0
0
0
1
0.166667
false
0
0.5
0.166667
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
70232ba64afe2b095ef6e85938e2c38c5c9d30f4
73
py
Python
Environments/SimGlucose/simglucose/envs/__init__.py
yashchandak/UnO
caa709679236ec70d37c249e0cebace27fb30c51
[ "Apache-2.0" ]
null
null
null
Environments/SimGlucose/simglucose/envs/__init__.py
yashchandak/UnO
caa709679236ec70d37c249e0cebace27fb30c51
[ "Apache-2.0" ]
null
null
null
Environments/SimGlucose/simglucose/envs/__init__.py
yashchandak/UnO
caa709679236ec70d37c249e0cebace27fb30c51
[ "Apache-2.0" ]
null
null
null
from Environments.SimGlucose.simglucose.envs.simglucose_gym_env import *
36.5
72
0.876712
9
73
6.888889
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.054795
73
1
73
73
0.898551
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
7030c1a323c06a1ff4bb55544b158b321f3e9367
1,863
py
Python
printacc/accounts/managers.py
rozumalex/printacc
419f080ce91a737077c0b3d1e98f961fc41e2850
[ "MIT" ]
null
null
null
printacc/accounts/managers.py
rozumalex/printacc
419f080ce91a737077c0b3d1e98f961fc41e2850
[ "MIT" ]
null
null
null
printacc/accounts/managers.py
rozumalex/printacc
419f080ce91a737077c0b3d1e98f961fc41e2850
[ "MIT" ]
1
2021-04-08T04:31:19.000Z
2021-04-08T04:31:19.000Z
from django.contrib.auth.models import BaseUserManager class AccountManager(BaseUserManager): use_in_migrations = True def _create_user(self, username, email, password, **extra_fields): if not username: raise ValueError('Username is a required field.') if not email: raise ValueError('Email is a required field.') email = self.normalize_email(email) user = self.model(username=username, email=email, **extra_fields) user.set_password(password) user.save() return user def create_user(self, username, email, password=None, **extra_fields): return self._create_user(username, email, password, **extra_fields) def create_admin(self, username, email, password=None, **extra_fields): extra_fields.setdefault('is_admin', True) if extra_fields.get('is_admin') is not True: raise ValueError('Admin must have is_admin=True.') return self._create_user(username, email, password, **extra_fields) def create_dealer(self, username, email, password=None, **extra_fields): extra_fields.setdefault('is_dealer', True) if extra_fields.get('is_dealer') is not True: raise ValueError('Dealer must have is_dealer=True.') return self._create_user(username, email, password, **extra_fields) def create_superuser(self, username, email, password=None, **extra_fields): extra_fields.setdefault('is_superuser', True) extra_fields.setdefault('is_staff', True) user_obj = self.create_admin(username, email, password, **extra_fields) return user_obj def admins(self): return self.filter(is_admin=True) def dealers(self): return self.filter(is_dealer=True) def users(self): return self.filter(is_dealer=False, is_admin=False)
35.150943
79
0.681696
233
1,863
5.248927
0.214592
0.143908
0.154538
0.102208
0.55928
0.466885
0.385119
0.310711
0.310711
0.310711
0
0
0.215244
1,863
52
80
35.826923
0.836525
0
0
0.083333
0
0
0.091787
0
0
0
0
0
0
1
0.222222
false
0.277778
0.027778
0.111111
0.527778
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
70606eb1f6bfa881ce5e92f8924961da56721799
454
py
Python
mak/libs/pyxx/cxx/grammar/module/global_fragment.py
motor-dev/Motor
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
[ "BSD-3-Clause" ]
null
null
null
mak/libs/pyxx/cxx/grammar/module/global_fragment.py
motor-dev/Motor
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
[ "BSD-3-Clause" ]
null
null
null
mak/libs/pyxx/cxx/grammar/module/global_fragment.py
motor-dev/Motor
98cb099fe1c2d31e455ed868cc2a25eae51e79f0
[ "BSD-3-Clause" ]
null
null
null
""" global-module-fragment: module-keyword ; declaration-seq? """ import glrp from ...parser import cxx20 from motor_typing import TYPE_CHECKING @glrp.rule('global-module-fragment : "module" ";" [prec:right,1]') @glrp.rule('global-module-fragment : "module" ";" declaration-seq') @cxx20 def global_module_fragment_opt_cxx20(self, p): # type: (CxxParser, glrp.Production) -> None pass if TYPE_CHECKING: from ...parser import CxxParser
22.7
67
0.715859
58
454
5.482759
0.482759
0.150943
0.251572
0.245283
0.213836
0.213836
0
0
0
0
0
0.017903
0.138767
454
20
68
22.7
0.795396
0.231278
0
0
0
0
0.307018
0.128655
0
0
0
0
0
1
0.1
false
0.1
0.4
0
0.5
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
1
1
0
0
0
0
4
561150e207de8611b502f221e504fbd6f2310c57
369
py
Python
gunnery/account/__init__.py
timgates42/gunnery
733a261cae6243a11883a40e18b14f57cf6e47b2
[ "Apache-2.0" ]
314
2015-01-01T06:17:34.000Z
2022-03-10T03:34:02.000Z
gunnery/account/__init__.py
timgates42/gunnery
733a261cae6243a11883a40e18b14f57cf6e47b2
[ "Apache-2.0" ]
20
2015-04-03T13:34:59.000Z
2021-06-10T20:37:25.000Z
gunnery/account/__init__.py
pkucmus/gunnery
30fce7f3fd74947621da6e91c1e872f383fc1e71
[ "Apache-2.0" ]
57
2015-01-07T05:41:34.000Z
2021-10-31T19:56:50.000Z
# from django.contrib.auth import models as auth_models # from django.contrib.auth.management import create_superuser # from django.db.models import signals # # # From http://stackoverflow.com/questions/1466827/ -- # signals.post_syncdb.disconnect( # create_superuser, # sender=auth_models, # dispatch_uid='django.contrib.auth.management.create_superuser')
36.9
69
0.775068
46
369
6.065217
0.5
0.107527
0.182796
0.150538
0
0
0
0
0
0
0
0.021472
0.116531
369
9
70
41
0.834356
0.945799
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
0
0
0
null
0
1
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
564b11c47c4f437c87ca95aa749302c682d62698
88
py
Python
dslib/classification.py
mjsmagalhaes/examples-datascience
bd7e9cb5cc5c42e3896ad134db8765c7d6f27303
[ "MIT" ]
null
null
null
dslib/classification.py
mjsmagalhaes/examples-datascience
bd7e9cb5cc5c42e3896ad134db8765c7d6f27303
[ "MIT" ]
null
null
null
dslib/classification.py
mjsmagalhaes/examples-datascience
bd7e9cb5cc5c42e3896ad134db8765c7d6f27303
[ "MIT" ]
null
null
null
class Classification: pass class Knn: def __init__(self, n): self.knn=n
14.666667
26
0.625
12
88
4.25
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.284091
88
6
27
14.666667
0.809524
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0.2
0
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
1
0
0
1
0
0
4
5657596b8e61cd96f88117d51f2da59932c27476
26
py
Python
src/cookiecutter_tools/__init__.py
cjolowicz/cookiecutter-tools
fda971a16ddb8149c317856d5ffc3e238983be66
[ "MIT" ]
null
null
null
src/cookiecutter_tools/__init__.py
cjolowicz/cookiecutter-tools
fda971a16ddb8149c317856d5ffc3e238983be66
[ "MIT" ]
2
2020-07-17T14:34:02.000Z
2020-07-23T05:54:26.000Z
src/cookiecutter_tools/__init__.py
cjolowicz/cookiecutter-tools
fda971a16ddb8149c317856d5ffc3e238983be66
[ "MIT" ]
null
null
null
"""Cookiecutter Tools."""
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
565c88629f3a8aabc7e881ef1f193804da8f5b92
139
py
Python
src/Clustering/dummy.py
ai-se/heroes_compsci
613fd623a6da073b2c62c773ed902acb0c756809
[ "MIT" ]
null
null
null
src/Clustering/dummy.py
ai-se/heroes_compsci
613fd623a6da073b2c62c773ed902acb0c756809
[ "MIT" ]
12
2019-12-17T04:04:19.000Z
2019-12-26T20:23:02.000Z
src/Clustering/dummy.py
ai-se/heroes_compsci
613fd623a6da073b2c62c773ed902acb0c756809
[ "MIT" ]
1
2020-03-12T22:19:48.000Z
2020-03-12T22:19:48.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import platform import pandas as pd import sys val = sys.version_info print(val)
13.9
23
0.71223
23
139
4.26087
0.782609
0
0
0
0
0
0
0
0
0
0
0.017094
0.158273
139
9
24
15.444444
0.820513
0.309353
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0.166667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
5694db9afec21198e8c61a9bc633f1ecee0868d6
166
py
Python
Python3_Mundo1_Aula5/PythonExercicios/ex002.py
AgladeJesus/python
16e4e5cc43aa987858a4719748708d6d5327d75d
[ "MIT" ]
null
null
null
Python3_Mundo1_Aula5/PythonExercicios/ex002.py
AgladeJesus/python
16e4e5cc43aa987858a4719748708d6d5327d75d
[ "MIT" ]
null
null
null
Python3_Mundo1_Aula5/PythonExercicios/ex002.py
AgladeJesus/python
16e4e5cc43aa987858a4719748708d6d5327d75d
[ "MIT" ]
null
null
null
nome: str = input('Digite seu nome: ') print('Olá', nome, 'Prazer em conhecer-lo!') idade = input('Digite sau idade: ') print('Sua idade é, {} anos'.format(idade))
23.714286
44
0.650602
25
166
4.32
0.68
0.203704
0
0
0
0
0
0
0
0
0
0
0.150602
166
6
45
27.666667
0.765957
0
0
0
0
0
0.484848
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
3b5d24c5428bf28882865d1c296d3dad36fb9bb1
2,298
py
Python
exo/studio/users/tests/test_pionneer_badge.py
moas/sketchbadges
7c5be91a74f9edd759eaacd9a7b97aef873f7fcb
[ "MIT" ]
null
null
null
exo/studio/users/tests/test_pionneer_badge.py
moas/sketchbadges
7c5be91a74f9edd759eaacd9a7b97aef873f7fcb
[ "MIT" ]
null
null
null
exo/studio/users/tests/test_pionneer_badge.py
moas/sketchbadges
7c5be91a74f9edd759eaacd9a7b97aef873f7fcb
[ "MIT" ]
null
null
null
import unittest.mock as mock from django.conf import settings from django.test.utils import override_settings from test_plus import TestCase from badges.models import Badge from .factories import UserFactory, GroupFactory @override_settings(MINIMUM_YEAR_FOR_PIONNEER_BADGE=1) class TestPionneerBadge(TestCase): BADGE_LEVEL = settings.BADGE_LEVEL.BADGE_PIONNEER.value def setUp(self): self.group = GroupFactory.create(name=settings.DESIGNER_GROUP_NAME) def test_designer_recent_joined_badge(self): designer = UserFactory.create(groups=[self.group, ]) counter = Badge.objects.filter(user=designer, level=self.BADGE_LEVEL).count() self.assertEqual(counter, 0) def test_designer_date_joined_since_one_year(self): with mock.patch("studio.users.meta_badges.compute_age", return_value=1): designer = UserFactory.create(groups=[self.group, ]) counter = Badge.objects.filter(user=designer, level=self.BADGE_LEVEL).count() self.assertEqual(counter, 1) def test_designer_date_joined_since_more_one_year(self): with mock.patch("studio.users.meta_badges.compute_age", return_value=5): designer = UserFactory.create(groups=[self.group, ]) counter = Badge.objects.filter(user=designer, level=self.BADGE_LEVEL).count() self.assertEqual(counter, 1) def test_designer_date_joined_since_one_year_immutable(self): with mock.patch("studio.users.meta_badges.compute_age", return_value=1): designer = UserFactory.create(groups=[self.group, ]) counter = Badge.objects.filter(user=designer, level=self.BADGE_LEVEL).count() self.assertEqual(counter, 1) with mock.patch("studio.users.meta_badges.compute_age", return_value=1): designer.last_name = 'test_name' designer.save() counter = Badge.objects.filter(user=designer, level=self.BADGE_LEVEL).count() self.assertEqual(counter, 1) with mock.patch("studio.users.meta_badges.compute_age", return_value=4): designer.first_name = 'test_name' designer.save() counter = Badge.objects.filter(user=designer, level=self.BADGE_LEVEL).count() self.assertEqual(counter, 1)
43.358491
89
0.707572
287
2,298
5.452962
0.219512
0.051118
0.072843
0.095847
0.715655
0.715655
0.715655
0.715655
0.692013
0.692013
0
0.006427
0.187554
2,298
52
90
44.192308
0.831816
0
0
0.5
0
0
0.086162
0.078329
0
0
0
0
0.15
1
0.125
false
0
0.15
0
0.325
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8e5bbf5f141ae3b1f8ee12e583cdfdf499c6cf7a
148
py
Python
tests/unit/offshoot/plugins/TestInvalidPlugin/files/test_plugin_pluggable_accepted.py
SerpentAI/offshoot
7906a95aeee511ca4ecd431ed5de1f779d2a13ab
[ "Apache-2.0" ]
42
2017-01-23T22:36:03.000Z
2021-11-14T21:22:17.000Z
tests/unit/offshoot/plugins/TestPlugin/files/test_plugin_pluggable_accepted.py
SerpentAI/offshoot
7906a95aeee511ca4ecd431ed5de1f779d2a13ab
[ "Apache-2.0" ]
1
2017-09-15T18:37:10.000Z
2017-09-15T18:37:10.000Z
tests/unit/offshoot/plugins/TestInvalidPlugin/files/test_plugin_pluggable_accepted.py
SerpentAI/offshoot
7906a95aeee511ca4ecd431ed5de1f779d2a13ab
[ "Apache-2.0" ]
6
2017-04-14T13:07:27.000Z
2020-06-17T06:24:18.000Z
import pluggable class TestPluginPluggableExpected(pluggable.TestPluggable): def accepted_function(self): raise NotImplementedError()
21.142857
59
0.790541
12
148
9.666667
0.916667
0
0
0
0
0
0
0
0
0
0
0
0.148649
148
6
60
24.666667
0.920635
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
8e908dcdf697ef8966bab60895ce3df5c2233890
102
py
Python
Lista_Introducao/Lista 1/Ex2.py
beatrizdaddea/Ex.Python
052cfa4f31c90d83d1904f8c63abfdbe8181177c
[ "MIT" ]
null
null
null
Lista_Introducao/Lista 1/Ex2.py
beatrizdaddea/Ex.Python
052cfa4f31c90d83d1904f8c63abfdbe8181177c
[ "MIT" ]
null
null
null
Lista_Introducao/Lista 1/Ex2.py
beatrizdaddea/Ex.Python
052cfa4f31c90d83d1904f8c63abfdbe8181177c
[ "MIT" ]
null
null
null
""""2.Faça um programa que exiba seu nome na tela """ Nome = input("Qual o seu nome? ") print(Nome)
20.4
53
0.647059
18
102
3.666667
0.777778
0.212121
0
0
0
0
0
0
0
0
0
0.012195
0.196078
102
5
54
20.4
0.792683
0.45098
0
0
0
0
0.34
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
8ea3918da36825e1dbf62f8bb38bb493050aaef6
63
py
Python
rapt/transformers/sql/__init__.py
pyrapt/rapt
0193a07aafff83a887fdc9e5e0f25eafa5b1b205
[ "MIT" ]
1
2019-08-22T09:39:00.000Z
2019-08-22T09:39:00.000Z
rapt/transformers/sql/__init__.py
pyrapt/rapt
0193a07aafff83a887fdc9e5e0f25eafa5b1b205
[ "MIT" ]
null
null
null
rapt/transformers/sql/__init__.py
pyrapt/rapt
0193a07aafff83a887fdc9e5e0f25eafa5b1b205
[ "MIT" ]
1
2022-03-24T00:51:03.000Z
2022-03-24T00:51:03.000Z
SET_SEMANTICS = 'set_semantics' BAG_SEMANTICS = 'bag_semantics'
31.5
31
0.825397
8
63
6
0.375
0.5
0.875
0
0
0
0
0
0
0
0
0
0.079365
63
2
32
31.5
0.827586
0
0
0
0
0
0.40625
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8ea70abad1fc12e11bb343e2149bb44c9c94f9b4
153
py
Python
service/models.py
simpsonw/atmosphere
3a5203ef0b563de3a0e8c8c8715df88186532d7a
[ "BSD-3-Clause" ]
197
2016-12-08T02:33:32.000Z
2022-03-23T14:27:47.000Z
service/models.py
simpsonw/atmosphere
3a5203ef0b563de3a0e8c8c8715df88186532d7a
[ "BSD-3-Clause" ]
385
2017-01-03T22:51:46.000Z
2020-12-16T16:20:42.000Z
service/models.py
benlazarine/atmosphere
38fad8e4002e510e8b4294f2bb5bc75e8e1817fa
[ "BSD-3-Clause" ]
50
2016-12-08T08:32:25.000Z
2021-12-10T00:21:39.000Z
# # This file (models.py) is required by django to run service testing # DO NOT ADD MODELS HERE. The appropriate place is in core or django_cyverse_auth
38.25
81
0.777778
27
153
4.333333
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.176471
153
3
82
51
0.928571
0.954248
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
8eb7a089f462a6de8ec865359cd0b05301ad4be1
198
py
Python
wechat_django/tests/test_model_article.py
UltraVacuum/wechat-django
0ea243067f5bc5e69cab6c4585d5e46d9399a583
[ "MIT" ]
166
2019-02-23T10:19:33.000Z
2022-02-03T06:50:15.000Z
wechat_django/tests/test_model_article.py
UltraVacuum/wechat-django
0ea243067f5bc5e69cab6c4585d5e46d9399a583
[ "MIT" ]
19
2019-05-07T07:28:32.000Z
2021-06-02T06:56:03.000Z
wechat_django/tests/test_model_article.py
UltraVacuum/wechat-django
0ea243067f5bc5e69cab6c4585d5e46d9399a583
[ "MIT" ]
54
2019-02-27T07:55:57.000Z
2021-09-02T06:47:51.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .base import WeChatTestCase class ArticleTestCase(WeChatTestCase): def test_sync(self): """测试同步图文""" pass
18
39
0.676768
21
198
6.095238
0.857143
0
0
0
0
0
0
0
0
0
0
0.00641
0.212121
198
10
40
19.8
0.814103
0.146465
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
d928612f3863829c02b5cfee60961ce9761170ae
205
py
Python
src/skjold/sources/__init__.py
markus-k/skjold
feddf4d43ee7a5a92ff4699f6978c3c9f9eb5f1b
[ "MIT" ]
41
2020-01-26T18:42:43.000Z
2022-03-14T22:10:14.000Z
src/skjold/sources/__init__.py
markus-k/skjold
feddf4d43ee7a5a92ff4699f6978c3c9f9eb5f1b
[ "MIT" ]
39
2020-01-30T17:25:18.000Z
2022-03-17T03:59:24.000Z
src/skjold/sources/__init__.py
markus-k/skjold
feddf4d43ee7a5a92ff4699f6978c3c9f9eb5f1b
[ "MIT" ]
12
2020-01-29T16:00:17.000Z
2022-01-25T14:25:20.000Z
from .github import Github from .pyup import PyUp from .gemnasium import Gemnasium from .pypa import PyPAAdvisoryDB from .osv import OSV __all__ = ("Github", "PyUp", "Gemnasium", "OSV", "PyPAAdvisoryDB")
25.625
66
0.756098
26
205
5.807692
0.346154
0
0
0
0
0
0
0
0
0
0
0
0.136585
205
7
67
29.285714
0.853107
0
0
0
0
0
0.17561
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
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
d9390cea653f33c86d9c99296ff93c5cfa8527d4
104
py
Python
Estudos/chainMap.py
Gbrvi/Python
02f0125c990f06ccb5cd705b4bf6ec5ecb6d1eab
[ "MIT" ]
null
null
null
Estudos/chainMap.py
Gbrvi/Python
02f0125c990f06ccb5cd705b4bf6ec5ecb6d1eab
[ "MIT" ]
null
null
null
Estudos/chainMap.py
Gbrvi/Python
02f0125c990f06ccb5cd705b4bf6ec5ecb6d1eab
[ "MIT" ]
null
null
null
def chain(*iters): for l in iters: print(l) print(chain([1, 2, 3, 4, 5], [5, 6, 7, 8]))
20.8
43
0.471154
20
104
2.45
0.75
0
0
0
0
0
0
0
0
0
0
0.125
0.307692
104
5
43
20.8
0.555556
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
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
1
0
0
0
0
0
1
0
4
d93d29fe5a12ef595b2bc6d52311384c883a9a1a
555
py
Python
bioinformatics/DNA_toolkit.py
TillMeineke/machine_learning
689ca5e9e4450266786fab73299e1f8bdad7a473
[ "MIT" ]
null
null
null
bioinformatics/DNA_toolkit.py
TillMeineke/machine_learning
689ca5e9e4450266786fab73299e1f8bdad7a473
[ "MIT" ]
null
null
null
bioinformatics/DNA_toolkit.py
TillMeineke/machine_learning
689ca5e9e4450266786fab73299e1f8bdad7a473
[ "MIT" ]
null
null
null
# DNA Toolset/Code testing file from bio_seq import bio_seq from bio_utilities import read_FASTA, readTextFile, writeTextFile test_dna = bio_seq() test_dna.generate_rnd_seq(40, "RNA") print(test_dna.get_seq_info()) print(test_dna.nucleotide_frequency()) print(test_dna.transcription()) print(test_dna.reverse_complement()) print(test_dna.gc_content()) print(test_dna.gc_content_subsec()) print(test_dna.translate_seq()) print(test_dna.codon_usage('L')) for rf in test_dna.gen_reading_frames(): print(rf) print(test_dna.all_proteins_from_orfs())
24.130435
65
0.801802
89
555
4.629213
0.483146
0.203884
0.262136
0.067961
0.101942
0
0
0
0
0
0
0.003914
0.079279
555
22
66
25.227273
0.802348
0.052252
0
0
1
0
0.007634
0
0
0
0
0
0
1
0
false
0
0.133333
0
0.133333
0.666667
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
d95116d111c846de80ab84615bf0c864b4cbfd11
94
py
Python
15. Lattice Paths.py
IshanManchanda/project-euler
74b3b8224d54e22b4e1b709ca652970e716a07d4
[ "MIT" ]
null
null
null
15. Lattice Paths.py
IshanManchanda/project-euler
74b3b8224d54e22b4e1b709ca652970e716a07d4
[ "MIT" ]
null
null
null
15. Lattice Paths.py
IshanManchanda/project-euler
74b3b8224d54e22b4e1b709ca652970e716a07d4
[ "MIT" ]
null
null
null
from math import factorial def main(): print(factorial(40) // factorial(20) ** 2) main()
10.444444
43
0.659574
13
94
4.769231
0.769231
0
0
0
0
0
0
0
0
0
0
0.064935
0.180851
94
8
44
11.75
0.74026
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
true
0
0.25
0
0.5
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
d970f1ca7be79f461b2202a4c28e93e3ed1f5cf0
935
py
Python
tests/test_raycast.py
cprogrammer1994/python-terrain
afeb7006b74c729ebc88f177865e585ae3decc26
[ "MIT" ]
1
2019-04-08T15:50:24.000Z
2019-04-08T15:50:24.000Z
tests/test_raycast.py
cprogrammer1994/python-terrain
afeb7006b74c729ebc88f177865e585ae3decc26
[ "MIT" ]
null
null
null
tests/test_raycast.py
cprogrammer1994/python-terrain
afeb7006b74c729ebc88f177865e585ae3decc26
[ "MIT" ]
null
null
null
import numpy as np import pytest import terrain def test_simple_join(): hills = terrain.terrain(size=(30, 30), center=(0.0, 0.0), scale=0.1) hills.bump(0.08, 0.41, 8.48, 1.56, 'hill') hills.bump(0.77, 0.45, 10.46, 1.51, 'hill') hills.bump(0.52, 0.69, 10.56, 1.95, 'hill') hills.bump(0.66, 0.96, 9.25, 1.25, 'hill') hills.bump(0.45, 0.53, 11.69, 2.14, 'hill') hills.bump(0.30, 0.46, 9.05, 1.01, 'hill') hills.bump(0.68, 0.58, 11.71, 1.33, 'hill') hills.bump(0.58, 0.79, 8.16, 0.94, 'hill') hills.bump(0.99, 0.49, 9.58, 1.23, 'hill') hills.bump(0.10, 0.91, 11.35, 2.00, 'hill') vert, norm = np.array(hills.raycast([0.0, 0.0, 1.0], [0.4, 0.7, -1.0])) np.testing.assert_almost_equal(vert, [0.10705419, 0.18734482, 0.46472907], decimal=4) np.testing.assert_almost_equal(norm, [-0.0410928, -0.1731015, 0.9840464], decimal=4) if __name__ == '__main__': pytest.main([__file__])
35.961538
89
0.603209
188
935
2.904255
0.404255
0.164835
0.18315
0.230769
0.095238
0
0
0
0
0
0
0.256739
0.166845
935
25
90
37.4
0.444159
0
0
0
0
0
0.051337
0
0
0
0
0
0.1
1
0.05
false
0
0.15
0
0.2
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
d97cf8f9fef4a3201dc90c922f4f7d624c10df9a
65
py
Python
fastsc/benchmarks/__init__.py
yongshanding/FastSC
c08bf17f30fdc5f8f2906600c632f8131745c69d
[ "MIT" ]
5
2020-08-24T19:23:28.000Z
2021-11-13T18:21:51.000Z
fastsc/benchmarks/__init__.py
yongshanding/FastSC
c08bf17f30fdc5f8f2906600c632f8131745c69d
[ "MIT" ]
null
null
null
fastsc/benchmarks/__init__.py
yongshanding/FastSC
c08bf17f30fdc5f8f2906600c632f8131745c69d
[ "MIT" ]
2
2020-10-19T16:14:45.000Z
2020-12-09T10:42:11.000Z
from .benchmarks import (get_circuit) __all__ = ['get_circuit']
16.25
37
0.753846
8
65
5.375
0.75
0.465116
0
0
0
0
0
0
0
0
0
0
0.123077
65
3
38
21.666667
0.754386
0
0
0
0
0
0.169231
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
d98dd200eba5709cc009a9daf28c9b5cca7cc517
99
py
Python
Aula 1/Arquivos/prototipo.py
Projeto-ALES/AulasWeb
7e513f522a4dd808ef34b33091c43d17407d2eba
[ "MIT" ]
null
null
null
Aula 1/Arquivos/prototipo.py
Projeto-ALES/AulasWeb
7e513f522a4dd808ef34b33091c43d17407d2eba
[ "MIT" ]
null
null
null
Aula 1/Arquivos/prototipo.py
Projeto-ALES/AulasWeb
7e513f522a4dd808ef34b33091c43d17407d2eba
[ "MIT" ]
null
null
null
pessoa = input("fale seu nome: ") def diz_ola(nome): print("olá, " + nome) diz_ola(pessoa)
11
33
0.616162
15
99
3.933333
0.666667
0.20339
0
0
0
0
0
0
0
0
0
0
0.212121
99
8
34
12.375
0.75641
0
0
0
0
0
0.20202
0
0
0
0
0
0
1
0.25
false
0
0
0
0.25
0.25
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
794ecf75475e6a86e7d2b17bb6b8396ce12af170
108
py
Python
chevah/compat/tests/elevated/testing/__init__.py
chevah/compat
d22e5f551a628f8a1652c9f2eea306e17930cb8f
[ "BSD-3-Clause" ]
5
2016-12-03T22:54:50.000Z
2021-11-17T11:17:39.000Z
chevah/compat/tests/elevated/testing/__init__.py
chevah/compat
d22e5f551a628f8a1652c9f2eea306e17930cb8f
[ "BSD-3-Clause" ]
76
2015-01-22T16:00:31.000Z
2022-02-09T22:13:34.000Z
chevah/compat/tests/elevated/testing/__init__.py
chevah/compat
d22e5f551a628f8a1652c9f2eea306e17930cb8f
[ "BSD-3-Clause" ]
1
2016-12-10T15:57:31.000Z
2016-12-10T15:57:31.000Z
# Copyright (c) 2012 Adi Roiban. # See LICENSE for details. """ Tests executed under elevated accounts. """
18
39
0.712963
14
108
5.5
1
0
0
0
0
0
0
0
0
0
0
0.044444
0.166667
108
5
40
21.6
0.811111
0.888889
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
79564959a69e4e77bf60a96d35ef4e056e629cb0
51
py
Python
bcdc_apitests/config/__init__.py
franTarkenton/bcdc_tests
7c2280e2e1dc8b6c1314638c1839985c26cbb082
[ "Apache-2.0" ]
1
2019-11-04T16:35:53.000Z
2019-11-04T16:35:53.000Z
bcdc_apitests/config/__init__.py
franTarkenton/bcdc_tests
7c2280e2e1dc8b6c1314638c1839985c26cbb082
[ "Apache-2.0" ]
14
2019-06-18T23:40:59.000Z
2022-01-10T21:53:06.000Z
bcdc_apitests/config/__init__.py
franTarkenton/bcdc_tests
7c2280e2e1dc8b6c1314638c1839985c26cbb082
[ "Apache-2.0" ]
4
2019-05-23T18:59:29.000Z
2019-06-10T22:34:57.000Z
''' Created on Jul. 4, 2019 @author: kjnether '''
8.5
23
0.607843
7
51
4.428571
1
0
0
0
0
0
0
0
0
0
0
0.121951
0.196078
51
5
24
10.2
0.634146
0.823529
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
796ec92cf6b706b6f762da8eb38c925ddddc2874
1,800
py
Python
model/person.py
eozgit/companies-house-api
7098b0b87c98069a98dd868fc3bd77dbda081f44
[ "MIT" ]
null
null
null
model/person.py
eozgit/companies-house-api
7098b0b87c98069a98dd868fc3bd77dbda081f44
[ "MIT" ]
null
null
null
model/person.py
eozgit/companies-house-api
7098b0b87c98069a98dd868fc3bd77dbda081f44
[ "MIT" ]
null
null
null
from .orm import db from .nature_of_control import NatureOfControl class Person(db.Model): id = db.Column(db.Integer, primary_key=True) company_number = db.Column(db.String(8), db.ForeignKey( 'company.company_number'), nullable=False) address_line_1 = db.Column(db.String(50)) address_line_2 = db.Column(db.String(50)) address_care_of = db.Column(db.String(60)) address_country = db.Column(db.String(50)) address_locality = db.Column(db.String(50)) address_po_box = db.Column(db.String(12)) address_postal_code = db.Column(db.String(15)) address_premises = db.Column(db.String(50)) address_region = db.Column(db.String(50)) ceased_on = db.Column(db.DateTime) country_of_residence = db.Column(db.String(50)) dob_day = db.Column(db.Integer) dob_month = db.Column(db.Integer) dob_year = db.Column(db.Integer) etag = db.Column(db.String(50)) id_country_registered = db.Column(db.String(50)) id_legal_authority = db.Column(db.String(50)) id_legal_form = db.Column(db.String(50)) id_place_registered = db.Column(db.String(50)) id_registration_number = db.Column(db.String(50)) kind = db.Column(db.String(50)) link_self = db.Column(db.String(100)) link_statement = db.Column(db.String(100)) name = db.Column(db.String(100)) forename = db.Column(db.String(50)) other_forenames = db.Column(db.String(50)) surname = db.Column(db.String(50)) title = db.Column(db.String(50)) nationality = db.Column(db.String(50)) natures_of_control = db.relationship( 'NatureOfControl', backref=db.backref('person', lazy=True), lazy=True, cascade="all,delete") notified_on = db.Column(db.DateTime) def __repr__(self): return '<Person %r>' % self.name
31.578947
100
0.687778
270
1,800
4.418519
0.296296
0.214585
0.268231
0.348701
0.487846
0.213747
0.07544
0
0
0
0
0.037358
0.167222
1,800
56
101
32.142857
0.758506
0
0
0
0
0
0.035556
0.012222
0
0
0
0
0
1
0.025
false
0
0.05
0.025
0.95
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
79ba6c8dae99e4d74423138ff7e9988b557f70ed
35
py
Python
SoccerPlanner/SoccerPlanner/__init__.py
NitroBolon/SoccerPlanner
0c1269c3819876d216986df9d0f30d8b20967936
[ "MIT" ]
null
null
null
SoccerPlanner/SoccerPlanner/__init__.py
NitroBolon/SoccerPlanner
0c1269c3819876d216986df9d0f30d8b20967936
[ "MIT" ]
2
2019-06-04T15:21:26.000Z
2019-06-27T18:14:25.000Z
SoccerPlanner/SoccerPlanner/__init__.py
NitroBolon/SoccerPlanner
0c1269c3819876d216986df9d0f30d8b20967936
[ "MIT" ]
3
2019-04-16T08:39:31.000Z
2019-05-07T09:05:26.000Z
""" Package for SoccerPlanner. """
8.75
26
0.657143
3
35
7.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.142857
35
3
27
11.666667
0.766667
0.742857
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
8de8161cf4402ce247911f9e0cd30c77f2f5f6e9
1,576
py
Python
src/pbar/__init__.py
DarviL82/PBar
6e914716cd9f5ce3097410f25033f6918d994ff3
[ "MIT" ]
40
2021-08-04T20:08:36.000Z
2022-02-21T12:34:43.000Z
src/pbar/__init__.py
DarviL82/PBar
6e914716cd9f5ce3097410f25033f6918d994ff3
[ "MIT" ]
6
2021-11-18T14:30:59.000Z
2022-01-20T18:17:26.000Z
src/pbar/__init__.py
DarviL82/PBar
6e914716cd9f5ce3097410f25033f6918d994ff3
[ "MIT" ]
3
2021-11-06T18:06:57.000Z
2021-12-05T04:59:44.000Z
""" ![logo_small](https://user-images.githubusercontent.com/48654552/134991429-1109ad1d-92fa-423f-8ce1-3b777471cb3d.png) ### Library to display customizable progress bars on the terminal easily, for Python3.9+ - [Wiki](https://github.com/DarviL82/PBar/wiki) - [GitHub Repository](https://github.com/DarviL82/PBar) - [PyPI](https://pypi.org/manage/project/pbar2) - [Website](https://darvil82.github.io/PBar) """ __version__ = "2.1.1" from . bar import PBar, iter, animate, bar_helper from . task_wrapper import task_wrapper from . sets import CharSet, FormatSet, ColorSet from . cond import Cond from . gen import ContentGens from . utils import Term # ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ # ░░░░░░░░░░░░░░░░▄▄▄███████▄▄░░░░░░░░░░░░ # ░░░░░░░░░░░░░░▄███████████████▄░░░░░░░░░ # ░░░░░░░░░░░░░█▀▀▀▄░░░░█████▀▀███▄░░░░░░░ # ░░░░░░░░░░░░█░░▄░░█▄▄█░░░░▀▄▄█████░░░░░░ # ░░░░░░░░░▄▀▀▀▄▄▀▀▀▀▀▀▄░░▀░░█▀▀▀░▀██░░░░░ # ░░░░░░░▄▀░░░░░█░░░░░░▀▄▄▄▄█░░░░░░░▀▄░░░░ # ░░░░░░▄▀░░░░░▄█▀▄▄▄▄░░░░░▄░░░░░░░░░█░░░░ # ░░░░░░█░░░░░▄█▀▄▄▄▄▄▄▄▄▄▀▀░░░░░░░░░▀▄░░░ # ░░░░░█░░░░░░▀█▄░░░░░░░░░░░░░░░░░░░░░█░░░ # ░░░░░█░░░░░░░░▀▄░░░░░░░░░░░░░░░░░░░░█░░░ # ░░░░░█░░░░░░░░▄█░░░░░░░░░░░░░░░░░░░░█░░░ # ░░░░░█░░░░░░▄▀░░░░░░░░▀▄░░░░░░░░░░░░█░░░ # ░░░░░█░░░░░░▀▄░░░▄░░░░░█░░░░░░░░░░░░█░░░ # ░░░░░█░░░░░░░░▀▀▀▀▀█▄▄▀░░░░░░░░░░░░░█░░░ # ░░░░░█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▄██░░ # ░░░░░█▄░░░░░░░░░░░░░░░░░░░░░░░░░░▄▀▀▄▀▄▄ # ░░░░▄█▀▄░░░░░░░░░░░░░░░░░░░░░░▄▄▀░░▄▀░░░ # ░▄░▀░░█░▀▄▄░░░░░░░░░░░░░░░▄▄▄▀░░░▄▀░░░░░ # ▀░░░░░░▀▄░░▀▄░░░░░░░░▄▄▄▀▀░░░░▄▀▀░░░░░░░ # Thanks a lot for taking a look at this project. - DarviL
35.818182
116
0.340736
122
1,576
10.893443
0.721311
0.016554
0.021068
0.033108
0.039127
0
0
0
0
0
0
0.033723
0.078046
1,576
43
117
36.651163
0.330351
0.813452
0
0
0
0
0.018797
0
0
0
0
0
0
1
0
false
0
0.857143
0
0.857143
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
5c1e36fc56c490451c440b7eed474572dfe895e5
52
py
Python
tests/fixtures/formatter/formatter1.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
1,931
2018-03-17T13:52:45.000Z
2022-03-27T09:39:17.000Z
tests/fixtures/formatter/formatter1.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
2,231
2018-03-09T21:19:05.000Z
2022-03-31T08:35:37.000Z
tests/fixtures/formatter/formatter1.py
cdhiraj40/wemake-python-styleguide
7cef9be081d594c30045b7a98cae77a9be46e1aa
[ "MIT" ]
492
2018-05-18T21:20:28.000Z
2022-03-20T14:11:50.000Z
def s(handle: int) -> int: return handle + 2_00
17.333333
26
0.615385
9
52
3.444444
0.777778
0
0
0
0
0
0
0
0
0
0
0.076923
0.25
52
2
27
26
0.717949
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
30d46e8ad3c52ab5d0c05d799265c5d93dba591b
445
py
Python
desktop/core/ext-py/celery-4.2.1/t/unit/utils/test_encoding.py
maulikjs/hue
59ac879b55bb6fb26ecb4e85f4c70836fc21173f
[ "Apache-2.0" ]
5,079
2015-01-01T03:39:46.000Z
2022-03-31T07:38:22.000Z
desktop/core/ext-py/celery-4.2.1/t/unit/utils/test_encoding.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
1,623
2015-01-01T08:06:24.000Z
2022-03-30T19:48:52.000Z
desktop/core/ext-py/celery-4.2.1/t/unit/utils/test_encoding.py
zks888/hue
93a8c370713e70b216c428caa2f75185ef809deb
[ "Apache-2.0" ]
2,033
2015-01-04T07:18:02.000Z
2022-03-28T19:55:47.000Z
from __future__ import absolute_import, unicode_literals from celery.utils import encoding class test_encoding: def test_safe_str(self): assert encoding.safe_str(object()) assert encoding.safe_str('foo') def test_safe_repr(self): assert encoding.safe_repr(object()) class foo(object): def __repr__(self): raise ValueError('foo') assert encoding.safe_repr(foo())
22.25
56
0.660674
54
445
5.092593
0.388889
0.203636
0.261818
0.16
0
0
0
0
0
0
0
0
0.251685
445
19
57
23.421053
0.825826
0
0
0
0
0
0.013483
0
0
0
0
0
0.333333
1
0.25
false
0
0.166667
0
0.583333
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
30eb5b1138084c0fb680e59e01f649050a7c8fab
11,849
py
Python
Rithika_plot(original).py
We-Want-it-That-Way/Plotting
30ecd9025ff9b68950a4e148d0af990bd4652780
[ "MIT" ]
null
null
null
Rithika_plot(original).py
We-Want-it-That-Way/Plotting
30ecd9025ff9b68950a4e148d0af990bd4652780
[ "MIT" ]
null
null
null
Rithika_plot(original).py
We-Want-it-That-Way/Plotting
30ecd9025ff9b68950a4e148d0af990bd4652780
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[41]: import pandas as pd import numpy as np import math G={'Name of pulsar':['J0205+6449','J0218+4232','J0437-4715','J0534+2200','J1105-6107','J1124-5916','J1617-5055','J1930+1852','J2124-3358','J2229+6114'],'po':[0.06571592849324,0.00232309053151224,0.005757451936712637,0.0333924123,0.0632021309179,0.13547685441,0.069356847,0.136855046957,0.00493111494309662,0.05162357393],'pdot':[1.93754256e-13,7.73955e-20,5.729215e-20,4.20972e-13,1.584462e-14,7.52566e-13,1.351e-13,7.5057e-13,2.05705e-20,7.827e-14],'D in Kpc':[3.200,3.150,0.157,2.000,2.360, 5.000, 4.743, 7.000, 0.410, 3.000],'Age':[5.37e+03,4.76e+08,1.59e+09,1.26e+03,6.32e+04,2.85e+03, 8.13e+03, 2.89e+03, 3.8e+09, 1.05e+04],'R_L':['NaN',466.36,13.52,2200.00,'NaN','NaN','NaN','NaN', 2.86, 13.50],'B_s':[3.61e+12,4.29e+08,4.29e+08,3.79e+12,1.01e+12,1.02e+13,3.1e+12,1.03e+13,3.22e+08,2.03e+12], 'Edot':[2.7e+37,2.4e+35,1.2e+34,4.5e+38,2.5e+36,1.2e+37,1.6e+37,1.2e+37,6.8e+33,2.2e+37], 'Edot2':[2.6e+36,2.5e+34,4.8e+35,1.1e+38,4.4e+35,4.8e+35,7.1e+35,2.4e+35,2.4e+35,2.5e+36], 'B_sI':[3.61e+12,4.27e+08,2.85e+08,3.79e+12,'NaN','NaN','NaN','NaN', 1.92e+08,'NaN'], 'B_Lc':[1.19e+05,3.21e+05,2.85e+04,9.55e+05,3.76e+04,3.85e+04, 8.70e+04, 3.75e+04, 2.52e+04, 1.39e+05]} z=pd.DataFrame(G) z.to_csv('Hig_energy_pulsar.csv') z # In[ ]: # In[43]: import pandas as pd import numpy as np import math A={'Name of pulsar':['J0537-6910','J0633+1746','J0543+2329','J1811-1925','J1846-0258','J0628+0909','J0633+1746','J0636-4549','J1811-4930','J1812-1718'],'po':[0.0161222220245,0.2370994416923,0.245983683333,0.06466700,0.32657128834,3.763733080,0.2370994416923,1.98459736713,1.4327041968,1.20537444137],'pdot':[5.1784338e-14,1.097087e-14,1.541956e-14,4.40e-14,7.107450e-12,0.5479e-15,1.097087e-14,3.1722e-15,2.254e-15,1.9077e-14],'D in Kpc':[49.700,0.190,1.565,5.000,5.800,1.771,0.190,0.383,1.447,3.678],'R_L':[0,0,71.03,0,0,0,0,0,0,0],'Age':[4.93e+03,3.42e+05,2.53e+05,2.33e+04,728,3.59e+07,3.42e+05,9.91e+06,1.01e+07,1e+06],'B_s':[9.25e+11,1.63e+12,1.97e+12,1.71e+12,4.88e+13,8.35e+11,1.63e+12,2.54e+12,1.82e+12,4.85e+12],'Edot':[4.9e+38,3.2e+34,4.1e+34,6.4e+36,8.1e+36,1.1e+31,3.2e+34,1.6e+31,3.0e+31,4.3e+32],'Edot2':[2.0e+35,9.0e+35,1.7e+34,2.6e+35,2.4e+35,3.6e+30,9.0e+35,1.1e+32,1.4e+31,3.2e+31],'B_sI':['NaN',1.63e+12,1.97e+12,'NaN','NaN','NaN',1.63e+12,'NaN','NaN','NaN'],'B_Lc':[2.07e+06,1.15e+03,1.24e+03,5.92e+04,1.31e+04,4.09e+00,1.15e+03,3.05e+00,5.80e+00,2.60e+01]} w=pd.DataFrame(A) w.to_csv('N_Radio_pulsar.csv') w # In[44]: import pandas as pd import numpy as np import math R={'Name of pulsar':['J0100-7211','J0525-6607','J1708-4008','J1808-2024','J1809-1943','J1841-0456','J1907+0919','J2301+5852','J1745-2900','J0525-6607'],'po':[8.020392, 0.35443759451370,11.0062624,7.55592,5.540742829,11.7889784, 5.198346,6.9790709703,3.763733080,8.0470],'pdot':[1.88e-11, 7.36052e-17,1.960e-11,5.49e-10,2.8281e-12,4.092e-11,9.2e-11,4.7123e-13,1.756e-11,6.5e-11],'D in Kpc':[59.700, 1.841,3.800,13.000,3.600,9.600,'NaN',3.300,8.300,'NaN'],'R_L':[0, 66.09,0,0,0,0,0,0,0,0],'Age':[6.76e+03,7.63e+07,8.9e+03,218,3.1e+04,4.57e+03,895,2.35e+05,3.4e+03,1.96e+03],'B_s':[3.93e+14,1.63e+11,4.7e+14,2.06e+15,1.27e+14,7.03e+14,7e+14,5.8e+13,2.6e+14,7.32e+14],'Edot':[1.4e+33,6.5e+31,5.8e+32,5.0e+34,6.6e+32,9.9e+32,2.6e+34,5.5e+31,1.3e+34,4.9e+33],'Edot2':[4.0e+29,1.9e+31,4.0e+31,3.0e+32,5.1e+31,1.1e+31,'NaN',5.0e+30,1.9e+32,'NaN'],'B_sI':['NaN', 1.62e+11,'NaN',2.06e+15, 1.27e+14,'NaN','NaN', 5.80e+13,2.60e+14,'NaN'],'B_Lc':[7.14e+00,3.44e+01,3.30e+00,4.48e+01,6.98e+00,4.02e+00,4.67e+01,1.60e+00,4.57e+01,1.32e+01]} v=pd.DataFrame(R) v.to_csv('magnetor_pulsar.csv') v # In[47]: u=pd.concat([z,w,v],ignore_index=True) u.to_csv('Combined_data.csv') u # In[102]: import pandas as pd import numpy as np a = z['po'] b = z['pdot'] d = z['Edot'] e = b*a**(-3) f = np.log(e) h = np.log(d) import matplotlib.pyplot as plt plt.xlabel('p(dot)*p^(-3)') plt.ylabel('E(dot)') plt.scatter(f,h,color='magenta') # In[101]: import pandas as pd import numpy as np a = w['po'] b = w['pdot'] d = w['Edot'] e = b*a**(-3) f = np.log(e) h = np.log(d) import matplotlib.pyplot as plt plt.xlabel('p(dot)*p^(-3)') plt.ylabel('E(dot)') plt.scatter(f,h,color='b') # In[100]: import pandas as pd import numpy as np a = v['po'] b = v['pdot'] d = v['Edot'] e = b*a**(-3) f = np.log(e) h = np.log(d) import matplotlib.pyplot as plt plt.xlabel('p(dot)*p^(-3)') plt.ylabel('E(dot)') plt.scatter(f,h,color='g') # In[99]: #age vs po import pandas as pd import numpy as np g = z['po'] e = z['Age'] i = (g) j = np.log(e) import matplotlib.pyplot as plt plt.xlabel('Age') plt.ylabel('po') plt.scatter(i,j,color='magenta') # In[98]: #age vs po import pandas as pd import numpy as np g = w['po'] e = w['Age'] i = (g) j = np.log(e) import matplotlib.pyplot as plt plt.xlabel('Age') plt.ylabel('po') plt.scatter(i,j,color='b') # In[96]: #age vs po import pandas as pd import numpy as np g = v['po'] e = v['Age'] i = (g) j = np.log(e) import matplotlib.pyplot as plt plt.xlabel('Age') plt.ylabel('po') plt.scatter(i,j,color='g') # In[105]: import pandas as pd import numpy as np k = z['B_s'] l = z['po'] m = z['pdot'] n = l*m q = np.log(k) p = np.log(n) import matplotlib.pyplot as plt plt.xlabel('$B_{s}$') plt.ylabel('P$\dot{P}$') plt.scatter(q,p,color='magenta') # In[94]: import pandas as pd import numpy as np k = w['B_s'] l = w['po'] m = w['pdot'] n = l*m q = np.log(k) p = np.log(n) import matplotlib.pyplot as plt plt.xlabel('B_s') plt.ylabel('l*m') plt.scatter(q,p,color='b') # In[93]: import pandas as pd import numpy as np k = v['B_s'] l = v['po'] m = v['pdot'] n = l*m q = np.log(k) p = np.log(n) import matplotlib.pyplot as plt plt.xlabel('B_s') plt.ylabel('l*m') plt.scatter(q,p,color='g') # In[8]: #calculating and verifying inertia values import pandas as pd import numpy as np import matplotlib.pyplot as plt p1 = 0.0628 pdo = 8.560517117*10**(-15) R = 10**3 I = 10**38 M = 2.8*10**30 c = 3*10**8 G = 6.67408*10**(-11) pi = 3.14159265359 eo = (3*I*c**3*p1*pdo)/(4*pi**2*G*M**2*R**2) #u = math.log(r,10) #v = math.log(s,10) #z = ((0.035477*10**8)*r*s) #w = math.log(z,10) #print(w) #print(u) #print(eo) x = math.log(eo,10) print(x) #e1 = 0.04446555*10**(-9) #loe1 = math.log(e1,10) #print(loe1) # In[59]: #inertia values import pandas as pd import numpy as np k = u['Edot'] l = u['po'] m = u['pdot'] MI = (k*l**3)/(4*((3.14)**2)*m) print(MI) # In[39]: #REGRESSION PLOT import seaborn as sns import matplotlib.pyplot as plt sns.regplot(x=o['po'], y=np.log(o['pdot'])) # In[63]: #CALCULATING MAGNETIC MOMENT import pandas as pd import numpy as np import matplotlib.pyplot as plt k = MI l = u['po'] m = u['pdot'] #i = np.sort(l) #j = np.sort(m) #q = np.sort(k) moment = ((3*l*m*k*((3*10**8)**3))**(1/2))/(8**(1/2)*np.pi) print(moment) plt.xlabel('p') plt.ylabel('moment') plt.scatter(l,moment) # In[65]: #MOMENT VS PDOT import matplotlib.pyplot as plt plt.xlabel('pdot') plt.ylabel('moment') plt.scatter((m),(moment)) # In[79]: #*pdoubledot and magnetic index values and respective graphs import pandas as pd import numpy as np import math pdoubledot = [4.362022e-74,1.435485e-77,1.645689e-78,3.594040e-73,3.765140e-75,3.983752e-74,2.725094e-74,3.599818e-74,8.226702e-79,2.852902e-74,2.014969e-73,1.900034e-76,2.471356e-76,1.021682e-74,6.672220e-74,3.756395e-80,1.915326e-76,7.661261e-79,1.449304e-81,1.315667e-77,2.843571e-76,5.792669e-79,1.571104e-76,9.862808e-75,9.023199e-77,2.863310e-76,3.339180e-75,9.204737e-78,1.206434e-75,9.555010e-76] magneticindex = [2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0,2.0] pdotdot=pd.DataFrame(pdoubledot) import matplotlib.pyplot as plt l = z['po'] m = z['pdot'] #n = o['Age'] #i = np.sort(l) #j = np.sort(m) #k = np.sort(magneticindex) #q = np.sort(pdoubledot) print (pdoubledot) print(magneticindex) bri = 2-((i*q)/j**2) plt.plot(bri,magneticindex) # In[15]: #pdoubledot vs p import matplotlib.pyplot as plt plt.xlabel('p') plt.ylabel('pdoubledot') plt.scatter(l,pdoubledot) # In[17]: #regression graph import matplotlib.pyplot as plt import pandas as pd import numpy as np #o=pd.concat([l,p,c],ignore_index=True) #o.to_csv('Combined_data.csv') sns.regplot(x=l, y=m) # In[91]: #B_s vs po import pandas as pd import numpy as np a = z['po'] b = z['pdot'] d = z['B_s'] #e = b*a**(-3) f = (a) h = np.log(d) import matplotlib.pyplot as plt plt.xlabel('po') plt.ylabel('B_s') plt.scatter(f,h,color='magenta') # In[90]: #B_s vs po import pandas as pd import numpy as np a = w['po'] b = w['pdot'] d = w['B_s'] #e = b*a**(-3) f = (a) h = np.log(d) import matplotlib.pyplot as plt plt.xlabel('po') plt.ylabel('B_s') plt.scatter(f,h,color='b') # In[89]: #B_s vs po import pandas as pd import numpy as np a = v['po'] b = v['pdot'] d = v['B_s'] #e = b*a**(-3) f = (a) h = np.log(d) import matplotlib.pyplot as plt plt.xlabel('po') plt.ylabel('B_s') plt.scatter(f,h,color='g') # In[88]: #B_s vs pdot import pandas as pd import numpy as np g = z['pdot'] e = z['B_s'] i = np.log(g) j = np.log(e) import matplotlib.pyplot as plt plt.xlabel('pdot') plt.ylabel('B_s') plt.scatter(i,j,color='magenta') # In[87]: #B_s vs pdot import pandas as pd import numpy as np g = w['pdot'] e = w['B_s'] i = np.log(g) j = np.log(e) import matplotlib.pyplot as plt plt.xlabel('pdot') plt.ylabel('B_s') plt.scatter(i,j,color='b') # In[86]: #B_s vs pdot import pandas as pd import numpy as np g = v['pdot'] e = v['B_s'] i = np.log(g) j = np.log(e) import matplotlib.pyplot as plt plt.xlabel('pdot') plt.ylabel('B_s') plt.scatter(i,j,color='g') # In[85]: import pandas as pd import numpy as np k = z['B_s'] l = z['po'] m = z['pdot'] n = l*m q = np.log(k) p = np.log(n) import matplotlib.pyplot as plt plt.xlabel('B_s') plt.ylabel('l*m') plt.scatter(q,p,color='magenta') # In[84]: import pandas as pd import numpy as np k = w['B_s'] l = w['po'] m = w['pdot'] n = l*m q = np.log(k) p = np.log(n) import matplotlib.pyplot as plt plt.xlabel('B_s') plt.ylabel('l*m') plt.scatter(q,p,color='b') # In[83]: import pandas as pd import numpy as np k = v['B_s'] l = v['po'] m = v['pdot'] n = l*m q = np.log(k) p = np.log(n) import matplotlib.pyplot as plt plt.xlabel('B_s') plt.ylabel('l*m') plt.scatter(q,p,color='g') # In[77]: #energy density values import pandas as pd import numpy as np import matplotlib.pyplot as plt energydensity = [5.197004e+23,7.329435e+15,1.344718e+16,5.730662e+23,4.070692e+22,4.158539e+24,3.816843e+23,4.189682e+24,4.140784e+15,1.647759e+23,3.404310e+22,1.063169e+23,1.544215e+23,1.159887e+23,9.465151e+25,8.407745e+22,1.063169e+23,2.564554e+23,1.314073e+23,9.385028e+23,6.146583e+27,1.063405e+21,8.793794e+27,1.690987e+29,6.391975e+26,1.965530e+28,1.949545e+28,1.339982e+26,2.700298e+27,2.132199e+28] g = u['po'] k = u['B_s'] se = np.log(energydensity) q = np.log(g) p = np.log(k) plt.xlabel('energy density') plt.ylabel('B_s') plt.scatter(se,p) # In[82]: #energy density vs po import pandas as pd import numpy as np import matplotlib.pyplot as plt plt.xlabel('energy density') plt.ylabel('po') plt.scatter(se,q,color='r') # In[111]: plt.scatter(np.log(bri),np.log(z['B_s'])) plt.title('Braking Index Vs Magnetic Field') plt.xlabel('Braking Indes') plt.ylabel('$B_{s}$') # In[115]: u['moment']=[3.61919e+27,4.26409e+23,5.85652e+23,3.81496e+27,1.01864e+27,1.02544e+28,3.10332e+27,1.04641e+28,3.23395e+23,2.01602e+27,9.27974e+26,1.6219e+27,1.97603e+27,1.70625e+27,4.89538e+28,7.57743e+27,1.6219e+27,2.54093e+27,1.81327e+27,4.85922e+27,3.88189e+29,1.63352e+26,4.70524e+29,2.05896e+30,1.27203e+29,7.05274e+29,7.02757e+29,5.82592e+28,2.60494e+29,7.31062e+29] u # In[120]: sns.regplot(np.log(u['pdot']),np.log(u['moment'])) # In[ ]: # In[ ]:
21.426763
1,077
0.648578
2,676
11,849
2.849402
0.183109
0.024918
0.01141
0.015213
0.45141
0.424393
0.406951
0.391738
0.376
0.375869
0
0.258538
0.102962
11,849
552
1,078
21.46558
0.458839
0.090219
0
0.729299
0
0
0.106228
0.001964
0
0
0
0
0
1
0
false
0
0.280255
0
0.280255
0.015924
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a500eb8e582c2bf7c14a2fa707892fe388475e2f
234
py
Python
python/starpattern 2.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
1
2019-07-05T04:27:05.000Z
2019-07-05T04:27:05.000Z
python/starpattern 2.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
null
null
null
python/starpattern 2.py
itzsoumyadip/vs
acf32cd0bacb26e62854060e0acf5eb41b7a68c8
[ "Unlicense" ]
null
null
null
# # # # # # # # # # for i in range(4): for j in range(4): if j<=i: print("#", end=" ") print() # second method for i in range(4): for j in range(i+1): print("#", end=" ") print()
9.36
31
0.388889
32
234
2.84375
0.375
0.307692
0.263736
0.241758
0.505495
0.505495
0.505495
0.505495
0.505495
0
0
0.028571
0.401709
234
24
32
9.75
0.621429
0.055556
0
0.666667
0
0
0.020101
0
0
0
0
0
0
1
0
false
0
0
0
0
0.444444
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
a5012185e229eec36ce273b90728b110ee186013
1,233
py
Python
ark/api/one/transport.py
dunnen/python-client
ad9446534a84cc18cb4160ddfe5ac84a0f3d8c6e
[ "MIT" ]
null
null
null
ark/api/one/transport.py
dunnen/python-client
ad9446534a84cc18cb4160ddfe5ac84a0f3d8c6e
[ "MIT" ]
null
null
null
ark/api/one/transport.py
dunnen/python-client
ad9446534a84cc18cb4160ddfe5ac84a0f3d8c6e
[ "MIT" ]
null
null
null
from ark.api.resource import Resource class Transport(Resource): def __init__(self, client): self.client = client self.client.port = 4002 def list(self): return self.request_get('peer/list') def blocks_common(self, ids): return self.request_get('peer/blocks/common', {'ids': ','.join(ids)}) def block(self, id): return self.request_get('peer/block', {'id': id}) def blocks(self): return self.request_get('peer/blocks') def create_block(self, block): return self.request_post('peer/blocks', data={'block': block}) def transactions(self): return self.request_get('peer/transactions') def transactions_from_ids(self, ids): return self.request_get('peer/transactionsFromIds', {'ids': ','.join(ids)}) def create_transaction(self, transaction): return self.request_post('peer/transactions', data={'transactions': [transaction]}) def create_batch_transaction(self, transaction): return self.request_post('peer/transactions', data={'transactions': transaction}) def height(self): return self.request_get('peer/height') def status(self): return self.request_get('peer/status')
30.073171
91
0.663423
150
1,233
5.306667
0.22
0.138191
0.234925
0.201005
0.56407
0.502513
0.311558
0.233668
0.233668
0.233668
0
0.004036
0.196269
1,233
40
92
30.825
0.799193
0
0
0
0
0
0.158151
0.019465
0
0
0
0
0
1
0.444444
false
0
0.037037
0.407407
0.925926
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
a50597b41a8cd921857fec37775a4bd446adef02
150
py
Python
src/beeb/nav/sched/remote.py
lmmx/beeb
26e5dc3c4ff9590d3518c7015423bbc795606f6d
[ "MIT" ]
2
2021-12-29T12:04:34.000Z
2022-01-22T01:34:48.000Z
src/beeb/nav/sched/remote.py
lmmx/beeb
26e5dc3c4ff9590d3518c7015423bbc795606f6d
[ "MIT" ]
15
2021-03-17T20:26:49.000Z
2021-08-09T21:49:53.000Z
src/beeb/nav/sched/remote.py
lmmx/beeb
26e5dc3c4ff9590d3518c7015423bbc795606f6d
[ "MIT" ]
null
null
null
from ..channel_ids import ChannelPicker class RemoteMixIn: @property def channel(self): return ChannelPicker.by_id(self.channel_id)
18.75
51
0.733333
18
150
5.944444
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.193333
150
7
52
21.428571
0.884298
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
eb4ea1993d223a4f50a2afad3e5caf5bbdff443b
1,123
py
Python
pack_layout.py
prasertcbs/tkinter
4a963dcb951c860379e9d90a3091059c56453e1c
[ "MIT" ]
null
null
null
pack_layout.py
prasertcbs/tkinter
4a963dcb951c860379e9d90a3091059c56453e1c
[ "MIT" ]
null
null
null
pack_layout.py
prasertcbs/tkinter
4a963dcb951c860379e9d90a3091059c56453e1c
[ "MIT" ]
1
2022-03-26T13:57:38.000Z
2022-03-26T13:57:38.000Z
from tkinter import * def demo1(): root = Tk() root.option_add("*Font", "impact 25") # method 1: Button(root, text="apple").pack(side=LEFT) Button(root, text="banana").pack(side=LEFT) Button(root, text="coconut").pack(side=LEFT) Button(root, text="tulip").pack(side=RIGHT) Button(root, text="papaya").pack(side=LEFT) # method 2: # b1 = Button(root, text="banana") # b1.pack(side=LEFT) root.mainloop() def demo2(): root = Tk() root.option_add("*Font", "impact 25") # method 1: Button(root, text="apple").pack() Button(root, text="banana").pack(side=BOTTOM) Button(root, text="coconut").pack() Button(root, text="tulip").pack(side=BOTTOM) Button(root, text="papaya").pack() # method 2: # b1 = Button(root, text="banana") # b1.pack(side=LEFT) root.mainloop() def demo3(): root = Tk() root.option_add("*Font", "impact 25") for c in "rainbow": Button(root, text=c).pack(side=BOTTOM) root.mainloop() if __name__ == '__main__': # demo2() demo3()
23.893617
50
0.571683
145
1,123
4.351724
0.262069
0.206022
0.288431
0.126783
0.806656
0.724247
0.426307
0.426307
0.377179
0.377179
0
0.022379
0.243989
1,123
46
51
24.413043
0.720848
0.134461
0
0.333333
0
0
0.125546
0
0
0
0
0
0
1
0.111111
false
0
0.037037
0
0.148148
0
0
0
0
null
1
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
eb4edd11fb8c01b2634e9dff9f96e6753563b643
101
py
Python
HW_6/Makarov_V/CW_5.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
null
null
null
HW_6/Makarov_V/CW_5.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
null
null
null
HW_6/Makarov_V/CW_5.py
kolyasalubov/Lv-677.PythonCore
c9f9107c734a61e398154a90b8a3e249276c2704
[ "MIT" ]
6
2022-02-22T22:30:49.000Z
2022-03-28T12:51:19.000Z
def reverse(st): word = st.split() st_reversed = " ".join(word[::-1]) return st_reversed
20.2
38
0.594059
14
101
4.142857
0.642857
0.344828
0
0
0
0
0
0
0
0
0
0.012821
0.227723
101
4
39
25.25
0.730769
0
0
0
0
0
0.009901
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
eb738125ff90aa166fa8a6428d18c7970abe4478
11
py
Python
train/__init__.py
pichangpeng/object_detection_pytorch
ecb431aafd80e4b9f780e681fb45b26036b501f8
[ "Apache-2.0" ]
null
null
null
train/__init__.py
pichangpeng/object_detection_pytorch
ecb431aafd80e4b9f780e681fb45b26036b501f8
[ "Apache-2.0" ]
null
null
null
train/__init__.py
pichangpeng/object_detection_pytorch
ecb431aafd80e4b9f780e681fb45b26036b501f8
[ "Apache-2.0" ]
null
null
null
__all__=[]
5.5
10
0.636364
1
11
3
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
11
2
10
5.5
0.3
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
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
eb760fd99a287d96d55103ddd7e3abc8e38ca1ea
1,449
py
Python
Lecture1/code/bin_tree.py
darkthecross/autonomous_driving_tutorial
e40c1eba81c3bf077df41c6201b51c6337dbdd27
[ "MIT" ]
null
null
null
Lecture1/code/bin_tree.py
darkthecross/autonomous_driving_tutorial
e40c1eba81c3bf077df41c6201b51c6337dbdd27
[ "MIT" ]
null
null
null
Lecture1/code/bin_tree.py
darkthecross/autonomous_driving_tutorial
e40c1eba81c3bf077df41c6201b51c6337dbdd27
[ "MIT" ]
1
2021-02-27T07:36:21.000Z
2021-02-27T07:36:21.000Z
class BinTreeNode(object): def __init__(self, data, left=None, right=None): self.data, self.left, self.right = data, left, right class BinTree(object): def __init__(self, root=None): self.root = root @classmethod def build_from(cls, node_list): """ param node_list: a list of nodes in the format: {'data': 'A', 'left': None, 'right': None, 'is_root': False} """ node_dict = {} for node_data in node_list: data = node_data['data'] node_dict[data] = BinTreeNode(data) for node_data in node_list: data = node_data['data'] node = node_dict[data] if node_data['is_root']: root = node node.left = node_dict.get(node_data['left']) node.right = node_dict.get(node_data['right']) return cls(root) def GetMaxDepth(self): # TODO: Implement the method return 0 def FindElement(self, node_id): # TODO: Implement the method return False def FindPath(self, node_id): # TODO: Implement the method return str([]).strip('[]') def ShowData(self): return self.PreorderTrav(self.root) def PreorderTrav(self, treenode): if treenode is not None: return treenode.data + ", " + self.PreorderTrav(treenode.left) + self.PreorderTrav(treenode.right) else: return ""
31.5
116
0.57695
176
1,449
4.585227
0.267045
0.069393
0.05948
0.081784
0.277571
0.195787
0.195787
0.195787
0.101611
0.101611
0
0.000996
0.307108
1,449
46
117
31.5
0.802789
0.131125
0
0.121212
0
0
0.02269
0
0
0
0
0.021739
0
1
0.242424
false
0
0
0.121212
0.515152
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
4
eb99dd5acdc536ae21dd01e88e109436c58b4217
3,149
py
Python
speedTesting/Profiling.py
Zachary-Ronayne/CS_Summer_2020_Independent_Study
a51cb053e31140746cafede6afe0d0a1fa0506c5
[ "MIT" ]
null
null
null
speedTesting/Profiling.py
Zachary-Ronayne/CS_Summer_2020_Independent_Study
a51cb053e31140746cafede6afe0d0a1fa0506c5
[ "MIT" ]
null
null
null
speedTesting/Profiling.py
Zachary-Ronayne/CS_Summer_2020_Independent_Study
a51cb053e31140746cafede6afe0d0a1fa0506c5
[ "MIT" ]
null
null
null
import cProfile from Checkers.DuelModel import * game = Game(8) env = DuelModel(game, rPieceInner=[200, 200, 200], rGameInner=[500, 500, 500], bPieceInner=[200, 200, 200], bGameInner=[500, 500, 500]) pieceModel = env.redEnv game.play((1, 5), (True, True, False)) game.play((2, 5), (True, True, False)) game.play((2, 5), (True, True, False)) game.play((3, 5), (True, True, False)) game.play((1, 6), (True, True, False)) game.play((1, 4), (True, True, False)) pieceModel.current = (3, 5) def testCode(): for i in range(350): # pieceModel.rewardFunc(game, 7) newGame = game.makeCopy() pieceModel.oneActionReward(newGame, 7, game.redTurn) pieceModel.oneActionReward(newGame, None, game.redTurn) # game.play((1, 5), (True, True, False)) # game.play((2, 5), (True, True, False)) # game.play((2, 5), (True, True, False)) # game.play((3, 5), (True, True, False)) # game.play((1, 6), (True, True, False)) # game.play((1, 4), (True, True, False)) # game.play((3, 5), (True, True, True)) # game.play((2, 3), (True, True, False)) # game.play((2, 6), (True, True, True)) # game.play((2, 4), (True, True, True)) # game.play((1, 2), (False, True, False)) # game.play((1, 7), (False, True, True)) # game.play((2, 5), (False, True, False)) # game.play((1, 4), (True, True, True)) # game.play((1, 5), (False, True, False)) # game.play((3, 6), (True, True, True)) # game.play((2, 4), (True, True, True)) # game.play((1, 2), (True, True, False)) # game.play((2, 7), (False, True, True)) # game.play((3, 5), (True, True, False)) # game.play((0, 4), (False, True, True)) # game.play((1, 2), (True, True, False)) # game.play((3, 7), (True, True, True)) # game.play((2, 5), (False, True, False)) # game.play((1, 5), (True, True, False)) # game.play((2, 4), (True, True, False)) # game.play((0, 6), (False, True, False)) # game.play((2, 3), (False, True, True)) # game.play((3, 1), (True, True, False)) # game.play((2, 7), (True, True, False)) # game.play((2, 0), (True, False, True)) # game.play((1, 2), (False, False, False)) # game.play((2, 6), (True, True, False)) # game.play((2, 3), (True, True, True)) # game.play((1, 1), (False, True, False)) # game.play((3, 7), (True, True, False)) # game.play((1, 0), (True, False, True)) # game.play((0, 2), (False, False, False)) # game.play((0, 4), (False, True, False)) # game.play((1, 3), (False, False, False)) # game.play((1, 3), (False, True, False)) # game.play((1, 4), (False, False, True)) # game.play((2, 6), (False, True, False)) # game.play((0, 5), (False, True, False)) # game.play((3, 5), (True, True, False)) # game.play((0, 7), (False, True, False)) # game.play((2, 4), (False, True, True)) # game.play((3, 2), (True, True, True)) cProfile.run("testCode()", sort=2)
39.860759
78
0.513496
444
3,149
3.641892
0.096847
0.267161
0.289425
0.346939
0.748918
0.745207
0.508967
0.410637
0.384663
0.373531
0
0.065553
0.258812
3,149
78
79
40.371795
0.627249
0.606859
0
0.105263
0
0
0.008418
0
0
0
0
0
0
1
0.052632
false
0
0.105263
0
0.157895
0
0
0
0
null
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
eb9e0ef4191aaf5f8e83c31a1272381350bfb361
87
py
Python
Caesar_Frequency.py
abhatia25/Cryptography
852253616cb292af0225bb899ce508f8dbcda0da
[ "MIT" ]
null
null
null
Caesar_Frequency.py
abhatia25/Cryptography
852253616cb292af0225bb899ce508f8dbcda0da
[ "MIT" ]
null
null
null
Caesar_Frequency.py
abhatia25/Cryptography
852253616cb292af0225bb899ce508f8dbcda0da
[ "MIT" ]
null
null
null
from Tools import * barchart(open('caesar_challenge_1.txt').read(), 'mybarchart.svg')
21.75
65
0.747126
12
87
5.25
1
0
0
0
0
0
0
0
0
0
0
0.0125
0.08046
87
3
66
29
0.775
0
0
0
0
0
0.413793
0.252874
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
ebc0c45c72066a064427a3df314f0a6e7cecf5fd
115
py
Python
func.py
Matelaa/LearningPython
0cc565fea588a981cded058f6ce5d6a9f351cd44
[ "MIT" ]
2
2021-10-07T01:05:32.000Z
2021-10-07T06:10:17.000Z
func.py
Matelaa/LearningPython
0cc565fea588a981cded058f6ce5d6a9f351cd44
[ "MIT" ]
null
null
null
func.py
Matelaa/LearningPython
0cc565fea588a981cded058f6ce5d6a9f351cd44
[ "MIT" ]
6
2021-10-05T13:25:47.000Z
2021-10-06T18:00:30.000Z
# A simple Python function def fun(): print("Welcome to GFG") # Driver code to call a function fun()
14.375
32
0.626087
17
115
4.235294
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.278261
115
7
33
16.428571
0.86747
0.478261
0
0
0
0
0.245614
0
0
0
0
0
0
1
0.333333
true
0
0
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
0
0
0
0
0
4
ebdbb1a10e340715d806b73a80519eb85e861699
170
py
Python
1672-richest-customer-wealth/1672-richest-customer-wealth.py
MayaScarlet/leetcode-python
8ef0c5cadf2e975957085c0ef84a8c3d90a64b6a
[ "MIT" ]
null
null
null
1672-richest-customer-wealth/1672-richest-customer-wealth.py
MayaScarlet/leetcode-python
8ef0c5cadf2e975957085c0ef84a8c3d90a64b6a
[ "MIT" ]
null
null
null
1672-richest-customer-wealth/1672-richest-customer-wealth.py
MayaScarlet/leetcode-python
8ef0c5cadf2e975957085c0ef84a8c3d90a64b6a
[ "MIT" ]
null
null
null
class Solution: def maximumWealth(self, accounts: List[List[int]]) -> int: wealth = [sum(nums) for i, nums in enumerate(accounts)] return max(wealth)
42.5
63
0.647059
22
170
5
0.772727
0
0
0
0
0
0
0
0
0
0
0
0.223529
170
4
64
42.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
ccd75f4df08852e64f3a8430d9c12eed9b6e234a
53
py
Python
PythonBootCamp/Practice/dictionary.py
yashdeeph709/Algorithms
196cb545a933866ec2ca8ad9530d7dbc97f7c269
[ "Apache-2.0" ]
6
2017-09-28T12:38:00.000Z
2020-07-15T04:41:07.000Z
PythonBootCamp/Practice/dictionary.py
yashdeeph709/Algorithms
196cb545a933866ec2ca8ad9530d7dbc97f7c269
[ "Apache-2.0" ]
5
2016-08-25T06:06:12.000Z
2016-11-26T18:57:20.000Z
PythonBootCamp/Practice/dictionary.py
yashdeeph709/Algorithms
196cb545a933866ec2ca8ad9530d7dbc97f7c269
[ "Apache-2.0" ]
1
2019-11-05T05:29:25.000Z
2019-11-05T05:29:25.000Z
students={"yashdeep":19,"harshal":12} print students
17.666667
37
0.754717
7
53
5.714286
0.857143
0
0
0
0
0
0
0
0
0
0
0.08
0.056604
53
2
38
26.5
0.72
0
0
0
0
0
0.283019
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
1
0
4
ccdb45bb6368f5b3314ccb8fbdeeb2aa60aad438
152
py
Python
mlcomp/db/models/base.py
sUeharaE4/mlcomp
1e0c23f84622ea4f72eb4e2354cef5ee16b767f4
[ "Apache-2.0" ]
166
2019-08-21T20:00:04.000Z
2020-05-14T16:13:57.000Z
mlcomp/db/models/base.py
sUeharaE4/mlcomp
1e0c23f84622ea4f72eb4e2354cef5ee16b767f4
[ "Apache-2.0" ]
14
2019-08-22T07:58:39.000Z
2020-04-13T13:59:07.000Z
mlcomp/db/models/base.py
sUeharaE4/mlcomp
1e0c23f84622ea4f72eb4e2354cef5ee16b767f4
[ "Apache-2.0" ]
22
2019-08-23T12:37:20.000Z
2020-04-20T10:06:29.000Z
from sqlalchemy.ext.declarative import declarative_base from sqlalchemy_serializer import SerializerMixin Base = declarative_base(cls=SerializerMixin)
30.4
55
0.881579
17
152
7.705882
0.529412
0.21374
0
0
0
0
0
0
0
0
0
0
0.078947
152
4
56
38
0.935714
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
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
690b027f88897185b09f6eaf5afd6b04e4cdc79e
71
py
Python
manager_gunicorn.py
flaxandteal/dp-conceptual-search
16c6383a61ba5b7069337c2626a0dc243bfe9d35
[ "MIT" ]
3
2018-05-10T16:49:27.000Z
2022-03-29T15:23:04.000Z
manager_gunicorn.py
flaxandteal/dp-conceptual-search
16c6383a61ba5b7069337c2626a0dc243bfe9d35
[ "MIT" ]
2
2018-09-20T06:37:27.000Z
2018-11-12T12:05:08.000Z
manager_gunicorn.py
flaxandteal/dp-conceptual-search
16c6383a61ba5b7069337c2626a0dc243bfe9d35
[ "MIT" ]
3
2018-06-25T10:48:43.000Z
2021-04-11T08:01:27.000Z
from dp_conceptual_search.app.app import create_app app = create_app()
23.666667
51
0.830986
12
71
4.583333
0.583333
0.218182
0
0
0
0
0
0
0
0
0
0
0.098592
71
2
52
35.5
0.859375
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
6917670fc47d7ec1737f7b73fee155c617bc3088
433
py
Python
pycaishen/util/__init__.py
spyamine/pycaishen3
33f756fd0ad2bd05eb0d21fd4e7e8573e317a6a9
[ "Apache-2.0" ]
1
2019-06-17T10:17:30.000Z
2019-06-17T10:17:30.000Z
pycaishen/util/__init__.py
spyamine/pycaishen3
33f756fd0ad2bd05eb0d21fd4e7e8573e317a6a9
[ "Apache-2.0" ]
null
null
null
pycaishen/util/__init__.py
spyamine/pycaishen3
33f756fd0ad2bd05eb0d21fd4e7e8573e317a6a9
[ "Apache-2.0" ]
null
null
null
__author__ = 'saeedamen' # from pycaishen.util.cachemanager import CacheManager # from pycaishen.util.commonman import CommonMan # from pycaishen.util.configmanager import ConfigManager # from pycaishen.util.dataconstants import DataConstants # from pycaishen.util.fxconv import FXConv from pycaishen.util.loggermanager import LoggerManager from pycaishen.util.singleton import Singleton # from pycaishen.util.twitter import Twitter
43.3
56
0.847575
50
433
7.26
0.28
0.286501
0.374656
0
0
0
0
0
0
0
0
0
0.094688
433
10
57
43.3
0.92602
0.676674
0
0
0
0
0.067164
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
6939b27f2fab55c90449e700697a2b11804b0d26
41
py
Python
login.py
helen3708/study-day2
03b995f4ddf46a0bc14790fe2a6c9930e4f200a6
[ "MIT" ]
null
null
null
login.py
helen3708/study-day2
03b995f4ddf46a0bc14790fe2a6c9930e4f200a6
[ "MIT" ]
null
null
null
login.py
helen3708/study-day2
03b995f4ddf46a0bc14790fe2a6c9930e4f200a6
[ "MIT" ]
null
null
null
print("hello") print("hahaha") num4 = 40
10.25
15
0.658537
6
41
4.5
0.833333
0
0
0
0
0
0
0
0
0
0
0.083333
0.121951
41
3
16
13.666667
0.666667
0
0
0
0
0
0.268293
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
6941973e1c3108ddaf2bae55047595ee74f00836
211
py
Python
setup.py
flydog98/naver_news_scraper
ddac078a037297ad6fe6e37fdcba022cc7229fcb
[ "MIT" ]
null
null
null
setup.py
flydog98/naver_news_scraper
ddac078a037297ad6fe6e37fdcba022cc7229fcb
[ "MIT" ]
null
null
null
setup.py
flydog98/naver_news_scraper
ddac078a037297ad6fe6e37fdcba022cc7229fcb
[ "MIT" ]
null
null
null
import setuptools setuptools.setup( name = "naver_news_scraper" url = "https://github.com/flydog98/naver_news_scraper" license = "MIT" author = "flydog98" author_email = "guinnessoverflow@gmail.com" )
23.444444
56
0.739336
25
211
6.04
0.72
0.119205
0.211921
0
0
0
0
0
0
0
0
0.021978
0.137441
211
9
57
23.444444
0.807692
0
0
0
0
0
0.476415
0.122642
0
0
0
0
0
0
null
null
0
0.125
null
null
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
6941b6b71737e13447634b9ca2cae43c6f64edd4
296
py
Python
v3/Libraries/builtin/classes/catching unknown attributes.py
TheShellLand/python
a35e9b32bec3a3ff03d6f0f4c2c2cc891180e516
[ "MIT" ]
null
null
null
v3/Libraries/builtin/classes/catching unknown attributes.py
TheShellLand/python
a35e9b32bec3a3ff03d6f0f4c2c2cc891180e516
[ "MIT" ]
1
2021-06-01T22:50:19.000Z
2021-06-01T22:50:19.000Z
v3/Libraries/builtin/classes/catching unknown attributes.py
TheShellLand/python
a35e9b32bec3a3ff03d6f0f4c2c2cc891180e516
[ "MIT" ]
null
null
null
# http://rosettacode.org/wiki/Respond_to_an_unknown_method_call#Python class ElasticWrapper(): def __init__(self, item): self.client = Elasticsearch(item, maxsize=100) # max connections to each node def __getattr__(self, item): return getattr(self.client, item)
29.6
92
0.706081
37
296
5.297297
0.72973
0.081633
0
0
0
0
0
0
0
0
0
0.012552
0.192568
296
9
93
32.888889
0.807531
0.324324
0
0
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0.2
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
694f79da58cf4f3e6a7472d076ee736ae61f5433
71
py
Python
models/__init__.py
LeeLin2602/backend
c3968cf2c09f20823152daa271bf4d8baa58b408
[ "BSD-3-Clause" ]
1
2022-02-16T09:11:26.000Z
2022-02-16T09:11:26.000Z
models/__init__.py
LeeLin2602/backend
c3968cf2c09f20823152daa271bf4d8baa58b408
[ "BSD-3-Clause" ]
null
null
null
models/__init__.py
LeeLin2602/backend
c3968cf2c09f20823152daa271bf4d8baa58b408
[ "BSD-3-Clause" ]
null
null
null
#-*- encoding: UTF-8 -*- from .sql import MySQL from .ddns import DDNS
17.75
24
0.676056
11
71
4.363636
0.727273
0
0
0
0
0
0
0
0
0
0
0.016949
0.169014
71
4
25
17.75
0.79661
0.323944
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
69621724e7bf731c95055584838600b07febc5a3
524
py
Python
busqueda_binaria.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
busqueda_binaria.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
busqueda_binaria.py
SebaB29/Python
8fe7b375e200d2a629e3ef83a2356002621267a6
[ "MIT" ]
null
null
null
def _busqueda_binaria(lista, elemento, desde, hasta): if desde > hasta: return -1 medio = (hasta + desde) // 2 if lista[medio] == elemento: return medio if elemento < lista[medio]: return _busqueda_binaria(lista, elemento, desde, medio - 1) return _busqueda_binaria(lista, elemento, medio + 1, hasta) def busqueda_binaria(lista, elemento): return _busqueda_binaria(lista, elemento, 0, len(lista) - 1) lista = [1,2,3,4,5,6,7,89,9,8,5,5,2,1] print(busqueda_binaria(lista, 9))
32.75
67
0.664122
76
524
4.447368
0.302632
0.266272
0.35503
0.414201
0.514793
0
0
0
0
0
0
0.052758
0.204198
524
16
68
32.75
0.757794
0
0
0
0
0
0
0
0
0
0
0
0
1
0.153846
false
0
0
0.076923
0.538462
0.076923
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
696cc16e1986c060b5f63b39b83be3020fa2a08e
46
py
Python
dart_board/pop_synth/__init__.py
GSavathrakis/dart_board
9430d97675d69e381b701499587a02fd71b02990
[ "MIT" ]
8
2017-12-04T22:32:25.000Z
2021-10-01T11:45:09.000Z
dart_board/pop_synth/__init__.py
GSavathrakis/dart_board
9430d97675d69e381b701499587a02fd71b02990
[ "MIT" ]
2
2018-03-14T00:10:43.000Z
2021-05-02T18:51:11.000Z
dart_board/pop_synth/__init__.py
GSavathrakis/dart_board
9430d97675d69e381b701499587a02fd71b02990
[ "MIT" ]
2
2018-07-17T23:00:01.000Z
2021-08-25T15:46:38.000Z
__all__ = ["cosmic_wrapper"] from . import *
11.5
28
0.673913
5
46
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.173913
46
3
29
15.333333
0.684211
0
0
0
0
0
0.304348
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
15fc20933c87aa833e92a51a5bc387135b3d4d7a
145
py
Python
template_editor/apps.py
Kiritox0x/trp_assistant_bot
9776d3b6fc6ebccb5d6b8c0ea68c9b145dc4e06a
[ "MIT" ]
null
null
null
template_editor/apps.py
Kiritox0x/trp_assistant_bot
9776d3b6fc6ebccb5d6b8c0ea68c9b145dc4e06a
[ "MIT" ]
null
null
null
template_editor/apps.py
Kiritox0x/trp_assistant_bot
9776d3b6fc6ebccb5d6b8c0ea68c9b145dc4e06a
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.apps import AppConfig class TemplateEditorConfig(AppConfig): name = 'template_editor'
18.125
39
0.813793
16
145
7
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.137931
145
7
40
20.714286
0.896
0
0
0
0
0
0.103448
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
c638b90244c9378a38d22f1ec06784d45fc9c67f
161
py
Python
gunicorn_conf.py
yiwensong/yiwen.date
f400ce8b3ee4aa3490238826f7d6700685208ad7
[ "MIT" ]
null
null
null
gunicorn_conf.py
yiwensong/yiwen.date
f400ce8b3ee4aa3490238826f7d6700685208ad7
[ "MIT" ]
1
2018-02-10T19:13:44.000Z
2018-02-10T19:13:44.000Z
gunicorn_conf.py
yiwensong/yiwen.date
f400ce8b3ee4aa3490238826f7d6700685208ad7
[ "MIT" ]
null
null
null
bind = '0.0.0.0:443' workers = 4 reload = True keyfile = '/etc/keys/yiwen_dot_date/ssl/yiwen.date.key' certfile = '/etc/keys/yiwen_dot_date/ssl/yiwen.date.crt'
23
56
0.720497
30
161
3.733333
0.566667
0.053571
0.053571
0.267857
0.553571
0.553571
0.553571
0.553571
0
0
0
0.055172
0.099379
161
6
57
26.833333
0.717241
0
0
0
0
0
0.602484
0.534161
0
0
0
0
0
1
0
false
0
0
0
0
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
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c638fffb41c8bd00ad8b9656306b397d59cc0425
122
py
Python
pandas_utils.py
czbiohub/interns-2021-dataviz
aaff076b24855b1b55bc34be161e5f13eae73e62
[ "MIT" ]
2
2021-06-12T04:14:12.000Z
2021-06-15T17:08:01.000Z
pandas_utils.py
czbiohub/interns-2021-dataviz
aaff076b24855b1b55bc34be161e5f13eae73e62
[ "MIT" ]
null
null
null
pandas_utils.py
czbiohub/interns-2021-dataviz
aaff076b24855b1b55bc34be161e5f13eae73e62
[ "MIT" ]
1
2021-09-27T12:57:28.000Z
2021-09-27T12:57:28.000Z
import pandas as pd from IPython.display import display def describe(df): print(df.shape) display(df.head())
17.428571
35
0.696721
18
122
4.722222
0.722222
0
0
0
0
0
0
0
0
0
0
0
0.204918
122
7
36
17.428571
0.876289
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
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
1
0
1
0
0
4
c64bd039dc8cc945536226ef51e4e4cb6f59b5b1
173
py
Python
AmazonEdge/util.py
countstarlight/AmazonEdges
4f5aa08f1722a21a6704e0e94e7c45c9cb270ae7
[ "MIT" ]
7
2018-03-16T10:20:17.000Z
2020-10-21T19:27:53.000Z
AmazonEdge/util.py
countstarlight/AmazonEdges
4f5aa08f1722a21a6704e0e94e7c45c9cb270ae7
[ "MIT" ]
null
null
null
AmazonEdge/util.py
countstarlight/AmazonEdges
4f5aa08f1722a21a6704e0e94e7c45c9cb270ae7
[ "MIT" ]
1
2018-05-24T09:54:41.000Z
2018-05-24T09:54:41.000Z
# # Copyright (c) 2018 CountStarlight # Licensed under The MIT License (MIT) # See: LICENSE # def flatten_idx(position, size): (x, y) = position return x * size + y
19.222222
38
0.66474
24
173
4.75
0.75
0
0
0
0
0
0
0
0
0
0
0.02963
0.219653
173
8
39
21.625
0.814815
0.479769
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
c658c8e7f0d5a39221ea3d0b8a93835f67c77ffe
178
py
Python
Scripts/django-admin.py
phNam2/DjangoProject
27086a00795df583338521c140ac4b853ef5a821
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
phNam2/DjangoProject
27086a00795df583338521c140ac4b853ef5a821
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
phNam2/DjangoProject
27086a00795df583338521c140ac4b853ef5a821
[ "bzip2-1.0.6" ]
null
null
null
#!c:\indivi~1\job\current\hintel~1\django~2\django~1\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
29.666667
71
0.775281
27
178
4.703704
0.777778
0
0
0
0
0
0
0
0
0
0
0.02454
0.08427
178
5
72
35.6
0.754601
0.393258
0
0
0
0
0.074766
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
d6741ccdd99f78c970bf3d34b875290058534fc1
1,469
py
Python
wa/__init__.py
Rahlubenru/workload-automation
a526e4f2f3aaf47e7156e76dcc81d3806945a7f8
[ "Apache-2.0" ]
null
null
null
wa/__init__.py
Rahlubenru/workload-automation
a526e4f2f3aaf47e7156e76dcc81d3806945a7f8
[ "Apache-2.0" ]
null
null
null
wa/__init__.py
Rahlubenru/workload-automation
a526e4f2f3aaf47e7156e76dcc81d3806945a7f8
[ "Apache-2.0" ]
null
null
null
from wa.framework import pluginloader, signal from wa.framework.command import Command, ComplexCommand, SubCommand from wa.framework.configuration import settings from wa.framework.configuration.core import Status from wa.framework.exception import (CommandError, ConfigError, HostError, InstrumentError, JobError, NotFoundError, OutputProcessorError, PluginLoaderError, ResourceError, TargetError, TargetNotRespondingError, TimeoutError, ToolError, ValidationError, WAError, WorkloadError, WorkerThreadError) from wa.framework.instrument import (Instrument, very_slow, slow, normal, fast, very_fast) from wa.framework.output import RunOutput, discover_wa_outputs from wa.framework.output_processor import OutputProcessor from wa.framework.plugin import Plugin, Parameter from wa.framework.resource import (NO_ONE, JarFile, ApkFile, ReventFile, File, Executable) from wa.framework.target.descriptor import (TargetDescriptor, TargetDescription, create_target_description, add_description_for_target) from wa.framework.workload import (Workload, ApkWorkload, ApkUiautoWorkload, ApkReventWorkload, UIWorkload, UiautoWorkload, ReventWorkload)
66.772727
98
0.664398
124
1,469
7.782258
0.540323
0.074611
0.186529
0.058031
0
0
0
0
0
0
0
0
0.284547
1,469
21
99
69.952381
0.918173
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
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
0
1
0
1
0
1
0
0
4
d6a61c49f2f38f99f57b98967995c9c9cdfbf096
56
py
Python
docs/source/google/appengine/api/datastore_errors.py
tolsac/gae-rest-framework
0ac2a99f14f8204bf546b3aafd37ba953a247fe3
[ "MIT" ]
2
2018-08-01T13:14:08.000Z
2019-04-22T18:53:52.000Z
docs/source/google/appengine/api/datastore_errors.py
tolsac/restae
0ac2a99f14f8204bf546b3aafd37ba953a247fe3
[ "MIT" ]
null
null
null
docs/source/google/appengine/api/datastore_errors.py
tolsac/restae
0ac2a99f14f8204bf546b3aafd37ba953a247fe3
[ "MIT" ]
null
null
null
""" Mock """ class BadValueError(Exception): pass
7
31
0.625
5
56
7
1
0
0
0
0
0
0
0
0
0
0
0
0.214286
56
7
32
8
0.795455
0.071429
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
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
1
0
0
0
0
0
4
d6c58e63d3e5fa9927b2c7ce286c22390a07dd26
850
py
Python
tests/conftest.py
freethebee/voila
932c37c7082dc90373355f32625f44498e3fd03e
[ "BSD-3-Clause" ]
null
null
null
tests/conftest.py
freethebee/voila
932c37c7082dc90373355f32625f44498e3fd03e
[ "BSD-3-Clause" ]
null
null
null
tests/conftest.py
freethebee/voila
932c37c7082dc90373355f32625f44498e3fd03e
[ "BSD-3-Clause" ]
null
null
null
import os import pytest import voila.app BASE_DIR = os.path.dirname(__file__) class VoilaTest(voila.app.Voila): def listen(self): pass # the ioloop is taken care of by the pytest-tornado framework @pytest.fixture def voila_config(): return lambda app: None @pytest.fixture def voila_notebook(): return os.path.join(BASE_DIR, 'notebooks/print.ipynb') @pytest.fixture def voila_args_extra(): return [] @pytest.fixture def voila_args(voila_notebook, voila_args_extra): return [voila_notebook, '--VoilaApp.log_level=DEBUG'] + voila_args_extra @pytest.fixture def voila_app(voila_args, voila_config): voila_app = VoilaTest.instance() voila_app.initialize(voila_args) voila_config(voila_app) voila_app.start() return voila_app @pytest.fixture def app(voila_app): return voila_app.app
17.346939
76
0.736471
121
850
4.92562
0.363636
0.134228
0.161074
0.176175
0.177852
0.09396
0
0
0
0
0
0
0.165882
850
48
77
17.708333
0.840621
0.069412
0
0.206897
0
0
0.05972
0.05972
0
0
0
0
0
1
0.241379
false
0.034483
0.103448
0.172414
0.586207
0.034483
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
d6e69e71ee6211e48b1ec720ca3281e017588431
142
py
Python
meiduo_mall/system/score/models.py
Vent-Any/meiduo_mall_cangku
5b3b7f029be267cb5d2d3666f99be166d27213f1
[ "MIT" ]
null
null
null
meiduo_mall/system/score/models.py
Vent-Any/meiduo_mall_cangku
5b3b7f029be267cb5d2d3666f99be166d27213f1
[ "MIT" ]
null
null
null
meiduo_mall/system/score/models.py
Vent-Any/meiduo_mall_cangku
5b3b7f029be267cb5d2d3666f99be166d27213f1
[ "MIT" ]
null
null
null
from django.db import models # Create your models here. class UserScore(models.Model): total = models.PositiveIntegerField(default=0)
28.4
50
0.760563
18
142
6
0.833333
0
0
0
0
0
0
0
0
0
0
0.008333
0.15493
142
5
50
28.4
0.891667
0.169014
0
0
0
0
0
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
ba44b9c4d75c5afa974bf67b8606d4936c217947
102
py
Python
travelperk_python_api_types/trips/bookings/reference.py
namelivia/travelperk-python-api-types
d71cee9757938ed4189479c81e4f2ff1f73ca489
[ "MIT" ]
null
null
null
travelperk_python_api_types/trips/bookings/reference.py
namelivia/travelperk-python-api-types
d71cee9757938ed4189479c81e4f2ff1f73ca489
[ "MIT" ]
1
2021-09-03T04:20:35.000Z
2021-09-03T04:20:35.000Z
travelperk_python_api_types/trips/bookings/reference.py
namelivia/travelperk-python-api-types
d71cee9757938ed4189479c81e4f2ff1f73ca489
[ "MIT" ]
null
null
null
from pydantic.dataclasses import dataclass @dataclass class Reference: type: str value: str
12.75
42
0.745098
12
102
6.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.205882
102
7
43
14.571429
0.938272
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.2
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
1
0
0
0
1
0
0
4
ba463ea531f20a23d6f8b0217601af90a0493bba
52
py
Python
extras/editor/src/lib/graph/__init__.py
mccartnm/lutil
df6d8c2c6f4623414d78b6e9452d19e607c546e4
[ "MIT" ]
null
null
null
extras/editor/src/lib/graph/__init__.py
mccartnm/lutil
df6d8c2c6f4623414d78b6e9452d19e607c546e4
[ "MIT" ]
null
null
null
extras/editor/src/lib/graph/__init__.py
mccartnm/lutil
df6d8c2c6f4623414d78b6e9452d19e607c546e4
[ "MIT" ]
null
null
null
""" Classes relating to the machine state editor """
17.333333
44
0.730769
7
52
5.428571
1
0
0
0
0
0
0
0
0
0
0
0
0.153846
52
3
45
17.333333
0.863636
0.846154
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
ba5adeaddb29517c73cce43cef7e5ddf9c0dbe67
500
py
Python
fluid_handling.py
peterpolidoro/fluid_handling
e37d5ef6f1c56949b496dbc9ca7a21b0fc5fe960
[ "BSD-3-Clause" ]
null
null
null
fluid_handling.py
peterpolidoro/fluid_handling
e37d5ef6f1c56949b496dbc9ca7a21b0fc5fe960
[ "BSD-3-Clause" ]
null
null
null
fluid_handling.py
peterpolidoro/fluid_handling
e37d5ef6f1c56949b496dbc9ca7a21b0fc5fe960
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function,division from arduino_device import ArduinoDevice class FluidHandling(object): def __init__(self): self.dev = ArduinoDevice() def state1(self): self.dev.set_relays(17) def state2(self): self.dev.set_relays(18) def state3(self): self.dev.set_relays(20) def state4(self): self.dev.set_relays(24) def state5(self): self.dev.set_relays(0) def state6(self): self.dev.set_relays(32)
26.315789
46
0.658
68
500
4.602941
0.441176
0.178914
0.246006
0.268371
0.383387
0
0
0
0
0
0
0.044503
0.236
500
18
47
27.777778
0.774869
0
0
0
0
0
0
0
0
0
0
0
0
1
0.411765
false
0
0.117647
0
0.588235
0.058824
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
ba5df253bea1cb3622919fc017602b6480c9b863
173
py
Python
python_scripts/hello_world_2.py
aldanchenko/knime-ri-python-nodes-extension
1d17795c9988ff0a4c83970851e0f7dad3b870b3
[ "Apache-2.0" ]
1
2020-01-15T09:53:36.000Z
2020-01-15T09:53:36.000Z
python_scripts/hello_world_2.py
aldanchenko/knime-ri-python-nodes-extension
1d17795c9988ff0a4c83970851e0f7dad3b870b3
[ "Apache-2.0" ]
1
2019-12-02T21:20:57.000Z
2019-12-02T21:20:57.000Z
python_scripts/hello_world_2.py
aldanchenko/knime-ri-python-nodes-extension
1d17795c9988ff0a4c83970851e0f7dad3b870b3
[ "Apache-2.0" ]
1
2019-12-04T22:11:46.000Z
2019-12-04T22:11:46.000Z
print("Hello world script 1 Entert.") import pandas as pd print(input_table) output_table = input_table output_table['new_col'] = 1 print("Hello world script 1 Exit.")
14.416667
37
0.745665
28
173
4.428571
0.571429
0.16129
0.241935
0.33871
0.354839
0
0
0
0
0
0
0.020408
0.150289
173
11
38
15.727273
0.823129
0
0
0
0
0
0.352601
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.5
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
ba63c5225c71fefde2c2ffacf577ab80fc393180
79
py
Python
avgamah/modules/Events/__init__.py
thenishantsapkota/Avgamah
c7f1f9a69f8a3f4c4ea53b25dbf62e272750f76c
[ "MIT" ]
6
2021-11-03T06:37:33.000Z
2022-01-26T15:09:37.000Z
avgamah/modules/Events/__init__.py
thenishantsapkota/Avgamah
c7f1f9a69f8a3f4c4ea53b25dbf62e272750f76c
[ "MIT" ]
7
2021-11-03T14:58:38.000Z
2022-03-29T23:16:21.000Z
avgamah/modules/Events/__init__.py
thenishantsapkota/Avgamah
c7f1f9a69f8a3f4c4ea53b25dbf62e272750f76c
[ "MIT" ]
1
2021-08-31T08:04:51.000Z
2021-08-31T08:04:51.000Z
from avgamah.utils.permissions import Permissions permissions = Permissions()
19.75
49
0.835443
8
79
8.25
0.625
0.666667
0
0
0
0
0
0
0
0
0
0
0.101266
79
3
50
26.333333
0.929577
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
ba8fd567cbea6a17b0ccbd66091d76f740a5b3fa
737
py
Python
hoki/utils/hoki_dialogue.py
HeloiseS/hoki
31cecc4c4ee2bbb617e1451df1cab896f485d801
[ "BSD-3-Clause" ]
40
2019-09-18T13:04:09.000Z
2022-03-08T12:45:35.000Z
hoki/utils/hoki_dialogue.py
HeloiseS/hoki
31cecc4c4ee2bbb617e1451df1cab896f485d801
[ "BSD-3-Clause" ]
60
2019-10-26T01:11:52.000Z
2022-02-10T06:52:08.000Z
hoki/utils/hoki_dialogue.py
HeloiseS/hoki
31cecc4c4ee2bbb617e1451df1cab896f485d801
[ "BSD-3-Clause" ]
8
2020-03-04T23:35:01.000Z
2021-05-23T16:32:54.000Z
class HokiDialogue(object): def __init__(self): self.RED = '\u001b[31;1m' self.ORANGE = '\u001b[33;1m' self.GREEN = '\u001b[32;1m' self.BLUE = '\u001b[36;1m' self.ENDC = '\033[0m' self.BOLD = '\033[1m' self.UND = '\033[4m' self.BCKG='\u001b[46;1m' def info(self): return f'{self.GREEN}[---INFO---]{self.ENDC}' def running(self): return f'{self.ORANGE}[--RUNNING-]{self.ENDC}' def complete(self): return f'{self.BLUE}[-COMPLETE-]{self.ENDC}' def debugger(self): return f'{self.ORANGE}DEBUGGING ASSISTANT:{self.ENDC}' def error(self): return f'{self.RED}HOKI ERROR:{self.ENDC}' dialogue = HokiDialogue()
25.413793
62
0.563094
97
737
4.237113
0.360825
0.116788
0.13382
0.182482
0.10219
0
0
0
0
0
0
0.076225
0.252374
737
29
63
25.413793
0.669691
0
0
0
0
0
0.355014
0.200542
0
0
0
0
0
1
0.285714
false
0
0
0.238095
0.571429
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
ba919b02e911cf360e4902b1ec756fa938e4afdc
370
py
Python
src/test/python/agents/javaBot/javaBot.py
VirxEC/RLBot
b2d06110b0c8541a85605b6c00dcb898e7f35946
[ "MIT" ]
408
2018-02-16T17:55:53.000Z
2022-03-09T20:50:23.000Z
src/test/python/agents/javaBot/javaBot.py
VirxEC/RLBot
b2d06110b0c8541a85605b6c00dcb898e7f35946
[ "MIT" ]
280
2018-02-27T22:11:14.000Z
2022-03-28T21:39:05.000Z
src/test/python/agents/javaBot/javaBot.py
VirxEC/RLBot
b2d06110b0c8541a85605b6c00dcb898e7f35946
[ "MIT" ]
125
2018-02-19T19:26:33.000Z
2022-03-23T20:48:09.000Z
from rlbot.agents.executable_with_socket_agent import ExecutableWithSocketAgent class JavaBot(ExecutableWithSocketAgent): def get_port(self): return 24008 def build_add_command(self) -> str: # TODO: pull the RLBot port from somewhere instead of hard coding return f"addsocket\n{self.name}\n{self.team}\n{self.index}\nlocalhost\n23234"
33.636364
85
0.745946
49
370
5.510204
0.755102
0.055556
0
0
0
0
0
0
0
0
0
0.032573
0.17027
370
10
86
37
0.846906
0.17027
0
0
0
0.166667
0.219672
0.219672
0
0
0
0.1
0
1
0.333333
false
0
0.166667
0.333333
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
1
0
0
1
0
0
0
1
1
0
0
4
bae29c1a8d32159bcdefe076938246abad0bd5b4
83
py
Python
day10/django/app7/apps.py
Vanessa-kriby/Python
1fbef67852fb362712fc48fa5c3c29eac68fe202
[ "Apache-2.0" ]
null
null
null
day10/django/app7/apps.py
Vanessa-kriby/Python
1fbef67852fb362712fc48fa5c3c29eac68fe202
[ "Apache-2.0" ]
2
2019-01-22T10:53:42.000Z
2019-01-31T08:02:48.000Z
day10/django/app7/apps.py
Vanessa-kriby/Python
1fbef67852fb362712fc48fa5c3c29eac68fe202
[ "Apache-2.0" ]
13
2019-01-22T10:37:42.000Z
2019-01-25T13:30:43.000Z
from django.apps import AppConfig class App7Config(AppConfig): name = 'app7'
13.833333
33
0.73494
10
83
6.1
0.9
0
0
0
0
0
0
0
0
0
0
0.029412
0.180723
83
5
34
16.6
0.867647
0
0
0
0
0
0.048193
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
244f81e3e9d0bb1ccefd3c1692598aaadda98d1f
288
py
Python
support/tools.py
mbeckem/tiro
b3d729fce46243f25119767c412c6db234c2d938
[ "MIT" ]
10
2020-01-23T20:41:19.000Z
2021-12-28T20:24:44.000Z
support/tools.py
mbeckem/tiro
b3d729fce46243f25119767c412c6db234c2d938
[ "MIT" ]
22
2021-03-25T16:22:08.000Z
2022-03-17T12:50:38.000Z
support/tools.py
mbeckem/tiro
b3d729fce46243f25119767c412c6db234c2d938
[ "MIT" ]
null
null
null
import os import subprocess THIS_DIR = os.path.dirname(__file__) def run_clang_format(*filenames): subprocess.check_call(["clang-format", "-style=file", "-i", *filenames]) def run_cog(*filenames): subprocess.check_call(["cog", "-e", "-U", "-r", "-I", THIS_DIR, *filenames])
20.571429
80
0.673611
39
288
4.692308
0.538462
0.076503
0.262295
0.306011
0
0
0
0
0
0
0
0
0.125
288
13
81
22.153846
0.72619
0
0
0
0
0
0.125
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0
0.571429
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
24587a85a7ba799de862d7267fd6992311262f81
273
py
Python
Assignment Solution/Python_Module3-master/Module3_CaseStudy1_Q10_Ans.py
krdhakal/Edureka-HW-Solutions-of-Data-Science-for-Python-Certification
2332839d25cca3ee8036d6dda7360a3b31824d6b
[ "MIT" ]
null
null
null
Assignment Solution/Python_Module3-master/Module3_CaseStudy1_Q10_Ans.py
krdhakal/Edureka-HW-Solutions-of-Data-Science-for-Python-Certification
2332839d25cca3ee8036d6dda7360a3b31824d6b
[ "MIT" ]
null
null
null
Assignment Solution/Python_Module3-master/Module3_CaseStudy1_Q10_Ans.py
krdhakal/Edureka-HW-Solutions-of-Data-Science-for-Python-Certification
2332839d25cca3ee8036d6dda7360a3b31824d6b
[ "MIT" ]
null
null
null
# Write a program that accepts a comma separated sequence of words as input and prints the words in a comma-separated sequence # after sorting them alphabetically. words = [x for x in raw_input('Enter comma separated words:').split(',')] words.sort() print ','.join(words)
45.5
126
0.754579
43
273
4.767442
0.651163
0.204878
0.146341
0.22439
0
0
0
0
0
0
0
0
0.14652
273
6
127
45.5
0.879828
0.582418
0
0
0
0
0.267857
0
0
0
0
0
0
0
null
null
0
0
null
null
0.333333
0
0
0
null
1
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
1
0
0
0
0
0
0
0
0
4
0344bb95bbfec5432f68a7d069f4d290b5a9c90f
32,414
py
Python
dlkit/abstract_osid/locale/objects.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
2
2018-02-23T12:16:11.000Z
2020-10-08T17:54:24.000Z
dlkit/abstract_osid/locale/objects.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
87
2017-04-21T18:57:15.000Z
2021-12-13T19:43:57.000Z
dlkit/abstract_osid/locale/objects.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
1
2018-03-01T16:44:25.000Z
2018-03-01T16:44:25.000Z
"""Implementations of locale abstract base class objects.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' and include no methods. # pylint: disable=too-many-public-methods # Number of methods are defined in specification # pylint: disable=too-many-ancestors # Inheritance defined in specification # pylint: disable=too-many-arguments # Argument signature defined in specification. # pylint: disable=duplicate-code # All apparent duplicates have been inspected. They aren't. import abc class CalendarInfo: """This interface defines methods to examine a calendar. A calendar is organized into "years," "months," and "days." A calendar system may offer a diffreent designation for these divisions which may or may not vary in duration. """ __metaclass__ = abc.ABCMeta @abc.abstractmethod def get_calendar_type(self): """Gets the calendar type. :return: the calendar type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type calendar_type = property(fget=get_calendar_type) @abc.abstractmethod def get_display_name(self): """Gets the display name for this calendar. :return: the display name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText display_name = property(fget=get_display_name) @abc.abstractmethod def get_description(self): """Gets a description of this calendar. :return: the description :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText description = property(fget=get_description) @abc.abstractmethod def get_common_era_name(self): """Gets the string for the common era in which years are positive. :return: the common era label :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText common_era_name = property(fget=get_common_era_name) @abc.abstractmethod def get_common_era_abbrev(self): """Gets the abbreviation for the common era in which years are positive. :return: the common era label :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText common_era_abbrev = property(fget=get_common_era_abbrev) @abc.abstractmethod def get_before_common_era_name(self): """Gets the string for before the common era in which years are negative. :return: the before common era label :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText before_common_era_name = property(fget=get_before_common_era_name) @abc.abstractmethod def get_before_common_era_abbrev(self): """Gets the abbreviation for before the common era in which years are negative. :return: the before common era label :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText before_common_era_abbrev = property(fget=get_before_common_era_abbrev) @abc.abstractmethod def get_first_year_in_common_era(self): """Gets the year number for the first year. :return: the first year :rtype: ``integer`` *compliance: mandatory -- This method must be implemented.* """ return # integer first_year_in_common_era = property(fget=get_first_year_in_common_era) @abc.abstractmethod def get_last_year_before_common_era(self): """Gets the year number for the year before the common era. :return: the last bce year :rtype: ``integer`` *compliance: mandatory -- This method must be implemented.* """ return # integer last_year_before_common_era = property(fget=get_last_year_before_common_era) @abc.abstractmethod def get_year_name(self): """Gets the display name for a calendar "year. " :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText year_name = property(fget=get_year_name) @abc.abstractmethod def get_month_name(self): """Gets the display name for a calendar "month. " :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText month_name = property(fget=get_month_name) @abc.abstractmethod def has_variable_months(self): """Tests if this calendar has a variable number of months in a year. :return: ``true`` if the number of months varies, ``false`` if the number of months is constant :rtype: ``boolean`` *compliance: mandatory -- This method must be implemented.* """ return # boolean @abc.abstractmethod def get_num_months(self): """Gets the number of months of the year. For a variable month calendar, the number of all defined months are returned. If there are no "months" in this calendar system then this value may be zero. :return: the number of months :rtype: ``cardinal`` *compliance: mandatory -- This method must be implemented.* """ return # cardinal num_months = property(fget=get_num_months) @abc.abstractmethod def get_num_months_for_year(self, year): """Gets the number of months in the given year. :param year: a year :type year: ``integer`` :return: the number of months :rtype: ``cardinal`` :raise: ``IllegalState`` -- ``year`` is greater than ``get_last_year_before_common_era()`` and less then ``get_first_year_in_common_era()`` :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # cardinal @abc.abstractmethod def get_months(self): """Gets the months of the year in order of the calendar. For a variable month calendar, all defined months are returned. If there are no "months" in this calendar system then the list may be empty. :return: the months :rtype: ``osid.locale.CalendarUnit`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.CalendarUnit months = property(fget=get_months) @abc.abstractmethod def get_months_for_year(self, year): """Gets the months of the year in order of the calendar. :param year: a year :type year: ``integer`` :return: the months :rtype: ``osid.locale.CalendarUnit`` :raise: ``IllegalState`` -- ``year`` is greater than ``get_last_year_before_common_era()`` and less then ``get_first_year_in_common_era()`` :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.CalendarUnit @abc.abstractmethod def get_day_name(self): """Gets the display name for a calendar "day. " :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText day_name = property(fget=get_day_name) @abc.abstractmethod def has_variable_days(self): """Tests if this calendar has a variable number of days in a month. :return: ``true`` if the number of days per month varies, ``false`` if the number of days is constant :rtype: ``boolean`` *compliance: mandatory -- This method must be implemented.* """ return # boolean @abc.abstractmethod def get_num_days(self): """Gets the number of days in a year. For a variable day calendar, the number of all defined days are returned. If there are no "days" in this calendar system then this value may be zero. If there are no "months" defined then the number of days is the number of days in a year. :return: the number of days :rtype: ``cardinal`` *compliance: mandatory -- This method must be implemented.* """ return # cardinal num_days = property(fget=get_num_days) @abc.abstractmethod def get_num_days_for_month(self, year, month): """Gets the number of days in the given month. :param year: a year :type year: ``integer`` :param month: a ``DateTime`` month code :type month: ``cardinal`` :return: the number of days :rtype: ``cardinal`` :raise: ``IllegalState`` -- ``year`` is greater than ``get_last_year_before_common_era()`` and less then ``get_first_year_in_common_era()`` , or ``month`` is greater than ``get_months_for_year(year)`` :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # cardinal @abc.abstractmethod def get_days(self): """Gets the days of the month in order of the calendar. For a variable day calendar, all defined days are returned. If there are no "days" in this time system then this value may be zero. If there are no "months" defined then the number of days applies to the entire year. :return: the days :rtype: ``osid.locale.CalendarUnit`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.CalendarUnit days = property(fget=get_days) @abc.abstractmethod def get_days_for_month(self, year, month): """Gets the days of the given month in order of the calendar. :param year: a year :type year: ``integer`` :param month: a ``DateTime`` month code :type month: ``cardinal`` :return: the days :rtype: ``osid.locale.CalendarUnit`` :raise: ``IllegalState`` -- ``year`` is greater than ``get_last_year_before_common_era()`` and less then ``get_first_year_in_common_era()`` , or ``month`` is greater than or equal to than ``get_months_for_year(year)`` :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.CalendarUnit @abc.abstractmethod def get_first_day_of_year(self): """Gets the first day of the calendar year. :return: the first day of the year :rtype: ``osid.calendaring.DateTime`` *compliance: mandatory -- This method must be implemented.* """ return # osid.calendaring.DateTime first_day_of_year = property(fget=get_first_day_of_year) @abc.abstractmethod def get_end_of_days_name(self): """Gets the display name for the end of the calendar. :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText end_of_days_name = property(fget=get_end_of_days_name) @abc.abstractmethod def get_origin(self): """Gets the start of the "common era" for this calendar. :return: start of the calendar :rtype: ``osid.calendaring.DateTime`` *compliance: mandatory -- This method must be implemented.* """ return # osid.calendaring.DateTime origin = property(fget=get_origin) @abc.abstractmethod def get_end_of_days(self): """Gets the end of the world as specified by this calendar. :return: end of days :rtype: ``osid.calendaring.DateTime`` *compliance: mandatory -- This method must be implemented.* """ return # osid.calendaring.DateTime end_of_days = property(fget=get_end_of_days) @abc.abstractmethod def get_weekdays(self): """Gets the days of the week in order of the calendar. :return: the week days :rtype: ``osid.locale.CalendarUnit`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.CalendarUnit weekdays = property(fget=get_weekdays) class TimeInfo: """This interface defines methods to examine a time. Time is organized intro "hours," "minutes," and "seconds." A time system may offer a different designation for these divisions which may or may not vary in duration. """ __metaclass__ = abc.ABCMeta @abc.abstractmethod def get_time_type(self): """Gets the time type. :return: the time type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type time_type = property(fget=get_time_type) @abc.abstractmethod def get_display_name(self): """Gets the display name for this time system. :return: the display name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText display_name = property(fget=get_display_name) @abc.abstractmethod def get_display_label(self): """Gets a short label for this time system. :return: the label :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText display_label = property(fget=get_display_label) @abc.abstractmethod def get_description(self): """Gets a description of this time system. :return: the description :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText description = property(fget=get_description) @abc.abstractmethod def get_hour_name(self): """Gets the display name for "hours. " :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText hour_name = property(fget=get_hour_name) @abc.abstractmethod def get_hour_abbrev(self): """Gets the abbreviation for "hours. " :return: the abbreviation :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText hour_abbrev = property(fget=get_hour_abbrev) @abc.abstractmethod def get_hour_initial(self): """Gets the initial for "hours. " :return: the initial :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText hour_initial = property(fget=get_hour_initial) @abc.abstractmethod def has_variable_hours(self): """Tests if this time system has a variable number of hours in a day. :return: ``true`` if the number of hours per day varies, ``false`` if the number of hours per day is constant :rtype: ``boolean`` *compliance: mandatory -- This method must be implemented.* """ return # boolean @abc.abstractmethod def get_num_hours(self): """Gets the number of hours in a day. For a variable hour time system, the number of hours defined is returned. If there are no "hours" in this time system then this value may be zero. :return: the number of hours :rtype: ``cardinal`` *compliance: mandatory -- This method must be implemented.* """ return # cardinal num_hours = property(fget=get_num_hours) @abc.abstractmethod def get_num_hours_for_day(self, year, month, day): """Gets the number of hours for a given day. :param year: a year :type year: ``integer`` :param month: a ``DateTime`` month code :type month: ``cardinal`` :param day: a ``DateTime`` day code :type day: ``cardinal`` :return: the number of hours :rtype: ``cardinal`` :raise: ``IllegalState`` -- ``year`` is greater than ``CalendarInfo.getLastYearBeforeCommonEra()`` and less then ``CalendarInfo.getFirstYearInCommonEra()`` , or ``month`` is greater than or equal to ``CalendarInfo.getNumMonthsForYear(year)`` , or ``day`` is greater than or equal to ``CalendarInfo.getDaysInMonth(year, month)`` :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # cardinal @abc.abstractmethod def get_minute_name(self): """Gets the display name for "minutes. " :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText minute_name = property(fget=get_minute_name) @abc.abstractmethod def get_minute_abbrev(self): """Gets the abbreviation for "minutes. " :return: the abbreviation :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText minute_abbrev = property(fget=get_minute_abbrev) @abc.abstractmethod def get_minute_initial(self): """Gets the initial for "minutes. " :return: the initial :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText minute_initial = property(fget=get_minute_initial) @abc.abstractmethod def has_variable_minutes(self): """Tests if this time system has a variable number of minutes in an hour. :return: ``true`` if the number of minutes per hour varies, ``false`` if the number of minutes per hour is constant :rtype: ``boolean`` *compliance: mandatory -- This method must be implemented.* """ return # boolean @abc.abstractmethod def get_num_minutes(self): """Gets the number of minutes in an hour. For a variable minute time system, the number of minutes defined is returned. If there are no "minutes" in this time system then this value may be zero. If there are no "hours" defined then the number of minutes is the number of minutes in a day. :return: the number of minutes :rtype: ``cardinal`` *compliance: mandatory -- This method must be implemented.* """ return # cardinal num_minutes = property(fget=get_num_minutes) @abc.abstractmethod def get_num_minutes_for_hour(self, year, month, day, hour): """Gets the minutes for a given hour. :param year: a year :type year: ``integer`` :param month: a ``DateTime`` month code :type month: ``cardinal`` :param day: a ``DateTime`` day code :type day: ``cardinal`` :param hour: an hour :type hour: ``cardinal`` :return: the number of minutes :rtype: ``cardinal`` :raise: ``IllegalState`` -- ``year`` is greater than ``CalendarInfo.getLastYearBeforeCommonEra()`` and less then ``CalendarInfo.getFirstYearInCommonEra(),`` or ``month`` is greater than or equal to ``CalendarInfo.getNumMonthsForYear(year)`` , or ``day`` is greater than or equal to ``CalendarInfo.getDaysInMonth(year, month)`` , or ``hour`` is greater than or equal to ``get_num_hours_in_day(year, month, day)`` :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # cardinal @abc.abstractmethod def get_second_name(self): """Gets the display name for "seconds. " :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText second_name = property(fget=get_second_name) @abc.abstractmethod def get_second_abbrev(self): """Gets the abbreviation for "seconds. " :return: the abbreviation :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText second_abbrev = property(fget=get_second_abbrev) @abc.abstractmethod def get_second_initial(self): """Gets the initial for "seconds. " :return: the initial :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText second_initial = property(fget=get_second_initial) @abc.abstractmethod def has_variable_seconds(self): """Tests if this time system has a variable number of seconds in a minute. :return: ``true`` if the number of seconds per minute varies, ``false`` if the number of seconds per minute is constant :rtype: ``boolean`` *compliance: mandatory -- This method must be implemented.* """ return # boolean @abc.abstractmethod def get_num_seconds(self): """Gets the number of seconds in a minute. For a variable second time system, the number of seconds defined is returned. If there are no "seconds" in this time system then this value may be zero. If there are no "minutes" defined then the number of seconds is the number of seconds in an hour. :return: the number of seconds :rtype: ``cardinal`` *compliance: mandatory -- This method must be implemented.* """ return # cardinal num_seconds = property(fget=get_num_seconds) @abc.abstractmethod def get_num_seconds_for_minute(self, year, month, day, hour, minute): """Gets the seconds for a given minute. :param year: a year :type year: ``integer`` :param month: a ``DateTime`` month code :type month: ``cardinal`` :param day: a ``DateTime`` day code :type day: ``cardinal`` :param hour: an hour :type hour: ``cardinal`` :param minute: a minute :type minute: ``cardinal`` :return: the number of seconds :rtype: ``cardinal`` :raise: ``IllegalState`` -- ``year`` is greater than ``get_last_year_before_common_era()`` and less then ``get_first_year_in_common_era()`` , or ``month`` is greater than or equal to ``CalendarInfo.getNumMonthsForYear(year)`` , or ``day`` is greater than or equal to ``CalendarInfo.getDaysInMonth(year, month)`` , or ``hour`` is greater than or equal to ``get_num_hours_in_day(year, month, day)`` , or ``minute`` is greater than or equal to ``get_num_minutes_inhour(year, month, day, hour)`` :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # cardinal class CalendarUnit: """A description of a calendar unit.""" __metaclass__ = abc.ABCMeta @abc.abstractmethod def get_name(self): """Gets the full name of this unit. :return: the name :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText name = property(fget=get_name) @abc.abstractmethod def get_abbrev3(self): """Gets a 3-letter abbreviation for this unit. :return: the abbreviation :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText abbrev3 = property(fget=get_abbrev3) @abc.abstractmethod def get_abbrev2(self): """Gets a 2-letter abbreviation for this unit. :return: the abbreviation :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText abbrev2 = property(fget=get_abbrev2) @abc.abstractmethod def get_initial(self): """Gets a single letter abbreviation for this unit. :return: the initial :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText initial = property(fget=get_initial) @abc.abstractmethod def get_date_time_code(self): """Gets the number of this unit used in ``DateTime``. :return: the code :rtype: ``cardinal`` *compliance: mandatory -- This method must be implemented.* """ return # cardinal date_time_code = property(fget=get_date_time_code) @abc.abstractmethod def get_description(self): """Gets a description of this unit. :return: the description :rtype: ``osid.locale.DisplayText`` *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.DisplayText description = property(fget=get_description) class Locale: """A locale is a collection of types. ``Locale`` defines a set of types that together define the formatting, language, calendaring, and currency for a locale or culture. """ __metaclass__ = abc.ABCMeta @abc.abstractmethod def get_language_type(self): """Gets the language ``Type``. :return: the language type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type language_type = property(fget=get_language_type) @abc.abstractmethod def get_script_type(self): """Gets the script ``Type``. :return: the script type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type script_type = property(fget=get_script_type) @abc.abstractmethod def get_calendar_type(self): """Gets the calendar ``Type``. :return: the calendar type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type calendar_type = property(fget=get_calendar_type) @abc.abstractmethod def get_time_type(self): """Gets the time ``Type``. :return: the time type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type time_type = property(fget=get_time_type) @abc.abstractmethod def get_currency_type(self): """Gets the currency ``Type``. :return: the currency type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type currency_type = property(fget=get_currency_type) @abc.abstractmethod def get_unit_system_type(self): """Gets the unit system ``Type``. :return: the unit system type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type unit_system_type = property(fget=get_unit_system_type) @abc.abstractmethod def get_numeric_format_type(self): """Gets the numeric format ``Type``. :return: the numeric format type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type numeric_format_type = property(fget=get_numeric_format_type) @abc.abstractmethod def get_calendar_format_type(self): """Gets the calendar format ``Type``. :return: the calendar format type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type calendar_format_type = property(fget=get_calendar_format_type) @abc.abstractmethod def get_time_format_type(self): """Gets the time format ``Type``. :return: the time format type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type time_format_type = property(fget=get_time_format_type) @abc.abstractmethod def get_currency_format_type(self): """Gets the currency format ``Type``. :return: the currency format type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type currency_format_type = property(fget=get_currency_format_type) @abc.abstractmethod def get_coordinate_format_type(self): """Gets the coordinate format ``Type``. :return: the coordinate format type :rtype: ``osid.type.Type`` *compliance: mandatory -- This method must be implemented.* """ return # osid.type.Type coordinate_format_type = property(fget=get_coordinate_format_type) class LocaleList: """Like all ``OsidLists,`` ``LocaleList`` provides a means for accessing ``Locale`` elements sequentially either one at a time or many at a time. Examples: while (ll.hasNext()) { Locale locale = ll.getNextLocale(); } or while (ll.hasNext()) { Locale[] locales = ll.getNextLocales(ll.available()); } """ __metaclass__ = abc.ABCMeta @abc.abstractmethod def get_next_locale(self): """Gets the next ``Locale`` in this list. :return: the next ``Locale`` in this list. The ``has_next()`` method should be used to test that a next ``Locale`` is available before calling this method. :rtype: ``osid.locale.Locale`` :raise: ``IllegalState`` -- no more elements available in this list :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.Locale next_locale = property(fget=get_next_locale) @abc.abstractmethod def get_next_locales(self, n): """Gets the next set of ``Locale`` elements in this list. The specified amount must be less than or equal to the return from ``available()``. :param n: the number of ``Locale`` elements requested which must be less than or equal to ``available()`` :type n: ``cardinal`` :return: an array of ``Locale`` elements.The length of the array is less than or equal to the number specified. :rtype: ``osid.locale.Locale`` :raise: ``IllegalState`` -- no more elements available in this list :raise: ``OperationFailed`` -- unable to complete request *compliance: mandatory -- This method must be implemented.* """ return # osid.locale.Locale
27.586383
235
0.631641
3,848
32,414
5.205301
0.061071
0.020969
0.067898
0.098452
0.818872
0.744284
0.672292
0.609935
0.596355
0.584723
0
0.000337
0.268125
32,414
1,174
236
27.609881
0.843991
0.618868
0
0.588889
0
0
0
0
0
0
0
0
0
1
0.251852
false
0
0.003704
0
0.748148
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
cefd723791014d504011d96604c6bc78d9c7cf82
7,547
py
Python
aeskeyschedule/test_aeskeyschedule.py
fanosta/aeskeyschedule
33396a15813ec4c70cd4414a1df6ca0212145f2f
[ "MIT" ]
5
2019-06-14T19:00:54.000Z
2022-01-15T01:45:30.000Z
aeskeyschedule/test_aeskeyschedule.py
fanosta/aeskeyschedule
33396a15813ec4c70cd4414a1df6ca0212145f2f
[ "MIT" ]
null
null
null
aeskeyschedule/test_aeskeyschedule.py
fanosta/aeskeyschedule
33396a15813ec4c70cd4414a1df6ca0212145f2f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import pytest from .aeskeyschedule import key_schedule, reverse_key_schedule from binascii import unhexlify from typing import List test_vectors_128 = [ [ '00000000000000000000000000000000', '62636363626363636263636362636363', '9b9898c9f9fbfbaa9b9898c9f9fbfbaa', '90973450696ccffaf2f457330b0fac99', 'ee06da7b876a1581759e42b27e91ee2b', '7f2e2b88f8443e098dda7cbbf34b9290', 'ec614b851425758c99ff09376ab49ba7', '217517873550620bacaf6b3cc61bf09b', '0ef903333ba9613897060a04511dfa9f', 'b1d4d8e28a7db9da1d7bb3de4c664941', 'b4ef5bcb3e92e21123e951cf6f8f188e', ], [ 'ffffffffffffffffffffffffffffffff', 'e8e9e9e917161616e8e9e9e917161616', 'adaeae19bab8b80f525151e6454747f0', '090e2277b3b69a78e1e7cb9ea4a08c6e', 'e16abd3e52dc2746b33becd8179b60b6', 'e5baf3ceb766d488045d385013c658e6', '71d07db3c6b6a93bc2eb916bd12dc98d', 'e90d208d2fbb89b6ed5018dd3c7dd150', '96337366b988fad054d8e20d68a5335d', '8bf03f233278c5f366a027fe0e0514a3', 'd60a3588e472f07b82d2d7858cd7c326', ], [ '000102030405060708090a0b0c0d0e0f', 'd6aa74fdd2af72fadaa678f1d6ab76fe', 'b692cf0b643dbdf1be9bc5006830b3fe', 'b6ff744ed2c2c9bf6c590cbf0469bf41', '47f7f7bc95353e03f96c32bcfd058dfd', '3caaa3e8a99f9deb50f3af57adf622aa', '5e390f7df7a69296a7553dc10aa31f6b', '14f9701ae35fe28c440adf4d4ea9c026', '47438735a41c65b9e016baf4aebf7ad2', '549932d1f08557681093ed9cbe2c974e', '13111d7fe3944a17f307a78b4d2b30c5', ], [ '6920e299a5202a6d656e636869746f2a', 'fa8807605fa82d0d3ac64e6553b2214f', 'cf75838d90ddae80aa1be0e5f9a9c1aa', '180d2f1488d0819422cb6171db62a0db', 'baed96ad323d173910f67648cb94d693', '881b4ab2ba265d8baad02bc36144fd50', 'b34f195d096944d6a3b96f15c2fd9245', 'a7007778ae6933ae0dd05cbbcf2dcefe', 'ff8bccf251e2ff5c5c32a3e7931f6d19', '24b7182e7555e77229674495ba78298c', 'ae127cdadb479ba8f220df3d4858f6b1', ], ] test_vectors_192 = [ [ '00000000000000000000000000000000', '00000000000000006263636362636363', '62636363626363636263636362636363', '9b9898c9f9fbfbaa9b9898c9f9fbfbaa', '9b9898c9f9fbfbaa90973450696ccffa', 'f2f457330b0fac9990973450696ccffa', 'c81d19a9a171d65353858160588a2df9', 'c81d19a9a171d6537bebf49bda9a22c8', '891fa3a8d1958e51198897f8b8f941ab', 'c26896f718f2b43f91ed1797407899c6', '59f00e3ee1094f9583ecbc0f9b1e0830', '0af31fa74a8b8661137b885ff272c7ca', '432ac886d834c0b6d2c7df11984c5970', ], [ 'ffffffffffffffffffffffffffffffff', 'ffffffffffffffffe8e9e9e917161616', 'e8e9e9e917161616e8e9e9e917161616', 'adaeae19bab8b80f525151e6454747f0', 'adaeae19bab8b80fc5c2d8ed7f7a60e2', '2d2b3104686c76f4c5c2d8ed7f7a60e2', '1712403f686820dd454311d92d2f672d', 'e8edbfc09797df228f8cd3b7e7e4f36a', 'a2a7e2b38f88859e67653a5ef0f2e57c', '2655c33bc1b130516316d2e2ec9e577c', '8bfb6d227b09885e67919b1aa620ab4b', 'c53679a929a82ed5a25343f7d95acba9', '598e482fffaee3643a989acd1330b418', ], [ '000102030405060708090a0b0c0d0e0f', '10111213141516175846f2f95c43f4fe', '544afef55847f0fa4856e2e95c43f4fe', '40f949b31cbabd4d48f043b810b7b342', '58e151ab04a2a5557effb5416245080c', '2ab54bb43a02f8f662e3a95d66410c08', 'f501857297448d7ebdf1c6ca87f33e3c', 'e510976183519b6934157c9ea351f1e0', '1ea0372a995309167c439e77ff12051e', 'dd7e0e887e2fff68608fc842f9dcc154', '859f5f237a8d5a3dc0c02952beefd63a', 'de601e7827bcdf2ca223800fd8aeda32', 'a4970a331a78dc09c418c271e3a41d5d', ], ] test_vectors_256 = [ [ '00000000000000000000000000000000', '00000000000000000000000000000000', '62636363626363636263636362636363', 'aafbfbfbaafbfbfbaafbfbfbaafbfbfb', '6f6c6ccf0d0f0fac6f6c6ccf0d0f0fac', '7d8d8d6ad77676917d8d8d6ad7767691', '5354edc15e5be26d31378ea23c38810e', '968a81c141fcf7503c717a3aeb070cab', '9eaa8f28c0f16d45f1c6e3e7cdfe62e9', '2b312bdf6acddc8f56bca6b5bdbbaa1e', '6406fd52a4f79017553173f098cf1119', '6dbba90b0776758451cad331ec71792f', 'e7b0e89c4347788b16760b7b8eb91a62', '74ed0ba1739b7e252251ad14ce20d43b', '10f80a1753bf729c45c979e7cb706385', ], [ 'ffffffffffffffffffffffffffffffff', 'ffffffffffffffffffffffffffffffff', 'e8e9e9e917161616e8e9e9e917161616', '0fb8b8b8f04747470fb8b8b8f0474747', '4a4949655d5f5f73b5b6b69aa2a0a08c', '355858dcc51f1f9bcaa7a7233ae0e064', 'afa80ae5f2f755964741e30ce5e14380', 'eca0421129bf5d8ae318faa9d9f81acd', 'e60ab7d014fde24653bc014ab65d42ca', 'a2ec6e658b5333ef684bc946b1b3d38b', '9b6c8a188f91685edc2d69146a702bde', 'a0bd9f782beeac9743a565d1f216b65a', 'fc22349173b35ccfaf9e35dbc5ee1e05', '0695ed132d7b41846ede24559cc8920f', '546d424f27de1e8088402b5b4dae355e', ], [ '000102030405060708090a0b0c0d0e0f', '101112131415161718191a1b1c1d1e1f', 'a573c29fa176c498a97fce93a572c09c', '1651a8cd0244beda1a5da4c10640bade', 'ae87dff00ff11b68a68ed5fb03fc1567', '6de1f1486fa54f9275f8eb5373b8518d', 'c656827fc9a799176f294cec6cd5598b', '3de23a75524775e727bf9eb45407cf39', '0bdc905fc27b0948ad5245a4c1871c2f', '45f5a66017b2d387300d4d33640a820a', '7ccff71cbeb4fe5413e6bbf0d261a7df', 'f01afafee7a82979d7a5644ab3afe640', '2541fe719bf500258813bbd55a721c0a', '4e5a6699a9f24fe07e572baacdf8cdea', '24fc79ccbf0979e9371ac23c6d68de36', ], ] def unhex(l: List[str]) -> List[bytes]: return [unhexlify(x) for x in l] @pytest.mark.parametrize("testvector", test_vectors_128) def test_aes_128(testvector: List[str]) -> None: round_keys_ref = unhex(testvector) round_keys = key_schedule(round_keys_ref[0]) assert len(round_keys) == 11 assert len(round_keys) == len(round_keys_ref) for got, expected in zip(round_keys, round_keys_ref): assert got == expected @pytest.mark.parametrize("testvector", test_vectors_192) def test_aes_192(testvector: List[str]) -> None: round_keys_ref = unhex(testvector) round_keys = key_schedule(b"".join([round_keys_ref[0], round_keys_ref[1][:8]])) assert len(round_keys) == 13 assert len(round_keys) == len(round_keys_ref) for got, expected in zip(round_keys, round_keys_ref): assert got == expected @pytest.mark.parametrize("testvector", test_vectors_256) def test_aes_256(testvector: List[str]) -> None: round_keys_ref = unhex(testvector) round_keys = key_schedule(b"".join([round_keys_ref[0], round_keys_ref[1]])) assert len(round_keys) == 15 assert len(round_keys) == len(round_keys_ref) for got, expected in zip(round_keys, round_keys_ref): assert got == expected @pytest.mark.parametrize("testvector", test_vectors_128) def test_aes_128_reverse(testvector: List[str]) -> None: round_keys_ref = unhex(testvector) for round_num, rk in enumerate(round_keys_ref): base_key = reverse_key_schedule(rk, round_num) assert base_key == round_keys_ref[0]
36.458937
83
0.714059
393
7,547
13.506361
0.427481
0.049171
0.038433
0.020347
0.147702
0.147702
0.147702
0.147702
0.147702
0.138659
0
0.430782
0.203657
7,547
206
84
36.635922
0.452413
0.002783
0
0.242105
0
0
0.549635
0.544319
0
0
0
0
0.052632
1
0.026316
false
0
0.021053
0.005263
0.052632
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
303c34a2f842f897805b726a87e9d18f88b1cca3
89
py
Python
hiven/errors/base.py
Iapetus-11/hiven.py
15f4fdca222bd8b8d93f99b842363f107a618186
[ "MIT" ]
3
2021-08-25T01:41:03.000Z
2021-08-30T17:53:05.000Z
hiven/errors/base.py
Iapetus-11/hiven.py
15f4fdca222bd8b8d93f99b842363f107a618186
[ "MIT" ]
1
2021-08-30T15:35:57.000Z
2021-08-30T18:02:13.000Z
hiven/errors/base.py
Iapetus-11/hiven.py
15f4fdca222bd8b8d93f99b842363f107a618186
[ "MIT" ]
4
2021-08-25T16:37:44.000Z
2021-09-10T11:31:14.000Z
class HivenError(Exception): """Base class for all Hiven exceptions""" pass
17.8
46
0.651685
10
89
5.8
0.9
0
0
0
0
0
0
0
0
0
0
0
0.247191
89
4
47
22.25
0.865672
0.393258
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
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
1
0
0
0
0
0
4
303f5defdd86a5b59354bfb287ddcf3c9a003767
67
py
Python
app/grandchallenge/datasets/__init__.py
Tommos0/grand-challenge.org
187cd857f6a7c9651b7bda8c42c54801f071dd7c
[ "Apache-2.0" ]
null
null
null
app/grandchallenge/datasets/__init__.py
Tommos0/grand-challenge.org
187cd857f6a7c9651b7bda8c42c54801f071dd7c
[ "Apache-2.0" ]
null
null
null
app/grandchallenge/datasets/__init__.py
Tommos0/grand-challenge.org
187cd857f6a7c9651b7bda8c42c54801f071dd7c
[ "Apache-2.0" ]
null
null
null
default_app_config = "grandchallenge.datasets.apps.DatasetsConfig"
33.5
66
0.865672
7
67
8
1
0
0
0
0
0
0
0
0
0
0
0
0.044776
67
1
67
67
0.875
0
0
0
0
0
0.641791
0.641791
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3057cb31c4ba5ed74aac8bb90bb0c00c8985974d
5,635
py
Python
tests/defxmlschema/test_chapter15.py
nimish/xsdata
7afe2781b66982428cc1731f53c065086acd35c1
[ "MIT" ]
null
null
null
tests/defxmlschema/test_chapter15.py
nimish/xsdata
7afe2781b66982428cc1731f53c065086acd35c1
[ "MIT" ]
null
null
null
tests/defxmlschema/test_chapter15.py
nimish/xsdata
7afe2781b66982428cc1731f53c065086acd35c1
[ "MIT" ]
null
null
null
import os from pathlib import Path from click.testing import CliRunner from tests.conftest import load_class from tests.conftest import validate_bindings from xsdata import cli os.chdir(Path(__file__).parent.parent.parent) def test_integration(): schema = Path("tests/fixtures/defxmlschema/chapter15/chapter15.xsd") package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [str(schema), "--package", package]) if result.exception: raise result.exception clazz = load_class(result.output, "Shirt") validate_bindings(schema, clazz) def test_example1501(): schema = "tests/fixtures/defxmlschema/chapter15/example1501.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1502(): schema = "tests/fixtures/defxmlschema/chapter15/example1502.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1504(): schema = "tests/fixtures/defxmlschema/chapter15/example1504.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1505(): schema = "tests/fixtures/defxmlschema/chapter15/example1505.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1506(): schema = "tests/fixtures/defxmlschema/chapter15/example1506.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1507(): schema = "tests/fixtures/defxmlschema/chapter15/example1507.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1508(): schema = "tests/fixtures/defxmlschema/chapter15/example1508.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1509(): schema = "tests/fixtures/defxmlschema/chapter15/example1509.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1510(): schema = "tests/fixtures/defxmlschema/chapter15/example1510.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1511(): schema = "tests/fixtures/defxmlschema/chapter15/example1511.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1512(): schema = "tests/fixtures/defxmlschema/chapter15/example1512.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1514(): schema = "tests/fixtures/defxmlschema/chapter15/example1514.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1515(): schema = "tests/fixtures/defxmlschema/chapter15/example1515.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1516(): schema = "tests/fixtures/defxmlschema/chapter15/example1516.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example15171(): schema = "tests/fixtures/defxmlschema/chapter15/example15171.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example15172(): schema = "tests/fixtures/defxmlschema/chapter15/example15172.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception def test_example1518(): schema = "tests/fixtures/defxmlschema/chapter15/example1518.xsd" package = "tests.fixtures.defxmlschema.chapter15" runner = CliRunner() result = runner.invoke(cli, [schema, "--package", package]) if result.exception: raise result.exception
28.897436
72
0.70701
586
5,635
6.754266
0.093857
0.118242
0.227388
0.309247
0.823143
0.651339
0.651339
0.651339
0.651339
0.636938
0
0.045952
0.173558
5,635
194
73
29.046392
0.803951
0
0
0.659259
0
0
0.317125
0.287489
0
0
0
0
0
1
0.133333
false
0
0.044444
0
0.177778
0
0
0
0
null
0
1
1
1
0
0
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
3063c1e29bf251a9a614e284c13fea460467d1d9
3,056
py
Python
{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/plugin.py
coddingtonbear/cookiecutter-jirafs-plugin
a400c0bee935df7ee19766b04af0e57a655437fd
[ "MIT" ]
null
null
null
{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/plugin.py
coddingtonbear/cookiecutter-jirafs-plugin
a400c0bee935df7ee19766b04af0e57a655437fd
[ "MIT" ]
null
null
null
{{cookiecutter.app_name}}/{{cookiecutter.app_name}}/plugin.py
coddingtonbear/cookiecutter-jirafs-plugin
a400c0bee935df7ee19766b04af0e57a655437fd
[ "MIT" ]
null
null
null
from jirafs.plugin import ( # BlockElementMacroPlugin, # CommandPlugin, Plugin as GenericPlugin, # PluginOperationError, # PluginValidationError, # VoidElementMacroPlugin, ) # Note that the class you subclass matters: # # * For command plugins (for adding new jirafs commands): # class Plugin(CommandPlugin): # # * For macro plugins (for transforming text content) # * If you're making a block tag: # class Plugin(BlockElementMacroPlugin) # * If you're making a void tag: # class Plugin(VoidElementMacroPlugin) # # * For other plugins (for processing uploaded files, etc) # class Plugin(GenericPlugin) class Plugin(GenericPlugin): """ Converts Latex documents into PDFs when uploading to JIRA. """ # See http://jirafs.readthedocs.org/en/latest/writing_plugins.html for # detailed information about how to write your own plugin. # Set this to the minimum version you've tested your plugin with MIN_VERSION = '1.10.0' # Set this to the first major version that this might break in (note # that Jirafs follows semantic versioning). MAX_VERSION = '2.0.0' # If you're creating a macro, set `COMPONENT_NAME` to the name match # the name you'd like to use. # # COMPONENT_NAME = 'my-new-tag' def alter_file_upload(self, info): # Receives a single parameter `info` which is a 2-tuple of the # filename, and the file object. # # If you wanted to replace that file with another when uploading # to JIRA, you would return a *different* 2-tuple of a new filename # and a new file object to upload. This is used by `jirafs-latex`, # `jirafs-graphviz` and `jirafs-pandoc` to automatically transform # uploaded documents into other formats. See those repositories # for more information. # # Note that you will want to the filename mappings so we keep track # of the relationship between the file you're uploading and the file # stored on-disk by doing something like: # # metadata = self.get_metadata() # filename_map = metadata.get('filename_map', {}) # filename_map[new_filename] = filename # metadata['filename_map'] = filename_map # self.set_metadata(metadata) return info def execute_macro(self, data, **parameters): # This method is useful only if you're creating a macro plugin, # and when executed receives both the text content of the tag # (`data`) and any other arbitrary parameters as keyword arguments. # # Note that `data` will be `None` in `VoidElementMacroPlugin` # instances. # # This method should return text to replace your macro with # when writing the data to JIRA. return '' def validate(self): # Raise a `PluginValidationError` here if your plugin # needs to check the environment for various things before # being enabled. pass
37.728395
76
0.657723
388
3,056
5.139175
0.438144
0.027583
0.014042
0.013039
0.035105
0.021063
0
0
0
0
0
0.004032
0.269634
3,056
80
77
38.2
0.889337
0.757199
0
0
0
0
0.016224
0
0
0
0
0
0
1
0.25
false
0.083333
0.083333
0.166667
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
306406bc950d892ac1ba4881d00e248f8fa6ff51
200
py
Python
service_status/apps.py
mnowakowska/django-service-status
7ee2b38fa06d6dd051f6464ece7817d7b51d50df
[ "MIT" ]
2
2017-12-20T13:46:38.000Z
2019-12-09T11:35:54.000Z
service_status/apps.py
mnowakowska/django-service-status
7ee2b38fa06d6dd051f6464ece7817d7b51d50df
[ "MIT" ]
2
2019-10-14T13:29:30.000Z
2019-10-15T11:22:16.000Z
service_status/apps.py
mnowakowska/django-service-status
7ee2b38fa06d6dd051f6464ece7817d7b51d50df
[ "MIT" ]
2
2018-04-26T21:14:44.000Z
2019-10-14T09:08:06.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from django.apps import AppConfig class ServiceStatusConfig(AppConfig): name = 'service_status'
22.222222
72
0.775
23
200
6.391304
0.826087
0
0
0
0
0
0
0
0
0
0
0.00578
0.135
200
8
73
25
0.843931
0.105
0
0
0
0
0.079096
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
3067428f3a38d682ab042e72828cdc922e48e1e9
72
py
Python
tests/__init__.py
luphord/user_voting_rocks
a56a4fd4449cc185dc7c8cd7fc2ae206906d244f
[ "MIT" ]
2
2019-07-03T06:36:42.000Z
2019-07-16T20:00:06.000Z
tests/__init__.py
luphord/user_voting_rocks
a56a4fd4449cc185dc7c8cd7fc2ae206906d244f
[ "MIT" ]
null
null
null
tests/__init__.py
luphord/user_voting_rocks
a56a4fd4449cc185dc7c8cd7fc2ae206906d244f
[ "MIT" ]
1
2019-07-16T20:00:27.000Z
2019-07-16T20:00:27.000Z
# -*- coding: utf-8 -*- '''Unit test package for user_voting_rocks.'''
18
46
0.625
10
72
4.3
1
0
0
0
0
0
0
0
0
0
0
0.016393
0.152778
72
3
47
24
0.688525
0.875
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
306ef47ba8fd7635c120c076ed99c7ac2eae15b3
266
py
Python
templates_i18n/translation.py
PragmaticMates/django-templates-i18n
0dac1b8da498dc414d4836c1cf6cb82cb1597c26
[ "MIT" ]
3
2016-05-09T21:13:19.000Z
2016-05-09T21:14:18.000Z
templates_i18n/translation.py
PragmaticMates/django-templates-i18n
0dac1b8da498dc414d4836c1cf6cb82cb1597c26
[ "MIT" ]
null
null
null
templates_i18n/translation.py
PragmaticMates/django-templates-i18n
0dac1b8da498dc414d4836c1cf6cb82cb1597c26
[ "MIT" ]
null
null
null
from modeltranslation.translator import translator, TranslationOptions from templates_i18n.models import Template_i18n class TemplateTranslationOptions(TranslationOptions): fields = ('content', ) translator.register(Template_i18n, TemplateTranslationOptions)
29.555556
70
0.849624
23
266
9.695652
0.608696
0.107623
0
0
0
0
0
0
0
0
0
0.024793
0.090226
266
8
71
33.25
0.896694
0
0
0
0
0
0.026316
0
0
0
0
0
0
1
0
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
06486e729784c84d04872c710a65701318e961ef
93
py
Python
tests/conftest.py
con-f-use/xonsh
bff0794b68f0d9266d8d920f10170c982927ccf6
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/conftest.py
con-f-use/xonsh
bff0794b68f0d9266d8d920f10170c982927ccf6
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
tests/conftest.py
con-f-use/xonsh
bff0794b68f0d9266d8d920f10170c982927ccf6
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
# when xonsh is not installed in the current env # pytest_plugins = ("xonsh.pytest.plugin",)
31
48
0.741935
14
93
4.857143
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.150538
93
2
49
46.5
0.860759
0.946237
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
068146388ee889f72ecf9bea54403adbf9e82d63
52
py
Python
project/apps/django_backend_template/controllers/core/__init__.py
adosaa/Backend-django-app
3a7eb746ebc703e2cdbf1e4b2ac5703b3fedcd85
[ "MIT" ]
2
2020-11-04T21:47:48.000Z
2020-11-04T21:47:50.000Z
project/apps/django_backend_template/controllers/core/__init__.py
adosaa/Backend-Django-App
3a7eb746ebc703e2cdbf1e4b2ac5703b3fedcd85
[ "MIT" ]
null
null
null
project/apps/django_backend_template/controllers/core/__init__.py
adosaa/Backend-Django-App
3a7eb746ebc703e2cdbf1e4b2ac5703b3fedcd85
[ "MIT" ]
null
null
null
from .controller_template import ControllerTemplate
26
51
0.903846
5
52
9.2
1
0
0
0
0
0
0
0
0
0
0
0
0.076923
52
1
52
52
0.958333
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
069a93bfe18c05c0bba907c4c33bb35f595e9533
188
py
Python
jenkspy/__init__.py
maugomesqueiroz/jenkspy
72fde394a982d01af0ebbedf402334abcf8d93cf
[ "MIT" ]
147
2016-10-04T21:40:33.000Z
2022-03-30T06:08:50.000Z
jenkspy/__init__.py
yasirroni/jenkspy
bf7fc166f3a7a0727f4224c32051edec6ae89f99
[ "MIT" ]
22
2018-05-23T10:33:08.000Z
2021-12-18T21:55:32.000Z
jenkspy/__init__.py
yasirroni/jenkspy
bf7fc166f3a7a0727f4224c32051edec6ae89f99
[ "MIT" ]
26
2018-04-16T03:43:38.000Z
2022-01-28T07:02:27.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "0.2.0" from .core import jenks_breaks from .core import JenksNaturalBreaks __all__ = ['jenks_breaks', 'JenksNaturalBreaks']
18.8
48
0.712766
24
188
5.166667
0.708333
0.129032
0.225806
0
0
0
0
0
0
0
0
0.02454
0.132979
188
9
49
20.888889
0.736196
0.223404
0
0
0
0
0.243056
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
23147cf02e85b146859f3a577a736afa1e3a5edd
20
py
Python
WeatherApp/api/key.py
codePerfectPlus/Portfolio-Project
6385ca0582aa19261c883e53005854ebeb057143
[ "MIT" ]
45
2020-05-24T14:45:48.000Z
2020-09-08T20:35:30.000Z
WeatherApp/api/key.py
codePerfectPlus/machine-learning-web-applications
6385ca0582aa19261c883e53005854ebeb057143
[ "MIT" ]
9
2021-03-30T13:52:00.000Z
2021-09-22T19:22:46.000Z
WeatherApp/api/key.py
codePerfectPlus/Portfolio-Project
6385ca0582aa19261c883e53005854ebeb057143
[ "MIT" ]
12
2020-05-24T13:21:23.000Z
2020-08-08T20:11:51.000Z
api_key = "api_key"
10
19
0.7
4
20
3
0.5
1
0
0
0
0
0
0
0
0
0
0
0.15
20
1
20
20
0.705882
0
0
0
0
0
0.35
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
2322d049fd61f5616d4cd5b14113b652cac7219d
235
py
Python
trainbooking/trains/serializers.py
GowthamKumar1626/TRAIN-BOOKING-SYSTEM-DJANGO
859c913ac433e3e51b3d454c778807e19ede2195
[ "MIT" ]
1
2021-12-11T11:04:12.000Z
2021-12-11T11:04:12.000Z
trainbooking/trains/serializers.py
GowthamKumar1626/TRAIN-BOOKING-SYSTEM-DJANGO
859c913ac433e3e51b3d454c778807e19ede2195
[ "MIT" ]
null
null
null
trainbooking/trains/serializers.py
GowthamKumar1626/TRAIN-BOOKING-SYSTEM-DJANGO
859c913ac433e3e51b3d454c778807e19ede2195
[ "MIT" ]
null
null
null
from django.db.models import fields from rest_framework import serializers from trains.models import Trains class TrainSerializer(serializers.ModelSerializer): class Meta: model = Trains fields = "__all__"
26.111111
52
0.731915
26
235
6.423077
0.615385
0.143713
0
0
0
0
0
0
0
0
0
0
0.217021
235
8
53
29.375
0.907609
0
0
0
0
0
0.030837
0
0
0
0
0
0
1
0
false
0
0.428571
0
0.714286
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