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
09ea41b990a6705a2776f01e6fd00a9ec2c1185d
91
py
Python
fastargs/exceptions.py
lengstrom/fastargs
bf2e0ac826bfb81f7559cd44e956c6a4aad982f1
[ "MIT" ]
20
2021-04-02T06:43:37.000Z
2022-02-16T18:33:10.000Z
fastargs/exceptions.py
lengstrom/fastargs
bf2e0ac826bfb81f7559cd44e956c6a4aad982f1
[ "MIT" ]
16
2021-04-02T05:27:26.000Z
2022-03-07T18:11:11.000Z
fastargs/exceptions.py
lengstrom/fastargs
bf2e0ac826bfb81f7559cd44e956c6a4aad982f1
[ "MIT" ]
1
2021-11-11T03:31:10.000Z
2021-11-11T03:31:10.000Z
class MissingValueError(ValueError): pass class ValidationError(ValueError): pass
15.166667
36
0.769231
8
91
8.75
0.625
0.4
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
37
18.2
0.921053
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
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
09f7cad75d86a1b087725675c3b006f2758da273
19
py
Python
SQLlight.py
Sharadmishra88/pythonCodeSnippet
9e6b55f5a816e44e3a6a20caaed69eeb767ae1d8
[ "MIT" ]
null
null
null
SQLlight.py
Sharadmishra88/pythonCodeSnippet
9e6b55f5a816e44e3a6a20caaed69eeb767ae1d8
[ "MIT" ]
null
null
null
SQLlight.py
Sharadmishra88/pythonCodeSnippet
9e6b55f5a816e44e3a6a20caaed69eeb767ae1d8
[ "MIT" ]
null
null
null
# CRUD on SQLlight
19
19
0.736842
3
19
4.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.210526
19
1
19
19
0.933333
0.842105
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
61e71477481e4c10ed765681847b40fd96990d44
120
py
Python
app/__init__.py
jacekmiecznikowski/neo4index
24664a8e905b4763807302d44d8d181202ce2f69
[ "MIT" ]
null
null
null
app/__init__.py
jacekmiecznikowski/neo4index
24664a8e905b4763807302d44d8d181202ce2f69
[ "MIT" ]
null
null
null
app/__init__.py
jacekmiecznikowski/neo4index
24664a8e905b4763807302d44d8d181202ce2f69
[ "MIT" ]
null
null
null
from .views import app from .models import graph graph.run("CREATE CONSTRAINT ON (n:User) ASSERT n.username IS UNIQUE")
30
70
0.775
20
120
4.65
0.8
0
0
0
0
0
0
0
0
0
0
0
0.133333
120
4
70
30
0.894231
0
0
0
0
0
0.471074
0
0
0
0
0
0.333333
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
111218a8028e886be81ff24759649795d9cd2833
180
py
Python
geomstats/backend/tensorflow_random.py
leslie-chu/geomstats
fbed39b47b16eab4a48179106e8d0c1a5891243d
[ "MIT" ]
1
2018-05-31T11:43:07.000Z
2018-05-31T11:43:07.000Z
geomstats/backend/tensorflow_random.py
leslie-chu/geomstats
fbed39b47b16eab4a48179106e8d0c1a5891243d
[ "MIT" ]
null
null
null
geomstats/backend/tensorflow_random.py
leslie-chu/geomstats
fbed39b47b16eab4a48179106e8d0c1a5891243d
[ "MIT" ]
null
null
null
"""Tensorflow based random backend.""" import tensorflow as tf def rand(*args): return tf.random_uniform(shape=args) def seed(*args): return tf.set_random_seed(*args)
15
40
0.711111
26
180
4.807692
0.576923
0.16
0.192
0
0
0
0
0
0
0
0
0
0.161111
180
11
41
16.363636
0.827815
0.177778
0
0
0
0
0
0
0
0
0
0
0
1
0.4
true
0
0.2
0.4
1
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
1
0
0
1
0
0
0
5
1115be7caa74f114414010006ede61c258372ec3
265
py
Python
VGG-19/vgg-19/tensornet/layers/__init__.py
zfgao66/deeplearning-mpo-tensorflow
c345b9fea79e16f98f9b50e0b4e0bcaf4ed4c8e6
[ "MIT" ]
24
2019-04-30T14:59:43.000Z
2021-11-16T03:47:38.000Z
VGG-19/vgg-19/tensornet/layers/__init__.py
HC1022/deeplearning-mpo
c345b9fea79e16f98f9b50e0b4e0bcaf4ed4c8e6
[ "MIT" ]
null
null
null
VGG-19/vgg-19/tensornet/layers/__init__.py
HC1022/deeplearning-mpo
c345b9fea79e16f98f9b50e0b4e0bcaf4ed4c8e6
[ "MIT" ]
9
2019-08-14T10:50:37.000Z
2022-03-15T14:41:52.000Z
from .linear import * from .linear_dev import * from .batch_normalization import * from .tt import * from .tr import * from .ttrelu import * from .tt_dev import * from .conv import * from .tt_conv import * from .tt_conv_full import * from .tt_conv_direct import *
20.384615
34
0.74717
41
265
4.634146
0.292683
0.526316
0.315789
0.252632
0.189474
0
0
0
0
0
0
0
0.169811
265
12
35
22.083333
0.863636
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
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
111955b305da6737dba4a8619ea950d1a23d6918
10,592
py
Python
src/commercetools/platform/models/_schemas/tax_category.py
lime-green/commercetools-python-sdk
63b77f6e5abe43e2b3ebbf3cdbbe00c7cf80dca6
[ "MIT" ]
1
2021-04-07T20:01:30.000Z
2021-04-07T20:01:30.000Z
src/commercetools/platform/models/_schemas/tax_category.py
lime-green/commercetools-python-sdk
63b77f6e5abe43e2b3ebbf3cdbbe00c7cf80dca6
[ "MIT" ]
null
null
null
src/commercetools/platform/models/_schemas/tax_category.py
lime-green/commercetools-python-sdk
63b77f6e5abe43e2b3ebbf3cdbbe00c7cf80dca6
[ "MIT" ]
null
null
null
# Generated file, please do not change!!! import re import typing import marshmallow import marshmallow_enum from commercetools import helpers from ... import models from ..common import ReferenceTypeId from .common import BaseResourceSchema, ReferenceSchema, ResourceIdentifierSchema # Fields # Marshmallow Schemas class SubRateSchema(helpers.BaseSchema): name = marshmallow.fields.String(allow_none=True, missing=None) amount = marshmallow.fields.Float(allow_none=True, missing=None) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): return models.SubRate(**data) class TaxCategorySchema(BaseResourceSchema): last_modified_by = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".common.LastModifiedBySchema"), allow_none=True, unknown=marshmallow.EXCLUDE, metadata={"omit_empty": True}, missing=None, data_key="lastModifiedBy", ) created_by = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".common.CreatedBySchema"), allow_none=True, unknown=marshmallow.EXCLUDE, metadata={"omit_empty": True}, missing=None, data_key="createdBy", ) name = marshmallow.fields.String(allow_none=True, missing=None) description = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) rates = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".TaxRateSchema"), allow_none=True, many=True, unknown=marshmallow.EXCLUDE, missing=None, ) key = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): return models.TaxCategory(**data) class TaxCategoryDraftSchema(helpers.BaseSchema): name = marshmallow.fields.String(allow_none=True, missing=None) description = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) rates = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".TaxRateDraftSchema"), allow_none=True, many=True, unknown=marshmallow.EXCLUDE, missing=None, ) key = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): return models.TaxCategoryDraft(**data) class TaxCategoryPagedQueryResponseSchema(helpers.BaseSchema): limit = marshmallow.fields.Integer(allow_none=True, missing=None) count = marshmallow.fields.Integer(allow_none=True, missing=None) total = marshmallow.fields.Integer( allow_none=True, metadata={"omit_empty": True}, missing=None ) offset = marshmallow.fields.Integer(allow_none=True, missing=None) results = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".TaxCategorySchema"), allow_none=True, many=True, unknown=marshmallow.EXCLUDE, missing=None, ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): return models.TaxCategoryPagedQueryResponse(**data) class TaxCategoryReferenceSchema(ReferenceSchema): obj = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".TaxCategorySchema"), allow_none=True, unknown=marshmallow.EXCLUDE, metadata={"omit_empty": True}, missing=None, ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["type_id"] return models.TaxCategoryReference(**data) class TaxCategoryResourceIdentifierSchema(ResourceIdentifierSchema): class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["type_id"] return models.TaxCategoryResourceIdentifier(**data) class TaxCategoryUpdateSchema(helpers.BaseSchema): version = marshmallow.fields.Integer(allow_none=True, missing=None) actions = marshmallow.fields.List( helpers.Discriminator( allow_none=True, discriminator_field=("action", "action"), discriminator_schemas={ "addTaxRate": helpers.absmod( __name__, ".TaxCategoryAddTaxRateActionSchema" ), "changeName": helpers.absmod( __name__, ".TaxCategoryChangeNameActionSchema" ), "removeTaxRate": helpers.absmod( __name__, ".TaxCategoryRemoveTaxRateActionSchema" ), "replaceTaxRate": helpers.absmod( __name__, ".TaxCategoryReplaceTaxRateActionSchema" ), "setDescription": helpers.absmod( __name__, ".TaxCategorySetDescriptionActionSchema" ), "setKey": helpers.absmod(__name__, ".TaxCategorySetKeyActionSchema"), }, ), allow_none=True, missing=None, ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): return models.TaxCategoryUpdate(**data) class TaxCategoryUpdateActionSchema(helpers.BaseSchema): action = marshmallow.fields.String(allow_none=True, missing=None) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["action"] return models.TaxCategoryUpdateAction(**data) class TaxRateSchema(helpers.BaseSchema): id = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) name = marshmallow.fields.String(allow_none=True, missing=None) amount = marshmallow.fields.Float(allow_none=True, missing=None) included_in_price = marshmallow.fields.Boolean( allow_none=True, missing=None, data_key="includedInPrice" ) country = marshmallow.fields.String(allow_none=True, missing=None) state = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) sub_rates = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".SubRateSchema"), allow_none=True, many=True, unknown=marshmallow.EXCLUDE, metadata={"omit_empty": True}, missing=None, data_key="subRates", ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): return models.TaxRate(**data) class TaxRateDraftSchema(helpers.BaseSchema): name = marshmallow.fields.String(allow_none=True, missing=None) amount = marshmallow.fields.Float( allow_none=True, metadata={"omit_empty": True}, missing=None ) included_in_price = marshmallow.fields.Boolean( allow_none=True, missing=None, data_key="includedInPrice" ) country = marshmallow.fields.String(allow_none=True, missing=None) state = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) sub_rates = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".SubRateSchema"), allow_none=True, many=True, unknown=marshmallow.EXCLUDE, metadata={"omit_empty": True}, missing=None, data_key="subRates", ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): return models.TaxRateDraft(**data) class TaxCategoryAddTaxRateActionSchema(TaxCategoryUpdateActionSchema): tax_rate = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".TaxRateDraftSchema"), allow_none=True, unknown=marshmallow.EXCLUDE, missing=None, data_key="taxRate", ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["action"] return models.TaxCategoryAddTaxRateAction(**data) class TaxCategoryChangeNameActionSchema(TaxCategoryUpdateActionSchema): name = marshmallow.fields.String(allow_none=True, missing=None) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["action"] return models.TaxCategoryChangeNameAction(**data) class TaxCategoryRemoveTaxRateActionSchema(TaxCategoryUpdateActionSchema): tax_rate_id = marshmallow.fields.String( allow_none=True, missing=None, data_key="taxRateId" ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["action"] return models.TaxCategoryRemoveTaxRateAction(**data) class TaxCategoryReplaceTaxRateActionSchema(TaxCategoryUpdateActionSchema): tax_rate_id = marshmallow.fields.String( allow_none=True, missing=None, data_key="taxRateId" ) tax_rate = helpers.LazyNestedField( nested=helpers.absmod(__name__, ".TaxRateDraftSchema"), allow_none=True, unknown=marshmallow.EXCLUDE, missing=None, data_key="taxRate", ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["action"] return models.TaxCategoryReplaceTaxRateAction(**data) class TaxCategorySetDescriptionActionSchema(TaxCategoryUpdateActionSchema): description = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["action"] return models.TaxCategorySetDescriptionAction(**data) class TaxCategorySetKeyActionSchema(TaxCategoryUpdateActionSchema): key = marshmallow.fields.String( allow_none=True, metadata={"omit_empty": True}, missing=None ) class Meta: unknown = marshmallow.EXCLUDE @marshmallow.post_load def post_load(self, data, **kwargs): del data["action"] return models.TaxCategorySetKeyAction(**data)
30.005666
85
0.672394
1,008
10,592
6.882937
0.125
0.054483
0.078697
0.080715
0.705679
0.705679
0.70222
0.701931
0.65898
0.649467
0
0
0.22602
10,592
352
86
30.090909
0.846304
0.006231
0
0.64
1
0
0.075366
0.0249
0
0
0
0
0
1
0.058182
false
0
0.029091
0.025455
0.410909
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
11643cd64cb21d55fbe374d0f355a6d281d482d7
139
py
Python
pppf_accessories/__init__.py
linsalrob/PPPF
42575fa93e8a1c53012bbfe292514d95b48fbd9d
[ "MIT" ]
1
2020-05-12T18:21:50.000Z
2020-05-12T18:21:50.000Z
pppf_accessories/__init__.py
linsalrob/PPPF
42575fa93e8a1c53012bbfe292514d95b48fbd9d
[ "MIT" ]
null
null
null
pppf_accessories/__init__.py
linsalrob/PPPF
42575fa93e8a1c53012bbfe292514d95b48fbd9d
[ "MIT" ]
null
null
null
from .blast import stream_blast_results from .formatting import color, colour __all__ = [ 'color', 'colour', 'stream_blast_results' ]
23.166667
45
0.748201
17
139
5.647059
0.529412
0.229167
0.375
0
0
0
0
0
0
0
0
0
0.151079
139
6
46
23.166667
0.813559
0
0
0
0
0
0.221429
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
11660f0afc0336d9f59ac7598e0e7c2ab379a653
91
py
Python
datasets/__init__.py
z-a-f/zaf_funcs
41fc40b5017028b3570f3419e1c035ba0dc7a092
[ "MIT" ]
null
null
null
datasets/__init__.py
z-a-f/zaf_funcs
41fc40b5017028b3570f3419e1c035ba0dc7a092
[ "MIT" ]
null
null
null
datasets/__init__.py
z-a-f/zaf_funcs
41fc40b5017028b3570f3419e1c035ba0dc7a092
[ "MIT" ]
null
null
null
"""Routines to load some datasets.""" from .imdb import IMDB from .reuters import Reuters
18.2
37
0.747253
13
91
5.230769
0.692308
0
0
0
0
0
0
0
0
0
0
0
0.153846
91
4
38
22.75
0.883117
0.340659
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
fecdb29f570bb18300576b56fc73073b3b7ce033
17
py
Python
2/p2.py
ashishjayamohan/competitive-programming
05c5c560c2c2eb36121c52693b8c7d084f435f9e
[ "MIT" ]
null
null
null
2/p2.py
ashishjayamohan/competitive-programming
05c5c560c2c2eb36121c52693b8c7d084f435f9e
[ "MIT" ]
null
null
null
2/p2.py
ashishjayamohan/competitive-programming
05c5c560c2c2eb36121c52693b8c7d084f435f9e
[ "MIT" ]
null
null
null
def D(r,c):
5.666667
11
0.352941
4
17
1.5
1
0
0
0
0
0
0
0
0
0
0
0
0.411765
17
2
12
8.5
0.6
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
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
3a54f384791a82a173736909db0f402ce868ee9a
132
py
Python
src/wagtail_live/exceptions.py
Stormheg/wagtail-live
a5eb79024d44c060079ae7d4707d6220ea66ff5b
[ "BSD-3-Clause" ]
null
null
null
src/wagtail_live/exceptions.py
Stormheg/wagtail-live
a5eb79024d44c060079ae7d4707d6220ea66ff5b
[ "BSD-3-Clause" ]
null
null
null
src/wagtail_live/exceptions.py
Stormheg/wagtail-live
a5eb79024d44c060079ae7d4707d6220ea66ff5b
[ "BSD-3-Clause" ]
null
null
null
"""Wagtail Live Exceptions.""" class RequestVerificationError(Exception): pass class WebhookSetupError(Exception): pass
13.2
42
0.742424
11
132
8.909091
0.727273
0.265306
0
0
0
0
0
0
0
0
0
0
0.159091
132
9
43
14.666667
0.882883
0.181818
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
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
3a58b2e5408360b5b9654ede9169a9b0694af716
172
py
Python
joey/utils/middleware.py
pinecrew/joey
0a4715051629aa58b2333365149d2f3a4c6f4dee
[ "MIT" ]
1
2020-08-23T22:33:06.000Z
2020-08-23T22:33:06.000Z
joey/utils/middleware.py
pinecrew/joey
0a4715051629aa58b2333365149d2f3a4c6f4dee
[ "MIT" ]
8
2020-08-13T13:20:19.000Z
2020-10-19T10:26:17.000Z
joey/utils/middleware.py
pinecrew/joey
0a4715051629aa58b2333365149d2f3a4c6f4dee
[ "MIT" ]
null
null
null
from importlib import import_module def get_middleware(name): module, middleware = name.rsplit(".", maxsplit=1) return getattr(import_module(module), middleware)
24.571429
53
0.755814
21
172
6.047619
0.619048
0.188976
0
0
0
0
0
0
0
0
0
0.006757
0.139535
172
6
54
28.666667
0.851351
0
0
0
0
0
0.005814
0
0
0
0
0
0
1
0.25
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
28af077af80f5b3a70396fda756a309075385fac
76
py
Python
BooleanOperatorExample.py
ZnoKunG/PythonProject
388b5dfeb0161aee66094e7b2ecc2d6ed13588bd
[ "MIT" ]
null
null
null
BooleanOperatorExample.py
ZnoKunG/PythonProject
388b5dfeb0161aee66094e7b2ecc2d6ed13588bd
[ "MIT" ]
null
null
null
BooleanOperatorExample.py
ZnoKunG/PythonProject
388b5dfeb0161aee66094e7b2ecc2d6ed13588bd
[ "MIT" ]
null
null
null
age = 85 print("สวัสดีครับ คุณอายุเกินกว่าจะเข้าร้านนี้ไหม ?") print(age>18)
25.333333
53
0.657895
28
76
2.178571
0.821429
0
0
0
0
0
0
0
0
0
0
0.057143
0.078947
76
3
54
25.333333
0.657143
0
0
0
0
0.333333
0.571429
0.402597
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
0
0
0
1
0
0
0
0
0
0
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
1
0
5
28b6099ae72e70486eb28d0d296df0d0c0ea899e
99
py
Python
BOJ/21000~21999/21600~21699/21613.py
shinkeonkim/today-ps
f3e5e38c5215f19579bb0422f303a9c18c626afa
[ "Apache-2.0" ]
null
null
null
BOJ/21000~21999/21600~21699/21613.py
shinkeonkim/today-ps
f3e5e38c5215f19579bb0422f303a9c18c626afa
[ "Apache-2.0" ]
null
null
null
BOJ/21000~21999/21600~21699/21613.py
shinkeonkim/today-ps
f3e5e38c5215f19579bb0422f303a9c18c626afa
[ "Apache-2.0" ]
null
null
null
print(sorted([[input(), int(input())] for _ in range(int(input()))],key=lambda t : (-t[1]))[0][0])
49.5
98
0.575758
17
99
3.294118
0.705882
0.285714
0
0
0
0
0
0
0
0
0
0.033333
0.090909
99
1
99
99
0.588889
0
0
0
0
0
0
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
28dc3959e7795960ce488e86211e12987eeb11fe
232
py
Python
configcatclient/configcache.py
kantanhq/python-sdk
3401bb5af42b5dd403fe231afa9457d1d3637e67
[ "MIT" ]
null
null
null
configcatclient/configcache.py
kantanhq/python-sdk
3401bb5af42b5dd403fe231afa9457d1d3637e67
[ "MIT" ]
1
2020-05-22T04:41:55.000Z
2020-05-26T23:32:02.000Z
configcatclient/configcache.py
clipchamp/python-sdk
b0acb24a606cf20b5abaf14c5a9fc091d3431722
[ "MIT" ]
null
null
null
from .interfaces import ConfigCache class InMemoryConfigCache(ConfigCache): def __init__(self): self._value = None def get(self): return self._value def set(self, value): self._value = value
16.571429
39
0.650862
26
232
5.538462
0.538462
0.25
0
0
0
0
0
0
0
0
0
0
0.267241
232
13
40
17.846154
0.847059
0
0
0
0
0
0
0
0
0
0
0
0
1
0.375
false
0
0.125
0.125
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
28e9c2346cdf21263cea9c1ff1529af082358b94
250
py
Python
src/sage/sat/solvers/cryptominisat/__init__.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
5
2015-01-04T07:15:06.000Z
2022-03-04T15:15:18.000Z
src/sage/sat/solvers/cryptominisat/__init__.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
null
null
null
src/sage/sat/solvers/cryptominisat/__init__.py
switzel/sage
7eb8510dacf61b691664cd8f1d2e75e5d473e5a0
[ "BSL-1.0" ]
10
2016-09-28T13:12:40.000Z
2022-02-12T09:28:34.000Z
try: from cryptominisat import CryptoMiniSat except ImportError: raise ImportError("Failed to import 'sage.sat.solvers.cryptominisat.CryptoMiniSat'. Run \"install_package('cryptominisat')\" to install it.") from solverconf import SolverConf
35.714286
145
0.792
28
250
7.035714
0.607143
0
0
0
0
0
0
0
0
0
0
0
0.12
250
6
146
41.666667
0.895455
0
0
0
0
0
0.392
0.188
0
0
0
0
0
1
0
true
0
0.8
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
28ef240c1fd861a89a261f10ccfb30ae9e68dd22
121
py
Python
tests/vendor/solo/utils.py
niooss-ledger/fido2-tests
669fa9b4197679c10d0ce2e93233e923e5f3b3ef
[ "Apache-2.0", "MIT" ]
32
2019-08-01T10:40:31.000Z
2022-02-16T05:15:37.000Z
tests/vendor/solo/utils.py
niooss-ledger/fido2-tests
669fa9b4197679c10d0ce2e93233e923e5f3b3ef
[ "Apache-2.0", "MIT" ]
33
2019-08-08T01:09:48.000Z
2021-11-14T21:04:59.000Z
tests/vendor/solo/utils.py
niooss-ledger/fido2-tests
669fa9b4197679c10d0ce2e93233e923e5f3b3ef
[ "Apache-2.0", "MIT" ]
23
2019-08-12T14:38:59.000Z
2022-01-30T21:02:29.000Z
class DeviceSelectCredential: def __init__(self, number): pass def __call__(self, status): pass
17.285714
31
0.636364
12
121
5.75
0.75
0
0
0
0
0
0
0
0
0
0
0
0.289256
121
6
32
20.166667
0.802326
0
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0.4
0
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
5
e925783abbb983cccfdc0c455d15f6c53120d159
136
py
Python
ble2lsl/devices/__init__.py
OmriNach/WizardHat
b72e3ff7f313eb715a24ebaf7b85bad021de7443
[ "BSD-3-Clause" ]
null
null
null
ble2lsl/devices/__init__.py
OmriNach/WizardHat
b72e3ff7f313eb715a24ebaf7b85bad021de7443
[ "BSD-3-Clause" ]
null
null
null
ble2lsl/devices/__init__.py
OmriNach/WizardHat
b72e3ff7f313eb715a24ebaf7b85bad021de7443
[ "BSD-3-Clause" ]
1
2019-05-07T20:46:51.000Z
2019-05-07T20:46:51.000Z
"""BLE/LSL interfacing parameters for specific devices. TODO: * Simple class (or specification/template) for device parameters """
22.666667
68
0.75
16
136
6.375
0.875
0
0
0
0
0
0
0
0
0
0
0
0.154412
136
5
69
27.2
0.886957
0.941176
0
null
0
null
0
0
null
0
0
0.2
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
1
0
0
0
1
0
0
0
0
0
0
5
e935c5226dbcfb659d5295d284df99125a6ac3b1
214
py
Python
about/views.py
Polinavas95/foodgram-project
40f7f10f72e1274305ea795658e2638ebd16cb8f
[ "MIT" ]
null
null
null
about/views.py
Polinavas95/foodgram-project
40f7f10f72e1274305ea795658e2638ebd16cb8f
[ "MIT" ]
null
null
null
about/views.py
Polinavas95/foodgram-project
40f7f10f72e1274305ea795658e2638ebd16cb8f
[ "MIT" ]
3
2021-02-10T20:07:10.000Z
2021-03-16T13:40:13.000Z
from django.views.generic.base import TemplateView class AboutView(TemplateView): template_name = 'flatpages/about/author.html' class SpecView(TemplateView): template_name = 'flatpages/about/spec.html'
21.4
50
0.780374
25
214
6.6
0.68
0.242424
0.290909
0.4
0.460606
0
0
0
0
0
0
0
0.121495
214
9
51
23.777778
0.87766
0
0
0
0
0
0.242991
0.242991
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
e93ee3fbff09e8fc88c5be0c2e4ef570d1b36a24
767
py
Python
concoord/proxy/stack.py
denizalti/concoord
5a51ba2b475f44da221304ea7f0b9118f2e8511a
[ "BSD-3-Clause" ]
36
2015-01-22T15:55:21.000Z
2019-12-10T00:39:11.000Z
concoord/proxy/stack.py
liranz/concoord
bdb3798bf200d1cbd04bc50260cddaec6ba2a763
[ "BSD-3-Clause" ]
3
2016-11-15T16:58:49.000Z
2018-05-25T11:32:50.000Z
concoord/proxy/stack.py
liranz/concoord
bdb3798bf200d1cbd04bc50260cddaec6ba2a763
[ "BSD-3-Clause" ]
13
2015-01-07T00:07:59.000Z
2018-11-24T04:39:58.000Z
""" @author: Deniz Altinbuken, Emin Gun Sirer @note: Stack proxy @copyright: See LICENSE """ from concoord.clientproxy import ClientProxy class Stack: def __init__(self, bootstrap, timeout=60, debug=False, token=None): self.proxy = ClientProxy(bootstrap, timeout, debug, token) def __concoordinit__(self): return self.proxy.invoke_command('__init__') def append(self, item): return self.proxy.invoke_command('append', item) def pop(self): return self.proxy.invoke_command('pop') def get_size(self): return self.proxy.invoke_command('get_size') def get_stack(self): return self.proxy.invoke_command('get_stack') def __str__(self): return self.proxy.invoke_command('__str__')
24.741935
71
0.688396
96
767
5.1875
0.385417
0.126506
0.180723
0.253012
0.389558
0.333333
0.140562
0
0
0
0
0.003247
0.196871
767
30
72
25.566667
0.805195
0.109518
0
0
0
0
0.061012
0
0
0
0
0
0
1
0.4375
false
0
0.0625
0.375
0.9375
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
e93fb118315db83059399279a7a41064303f816b
217
py
Python
Program_Python_code/31.py
skyhigh8591/Learning_Test_Program
5f3c0f11874618919002126863772e0dd06a1072
[ "MIT" ]
null
null
null
Program_Python_code/31.py
skyhigh8591/Learning_Test_Program
5f3c0f11874618919002126863772e0dd06a1072
[ "MIT" ]
null
null
null
Program_Python_code/31.py
skyhigh8591/Learning_Test_Program
5f3c0f11874618919002126863772e0dd06a1072
[ "MIT" ]
null
null
null
#! /usr/bin/python #coding=utf-8 import math_operation as m num = m.operation(4,6) print "operation:" +str(num[0]) print "operation:" +str(num[1]) print "operation:" +str(num[2]) print "operation:" +str(num[3])
19.727273
32
0.663594
36
217
3.972222
0.555556
0.391608
0.475524
0.559441
0
0
0
0
0
0
0
0.037037
0.129032
217
10
33
21.7
0.719577
0.133641
0
0
0
0
0.215054
0
0
0
0
0
0
0
null
null
0
0.166667
null
null
0.666667
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
5
3a62c931c302aa4a184934fb410f9fe02824cc88
88
py
Python
tests/PaxHeaders.127271/uuidfilt.py
ictyangye/ovs-c2ratelimiter
c0e1ada35b3b5f2524fbba6324c9e996e84ac9bc
[ "Apache-2.0" ]
null
null
null
tests/PaxHeaders.127271/uuidfilt.py
ictyangye/ovs-c2ratelimiter
c0e1ada35b3b5f2524fbba6324c9e996e84ac9bc
[ "Apache-2.0" ]
null
null
null
tests/PaxHeaders.127271/uuidfilt.py
ictyangye/ovs-c2ratelimiter
c0e1ada35b3b5f2524fbba6324c9e996e84ac9bc
[ "Apache-2.0" ]
null
null
null
30 mtime=1527291425.681873811 29 atime=1527291425.78587418 29 ctime=1527291454.50997211
22
29
0.863636
12
88
6.333333
0.833333
0
0
0
0
0
0
0
0
0
0
0.743902
0.068182
88
3
30
29.333333
0.182927
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
3ab488f9065cb8496063b9443aff39ca476af73a
2,782
py
Python
tests/test_auditor/test_auditor_experiment_job.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
tests/test_auditor/test_auditor_experiment_job.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
tests/test_auditor/test_auditor_experiment_job.py
elyase/polyaxon
1c19f059a010a6889e2b7ea340715b2bcfa382a0
[ "MIT" ]
null
null
null
# pylint:disable=ungrouped-imports from unittest.mock import patch import pytest import activitylogs import auditor import tracker from event_manager.events import experiment_job as experiment_job_events from factories.factory_experiments import ExperimentJobFactory from tests.utils import BaseTest @pytest.mark.auditor_mark class AuditorExperimentJobTest(BaseTest): """Testing subscribed events""" DISABLE_RUNNER = True def setUp(self): super().setUp() self.experiment_job = ExperimentJobFactory() auditor.validate() auditor.setup() tracker.validate() tracker.setup() activitylogs.validate() activitylogs.setup() @patch('tracker.service.TrackerService.record_event') @patch('activitylogs.service.ActivityLogService.record_event') def test_experiment_job_viewed(self, activitylogs_record, tracker_record): auditor.record(event_type=experiment_job_events.EXPERIMENT_JOB_VIEWED, instance=self.experiment_job, actor_id=1, actor_name='foo') assert tracker_record.call_count == 1 assert activitylogs_record.call_count == 1 @patch('tracker.service.TrackerService.record_event') @patch('activitylogs.service.ActivityLogService.record_event') def test_experiment_resources_viewed(self, activitylogs_record, tracker_record): auditor.record(event_type=experiment_job_events.EXPERIMENT_JOB_RESOURCES_VIEWED, instance=self.experiment_job, actor_id=1, actor_name='foo') assert tracker_record.call_count == 1 assert activitylogs_record.call_count == 1 @patch('tracker.service.TrackerService.record_event') @patch('activitylogs.service.ActivityLogService.record_event') def test_experiment_logs_viewed(self, activitylogs_record, tracker_record): auditor.record(event_type=experiment_job_events.EXPERIMENT_JOB_LOGS_VIEWED, instance=self.experiment_job, actor_id=1, actor_name='foo') assert tracker_record.call_count == 1 assert activitylogs_record.call_count == 1 @patch('tracker.service.TrackerService.record_event') @patch('activitylogs.service.ActivityLogService.record_event') def test_experiment_job_statuses_viewed(self, activitylogs_record, tracker_record): auditor.record(event_type=experiment_job_events.EXPERIMENT_JOB_STATUSES_VIEWED, instance=self.experiment_job, actor_id=1, actor_name='foo') assert tracker_record.call_count == 1 assert activitylogs_record.call_count == 1
37.594595
88
0.695543
293
2,782
6.303754
0.194539
0.119653
0.06497
0.069302
0.702761
0.702761
0.702761
0.702761
0.702761
0.702761
0
0.005581
0.227175
2,782
73
89
38.109589
0.853488
0.021208
0
0.5
0
0
0.144277
0.13986
0
0
0
0
0.142857
1
0.089286
false
0
0.142857
0
0.267857
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
aaf84a8884b2f1294eeef92c6c7771a3c9a62426
647
py
Python
composer/core/__init__.py
ajaysaini725/composer
00fbf95823cd50354b2410fbd88f06eaf0481662
[ "Apache-2.0" ]
null
null
null
composer/core/__init__.py
ajaysaini725/composer
00fbf95823cd50354b2410fbd88f06eaf0481662
[ "Apache-2.0" ]
null
null
null
composer/core/__init__.py
ajaysaini725/composer
00fbf95823cd50354b2410fbd88f06eaf0481662
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. from composer.core import types as types from composer.core.algorithm import Algorithm as Algorithm from composer.core.callback import Callback as Callback from composer.core.data_spec import DataSpec as DataSpec from composer.core.engine import Engine as Engine from composer.core.engine import Trace as Trace from composer.core.event import Event as Event from composer.core.logging import Logger as Logger from composer.core.state import State as State from composer.core.time import Time as Time from composer.core.time import Timer as Timer from composer.core.time import TimeUnit as TimeUnit
43.133333
58
0.836167
102
647
5.294118
0.254902
0.266667
0.355556
0.111111
0.248148
0
0
0
0
0
0
0.007055
0.123648
647
14
59
46.214286
0.945326
0.069552
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
c96f25ff3ffdf2ced2fd38701d07d705db1b74b9
159
py
Python
Ejercicios/Modulos.py
dannieldev/Fundamentos-de-Python
63bf92c7256b373b631cae3ae9a80a3a5071f61d
[ "MIT" ]
null
null
null
Ejercicios/Modulos.py
dannieldev/Fundamentos-de-Python
63bf92c7256b373b631cae3ae9a80a3a5071f61d
[ "MIT" ]
null
null
null
Ejercicios/Modulos.py
dannieldev/Fundamentos-de-Python
63bf92c7256b373b631cae3ae9a80a3a5071f61d
[ "MIT" ]
null
null
null
#import ModuloMain #impotar modulo from ModuloMain import Ejemplo #impotar solo una funsion #from ModuloMain * #importar todo e = Ejemplo() e.imprime()
22.714286
57
0.748428
20
159
5.95
0.65
0.235294
0
0
0
0
0
0
0
0
0
0
0.176101
159
6
58
26.5
0.908397
0.54717
0
0
0
0
0
0
0
0
0
0.166667
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
5
a312b4926fd217ae206f1f1cd5a60260bf2eba09
22
py
Python
stargrit/radiative_transfer/ali/__init__.py
gecheline/stargrit
ec293eaa9f911145f05a297e6e4c321b6adebbd0
[ "MIT" ]
null
null
null
stargrit/radiative_transfer/ali/__init__.py
gecheline/stargrit
ec293eaa9f911145f05a297e6e4c321b6adebbd0
[ "MIT" ]
null
null
null
stargrit/radiative_transfer/ali/__init__.py
gecheline/stargrit
ec293eaa9f911145f05a297e6e4c321b6adebbd0
[ "MIT" ]
null
null
null
from gray_ali import *
22
22
0.818182
4
22
4.25
1
0
0
0
0
0
0
0
0
0
0
0
0.136364
22
1
22
22
0.894737
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
a31b50da31cfe6ff813352fecd40be8fc91b330d
1,757
py
Python
tests/integration/test_warcraft_client_item.py
tehmufifnman/BattleMuffin-Python
f0bb5ee7024624191b33441aeecf3fb29570abe7
[ "MIT" ]
7
2020-05-15T18:09:23.000Z
2021-03-08T16:10:37.000Z
tests/integration/test_warcraft_client_item.py
tehmufifnman/BattleMuffin-Python
f0bb5ee7024624191b33441aeecf3fb29570abe7
[ "MIT" ]
2
2020-04-20T04:42:37.000Z
2020-10-28T23:27:07.000Z
tests/integration/test_warcraft_client_item.py
tehmufifnman/BattleMuffin-Python
f0bb5ee7024624191b33441aeecf3fb29570abe7
[ "MIT" ]
2
2020-05-18T06:58:53.000Z
2021-03-08T16:10:27.000Z
import os from battlemuffin.clients.warcraft_client import WarcraftClient from battlemuffin.config.region_config import Locale, Region def test_get_item_classes_index(snapshot): client = WarcraftClient( os.getenv("CLIENT_ID"), os.getenv("CLIENT_SECRET"), Region.us, Locale.en_US ) response = client.get_item_classes_index() assert response == snapshot def test_get_item_class(snapshot): client = WarcraftClient( os.getenv("CLIENT_ID"), os.getenv("CLIENT_SECRET"), Region.us, Locale.en_US ) response = client.get_item_class(0) assert response == snapshot def test_get_item_sets_index(snapshot): client = WarcraftClient( os.getenv("CLIENT_ID"), os.getenv("CLIENT_SECRET"), Region.us, Locale.en_US ) response = client.get_item_sets_index() assert response == snapshot def test_get_item_set(snapshot): client = WarcraftClient( os.getenv("CLIENT_ID"), os.getenv("CLIENT_SECRET"), Region.us, Locale.en_US ) response = client.get_item_set(1) assert response == snapshot def test_get_item_subclass(snapshot): client = WarcraftClient( os.getenv("CLIENT_ID"), os.getenv("CLIENT_SECRET"), Region.us, Locale.en_US ) response = client.get_item_subclass(0, 0) assert response == snapshot def test_get_item(snapshot): client = WarcraftClient( os.getenv("CLIENT_ID"), os.getenv("CLIENT_SECRET"), Region.us, Locale.en_US ) response = client.get_item(19019) assert response == snapshot def test_get_item_media(snapshot): client = WarcraftClient( os.getenv("CLIENT_ID"), os.getenv("CLIENT_SECRET"), Region.us, Locale.en_US ) response = client.get_item_media(19019) assert response == snapshot
28.803279
83
0.710302
228
1,757
5.210526
0.144737
0.082492
0.164983
0.082492
0.807239
0.807239
0.807239
0.746633
0.61532
0.61532
0
0.009702
0.178714
1,757
60
84
29.283333
0.813583
0
0
0.466667
0
0
0.087649
0
0
0
0
0
0.155556
1
0.155556
false
0
0.066667
0
0.222222
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
a360701f2090e1cb40383e3ab347350b38804937
144
py
Python
labeler_main.py
fd-sturniolo/AntTracker
0677ec1757c33aaddd013eb0a65481c3aca25881
[ "MIT" ]
1
2021-06-16T22:11:09.000Z
2021-06-16T22:11:09.000Z
labeler_main.py
fd-sturniolo/AntTracker
0677ec1757c33aaddd013eb0a65481c3aca25881
[ "MIT" ]
18
2021-05-17T21:56:49.000Z
2021-07-08T12:53:22.000Z
labeler_main.py
fd-sturniolo/AntTracker
0677ec1757c33aaddd013eb0a65481c3aca25881
[ "MIT" ]
2
2021-05-17T16:26:00.000Z
2021-05-31T15:06:48.000Z
if __name__ == '__main__': from check_env import check_env check_env() from ant_tracker.labeler.AntLabeler import main main()
18
51
0.701389
19
144
4.684211
0.578947
0.269663
0
0
0
0
0
0
0
0
0
0
0.222222
144
7
52
20.571429
0.794643
0
0
0
0
0
0.055556
0
0
0
0
0
0
1
0
true
0
0.4
0
0.4
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
a362095e7cc5d8fcee1e294e2eca714ed1a78de1
261
py
Python
toontown/classicchars/DistributedWitchMinnieAI.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
99
2019-11-02T22:25:00.000Z
2022-02-03T03:48:00.000Z
toontown/classicchars/DistributedWitchMinnieAI.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
42
2019-11-03T05:31:08.000Z
2022-03-16T22:50:32.000Z
toontown/classicchars/DistributedWitchMinnieAI.py
TheFamiliarScoot/open-toontown
678313033174ea7d08e5c2823bd7b473701ff547
[ "BSD-3-Clause" ]
57
2019-11-03T07:47:37.000Z
2022-03-22T00:41:49.000Z
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectAI import DistributedObjectAI class DistributedWitchMinnieAI(DistributedObjectAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedWitchMinnieAI')
43.5
84
0.881226
19
261
12.105263
0.578947
0.086957
0
0
0
0
0
0
0
0
0
0
0.068966
261
5
85
52.2
0.946502
0
0
0
0
0
0.091954
0.091954
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
5
a363f9c3fc68fd8a97ccc6cbf62737947d3112f7
101
py
Python
useless_bot/core/errors.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
useless_bot/core/errors.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
useless_bot/core/errors.py
MRvillager/useless_bot
68ee1a73d7f0ac4d041d96a02d93feae17194980
[ "MIT" ]
null
null
null
class BalanceUnderLimitError(Exception): pass class BalanceOverLimitError(Exception): pass
14.428571
40
0.782178
8
101
9.875
0.625
0.329114
0
0
0
0
0
0
0
0
0
0
0.158416
101
6
41
16.833333
0.929412
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
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
a385f0d4c253e6d4d9e211e9e4c475f6dde69b65
60
py
Python
fixup.py
catskillsresearch/openasr20
b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e
[ "Apache-2.0" ]
null
null
null
fixup.py
catskillsresearch/openasr20
b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e
[ "Apache-2.0" ]
null
null
null
fixup.py
catskillsresearch/openasr20
b9821c4ee6a51501e81103c1d6d4db0ea8aaa31e
[ "Apache-2.0" ]
1
2021-07-28T02:13:21.000Z
2021-07-28T02:13:21.000Z
def fixup(fn): return '_'.join(fn.split('_')[2:])[0:-4]
20
44
0.533333
10
60
3
0.9
0
0
0
0
0
0
0
0
0
0
0.057692
0.133333
60
2
45
30
0.519231
0
0
0
0
0
0.033333
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
6e5e704f15f892f1fc97aeee5f6c656f71d7539d
122
py
Python
u8timeseries/metrics/__init__.py
endrjuskr/u8timeseries
edf167815e7c7931fe491207f831e88203589883
[ "Apache-2.0" ]
null
null
null
u8timeseries/metrics/__init__.py
endrjuskr/u8timeseries
edf167815e7c7931fe491207f831e88203589883
[ "Apache-2.0" ]
null
null
null
u8timeseries/metrics/__init__.py
endrjuskr/u8timeseries
edf167815e7c7931fe491207f831e88203589883
[ "Apache-2.0" ]
null
null
null
""" Metrics ------- """ from .metrics import mape, mase, overall_percentage_error, marre, r2_score, coefficient_variation
20.333333
97
0.737705
14
122
6.142857
0.928571
0
0
0
0
0
0
0
0
0
0
0.009174
0.106557
122
5
98
24.4
0.779817
0.122951
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
6e67f9d768ae90edd8b6834d0880a6784dd47aaf
144
py
Python
xv_leak_tools/test_components/cleanup/__init__.py
UAEKondaya1/expressvpn_leak_testing
9e4cee899ac04f7820ac351fa55efdc0c01370ba
[ "MIT" ]
219
2017-12-12T09:42:46.000Z
2022-03-13T08:25:13.000Z
xv_leak_tools/test_components/cleanup/__init__.py
UAEKondaya1/expressvpn_leak_testing
9e4cee899ac04f7820ac351fa55efdc0c01370ba
[ "MIT" ]
11
2017-12-14T08:14:51.000Z
2021-08-09T18:37:45.000Z
xv_leak_tools/test_components/cleanup/__init__.py
UAEKondaya1/expressvpn_leak_testing
9e4cee899ac04f7820ac351fa55efdc0c01370ba
[ "MIT" ]
45
2017-12-14T07:26:36.000Z
2022-03-11T09:36:56.000Z
from xv_leak_tools.test_components.cleanup.cleanup_builder import CleanupBuilder def register(factory): factory.register(CleanupBuilder())
28.8
80
0.840278
17
144
6.882353
0.764706
0
0
0
0
0
0
0
0
0
0
0
0.083333
144
4
81
36
0.886364
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
5
6e8771c85b231a21b4943a32e3e23e07397eddbb
182
py
Python
Inheritance/non_zip_files/04_random_list.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
Inheritance/non_zip_files/04_random_list.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
Inheritance/non_zip_files/04_random_list.py
MNikov/Python-OOP-October-2020
a53e4555758ec810605e31e7b2c71b65c49b2332
[ "MIT" ]
null
null
null
import random class RandomList(list): def get_random_element(self): element_to_go = random.choice(self) self.remove(element_to_go) return element_to_go
20.222222
43
0.697802
25
182
4.76
0.56
0.226891
0.277311
0
0
0
0
0
0
0
0
0
0.230769
182
8
44
22.75
0.85
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.666667
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
5
6e8bbc2c0465009b320b5b8d4044c38a2e460462
211
wsgi
Python
AutoProject.wsgi
dimas-lex/autostop
f8bb081d1c6f9b650424dd4326152de150901509
[ "Apache-2.0" ]
null
null
null
AutoProject.wsgi
dimas-lex/autostop
f8bb081d1c6f9b650424dd4326152de150901509
[ "Apache-2.0" ]
null
null
null
AutoProject.wsgi
dimas-lex/autostop
f8bb081d1c6f9b650424dd4326152de150901509
[ "Apache-2.0" ]
null
null
null
import os import sys sys.path.append('/home/yana/code/autostop') os.environ['DJANGO_SETTINGS_MODULE'] = 'autostop.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
30.142857
58
0.800948
29
211
5.758621
0.62069
0.11976
0.215569
0.263473
0
0
0
0
0
0
0
0
0.061611
211
6
59
35.166667
0.843434
0
0
0
0
0
0.298578
0.218009
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
6ec4ea42c86a3852801272b0ed42cb6e80ffdc10
43
py
Python
tuomur/python-odata/example.py
Sam-Rowe/AzureDevOpsODataDemo
6e97b5a1026c2d921603aee8ece319bacf4754e1
[ "MIT" ]
null
null
null
tuomur/python-odata/example.py
Sam-Rowe/AzureDevOpsODataDemo
6e97b5a1026c2d921603aee8ece319bacf4754e1
[ "MIT" ]
1
2020-02-26T11:08:40.000Z
2020-02-26T11:35:08.000Z
tuomur/python-odata/example.py
Sam-Rowe/AzureDevOpsODataDemo
6e97b5a1026c2d921603aee8ece319bacf4754e1
[ "MIT" ]
null
null
null
import os import requests from python-odata
14.333333
17
0.860465
7
43
5.285714
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.116279
43
3
17
14.333333
0.973684
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.666667
null
null
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
5
42d936747c949e75848c382b5256b19ddf438508
119
py
Python
Users/admin.py
mangonihao/MovieRecommendWeb
b612fcda68bf5f8b1f2734c138e3204119a78596
[ "Apache-2.0" ]
2
2021-11-04T01:51:11.000Z
2021-11-23T13:21:01.000Z
Users/admin.py
mangonihao/MovieRecommendWeb
b612fcda68bf5f8b1f2734c138e3204119a78596
[ "Apache-2.0" ]
null
null
null
Users/admin.py
mangonihao/MovieRecommendWeb
b612fcda68bf5f8b1f2734c138e3204119a78596
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from Users.models import User # Register your models here. admin.site.register(User)
19.833333
32
0.806723
18
119
5.333333
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.12605
119
5
33
23.8
0.923077
0.218487
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
42e702958e3b02cb77c46424d467b3b66cced843
55
py
Python
b2btool/__main__.py
recs12/b2btool
37108c856f1be399b2b90c31ee90afa5b828481f
[ "Apache-2.0", "MIT" ]
null
null
null
b2btool/__main__.py
recs12/b2btool
37108c856f1be399b2b90c31ee90afa5b828481f
[ "Apache-2.0", "MIT" ]
null
null
null
b2btool/__main__.py
recs12/b2btool
37108c856f1be399b2b90c31ee90afa5b828481f
[ "Apache-2.0", "MIT" ]
null
null
null
import sys from b2btool.cli import b2b sys.exit(b2b())
13.75
27
0.763636
10
55
4.2
0.7
0
0
0
0
0
0
0
0
0
0
0.0625
0.127273
55
3
28
18.333333
0.8125
0
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
42ff86dc0db909d99721dbf5da4c5630bc3e2387
141
py
Python
Computer-vision/@PeterChenYijie AIChallenger-ScenesClassfication-pytorch/models/loss.py
PeterChenYijie/DeepLearningZeroToALL
8f629e326a84a4272e66f34ba5f918576a595c70
[ "MIT" ]
12
2018-03-07T00:44:56.000Z
2019-01-25T11:07:43.000Z
Computer-vision/@PeterChenYijie AIChallenger-ScenesClassfication-pytorch/models/loss.py
PeterChenYijie/DeepLearning
8f629e326a84a4272e66f34ba5f918576a595c70
[ "MIT" ]
3
2018-03-02T03:38:41.000Z
2018-03-20T00:45:06.000Z
Computer-vision/@PeterChenYijie AIChallenger-ScenesClassfication-pytorch/models/loss.py
PeterChenYijie/DeepLearning
8f629e326a84a4272e66f34ba5f918576a595c70
[ "MIT" ]
7
2018-03-02T07:14:53.000Z
2019-01-04T08:06:47.000Z
#coding:utf8 import torch as t def celoss(): return t.nn.CrossEntropyLoss() def bloss(): def loss(s,l): pass return loss
15.666667
34
0.631206
21
141
4.238095
0.761905
0
0
0
0
0
0
0
0
0
0
0.009524
0.255319
141
9
35
15.666667
0.838095
0.078014
0
0
0
0
0
0
0
0
0
0
0
1
0.428571
false
0.142857
0.142857
0.142857
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
5
6e0e3a517a3e35c01df747cc2e4d02460481d0c0
212
py
Python
vetclinic/fields.py
drewbrew/djangoconus2018-drf-talk
cf28b85db1dce86b959cbd1c7eb1abbc5492c63b
[ "MIT" ]
6
2018-10-17T20:55:00.000Z
2022-02-07T16:59:34.000Z
vetclinic/fields.py
hadpro24/djangoconus2018-drf-talk
13d479ded2c4ed64502b1e707230a19ca1405ab8
[ "MIT" ]
5
2019-05-30T13:00:57.000Z
2021-03-20T00:38:30.000Z
vetclinic/fields.py
hadpro24/djangoconus2018-drf-talk
13d479ded2c4ed64502b1e707230a19ca1405ab8
[ "MIT" ]
2
2019-02-24T21:31:22.000Z
2019-03-26T12:59:33.000Z
from rest_framework import serializers from .models import Species class SpeciesField(serializers.PrimaryKeyRelatedField): def to_representation(self, value): return Species.objects.get(id=value)
21.2
55
0.787736
24
212
6.875
0.791667
0
0
0
0
0
0
0
0
0
0
0
0.146226
212
9
56
23.555556
0.911602
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
6e12bff6ccd73b223b53343e902188613156a738
149
py
Python
test_python_starter/__main__.py
GregoireHENRY/test-python-starter
0519aca1ce6642398d624f7f754e41b581e28e45
[ "MIT" ]
null
null
null
test_python_starter/__main__.py
GregoireHENRY/test-python-starter
0519aca1ce6642398d624f7f754e41b581e28e45
[ "MIT" ]
null
null
null
test_python_starter/__main__.py
GregoireHENRY/test-python-starter
0519aca1ce6642398d624f7f754e41b581e28e45
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ test-python-starter """ from pudb import set_trace as bp # noqa: F401 from test_python_starter import cli cli.main()
12.416667
46
0.718121
24
149
4.333333
0.75
0.192308
0.326923
0
0
0
0
0
0
0
0
0.032
0.161074
149
11
47
13.545455
0.8
0.348993
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
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
280d88d0661a5c02db94a1eb5d8c04a4b0ebd3d2
59
py
Python
app/schemas/__init__.py
somespecialone/clever-inspect
8735e0b445c8e7e9b83c627d4a5fbed1428c1891
[ "MIT" ]
1
2022-03-12T05:44:12.000Z
2022-03-12T05:44:12.000Z
app/schemas/__init__.py
somespecialone/clever-inspect
8735e0b445c8e7e9b83c627d4a5fbed1428c1891
[ "MIT" ]
null
null
null
app/schemas/__init__.py
somespecialone/clever-inspect
8735e0b445c8e7e9b83c627d4a5fbed1428c1891
[ "MIT" ]
null
null
null
from .item import Item, ItemRaw from .health import Health
19.666667
31
0.79661
9
59
5.222222
0.555556
0
0
0
0
0
0
0
0
0
0
0
0.152542
59
2
32
29.5
0.94
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
28111d8e151625c577f08665369ecf53fcdeee10
133
py
Python
cowsay_app/admin.py
Sondosissa18/-django-cowsay-project
50307cfeacef9e6f7fb9304b479c8a53ac451c77
[ "MIT" ]
null
null
null
cowsay_app/admin.py
Sondosissa18/-django-cowsay-project
50307cfeacef9e6f7fb9304b479c8a53ac451c77
[ "MIT" ]
null
null
null
cowsay_app/admin.py
Sondosissa18/-django-cowsay-project
50307cfeacef9e6f7fb9304b479c8a53ac451c77
[ "MIT" ]
null
null
null
from django.contrib import admin # Register your models here. from cowsay_app.models import Cowtext admin.site.register(Cowtext)
14.777778
37
0.804511
19
133
5.578947
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.135338
133
8
38
16.625
0.921739
0.195489
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
28369ed13c7ba2e8cde482adfd8c56208890084a
206
py
Python
test_awsimple/__init__.py
jamesabel/awsimple
1b5d22a4e236421229e2fc8aee3a683066bb16c6
[ "MIT" ]
21
2020-08-28T19:10:36.000Z
2021-06-17T02:25:30.000Z
test_awsimple/__init__.py
jamesabel/awsimple
1b5d22a4e236421229e2fc8aee3a683066bb16c6
[ "MIT" ]
1
2021-03-01T18:40:58.000Z
2021-03-02T04:37:05.000Z
test_awsimple/__init__.py
jamesabel/awsimple
1b5d22a4e236421229e2fc8aee3a683066bb16c6
[ "MIT" ]
1
2020-08-28T23:07:21.000Z
2020-08-28T23:07:21.000Z
from .const import id_str, test_awsimple_str, never_change_file_name, never_change_file_size from .tst_paths import temp_dir, cache_dir from .dict_is_close import dict_is_close from .sqs_drain import drain
41.2
92
0.864078
37
206
4.351351
0.594595
0.136646
0.186335
0
0
0
0
0
0
0
0
0
0.097087
206
4
93
51.5
0.865591
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
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
286aded94f88bfd5ad6d18015415936cdfc323c6
141
py
Python
titan/react_view_pkg/router_and_module/resources.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
titan/react_view_pkg/router_and_module/resources.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
titan/react_view_pkg/router_and_module/resources.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
from dataclasses import dataclass from moonleap import Resource @dataclass class RouteTable(Resource): import_path: str name: str
14.1
33
0.77305
17
141
6.352941
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.184397
141
9
34
15.666667
0.93913
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
2884b5ed9a5025aa6b381268ee5d8038f8269b69
143
py
Python
src/cs107_package/subpkg_1/module_1.py
cs107-sys-dev/cs107_project
dbffc4937b9e7c88c5488104b3da480af2018662
[ "MIT" ]
null
null
null
src/cs107_package/subpkg_1/module_1.py
cs107-sys-dev/cs107_project
dbffc4937b9e7c88c5488104b3da480af2018662
[ "MIT" ]
null
null
null
src/cs107_package/subpkg_1/module_1.py
cs107-sys-dev/cs107_project
dbffc4937b9e7c88c5488104b3da480af2018662
[ "MIT" ]
null
null
null
class Foo: def __init__(self, a, b): self.a = a self.b = b def foo(): return "cs107_package.subpkg_1.module_1.foo()"
15.888889
50
0.566434
23
143
3.217391
0.565217
0.135135
0
0
0
0
0
0
0
0
0
0.049505
0.293706
143
8
51
17.875
0.683168
0
0
0
0
0
0.258741
0.258741
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
5
288f67c96f48bc7da5624b05eb7ac65482b731a1
155
py
Python
piptools/locations.py
m-mead/pip-tools
37ce9e36d6033ede0667a1b293cd16843a85be4d
[ "BSD-3-Clause" ]
4,085
2017-02-17T08:51:25.000Z
2022-03-31T22:44:12.000Z
piptools/locations.py
m-mead/pip-tools
37ce9e36d6033ede0667a1b293cd16843a85be4d
[ "BSD-3-Clause" ]
1,173
2017-02-17T16:50:44.000Z
2022-03-31T20:14:19.000Z
piptools/locations.py
astrojuanlu/pip-tools
4776ac99fb8a396f6d2ed1a4370fd3b2e6875940
[ "BSD-3-Clause" ]
351
2017-02-17T17:33:08.000Z
2022-03-30T13:33:38.000Z
from pip._internal.utils.appdirs import user_cache_dir # The user_cache_dir helper comes straight from pip itself CACHE_DIR = user_cache_dir("pip-tools")
31
58
0.825806
26
155
4.615385
0.576923
0.266667
0.3
0
0
0
0
0
0
0
0
0
0.109677
155
4
59
38.75
0.869565
0.36129
0
0
0
0
0.092784
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
28943f8da35e0795836815f902d2f3764c81cdcc
77
py
Python
surgen/tests/procedures/02_example.py
toumorokoshi/surgen
9a5028e464c5a27acb4d240fd4340e3485833896
[ "MIT" ]
6
2017-04-11T16:34:06.000Z
2019-06-25T15:37:44.000Z
surgen/tests/procedures/02_example.py
toumorokoshi/surgen
9a5028e464c5a27acb4d240fd4340e3485833896
[ "MIT" ]
2
2019-06-25T17:23:37.000Z
2019-06-28T20:00:27.000Z
surgen/tests/procedures/02_example.py
toumorokoshi/surgen
9a5028e464c5a27acb4d240fd4340e3485833896
[ "MIT" ]
3
2017-06-22T20:41:54.000Z
2019-06-25T15:30:00.000Z
from surgen.procedure import Procedure class Example2(Procedure): pass
12.833333
38
0.779221
9
77
6.666667
0.777778
0
0
0
0
0
0
0
0
0
0
0.015625
0.168831
77
5
39
15.4
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
9537124e9309017ce6ef7eba0836e087b8d3becf
110
py
Python
RPIO_Test.py
tuliptrader/Raspberry-Pi-Drone
0087227171d9c592926190c4d7a184298ae975e4
[ "MIT" ]
1
2019-01-05T13:12:35.000Z
2019-01-05T13:12:35.000Z
RPIO_Test.py
tuliptrader/Raspberry-Pi-Drone
0087227171d9c592926190c4d7a184298ae975e4
[ "MIT" ]
null
null
null
RPIO_Test.py
tuliptrader/Raspberry-Pi-Drone
0087227171d9c592926190c4d7a184298ae975e4
[ "MIT" ]
1
2018-09-11T09:46:46.000Z
2018-09-11T09:46:46.000Z
from RPIO import PWM servo = PWM.Servo() While True: servo.set_servo(13, 1200) servo.set_servo(27, 1200)
15.714286
27
0.718182
19
110
4.052632
0.578947
0.207792
0.337662
0
0
0
0
0
0
0
0
0.130435
0.163636
110
6
28
18.333333
0.706522
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.2
null
null
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
5
9591530c0837d163ccd2c50a55b5c029226e81d9
105
py
Python
office365/sharepoint/sitedesigns/site_script_metadata.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
544
2016-08-04T17:10:16.000Z
2022-03-31T07:17:20.000Z
office365/sharepoint/sitedesigns/site_script_metadata.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
438
2016-10-11T12:24:22.000Z
2022-03-31T19:30:35.000Z
office365/sharepoint/sitedesigns/site_script_metadata.py
theodoriss/Office365-REST-Python-Client
3bd7a62dadcd3f0a0aceeaff7584fff3fd44886e
[ "MIT" ]
202
2016-08-22T19:29:40.000Z
2022-03-30T20:26:15.000Z
from office365.runtime.client_value import ClientValue class SiteScriptMetadata(ClientValue): pass
17.5
54
0.828571
11
105
7.818182
0.909091
0
0
0
0
0
0
0
0
0
0
0.032609
0.12381
105
5
55
21
0.902174
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
95ab70151a5d09b582d1e6876f4eca596cc7474c
16,174
py
Python
spearmint/transformations/demos/bibeta/gb2library.py
fernandezdaniel/Spearmint
3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84
[ "RSA-MD" ]
6
2021-06-29T11:26:49.000Z
2022-01-20T18:12:47.000Z
spearmint/transformations/demos/bibeta/gb2library.py
fernandezdaniel/Spearmint
3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84
[ "RSA-MD" ]
null
null
null
spearmint/transformations/demos/bibeta/gb2library.py
fernandezdaniel/Spearmint
3c9e0a4be6108c3d652606bd957f0c9ae1bfaf84
[ "RSA-MD" ]
9
2018-06-28T13:06:35.000Z
2021-06-20T18:21:58.000Z
from __future__ import division import scipy as sp import numpy as np from scipy.special import beta, gamma, betaln, gammaln, betainc, gammainc, erf import matplotlib.pyplot as plt from scipy.special import betaln, gammaln, beta, gamma, betainc, gammainc from scipy import optimize as opt class Gb(object): def __init__(self, a, b, c, p, q): self.a = a self.b = b self.c = c self.p = p self.q = q def pdf(self, y): a = self.a b = self.b c = self.c p = self.p q = self.q bta = np.exp(gammaln(p)+gammaln(q) - gammaln(p+q)) pdf = abs(a)*y**(a*p-1)*(1-(1-c)*(y/b)**a)**(q-1) / (b**(a*p)*bta*(1+c*(y/b)**a)**(p+q)) return pdf def mom(self, h): a = self.a b = self.b c = self.c p = self.p q = self.q bta = np.exp(gammaln(p) + gammaln(q) - gammaln(p+q)) pass class Gb1(Gb): def __init__(self, a, b, p, q): self.a = a self.b = b self.c = 0 self.p = p self.q = q def cdf(self, y): a = self.a b = self.b c = self.c p = self.p q = self.q z = (y/b)**a cdf = betainc(p, q, z) return cdf def mom(self, h): a = self.a b = self.b c = self.c p = self.p q = self.q mom = np.exp(h*np.log(b) + gammaln(p+q) + gammaln(p + h/a) - gammaln(p + q + h/a) - gammaln(p)) return mom def mean(self): mean = self.mom(1) return mean def std(self): var = self.mom(2) - (self.mom(1))**2 std = var**(1/2) return std def skew(self): mom1 = self.mom(1) mom2 = self.mom(2) mom3 = self.mom(3) var = (self.std())**2 skew = (mom3 - 3*mom1*mom2 + 2*mom1**3)/(var)**(3/2) return skew def kurt(self): mom1 = self.mom(1) mom2 = self.mom(2) mom3 = self.mom(3) mom4 = self.mom(4) var = (self.std())**2 kurtosis = (mom4 - 4*mom1*mom3 + 6*mom1**2*mom2 - 3*mom1**4) / var**2 return kurtosis def loglike(self, data, paravec_log, sign = 1): a, b, p, q = np.exp(paravec_log) n = len(data) lnb = gammaln(p) + gammaln(q) - gammaln(p+q) loglike = n*np.log(abs(a)) + (a*p-1)*np.sum(np.log(data)) + \ (q-1)*np.sum(np.log(1-(data/b)**a)) - n*a*p*np.log(b) - n*lnb loglike = sign*loglike return loglike class B1(Gb1): def __init__(self, b, p, q): self.a = 1 self.c = 0 self.b = b self.p = p self.q = q def loglike(self, data, paravec_log, sign = 1): a = 1 b, p, q = np.exp(paravec_log) n = len(data) lnb = gammaln(p) + gammaln(q) - gammaln(p+q) loglike = n*np.log(abs(a)) + (a*p-1)*np.sum(np.log(data)) + \ (q-1)*np.sum(np.log(1-(data/b)**a)) - n*a*p*np.log(b) - n*lnb loglike = sign*loglike return loglike class Pareto(Gb1): def __init__(self, b, p): self.a = -1 self.q = 1 self.c = 0 self.b = b self.p = p def cdf(self, y): b = self.b p = self.p if len(y) > 1: cdf = np.zeros(len(y)) ind1 = y >= b cdf[ind1] = 1 - (b/y[ind1])** p elif len(y) == 1: if y >= b: cdf = 1 - (b/y)**p elif y<b: cdf = 0 return cdf def loglike(self, data, paravec, sign = 1): #we are not taking the log of the paramters, because in this case, a = -1, so #it doesn't have to be constrained to be positive. n = len(data) a = -1 q = 1 b, p = paravec loglike = n*sp.log(np.exp(a)) + (np.exp(a)*np.exp(p)-1)*np.sum(data) + \ (np.exp(q)-1)*np.sum(1-(data/np.exp(b))**np.exp(a)) - n*np.exp(a)*np.exp(p)*np.log(b)\ - n*betaln(np.exp(p), np.exp(q)) loglike = sign*loglike return loglike class B(Gb): def __init__(self, b, c, p, q): self.a = 1 self.b = b self.c = c self.p = p self.q = q def mom(self, h): a = self.a b = self.b c = self.c p = self.p q = self.q pass #Does the beta function have moments? def cdf(self, h): pass #does the beta have a cdf? class Gb2(object): def __init__(self, a, b, p, q): self.a = a self.b = b self.p = p self.q = q def pdf(self, y): a = self.a b = self.b p = self.p q = self.q bta = np.exp(gammaln(p) + gammaln(q) - gammaln(p+q)) pdf = np.exp(np.log(abs(a)) + (a*p - 1)*np.log(y)- (a*p)*np.log(b)\ - np.log(bta) - (p+q)*np.log((1 + (y/b)**a))) return pdf def cdf(self, y): a = self.a b = self.b p = self.p q = self.q z = np.exp(a * np.log((y/b)) - a*np.log(1 + (y/b))) cdf = betainc(p, q, z) return cdf def mom(self, h): """ Gives us the moments about zero. We will used these in our calculations of the moments around the mean h is the moment we would like """ a = self.a b = self.b p = self.p q = self.q mom = np.exp(h*np.log(b) + gammaln(p + h/a) + gammaln(q - h/a) - gammaln(p) - gammaln(q)) return mom def mean(self): a = self.a b = self.b p = self.p q = self.q mean = self.mom(1) return mean def std(self): a = self.a b = self.b p = self.p q = self.q mom2 = self.mom(2) ex = self.mom(1) var = mom2 - ex**2 std = var**(1/2) return std def skew(self): mom1 = self.mom(1) mom2 = self.mom(2) mom3 = self.mom(3) var = (self.std())**2 skew = (mom3 - 3*mom1*mom2 + 2*mom1**3)/(var)**(3/2) return skew def kurt(self): mom1 = self.mom(1) mom2 = self.mom(2) mom3 = self.mom(3) mom4 = self.mom(4) var = (self.std())**2 kurtosis = (mom4 - 4*mom1*mom3 + 6*mom1**2*mom2 - 3*mom1**4) / var**2 return kurtosis def loglike(self, data, paravec, sign = 1): """ The sign option allows for the function to return the negative of the log-likelihood so that it can be estimated using minization libraries of python. The parameters must come in as logs. """ la, lb, lp, lq = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) \ - len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * betaln(np.exp(lp), np.exp(lq)) -\ (np.exp(lp)+np.exp(lq)) * sum(sp.log(1+(data/np.exp(lb))**np.exp(la))) loglike = sign*loglike return loglike class B2(Gb2): def __init__(self, b, p, q): self.a = 1 self.b = b self.p = p self.q = q def loglike(self, data, paravec, sign = 1): la = 0 lb, lp, lq = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) \ - len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * betaln(np.exp(lp), np.exp(lq)) -\ (np.exp(lp)+np.exp(lq)) * sum(sp.log(1+(data/np.exp(lb))**np.exp(la))) loglike = sign*loglike return loglike class Br12(Gb2): def __init__(self, a, b, q): self.p = 1 self.a = a self.b = b self.q = q def loglike(self, data, paravec, sign = 1): lp = 0 la, lb, lq = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) \ - len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * betaln(np.exp(lp), np.exp(lq)) -\ (np.exp(lp)+np.exp(lq)) * sum(sp.log(1+(data/np.exp(lb))**np.exp(la))) loglike = sign*loglike return loglike class Br3(Gb2): def __init__(self, a, b, p): self.q = 1 self.a = a self.b = b self.p = p def loglike(self, data, paravec, sign = 1): lq = 0 la, lb, lp = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) \ - len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * betaln(np.exp(lp), np.exp(lq)) -\ (np.exp(lp)+np.exp(lq)) * sum(sp.log(1+(data/np.exp(lb))**np.exp(la))) loglike = sign*loglike return loglike class L(Gb2): def __init__(self, b, q): self.a = 1 self.p = 1 self.b = b self.q = q def loglike(self, data, paravec, sign = 1): la, lp = 0, 0 lb, lq = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) \ - len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * betaln(np.exp(lp), np.exp(lq)) -\ (np.exp(lp)+np.exp(lq)) * sum(sp.log(1+(data/np.exp(lb))**np.exp(la))) loglike = sign*loglike return loglike class InvL(Gb2): def __init__(self, b, q): self.a = -1 self.p = 1 self.b = b self.q = q def loglike(self, data, paravec, sign = 1): a, p = - 1, 1 b, q = paravec loglike = len(data) * sp.log(np.exp(a)) + (np.exp(a)*np.exp(p)-1) * sum(sp.log(data)) \ - len(data)*np.exp(a)*np.exp(p)*sp.log(np.exp(b)) - len(data) * betaln(np.exp(p), np.exp(q)) -\ (np.exp(p)+np.exp(q)) * sum(sp.log(1+(data/np.exp(b))**np.exp(a))) loglike = sign*loglike return loglike class Fisk(Gb2): def __init__(self, a, b): self.p = 1 self.q = 1 self.a = a self.b = b def loglike(self, data, paravec, sign = 1): lp, lq = 0, 0 la, lb = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) \ - len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * betaln(np.exp(lp), np.exp(lq)) -\ (np.exp(lp)+np.exp(lq)) * sum(sp.log(1+(data/np.exp(lb))**np.exp(la))) loglike = sign*loglike return loglike class LogLog(Gb2): def __init__(self, b): self.a = 1 self.p = 1 self.q = 1 self.b = b def loglike(self, data, paravec, sign = 1): la, lp, lq = 0, 0, 0 lb = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) \ - len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * betaln(np.exp(lp), np.exp(lq)) -\ (np.exp(lp)+np.exp(lq)) * sum(sp.log(1+(data/np.exp(lb))**np.exp(la))) loglike = sign*loglike return loglike class Gg(object): def __init__(self, a, b, p): self.a = a self.b = b self.p = p def pdf(self, y): a = self.a b = self.b p = self.p pdf = abs(a)*y**(a*p-1)*np.exp(-(y/b)*a)/ (b**(a*p)*gamma(p)) return pdf def cdf(self, y): a = self.a b = self.b p = self.p z = (y/b)**a cdf = gammainc(p, z) return cdf def mean(self): a = self.a b = self.b p = self.p mean = b* gamma(p + 1/a)/gamma(p) return mean def std(self): a = self.a b = self.b p = self.p mom2 = b**2*gamma(p + 2/a)/gamma(p) var = mom2 - (self.mean())**2 std = var**(1/2) return std def skew(self): a = self.a b = self.b p = self.p g0 = gamma(p) g1 = gamma(p + 1/a) g2 = gamma(p + 2/a) g3 = gamma(p + 3/a) skew = (g0**2*g3 - 3*g0*g1*g2 + 2*g1**3)/(g0*g2 - g1**2)**(3/2) return skew def kurt(self): a = self.a b = self.b p = self.p g0 = gamma(p) g1 = gamma(p + 1/a) g2 = gamma(p + 2/a) g3 = gamma(p + 3/a) g4 = gamma(p + 4/a) kurt = (g0**3*g4 - 4*g0**2*g1*g3 + 6*g0*g1**2*g2 - 3*g1**4)/(g0*g2 - g1**2)**2 return kurt def loglike(self, data, paravec, sign = 1): la, lb, lp = paravec loglike = len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) - (1/np.exp(lb)**np.exp(la)) * sum(data**np.exp(la))\ -len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * gammaln(np.exp(lp)) loglike = sign*loglike return loglike #I'm writing the below function so we don't have to copy and paste the loglike so much def loglike_param(self, data, la, lb, lp, sign = 1): ll =len(data) * sp.log(np.exp(la)) + (np.exp(la)*np.exp(lp)-1) * sum(sp.log(data)) - (1/np.exp(lb)**np.exp(la)) * sum(data**np.exp(la))\ -len(data)*np.exp(la)*np.exp(lp)*sp.log(np.exp(lb)) - len(data) * gammaln(np.exp(lp)) ll = sign*ll return ll class Ga(Gg): def __init__(self, b, p): self.a = 1 self.b = b self.p = p def loglike(self, data, paravec, sign = 1): la = 0 lb, lp = paravec ll = self.loglike_param(data, la, lb, lp, sign) return ll class W(Gg): def __init__(self, a, b): self.p = 1 self.a = a self.b = b # super(W, self).__init__(a, b, self.p) def loglike(self, data, paravec, sign = 1): lp = 0 la, lb = paravec ll = self.loglike_param(data, la, lb, lp, sign) return ll class Chi2(Gg): def __init__(self, p): self.a = 1 self.b = 2 self.p = p # super(Chi2, self).__init__(self.a, self.b, p) def loglike(self, data, paravec, sign = 1): la, lb = 0, np.log(2) lp = paravec ll = self.loglike_param(data, la, lb, lp, sign) return ll class Exp(Gg): def __init__(self, b): self.a = 1 self.p = 1 # super(Exp, self).__init__(self.a, b, self.p) self.b = b def loglike(self, data, paravec, sign = 1): la, lp = 0, 0 lb = paravec ll = self.loglike_param(data, la, lb, lp, sign) return ll class Ln(object): def __init__(self, u, sig): self.u = u self.sig = sig def pdf(self, y): u = self.u sig = self.sig pdf = 1/(y*sig*(2*np.pi)**(1/2)) * np.exp(-(np.log(y) - u)**2 / (2*sig**2)) return pdf def cdf(self, y): u = self.u sig = self.sig z = (np.log(y) - u)/(sig*2**(1/2)) cdf = (1/2)*(1 + erf(z)) return cdf def mom(self, h): u = self.u sig = self.sig mom = np.exp(h*u + h**2*sig**2/2) return mom def mean(self): mean = self.mom(1) return mean def std(self): var = self.mom(2) - self.mom(1)**2 std = var**(1/2) return std def skew(self): mom1 = self.mom(1) mom2 = self.mom(2) mom3 = self.mom(3) var = (self.std())**2 skew = (mom3 - 3*mom1*mom2 + 2*mom1**3)/(var)**(3/2) return skew def kurt(self): mom1 = self.mom(1) mom2 = self.mom(2) mom3 = self.mom(3) mom4 = self.mom(4) var = (self.std())**2 kurtosis = (mom4 - 4*mom1*mom3 + 6*mom1**2*mom2 - 3*mom1**4) / var**2 return kurtosis def loglike(self, data, paravec, sign = 1): lu, lsig = paravec loglike = (-1/(2*np.exp(lsig)**2)) * sum((sp.log(data)-np.exp(lu))**2) - (len(data)/2) * sp.log(2*sp.pi) \ - len(data) * sp.log(np.exp(lsig)) - sum(sp.log(data)) loglike = sign*loglike return loglike
27.695205
150
0.467355
2,638
16,174
2.827142
0.064064
0.094529
0.035666
0.032582
0.787477
0.760392
0.728211
0.701931
0.686645
0.653258
0
0.033028
0.35792
16,174
583
151
27.74271
0.685123
0.045381
0
0.7897
0
0
0
0
0
0
0
0
0
1
0.145923
false
0.006438
0.015021
0
0.300429
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
95cf5e144875e02e88f61845bb48a35cea39b8b1
47
py
Python
schedule/__init__.py
FlorianYANG/pricingtools
51b6831cbeccdcb89f3c78eeb9660a98c5b1470c
[ "MIT" ]
null
null
null
schedule/__init__.py
FlorianYANG/pricingtools
51b6831cbeccdcb89f3c78eeb9660a98c5b1470c
[ "MIT" ]
null
null
null
schedule/__init__.py
FlorianYANG/pricingtools
51b6831cbeccdcb89f3c78eeb9660a98c5b1470c
[ "MIT" ]
null
null
null
from .schedule import * from . import holidays
15.666667
23
0.765957
6
47
6
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.170213
47
2
24
23.5
0.923077
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
95d4f2063c350a91f760f48a1ac56868cf76735b
133
py
Python
supermario/supermaio1102/mygame.py
Kimmiryeong/2DGP_GameProject
ad3fb197aab27227fc92fd404b2c310f8d0827ca
[ "MIT" ]
null
null
null
supermario/supermaio1102/mygame.py
Kimmiryeong/2DGP_GameProject
ad3fb197aab27227fc92fd404b2c310f8d0827ca
[ "MIT" ]
null
null
null
supermario/supermaio1102/mygame.py
Kimmiryeong/2DGP_GameProject
ad3fb197aab27227fc92fd404b2c310f8d0827ca
[ "MIT" ]
null
null
null
import game_framework from pico2d import* import start_state open_canvas(1800, 1024) game_framework.run(start_state) close_canvas()
16.625
31
0.842105
20
133
5.3
0.65
0.245283
0
0
0
0
0
0
0
0
0
0.07438
0.090226
133
8
32
16.625
0.801653
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
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
250ba0da0c021ee8114bcc6a3e95f1890775214a
228
py
Python
src/lib/pedal/report/__init__.py
Skydler/skulpt
6eeabde2c5eb80c4a13f0958b75a69d99cd31b8a
[ "MIT" ]
4
2015-08-06T07:19:58.000Z
2020-12-10T08:55:10.000Z
src/lib/pedal/report/__init__.py
Skydler/skulpt
6eeabde2c5eb80c4a13f0958b75a69d99cd31b8a
[ "MIT" ]
null
null
null
src/lib/pedal/report/__init__.py
Skydler/skulpt
6eeabde2c5eb80c4a13f0958b75a69d99cd31b8a
[ "MIT" ]
2
2019-10-16T22:18:29.000Z
2020-04-27T07:25:06.000Z
""" The collection of classes and functions used to store the fundamental Report and Feedback objects. """ from pedal.report.report import Report from pedal.report.feedback import Feedback from pedal.report.imperative import *
25.333333
76
0.807018
32
228
5.75
0.53125
0.146739
0.244565
0
0
0
0
0
0
0
0
0
0.131579
228
8
77
28.5
0.929293
0.429825
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
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
254dc5468c42b49f010ef38adacb76f043028fbb
33
py
Python
pykeops/numpy/shape_distance/__init__.py
MrHuff/keops
a7f44609ba444af8d9fcb11bc3a75f2024841dfa
[ "MIT" ]
1
2020-05-08T08:03:31.000Z
2020-05-08T08:03:31.000Z
pykeops/numpy/shape_distance/__init__.py
MrHuff/keops
a7f44609ba444af8d9fcb11bc3a75f2024841dfa
[ "MIT" ]
null
null
null
pykeops/numpy/shape_distance/__init__.py
MrHuff/keops
a7f44609ba444af8d9fcb11bc3a75f2024841dfa
[ "MIT" ]
1
2020-05-08T08:03:34.000Z
2020-05-08T08:03:34.000Z
from .fshape_scp import FshapeScp
33
33
0.878788
5
33
5.6
1
0
0
0
0
0
0
0
0
0
0
0
0.090909
33
1
33
33
0.933333
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
25691d21e7be78acca09e95f83ede59c1889edcf
283
py
Python
source/controllers/error_controller.py
DeNice-r/Flask-Musician-Website
f65dc0f6a31353f339e25f58af17bd716f293f0d
[ "MIT" ]
null
null
null
source/controllers/error_controller.py
DeNice-r/Flask-Musician-Website
f65dc0f6a31353f339e25f58af17bd716f293f0d
[ "MIT" ]
null
null
null
source/controllers/error_controller.py
DeNice-r/Flask-Musician-Website
f65dc0f6a31353f339e25f58af17bd716f293f0d
[ "MIT" ]
null
null
null
from app import app from flask import render_template from flask_login import current_user @app.errorhandler(404) def not_found(error): return render_template('error.html'), 404 @app.errorhandler(401) def not_authorized(error): return render_template('error.html'), 401
18.866667
45
0.777385
41
283
5.195122
0.463415
0.197183
0.159624
0.234742
0.319249
0.319249
0
0
0
0
0
0.04878
0.130742
283
14
46
20.214286
0.817073
0
0
0
0
0
0.070922
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.222222
0.777778
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
c2b1940517eff811d72ff8a4204eefd619f764ce
58
py
Python
pettingzoo/classic/checkers_v3.py
FaramaFoundation/PettingZoo
62081cfcbdf284f4190c0f03a795604ab66f419b
[ "Apache-2.0" ]
null
null
null
pettingzoo/classic/checkers_v3.py
FaramaFoundation/PettingZoo
62081cfcbdf284f4190c0f03a795604ab66f419b
[ "Apache-2.0" ]
null
null
null
pettingzoo/classic/checkers_v3.py
FaramaFoundation/PettingZoo
62081cfcbdf284f4190c0f03a795604ab66f419b
[ "Apache-2.0" ]
null
null
null
from .checkers.checkers import env, raw_env # noqa: F401
29
57
0.758621
9
58
4.777778
0.777778
0
0
0
0
0
0
0
0
0
0
0.061224
0.155172
58
1
58
58
0.816327
0.172414
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
c2b944f6d40a2563c8fdfd0709dc3a4335484b00
96
py
Python
venv/lib/python3.8/site-packages/yapf/yapflib/yapf_api.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/yapf/yapflib/yapf_api.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/yapf/yapflib/yapf_api.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/69/c1/dd/e8caa0967cf6dd53301eecf63da05f2e7e5a09a1f41194aac68c23d356
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.375
0
96
1
96
96
0.520833
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
5
c2c08954592fb7ac45178cccce5b3433859bd1fc
177
py
Python
detector/utils/__init__.py
TropComplique/single-shot-detector
3714d411305f1a55bebb7e38ee58dfea70aa328d
[ "MIT" ]
17
2018-02-19T08:45:39.000Z
2021-05-14T10:59:05.000Z
detector/utils/__init__.py
lly8752/single-shot-detector
3714d411305f1a55bebb7e38ee58dfea70aa328d
[ "MIT" ]
4
2018-02-19T07:40:06.000Z
2020-03-19T12:31:13.000Z
detector/utils/__init__.py
lly8752/single-shot-detector
3714d411305f1a55bebb7e38ee58dfea70aa328d
[ "MIT" ]
7
2018-12-11T14:39:24.000Z
2020-08-07T09:34:52.000Z
from .box_utils import iou, area, intersection, encode, batch_decode from .layer_utils import batch_norm_relu, conv2d_same from .nms import batch_multiclass_non_max_suppression
44.25
68
0.858757
27
177
5.259259
0.740741
0.15493
0
0
0
0
0
0
0
0
0
0.00625
0.096045
177
3
69
59
0.88125
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
c2d4e007d72805690dfc46c61e88399882954d7d
26
py
Python
dactyl/version.py
divvydev/dactyl
dbcbbd0b5302e9b787ccaf3e49fcf3076d488a48
[ "MIT" ]
null
null
null
dactyl/version.py
divvydev/dactyl
dbcbbd0b5302e9b787ccaf3e49fcf3076d488a48
[ "MIT" ]
null
null
null
dactyl/version.py
divvydev/dactyl
dbcbbd0b5302e9b787ccaf3e49fcf3076d488a48
[ "MIT" ]
null
null
null
__version__ = '0.7.0-a10'
13
25
0.653846
5
26
2.6
0.8
0
0
0
0
0
0
0
0
0
0
0.217391
0.115385
26
1
26
26
0.347826
0
0
0
0
0
0.346154
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
c2dd00313c3909653e0737066d85da1e0a72b91c
436
py
Python
7kyu/python/reverse-and-invert/test_reverse_and_invert.py
seattlechem/codewars
885293e7ad5fb427c07792ed85d74881a5ebad29
[ "MIT" ]
null
null
null
7kyu/python/reverse-and-invert/test_reverse_and_invert.py
seattlechem/codewars
885293e7ad5fb427c07792ed85d74881a5ebad29
[ "MIT" ]
null
null
null
7kyu/python/reverse-and-invert/test_reverse_and_invert.py
seattlechem/codewars
885293e7ad5fb427c07792ed85d74881a5ebad29
[ "MIT" ]
null
null
null
"""Test cases.""" from reverse_and_invert import reverse_invert def test_true(): """True test cases.""" assert reverse_invert([1, 2, 3, 4, 5]) == [-1, -2, -3, -4, -5] assert reverse_invert([-10]) == [1] assert reverse_invert([- 9, - 18, 99]) == [9, 81, - 99] assert reverse_invert([1, 12, 'a', 3.4, 87, 99.9, -42, 50, 5.6]) == [- 1, -21, -78, 24, -5] assert reverse_invert([]) == []
33.538462
66
0.513761
65
436
3.307692
0.446154
0.362791
0.44186
0.186047
0.046512
0
0
0
0
0
0
0.145062
0.256881
436
12
67
36.333333
0.518519
0.06422
0
0
0
0
0.002519
0
0
0
0
0
0.625
1
0.125
true
0
0.125
0
0.25
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
1
0
0
0
0
0
0
5
c2e7578342f2162cece94d745689709b5c713329
183
py
Python
3-Python-Advanced (May 2021)/modules/lab/math_operations/operations.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
3-Python-Advanced (May 2021)/modules/lab/math_operations/operations.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
3-Python-Advanced (May 2021)/modules/lab/math_operations/operations.py
karolinanikolova/SoftUni-Software-Engineering
7891924956598b11a1e30e2c220457c85c40f064
[ "MIT" ]
null
null
null
def multiply(x, y): return x * y def divide(x, y): return x / y def add(x, y): return x + y def subtract(x, y): return x - y def power(x, y): return x ** y
10.166667
19
0.519126
35
183
2.714286
0.257143
0.210526
0.421053
0.473684
0.652632
0.547368
0
0
0
0
0
0
0.338798
183
18
20
10.166667
0.785124
0
0
0
0
0
0
0
0
0
0
0
0
1
0.5
false
0
0
0.5
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
1
0
0
0
5
6c0e075d772b96f09b914e157c0e96b3a3caf790
129
py
Python
WEEKS/wk17/CodeSignal-Solutions/26_-_evenDigitsOnly.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/wk17/CodeSignal-Solutions/26_-_evenDigitsOnly.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/wk17/CodeSignal-Solutions/26_-_evenDigitsOnly.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
def evenDigitsOnly(n): return all( (True if digit in ("0", "2", "4", "6", "8") else False for digit in str(n)) )
25.8
83
0.527132
21
129
3.238095
0.857143
0.205882
0
0
0
0
0
0
0
0
0
0.053763
0.27907
129
4
84
32.25
0.677419
0
0
0
0
0
0.03876
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
6c0fbadd1dd1cb5b303cc37dbb39f9cfa4efa7a4
46
py
Python
2commit.py
Davide-Botturi/Dog-Breed-Udacity
401d56012da4030ef486ca5149c9ebe6e29d0376
[ "MIT" ]
null
null
null
2commit.py
Davide-Botturi/Dog-Breed-Udacity
401d56012da4030ef486ca5149c9ebe6e29d0376
[ "MIT" ]
4
2020-09-26T01:14:36.000Z
2022-02-10T02:09:02.000Z
2commit.py
Davide-Botturi/Dog-Breed-Udacity
401d56012da4030ef486ca5149c9ebe6e29d0376
[ "MIT" ]
null
null
null
import numpy import matplotlib.pyplot as plt
11.5
31
0.826087
7
46
5.428571
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.152174
46
3
32
15.333333
0.974359
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
6c1a309b21699946e2bc70ab9970af0f09be51ab
229
py
Python
importdata/admin.py
uktrade/fadmin2
0f774400fb816c9ca30e30b25ae542135966e185
[ "MIT" ]
3
2020-01-05T16:46:42.000Z
2021-08-02T08:08:39.000Z
importdata/admin.py
uktrade/fadmin2
0f774400fb816c9ca30e30b25ae542135966e185
[ "MIT" ]
30
2019-11-28T15:16:35.000Z
2021-08-16T14:49:58.000Z
importdata/admin.py
uktrade/fadmin2
0f774400fb816c9ca30e30b25ae542135966e185
[ "MIT" ]
null
null
null
from django.contrib import admin from core.admin import AdminReadOnly from importdata.models import AsyncImportLog class AsyncImportLogAdmin(AdminReadOnly): pass admin.site.register(AsyncImportLog, AsyncImportLogAdmin)
17.615385
56
0.834061
24
229
7.958333
0.625
0
0
0
0
0
0
0
0
0
0
0
0.117904
229
12
57
19.083333
0.945545
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0.166667
0.833333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
1
0
1
0
0
5
6c46e678c680ca5f23636185dfecbdbf8f4ad826
239
py
Python
object_detection/unit.py
IVRL/Dunit
0f0d4086b4d8576c11dfac6092b9b60fa4ad7b72
[ "CC0-1.0" ]
25
2020-07-13T17:55:37.000Z
2021-11-12T11:02:48.000Z
object_detection/unit.py
IVRL/Dunit
0f0d4086b4d8576c11dfac6092b9b60fa4ad7b72
[ "CC0-1.0" ]
5
2020-12-06T07:17:34.000Z
2021-11-22T08:36:31.000Z
object_detection/unit.py
IVRL/Dunit
0f0d4086b4d8576c11dfac6092b9b60fa4ad7b72
[ "CC0-1.0" ]
1
2020-12-22T02:28:01.000Z
2020-12-22T02:28:01.000Z
"""Model for object segmentation based on UNIT""" from ..unit.model import UNIT from .mixin import ObjectDetectionMixin class UNITObjectDetection( ObjectDetectionMixin, UNIT): """Model for object segmentation based on UNIT"""
29.875
53
0.753138
27
239
6.666667
0.481481
0.088889
0.155556
0.288889
0.411111
0.411111
0.411111
0
0
0
0
0
0.16318
239
7
54
34.142857
0.9
0.364017
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.75
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
6c5535e1ac05120df6b00d94678710bcae552add
35
py
Python
crslab/config/__init__.py
Zilize/CRSLab
fb357d0dfb7d2cf7b67b892d98e52032a31ca564
[ "MIT" ]
null
null
null
crslab/config/__init__.py
Zilize/CRSLab
fb357d0dfb7d2cf7b67b892d98e52032a31ca564
[ "MIT" ]
null
null
null
crslab/config/__init__.py
Zilize/CRSLab
fb357d0dfb7d2cf7b67b892d98e52032a31ca564
[ "MIT" ]
null
null
null
from crslab.config.config import *
17.5
34
0.8
5
35
5.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.114286
35
1
35
35
0.903226
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
6c8c15ecb2a2cd20e51f2875225197fbc66df1cc
37
py
Python
km_pypi_test/views.py
kamalhg/km_pypi_test
13ecbbbf8503b20d8136520f5b19487f9f805b2e
[ "MIT" ]
null
null
null
km_pypi_test/views.py
kamalhg/km_pypi_test
13ecbbbf8503b20d8136520f5b19487f9f805b2e
[ "MIT" ]
null
null
null
km_pypi_test/views.py
kamalhg/km_pypi_test
13ecbbbf8503b20d8136520f5b19487f9f805b2e
[ "MIT" ]
null
null
null
def test_function(): print "TESTING"
18.5
20
0.756757
5
37
5.4
1
0
0
0
0
0
0
0
0
0
0
0
0.108108
37
2
21
18.5
0.818182
0
0
0
0
0
0.184211
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
1
0
5
6657d9d3ad39fc6bd65f89817d702a1d2236d392
1,748
py
Python
cotidia/admin/tests/unit/dynamic_list/test_detail_url.py
hayden5-mwac/cotidia-admin
cfdd9d2677dd1098019fafbec8a6d07e1a42f9eb
[ "BSD-3-Clause" ]
2
2019-07-20T14:43:21.000Z
2021-04-30T15:43:49.000Z
cotidia/admin/tests/unit/dynamic_list/test_detail_url.py
hayden5-mwac/cotidia-admin
cfdd9d2677dd1098019fafbec8a6d07e1a42f9eb
[ "BSD-3-Clause" ]
16
2020-07-17T04:26:20.000Z
2022-03-23T14:47:31.000Z
cotidia/admin/tests/unit/dynamic_list/test_detail_url.py
hayden5-mwac/cotidia-admin
cfdd9d2677dd1098019fafbec8a6d07e1a42f9eb
[ "BSD-3-Clause" ]
1
2020-05-18T20:56:45.000Z
2020-05-18T20:56:45.000Z
from django.test import TestCase from cotidia.admin.tests.models import ExampleModelOne from cotidia.admin.serializers import BaseDynamicListSerializer class TestDetailURLSerializer(TestCase): def test_detail_url_none(self): class ExampleModelOneSerializer(BaseDynamicListSerializer): other_model = ExampleModelOne() class Meta: model = ExampleModelOne fields = "__all__" class SearchProvider: display_field = "char_field" filters = "__all__" detail_url_field = None serializer = ExampleModelOneSerializer() self.assertEqual(serializer.get_detail_url_field(), None) def test_detail_url_default(self): class ExampleModelOneSerializer(BaseDynamicListSerializer): other_model = ExampleModelOne() class Meta: model = ExampleModelOne fields = "__all__" class SearchProvider: display_field = "char_field" filters = "__all__" serializer = ExampleModelOneSerializer() self.assertEqual(serializer.get_detail_url_field(), "_detail_url") def test_detail_url_custom(self): class ExampleModelOneSerializer(BaseDynamicListSerializer): other_model = ExampleModelOne() class Meta: model = ExampleModelOne fields = "__all__" class SearchProvider: display_field = "char_field" filters = "__all__" detail_url_field = "detail_url" serializer = ExampleModelOneSerializer() self.assertEqual(serializer.get_detail_url_field(), "detail_url")
32.37037
74
0.631579
140
1,748
7.464286
0.25
0.094737
0.066986
0.045933
0.767464
0.758852
0.758852
0.758852
0.758852
0.685167
0
0
0.305492
1,748
53
75
32.981132
0.860791
0
0
0.692308
0
0
0.058924
0
0
0
0
0
0.076923
1
0.076923
false
0
0.076923
0
0.410256
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
6689f00a608f6c5f464f45f4fdded3a9df9aed0a
66
py
Python
tests/testfunccall.numbers.py
Vaarai/rockstar-py
e7f93eb44dcf77cddd1288b15eee127be928b032
[ "MIT" ]
null
null
null
tests/testfunccall.numbers.py
Vaarai/rockstar-py
e7f93eb44dcf77cddd1288b15eee127be928b032
[ "MIT" ]
null
null
null
tests/testfunccall.numbers.py
Vaarai/rockstar-py
e7f93eb44dcf77cddd1288b15eee127be928b032
[ "MIT" ]
null
null
null
def Multiply(Love, Life): return Love * Life Multiply(3, 444)
16.5
25
0.681818
10
66
4.5
0.7
0.355556
0
0
0
0
0
0
0
0
0
0.075472
0.19697
66
3
26
22
0.773585
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.333333
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
5
66931556061a0075eefd1c341ecc35f8c5bef3a3
77
py
Python
boa3_test/test_sc/function_test/ReturnIfExpressionMismatched.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
25
2020-07-22T19:37:43.000Z
2022-03-08T03:23:55.000Z
boa3_test/test_sc/function_test/ReturnIfExpressionMismatched.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
419
2020-04-23T17:48:14.000Z
2022-03-31T13:17:45.000Z
boa3_test/test_sc/function_test/ReturnIfExpressionMismatched.py
hal0x2328/neo3-boa
6825a3533384cb01660773050719402a9703065b
[ "Apache-2.0" ]
15
2020-05-21T21:54:24.000Z
2021-11-18T06:17:24.000Z
def Main(number: int) -> int: return number if number % 2 == 1 else None
25.666667
46
0.636364
13
77
3.769231
0.769231
0
0
0
0
0
0
0
0
0
0
0.034483
0.246753
77
2
47
38.5
0.810345
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
66aa5befdcdd9d7fd70eef763759361dcf28c0f0
2,344
py
Python
examples/test_disk.py
maxtrussell/python-computer-craft
9e318d2a0d368faf7a5c2a91e750fe8008aa9b81
[ "MIT" ]
42
2016-12-17T21:26:34.000Z
2022-03-30T06:16:34.000Z
examples/test_disk.py
maxtrussell/python-computer-craft
9e318d2a0d368faf7a5c2a91e750fe8008aa9b81
[ "MIT" ]
9
2018-02-21T22:44:18.000Z
2022-03-14T04:14:02.000Z
examples/test_disk.py
maxtrussell/python-computer-craft
9e318d2a0d368faf7a5c2a91e750fe8008aa9b81
[ "MIT" ]
7
2018-04-02T09:08:29.000Z
2022-03-31T15:19:02.000Z
from cc import LuaException, import_file, disk _lib = import_file('_lib.py', __file__) step, assert_raises = _lib.step, _lib.assert_raises s = 'right' assert _lib.get_class_table(disk) == _lib.get_object_table('disk') step(f'Make sure there is no disk drive at {s} side') assert disk.isPresent(s) is False assert disk.hasData(s) is False assert disk.getMountPath(s) is None assert disk.setLabel(s, 'text') is None assert disk.getLabel(s) is None assert disk.getID(s) is None assert disk.hasAudio(s) is False assert disk.getAudioTitle(s) is None assert disk.playAudio(s) is None assert disk.stopAudio(s) is None assert disk.eject(s) is None step(f'Place empty disk drive at {s} side') assert disk.isPresent(s) is False assert disk.hasData(s) is False assert disk.getMountPath(s) is None assert disk.setLabel(s, 'text') is None assert disk.getLabel(s) is None assert disk.getID(s) is None assert disk.hasAudio(s) is False assert disk.getAudioTitle(s) is False # False instead None! assert disk.playAudio(s) is None assert disk.stopAudio(s) is None assert disk.eject(s) is None step('Put new CC diskette into disk drive') assert disk.isPresent(s) is True assert disk.hasData(s) is True assert isinstance(disk.getMountPath(s), str) assert isinstance(disk.getID(s), int) assert disk.getLabel(s) is None assert disk.setLabel(s, 'label') is None assert disk.getLabel(s) == 'label' assert disk.setLabel(s, None) is None assert disk.getLabel(s) is None assert disk.hasAudio(s) is False assert disk.getAudioTitle(s) is None assert disk.playAudio(s) is None assert disk.stopAudio(s) is None assert disk.eject(s) is None step('Put any audio disk into disk drive') assert disk.isPresent(s) is True assert disk.hasData(s) is False assert disk.getMountPath(s) is None assert disk.getID(s) is None assert disk.hasAudio(s) is True label = disk.getAudioTitle(s) assert isinstance(label, str) assert label != 'label' print(f'Label is {label}') assert disk.getLabel(s) == label with assert_raises(LuaException): assert disk.setLabel(s, 'label') is None with assert_raises(LuaException): assert disk.setLabel(s, None) is None # no effect assert disk.getLabel(s) == label assert disk.playAudio(s) is None step('Audio must be playing now') assert disk.stopAudio(s) is None assert disk.eject(s) is None print('Test finished successfully')
26.942529
66
0.759812
401
2,344
4.391521
0.159601
0.261215
0.0954
0.208972
0.749006
0.735378
0.726292
0.657013
0.583759
0.583759
0
0
0.132253
2,344
86
67
27.255814
0.865782
0.012372
0
0.676923
0
0
0.111592
0
0
0
0
0
0.830769
1
0
false
0
0.030769
0
0.030769
0.030769
0
0
0
null
1
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
1
0
0
0
0
0
0
0
0
0
5
66ebd7949ff5cd3201dab59d4152c78ad4d7c03c
359
py
Python
services/common/domain/actions/add_player_to_game.py
tkblackbelt/Asteroids-Multiplayer-Backend
e09b110ec8698657d8f22f2600e95acc663b1ba0
[ "Apache-2.0" ]
null
null
null
services/common/domain/actions/add_player_to_game.py
tkblackbelt/Asteroids-Multiplayer-Backend
e09b110ec8698657d8f22f2600e95acc663b1ba0
[ "Apache-2.0" ]
null
null
null
services/common/domain/actions/add_player_to_game.py
tkblackbelt/Asteroids-Multiplayer-Backend
e09b110ec8698657d8f22f2600e95acc663b1ba0
[ "Apache-2.0" ]
null
null
null
import inject from common.domain.player import Player from common.domain.player_cache_interface import PlayerCacheInterface class AddPlayerToGame: @inject.autoparams('cache') def __init__(self, cache: PlayerCacheInterface): self.__cache = cache def execute(self, player: Player) -> bool: return self.__cache.add_player(player)
25.642857
69
0.752089
41
359
6.317073
0.463415
0.104247
0.123552
0.169884
0
0
0
0
0
0
0
0
0.167131
359
13
70
27.615385
0.866221
0
0
0
0
0
0.013928
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.111111
0.777778
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
1
1
0
0
5
dd15ecc21aaba9a3adc7c10f4bda5ee5fd437f61
115
py
Python
Client.py
pmanfo/Deeep-Learning-Pytorch-Docker-Ngnix
ba0c8e981a2d9a9b38c4896ccca00b7af3c26dd8
[ "MIT" ]
null
null
null
Client.py
pmanfo/Deeep-Learning-Pytorch-Docker-Ngnix
ba0c8e981a2d9a9b38c4896ccca00b7af3c26dd8
[ "MIT" ]
null
null
null
Client.py
pmanfo/Deeep-Learning-Pytorch-Docker-Ngnix
ba0c8e981a2d9a9b38c4896ccca00b7af3c26dd8
[ "MIT" ]
null
null
null
# coding:utf-8 import socket host,conn=('localhost',5566) socket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
28.75
57
0.791304
18
115
4.944444
0.722222
0.404494
0.404494
0
0
0
0
0
0
0
0
0.046296
0.06087
115
4
57
28.75
0.777778
0.104348
0
0
0
0
0.088235
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
dd2154e9954f0a8634dc036dc48918ab88c497cc
49
py
Python
Projects/project2/killprocesses.py
jdiegoh3/distributed_computing
33088e741d35590d5699e8ecd9a35ff12b65f7f8
[ "MIT" ]
null
null
null
Projects/project2/killprocesses.py
jdiegoh3/distributed_computing
33088e741d35590d5699e8ecd9a35ff12b65f7f8
[ "MIT" ]
null
null
null
Projects/project2/killprocesses.py
jdiegoh3/distributed_computing
33088e741d35590d5699e8ecd9a35ff12b65f7f8
[ "MIT" ]
null
null
null
import os os.system('taskkill /f /im python.exe')
24.5
39
0.734694
9
49
4
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.102041
49
2
39
24.5
0.818182
0
0
0
0
0
0.52
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
dd5adc7a17f11dc8aed0d35f75885ef4c3a60b6a
432
py
Python
b2/transferer/parallel.py
sam-centrevilletech/B2_Command_Line_Tool
9cdef21cc43cb1d45590349754a4c866372ca6e1
[ "MIT" ]
null
null
null
b2/transferer/parallel.py
sam-centrevilletech/B2_Command_Line_Tool
9cdef21cc43cb1d45590349754a4c866372ca6e1
[ "MIT" ]
2
2022-02-24T21:17:18.000Z
2022-03-16T20:45:45.000Z
b2/transferer/parallel.py
sam-centrevilletech/B2_Command_Line_Tool
9cdef21cc43cb1d45590349754a4c866372ca6e1
[ "MIT" ]
null
null
null
###################################################################### # # File: b2/transferer/parallel.py # # Copyright 2019 Backblaze Inc. All Rights Reserved. # # License https://www.backblaze.com/using_b2_code.html # ###################################################################### from b2sdk.transferer.parallel import * # noqa import b2._sdk_deprecation b2._sdk_deprecation.deprecate_module('b2.transferer.parallel')
28.8
70
0.525463
39
432
5.641026
0.692308
0.245455
0.181818
0
0
0
0
0
0
0
0
0.025
0.074074
432
14
71
30.857143
0.525
0.324074
0
0
0
0
0.153846
0.153846
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
dd5aede13169038c3bffa9967e0b92e536ae0d9a
106
py
Python
src/network/__init__.py
mateusz800/data_encryptor
4f317e08bdcd5c5a3815a541823baf18d8fc9809
[ "MIT" ]
null
null
null
src/network/__init__.py
mateusz800/data_encryptor
4f317e08bdcd5c5a3815a541823baf18d8fc9809
[ "MIT" ]
null
null
null
src/network/__init__.py
mateusz800/data_encryptor
4f317e08bdcd5c5a3815a541823baf18d8fc9809
[ "MIT" ]
null
null
null
from .receiver import ReceiveThread from .sender import SendThread, send_request_for_key, send_session_key
53
70
0.877358
15
106
5.866667
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.084906
106
2
70
53
0.907216
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
06d8f8da536cfb5997f2d659140a78509fe6ef37
112
py
Python
revolt/ext/commands/__init__.py
LightSage/revolt.py
a16bac6207b63f818bf39de1a5508c377e25f0e8
[ "MIT" ]
null
null
null
revolt/ext/commands/__init__.py
LightSage/revolt.py
a16bac6207b63f818bf39de1a5508c377e25f0e8
[ "MIT" ]
null
null
null
revolt/ext/commands/__init__.py
LightSage/revolt.py
a16bac6207b63f818bf39de1a5508c377e25f0e8
[ "MIT" ]
null
null
null
from .checks import * from .client import * from .command import * from .context import * from .errors import *
18.666667
22
0.732143
15
112
5.466667
0.466667
0.487805
0
0
0
0
0
0
0
0
0
0
0.178571
112
5
23
22.4
0.891304
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
06e2475768b7fdaef6dfd358e5200d9340f7fd05
102
py
Python
src/drivers/__init__.py
tomszir/chip8-py
b73c7f5478aa45bd98f0371daf4f6136c7da58cb
[ "MIT" ]
null
null
null
src/drivers/__init__.py
tomszir/chip8-py
b73c7f5478aa45bd98f0371daf4f6136c7da58cb
[ "MIT" ]
null
null
null
src/drivers/__init__.py
tomszir/chip8-py
b73c7f5478aa45bd98f0371daf4f6136c7da58cb
[ "MIT" ]
null
null
null
from .audio import AudioDriver from .keyboard import InputDriver from .graphics import GraphicsDriver
25.5
36
0.852941
12
102
7.25
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.117647
102
3
37
34
0.966667
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
b08ecca13e544317f53eaedcf98efcf32a8265eb
14
py
Python
tests.py
byschii/infarinator
0ab096f2d6d798b59bc7ef072c13902df02a5931
[ "MIT" ]
null
null
null
tests.py
byschii/infarinator
0ab096f2d6d798b59bc7ef072c13902df02a5931
[ "MIT" ]
null
null
null
tests.py
byschii/infarinator
0ab096f2d6d798b59bc7ef072c13902df02a5931
[ "MIT" ]
null
null
null
print('prova')
14
14
0.714286
2
14
5
1
0
0
0
0
0
0
0
0
0
0
0
0
14
1
14
14
0.714286
0
0
0
0
0
0.333333
0
0
0
0
0
0
1
0
true
0
0
0
0
1
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
b0c41424dcd4baf07b0b2c0da1870fb08b3c177b
16,450
py
Python
utils/metric_net/data_loader.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
12
2021-07-27T07:18:24.000Z
2022-03-09T13:52:20.000Z
utils/metric_net/data_loader.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
2
2021-08-03T09:21:33.000Z
2021-12-29T14:25:30.000Z
utils/metric_net/data_loader.py
tsingqguo/ABA
c32edbbe5705b0332a08951b5ee436b5f58c2e70
[ "MIT" ]
3
2021-11-18T14:46:40.000Z
2022-01-03T15:47:23.000Z
import numpy as np import cv2 import os import torch import torch.nn as nn from sample_generator import * from PIL import Image import torch.utils.data as torch_dataset from model import ft_net import torch.optim as optim from torch.optim import lr_scheduler import time from torch.autograd import Variable from torchvision import transforms from tensorboardX import SummaryWriter os.environ["CUDA_VISIBLE_DEVICES"] = "0" class TripletLoss(nn.Module): ''' Compute normal triplet loss or soft margin triplet loss given triplets ''' def __init__(self, margin = None): super(TripletLoss, self).__init__() self.margin = margin if self.margin is None: # use soft-margin self.Loss = nn.SoftMarginLoss() else: self.Loss = nn.TripletMarginLoss(margin = margin, p = 2) self.class_loss = nn.CrossEntropyLoss() def forward(self, anchor, pos, neg, hard_neg): if self.margin is None: num_samples = anchor.shape[0] y = torch.ones((num_samples, 1)).view(-1) if anchor.is_cuda: y = y.cuda() ap_dist = torch.norm(anchor - pos, 2, dim = 1).view(-1) an_dist = torch.norm(anchor - neg, 2, dim = 1).view(-1) ahn_dist = torch.norm(anchor - hard_neg, 2, dim = 1).view(-1) loss = self.Loss(an_dist - ap_dist, y) / 2.0 + self.Loss(ahn_dist - ap_dist, y) / 2.0 else: loss = self.Loss(anchor, pos, neg) return loss class MixedLoss(nn.Module): ''' Compute normal triplet loss or soft margin triplet loss given triplets ''' def __init__(self, margin = None): super(MixedLoss, self).__init__() self.margin = margin if self.margin is None: # use soft-margin self.Loss = nn.SoftMarginLoss() else: self.Loss = nn.TripletMarginLoss(margin = margin, p = 2) self.class_loss = nn.CrossEntropyLoss() def forward(self, anchor, pos, neg, hard_neg, an_class, p_class, neg_class, hard_neg_class, class_ids, hard_class_ids): if self.margin is None: num_samples = anchor.shape[0] y = torch.ones((num_samples, 1)).view(-1) if anchor.is_cuda: y = y.cuda() ap_dist = torch.norm(anchor - pos, 2, dim = 1).view(-1) an_dist = torch.norm(anchor - neg, 2, dim = 1).view(-1) ahn_dist = torch.norm(anchor - hard_neg, 2, dim = 1).view(-1) matching_loss = self.Loss(an_dist - ap_dist, y) / 2.0 + self.Loss(ahn_dist - ap_dist, y) / 2.0 class_loss1 = self.class_loss(an_class, class_ids) class_loss2 = self.class_loss(p_class, class_ids) class_loss3 = self.class_loss(hard_neg_class, hard_class_ids) #class_loss = (class_loss1+class_loss2 + class_loss3)/3.0 neg_class = torch.softmax(neg_class, dim=1) neg_class_loss = torch.sum(-1.0/1400 * torch.log(neg_class),dim=1) neg_class_loss = torch.mean(neg_class_loss, dim=0) class_loss = (class_loss1+ class_loss2 + class_loss3 + neg_class_loss) / 4.0 loss = matching_loss + class_loss else: loss = self.Loss(anchor, pos, neg) return loss, matching_loss, class_loss class ValidationDataset(torch_dataset.Dataset): def __init__(self, src_path): #src_path = '/home/xiaobai/Documents/LaSOT/LaSOTBenchmark/' self.data_dict = dict() seq_list = os.listdir(src_path) seq_list.sort() seq_lists = [] #class_id = 0 for seq_id, seq_name in enumerate(seq_list): self.data_dict[seq_name] = dict() self.data_dict[seq_name]['pos'] = os.listdir(src_path + seq_name + '/pos/') self.data_dict[seq_name]['neg'] = os.listdir(src_path + seq_name + '/neg/') self.data_dict[seq_name]['pos_num'] = len(self.data_dict[seq_name]['pos']) self.data_dict[seq_name]['neg_num'] = len(self.data_dict[seq_name]['neg']) #class_id += 1 # print 'Loading sequences: ', seq_id, '/', 50 self.src_path = src_path self.keys = self.data_dict.keys() self.seq_num = len(self.data_dict.keys()) transform_train_list = [ transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) ] self.data_transforms = transforms.Compose(transform_train_list) def process_regions(self, regions): #regions = np.squeeze(regions, axis=0) regions = regions / 255.0 regions[:,:,0] = (regions[:,:,0] - 0.485) / 0.229 regions[:,:,1] = (regions[:,:,1] - 0.456) / 0.224 regions[:,:,2] = (regions[:,:,2] - 0.406) / 0.225 regions = np.transpose(regions, (2,0,1)) return regions def __getitem__(self, index): #seq_id = np.random.randint(low=0, high = self.seq_num-1, size=[1])[0] seq_name = self.keys[index] index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['pos_num'],size=[1,])[0] anchor_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) anchor_regions = self.process_regions(anchor_regions) index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['pos_num'],size=[1,])[0] pos_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) pos_regions = self.process_regions(pos_regions) if self.data_dict[seq_name]['neg_num'] > 0: index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['neg_num'],size=[1,])[0] neg_regions = np.array(Image.open(self.src_path + seq_name + '/neg/' + self.data_dict[seq_name]['neg'][index1])) neg_regions = self.process_regions(neg_regions) else: index2 = np.random.randint(low=0, high=self.seq_num, size=[1])[0] while index2 == index: index2 = np.random.randint(low=0, high=self.seq_num, size=[1])[0] seq_name = self.keys[index2] index1 = np.random.randint(low=0, high=self.data_dict[seq_name]['pos_num'], size=[1, ])[0] neg_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) neg_regions = self.process_regions(neg_regions) index2 = np.random.randint(low=0,high=self.seq_num, size = [1])[0] while index2 == index: index2 = np.random.randint(low=0, high=self.seq_num, size=[1])[0] seq_name = self.keys[index2] index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['pos_num'],size=[1,])[0] hard_neg_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) hard_neg_regions = self.process_regions(hard_neg_regions) return anchor_regions, pos_regions, neg_regions, hard_neg_regions def __len__(self): # You should change 0 to the total size of your dataset. return self.seq_num class CustomDataset(torch_dataset.Dataset): def __init__(self, src_path): #src_path = '/home/xiaobai/Documents/LaSOT/LaSOTBenchmark/' self.data_dict = dict() folder_list = os.listdir(src_path) folder_list.sort() seq_lists = [] class_id = 0 for folder_id, folder in enumerate(folder_list): #seq_list = sorted([src_path + folder + '/' + seq for seq in seq_list]) seq_list = os.listdir(src_path + folder) seq_list = sorted([folder + '/' + seq for seq in seq_list]) for seq_id, seq_name in enumerate(seq_list): self.data_dict[seq_name] = dict() self.data_dict[seq_name]['pos'] = os.listdir(src_path + seq_name + '/pos/') self.data_dict[seq_name]['neg'] = os.listdir(src_path + seq_name + '/neg/') self.data_dict[seq_name]['pos_num'] = len(self.data_dict[seq_name]['pos']) self.data_dict[seq_name]['neg_num'] = len(self.data_dict[seq_name]['neg']) self.data_dict[seq_name]['class_id'] = class_id class_id += 1 # print 'Loading sequences: ', class_id, '/', 1400 self.src_path = src_path self.keys = self.data_dict.keys() self.seq_num = len(self.data_dict.keys()) transform_train_list = [ transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]) ] self.data_transforms = transforms.Compose(transform_train_list) def process_regions(self, regions): #regions = np.squeeze(regions, axis=0) regions = regions / 255.0 regions[:,:,0] = (regions[:,:,0] - 0.485) / 0.229 regions[:,:,1] = (regions[:,:,1] - 0.456) / 0.224 regions[:,:,2] = (regions[:,:,2] - 0.406) / 0.225 regions = np.transpose(regions, (2,0,1)) return regions def __getitem__(self, index): #seq_id = np.random.randint(low=0, high = self.seq_num-1, size=[1])[0] seq_name = self.keys[index] class_id = self.data_dict[seq_name]['class_id'] class_id = np.array([class_id,]) index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['pos_num'],size=[1,])[0] anchor_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) anchor_regions = self.process_regions(anchor_regions) index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['pos_num'],size=[1,])[0] pos_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) pos_regions = self.process_regions(pos_regions) if self.data_dict[seq_name]['neg_num'] > 0: index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['neg_num'],size=[1,])[0] neg_regions = np.array(Image.open(self.src_path + seq_name + '/neg/' + self.data_dict[seq_name]['neg'][index1])) neg_regions = self.process_regions(neg_regions) else: index2 = np.random.randint(low=0, high=self.seq_num, size=[1])[0] while index2 == index: index2 = np.random.randint(low=0, high=self.seq_num, size=[1])[0] seq_name = self.keys[index2] index1 = np.random.randint(low=0, high=self.data_dict[seq_name]['pos_num'], size=[1, ])[0] neg_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) neg_regions = self.process_regions(neg_regions) index2 = np.random.randint(low=0,high=self.seq_num, size = [1])[0] while index2 == index: index2 = np.random.randint(low=0, high=self.seq_num, size=[1])[0] seq_name = self.keys[index2] index1 = np.random.randint(low=0,high=self.data_dict[seq_name]['pos_num'],size=[1,])[0] hard_neg_regions = np.array(Image.open(self.src_path + seq_name + '/pos/' + self.data_dict[seq_name]['pos'][index1])) hard_neg_regions = self.process_regions(hard_neg_regions) hard_class_id = self.data_dict[seq_name]['class_id'] hard_class_id = np.array([hard_class_id,]) return anchor_regions, pos_regions, neg_regions, hard_neg_regions, class_id, hard_class_id def __len__(self): # You should change 0 to the total size of your dataset. return self.seq_num LR_Rate = 1e-3 model = ft_net(class_num=1400) ignored_params = list(map(id, model.classifier.parameters())) base_params = filter(lambda p: id(p) not in ignored_params, model.parameters()) optimizer_ft = optim.SGD([ {'params': base_params, 'lr': 0.1 * LR_Rate}, {'params': model.classifier.parameters(), 'lr': LR_Rate} ], weight_decay=5e-4, momentum=0.9, nesterov=True) exp_lr_scheduler = lr_scheduler.StepLR(optimizer_ft, step_size=40, gamma=0.1) #criterion = nn.CrossEntropyLoss() criterion = MixedLoss() validation_criterion = TripletLoss() model = model.cuda() model.load_state_dict(torch.load('metric_model/metric_model_19448.pt')) writer_path = './summary' if not os.path.exists(writer_path): os.mkdir(writer_path) writer = SummaryWriter(writer_path) BatchSize = 16 M = 2 im_per_seq = 4 data_path = '/home/xiaobai/Documents/LaSOT_crops/' validation_data_path = '/home/xiaobai/Documents/lt2019_crops/' dataset = CustomDataset(data_path) validation_dataset = ValidationDataset(validation_data_path) train_loader = torch_dataset.DataLoader(dataset=dataset, batch_size = BatchSize, shuffle=True) validation_loader = torch_dataset.DataLoader(dataset=validation_dataset, batch_size = BatchSize, shuffle=True) save_path = './metric_model' if not os.path.exists(save_path): os.mkdir(save_path) #time2 = time.time() #15K iteration lr->1e-3 19448 lr->1e-4 iter = 20144 for epoch in range(1000): # if iter > 15000*M: # LR_Rate = 1e-3 # optimizer_ft = optim.SGD([ # {'params': base_params, 'lr': 0.1 * LR_Rate}, # {'params': model.classifier.parameters(), 'lr': LR_Rate} # ], weight_decay=5e-4, momentum=0.9, nesterov=True) # if iter > 19400*M: # LR_Rate = 1e-4 # optimizer_ft = optim.SGD([ # {'params': base_params, 'lr': 0.1 * LR_Rate}, # {'params': model.classifier.parameters(), 'lr': LR_Rate} # ], weight_decay=5e-4, momentum=0.9, nesterov=True) validation_loss = 0 validation_iter = 0 for anchor_regions, pos_regions, neg_regions, hard_neg_regions in validation_loader: # time1 = time.time() # print "read data time: ", time1 - time2 pos_regions = (Variable(pos_regions)).type(torch.FloatTensor).cuda() anchor_regions = (Variable(anchor_regions)).type(torch.FloatTensor).cuda() neg_regions = (Variable(neg_regions)).type(torch.FloatTensor).cuda() hard_neg_regions = (Variable(hard_neg_regions)).type(torch.FloatTensor).cuda() optimizer_ft.zero_grad() anchor_metric, anchor_class = model(anchor_regions) pos_metric, pos_class = model(pos_regions) neg_metric, neg_class = model(neg_regions) hard_neg_metric, hard_neg_class = model(hard_neg_regions) loss = validation_criterion(anchor_metric, pos_metric, neg_metric, hard_neg_metric) validation_loss = (validation_loss * validation_iter + loss.item()) / (validation_iter + 1) validation_iter += 1 writer.add_scalar('validation_loss', validation_loss, epoch) # print "epoch: ", epoch, ", iteration: ", iter, ", validation loss: ", validation_loss for anchor_regions, pos_regions, neg_regions, hard_neg_regions, class_ids, hard_class_ids in train_loader: #time1 = time.time() #print "read data time: ", time1 - time2 pos_regions = (Variable(pos_regions)).type(torch.FloatTensor).cuda() anchor_regions = (Variable(anchor_regions)).type(torch.FloatTensor).cuda() neg_regions = (Variable(neg_regions)).type(torch.FloatTensor).cuda() hard_neg_regions = (Variable(hard_neg_regions)).type(torch.FloatTensor).cuda() class_ids = Variable(class_ids.cuda()) hard_class_ids = Variable(hard_class_ids.cuda()) optimizer_ft.zero_grad() anchor_metric,anchor_class = model(anchor_regions) pos_metric,pos_class = model(pos_regions) neg_metric,neg_class = model(neg_regions) hard_neg_metric, hard_neg_class = model(hard_neg_regions) class_ids = torch.squeeze(class_ids, 1) hard_class_ids = torch.squeeze(hard_class_ids, 1) loss, matching_loss, class_loss = criterion(anchor_metric, pos_metric, neg_metric, hard_neg_metric, anchor_class, pos_class, neg_class, hard_neg_class, class_ids, hard_class_ids) loss.backward() writer.add_scalar('loss', loss.cpu(), iter) writer.add_scalar('matching loss', matching_loss.cpu(), iter) writer.add_scalar('classification loss', class_loss.cpu(), iter) iter += 1 optimizer_ft.step() # print "epoch: ", epoch, ", iteration: ", iter, ", loss: ", loss.item(), ", matching loss: ", matching_loss.item(), ", classification loss: ", class_loss.item() #time2 = time.time() #print "train time:", time2 - time1 if np.mod(epoch, 20) == 0: torch.save(model.state_dict(), save_path+ '/' + save_path+'_'+str(iter)+'.pt') writer.close()
47.13467
186
0.639574
2,320
16,450
4.286638
0.099138
0.042936
0.054299
0.058824
0.785621
0.751232
0.725088
0.720261
0.701458
0.683157
0
0.030331
0.220365
16,450
349
187
47.13467
0.745107
0.112401
0
0.586873
0
0
0.033304
0.007363
0
0
0
0
0
1
0.046332
false
0
0.057915
0.007722
0.150579
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
b0e45cd4fb489525f1aae2bd1885337e971e9af7
11
py
Python
login.py
wangxuehua/test27
91bd3b8d4f9a2ea8579133a2f76b53e7ea81ec49
[ "MIT" ]
null
null
null
login.py
wangxuehua/test27
91bd3b8d4f9a2ea8579133a2f76b53e7ea81ec49
[ "MIT" ]
null
null
null
login.py
wangxuehua/test27
91bd3b8d4f9a2ea8579133a2f76b53e7ea81ec49
[ "MIT" ]
null
null
null
num1 = 111
5.5
10
0.636364
2
11
3.5
1
0
0
0
0
0
0
0
0
0
0
0.5
0.272727
11
1
11
11
0.375
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
b0067c89076b8d882e081c7365500cda37a978f5
125
py
Python
moocng/externalapps/exceptions.py
OpenMOOC/moocng
1e3dafb84aa1838c881df0c9bcca069e47c7f52d
[ "Apache-2.0" ]
36
2015-01-10T06:00:36.000Z
2020-03-19T10:06:59.000Z
moocng/externalapps/exceptions.py
OpenMOOC/moocng
1e3dafb84aa1838c881df0c9bcca069e47c7f52d
[ "Apache-2.0" ]
3
2015-10-01T17:59:32.000Z
2018-09-04T03:32:17.000Z
moocng/externalapps/exceptions.py
OpenMOOC/moocng
1e3dafb84aa1838c881df0c9bcca069e47c7f52d
[ "Apache-2.0" ]
17
2015-01-13T03:46:58.000Z
2020-07-05T06:29:51.000Z
# -*- coding: utf-8 -*- class InstanceLimitReached(Exception): pass class InstanceCreationError(Exception): pass
12.5
39
0.696
11
125
7.909091
0.727273
0.298851
0
0
0
0
0
0
0
0
0
0.009804
0.184
125
9
40
13.888889
0.843137
0.168
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
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
b031e6d886483f0f8b0bb2e08ac914d966e736b7
137
py
Python
build/lib/lambdata_nov05/__init__.py
nrvanwyck/Nov05_python-packages
39303b24513c21a6f1ab79b80cd9f8409df9e1f1
[ "MIT" ]
null
null
null
build/lib/lambdata_nov05/__init__.py
nrvanwyck/Nov05_python-packages
39303b24513c21a6f1ab79b80cd9f8409df9e1f1
[ "MIT" ]
1
2019-08-14T15:43:34.000Z
2019-08-14T15:43:34.000Z
build/lib/lambdata_nov05/__init__.py
nrvanwyck/Nov05_python-packages
39303b24513c21a6f1ab79b80cd9f8409df9e1f1
[ "MIT" ]
1
2019-08-14T15:22:28.000Z
2019-08-14T15:22:28.000Z
name = "Technically the name is an attribute of the package object, so it can be anything as long as Python allows." import pandas as pd
45.666667
116
0.773723
25
137
4.24
0.84
0
0
0
0
0
0
0
0
0
0
0
0.189781
137
3
117
45.666667
0.954955
0
0
0
0
0.5
0.775362
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
5
b03c589a8d52fd21cd863bb7c8b8cb1810ea1d65
842
py
Python
demo2_ws/build/pal_person_detector_opencv/cmake/pal_person_detector_opencv-genmsg-context.py
AshfakYeafi/ros
7895302251088b7945e359f60a9c617e5170a72e
[ "MIT" ]
null
null
null
demo2_ws/build/pal_person_detector_opencv/cmake/pal_person_detector_opencv-genmsg-context.py
AshfakYeafi/ros
7895302251088b7945e359f60a9c617e5170a72e
[ "MIT" ]
null
null
null
demo2_ws/build/pal_person_detector_opencv/cmake/pal_person_detector_opencv-genmsg-context.py
AshfakYeafi/ros
7895302251088b7945e359f60a9c617e5170a72e
[ "MIT" ]
null
null
null
# generated from genmsg/cmake/pkg-genmsg.context.in messages_str = "/home/venom/ros/demo2_ws/src/ROS_Gazebo_Tutorial/pal_person_detector_opencv/msg/Detection2d.msg;/home/venom/ros/demo2_ws/src/ROS_Gazebo_Tutorial/pal_person_detector_opencv/msg/Detections2d.msg" services_str = "" pkg_name = "pal_person_detector_opencv" dependencies_str = "geometry_msgs" langs = "gencpp;geneus;genlisp;gennodejs;genpy" dep_include_paths_str = "pal_person_detector_opencv;/home/venom/ros/demo2_ws/src/ROS_Gazebo_Tutorial/pal_person_detector_opencv/msg;geometry_msgs;/opt/ros/melodic/share/geometry_msgs/cmake/../msg;std_msgs;/opt/ros/melodic/share/std_msgs/cmake/../msg" PYTHON_EXECUTABLE = "/usr/bin/python2" package_has_static_sources = '' == 'TRUE' genmsg_check_deps_script = "/opt/ros/melodic/share/genmsg/cmake/../../../lib/genmsg/genmsg_check_deps.py"
70.166667
250
0.820665
128
842
5.046875
0.445313
0.069659
0.131579
0.178019
0.369969
0.301858
0.301858
0.301858
0.301858
0.301858
0
0.007426
0.04038
842
11
251
76.545455
0.792079
0.058195
0
0
1
0.222222
0.743363
0.701643
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
5
c68063f9c038edad123ffd13761df7d81ab64b5e
89
py
Python
riberry/app/backends/__init__.py
srafehi/riberry
2ffa48945264177c6cef88512c1bc80ca4bf1d5e
[ "MIT" ]
2
2019-12-09T10:24:36.000Z
2019-12-09T10:26:56.000Z
riberry/app/backends/__init__.py
srafehi/riberry
2ffa48945264177c6cef88512c1bc80ca4bf1d5e
[ "MIT" ]
2
2018-06-11T11:34:28.000Z
2018-08-22T12:00:19.000Z
riberry/app/backends/__init__.py
srafehi/riberry
2ffa48945264177c6cef88512c1bc80ca4bf1d5e
[ "MIT" ]
null
null
null
from .base import RiberryApplicationBackend from .tracker import RiberryExecutionTracker
29.666667
44
0.88764
8
89
9.875
0.75
0
0
0
0
0
0
0
0
0
0
0
0.089888
89
2
45
44.5
0.975309
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
c69fe3e5e362f41a90ff5941187b26d61ddbabce
231
py
Python
lib/keybow2040/keybow_hardware/switches/__init__.py
bschapendonk/pim551
277b7eddb744ed2733a854bb8e96cd66ec05bd0c
[ "MIT" ]
47
2021-04-28T15:55:29.000Z
2022-03-18T02:04:10.000Z
lib/keybow2040/keybow_hardware/switches/__init__.py
bschapendonk/pim551
277b7eddb744ed2733a854bb8e96cd66ec05bd0c
[ "MIT" ]
12
2021-04-30T19:22:35.000Z
2022-02-09T10:16:57.000Z
lib/keybow2040/keybow_hardware/switches/__init__.py
bschapendonk/pim551
277b7eddb744ed2733a854bb8e96cd66ec05bd0c
[ "MIT" ]
19
2021-04-28T15:43:56.000Z
2022-03-20T20:42:43.000Z
class Switches: """ Abstract class providing common interface to the set of switches """ def num_switches(self): raise NotImplementedError def switch_state(self, idx): raise NotImplementedError
23.1
68
0.679654
25
231
6.2
0.72
0.309677
0
0
0
0
0
0
0
0
0
0
0.25974
231
9
69
25.666667
0.906433
0.277056
0
0.4
0
0
0
0
0
0
0
0
0
1
0.4
false
0
0
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
5
c6a51b8e5bbac43133f193018b11abb359d81275
1,226
py
Python
src/big_torch/layers/abstract.py
Denchidlo/big-torch
f5a65e6216e46e6d4fe98670c52618e4cccc8163
[ "MIT" ]
null
null
null
src/big_torch/layers/abstract.py
Denchidlo/big-torch
f5a65e6216e46e6d4fe98670c52618e4cccc8163
[ "MIT" ]
1
2021-11-21T13:11:31.000Z
2021-11-22T00:18:29.000Z
src/big_torch/layers/abstract.py
Denchidlo/big-torch
f5a65e6216e46e6d4fe98670c52618e4cccc8163
[ "MIT" ]
null
null
null
from abc import abstractmethod import numpy as np from ..utils.registry import ModuleAggregator layer_registry = ModuleAggregator(registry_name="layers") class AbstractLayer: def __init__(self, shape) -> None: self.shape = shape @abstractmethod def _fwd_pass(self, X): raise NotImplementedError() @abstractmethod def _bwd_pass(self, X, d_out): raise NotImplementedError() class ParametrizedObject: @abstractmethod def blank(self): raise NotImplementedError() @abstractmethod def get_context(self): raise NotImplementedError() @abstractmethod def change(self, step, eta): raise NotImplementedError() @abstractmethod def average(self, gradients_list): raise NotImplementedError() @abstractmethod def apply(self, func, context=None): raise NotImplementedError() @abstractmethod def binary_operation(lhs, rhs, operation): raise NotImplementedError() class GradientInputResolver: @abstractmethod def handle_multiple_inputs(*gradients): raise NotImplementedError() @abstractmethod def get_handler(self, output_idx): raise NotImplementedError()
21.892857
57
0.69739
115
1,226
7.278261
0.443478
0.203106
0.317802
0.342891
0.16368
0
0
0
0
0
0
0
0.226754
1,226
55
58
22.290909
0.882911
0
0
0.512821
0
0
0.004894
0
0
0
0
0
0
1
0.282051
false
0.051282
0.076923
0
0.435897
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
1
0
0
0
0
0
5
c6b709b31dfb1463405e87f5095cc74d16b6d386
44
py
Python
pglasso/__init__.py
NuosiWu/WFPGL
b3fb42c040ff289acdd01359d58959a10bb4913e
[ "MIT" ]
null
null
null
pglasso/__init__.py
NuosiWu/WFPGL
b3fb42c040ff289acdd01359d58959a10bb4913e
[ "MIT" ]
null
null
null
pglasso/__init__.py
NuosiWu/WFPGL
b3fb42c040ff289acdd01359d58959a10bb4913e
[ "MIT" ]
null
null
null
from _pglasso import cpglasso_DC as pglasso
22
43
0.863636
7
44
5.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.136364
44
1
44
44
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
c6c2184f22c318efa9e703944efca210320ad3e9
96
py
Python
enthought/naming/unique_name.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
3
2016-12-09T06:05:18.000Z
2018-03-01T13:00:29.000Z
enthought/naming/unique_name.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
1
2020-12-02T00:51:32.000Z
2020-12-02T08:48:55.000Z
enthought/naming/unique_name.py
enthought/etsproxy
4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347
[ "BSD-3-Clause" ]
null
null
null
# proxy module from __future__ import absolute_import from apptools.naming.unique_name import *
24
41
0.84375
13
96
5.769231
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.114583
96
3
42
32
0.882353
0.125
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
c6c7e007680f0487433b83d1dd74ee9f07640774
115
py
Python
program.py
saivarshan/mynewrepo
0862ffe79315b90ae16dc246cc4cd6a5810669f8
[ "MIT" ]
null
null
null
program.py
saivarshan/mynewrepo
0862ffe79315b90ae16dc246cc4cd6a5810669f8
[ "MIT" ]
null
null
null
program.py
saivarshan/mynewrepo
0862ffe79315b90ae16dc246cc4cd6a5810669f8
[ "MIT" ]
null
null
null
print("hello world") print("i hope this works") print("the error is fixed") print("this is my second error fix")
28.75
36
0.704348
20
115
4.05
0.7
0
0
0
0
0
0
0
0
0
0
0
0.156522
115
4
36
28.75
0.835052
0
0
0
0
0
0.646018
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
5
c6f8282a44fb597d7e384cbc7dc1a5732d3ddfd0
141
py
Python
liver/gql/store/__init__.py
tjtimer/liver
1df06978d3d7d857d5824336de89fb9a0535c3dc
[ "MIT" ]
null
null
null
liver/gql/store/__init__.py
tjtimer/liver
1df06978d3d7d857d5824336de89fb9a0535c3dc
[ "MIT" ]
null
null
null
liver/gql/store/__init__.py
tjtimer/liver
1df06978d3d7d857d5824336de89fb9a0535c3dc
[ "MIT" ]
null
null
null
""" __init__.py author: Tim "tjtimer" Jedro created: 19.12.18 """ from .person import Person, Friendship from .task import Task, AssignedTo
15.666667
38
0.737589
20
141
5
0.8
0
0
0
0
0
0
0
0
0
0
0.049587
0.141844
141
8
39
17.625
0.77686
0.404255
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
05b8ee1a8ae8a4228335629aa222b0279817f87e
631
py
Python
pyta/indicators/moving_average_divergence_convergence.py
gslinger/pyta
d69cde971d43ef813c0bb96ce97bc7b4a22baf42
[ "MIT" ]
1
2021-10-10T08:00:21.000Z
2021-10-10T08:00:21.000Z
pyta/indicators/moving_average_divergence_convergence.py
gslinger/pyta
d69cde971d43ef813c0bb96ce97bc7b4a22baf42
[ "MIT" ]
null
null
null
pyta/indicators/moving_average_divergence_convergence.py
gslinger/pyta
d69cde971d43ef813c0bb96ce97bc7b4a22baf42
[ "MIT" ]
null
null
null
# TODO MACD histo # TODO docstring # TODO merge? import pandas as pd # from pyta.overlays.exponential_moving_average import exponential_moving_average as ema from pyta.indicators.absolute_price_oscillator import absolute_price_oscillator as apo def moving_average_convergence_divergence(c: pd.Series, fast_n: int = 12, slow_n: int = 26) -> pd.Series: return apo(c, fast_n, slow_n) def moving_average_convergence_divergence_signal(c: pd.Series, fast_n: int = 12, slow_n: int = 26, macd_n: int = 9) -> pd.Series: macd = apo(c, fast_n, slow_n) return ema(macd, macd_n)
35.055556
105
0.70523
95
631
4.421053
0.368421
0.047619
0.114286
0.128571
0.380952
0.204762
0.138095
0.138095
0.138095
0.138095
0
0.018109
0.212361
631
17
106
37.117647
0.826962
0.066561
0
0
0
0
0
0
0
0
0
0.058824
0
1
0.222222
false
0
0.333333
0.111111
0.777778
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
1
1
1
0
0
5
05cdedfb27037c6eb7705b8381d043e86e16284e
34
py
Python
PyGaza/scripts/sploit_gaza.py
gaza-team/package
9992f48c2e02f29826c9e0a28c83016e4451176c
[ "MIT" ]
null
null
null
PyGaza/scripts/sploit_gaza.py
gaza-team/package
9992f48c2e02f29826c9e0a28c83016e4451176c
[ "MIT" ]
null
null
null
PyGaza/scripts/sploit_gaza.py
gaza-team/package
9992f48c2e02f29826c9e0a28c83016e4451176c
[ "MIT" ]
null
null
null
# Exploit Title: Command Injection
34
34
0.823529
4
34
7
1
0
0
0
0
0
0
0
0
0
0
0
0.117647
34
1
34
34
0.933333
0.941176
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
05f1bb084b71043912e11505dbec51886b53785c
120
py
Python
calculator/admin.py
Skwaku/WebCalculator
94131f140f926e3234334663cfe87e2b1e5147bc
[ "MIT" ]
null
null
null
calculator/admin.py
Skwaku/WebCalculator
94131f140f926e3234334663cfe87e2b1e5147bc
[ "MIT" ]
null
null
null
calculator/admin.py
Skwaku/WebCalculator
94131f140f926e3234334663cfe87e2b1e5147bc
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import * admin.site.site_header = "WebCal" admin.site.register(History)
17.142857
33
0.783333
17
120
5.470588
0.647059
0.236559
0
0
0
0
0
0
0
0
0
0
0.116667
120
7
34
17.142857
0.877358
0
0
0
0
0
0.049587
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
5
af0ad371717ff657d18ce3f9b4ac0822303c0d54
55
py
Python
wildwood/__init__.py
pyensemble/wildwood
b261cbd7d0b425b50647f719ab99c1d89f477d5c
[ "BSD-3-Clause" ]
22
2021-06-24T11:30:03.000Z
2022-03-09T00:59:30.000Z
wildwood/__init__.py
pyensemble/wildwood
b261cbd7d0b425b50647f719ab99c1d89f477d5c
[ "BSD-3-Clause" ]
65
2021-03-13T17:50:03.000Z
2022-02-22T16:50:02.000Z
wildwood/__init__.py
pyensemble/wildwood
b261cbd7d0b425b50647f719ab99c1d89f477d5c
[ "BSD-3-Clause" ]
3
2021-03-04T18:44:10.000Z
2022-01-26T17:28:35.000Z
from .forest import ForestClassifier, ForestRegressor
18.333333
53
0.854545
5
55
9.4
1
0
0
0
0
0
0
0
0
0
0
0
0.109091
55
2
54
27.5
0.959184
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
af3142c283f70bb8c2497536fe840ef57b032e00
4,220
py
Python
tests/st/param_name/test_parameter_ms_function.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
1
2022-03-05T02:59:21.000Z
2022-03-05T02:59:21.000Z
tests/st/param_name/test_parameter_ms_function.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
tests/st/param_name/test_parameter_ms_function.py
zhz44/mindspore
6044d34074c8505dd4b02c0a05419cbc32a43f86
[ "Apache-2.0" ]
null
null
null
# Copyright 2022 Huawei Technologies Co., Ltd # # 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 pytest import mindspore as ms from mindspore import context, Tensor, ms_function from mindspore.common.parameter import Parameter from mindspore.common import ParameterTuple context.set_context(mode=context.GRAPH_MODE) @pytest.mark.level1 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_parameter_ms_function_1(): """ Feature: Check the names of parameters. Description: Check the name of parameter in ms_function. Expectation: No exception. """ param_a = Parameter(Tensor([1], ms.float32), name="name_a") param_b = Parameter(Tensor([2], ms.float32), name="name_a") @ms_function def test_parameter_ms_function(): return param_a + param_b with pytest.raises(RuntimeError, match="its name 'name_a' already exists."): res = test_parameter_ms_function() assert res == 3 @pytest.mark.level1 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_parameter_ms_function_2(): """ Feature: Check the names of parameters. Description: Check the name of parameter in ms_function. Expectation: No exception. """ param_a = Parameter(Tensor([1], ms.float32), name="name_a") param_b = param_a @ms_function def test_parameter_ms_function(): return param_a + param_b res = test_parameter_ms_function() assert res == 2 @pytest.mark.level1 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_parameter_ms_function_3(): """ Feature: Check the names of parameters. Description: Check the name of parameter in ms_function. Expectation: No exception. """ param_a = Parameter(Tensor([1], ms.float32)) param_b = Parameter(Tensor([2], ms.float32)) @ms_function def test_parameter_ms_function(): return param_a + param_b with pytest.raises(RuntimeError, match="its name 'Parameter' already exists."): res = test_parameter_ms_function() assert res == 3 @pytest.mark.level1 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_parameter_ms_function_4(): """ Feature: Check the names of parameters. Description: Check the name of parameter in ms_function. Expectation: No exception. """ with pytest.raises(ValueError, match="its name 'name_a' already exists."): param_a = ParameterTuple((Parameter(Tensor([1], ms.float32), name="name_a"), Parameter(Tensor([2], ms.float32), name="name_a"))) @ms_function def test_parameter_ms_function(): return param_a[0] + param_a[1] res = test_parameter_ms_function() assert res == 3 @pytest.mark.level1 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_parameter_ms_function_5(): """ Feature: Check the names of parameters. Description: Check the name of parameter in ms_function. Expectation: No exception. """ with pytest.raises(ValueError, match="its name 'Parameter' already exists."): param_a = ParameterTuple((Parameter(Tensor([1], ms.float32)), Parameter(Tensor([2], ms.float32)))) @ms_function def test_parameter_ms_function(): return param_a[0] + param_a[1] res = test_parameter_ms_function() assert res == 3
32.461538
106
0.704976
564
4,220
5.054965
0.205674
0.091196
0.07892
0.12101
0.770256
0.770256
0.763942
0.746054
0.742897
0.742897
0
0.018551
0.182464
4,220
129
107
32.713178
0.807826
0.298815
0
0.666667
0
0
0.059364
0
0
0
0
0
0.072464
1
0.144928
false
0
0.072464
0.072464
0.289855
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
af5861e241fa7b85909c1c1829da7c08909a042c
291
py
Python
find_a_pad_app/views.py
findapad/find_a_pad
17fe271cfa9179a48dfb51ee4cc000d1614057f4
[ "MIT" ]
null
null
null
find_a_pad_app/views.py
findapad/find_a_pad
17fe271cfa9179a48dfb51ee4cc000d1614057f4
[ "MIT" ]
3
2017-07-09T20:14:28.000Z
2020-06-05T17:31:23.000Z
find_a_pad_app/views.py
findapad/find_a_pad
17fe271cfa9179a48dfb51ee4cc000d1614057f4
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse import requests def main(request): return render(request, 'welcome.html') def search(request): return render(request, 'search.html') def location(request): return render(request, 'location.html')
14.55
43
0.738832
36
291
5.972222
0.444444
0.181395
0.265116
0.362791
0
0
0
0
0
0
0
0
0.161512
291
19
44
15.315789
0.881148
0
0
0
0
0
0.126761
0
0
0
0
0
0
1
0.333333
false
0
0.333333
0.333333
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
1
1
0
0
0
5
af6b25dcc3cf88ff10084e08d725f0205304150e
480
py
Python
eznlp/nn/modules/__init__.py
syuoni/eznlp
c0380c6c30d68b4df1769150424735c04ea9d714
[ "Apache-2.0" ]
9
2021-08-06T07:12:55.000Z
2022-03-26T08:20:59.000Z
eznlp/nn/modules/__init__.py
Hhx1999/eznlp
9d1397d8e9630c099295712cbcffa495353a3268
[ "Apache-2.0" ]
1
2022-03-11T13:27:29.000Z
2022-03-16T11:52:14.000Z
eznlp/nn/modules/__init__.py
Hhx1999/eznlp
9d1397d8e9630c099295712cbcffa495353a3268
[ "Apache-2.0" ]
3
2021-11-15T03:24:24.000Z
2022-03-09T09:36:05.000Z
# -*- coding: utf-8 -*- from .embedding import SinusoidPositionalEncoding from .aggregation import SequencePooling, SequenceGroupAggregating, ScalarMix from .attention import SequenceAttention from .block import FeedForwardBlock, ConvBlock, MultiheadAttention, TransformerEncoderBlock, TransformerDecoderBlock from .dropout import WordDropout, LockedDropout, CombinedDropout from .crf import CRF from .loss import SoftLabelCrossEntropyLoss, SmoothLabelCrossEntropyLoss, FocalLoss
53.333333
116
0.85625
41
480
10.02439
0.682927
0
0
0
0
0
0
0
0
0
0
0.002288
0.089583
480
8
117
60
0.938215
0.04375
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
afc72fed7dbd50a9cfdb5668103a2118ac74b4d2
127
py
Python
survos2/frontend/model.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
4
2017-10-10T14:47:16.000Z
2022-01-14T05:57:50.000Z
survos2/frontend/model.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
1
2022-01-11T21:11:12.000Z
2022-01-12T08:22:34.000Z
survos2/frontend/model.py
DiamondLightSource/SuRVoS2
42bacfb6a5cc267f38ca1337e51a443eae1a9d2b
[ "MIT" ]
2
2018-03-06T06:31:29.000Z
2019-03-04T03:33:18.000Z
from dataclasses import dataclass from survos2.helpers import AttrDict @dataclass class ClientData: cfg: AttrDict
15.875
37
0.76378
14
127
6.928571
0.714286
0
0
0
0
0
0
0
0
0
0
0.009901
0.204724
127
7
38
18.142857
0.950495
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
5
afd3ab765a9832ea2c40b94fe0fb6bac305ff98a
96
py
Python
venv/lib/python3.8/site-packages/pip/_internal/operations/install/__init__.py
GiulianaPola/select_repeats
17a0d053d4f874e42cf654dd142168c2ec8fbd11
[ "MIT" ]
2
2022-03-13T01:58:52.000Z
2022-03-31T06:07:54.000Z
venv/lib/python3.8/site-packages/pip/_internal/operations/install/__init__.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
19
2021-11-20T04:09:18.000Z
2022-03-23T15:05:55.000Z
venv/lib/python3.8/site-packages/pip/_internal/operations/install/__init__.py
DesmoSearch/Desmobot
b70b45df3485351f471080deb5c785c4bc5c4beb
[ "MIT" ]
null
null
null
/home/runner/.cache/pip/pool/99/7e/e1/c83d863413b69851a8903437d2bfc65efed8fcf2ddb71714bf5e387beb
96
96
0.895833
9
96
9.555556
1
0
0
0
0
0
0
0
0
0
0
0.395833
0
96
1
96
96
0.5
0
0
0
0
0
0
0
0
1
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
null
1
0
0
0
1
0
0
0
0
0
0
0
0
5