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
04b0bc87f829277b9806bb11cd8837fb56d6784b
188
py
Python
app/api/v2/views/home_resource.py
jomasim/heroku-devops
baaa639f6288673cc902d8fe0df211a7eeac08e2
[ "MIT" ]
null
null
null
app/api/v2/views/home_resource.py
jomasim/heroku-devops
baaa639f6288673cc902d8fe0df211a7eeac08e2
[ "MIT" ]
14
2018-10-27T20:55:42.000Z
2018-11-19T17:19:47.000Z
app/api/v2/views/home_resource.py
jomasim/store-api-v2
ee569a17911b0cfbf67b644bd454fd4b895af95f
[ "MIT" ]
null
null
null
from flask import redirect from flask_restful import Resource class HomeController(Resource): ''' redirect to api docs ''' def get(self): redirect('https://storeapiv2.docs.apiary.io')
26.857143
47
0.760638
25
188
5.68
0.72
0.126761
0
0
0
0
0
0
0
0
0
0.006061
0.12234
188
7
47
26.857143
0.854545
0.106383
0
0
0
0
0.204969
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
04d19a7eb12c45998447667f143a68b8e5972a10
227
py
Python
tests/test_input.py
AgnezIO/agnez
b923b09b3c124ad41e233b45c63f2749b5f31617
[ "BSD-3-Clause" ]
50
2015-12-27T21:30:23.000Z
2021-10-14T13:43:50.000Z
tests/test_input.py
AgnezIO/agnez
b923b09b3c124ad41e233b45c63f2749b5f31617
[ "BSD-3-Clause" ]
3
2016-01-06T17:04:15.000Z
2016-08-06T23:19:49.000Z
tests/test_input.py
AgnezIO/agnez
b923b09b3c124ad41e233b45c63f2749b5f31617
[ "BSD-3-Clause" ]
6
2016-03-04T20:25:27.000Z
2019-01-12T21:45:17.000Z
import numpy as np from agnez import image_sequence def test_image_sequence(): I = np.eye(28)[np.newaxis].repeat(10, axis=0) R = image_sequence(I.reshape(10, 28*28), shape=(28, 28)) assert R.shape == (28, 28*10)
22.7
60
0.669604
40
227
3.7
0.55
0.263514
0.189189
0
0
0
0
0
0
0
0
0.112299
0.176211
227
9
61
25.222222
0.679144
0
0
0
0
0
0
0
0
0
0
0
0.166667
1
0.166667
false
0
0.333333
0
0.5
0
0
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
4
04d49378aff80cd8dc24d396db7e3fbff5f46371
295
py
Python
Python_do_zero_Guanabara/05_VáriavelCompostas/desafio/74_desafio.py
HenriqueSOliver/Projetos_Python
f18c5a343ad1b746a12bd372298b2debe9bc65ec
[ "MIT" ]
null
null
null
Python_do_zero_Guanabara/05_VáriavelCompostas/desafio/74_desafio.py
HenriqueSOliver/Projetos_Python
f18c5a343ad1b746a12bd372298b2debe9bc65ec
[ "MIT" ]
null
null
null
Python_do_zero_Guanabara/05_VáriavelCompostas/desafio/74_desafio.py
HenriqueSOliver/Projetos_Python
f18c5a343ad1b746a12bd372298b2debe9bc65ec
[ "MIT" ]
null
null
null
from random import randint v = (randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10), randint(1, 10)) print(f'Eu sorteei os valores : ', end='') for n in v: print(f'{n} ', end='') print(f'\nO menor valor digitado foi {min(v)}') print(f'O maior valor digitado foi {max(v)}')
24.583333
84
0.620339
53
295
3.45283
0.490566
0.218579
0.273224
0.371585
0.273224
0.273224
0.273224
0.273224
0.273224
0.273224
0
0.061983
0.179661
295
11
85
26.818182
0.694215
0
0
0
0
0
0.341297
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.571429
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
04e585e1d1eef46d18789958bca438de01e67a3d
1,080
py
Python
messages/serializers.py
sharebears/pulsar-messages
723faa7be560f97f9a349e23b395239ccc10161f
[ "MIT" ]
null
null
null
messages/serializers.py
sharebears/pulsar-messages
723faa7be560f97f9a349e23b395239ccc10161f
[ "MIT" ]
null
null
null
messages/serializers.py
sharebears/pulsar-messages
723faa7be560f97f9a349e23b395239ccc10161f
[ "MIT" ]
null
null
null
from core.mixins import Attribute, Serializer from messages.permissions import MessagePermissions class PrivateConversationSerializer(Serializer): id = Attribute(permission=MessagePermissions.VIEW_OTHERS) topic = Attribute(permission=MessagePermissions.VIEW_OTHERS) last_response_time = Attribute(permission=MessagePermissions.VIEW_OTHERS) read = Attribute(permission=MessagePermissions.VIEW_OTHERS) sticky = Attribute(permission=MessagePermissions.VIEW_OTHERS) messages = Attribute( nested=False, permission=MessagePermissions.VIEW_OTHERS ) messages_count = Attribute(permission=MessagePermissions.VIEW_OTHERS) members = Attribute(permission=MessagePermissions.VIEW_OTHERS) class PrivateMessageSerializer(Serializer): # These are essentially permissioned in the conversation, since messages # are never rendered outside of a conversation. No need to run the checks # again. id = Attribute() conv_id = Attribute() user = Attribute(nested=('id', 'username')) time = Attribute() contents = Attribute()
40
77
0.775926
107
1,080
7.719626
0.457944
0.271186
0.309927
0.368039
0.46368
0
0
0
0
0
0
0
0.15
1,080
26
78
41.538462
0.899782
0.137963
0
0
0
0
0.010787
0
0
0
0
0
0
1
0
false
0
0.105263
0
0.894737
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
b6f5f3a74d70ba6bcad1c10d8813d697ebec4cf1
93
py
Python
TaiyoInfo/apps.py
triangular-opensource/Taiyo
944ac6d1d1411fe34f293d0a3dade958e9319d63
[ "MIT" ]
null
null
null
TaiyoInfo/apps.py
triangular-opensource/Taiyo
944ac6d1d1411fe34f293d0a3dade958e9319d63
[ "MIT" ]
2
2021-12-13T16:43:27.000Z
2021-12-15T07:28:43.000Z
TaiyoInfo/apps.py
triangular-opensource/Taiyo
944ac6d1d1411fe34f293d0a3dade958e9319d63
[ "MIT" ]
null
null
null
from django.apps import AppConfig class TaiyoinfoConfig(AppConfig): name = 'TaiyoInfo'
15.5
33
0.763441
10
93
7.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.16129
93
5
34
18.6
0.910256
0
0
0
0
0
0.096774
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
b6fb327db8c154c692dfe060ba586a924373f0a7
148
py
Python
pycrostates/io/__init__.py
mscheltienne/pycrostates
be87adf69c94b2b179064f337acd8a49d01c305d
[ "BSD-3-Clause" ]
1
2021-12-14T09:58:57.000Z
2021-12-14T09:58:57.000Z
pycrostates/io/__init__.py
mscheltienne/pycrostates
be87adf69c94b2b179064f337acd8a49d01c305d
[ "BSD-3-Clause" ]
null
null
null
pycrostates/io/__init__.py
mscheltienne/pycrostates
be87adf69c94b2b179064f337acd8a49d01c305d
[ "BSD-3-Clause" ]
null
null
null
"""IO module for reading and writing data.""" from .meas_info import ChInfo from .reader import read_cluster __all__ = ("ChInfo", "read_cluster")
21.142857
45
0.743243
21
148
4.904762
0.761905
0.213592
0
0
0
0
0
0
0
0
0
0
0.141892
148
6
46
24.666667
0.811024
0.263514
0
0
0
0
0.174757
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8e04e066816c9f446d78e0c3c4b6c53ecbc5492d
357
py
Python
src/opendr/perception/object_detection_3d/__init__.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
217
2020-04-10T16:39:36.000Z
2022-03-30T15:39:04.000Z
src/opendr/perception/object_detection_3d/__init__.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
79
2021-06-23T10:40:10.000Z
2021-12-16T07:59:42.000Z
src/opendr/perception/object_detection_3d/__init__.py
makistsantekidis/opendr
07dee3b59d3487b9c5a93d6946317178a02c9890
[ "Apache-2.0" ]
29
2021-12-16T09:26:13.000Z
2022-03-29T15:19:18.000Z
from opendr.perception.object_detection_3d.voxel_object_detection_3d.voxel_object_detection_3d_learner import \ VoxelObjectDetection3DLearner from opendr.perception.object_detection_3d.datasets.kitti import KittiDataset, LabeledPointCloudsDatasetIterator __all__ = ['VoxelObjectDetection3DLearner', 'KittiDataset', 'LabeledPointCloudsDatasetIterator']
59.5
112
0.885154
32
357
9.40625
0.46875
0.199336
0.225914
0.172757
0.392027
0.392027
0.202658
0
0
0
0
0.017804
0.056022
357
5
113
71.4
0.875371
0
0
0
0
0
0.207283
0.173669
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8e069a00b101dd4b1064cb41e1b1978fd8ea5306
979
py
Python
examples/precedences/comparisonsPrecedence.py
danielNaczo/Python3Parser
295279610a59b5535c9127db369af856f1b60d88
[ "Apache-2.0" ]
9
2019-11-08T20:56:21.000Z
2022-01-02T18:07:06.000Z
examples/precedences/comparisonsPrecedence.py
danielNaczo/Python3Parser
295279610a59b5535c9127db369af856f1b60d88
[ "Apache-2.0" ]
4
2019-11-08T20:55:25.000Z
2021-12-23T20:26:09.000Z
examples/precedences/comparisonsPrecedence.py
danielNaczo/Python3Parser
295279610a59b5535c9127db369af856f1b60d88
[ "Apache-2.0" ]
1
2019-11-26T22:06:19.000Z
2019-11-26T22:06:19.000Z
def bool1(a, b, c, d): return a < (b < (c < d)) def bool2(a, b): return a < b def bool3(a, b, c, d): return a < b < c < d def bool4(a, b, c, d): return ((a < b) < c) < d def bool5(a, b, c, d): return a < b > c == d def bool6(a, b, c): return a + (b * c) def bool7(a, b, c): return a + (b - c) def bool8(a, b, c): return a + (b < c) def bool9(a, b, c, d): return ((a < b) + 4) == ((c + 5) < d) def bool10(a, b, c, d): return (a < b + 4) == ((c + 5) < d) def bool11(a, b, c, d): return a < b + 4 == ((c + 5) < d) def bool12(a, b): return a < b + 4 def bool13(a, b, c, d): return a < b + 4 == c + 5 < d def bool14(a, b, c, d): return a < b + 4 == (c + 5 < d) def bool15(a, b, c, d): return (a < b + 4) == c + 5 < d def bool16(a, b, c, d): return (a <= b >= (c != d)) def bool17(a, b, c, d): return a in b not in (c is d) def bool18(a, b, c, d): return (a is not b) >= (c + d)
13.788732
41
0.426966
203
979
2.059113
0.142857
0.162679
0.172249
0.172249
0.684211
0.636364
0.583732
0.583732
0.476077
0.476077
0
0.063291
0.354443
979
70
42
13.985714
0.598101
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
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
8e06bbec862b6b986874d778253f82a55f6d2be0
141
py
Python
microservices/accommodations/accommModel.py
rjb75/xplored
7e3e491fa5f06fad29d83bc552cc158257bbb337
[ "MIT" ]
null
null
null
microservices/accommodations/accommModel.py
rjb75/xplored
7e3e491fa5f06fad29d83bc552cc158257bbb337
[ "MIT" ]
null
null
null
microservices/accommodations/accommModel.py
rjb75/xplored
7e3e491fa5f06fad29d83bc552cc158257bbb337
[ "MIT" ]
null
null
null
from enum import Enum class OrderByTypeModel(str, Enum): popularity = "popularity" price = "price" review_score = "review_score"
23.5
34
0.70922
16
141
6.125
0.625
0.22449
0
0
0
0
0
0
0
0
0
0
0.198582
141
6
35
23.5
0.867257
0
0
0
0
0
0.190141
0
0
0
0
0
0
1
0
false
0
0.2
0
1
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
8e28e8977f230b2fb65406516ac06d9d4d363cc1
55
py
Python
pyxb/bundles/opengis/citygml/landUse.py
eLBati/pyxb
14737c23a125fd12c954823ad64fc4497816fae3
[ "Apache-2.0" ]
123
2015-01-12T06:43:22.000Z
2022-03-20T18:06:46.000Z
pyxb/bundles/opengis/citygml/landUse.py
eLBati/pyxb
14737c23a125fd12c954823ad64fc4497816fae3
[ "Apache-2.0" ]
103
2015-01-08T18:35:57.000Z
2022-01-18T01:44:14.000Z
pyxb/bundles/opengis/citygml/landUse.py
eLBati/pyxb
14737c23a125fd12c954823ad64fc4497816fae3
[ "Apache-2.0" ]
54
2015-02-15T17:12:00.000Z
2022-03-07T23:02:32.000Z
from pyxb.bundles.opengis.citygml.raw.landUse import *
27.5
54
0.818182
8
55
5.625
1
0
0
0
0
0
0
0
0
0
0
0
0.072727
55
1
55
55
0.882353
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
f3e44ef77d05b2d8fa949a5c97019c7b282f9caf
501
py
Python
inventory/admin.py
wilmerm/unolet-2022
18119a9381b763e38c888bafdb7f97028bd80ea1
[ "BSD-3-Clause" ]
null
null
null
inventory/admin.py
wilmerm/unolet-2022
18119a9381b763e38c888bafdb7f97028bd80ea1
[ "BSD-3-Clause" ]
null
null
null
inventory/admin.py
wilmerm/unolet-2022
18119a9381b763e38c888bafdb7f97028bd80ea1
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from .models import (Item, ItemFamily, ItemGroup, Movement) @admin.register(Item) class ItemAdmin(admin.ModelAdmin): pass #readonly_fields = ("company", "code") @admin.register(ItemFamily) class ItemFamilyAdmin(admin.ModelAdmin): pass #readonly_fields = ("company",) @admin.register(ItemGroup) class ItemGroupAdmin(admin.ModelAdmin): pass #readonly_fields = ("company",) @admin.register(Movement) class MovementAdmin(admin.ModelAdmin): pass
19.269231
59
0.748503
54
501
6.888889
0.407407
0.139785
0.204301
0.217742
0.392473
0.392473
0.284946
0.284946
0
0
0
0
0.127745
501
25
60
20.04
0.851259
0.193613
0
0.285714
0
0
0
0
0
0
0
0
0
1
0
true
0.285714
0.142857
0
0.428571
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
f3ed8bc8c5b29d462d52297c11336c0a636f2d87
161
py
Python
Scripts/django-admin.py
srishti-yadav/poetrydj
4f108fb79dce2bb4d1ef56b1977bad3d447fac62
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
srishti-yadav/poetrydj
4f108fb79dce2bb4d1ef56b1977bad3d447fac62
[ "bzip2-1.0.6" ]
null
null
null
Scripts/django-admin.py
srishti-yadav/poetrydj
4f108fb79dce2bb4d1ef56b1977bad3d447fac62
[ "bzip2-1.0.6" ]
null
null
null
#!c:\users\srish\projects\dev\trydj\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
26.833333
54
0.782609
22
161
5.227273
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.093168
161
5
55
32.2
0.787671
0.329193
0
0
0
0
0.074766
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
f3f09ae1e4789ecb423f296e6ce06d26a458457e
97
py
Python
Morpheus/Fornecedores/apps.py
tr0v40/Morpheus-API
5a0b61303c8334b4030130998ffddc3fddc0ef10
[ "MIT" ]
null
null
null
Morpheus/Fornecedores/apps.py
tr0v40/Morpheus-API
5a0b61303c8334b4030130998ffddc3fddc0ef10
[ "MIT" ]
null
null
null
Morpheus/Fornecedores/apps.py
tr0v40/Morpheus-API
5a0b61303c8334b4030130998ffddc3fddc0ef10
[ "MIT" ]
null
null
null
from django.apps import AppConfig class FonecedoresConfig(AppConfig): name = 'Fonecedores'
16.166667
35
0.773196
10
97
7.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.154639
97
5
36
19.4
0.914634
0
0
0
0
0
0.113402
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f3f4c3be99ee7403a6129edd79f854d75e1afacc
77
py
Python
New_file.py
rs-DOS/Notes-and-Notebooks
258b226089936a055d30753b7a85d522891a8f0a
[ "MIT" ]
null
null
null
New_file.py
rs-DOS/Notes-and-Notebooks
258b226089936a055d30753b7a85d522891a8f0a
[ "MIT" ]
null
null
null
New_file.py
rs-DOS/Notes-and-Notebooks
258b226089936a055d30753b7a85d522891a8f0a
[ "MIT" ]
1
2022-01-01T04:26:44.000Z
2022-01-01T04:26:44.000Z
#This is a new python file to check if the commits are being pushed to GitHub
77
77
0.792208
16
77
3.8125
0.9375
0
0
0
0
0
0
0
0
0
0
0
0.194805
77
1
77
77
0.983871
0.987013
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
6d1b505be9933b9774a91d2e0c33238a9453e896
107
py
Python
src/manim_revealjs/__init__.py
RickDW/revealjs_manim
41cea864f41b00e2db4b008e1c4a660dc128d20f
[ "MIT" ]
8
2021-11-01T13:16:30.000Z
2022-03-26T15:17:51.000Z
src/manim_revealjs/__init__.py
RickDW/manim-revealjs
41cea864f41b00e2db4b008e1c4a660dc128d20f
[ "MIT" ]
null
null
null
src/manim_revealjs/__init__.py
RickDW/manim-revealjs
41cea864f41b00e2db4b008e1c4a660dc128d20f
[ "MIT" ]
null
null
null
from manim_revealjs.presentationscene import PresentationScene, NORMAL, LOOP, \ COMPLETE_LOOP, NO_PAUSE
53.5
79
0.831776
12
107
7.166667
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.11215
107
2
80
53.5
0.905263
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
6d3332d7c22e75a6dca258f050cf78de7395850d
199
py
Python
dev/tools/docs/quick_rebuild_html_brian2.py
chbehrens/brian2
46b5264caa5375ae13084508b5c1049e0c9e019e
[ "BSD-2-Clause" ]
2
2020-03-20T13:30:19.000Z
2020-03-20T13:30:57.000Z
dev/tools/docs/quick_rebuild_html_brian2.py
chbehrens/brian2
46b5264caa5375ae13084508b5c1049e0c9e019e
[ "BSD-2-Clause" ]
13
2015-10-05T15:33:42.000Z
2015-11-18T08:31:42.000Z
dev/tools/docs/quick_rebuild_html_brian2.py
moritzaugustin/brian2
d98ea0cb4af0c9426e71c8ee7659ddb13aea8593
[ "BSD-2-Clause" ]
null
null
null
import os import shutil import sphinx import sys os.environ['BRIAN2_DOCS_QUICK_REBUILD'] = '1' os.chdir('../../../docs_sphinx') sys.exit(sphinx.main(['sphinx-build', '-b', 'html', '.', '../docs']))
22.111111
69
0.658291
28
199
4.535714
0.607143
0
0
0
0
0
0
0
0
0
0
0.01105
0.090452
199
8
70
24.875
0.690608
0
0
0
0
0
0.361809
0.125628
0
0
0
0
0
1
0
true
0
0.571429
0
0.571429
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
ed9b3d09a8be2edce743e08aef1c9433a98caa62
54
py
Python
lino_book/projects/watch/__init__.py
lino-framework/lino_book
4eab916832cd8f48ff1b9fc8c2789f0b437da0f8
[ "BSD-2-Clause" ]
3
2016-08-25T05:58:09.000Z
2019-12-05T11:13:45.000Z
lino_book/projects/watch/__init__.py
lino-framework/lino_book
4eab916832cd8f48ff1b9fc8c2789f0b437da0f8
[ "BSD-2-Clause" ]
18
2016-11-12T21:38:58.000Z
2019-12-03T17:54:38.000Z
lino_book/projects/watch/__init__.py
lino-framework/lino_book
4eab916832cd8f48ff1b9fc8c2789f0b437da0f8
[ "BSD-2-Clause" ]
9
2016-10-15T11:12:33.000Z
2021-09-22T04:37:37.000Z
""" A demo application used by :doc:`/dev/watch`. """
13.5
45
0.611111
8
54
4.125
1
0
0
0
0
0
0
0
0
0
0
0
0.148148
54
3
46
18
0.717391
0.833333
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
ed9fa318bc8b1e422530f7294c897d1a98a11b15
523
py
Python
utilities.py
weAllWeGot/CardiB_api
ab4526aa45d4b72a55a25726884d0fc6bb8628ab
[ "MIT" ]
3
2020-04-21T22:47:44.000Z
2021-01-13T11:23:18.000Z
utilities.py
weAllWeGot/CardiB_api
ab4526aa45d4b72a55a25726884d0fc6bb8628ab
[ "MIT" ]
8
2017-07-28T03:12:35.000Z
2017-08-01T05:07:34.000Z
utilities.py
weAllWeGot/CardiB_api
ab4526aa45d4b72a55a25726884d0fc6bb8628ab
[ "MIT" ]
null
null
null
""" A number of useful functions that are not central to the logic of the api itself. """ import re def contains_curse(sometext): """ Checks a particular string to see if it contains any NSFW type words. curse words, things innapropriate that you might find in lyrics or quotes :param sometext: some text :type sometext: Str :returns: a boolean stating whether we have a curse word or not :rtype: Boolean """ return re.search(r'hoe*|bitch*|fag*|puss*|nigg*|fuck*|cunt*|shit*|dick*|cock*',sometext.lower())
24.904762
97
0.726577
84
523
4.511905
0.77381
0
0
0
0
0
0
0
0
0
0
0
0.170172
523
20
98
26.15
0.873272
0.680688
0
0
0
0
0.405594
0.405594
0
0
0
0
0
1
0.333333
false
0
0.333333
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
0
0
0
0
1
0
0
1
0
1
0
0
4
eddde10d5db60d86114a510e6844623c2ad78302
45
py
Python
config.py
locational/fn-prevalence-predictor
d4df1dbf647c4fdfdc4f50b28f216e938c74c598
[ "MIT" ]
null
null
null
config.py
locational/fn-prevalence-predictor
d4df1dbf647c4fdfdc4f50b28f216e938c74c598
[ "MIT" ]
1
2021-05-07T07:18:03.000Z
2021-05-07T07:18:03.000Z
config.py
locational/fn-prevalence-predictor
d4df1dbf647c4fdfdc4f50b28f216e938c74c598
[ "MIT" ]
null
null
null
import tempfile TEMP = tempfile.mkdtemp()
7.5
25
0.733333
5
45
6.6
0.8
0
0
0
0
0
0
0
0
0
0
0
0.177778
45
5
26
9
0.891892
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
6101615cb089d4c94f36fbdd6f4e1dfc290f432b
1,999
py
Python
utils/boilerplate/test_bat.py
cfginn/sap-simulation-package
73314e5380cec5c61a9fe5ff5fbafa25b9e2beac
[ "MIT" ]
null
null
null
utils/boilerplate/test_bat.py
cfginn/sap-simulation-package
73314e5380cec5c61a9fe5ff5fbafa25b9e2beac
[ "MIT" ]
null
null
null
utils/boilerplate/test_bat.py
cfginn/sap-simulation-package
73314e5380cec5c61a9fe5ff5fbafa25b9e2beac
[ "MIT" ]
null
null
null
import unittest from pysapets.bat import Bat from pysapets.animal import Animal import pysapets.constants as constants from unittest.mock import patch from io import StringIO from copy import deepcopy class BatTest(unittest.TestCase): def setUp(self): self.bat = Bat() self.friends = [self.bat, Animal(2, 2), Animal(2, 2), Animal(2, 2), Animal(2, 2)] # test that get_type returns the correct type def test_get_type(self): self.assertEqual(self.bat.get_type(), constants.BAT) # test that bat starts with base health of 2 def test_get_health(self): self.assertEqual(self.bat.get_health(), 2) # test that bat starts with base attack of 1 def test_get_attack(self): self.assertEqual(self.bat.get_attack(), 1) # test that initializing bat with additional health increases health def test_init_add_health(self): newBat = Bat(addHealth = 3) self.assertEqual(newBat.get_health(), 2 + 3) # test that initializing an bat with additional attack increases attack def test_init_add_attack(self): newBat = Bat(addAttack = 3) self.assertEqual(newBat.get_attack(), 1 + 3) # test that initializing bat with additional health and attack increases health and attack def test_init_add_health_attack(self): newBat = Bat(addHealth = 3, addAttack = 3) self.assertEqual(newBat.get_health(), 2 + 3) self.assertEqual(newBat.get_attack(), 1 + 3) # test that bat ability has correct trigger def test_get_ability_trigger(self): self.assertEqual(self.bat.get_ability_trigger(), constants.START_OF_BATTLE) # test that bat ability has correct triggeredBy def test_get_ability_triggeredBy(self): self.assertEqual(self.bat.get_ability_triggeredBy(), constants.PLAYER) # TODO add relevant tests for bat ability def test_run_ability(self): pass def test_run_ability_level_1(self): pass def test_run_ability_level_2(self): pass def test_run_ability_level_3(self): pass
29.835821
92
0.729865
295
1,999
4.776271
0.210169
0.059617
0.035486
0.081618
0.520227
0.441448
0.297374
0.12704
0.080908
0.058197
0
0.016575
0.185093
1,999
67
93
29.835821
0.848373
0.242121
0
0.205128
0
0
0
0
0
0
0
0.014925
0.230769
1
0.333333
false
0.102564
0.179487
0
0.538462
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
1
0
0
1
0
0
4
610c75d8185987a09251cb02fe7fae37c227b969
306
py
Python
Modulo-03/ex107/ex107.py
Matheus-Henrique-Burey/Curso-de-Python
448aebaab96527affa1e45897a662bb0407c11c6
[ "MIT" ]
null
null
null
Modulo-03/ex107/ex107.py
Matheus-Henrique-Burey/Curso-de-Python
448aebaab96527affa1e45897a662bb0407c11c6
[ "MIT" ]
null
null
null
Modulo-03/ex107/ex107.py
Matheus-Henrique-Burey/Curso-de-Python
448aebaab96527affa1e45897a662bb0407c11c6
[ "MIT" ]
null
null
null
import moeda preso = float(input('Digite um preço:R$ ')) print(f'O dobro de {preso} é R$ {moeda.dobro(preso)}') print(f'A metade de {preso} é R$ {moeda.metade(preso)}') print(f'Almentando 10% de {preso} é R$ {moeda.almentar(preso, 10)}') print(f'Desconto de 10% {preso} é R$ {moeda.diminuir(preso, 10)}')
38.25
68
0.673203
55
306
3.745455
0.4
0.116505
0.135922
0.23301
0.203884
0
0
0
0
0
0
0.029963
0.127451
306
7
69
43.714286
0.741573
0
0
0
0
0
0.728758
0.212418
0
0
0
0
0
1
0
false
0
0.166667
0
0.166667
0.666667
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
b63729574ecbb04311a2d6eaa2a8937c163fef04
1,566
py
Python
tensorflow/contrib/ffmpeg/__init__.py
ln0119/tensorflow-fast-rcnn
e937e6394818c9a320754237651d7fe083b1020d
[ "Apache-2.0" ]
73
2017-01-05T09:06:08.000Z
2021-11-06T14:00:50.000Z
tensorflow/contrib/ffmpeg/__init__.py
minhhoai2/tensorflow
da88903d5e29230d68d861053aa1dea1432c0696
[ "Apache-2.0" ]
8
2017-04-10T10:36:20.000Z
2021-02-07T01:02:32.000Z
tensorflow/contrib/ffmpeg/__init__.py
minhhoai2/tensorflow
da88903d5e29230d68d861053aa1dea1432c0696
[ "Apache-2.0" ]
151
2016-11-10T09:01:15.000Z
2022-01-18T08:13:49.000Z
# Copyright 2015 Google Inc. All Rights Reserved. # # 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. # ============================================================================== # pylint: disable=g-short-docstring-punctuation """## Encoding and decoding audio using FFmpeg TensorFlow provides Ops to decode and encode audio files using the [FFmpeg](https://www.ffmpeg.org/) library. FFmpeg must be locally [installed](https://ffmpeg.org/download.html) for these Ops to succeed. Example: ```python from tensorflow.contrib import ffmpeg audio_binary = tf.read_file('song.mp3') waveform = ffmpeg.decode_audio( audio_binary, file_format='mp3', samples_per_second=44100, channel_count=2) uncompressed_binary = ffmpeg.encode_audio( waveform, file_format='wav', samples_per_second=44100) ``` @@decode_audio @@encode_audio """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.contrib.ffmpeg.ffmpeg_ops import decode_audio from tensorflow.contrib.ffmpeg.ffmpeg_ops import encode_audio
35.590909
80
0.745211
216
1,566
5.25
0.546296
0.05291
0.055556
0.028219
0.074074
0.074074
0.074074
0
0
0
0
0.015351
0.126437
1,566
43
81
36.418605
0.813596
0.826309
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.2
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
b638b1294f4202f83e47ee60ec050a283f882de4
52
py
Python
clients/python-aiohttp/generated/openapi_server/models/__init__.py
cliffano/pokeapi-clients
92af296c68c3e94afac52642ae22057faaf071ee
[ "MIT" ]
null
null
null
clients/python-aiohttp/generated/openapi_server/models/__init__.py
cliffano/pokeapi-clients
92af296c68c3e94afac52642ae22057faaf071ee
[ "MIT" ]
null
null
null
clients/python-aiohttp/generated/openapi_server/models/__init__.py
cliffano/pokeapi-clients
92af296c68c3e94afac52642ae22057faaf071ee
[ "MIT" ]
null
null
null
# coding: utf-8 # import models into model package
13
34
0.730769
8
52
4.75
1
0
0
0
0
0
0
0
0
0
0
0.02381
0.192308
52
3
35
17.333333
0.880952
0.884615
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b63e049450159e0d3ecf17805c5708cc65e86904
126
py
Python
src/main.py
Kladdkaka/flashback-scraper
ead4705f5c06e2124cda835501f12e139246cc25
[ "MIT" ]
null
null
null
src/main.py
Kladdkaka/flashback-scraper
ead4705f5c06e2124cda835501f12e139246cc25
[ "MIT" ]
null
null
null
src/main.py
Kladdkaka/flashback-scraper
ead4705f5c06e2124cda835501f12e139246cc25
[ "MIT" ]
null
null
null
import typer import scrape app = typer.Typer() app.add_typer(scrape.app, name="scrape") if __name__ == "__main__": app()
15.75
40
0.698413
18
126
4.388889
0.444444
0.227848
0
0
0
0
0
0
0
0
0
0
0.150794
126
8
41
15.75
0.738318
0
0
0
0
0
0.110236
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
b648299e1758f000bd967e3c304e42c256e94e3e
202
py
Python
Mundo 1/ex012.py
Alef-Martins/Exercicios_python_mundo-1
df93c4a9d0e9f9fbfeaf85863c4597c92d3c703c
[ "MIT" ]
null
null
null
Mundo 1/ex012.py
Alef-Martins/Exercicios_python_mundo-1
df93c4a9d0e9f9fbfeaf85863c4597c92d3c703c
[ "MIT" ]
null
null
null
Mundo 1/ex012.py
Alef-Martins/Exercicios_python_mundo-1
df93c4a9d0e9f9fbfeaf85863c4597c92d3c703c
[ "MIT" ]
null
null
null
#Leia o preço de um produto e mostre seu novo preço com 5% de desconto preco = float(input("informe o valor do produto: ")) print(f'O valor do produto com 5% de desconto é {preco - (preco * 5 /100)}')
67.333333
76
0.69802
38
202
3.710526
0.605263
0.056738
0.085106
0.198582
0
0
0
0
0
0
0
0.03681
0.193069
202
3
76
67.333333
0.828221
0.341584
0
0
0
0
0.717557
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
b66570df107fac1fbd2724600454c3ae7bb2e539
585
py
Python
test/main.py
petmo338/ignitioncontrol
7b8a83c9f30aa5a69e04f23cb190a61d3002656b
[ "Apache-2.0" ]
1
2016-01-05T17:51:40.000Z
2016-01-05T17:51:40.000Z
test/main.py
petmo338/ignitioncontrol
7b8a83c9f30aa5a69e04f23cb190a61d3002656b
[ "Apache-2.0" ]
null
null
null
test/main.py
petmo338/ignitioncontrol
7b8a83c9f30aa5a69e04f23cb190a61d3002656b
[ "Apache-2.0" ]
2
2018-07-03T17:51:22.000Z
2021-02-05T17:23:13.000Z
# main.py -- put your code here! from pyb import udelay, Pin pin = Pin('X1', pyb.Pin.OUT_PP) HIGHTIME = 6000 POSTIME = 1000 LOWTIME = 800 while True: pyb.udelay(HIGHTIME) pin.low() pyb.udelay(LOWTIME) pin.high() pyb.udelay(POSTIME) pin.low() pyb.udelay(LOWTIME) pin.high() pyb.udelay(HIGHTIME - POSTIME - LOWTIME) pin.low() pyb.udelay(LOWTIME) pin.high() pyb.udelay(HIGHTIME) pin.low() pyb.udelay(LOWTIME) pin.high() pyb.udelay(HIGHTIME) pin.low() pyb.udelay(LOWTIME) pin.high()
17.205882
44
0.594872
78
585
4.448718
0.307692
0.259366
0.129683
0.216138
0.639769
0.639769
0.639769
0.639769
0.639769
0.639769
0
0.028037
0.268376
585
34
45
17.205882
0.78271
0.051282
0
0.692308
0
0
0.00361
0
0
0
0
0.029412
0
1
0
false
0
0.038462
0
0.038462
0
0
0
0
null
1
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
4
b66bed9e0c1620e6a1c93da57cc6f4a5d5f43763
311
py
Python
firstfloor/admin.py
terratenff/jros-behz
2a41adb1d07f76a0409669b26a47a8e444273b59
[ "MIT" ]
null
null
null
firstfloor/admin.py
terratenff/jros-behz
2a41adb1d07f76a0409669b26a47a8e444273b59
[ "MIT" ]
5
2021-03-30T12:26:54.000Z
2021-09-22T17:57:00.000Z
firstfloor/admin.py
terratenff/jros-behz
2a41adb1d07f76a0409669b26a47a8e444273b59
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Profile, FriendRequest, Comment, Discussion, DiscussionGroup, Event admin.site.register(Profile) admin.site.register(FriendRequest) admin.site.register(Comment) admin.site.register(Discussion) admin.site.register(DiscussionGroup) admin.site.register(Event)
31.1
87
0.836013
38
311
6.842105
0.368421
0.207692
0.392308
0
0
0
0
0
0
0
0
0
0.064309
311
9
88
34.555556
0.893471
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
b6864ace85e04c5f83fa073f92d369ebaee3b58a
89
py
Python
config/local.py
Stephan-e/CSR-tracker
780ce4c4d4f96a499803b25b3cc9869cfb275566
[ "MIT" ]
null
null
null
config/local.py
Stephan-e/CSR-tracker
780ce4c4d4f96a499803b25b3cc9869cfb275566
[ "MIT" ]
null
null
null
config/local.py
Stephan-e/CSR-tracker
780ce4c4d4f96a499803b25b3cc9869cfb275566
[ "MIT" ]
null
null
null
def show_toolbar(request): if request.is_ajax(): return False return True
22.25
26
0.662921
12
89
4.75
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.258427
89
4
27
22.25
0.863636
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
b6869ab9206c1261b4b878fa05899234090a6962
243
py
Python
model/case/mysql_case.py
waaaaaaz/TestRelay2
220d85fb0f53e468c5216336147609d5337cfb1c
[ "MIT" ]
null
null
null
model/case/mysql_case.py
waaaaaaz/TestRelay2
220d85fb0f53e468c5216336147609d5337cfb1c
[ "MIT" ]
1
2021-06-02T02:40:03.000Z
2021-06-02T02:40:03.000Z
model/case/mysql_case.py
waaaaaaz/TestRelay2
220d85fb0f53e468c5216336147609d5337cfb1c
[ "MIT" ]
null
null
null
# coding: utf-8 from base import Base class MySQLCase(Base): def __init__(self, case_unit, params): super(MySQLCase, self).__init__(case_unit, params) def exe(self): pass def get_params(self): pass
12.789474
58
0.625514
32
243
4.40625
0.5625
0.113475
0.198582
0
0
0
0
0
0
0
0
0.005682
0.27572
243
18
59
13.5
0.795455
0.053498
0
0.25
0
0
0
0
0
0
0
0
0
1
0.375
false
0.25
0.125
0
0.625
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
4
b68809944a43b6b5cf6ad319de29ebdbcbd7a65f
159
py
Python
django/tests/regressiontests/templates/views.py
jonaustin/advisoryscan
ba452c155f0d478450e0c91de5ea00f404e98616
[ "MIT" ]
2
2015-12-04T12:05:26.000Z
2016-05-08T11:26:55.000Z
lib/django/tests/regressiontests/templates/views.py
Arachnid/google_appengine
2e950619f5027f414131fafc3cc253af4875a0fe
[ "Apache-2.0" ]
null
null
null
lib/django/tests/regressiontests/templates/views.py
Arachnid/google_appengine
2e950619f5027f414131fafc3cc253af4875a0fe
[ "Apache-2.0" ]
1
2018-12-06T12:50:52.000Z
2018-12-06T12:50:52.000Z
# Fake views for testing url reverse lookup def index(request): pass def client(request, id): pass def client_action(request, id, action): pass
14.454545
43
0.698113
23
159
4.782609
0.608696
0.127273
0.236364
0
0
0
0
0
0
0
0
0
0.220126
159
10
44
15.9
0.887097
0.257862
0
0.5
0
0
0
0
0
0
0
0
0
1
0.5
false
0.5
0
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
b69784aee5558d0d2b97a626ef28c8d1e05c5c1c
222
py
Python
loren/parsers/json_parser.py
arap/loren
3ce2f991039364371322eb69f157d1a088764e7a
[ "MIT" ]
5
2021-09-24T12:22:12.000Z
2022-03-11T10:28:11.000Z
loren/parsers/json_parser.py
arap/loren
3ce2f991039364371322eb69f157d1a088764e7a
[ "MIT" ]
4
2021-12-21T11:57:49.000Z
2022-01-26T11:07:06.000Z
loren/parsers/json_parser.py
arap/loren
3ce2f991039364371322eb69f157d1a088764e7a
[ "MIT" ]
3
2021-09-27T08:29:21.000Z
2021-10-08T14:14:00.000Z
import json from typing import Dict, Any from .base_parser import BaseParser class JSONParser(BaseParser): @staticmethod def parse(file_contents: str) -> Dict[str, Any]: return json.loads(file_contents)
20.181818
52
0.734234
29
222
5.517241
0.655172
0.15
0
0
0
0
0
0
0
0
0
0
0.184685
222
10
53
22.2
0.883978
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0.142857
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
4
fcb007af58ae907f07e57f965abbf3115f457e91
97
py
Python
ifstools/__init__.py
mon/ifstools
cfcb369a0271d6c53df38b769c496ca8149d9a51
[ "MIT" ]
72
2017-12-15T17:47:38.000Z
2022-03-27T05:57:55.000Z
ifstools/__init__.py
mon/ifstools
cfcb369a0271d6c53df38b769c496ca8149d9a51
[ "MIT" ]
19
2017-12-19T04:43:08.000Z
2020-12-14T10:44:34.000Z
ifstools/__init__.py
mon/ifstools
cfcb369a0271d6c53df38b769c496ca8149d9a51
[ "MIT" ]
14
2017-12-15T20:43:14.000Z
2020-12-29T22:07:47.000Z
from .ifstools import main from .ifs import IFS from .handlers import GenericFolder, GenericFile
24.25
48
0.824742
13
97
6.153846
0.615385
0
0
0
0
0
0
0
0
0
0
0
0.134021
97
3
49
32.333333
0.952381
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
fcbc0ddce5dff36777acb677abf73853073ce053
18,979
py
Python
tests/test_data_types.py
mstump/mashumaro
36fd948aead45e5509ea0ea04746a8906d4c5822
[ "Apache-2.0" ]
null
null
null
tests/test_data_types.py
mstump/mashumaro
36fd948aead45e5509ea0ea04746a8906d4c5822
[ "Apache-2.0" ]
null
null
null
tests/test_data_types.py
mstump/mashumaro
36fd948aead45e5509ea0ea04746a8906d4c5822
[ "Apache-2.0" ]
null
null
null
import uuid import collections from enum import Enum from datetime import datetime, date, time, timedelta from dataclasses import dataclass from queue import Queue from typing import ( Hashable, List, Deque, Tuple, Set, FrozenSet, MutableSet, ChainMap, Dict, Mapping, MutableMapping, Sequence, Optional, Any, AnyStr, Union, TypeVar, ) from mashumaro import DataClassDictMixin from mashumaro.exceptions import UnserializableField, UnserializableDataError,\ MissingField from .utils import same_types from .entities import ( MyEnum, MyIntEnum, MyFlag, MyIntFlag, MyDataClass, ) import pytest class Fixture: INT = 123 FLOAT = 1.23 BOOL = True LIST = [1, 2, 3] TUPLE = (1, 2, 3) DEQUE = collections.deque([1, 2, 3]) SET = {1, 2, 3} FROZEN_SET = frozenset([1, 2, 3]) CHAIN_MAP = collections.ChainMap({'a': 1, 'b': 2}, {'c': 3, 'd': 4}) MAPS_LIST = [{'a': 1, 'b': 2}, {'c': 3, 'd': 4}] DICT = {'a': 1, 'b': 2} BYTES = b'123' BYTES_BASE64 = 'MTIz\n' BYTE_ARRAY = bytearray(b'123') STR = '123' ENUM = MyEnum.a INT_ENUM = MyIntEnum.a FLAG = MyFlag.a INT_FLAG = MyIntFlag.a DATA_CLASS = MyDataClass(a=1, b=2) NONE = None DATETIME = datetime(2018, 10, 29, 12, 46, 55, 308495) DATE = DATETIME.date() TIME = DATETIME.time() TIMEDELTA = timedelta(3.14159265358979323846) UUID = uuid.UUID('3c25dd74-f208-46a2-9606-dd3919e975b7') UUID_STR = '3c25dd74-f208-46a2-9606-dd3919e975b7' inner_values = [ (int, Fixture.INT, Fixture.INT), (float, Fixture.FLOAT, Fixture.FLOAT), (bool, Fixture.BOOL, Fixture.BOOL), (List[int], Fixture.LIST, Fixture.LIST), (Deque[int], Fixture.DEQUE, Fixture.LIST), (Tuple[int], Fixture.TUPLE, Fixture.LIST), (Set[int], Fixture.SET, Fixture.LIST), (FrozenSet[int], Fixture.FROZEN_SET, Fixture.LIST), (ChainMap[str, int], Fixture.CHAIN_MAP, Fixture.MAPS_LIST), (Dict[str, int], Fixture.DICT, Fixture.DICT), (Mapping[str, int], Fixture.DICT, Fixture.DICT), (MutableMapping[str, int], Fixture.DICT, Fixture.DICT), (Sequence[int], Fixture.LIST, Fixture.LIST), (bytes, Fixture.BYTES, Fixture.BYTES), (bytearray, Fixture.BYTE_ARRAY, Fixture.BYTE_ARRAY), (str, Fixture.STR, Fixture.STR), (MyEnum, Fixture.ENUM, Fixture.ENUM), (MyIntEnum, Fixture.INT_ENUM, Fixture.INT_ENUM), (MyFlag, Fixture.FLAG, Fixture.FLAG), (MyIntFlag, Fixture.INT_FLAG, Fixture.INT_FLAG), (MyDataClass, Fixture.DATA_CLASS, Fixture.DICT), (type(None), Fixture.NONE, Fixture.NONE), (datetime, Fixture.DATETIME, Fixture.DATETIME), (date, Fixture.DATE, Fixture.DATE), (time, Fixture.TIME, Fixture.TIME), (timedelta, Fixture.TIMEDELTA, Fixture.TIMEDELTA.total_seconds()), (uuid.UUID, Fixture.UUID, Fixture.UUID_STR), ] hashable_inner_values = [ (type_, value, value_dumped) for type_, value, value_dumped in inner_values if isinstance(value, Hashable) and isinstance(value_dumped, Hashable) ] generic_sequence_types = [List, Deque, Tuple, Set, FrozenSet] generic_mapping_types = [Dict, Mapping, MutableMapping] unsupported_field_types = [ list, collections.deque, tuple, set, frozenset, collections.ChainMap, dict, Queue] T = TypeVar('T', int, str) unsupported_typing_primitives = [AnyStr, Union[int, str], T] x_factory_mapping = { List: list, Deque: collections.deque, Tuple: tuple, Set: set, FrozenSet: frozenset, MutableSet: set, Dict: lambda items: {k: v for k, v in items}, Mapping: lambda items: {k: v for k, v in items}, MutableMapping: lambda items: {k: v for k, v in items}, ChainMap: lambda items: collections.ChainMap(*({k: v} for k, v in items)) } # noinspection PyCallingNonCallable def check_one_arg_generic(type_, value_info, use_bytes, use_enum, use_datetime): x_type, x_value, x_value_dumped = value_info @dataclass class DataClass(DataClassDictMixin): x: type_[x_type] x_factory = x_factory_mapping[type_] x = x_factory([x_value for _ in range(3)]) instance = DataClass(x) if x_value_dumped is Fixture.BYTES: v_dumped = Fixture.BYTES if use_bytes else Fixture.BYTES_BASE64 elif x_value_dumped is Fixture.BYTE_ARRAY: v_dumped = Fixture.BYTE_ARRAY if use_bytes else Fixture.BYTES_BASE64 elif isinstance(x_value_dumped, Enum): v_dumped = x_value_dumped if use_enum else x_value_dumped.value elif isinstance(x_value_dumped, (datetime, date, time)): v_dumped = x_value_dumped if use_datetime \ else x_value_dumped.isoformat() else: v_dumped = x_value_dumped dumped = {'x': list(x_factory([v_dumped for _ in range(3)]))} instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert instance_dumped == dumped assert instance_loaded == instance instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert same_types(instance_dumped, dumped) assert same_types(instance_loaded.x, x) # noinspection PyCallingNonCallable def check_two_args_generic(type_, key_info, value_info, use_bytes, use_enum, use_datetime): k_type, k_value, k_value_dumped = key_info v_type, v_value, v_value_dumped = value_info @dataclass class DataClass(DataClassDictMixin): x: type_[k_type, v_type] x_factory = x_factory_mapping[type_] x = x_factory([(k_value, v_value) for _ in range(3)]) instance = DataClass(x) if k_value_dumped is Fixture.BYTES: k_dumped = Fixture.BYTES if use_bytes else Fixture.BYTES_BASE64 # Fixture.BYTE_ARRAY is not hashable # elif k_value_dumped is Fixture.BYTE_ARRAY: # k_dumped = Fixture.BYTE_ARRAY if use_bytes else Fixture.BYTES_BASE64 elif isinstance(k_value_dumped, Enum): k_dumped = k_value_dumped if use_enum else k_value_dumped.value elif isinstance(k_value_dumped, (datetime, date, time)): k_dumped = k_value_dumped if use_datetime \ else k_value_dumped.isoformat() else: k_dumped = k_value_dumped if v_value_dumped is Fixture.BYTES: v_dumped = Fixture.BYTES if use_bytes else Fixture.BYTES_BASE64 elif v_value_dumped is Fixture.BYTE_ARRAY: v_dumped = Fixture.BYTE_ARRAY if use_bytes else Fixture.BYTES_BASE64 elif isinstance(v_value_dumped, Enum): v_dumped = v_value_dumped if use_enum else v_value_dumped.value elif isinstance(v_value_dumped, (datetime, date, time)): v_dumped = v_value_dumped if use_datetime \ else v_value_dumped.isoformat() else: v_dumped = v_value_dumped if type_ is ChainMap: dumped = {'x': x_factory([(k_dumped, v_dumped) for _ in range(3)]).maps} else: dumped = {'x': x_factory([(k_dumped, v_dumped) for _ in range(3)])} instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert instance_dumped == dumped assert instance_loaded == instance instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert same_types(instance_dumped, dumped) assert same_types(instance_loaded.x, x) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) def test_one_level(value_info, use_bytes, use_enum, use_datetime): x_type, x_value, x_value_dumped = value_info @dataclass class DataClass(DataClassDictMixin): x: x_type instance = DataClass(x_value) if x_value_dumped is Fixture.BYTES: v_dumped = Fixture.BYTES if use_bytes else Fixture.BYTES_BASE64 elif x_value_dumped is Fixture.BYTE_ARRAY: v_dumped = Fixture.BYTE_ARRAY if use_bytes else Fixture.BYTES_BASE64 elif isinstance(x_value_dumped, Enum): v_dumped = x_value_dumped if use_enum else x_value_dumped.value elif isinstance(x_value_dumped, (datetime, date, time)): v_dumped = x_value_dumped if use_datetime \ else x_value_dumped.isoformat() else: v_dumped = x_value_dumped dumped = {'x': v_dumped} instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert instance_dumped == dumped assert instance_loaded == instance instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert same_types(instance_dumped, dumped) assert same_types(instance_loaded.x, x_value) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) def test_with_generic_list(value_info, use_bytes, use_enum, use_datetime): check_one_arg_generic(List, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) def test_with_generic_deque(value_info, use_bytes, use_enum, use_datetime): check_one_arg_generic(Deque, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) def test_with_generic_tuple(value_info, use_bytes, use_enum, use_datetime): check_one_arg_generic(Tuple, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', hashable_inner_values) def test_with_generic_set(value_info, use_bytes, use_enum, use_datetime): check_one_arg_generic(Set, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', hashable_inner_values) def test_with_generic_frozenset(value_info, use_bytes, use_enum, use_datetime): check_one_arg_generic( FrozenSet, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', hashable_inner_values) def test_with_generic_mutable_set( value_info, use_bytes, use_enum, use_datetime): check_one_arg_generic( MutableSet, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) @pytest.mark.parametrize('key_info', hashable_inner_values) def test_with_generic_dict( key_info, value_info, use_bytes, use_enum, use_datetime): check_two_args_generic( Dict, key_info, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) @pytest.mark.parametrize('key_info', hashable_inner_values) def test_with_generic_mapping( key_info, value_info, use_bytes, use_enum, use_datetime): check_two_args_generic( Mapping, key_info, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) @pytest.mark.parametrize('key_info', hashable_inner_values) def test_with_generic_mutable_mapping( key_info, value_info, use_bytes, use_enum, use_datetime): check_two_args_generic( MutableMapping, key_info, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) @pytest.mark.parametrize('key_info', hashable_inner_values) def test_with_generic_chain_map( key_info, value_info, use_bytes, use_enum, use_datetime): check_two_args_generic( ChainMap, key_info, value_info, use_bytes, use_enum, use_datetime) @pytest.mark.parametrize('x_type', unsupported_field_types) @pytest.mark.parametrize('generic_type', generic_sequence_types) def test_unsupported_generic_field_types(x_type, generic_type): with pytest.raises(UnserializableField): @dataclass class _(DataClassDictMixin): # noinspection PyTypeChecker x: generic_type[x_type] @pytest.mark.parametrize('x_type', unsupported_typing_primitives) @pytest.mark.parametrize('generic_type', generic_sequence_types) def test_unsupported_generic_typing_primitives(x_type, generic_type): with pytest.raises(UnserializableDataError): @dataclass class _(DataClassDictMixin): # noinspection PyTypeChecker x: generic_type[x_type] @pytest.mark.parametrize('x_type', unsupported_field_types) def test_unsupported_field_types(x_type): with pytest.raises(UnserializableField): @dataclass class _(DataClassDictMixin): x: x_type @pytest.mark.parametrize('x_type', unsupported_typing_primitives) def test_unsupported_typing_primitives(x_type): with pytest.raises(UnserializableDataError): @dataclass class _(DataClassDictMixin): x: x_type @pytest.mark.parametrize('generic_type', generic_mapping_types) def test_data_class_as_mapping_key(generic_type): @dataclass class Key(DataClassDictMixin): pass with pytest.raises(UnserializableDataError): @dataclass class _(DataClassDictMixin): x: generic_type[Key, int] def test_data_class_as_chain_map_key(): @dataclass class Key(DataClassDictMixin): pass with pytest.raises(UnserializableDataError): @dataclass class _(DataClassDictMixin): x: ChainMap[Key, int] @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) def test_with_any(value_info, use_bytes, use_enum, use_datetime): @dataclass class DataClass(DataClassDictMixin): x: Any x = value_info[1] dumped = {'x': x} instance = DataClass(x) instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert instance_dumped == dumped assert instance_loaded == instance assert same_types(instance_dumped, dumped) assert same_types(instance_loaded.x, x) @pytest.mark.parametrize('use_datetime', [True, False]) @pytest.mark.parametrize('use_enum', [True, False]) @pytest.mark.parametrize('use_bytes', [True, False]) @pytest.mark.parametrize('value_info', inner_values) def test_with_optional(value_info, use_bytes, use_enum, use_datetime): x_type, x_value, x_value_dumped = value_info @dataclass class DataClass(DataClassDictMixin): x: Optional[x_type] = None for instance in [DataClass(x_value), DataClass()]: if instance.x is None: v_dumped = None elif x_value_dumped is Fixture.BYTES: v_dumped = Fixture.BYTES if use_bytes else Fixture.BYTES_BASE64 elif x_value_dumped is Fixture.BYTE_ARRAY: v_dumped = Fixture.BYTE_ARRAY if use_bytes else Fixture.BYTES_BASE64 elif isinstance(x_value_dumped, Enum): v_dumped = x_value_dumped if use_enum else x_value_dumped.value elif isinstance(x_value_dumped, (datetime, date, time)): v_dumped = x_value_dumped if use_datetime \ else x_value_dumped.isoformat() else: v_dumped = x_value_dumped dumped = {'x': v_dumped} instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert instance_dumped == dumped assert instance_loaded == instance instance_dumped = instance.to_dict( use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) instance_loaded = DataClass.from_dict( dumped, use_bytes=use_bytes, use_enum=use_enum, use_datetime=use_datetime ) assert same_types(instance_dumped, dumped) assert same_types(instance_loaded.x, instance.x) def test_raises_missing_field(): @dataclass class DataClass(DataClassDictMixin): x: int with pytest.raises(MissingField): DataClass.from_dict({})
34.633212
80
0.701986
2,491
18,979
5.038137
0.058611
0.053546
0.105418
0.051394
0.772112
0.73753
0.718327
0.705498
0.685498
0.665498
0
0.010272
0.194689
18,979
547
81
34.696527
0.810848
0.014332
0
0.549894
0
0
0.037596
0.00385
0
0
0
0
0.042463
1
0.046709
false
0.004246
0.025478
0
0.186837
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fcd6d6c5939dcbca2463ee8190aae2c3f87f2964
3,776
py
Python
HashItOut/env/lib/python2.7/site-packages/aldryn_bootstrap3/migrations/0003_auto_20151113_1604.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
null
null
null
HashItOut/env/lib/python2.7/site-packages/aldryn_bootstrap3/migrations/0003_auto_20151113_1604.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
2
2022-01-13T04:25:01.000Z
2022-03-12T01:05:40.000Z
HashItOut/env/lib/python2.7/site-packages/aldryn_bootstrap3/migrations/0003_auto_20151113_1604.py
priyamshah112/Project-Descripton-Blog
8e01016c6be79776c4f5ca75563fa3daa839e39e
[ "MIT" ]
2
2017-10-18T13:30:28.000Z
2020-04-30T23:05:43.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import aldryn_bootstrap3.model_fields class Migration(migrations.Migration): dependencies = [ ('aldryn_bootstrap3', '0002_bootstrap3fileplugin'), ] operations = [ migrations.AddField( model_name='boostrap3imageplugin', name='override_height', field=models.IntegerField(help_text='if this field is provided - it would be used across all devices instead of default for devices types. If aspect ration is selected - height will be calculated based on that.', null=True, verbose_name='override height', blank=True), preserve_default=True, ), migrations.AddField( model_name='boostrap3imageplugin', name='override_width', field=models.IntegerField(help_text='if this field is provided - it would be used across all devices instead of default for devices types.', null=True, verbose_name='override width', blank=True), preserve_default=True, ), migrations.AlterField( model_name='boostrap3buttonplugin', name='btn_context', field=aldryn_bootstrap3.model_fields.Context(default='default', max_length=255, verbose_name='context', choices=[('default', 'Default'), ('primary', 'Primary'), ('success', 'Success'), ('info', 'Info'), ('warning', 'Warning'), ('danger', 'Danger'), ('link', 'Link')]), preserve_default=True, ), migrations.AlterField( model_name='boostrap3buttonplugin', name='link_mailto', field=models.EmailField(max_length=75, null=True, verbose_name='email address', blank=True), preserve_default=True, ), migrations.AlterField( model_name='boostrap3buttonplugin', name='txt_context', field=aldryn_bootstrap3.model_fields.Context(default='', max_length=255, verbose_name='context', blank=True, choices=[('', 'Default'), ('primary', 'Primary'), ('success', 'Success'), ('info', 'Info'), ('warning', 'Warning'), ('danger', 'Danger'), ('muted ', 'Muted')]), preserve_default=True, ), migrations.AlterField( model_name='boostrap3imageplugin', name='aspect_ratio', field=models.CharField(default='', max_length=10, verbose_name='aspect ratio', blank=True, choices=[('1x1', '1x1'), ('4x3', '4x3'), ('16x9', '16x9'), ('16x10', '16x10'), ('21x9', '21x9'), ('3x4', '3x4'), ('9x16', '9x16'), ('10x16', '10x16'), ('9x21', '9x21')]), preserve_default=True, ), migrations.AlterField( model_name='bootstrap3carouselplugin', name='aspect_ratio', field=models.CharField(default='', max_length=10, verbose_name='aspect ratio', blank=True, choices=[('1x1', '1x1'), ('4x3', '4x3'), ('16x9', '16x9'), ('16x10', '16x10'), ('21x9', '21x9'), ('3x4', '3x4'), ('9x16', '9x16'), ('10x16', '10x16'), ('9x21', '9x21')]), preserve_default=True, ), migrations.AlterField( model_name='bootstrap3carouselslideplugin', name='link_mailto', field=models.EmailField(max_length=75, null=True, verbose_name='email address', blank=True), preserve_default=True, ), migrations.AlterField( model_name='bootstrap3listgroupitemplugin', name='context', field=aldryn_bootstrap3.model_fields.Context(default='', max_length=255, blank=True, choices=[('', 'Default'), ('primary', 'Primary'), ('success', 'Success'), ('info', 'Info'), ('warning', 'Warning'), ('danger', 'Danger')]), preserve_default=True, ), ]
53.942857
281
0.612818
375
3,776
6.016
0.258667
0.035904
0.075798
0.102837
0.802748
0.778812
0.766401
0.66844
0.644947
0.614362
0
0.04809
0.223517
3,776
69
282
54.724638
0.721351
0.005561
0
0.650794
0
0.015873
0.292566
0.045297
0
0
0
0
0
1
0
false
0
0.047619
0
0.095238
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
fcead0bc6d47402988729215e289131e73663082
5,558
py
Python
python/main.py
jonay2000/research-project
dcc7a1c70b53bb59388452ecaaba17d6564d9216
[ "Apache-2.0", "MIT" ]
3
2021-08-23T18:00:44.000Z
2022-02-09T06:00:50.000Z
python/main.py
jonay2000/research-project
dcc7a1c70b53bb59388452ecaaba17d6564d9216
[ "Apache-2.0", "MIT" ]
null
null
null
python/main.py
jonay2000/research-project
dcc7a1c70b53bb59388452ecaaba17d6564d9216
[ "Apache-2.0", "MIT" ]
1
2021-06-15T11:38:45.000Z
2021-06-15T11:38:45.000Z
import pathlib as pathlib from mapfmclient import MapfBenchmarker, ProgressiveDescriptor, BenchmarkDescriptor, Problem, MarkedLocation import pathlib from python.algorithm import MapfAlgorithm from python.mstar.rewrite import Config from python.mstar.rewrite.config import GigaByte, MatchingStrategy from python.solvers.configurable_mstar_solver import ConfigurableMStar from python.solvers.mstar_od_solver import MStarOD from python.solvers.prematch_mstar_solver_od import MStarOD as PrematchMStarOD from python.solvers.prematch_mstar_solver import MStar as PrematchMStar from python.solvers.visual_prematch_mstar_solver import MStar as VisualPrematchMStar from python.solvers.prematch_recursive_mstar_solver_od import RMStarOD from python.solvers.mstar_solver import MStar from python.solvers.better_matching_astar import BetterMatchingAStar this_dir = pathlib.Path(__file__).parent.absolute() with open(this_dir / ".." / "token", "r") as f: token = f.read() def submit(algorithm: MapfAlgorithm): benchmarker = MapfBenchmarker( token, # BenchmarkDescriptor( # 2801, # progressive_descriptor=ProgressiveDescriptor( # min_agents=1, # max_agents=6, # num_teams=2, # ), # ),cp5 81, algorithm.name, algorithm.version, True, solver=algorithm.solve, cores=1, baseURL="https://mapf.nl", ) benchmarker.run() if __name__ == '__main__': submit(BetterMatchingAStar()) # submit(RMStarOD()) # submit(PrematchMStarOD()) # submit(PrematchMStar()) # submit(VisualPrematchMStar()) # submit(MStar()) # submit(MStarOD()) # submit(ConfigurableMStar(Config( # operator_decomposition=True, # precompute_paths=False, # precompute_heuristic=True, # collision_avoidance_table=False, # recursive=False, # matching_strategy=MatchingStrategy.Prematch, # max_memory_usage=3 * GigaByte, # debug=False, # ))) # m = MStar() # s = m.solve(Problem( # grid=[[1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0], [1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0], [0, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0], [0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0], [0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0], [1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0], [0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0], [1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1], [0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0], [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1], [0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1], [0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]], # width=20, # height=20, # starts=[MarkedLocation(x=12, y=12, color=0), MarkedLocation(x=11, y=12, color=0), MarkedLocation(x=4, y=2, color=0)], # goals=[MarkedLocation(x=9, y=12, color=0), MarkedLocation(x=0, y=15, color=0), MarkedLocation(x=2, y=13, color=0)], # )) # # s = m.solve(Problem( # # grid=[ # # [0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1], # # [1, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1], # # [1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1], # # [0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0], # # [0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0], # # [0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], # # [0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1], # # [0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0], # # [0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0], # # [1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], # # [1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0], # # [1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1], # # [1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0], # # [1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0], # # [0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1], # # [1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0], # # [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0], # # [0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1], # # [0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1], # # [1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1] # # ], # # width=20, # # height=20, # # starts=[MarkedLocation(x=19, y=13, color=0), MarkedLocation(x=1, y=16, color=0)], # # goals=[MarkedLocation(x=6, y=5, color=0), MarkedLocation(x=12, y=15, color=0)], # # )) # print(s.paths)
55.029703
1,256
0.469054
1,106
5,558
2.316456
0.100362
0.169399
0.154567
0.118657
0.448478
0.41413
0.340359
0.340359
0.340359
0.306011
0
0.223664
0.306585
5,558
100
1,257
55.58
0.4411
0.687298
0
0
0
0
0.018811
0
0
0
0
0
0
1
0.032258
false
0
0.451613
0
0.483871
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
fcf170e9995593a80080ce345fe39acdc230fd5f
159
py
Python
harness/determined/common/schemas/expconf/__init__.py
gh-determined-ai/determined
9a1ab33a3a356b69681b3351629fef4ab98ddb56
[ "Apache-2.0" ]
1,729
2020-04-27T17:36:40.000Z
2022-03-31T05:48:39.000Z
harness/determined/common/schemas/expconf/__init__.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
1,940
2020-04-27T17:34:14.000Z
2022-03-31T23:02:28.000Z
harness/determined/common/schemas/expconf/__init__.py
ChrisW09/determined
5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0
[ "Apache-2.0" ]
214
2020-04-27T19:57:28.000Z
2022-03-29T08:17:16.000Z
from determined.common.schemas.expconf._validate import ( sanity_validation_errors, completeness_validation_errors, get_default, get_schema, )
22.714286
57
0.779874
17
159
6.882353
0.823529
0.273504
0
0
0
0
0
0
0
0
0
0
0.157233
159
6
58
26.5
0.873134
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.166667
0
0.166667
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
0
0
0
0
0
4
1e0cd8347e7d4ee06c7d5e37ed3dd3f8a687bdda
39
py
Python
samples/sample.py
spoonshuge/daTool
c479f1a8e09ebcfa306591e1da750e5ec36b54ad
[ "MIT" ]
null
null
null
samples/sample.py
spoonshuge/daTool
c479f1a8e09ebcfa306591e1da750e5ec36b54ad
[ "MIT" ]
null
null
null
samples/sample.py
spoonshuge/daTool
c479f1a8e09ebcfa306591e1da750e5ec36b54ad
[ "MIT" ]
null
null
null
""" Put sample files in this dir... """
13
31
0.589744
6
39
3.833333
1
0
0
0
0
0
0
0
0
0
0
0
0.179487
39
3
32
13
0.71875
0.794872
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
1e2061267b844a7ddf9e232ba8172a7dfdc679a9
572
py
Python
Sources/Gotcha/main.py
KHUNerds/Gotcha
b0160da96d54cd48e5f9072d1acc4d491af0c577
[ "MIT" ]
null
null
null
Sources/Gotcha/main.py
KHUNerds/Gotcha
b0160da96d54cd48e5f9072d1acc4d491af0c577
[ "MIT" ]
null
null
null
Sources/Gotcha/main.py
KHUNerds/Gotcha
b0160da96d54cd48e5f9072d1acc4d491af0c577
[ "MIT" ]
null
null
null
import MouseControl import KeybordControl if __name__ == "__main__": print("HelloWorld") # print(MouseControl.MousePosition()) # MouseControl.MouseMove(1006, 331) # MouseControl.MouseClickLeft() # MouseControl.MouseClickRight() # MouseControl.MouseScroll(100) # MouseControl.MouseDrag(100, 100, 2) # KeybordControl.KeybordInputString("가나다라") # KeybordControl.KeybordInputKeyDown('ctrl') # KeybordControl.KeybordInputKeyPress('v', 3) # KeybordControl.KeybordInputKeyUp('ctrl') # KeybordControl.KeybordInputKeyPress('v', 3)
31.777778
49
0.727273
45
572
9.066667
0.577778
0.088235
0.186275
0.191176
0.196078
0
0
0
0
0
0
0.039095
0.15035
572
17
50
33.647059
0.800412
0.716783
0
0
0
0
0.12
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0.25
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
1e2da7f196f11cd703449df9612d1ef465e26ab7
108
py
Python
functions/source/sagemaker-phc-2020-11-16-preprocess/sagemaker-phc-2020-11-16-preprocess.py
aws-quickstart/quickstart-phsa-ipac
b9f395df62100d2feb0783e226d33b73e5a6198d
[ "Apache-2.0" ]
1
2021-10-30T16:35:38.000Z
2021-10-30T16:35:38.000Z
functions/source/sagemaker-phc-2020-11-16-preprocess/sagemaker-phc-2020-11-16-preprocess.py
aws-quickstart/quickstart-phsa-ipac
b9f395df62100d2feb0783e226d33b73e5a6198d
[ "Apache-2.0" ]
1
2022-02-23T17:56:05.000Z
2022-02-23T17:56:05.000Z
functions/source/sagemaker-phc-2020-11-16-preprocess/sagemaker-phc-2020-11-16-preprocess.py
aws-quickstart/quickstart-phsa-ipac
b9f395df62100d2feb0783e226d33b73e5a6198d
[ "Apache-2.0" ]
1
2021-10-30T16:35:29.000Z
2021-10-30T16:35:29.000Z
import json def lambda_handler(event, context): return { "taskInput": event['dataObject'] }
18
40
0.638889
11
108
6.181818
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.240741
108
6
41
18
0.829268
0
0
0
0
0
0.174312
0
0
0
0
0
0
1
0.2
false
0
0.2
0.2
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
1e3c3e0c912452c685b66d857b62602d7f9ca05d
235
py
Python
articles/fake_article.py
john-root/simple-python-mock-example
92bcaac57324ccb4538dfe504d112f20a72bd968
[ "Unlicense" ]
null
null
null
articles/fake_article.py
john-root/simple-python-mock-example
92bcaac57324ccb4538dfe504d112f20a72bd968
[ "Unlicense" ]
null
null
null
articles/fake_article.py
john-root/simple-python-mock-example
92bcaac57324ccb4538dfe504d112f20a72bd968
[ "Unlicense" ]
null
null
null
# The "fake" article entry point # no dependencies etc. class FakeArticle: def __init__(self): pass def get_article(self, idx): return { "id": idx, "title": "The test title" }
16.785714
37
0.531915
26
235
4.615385
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.365957
235
14
38
16.785714
0.805369
0.217021
0
0
0
0
0.115385
0
0
0
0
0
0
1
0.25
false
0.125
0
0.125
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
4
1e56fd0548964078d4410bf3e3f997b7133ede04
884
py
Python
Proctorexam/Classes/Document.py
gbaelen/ProctorExam-python-api-wrapper
1ee346e36db1f4c98df2f1a74eefdb86ff453958
[ "MIT" ]
null
null
null
Proctorexam/Classes/Document.py
gbaelen/ProctorExam-python-api-wrapper
1ee346e36db1f4c98df2f1a74eefdb86ff453958
[ "MIT" ]
null
null
null
Proctorexam/Classes/Document.py
gbaelen/ProctorExam-python-api-wrapper
1ee346e36db1f4c98df2f1a74eefdb86ff453958
[ "MIT" ]
1
2019-12-17T12:55:06.000Z
2019-12-17T12:55:06.000Z
class Document(): def __init__(self, connector=None): self.connector = connector @staticmethod def generate_document_from_response(data, connector=None): return Document(**data, connector=connector) class DocumentList(): def __init__(self): self.__id = 0 self.__documents = [] def __iter(self): self.__id = 0 return self def __next__(self): if self.__id < len(self.__documents): document = self.__documents[self.__id] self.__id += 1 return document else: raise StopIteration def __getitem__(self, key): return self.__documents[key] def add(self, document): self.__documents.append(document) def remove_at(self, index): self.__documents.pop(index) def size(self): return len(self.__documents)
23.891892
62
0.61086
96
884
5.145833
0.354167
0.184211
0.044534
0.044534
0
0
0
0
0
0
0
0.004792
0.291855
884
36
63
24.555556
0.784345
0
0
0.071429
1
0
0
0
0
0
0
0
0
1
0.321429
false
0
0
0.107143
0.571429
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
1e6dd2185808183fd9842b3f666f1c21fd6d7e4b
373
py
Python
traceback_with_variables/activate_in_ipython_by_import.py
cclauss/traceback_with_variables
a2bbeb0629535a81f68e1c60a04a7db0ca7470ba
[ "MIT" ]
550
2020-10-31T18:19:24.000Z
2022-03-31T17:40:07.000Z
traceback_with_variables/activate_in_ipython_by_import.py
cclauss/traceback_with_variables
a2bbeb0629535a81f68e1c60a04a7db0ca7470ba
[ "MIT" ]
20
2020-10-29T15:20:35.000Z
2021-12-06T00:00:08.000Z
traceback_with_variables/activate_in_ipython_by_import.py
cclauss/traceback_with_variables
a2bbeb0629535a81f68e1c60a04a7db0ca7470ba
[ "MIT" ]
24
2020-11-04T05:12:36.000Z
2022-03-18T05:38:59.000Z
""" For the simplest usage possible. Just import it """ from traceback_with_variables.color import ColorSchemes from traceback_with_variables.global_hooks import global_print_exc_in_ipython, Format, is_ipython_global global_print_exc_in_ipython(fmt=Format( custom_var_printers=[(is_ipython_global, lambda v: None)], color_scheme=ColorSchemes.common ))
31.083333
105
0.801609
51
373
5.470588
0.607843
0.09319
0.121864
0.18638
0.164875
0
0
0
0
0
0
0
0.128686
373
11
106
33.909091
0.858462
0.126005
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0.5
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
1
0
4
1e84ce404c69ea2517aad282637914e3b0a29809
18,488
py
Python
btd6_save_explorer/model/__init__.py
mriswithe/pybtd6
da61149e2526a3a560a2d4f62b6372ee876fa84d
[ "MIT" ]
null
null
null
btd6_save_explorer/model/__init__.py
mriswithe/pybtd6
da61149e2526a3a560a2d4f62b6372ee876fa84d
[ "MIT" ]
null
null
null
btd6_save_explorer/model/__init__.py
mriswithe/pybtd6
da61149e2526a3a560a2d4f62b6372ee876fa84d
[ "MIT" ]
null
null
null
# generated by datamodel-codegen: # filename: Profile.json # timestamp: 2021-12-19T07:57:15+00:00 from __future__ import annotations from typing import Any, Dict, List from pydantic import BaseModel, Field from .instamonkey import InstaTowers from .maps import MapInfo from .powers import PowersData class TowerXp(BaseModel): dart_monkey: float = Field(..., alias="DartMonkey") tack_shooter: float = Field(..., alias="TackShooter") glue_gunner: float = Field(..., alias="GlueGunner") ice_monkey: float = Field(..., alias="IceMonkey") bomb_shooter: float = Field(..., alias="BombShooter") boomerang_monkey: float = Field(..., alias="BoomerangMonkey") monkey_ace: float = Field(..., alias="MonkeyAce") mortar_monkey: float = Field(..., alias="MortarMonkey") sniper_monkey: float = Field(..., alias="SniperMonkey") super_monkey: float = Field(..., alias="SuperMonkey") ninja_monkey: float = Field(..., alias="NinjaMonkey") monkey_village: float = Field(..., alias="MonkeyVillage") engineer_monkey: float = Field(..., alias="EngineerMonkey") sentry: float = Field(..., alias="Sentry") spike_factory: float = Field(..., alias="SpikeFactory") monkey_sub: float = Field(..., alias="MonkeySub") wizard_monkey: float = Field(..., alias="WizardMonkey") banana_farm: float = Field(..., alias="BananaFarm") monkey_buccaneer: float = Field(..., alias="MonkeyBuccaneer") alchemist: float = Field(..., alias="Alchemist") natures_ward_totem: float = Field(..., alias="NaturesWardTotem") phoenix: float = Field(..., alias="Phoenix") heli_pilot: float = Field(..., alias="HeliPilot") dartling_gunner: float = Field(..., alias="DartlingGunner") druid: float = Field(..., alias="Druid") buccaneer_lesser_plane: float = Field(..., alias="BuccaneerLesserPlane") banana_farmer: float = Field(..., alias="BananaFarmer") sentry_crushing: float = Field(..., alias="SentryCrushing") sentry_cold: float = Field(..., alias="SentryCold") sentry_energy: float = Field(..., alias="SentryEnergy") sentry_boom: float = Field(..., alias="SentryBoom") buccaneer_greater_plane: float = Field(..., alias="BuccaneerGreaterPlane") sentry_paragon: float = Field(..., alias="SentryParagon") cave_monkey: float = Field(..., alias="CaveMonkey") buccaneer_lesser_plane_camo: float = Field(..., alias="BuccaneerLesserPlaneCamo") sun_avatar_mini: float = Field(..., alias="SunAvatarMini") spectre_va: float = Field(..., alias="SpectreVA") perma_phoenix: float = Field(..., alias="PermaPhoenix") marine: float = Field(..., alias="Marine") _: float lord_phoenix: float = Field(..., alias="LordPhoenix") tech_bot: float = Field(..., alias="TechBot") spectre_vc: float = Field(..., alias="SpectreVC") true_sun_avatar_mini: float = Field(..., alias="TrueSunAvatarMini") drone: float = Field(..., alias="Drone") uav: float = Field(..., alias="UAV") ucav: float = Field(..., alias="UCAV") sacrificial_totem: float = Field(..., alias="SacrificialTotem") pontoon: float = Field(..., alias="Pontoon") ball_of_light__tower: float = Field(..., alias="BallOfLight-Tower") portable_lake: float = Field(..., alias="PortableLake") buccaneer_paragon_plane: float = Field(..., alias="BuccaneerParagonPlane") class SelectedTowerSkinData(BaseModel): quincy: str = Field(..., alias="Quincy") gwendolin: str = Field(..., alias="Gwendolin") obyn_greenfoot: str = Field(..., alias="ObynGreenfoot") striker_jones: str = Field(..., alias="StrikerJones") captain_churchill: str = Field(..., alias="CaptainChurchill") benjamin: str = Field(..., alias="Benjamin") ezili: str = Field(..., alias="Ezili") pat_fusty: str = Field(..., alias="PatFusty") adora: str = Field(..., alias="Adora") admiral_brickell: str = Field(..., alias="AdmiralBrickell") etienne: str = Field(..., alias="Etienne") sauda: str = Field(..., alias="Sauda") psi: str = Field(..., alias="Psi") class AnalyticsInfo(BaseModel): heroes_placed_by_name: Dict[str, Any] = Field(..., alias="heroesPlacedByName") upgrades_purchased_by_tier: Dict[str, Any] = Field( ..., alias="upgradesPurchasedByTier" ) hero_upgrades_purchased_by_tier: Dict[str, Any] = Field( ..., alias="heroUpgradesPurchasedByTier" ) abilities_activated_by_name: Dict[str, Any] = Field( ..., alias="abilitiesActivatedByName" ) hero_levels_by_name: Dict[str, Any] = Field(..., alias="heroLevelsByName") hero_won_count: Dict[str, Any] = Field(..., alias="heroWonCount") power_history: Dict[str, Any] = Field(..., alias="powerHistory") monkey_type_wins: Dict[str, Any] = Field(..., alias="monkeyTypeWins") game_id: int = Field(..., alias="gameID") bloons_popped: int = Field(..., alias="bloonsPopped") moabs_popped: int = Field(..., alias="moabsPopped") bfbs_popped: int = Field(..., alias="bfbsPopped") zomgs_popped: int = Field(..., alias="zomgsPopped") ddts_popped: int = Field(..., alias="ddtsPopped") bads_popped: int = Field(..., alias="badsPopped") fortified_popped: int = Field(..., alias="fortifiedPopped") purples_popped: int = Field(..., alias="purplesPopped") camos_popped: int = Field(..., alias="camosPopped") ceramics_popped: int = Field(..., alias="ceramicsPopped") regrow_popped: int = Field(..., alias="regrowPopped") lead_popped: int = Field(..., alias="leadPopped") coop_cash_recieved: int = Field(..., alias="coopCashRecieved") coop_cash_sent: int = Field(..., alias="coopCashSent") total_towers_placed: int = Field(..., alias="totalTowersPlaced") total_towers_sold: int = Field(..., alias="totalTowersSold") total_powers_activated: int = Field(..., alias="totalPowersActivated") total_upgrades_purchased: int = Field(..., alias="totalUpgradesPurchased") total_abilities_activated: int = Field(..., alias="totalAbilitiesActivated") times_hero_placed: int = Field(..., alias="timesHeroPlaced") times_hero_sold: int = Field(..., alias="timesHeroSold") times_game_restarted: int = Field(..., alias="timesGameRestarted") third_level_hero_ability_used: bool = Field(..., alias="thirdLevelHeroAbilityUsed") tenth_level_hero_ability_used: bool = Field(..., alias="tenthLevelHeroAbilityUsed") reported_first_session: bool = Field(..., alias="reportedFirstSession") reported_first_purchase: bool = Field(..., alias="reportedFirstPurchase") class EventData(BaseModel): event_id: str = Field(..., alias="eventId") amount_collected: float = Field(..., alias="amountCollected") amount_rewarded_for: float = Field(..., alias="amountRewardedFor") amount_last_seen: float = Field(..., alias="amountLastSeen") seed: float featured_insta_charges: List[float] = Field(..., alias="featuredInstaCharges") last_featured_instas_page_seen: float = Field( ..., alias="lastFeaturedInstasPageSeen" ) class Model(BaseModel): version: int saved_by_game_version: str = Field(..., alias="savedByGameVersion") tower_xp: TowerXp = Field(..., alias="towerXp") acquired_upgrades: List[str] = Field(..., alias="acquiredUpgrades") viewed_upgrades: List[str] = Field(..., alias="viewedUpgrades") acquired_knowledge: List[str] = Field(..., alias="acquiredKnowledge") paid_for_knowledge: List[str] = Field(..., alias="paidForKnowledge") knowledge_disabled: bool = Field(..., alias="knowledgeDisabled") new_knowledge_points: bool = Field(..., alias="newKnowledgePoints") unlocked_towers: List[str] = Field(..., alias="unlockedTowers") unlocked_heroes: List[str] = Field(..., alias="unlockedHeroes") unlocked_tower_skins: List[str] = Field(..., alias="unlockedTowerSkins") seen_unlocked_notification: List[str] = Field(..., alias="seenUnlockedNotification") seen_unlocked_heroes: List[str] = Field(..., alias="seenUnlockedHeroes") seen_new_hero_notification: List[str] = Field(..., alias="seenNewHeroNotification") seen_new_tower_skin_notification: List[str] = Field( ..., alias="seenNewTowerSkinNotification" ) map_info: MapInfo = Field(..., alias="mapInfo") seen_events: List[str] = Field(..., alias="seenEvents") paid_user_status: float = Field(..., alias="paidUserStatus") rate_me_sku_version_number: str = Field(..., alias="rateMeSkuVersionNumber") count_games_since_sku_rate_me_change: bool = Field( ..., alias="countGamesSinceSkuRateMeChange" ) completed_games_since_sku_rate_me_change: int = Field( ..., alias="completedGamesSinceSkuRateMeChange" ) completed_game: int = Field(..., alias="completedGame") seen_pop_up_event_ids: List[str] = Field(..., alias="seenPopUpEventIds") selected_tower_skin_data: SelectedTowerSkinData = Field( ..., alias="selectedTowerSkinData" ) powers: Dict[str, Any] powers_data: PowersData = Field(..., alias="powersData") insta_towers: InstaTowers = Field(..., alias="instaTowers") saved_maps: Dict[str, Any] = Field(..., alias="savedMaps") guid: str device_id: str = Field(..., alias="deviceID") owner_id: str = Field(..., alias="ownerID") trophies_wallet_id: str = Field(..., alias="trophiesWalletId") unclaimed_trophies: List = Field(..., alias="unclaimedTrophies") time_stamp: str = Field(..., alias="timeStamp") monkey_money: float = Field(..., alias="monkeyMoney") xp: float rank: float veteran_xp: float = Field(..., alias="veteranXp") veteran_rank: float = Field(..., alias="veteranRank") seen_veteran_rank_info: bool = Field(..., alias="seenVeteranRankInfo") level_cap_was: int = Field(..., alias="levelCapWas") trophies: float lifetime_trophies: float = Field(..., alias="lifetimeTrophies") knowledge_points: float = Field(..., alias="knowledgePoints") primary_hero: str = Field(..., alias="primaryHero") secondary_hero: Any = Field(..., alias="secondaryHero") achievements_progress: dict[str, float] = Field(..., alias="achievementsProgress") achievements_claimed: List[int] = Field(..., alias="achievementsClaimed") achievements_seen: List[int] = Field(..., alias="achievementsSeen") achievements_posted_to_x_box_live: List = Field( ..., alias="achievementsPostedToXBoxLive" ) achievements_posted_to_google_play: List = Field( ..., alias="achievementsPostedToGooglePlay" ) analytics_info: AnalyticsInfo = Field(..., alias="analyticsInfo") analytics_kon_fuze: AnalyticsKonFuze = Field(..., alias="analyticsKonFuze") highest_seen_round: int = Field(..., alias="highestSeenRound") purchase: Purchase gifts_received: List = Field(..., alias="giftsReceived") daily_reward_index: int = Field(..., alias="dailyRewardIndex") last_saved_utc_time: str = Field(..., alias="lastSavedUTCTime") next_daily_reward_date_time: str = Field(..., alias="nextDailyRewardDateTime") total_daily_challenges_completed: int = Field( ..., alias="totalDailyChallengesCompleted" ) consecutive_daily_challenges_completed: int = Field( ..., alias="consecutiveDailyChallengesCompleted" ) unique_completed_daily_challenge_ids: List = Field( ..., alias="uniqueCompletedDailyChallengeIds" ) race_medal_data: Dict[str, Any] = Field(..., alias="raceMedalData") boss_badge_data: Any = Field(..., alias="bossBadgeData") boss_medals: BossMedals = Field(..., alias="bossMedals") boss_leaderboard_medals: Dict[str, Any] = Field(..., alias="bossLeaderboardMedals") boss_leaderboard_elite_medals: Dict[str, Any] = Field( ..., alias="bossLeaderboardEliteMedals" ) seen_mini_race: bool = Field(..., alias="seenMiniRace") total_races_entered: float = Field(..., alias="totalRacesEntered") race_best_time_for_achievements: float = Field( ..., alias="raceBestTimeForAchievements" ) challenge_editor_model: Any = Field(..., alias="challengeEditorModel") completed_created_challenge: bool = Field(..., alias="completedCreatedChallenge") submitted_challenge_editor_id: Any = Field(..., alias="submittedChallengeEditorID") submitted_odyssey_editor_id: Any = Field(..., alias="submittedOdysseyEditorID") seen_challenge_modified_popup: bool = Field(..., alias="seenChallengeModifiedPopup") last_submitted_content_time: LastSubmittedContentTime = Field( ..., alias="lastSubmittedContentTime" ) in_game_settings: InGameSettings = Field(..., alias="inGameSettings") language_code: str = Field(..., alias="languageCode") challenges_played: float = Field(..., alias="challengesPlayed") challenges_shared: float = Field(..., alias="challengesShared") wins_with_custom_hero_skin: float = Field(..., alias="winsWithCustomHeroSkin") bill_greates: float = Field(..., alias="billGreates") a_crate_time: float = Field(..., alias="aCrateTime") collection_event_map_bonus_data: CollectionEventMapBonusData = Field( ..., alias="collectionEventMapBonusData" ) odyssey_save_data: OdysseySaveData = Field(..., alias="odysseySaveData") odyssey_editor_save_data: Any = Field(..., alias="odysseyEditorSaveData") odysseys_editor_data: OdysseysEditorData = Field(..., alias="odysseysEditorData") embarked_odyssey_editor_dcm: Any = Field(..., alias="embarkedOdysseyEditorDcm") completed_odysseys: CompletedOdysseys = Field(..., alias="completedOdysseys") total_completed_odysseys: float = Field(..., alias="totalCompletedOdysseys") cancelled_facebook_friends_popup: bool = Field( ..., alias="cancelledFacebookFriendsPopup" ) coop_quick_match_setting: int = Field(..., alias="coopQuickMatchSetting") coop_match_set_to_private: bool = Field(..., alias="coopMatchSetToPrivate") current_coop_game_details: Any = Field(..., alias="currentCoopGameDetails") hotkeys_data: Any = Field(..., alias="hotkeysData") hotkeys_data2: HotkeysData2 = Field(..., alias="hotkeysData2") has_seen_new_double_cash: bool = Field(..., alias="hasSeenNewDoubleCash") seen_big_bloons: bool = Field(..., alias="seenBigBloons") unlocked_big_bloons: bool = Field(..., alias="unlockedBigBloons") big_bloons_active: bool = Field(..., alias="bigBloonsActive") seen_small_bloons: bool = Field(..., alias="seenSmallBloons") unlocked_small_bloons: bool = Field(..., alias="unlockedSmallBloons") small_bloons_active: bool = Field(..., alias="smallBloonsActive") seen_big_towers: bool = Field(..., alias="seenBigTowers") unlocked_big_towers: bool = Field(..., alias="unlockedBigTowers") big_towers_active: bool = Field(..., alias="bigTowersActive") seen_small_towers: bool = Field(..., alias="seenSmallTowers") unlocked_small_towers: bool = Field(..., alias="unlockedSmallTowers") small_towers_active: bool = Field(..., alias="smallTowersActive") pat_wins_on10_release: int = Field(..., alias="patWinsOn10Release") oompa_loompad: bool = Field(..., alias="oompaLoompad") collection_event_data: CollectionEventData = Field(..., alias="collectionEventData") saved_play_list: List = Field(..., alias="savedPlayList") use_juke_box: bool = Field(..., alias="useJukeBox") trophy_store_purchased_items: TrophyStorePurchasedItems = Field( ..., alias="trophyStorePurchasedItems" ) named_monkey_names: Dict[str, Any] = Field(..., alias="namedMonkeyNames") saved_stats: SavedStats = Field(..., alias="savedStats") profile_avatar: str = Field(..., alias="profileAvatar") profile_avatar_frame: Any = Field(..., alias="profileAvatarFrame") profile_banner: str = Field(..., alias="profileBanner") seen_profile_stats: bool = Field(..., alias="seenProfileStats") saved_named_monkey_stats: Dict[str, Any] = Field(..., alias="savedNamedMonkeyStats") stats_version: int = Field(..., alias="statsVersion") trophy_store_seen: bool = Field(..., alias="trophyStoreSeen") no_stone_unturned: float = Field(..., alias="noStoneUnturned") mo_problems: float = Field(..., alias="moProblems") full_speed: float = Field(..., alias="fullSpeed") transformic_tonic_uses_on20_release: int = Field( ..., alias="transformicTonicUsesOn20Release" ) player_challenges: Any = Field(..., alias="playerChallenges") current_tower_gift_unlock_index: float = Field( ..., alias="currentTowerGiftUnlockIndex" ) current_tower_gift_progress: float = Field(..., alias="currentTowerGiftProgress") trophies_spent: int = Field(..., alias="trophiesSpent") hosted_coop_games: int = Field(..., alias="hostedCoopGames") collection_event_crates_opened: int = Field( ..., alias="collectionEventCratesOpened" ) collection_event_crates_types_opened: CollectionEventCratesTypesOpened = Field( ..., alias="collectionEventCratesTypesOpened" ) continues_used: float = Field(..., alias="continuesUsed") blocked_hostnames: List = Field(..., alias="blockedHostnames") seen_intermediate_unlock: bool = Field(..., alias="seenIntermediateUnlock") seen_advanced_unlock: bool = Field(..., alias="seenAdvancedUnlock") seen_expert_unlock: bool = Field(..., alias="seenExpertUnlock") selected_content_tab: int = Field(..., alias="selectedContentTab") golden_bloon_data: GoldenBloonData = Field(..., alias="goldenBloonData") golden_bloons_popped: int = Field(..., alias="goldenBloonsPopped") monkey_teams_wins: int = Field(..., alias="monkeyTeamsWins") monkey_teams_data: MonkeyTeamsData = Field(..., alias="monkeyTeamsData") gifted_achievements: List = Field(..., alias="giftedAchievements") race_pass_count: float = Field(..., alias="racePassCount") unverified_race_pass_claims: List = Field(..., alias="unverifiedRacePassClaims") is_boss_ranked_selected: bool = Field(..., alias="isBossRankedSelected") is_boss_elite_selected: bool = Field(..., alias="isBossEliteSelected") bosses_event_data: List[BossesEventDatum] = Field(..., alias="bossesEventData") played_daily_challenge_ids: List = Field(..., alias="playedDailyChallengeIds") lost_daily_challenge_ids: List = Field(..., alias="lostDailyChallengeIds") won_daily_challenge_ids: List = Field(..., alias="wonDailyChallengeIds") has_completed_tutorial: bool = Field(..., alias="HasCompletedTutorial")
54.698225
88
0.693585
1,846
18,488
6.698267
0.324485
0.205419
0.094622
0.016983
0.110554
0.052568
0.018763
0.006955
0.006955
0
0
0.001842
0.148421
18,488
337
89
54.860534
0.783537
0.005193
0
0
1
0
0.21601
0.072112
0
0
0
0
0
1
0
true
0.00625
0.01875
0
0.85625
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
1
0
0
0
1
0
0
4
1e8c5a3cea51a0a74e1d13b299da1193d90c691c
100
py
Python
coyote_events/apps.py
hansenjacobs/coyte
069d968a24dc72f47e8e9e01cebe5856d97ae8e0
[ "MIT" ]
null
null
null
coyote_events/apps.py
hansenjacobs/coyte
069d968a24dc72f47e8e9e01cebe5856d97ae8e0
[ "MIT" ]
null
null
null
coyote_events/apps.py
hansenjacobs/coyte
069d968a24dc72f47e8e9e01cebe5856d97ae8e0
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CoyoteEventsConfig(AppConfig): name = 'coyote_events'
16.666667
36
0.78
11
100
7
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.15
100
5
37
20
0.905882
0
0
0
0
0
0.13
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1ee33f1b4a81ffee200e63e848af35cbfaffaa32
139
py
Python
tools/test_mini.py
sourcery-ai-bot/PV_ENcoNet
24f2cde258caf6a3fa82f2e1579de833727aac11
[ "Apache-2.0" ]
4
2021-02-18T10:22:11.000Z
2021-12-31T06:11:04.000Z
tools/test_mini.py
sourcery-ai-bot/PV_ENcoNet
24f2cde258caf6a3fa82f2e1579de833727aac11
[ "Apache-2.0" ]
3
2021-03-01T10:14:08.000Z
2022-01-05T09:19:44.000Z
tools/test_mini.py
sourcery-ai-bot/PV_ENcoNet
24f2cde258caf6a3fa82f2e1579de833727aac11
[ "Apache-2.0" ]
4
2021-02-21T06:14:08.000Z
2021-05-06T07:04:56.000Z
import torch a = torch.randn([3,100,3]) index = (torch.LongTensor([0,1]),torch.LongTensor([1,2]) a.index_put_(index), torch.Tensor([1,1]))
27.8
56
0.683453
25
139
3.72
0.52
0.215054
0
0
0
0
0
0
0
0
0
0.085271
0.071942
139
5
57
27.8
0.635659
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0.25
null
null
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
1
0
0
0
0
0
0
0
0
4
94c9e32e5e1ebdbb823bac6c30d1c587c1bf3dbe
1,505
py
Python
src/server/sol/deploy.py
TaibiaoGuo/bblog
d174b81b2b753bde6f0fd999425452d02d4a20d6
[ "MIT" ]
null
null
null
src/server/sol/deploy.py
TaibiaoGuo/bblog
d174b81b2b753bde6f0fd999425452d02d4a20d6
[ "MIT" ]
null
null
null
src/server/sol/deploy.py
TaibiaoGuo/bblog
d174b81b2b753bde6f0fd999425452d02d4a20d6
[ "MIT" ]
null
null
null
# !/usr/bin python3 # encoding:utf-8 ''' @Time :2020/3/23 9:26 AM @Author :TaibiaoGuo @FileName :deploy @Github :https://github.com/TaibiaoGuo @Describe : ''' from web3 import Web3, HTTPProvider import sols import os true = True false = False web3 = Web3(HTTPProvider('ETH_PROVIDER')) fromAddr = 'MAIN_ADDRESS' privateKey = 'PRIVATE_KEY' nonce = web3.eth.getTransactionCount(fromAddr) gasPrice = web3.eth.gasPrice rawTx = { 'from': fromAddr, 'nonce': nonce, 'gasPrice': gasPrice, 'gas': 300000, 'value': web3.toWei(0, 'ether'), 'data': '0x606060405260008060006101000a81548160ff021916908315150217905550341561002957600080fd5b60e4806100376000396000f3006060604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063a3c8e39314604e578063b2fa1c9e146060575b600080fd5b3415605857600080fd5b605e608a565b005b3415606a57600080fd5b607060a6565b604051808215151515815260200191505060405180910390f35b60016000806101000a81548160ff021916908315150217905550565b6000809054906101000a900460ff16815600a165627a7a723058208fd18624eaaac9c24521a084590bb1b536e9a94f23086c49864b9c02300ff0c20029' } def deploy(rawTx): signedTx = web3.eth.account.signTransaction(rawTx, private_key=privateKey) hashTx = web3.eth.sendRawTransaction(signedTx.rawTransaction).hex() receipt = web3.eth.waitForTransactionReceipt(hashTx) return receipt if __name__ == '__main__': receipt = deploy(rawTx) print('address: ' + receipt['contractAddress'])
35.833333
582
0.807309
108
1,505
11.138889
0.592593
0.029094
0
0
0
0
0
0
0
0
0
0.386043
0.104983
1,505
41
583
36.707317
0.507053
0.10299
0
0
0
0
0.501124
0.425468
0
0
0.425468
0
0
1
0.038462
false
0
0.115385
0
0.192308
0.038462
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
1
null
0
1
0
0
0
0
0
0
0
0
0
0
0
4
94d2d00139888053dc1820eab60e08c6baacec48
919
py
Python
GradientBoosting/Loss.py
nachiket273/ML_Algo_Implemented
74ae47fdf620545fdf8c934c5997784faadaebb7
[ "MIT" ]
7
2020-08-03T13:43:53.000Z
2022-02-18T20:38:51.000Z
GradientBoosting/Loss.py
nachiket273/ML_Algo_Implemented
74ae47fdf620545fdf8c934c5997784faadaebb7
[ "MIT" ]
null
null
null
GradientBoosting/Loss.py
nachiket273/ML_Algo_Implemented
74ae47fdf620545fdf8c934c5997784faadaebb7
[ "MIT" ]
2
2020-09-06T21:54:16.000Z
2022-01-22T19:59:33.000Z
import numpy as np from scipy.special import logsumexp class Loss(object): def loss(self, y_true, y_pred): raise NotImplementedError() def grad(self, y_true, y_pred): raise NotImplementedError() class DevianceLoss(Loss): def loss(self, y_true, y_pred): n_classes = len(np.unique(y_true)) Y = np.zeros((y_true.shape[0], n_classes), dtype=np.float64) for i in range(n_classes): Y[:, i] = y_true == i return np.average(-1 * (y_true * y_pred).sum(axis=1) + logsumexp(y_pred, axis=1)) def grad(self, y_true, y_pred, k=0): return y_true - np.nan_to_num(np.exp(y_pred[:, k] - logsumexp(y_pred, axis=1))) class MSE(Loss): def loss(self, y_true, y_pred): return 0.5 * np.mean((y_true - y_pred.ravel()) ** 2.0) def grad(self, y_true, y_pred): return y_true - y_pred.ravel()
30.633333
89
0.5963
147
919
3.52381
0.326531
0.125483
0.11583
0.173745
0.505792
0.374517
0.351351
0.096525
0
0
0
0.017804
0.266594
919
30
90
30.633333
0.750742
0
0
0.318182
0
0
0
0
0
0
0
0
0
1
0.272727
false
0
0.090909
0.136364
0.681818
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
94d440102656318af096cff124c7165840edb669
925
py
Python
setup.py
MG-RAST/autoskewer
042e3325f01301d095d403e6e483d48bf2ca789a
[ "BSD-2-Clause" ]
1
2017-01-23T12:05:02.000Z
2017-01-23T12:05:02.000Z
setup.py
MG-RAST/autoskewer
042e3325f01301d095d403e6e483d48bf2ca789a
[ "BSD-2-Clause" ]
2
2019-01-15T15:36:36.000Z
2019-08-23T17:08:37.000Z
setup.py
MG-RAST/autoskewer
042e3325f01301d095d403e6e483d48bf2ca789a
[ "BSD-2-Clause" ]
3
2017-01-18T21:27:17.000Z
2018-08-28T17:03:52.000Z
#!/usr/bin/env python import sys from setuptools import setup setup(name='autoskewer', version='1.2', description='wrapper for skewer', author='W Trimble', author_email='trimble@anl.gov', url='https://github.com/MG-RAST/autoskewer', packages=['autoskewer'], data_files=[ ( "data", ["data/vectors-P5.1.bt2", "data/vectors-P5.2.bt2", "data/vectors-P5.3.bt2", "data/vectors-P5.4.bt2", "data/vectors-P7.1.bt2", "data/vectors-P7.2.bt2", "data/vectors-P7.3.bt2", "data/vectors-P7.4.bt2", "data/vectors-P7.fa", "data/vectors-P5.fa", "data/vectors-P7.rev.1.bt2", "data/vectors-P7.rev.2.bt2", "data/vectors-P5.rev.1.bt2", "data/vectors-P5.rev.2.bt2"]) ], scripts=['autoskewer/autoskewer.py'], install_requires=[] )
38.541667
88
0.539459
118
925
4.20339
0.381356
0.310484
0.310484
0.193548
0.292339
0
0
0
0
0
0
0.05997
0.278919
925
23
89
40.217391
0.683658
0.021622
0
0
0
0
0.480089
0.323009
0
0
0
0
0
1
0
true
0
0.105263
0
0.105263
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
94eabeccd93df46dd9a938024e6c017956e696ab
7,169
py
Python
pyfk/tests/gf/test_gf.py
ziyixi/pyfk
2db56621cd4f9db5cf6a866fa0ca25fcb994b1d4
[ "MIT" ]
29
2019-09-08T03:43:55.000Z
2022-03-16T06:13:08.000Z
pyfk/tests/gf/test_gf.py
ziyixi/pyfk
2db56621cd4f9db5cf6a866fa0ca25fcb994b1d4
[ "MIT" ]
9
2020-12-16T01:52:44.000Z
2022-03-22T14:04:27.000Z
pyfk/tests/gf/test_gf.py
ziyixi/pyfk
2db56621cd4f9db5cf6a866fa0ca25fcb994b1d4
[ "MIT" ]
5
2021-02-17T14:46:32.000Z
2022-01-24T02:43:03.000Z
from os.path import dirname, join import numpy as np import obspy import pytest from pyfk.config.config import Config, SeisModel, SourceModel from pyfk.gf.gf import calculate_gf from pyfk.tests.taup.test_taup import TestFunctionTaup class TestFunctioncalculateGf(object): @staticmethod @pytest.mark.mpi_skip def test_hk(): # * perl fk.pl -Mhk/15/k -N512/0.1 10 20 30 model_path = join(dirname(__file__), f"../data/hk") model_data = np.loadtxt(model_path) model_hk = SeisModel(model=model_data, use_kappa=True) source_hk = SourceModel(sdep=15) config_hk = Config( model=model_hk, source=source_hk, npt=512, dt=0.1, receiver_distance=[ 10, 20, 30]) result = calculate_gf(config_hk) # * for all the gf in data/hk_gf, test if the results are close (in FK, it uses float but we are using double) for irec, each_rec in enumerate([10, 20, 30]): for icomn in range(9): hk_gf_data = obspy.read( join( dirname(__file__), f"../data/hk_gf/{each_rec}.grn.{icomn}"))[0] coef = np.corrcoef( hk_gf_data.data, result[irec][icomn].data, )[0, 1] if np.isnan(coef): coef = 1.0 assert coef > 0.99 @pytest.mark.mpi_skip def test_big_array(self): # model_data = TestFunctionTaup.gen_test_model("prem") # there is a possibility that we write x=f(x) where x is a memoryview in the code # this might cause segmentation fault model_data = np.loadtxt(join(dirname(__file__), f"../data/hk")) model_hk = SeisModel(model=model_data) source_hk = SourceModel(sdep=16.5) config_hk = Config( model=model_hk, source=source_hk, npt=512, dt=0.1, receiver_distance=np.arange(10, 40, 10)) _ = calculate_gf(config_hk) @pytest.mark.mpi_skip def test_prem_ep(self): model_data = TestFunctionTaup.gen_test_model("prem") model_prem = SeisModel(model=model_data) source_prem = SourceModel(sdep=16.5, srcType="ep") config_prem = Config( model=model_prem, source=source_prem, npt=512, dt=5, receiver_distance=[50]) gf = calculate_gf(config_prem) for index, comnname in enumerate(["a", "b", "c"]): gf_data = obspy.read( join( dirname(__file__), f"../data/sync_prem_ep/50.grn.{comnname}"))[0] coef = np.corrcoef( gf_data.data, gf[0][index].data, )[0, 1] if np.isnan(coef): coef = 1. assert coef > 0.99 @pytest.mark.mpi_skip def test_prem_sf(self): model_data = TestFunctionTaup.gen_test_model("prem") model_prem = SeisModel(model=model_data) source_prem = SourceModel(sdep=16.5, srcType="sf") config_prem = Config( model=model_prem, source=source_prem, npt=512, dt=1, receiver_distance=[50]) gf = calculate_gf(config_prem) for index, comnname in enumerate(range(6)): gf_data = obspy.read( join( dirname(__file__), f"../data/sync_prem_sf/50.grn.{comnname}"))[0] coef = np.corrcoef( gf_data.data, gf[0][index].data, )[0, 1] if np.isnan(coef): coef = 1. assert coef > 0.99 @pytest.mark.mpi_skip def test_receiver_deeper(self): model_data = TestFunctionTaup.gen_test_model("prem") model_prem = SeisModel(model=model_data) source_prem = SourceModel(sdep=16.5, srcType="dc") config_prem = Config( model=model_prem, source=source_prem, npt=512, dt=1, receiver_distance=[50], rdep=20) gf = calculate_gf(config_prem) for index, comnname in enumerate(range(9)): gf_data = obspy.read( join( dirname(__file__), f"../data/sync_receiver_deeper/50_20.grn.{comnname}"))[0] coef = np.corrcoef( gf_data.data, gf[0][index].data, )[0, 1] if np.isnan(coef): coef = 1. assert coef > 0.99 @pytest.mark.mpi_skip def test_static_source(self): model_data = TestFunctionTaup.gen_test_model("prem") model_prem = SeisModel(model=model_data) source_prem = SourceModel(sdep=16.5, srcType="dc") config_prem = Config( model=model_prem, source=source_prem, npt=1, dt=1, receiver_distance=[50]) gf = calculate_gf(config_prem) ref_gf = [-0.242E-06, -0.103E-05, 0.000E+00, 0.236E-06, 0.118E-05, -0.548E-07, -0.942E-07, -0.156E-05, 0.285E-06] coef = np.corrcoef( gf, ref_gf, )[0, 1] assert coef > 0.99999 @pytest.mark.mpi_skip def test_smth(self): model_data = TestFunctionTaup.gen_test_model("prem") model_prem = SeisModel(model=model_data) source_prem = SourceModel(sdep=16.5, srcType="dc") config_prem = Config( model=model_prem, source=source_prem, npt=512, dt=0.1, smth=8, receiver_distance=[50]) gf = calculate_gf(config_prem) for index, comnname in enumerate(range(9)): gf_data = obspy.read( join( dirname(__file__), f"../data/sync_smth/50.grn.{comnname}"))[0] coef = np.corrcoef( gf_data.data, gf[0][index].data, )[0, 1] if np.isnan(coef): coef = 1. assert coef > 0.99 @pytest.mark.mpi_skip def test_filter(self): model_data = TestFunctionTaup.gen_test_model("prem") model_prem = SeisModel(model=model_data) source_prem = SourceModel(sdep=16.5, srcType="dc") config_prem = Config( model=model_prem, source=source_prem, npt=512, dt=0.1, smth=8, filter=(0.1, 0.6), receiver_distance=[50]) gf = calculate_gf(config_prem) for index, comnname in enumerate(range(9)): gf_data = obspy.read( join( dirname(__file__), f"../data/sync_filter/50.grn.{comnname}"))[0] coef = np.corrcoef( gf_data.data, gf[0][index].data, )[0, 1] if np.isnan(coef): coef = 1. assert coef > 0.99
34.138095
118
0.518482
860
7,169
4.109302
0.166279
0.048387
0.029428
0.038483
0.736842
0.735144
0.705433
0.681098
0.668364
0.65167
0
0.052269
0.372855
7,169
209
119
34.301435
0.733763
0.044497
0
0.704663
0
0
0.042665
0.034044
0
0
0
0
0.036269
1
0.041451
false
0
0.036269
0
0.082902
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a200d5e6b4db10ebff3bdf66b8cfd54a9b27d9e3
92
py
Python
hivs_dash/apps.py
tehamalab/hivs
db7dfa7f89174be07d42bd469fd23c8553c0eff2
[ "MIT" ]
null
null
null
hivs_dash/apps.py
tehamalab/hivs
db7dfa7f89174be07d42bd469fd23c8553c0eff2
[ "MIT" ]
null
null
null
hivs_dash/apps.py
tehamalab/hivs
db7dfa7f89174be07d42bd469fd23c8553c0eff2
[ "MIT" ]
null
null
null
from django.apps import AppConfig class HivsDashConfig(AppConfig): name = 'hivs_dash'
15.333333
33
0.76087
11
92
6.272727
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.163043
92
5
34
18.4
0.896104
0
0
0
0
0
0.097826
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
a204fc2c8b426564d03b692ab69d4b87e00275c7
1,644
py
Python
aiotdlib/api/functions/set_password.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
37
2021-05-04T10:41:41.000Z
2022-03-30T13:48:05.000Z
aiotdlib/api/functions/set_password.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
13
2021-07-17T19:54:51.000Z
2022-02-26T06:50:00.000Z
aiotdlib/api/functions/set_password.py
jraylan/aiotdlib
4528fcfca7c5c69b54a878ce6ce60e934a2dcc73
[ "MIT" ]
7
2021-09-22T21:27:11.000Z
2022-02-20T02:33:19.000Z
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # # # =============================================================================== # from __future__ import annotations from pydantic import Field from ..base_object import BaseObject class SetPassword(BaseObject): """ Changes the password for the current user. If a new recovery email address is specified, then the change will not be applied until the new recovery email address is confirmed :param old_password: Previous password of the user :type old_password: :class:`str` :param new_password: New password of the user; may be empty to remove the password :type new_password: :class:`str` :param new_hint: New password hint; may be empty :type new_hint: :class:`str` :param set_recovery_email_address: Pass true if the recovery email address must be changed :type set_recovery_email_address: :class:`bool` :param new_recovery_email_address: New recovery email address; may be empty :type new_recovery_email_address: :class:`str` """ ID: str = Field("setPassword", alias="@type") old_password: str new_password: str new_hint: str set_recovery_email_address: bool new_recovery_email_address: str @staticmethod def read(q: dict) -> SetPassword: return SetPassword.construct(**q)
37.363636
178
0.57056
180
1,644
5.033333
0.372222
0.143488
0.220751
0.152318
0.145695
0
0
0
0
0
0
0
0.274331
1,644
43
179
38.232558
0.75943
0.683698
0
0
1
0
0.037296
0
0
0
0
0
0
1
0.076923
false
0.461538
0.230769
0.076923
0.923077
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
4
bf3e294930c1e6880b8c7e71e0f01b86b2381594
185
py
Python
src/javax/swing/text/__init__.py
thecesrom/7.9
6dc59a1e920382345837d620907578b35fe7e96b
[ "MIT" ]
1
2022-03-16T05:59:14.000Z
2022-03-16T05:59:14.000Z
src/javax/swing/text/__init__.py
ignition-api/7.9
8c9666d1ed83dc1c6470c9263a70cb83eeda5f1d
[ "MIT" ]
3
2022-03-15T21:33:41.000Z
2022-03-17T21:28:56.000Z
src/javax/swing/text/__init__.py
thecesrom/7.9
6dc59a1e920382345837d620907578b35fe7e96b
[ "MIT" ]
1
2022-03-16T18:26:03.000Z
2022-03-16T18:26:03.000Z
from java.awt import Container class JTextComponent(Container): _text = "Text" def getText(self): return self._text def setText(self, t): self._text = t
15.416667
32
0.632432
23
185
4.956522
0.608696
0.122807
0
0
0
0
0
0
0
0
0
0
0.275676
185
11
33
16.818182
0.850746
0
0
0
0
0
0.021622
0
0
0
0
0
0
1
0.285714
false
0
0.142857
0.142857
0.857143
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
bf3e29ad3837a39b173650b6e7d6224361cb3ee4
213
py
Python
functions/solutions/solution0.py
sgennari/cmpt_100_tutorials
8fd10ae7545282496c3cfe65fa9c8ffa55cd863c
[ "AFL-3.0" ]
null
null
null
functions/solutions/solution0.py
sgennari/cmpt_100_tutorials
8fd10ae7545282496c3cfe65fa9c8ffa55cd863c
[ "AFL-3.0" ]
null
null
null
functions/solutions/solution0.py
sgennari/cmpt_100_tutorials
8fd10ae7545282496c3cfe65fa9c8ffa55cd863c
[ "AFL-3.0" ]
null
null
null
def number_of_cents(change): """ >>> number_of_cents(1.25) 25 >>> number_of_cents(20.00) 0 """ dollar_remainder = change % 1 cents = dollar_remainder * 100 return round(cents)
17.75
34
0.596244
28
213
4.25
0.535714
0.201681
0.327731
0
0
0
0
0
0
0
0
0.090909
0.276995
213
12
35
17.75
0.681818
0.267606
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0
0.5
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
bf5e8f8bd586b691bbc918aec84e26ef4008e11d
124
py
Python
application/models/__init__.py
bobowang/flask-base
b8c68654fa5c07fbb2ada3d25587e9b0cbacf1af
[ "MIT" ]
null
null
null
application/models/__init__.py
bobowang/flask-base
b8c68654fa5c07fbb2ada3d25587e9b0cbacf1af
[ "MIT" ]
null
null
null
application/models/__init__.py
bobowang/flask-base
b8c68654fa5c07fbb2ada3d25587e9b0cbacf1af
[ "MIT" ]
null
null
null
from .role import Role from .roles_users import RolesUsers from .user import User __all__ = ["Role", "User", "RolesUsers"]
20.666667
40
0.741935
17
124
5.117647
0.470588
0
0
0
0
0
0
0
0
0
0
0
0.145161
124
5
41
24.8
0.820755
0
0
0
0
0
0.145161
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
bf820d42877ed6c115e61891426000f58c489e57
110
py
Python
modis/discord_modis/modules/!core/on_server_available.py
Benny84/discord-music-bot-modis
f98b15119d6e14475fa662a98158f4adfa2f49c0
[ "Apache-2.0" ]
null
null
null
modis/discord_modis/modules/!core/on_server_available.py
Benny84/discord-music-bot-modis
f98b15119d6e14475fa662a98158f4adfa2f49c0
[ "Apache-2.0" ]
null
null
null
modis/discord_modis/modules/!core/on_server_available.py
Benny84/discord-music-bot-modis
f98b15119d6e14475fa662a98158f4adfa2f49c0
[ "Apache-2.0" ]
null
null
null
from . import api_core async def on_server_available(server): await api_core.update_server_data(server)
18.333333
45
0.8
17
110
4.823529
0.705882
0.170732
0
0
0
0
0
0
0
0
0
0
0.136364
110
5
46
22
0.863158
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
bfb74d6eb04880f7142dc1097332aabe3a2e87bb
72
py
Python
main.py
kagaya25/How-to-findout-the-latitude-and-longitude-using-python
e016925104901734d72e15bd78ea94c254588571
[ "MIT" ]
2
2020-11-01T08:39:33.000Z
2020-11-01T08:44:05.000Z
main.py
kagaya25/How-to-findout-the-latitude-and-longitude-using-python
e016925104901734d72e15bd78ea94c254588571
[ "MIT" ]
null
null
null
main.py
kagaya25/How-to-findout-the-latitude-and-longitude-using-python
e016925104901734d72e15bd78ea94c254588571
[ "MIT" ]
null
null
null
import geocoder g = geocoder.ip('me') print(g.latlng) print(g.city)
9
21
0.680556
12
72
4.083333
0.666667
0.244898
0
0
0
0
0
0
0
0
0
0
0.152778
72
7
22
10.285714
0.803279
0
0
0
0
0
0.028986
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.5
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
bfbb2ad52164b0df438c3dadcc62183c3950a942
1,464
py
Python
vkapi/fave.py
effordsbeard/vk-sdk
719ef5a1ffa2a0c067dbea5014f40da54f86646b
[ "MIT" ]
null
null
null
vkapi/fave.py
effordsbeard/vk-sdk
719ef5a1ffa2a0c067dbea5014f40da54f86646b
[ "MIT" ]
null
null
null
vkapi/fave.py
effordsbeard/vk-sdk
719ef5a1ffa2a0c067dbea5014f40da54f86646b
[ "MIT" ]
null
null
null
from vk import VKAPI class Fave(VKAPI): method_class = 'fave' def __init__(self, access_token=''): super(Fave, self).__init__(access_token=access_token) def add_group(self, **params): self.set_method('addGroup') return self.send(params) def add_link(self, **params): self.set_method('addLink') return self.send(params) def add_user(self, **params): self.set_method('addUser') return self.send(params) def get_links(self, **params): self.set_method('getLinks') return self.send(params) def get_market_items(self, **params): self.set_method('getMarketItems') return self.send(params) def get_photos(self, **params): self.set_method('getPhotos') return self.send(params) def get_posts(self, **params): self.set_method('getPosts') return self.send(params) def get_users(self, **params): self.set_method('getUsers') return self.send(params) def get_videos(self, **params): self.set_method('getVideos') return self.send(params) def remove_group(self, **params): self.set_method('removeGroup') return self.send(params) def remove_link(self, **params): self.set_method('removeLink') return self.send(params) def remove_user(self, **params): self.set_method('removeUser') return self.send(params)
25.241379
61
0.624317
180
1,464
4.872222
0.233333
0.13683
0.191562
0.232611
0.68073
0.523375
0
0
0
0
0
0
0.247268
1,464
57
62
25.684211
0.795826
0
0
0.292683
0
0
0.077239
0
0
0
0
0
0
1
0.317073
false
0
0.02439
0
0.682927
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
44aa79d03d5af5854bfb65e9d9fd6925929b2b32
31
py
Python
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Spheroidal Wave Functions/pro_rad1_cv Prolate spheroidal radial function pro_rad1 for precomputed characteristic value.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Spheroidal Wave Functions/pro_rad1_cv Prolate spheroidal radial function pro_rad1 for precomputed characteristic value.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Special functions/Spheroidal Wave Functions/pro_rad1_cv Prolate spheroidal radial function pro_rad1 for precomputed characteristic value.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
special.pro_rad1_cv(m,n,c,cv,x)
31
31
0.774194
9
31
2.444444
0.888889
0
0
0
0
0
0
0
0
0
0
0.032258
0
31
1
31
31
0.677419
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
44b387699114bbf044782ae1fcaeba36444444e3
348
py
Python
LandPortalEntities/lpentities/time.py
weso/landportal-importers
6edfa3c301422bbe8c09cb877b1cbddbcd902463
[ "Unlicense" ]
null
null
null
LandPortalEntities/lpentities/time.py
weso/landportal-importers
6edfa3c301422bbe8c09cb877b1cbddbcd902463
[ "Unlicense" ]
8
2016-02-16T13:05:37.000Z
2017-01-04T14:38:03.000Z
LandPortalEntities/lpentities/time.py
landportal/landbook-importers
f0e246f493329b9c5741c50f3a0495d27ee5c54b
[ "MIT" ]
null
null
null
''' Created on 02/02/2014 @author: Miguel Otero ''' from .dimension import Dimension from abc import ABCMeta, abstractmethod class Time(Dimension): ''' classdocs ''' __metaclass__ = ABCMeta @abstractmethod def get_time_string(self): pass def get_dimension_string(self): return self.get_time_string()
17.4
39
0.675287
40
348
5.625
0.575
0.186667
0.115556
0
0
0
0
0
0
0
0
0.029963
0.232759
348
20
40
17.4
0.812734
0.155172
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.125
0.25
0.125
0.875
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
44b42f4530c2895ae1e521d3970450fcc13a1478
149
py
Python
Exercicios/ex047.py
vincytarsis/Python
f98005917486bc191c85c971ec8e2c71fb9dd4c7
[ "MIT" ]
null
null
null
Exercicios/ex047.py
vincytarsis/Python
f98005917486bc191c85c971ec8e2c71fb9dd4c7
[ "MIT" ]
null
null
null
Exercicios/ex047.py
vincytarsis/Python
f98005917486bc191c85c971ec8e2c71fb9dd4c7
[ "MIT" ]
null
null
null
""" Crie um programa que mostre na tela todos os números pares que estão no intervalo entre 1 a 50.""" for num in range(2, 50+1, 2): print(num)
29.8
91
0.684564
29
149
3.517241
0.827586
0
0
0
0
0
0
0
0
0
0
0.068376
0.214765
149
5
92
29.8
0.803419
0.637584
0
0
0
0
0
0
0
0
0
0.2
0
1
0
false
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
1
0
4
44baea2a21ece9295433eb2d4e9a91e62649aa7a
221
py
Python
src/words/helper/TokenTypeEnum.py
DavidStrootman/ATP
72005be0ac75339bb5da037a7e98573e338d16db
[ "MIT" ]
2
2021-08-20T17:56:15.000Z
2021-08-21T01:04:08.000Z
src/words/helper/TokenTypeEnum.py
DavidStrootman/Words
72005be0ac75339bb5da037a7e98573e338d16db
[ "MIT" ]
null
null
null
src/words/helper/TokenTypeEnum.py
DavidStrootman/Words
72005be0ac75339bb5da037a7e98573e338d16db
[ "MIT" ]
null
null
null
from enum import Enum, unique from typing import Tuple @unique class TokenTypeEnum(Enum): @classmethod def values(cls) -> Tuple[any, ...]: return tuple(value.value for value in cls.__members__.values())
22.1
71
0.701357
29
221
5.206897
0.62069
0
0
0
0
0
0
0
0
0
0
0
0.190045
221
9
72
24.555556
0.843575
0
0
0
0
0
0
0
0
0
0
0
0
1
0.142857
false
0
0.285714
0.142857
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
1
0
0
4
44c24c14c78509c2ff8353d66f264aed0f758d37
65
py
Python
bin/test.py
UdSAES/modest-py
5df9d27a4d0aac302af04a1edc0c9adaa03bf731
[ "BSD-2-Clause" ]
null
null
null
bin/test.py
UdSAES/modest-py
5df9d27a4d0aac302af04a1edc0c9adaa03bf731
[ "BSD-2-Clause" ]
null
null
null
bin/test.py
UdSAES/modest-py
5df9d27a4d0aac302af04a1edc0c9adaa03bf731
[ "BSD-2-Clause" ]
1
2020-04-16T09:49:38.000Z
2020-04-16T09:49:38.000Z
#!/usr/bin/env python from modestpy.test import run run.tests()
13
29
0.738462
11
65
4.363636
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.123077
65
4
30
16.25
0.842105
0.307692
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
44db910eea7c9346efe3057c47aaed3fe8488b3e
117
py
Python
materials/config.example.py
hicsail/materials
eb1770787193141cbc9a9e89f6be33ed7de05828
[ "MIT" ]
1
2015-12-04T19:53:55.000Z
2015-12-04T19:53:55.000Z
materials/config.example.py
hicsail/materials
eb1770787193141cbc9a9e89f6be33ed7de05828
[ "MIT" ]
null
null
null
materials/config.example.py
hicsail/materials
eb1770787193141cbc9a9e89f6be33ed7de05828
[ "MIT" ]
null
null
null
config = { 'sqlalchemy.url': 'postgresql://scott:tiger@localhost:5432/mydatabase', 'sqlalchemy.echo': True }
23.4
75
0.683761
12
117
6.666667
0.916667
0
0
0
0
0
0
0
0
0
0
0.039604
0.136752
117
4
76
29.25
0.752475
0
0
0
0
0
0.675214
0.42735
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
1
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
44eaa357f22d7fdd22b04a617641e0bae0de5b4e
3,135
py
Python
tests/kerascv/layers/losses/hard_neg_miner_test.py
tanzhenyu/keras-cv
b7208ee25735c492ccc171874e34076111dcf637
[ "Apache-2.0" ]
null
null
null
tests/kerascv/layers/losses/hard_neg_miner_test.py
tanzhenyu/keras-cv
b7208ee25735c492ccc171874e34076111dcf637
[ "Apache-2.0" ]
null
null
null
tests/kerascv/layers/losses/hard_neg_miner_test.py
tanzhenyu/keras-cv
b7208ee25735c492ccc171874e34076111dcf637
[ "Apache-2.0" ]
null
null
null
import numpy as np import tensorflow as tf from kerascv.layers.losses.hard_neg_miner import HardNegativeMining def test_more_negative_than_positive(): classification_losses = tf.constant([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]]) positive_mask = tf.constant([[0, 0, 0], [0, 0, 1]]) negative_mask = tf.constant([[1, 1, 1], [1, 1, 0]]) hard_miner_layer = HardNegativeMining() losses = hard_miner_layer(classification_losses, positive_mask, negative_mask) # n_positives is 1, while n_negatives is 5, so picking the top 3, which is .3, .4, .5 expected_out = np.asarray([0.3, 1.5]).astype(np.float32) np.testing.assert_allclose(expected_out, losses) def test_less_negative_than_positive(): classification_losses = tf.constant([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]]) positive_mask = tf.constant([[0, 1, 0], [0, 0, 1]]) negative_mask = tf.constant([[0, 0, 1], [1, 0, 0]]) hard_miner_layer = HardNegativeMining() losses = hard_miner_layer(classification_losses, positive_mask, negative_mask) # n_positives is 2, while n_negatives is 2, so pick all negative samples expected_out = np.asarray([0.5, 1.0]) np.testing.assert_allclose(expected_out, losses) def test_zero_negative_values(): classification_losses = tf.constant([[0.0, 0.0, 0.3], [0.0, 0.5, 0.6]]) positive_mask = tf.constant([[0, 0, 0], [0, 0, 1]]) negative_mask = tf.constant([[1, 1, 1], [1, 1, 0]]) hard_miner_layer = HardNegativeMining() losses = hard_miner_layer(classification_losses, positive_mask, negative_mask) # n_positives is 1, while n_negatives is 5, but only 2 of them are non-zero, # so picking the 2, which is .3, .5 expected_out = np.asarray([0.3, 1.1]).astype(np.float32) np.testing.assert_allclose(expected_out, losses) def test_no_negatives(): classification_losses = tf.constant([[0.0, 0.0, 0.3], [0.0, 0.5, 0.6]]) positive_mask = tf.constant([[0, 0, 0], [0, 0, 1]]) negative_mask = tf.constant([[0, 0, 0], [0, 0, 0]]) hard_miner_layer = HardNegativeMining() losses = hard_miner_layer(classification_losses, positive_mask, negative_mask) # n_positives is 1, while n_negatives is 0 expected_out = np.asarray([0.0, 0.6]).astype(np.float32) np.testing.assert_allclose(expected_out, losses) def test_min_negative_examples(): classification_losses = tf.constant([[0.1, 0.2, 0.3], [0.4, 0.5, 0.6]]) positive_mask = tf.constant([[0, 0, 0], [0, 0, 1]]) negative_mask = tf.constant([[1, 1, 1], [1, 1, 0]]) hard_miner_layer = HardNegativeMining( negative_positive_ratio=2, minimum_negative_examples=4 ) losses = hard_miner_layer(classification_losses, positive_mask, negative_mask) # n_positives is 1, while n_negatives is 5, need at least 4 negative examples, 2., 3., 4., 5 expected_out = np.asarray([0.5, 1.5]) np.testing.assert_allclose(expected_out, losses) def test_config_with_custom_name(): layer = HardNegativeMining(name="hard_example_miner") config = layer.get_config() layer_1 = HardNegativeMining.from_config(config) np.testing.assert_equal(layer_1.name, layer.name)
45.434783
96
0.690909
502
3,135
4.099602
0.151394
0.037901
0.037901
0.029155
0.749757
0.739067
0.739067
0.726919
0.68999
0.644315
0
0.06598
0.163636
3,135
68
97
46.102941
0.718917
0.125997
0
0.52
0
0
0.006586
0
0
0
0
0
0.12
1
0.12
false
0
0.06
0
0.18
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
44fc0ec3b6d8604f81024e321849bf481bedfd41
825
py
Python
ch_4/binomial_problems.py
ProhardONE/python_primer
211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0
[ "MIT" ]
51
2016-04-05T16:56:11.000Z
2022-02-08T00:08:47.000Z
ch_4/binomial_problems.py
zhangxiao921207/python_primer
211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0
[ "MIT" ]
null
null
null
ch_4/binomial_problems.py
zhangxiao921207/python_primer
211e37c1f2fd169269fc4f3c08e8b7e5225f2ad0
[ "MIT" ]
47
2016-05-02T07:51:37.000Z
2022-02-08T01:28:15.000Z
# Exercise 4.25 # Author: Noah Waterfield Price from binomial_distribution import binomial print 'What is the probability of gettinger two heads when \ flipping a coin 5 times?' print '%.6f\n' % binomial(2, 5, 0.5) print 'What is the probability of getting fours ones in a rown when \ throwing a die?' print '%.6f\n' % binomial(4, 4, 1. / 6) print 'What is the probability that a skier will experience a ski \ break during five\n competitions in a world championship?' print '%.6f' % (1 - binomial(0, 5, 1. / 120)) """ What is the probability of gettinger two heads when flipping a coin 5 times? 0.312500 What is the probability of getting fours ones in a rown when throwing a die? 0.000772 What is the probability that a skier will experience a ski break during five competitions in a world championship? 0.040978 """
30.555556
76
0.739394
142
825
4.288732
0.380282
0.059113
0.08867
0.197044
0.740558
0.627258
0.610837
0.610837
0.610837
0.610837
0
0.065089
0.180606
825
26
77
31.730769
0.835799
0.052121
0
0
0
0
0.033827
0
0
0
0
0
0
0
null
null
0
0.1
null
null
0.6
0
0
0
null
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
4
781746b3ae609835c752646af4bd766e4f564c5b
231
py
Python
projetoWeb/utils/views.py
marcosv2017/feitonaaula
e97fc122cdac5c172d16e794d3c977f50aaa54e9
[ "MIT" ]
null
null
null
projetoWeb/utils/views.py
marcosv2017/feitonaaula
e97fc122cdac5c172d16e794d3c977f50aaa54e9
[ "MIT" ]
null
null
null
projetoWeb/utils/views.py
marcosv2017/feitonaaula
e97fc122cdac5c172d16e794d3c977f50aaa54e9
[ "MIT" ]
null
null
null
from django.shortcuts import render from utils.utils import calculaMediaFinal from django.http import HttpResponse def media(resquest): media = calculaMediaFinal(10,8) return HttpResponse(media) # Create your views here.
23.1
41
0.792208
29
231
6.310345
0.655172
0.10929
0
0
0
0
0
0
0
0
0
0.015228
0.147186
231
9
42
25.666667
0.913706
0.099567
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.5
0
0.833333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7830713d774cc9f6c51f331162d871058d89c02d
94
py
Python
django_project/apps/ueditor/apps.py
gaohj/nzflask_bbs
36a94c380b78241ed5d1e07edab9618c3e8d477b
[ "Apache-2.0" ]
24
2017-07-30T14:57:01.000Z
2021-05-24T06:09:14.000Z
apps/ueditor/apps.py
blackholll/loonblog
63d1f06d04047f220f550de914e542f535bb61a3
[ "MIT" ]
27
2020-02-12T07:55:58.000Z
2022-03-12T00:19:09.000Z
apps/ueditor/apps.py
blackholll/loonblog
63d1f06d04047f220f550de914e542f535bb61a3
[ "MIT" ]
16
2017-08-07T15:46:51.000Z
2022-01-06T06:46:24.000Z
from django.apps import AppConfig class UeditorConfig(AppConfig): name = 'apps.ueditor'
15.666667
33
0.755319
11
94
6.454545
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.159574
94
5
34
18.8
0.898734
0
0
0
0
0
0.12766
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
783c52132fc5df65a6f205a82e69a870319ee650
108
py
Python
python/testData/paramInfo/RedefinedNewConstructorCall.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/paramInfo/RedefinedNewConstructorCall.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/paramInfo/RedefinedNewConstructorCall.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
# signature of overridden __new__ class A(object): def __new__(cls, a, b): pass A(<arg1>1, <arg2>2)
13.5
33
0.648148
18
108
3.444444
0.833333
0
0
0
0
0
0
0
0
0
0
0.046512
0.203704
108
7
34
15.428571
0.674419
0.287037
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0.25
0
null
null
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
1
0
0
1
0
0
0
0
0
4
785b2c56c1427f5870d22550dba6cc44be21cc0d
83
py
Python
bdo_dsm2_app/wiin/apps.py
zackaryleady/DSM2_BDO_WIIN_Stand_Alone
26a0e3084889e3da0c3f85a9e93e7032a5871106
[ "MIT" ]
1
2020-01-17T17:21:28.000Z
2020-01-17T17:21:28.000Z
bdo_dsm2_app/wiin/apps.py
zackaryleady/DSM2_BDO_WIIN_Stand_Alone
26a0e3084889e3da0c3f85a9e93e7032a5871106
[ "MIT" ]
null
null
null
bdo_dsm2_app/wiin/apps.py
zackaryleady/DSM2_BDO_WIIN_Stand_Alone
26a0e3084889e3da0c3f85a9e93e7032a5871106
[ "MIT" ]
null
null
null
from django.apps import AppConfig class WiinConfig(AppConfig): name = 'wiin'
13.833333
33
0.73494
10
83
6.1
0.9
0
0
0
0
0
0
0
0
0
0
0
0.180723
83
5
34
16.6
0.897059
0
0
0
0
0
0.048193
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
789ab3342756e877c8f06cd772f70f382b05d0fb
13,912
py
Python
analysis/Graham/scripts/project_functions.py
data301-2020-winter1/course-project-group_6008
ce3b5ccc48afe6775d831da49defcd0e4fd78c07
[ "MIT" ]
null
null
null
analysis/Graham/scripts/project_functions.py
data301-2020-winter1/course-project-group_6008
ce3b5ccc48afe6775d831da49defcd0e4fd78c07
[ "MIT" ]
1
2020-12-06T00:15:53.000Z
2020-12-06T00:15:53.000Z
analysis/Graham/scripts/project_functions.py
data301-2020-winter1/course-project-group_6008
ce3b5ccc48afe6775d831da49defcd0e4fd78c07
[ "MIT" ]
null
null
null
{ "cells": [ { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "<div>\n", "<style scoped>\n", " .dataframe tbody tr th:only-of-type {\n", " vertical-align: middle;\n", " }\n", "\n", " .dataframe tbody tr th {\n", " vertical-align: top;\n", " }\n", "\n", " .dataframe thead th {\n", " text-align: right;\n", " }\n", "</style>\n", "<table border=\"1\" class=\"dataframe\">\n", " <thead>\n", " <tr style=\"text-align: right;\">\n", " <th></th>\n", " <th>Name</th>\n", " <th>Games Played</th>\n", " <th>MIN</th>\n", " <th>PTS</th>\n", " <th>FGM</th>\n", " <th>FGA</th>\n", " <th>FG%</th>\n", " <th>3PM</th>\n", " <th>3PA</th>\n", " <th>3P%</th>\n", " <th>...</th>\n", " <th>BLK</th>\n", " <th>TOV</th>\n", " <th>PF</th>\n", " <th>EFF</th>\n", " <th>AST/TOV</th>\n", " <th>STL/TOV</th>\n", " <th>Collage</th>\n", " <th>Experience</th>\n", " <th>Height</th>\n", " <th>Pos</th>\n", " </tr>\n", " </thead>\n", " <tbody>\n", " <tr>\n", " <th>426</th>\n", " <td>Shawne Williams</td>\n", " <td>63</td>\n", " <td>1087</td>\n", " <td>341</td>\n", " <td>121</td>\n", " <td>300</td>\n", " <td>40.3</td>\n", " <td>64</td>\n", " <td>178</td>\n", " <td>36.0</td>\n", " <td>...</td>\n", " <td>21</td>\n", " <td>30</td>\n", " <td>135</td>\n", " <td>383</td>\n", " <td>1.47</td>\n", " <td>0.83</td>\n", " <td>Western Michigan University</td>\n", " <td>0</td>\n", " <td>207.5</td>\n", " <td>PF</td>\n", " </tr>\n", " <tr>\n", " <th>414</th>\n", " <td>Sean Kilpatrick</td>\n", " <td>4</td>\n", " <td>72</td>\n", " <td>22</td>\n", " <td>7</td>\n", " <td>20</td>\n", " <td>35.0</td>\n", " <td>4</td>\n", " <td>13</td>\n", " <td>30.8</td>\n", " <td>...</td>\n", " <td>0</td>\n", " <td>2</td>\n", " <td>3</td>\n", " <td>20</td>\n", " <td>2.00</td>\n", " <td>1.50</td>\n", " <td>University of Cincinnati</td>\n", " <td>0</td>\n", " <td>190.0</td>\n", " <td>SG</td>\n", " </tr>\n", " <tr>\n", " <th>199</th>\n", " <td>JaMychal Green</td>\n", " <td>24</td>\n", " <td>164</td>\n", " <td>62</td>\n", " <td>27</td>\n", " <td>47</td>\n", " <td>57.4</td>\n", " <td>0</td>\n", " <td>6</td>\n", " <td>0.0</td>\n", " <td>...</td>\n", " <td>5</td>\n", " <td>14</td>\n", " <td>25</td>\n", " <td>85</td>\n", " <td>0.29</td>\n", " <td>0.36</td>\n", " <td>University of Alabama</td>\n", " <td>0</td>\n", " <td>202.5</td>\n", " <td>PF</td>\n", " </tr>\n", " <tr>\n", " <th>197</th>\n", " <td>James Michael McAdoo</td>\n", " <td>15</td>\n", " <td>137</td>\n", " <td>62</td>\n", " <td>24</td>\n", " <td>44</td>\n", " <td>54.5</td>\n", " <td>0</td>\n", " <td>0</td>\n", " <td>0.0</td>\n", " <td>...</td>\n", " <td>9</td>\n", " <td>6</td>\n", " <td>21</td>\n", " <td>78</td>\n", " <td>0.33</td>\n", " <td>0.83</td>\n", " <td>University of North Carolina</td>\n", " <td>0</td>\n", " <td>202.5</td>\n", " <td>PF</td>\n", " </tr>\n", " <tr>\n", " <th>193</th>\n", " <td>James Ennis III</td>\n", " <td>62</td>\n", " <td>1051</td>\n", " <td>312</td>\n", " <td>101</td>\n", " <td>247</td>\n", " <td>40.9</td>\n", " <td>31</td>\n", " <td>95</td>\n", " <td>32.6</td>\n", " <td>...</td>\n", " <td>17</td>\n", " <td>39</td>\n", " <td>89</td>\n", " <td>378</td>\n", " <td>1.23</td>\n", " <td>0.64</td>\n", " <td>California State University, Long Beach</td>\n", " <td>0</td>\n", " <td>197.5</td>\n", " <td>SF</td>\n", " </tr>\n", " <tr>\n", " <th>...</th>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " <td>...</td>\n", " </tr>\n", " <tr>\n", " <th>389</th>\n", " <td>Raymond Felton</td>\n", " <td>29</td>\n", " <td>281</td>\n", " <td>108</td>\n", " <td>43</td>\n", " <td>106</td>\n", " <td>40.6</td>\n", " <td>10</td>\n", " <td>34</td>\n", " <td>29.4</td>\n", " <td>...</td>\n", " <td>4</td>\n", " <td>18</td>\n", " <td>17</td>\n", " <td>106</td>\n", " <td>2.28</td>\n", " <td>0.61</td>\n", " <td>University of North Carolina</td>\n", " <td>9</td>\n", " <td>182.5</td>\n", " <td>PG</td>\n", " </tr>\n", " <tr>\n", " <th>325</th>\n", " <td>Marvin Williams</td>\n", " <td>78</td>\n", " <td>2035</td>\n", " <td>577</td>\n", " <td>210</td>\n", " <td>495</td>\n", " <td>42.4</td>\n", " <td>95</td>\n", " <td>265</td>\n", " <td>35.8</td>\n", " <td>...</td>\n", " <td>36</td>\n", " <td>60</td>\n", " <td>146</td>\n", " <td>798</td>\n", " <td>1.67</td>\n", " <td>1.15</td>\n", " <td>University of North Carolina</td>\n", " <td>9</td>\n", " <td>202.5</td>\n", " <td>PF</td>\n", " </tr>\n", " <tr>\n", " <th>205</th>\n", " <td>Jarrett Jack</td>\n", " <td>80</td>\n", " <td>2241</td>\n", " <td>957</td>\n", " <td>359</td>\n", " <td>817</td>\n", " <td>43.9</td>\n", " <td>39</td>\n", " <td>146</td>\n", " <td>26.7</td>\n", " <td>...</td>\n", " <td>13</td>\n", " <td>191</td>\n", " <td>143</td>\n", " <td>987</td>\n", " <td>1.95</td>\n", " <td>0.39</td>\n", " <td>Georgia Institute of Technology</td>\n", " <td>9</td>\n", " <td>187.5</td>\n", " <td>PG</td>\n", " </tr>\n", " <tr>\n", " <th>206</th>\n", " <td>Jason Maxiell</td>\n", " <td>61</td>\n", " <td>878</td>\n", " <td>203</td>\n", " <td>81</td>\n", " <td>192</td>\n", " <td>42.2</td>\n", " <td>0</td>\n", " <td>0</td>\n", " <td>0.0</td>\n", " <td>...</td>\n", " <td>44</td>\n", " <td>29</td>\n", " <td>96</td>\n", " <td>317</td>\n", " <td>0.66</td>\n", " <td>0.62</td>\n", " <td>University of Cincinnati</td>\n", " <td>9</td>\n", " <td>197.5</td>\n", " <td>PF</td>\n", " </tr>\n", " <tr>\n", " <th>49</th>\n", " <td>Brandon Bass</td>\n", " <td>82</td>\n", " <td>1929</td>\n", " <td>866</td>\n", " <td>344</td>\n", " <td>683</td>\n", " <td>50.4</td>\n", " <td>9</td>\n", " <td>32</td>\n", " <td>28.1</td>\n", " <td>...</td>\n", " <td>32</td>\n", " <td>83</td>\n", " <td>140</td>\n", " <td>974</td>\n", " <td>1.25</td>\n", " <td>0.49</td>\n", " <td>Louisiana State University</td>\n", " <td>9</td>\n", " <td>200.0</td>\n", " <td>PF</td>\n", " </tr>\n", " </tbody>\n", "</table>\n", "<p>350 rows × 28 columns</p>\n", "</div>" ], "text/plain": [ " Name Games Played MIN PTS FGM FGA FG% 3PM 3PA \\\n", "426 Shawne Williams 63 1087 341 121 300 40.3 64 178 \n", "414 Sean Kilpatrick 4 72 22 7 20 35.0 4 13 \n", "199 JaMychal Green 24 164 62 27 47 57.4 0 6 \n", "197 James Michael McAdoo 15 137 62 24 44 54.5 0 0 \n", "193 James Ennis III 62 1051 312 101 247 40.9 31 95 \n", ".. ... ... ... ... ... ... ... ... ... \n", "389 Raymond Felton 29 281 108 43 106 40.6 10 34 \n", "325 Marvin Williams 78 2035 577 210 495 42.4 95 265 \n", "205 Jarrett Jack 80 2241 957 359 817 43.9 39 146 \n", "206 Jason Maxiell 61 878 203 81 192 42.2 0 0 \n", "49 Brandon Bass 82 1929 866 344 683 50.4 9 32 \n", "\n", " 3P% ... BLK TOV PF EFF AST/TOV STL/TOV \\\n", "426 36.0 ... 21 30 135 383 1.47 0.83 \n", "414 30.8 ... 0 2 3 20 2.00 1.50 \n", "199 0.0 ... 5 14 25 85 0.29 0.36 \n", "197 0.0 ... 9 6 21 78 0.33 0.83 \n", "193 32.6 ... 17 39 89 378 1.23 0.64 \n", ".. ... ... ... ... ... ... ... ... \n", "389 29.4 ... 4 18 17 106 2.28 0.61 \n", "325 35.8 ... 36 60 146 798 1.67 1.15 \n", "205 26.7 ... 13 191 143 987 1.95 0.39 \n", "206 0.0 ... 44 29 96 317 0.66 0.62 \n", "49 28.1 ... 32 83 140 974 1.25 0.49 \n", "\n", " Collage Experience Height Pos \n", "426 Western Michigan University 0 207.5 PF \n", "414 University of Cincinnati 0 190.0 SG \n", "199 University of Alabama 0 202.5 PF \n", "197 University of North Carolina 0 202.5 PF \n", "193 California State University, Long Beach 0 197.5 SF \n", ".. ... ... ... ... \n", "389 University of North Carolina 9 182.5 PG \n", "325 University of North Carolina 9 202.5 PF \n", "205 Georgia Institute of Technology 9 187.5 PG \n", "206 University of Cincinnati 9 197.5 PF \n", "49 Louisiana State University 9 200.0 PF \n", "\n", "[350 rows x 28 columns]" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "def load_and_process(url_or_path_to_csv_file):\n", "\n", " df = (pd.read_csv(url_or_path_to_csv_file)\n", " .drop(columns = ['BMI','Weight','Team','Birth_Place','Birthdate','Age'])\n", " .dropna()\n", " .replace('R', '0')\n", " .sort_values('Experience', ascending = True)\n", " )\n", " return df\n", "load_and_process('../../../data/raw/players_stats.csv')" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.3" } }, "nbformat": 4, "nbformat_minor": 4 }
34.181818
92
0.303695
1,743
13,912
2.407344
0.156627
0.165157
0.262154
0.044328
0.31387
0.264538
0.259771
0.137512
0.124166
0.108913
0
0.128245
0.449037
13,912
406
93
34.26601
0.419048
0
0
0.362069
0
0
0.687177
0.017467
0
0
0
0
0
1
0
true
0
0.002463
0
0.002463
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
789b36f0e861ab67c4973ba8789d4a1de4dc2bbc
19,124
py
Python
tests/unit/result/test_result_command.py
broadinstitute/carrot_cli
c3a580753e76e2f7fa3c0423fe7073754cc1ba8b
[ "BSD-3-Clause" ]
null
null
null
tests/unit/result/test_result_command.py
broadinstitute/carrot_cli
c3a580753e76e2f7fa3c0423fe7073754cc1ba8b
[ "BSD-3-Clause" ]
18
2021-06-04T19:44:52.000Z
2022-02-23T19:34:47.000Z
tests/unit/result/test_result_command.py
broadinstitute/carrot_cli
c3a580753e76e2f7fa3c0423fe7073754cc1ba8b
[ "BSD-3-Clause" ]
null
null
null
import json from click.testing import CliRunner import logging import mockito import pytest from carrot_cli.__main__ import main_entry as carrot from carrot_cli.config import manager as config from carrot_cli.rest import results, template_results @pytest.fixture(autouse=True) def unstub(): yield mockito.unstub() @pytest.fixture(autouse=True) def no_email(): mockito.when(config).load_var_no_error("email").thenReturn(None) @pytest.fixture( params=[ { "args": ["result", "find_by_id", "cd987859-06fe-4b1a-9e96-47d4f36bf819"], "return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "file", "description": "This result will save Etheria", "name": "Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), }, { "args": ["result", "find_by_id", "cd987859-06fe-4b1a-9e96-47d4f36bf819"], "return": json.dumps( { "title": "No result found", "status": 404, "detail": "No result found with the specified ID", }, indent=4, sort_keys=True, ), }, ] ) def find_by_id_data(request): # Set all requests to return None so only the one we expect will return a value mockito.when(results).find_by_id(...).thenReturn(None) # Mock up request response mockito.when(results).find_by_id(request.param["args"][2]).thenReturn( request.param["return"] ) return request.param def test_find_by_id(find_by_id_data): runner = CliRunner() result = runner.invoke(carrot, find_by_id_data["args"]) assert result.output == find_by_id_data["return"] + "\n" @pytest.fixture( params=[ { "args": [ "result", "find", "--result_id", "cd987859-06fe-4b1a-9e96-47d4f36bf819", "--name", "Sword of Protection result", "--description", "This result will save Etheria", "--result_type", "numeric", "--created_by", "adora@example.com", "--created_before", "2020-10-00T00:00:00.000000", "--created_after", "2020-09-00T00:00:00.000000", "--sort", "asc(name)", "--limit", 1, "--offset", 0, ], "params": [ "cd987859-06fe-4b1a-9e96-47d4f36bf819", "Sword of Protection result", "This result will save Etheria", "numeric", "adora@example.com", "2020-10-00T00:00:00.000000", "2020-09-00T00:00:00.000000", "asc(name)", 1, 0, ], "return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "numeric", "description": "This result will save Etheria", "name": "Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), }, { "args": [ "result", "find", "--result_id", "986325ba-06fe-4b1a-9e96-47d4f36bf819", ], "params": [ "986325ba-06fe-4b1a-9e96-47d4f36bf819", "", "", "", "", "", "", "", 20, 0, ], "return": json.dumps( { "title": "No results found", "status": 404, "detail": "No results found with the specified parameters", }, indent=4, sort_keys=True, ), }, ] ) def find_data(request): # Set all requests to return None so only the one we expect will return a value mockito.when(results).find(...).thenReturn(None) # Mock up request response mockito.when(results).find( request.param["params"][0], request.param["params"][1], request.param["params"][2], request.param["params"][3], request.param["params"][4], request.param["params"][5], request.param["params"][6], request.param["params"][7], request.param["params"][8], request.param["params"][9], ).thenReturn(request.param["return"]) return request.param def test_find(find_data): runner = CliRunner() result = runner.invoke(carrot, find_data["args"]) assert result.output == find_data["return"] + "\n" @pytest.fixture( params=[ { "args": [ "result", "create", "--name", "Sword of Protection result", "--description", "This result will save Etheria", "--result_type", "numeric", "--created_by", "adora@example.com", ], "params": [ "Sword of Protection result", "This result will save Etheria", "numeric", "adora@example.com", ], "return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "numeric", "description": "This result will save Etheria", "name": "Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), }, { "args": [ "result", "create", "--name", "Sword of Protection result", "--description", "This result will save Etheria", "--result_type", "numeric", ], "params": [], "logging": "No email config variable set. If a value is not specified for --created by, " "there must be a value set for email.", }, { "args": ["result", "create"], "params": [], "return": "Usage: carrot_cli result create [OPTIONS]\n" "Try 'carrot_cli result create --help' for help.\n" "\n" "Error: Missing option '--name'.", }, ] ) def create_data(request): # Set all requests to return None so only the one we expect will return a value mockito.when(results).create(...).thenReturn(None) # Mock up request response only if we expect it to get that far if len(request.param["params"]) > 0: mockito.when(results).create( request.param["params"][0], request.param["params"][1], request.param["params"][2], request.param["params"][3], ).thenReturn(request.param["return"]) return request.param def test_create(create_data, caplog): runner = CliRunner() result = runner.invoke(carrot, create_data["args"]) if "logging" in create_data: assert create_data["logging"] in caplog.text else: assert result.output == create_data["return"] + "\n" @pytest.fixture( params=[ { "args": [ "result", "update", "cd987859-06fe-4b1a-9e96-47d4f36bf819", "--description", "This new result replaced the broken one", "--name", "New Sword of Protection result", ], "params": [ "cd987859-06fe-4b1a-9e96-47d4f36bf819", "New Sword of Protection result", "This new result replaced the broken one", ], "return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "file", "description": "This new result replaced the broken one", "name": "New Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), }, { "args": ["result", "update"], "params": [], "return": "Usage: carrot_cli result update [OPTIONS] ID\n" "Try 'carrot_cli result update --help' for help.\n" "\n" "Error: Missing argument 'ID'.", }, ] ) def update_data(request): # Set all requests to return None so only the one we expect will return a value mockito.when(results).update(...).thenReturn(None) # Mock up request response only if we expect it to get that far if len(request.param["params"]) > 0: mockito.when(results).update( request.param["params"][0], request.param["params"][1], request.param["params"][2], ).thenReturn(request.param["return"]) return request.param def test_update(update_data): runner = CliRunner() result = runner.invoke(carrot, update_data["args"]) assert result.output == update_data["return"] + "\n" @pytest.fixture( params=[ { "args": ["result", "delete", "cd987859-06fe-4b1a-9e96-47d4f36bf819"], "id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", "find_return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "file", "description": "This new result replaced the broken one", "name": "New Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), "email": "adora@example.com", "return": json.dumps( {"message": "Successfully deleted 1 row"}, indent=4, sort_keys=True ), }, { "args": ["result", "delete", "-y", "cd987859-06fe-4b1a-9e96-47d4f36bf819"], "id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", "find_return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "file", "description": "This new result replaced the broken one", "name": "New Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), "email": "catra@example.com", "return": json.dumps( {"message": "Successfully deleted 1 row"}, indent=4, sort_keys=True ), }, { "args": ["result", "delete", "cd987859-06fe-4b1a-9e96-47d4f36bf819"], "id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", "find_return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "file", "description": "This new result replaced the broken one", "name": "New Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), "email": "catra@example.com", "return": json.dumps( {"message": "Successfully deleted 1 row"}, indent=4, sort_keys=True ), "interactive": { "input": "y", "message": "Result with id cd987859-06fe-4b1a-9e96-47d4f36bf819 was created by adora@example.com. " "Are you sure you want to delete? [y/N]: y\n", }, }, { "args": ["result", "delete", "cd987859-06fe-4b1a-9e96-47d4f36bf819"], "id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", "find_return": json.dumps( { "created_at": "2020-09-16T18:48:06.371563", "created_by": "adora@example.com", "result_type": "file", "description": "This new result replaced the broken one", "name": "New Sword of Protection result", "result_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", }, indent=4, sort_keys=True, ), "email": "catra@example.com", "return": "", "interactive": { "input": "n", "message": "Result with id cd987859-06fe-4b1a-9e96-47d4f36bf819 was created by adora@example.com. " "Are you sure you want to delete? [y/N]: n", }, "logging": "Okay, aborting delete operation", }, { "args": ["result", "delete", "cd987859-06fe-4b1a-9e96-47d4f36bf819"], "id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", "find_return": json.dumps( { "title": "No result found", "status": 404, "detail": "No result found with the specified ID", }, indent=4, sort_keys=True, ), "email": "adora@example.com", "return": json.dumps( { "title": "No result found", "status": 404, "detail": "No result found with the specified ID", }, indent=4, sort_keys=True, ), }, ] ) def delete_data(request): # We want to load the value from "email" from config mockito.when(config).load_var("email").thenReturn(request.param["email"]) # Set all requests to return None so only the one we expect will return a value mockito.when(results).delete(...).thenReturn(None) mockito.when(results).find_by_id(...).thenReturn(None) # Mock up request response mockito.when(results).delete(request.param["id"]).thenReturn( request.param["return"] ) mockito.when(results).find_by_id(request.param["id"]).thenReturn( request.param["find_return"] ) return request.param def test_delete(delete_data, caplog): caplog.set_level(logging.INFO) runner = CliRunner() # Include interactive input and expected message if this test should trigger interactive stuff if "interactive" in delete_data: expected_output = ( delete_data["interactive"]["message"] + delete_data["return"] + "\n" ) result = runner.invoke( carrot, delete_data["args"], input=delete_data["interactive"]["input"] ) assert result.output == expected_output else: result = runner.invoke(carrot, delete_data["args"]) assert result.output == delete_data["return"] + "\n" # If we expect logging that we want to check, make sure it's there if "logging" in delete_data: assert delete_data["logging"] in caplog.text @pytest.fixture( params=[ { "args": [ "result", "map_to_template", "3d1bfbab-d9ec-46c7-aa8e-9c1d1808f2b8", "cd987859-06fe-4b1a-9e96-47d4f36bf819", "out_horde_tanks", "--created_by", "adora@example.com", ], "params": [ "cd987859-06fe-4b1a-9e96-47d4f36bf819", "3d1bfbab-d9ec-46c7-aa8e-9c1d1808f2b8", "out_horde_tanks", "adora@example.com", ], "return": json.dumps( { "template_id": "cd987859-06fe-4b1a-9e96-47d4f36bf819", "result_id": "3d1bfbab-d9ec-46c7-aa8e-9c1d1808f2b8", "result_key": "out_horde_tanks", "created_at": "2020-09-24T19:07:59.311462", "created_by": "rogelio@example.com", }, indent=4, sort_keys=True, ), }, { "args": [ "result", "map_to_template", "3d1bfbab-d9ec-46c7-aa8e-9c1d1808f2b8", "cd987859-06fe-4b1a-9e96-47d4f36bf819", "out_horde_tanks", ], "params": [], "logging": "No email config variable set. If a value is not specified for --created by, " "there must be a value set for email.", }, { "args": ["result", "map_to_template"], "params": [], "return": "Usage: carrot_cli result map_to_template [OPTIONS] ID TEMPLATE_ID RESULT_KEY\n" "Try 'carrot_cli result map_to_template --help' for help.\n" "\n" "Error: Missing argument 'ID'.", }, ] ) def map_to_template_data(request): # Set all requests to return None so only the one we expect will return a value mockito.when(template_results).create_map(...).thenReturn(None) # Mock up request response only if we expect it to get that far if len(request.param["params"]) > 0: mockito.when(template_results).create_map( request.param["params"][0], request.param["params"][1], request.param["params"][2], request.param["params"][3], ).thenReturn(request.param["return"]) return request.param def test_map_to_template(map_to_template_data, caplog): runner = CliRunner() result = runner.invoke(carrot, map_to_template_data["args"]) if "logging" in map_to_template_data: assert map_to_template_data["logging"] in caplog.text else: assert result.output == map_to_template_data["return"] + "\n"
35.089908
115
0.487764
1,861
19,124
4.908651
0.105857
0.053859
0.042036
0.084072
0.832293
0.775479
0.704215
0.675096
0.632841
0.622989
0
0.089384
0.382817
19,124
544
116
35.154412
0.684572
0.048996
0
0.639279
0
0.004008
0.330637
0.089924
0
0
0
0
0.02004
1
0.028056
false
0
0.016032
0
0.056112
0
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
78a423cb7230ea949084c2f335b8d7a0ab098f63
171
py
Python
ipping.py
restlessankyyy/Python
c46ea72cda782ce21738e4792c436637b66d12a8
[ "bzip2-1.0.6" ]
null
null
null
ipping.py
restlessankyyy/Python
c46ea72cda782ce21738e4792c436637b66d12a8
[ "bzip2-1.0.6" ]
null
null
null
ipping.py
restlessankyyy/Python
c46ea72cda782ce21738e4792c436637b66d12a8
[ "bzip2-1.0.6" ]
null
null
null
import os hostname ="127.0.0.1" response = os.system("ping -n 1 "+hostname) if response ==0: print (hostname, "is up!") else: print(hostname,"is down")
19
44
0.602339
26
171
3.961538
0.615385
0.252427
0.291262
0
0
0
0
0
0
0
0
0.060606
0.22807
171
8
45
21.375
0.719697
0
0
0
0
0
0.196319
0
0
0
0
0
0
1
0
false
0
0.142857
0
0.142857
0.285714
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
78aa95b766f729ebf201ef15c63ab80e29b3a8d7
503
py
Python
test_package.py
fangohr/micromagnetics
87ea834234f44c2728a4f9ec77f900313ba083d3
[ "BSD-2-Clause" ]
null
null
null
test_package.py
fangohr/micromagnetics
87ea834234f44c2728a4f9ec77f900313ba083d3
[ "BSD-2-Clause" ]
null
null
null
test_package.py
fangohr/micromagnetics
87ea834234f44c2728a4f9ec77f900313ba083d3
[ "BSD-2-Clause" ]
null
null
null
import numpy as np def test_can_import(): import micromagnetictestcases micromagnetictestcases def test_can_access_macrospin_solution(): import micromagnetictestcases # random test point assert np.array([1.]) == \ micromagnetictestcases.macrospin.solution(0.1, 1, 1, [0]) def test_can_access_domainwall_solution(): import micromagnetictestcases assert np.allclose( micromagnetictestcases.domainwall.solution(1, 1, 1, 1), np.array([0.46211716]))
23.952381
65
0.72167
56
503
6.303571
0.357143
0.028329
0.084986
0.090652
0
0
0
0
0
0
0
0.046455
0.186879
503
20
66
25.15
0.816626
0.033797
0
0.230769
0
0
0
0
0
0
0
0
0.153846
1
0.230769
true
0
0.384615
0
0.615385
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
1
0
1
0
1
0
0
4
78b0de680ae93be2025bf7594a096a0ee793fdb5
188
py
Python
nmr/gui/__init__.py
jnejc/Mercury_control
a3ac73a18257c4ac804a20553f049b74977289c2
[ "MIT" ]
null
null
null
nmr/gui/__init__.py
jnejc/Mercury_control
a3ac73a18257c4ac804a20553f049b74977289c2
[ "MIT" ]
null
null
null
nmr/gui/__init__.py
jnejc/Mercury_control
a3ac73a18257c4ac804a20553f049b74977289c2
[ "MIT" ]
null
null
null
print("Importing log package") import gui.main __all__ = [ 'main' ] #pep-8 79 char line limit :) #123456789112345678921234567893123456789412345678951234567896123456789712345678
17.090909
79
0.771277
16
188
8.8125
0.9375
0
0
0
0
0
0
0
0
0
0
0.50625
0.148936
188
11
79
17.090909
0.375
0.558511
0
0
0
0
0.308642
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
78cef0408113bed1982e52229c6435540e3749e8
103
py
Python
DQM/SiStripMonitorDigi/python/SiStripMonitorDigi_RealData_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
DQM/SiStripMonitorDigi/python/SiStripMonitorDigi_RealData_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
DQM/SiStripMonitorDigi/python/SiStripMonitorDigi_RealData_cfi.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms from DQM.SiStripMonitorDigi.SiStripMonitorDigi_cfi import *
20.6
59
0.854369
12
103
7.25
0.833333
0
0
0
0
0
0
0
0
0
0
0
0.097087
103
4
60
25.75
0.935484
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
1524b1c0bd1e15a47c39710f19e9f56e0cd9a055
127
py
Python
app/schemas/__init__.py
scott2b/Starlight
b5454e3ff50b35dd322065f204220cedd8e5da95
[ "MIT" ]
null
null
null
app/schemas/__init__.py
scott2b/Starlight
b5454e3ff50b35dd322065f204220cedd8e5da95
[ "MIT" ]
1
2020-12-08T22:17:20.000Z
2020-12-08T22:17:20.000Z
app/schemas/__init__.py
scott2b/Starlight
b5454e3ff50b35dd322065f204220cedd8e5da95
[ "MIT" ]
1
2020-12-08T19:27:30.000Z
2020-12-08T19:27:30.000Z
#from .msg import Msg #from .token import Token, TokenPayload #from .user import User, UserCreate, UserInDB, UserUpdateRequest
31.75
64
0.795276
16
127
6.3125
0.5625
0
0
0
0
0
0
0
0
0
0
0
0.125984
127
3
65
42.333333
0.90991
0.952756
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
152bca5cb033bf8cd61e479a27808ee8612e0dc7
162
py
Python
pyras/controllers/hecras/hecrasgeometry/ras500.py
solomonvimal/pyras
5819d19eddc9165ac5179f4651f25fd5ecee70a3
[ "MIT" ]
11
2015-06-04T16:42:45.000Z
2021-06-06T18:10:34.000Z
pyras/controllers/hecras/hecrasgeometry/ras500.py
solomonvimal/pyras
5819d19eddc9165ac5179f4651f25fd5ecee70a3
[ "MIT" ]
null
null
null
pyras/controllers/hecras/hecrasgeometry/ras500.py
solomonvimal/pyras
5819d19eddc9165ac5179f4651f25fd5ecee70a3
[ "MIT" ]
10
2018-07-24T09:01:23.000Z
2021-08-31T16:44:12.000Z
from . import ras41 class Geometry(ras41.Geometry): """HECRAS Geomerty version RAS500""" def __init__(self): super(Geometry, self).__init__()
16.2
40
0.666667
18
162
5.555556
0.722222
0
0
0
0
0
0
0
0
0
0
0.054688
0.209877
162
9
41
18
0.726563
0.185185
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
1591f7cbaea5be1ce887052786b5f9c72af1e8de
344
py
Python
agent/win/vdi-agent-1.93.3-win_x64/python/Lib/site-packages/win32ctypes/pywin32/__init__.py
dnegorov/skala-tools
d26f03b20282ed45e718b7c10318ec40611b41eb
[ "MIT" ]
null
null
null
agent/win/vdi-agent-1.93.3-win_x64/python/Lib/site-packages/win32ctypes/pywin32/__init__.py
dnegorov/skala-tools
d26f03b20282ed45e718b7c10318ec40611b41eb
[ "MIT" ]
null
null
null
agent/win/vdi-agent-1.93.3-win_x64/python/Lib/site-packages/win32ctypes/pywin32/__init__.py
dnegorov/skala-tools
d26f03b20282ed45e718b7c10318ec40611b41eb
[ "MIT" ]
null
null
null
# # (C) Copyright 2014 Enthought, Inc., Austin, TX # All right reserved. # # This file is open source software distributed according to the terms in # LICENSE.txt # from win32ctypes.pywin32 import pywintypes from win32ctypes.pywin32 import win32api from win32ctypes.pywin32 import win32cred __all__ = ['win32api', 'win32cred', 'pywintypes']
22.933333
73
0.770349
43
344
6.069767
0.72093
0.172414
0.252874
0.321839
0
0
0
0
0
0
0
0.081633
0.145349
344
14
74
24.571429
0.806122
0.436047
0
0
0
0
0.145161
0
0
0
0
0
0
1
0
false
0
0.75
0
0.75
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
1594ab1edbefc90bb1dbf640e1fcc39b49f2d0aa
254
py
Python
lennonwall/models.py
peterhychan/lennon_wall
f918a4d69d9feb7bcf9d03c4636d2e3084c06d5a
[ "MIT" ]
1
2021-01-29T11:35:36.000Z
2021-01-29T11:35:36.000Z
lennonwall/models.py
peterhychan/lennon_wall
f918a4d69d9feb7bcf9d03c4636d2e3084c06d5a
[ "MIT" ]
null
null
null
lennonwall/models.py
peterhychan/lennon_wall
f918a4d69d9feb7bcf9d03c4636d2e3084c06d5a
[ "MIT" ]
null
null
null
from datetime import datetime from lennonwall import db class Message(db.Model): id=db.Column(db.Integer, primary_key=True) name=db.Column(db.String(50)) body=db.Column(db.String(200)) time=db.Column(db.DateTime, default=datetime.utcnow, index=True)
31.75
65
0.779528
42
254
4.690476
0.547619
0.162437
0.203046
0.162437
0
0
0
0
0
0
0
0.021459
0.082677
254
8
65
31.75
0.824034
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.285714
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
ec8179918e119473c723d83f0ac28fdc9e9ae6ac
89
py
Python
dml/CNN/__init__.py
Edelweiss35/deep-machine-learning
b1e4b133609f303be77de824601925f448a94764
[ "WTFPL" ]
708
2015-01-07T20:17:58.000Z
2022-03-07T02:30:42.000Z
dml/CNN/__init__.py
Edelweiss35/deep-machine-learning
b1e4b133609f303be77de824601925f448a94764
[ "WTFPL" ]
2
2016-12-15T03:15:57.000Z
2021-06-16T01:25:13.000Z
dml/CNN/__init__.py
Edelweiss35/deep-machine-learning
b1e4b133609f303be77de824601925f448a94764
[ "WTFPL" ]
333
2015-01-09T06:51:46.000Z
2022-01-16T08:49:58.000Z
import numpy as np import scipy as sp from .CNN import CNNC,LayerC __all__ = ['CNNC' ]
11.125
28
0.719101
15
89
4
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.202247
89
7
29
12.714286
0.84507
0
0
0
0
0
0.044944
0
0
0
0
0
0
1
0
false
0
0.6
0
0.6
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ec95c770d18b3575f0d41fc4222c2276975f90c7
74
py
Python
ImageSeeker/utils/__init__.py
entbappy/ImageSeeker-Package
e50f45e5195f006352775d48c3e9b454cf22bc3e
[ "MIT" ]
5
2021-09-19T07:31:34.000Z
2021-12-02T20:24:43.000Z
ImageSeeker/utils/__init__.py
entbappy/ImageSeeker-Package
e50f45e5195f006352775d48c3e9b454cf22bc3e
[ "MIT" ]
null
null
null
ImageSeeker/utils/__init__.py
entbappy/ImageSeeker-Package
e50f45e5195f006352775d48c3e9b454cf22bc3e
[ "MIT" ]
3
2021-09-21T15:57:47.000Z
2021-11-30T09:11:16.000Z
''' @author: Bappy Ahmed Email: entbappy73@gmail.com Date: 06-sep-2021 '''
14.8
27
0.702703
11
74
4.727273
1
0
0
0
0
0
0
0
0
0
0
0.121212
0.108108
74
5
28
14.8
0.666667
0.891892
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
ec9ba515d95b0ef468db1373cb533ea15e3c2857
30,061
py
Python
bomeba0/templates/aminoacids.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
null
null
null
bomeba0/templates/aminoacids.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
28
2017-06-01T15:46:33.000Z
2021-07-01T18:28:36.000Z
bomeba0/templates/aminoacids.py
aloctavodia/bomeba0
e212986d8ee60be1da91d63a7a889db14ec851c3
[ "Apache-2.0" ]
6
2017-09-30T13:26:08.000Z
2022-02-13T10:01:18.000Z
from collections import namedtuple import numpy as np """ Templates for amino acidic residues """ AA_info = namedtuple('AA_info', 'coords atom_names bonds bb sc offset') A_info = AA_info(coords=np.array([[-0.75, -1.26, -0.51], [-0.04, 0.03, -0.48], [1.47, -0.14, -0.46], [2.04, -1.21, -0.48], [-0.5, 0.86, 0.73], [-0.07, -2.02, -0.5], [-0.27, 0.58, -1.4], [-1.59, 1.01, 0.69], [-0.26, 0.35, 1.66], [-0.02, 1.84, 0.74]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'H', 'HA', 'HB1', 'HB2', 'HB3'], bb=[0, 1, 2, 3, 5, 6], sc=[4, 7, 8, 9], bonds=[(0, 1), (0, 5), (1, 2), (1, 4), (1, 6), (2, 3), (4, 7), (4, 8), (4, 9)], offset=10) R_info = AA_info(coords=np.array([[-0.07, -3.66, 2.53], [0.51, -2.96, 1.34], [2.04, -2.96, 1.38], [2.67, -3.46, 2.27], [-0.07, -1.52, 1.29], [0.2, -0.77, -0.05], [-0.38, 0.65, -0.], [-0.14, 1.37, -1.3], [-0.49, 2.57, -1.61], [-1.11, 3.37, -0.79], [-0.21, 3.05, -2.81], [0.61, -4.02, 3.2], [0.22, -3.52, 0.45], [0.34, -0.95, 2.13], [-1.15, -1.57, 1.45], [-0.25, -1.33, -0.88], [1.27, -0.71, -0.25], [0.08, 1.22, 0.81], [-1.45, 0.62, 0.2], [0.34, 0.81, -2.], [-1.35, 3.05, 0.16], [-1.39, 4.32, -1.01], [0.28, 2.45, -3.46], [-0.48, 4.01, -3.04]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD', 'NE', 'CZ', 'NH1', 'NH2', 'H', 'HA', 'HB2', 'HB3', 'HG2', 'HG3', 'HD2', 'HD3', 'HE', 'HH11', 'HH12', 'HH21', 'HH22'], bb=[0, 1, 2, 3, 11, 12], sc=[4, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23], bonds=[(0, 1), (0, 11), (1, 2), (1, 4), (1, 12), (2, 3), (4, 5), (4, 13), (4, 14), (5, 6), (5, 15), (5, 16), (6, 7), (6, 17), (6, 18), (7, 8), (7, 19), (8, 9), (8, 10), (9, 20), (9, 21), (10, 22), (10, 23)], offset=24) N_info = AA_info(coords=np.array([[0.15, -1.78, -0.63], [0.76, -0.44, -0.59], [2.28, -0.5, -0.63], [2.93, -1.53, -0.6], [0.3, 0.37, 0.64], [-1.21, 0.48, 0.76], [-1.84, 1.38, -0.01], [-1.85, -0.21, 1.53], [0.87, -2.5, -0.61], [0.47, 0.1, -1.5], [0.73, 1.37, 0.61], [0.68, -0.11, 1.55], [-2.85, 1.45, 0.04], [-1.33, 1.96, -0.66]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'ND2', 'OD1', 'H', 'HA', 'HB2', 'HB3', 'HD21', 'HD22'], bb=[0, 1, 2, 3, 8, 9], sc=[4, 5, 6, 7, 10, 11, 12, 13], bonds=[(0, 1), (0, 8), (1, 2), (1, 4), (1, 9), (2, 3), (4, 5), (4, 10), (4, 11), (5, 6), (5, 7), (6, 12), (6, 13)], offset=14) D_info = AA_info(coords=np.array([[-0.67, -1.84, -0.63], [-0.06, -0.49, -0.62], [1.46, -0.53, -0.62], [2.11, -1.56, -0.64], [-0.58, 0.33, 0.59], [-0.08, 1.77, 0.62], [-0., 2.38, -0.43], [0.17, 2.25, 1.71], [0.06, -2.55, -0.64], [-0.34, 0.03, -1.54], [-0.29, -0.16, 1.51], [-1.67, 0.36, 0.56]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'OD1', 'OD2', 'H', 'HA', 'HB2', 'HB3'], bb=[0, 1, 2, 3, 8, 9], sc=[4, 5, 6, 7, 10, 11], bonds=[(0, 1), (0, 8), (1, 2), (1, 4), (1, 9), (2, 3), (4, 5), (4, 10), (4, 11), (5, 6), (5, 7)], offset=12) C_info = AA_info(coords=np.array([[-0.72, -1.62, -0.64], [-0.12, -0.27, -0.64], [1.39, -0.31, -0.63], [2.05, -1.33, -0.62], [-0.67, 0.53, 0.56], [-0.17, 2.29, 0.55], [0.01, -2.32, -0.65], [-0.41, 0.24, -1.56], [-0.32, 0.08, 1.5], [-1.76, 0.5, 0.54], [0.79, 2.19, 1.49]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'SG', 'H', 'HA', 'HB2', 'HB3', 'HG'], bb=[0, 1, 2, 3, 6, 7], sc=[4, 5, 8, 9, 10], bonds=[(0, 1), (0, 6), (1, 2), (1, 4), (1, 7), (2, 3), (4, 5), (4, 8), (4, 9), (5, 10)], offset=11) E_info = AA_info(coords=np.array([[-0.55, -2.38, -1.05], [0.04, -1.01, -1.02], [1.56, -1.05, -1.05], [2.19, -2.09, -1.05], [-0.48, -0.21, 0.21], [0.01, 1.27, 0.29], [-0.41, 2.11, 1.49], [-1.17, 1.52, 2.39], [-0.01, 3.23, 1.6], [0.12, -3.15, -1.04], [-0.26, -0.48, -1.95], [-0.18, -0.74, 1.12], [-1.58, -0.22, 0.2], [-0.31, 1.83, -0.58], [1.1, 1.31, 0.31]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD', 'OE1', 'OE2', 'H', 'HA', 'HB2', 'HB3', 'HG2', 'HG3'], bb=[0, 1, 2, 3, 9, 10], sc=[4, 5, 6, 7, 8, 11, 12, 13, 14], bonds=[(0, 1), (0, 9), (1, 2), (1, 4), (1, 10), (2, 3), (4, 5), (4, 11), (4, 12), (5, 6), (5, 13), (5, 14), (6, 7), (6, 8)], offset=15) Q_info = AA_info(coords=np.array([[-0.39, -2.48, -1.42], [0.22, -1.13, -1.37], [1.74, -1.19, -1.41], [2.39, -2.22, -1.38], [-0.29, -0.37, -0.12], [0.19, 1.11, -0.04], [-0.26, 1.91, 1.18], [-1.02, 1.3, 2.12], [0.09, 3.06, 1.34], [0.33, -3.2, -1.4], [-0.07, -0.6, -2.28], [0.02, -0.91, 0.77], [-1.39, -0.38, -0.15], [-0.14, 1.65, -0.93], [1.28, 1.13, -0.04], [-1.28, 1.82, 2.94], [-1.3, 0.34, 2.01]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD', 'NE2', 'OE1', 'H', 'HA', 'HB2', 'HB3', 'HG2', 'HG3', 'HE21', 'HE22'], bb=[0, 1, 2, 3, 9, 10], sc=[4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16], bonds=[(0, 1), (0, 9), (1, 2), (1, 4), (1, 10), (2, 3), (4, 5), (4, 11), (4, 12), (5, 6), (5, 13), (5, 14), (6, 7), (6, 8), (7, 15), (7, 16)], offset=17) G_info = AA_info(coords=np.array([[-1.25, 0.2, -0.25], [0.2, 0.29, -0.51], [1.04, -0.41, 0.54], [0.6, -0.99, 1.5], [-1.42, -0.33, 0.61], [0.43, -0.17, -1.47], [0.51, 1.34, -0.52]]), atom_names=['N', 'CA', 'C', 'O', 'H', 'HA2', 'HA3'], bb=[0, 1, 2, 3, 4, 5, 6], sc=[], bonds=[(0, 1), (0, 4), (1, 2), (1, 5), (1, 6), (2, 3)], offset=7) H_info = AA_info(coords=np.array([[0.48, -2.42, -1.17], [1.07, -1.1, -0.85], [2.58, -1.1, -0.89], [3.22, -2.11, -1.12], [0.58, -0.67, 0.57], [-0.26, 0.58, 0.55], [-1.64, 0.55, 0.39], [0.19, 1.83, 0.69], [-0.95, 2.55, 0.61], [-2.06, 1.81, 0.42], [1.15, -3.17, -1.33], [0.75, -0.38, -1.62], [1.41, -0.53, 1.25], [-0.03, -1.48, 1.], [-2.26, -0.33, 0.25], [-0.89, 3.63, 0.69], [-3.07, 2.19, 0.33]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD2', 'ND1', 'CE1', 'NE2', 'H', 'HA', 'HB2', 'HB3', 'HD2', 'HE1', 'HE2'], bb=[0, 1, 2, 3, 10, 11], sc=[4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 16], bonds=[(0, 1), (0, 10), (1, 2), (1, 4), (1, 11), (2, 3), (4, 5), (4, 12), (4, 13), (5, 6), (5, 7), (6, 9), (6, 14), (7, 8), (8, 9), (8, 15), (9, 16)], offset=17) I_info = AA_info(coords=np.array([[0.35, -2.2, -1.14], [0.87, -0.81, -1.13], [2.39, -0.8, -1.14], [3.1, -1.79, -1.14], [0.3, 0.03, 0.06], [-1.26, -0.04, 0.14], [0.75, 1.51, 0.02], [-1.85, 0.5, 1.47], [1.11, -2.88, -1.16], [0.58, -0.33, -2.07], [0.7, -0.42, 0.98], [-1.6, -1.07, 0.05], [-1.7, 0.51, -0.69], [1.84, 1.61, 0.05], [0.39, 2.02, -0.88], [0.38, 2.06, 0.89], [-1.43, -0.04, 2.33], [-1.66, 1.57, 1.61], [-2.93, 0.36, 1.49]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG1', 'CG2', 'CD1', 'H', 'HA', 'HB', 'HG12', 'HG13', 'HG21', 'HG22', 'HG23', 'HD11', 'HD12', 'HD13'], bb=[0, 1, 2, 3, 8, 9], sc=[4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18], bonds=[(0, 1), (0, 8), (1, 2), (1, 4), (1, 9), (2, 3), (4, 5), (4, 6), (4, 10), (5, 7), (5, 11), (5, 12), (6, 13), (6, 14), (6, 15), (7, 16), (7, 17), (7, 18)], offset=19) L_info = AA_info(coords=np.array([[0.63, -2.16, -0.9], [1.25, -0.81, -0.9], [2.77, -0.86, -0.91], [3.41, -1.9, -0.9], [0.75, 0.03, 0.31], [-0.79, 0.2, 0.44], [-1.11, 1.13, 1.64], [-1.45, 0.77, -0.84], [1.33, -2.9, -0.91], [0.98, -0.29, -1.82], [1.21, 1.02, 0.27], [1.12, -0.44, 1.23], [-1.24, -0.77, 0.65], [-0.69, 0.73, 2.57], [-0.7, 2.13, 1.49], [-2.19, 1.23, 1.79], [-1., 1.72, -1.13], [-1.35, 0.06, -1.67], [-2.52, 0.93, -0.68]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD1', 'CD2', 'H', 'HA', 'HB2', 'HB3', 'HG', 'HD11', 'HD12', 'HD13', 'HD21', 'HD22', 'HD23'], bb=[0, 1, 2, 3, 8, 9], sc=[4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18], bonds=[(0, 1), (0, 8), (1, 2), (1, 4), (1, 9), (2, 3), (4, 5), (4, 10), (4, 11), (5, 6), (5, 7), (5, 12), (6, 13), (6, 14), (6, 15), (7, 16), (7, 17), (7, 18)], offset=19) K_info = AA_info(coords=np.array([[-4.94e-01, -3.60e+00, -1.67e+00], [1.09e-01, -2.26e+00, -1.68e+00], [1.62e+00, -2.32e+00, -1.73e+00], [2.28e+00, -3.33e+00, -1.62e+00], [-3.98e-01, -1.46e+00, -4.42e-01], [1.06e-01, -1.00e-03, -4.40e-01], [-3.72e-01, 7.71e-01, 8.00e-01], [2.11e-01, 2.19e+00, 8.10e-01], [-3.47e-01, 3.07e+00, 1.89e+00], [2.46e-01, -4.30e+00, -1.69e+00], [-2.06e-01, -1.74e+00, -2.59e+00], [-7.70e-02, -1.97e+00, 4.71e-01], [-1.49e+00, -1.46e+00, -4.51e-01], [-2.38e-01, 5.00e-01, -1.35e+00], [1.20e+00, 8.00e-03, -4.58e-01], [-6.10e-02, 2.36e-01, 1.71e+00], [-1.47e+00, 8.16e-01, 8.01e-01], [-1.10e-02, 2.70e+00, -1.29e-01], [1.30e+00, 2.13e+00, 9.27e-01], [-4.74e-01, 2.51e+00, 2.76e+00], [2.81e-01, 3.86e+00, 2.10e+00], [-1.27e+00, 3.44e+00, 1.62e+00]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD', 'CE', 'NZ', 'H', 'HA', 'HB2', 'HB3', 'HG2', 'HG3', 'HD2', 'HD3', 'HE2', 'HE3', 'HZ1', 'HZ2', 'HZ3'], bb=[0, 1, 2, 3, 9, 10], sc=[4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21], bonds=[(0, 1), (0, 9), (1, 2), (1, 4), (1, 10), (2, 3), (4, 5), (4, 11), (4, 12), (5, 6), (5, 13), (5, 14), (6, 7), (6, 15), (6, 16), (7, 8), (7, 17), (7, 18), (8, 19), (8, 20), (8, 21)], offset=22) M_info = AA_info(coords=np.array([[1., -1.99, -1.18], [1.53, -0.61, -1.18], [3.04, -0.58, -1.22], [3.76, -1.56, -1.15], [1.02, 0.18, 0.05], [-0.52, 0.32, 0.08], [-1.04, 1.47, 1.4], [-2.82, 1.13, 1.44], [1.78, -2.65, -1.19], [1.2, -0.1, -2.1], [1.46, 1.18, 0.03], [1.35, -0.31, 0.96], [-0.97, -0.65, 0.26], [-0.88, 0.71, -0.88], [-3.25, 1.3, 0.45], [-2.98, 0.1, 1.75], [-3.3, 1.81, 2.16]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'SD', 'CE', 'H', 'HA', 'HB2', 'HB3', 'HG2', 'HG3', 'HE1', 'HE2', 'HE3'], bb=[0, 1, 2, 3, 8, 9], sc=[4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16], bonds=[(0, 1), (0, 8), (1, 2), (1, 4), (1, 9), (2, 3), (4, 5), (4, 10), (4, 11), (5, 6), (5, 12), (5, 13), (6, 7), (7, 14), (7, 15), (7, 16)], offset=17) F_info = AA_info(coords=np.array([[1.34, -1.84, -1.06], [1.9, -0.47, -1.04], [3.41, -0.47, -1.1], [4.11, -1.47, -1.04], [1.42, 0.32, 0.21], [-0.1, 0.39, 0.34], [-0.79, -0.61, 1.03], [-0.82, 1.46, -0.2], [-2.18, -0.57, 1.14], [-2.21, 1.5, -0.09], [-2.89, 0.49, 0.58], [2.09, -2.53, -1.06], [1.57, 0.06, -1.93], [1.82, 1.33, 0.17], [1.83, -0.14, 1.11], [-0.25, -1.44, 1.47], [-0.31, 2.26, -0.74], [-2.71, -1.37, 1.66], [-2.77, 2.33, -0.52], [-3.98, 0.51, 0.66]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD1', 'CD2', 'CE1', 'CE2', 'CZ', 'H', 'HA', 'HB2', 'HB3', 'HD1', 'HD2', 'HE1', 'HE2', 'HZ'], bb=[0, 1, 2, 3, 11, 12], sc=[4, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, 19], bonds=[(0, 1), (0, 11), (1, 2), (1, 4), (1, 12), (2, 3), (4, 5), (4, 13), (4, 14), (5, 6), (5, 7), (6, 8), (6, 15), (7, 9), (7, 16), (8, 10), (8, 17), (9, 10), (9, 18), (10, 19)], offset=20) P_info = AA_info(coords=np.array([[0.73, -0.63, 1.11], [1.17, 0.41, 0.14], [1.07, 1.82, 0.72], [0.6, 2.1, 1.8], [0.27, 0.24, -1.09], [-1.04, -0.26, -0.49], [-0.57, -1.17, 0.65], [2.22, 0.26, -0.14], [0.69, -0.53, -1.75], [0.14, 1.16, -1.66], [-1.65, -0.8, -1.22], [-1.62, 0.58, -0.09], [-0.42, -2.18, 0.28], [-1.29, -1.18, 1.47]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD', 'HA', 'HB2', 'HB3', 'HG2', 'HG3', 'HD2', 'HD3'], bb=[0, 1, 2, 3, 7], sc=[4, 5, 6, 8, 9, 10, 11, 12, 13], bonds=[(0, 1), (0, 6), (1, 2), (1, 4), (1, 7), (2, 3), (4, 5), (4, 8), (4, 9), (5, 6), (5, 10), (5, 11), (6, 12), (6, 13)], offset=14) S_info = AA_info(coords=np.array([[-0.66, -1.27, -0.65], [0.01, 0.04, -0.69], [1.52, -0.08, -0.71], [2.12, -1.14, -0.71], [-0.47, 0.93, 0.48], [-0.02, 0.42, 1.73], [0.04, -2.01, -0.72], [-0.25, 0.54, -1.63], [-1.56, 0.96, 0.47], [-0.09, 1.94, 0.34], [-0.38, -0.48, 1.86]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'OG', 'H', 'HA', 'HB2', 'HB3', 'HG'], bb=[0, 1, 2, 3, 6, 7], sc=[4, 5, 8, 9, 10], bonds=[(0, 1), (0, 6), (1, 2), (1, 4), (1, 7), (2, 3), (4, 5), (4, 8), (4, 9), (5, 10)], offset=11) T_info = AA_info(coords=np.array([[-0.55, -2.02, -0.81], [0.11, -0.69, -0.81], [1.63, -0.81, -0.83], [2.23, -1.87, -0.79], [-0.38, 0.14, 0.42], [0.23, 1.56, 0.53], [-1.79, 0.31, 0.35], [0.13, -2.78, -0.82], [-0.16, -0.17, -1.72], [-0.13, -0.41, 1.33], [-2.07, 0.79, 1.15], [-0.19, 2.08, 1.4], [1.32, 1.53, 0.67], [0., 2.16, -0.36]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG2', 'OG1', 'H', 'HA', 'HB', 'HG1', 'HG21', 'HG22', 'HG23'], bb=[0, 1, 2, 3, 7, 8], sc=[4, 5, 6, 9, 10, 11, 12, 13], bonds=[(0, 1), (0, 7), (1, 2), (1, 4), (1, 8), (2, 3), (4, 5), (4, 6), (4, 9), (5, 11), (5, 12), (5, 13), (6, 10)], offset=14) W_info = AA_info(coords=np.array([[1.58, -2.74, -0.43], [2.2, -1.39, -0.43], [3.71, -1.44, -0.46], [4.36, -2.47, -0.42], [1.71, -0.57, 0.79], [0.2, -0.32, 0.78], [-0.75, -1.07, 1.46], [-0.5, 0.65, 0.1], [-1.84, 0.48, 0.37], [-0.05, 1.67, -0.75], [-2., -0.58, 1.2], [-2.8, 1.31, -0.21], [-1.01, 2.51, -1.33], [-2.38, 2.33, -1.06], [2.29, -3.47, -0.41], [1.91, -0.87, -1.35], [2.23, 0.38, 0.84], [1.98, -1.11, 1.7], [-0.59, -1.94, 2.09], [-2.96, -0.99, 1.56], [1., 1.81, -0.96], [-3.87, 1.16, -0.01], [-0.7, 3.3, -2.], [-3.1, 2.99, -1.53]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD1', 'CD2', 'CE2', 'CE3', 'NE1', 'CZ2', 'CZ3', 'CH2', 'H', 'HA', 'HB2', 'HB3', 'HD1', 'HE1', 'HE3', 'HZ2', 'HZ3', 'HH2'], bb=[0, 1, 2, 3, 14, 15], sc=[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23], bonds=[(0, 1), (0, 14), (1, 2), (1, 4), (1, 15), (2, 3), (4, 5), (4, 16), (4, 17), (5, 6), (5, 7), (6, 10), (6, 18), (7, 8), (7, 9), (8, 10), (8, 11), (9, 12), (9, 20), (10, 19), (11, 13), (11, 21), (12, 13), (12, 22), (13, 23)], offset=24) Y_info = AA_info(coords=np.array([[-0.84, -2.19, 1.38], [0.62, -2.08, 1.12], [1.44, -2.84, 2.14], [0.98, -3.39, 3.12], [1.08, -0.6, 1.08], [0.41, 0.26, 0.02], [0.83, 0.23, -1.31], [-0.63, 1.14, 0.38], [0.21, 1.03, -2.27], [-1.24, 1.94, -0.57], [-0.82, 1.89, -1.9], [-1.42, 2.68, -2.84], [-1.05, -2.73, 2.23], [0.85, -2.55, 0.16], [2.16, -0.56, 0.92], [0.92, -0.16, 2.07], [1.64, -0.43, -1.61], [-0.96, 1.19, 1.42], [0.54, 1., -3.31], [-2.04, 2.61, -0.27], [-2.12, 3.21, -2.41]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG', 'CD1', 'CD2', 'CE1', 'CE2', 'CZ', 'OH', 'H', 'HA', 'HB2', 'HB3', 'HD1', 'HD2', 'HE1', 'HE2', 'HH'], bb=[0, 1, 2, 3, 12, 13], sc=[4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 16, 17, 18, 19, 20], bonds=[(0, 1), (0, 12), (1, 2), (1, 4), (1, 13), (2, 3), (4, 5), (4, 14), (4, 15), (5, 6), (5, 7), (6, 8), (6, 16), (7, 9), (7, 17), (8, 10), (8, 18), (9, 10), (9, 19), (10, 11), (11, 20)], offset=21) V_info = AA_info(coords=np.array([[-0.13, -2.06, -0.86], [0.43, -0.69, -0.82], [1.95, -0.72, -0.85], [2.63, -1.73, -0.84], [-0.12, 0.08, 0.42], [0.53, 1.48, 0.61], [-1.65, 0.27, 0.34], [0.63, -2.74, -0.87], [0.13, -0.17, -1.73], [0.11, -0.51, 1.31], [0.35, 2.13, -0.25], [0.09, 1.97, 1.49], [1.6, 1.41, 0.79], [-2.17, -0.68, 0.23], [-2.02, 0.74, 1.26], [-1.93, 0.92, -0.49]]), atom_names=['N', 'CA', 'C', 'O', 'CB', 'CG1', 'CG2', 'H', 'HA', 'HB', 'HG11', 'HG12', 'HG13', 'HG21', 'HG22', 'HG23'], bb=[0, 1, 2, 3, 7, 8], sc=[4, 5, 6, 9, 10, 11, 12, 13, 14, 15], bonds=[(0, 1), (0, 7), (1, 2), (1, 4), (1, 8), (2, 3), (4, 5), (4, 6), (4, 9), (5, 10), (5, 11), (5, 12), (6, 13), (6, 14), (6, 15)], offset=16) B_info = AA_info(coords=np.array([[ 1.12, 0.22, -0.24], [ 1.74, -0.73, -0.65], [-0.34, 0.14, 0.17], [-0.47, -0.57, 0.98], [-0.68, 1.12, 0.5 ], [-0.95, -0.17, -0.69]]), atom_names = ['C', 'O', 'CH3', 'HH31', 'HH32', 'HH33'], bb = [0, 2], sc = [1, 3, 4, 5], bonds = [(0, 1), (0, 2), (2, 3), (2, 4), (2, 5)], offset = 6) Z_info = AA_info(coords=np.array([[ 2.23, 0.97, -0.68], [ 3.68, 0.81, -0.52], [ 1.91, 1.81, -0.21], [ 3.93, 0.74, 0.55], [ 4.02, -0.09, -1.03], [ 4.2 , 1.68, -0.94]]), atom_names = ['N', 'CH3', 'H', 'HH31', 'HH32', 'HH33'], bb = [0, 2], sc = [1, 3, 4, 5], bonds = [(0, 1), (0, 2), (1, 3), (1, 4), (1, 5)], offset = 6) templates_aa = {'A': A_info, 'C': C_info, 'D': D_info, 'E': E_info, 'F': F_info, 'G': G_info, 'H': H_info, 'I': I_info, 'K': K_info, 'L': L_info, 'M': M_info, 'N': N_info, 'P': P_info, 'Q': Q_info, 'R': R_info, 'S': S_info, 'T': T_info, 'V': V_info, 'W': W_info, 'Y': Y_info, 'B': B_info, 'Z': Z_info} one_to_three_aa = {'A': 'ALA', 'C': 'CYS', 'D': 'ASP', 'E': 'GLU', 'F': 'PHE', 'G': 'GLY', 'H': 'HIS', 'I': 'ILE', 'K': 'LYS', 'L': 'LEU', 'M': 'MET', 'N': 'ASN', 'P': 'PRO', 'Q': 'GLN', 'R': 'ARG', 'S': 'SER', 'T': 'THR', 'V': 'VAL', 'W': 'TRP', 'Y': 'TYR', 'B': 'ACE', 'Z': 'NME'} three_to_one_aa = {val: key for key, val in one_to_three_aa.items()}
55.979516
136
0.225142
3,847
30,061
1.733039
0.078503
0.014099
0.041398
0.052797
0.375881
0.346033
0.319484
0.236538
0.215839
0.180591
0
0.339011
0.554705
30,061
536
137
56.083955
0.159047
0
0
0.097804
0
0
0.031181
0
0
0
0
0
0
1
0
false
0
0.003992
0
0.003992
0
0
0
1
null
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
eca23bda4d6550f1bffe92bb44ac0ae79732979c
61
py
Python
Variables and TypeCasting/Hello Friends.py
AshishJangra27/Python-Elite-Batch-GFG
7b25f2083944ad152d9460924b0a061ba39b7246
[ "Apache-2.0" ]
1
2022-02-13T13:16:22.000Z
2022-02-13T13:16:22.000Z
Variables and TypeCasting/Hello Friends.py
AshishJangra27/Python-Elite-Batch-GFG
7b25f2083944ad152d9460924b0a061ba39b7246
[ "Apache-2.0" ]
null
null
null
Variables and TypeCasting/Hello Friends.py
AshishJangra27/Python-Elite-Batch-GFG
7b25f2083944ad152d9460924b0a061ba39b7246
[ "Apache-2.0" ]
null
null
null
print(type("Ashish")) print(123) print(3.14) print(True)
12.2
22
0.655738
10
61
4
0.7
0
0
0
0
0
0
0
0
0
0
0.113208
0.131148
61
4
23
15.25
0.641509
0
0
0
0
0
0.105263
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
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
ecb219b2826a9feace1d8e0765581982026bd303
146
py
Python
example/main.py
hejingsong/sge-server
0eecdf55db0093723182aa394db42f71a4431230
[ "MIT" ]
null
null
null
example/main.py
hejingsong/sge-server
0eecdf55db0093723182aa394db42f71a4431230
[ "MIT" ]
null
null
null
example/main.py
hejingsong/sge-server
0eecdf55db0093723182aa394db42f71a4431230
[ "MIT" ]
null
null
null
#! /usr/bin/env python #-*- coding:utf-8 -*- def start(request, response): response.end("<H1>Hello SgeServer.</H1>") return True
18.25
46
0.59589
19
146
4.578947
0.894737
0
0
0
0
0
0
0
0
0
0
0.025862
0.205479
146
7
47
20.857143
0.724138
0.280822
0
0
0
0
0.260417
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
ecbf4dfb5895f611ecb3e06c39e5fc831b7b6287
85
py
Python
public/index.py
jacksonsr45/new_app_python
338d1ca1bea72cbc10efa5d915139af58e2dc7ce
[ "MIT" ]
null
null
null
public/index.py
jacksonsr45/new_app_python
338d1ca1bea72cbc10efa5d915139af58e2dc7ce
[ "MIT" ]
null
null
null
public/index.py
jacksonsr45/new_app_python
338d1ca1bea72cbc10efa5d915139af58e2dc7ce
[ "MIT" ]
null
null
null
from vendor.load import NewApp class Main: def __init__(self): NewApp()
14.166667
30
0.658824
11
85
4.727273
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.258824
85
6
31
14.166667
0.825397
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
ecd40bb1a9b6f4d15f18f8eaa1051e3b2a510d0f
165
py
Python
backend/api/urls.py
kennyudekwu/dog-breed-classification
51213ae2b15c4ec7b241c5c83ccd99bf82e7b612
[ "MIT" ]
null
null
null
backend/api/urls.py
kennyudekwu/dog-breed-classification
51213ae2b15c4ec7b241c5c83ccd99bf82e7b612
[ "MIT" ]
null
null
null
backend/api/urls.py
kennyudekwu/dog-breed-classification
51213ae2b15c4ec7b241c5c83ccd99bf82e7b612
[ "MIT" ]
2
2021-07-13T01:04:03.000Z
2021-07-13T09:30:04.000Z
from django.urls import path from django.urls.resolvers import URLPattern from . import views urlpatterns = [ path('predict/', views.result, name="inferece") ]
20.625
51
0.745455
21
165
5.857143
0.619048
0.162602
0.227642
0
0
0
0
0
0
0
0
0
0.145455
165
7
52
23.571429
0.87234
0
0
0
0
0
0.09697
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
ecd4d146b9af550ed9d82e639aaa1b5dbdddee0c
622
py
Python
src/denoiser/losses/__init__.py
Hguimaraes/3Denoiser
000ab990640c77407cb27af2c031396d97b02a1c
[ "MIT" ]
null
null
null
src/denoiser/losses/__init__.py
Hguimaraes/3Denoiser
000ab990640c77407cb27af2c031396d97b02a1c
[ "MIT" ]
null
null
null
src/denoiser/losses/__init__.py
Hguimaraes/3Denoiser
000ab990640c77407cb27af2c031396d97b02a1c
[ "MIT" ]
1
2022-03-11T00:12:44.000Z
2022-03-11T00:12:44.000Z
from denoiser.losses.metrics import task1_metric from denoiser.losses.perceptual import PFPL from denoiser.losses.perceptual import DeepFeatureLoss from denoiser.losses.perceptual import CompoundedPerceptualLoss from denoiser.losses.mrstft_loss import MultiResolutionSTFTLoss from denoiser.losses.spectral_loss import STFTMagnitudeLoss from denoiser.losses.spectral_loss import LogSTFTMagnitudeLoss from denoiser.losses.wave_loss import WaveLoss __all__ = [ 'PFPL', 'DeepFeatureLoss', 'CompoundedPerceptualLoss', 'MultiResolutionSTFTLoss', 'STFTMagnitudeLoss', 'LogSTFTMagnitudeLoss', 'WaveLoss', 'task1_metric' ]
47.846154
85
0.848875
63
622
8.222222
0.31746
0.185328
0.277992
0.162162
0.335907
0.138996
0
0
0
0
0
0.003509
0.083601
622
13
86
47.846154
0.905263
0
0
0
0
0
0.197432
0.075441
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ecf463d6007954e259fb8b7564a2b2cfabe0e154
279
py
Python
mofa/assistants/migrations/0005_merge_20200114_1611.py
BoxInABoxICT/BoxPlugin
ad351978faa37ab867a86d2f4023a2b3e5a2ce19
[ "Apache-2.0" ]
null
null
null
mofa/assistants/migrations/0005_merge_20200114_1611.py
BoxInABoxICT/BoxPlugin
ad351978faa37ab867a86d2f4023a2b3e5a2ce19
[ "Apache-2.0" ]
5
2020-06-06T01:07:51.000Z
2021-06-09T18:52:55.000Z
mofa/assistants/migrations/0005_merge_20200114_1611.py
BoxInABoxICT/BoxPlugin
ad351978faa37ab867a86d2f4023a2b3e5a2ce19
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.6 on 2020-01-14 15:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('assistants', '0004_auto_20200113_1333'), ('assistants', '0004_auto_20200113_1046'), ] operations = [ ]
18.6
50
0.655914
33
279
5.363636
0.757576
0.158192
0.20339
0.293785
0
0
0
0
0
0
0
0.217593
0.225806
279
14
51
19.928571
0.601852
0.16129
0
0
1
0
0.284483
0.198276
0
0
0
0
0
1
0
false
0
0.125
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
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
4
01f79a4868d7b55e4b71a3121061ff36b0407b41
1,055
py
Python
FusionIIIT/applications/office_module/admin.py
29rj/Fusion
bc2941a67532e183adeb0bc4042df0b182b9e3aa
[ "bzip2-1.0.6" ]
29
2019-02-20T15:35:33.000Z
2022-03-22T11:10:57.000Z
FusionIIIT/applications/office_module/admin.py
29rj/Fusion
bc2941a67532e183adeb0bc4042df0b182b9e3aa
[ "bzip2-1.0.6" ]
409
2019-01-17T19:30:51.000Z
2022-03-31T16:28:45.000Z
FusionIIIT/applications/office_module/admin.py
29rj/Fusion
bc2941a67532e183adeb0bc4042df0b182b9e3aa
[ "bzip2-1.0.6" ]
456
2019-01-12T11:01:13.000Z
2022-03-30T17:06:52.000Z
from django.contrib import admin from .models import * admin.site.register(Requisitions) admin.site.register(Filemovement) admin.site.register(stock) admin.site.register(apply_for_purchase) admin.site.register(quotations) admin.site.register(Registrar_File) admin.site.register(registrar_create_doc) admin.site.register(registrar_general_section) admin.site.register(registrar_purchase_sales_section) admin.site.register(registrar_finance_section) admin.site.register(registrar_establishment_section) admin.site.register(registrar_director_section) admin.site.register(Assistantship) admin.site.register(hostel_allotment) admin.site.register(hostel_capacity) # registering Dean RSPC project management models admin.site.register(Project_Registration) admin.site.register(Project_Extension) admin.site.register(Project_Closure) admin.site.register(Project_Reallocation) admin.site.register(Member) admin.site.register(Registrar) admin.site.register(vendor) admin.site.register(purchase_commitee) admin.site.register(LTC)
32.96875
54
0.835071
133
1,055
6.451128
0.315789
0.251748
0.475524
0.242424
0.153846
0
0
0
0
0
0
0
0.070142
1,055
32
55
32.96875
0.874618
0.04455
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.076923
0
0.076923
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
bf009cfa9b3afe48d2c5113a442b1735e479c699
1,987
py
Python
darzalib/PacketBodyReader.py
swrlly/Midnight
b4375002761a13a09a6c3085e9b34384b28227ba
[ "MIT" ]
2
2021-11-18T13:38:52.000Z
2021-11-19T04:15:24.000Z
darzalib/PacketBodyReader.py
swrlly/Midnight
b4375002761a13a09a6c3085e9b34384b28227ba
[ "MIT" ]
null
null
null
darzalib/PacketBodyReader.py
swrlly/Midnight
b4375002761a13a09a6c3085e9b34384b28227ba
[ "MIT" ]
null
null
null
import struct class PacketBodyReader: def __init__(self, data): # start from the beginning of the body, always assume no headers if you're starting to read self.index = 0 self.buffer = data def BytesLeft(self): return len(self.buffer) - self.index def ReadByte(self): self.index += 1 return self.buffer[self.index - 1] def ReadFloat(self): tmp = struct.unpack("<f", self.buffer[self.index : self.index + 4])[0] self.index += 4 return tmp def ReadDouble(self): tmp = struct.unpack("<d", self.buffer[self.index : self.index + 4])[0] self.index += 4 return tmp def ReadInt16(self): tmp = struct.unpack("<h", self.buffer[self.index : self.index + 2])[0] self.index += 2 return tmp def ReadUInt16(self): tmp = struct.unpack("<H", self.buffer[self.index : self.index + 2])[0] self.index += 2 return tmp def ReadInt32(self): tmp = struct.unpack("<i", self.buffer[self.index : self.index + 4])[0] self.index += 4 return tmp def ReadUInt32(self): tmp = struct.unpack("<I", self.buffer[self.index : self.index + 4])[0] self.index += 4 return tmp def ReadInt64(self): tmp = struct.unpack("<q", self.buffer[self.index : self.index + 8])[0] self.index += 8 return tmp def ReadUInt64(self): tmp = struct.unpack("<Q", self.buffer[self.index : self.index + 8])[0] self.index += 8 return tmp def ReadBoolean(self): tmp = struct.unpack("<?", self.buffer[self.index : self.index + 1])[0] self.index += 1 return tmp def ReadString8(self): """ length: 8 bit unsigned integer """ length = self.ReadByte() return self.ReadStringBytes(length) def ReadString16(self): length = self.ReadUInt16() return self.ReadStringBytes(length) def ReadString32(self): length = self.ReadUInt32() return self.ReadStringBytes(length) def ReadStringBytes(self, length): tmp = struct.unpack("<{}s".format(length), self.buffer[self.index : self.index + length])[0].decode() self.index += length return tmp
24.530864
103
0.669351
290
1,987
4.572414
0.213793
0.230769
0.126697
0.171946
0.523379
0.446456
0.404223
0.404223
0.404223
0.404223
0
0.032357
0.175642
1,987
80
104
24.8375
0.777167
0.060896
0
0.389831
0
0
0.011866
0
0
0
0
0
0
1
0.271186
false
0
0.016949
0.016949
0.559322
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
bf23bc2fbb5f634738b11ad2600d9614a6ba935b
143
py
Python
src/bin/ntlm3/compat.py
amanttr/splunk-website-monitoring
4c8093eebda32892c173e23a1e535cded1311ebd
[ "MIT" ]
208
2015-01-08T18:14:02.000Z
2022-03-31T02:45:42.000Z
src/bin/ntlm3/compat.py
amanttr/splunk-website-monitoring
4c8093eebda32892c173e23a1e535cded1311ebd
[ "MIT" ]
279
2015-01-16T16:30:35.000Z
2020-03-31T11:57:47.000Z
src/bin/ntlm3/compat.py
amanttr/splunk-website-monitoring
4c8093eebda32892c173e23a1e535cded1311ebd
[ "MIT" ]
164
2015-01-21T13:49:05.000Z
2021-12-01T18:13:05.000Z
def _long(value): try: return long(value) except NameError: # we're Python 3, we don't have longs return int(value)
17.875
60
0.601399
21
143
4.047619
0.761905
0.211765
0
0
0
0
0
0
0
0
0
0.010101
0.307692
143
7
61
20.428571
0.848485
0.244755
0
0
0
0
0
0
0
0
0
0
0
1
0.2
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
0
0
0
0
0
1
0
0
4
bf351a83f522449bc9020fd8a236537067fe9c7e
10,611
py
Python
tiff/test_parcels.py
anatoliy-kuznetsov/terrain
4d20b836f62f136589c56cae05e77c5ebe48e4c2
[ "MIT" ]
null
null
null
tiff/test_parcels.py
anatoliy-kuznetsov/terrain
4d20b836f62f136589c56cae05e77c5ebe48e4c2
[ "MIT" ]
null
null
null
tiff/test_parcels.py
anatoliy-kuznetsov/terrain
4d20b836f62f136589c56cae05e77c5ebe48e4c2
[ "MIT" ]
2
2021-02-05T23:15:13.000Z
2021-04-10T18:22:44.000Z
import logging import unittest import numpy from tiff import parcels class TestParcels(unittest.TestCase): def test_build_flanges(self): dataset = numpy.ones((20, 22)) config = { "model": { "surface_thickness_millimeters": 1.0, "flange_thickness_millimeters": 1000.0, }, "printer": { "xy_resolution_microns": 1000.0, } } parcel_shape = (7, 6) with_flanges = parcels.build_flanges(config, dataset, parcel_shape, logging.getLogger("test")) expected = numpy.array([ [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], ]).astype(numpy.float32) numpy.testing.assert_array_equal(with_flanges, expected) def test_parcels(self): # we want to be able to visually identify if there's an item not in the correct parcel, so we can create # a 2D array here where the X and Y coordinates are visually distinct by shifting one of them out by two # orders of magnitude, so the value mod 100 is one index and the value / 100 is the other - this array # will look like: # [ 0, 1, 2, 3 ... 20, 21] - row 0 # [ 100, 101, 102, 103 ... 1020, 1021] - row 1 # ... # [ 1900, 1901, 1912, 1913 ... 1920, 1921] - row 19 dataset = numpy.arange(20).reshape(20, 1) * 100 + numpy.arange(22) actual = [parcel for index, parcel in parcels.parcels(dataset, (7, 6))] expected = [ [[0, 1, 2, 3, 4, 5], [100, 101, 102, 103, 104, 105], [200, 201, 202, 203, 204, 205], [300, 301, 302, 303, 304, 305], [400, 401, 402, 403, 404, 405], [500, 501, 502, 503, 504, 505], [600, 601, 602, 603, 604, 605]], [[6, 7, 8, 9, 10, 11], [106, 107, 108, 109, 110, 111], [206, 207, 208, 209, 210, 211], [306, 307, 308, 309, 310, 311], [406, 407, 408, 409, 410, 411], [506, 507, 508, 509, 510, 511], [606, 607, 608, 609, 610, 611]], [[12, 13, 14, 15, 16, 17], [112, 113, 114, 115, 116, 117], [212, 213, 214, 215, 216, 217], [312, 313, 314, 315, 316, 317], [412, 413, 414, 415, 416, 417], [512, 513, 514, 515, 516, 517], [612, 613, 614, 615, 616, 617]], [[18, 19, 20, 21], [118, 119, 120, 121], [218, 219, 220, 221], [318, 319, 320, 321], [418, 419, 420, 421], [518, 519, 520, 521], [618, 619, 620, 621]], [[700, 701, 702, 703, 704, 705], [800, 801, 802, 803, 804, 805], [900, 901, 902, 903, 904, 905], [1000, 1001, 1002, 1003, 1004, 1005], [1100, 1101, 1102, 1103, 1104, 1105], [1200, 1201, 1202, 1203, 1204, 1205], [1300, 1301, 1302, 1303, 1304, 1305]], [[706, 707, 708, 709, 710, 711], [806, 807, 808, 809, 810, 811], [906, 907, 908, 909, 910, 911], [1006, 1007, 1008, 1009, 1010, 1011], [1106, 1107, 1108, 1109, 1110, 1111], [1206, 1207, 1208, 1209, 1210, 1211], [1306, 1307, 1308, 1309, 1310, 1311]], [[712, 713, 714, 715, 716, 717], [812, 813, 814, 815, 816, 817], [912, 913, 914, 915, 916, 917], [1012, 1013, 1014, 1015, 1016, 1017], [1112, 1113, 1114, 1115, 1116, 1117], [1212, 1213, 1214, 1215, 1216, 1217], [1312, 1313, 1314, 1315, 1316, 1317]], [[718, 719, 720, 721], [818, 819, 820, 821], [918, 919, 920, 921], [1018, 1019, 1020, 1021], [1118, 1119, 1120, 1121], [1218, 1219, 1220, 1221], [1318, 1319, 1320, 1321]], [[1400, 1401, 1402, 1403, 1404, 1405], [1500, 1501, 1502, 1503, 1504, 1505], [1600, 1601, 1602, 1603, 1604, 1605], [1700, 1701, 1702, 1703, 1704, 1705], [1800, 1801, 1802, 1803, 1804, 1805], [1900, 1901, 1902, 1903, 1904, 1905]], [[1406, 1407, 1408, 1409, 1410, 1411], [1506, 1507, 1508, 1509, 1510, 1511], [1606, 1607, 1608, 1609, 1610, 1611], [1706, 1707, 1708, 1709, 1710, 1711], [1806, 1807, 1808, 1809, 1810, 1811], [1906, 1907, 1908, 1909, 1910, 1911]], [[1412, 1413, 1414, 1415, 1416, 1417], [1512, 1513, 1514, 1515, 1516, 1517], [1612, 1613, 1614, 1615, 1616, 1617], [1712, 1713, 1714, 1715, 1716, 1717], [1812, 1813, 1814, 1815, 1816, 1817], [1912, 1913, 1914, 1915, 1916, 1917]], [[1418, 1419, 1420, 1421], [1518, 1519, 1520, 1521], [1618, 1619, 1620, 1621], [1718, 1719, 1720, 1721], [1818, 1819, 1820, 1821], [1918, 1919, 1920, 1921]] ] self.assertEqual(len(actual), len(expected)) for i in range(len(actual)): numpy.testing.assert_array_equal(actual[i], expected[i]) def test_parcel_with_flanges(self): dataset = numpy.ones((20, 22)) config = { "model": { "surface_thickness_millimeters": 1.0, "flange_thickness_millimeters": 1000.0, }, "printer": { "xy_resolution_microns": 1000.0, } } parcel_shape = (7, 6) with_flanges = parcels.build_flanges(config, dataset, parcel_shape, logging.getLogger("test")) actual = [parcel for index, parcel in parcels.parcels(with_flanges, parcel_shape)] expected = [ [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0., 0., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 1., 1., 1., 1., 0.], [0., 0., 0., 0., 0., 0.]], [[0., 0., 0., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 1., 1., 0.], [0., 0., 0., 0.]]] self.assertEqual(len(actual), len(expected)) for i in range(len(actual)): numpy.testing.assert_array_equal(actual[i], expected[i]) if __name__ == '__main__': unittest.main()
43.134146
112
0.358496
1,614
10,611
2.330235
0.332714
0.198883
0.207392
0.258442
0.433395
0.425951
0.425951
0.425951
0.403616
0.403616
0
0.400866
0.412025
10,611
245
113
43.310204
0.201955
0.044671
0
0.545852
0
0
0.019352
0.015403
0
0
0
0
0.021834
1
0.0131
false
0
0.017467
0
0.034935
0.008734
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
170cc493b2846ff1b8972d6102d4eda217d210a6
244
py
Python
Reading Data/lesson-4-tsv-with-the-simpsons-episodes/main.py
danielgarm/Data-Science-and-Machine-Learning
fa3e85cc42eb2e9f964ab5abb34d1c93e16d1cd9
[ "MIT" ]
null
null
null
Reading Data/lesson-4-tsv-with-the-simpsons-episodes/main.py
danielgarm/Data-Science-and-Machine-Learning
fa3e85cc42eb2e9f964ab5abb34d1c93e16d1cd9
[ "MIT" ]
2
2022-01-11T21:04:51.000Z
2022-01-11T21:05:05.000Z
Reading Data/lesson-4-tsv-with-the-simpsons-episodes/main.py
danielgarm/Data-Science-and-Machine-Learning
fa3e85cc42eb2e9f964ab5abb34d1c93e16d1cd9
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd col_names = ['Title', 'Air date', 'Production code', 'Season', 'Number in season', 'Number in series', 'US viewers (million)', 'Views', 'IMDB rating']
34.857143
82
0.536885
28
244
4.642857
0.821429
0.184615
0.215385
0
0
0
0
0
0
0
0
0
0.336066
244
7
83
34.857143
0.802469
0
0
0
0
0
0.416327
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
1723983d1ec47843ac0f63f2b78b9010c2f43e7a
38
py
Python
Vamei/loop/forDemo.py
YangPhy/learnPython
5507fa1a0d2878fc663d62509af8ff959955f822
[ "MIT" ]
5
2020-05-18T06:54:52.000Z
2021-05-29T23:17:41.000Z
Vamei/loop/forDemo.py
YangPhy/learnPython
5507fa1a0d2878fc663d62509af8ff959955f822
[ "MIT" ]
null
null
null
Vamei/loop/forDemo.py
YangPhy/learnPython
5507fa1a0d2878fc663d62509af8ff959955f822
[ "MIT" ]
1
2020-05-17T22:47:49.000Z
2020-05-17T22:47:49.000Z
for a in [3,4,4,'life']: print(a)
12.666667
24
0.5
9
38
2.111111
0.777778
0
0
0
0
0
0
0
0
0
0
0.103448
0.236842
38
2
25
19
0.551724
0
0
0
0
0
0.105263
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4
172497c62b216455042f9d6f02342c18c924c2ab
155
py
Python
mymetric.py
sararidder/hiring-engineers
9d752e1167a81f8994c85d16dcaa8fbf7d1b1e1e
[ "Apache-2.0" ]
1
2020-03-22T00:07:06.000Z
2020-03-22T00:07:06.000Z
mymetric.py
sararidder/hiring-engineers
9d752e1167a81f8994c85d16dcaa8fbf7d1b1e1e
[ "Apache-2.0" ]
null
null
null
mymetric.py
sararidder/hiring-engineers
9d752e1167a81f8994c85d16dcaa8fbf7d1b1e1e
[ "Apache-2.0" ]
null
null
null
import random from checks import AgentCheck class RandomCheck(AgentCheck): def check(self, instance): self.gauge('my_metric', random.randint(0, 1000))
25.833333
51
0.774194
21
155
5.666667
0.809524
0
0
0
0
0
0
0
0
0
0
0.036496
0.116129
155
5
52
31
0.832117
0
0
0
0
0
0.058065
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
172839006443da3f1492e8b14df5fdb6c2815c25
90
py
Python
Symmetric Difference.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
Symmetric Difference.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
Symmetric Difference.py
jibinmathew691993/PythonHackerrank
14ab5b620435a006d5ccff17536bc01acd7c22dc
[ "MIT" ]
null
null
null
a,b = [set(input().split()) for _ in range(4)][1::2] print(*sorted(a^b,key=int), sep="\n")
45
52
0.577778
19
90
2.684211
0.894737
0.078431
0
0
0
0
0
0
0
0
0
0.036585
0.088889
90
2
53
45
0.585366
0
0
0
0
0
0.021978
0
0
0
0
0
0
1
0
true
0
0
0
0
0.5
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
1728ef58b09ac1210472081192050110f5f93784
22
py
Python
indeterminatebeam/version.py
JesseBonanno/IndeterminateBeam
c28814cd0529d323f862df496faa19e75be4742d
[ "MIT" ]
13
2021-04-07T15:24:02.000Z
2022-03-17T15:43:09.000Z
indeterminatebeam/version.py
JesseBonanno/IndeterminateBeam
c28814cd0529d323f862df496faa19e75be4742d
[ "MIT" ]
25
2020-12-17T21:19:13.000Z
2022-01-11T08:49:14.000Z
indeterminatebeam/version.py
JesseBonanno/IndeterminateBeam
c28814cd0529d323f862df496faa19e75be4742d
[ "MIT" ]
4
2021-01-10T16:54:03.000Z
2021-12-26T22:26:43.000Z
__version__ = 'v2.1.6'
22
22
0.681818
4
22
2.75
1
0
0
0
0
0
0
0
0
0
0
0.15
0.090909
22
1
22
22
0.4
0
0
0
0
0
0.26087
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
177a193b8eb436cf9912a15257f51a4102b19d0a
150
py
Python
social_auth/backends/contrib/linkedin.py
merutak/django-social-auth
3a6e4414da0e969fcaf625a891852a3b2d7627c0
[ "BSD-2-Clause", "BSD-3-Clause" ]
863
2015-01-01T00:42:07.000Z
2022-03-30T02:47:18.000Z
social_auth/backends/contrib/linkedin.py
merutak/django-social-auth
3a6e4414da0e969fcaf625a891852a3b2d7627c0
[ "BSD-2-Clause", "BSD-3-Clause" ]
101
2015-01-08T00:28:16.000Z
2022-03-07T03:11:19.000Z
social_auth/backends/contrib/linkedin.py
merutak/django-social-auth
3a6e4414da0e969fcaf625a891852a3b2d7627c0
[ "BSD-2-Clause", "BSD-3-Clause" ]
256
2015-01-02T16:55:36.000Z
2022-03-04T11:10:47.000Z
from social.backends.linkedin import LinkedinOAuth as LinkedinBackend, \ LinkedinOAuth2 as LinkedinOAuth2Backend
50
76
0.66
11
150
9
0.909091
0
0
0
0
0
0
0
0
0
0
0.019417
0.313333
150
2
77
75
0.941748
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
178d10ce2e9486134b984e3c2337bcbb8911a174
955
py
Python
pybrain/structure/modules/__init__.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
2,208
2015-01-02T02:14:41.000Z
2022-03-31T04:45:46.000Z
pybrain/structure/modules/__init__.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
91
2015-01-08T16:42:16.000Z
2021-12-11T19:16:35.000Z
pybrain/structure/modules/__init__.py
sveilleux1/pybrain
1e1de73142c290edb84e29ca7850835f3e7bca8b
[ "BSD-3-Clause" ]
786
2015-01-02T15:18:20.000Z
2022-02-23T23:42:40.000Z
from pybrain.structure.modules.biasunit import BiasUnit from pybrain.structure.modules.gate import GateLayer, DoubleGateLayer, MultiplicationLayer, SwitchLayer from pybrain.structure.modules.gaussianlayer import GaussianLayer from pybrain.structure.modules.linearlayer import LinearLayer from pybrain.structure.modules.lstm import LSTMLayer from pybrain.structure.modules.mdlstm import MDLSTMLayer from pybrain.structure.modules.mdrnnlayer import MdrnnLayer from pybrain.structure.modules.sigmoidlayer import SigmoidLayer from pybrain.structure.modules.softmax import SoftmaxLayer, PartialSoftmaxLayer from pybrain.structure.modules.statedependentlayer import StateDependentLayer from pybrain.structure.modules.tanhlayer import TanhLayer from pybrain.structure.modules.kohonen import KohonenMap from pybrain.structure.modules.table import Table from pybrain.structure.modules.module import Module from pybrain.structure.modules.relulayer import ReluLayer
59.6875
103
0.881675
109
955
7.724771
0.266055
0.195962
0.356295
0.480998
0
0
0
0
0
0
0
0
0.067016
955
15
104
63.666667
0.945006
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
179bf6f6aa0bf85f6780a8706b3a9e68f172d2bb
169
py
Python
Aula02/Aula02Listas.py
leonardogt4/Curso-Introdu-o-a-Python---Univali
7f2a7c46b8ddf72391e58f22099d3d8ec91cbf7b
[ "MIT" ]
2
2019-03-08T21:21:03.000Z
2019-03-08T21:21:16.000Z
Aula02/Aula02Listas.py
leonardogt4/Curso-Introdu-o-a-Python---Univali
7f2a7c46b8ddf72391e58f22099d3d8ec91cbf7b
[ "MIT" ]
null
null
null
Aula02/Aula02Listas.py
leonardogt4/Curso-Introdu-o-a-Python---Univali
7f2a7c46b8ddf72391e58f22099d3d8ec91cbf7b
[ "MIT" ]
null
null
null
#!usr/bin/python lista = ['física', 'química', 1997, 2000] print("Valor do indice 2:") print (lista[2]) lista[2] = 2001; print("Valor do índice 2:") print (lista[2])
15.363636
41
0.639053
27
169
4
0.555556
0.166667
0.222222
0.222222
0
0
0
0
0
0
0
0.118056
0.147929
169
10
42
16.9
0.631944
0.088757
0
0.333333
0
0
0.324503
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
4