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
bf14ce2e4fb18cad227c9c5560c6adb24cf2a870
9,279
py
Python
uncertainty_baselines/models/resnet50.py
gmum/uncertainty-baselines
1118f7d9c084282e12eb0959dfe0ca12eb3d2388
[ "Apache-2.0" ]
2
2022-02-22T10:22:46.000Z
2022-03-09T09:22:41.000Z
uncertainty_baselines/models/resnet50.py
PGM-Lab/2022-AISTATS-diversity
63df2e5f29cdaefe49626439bbe13289f37eed36
[ "Apache-2.0" ]
null
null
null
uncertainty_baselines/models/resnet50.py
PGM-Lab/2022-AISTATS-diversity
63df2e5f29cdaefe49626439bbe13289f37eed36
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2020 The Uncertainty Baselines Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Lint as: python3 """ResNet50 Keras model for ImageNet.""" from typing import Any, Dict, Tuple import tensorflow as tf def _identity_block( input_tensor: tf.Tensor, kernel_size: int, filters: Tuple[int, int, int], stage: int, block: str, batch_norm_momentum: float, batch_norm_epsilon: float) -> tf.Tensor: """The identity block is the block that has no conv layer at shortcut. Args: input_tensor: input tensor kernel_size: default 3, the kernel size of middle conv layer at main path. filters: list of integers, the filters of 3 conv layer at main path. stage: integer, current stage label, used for generating layer names. block: 'a','b'..., current block label, used for generating layer names. batch_norm_momentum: the batch normalization EMA momentum. batch_norm_epsilon: the batch normalization epsilon. Returns: Output tensor for the block. """ filters1, filters2, filters3 = filters # TODO(znado): support NCHW data_format. bn_axis = 3 conv_name_base = 'res' + str(stage) + block + '_branch' bn_name_base = 'bn' + str(stage) + block + '_branch' x = tf.keras.layers.Conv2D( filters1, (1, 1), use_bias=False, kernel_initializer='he_normal', name=conv_name_base + '2a')(input_tensor) x = tf.keras.layers.BatchNormalization( axis=bn_axis, name=bn_name_base + '2a', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(x) x = tf.keras.layers.Activation('relu')(x) x = tf.keras.layers.Conv2D( filters2, kernel_size, use_bias=False, padding='same', kernel_initializer='he_normal', name=conv_name_base + '2b')(x) x = tf.keras.layers.BatchNormalization( axis=bn_axis, name=bn_name_base + '2b', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(x) x = tf.keras.layers.Activation('relu')(x) x = tf.keras.layers.Conv2D( filters3, (1, 1), use_bias=False, kernel_initializer='he_normal', name=conv_name_base + '2c')(x) x = tf.keras.layers.BatchNormalization( axis=bn_axis, name=bn_name_base + '2c', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(x) x = tf.keras.layers.add([x, input_tensor]) x = tf.keras.layers.Activation('relu')(x) return x def _conv_block( input_tensor: tf.Tensor, kernel_size: int, filters: Tuple[int, int, int], stage: int, block: str, strides: Tuple[int, int] = (2, 2), batch_norm_momentum: float = 0.9, batch_norm_epsilon: float = 1e-5) -> tf.Tensor: """A block that has a conv layer at shortcut. Note that from stage 3, the second conv layer at main path is with strides=(2, 2) and the shortcut should have strides=(2, 2) as well. Args: input_tensor: input tensor kernel_size: the kernel size of middle conv layer at main path filters: list of integers, the filters of 3 conv layer at main path stage: integer, current stage label, used for generating layer names block: 'a','b'..., current block label, used for generating layer names strides: Strides for the second conv layer in the block. batch_norm_momentum: the batch normalization EMA momentum. batch_norm_epsilon: the batch normalization epsilon. Returns: Output tensor for the block. """ filters1, filters2, filters3 = filters # TODO(znado): support NCHW data_format. bn_axis = 3 conv_name_base = 'res' + str(stage) + block + '_branch' bn_name_base = 'bn' + str(stage) + block + '_branch' x = tf.keras.layers.Conv2D( filters1, (1, 1), use_bias=False, kernel_initializer='he_normal', name=conv_name_base + '2a')(input_tensor) x = tf.keras.layers.BatchNormalization( axis=bn_axis, name=bn_name_base + '2a', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(x) x = tf.keras.layers.Activation('relu')(x) x = tf.keras.layers.Conv2D( filters2, kernel_size, strides=strides, padding='same', use_bias=False, kernel_initializer='he_normal', name=conv_name_base + '2b')(x) x = tf.keras.layers.BatchNormalization( axis=bn_axis, name=bn_name_base + '2b', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(x) x = tf.keras.layers.Activation('relu')(x) x = tf.keras.layers.Conv2D( filters3, (1, 1), use_bias=False, kernel_initializer='he_normal', name=conv_name_base + '2c')(x) x = tf.keras.layers.BatchNormalization( axis=bn_axis, name=bn_name_base + '2c', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(x) shortcut = tf.keras.layers.Conv2D( filters3, (1, 1), use_bias=False, strides=strides, kernel_initializer='he_normal', name=conv_name_base + '1')(input_tensor) shortcut = tf.keras.layers.BatchNormalization( axis=bn_axis, name=bn_name_base + '1', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(shortcut) x = tf.keras.layers.add([x, shortcut]) x = tf.keras.layers.Activation('relu')(x) return x def create_model( batch_size: int, batch_norm_momentum: float = 0.9, batch_norm_epsilon: float = 1e-5, **unused_kwargs: Dict[str, Any]) -> tf.keras.Model: """Instantiates the ResNet50 architecture. Args: batch_size: int value of the static per_replica batch size. batch_norm_momentum: the batch normalization EMA momentum. batch_norm_epsilon: the batch normalization epsilon. Returns: A Keras model instance that returns the logits for the model. """ # TODO(znado): support NCHW data format. bn_axis = 3 input_layer = tf.keras.layers.Input( shape=(224, 224, 3), batch_size=batch_size) x = tf.keras.layers.ZeroPadding2D( padding=(3, 3), name='conv1_pad')(input_layer) x = tf.keras.layers.Conv2D( 64, (7, 7), use_bias=False, strides=(2, 2), padding='valid', kernel_initializer='he_normal', name='conv1')(x) x = tf.keras.layers.BatchNormalization( axis=bn_axis, name='bn_conv1', momentum=batch_norm_momentum, epsilon=batch_norm_epsilon)(x) x = tf.keras.layers.Activation('relu')(x) x = tf.keras.layers.MaxPooling2D((3, 3), strides=(2, 2), padding='same')(x) x = _conv_block( x, kernel_size=3, filters=(64, 64, 256), stage=2, block='a', strides=(1, 1), batch_norm_momentum=batch_norm_momentum, batch_norm_epsilon=batch_norm_epsilon) x = _identity_block( x, 3, (64, 64, 256), 2, 'b', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (64, 64, 256), 2, 'c', batch_norm_momentum, batch_norm_epsilon) x = _conv_block( x, kernel_size=3, filters=(128, 128, 512), stage=3, block='a', batch_norm_momentum=batch_norm_momentum, batch_norm_epsilon=batch_norm_epsilon) x = _identity_block( x, 3, (128, 128, 512), 3, 'b', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (128, 128, 512), 3, 'c', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (128, 128, 512), 3, 'd', batch_norm_momentum, batch_norm_epsilon) x = _conv_block( x, kernel_size=3, filters=(256, 256, 1024), stage=4, block='a', batch_norm_momentum=batch_norm_momentum, batch_norm_epsilon=batch_norm_epsilon) x = _identity_block( x, 3, (256, 256, 1024), 4, 'b', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (256, 256, 1024), 4, 'c', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (256, 256, 1024), 4, 'd', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (256, 256, 1024), 4, 'e', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (256, 256, 1024), 4, 'f', batch_norm_momentum, batch_norm_epsilon) x = _conv_block( x, kernel_size=3, filters=(512, 512, 2048), stage=5, block='a', batch_norm_momentum=batch_norm_momentum, batch_norm_epsilon=batch_norm_epsilon) x = _identity_block( x, 3, (512, 512, 2048), 5, 'b', batch_norm_momentum, batch_norm_epsilon) x = _identity_block( x, 3, (512, 512, 2048), 5, 'c', batch_norm_momentum, batch_norm_epsilon) x = tf.keras.layers.GlobalAveragePooling2D(name='avg_pool')(x) x = tf.keras.layers.Dense( 1000, kernel_initializer=tf.keras.initializers.RandomNormal(stddev=0.01))(x) return tf.keras.Model(input_layer, x, name='resnet50')
31.886598
78
0.668283
1,322
9,279
4.478064
0.153555
0.103378
0.097635
0.063851
0.731926
0.715203
0.709628
0.697466
0.671115
0.664865
0
0.040511
0.215217
9,279
290
79
31.996552
0.772453
0.250458
0
0.723301
0
0
0.034307
0
0
0
0
0.010345
0
1
0.014563
false
0
0.009709
0
0.038835
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
5
172cc61c85cd36c5accddbd4ef6f43a2ab9c2d59
36
py
Python
multifunctional/handlers/equal_allocation.py
bsteubing/multifunctional
92c6e427374b151a8ea57c9be9e9245c717b9d46
[ "BSD-3-Clause" ]
1
2021-02-03T22:01:08.000Z
2021-02-03T22:01:08.000Z
multifunctional/handlers/equal_allocation.py
bsteubing/multifunctional
92c6e427374b151a8ea57c9be9e9245c717b9d46
[ "BSD-3-Clause" ]
null
null
null
multifunctional/handlers/equal_allocation.py
bsteubing/multifunctional
92c6e427374b151a8ea57c9be9e9245c717b9d46
[ "BSD-3-Clause" ]
null
null
null
def equal_allocation(act): pass
12
26
0.722222
5
36
5
1
0
0
0
0
0
0
0
0
0
0
0
0.194444
36
2
27
18
0.862069
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
5
1744d10a0498cb486a350483ab7d84bdd7e4eea7
445
py
Python
src/HERMES_1-concept_map_generation.py
delavet/SOworkspace
74bbcfa62c7e293b2b02f23249ac408aa22b44af
[ "MIT" ]
6
2020-12-31T06:13:56.000Z
2022-03-27T16:26:12.000Z
src/HERMES_1-concept_map_generation.py
delavet/SOworkspace
74bbcfa62c7e293b2b02f23249ac408aa22b44af
[ "MIT" ]
null
null
null
src/HERMES_1-concept_map_generation.py
delavet/SOworkspace
74bbcfa62c7e293b2b02f23249ac408aa22b44af
[ "MIT" ]
null
null
null
from util.concept_map import apidoc_concept_map_generator import networkx as nx from util.config import * import os ''' generate concept map for javadoc ''' def generate_concept_map_for_javadoc(): concept_map = apidoc_concept_map_generator.generate_concept_map('javadoc') print('generate complete!') nx.write_gexf(concept_map, LATEST_CONCEPT_MAP_PATH['javadoc']) if __name__ == "__main__": generate_concept_map_for_javadoc()
24.722222
78
0.791011
61
445
5.262295
0.409836
0.311526
0.224299
0.196262
0.261682
0
0
0
0
0
0
0
0.123596
445
17
79
26.176471
0.823077
0
0
0
1
0
0.098765
0
0
0
0
0
0
1
0.1
false
0
0.4
0
0.5
0.1
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
1745b03b4f4b2345becbbd451b022c50655e6dca
134
py
Python
shapenet/modeling/__init__.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
1,028
2020-01-23T23:30:54.000Z
2022-03-27T22:33:50.000Z
shapenet/modeling/__init__.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
103
2020-01-24T05:29:48.000Z
2022-03-08T13:04:24.000Z
shapenet/modeling/__init__.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
179
2020-01-24T08:14:30.000Z
2022-03-19T00:34:05.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from .heads import MeshLoss from .mesh_arch import build_model
33.5
70
0.798507
20
134
5.25
0.9
0
0
0
0
0
0
0
0
0
0
0
0.141791
134
3
71
44.666667
0.913043
0.507463
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
176622d3c9d2e541893e236e96aeb90c83b90904
468
py
Python
company/InfyTQ/Fundamentals/07SET/removeDuplicates.py
vikkastiwari/cpp-coding-questions
020790e1a3b26c7b24991427004730b3f0785c71
[ "MIT" ]
null
null
null
company/InfyTQ/Fundamentals/07SET/removeDuplicates.py
vikkastiwari/cpp-coding-questions
020790e1a3b26c7b24991427004730b3f0785c71
[ "MIT" ]
null
null
null
company/InfyTQ/Fundamentals/07SET/removeDuplicates.py
vikkastiwari/cpp-coding-questions
020790e1a3b26c7b24991427004730b3f0785c71
[ "MIT" ]
null
null
null
# def remove_duplicates(value): # # start writing your code here # distinct_val = [] # for i in set(value): # distinct_val.append(i) # return ("".join(distinct_val)) # print(remove_duplicates("11223445566666ababzzz@@@123#*#*")) from collections import OrderedDict def remove_duplicates(value): # start writing your code here return "".join(OrderedDict.fromkeys(value)) print(remove_duplicates("11223445566666ababzzz@@@123#*#*"))
23.4
61
0.690171
52
468
6.076923
0.5
0.202532
0.120253
0.151899
0.588608
0.303797
0.303797
0.303797
0.303797
0
0
0.087629
0.17094
468
19
62
24.631579
0.726804
0.561966
0
0
0
0
0.160622
0.160622
0
0
0
0.052632
0
1
0.25
false
0
0.25
0.25
0.75
0.25
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
1
1
0
0
5
17905202f34ac4c7129cc448e0325235c2111f93
184
py
Python
tests/end-to-end/test_visualization.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
235
2020-01-12T14:36:45.000Z
2022-03-26T16:53:44.000Z
tests/end-to-end/test_visualization.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
165
2020-01-09T16:28:25.000Z
2022-03-01T08:13:22.000Z
tests/end-to-end/test_visualization.py
yzR1991/Copulas
72c0d9c398f7fe3eb075b56591911fea377cdc33
[ "MIT" ]
60
2020-02-01T13:47:26.000Z
2022-03-15T06:18:24.000Z
from copulas.datasets import sample_trivariate_xyz from copulas.visualization import compare_3d def test_compare_3d(): data = sample_trivariate_xyz() compare_3d(data, data)
20.444444
50
0.798913
25
184
5.56
0.52
0.194245
0.273381
0
0
0
0
0
0
0
0
0.018987
0.141304
184
8
51
23
0.860759
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.6
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
1
0
0
5
1792cd954d50eeb49fb74232bf49846d7e41b294
97
py
Python
PARTE_1/EX026/cores_terminal.py
0Fernando0/CursoPython
1dcfdb6556e41c6dedcba2857aa4382b2f81aa59
[ "MIT" ]
null
null
null
PARTE_1/EX026/cores_terminal.py
0Fernando0/CursoPython
1dcfdb6556e41c6dedcba2857aa4382b2f81aa59
[ "MIT" ]
null
null
null
PARTE_1/EX026/cores_terminal.py
0Fernando0/CursoPython
1dcfdb6556e41c6dedcba2857aa4382b2f81aa59
[ "MIT" ]
null
null
null
print('\033[4;34molá, mundo!\033[m') a = 7 print(f'o número \033[31m{a}\033[m e sinal de sorte!')
32.333333
54
0.649485
22
97
2.863636
0.727273
0.126984
0
0
0
0
0
0
0
0
0
0.209302
0.113402
97
3
54
32.333333
0.523256
0
0
0
0
0
0.72449
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
17963930d50b768c34f3ce27c2817063d85a550e
65
py
Python
daft_builder/__init__.py
macks22/daft-builder
54e946d07ba730d29373d4448a5278569248d87e
[ "MIT" ]
1
2019-12-06T09:53:26.000Z
2019-12-06T09:53:26.000Z
daft_builder/__init__.py
macks22/daft-builder
54e946d07ba730d29373d4448a5278569248d87e
[ "MIT" ]
3
2019-08-02T11:48:05.000Z
2019-08-08T19:11:32.000Z
daft_builder/__init__.py
macks22/daft-builder
54e946d07ba730d29373d4448a5278569248d87e
[ "MIT" ]
null
null
null
from .pgm import PGM, Plate, Node, Data, Param, HyperParam, Text
32.5
64
0.738462
10
65
4.8
0.9
0
0
0
0
0
0
0
0
0
0
0
0.153846
65
1
65
65
0.872727
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
17a47cce1a66fd5ce59bc2e3d3c36a91c9631a68
102
py
Python
leetcode/python/551_student_attendance_record_i.py
VVKot/leetcode-solutions
7d6e599b223d89a7861929190be715d3b3604fa4
[ "MIT" ]
4
2019-04-22T11:57:36.000Z
2019-10-29T09:12:56.000Z
leetcode/python/551_student_attendance_record_i.py
VVKot/coding-competitions
7d6e599b223d89a7861929190be715d3b3604fa4
[ "MIT" ]
null
null
null
leetcode/python/551_student_attendance_record_i.py
VVKot/coding-competitions
7d6e599b223d89a7861929190be715d3b3604fa4
[ "MIT" ]
null
null
null
import re class Solution: def checkRecord(self, s): return not re.search('A.*A|LLL', s)
14.571429
43
0.617647
16
102
3.9375
0.8125
0
0
0
0
0
0
0
0
0
0
0
0.245098
102
6
44
17
0.818182
0
0
0
0
0
0.078431
0
0
0
0
0
0
1
0.25
false
0
0.25
0.25
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
bd96144237e6fa420de87dbc865db3e4318200d5
1,627
py
Python
tests/unit/test_puton.py
GzuPark/put_sunglasses_on_your_face
4d3eb85ca82b83bf80129f37a0170fce92b5c322
[ "MIT" ]
7
2020-01-10T09:53:29.000Z
2022-03-25T05:56:12.000Z
tests/unit/test_puton.py
GzuPark/put_sunglasses_on_your_face
4d3eb85ca82b83bf80129f37a0170fce92b5c322
[ "MIT" ]
3
2019-09-05T06:33:27.000Z
2019-09-06T04:17:01.000Z
tests/unit/test_puton.py
GzuPark/put_sunglasses_on_your_face
4d3eb85ca82b83bf80129f37a0170fce92b5c322
[ "MIT" ]
3
2020-01-10T14:08:11.000Z
2021-11-29T19:03:08.000Z
import os from main import PutOn def test_puton_saved_images(get_args): args = get_args puton = PutOn(args) puton.images() realpath = os.path.dirname(os.path.realpath(__file__)) src_path = os.path.abspath(os.path.join(realpath, "..", "..", "results")) dst_path = os.path.abspath(os.path.join(realpath, "..", "data")) sources = [] sources.append(os.path.join(src_path, "landmarks_center.jpg")) sources.append(os.path.join(src_path, "puton_center.jpg")) targets = [] targets.append(os.path.join(dst_path, "landmarks_center.jpg")) targets.append(os.path.join(dst_path, "puton_center.jpg")) for src, tar in zip(sources, targets): with open(src, "rb") as img: src_img = img.read() with open(tar, "rb") as img: tar_img = img.read() assert src_img == tar_img def test_puton_saved_quaternion_images(get_args): args = get_args args.landmarks = False args.quaternion = True puton = PutOn(args) puton.images() realpath = os.path.dirname(os.path.realpath(__file__)) src_path = os.path.abspath(os.path.join(realpath, "..", "..", "results")) dst_path = os.path.abspath(os.path.join(realpath, "..", "data")) sources = [] sources.append(os.path.join(src_path, "puton_soft_right.jpg")) targets = [] targets.append(os.path.join(dst_path, "puton_soft_right.jpg")) for src, tar in zip(sources, targets): with open(src, "rb") as img: src_img = img.read() with open(tar, "rb") as img: tar_img = img.read() assert src_img == tar_img
28.051724
77
0.629379
229
1,627
4.275109
0.187773
0.110317
0.102145
0.098059
0.841675
0.823289
0.774259
0.774259
0.692543
0.610827
0
0
0.215734
1,627
57
78
28.54386
0.767241
0
0
0.7
0
0
0.094653
0
0
0
0
0
0.05
1
0.05
false
0
0.05
0
0.1
0
0
0
0
null
0
0
0
1
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
5
bd9efed202ab1cdf57a9e99cb4e094ef6f38d0c0
70
py
Python
venv/Lib/site-packages/attrs/exceptions.py
gilbertekalea/booking.com_crawler
71e52c87cd72a77f80a3e5fc0af0e1a68a5712ae
[ "MIT" ]
16
2020-03-13T15:54:20.000Z
2020-06-04T08:10:03.000Z
venv/Lib/site-packages/attrs/exceptions.py
gilbertekalea/booking.com_crawler
71e52c87cd72a77f80a3e5fc0af0e1a68a5712ae
[ "MIT" ]
112
2021-09-27T14:39:02.000Z
2022-03-30T14:26:35.000Z
venv/Lib/site-packages/attrs/exceptions.py
gilbertekalea/booking.com_crawler
71e52c87cd72a77f80a3e5fc0af0e1a68a5712ae
[ "MIT" ]
15
2020-03-22T23:00:38.000Z
2020-06-11T17:01:33.000Z
# SPDX-License-Identifier: MIT from attr.exceptions import * # noqa
17.5
37
0.742857
9
70
5.777778
1
0
0
0
0
0
0
0
0
0
0
0
0.157143
70
3
38
23.333333
0.881356
0.471429
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
da3f9bc806e5431d9d71619859a78e79d7c4f698
164
py
Python
Codes/madlibgame.py
JojiJohnson/Python-Basics
0107cbf3b85cd73c57fa6474a5febb91cdae216c
[ "MIT" ]
null
null
null
Codes/madlibgame.py
JojiJohnson/Python-Basics
0107cbf3b85cd73c57fa6474a5febb91cdae216c
[ "MIT" ]
null
null
null
Codes/madlibgame.py
JojiJohnson/Python-Basics
0107cbf3b85cd73c57fa6474a5febb91cdae216c
[ "MIT" ]
null
null
null
name = input ("Enter your name: ") prof = input ("Enter your Profession: ") print ("God bless you " + name + ".") print ("You will be a great " + prof + "!")
27.333333
44
0.573171
22
164
4.272727
0.636364
0.212766
0.297872
0
0
0
0
0
0
0
0
0
0.243902
164
5
45
32.8
0.758065
0
0
0
0
0
0.481013
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
da4ec629288a7004e99e5234f7a71c8014a5ab0e
57
py
Python
jcfg/__init__.py
chkap/jcfg
4577e7aa87f45408ed14375f415d68ef3a05bc66
[ "MIT" ]
1
2020-04-04T07:35:44.000Z
2020-04-04T07:35:44.000Z
jcfg/__init__.py
chkap/jcfg
4577e7aa87f45408ed14375f415d68ef3a05bc66
[ "MIT" ]
null
null
null
jcfg/__init__.py
chkap/jcfg
4577e7aa87f45408ed14375f415d68ef3a05bc66
[ "MIT" ]
null
null
null
from .json_config import JsonCfg from .error import *
9.5
32
0.754386
8
57
5.25
0.75
0
0
0
0
0
0
0
0
0
0
0
0.192982
57
5
33
11.4
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e5111ae3c2929e02e98d8c6dedfe9e79fa8a5b72
69
py
Python
src/python/run.py
jakkaj/SSHFS_CheatSheet
a9d3a8eb8b03e86d4b275649c41fc7534f2ac810
[ "MIT" ]
null
null
null
src/python/run.py
jakkaj/SSHFS_CheatSheet
a9d3a8eb8b03e86d4b275649c41fc7534f2ac810
[ "MIT" ]
null
null
null
src/python/run.py
jakkaj/SSHFS_CheatSheet
a9d3a8eb8b03e86d4b275649c41fc7534f2ac810
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import cv2 print (cv2.__version__) print ("Hello")
17.25
23
0.73913
10
69
4.7
0.8
0
0
0
0
0
0
0
0
0
0
0.047619
0.086957
69
4
24
17.25
0.698413
0.246377
0
0
0
0
0.096154
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
e55d6b660f96d3eafefc34e847bb8b2717f680b7
65
py
Python
pmanagement/projects/models/__init__.py
Ferald89/projectmanagemen
88d96f2f59daca0029b69a60e69c0118dacc30ea
[ "MIT" ]
null
null
null
pmanagement/projects/models/__init__.py
Ferald89/projectmanagemen
88d96f2f59daca0029b69a60e69c0118dacc30ea
[ "MIT" ]
2
2020-06-15T17:13:04.000Z
2020-06-15T17:13:05.000Z
pmanagement/projects/models/__init__.py
Ferald89/projectmanagemen
88d96f2f59daca0029b69a60e69c0118dacc30ea
[ "MIT" ]
null
null
null
from .projects import Project from .memberships import Membership
32.5
35
0.861538
8
65
7
0.75
0
0
0
0
0
0
0
0
0
0
0
0.107692
65
2
35
32.5
0.965517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e565a3426a37d3d174f41c41c4d17591e6a614a0
89
py
Python
nrgmodbus/spidar/__init__.py
nrgpy/nrgmodbus
8932c527c30113933bba71c2f0f99e81966865ad
[ "MIT" ]
null
null
null
nrgmodbus/spidar/__init__.py
nrgpy/nrgmodbus
8932c527c30113933bba71c2f0f99e81966865ad
[ "MIT" ]
null
null
null
nrgmodbus/spidar/__init__.py
nrgpy/nrgmodbus
8932c527c30113933bba71c2f0f99e81966865ad
[ "MIT" ]
null
null
null
__name__ = "spidar" from .spidar import spidar_v1 from .registers import spidar_registers
29.666667
39
0.831461
12
89
5.666667
0.5
0.352941
0
0
0
0
0
0
0
0
0
0.012658
0.11236
89
3
39
29.666667
0.848101
0
0
0
0
0
0.066667
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
1
0
0
5
e5d8429cf773f4622496b9d46057f2adb32f167d
2,014
py
Python
tests/test_vector3d_class.py
furushei/vector3d-python
72d007da2bd3d4300232479d4ad2f5371278d357
[ "Unlicense" ]
null
null
null
tests/test_vector3d_class.py
furushei/vector3d-python
72d007da2bd3d4300232479d4ad2f5371278d357
[ "Unlicense" ]
null
null
null
tests/test_vector3d_class.py
furushei/vector3d-python
72d007da2bd3d4300232479d4ad2f5371278d357
[ "Unlicense" ]
null
null
null
import unittest from vector3d import Vector3D import math class TestVector3DClass(unittest.TestCase): def test_add(self): self.assertEqual(Vector3D(1, 2, 3) + Vector3D(4, 5, 6), Vector3D(5, 7, 9)) def test_sub(self): self.assertEqual(Vector3D(1, 2, 3) - Vector3D(4, 5, 6), Vector3D(-3, -3, -3)) def test_mul(self): self.assertEqual(Vector3D(1, 2, 3) * 1, Vector3D(1, 2, 3)) self.assertEqual(Vector3D(1, 2, 3) * 1.5, Vector3D(1.5, 3.0, 4.5)) def test_rmul(self): self.assertEqual(1 * Vector3D(1, 2, 3), Vector3D(1, 2, 3)) self.assertEqual(1.5 * Vector3D(1, 2, 3), Vector3D(1.5, 3.0, 4.5)) def test_mul_and_rmul(self): self.assertEqual(2 * Vector3D(1, 2, 3) * 3, Vector3D(6, 12, 18)) def test_truediv(self): self.assertEqual(Vector3D(1, 2, 3) / 2, Vector3D(0.5, 1.0, 1.5)) def test_floordiv(self): self.assertEqual(Vector3D(1, 2, 3) // 2, Vector3D(0, 1, 1)) def test_eq(self): self.assertTrue(Vector3D(1, 2, 3) == Vector3D(1, 2, 3)) self.assertFalse(Vector3D(1, 2, 3) == Vector3D(1, 2, 0)) self.assertFalse(Vector3D(1, 2, 3) == Vector3D(1, 0, 3)) self.assertFalse(Vector3D(1, 2, 3) == Vector3D(0, 2, 3)) def test_ne(self): self.assertTrue(Vector3D(1, 2, 3) != Vector3D(1, 2, 0)) self.assertTrue(Vector3D(1, 2, 3) != Vector3D(1, 0, 3)) self.assertTrue(Vector3D(1, 2, 3) != Vector3D(0, 2, 3)) self.assertFalse(Vector3D(1, 2, 3) != Vector3D(1, 2, 3)) def test_abs(self): self.assertAlmostEqual(abs(Vector3D(1, 2, 3)), 3.7416573867739413) self.assertEqual(abs(Vector3D(3, 4, 0)), 5) test_cases = [ (-4.5, 4, 3), (math.pi, math.e, -1), ] for x, y, z in test_cases: actual = abs(Vector3D(x, y, z)) excepted = math.sqrt(x * x + y * y + z * z) self.assertAlmostEqual(actual, excepted) if __name__ == '__main__': unittest.main()
33.566667
85
0.573982
310
2,014
3.658065
0.164516
0.222222
0.21164
0.213404
0.583774
0.561728
0.532628
0.472663
0.406526
0.291887
0
0.13289
0.252731
2,014
59
86
34.135593
0.620598
0
0
0
0
0
0.003974
0
0
0
0
0
0.465116
1
0.232558
false
0
0.069767
0
0.325581
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
1
0
0
0
0
0
0
0
5
e5f35b351c2ff79b4938b8198249e87c8ce82455
512
py
Python
password/db/database.py
cedricfarinazzo/password
a9dd52383519438cc38baf4653beeec8f9e45a2c
[ "MIT" ]
null
null
null
password/db/database.py
cedricfarinazzo/password
a9dd52383519438cc38baf4653beeec8f9e45a2c
[ "MIT" ]
null
null
null
password/db/database.py
cedricfarinazzo/password
a9dd52383519438cc38baf4653beeec8f9e45a2c
[ "MIT" ]
null
null
null
from .config import Config from .entry import Entry class Database: def __init__(self, conf): self.conf = conf self.__data = [] def register(self, account, master_key): pass def retrieve(self, account_id, master_key): pass def delete(self, account_id, master_key): pass def update(self, account_id, data, master_key): pass def list(self): pass def load(self, master_key): pass def save(self): pass
16.516129
51
0.59375
65
512
4.461538
0.353846
0.144828
0.224138
0.275862
0.2
0.2
0.2
0
0
0
0
0
0.320313
512
30
52
17.066667
0.833333
0
0
0.35
0
0
0
0
0
0
0
0
0
1
0.4
false
0.35
0.1
0
0.55
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
f92641c0a44bd6d7004c4cd5280a05da731cae94
7,677
py
Python
cogs/images.py
Nirlep5252/SynTech
955cf600800f0cf0f03e6b1932ac2923d6beb2bf
[ "MIT" ]
2
2021-12-12T03:17:10.000Z
2022-03-28T08:04:07.000Z
cogs/images.py
Nirlep5252/SynTech
955cf600800f0cf0f03e6b1932ac2923d6beb2bf
[ "MIT" ]
null
null
null
cogs/images.py
Nirlep5252/SynTech
955cf600800f0cf0f03e6b1932ac2923d6beb2bf
[ "MIT" ]
null
null
null
import logging import discord from discord.ext import commands from config import MAIN_COLOR import aiohttp import io class images(commands.Cog, description="This is where you can get images"): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_ready(self): logging.info('Images is ready') @commands.command() async def horny(self, ctx, member: discord.Member = None): member = member or ctx.author await ctx.trigger_typing() async with aiohttp.ClientSession() as session: async with session.get(f'https://some-random-api.ml/canvas/horny?avatar={member.avatar.replace(format="png")}') as af: if 300 > af.status >= 200: fp = io.BytesIO(await af.read()) file = discord.File(fp, "horny.png") em = discord.Embed( title="bonk", color=MAIN_COLOR, ) em.set_image(url="attachment://horny.png") await ctx.send(embed=em, file=file) else: await ctx.send('No horny :(') await session.close() @commands.command() async def gay(self, ctx, member: discord.Member = None): member = member or ctx.author await ctx.trigger_typing() async with aiohttp.ClientSession() as session: async with session.get(f'https://some-random-api.ml/canvas/gay?avatar={member.avatar.replace(format="png")}') as af: if 300 > af.status >= 200: fp = io.BytesIO(await af.read()) file = discord.File(fp, "gay.png") em = discord.Embed( title="He has came out", color=MAIN_COLOR, ) em.set_image(url="attachment://gay.png") await ctx.send(embed=em, file=file) else: await ctx.send('No gay :(') await session.close() @commands.command() async def jail(self, ctx, member: discord.Member = None): member = member or ctx.author await ctx.trigger_typing() async with aiohttp.ClientSession() as session: async with session.get(f'https://some-random-api.ml/canvas/jail?avatar={member.avatar.replace(format="png")}') as af: if 300 > af.status >= 200: fp = io.BytesIO(await af.read()) file = discord.File(fp, "jail.png") em = discord.Embed( title="He be in jail", color=MAIN_COLOR, ) em.set_image(url="attachment://jail.png") await ctx.send(embed=em, file=file) else: await ctx.send('No jial :(') await session.close() @commands.command() async def gun(self, ctx, member: discord.Member = None): member = member or ctx.author await ctx.trigger_typing() async with aiohttp.ClientSession() as session: async with session.get(f'https://api.monkedev.com/canvas/gun?imgUrl={member.avatar.replace(format="png")}') as af: if 300 > af.status >= 200: fp = io.BytesIO(await af.read()) file = discord.File(fp, "gun.png") em = discord.Embed( title="Get down he has a gun", color=MAIN_COLOR, ) em.set_image(url="attachment://gun.png") await ctx.send(embed=em, file=file) else: await ctx.send('No gun :(') await session.close() @commands.command() async def comment(self, ctx, *, text=None): if text is None: await ctx.send("You need to add text to this") else: async with aiohttp.ClientSession() as session: async with session.get(f'https://some-random-api.ml/canvas/youtube-comment?avatar={ctx.author.avatar.url}&username={ctx.author.name}&comment={text}') as af: if 300 > af.status >= 200: fp = io.BytesIO(await af.read()) file = discord.File(fp, "comment.png") em = discord.Embed( title="Comment", color=MAIN_COLOR, ) em.set_image(url="attachment://comment.png") await ctx.send(embed=em, file=file) @commands.command() async def message(self, ctx, member: discord.Member = None, *, text=None): member = member or ctx.author if text is None: await ctx.send("You need to add text to this") else: async with aiohttp.ClientSession() as session: async with session.get(f'https://api.monkedev.com/canvas/fakequote?imgUrl={member.avatar.url}&text={text}&username={member.name}') as af: if 300 > af.status >= 200: fp = io.BytesIO(await af.read()) file = discord.File(fp, "comment.png") em = discord.Embed( title="Comment", color=MAIN_COLOR, ) em.set_image(url="attachment://comment.png") await ctx.send(embed=em, file=file) @commands.command(aliases=['av']) async def avatar(self, ctx, member: discord.Member = None): member = member or ctx.author embed = discord.Embed(title=f"Avatar of {member.name}", color=MAIN_COLOR) embed.set_image(url=member.avatar.url) await ctx.send(embed=embed) @commands.command() async def pikachu(self, ctx): async with aiohttp.ClientSession() as session: request = await session.get('https://some-random-api.ml/img/pikachu') json = await request.json() embed = discord.Embed(title="Pika Pika!", color=MAIN_COLOR) embed.set_image(url=json['link']) await ctx.send(embed=embed) @commands.command() async def dog(self, ctx): async with aiohttp.ClientSession() as session: request = await session.get('https://some-random-api.ml/img/dog') json = await request.json() embed = discord.Embed(title="Woof Woof!", color=MAIN_COLOR) embed.set_image(url=json['link']) await ctx.send(embed=embed) @commands.command() async def cat(self, ctx): async with aiohttp.ClientSession() as session: request = await session.get('https://some-random-api.ml/img/cat') json = await request.json() embed = discord.Embed(title="Meow!", color=MAIN_COLOR) embed.set_image(url=json['link']) await ctx.send(embed=embed) @commands.command() async def panda(self, ctx): async with aiohttp.ClientSession() as session: request = await session.get('https://some-random-api.ml/img/panda') json = await request.json() embed = discord.Embed(title="Panda!", color=MAIN_COLOR) embed.set_image(url=json['link']) await ctx.send(embed=embed) def setup(bot): bot.add_cog(images(bot=bot))
43.619318
173
0.521688
872
7,677
4.555046
0.133028
0.042296
0.05136
0.04708
0.817221
0.806143
0.779708
0.731873
0.652316
0.640987
0
0.007338
0.360948
7,677
175
174
43.868571
0.802283
0
0
0.592357
0
0.038217
0.154759
0.01213
0
0
0
0
0
1
0.012739
false
0
0.038217
0
0.057325
0
0
0
0
null
0
0
0
1
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
5
0060e7e1b4a20eb5fb0f956634689508e774c769
105
py
Python
test.py
imurchie/python_extension
5284e6f82a496410287012ac21d00b0c27a2bb2d
[ "Apache-2.0" ]
1
2020-05-02T00:13:12.000Z
2020-05-02T00:13:12.000Z
test.py
imurchie/python_extension
5284e6f82a496410287012ac21d00b0c27a2bb2d
[ "Apache-2.0" ]
null
null
null
test.py
imurchie/python_extension
5284e6f82a496410287012ac21d00b0c27a2bb2d
[ "Apache-2.0" ]
null
null
null
import spam p1 = spam.Point(2, 3) p2 = spam.Point(4, 5) print p1 print p2 print spam.distance(p1, p2)
10.5
27
0.67619
21
105
3.380952
0.52381
0.253521
0
0
0
0
0
0
0
0
0
0.117647
0.190476
105
9
28
11.666667
0.717647
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.166667
null
null
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
1
0
0
0
0
0
0
1
0
5
0075cc799c503af5517806a811527936193f25cc
335
py
Python
book/tlpi_zhiye/utlib/ut_util.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
book/tlpi_zhiye/utlib/ut_util.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
null
null
null
book/tlpi_zhiye/utlib/ut_util.py
deevarvar/myLab
7a5019f5f7fc11e173d350e6e2a7d2c80504782d
[ "MIT" ]
3
2016-10-08T15:01:49.000Z
2018-05-24T03:14:24.000Z
__author__ = 'deevarvar' import string import random import os #generate a random string def string_generator(size=6, chars=string.ascii_letters+string.digits): return ''.join(random.choice(chars) for _ in range(size)) #emulate touch cmd def touchFile(fname, time=None): with open(fname, 'a'): os.utime(fname,time)
20.9375
71
0.728358
48
335
4.9375
0.666667
0.075949
0
0
0
0
0
0
0
0
0
0.003534
0.155224
335
15
72
22.333333
0.833922
0.122388
0
0
1
0
0.034247
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.111111
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
00c23b88bd1163522f9c14e781734fce25e720b2
225
py
Python
tests/cache/test_memory_backend.py
SandySalvatore/dogpile_cache_release
863b35becbf741bba89ddbf2700b7667298bf3d3
[ "BSD-3-Clause" ]
null
null
null
tests/cache/test_memory_backend.py
SandySalvatore/dogpile_cache_release
863b35becbf741bba89ddbf2700b7667298bf3d3
[ "BSD-3-Clause" ]
null
null
null
tests/cache/test_memory_backend.py
SandySalvatore/dogpile_cache_release
863b35becbf741bba89ddbf2700b7667298bf3d3
[ "BSD-3-Clause" ]
null
null
null
from ._fixtures import _GenericBackendTest class MemoryBackendTest(_GenericBackendTest): backend = "dogpile.cache.memory" class MemoryPickleBackendTest(_GenericBackendTest): backend = "dogpile.cache.memory_pickle"
25
51
0.813333
19
225
9.368421
0.631579
0.280899
0.359551
0.41573
0.483146
0
0
0
0
0
0
0
0.111111
225
8
52
28.125
0.89
0
0
0
0
0
0.208889
0.12
0
0
0
0
0
1
0
false
0
0.2
0
1
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
daab7dc81582642a67941023cf754d96752bbc19
484
py
Python
pystratis/core/tests/test_extpubkey.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
8
2021-06-30T20:44:22.000Z
2021-12-07T14:42:22.000Z
pystratis/core/tests/test_extpubkey.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
2
2021-07-01T11:50:18.000Z
2022-01-25T18:39:49.000Z
pystratis/core/tests/test_extpubkey.py
TjadenFroyda/pyStratis
9cc7620d7506637f8a2b84003d931eceb36ac5f2
[ "MIT" ]
4
2021-07-01T04:36:42.000Z
2021-09-17T10:54:19.000Z
from pystratis.core import ExtPubKey def test_extpubkey(generate_extpubkey): extpubkey = ExtPubKey(generate_extpubkey) assert str(extpubkey) == generate_extpubkey def test_bad_extpubkey_raises_error(generate_extpubkey): extpubkey = generate_extpubkey # Change part of the key so that it fails the checksum extpubkey = extpubkey[:10] + 'abcd' + extpubkey[14:] assert len(extpubkey) == len(generate_extpubkey) assert str(extpubkey) != generate_extpubkey
32.266667
58
0.764463
58
484
6.172414
0.465517
0.332402
0.363128
0.195531
0.290503
0.290503
0.290503
0
0
0
0
0.009828
0.159091
484
14
59
34.571429
0.869779
0.107438
0
0
1
0
0.009302
0
0
0
0
0
0.333333
1
0.222222
false
0
0.111111
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
5
dabd7479210d76b2d359d5f228ca53204fff3e4f
327
py
Python
modules/hashing/sha.py
Zami3l/cryptotools
8ed16f32ad528ed1826efffe61522d591e5e5941
[ "MIT" ]
null
null
null
modules/hashing/sha.py
Zami3l/cryptotools
8ed16f32ad528ed1826efffe61522d591e5e5941
[ "MIT" ]
null
null
null
modules/hashing/sha.py
Zami3l/cryptotools
8ed16f32ad528ed1826efffe61522d591e5e5941
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # coding : utf-8 import hashlib def sha1(plainText): return hashlib.sha1(plainText).hexdigest().encode('utf8') def sha256(plainText): return hashlib.sha256(plainText).hexdigest().encode('utf8') def sha512(plainText): return hashlib.sha512(plainText).hexdigest().encode('utf8')
19.235294
63
0.69419
38
327
5.973684
0.447368
0.198238
0.290749
0.370044
0.273128
0
0
0
0
0
0
0.068592
0.152905
327
16
64
20.4375
0.750903
0.097859
0
0
0
0
0.040956
0
0
0
0
0
0
1
0.428571
false
0
0.142857
0.428571
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
daccfd9582abdccbd7aabd7be19b5ea05a78a6f7
24
py
Python
Python/DrChuck/Introduction/py003.py
paddygit/hands-on
170a415aa03b22e18aa2e1b4dacdd091a7765867
[ "MIT" ]
null
null
null
Python/DrChuck/Introduction/py003.py
paddygit/hands-on
170a415aa03b22e18aa2e1b4dacdd091a7765867
[ "MIT" ]
null
null
null
Python/DrChuck/Introduction/py003.py
paddygit/hands-on
170a415aa03b22e18aa2e1b4dacdd091a7765867
[ "MIT" ]
1
2020-05-17T06:53:38.000Z
2020-05-17T06:53:38.000Z
x = 2 x = x+2 print(x)
4.8
8
0.458333
7
24
1.571429
0.428571
0.363636
0
0
0
0
0
0
0
0
0
0.125
0.333333
24
4
9
6
0.5625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
1
1
1
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
5
970817da5ddb1e99adb4f0cbe3d83bb7cf66c1fb
74
py
Python
py_tdlib/constructors/get_authorization_state.py
Mr-TelegramBot/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
24
2018-10-05T13:04:30.000Z
2020-05-12T08:45:34.000Z
py_tdlib/constructors/get_authorization_state.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
3
2019-06-26T07:20:20.000Z
2021-05-24T13:06:56.000Z
py_tdlib/constructors/get_authorization_state.py
MrMahdi313/python-tdlib
2e2d21a742ebcd439971a32357f2d0abd0ce61eb
[ "MIT" ]
5
2018-10-05T14:29:28.000Z
2020-08-11T15:04:10.000Z
from ..factory import Method class getAuthorizationState(Method): pass
12.333333
36
0.797297
8
74
7.375
0.875
0
0
0
0
0
0
0
0
0
0
0
0.135135
74
5
37
14.8
0.921875
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.333333
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
1
1
1
0
0
0
0
5
9730397cd176e3d9b0269e4f81198e757dceef13
144
py
Python
models/__init__.py
2KangHo/PyTorch-ImageClassification-TestBench
f8a974a30374879951a93840cba6caacc11430fd
[ "MIT" ]
1
2020-02-12T05:10:15.000Z
2020-02-12T05:10:15.000Z
models/__init__.py
2KangHo/PyTorch-ImageClassification-TestBench
f8a974a30374879951a93840cba6caacc11430fd
[ "MIT" ]
null
null
null
models/__init__.py
2KangHo/PyTorch-ImageClassification-TestBench
f8a974a30374879951a93840cba6caacc11430fd
[ "MIT" ]
null
null
null
from .mobilenet import mobilenet from .mobilenetv2 import mobilenetv2 from .shufflenet import shufflenet from .shufflenetv2 import shufflenetv2
28.8
38
0.861111
16
144
7.75
0.375
0
0
0
0
0
0
0
0
0
0
0.03125
0.111111
144
4
39
36
0.9375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
977bbaeeb40b251b25fea35fac410cd996e7250c
165
py
Python
test.py
nielsmadan/venom
87dee312fe8dbaa64fe29fba7a2ccd5f41a55b4a
[ "0BSD" ]
1
2022-01-26T04:57:28.000Z
2022-01-26T04:57:28.000Z
test.py
nielsmadan/venom
87dee312fe8dbaa64fe29fba7a2ccd5f41a55b4a
[ "0BSD" ]
null
null
null
test.py
nielsmadan/venom
87dee312fe8dbaa64fe29fba7a2ccd5f41a55b4a
[ "0BSD" ]
1
2021-08-19T08:11:58.000Z
2021-08-19T08:11:58.000Z
import sys import os import nose sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "autoload")) nose.main(argv=sys.argv + ["-w", "./test"])
20.625
85
0.70303
27
165
4.148148
0.555556
0.160714
0
0
0
0
0
0
0
0
0
0
0.084848
165
7
86
23.571429
0.741722
0
0
0
0
0
0.09697
0
0
0
0
0
0
1
0
true
0
0.6
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
97ca566e9b7dbff573501fd4ff2e5a5130bfb5ba
170
py
Python
App/apis.py
kogwang/Emails
6e54f2e03c107611fec986a672b47001086e1c7d
[ "Apache-2.0" ]
null
null
null
App/apis.py
kogwang/Emails
6e54f2e03c107611fec986a672b47001086e1c7d
[ "Apache-2.0" ]
null
null
null
App/apis.py
kogwang/Emails
6e54f2e03c107611fec986a672b47001086e1c7d
[ "Apache-2.0" ]
null
null
null
from flask_restful import Resource # 例: class Cat(Resource): def get(self): return {'message':'get'} def put(self): return {'message':'put'}
13.076923
34
0.588235
21
170
4.714286
0.666667
0.20202
0.343434
0
0
0
0
0
0
0
0
0
0.264706
170
12
35
14.166667
0.792
0.011765
0
0
0
0
0.122699
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
1
0
1
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
1
0
0
0
5
8af579a8b162dbc1a1011dd5abb9f1ba1af38b93
1,391
py
Python
maggport/exports.py
ccavales3/maggport
a68e27f7c2beea06bd8209146f342d06ae3a4893
[ "MIT" ]
null
null
null
maggport/exports.py
ccavales3/maggport
a68e27f7c2beea06bd8209146f342d06ae3a4893
[ "MIT" ]
null
null
null
maggport/exports.py
ccavales3/maggport
a68e27f7c2beea06bd8209146f342d06ae3a4893
[ "MIT" ]
null
null
null
""" Contains all parameter validations """ import json import pandas def export_csv(docs_list: list, out: str, header: bool) -> None: # type: ignore """ Export file to csv Args: docs (list): Queried docs from mongodb out (str): Output file """ # create empty DataFrame to store docs df_doc = pandas.DataFrame(columns=[]) # prepare result to be exported for doc in docs_list: series_obj = pandas.Series(doc) df_doc = df_doc.append(series_obj, ignore_index=True) df_doc.to_csv(out, sep=',', index=False, header=header) def export_json(**kwargs) -> None: # type: ignore """ Export file to json Args: docs (list): Queried docs from mongodb out (str): Output file """ with open(kwargs['out'], 'w') as outfile: json.dump(kwargs['docs_list'], outfile, indent=2) def export_txt(docs_list: list, out: str, header: bool) -> None: # type: ignore """ Export file to txt Args: docs (list): Queried docs from mongodb out (str): Output file """ # create empty DataFrame to store docs df_doc = pandas.DataFrame(columns=[]) # prepare result to be exported for doc in docs_list: series_obj = pandas.Series(doc) df_doc = df_doc.append(series_obj, ignore_index=True) df_doc.to_csv(out, index=False, header=header)
24.403509
80
0.629763
192
1,391
4.4375
0.291667
0.075117
0.037559
0.070423
0.746479
0.746479
0.715962
0.715962
0.715962
0.715962
0
0.000968
0.257369
1,391
56
81
24.839286
0.823814
0.357297
0
0.470588
0
0
0.017522
0
0
0
0
0
0
1
0.176471
false
0
0.117647
0
0.294118
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c188e7121128fca0f92698c3eec5dfb167512885
277
py
Python
Python/array.py
AbdulConsole/Hacktoberfest2019-2
b9619361b6cecf9b3e734972af3b0a03dba98d2e
[ "MIT" ]
1
2019-10-28T20:12:23.000Z
2019-10-28T20:12:23.000Z
Python/array.py
AbdulConsole/Hacktoberfest2019-2
b9619361b6cecf9b3e734972af3b0a03dba98d2e
[ "MIT" ]
null
null
null
Python/array.py
AbdulConsole/Hacktoberfest2019-2
b9619361b6cecf9b3e734972af3b0a03dba98d2e
[ "MIT" ]
1
2020-10-16T14:10:12.000Z
2020-10-16T14:10:12.000Z
import array as arr numbers_list = [2, 5, 62, 5, 42, 52, 48, 5] numbers_array = arr.array('i', numbers_list) print(numbers_array[2:5]) # 3rd to 5th print(numbers_array[:-5]) # beginning to 4th print(numbers_array[5:]) # 6th to end print(numbers_array[:]) # beginning to end
34.625
44
0.700361
49
277
3.816327
0.428571
0.320856
0.363636
0.192513
0
0
0
0
0
0
0
0.084746
0.148014
277
7
45
39.571429
0.707627
0.198556
0
0
0
0
0.004608
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.571429
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
c1a1ef8fe5c0691ee38a3b1ca0b6f35531868b03
40
py
Python
WSGIServer/exceptions.py
CakeBrewery/WSGIServer
574b8f2a13ab7d11cfd59c6486c34315abe3afa1
[ "MIT" ]
null
null
null
WSGIServer/exceptions.py
CakeBrewery/WSGIServer
574b8f2a13ab7d11cfd59c6486c34315abe3afa1
[ "MIT" ]
null
null
null
WSGIServer/exceptions.py
CakeBrewery/WSGIServer
574b8f2a13ab7d11cfd59c6486c34315abe3afa1
[ "MIT" ]
null
null
null
class CannotKeepUp(Exception): pass
13.333333
30
0.75
4
40
7.5
1
0
0
0
0
0
0
0
0
0
0
0
0.175
40
2
31
20
0.909091
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
c1bda62d454c26cae5bcc8b130797c65c3023d88
47
py
Python
python_use_module.py
alamedra/astr-119-session-2
d8e92723a085b124ebfe4c311efb98ccee751387
[ "MIT" ]
null
null
null
python_use_module.py
alamedra/astr-119-session-2
d8e92723a085b124ebfe4c311efb98ccee751387
[ "MIT" ]
null
null
null
python_use_module.py
alamedra/astr-119-session-2
d8e92723a085b124ebfe4c311efb98ccee751387
[ "MIT" ]
null
null
null
import test_module as tm tm.hello_world()
11.75
26
0.723404
8
47
4
0.875
0
0
0
0
0
0
0
0
0
0
0
0.212766
47
3
27
15.666667
0.864865
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
c1bec24785d1f381501b826243a8fe53601ff955
42
py
Python
garageofcode/main.py
tpi12jwe/garageofcode
3cfaf01f6d77130bb354887e6ed9921c791db849
[ "MIT" ]
2
2020-02-11T10:32:06.000Z
2020-02-11T17:00:47.000Z
garageofcode/main.py
tpi12jwe/garageofcode
3cfaf01f6d77130bb354887e6ed9921c791db849
[ "MIT" ]
null
null
null
garageofcode/main.py
tpi12jwe/garageofcode
3cfaf01f6d77130bb354887e6ed9921c791db849
[ "MIT" ]
null
null
null
from labyrinth.main import main main()
8.4
31
0.738095
6
42
5.166667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.190476
42
4
32
10.5
0.911765
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
de0237b8666c35180ca29fa84fd0b0f152a79ec3
270
py
Python
problems/c4subgraphiso/generator/main.py
Benezivas/algobattle-problems
b00b85413893bd1618001a4cdaa0dd7442f4e481
[ "MIT" ]
null
null
null
problems/c4subgraphiso/generator/main.py
Benezivas/algobattle-problems
b00b85413893bd1618001a4cdaa0dd7442f4e481
[ "MIT" ]
null
null
null
problems/c4subgraphiso/generator/main.py
Benezivas/algobattle-problems
b00b85413893bd1618001a4cdaa0dd7442f4e481
[ "MIT" ]
null
null
null
"""Simple dummy generator for the C4SubGraphIso problem, outputting a static instance.""" with open("output", "w") as output: output.write("s 1 2 3 4\n") output.write("e 4 1\n") output.write("e 1 2\n") output.write("e 2 3\n") output.write("e 3 4\n")
33.75
89
0.633333
49
270
3.489796
0.489796
0.321637
0.280702
0.304094
0
0
0
0
0
0
0
0.059908
0.196296
270
7
90
38.571429
0.728111
0.307407
0
0
0
0
0.254144
0
0
0
0
0
0
1
0
true
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
de0af6fefdcbd005523b9e45d8d172230ef68b61
6,564
py
Python
tests/sentry/api/endpoints/test_issues_resolved_in_release.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
1
2018-03-05T15:40:12.000Z
2018-03-05T15:40:12.000Z
tests/sentry/api/endpoints/test_issues_resolved_in_release.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
6
2018-10-19T10:04:23.000Z
2019-12-09T20:29:12.000Z
tests/sentry/api/endpoints/test_issues_resolved_in_release.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
1
2018-07-02T09:46:44.000Z
2018-07-02T09:46:44.000Z
from __future__ import absolute_import from django.core.urlresolvers import reverse import six from sentry.models import ( Commit, GroupLink, GroupResolution, ReleaseCommit, Repository, ) from sentry.testutils import APITestCase class IssuesResolvedInReleaseEndpointTest(APITestCase): def setUp(self): super(IssuesResolvedInReleaseEndpointTest, self).setUp() self.user = self.create_user() self.org = self.create_organization() self.team = self.create_team(organization=self.org) self.create_member(organization=self.org, user=self.user, teams=[self.team]) self.project = self.create_project( teams=[self.team], ) self.release = self.create_release( project=self.project, ) self.group = self.create_group(project=self.project) self.login_as(self.user) self.path = reverse( 'sentry-api-0-release-resolved', kwargs={ 'organization_slug': self.project.organization.slug, 'project_slug': self.project.slug, 'version': self.release.version, } ) def test_shows_issues_from_groupresolution(self): """ tests that the endpoint will correctly retrieve issues resolved in a release from the GroupResolution model """ GroupResolution.objects.create( group=self.group, release=self.release, type=GroupResolution.Type.in_release, ) response = self.client.get(self.path) assert response.status_code == 200, response.content assert len(response.data) == 1 assert response.data[0]['id'] == six.text_type(self.group.id) def test_shows_issues_from_grouplink(self): """ tests that the endpoint will correctly retrieve issues resolved in a release from the GroupLink model """ repo = Repository.objects.create( organization_id=self.org.id, name=self.project.name, ) commit = Commit.objects.create( organization_id=self.org.id, repository_id=repo.id, key='a' * 40, ) commit2 = Commit.objects.create( organization_id=self.org.id, repository_id=repo.id, key='b' * 40, ) ReleaseCommit.objects.create( organization_id=self.org.id, release=self.release, commit=commit, order=1, ) ReleaseCommit.objects.create( organization_id=self.org.id, release=self.release, commit=commit2, order=0, ) GroupLink.objects.create( group_id=self.group.id, project_id=self.group.project_id, linked_type=GroupLink.LinkedType.commit, relationship=GroupLink.Relationship.resolves, linked_id=commit.id, ) response = self.client.get(self.path) assert response.status_code == 200, response.content assert len(response.data) == 1 assert response.data[0]['id'] == six.text_type(self.group.id) def test_does_not_return_duplicate_groups(self): """ tests that the endpoint will correctly retrieve issues resolved in a release from the GroupLink and GroupResolution model but will not return the groups twice if they appear in both """ repo = Repository.objects.create( organization_id=self.org.id, name=self.project.name, ) commit = Commit.objects.create( organization_id=self.org.id, repository_id=repo.id, key='a' * 40, ) commit2 = Commit.objects.create( organization_id=self.org.id, repository_id=repo.id, key='b' * 40, ) ReleaseCommit.objects.create( organization_id=self.org.id, release=self.release, commit=commit, order=1, ) ReleaseCommit.objects.create( organization_id=self.org.id, release=self.release, commit=commit2, order=0, ) GroupLink.objects.create( group_id=self.group.id, project_id=self.group.project_id, linked_type=GroupLink.LinkedType.commit, relationship=GroupLink.Relationship.resolves, linked_id=commit.id, ) GroupResolution.objects.create( group=self.group, release=self.release, type=GroupResolution.Type.in_release, ) response = self.client.get(self.path) assert response.status_code == 200, response.content assert len(response.data) == 1 assert response.data[0]['id'] == six.text_type(self.group.id) def test_return_groups_from_both_types(self): """ tests that the endpoint will correctly retrieve issues resolved in a release from both the GroupLink and GroupResolution model """ group2 = self.create_group(project=self.project) repo = Repository.objects.create( organization_id=self.org.id, name=self.project.name, ) commit = Commit.objects.create( organization_id=self.org.id, repository_id=repo.id, key='a' * 40, ) commit2 = Commit.objects.create( organization_id=self.org.id, repository_id=repo.id, key='b' * 40, ) ReleaseCommit.objects.create( organization_id=self.org.id, release=self.release, commit=commit, order=1, ) ReleaseCommit.objects.create( organization_id=self.org.id, release=self.release, commit=commit2, order=0, ) GroupLink.objects.create( group_id=self.group.id, project_id=self.group.project_id, linked_type=GroupLink.LinkedType.commit, relationship=GroupLink.Relationship.resolves, linked_id=commit.id, ) GroupResolution.objects.create( group=group2, release=self.release, type=GroupResolution.Type.in_release, ) response = self.client.get(self.path) assert response.status_code == 200, response.content assert len(response.data) == 2
32.49505
84
0.587294
690
6,564
5.471014
0.14058
0.072318
0.099338
0.107285
0.768212
0.743046
0.725563
0.725563
0.725563
0.725563
0
0.010316
0.320689
6,564
201
85
32.656716
0.836286
0.078915
0
0.630952
0
0
0.013022
0.004904
0
0
0
0
0.065476
1
0.029762
false
0
0.029762
0
0.065476
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
a9b6540f8af3e9d5d6004e0d9127a26184b29fa6
302
py
Python
server/src/labelFunctions/index.py
leonard-thong/dlwlrat
2b4b669a3b2f348d1b05125afd6b8a1907b6b212
[ "CC-BY-3.0" ]
2
2020-10-08T06:01:22.000Z
2020-12-15T16:28:27.000Z
server/src/labelFunctions/index.py
dreamyang-liu/SciAnnotate
dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2
[ "CC-BY-3.0" ]
8
2020-12-09T02:55:20.000Z
2020-12-23T23:31:42.000Z
server/src/labelFunctions/index.py
dreamyang-liu/SciAnnotate
dfa41ec5c2c4b6665b5d9b059895be20e9e0cfe2
[ "CC-BY-3.0" ]
4
2021-02-02T04:51:53.000Z
2021-07-18T17:00:04.000Z
# -*- coding:utf-8 -*- """ =========================================== @author: lmy, leonard @time: 2020/8/19 11:03 PM @project: brat @file: index.py =========================================== """ from .contactLabeler import * from .executor1 import * from .x import * from .xx import *
23.230769
43
0.433775
30
302
4.366667
0.766667
0.229008
0
0
0
0
0
0
0
0
0
0.051383
0.162252
302
13
44
23.230769
0.466403
0.672185
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
e70e297f0693cbe0942f362178dce263c911d064
37
py
Python
data/System/Herunterfahren.py
Fadope1/mp3Controller
1b5381adf5322e37409d4ae56f59ef064da2a3c6
[ "MIT" ]
null
null
null
data/System/Herunterfahren.py
Fadope1/mp3Controller
1b5381adf5322e37409d4ae56f59ef064da2a3c6
[ "MIT" ]
null
null
null
data/System/Herunterfahren.py
Fadope1/mp3Controller
1b5381adf5322e37409d4ae56f59ef064da2a3c6
[ "MIT" ]
null
null
null
import os os.system("shutdown now")
9.25
25
0.72973
6
37
4.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.135135
37
3
26
12.333333
0.84375
0
0
0
0
0
0.324324
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
e72bfbcf6f9ddcc93a5a61ea7e9e401494c5faa8
237
py
Python
openjij/sampler/__init__.py
Atsushi-Machida/OpenJij
e4bddebb13536eb26ff0b7b9fc6b1c75659fe934
[ "Apache-2.0" ]
null
null
null
openjij/sampler/__init__.py
Atsushi-Machida/OpenJij
e4bddebb13536eb26ff0b7b9fc6b1c75659fe934
[ "Apache-2.0" ]
null
null
null
openjij/sampler/__init__.py
Atsushi-Machida/OpenJij
e4bddebb13536eb26ff0b7b9fc6b1c75659fe934
[ "Apache-2.0" ]
null
null
null
from .response import Response from .sampler import * from .sa_sampler import SASampler from .sqa_sampler import SQASampler from .gpu_sqa_sampler import GPUSQASampler from .gpu_sa_sampler import GPUSASampler from .cmos_annealer import *
29.625
42
0.843882
33
237
5.848485
0.393939
0.336788
0.15544
0
0
0
0
0
0
0
0
0
0.118143
237
7
43
33.857143
0.923445
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
1
0
0
5
e7446cadb184775a3927f9dc5f35a6885d79a46b
181
py
Python
src/test/pythonFiles/testFiles/standard/tests/external.py
ChaseKnowlden/vscode-jupyter
9bdaf87f0b6dcd717c508e9023350499a6093f97
[ "MIT" ]
615
2020-11-11T22:55:28.000Z
2022-03-30T21:48:08.000Z
src/test/pythonFiles/testFiles/standard/tests/external.py
ChaseKnowlden/vscode-jupyter
9bdaf87f0b6dcd717c508e9023350499a6093f97
[ "MIT" ]
8,428
2020-11-11T22:06:43.000Z
2022-03-31T23:42:34.000Z
src/test/pythonFiles/testFiles/standard/tests/external.py
vasili8m/vscode-python
846eee870e8b7bab38172600836faedb5fb80166
[ "MIT" ]
158
2020-11-12T07:49:02.000Z
2022-03-27T20:50:20.000Z
class ForeignTests: class TestExtraNestedForeignTests: def test_super_deep_foreign(self): assert False def test_foreign_test(self): assert False
25.857143
42
0.690608
19
181
6.315789
0.578947
0.116667
0.25
0
0
0
0
0
0
0
0
0
0.265193
181
6
43
30.166667
0.902256
0
0
0.333333
0
0
0
0
0
0
0
0
0.333333
1
0.333333
false
0
0
0
0.666667
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
1
0
0
0
0
1
0
0
5
e7974eb3db1511a1249f05c1ed94cf20e57e7104
42
py
Python
src/main/resources/docs/tests/W0301.py
h314to/codacy-pylint
9d31567db6188e1b31ce0e1567998f64946502df
[ "Apache-2.0" ]
null
null
null
src/main/resources/docs/tests/W0301.py
h314to/codacy-pylint
9d31567db6188e1b31ce0e1567998f64946502df
[ "Apache-2.0" ]
null
null
null
src/main/resources/docs/tests/W0301.py
h314to/codacy-pylint
9d31567db6188e1b31ce0e1567998f64946502df
[ "Apache-2.0" ]
null
null
null
##Patterns: W0301 ##Info: W0301 a = 1;
10.5
18
0.571429
6
42
4
0.833333
0
0
0
0
0
0
0
0
0
0
0.28125
0.238095
42
3
19
14
0.46875
0.619048
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
99be151f8d4a94bc2cffbab98edbfd933cacf8b5
1,487
py
Python
Complementing_Strand_of_DNA.py
sujitmandal/Boinformatics
56f4116fd5281bf04b694152b1ea9cf219a6d757
[ "MIT" ]
null
null
null
Complementing_Strand_of_DNA.py
sujitmandal/Boinformatics
56f4116fd5281bf04b694152b1ea9cf219a6d757
[ "MIT" ]
null
null
null
Complementing_Strand_of_DNA.py
sujitmandal/Boinformatics
56f4116fd5281bf04b694152b1ea9cf219a6d757
[ "MIT" ]
null
null
null
string = "TCAGGTCTTAAAAGGCTAGACGGATGATCCGTCATGTGCTTATAACCTCATACCGCGTGCGCTCCCTAGTTCTTGTGGGAAGAACCTCCGATCACTTCCGTACTTCAGGTCATTTTCTGTGATAACCTCTTCACCATTAGGTATGCTGTTACGGCTCACTATGTCTTAAGGGTATACAGGGATGGGCCCACTATATACCACTAGCGTGGAACGTCGTTCCACCTAGATACATACACCCTTCAAATTGTGGTCATTCTAAAAAAGGCTTCTTCTGAGACGGTAACTGGCTATGGGTGATCGCTCGTACAGGTATCTCGAAAAGGAGATGGGGCTCATCGTTTGTCAATCCCCCCATCTGAGGCTTTGGGTCACATTGCAGTTTCAGATCCCATCTTCTGTAACCAACCTGCGAACTGCTTCAACGTGCAACTTAGTACTAAGTACGATTGAGCGTAGCCCTAAGGGGTTAACTGTACGCTATGAGTTCATTTCATGTTTGTCTGGGAAATTCGACGTACATACTCCATGTGATGGCTTATAGTCCTCAGCATGGCAAAAACTCGTTACAGAAATAAATTGGCGGGACTACGCCATACTGTTGCCCAGTTATACGCATGGGTAAGCACGCCCAGTTATGTTCCTCACGGTTGATTGCGCGATCCGTTTCGGCCGAATGCCGCGACGGTGGTTGACCCTGTTGACATTTTGTCGTCTGTCTCTAGGCCACTTCGCAAAGACCAGCTCCCCTAAAGACTACATTGCCGTCGGTATCCATCATTCCTGAGAGACGTGAGGCCCCCTTTCGTAACCCAGCCCGGCTGAAATCTCAATTCCTTAACCTCGGCCCTTTCTATATTTATCTAGTCACTCGGTATATGTTAGCTAGGTTATCCACCATAGAAATTGTCAACTTGATGCCAGCCGGCAGGATATAGTAAGGATATCGAAGTCCCAGTATTGACATCAAGACGTCATCCCTTCCGTGGGGGATCTAAAAAC" ''' Author : Sujit Mandal Github: https://github.com/sujitmandal Package : https://pypi.org/project/images-into-array/ LinkedIn : https://www.linkedin.com/in/sujit-mandal-91215013a/ Facebook : https://www.facebook.com/sujit.mandal.33671748 Twitter : https://twitter.com/mandalsujit37 ''' def DNA(temp): st_temp = temp.replace('A', 't').replace('T', 'a').replace('C', 'g').replace('G', 'c').upper()[::-1] print(st_temp) if __name__ == "__main__": DNA(string)
78.263158
1,010
0.891728
68
1,487
19.352941
0.573529
0.025076
0
0
0
0
0
0
0
0
0
0.013277
0.03766
1,487
18
1,011
82.611111
0.906359
0
0
0
0
0
0.847245
0.83389
0
1
0
0
0
1
0.166667
false
0
0
0
0.166667
0.166667
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
null
1
0
0
0
0
0
0
0
0
0
0
0
0
5
99ec93579d92280a83c5edd71ef71c89f21f8a81
203
py
Python
bobstack/sipmessaging/concretesipmessages/inviteSIPRequest.py
bobjects/BobStack
c177b286075044832f44baf9ace201780c8b4320
[ "Apache-2.0" ]
null
null
null
bobstack/sipmessaging/concretesipmessages/inviteSIPRequest.py
bobjects/BobStack
c177b286075044832f44baf9ace201780c8b4320
[ "Apache-2.0" ]
null
null
null
bobstack/sipmessaging/concretesipmessages/inviteSIPRequest.py
bobjects/BobStack
c177b286075044832f44baf9ace201780c8b4320
[ "Apache-2.0" ]
null
null
null
from ...sipmessaging import SIPRequest class INVITESIPRequest(SIPRequest): @property def is_invite_request(self): return True @property def is_known(self): return True
16.916667
38
0.679803
22
203
6.136364
0.681818
0.162963
0.192593
0
0
0
0
0
0
0
0
0
0.251232
203
11
39
18.454545
0.888158
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0.25
0.75
0
1
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
5
820a3b29c7139c4175fb31dbf43be353c1b73f18
142
py
Python
src/react_ssr/exceptions.py
urantialife/react-ssr-backend
f4d094fbd15ff1eb2178aeac0bf9bec8c70414f7
[ "BSD-2-Clause" ]
1
2019-06-23T21:00:16.000Z
2019-06-23T21:00:16.000Z
src/react_ssr/exceptions.py
urantialife/react-ssr-backend
f4d094fbd15ff1eb2178aeac0bf9bec8c70414f7
[ "BSD-2-Clause" ]
null
null
null
src/react_ssr/exceptions.py
urantialife/react-ssr-backend
f4d094fbd15ff1eb2178aeac0bf9bec8c70414f7
[ "BSD-2-Clause" ]
null
null
null
class RenderFrontendError(Exception): pass class GetContextError(Exception): pass class GetDefaultStateError(Exception): pass
12.909091
38
0.760563
12
142
9
0.5
0.361111
0.333333
0
0
0
0
0
0
0
0
0
0.176056
142
10
39
14.2
0.923077
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
5
8246dc79492b3bf557a76db49ba1825839531379
47
py
Python
lang/py/cookbook/v2/source/cb2_19_9_sol_2.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/cookbook/v2/source/cb2_19_9_sol_2.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
lang/py/cookbook/v2/source/cb2_19_9_sol_2.py
ch1huizong/learning
632267634a9fd84a5f5116de09ff1e2681a6cc85
[ "MIT" ]
null
null
null
for x in a: for y in b: print x, y
11.75
18
0.446809
11
47
1.909091
0.636364
0
0
0
0
0
0
0
0
0
0
0
0.489362
47
3
19
15.666667
0.875
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.333333
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
4132ee58a226e2fa529d29c9d666bb398283f978
34
py
Python
whilesonusuz.py
sahintuter/Basic-Python-Examples
97e8e1d5e918c154ebac88b850200c1d461c128f
[ "Apache-2.0" ]
null
null
null
whilesonusuz.py
sahintuter/Basic-Python-Examples
97e8e1d5e918c154ebac88b850200c1d461c128f
[ "Apache-2.0" ]
null
null
null
whilesonusuz.py
sahintuter/Basic-Python-Examples
97e8e1d5e918c154ebac88b850200c1d461c128f
[ "Apache-2.0" ]
null
null
null
while True: print("sonsuz")
11.333333
20
0.588235
4
34
5
1
0
0
0
0
0
0
0
0
0
0
0
0.264706
34
2
21
17
0.8
0
0
0
0
0
0.1875
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
4135ac2116210c5d0db399a173a75c9372c88bcd
297
py
Python
poo_exercise/models/__init__.py
thiagosalvatore/poo-exercise
ab897d9b17b3aa63252c4fa7334f624f6d380d9a
[ "Apache-2.0" ]
null
null
null
poo_exercise/models/__init__.py
thiagosalvatore/poo-exercise
ab897d9b17b3aa63252c4fa7334f624f6d380d9a
[ "Apache-2.0" ]
null
null
null
poo_exercise/models/__init__.py
thiagosalvatore/poo-exercise
ab897d9b17b3aa63252c4fa7334f624f6d380d9a
[ "Apache-2.0" ]
null
null
null
from poo_exercise.models.classroom import Classroom from poo_exercise.models.question import Question from poo_exercise.models.quiz import Quiz from poo_exercise.models.student import Student from poo_exercise.models.student_quiz import StudentQuiz from poo_exercise.models.teacher import Teacher
42.428571
56
0.878788
43
297
5.906977
0.255814
0.165354
0.354331
0.496063
0.220472
0
0
0
0
0
0
0
0.080808
297
6
57
49.5
0.930403
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
413f2103569be24e3d6f0a05ec48b83503156bfb
77
py
Python
acq4/devices/PatchPipette/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
47
2015-01-05T16:18:10.000Z
2022-03-16T13:09:30.000Z
acq4/devices/PatchPipette/__init__.py
aleonlein/acq4
4b1fcb9ad2c5e8d4595a2b9cf99d50ece0c0f555
[ "MIT" ]
48
2015-04-19T16:51:41.000Z
2022-03-31T14:48:16.000Z
acq4/devices/PatchPipette/__init__.py
sensapex/acq4
9561ba73caff42c609bd02270527858433862ad8
[ "MIT" ]
32
2015-01-15T14:11:49.000Z
2021-07-15T13:44:52.000Z
from __future__ import print_function from .patchpipette import PatchPipette
25.666667
38
0.883117
9
77
7
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.103896
77
2
39
38.5
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
4184757a21af3c941bc4568b5152bb621805b3ef
214
py
Python
tests/fixtures/auth.py
jmwri/pyrunehistory
a9384cb86d706857158c2ac74d4bef30de99ae31
[ "MIT" ]
null
null
null
tests/fixtures/auth.py
jmwri/pyrunehistory
a9384cb86d706857158c2ac74d4bef30de99ae31
[ "MIT" ]
null
null
null
tests/fixtures/auth.py
jmwri/pyrunehistory
a9384cb86d706857158c2ac74d4bef30de99ae31
[ "MIT" ]
null
null
null
from pytest import fixture from pyrunehistory.client import Client from pyrunehistory.auth import Auth @fixture def auth() -> Auth: c = Client('user', 'password', 'secret', 'http://tests') return c.auth
19.454545
60
0.71028
28
214
5.428571
0.535714
0.223684
0
0
0
0
0
0
0
0
0
0
0.168224
214
10
61
21.4
0.853933
0
0
0
0
0
0.140187
0
0
0
0
0
0
1
0.142857
false
0.142857
0.428571
0
0.714286
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
5
41b7c2c8b55507db402f8c007943df6e2831904c
157
py
Python
hocrox/layer/preprocessing/transformation/__init__.py
imdeepmind/hocrox
271f7ee8f7b9c0fb5466f5b8d9acbc0a703b570f
[ "MIT" ]
2
2021-12-09T19:20:23.000Z
2021-12-26T13:22:50.000Z
hocrox/layer/preprocessing/transformation/__init__.py
imdeepmind/hocrox
271f7ee8f7b9c0fb5466f5b8d9acbc0a703b570f
[ "MIT" ]
29
2021-04-28T14:37:36.000Z
2022-03-17T18:37:52.000Z
hocrox/layer/preprocessing/transformation/__init__.py
imdeepmind/hocrox
271f7ee8f7b9c0fb5466f5b8d9acbc0a703b570f
[ "MIT" ]
1
2022-03-07T10:55:36.000Z
2022-03-07T10:55:36.000Z
"""Preprocessing layers that transforms images.""" from .crop import Crop from .pading import Padding from .resize import Resize from .rotate import Rotate
22.428571
50
0.789809
21
157
5.904762
0.571429
0
0
0
0
0
0
0
0
0
0
0
0.140127
157
6
51
26.166667
0.918519
0.280255
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
41b8ad039382a81095801040b7e287eed0d4318b
150
py
Python
rl4rs/env/__init__.py
fuxiAIlab/RL4RS
e26ee5d068eaffd0f04779067614e34e313b1200
[ "Apache-2.0" ]
77
2022-02-17T01:51:29.000Z
2022-03-23T23:34:01.000Z
rl4rs/env/__init__.py
fuxiAIlab/RL4RS
e26ee5d068eaffd0f04779067614e34e313b1200
[ "Apache-2.0" ]
2
2022-03-15T11:38:50.000Z
2022-03-29T08:12:46.000Z
rl4rs/env/__init__.py
fuxiAIlab/RL4RS
e26ee5d068eaffd0f04779067614e34e313b1200
[ "Apache-2.0" ]
11
2022-02-26T18:14:35.000Z
2022-03-29T21:29:10.000Z
from .base import RecDataBase, RecSimBase, RecEnvBase, RecState __all__ = [ "RecDataBase", "RecSimBase", "RecEnvBase", "RecState", ]
16.666667
63
0.66
12
150
7.916667
0.666667
0.442105
0.652632
0.821053
0
0
0
0
0
0
0
0
0.213333
150
8
64
18.75
0.805085
0
0
0
0
0
0.26
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
41c5de797ef7699d54bc170c40d2ce0440ca6549
231
py
Python
prism/__init__.py
CurtLH/prism-python
82cf5ef75509550741c73ccf62c4541ff881e469
[ "Apache-2.0" ]
14
2020-04-02T00:41:46.000Z
2022-01-06T03:58:53.000Z
prism/__init__.py
CurtLH/prism-python
82cf5ef75509550741c73ccf62c4541ff881e469
[ "Apache-2.0" ]
15
2019-12-05T22:51:04.000Z
2021-06-25T20:56:42.000Z
prism/__init__.py
CurtLH/prism-python
82cf5ef75509550741c73ccf62c4541ff881e469
[ "Apache-2.0" ]
5
2019-12-05T22:55:49.000Z
2020-11-18T18:31:59.000Z
from prism.prism import Prism, load_schema, create_table, upload_file from ._version import get_versions __version__ = get_versions()["version"] del get_versions __all__ = ["load_schema", "Prism", "create_table", "upload_file"]
25.666667
69
0.779221
31
231
5.225806
0.451613
0.203704
0.209877
0.259259
0
0
0
0
0
0
0
0
0.108225
231
8
70
28.875
0.786408
0
0
0
0
0
0.199134
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
68d533f537b1bea1308c50afd462dd5d709014c6
168
py
Python
uliweb/contrib/staticfiles/conf.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
202
2015-01-12T08:10:48.000Z
2021-11-08T09:04:32.000Z
uliweb/contrib/staticfiles/conf.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
30
2015-01-01T09:07:17.000Z
2021-06-03T12:58:45.000Z
uliweb/contrib/staticfiles/conf.py
timgates42/uliweb
80c0459c5e5d257b665eb2e1d0b5f68ad55c42f1
[ "BSD-2-Clause" ]
58
2015-01-12T03:28:54.000Z
2022-01-14T01:58:08.000Z
from uliweb.form import * class ManageForm(Form): static_url = StringField(label='Static URL prefix:', required=True, key='wsgi_middleware_staticfiles/STATIC_URL')
42
117
0.785714
22
168
5.818182
0.772727
0.210938
0
0
0
0
0
0
0
0
0
0
0.10119
168
4
117
42
0.847682
0
0
0
0
0
0.331361
0.224852
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
ec176572f6f3e86a7252760d80c4d4ea64a7dca5
139
py
Python
test/com/facebook/buck/features/python/testdata/python_test/test_spinning.py
lakshmi2005/buck
012a59d5d2e5a45b483e85fb190d2b67ea0c56ab
[ "Apache-2.0" ]
1
2022-01-25T13:13:09.000Z
2022-01-25T13:13:09.000Z
test/com/facebook/buck/python/testdata/python_test/test_spinning.py
monaka/buck
5bf0591e649158237fe7d8523f11380e4f54bdf4
[ "Apache-2.0" ]
1
2018-12-10T15:54:22.000Z
2018-12-10T19:30:37.000Z
test/com/facebook/buck/python/testdata/python_test/test_spinning.py
monaka/buck
5bf0591e649158237fe7d8523f11380e4f54bdf4
[ "Apache-2.0" ]
1
2022-01-25T13:14:45.000Z
2022-01-25T13:14:45.000Z
import unittest import time class Test(unittest.TestCase): def test_that_passes(self): while True: time.sleep(1)
15.444444
31
0.654676
18
139
4.944444
0.777778
0
0
0
0
0
0
0
0
0
0
0.009804
0.266187
139
8
32
17.375
0.862745
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0.166667
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
1
1
0
1
0
0
5
ec2313367ba597f9b98d1ea92500b0d058501b87
52
py
Python
mkpy/__main__.py
phipus/mkpy
8d5da1ea868e85ea6a7b20fa250989af0d1ee0c8
[ "MIT" ]
null
null
null
mkpy/__main__.py
phipus/mkpy
8d5da1ea868e85ea6a7b20fa250989af0d1ee0c8
[ "MIT" ]
null
null
null
mkpy/__main__.py
phipus/mkpy
8d5da1ea868e85ea6a7b20fa250989af0d1ee0c8
[ "MIT" ]
null
null
null
import os import sys from .make import main main()
8.666667
22
0.75
9
52
4.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.192308
52
5
23
10.4
0.928571
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
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
0
1
0
1
0
1
0
0
5
ec26cf264ef74b054d7286a7bf2f3efd084f6e76
38
py
Python
tests/components/twitch/__init__.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
30,023
2016-04-13T10:17:53.000Z
2020-03-02T12:56:31.000Z
tests/components/twitch/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
tests/components/twitch/__init__.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,956
2016-04-13T18:42:31.000Z
2020-03-02T09:32:12.000Z
"""Tests for the Twitch component."""
19
37
0.684211
5
38
5.2
1
0
0
0
0
0
0
0
0
0
0
0
0.131579
38
1
38
38
0.787879
0.815789
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
ec37df794d8476676e294d834ad65ee0269a31a8
267
py
Python
app/routes.py
davidtso1219/timer_app
d0d8fc07a139e9d8932e569ea3bc9b1c595db2ac
[ "MIT" ]
null
null
null
app/routes.py
davidtso1219/timer_app
d0d8fc07a139e9d8932e569ea3bc9b1c595db2ac
[ "MIT" ]
null
null
null
app/routes.py
davidtso1219/timer_app
d0d8fc07a139e9d8932e569ea3bc9b1c595db2ac
[ "MIT" ]
null
null
null
from flask import render_template, request, flash from app import app @app.route('/') def welcome(): return render_template('index.html') @app.route('/timer') @app.route('/timer/<name>') def next(name=None): return render_template('timer.html', name=name)
20.538462
51
0.707865
38
267
4.894737
0.473684
0.225806
0.215054
0
0
0
0
0
0
0
0
0
0.123596
267
13
51
20.538462
0.794872
0
0
0
0
0
0.149254
0
0
0
0
0
0
1
0.222222
false
0
0.222222
0.222222
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
1
0
0
0
1
1
0
0
5
ec391762e00a207f2d6f00a1964e9e042c2df23d
148
py
Python
apps/cars/api/serializers/__init__.py
agorsk1/car-rating-app
354c5933f4cbad69c9a57d1839f9086cd5cf9a1d
[ "MIT" ]
1
2022-03-03T11:15:25.000Z
2022-03-03T11:15:25.000Z
apps/cars/api/serializers/__init__.py
agorsk1/car-rating-app
354c5933f4cbad69c9a57d1839f9086cd5cf9a1d
[ "MIT" ]
null
null
null
apps/cars/api/serializers/__init__.py
agorsk1/car-rating-app
354c5933f4cbad69c9a57d1839f9086cd5cf9a1d
[ "MIT" ]
null
null
null
from .car_serializers import ( CarSerializer, CarPopularitySerializer, CarSerializer ) from .rating_serializers import RatingSerializer
21.142857
48
0.797297
12
148
9.666667
0.666667
0.293103
0
0
0
0
0
0
0
0
0
0
0.162162
148
6
49
24.666667
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6b5dc5b9587c35e35b8217d498e47fd608bf481f
19
py
Python
braintree/version.py
maneeshd/braintree_python
4aa3f4b8a376ea81bf16a053d840efe55ae13675
[ "MIT" ]
null
null
null
braintree/version.py
maneeshd/braintree_python
4aa3f4b8a376ea81bf16a053d840efe55ae13675
[ "MIT" ]
null
null
null
braintree/version.py
maneeshd/braintree_python
4aa3f4b8a376ea81bf16a053d840efe55ae13675
[ "MIT" ]
null
null
null
Version = "3.59.0"
9.5
18
0.578947
4
19
2.75
1
0
0
0
0
0
0
0
0
0
0
0.25
0.157895
19
1
19
19
0.4375
0
0
0
0
0
0.315789
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
6b6b6f12404fdd729d8e23c7f7606a0e10ae3f7f
116
py
Python
roslibpy/math/__init__.py
mortenmj/roslibpy
e492ab89af283346939aed747506d84423cf194d
[ "BSD-3-Clause" ]
null
null
null
roslibpy/math/__init__.py
mortenmj/roslibpy
e492ab89af283346939aed747506d84423cf194d
[ "BSD-3-Clause" ]
null
null
null
roslibpy/math/__init__.py
mortenmj/roslibpy
e492ab89af283346939aed747506d84423cf194d
[ "BSD-3-Clause" ]
null
null
null
from .point import Point from .quaternion import Quaternion from .pose import Pose from .transform import Transform
23.2
34
0.827586
16
116
6
0.375
0
0
0
0
0
0
0
0
0
0
0
0.137931
116
4
35
29
0.96
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6b85f115a69697a1af1760645d8462feaa202a77
22
py
Python
raft/__init__.py
ibaiGorordo/ONNX-RAFT-Optical-Flow-Estimation
38ce7b76846397df53631ab05e3dfa1e495ae0f4
[ "MIT" ]
4
2022-02-20T14:08:21.000Z
2022-03-26T10:48:52.000Z
raft/__init__.py
ibaiGorordo/ONNX-RAFT-Optical-Flow-Estimation
38ce7b76846397df53631ab05e3dfa1e495ae0f4
[ "MIT" ]
null
null
null
raft/__init__.py
ibaiGorordo/ONNX-RAFT-Optical-Flow-Estimation
38ce7b76846397df53631ab05e3dfa1e495ae0f4
[ "MIT" ]
null
null
null
from .raft import Raft
22
22
0.818182
4
22
4.5
0.75
0
0
0
0
0
0
0
0
0
0
0
0.136364
22
1
22
22
0.947368
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6bb0f6eaa788938b013b19783e1dabd8ba83894c
63
py
Python
py001.py
vandebettio/desenvolvimentopython-exercicios
7d2ee8feaf809f4d4c31015cae8bedab4d26e792
[ "MIT" ]
null
null
null
py001.py
vandebettio/desenvolvimentopython-exercicios
7d2ee8feaf809f4d4c31015cae8bedab4d26e792
[ "MIT" ]
null
null
null
py001.py
vandebettio/desenvolvimentopython-exercicios
7d2ee8feaf809f4d4c31015cae8bedab4d26e792
[ "MIT" ]
null
null
null
# O começo de tudo, mostrar 'Olá, mundo!' print('Olá, mundo!')
21
41
0.650794
10
63
4.1
0.8
0.390244
0
0
0
0
0
0
0
0
0
0
0.15873
63
2
42
31.5
0.773585
0.619048
0
0
0
0
0.5
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
6bb4ec20c496aa4bfd8883c79529f77f39fc9399
84
py
Python
run_server.py
kdurril/mvp_app
dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d
[ "MIT" ]
null
null
null
run_server.py
kdurril/mvp_app
dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d
[ "MIT" ]
null
null
null
run_server.py
kdurril/mvp_app
dfe7ef75e4a49d9bce3cb50c29f1a6d25a15361d
[ "MIT" ]
null
null
null
#!/usr/bin/env # -*- encoding: utf-8 -*- import gunicorn from mvp_app import app
12
25
0.654762
13
84
4.153846
0.846154
0
0
0
0
0
0
0
0
0
0
0.014493
0.178571
84
6
26
14
0.768116
0.452381
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
6bbfcdd7ab9c272bc18a3bb8310792b62e674260
249
py
Python
python_files/similarity/Distances.py
albertoursino/ComparisonBetweenNetworks
e6e3612b47cf10ec4e284a66044dad0ddf412b85
[ "MIT" ]
1
2021-11-26T17:33:15.000Z
2021-11-26T17:33:15.000Z
python_files/similarity/Distances.py
albertoursino/GraphsComparison
e6e3612b47cf10ec4e284a66044dad0ddf412b85
[ "MIT" ]
null
null
null
python_files/similarity/Distances.py
albertoursino/GraphsComparison
e6e3612b47cf10ec4e284a66044dad0ddf412b85
[ "MIT" ]
null
null
null
import numpy as np # Given two graphs by their adjacency matrices, # return the number of edges in common (in case all entries are 0's and 1's). def num_edges_in_common(mat1: np.matrix, mat2: np.matrix): return np.sum(np.multiply(mat1, mat2))
31.125
77
0.738956
46
249
3.934783
0.717391
0.077348
0.143646
0
0
0
0
0
0
0
0
0.028986
0.168675
249
7
78
35.571429
0.845411
0.485944
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
6bdcbed91c2aed9d91abf539c0008a316c3415eb
1,157
py
Python
src/fp_artificial.py
yusif-ifraimo/FlapPy_Bird_SWT
a5af3f26f651c58b724a2161114b6ff5584d22fe
[ "MIT" ]
1
2020-09-18T09:00:43.000Z
2020-09-18T09:00:43.000Z
src/fp_artificial.py
yusif-ifraimo/FlapPy_Bird_SWT
a5af3f26f651c58b724a2161114b6ff5584d22fe
[ "MIT" ]
null
null
null
src/fp_artificial.py
yusif-ifraimo/FlapPy_Bird_SWT
a5af3f26f651c58b724a2161114b6ff5584d22fe
[ "MIT" ]
null
null
null
def number(the_number, arg): return arg[0](the_number, arg[1]) if arg else the_number def zero (arg = None): return number(0, arg) def one (arg = None): return number(1, arg) def two (arg = None): return number(2, arg) def three(arg = None): return number(3, arg) def four (arg = None): return number(4, arg) def five (arg = None): return number(5, arg) def six (arg = None): return number(6, arg) def seven(arg = None): return number(7, arg) def eight(arg = None): return number(8, arg) def nine (arg = None): return number(9, arg) def plus (value): return int.__add__, value def minus (value): return int.__sub__, value def times (value): return int.__mul__, value def divided_by(value): return int.__floordiv__, value assert seven(times(five())) == 35 assert four(plus(nine())) == 13 assert eight(minus(three())) == 5 assert six(divided_by(two())) == 3 def quad(a, b, c): return lambda x: (a(x) if callable(a) else a)*(x ** 2) + \ (b(x) if callable(b) else b) * x + \ (a(x) if callable(c) else c) assert quad(0, 0, 3)(0) == 3 assert quad(quad(1, 0, 0), quad(0, 2, 0), 3)(0) == 3
32.138889
62
0.621435
199
1,157
3.507538
0.246231
0.100287
0.186246
0.272206
0.037249
0
0
0
0
0
0
0.036264
0.213483
1,157
36
63
32.138889
0.730769
0
0
0
0
0
0
0
0
0
0
0
0.230769
1
0.615385
false
0
0
0.615385
0.692308
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
d401349e3655283a9449bbf73ea81ceb301926fb
247
py
Python
repo/__init__.py
GudniNatan/GSKI-PA6
a0f9a38bc0d2f6710f803a77276e6a76cd6f4471
[ "MIT" ]
null
null
null
repo/__init__.py
GudniNatan/GSKI-PA6
a0f9a38bc0d2f6710f803a77276e6a76cd6f4471
[ "MIT" ]
null
null
null
repo/__init__.py
GudniNatan/GSKI-PA6
a0f9a38bc0d2f6710f803a77276e6a76cd6f4471
[ "MIT" ]
null
null
null
from repo.member_repo import MemberRepo from repo.plays_repo import PlaysRepo from repo.repo import Repo, RelationError from repo.sport_repo import SportRepo from repo.group_repo import GroupRepo from repo.group_member_repo import GroupMemberRepo
35.285714
50
0.870445
37
247
5.648649
0.351351
0.229665
0.15311
0
0
0
0
0
0
0
0
0
0.101215
247
6
51
41.166667
0.941441
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
1
0
0
5
d4077586394075db09833fbccc12fdfd0c984e21
51
py
Python
Online-Judges/CodingBat/Python/String-01/07-first_half.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
3
2021-06-15T01:19:23.000Z
2022-03-16T18:23:53.000Z
Online-Judges/CodingBat/Python/String-01/07-first_half.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
Online-Judges/CodingBat/Python/String-01/07-first_half.py
shihab4t/Competitive-Programming
e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be
[ "Unlicense" ]
null
null
null
def first_half(str): return str[:(len(str)/2)]
17
29
0.627451
9
51
3.444444
0.777778
0
0
0
0
0
0
0
0
0
0
0.023256
0.156863
51
2
30
25.5
0.697674
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
1
0
0
5
d40ed7311dfd6a9b6121a5ef4da4987f47689faf
12,225
py
Python
homework6/mybehaviors.py
markriedl/gaige
e4984571ae368195b6bc296e69ed707a86b88da3
[ "MIT" ]
100
2018-11-26T17:04:50.000Z
2022-03-26T10:16:23.000Z
homework6/mybehaviors.py
markriedl/gaige
e4984571ae368195b6bc296e69ed707a86b88da3
[ "MIT" ]
null
null
null
homework6/mybehaviors.py
markriedl/gaige
e4984571ae368195b6bc296e69ed707a86b88da3
[ "MIT" ]
9
2018-12-12T01:10:41.000Z
2020-07-04T18:20:04.000Z
''' * Copyright (c) 2014, 2015 Entertainment Intelligence Lab, Georgia Institute of Technology. * Originally developed by Mark Riedl. * Last edited by Mark Riedl 05/2015 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ''' import sys, pygame, math, numpy, random, time, copy from pygame.locals import * from constants import * from utils import * from core import * from moba2 import * from btnode import * ########################### ### SET UP BEHAVIOR TREE def treeSpec(agent): myid = str(agent.getTeam()) spec = None ### YOUR CODE GOES BELOW HERE ### ### YOUR CODE GOES ABOVE HERE ### return spec def myBuildTree(agent): myid = str(agent.getTeam()) root = None ### YOUR CODE GOES BELOW HERE ### ### YOUR CODE GOES ABOVE HERE ### return root ### Helper function for making BTNodes (and sub-classes of BTNodes). ### type: class type (BTNode or a sub-class) ### agent: reference to the agent to be controlled ### This function takes any number of additional arguments that will be passed to the BTNode and parsed using BTNode.parseArgs() def makeNode(type, agent, *args): node = type(agent, args) return node ############################### ### BEHAVIOR CLASSES: ################## ### Taunt ### ### Print disparaging comment, addressed to a given NPC ### Parameters: ### 0: reference to an NPC ### 1: node ID string (optional) class Taunt(BTNode): ### target: the enemy agent to taunt def parseArgs(self, args): BTNode.parseArgs(self, args) self.target = None # First argument is the target if len(args) > 0: self.target = args[0] # Second argument is the node ID if len(args) > 1: self.id = args[1] def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.target is not None: print "Hey", self.target, "I don't like you!" return ret ################## ### MoveToTarget ### ### Move the agent to a given (x, y) ### Parameters: ### 0: a point (x, y) ### 1: node ID string (optional) class MoveToTarget(BTNode): ### target: a point (x, y) def parseArgs(self, args): BTNode.parseArgs(self, args) self.target = None # First argument is the target if len(args) > 0: self.target = args[0] # Second argument is the node ID if len(args) > 1: self.id = args[1] def enter(self): BTNode.enter(self) self.agent.navigateTo(self.target) def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.target == None: # failed executability conditions print "exec", self.id, "false" return False elif distance(self.agent.getLocation(), self.target) < self.agent.getRadius(): # Execution succeeds print "exec", self.id, "true" return True else: # executing return None return ret ################## ### Retreat ### ### Move the agent back to the base to be healed ### Parameters: ### 0: percentage of hitpoints that must have been lost to retreat ### 1: node ID string (optional) class Retreat(BTNode): ### percentage: Percentage of hitpoints that must have been lost def parseArgs(self, args): BTNode.parseArgs(self, args) self.percentage = 0.5 # First argument is the factor if len(args) > 0: self.percentage = args[0] # Second argument is the node ID if len(args) > 1: self.id = args[1] def enter(self): BTNode.enter(self) base = self.agent.world.getBaseForTeam(self.agent.getTeam()) if base: self.agent.navigateTo(base.getLocation()) def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.agent.getHitpoints() > self.agent.getMaxHitpoints() * self.percentage: # fail executability conditions print "exec", self.id, "false" return False elif self.agent.getHitpoints() == self.agent.getMaxHitpoints(): # Exection succeeds print "exec", self.id, "true" return True else: # executing return None return ret ################## ### ChaseMinion ### ### Find the closest minion and move to intercept it. ### Parameters: ### 0: node ID string (optional) class ChaseMinion(BTNode): ### target: the minion to chase ### timer: how often to replan def parseArgs(self, args): BTNode.parseArgs(self, args) self.target = None self.timer = 50 # First argument is the node ID if len(args) > 0: self.id = args[0] def enter(self): BTNode.enter(self) self.timer = 50 enemies = self.agent.world.getEnemyNPCs(self.agent.getTeam()) if len(enemies) > 0: best = None dist = 0 for e in enemies: if isinstance(e, Minion): d = distance(self.agent.getLocation(), e.getLocation()) if best == None or d < dist: best = e dist = d self.target = best if self.target is not None: navTarget = self.chooseNavigationTarget() if navTarget is not None: self.agent.navigateTo(navTarget) def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.target == None or self.target.isAlive() == False: # failed execution conditions print "exec", self.id, "false" return False elif self.target is not None and distance(self.agent.getLocation(), self.target.getLocation()) < BIGBULLETRANGE: # succeeded print "exec", self.id, "true" return True else: # executing self.timer = self.timer - 1 if self.timer <= 0: self.timer = 50 navTarget = self.chooseNavigationTarget() if navTarget is not None: self.agent.navigateTo(navTarget) return None return ret def chooseNavigationTarget(self): if self.target is not None: return self.target.getLocation() else: return None ################## ### KillMinion ### ### Kill the closest minion. Assumes it is already in range. ### Parameters: ### 0: node ID string (optional) class KillMinion(BTNode): ### target: the minion to shoot def parseArgs(self, args): BTNode.parseArgs(self, args) self.target = None # First argument is the node ID if len(args) > 0: self.id = args[0] def enter(self): BTNode.enter(self) self.agent.stopMoving() enemies = self.agent.world.getEnemyNPCs(self.agent.getTeam()) if len(enemies) > 0: best = None dist = 0 for e in enemies: if isinstance(e, Minion): d = distance(self.agent.getLocation(), e.getLocation()) if best == None or d < dist: best = e dist = d self.target = best def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.target == None or distance(self.agent.getLocation(), self.target.getLocation()) > BIGBULLETRANGE: # failed executability conditions print "exec", self.id, "false" return False elif self.target.isAlive() == False: # succeeded print "exec", self.id, "true" return True else: # executing self.shootAtTarget() return None return ret def shootAtTarget(self): if self.agent is not None and self.target is not None: self.agent.turnToFace(self.target.getLocation()) self.agent.shoot() ################## ### ChaseHero ### ### Move to intercept the enemy Hero. ### Parameters: ### 0: node ID string (optional) class ChaseHero(BTNode): ### target: the hero to chase ### timer: how often to replan def ParseArgs(self, args): BTNode.parseArgs(self, args) self.target = None self.timer = 50 # First argument is the node ID if len(args) > 0: self.id = args[0] def enter(self): BTNode.enter(self) self.timer = 50 enemies = self.agent.world.getEnemyNPCs(self.agent.getTeam()) for e in enemies: if isinstance(e, Hero): self.target = e navTarget = self.chooseNavigationTarget() if navTarget is not None: self.agent.navigateTo(navTarget) return None def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.target == None or self.target.isAlive() == False: # fails executability conditions print "exec", self.id, "false" return False elif distance(self.agent.getLocation(), self.target.getLocation()) < BIGBULLETRANGE: # succeeded print "exec", self.id, "true" return True else: # executing self.timer = self.timer - 1 if self.timer <= 0: navTarget = self.chooseNavigationTarget() if navTarget is not None: self.agent.navigateTo(navTarget) return None return ret def chooseNavigationTarget(self): if self.target is not None: return self.target.getLocation() else: return None ################## ### KillHero ### ### Kill the enemy hero. Assumes it is already in range. ### Parameters: ### 0: node ID string (optional) class KillHero(BTNode): ### target: the minion to shoot def ParseArgs(self, args): BTNode.parseArgs(self, args) self.target = None # First argument is the node ID if len(args) > 0: self.id = args[0] def enter(self): BTNode.enter(self) self.agent.stopMoving() enemies = self.agent.world.getEnemyNPCs(self.agent.getTeam()) for e in enemies: if isinstance(e, Hero): self.target = e return None def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.target == None or distance(self.agent.getLocation(), self.target.getLocation()) > BIGBULLETRANGE: # failed executability conditions if self.target == None: print "foo none" else: print "foo dist", distance(self.agent.getLocation(), self.target.getLocation()) print "exec", self.id, "false" return False elif self.target.isAlive() == False: # succeeded print "exec", self.id, "true" return True else: #executing self.shootAtTarget() return None return ret def shootAtTarget(self): if self.agent is not None and self.target is not None: self.agent.turnToFace(self.target.getLocation()) self.agent.shoot() ################## ### HitpointDaemon ### ### Only execute children if hitpoints are above a certain threshold. ### Parameters: ### 0: percentage of hitpoints that must be remaining to pass the daemon check ### 1: node ID string (optional) class HitpointDaemon(BTNode): ### percentage: percentage of hitpoints that must be remaining to pass the daemon check def parseArgs(self, args): BTNode.parseArgs(self, args) self.percentage = 0.5 # First argument is the factor if len(args) > 0: self.percentage = args[0] # Second argument is the node ID if len(args) > 1: self.id = args[1] def execute(self, delta = 0): ret = BTNode.execute(self, delta) if self.agent.getHitpoints() < self.agent.getMaxHitpoints() * self.percentage: # Check failed print "exec", self.id, "fail" return False else: # Check didn't fail, return child's status return self.getChild(0).execute(delta) return ret ################## ### BuffDaemon ### ### Only execute children if agent's level is significantly above enemy hero's level. ### Parameters: ### 0: Number of levels above enemy level necessary to not fail the check ### 1: node ID string (optional) class BuffDaemon(BTNode): ### advantage: Number of levels above enemy level necessary to not fail the check def parseArgs(self, args): BTNode.parseArgs(self, args) self.advantage = 0 # First argument is the advantage if len(args) > 0: self.advantage = args[0] # Second argument is the node ID if len(args) > 1: self.id = args[1] def execute(self, delta = 0): ret = BTNode.execute(self, delta) hero = None # Get a reference to the enemy hero enemies = self.agent.world.getEnemyNPCs(self.agent.getTeam()) for e in enemies: if isinstance(e, Hero): hero = e break if hero == None or self.agent.level <= hero.level + self.advantage: # fail check print "exec", self.id, "fail" return False else: # Check didn't fail, return child's status return self.getChild(0).execute(delta) return ret ################################# ### MY CUSTOM BEHAVIOR CLASSES
24.847561
128
0.664703
1,677
12,225
4.845558
0.157424
0.046517
0.037657
0.025843
0.738125
0.726803
0.708467
0.680532
0.669333
0.669333
0
0.009713
0.199918
12,225
491
129
24.898167
0.821082
0.244663
0
0.837638
0
0
0.019298
0
0
0
0
0
0
0
null
null
0
0.02583
null
null
0.062731
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
d435f4a9ddd857a2b12240748a5222bad0e3b32a
82
py
Python
pykodi/__init__.py
cgtobi/PyKodi
626e3d0ec0b0ad960d25a6f0bfb6c7fcfa3ea4bf
[ "MIT" ]
6
2020-09-05T07:26:44.000Z
2022-01-02T03:01:36.000Z
pykodi/__init__.py
cgtobi/PyKodi
626e3d0ec0b0ad960d25a6f0bfb6c7fcfa3ea4bf
[ "MIT" ]
7
2020-08-29T02:54:35.000Z
2021-09-12T18:23:08.000Z
pykodi/__init__.py
cgtobi/PyKodi
626e3d0ec0b0ad960d25a6f0bfb6c7fcfa3ea4bf
[ "MIT" ]
5
2020-08-28T09:56:28.000Z
2021-10-02T19:13:50.000Z
from .kodi import get_kodi_connection, Kodi, CannotConnectError, InvalidAuthError
41
81
0.865854
9
82
7.666667
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.085366
82
1
82
82
0.92
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
d45b37e02cf02a1791f26a0d796667f668461705
5,157
py
Python
query_builder.py
MattWellie/PAGE_MPO
55296a55c8606e877673d6398ec31db472ec8a04
[ "Apache-2.0" ]
1
2016-04-12T08:18:22.000Z
2016-04-12T08:18:22.000Z
query_builder.py
MattWellie/PAGE_MPO
55296a55c8606e877673d6398ec31db472ec8a04
[ "Apache-2.0" ]
null
null
null
query_builder.py
MattWellie/PAGE_MPO
55296a55c8606e877673d6398ec31db472ec8a04
[ "Apache-2.0" ]
null
null
null
# Script to build queries based on results from variants passing filters in_file = 'summary.txt' template = 'zgrep {} /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/{}/{}/{}/vcf/{}.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep {}' with open(in_file, 'r') as handle: for line in handle: list = line.split('\t') if list[0] = 'proband': continue else: PP = list[0] pp1 = PP[:2] pp2 = PP[2:] pos = list[4] gene = list[5] print template.format(gene, pp1, pp2, PP, PP, pos) """ Results are: zgrep LAMA5 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/00/04/PP0004/vcf/PP0004.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 60886088 zgrep LAMA5 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/00/04/PP0004/vcf/PP0004.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 60892813 zgrep ATP6V1B2 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/00/25/PP0025/vcf/PP0025.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 20069263 zgrep AGAP1 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/00/65/PP0065/vcf/PP0065.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 236839424 zgrep DNAJC16 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/67/PP0267/vcf/PP0267.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 15894604 zgrep CLSPN /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/67/PP0267/vcf/PP0267.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 36216977 zgrep DHX33 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/67/PP0267/vcf/PP0267.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 5365725 zgrep SCN4A /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/03/15/PP0315/vcf/PP0315.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 62022122 zgrep KIF26B /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/73/PP0273/vcf/PP0273.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 245766015 zgrep KIF26B /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/73/PP0273/vcf/PP0273.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 245851740 zgrep RP11-445F12.2,RNA5SP439,SYNRG,C17orf78,CTC-268N12.3,RP11-445F12.1,CTD-3194G12.1,CTD-3194G12.2,LHX1,DDX52,TADA2A,RP11-378E13.4,HNF1B,HMGB1P24,RP11-697E22.1,RP11-697E22.3,RP11-697E22.2,CTC-421K24.1,CTB-75G16.1,ZNHIT3,MRM1,ACACA,CTB-75G16.3,MIR2909,DHRS11,YWHAEP7,RP11-378E13.3,CTC-268N12.2,PIGW,DUSP14,RP11-333J10.2,RP11-333J10.3,RP11-19G24.2,RP11-19G24.1,AATF,MYO19,AC091199.1,RP11-115K3.1,GGNBP2 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/70/PP0270/vcf/PP0270.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 34842342 zgrep RP11-445F12.2,RNA5SP439,SYNRG,C17orf78,CTC-268N12.3,RP11-445F12.1,CTD-3194G12.1,CTD-3194G12.2,LHX1,DDX52,TADA2A,RP11-378E13.4,HNF1B,HMGB1P24,RP11-697E22.1,RP11-697E22.3,RP11-697E22.2,CTC-421K24.1,CTB-75G16.1,ZNHIT3,MRM1,ACACA,CTB-75G16.3,MIR2909,DHRS11,YWHAEP7,RP11-378E13.3,CTC-268N12.2,PIGW,DUSP14,RP11-333J10.2,RP11-333J10.3,RP11-19G24.2,RP11-19G24.1,AATF,MYO19,AC091199.1,RP11-115K3.1,GGNBP2 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/70/PP0270/vcf/PP0270.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 34842342 zgrep TSSK1A,LINC00896,CRKL,KRT18P62,DGCR9,DGCR8,SLC9A3P2,BCRP5,RNU6-225P,XXbac-B444P24.14,TMEM191A,DGCR5,XXbac-B444P24.13,XXbac-B444P24.10,DGCR6,XXbac-B135H6.18,AC000067.1,RTN4R,XXbac-B135H6.15,GSC2,Y_RNA,SLC25A1,AC007731.1,MIR1286,SNAP29,AC006547.13,SMPD4P1,MRPL40,LZTR1,SLC7A4,MIR3618,AC000078.5,TANGO2,AC000081.2,SEPT5,CA15P1,CA15P2,AC002472.1,RNY1P9,POM121L4P,AC007050.18,USP41,AC000095.9,XXbac-B33L19.10,DGCR6L,ZNF74,AC007050.1,AC006547.14,AC006547.15,TXNRD2,CLDN5,GGTLC3,AC004471.10,AC000068.10,MIR4761,CDC45,RN7SL168P,SNORA77,MIR1306,SERPIND1,ZDHHC8,PRODH,C22orf29,TUBA3FP,AIFM3,ABHD17AP4,DGCR2,PI4KA,AC007326.9,KRT18P5,TBX1,FAM230A,P2RX6P,AC000077.2,RN7SL812P,XXbac-B33L19.4,XXbac-B33L19.6,XXbac-B33L19.3,GP1BB,AC007308.6,AC007308.7,C22orf39,RANBP1,PI4KAP1,TSSK2,ARVCF,MIR185,AC007050.17,COMT,AC004461.4,AC011718.2,AC011718.3,AC011718.1,SCARF2,HIRA,AC023490.1,AC023490.2,SCARNA17,AC002472.11,AC006547.8,AC002472.13,SCARNA18,RN7SL389P,GNB1L,AC000068.9,TRMT2A,RN7SKP131,AC000068.5,KLHL22,RIMBP3,SNORA15,AC004463.6,MED15,P2RX6,AC004471.9,snoU13,MIR649,CLTCL1,XXbac-B444P24.8,THAP7-AS1,XXbac-B562F10.11,THAP7,AC000089.3,DGCR11,DGCR10,DGCR14,PPP1R26P2,PPP1R26P3,UFD1L /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/02/25/PP0225/vcf/PP0225.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 18893860 zgrep CHRNA1 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/03/03/PP0303/vcf/PP0303.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 175614789 zgrep CHRNA1 /lustre/scratch115/realdata/mdt3/projects/pagedata/data_freezes/2015-09-03/PP/03/03/PP0303/vcf/PP0303.uber_vep_tabix_qc.2015-11-11.vcf.gz | grep 175619069 """
135.710526
1,329
0.780299
876
5,157
4.517123
0.295662
0.064695
0.097043
0.113217
0.627748
0.627748
0.627748
0.627748
0.627748
0.627748
0
0.305226
0.068645
5,157
38
1,330
135.710526
0.518634
0.013574
0
0
0
0.076923
0.305054
0.232852
0
0
0
0
0
0
null
null
0
0
null
null
0.076923
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
0
1
1
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
d4607c90fb8ba57aec697a1345e7065e545e7f18
550
py
Python
src/raw/hm_generation/test_level_curves.py
Leikt/map_generator
86c6359ed84056f32642cb7e23db855beba62923
[ "MIT" ]
1
2021-06-09T10:02:04.000Z
2021-06-09T10:02:04.000Z
src/raw/hm_generation/test_level_curves.py
Leikt/map_generator
86c6359ed84056f32642cb7e23db855beba62923
[ "MIT" ]
null
null
null
src/raw/hm_generation/test_level_curves.py
Leikt/map_generator
86c6359ed84056f32642cb7e23db855beba62923
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # coding: utf-8 import logging import random import numpy as np from src.helpers.chrono import chrono DATA = [ [3,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,3,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,1], [1,1,1,1,1,1,1,1,1,4], ] @chrono def generate(parameters: object, width: int, height: int, seed: int) -> object: heightmap = np.array(DATA) return heightmap
21.153846
79
0.545455
140
550
2.142857
0.228571
0.633333
0.93
1.213333
0.33
0.33
0.33
0.33
0.33
0.33
0
0.226667
0.181818
550
26
80
21.153846
0.44
0.065455
0
0.35
0
0
0
0
0
0
0
0
0
1
0.05
false
0
0.2
0
0.3
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
d4658050abdee14c93f40b2c001c101d467a8da9
80
py
Python
MHD/FEniCS/MyPackage/PackageName/Assemble/__init__.py
wathen/PhD
35524f40028541a4d611d8c78574e4cf9ddc3278
[ "MIT" ]
3
2020-10-25T13:30:20.000Z
2021-08-10T21:27:30.000Z
MHD/FEniCS/MyPackage/PackageName/Assemble/__init__.py
wathen/PhD
35524f40028541a4d611d8c78574e4cf9ddc3278
[ "MIT" ]
null
null
null
MHD/FEniCS/MyPackage/PackageName/Assemble/__init__.py
wathen/PhD
35524f40028541a4d611d8c78574e4cf9ddc3278
[ "MIT" ]
3
2019-10-28T16:12:13.000Z
2020-01-13T13:59:44.000Z
from SystemAssemble import * from InitialGuess import * from NonLinTol import *
20
28
0.8125
9
80
7.222222
0.555556
0.307692
0
0
0
0
0
0
0
0
0
0
0.15
80
3
29
26.666667
0.955882
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
d4796ffbe1ec1b769e170295a176fd57dadaa4e4
57
py
Python
intro/a-hello.py
jwrr/python-stuff
7be2a408b751fe6636537d478296350256e2f133
[ "MIT" ]
null
null
null
intro/a-hello.py
jwrr/python-stuff
7be2a408b751fe6636537d478296350256e2f133
[ "MIT" ]
null
null
null
intro/a-hello.py
jwrr/python-stuff
7be2a408b751fe6636537d478296350256e2f133
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys print('Hello, World!')
7.125
22
0.649123
8
57
4.625
1
0
0
0
0
0
0
0
0
0
0
0.020833
0.157895
57
7
23
8.142857
0.75
0.298246
0
0
0
0
0.351351
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
5
2e0557b2f3ec02f66e7f5b1df03aae704994c4b9
158
py
Python
503-Triggering-Lambda-Functions-on-a-Schedule/lambda_function.py
AWSCookbook/Serverless
ad39607b2901774b99056505e0ed03386c10ef7e
[ "MIT" ]
5
2021-12-16T19:21:12.000Z
2022-02-10T02:23:16.000Z
503-Triggering-Lambda-Functions-on-a-Schedule/lambda_function.py
AWSCookbook/Serverless
ad39607b2901774b99056505e0ed03386c10ef7e
[ "MIT" ]
null
null
null
503-Triggering-Lambda-Functions-on-a-Schedule/lambda_function.py
AWSCookbook/Serverless
ad39607b2901774b99056505e0ed03386c10ef7e
[ "MIT" ]
4
2021-11-25T13:42:24.000Z
2022-02-25T06:53:11.000Z
import os from datetime import datetime def lambda_handler(event, context): print('AWS Cookbook Lambda function run at {}'.format(str(datetime.now())))
22.571429
79
0.746835
22
158
5.318182
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.139241
158
6
80
26.333333
0.860294
0
0
0
0
0
0.240506
0
0
0
0
0
0
1
0.25
false
0
0.5
0
0.75
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
2e5499770c3dccc0537f2ea2f2a637787686ec42
271
py
Python
tests/roots/test-ext-autodoc/target/docstring_signature.py
hatchermarie2/sphinx
204564549cae0d2fc88ea270df8dde0535277a70
[ "BSD-2-Clause" ]
1
2020-12-03T18:37:30.000Z
2020-12-03T18:37:30.000Z
tests/roots/test-ext-autodoc/target/docstring_signature.py
hatchermarie2/sphinx
204564549cae0d2fc88ea270df8dde0535277a70
[ "BSD-2-Clause" ]
4
2019-11-05T16:18:23.000Z
2022-03-02T11:13:20.000Z
tests/roots/test-ext-autodoc/target/docstring_signature.py
hatchermarie2/sphinx
204564549cae0d2fc88ea270df8dde0535277a70
[ "BSD-2-Clause" ]
1
2019-11-05T15:21:55.000Z
2019-11-05T15:21:55.000Z
class A: """A(foo, bar)""" class B: """B(foo, bar)""" def __init__(self): """B(foo, bar, baz)""" class C: """C(foo, bar)""" def __new__(cls): """C(foo, bar, baz)""" class D: def __init__(self): """D(foo, bar, baz)"""
13.55
30
0.435424
38
271
2.789474
0.342105
0.339623
0.254717
0.264151
0
0
0
0
0
0
0
0
0.306273
271
19
31
14.263158
0.56383
0.317343
0
0.285714
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0
1
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
2e6370380e1bc57baba6d277f231ee16c4dc7578
101
py
Python
ufora/FORA/python/PurePython/testModules/import_example/B.py
ufora/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
571
2015-11-05T20:07:07.000Z
2022-01-24T22:31:09.000Z
ufora/FORA/python/PurePython/testModules/import_example/B.py
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
218
2015-11-05T20:37:55.000Z
2021-05-30T03:53:50.000Z
ufora/FORA/python/PurePython/testModules/import_example/B.py
timgates42/ufora
04db96ab049b8499d6d6526445f4f9857f1b6c7e
[ "Apache-2.0", "CC0-1.0", "MIT", "BSL-1.0", "BSD-3-Clause" ]
40
2015-11-07T21:42:19.000Z
2021-05-23T03:48:19.000Z
import ufora.FORA.python.PurePython.testModules.import_example.A as A def f(x): return A.C.g(x)
20.2
69
0.742574
19
101
3.894737
0.789474
0
0
0
0
0
0
0
0
0
0
0
0.128713
101
4
70
25.25
0.840909
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
0
0
0
5
5cf53c5f1d898d236ac6edb281000a1a27e35aa8
80
py
Python
tf_label.py
yashpatel5400/dl-playground
acf71dab5bb29b253bb28b966115d72d18b76a8e
[ "MIT" ]
null
null
null
tf_label.py
yashpatel5400/dl-playground
acf71dab5bb29b253bb28b966115d72d18b76a8e
[ "MIT" ]
null
null
null
tf_label.py
yashpatel5400/dl-playground
acf71dab5bb29b253bb28b966115d72d18b76a8e
[ "MIT" ]
1
2018-01-15T03:56:22.000Z
2018-01-15T03:56:22.000Z
""" classic labelling of images done in Tensorflow """ import tensorflow as tf
13.333333
46
0.75
11
80
5.454545
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.175
80
5
47
16
0.909091
0.575
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
5cfc17aba7028bfa1f434dc21ee1e679bee882bb
36
py
Python
tests/__init__.py
robotics-4-all/goalee
a50185b51ccc28caf1f5dd3ba8603a35b8f0eebb
[ "MIT" ]
null
null
null
tests/__init__.py
robotics-4-all/goalee
a50185b51ccc28caf1f5dd3ba8603a35b8f0eebb
[ "MIT" ]
null
null
null
tests/__init__.py
robotics-4-all/goalee
a50185b51ccc28caf1f5dd3ba8603a35b8f0eebb
[ "MIT" ]
null
null
null
"""Unit test package for goalee."""
18
35
0.666667
5
36
4.8
1
0
0
0
0
0
0
0
0
0
0
0
0.138889
36
1
36
36
0.774194
0.805556
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
cf108751f2e11fe6a71c4313621abdabe48c7803
1,096
py
Python
Lib/graph/AxisDisplay.py
jeamick/ares-visual
3cf5068f874b3f6fe898968b2a7efa86fadca99d
[ "MIT" ]
null
null
null
Lib/graph/AxisDisplay.py
jeamick/ares-visual
3cf5068f874b3f6fe898968b2a7efa86fadca99d
[ "MIT" ]
2
2019-03-27T00:36:09.000Z
2019-04-09T00:39:12.000Z
Lib/graph/AxisDisplay.py
jeamick/ares-visual
3cf5068f874b3f6fe898968b2a7efa86fadca99d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: Olivier Noguès DISPLAYS = {'TIMESTAMP': {'tickFormat': "function(d) { return d3.time.format('%%x')(new Date(d)) }"}, 'FLOAT': {'tickFormat': "function(d) { return d3.format(',.%(digits)sf')(d) }"}, 'K': {'tickFormat': "function(d) { return d3.format(',.%(digits)sf')(d / 1000) + 'K' }", 'labelString': '1K = 1000'}, 'M': {'tickFormat': "function(d) { return d3.format(',.%(digits)sf')(d / 1000000) + 'Mio'}", 'labelString': '1Mio = 1000000'}, 'G': {'tickFormat': "function(d) { return d3.format(',.%(digits)sf')(d / 1000000000) + 'G'}", 'labelString': '1G = 1000000000'}, '%': {'tickFormat': "function(d) { return d3.format(',.%(digits)s%')(d) }"}, 'INT': {'tickFormat': "function(d) { return d3.format(',')(d) }"}, 'MONTH': {'tickValues': "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]", 'tickFormat': 'function(d){ return months[d] }'}, 'DAYS': {'tickValues': "[0, 1, 2, 3, 4, 5, 6]", 'tickFormat': 'function(d){ return months[d] }'}, }
68.5
136
0.515511
131
1,096
4.312977
0.412214
0.286726
0.302655
0.39823
0.646018
0.59823
0.426549
0.357522
0.297345
0
0
0.087156
0.20438
1,096
16
137
68.5
0.56078
0.059307
0
0.166667
0
0.333333
0.730769
0.164694
0
0
0
0
0
1
0
false
0
0
0
0
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
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
cf15a5a884a752757087e12b7d4a7552aa38a5be
98
py
Python
modules/__init__.py
sungyihsun/meta-transfer-learning
b96dfdfcdcdbdc553139b5abe42cf045e33e1f57
[ "MIT" ]
null
null
null
modules/__init__.py
sungyihsun/meta-transfer-learning
b96dfdfcdcdbdc553139b5abe42cf045e33e1f57
[ "MIT" ]
null
null
null
modules/__init__.py
sungyihsun/meta-transfer-learning
b96dfdfcdcdbdc553139b5abe42cf045e33e1f57
[ "MIT" ]
null
null
null
from .encoder import Encoder from .decoder import Decoder from .discriminator import Discriminator
32.666667
40
0.857143
12
98
7
0.416667
0
0
0
0
0
0
0
0
0
0
0
0.112245
98
3
40
32.666667
0.965517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
cf5044ba0032e131c908b1d912fc172c3e766fe1
3,225
py
Python
python/printcolors.py
liweitianux/atoolbox
88d85c80d025e0fd6b7c8fad155dc3a1cdc8b992
[ "MIT" ]
4
2016-05-28T02:14:39.000Z
2019-07-10T06:58:33.000Z
python/printcolors.py
liweitianux/atoolbox
88d85c80d025e0fd6b7c8fad155dc3a1cdc8b992
[ "MIT" ]
1
2020-06-15T04:06:40.000Z
2020-06-15T04:06:40.000Z
python/printcolors.py
liweitianux/atoolbox
88d85c80d025e0fd6b7c8fad155dc3a1cdc8b992
[ "MIT" ]
3
2018-11-27T12:34:35.000Z
2020-08-20T01:03:48.000Z
#!/usr/bin/env python3 # Credit: https://www.geeksforgeeks.org/print-colors-python-terminal/ class colors: reset = '\033[0m' bold = '\033[01m' disable = '\033[02m' underline = '\033[04m' reverse = '\033[07m' strikethrough = '\033[09m' invisible = '\033[08m' class fg: black = '\033[30m' red = '\033[31m' green = '\033[32m' orange = '\033[33m' blue = '\033[34m' purple = '\033[35m' cyan = '\033[36m' lightgray = '\033[37m' darkgray = '\033[90m' lightred = '\033[91m' lightgreen = '\033[92m' yellow = '\033[93m' lightblue = '\033[94m' pink = '\033[95m' lightcyan = '\033[96m' class bg: black = '\033[40m' red = '\033[41m' green = '\033[42m' orange = '\033[43m' blue = '\033[44m' purple = '\033[45m' cyan = '\033[46m' lightgray = '\033[47m' if __name__ == '__main__': C = colors text = 'hello world' print(f'{text}') print(f'{C.fg.red}{text}{C.reset}') print(f'{C.fg.green}{text}{C.reset}') print(f'{C.fg.orange}{text}{C.reset}') print(f'{C.fg.blue}{text}{C.reset}') print(f'{C.fg.purple}{text}{C.reset}') print(f'{C.fg.cyan}{text}{C.reset}') print(f'{C.fg.lightgray}{text}{C.reset}') print(f'{C.fg.darkgray}{text}{C.reset}') print(f'{C.fg.lightred}{text}{C.reset}') print(f'{C.fg.lightgreen}{text}{C.reset}') print(f'{C.fg.yellow}{text}{C.reset}') print(f'{C.fg.lightblue}{text}{C.reset}') print(f'{C.fg.pink}{text}{C.reset}') print(f'{C.fg.lightcyan}{text}{C.reset}') print(f'{C.bold}{text}{C.reset}') print(f'{C.bold}{C.fg.red}{text}{C.reset}') print(f'{C.bold}{C.fg.green}{text}{C.reset}') print(f'{C.bold}{C.fg.orange}{text}{C.reset}') print(f'{C.bold}{C.fg.blue}{text}{C.reset}') print(f'{C.bold}{C.fg.purple}{text}{C.reset}') print(f'{C.bold}{C.fg.cyan}{text}{C.reset}') print(f'{C.bold}{C.fg.lightgray}{text}{C.reset}') print(f'{C.bold}{C.fg.darkgray}{text}{C.reset}') print(f'{C.bold}{C.fg.lightred}{text}{C.reset}') print(f'{C.bold}{C.fg.lightgreen}{text}{C.reset}') print(f'{C.bold}{C.fg.yellow}{text}{C.reset}') print(f'{C.bold}{C.fg.lightblue}{text}{C.reset}') print(f'{C.bold}{C.fg.pink}{text}{C.reset}') print(f'{C.bold}{C.fg.lightcyan}{text}{C.reset}') print(f'{C.reverse}{text}{C.reset}') print(f'{C.reverse}{C.fg.red}{text}{C.reset}') print(f'{C.reverse}{C.fg.green}{text}{C.reset}') print(f'{C.reverse}{C.fg.orange}{text}{C.reset}') print(f'{C.reverse}{C.fg.blue}{text}{C.reset}') print(f'{C.reverse}{C.fg.purple}{text}{C.reset}') print(f'{C.reverse}{C.fg.cyan}{text}{C.reset}') print(f'{C.reverse}{C.fg.lightgray}{text}{C.reset}') print(f'{C.reverse}{C.fg.darkgray}{text}{C.reset}') print(f'{C.reverse}{C.fg.lightred}{text}{C.reset}') print(f'{C.reverse}{C.fg.lightgreen}{text}{C.reset}') print(f'{C.reverse}{C.fg.yellow}{text}{C.reset}') print(f'{C.reverse}{C.fg.lightblue}{text}{C.reset}') print(f'{C.reverse}{C.fg.pink}{text}{C.reset}') print(f'{C.reverse}{C.fg.lightcyan}{text}{C.reset}')
35.43956
69
0.562481
526
3,225
3.43346
0.146388
0.149502
0.170543
0.357143
0.715393
0.715393
0.704873
0.698782
0.698782
0
0
0.05654
0.177364
3,225
90
70
35.833333
0.624199
0.027597
0
0
0
0
0.566688
0.482451
0
0
0
0
0
1
0
false
0
0
0
0.123457
0.555556
0
0
0
null
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
d8a3a74fad16fec47235a9d823f25cc5971f4c22
151
py
Python
E2_6/MoreAsciiiArt.py
AidaNajafi/AidaNajafi.github.io
a5d86dc67a1d272794586e0a5c612a3893b75e69
[ "Apache-2.0" ]
null
null
null
E2_6/MoreAsciiiArt.py
AidaNajafi/AidaNajafi.github.io
a5d86dc67a1d272794586e0a5c612a3893b75e69
[ "Apache-2.0" ]
null
null
null
E2_6/MoreAsciiiArt.py
AidaNajafi/AidaNajafi.github.io
a5d86dc67a1d272794586e0a5c612a3893b75e69
[ "Apache-2.0" ]
null
null
null
def print_left_triangle(n): for i in range(n): print("%"*i) for j in range(i+1): print("*"*j) print_left_triangle(4)
16.777778
28
0.529801
24
151
3.166667
0.5
0.236842
0.447368
0
0
0
0
0
0
0
0
0.019231
0.311258
151
8
29
18.875
0.711538
0
0
0
0
0
0.013245
0
0
0
0
0
0
1
0.166667
false
0
0
0
0.166667
0.666667
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
d8c58bfa7fdd8b3334e66d386359e8af67f5a8ee
27,479
py
Python
spark_fhir_schemas/stu3/complex_types/plandefinition_action.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
2
2020-10-31T23:25:01.000Z
2021-06-09T14:12:42.000Z
spark_fhir_schemas/stu3/complex_types/plandefinition_action.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
spark_fhir_schemas/stu3/complex_types/plandefinition_action.py
icanbwell/SparkFhirSchemas
8c828313c39850b65f8676e67f526ee92b7d624e
[ "Apache-2.0" ]
null
null
null
from typing import Union, List, Optional from pyspark.sql.types import ( StructType, StructField, StringType, ArrayType, DataType, TimestampType, ) # This file is auto-generated by generate_schema so do not edit manually # noinspection PyPep8Naming class PlanDefinition_ActionSchema: """ This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols. """ # noinspection PyDefaultArgument @staticmethod def get_schema( max_nesting_depth: Optional[int] = 6, nesting_depth: int = 0, nesting_list: List[str] = [], max_recursion_limit: Optional[int] = 2, include_extension: Optional[bool] = False, extension_fields: Optional[List[str]] = [ "valueBoolean", "valueCode", "valueDate", "valueDateTime", "valueDecimal", "valueId", "valueInteger", "valuePositiveInt", "valueString", "valueTime", "valueUnsignedInt", "valueUri", "valueQuantity", ], extension_depth: int = 0, max_extension_depth: Optional[int] = 2, ) -> Union[StructType, DataType]: """ This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols. id: unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. extension: May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. label: A user-visible label for the action. title: The title of the action displayed to a user. description: A short description of the action used to provide a summary to display to the user. textEquivalent: A text equivalent of the action to be performed. This provides a human- interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically. code: A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template. reason: A description of why this action is necessary or appropriate. documentation: Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources. goalId: Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition. triggerDefinition: A description of when the action should be triggered. condition: An expression that describes applicability criteria, or start/stop conditions for the action. input: Defines input data requirements for the action. output: Defines the outputs of the action, if any. relatedAction: A relationship to another action such as "before" or "30-60 minutes after start of". timingDateTime: An optional value describing when the action should be performed. timingPeriod: An optional value describing when the action should be performed. timingDuration: An optional value describing when the action should be performed. timingRange: An optional value describing when the action should be performed. timingTiming: An optional value describing when the action should be performed. participant: Indicates who should participate in performing the action described. type: The type of action to perform (create, update, remove). groupingBehavior: Defines the grouping behavior for the action and its children. selectionBehavior: Defines the selection behavior for the action and its children. requiredBehavior: Defines the requiredness behavior for the action. precheckBehavior: Defines whether the action should usually be preselected. cardinalityBehavior: Defines whether the action can be selected multiple times. definition: A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken. transform: A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input. dynamicValue: Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result. action: Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition. """ from spark_fhir_schemas.stu3.complex_types.extension import ExtensionSchema from spark_fhir_schemas.stu3.complex_types.codeableconcept import ( CodeableConceptSchema, ) from spark_fhir_schemas.stu3.complex_types.relatedartifact import ( RelatedArtifactSchema, ) from spark_fhir_schemas.stu3.complex_types.triggerdefinition import ( TriggerDefinitionSchema, ) from spark_fhir_schemas.stu3.complex_types.plandefinition_condition import ( PlanDefinition_ConditionSchema, ) from spark_fhir_schemas.stu3.complex_types.datarequirement import ( DataRequirementSchema, ) from spark_fhir_schemas.stu3.complex_types.plandefinition_relatedaction import ( PlanDefinition_RelatedActionSchema, ) from spark_fhir_schemas.stu3.complex_types.period import PeriodSchema from spark_fhir_schemas.stu3.complex_types.duration import DurationSchema from spark_fhir_schemas.stu3.complex_types.range import RangeSchema from spark_fhir_schemas.stu3.complex_types.timing import TimingSchema from spark_fhir_schemas.stu3.complex_types.plandefinition_participant import ( PlanDefinition_ParticipantSchema, ) from spark_fhir_schemas.stu3.complex_types.coding import CodingSchema from spark_fhir_schemas.stu3.complex_types.reference import ReferenceSchema from spark_fhir_schemas.stu3.complex_types.plandefinition_dynamicvalue import ( PlanDefinition_DynamicValueSchema, ) if ( max_recursion_limit and nesting_list.count("PlanDefinition_Action") >= max_recursion_limit ) or (max_nesting_depth and nesting_depth >= max_nesting_depth): return StructType([StructField("id", StringType(), True)]) # add my name to recursion list for later my_nesting_list: List[str] = nesting_list + ["PlanDefinition_Action"] schema = StructType( [ # unique id for the element within a resource (for internal references). This # may be any string value that does not contain spaces. StructField("id", StringType(), True), # May be used to represent additional information that is not part of the basic # definition of the element. In order to make the use of extensions safe and # manageable, there is a strict set of governance applied to the definition and # use of extensions. Though any implementer is allowed to define an extension, # there is a set of requirements that SHALL be met as part of the definition of # the extension. StructField( "extension", ArrayType( ExtensionSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # A user-visible label for the action. StructField("label", StringType(), True), # The title of the action displayed to a user. StructField("title", StringType(), True), # A short description of the action used to provide a summary to display to the # user. StructField("description", StringType(), True), # A text equivalent of the action to be performed. This provides a human- # interpretable description of the action when the definition is consumed by a # system that may not be capable of interpreting it dynamically. StructField("textEquivalent", StringType(), True), # A code that provides meaning for the action or action group. For example, a # section may have a LOINC code for a the section of a documentation template. StructField( "code", ArrayType( CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # A description of why this action is necessary or appropriate. StructField( "reason", ArrayType( CodeableConceptSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Didactic or other informational resources associated with the action that can # be provided to the CDS recipient. Information resources can include inline # text commentary and links to web resources. StructField( "documentation", ArrayType( RelatedArtifactSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Identifies goals that this action supports. The reference must be to a goal # element defined within this plan definition. StructField("goalId", ArrayType(StringType()), True), # A description of when the action should be triggered. StructField( "triggerDefinition", ArrayType( TriggerDefinitionSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # An expression that describes applicability criteria, or start/stop conditions # for the action. StructField( "condition", ArrayType( PlanDefinition_ConditionSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Defines input data requirements for the action. StructField( "input", ArrayType( DataRequirementSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Defines the outputs of the action, if any. StructField( "output", ArrayType( DataRequirementSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # A relationship to another action such as "before" or "30-60 minutes after # start of". StructField( "relatedAction", ArrayType( PlanDefinition_RelatedActionSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # An optional value describing when the action should be performed. StructField("timingDateTime", TimestampType(), True), # An optional value describing when the action should be performed. StructField( "timingPeriod", PeriodSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # An optional value describing when the action should be performed. StructField( "timingDuration", DurationSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # An optional value describing when the action should be performed. StructField( "timingRange", RangeSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # An optional value describing when the action should be performed. StructField( "timingTiming", TimingSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # Indicates who should participate in performing the action described. StructField( "participant", ArrayType( PlanDefinition_ParticipantSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # The type of action to perform (create, update, remove). StructField( "type", CodingSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # Defines the grouping behavior for the action and its children. StructField("groupingBehavior", StringType(), True), # Defines the selection behavior for the action and its children. StructField("selectionBehavior", StringType(), True), # Defines the requiredness behavior for the action. StructField("requiredBehavior", StringType(), True), # Defines whether the action should usually be preselected. StructField("precheckBehavior", StringType(), True), # Defines whether the action can be selected multiple times. StructField("cardinalityBehavior", StringType(), True), # A reference to an ActivityDefinition that describes the action to be taken in # detail, or a PlanDefinition that describes a series of actions to be taken. StructField( "definition", ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # A reference to a StructureMap resource that defines a transform that can be # executed to produce the intent resource using the ActivityDefinition instance # as the input. StructField( "transform", ReferenceSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth + 1, max_extension_depth=max_extension_depth, ), True, ), # Customizations that should be applied to the statically defined resource. For # example, if the dosage of a medication must be computed based on the patient's # weight, a customization would be used to specify an expression that calculated # the weight, and the path on the resource that would contain the result. StructField( "dynamicValue", ArrayType( PlanDefinition_DynamicValueSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), # Sub actions that are contained within the action. The behavior of this action # determines the functionality of the sub-actions. For example, a selection # behavior of at-most-one indicates that of the sub-actions, at most one may be # chosen as part of realizing the action definition. StructField( "action", ArrayType( PlanDefinition_ActionSchema.get_schema( max_nesting_depth=max_nesting_depth, nesting_depth=nesting_depth + 1, nesting_list=my_nesting_list, max_recursion_limit=max_recursion_limit, include_extension=include_extension, extension_fields=extension_fields, extension_depth=extension_depth, max_extension_depth=max_extension_depth, ) ), True, ), ] ) if not include_extension: schema.fields = [ c if c.name != "extension" else StructField("extension", StringType(), True) for c in schema.fields ] return schema
49.780797
100
0.553659
2,514
27,479
5.835322
0.131663
0.066258
0.041922
0.062168
0.799796
0.796319
0.79441
0.752829
0.727198
0.695774
0
0.003359
0.404163
27,479
551
101
49.871143
0.892628
0.294771
0
0.637306
0
0
0.028344
0.002233
0
0
0
0
0
1
0.002591
false
0
0.044041
0
0.054404
0
0
0
0
null
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
d8d77a9aca9d5ca16392d0a4536f363d1cd5c254
2,012
py
Python
terrascript/resource/selectel/selectel.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/resource/selectel/selectel.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/resource/selectel/selectel.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/resource/selectel/selectel.py # Automatically generated by tools/makecode.py (24-Sep-2021 15:26:31 UTC) import terrascript class selectel_dbaas_database_v1(terrascript.Resource): pass class selectel_dbaas_datastore_v1(terrascript.Resource): pass class selectel_dbaas_extension_v1(terrascript.Resource): pass class selectel_dbaas_grant_v1(terrascript.Resource): pass class selectel_dbaas_user_v1(terrascript.Resource): pass class selectel_domains_domain_v1(terrascript.Resource): pass class selectel_domains_record_v1(terrascript.Resource): pass class selectel_mks_cluster_v1(terrascript.Resource): pass class selectel_mks_nodegroup_v1(terrascript.Resource): pass class selectel_vpc_crossregion_subnet_v2(terrascript.Resource): pass class selectel_vpc_floatingip_v2(terrascript.Resource): pass class selectel_vpc_keypair_v2(terrascript.Resource): pass class selectel_vpc_license_v2(terrascript.Resource): pass class selectel_vpc_project_v2(terrascript.Resource): pass class selectel_vpc_role_v2(terrascript.Resource): pass class selectel_vpc_subnet_v2(terrascript.Resource): pass class selectel_vpc_token_v2(terrascript.Resource): pass class selectel_vpc_user_v2(terrascript.Resource): pass class selectel_vpc_vrrp_subnet_v2(terrascript.Resource): pass __all__ = [ "selectel_dbaas_database_v1", "selectel_dbaas_datastore_v1", "selectel_dbaas_extension_v1", "selectel_dbaas_grant_v1", "selectel_dbaas_user_v1", "selectel_domains_domain_v1", "selectel_domains_record_v1", "selectel_mks_cluster_v1", "selectel_mks_nodegroup_v1", "selectel_vpc_crossregion_subnet_v2", "selectel_vpc_floatingip_v2", "selectel_vpc_keypair_v2", "selectel_vpc_license_v2", "selectel_vpc_project_v2", "selectel_vpc_role_v2", "selectel_vpc_subnet_v2", "selectel_vpc_token_v2", "selectel_vpc_user_v2", "selectel_vpc_vrrp_subnet_v2", ]
19.533981
73
0.784294
253
2,012
5.754941
0.173913
0.260989
0.300137
0.346154
0.594093
0.526099
0.49794
0.06456
0
0
0
0.028935
0.141153
2,012
102
74
19.72549
0.813657
0.056163
0
0.316667
1
0
0.244726
0.223629
0
0
0
0
0
1
0
false
0.316667
0.016667
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
5
d8e0f1b2fe03d6ce11609874936328987ab1e0a9
91
py
Python
oneshot/ignite/handlers/__init__.py
nganltp/admicro-LaSO
857d67a40af437ab57068fb0de35e4ada56c6209
[ "BSD-3-Clause" ]
83
2019-04-14T06:58:15.000Z
2022-03-01T01:34:03.000Z
oneshot/ignite/handlers/__init__.py
leokarlin/LaSO
8941bdc9316361ad03dbc2bcabd4bf9922c0ecc7
[ "BSD-3-Clause" ]
17
2019-04-28T04:26:24.000Z
2022-01-19T15:37:42.000Z
oneshot/ignite/handlers/__init__.py
nganltp/admicro-LaSO
857d67a40af437ab57068fb0de35e4ada56c6209
[ "BSD-3-Clause" ]
15
2019-09-05T04:22:10.000Z
2022-01-13T15:31:25.000Z
from .param_scheduler import ManualParamScheduler from .find_learning_rate import LRFinder
45.5
50
0.89011
11
91
7.090909
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.087912
91
2
51
45.5
0.939759
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9918b98160d81c07ac3345e699f045ef2411d605
17,128
py
Python
tests/test_map_mods.py
computational-ms/py-unimod-mapper
58382a78640d88e5753565c8c823fe50ddcfb0be
[ "MIT" ]
null
null
null
tests/test_map_mods.py
computational-ms/py-unimod-mapper
58382a78640d88e5753565c8c823fe50ddcfb0be
[ "MIT" ]
null
null
null
tests/test_map_mods.py
computational-ms/py-unimod-mapper
58382a78640d88e5753565c8c823fe50ddcfb0be
[ "MIT" ]
null
null
null
from unimod_mapper import UnimodMapper import numpy as np mod_dict = { "ufiles": "", "parameters": { "modifications": [ { "aa": "M", "type": "opt", "position": "any", "name": "Oxidation", }, { "aa": "C", "type": "fix", "position": "any", "name": "Carbamidomethyl", }, { "aa": "*", "type": "opt", "position": "Prot-N-term", "name": "Acetyl", }, ] }, } mod_dict_not_in_unimod = { "ufiles": "", "parameters": { "modifications": [ { "aa": "M", "type": "opt", "position": "any", "name": "Yadailation", }, { "aa": "C", "type": "fix", "position": "any", "name": "Yadailation", }, ] }, } mod_dict_id = { "ufiles": "", "parameters": { "modifications": [ { "aa": "M", "type": "opt", "position": "any", "id": 35, }, { "aa": "C", "type": "fix", "position": "any", "id": 4, }, { "aa": "*", "type": "opt", "position": "Prot-N-term", "id": "1", }, ] }, } mod_dict_id_not_in_unimod = { "ufiles": "", "parameters": { "modifications": [ { "aa": "M", "type": "opt", "position": "any", "id": 987654321, }, { "aa": "C", "type": "fix", "position": "any", "id": 123456789, }, ] }, } mod_dict_nl = { "ufiles": "", "parameters": { "modifications": [ { "aa": "M", "type": "opt", "position": "any", "name": "Oxidation", "neutral_loss": 0.0, }, { "aa": "C", "type": "fix", "position": "any", "name": "Carbamidomethyl", "neutral_loss": "unimod", }, { "aa": "M", "type": "fix", "position": "any", "name": "Carbamidomethyl", "neutral_loss": "unimod", }, ] }, } mod_dict_name_id = { "ufiles": "", "parameters": { "modifications": [ { "aa": "M", "type": "opt", "position": "any", "name": "Oxidation", "id": "35", }, { "aa": "C", "type": "fix", "position": "any", "name": "Carbamidomethyl", "id": "4", }, { "aa": "*", "type": "opt", "position": "Prot-N-term", "name": "Acetyl", "id": "1", }, ] }, } mod_dict_name_wrong_id = { "ufiles": "", "parameters": { "modifications": [ { "aa": "M", "type": "opt", "position": "any", "name": "Oxidation", "id": "3567", }, { "aa": "C", "type": "fix", "position": "any", "name": "Carbamidomethyl", "id": "4567", }, { "aa": "*", "type": "opt", "position": "Prot-N-term", "name": "Acetyl", "id": "1", # only this one is correct }, ] }, } unimod_dict = { "fix": [ { "aa": "C", "position": "any", "name": "Carbamidomethyl", "mass": 57.021464, "composition": {"H": 3, "C": 2, "N": 1, "O": 1}, "id": "4", "neutral_loss": None, "_id": 1, "org": { "aa": "C", "type": "fix", "position": "any", "name": "Carbamidomethyl", }, "unimod": True, } ], "opt": [ { "aa": "M", "position": "any", "name": "Oxidation", "mass": 15.994915, "composition": {"O": 1}, "id": "35", "neutral_loss": None, "_id": 0, "org": {"aa": "M", "type": "opt", "position": "any", "name": "Oxidation"}, "unimod": True, }, { "aa": "*", "position": "Prot-N-term", "name": "Acetyl", "mass": 42.010565, "composition": {"H": 2, "C": 2, "O": 1}, "id": "1", "neutral_loss": None, "_id": 2, "org": { "aa": "*", "type": "opt", "position": "Prot-N-term", "name": "Acetyl", }, "unimod": True, }, ], } unimod_dict_id = { "fix": [ { "aa": "C", "position": "any", "name": "Carbamidomethyl", "mass": 57.021464, "composition": {"H": 3, "C": 2, "N": 1, "O": 1}, "id": "4", "neutral_loss": None, "_id": 1, "org": {"aa": "C", "type": "fix", "position": "any", "id": "4"}, "unimod": True, } ], "opt": [ { "aa": "M", "position": "any", "name": "Oxidation", "mass": 15.994915, "composition": {"O": 1}, "id": "35", "neutral_loss": None, "_id": 0, "org": {"aa": "M", "type": "opt", "position": "any", "id": "35"}, "unimod": True, }, { "aa": "*", "position": "Prot-N-term", "name": "Acetyl", "mass": 42.010565, "composition": {"H": 2, "C": 2, "O": 1}, "id": "1", "neutral_loss": None, "_id": 2, "org": {"aa": "*", "type": "opt", "position": "Prot-N-term", "id": "1"}, "unimod": True, }, ], } unimod_dict_with_nl = { "fix": [ { "aa": "C", "position": "any", "name": "Carbamidomethyl", "mass": 57.021464, "composition": {"H": 3, "C": 2, "N": 1, "O": 1}, "id": "4", "neutral_loss": 0.0, "_id": 1, "org": { "aa": "C", "type": "fix", "position": "any", "name": "Carbamidomethyl", "neutral_loss": "unimod", }, "unimod": True, }, { "aa": "M", "position": "any", "name": "Carbamidomethyl", "mass": 57.021464, "composition": {"H": 3, "C": 2, "N": 1, "O": 1}, "id": "4", "neutral_loss": 105.024835, "_id": 2, "org": { "aa": "M", "type": "fix", "position": "any", "name": "Carbamidomethyl", "neutral_loss": "unimod", }, "unimod": True, }, ], "opt": [ { "aa": "M", "position": "any", "name": "Oxidation", "mass": 15.994915, "composition": {"O": 1}, "id": "35", "neutral_loss": 0.0, "_id": 0, "org": { "aa": "M", "type": "opt", "position": "any", "name": "Oxidation", "neutral_loss": 0.0, }, "unimod": True, } ], } unimod_dict_name_id = { "fix": [ { "aa": "C", "position": "any", "name": "Carbamidomethyl", "mass": 57.021464, "composition": {"H": 3, "C": 2, "N": 1, "O": 1}, "id": "4", "neutral_loss": None, "_id": 1, "org": { "aa": "C", "type": "fix", "position": "any", "name": "Carbamidomethyl", "id": "4", }, "unimod": True, } ], "opt": [ { "aa": "M", "position": "any", "name": "Oxidation", "mass": 15.994915, "composition": {"O": 1}, "id": "35", "neutral_loss": None, "_id": 0, "org": { "aa": "M", "type": "opt", "position": "any", "name": "Oxidation", "id": "35", }, "unimod": True, }, { "aa": "*", "position": "Prot-N-term", "name": "Acetyl", "mass": 42.010565, "composition": {"H": 2, "C": 2, "O": 1}, "id": "1", "neutral_loss": None, "_id": 2, "org": { "aa": "*", "type": "opt", "position": "Prot-N-term", "name": "Acetyl", "id": "1", }, "unimod": True, }, ], } unimod_dict_name_wrong_id = { "fix": [], "opt": [ { "aa": "*", "position": "Prot-N-term", "name": "Acetyl", "mass": 42.010565, "composition": {"H": 2, "C": 2, "O": 1}, "id": "1", "neutral_loss": None, "_id": 2, "org": { "aa": "*", "type": "opt", "position": "Prot-N-term", "name": "Acetyl", "id": "1", }, "unimod": True, } ], } def test_map_mods_by_name(): _output = UnimodMapper().map_mods(mod_list=mod_dict["parameters"]["modifications"]) assert _output == unimod_dict def test_map_mods_by_name_mod_not_in_unimod(): _output = UnimodMapper().map_mods( mod_list=mod_dict_not_in_unimod["parameters"]["modifications"] ) assert _output == {"fix": [], "opt": []} def test_map_mods_by_id(): _output = UnimodMapper().map_mods( mod_list=mod_dict_id["parameters"]["modifications"] ) assert _output == unimod_dict_id def test_map_mods_mod_not_in_unimod_by_id(): _output = UnimodMapper().map_mods( mod_list=mod_dict_id_not_in_unimod["parameters"]["modifications"] ) assert _output == {"fix": [], "opt": []} def test_map_mods_neutral_loss(): import pprint pprint.pprint(mod_dict_nl["parameters"]["modifications"]) _output = UnimodMapper().map_mods( mod_list=mod_dict_nl["parameters"]["modifications"] ) print("Output") pprint.pprint(_output) print("Expected") pprint.pprint(unimod_dict_with_nl) assert _output == unimod_dict_with_nl def test_map_mods_name_and_id(): _output = UnimodMapper().map_mods( mod_list=mod_dict_name_id["parameters"]["modifications"] ) assert _output == unimod_dict_name_id def test_map_mods_name_and_wrong_id(): _output = UnimodMapper().map_mods( mod_list=mod_dict_name_wrong_id["parameters"]["modifications"] ) assert _output == unimod_dict_name_wrong_id def test_map_TMTpro18(): mapper = UnimodMapper() mapped = mapper.mass_to_names(304.207146, decimals=4) # starts working from 3 on assert list(mapped) == ["TMTpro"] def test_map_composition_to_names(): mapper = UnimodMapper() mapped = mapper.composition_to_names({"C": 1, "O": 1}) assert list(mapped) == ["Formyl", "Ser->Asp", "Thr->Glu"] def test_map_composition_to_ids(): mapper = UnimodMapper() mapped = mapper.composition_to_ids({"C": 1, "O": 1}) assert list(mapped) == ["122", "1196", "1205"] # def test_map_all_masses(): # mapper = UnimodMapper() # for mod_dict in mapper.data_list: # mono_mass = mod_dict["mono_mass"] # name = mod_dict["unimodname"] # mapped_name = mapper.mass_to_names(mono_mass, decimals=5) # assert name in list(mapped_name) def test_map_mod_chemical_composition(): mapper = UnimodMapper() mod_list = [ { "aa": "M", # specify the modified amino acid as a single letter, use '*' if the amino acid is variable "type": "opt", # specify if it is a fixed (fix) or potential (opt) modification "position": "any", # specify the position within the protein/peptide (Prot-N-term, Prot-C-term), use 'any' if the positon is variable "name": "Oxidation", # specify the unimod PSI-MS Name (alternative to id) "id": None, # specify the unimod Accession (alternative to name) "composition": None, # For user-defined mods composition needs to be given as a Hill notation }, { "aa": "T", "type": "fix", "name": "Acetyl", }, ] rdict = mapper.map_mods(mod_list) assert rdict["opt"][0]["composition"] == {"O": 1} assert rdict["fix"][0]["composition"] == {"C": 2, "H": 2, "O": 1} assert rdict["fix"][0]["id"] == "1" def test_map_mod_userdefined_compositions(): mapper = UnimodMapper() mod_list = [ { "aa": "M", # specify the modified amino acid as a single letter, use '*' if the amino acid is variable "type": "opt", # specify if it is a fixed (fix) or potential (opt) modification "position": "any", # specify the position within the protein/peptide (Prot-N-term, Prot-C-term), use 'any' if the positon is variable "name": "TheOneAndOnly", # specify the unimod PSI-MS Name (alternative to id) "composition": { "H": 2, "O": 1, }, # For user-defined mods composition needs to be given as a Hill notation }, ] rdict = mapper.map_mods(mod_list) assert ( len(rdict["opt"]) == 0 ) # cause the name is not a unimod mod, but the composition exists already mod_list = [ { "aa": "M", # specify the modified amino acid as a single letter, use '*' if the amino acid is variable "type": "opt", # specify if it is a fixed (fix) or potential (opt) modification "position": "any", # specify the position within the protein/peptide (Prot-N-term, Prot-C-term), use 'any' if the positon is variable "name": "TheOneAndOnly", # specify the unimod PSI-MS Name (alternative to id) "composition": { "H": 222, "O": 111, }, # For user-defined mods composition needs to be given as a Hill notation }, ] rdict = mapper.map_mods(mod_list) assert rdict["opt"][0]["composition"] == {"H": 222, "O": 111} assert rdict["opt"][0]["name"] == "TheOneAndOnly" def test_map_mod_chemical_composition_fails(): mapper = UnimodMapper() # Using PSI-MS name works mod_list = [ { "aa": "N", "type": "opt", "name": "Ammonia-loss", }, ] rdict = mapper.map_mods(mod_list) assert rdict["opt"][0]["name"] == "Ammonia-loss" # Using Interim name for same ID doesn't work mod_list = [ { "aa": "D", "type": "opt", "name": "N-oxobutanoic", }, ] rdict = mapper.map_mods(mod_list) assert len(rdict["opt"]) == 0 # Using Interim name and ID doesn't work (cause name is checked first) # But using a wrong ID but correct name works (see test_map_mods_name_and_wrong_id) # Seems inconsistent mod_list = [ { "aa": "D", "type": "opt", "name": "N-oxobutanoic", "id": 385, }, ] rdict = mapper.map_mods(mod_list) assert len(rdict["opt"]) == 0 # Using just ID works mod_list = [ { "aa": "D", "type": "opt", "id": 385, }, ] rdict = mapper.map_mods(mod_list) assert rdict["opt"][0]["name"] == "Ammonia-loss" # Using Interim name if PSI MS name doesn't exist works mod_list = [ { "aa": "S", "type": "opt", "name": "Galactosyl", }, ] rdict = mapper.map_mods(mod_list) assert rdict["opt"][0]["composition"] == {"C": 6, "H": 10, "O": 6}
27.144216
146
0.402616
1,576
17,128
4.218909
0.109137
0.059558
0.060911
0.031584
0.819221
0.784328
0.731839
0.704617
0.662205
0.627764
0
0.030531
0.426319
17,128
630
147
27.187302
0.646143
0.112506
0
0.617021
0
0
0.207094
0
0
0
0
0
0.037234
1
0.02305
false
0
0.005319
0
0.028369
0.010638
0
0
0
null
0
0
0
1
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
5
992d70cccac7fb3028dc88ff4a902d8edbaea619
74
py
Python
src/modeling/feature_selection/__init__.py
NovaSBE-DSKC/retention-evaluation
5b68b9282f0b5479a9dc5238faef68067c76b861
[ "MIT" ]
null
null
null
src/modeling/feature_selection/__init__.py
NovaSBE-DSKC/retention-evaluation
5b68b9282f0b5479a9dc5238faef68067c76b861
[ "MIT" ]
null
null
null
src/modeling/feature_selection/__init__.py
NovaSBE-DSKC/retention-evaluation
5b68b9282f0b5479a9dc5238faef68067c76b861
[ "MIT" ]
null
null
null
from . import fs00_drop_pipeline1_columns, fs01_all, fs02_drop_agrupamento
74
74
0.891892
11
74
5.454545
0.909091
0
0
0
0
0
0
0
0
0
0
0.101449
0.067568
74
1
74
74
0.768116
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
995b9162b368f2eda0769502cd2a4c334654649a
94
py
Python
metric/__init__.py
DeepLearnXMU/WDCNMT
382db9d376988ff658fff8f99526a5170e95bb91
[ "MIT" ]
34
2018-12-18T08:54:24.000Z
2022-02-04T16:16:26.000Z
metric/__init__.py
DeepLearnXMU/H-RNNSearch
a28cb555984e920e317fc9376cec12924f422f69
[ "MIT" ]
3
2019-03-13T10:38:34.000Z
2020-03-26T09:38:28.000Z
metric/__init__.py
DeepLearnXMU/H-RNNSearch
a28cb555984e920e317fc9376cec12924f422f69
[ "MIT" ]
1
2019-03-31T00:39:51.000Z
2019-03-31T00:39:51.000Z
# metric/__init__.py # author: Playinf # email: playinf@stu.xmu.edu.cn from bleu import bleu
15.666667
31
0.744681
15
94
4.4
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.138298
94
5
32
18.8
0.814815
0.680851
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
9960442d8f1bfa9ead2f1b93a07ce1e20b424f87
199
py
Python
pyjarowinkler/__init__.py
GustavoPeredo/jaro-winkler-distance
2b97c6fea03e7b469b6065f13c71ce734d1758cf
[ "Apache-2.0" ]
null
null
null
pyjarowinkler/__init__.py
GustavoPeredo/jaro-winkler-distance
2b97c6fea03e7b469b6065f13c71ce734d1758cf
[ "Apache-2.0" ]
null
null
null
pyjarowinkler/__init__.py
GustavoPeredo/jaro-winkler-distance
2b97c6fea03e7b469b6065f13c71ce734d1758cf
[ "Apache-2.0" ]
null
null
null
from sys import version_info from pyjarowinkler import distance if version_info[:2] > (2, 7): from pyjarowinkler import cydistance __author__ = 'Jean-Bernard Ratte - jean.bernard.ratte@unary.ca'
33.166667
63
0.778894
28
199
5.321429
0.607143
0.147651
0.308725
0
0
0
0
0
0
0
0
0.017442
0.135678
199
5
64
39.8
0.848837
0
0
0
0
0
0.241206
0.135678
0
0
0
0
0
1
0
false
0
0.6
0
0.6
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
1
0
0
5
9972656fd26566a9759c9cae7dd14286d6883272
252
py
Python
scripts/by_county_charts.py
jguzman-tech/tamf
6f437ba1d8e4520ee13b71b74e04b23b8f8d4964
[ "Apache-2.0" ]
1
2021-03-15T19:49:03.000Z
2021-03-15T19:49:03.000Z
scripts/by_county_charts.py
jguzman-tech/tamf
6f437ba1d8e4520ee13b71b74e04b23b8f8d4964
[ "Apache-2.0" ]
null
null
null
scripts/by_county_charts.py
jguzman-tech/tamf
6f437ba1d8e4520ee13b71b74e04b23b8f8d4964
[ "Apache-2.0" ]
null
null
null
from tamf.utility import * import os.path if __name__ == '__main__': create_aggregate_bar_chart(1, './plots/category_subplots_by_county.png', './plots/category_subplots_aggregate.png')
31.5
73
0.587302
26
252
5.076923
0.769231
0.19697
0.318182
0
0
0
0
0
0
0
0
0.005814
0.31746
252
7
74
36
0.761628
0
0
0
0
0
0.34127
0.309524
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
51087f116a7bcfbdc002044967db617850c61faf
189
py
Python
binreconfiguration/strategy/minfreespace.py
vialette/binreconfiguration
57cc024fdcf9b083a830270176ade185b65a85d0
[ "MIT" ]
null
null
null
binreconfiguration/strategy/minfreespace.py
vialette/binreconfiguration
57cc024fdcf9b083a830270176ade185b65a85d0
[ "MIT" ]
null
null
null
binreconfiguration/strategy/minfreespace.py
vialette/binreconfiguration
57cc024fdcf9b083a830270176ade185b65a85d0
[ "MIT" ]
null
null
null
from .ascendinggaugedstrategy import AscendingGaugedStrategy from .gauge import FreeSpace class MinFreeSpace(AscendingGaugedStrategy): def _gauge(self, item): return FreeSpace(item)
18.9
60
0.825397
18
189
8.611111
0.611111
0
0
0
0
0
0
0
0
0
0
0
0.116402
189
9
61
21
0.928144
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.4
0.2
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
5
510d374481e956f25bdf0667bbc4f57ce3a253d9
40
py
Python
demo.py
mobai-ch/easyTracking
148224c0d7278db351710252aef695a2161ba1e1
[ "Apache-2.0" ]
null
null
null
demo.py
mobai-ch/easyTracking
148224c0d7278db351710252aef695a2161ba1e1
[ "Apache-2.0" ]
null
null
null
demo.py
mobai-ch/easyTracking
148224c0d7278db351710252aef695a2161ba1e1
[ "Apache-2.0" ]
null
null
null
''' 这个文件是用来看我Tracker的效果的,总之想法子调到能用吧 '''
10
31
0.75
2
40
15
1
0
0
0
0
0
0
0
0
0
0
0
0.075
40
3
32
13.333333
0.810811
0.775
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
5
512b8a04cf71753d6cc7b24c9d85bb3f6ab56ac3
112
py
Python
image_labelling_tool/admin.py
claytonbrown/image-labelling-tool
4a8f046d729f68a2fb214104a7522111a88c100a
[ "MIT" ]
61
2017-07-31T00:38:49.000Z
2022-01-22T02:09:36.000Z
image_labelling_tool/admin.py
JinyongJeong/image-labelling-tool
4620fcc73d88f8df4261c62267e768595de96ed1
[ "MIT" ]
4
2017-08-24T21:51:16.000Z
2020-04-03T09:32:59.000Z
image_labelling_tool/admin.py
JinyongJeong/image-labelling-tool
4620fcc73d88f8df4261c62267e768595de96ed1
[ "MIT" ]
22
2017-08-09T14:36:53.000Z
2022-02-07T01:37:54.000Z
from django.contrib import admin import models # Register your models here. admin.site.register(models.Labels)
18.666667
34
0.8125
16
112
5.6875
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.116071
112
5
35
22.4
0.919192
0.232143
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
512c96da59c008ffa0b94977a45de9c8a4241349
175
py
Python
bootcamp/questions/admin.py
Fadykhallaf/Signet
2a8edcd85324d24b50d7d14fc980c8e9f88bfd26
[ "MIT" ]
null
null
null
bootcamp/questions/admin.py
Fadykhallaf/Signet
2a8edcd85324d24b50d7d14fc980c8e9f88bfd26
[ "MIT" ]
null
null
null
bootcamp/questions/admin.py
Fadykhallaf/Signet
2a8edcd85324d24b50d7d14fc980c8e9f88bfd26
[ "MIT" ]
null
null
null
from django.contrib import admin from bootcamp.questions.models import Question,Answer,Tag admin.site.register(Question) admin.site.register(Answer) admin.site.register(Tag)
25
57
0.834286
25
175
5.84
0.52
0.184932
0.349315
0
0
0
0
0
0
0
0
0
0.068571
175
6
58
29.166667
0.895706
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
512ef8e6b88db2a5106ef94cd266be042eef6426
77
py
Python
dycco/__init__.py
rojalator/dycco
84ace8727aef84bb3d886cdaa3d3aef1089f1935
[ "MIT" ]
null
null
null
dycco/__init__.py
rojalator/dycco
84ace8727aef84bb3d886cdaa3d3aef1089f1935
[ "MIT" ]
1
2022-03-22T07:35:15.000Z
2022-03-22T09:15:44.000Z
dycco/__init__.py
rojalator/dycco
84ace8727aef84bb3d886cdaa3d3aef1089f1935
[ "MIT" ]
null
null
null
from .dycco import document, parse, preprocess_docs, preprocess_code # noqa
38.5
76
0.805195
10
77
6
0.9
0
0
0
0
0
0
0
0
0
0
0
0.12987
77
1
77
77
0.895522
0.051948
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
5139aeb60e15410718d7de8b5640e172ee23d311
72
py
Python
scrapy_github/scrapy_github/items/DataHydroClickItem.py
ljtnono/scrapys
00c60e60118c35feee598f1bdfa4b994c8fa922a
[ "MIT" ]
null
null
null
scrapy_github/scrapy_github/items/DataHydroClickItem.py
ljtnono/scrapys
00c60e60118c35feee598f1bdfa4b994c8fa922a
[ "MIT" ]
null
null
null
scrapy_github/scrapy_github/items/DataHydroClickItem.py
ljtnono/scrapys
00c60e60118c35feee598f1bdfa4b994c8fa922a
[ "MIT" ]
null
null
null
import scrapy class DataHydroClickItem(scrapy.Item): """ """
9
38
0.625
6
72
7.5
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.236111
72
7
39
10.285714
0.818182
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
51542ba5a69c0aab71d260c49e3744527c0e5194
115
py
Python
enthought/envisage/developer/ui/view/application_browser.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/envisage/developer/ui/view/application_browser.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/envisage/developer/ui/view/application_browser.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from envisage.developer.ui.view.application_browser import *
28.75
60
0.852174
15
115
6.133333
0.8
0
0
0
0
0
0
0
0
0
0
0
0.095652
115
3
61
38.333333
0.884615
0.104348
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
51636b536f2f9a1d136a5b0d2a24a53515b84525
91
py
Python
irv/constants.py
nathanllww/slivka-irv
6688ac88a34387df476d51f66d291e9f3b6454aa
[ "MIT" ]
null
null
null
irv/constants.py
nathanllww/slivka-irv
6688ac88a34387df476d51f66d291e9f3b6454aa
[ "MIT" ]
5
2021-10-08T17:44:32.000Z
2021-12-19T18:47:59.000Z
irv/constants.py
nathanllww/slivka-irv
6688ac88a34387df476d51f66d291e9f3b6454aa
[ "MIT" ]
null
null
null
NO_CONFIDENCE = "No Confidence" UNBREAKABLE_TIE_WINNER = "No Confidence (unbreakable tie)"
30.333333
58
0.802198
11
91
6.363636
0.454545
0.514286
0.657143
0.742857
0
0
0
0
0
0
0
0
0.10989
91
2
59
45.5
0.864198
0
0
0
0
0
0.483516
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
5aa44c63ba4e1bb26a1adcbb5cd194825abee1f6
35
py
Python
prof/Src/q_learning_stock/indicators/__init__.py
LaoKpa/reinforcement_trader
1465731269e6d58900a28a040346bf45ffb5cf97
[ "MIT" ]
7
2020-09-28T23:36:40.000Z
2022-02-22T02:00:32.000Z
prof/Src/q_learning_stock/indicators/__init__.py
LaoKpa/reinforcement_trader
1465731269e6d58900a28a040346bf45ffb5cf97
[ "MIT" ]
4
2020-11-13T18:48:52.000Z
2022-02-10T01:29:47.000Z
prof/q_learning_stock/indicators/__init__.py
lzcaisg/reinforcement_trader
1465731269e6d58900a28a040346bf45ffb5cf97
[ "MIT" ]
3
2020-11-23T17:31:59.000Z
2021-04-08T10:55:03.000Z
from .technical_indicators import *
35
35
0.857143
4
35
7.25
1
0
0
0
0
0
0
0
0
0
0
0
0.085714
35
1
35
35
0.90625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
5aecff1573ba4cf263e3b4a2440f9827f0031b9d
160
py
Python
knowledge_repo/app/deploy/__init__.py
djarratt/knowledge-repo
4a95a0c2a74068384536bfa067640dbe34c6405d
[ "Apache-2.0" ]
null
null
null
knowledge_repo/app/deploy/__init__.py
djarratt/knowledge-repo
4a95a0c2a74068384536bfa067640dbe34c6405d
[ "Apache-2.0" ]
null
null
null
knowledge_repo/app/deploy/__init__.py
djarratt/knowledge-repo
4a95a0c2a74068384536bfa067640dbe34c6405d
[ "Apache-2.0" ]
1
2021-06-07T14:52:26.000Z
2021-06-07T14:52:26.000Z
from .common import KnowledgeDeployer, get_app_builder from .flask import FlaskDeployer from .gunicorn import GunicornDeployer from .uwsgi import uWSGIDeployer
32
54
0.8625
19
160
7.157895
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.10625
160
4
55
40
0.951049
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5