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
2f4cbf6df3c42ac3a68d832aa94584363c91605e
249
py
Python
DjangoWebSocket/myDjango/myDjango/routing.py
ondraw/Tutorial
6885d4cc961ef00f5d165d7e5eb8beb856fad795
[ "Apache-2.0" ]
null
null
null
DjangoWebSocket/myDjango/myDjango/routing.py
ondraw/Tutorial
6885d4cc961ef00f5d165d7e5eb8beb856fad795
[ "Apache-2.0" ]
null
null
null
DjangoWebSocket/myDjango/myDjango/routing.py
ondraw/Tutorial
6885d4cc961ef00f5d165d7e5eb8beb856fad795
[ "Apache-2.0" ]
null
null
null
from channels.auth import AuthMiddlewareStack from channels.routing import ProtocolTypeRouter, URLRouter import songs.routing application = ProtocolTypeRouter({ 'websocket': AuthMiddlewareStack(URLRouter(songs.routing.websocket_urlpatterns)) })
35.571429
84
0.843373
23
249
9.086957
0.521739
0.114833
0
0
0
0
0
0
0
0
0
0
0.084337
249
7
85
35.571429
0.916667
0
0
0
0
0
0.036
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
2f50c21716cd5a31cb3ecd7f3677cb8b454a3446
4,293
py
Python
aliyun-python-sdk-market/aliyunsdkmarket/request/v20151101/DescribeCommoditiesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-market/aliyunsdkmarket/request/v20151101/DescribeCommoditiesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-market/aliyunsdkmarket/request/v20151101/DescribeCommoditiesRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you 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. from aliyunsdkcore.request import RpcRequest from aliyunsdkmarket.endpoint import endpoint_data class DescribeCommoditiesRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Market', '2015-11-01', 'DescribeCommodities','yunmarket') if hasattr(self, "endpoint_map"): setattr(self, "endpoint_map", endpoint_data.getEndpointMap()) if hasattr(self, "endpoint_regional"): setattr(self, "endpoint_regional", endpoint_data.getEndpointRegional()) def get_CommodityGmtModifiedTo(self): return self.get_query_params().get('CommodityGmtModifiedTo') def set_CommodityGmtModifiedTo(self,CommodityGmtModifiedTo): self.add_query_param('CommodityGmtModifiedTo',CommodityGmtModifiedTo) def get_CommodityGmtModifiedFrom(self): return self.get_query_params().get('CommodityGmtModifiedFrom') def set_CommodityGmtModifiedFrom(self,CommodityGmtModifiedFrom): self.add_query_param('CommodityGmtModifiedFrom',CommodityGmtModifiedFrom) def get_CommodityId(self): return self.get_query_params().get('CommodityId') def set_CommodityId(self,CommodityId): self.add_query_param('CommodityId',CommodityId) def get_CommodityGmtPublishFrom(self): return self.get_query_params().get('CommodityGmtPublishFrom') def set_CommodityGmtPublishFrom(self,CommodityGmtPublishFrom): self.add_query_param('CommodityGmtPublishFrom',CommodityGmtPublishFrom) def get_CommodityStatuses(self): return self.get_query_params().get('CommodityStatuses') def set_CommodityStatuses(self,CommodityStatuses): self.add_query_param('CommodityStatuses',CommodityStatuses) def get_PageNumber(self): return self.get_query_params().get('PageNumber') def set_PageNumber(self,PageNumber): self.add_query_param('PageNumber',PageNumber) def get_CommodityGmtCreatedFrom(self): return self.get_query_params().get('CommodityGmtCreatedFrom') def set_CommodityGmtCreatedFrom(self,CommodityGmtCreatedFrom): self.add_query_param('CommodityGmtCreatedFrom',CommodityGmtCreatedFrom) def get_CommodityIds(self): return self.get_query_params().get('CommodityIds') def set_CommodityIds(self,CommodityIds): self.add_query_param('CommodityIds',CommodityIds) def get_CommodityGmtCreatedTo(self): return self.get_query_params().get('CommodityGmtCreatedTo') def set_CommodityGmtCreatedTo(self,CommodityGmtCreatedTo): self.add_query_param('CommodityGmtCreatedTo',CommodityGmtCreatedTo) def get_PageSize(self): return self.get_query_params().get('PageSize') def set_PageSize(self,PageSize): self.add_query_param('PageSize',PageSize) def get_CommodityGmtPublishTo(self): return self.get_query_params().get('CommodityGmtPublishTo') def set_CommodityGmtPublishTo(self,CommodityGmtPublishTo): self.add_query_param('CommodityGmtPublishTo',CommodityGmtPublishTo) def get_CommodityAuditStatuses(self): return self.get_query_params().get('CommodityAuditStatuses') def set_CommodityAuditStatuses(self,CommodityAuditStatuses): self.add_query_param('CommodityAuditStatuses',CommodityAuditStatuses) def get_Properties(self): return self.get_query_params().get('Properties') def set_Properties(self,Properties): self.add_query_param('Properties',Properties) def get_CommodityCategoryIds(self): return self.get_query_params().get('CommodityCategoryIds') def set_CommodityCategoryIds(self,CommodityCategoryIds): self.add_query_param('CommodityCategoryIds',CommodityCategoryIds)
37.330435
86
0.797112
478
4,293
6.951883
0.248954
0.025278
0.058983
0.071622
0.130605
0.130605
0.130605
0
0
0
0
0.003144
0.110878
4,293
115
87
37.330435
0.867435
0.175635
0
0
0
0
0.171661
0.090777
0
0
0
0
0
1
0.446154
false
0
0.030769
0.215385
0.707692
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
2f6a75e65ccf0ed1aa490dc7c2bb7f8c5b6d64b0
708
py
Python
google_workspace/gmail/scopes.py
dermasmid/google-workspace
b413df08bea7f453a2430ef65ece49499cbda736
[ "MIT" ]
61
2021-09-22T10:59:14.000Z
2022-02-17T15:54:16.000Z
google_workspace/gmail/scopes.py
dermasmid/python-google-workspace
59f3bde10db078fb57334e7909bc1ac16d3e9150
[ "MIT" ]
2
2021-11-23T18:20:20.000Z
2022-01-03T10:25:58.000Z
google_workspace/gmail/scopes.py
dermasmid/python-google-workspace
59f3bde10db078fb57334e7909bc1ac16d3e9150
[ "MIT" ]
2
2021-11-09T10:58:14.000Z
2022-01-11T23:28:42.000Z
FULL_ACCESS_GMAIL_SCOPE = "https://mail.google.com/" LABELS_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.labels" SEND_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.send" READ_ONLY_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.readonly" COMPOSE_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.compose" INSERT_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.insert" MODIFY_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.modify" METADATA_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.metadata" SETTINGS_BASIC_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.settings.basic" SETTINGS_SHARING_GMAIL_SCOPE = "https://www.googleapis.com/auth/gmail.settings.sharing"
64.363636
87
0.80226
103
708
5.281553
0.223301
0.183824
0.275735
0.297794
0.691176
0.691176
0.691176
0.691176
0.176471
0
0
0
0.042373
708
10
88
70.8
0.80236
0
0
0
0
0
0.622881
0
0
0
0
0
0
1
0
false
0
0
0
0
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
2f84efa622d81807239815bb9331ee3f84285ca1
162
py
Python
snakey_monitoring/line_processor/logging_line_processor.py
samuel-flynn/snakey-monitoring
838d2db831bce006f378ffbbb177954044f28f22
[ "MIT" ]
null
null
null
snakey_monitoring/line_processor/logging_line_processor.py
samuel-flynn/snakey-monitoring
838d2db831bce006f378ffbbb177954044f28f22
[ "MIT" ]
null
null
null
snakey_monitoring/line_processor/logging_line_processor.py
samuel-flynn/snakey-monitoring
838d2db831bce006f378ffbbb177954044f28f22
[ "MIT" ]
null
null
null
import logging class logging_line_processor: __LOGGER = logging.getLogger(__name__) async def process_line(self, line): self.__LOGGER.info(line)
23.142857
42
0.740741
20
162
5.45
0.65
0.146789
0
0
0
0
0
0
0
0
0
0
0.179012
162
7
43
23.142857
0.819549
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.2
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
0
0
1
0
0
3
2f91968561c880a5d05eee7ed4a6032b007f9724
10,968
py
Python
tests/test_jit/perftarget/arraysum.py
jstnlef/zebu-vm
8a1cb223761d8996d14d332c62fcd34404e3282e
[ "Apache-2.0" ]
2
2019-01-18T07:59:02.000Z
2021-05-28T20:21:26.000Z
tests/test_jit/perftarget/arraysum.py
qinsoon/zebu
6f6475568e38696b129cf81ff4d5ab0ea1f688cb
[ "Apache-2.0" ]
null
null
null
tests/test_jit/perftarget/arraysum.py
qinsoon/zebu
6f6475568e38696b129cf81ff4d5ab0ea1f688cb
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Australian National University # # 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. from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rlib.jit import JitDriver d = JitDriver(greens=[], reds='auto') def arraysum(arr, sz): sum = rffi.r_longlong(0) for i in range(sz): d.jit_merge_point() sum += arr[i] return sum def setup(n): lst, _ = rand_list_of(n) arr = lltype.malloc(rffi.CArray(rffi.LONGLONG), n, flavor='raw') for i, k in enumerate(lst): arr[i] = k return arr, rffi.cast(lltype.Unsigned, n) def teardown(arr, n): lltype.free(arr, 'raw') def rand_list_of(n): # 32 extend to 64-bit integers (to avoid overflow in summation from random import randrange, setstate init_state = (3, ( 2147483648L, 3430835514L, 2928424416L, 3147699060L, 2823572732L, 2905216632L, 1887281517L, 14272356L, 1356039141L, 2741361235L, 1824725388L, 2228169284L, 2679861265L, 3150239284L, 657657570L, 1407124159L, 517316568L, 653526369L, 139268705L, 3784719953L, 2212355490L, 3452491289L, 1232629882L, 1791207424L, 2898278956L, 1147783320L, 1824413680L, 1993303973L, 2568444883L, 4228847642L, 4163974668L, 385627078L, 3663560714L, 320542554L, 1565882322L, 3416481154L, 4219229298L, 315071254L, 778331393L, 3961037651L, 2951403614L, 3355970261L, 102946340L, 2509883952L, 215897963L, 3361072826L, 689991350L, 3348092598L, 1763608447L, 2140226443L, 3813151178L, 2619956936L, 51244592L, 2130725065L, 3867113849L, 1980820881L, 2600246771L, 3207535572L, 257556968L, 2223367443L, 3706150033L, 1711074250L, 4252385224L, 3197142331L, 4139558716L, 748471849L, 2281163369L, 2596250092L, 2804492653L, 484240110L, 3726117536L, 2483815933L, 2173995598L, 3765136999L, 3178931194L, 1237068319L, 3427263384L, 3958412830L, 2268556676L, 360704423L, 4113430429L, 3758882140L, 3743971788L, 1685454939L, 488386L, 3511218911L, 3020688912L, 2168345327L, 3149651862L, 1472484695L, 2011779229L, 1112533726L, 1873931730L, 2196153055L, 3806225492L, 1515074892L, 251489714L, 1958141723L, 2081062631L, 3703490262L, 3211541213L, 1436109217L, 2664448365L, 2350764370L, 1285829042L, 3496997759L, 2306637687L, 1571644344L, 1020052455L, 3114491401L, 2994766034L, 1518527036L, 994512437L, 1732585804L, 2089330296L, 2592371643L, 2377347339L, 2617648350L, 1478066246L, 389918052L, 1126787130L, 2728695369L, 2921719205L, 3193658789L, 2101782606L, 4284039483L, 2704867468L, 3843423543L, 119359906L, 1882384901L, 832276556L, 1862974878L, 1943541262L, 1823624942L, 2146680272L, 333006125L, 929197835L, 639017219L, 1640196300L, 1424826762L, 2119569013L, 4259272802L, 2089277168L, 2030198981L, 2950559216L, 621654826L, 3452546704L, 4085446289L, 3038316311L, 527272378L, 1679817853L, 450787204L, 3525043861L, 3838351358L, 1558592021L, 3649888848L, 3328370698L, 3247166155L, 3855970537L, 1183088418L, 2778702834L, 2820277014L, 1530905121L, 1434023607L, 3942716950L, 41643359L, 310637634L, 1537174663L, 4265200088L, 3126624846L, 2837665903L, 446994733L, 85970060L, 643115053L, 1751804182L, 1480207958L, 2977093071L, 544778713L, 738954842L, 3370733859L, 3242319053L, 2707786138L, 4041098196L, 1671493839L, 3420415077L, 2473516599L, 3949211965L, 3686186772L, 753757988L, 220738063L, 772481263L, 974568026L, 3190407677L, 480257177L, 3620733162L, 2616878358L, 665763320L, 2808607644L, 3851308236L, 3633157256L, 4240746864L, 1261222691L, 268963935L, 1449514350L, 4229662564L, 1342533852L, 1913674460L, 1761163533L, 1974260074L, 739184472L, 3811507072L, 2880992381L, 3998389163L, 2673626426L, 2212222504L, 231447607L, 2608719702L, 3509764733L, 2403318909L, 635983093L, 4233939991L, 2894463467L, 177171270L, 2962364044L, 1191007101L, 882222586L, 1004217833L, 717897978L, 2125381922L, 626199402L, 3694698943L, 1373935523L, 762314613L, 2291077454L, 2111081024L, 3758576304L, 2812129656L, 4067461097L, 3700761868L, 2281420733L, 197217625L, 460620692L, 506837624L, 1532931238L, 3872395078L, 3629107738L, 2273221134L, 2086345980L, 1240615886L, 958420495L, 4059583254L, 3119201875L, 3742950862L, 891360845L, 2974235885L, 87814219L, 4067521161L, 615939803L, 1881195074L, 2225917026L, 2775128741L, 2996201447L, 1590546624L, 3960431955L, 1417477945L, 913935155L, 1610033170L, 3212701447L, 2545374014L, 2887105562L, 2991635417L, 3194532260L, 1565555757L, 2142474733L, 621483430L, 2268177481L, 919992760L, 2022043644L, 2756890220L, 881105937L, 2621060794L, 4262292201L, 480112895L, 2557060162L, 2367031748L, 2172434102L, 296539623L, 3043643256L, 59166373L, 2947638193L, 1312917612L, 1798724013L, 75864164L, 339661149L, 289536004L, 422147716L, 1134944052L, 1095534216L, 1231984277L, 239787072L, 923053211L, 1015393503L, 2558889580L, 4194512643L, 448088150L, 707905706L, 2649061310L, 3081089715L, 3432955562L, 2217740069L, 1965789353L, 3320360228L, 3625802364L, 2420747908L, 3116949010L, 442654625L, 2157578112L, 3603825090L, 3111995525L, 1124579902L, 101836896L, 3297125816L, 136981134L, 4253748197L, 3809600572L, 1668193778L, 4146759785L, 3712590372L, 2998653463L, 3032597504L, 1046471011L, 2843821193L, 802959497L, 3307715534L, 3226042258L, 1014478160L, 3105844949L, 3209150965L, 610876993L, 2563947590L, 2482526324L, 3913970138L, 2812702315L, 4281779167L, 1026357391L, 2579486306L, 402208L, 3457975059L, 1714004950L, 2543595755L, 2421499458L, 478932497L, 3117588180L, 1565800974L, 1757724858L, 1483685124L, 2262270397L, 3794544469L, 3986696110L, 2914756339L, 1952061826L, 2672480198L, 3793151752L, 309930721L, 1861137379L, 94571340L, 1162935802L, 3681554226L, 4027302061L, 21079572L, 446709644L, 1587253187L, 1845056582L, 3080553052L, 3575272255L, 2526224735L, 3569822959L, 2685900491L, 918305237L, 1399881227L, 1554912161L, 703181091L, 738501299L, 269937670L, 1078548118L, 2313670525L, 3495159622L, 2659487842L, 11394628L, 1222454456L, 3392065094L, 3426833642L, 1153231613L, 1234517654L, 3144547626L, 2148039080L, 3790136587L, 684648337L, 3956093475L, 1384378197L, 2042781475L, 759764431L, 222267088L, 3187778457L, 3795259108L, 2817237549L, 3494781277L, 3762880618L, 892345749L, 2153484401L, 721588894L, 779278769L, 3306398772L, 4221452913L, 1981375723L, 379087895L, 1604791625L, 1426046977L, 4231163093L, 1344994557L, 1341041093L, 1072537134L, 1829925137L, 3791772627L, 3176876700L, 2553745117L, 664821113L, 473469583L, 1076256869L, 2406012795L, 3141453822L, 4123012649L, 3058620143L, 1785080140L, 1181483189L, 3587874749L, 1453504375L, 707249496L, 2022787257L, 2436320047L, 602521701L, 483826957L, 821599664L, 3333871672L, 3024431570L, 3814441382L, 416508285L, 1217138244L, 3975201118L, 3077724941L, 180118569L, 3754556886L, 4121534265L, 3495283397L, 700504668L, 3113972067L, 719371171L, 910731026L, 619936911L, 2937105529L, 2039892965L, 3853404454L, 3783801801L, 783321997L, 1135195902L, 326690505L, 1774036419L, 3476057413L, 1518029608L, 1248626026L, 427510490L, 3443223611L, 4087014505L, 2858955517L, 1918675812L, 3921514056L, 3929126528L, 4048889933L, 1583842117L, 3742539544L, 602292017L, 3393759050L, 3929818519L, 3119818281L, 3472644693L, 1993924627L, 4163228821L, 2943877721L, 3143487730L, 4087113198L, 1149082355L, 1713272081L, 1243627655L, 3511633996L, 3358757220L, 3812981394L, 650044449L, 2143650644L, 3869591312L, 3719322297L, 386030648L, 2633538573L, 672966554L, 3498396042L, 3907556L, 2308686209L, 2878779858L, 1475925955L, 2701537395L, 1448018484L, 2962578755L, 1383479284L, 3731453464L, 3659512663L, 1521189121L, 843749206L, 2243090279L, 572717972L, 3400421356L, 3440777300L, 1393518699L, 1681924551L, 466257295L, 568413244L, 3288530316L, 2951425105L, 2624424893L, 2410788864L, 2243174464L, 1385949609L, 2454100663L, 1113953725L, 2127471443L, 1775715557L, 3874125135L, 1901707926L, 3152599339L, 2277843623L, 1941785089L, 3171888228L, 802596998L, 3397391306L, 1743834429L, 395463904L, 2099329462L, 3761809163L, 262702111L, 1868879810L, 2887406426L, 1160032302L, 4164116477L, 2287740849L, 3312176050L, 747117003L, 4048006270L, 3955419375L, 2724452926L, 3141695820L, 791246424L, 524525849L, 1794277132L, 295485241L, 4125127474L, 825108028L, 1582794137L, 1259992755L, 2938829230L, 912029932L, 1534496985L, 3075283272L, 4052041116L, 1125808104L, 2032938837L, 4008676545L, 1638361535L, 1649316497L, 1302633381L, 4221627277L, 1206130263L, 3114681993L, 3409690900L, 3373263243L, 2922903613L, 349048087L, 4049532385L, 3458779287L, 1737687814L, 287275672L, 645786941L, 1492233180L, 3925845678L, 3344829077L, 1669219217L, 665224162L, 2679234088L, 1986576411L, 50610077L, 1080114376L, 1881648396L, 3818465156L, 1486861008L, 3824208930L, 1782008170L, 4115911912L, 656413265L, 771498619L, 2709443211L, 1919820065L, 451888753L, 1449812173L, 2001941180L, 2997921765L, 753032713L, 3011517640L, 2386888602L, 3181040472L, 1280522185L, 1036471598L, 1243809973L, 2985144032L, 2238294821L, 557934351L, 347132246L, 1797956016L, 624L), None) setstate(init_state) return [rffi.r_longlong(randrange(-(1 << 31), (1 << 31) - 1)) for _ in range(n)] def measure(N): args = setup(N) from time import time t0 = time() arraysum(*args) t1 = time() teardown(*args) return t0, t1 def rpy_entry(N): t0, t1 = measure(N) # from rpython.rlib import rfloat # print rfloat.double_to_string(t1 - t0, 'e', %(fprec)d, rfloat.DTSF_ADD_DOT_0) return t1 - t0 if __name__ == '__main__': import sys t0, t1 = measure(int(sys.argv[1])) print '%.15f' % (t1 - t0) def target(*args): from rpython.rlib.entrypoint import export_symbol export_symbol(rpy_entry) return rpy_entry, [int]
54.84
120
0.734136
928
10,968
8.644397
0.834052
0.007479
0.00561
0.003989
0
0
0
0
0
0
0
0.6879
0.188457
10,968
200
121
54.84
0.213347
0.067925
0
0
0
0
0.002253
0
0
0
0
0
0
0
null
null
0
0.035714
null
null
0.005952
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
2f9b393571e0e498374103bd71ef885ae3f5ee56
745
py
Python
shapes.py
kevinharvey/the-testers-toolkit
3ce7d55eabee12eb7c3154ce7b463723fa2c9567
[ "Apache-2.0" ]
1
2015-08-27T23:30:27.000Z
2015-08-27T23:30:27.000Z
shapes.py
kevinharvey/the-testers-toolkit
3ce7d55eabee12eb7c3154ce7b463723fa2c9567
[ "Apache-2.0" ]
null
null
null
shapes.py
kevinharvey/the-testers-toolkit
3ce7d55eabee12eb7c3154ce7b463723fa2c9567
[ "Apache-2.0" ]
null
null
null
import math from twitter import tweet class Rectangle(object): def __init__(self, width, height, *args, **kwargs): super().__init__(*args, **kwargs) self.width = width self.height = height def area(self): return self.width * self.height def broadcast(self): message = 'My rectangle is {} by {}'.format(self.width, self.height) tweet(message) class Cylinder(object): def __init__(self, radius, height, *args, **kwargs): super().__init__(*args, **kwargs) self.radius = radius self.height = height def area_of_base(self): return math.pi * (self.radius ** 2) def volume(self): return self.area_of_base() * self.height
22.575758
76
0.604027
90
745
4.777778
0.344444
0.116279
0.104651
0.07907
0.288372
0.181395
0.181395
0.181395
0
0
0
0.001838
0.269799
745
32
77
23.28125
0.788603
0
0
0.190476
0
0
0.032215
0
0
0
0
0
0
1
0.285714
false
0
0.095238
0.142857
0.619048
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
85da143575bdc69320c3d689f64fc6436a9c59d0
152
py
Python
package_control/deps/oscrypto/version.py
evandrocoan/package_control
bb17c851fa2dee0e564128ea4a499087f2d2ec45
[ "MIT" ]
3,373
2015-01-01T01:19:59.000Z
2022-03-30T13:18:47.000Z
package_control/deps/oscrypto/version.py
evandrocoan/package_control
bb17c851fa2dee0e564128ea4a499087f2d2ec45
[ "MIT" ]
815
2015-01-01T01:21:43.000Z
2022-03-23T21:46:29.000Z
package_control/deps/oscrypto/version.py
evandrocoan/package_control
bb17c851fa2dee0e564128ea4a499087f2d2ec45
[ "MIT" ]
791
2015-01-01T01:20:00.000Z
2022-03-23T21:10:49.000Z
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function __version__ = '1.2.1' __version_info__ = (1, 2, 1)
21.714286
82
0.763158
22
152
4.545455
0.727273
0.04
0.06
0
0
0
0
0
0
0
0
0.05303
0.131579
152
6
83
25.333333
0.704545
0.085526
0
0
0
0
0.036496
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.333333
0.333333
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
85dd1c6c76dcf0b301de74dfb8403df26d5befc0
366
py
Python
src/cgen/ast/__init__.py
cursedclock/swiss_water_compiler
e4d44d35d14d545c54f37795946ed6a1700afae4
[ "MIT" ]
null
null
null
src/cgen/ast/__init__.py
cursedclock/swiss_water_compiler
e4d44d35d14d545c54f37795946ed6a1700afae4
[ "MIT" ]
null
null
null
src/cgen/ast/__init__.py
cursedclock/swiss_water_compiler
e4d44d35d14d545c54f37795946ed6a1700afae4
[ "MIT" ]
null
null
null
from .literal import IntLiteralNode, NullLiteralNode, StringLiteralNode, DoubleLiteralNode, BoolLiteralNode from .print import PrintStatementNode from .type import TypeNode, ArrayTypeNode from .variable_declaration import VariableDeclarationNode from .block import BlockNode from .read import ReadIntegerNode, ReadLineNode from .variable_reference import VarRefNode
45.75
107
0.871585
36
366
8.805556
0.638889
0.07571
0
0
0
0
0
0
0
0
0
0
0.092896
366
7
108
52.285714
0.954819
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0.142857
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
85e72d50529a6f616dae2bd03eb826748760e8ed
243
py
Python
lnbits/core/__init__.py
blackcoffeexbt/lnbits-legend
a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64
[ "MIT" ]
76
2021-11-02T22:19:59.000Z
2022-03-30T18:01:33.000Z
lnbits/core/__init__.py
blackcoffeexbt/lnbits-legend
a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64
[ "MIT" ]
100
2021-11-04T16:33:28.000Z
2022-03-30T15:03:52.000Z
lnbits/core/__init__.py
blackcoffeexbt/lnbits-legend
a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64
[ "MIT" ]
57
2021-11-08T06:43:59.000Z
2022-03-31T08:53:16.000Z
from fastapi.routing import APIRouter from lnbits.db import Database db = Database("database") core_app: APIRouter = APIRouter() from .views.api import * # noqa from .views.generic import * # noqa from .views.public_api import * # noqa
20.25
39
0.740741
33
243
5.393939
0.454545
0.151685
0.146067
0.213483
0
0
0
0
0
0
0
0
0.164609
243
11
40
22.090909
0.876847
0.057613
0
0
0
0
0.035556
0
0
0
0
0
0
1
0
false
0
0.714286
0
0.714286
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
c80931a06aaa346168f9b38031dca775a4187951
182
py
Python
contact/urls.py
talhaibnmahmud/System-Development-Project
221ab5856dfcb00aff0fe8838bb9f40c725dbbf6
[ "MIT" ]
null
null
null
contact/urls.py
talhaibnmahmud/System-Development-Project
221ab5856dfcb00aff0fe8838bb9f40c725dbbf6
[ "MIT" ]
null
null
null
contact/urls.py
talhaibnmahmud/System-Development-Project
221ab5856dfcb00aff0fe8838bb9f40c725dbbf6
[ "MIT" ]
null
null
null
from django.urls.conf import path from contact.views import ContactCreateView app_name = 'contact' urlpatterns = [ path('', ContactCreateView.as_view(), name='contact-us'), ]
18.2
61
0.736264
22
182
6
0.681818
0.166667
0
0
0
0
0
0
0
0
0
0
0.137363
182
9
62
20.222222
0.840764
0
0
0
0
0
0.093407
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
c82bd556da91dbd7982af9d778a216844cbe9b03
79
py
Python
parser/auth.py
DmitriyKhodykin/HunterHH
f27a56348fa47088fd520323a9e167118cf79d1c
[ "MIT" ]
1
2020-04-13T08:16:11.000Z
2020-04-13T08:16:11.000Z
parser/auth.py
DmitriyKhodykin/HunterHH
f27a56348fa47088fd520323a9e167118cf79d1c
[ "MIT" ]
null
null
null
parser/auth.py
DmitriyKhodykin/HunterHH
f27a56348fa47088fd520323a9e167118cf79d1c
[ "MIT" ]
1
2020-04-10T10:48:39.000Z
2020-04-10T10:48:39.000Z
# Authorization data host = '*****' user = '*****' passwd = '*****' db = 'hr'
11.285714
20
0.443038
7
79
5
1
0
0
0
0
0
0
0
0
0
0
0
0.202532
79
6
21
13.166667
0.555556
0.227848
0
0
0
0
0.288136
0
0
0
0
0
0
1
0
false
0.25
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
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
c83f22be50144e34c9a8fafc11d945ba909d84b5
244
py
Python
apps/api/v0/offline.py
kharann/onlineweb4
1130128c6233b623780779a25934ea73ef62c264
[ "MIT" ]
null
null
null
apps/api/v0/offline.py
kharann/onlineweb4
1130128c6233b623780779a25934ea73ef62c264
[ "MIT" ]
null
null
null
apps/api/v0/offline.py
kharann/onlineweb4
1130128c6233b623780779a25934ea73ef62c264
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from tastypie.resources import ModelResource from apps.offline.models import Issue class IssueResource(ModelResource): class Meta: queryset = Issue.objects.all() resource_name = 'offline/issues'
18.769231
44
0.70082
27
244
6.296296
0.777778
0
0
0
0
0
0
0
0
0
0
0.005102
0.196721
244
12
45
20.333333
0.862245
0.086066
0
0
0
0
0.063348
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
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
3
c841164858916e524e68c7fdeb2b947bba2fc20f
10,722
py
Python
src/abaqus/Sketcher/ConstrainedSketchConstraint/ConstrainedSketchConstraintModel.py
Haiiliin/PyAbaqus
f20db6ebea19b73059fe875a53be370253381078
[ "MIT" ]
7
2022-01-21T09:15:45.000Z
2022-02-15T09:31:58.000Z
src/abaqus/Sketcher/ConstrainedSketchConstraint/ConstrainedSketchConstraintModel.py
Haiiliin/PyAbaqus
f20db6ebea19b73059fe875a53be370253381078
[ "MIT" ]
null
null
null
src/abaqus/Sketcher/ConstrainedSketchConstraint/ConstrainedSketchConstraintModel.py
Haiiliin/PyAbaqus
f20db6ebea19b73059fe875a53be370253381078
[ "MIT" ]
null
null
null
from ..ConstrainedSketchBase import ConstrainedSketchBase from ..ConstrainedSketchGeometry.ConstrainedSketchGeometry import ConstrainedSketchGeometry from ...BasicGeometry.Vertex import Vertex class ConstrainedSketchConstraintModel(ConstrainedSketchBase): """A ConstrainedSketch object contains the entities that are used to create a sketch. The objects include ConstrainedSketchGeometry objects contained in the ConstrainedSketchGeometry Repository, such as Line, Arc, and Spline. ConstrainedSketchVertex, ConstrainedSketchDimension, ConstrainedSketchConstraint, and ConstrainedSketchParameter objects are contained in their respective repositories. Notes ----- This object can be accessed by: .. code-block:: python import sketch mdb.models[name].sketches[name] """ def CoincidentConstraint(self, entity1: ConstrainedSketchGeometry, entity2: ConstrainedSketchGeometry): """This method creates a coincident constraint. This constraint applies to two vertices, to a vertex and a ConstrainedSketchGeometry object, or to two ConstrainedSketchGeometry objects of the same type and constrains them to be coincident. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].CoincidentConstraint Parameters ---------- entity1 A ConstrainedSketchGeometry object or a ConstrainedSketchVertex object specifying the first object. entity2 A ConstrainedSketchGeometry object or a ConstrainedSketchVertex object specifying the second object. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def ConcentricConstraint(self, entity1: ConstrainedSketchGeometry, entity2: ConstrainedSketchGeometry): """This method creates a concentric constraint. This constraint applies to any combination of circles, arcs, ellipses, and points and constrains them to be concentric. A concentric constraint implies that the center of ConstrainedSketchGeometry objects coincide. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].ConcentricConstraint Parameters ---------- entity1 A ConstrainedSketchGeometry object specifying the first arc, circle, ellipse, or sketch vertex. entity2 A ConstrainedSketchGeometry object specifying the second arc, circle, ellipse, or sketch vertex. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def EqualLengthConstraint(self, entity1: ConstrainedSketchGeometry, entity2: ConstrainedSketchGeometry): """This method creates an equal length constraint. This constraint applies to lines and constrains them such that their lengths are equal. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].EqualLengthConstraint Parameters ---------- entity1 A ConstrainedSketchGeometry object specifying the first line. entity2 A ConstrainedSketchGeometry object specifying the second line. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def EqualRadiusConstraint(self, entity1: ConstrainedSketchGeometry, entity2: str): """This method creates an equal radius constraint. This constraint applies to circles and arcs and constrains them such that their radii are equal. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].EqualRadiusConstraint Parameters ---------- entity1 A ConstrainedSketchGeometry object specifying the first arc or circle. entity2 A ConstrainedSketchGeometry specifying the second arc or circle. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def FixedConstraint(self, entity: ConstrainedSketchGeometry): """This method creates a fixed constraint. This constraint applies to a ConstrainedSketchGeometry object or a ConstrainedSketchVertex object and constrains them to be fixed in space. Both the location and the shape of the sketch geometry is fixed. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].FixedConstraint Parameters ---------- entity A ConstrainedSketchGeometry object or a ConstrainedSketchVertex object specifying the item to fix in space. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def HorizontalConstraint(self, entity: ConstrainedSketchGeometry): """This method creates a horizontal constraint. This constraint applies to a line and constrains it to be horizontal. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].HorizontalConstraint Parameters ---------- entity A ConstrainedSketchGeometry object specifying the line to constrain. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def VerticalConstraint(self, entity: ConstrainedSketchGeometry): """This method creates a vertical constraint. This constraint applies to a line and constrains it to be vertical. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].VerticalConstraint Parameters ---------- entity A ConstrainedSketchGeometry object specifying the line to constrain. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def ParallelConstraint(self, entity1: ConstrainedSketchGeometry, entity2: ConstrainedSketchGeometry): """This method creates a parallel constraint. This constraint applies to lines and constrains them to be parallel. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].ParallelConstraint Parameters ---------- entity1 A ConstrainedSketchGeometry object specifying the first line. entity2 A ConstrainedSketchGeometry object specifying the second line. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def PerpendicularConstraint(self, entity1: ConstrainedSketchGeometry, entity2: ConstrainedSketchGeometry): """This method creates a perpendicular constraint. This constraint applies to different types of ConstrainedSketchGeometry objects and constrains them to be perpendicular to each other. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].PerpendicularConstraint Parameters ---------- entity1 A ConstrainedSketchGeometry object specifying the first object. entity2 A ConstrainedSketchGeometry object specifying the second object. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def EqualDistanceConstraint(self, entity1: str, entity2: ConstrainedSketchGeometry, midpoint: Vertex): """This method creates an equal distance constraint. This constraint can be applied between a midpoint ConstrainedSketchVertex object and any other two ConstrainedSketchVertex objects or between a midpoint ConstrainedSketchVertex object and two ConstrainedSketchGeometry objects that are lines. The equal distance constraint forces the midpoint vertex to remain at an equal distance from the two other vertices or lines. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].EqualDistanceConstraint Parameters ---------- entity1 AConstrainedSketchGeometry object specifying the first line or ConstrainedSketchVertex object. entity2 A ConstrainedSketchGeometry object specifying the second line or ConstrainedSketchVertex object. midpoint A ConstrainedSketchVertex object specifying the vertex that will be positioned an equal distance from *entity1* and *entity2*. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass def TangentConstraint(self, entity1: ConstrainedSketchGeometry, entity2: ConstrainedSketchGeometry): """This method creates a tangent constraint. This constraint applies to different types of ConstrainedSketchGeometry objects and constrains them to remain tangential. Notes ----- This function can be accessed by: .. code-block:: python mdb.models[name].sketches[name].TangentConstraint Parameters ---------- entity1 A ConstrainedSketchGeometry object specifying the first object. entity2 A ConstrainedSketchGeometry object specifying the second object. Returns ------- sketch: ConstrainedSketch A ConstrainedSketch object """ pass
33.823344
159
0.61509
922
10,722
7.152928
0.149675
0.078848
0.092191
0.089158
0.677483
0.624109
0.589386
0.542229
0.482032
0.344049
0
0.0047
0.325312
10,722
316
160
33.93038
0.906967
0.671983
0
0.423077
0
0
0
0
0
0
0
0
0
1
0.423077
false
0.423077
0.115385
0
0.576923
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
0
1
0
0
3
c84b018a7720d209d2ef031837c3075184203d86
58
py
Python
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/E/electron-triton mass ratio.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/E/electron-triton mass ratio.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
null
null
null
example_snippets/multimenus_snippets/Snippets/SciPy/Physical and mathematical constants/CODATA physical constants/E/electron-triton mass ratio.py
kuanpern/jupyterlab-snippets-multimenus
477f51cfdbad7409eab45abe53cf774cd70f380c
[ "BSD-3-Clause" ]
1
2021-02-04T04:51:48.000Z
2021-02-04T04:51:48.000Z
constants.physical_constants["electron-triton mass ratio"]
58
58
0.862069
7
58
7
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.034483
58
1
58
58
0.875
0
0
0
0
0
0.440678
0
0
0
0
0
0
1
0
true
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
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
c84fcab455f40a266d74a0030abc7370f69fec15
1,367
py
Python
rosstat/validators/control/parser/value.py
WoolenSweater/rosstat_flc
cfec24376b74f5e8c698ccfa664245842035417a
[ "MIT" ]
2
2020-09-25T16:16:04.000Z
2020-12-04T07:42:08.000Z
rosstat/validators/control/parser/value.py
WoolenSweater/rosstat_flc
cfec24376b74f5e8c698ccfa664245842035417a
[ "MIT" ]
5
2020-08-28T16:31:58.000Z
2020-08-31T09:40:34.000Z
rosstat/validators/control/parser/value.py
WoolenSweater/rosstat-flc
4fc7b7aa8ac1413d0a8057b525a03b17b6a1af30
[ "MIT" ]
null
null
null
from math import floor class Nullablefloat(float): def __new__(cls, val, *, is_null=False): return super().__new__(cls, val) def __init__(self, val, *, is_null=False): self.is_null = is_null def __repr__(self): return 'null' if self.is_null else super().__repr__() def neg(self): return type(self)(-self) def abs(self): return self if self.is_null else type(self)(abs(self)) def floor(self): return self if self.is_null else type(self)(floor(self)) def round(self, n): return self if self.is_null else type(self)(round(self, n)) def truncate(self, n): return self if self.is_null else type(self)(f'{self:.{int(n)}f}') def __add__(self, other): return self.__modify(super().__add__(other), other) def __sub__(self, other): return self.__modify(super().__sub__(other), other) def __mul__(self, other): return self.__modify(super().__mul__(other), other) def __truediv__(self, other): return self.__modify(super().__truediv__(other), other) def __modify(self, val, other): return type(self)(val, is_null=self.is_null & other.is_null) def nullablefloat(val): try: return Nullablefloat(val, is_null=False) except (ValueError, TypeError): return Nullablefloat(0, is_null=True)
27.34
73
0.642282
192
1,367
4.177083
0.213542
0.104738
0.087282
0.074813
0.361596
0.341646
0.19202
0.19202
0.19202
0.19202
0
0.000946
0.226774
1,367
49
74
27.897959
0.757805
0
0
0
0
0
0.015362
0
0
0
0
0
0
1
0.424242
false
0
0.030303
0.363636
0.909091
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c86567c412f52bc47d9c2f8a272231863023180b
1,842
py
Python
keras_model/loss_functions.py
gajanlee/V-net
feba60bdb2688041fb4fe2c6970ca1b1505e0a65
[ "Apache-2.0" ]
9
2018-08-15T02:52:31.000Z
2019-11-16T14:26:24.000Z
keras_model/loss_functions.py
gajanlee/V-net
feba60bdb2688041fb4fe2c6970ca1b1505e0a65
[ "Apache-2.0" ]
3
2019-04-26T07:13:37.000Z
2019-05-18T06:21:18.000Z
keras_model/loss_functions.py
gajanlee/V-net
feba60bdb2688041fb4fe2c6970ca1b1505e0a65
[ "Apache-2.0" ]
4
2018-08-14T02:57:52.000Z
2019-08-19T06:39:27.000Z
import keras.backend as K from params import Params from keras.losses import binary_crossentropy def negative_avg_log_error(y_true, y_pred): def sum_of_log_probabilities(true_and_pred): y_true, y_pred = true_and_pred losses = [] def get_loss_per_passage(true_and_pred): y_true, y_pred = true_and_pred start_probability = y_pred[0, K.cast(y_true[0], dtype="int32")] end_probability = y_pred[1, K.cast(y_true[1], dtype="int32")] return K.log(start_probability) + K.log(end_probability) passage_loss_sum = K.map_fn(get_loss_per_passage, (y_true, y_pred), dtype="float32") return K.mean(passage_loss_sum, axis=0) y_true = K.squeeze(y_true, axis=-1) batch_probability_sum = K.map_fn(sum_of_log_probabilities, (y_true, y_pred), dtype='float32') return -K.mean(batch_probability_sum, axis=0) """ y_truth: (None, Params.max_passage_count, Params.max_passage_len) 1 or 0 y_pred : ... probability of word in answer """ def content_loss_function(y_truth, y_pred): def cross_entropy(truth_and_pred): y_truth, y_pred = truth_and_pred def cross_entropy_per_passage(truth_and_pred): y_truth, y_pred = truth_and_pred return -K.mean(K.binary_crossentropy(y_truth, y_pred), axis=-1) passage_loss = K.map_fn(cross_entropy_per_passage, (y_truth, y_pred), dtype="float32") return K.mean(passage_loss) batch_content_loss = K.map_fn(cross_entropy, (y_truth, y_pred), dtype="float32") return -K.mean(batch_content_loss) """ y_truth: (None, Params.max_passage_count) 1 or 0 represents if document contains answer y_pred : ... """ def verify_loss_function(y_truth, y_pred): return -K.mean(K.log(K.map_fn(lambda truth, pred: truth*pred, (y_truth, y_pred))))
36.84
97
0.697068
295
1,842
3.979661
0.20678
0.072402
0.0477
0.074957
0.418228
0.385009
0.308348
0.255537
0.247019
0.11414
0
0.01614
0.192725
1,842
50
98
36.84
0.773369
0
0
0.137931
0
0
0.023914
0
0
0
0
0
0
1
0.241379
false
0.206897
0.103448
0.034483
0.586207
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
0
1
0
0
3
c082ca4a6ad6b53bc7eedf1301c66eff977e17a2
634
py
Python
src/zeit/content/article/edit/jobticker.py
ZeitOnline/zeit.content.article
4375baec7e7ff1f013402f4b920cc37305e44379
[ "BSD-3-Clause" ]
null
null
null
src/zeit/content/article/edit/jobticker.py
ZeitOnline/zeit.content.article
4375baec7e7ff1f013402f4b920cc37305e44379
[ "BSD-3-Clause" ]
29
2016-03-02T07:12:11.000Z
2019-02-19T07:52:14.000Z
src/zeit/content/article/edit/jobticker.py
ZeitOnline/zeit.content.article
4375baec7e7ff1f013402f4b920cc37305e44379
[ "BSD-3-Clause" ]
null
null
null
from zeit.cms.i18n import MessageFactory as _ import grokcore.component as grok import zeit.content.article.edit.block import zeit.content.article.edit.interfaces import zeit.content.modules.jobticker class JobTicker( zeit.content.modules.jobticker.JobTicker, zeit.content.article.edit.block.Block): grok.implements(zeit.content.article.edit.interfaces.IJobTicker) type = 'jobboxticker' source = zeit.content.article.edit.interfaces.IJobTicker['feed'].source class JobboxTickerBlockFactory(zeit.content.article.edit.block.BlockFactory): produces = JobTicker title = _('Jobbox ticker block')
28.818182
77
0.774448
75
634
6.52
0.4
0.179959
0.220859
0.269939
0.427403
0.171779
0
0
0
0
0
0.00361
0.126183
634
21
78
30.190476
0.879061
0
0
0
0
0
0.055205
0
0
0
0
0
0
1
0
false
0
0.357143
0
0.785714
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
0
0
0
3
c08ba3709c14818f9fb16890c7422a16152e5c03
172
py
Python
vnpy/app/algo_trading/base.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
19,529
2015-03-02T12:17:35.000Z
2022-03-31T17:18:27.000Z
vnpy/app/algo_trading/base.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
2,186
2015-03-04T23:16:33.000Z
2022-03-31T03:44:01.000Z
vnpy/app/algo_trading/base.py
funrunskypalace/vnpy
2d87aede685fa46278d8d3392432cc127b797926
[ "MIT" ]
8,276
2015-03-02T05:21:04.000Z
2022-03-31T13:13:13.000Z
EVENT_ALGO_LOG = "eAlgoLog" EVENT_ALGO_SETTING = "eAlgoSetting" EVENT_ALGO_VARIABLES = "eAlgoVariables" EVENT_ALGO_PARAMETERS = "eAlgoParameters" APP_NAME = "AlgoTrading"
24.571429
41
0.819767
19
172
6.947368
0.684211
0.272727
0
0
0
0
0
0
0
0
0
0
0.093023
172
6
42
28.666667
0.846154
0
0
0
0
0
0.348837
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
c09059b64bd0dc66b0f6d0b3675c118d51c9f091
4,393
py
Python
weather/tests.py
urosjevremovic/weather-API-app
8d15bc34b4ac6624a5893910360ad97a165f71b0
[ "MIT" ]
null
null
null
weather/tests.py
urosjevremovic/weather-API-app
8d15bc34b4ac6624a5893910360ad97a165f71b0
[ "MIT" ]
3
2020-06-05T18:59:14.000Z
2021-06-10T20:51:07.000Z
weather/tests.py
urosjevremovic/weather-API-app
8d15bc34b4ac6624a5893910360ad97a165f71b0
[ "MIT" ]
null
null
null
from django.utils import timezone from rest_framework import status from rest_framework.test import APITestCase from weather.models import City from weather.serializers import CitySerializer class GetAllCitiesTest(APITestCase): def setUp(self): City.objects.create( name='Belgrade', country='RS', weather='sunny', weather_description='clear', temperature=25, humidity=30, pressure=40, wind_speed=5, wind_direction='NE', icon_url='http://127.0.0.1:8000/media/images/icons/01d.png', created=timezone.now, updated=timezone.now) City.objects.create( name='Berlin', country='DE', weather='rainy', weather_description='cloudy', temperature=25, humidity=30, pressure=40, wind_speed=5, wind_direction='NE', icon_url='http://127.0.0.1:8000/media/images/icons/10n.png', created=timezone.now, updated=timezone.now) City.objects.create( name='Madrid', country='ES', weather='rainy', weather_description='cloudy', temperature=40, humidity=30, pressure=40, wind_speed=5, wind_direction='NE', icon_url='http://127.0.0.1:8000/media/images/icons/10n.png', created=timezone.now, updated=timezone.now) def test_get_all_cities(self): response = self.client.get('http://127.0.0.1:8000/cities/') cities = City.objects.all() serializer = CitySerializer(cities, many=True) self.assertEqual(response.data, serializer.data) self.assertEqual(response.status_code, status.HTTP_200_OK) self.assertIn('Belgrade', str(response.data)) class GetSingleCityTest(APITestCase): def setUp(self): self.belgrade = City.objects.create( name='Belgrade', country='RS', weather='sunny', weather_description='clear', temperature=25, humidity=30, pressure=40, wind_speed=5, wind_direction='NE', icon_url='http://127.0.0.1:8000/media/images/icons/01d.png', created=timezone.now, updated=timezone.now) self.berlin = City.objects.create( name='Berlin', country='DE', weather='rainy', weather_description='cloudy', temperature=25, humidity=30, pressure=40, wind_speed=5, wind_direction='NE', icon_url='http://127.0.0.1:8000/media/images/icons/10n.png', created=timezone.now, updated=timezone.now) self.madrid = City.objects.create( name='Madrid', country='ES', weather='rainy', weather_description='cloudy', temperature=40, humidity=30, pressure=40, wind_speed=5, wind_direction='NE', icon_url='http://127.0.0.1:8000/media/images/icons/10n.png', created=timezone.now, updated=timezone.now) def test_get_valid_single_city(self): response = self.client.get(f'http://127.0.0.1:8000/cities/{self.belgrade.name}/') city = City.objects.get(pk=self.belgrade.pk) serializer = CitySerializer(city) self.assertEqual(city.__str__(), 'Belgrade') self.assertEqual(response.data, serializer.data) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_get_invalid_single_city_returns_404(self): response = self.client.get('http://127.0.0.1:8000/cities/Velgrade/') self.assertEqual(response.status_code, status.HTTP_404_NOT_FOUND) def test_get_retrieves_single_city_data_from_external_API(self): response = self.client.get('http://127.0.0.1:8000/cities/Paris/') self.assertEqual(response.status_code, status.HTTP_200_OK) class CreateSingleCityTest(APITestCase): def setUp(self): self.payload = { 'name': 'Madrid', 'country': 'ES', 'weather': 'rainy', 'weather_description': 'cloudy', 'temperature': 40, 'humidity': 30, 'pressure': 40, 'wind_speed': 5, 'wind_direction': 'NE', 'icon_url': 'http://127.0.0.1:8000/media/images/icons/10n.png', 'created': timezone.now, 'updated': timezone.now, } def test_create_with_valid_data(self): response = self.client.post('http://127.0.0.1:8000/cities/', data=self.payload, content_type='application/json') self.assertEqual(response.status_code, status.HTTP_405_METHOD_NOT_ALLOWED)
49.920455
120
0.648759
549
4,393
5.04918
0.187614
0.055556
0.034632
0.038961
0.739177
0.710678
0.710678
0.665224
0.662338
0.645022
0
0.058009
0.211245
4,393
88
121
49.920455
0.741991
0
0
0.39726
0
0.09589
0.183887
0
0
0
0
0
0.123288
1
0.109589
false
0
0.068493
0
0.219178
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
c0d24bb1f1e2898da2696b39466393cbe2c2449d
979
py
Python
disco/util/snowflake.py
Lymia/rowboat
391e1eab0323e4fc295404f367e62136265e9a60
[ "MIT" ]
6
2018-07-20T04:07:51.000Z
2021-01-15T04:52:34.000Z
disco/util/snowflake.py
Lymia/rowboat
391e1eab0323e4fc295404f367e62136265e9a60
[ "MIT" ]
1
2018-11-05T22:47:43.000Z
2020-10-04T09:45:42.000Z
disco/util/snowflake.py
Lymia/rowboat
391e1eab0323e4fc295404f367e62136265e9a60
[ "MIT" ]
6
2018-07-20T03:19:30.000Z
2021-11-05T22:51:18.000Z
import six from datetime import datetime UNIX_EPOCH = datetime(1970, 1, 1) DISCORD_EPOCH = 1420070400000 def to_datetime(snowflake): """ Converts a snowflake to a UTC datetime. """ return datetime.utcfromtimestamp(to_unix(snowflake)) def to_unix(snowflake): return to_unix_ms(snowflake) / 1000 def to_unix_ms(snowflake): return (int(snowflake) >> 22) + DISCORD_EPOCH def from_datetime(date): return from_timestamp((date - UNIX_EPOCH).total_seconds()) def from_timestamp(ts): return from_timestamp_ms(ts * 1000.0) def from_timestamp_ms(ts): return int(ts - DISCORD_EPOCH) << 22 def to_snowflake(i): if isinstance(i, six.integer_types): return i elif isinstance(i, str): return int(i) elif hasattr(i, 'id'): return i.id raise Exception('{} ({}) is not convertable to a snowflake'.format(type(i), i)) def calculate_shard(shard_count, guild_id): return (guild_id >> 22) % shard_count
19.979592
83
0.688458
138
979
4.688406
0.347826
0.030912
0.046368
0.05255
0
0
0
0
0
0
0
0.043423
0.200204
979
48
84
20.395833
0.782886
0.039837
0
0
0
0
0.046537
0
0
0
0
0
0
1
0.307692
false
0
0.076923
0.230769
0.769231
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c0dc6cb52c5446358264fa2259abf64bdee2ae9c
558
py
Python
hon/preprocessors/variables.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
null
null
null
hon/preprocessors/variables.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
14
2019-06-23T01:49:55.000Z
2021-02-22T01:26:51.000Z
hon/preprocessors/variables.py
swquinn/hon
333332029ee884a8822d38024659d5d7da64ff1a
[ "MIT" ]
null
null
null
import re from collections import namedtuple from hon.utils.numberutils import to_int_ns from .preprocessor import Preprocessor class VariablesPreprocessor(Preprocessor): """The variable preprocessor. The variable preprocessor takes the variables defined in the book's configuration file, i.e. ``book.yaml``, and adds them to the context. """ _name = 'variables' def on_run(self, book, renderer, context): """ """ variables = book.config.get('variables', {}) context.data['book'].update(variables)
27.9
73
0.691756
66
558
5.787879
0.621212
0.078534
0.120419
0.183246
0
0
0
0
0
0
0
0
0.206093
558
19
74
29.368421
0.862302
0.295699
0
0
0
0
0.061281
0
0
0
0
0
0
1
0.111111
false
0
0.444444
0
0.777778
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
c0dfd2ef8fa6abcdf15ce95cc02c758217a9085e
362
py
Python
tests/unit/test_database.py
antunesleo/manotes-api
ea954e3570a1a4c163328288a9a328859c421f29
[ "MIT" ]
13
2018-12-11T10:54:19.000Z
2020-08-07T01:23:43.000Z
tests/unit/test_database.py
antunesleo/manotes-api
ea954e3570a1a4c163328288a9a328859c421f29
[ "MIT" ]
1
2020-01-12T04:03:08.000Z
2020-01-12T04:03:08.000Z
tests/unit/test_database.py
antunesleo/manotes-api
ea954e3570a1a4c163328288a9a328859c421f29
[ "MIT" ]
3
2019-03-27T11:37:49.000Z
2019-05-31T02:05:00.000Z
from tests.unit import base from src import database class AppActiveRepositoryTest(base.TestCase): def test_has_db(self): self.assertTrue(hasattr(database.AppActiveRepository, 'db')) def test_has_db_default_none(self): # TODO: How to test this? Because the import of initialize on test base made the dependency injection pass
27.846154
109
0.740331
49
362
5.346939
0.673469
0.053435
0.076336
0.091603
0
0
0
0
0
0
0
0
0.196133
362
12
110
30.166667
0.900344
0.273481
0
0
0
0
0.007663
0
0
0
0
0.083333
0.142857
1
0.285714
false
0.142857
0.285714
0
0.714286
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
0
0
0
3
c0f3a8b393856dba8296b502f6e7860d95d004a8
263
py
Python
tests/unit/globals.py
asn-d6/sbws
6070d36022dc2130518dd0c68332166b2bf76c73
[ "CC0-1.0" ]
15
2018-09-24T00:56:19.000Z
2022-03-30T08:47:20.000Z
tests/unit/globals.py
asn-d6/sbws
6070d36022dc2130518dd0c68332166b2bf76c73
[ "CC0-1.0" ]
52
2018-10-08T08:27:38.000Z
2020-03-09T14:40:26.000Z
tests/unit/globals.py
asn-d6/sbws
6070d36022dc2130518dd0c68332166b2bf76c73
[ "CC0-1.0" ]
11
2018-10-05T16:36:44.000Z
2021-12-29T14:47:43.000Z
def incrementing_time(start=2000, increment=1): while True: yield start start += increment def monotonic_time(start=2000): return incrementing_time(start, increment=0.000001) def static_time(value): while True: yield value
18.785714
55
0.684411
33
263
5.333333
0.484848
0.153409
0.238636
0
0
0
0
0
0
0
0
0.079208
0.231939
263
13
56
20.230769
0.792079
0
0
0.222222
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.111111
0.444444
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
c0f84497456f55639328be3ab3cef7e1f0fc4f58
616
py
Python
tests/test_session.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
14
2020-08-05T15:48:06.000Z
2021-08-18T13:13:39.000Z
tests/test_session.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
4
2020-10-30T14:49:25.000Z
2021-09-29T17:11:53.000Z
tests/test_session.py
Files-com/files-sdk-python
84cedc9be099cd9e4db6249ef7a9d60595487090
[ "MIT" ]
null
null
null
import unittest import inspect import files_sdk from tests.base import TestBase from files_sdk.models import Session from files_sdk import session class SessionTest(TestBase): pass # Instance Methods # Static Methods @unittest.skipUnless(TestBase.mock_server_path_exists("POST", "/sessions"), "Mock path does not exist") def test_create(self): resp = session.create() @unittest.skipUnless(TestBase.mock_server_path_exists("DELETE", "/sessions"), "Mock path does not exist") def test_delete(self): resp = session.delete() if __name__ == '__main__': unittest.main()
28
109
0.725649
78
616
5.487179
0.461538
0.056075
0.056075
0.140187
0.378505
0.378505
0.378505
0.163551
0
0
0
0
0.175325
616
22
110
28
0.84252
0.050325
0
0
0
0
0.144082
0
0
0
0
0
0
1
0.125
false
0.0625
0.375
0
0.5625
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
3
c0ffa05bc706f4e8f3272d303bd352df7308f6bf
153
py
Python
tmtoolkit/topicmod/_common.py
mcooper/tmtoolkit
cdfbaf7f20095ea45edbdf9e773544e3bb63089d
[ "Apache-2.0" ]
null
null
null
tmtoolkit/topicmod/_common.py
mcooper/tmtoolkit
cdfbaf7f20095ea45edbdf9e773544e3bb63089d
[ "Apache-2.0" ]
null
null
null
tmtoolkit/topicmod/_common.py
mcooper/tmtoolkit
cdfbaf7f20095ea45edbdf9e773544e3bb63089d
[ "Apache-2.0" ]
null
null
null
""" Common constants and functions Markus Konrad <markus.konrad@wzb.eu> """ DEFAULT_TOPIC_NAME_FMT = 'topic_{i1}' DEFAULT_RANK_NAME_FMT = 'rank_{i1}'
15.3
37
0.745098
22
153
4.818182
0.636364
0.226415
0
0
0
0
0
0
0
0
0
0.014815
0.117647
153
9
38
17
0.77037
0.444444
0
0
0
0
0.246753
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
239294b0c3d567b7ac1cdf0f73474ceb6b6d6e82
45
py
Python
symfem/version.py
mscroggs/feast
c12ac6def4fa331477a02973a01ef54ee5e233ce
[ "MIT" ]
1
2020-12-10T08:12:34.000Z
2020-12-10T08:12:34.000Z
symfem/version.py
mscroggs/feast
c12ac6def4fa331477a02973a01ef54ee5e233ce
[ "MIT" ]
null
null
null
symfem/version.py
mscroggs/feast
c12ac6def4fa331477a02973a01ef54ee5e233ce
[ "MIT" ]
null
null
null
"""Version number.""" version = "2021.12.1"
11.25
21
0.6
6
45
4.5
0.833333
0
0
0
0
0
0
0
0
0
0
0.179487
0.133333
45
3
22
15
0.512821
0.333333
0
0
0
0
0.375
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
2394fa0235ca14f1b4bbf1cc35a368f688ba640c
201
py
Python
easy/461-hamming-distance.py
changmeng72/leecode_python3
8384f52f0dd74b06b1b6aefa277dde6a228ff5f3
[ "MIT" ]
null
null
null
easy/461-hamming-distance.py
changmeng72/leecode_python3
8384f52f0dd74b06b1b6aefa277dde6a228ff5f3
[ "MIT" ]
null
null
null
easy/461-hamming-distance.py
changmeng72/leecode_python3
8384f52f0dd74b06b1b6aefa277dde6a228ff5f3
[ "MIT" ]
null
null
null
class Solution: def hammingDistance(self, x: int, y: int) -> int: c = x^y r = 0 while c != 0: r += (c & 1) c = c>>1 return r
22.333333
54
0.353234
26
201
2.730769
0.538462
0.056338
0
0
0
0
0
0
0
0
0
0.042105
0.527363
201
9
55
22.333333
0.705263
0
0
0
0
0
0
0
0
0
0
0
0
1
0.125
false
0
0
0
0.375
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
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
3
23be6447301e9782720d8497a093e757451676f6
48
py
Python
tests/run_flake8/fstring.py
10sr/flake8-no-implicit-concat
11db2327ffc122d9481c6e03a77cf62b1dc85d25
[ "MIT" ]
15
2020-05-21T19:39:58.000Z
2022-03-22T11:04:12.000Z
tests/run_flake8/fstring.py
10sr/flake8-no-implicit-concat
11db2327ffc122d9481c6e03a77cf62b1dc85d25
[ "MIT" ]
43
2020-05-20T05:19:20.000Z
2021-11-25T05:34:51.000Z
tests/run_flake8/fstring.py
10sr/flake8-no-implicit-concat
11db2327ffc122d9481c6e03a77cf62b1dc85d25
[ "MIT" ]
1
2020-08-25T23:04:08.000Z
2020-08-25T23:04:08.000Z
v = "vvv" a = [f"aaa{vvv}" "bbb"] print(a)
9.6
16
0.4375
9
48
2.333333
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.270833
48
4
17
12
0.6
0
0
0
0
0
0.291667
0
0
0
0
0
0
1
0
false
0
0
0
0
0.25
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
0
0
3
23f835a3fdcdcb1ff9622c29107d63389c22dd88
57
py
Python
python3/list2.py
eiadshahtout/Python
b2406b0806bc55a9d8f5482a304a8d6968249018
[ "MIT" ]
null
null
null
python3/list2.py
eiadshahtout/Python
b2406b0806bc55a9d8f5482a304a8d6968249018
[ "MIT" ]
null
null
null
python3/list2.py
eiadshahtout/Python
b2406b0806bc55a9d8f5482a304a8d6968249018
[ "MIT" ]
null
null
null
spam = ['cat', 'bat', 'rat', 'elephant'] print(spam[1])
14.25
40
0.54386
8
57
3.875
0.875
0
0
0
0
0
0
0
0
0
0
0.020408
0.140351
57
3
41
19
0.612245
0
0
0
0
0
0.303571
0
0
0
0
0
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
0
0
0
0
0
0
0
0
0
1
0
3
9b2674404ee468881a2323901d8cac663a035e9a
170
py
Python
notebooks/notebook_append.py
RPI-DATA/summer_2019
dd757e63250931aaed1d75bd6b7533f6e4f7e876
[ "MIT" ]
null
null
null
notebooks/notebook_append.py
RPI-DATA/summer_2019
dd757e63250931aaed1d75bd6b7533f6e4f7e876
[ "MIT" ]
3
2019-06-05T19:50:13.000Z
2019-07-09T21:52:07.000Z
notebooks/notebook_append.py
RPI-DATA/summer_2019
dd757e63250931aaed1d75bd6b7533f6e4f7e876
[ "MIT" ]
1
2019-06-05T21:35:21.000Z
2019-06-05T21:35:21.000Z
ok = Notebook('lab02.ok') name = 'test' points_per_test=1 comments="trial1" import sys sys.path.append('..') import grade grade.grade(name, points_per_test, comments, ok)
21.25
48
0.747059
27
170
4.555556
0.555556
0.146341
0.211382
0
0
0
0
0
0
0
0
0.025974
0.094118
170
8
48
21.25
0.772727
0
0
0
0
0
0.116959
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
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
0
0
0
0
0
3
f195317ec933e5232067dc7399182f980405ae42
696
py
Python
util/Common.py
prowsandy/django-boilerplate
ebec6b584e9e23a58fc83cbf9ccc8fc8046cc065
[ "Apache-2.0" ]
null
null
null
util/Common.py
prowsandy/django-boilerplate
ebec6b584e9e23a58fc83cbf9ccc8fc8046cc065
[ "Apache-2.0" ]
null
null
null
util/Common.py
prowsandy/django-boilerplate
ebec6b584e9e23a58fc83cbf9ccc8fc8046cc065
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render, HttpResponse,HttpResponseRedirect,get_object_or_404 from django.urls import reverse,reverse_lazy from django.views.generic import TemplateView, CreateView from django.contrib.auth.decorators import login_required from django.contrib.auth import login, logout from django.utils import timezone from django.contrib import messages from django.core.paginator import Paginator from django.db.models import Sum,F,FloatField,Q from django.views import View from django.views.generic import DetailView from django.utils.decorators import method_decorator from django.contrib.auth.forms import UserCreationForm from django.views import generic from util.Util import *
46.4
88
0.860632
99
696
5.989899
0.424242
0.236088
0.10118
0.106239
0.094435
0
0
0
0
0
0
0.004732
0.08908
696
15
89
46.4
0.930599
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
f1ac12236ec2eb7bab4747b5e20a62825b247124
1,082
py
Python
Store Managment/Products.py
arifhamed/App-Development
27c0ed3278db80ef42a523d7579ba304bf21de0f
[ "MIT" ]
null
null
null
Store Managment/Products.py
arifhamed/App-Development
27c0ed3278db80ef42a523d7579ba304bf21de0f
[ "MIT" ]
null
null
null
Store Managment/Products.py
arifhamed/App-Development
27c0ed3278db80ef42a523d7579ba304bf21de0f
[ "MIT" ]
null
null
null
from uuid import uuid4 class Products: def __init__(self, name, price, description, quantity): self.__products_id = str(uuid4()) self.__image = None self.__name = name self.__price = price self.__description = description self.__quantity = quantity def get_products_id(self): return self.__products_id def get_image(self): return self.__image def get_name(self): return self.__name def get_price(self): return self.__price def get_description(self): return self.__description def get_quantity(self): return self.__quantity def set_products_id(self, products_id): self.__products_id = products_id def set_image(self, image): self.__image = image def set_name(self, name): self.__name = name def set_price(self, price): self.__price = price def set_description(self, description): self.__description = description def set_quantity(self, quantity): self.__quantity = quantity
23.021277
59
0.646026
129
1,082
4.96124
0.155039
0.109375
0.13125
0.06875
0.059375
0
0
0
0
0
0
0.002554
0.27634
1,082
46
60
23.521739
0.814815
0
0
0.242424
0
0
0
0
0
0
0
0
0
1
0.393939
false
0
0.030303
0.181818
0.636364
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
f1b190b1a55a72b7def0f696721ba1faddc00de8
134
py
Python
mwbase/util.py
mediawiki-utilities/python-mwbase
5a7255fdbd2e9c5d844b48e7b6a293f5ffb17e6e
[ "MIT" ]
2
2019-05-01T16:57:41.000Z
2020-04-24T09:01:37.000Z
mwbase/util.py
mediawiki-utilities/python-mwbase
5a7255fdbd2e9c5d844b48e7b6a293f5ffb17e6e
[ "MIT" ]
7
2018-07-19T15:06:48.000Z
2020-06-05T15:51:45.000Z
mwbase/util.py
mediawiki-utilities/python-mwbase
5a7255fdbd2e9c5d844b48e7b6a293f5ffb17e6e
[ "MIT" ]
1
2018-08-10T02:29:24.000Z
2018-08-10T02:29:24.000Z
import json def ensure_decoded_json(val): if isinstance(val, dict): return val else: return json.loads(val)
14.888889
30
0.634328
18
134
4.611111
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.283582
134
8
31
16.75
0.864583
0
0
0
0
0
0
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0
0.666667
0
1
0
0
null
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
1
0
0
3
f1cc84132b26d0b5d4a318b9acb31b802ed82667
4,766
py
Python
tests/test_mutator.py
jzeinert-sap/odfuzz
3e551d2b496de91835b261904d2c7ff875be9bbc
[ "Apache-2.0" ]
null
null
null
tests/test_mutator.py
jzeinert-sap/odfuzz
3e551d2b496de91835b261904d2c7ff875be9bbc
[ "Apache-2.0" ]
null
null
null
tests/test_mutator.py
jzeinert-sap/odfuzz
3e551d2b496de91835b261904d2c7ff875be9bbc
[ "Apache-2.0" ]
null
null
null
from collections import namedtuple from odfuzz.mutators import DateTimeMutator, DecimalMutator DateTimeProperty = namedtuple('DateTimeProperty', 'precision') SelfMock = namedtuple('SelfMock', 'precision scale') def test_date_time_mutator(): date_time = 'datetime\'2019-01-01T10:10:10\'' incremented_day = DateTimeMutator.increment_day(DateTimeProperty(0), date_time) assert incremented_day == 'datetime\'2019-01-02T10:10:10\'' decremented_day = DateTimeMutator.decrement_day(DateTimeProperty(0), date_time) assert decremented_day == 'datetime\'2018-12-31T10:10:10\'' incremented_month = DateTimeMutator.increment_month(DateTimeProperty(0), date_time) assert incremented_month == 'datetime\'2019-02-01T10:10:10\'' decremented_month = DateTimeMutator.decrement_month(DateTimeProperty(0), date_time) assert decremented_month == 'datetime\'2018-12-01T10:10:10\'' incremented_year = DateTimeMutator.increment_year(DateTimeProperty(0), date_time) assert incremented_year == 'datetime\'2020-01-01T10:10:10\'' decremented_year = DateTimeMutator.decrement_year(DateTimeProperty(0), date_time) assert decremented_year == 'datetime\'2018-01-01T10:10:10\'' def test_shift_value_decimal_mutator(): DecimalMutator._generator = GeneratorMock(randint=[-1]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '1.21m' DecimalMutator._generator = GeneratorMock(randint=[-2]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '0.12m' DecimalMutator._generator = GeneratorMock(randint=[-3]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '0.01m' DecimalMutator._generator = GeneratorMock(randint=[-4]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '0m' DecimalMutator._generator = GeneratorMock(randint=[-5]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '0m' DecimalMutator._generator = GeneratorMock(randint=[1]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '121.2m' DecimalMutator._generator = GeneratorMock(randint=[2]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '1212m' DecimalMutator._generator = GeneratorMock(randint=[3]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '12120m' DecimalMutator._generator = GeneratorMock(randint=[4]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '21200m' DecimalMutator._generator = GeneratorMock(randint=[5]) assert DecimalMutator.shift_value(SelfMock(5, 2), '12.12m') == '12000m' DecimalMutator._generator = GeneratorMock(randint=[4]) assert DecimalMutator.shift_value(SelfMock(4, 2), '12.12m') == '1200m' DecimalMutator._generator = GeneratorMock(randint=[-1]) assert DecimalMutator.shift_value(SelfMock(4, 3), '12m') == '1.2m' DecimalMutator._generator = GeneratorMock(randint=[-2]) assert DecimalMutator.shift_value(SelfMock(4, 3), '12m') == '0.12m' DecimalMutator._generator = GeneratorMock(randint=[-3]) assert DecimalMutator.shift_value(SelfMock(4, 3), '12m') == '0.012m' DecimalMutator._generator = GeneratorMock(randint=[-4]) assert DecimalMutator.shift_value(SelfMock(4, 3), '12m') == '0.001m' DecimalMutator._generator = GeneratorMock(randint=[2]) assert DecimalMutator.shift_value(SelfMock(4, 3), '0m') == '0m' DecimalMutator._generator = GeneratorMock(randint=[3]) assert DecimalMutator.shift_value(SelfMock(4, 3), '12m') == '2000m' DecimalMutator._generator = GeneratorMock(randint=[4]) assert DecimalMutator.shift_value(SelfMock(4, 3), '12m') == '0m' DecimalMutator._generator = GeneratorMock(randint=[0]) assert DecimalMutator.shift_value(SelfMock(4, 3), '0.0m') == '0m' def test_replace_digit_decimal_mutator(): DecimalMutator._generator = GeneratorMock(randint=[0, 2]) assert DecimalMutator.replace_digit(None, '1m') == '2m' DecimalMutator._generator = GeneratorMock(randint=[0, 9]) assert DecimalMutator.replace_digit(None, '10m') == '90m' DecimalMutator._generator = GeneratorMock(randint=[2, 1]) assert DecimalMutator.replace_digit(None, '100m') == '101m' DecimalMutator._generator = GeneratorMock(randint=[1, 1]) assert DecimalMutator.replace_digit(None, '100m') == '110m' DecimalMutator._generator = GeneratorMock(randint=[2, 0, 2]) assert DecimalMutator.replace_digit(None, '10.0m') == '20.0m' DecimalMutator._generator = GeneratorMock(randint=[2, 0, 0]) assert DecimalMutator.replace_digit(None, '10.0m') == '0m' class GeneratorMock: def __init__(self, randint=None): if randint: self._randint = iter(randint) def randint(self, frm, to): return next(self._randint)
48.632653
87
0.723038
543
4,766
6.176796
0.151013
0.171437
0.268336
0.320513
0.744186
0.69201
0.548599
0.476446
0.474955
0.474359
0
0.077313
0.131557
4,766
97
88
49.134021
0.733027
0
0
0.223684
0
0
0.069031
0
0
0
0
0
0.407895
1
0.065789
false
0
0.026316
0.013158
0.118421
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
1
0
0
0
0
0
0
0
0
0
3
f1d3d4868ce1c1377c905a7ea0d77b38ff6b167b
70
py
Python
python/testData/findUsages/OverrideVariableInComprehension1.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/findUsages/OverrideVariableInComprehension1.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/findUsages/OverrideVariableInComprehension1.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
def f(): xst = [3, 4] <caret>k = 3 return [k for k in xst]
17.5
27
0.457143
14
70
2.285714
0.714286
0
0
0
0
0
0
0
0
0
0
0.068182
0.371429
70
4
27
17.5
0.659091
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
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
3
7b1ec655f3a73742009ff06036a4b0fb6632430e
299
py
Python
lib/oeqa/runtime/cases/rubygems_rubygems_aws_sdk_shield.py
tuxable-ltd/meta-rubygems
e80630e79b64e1be8339e1add0ab07644ec99425
[ "BSD-2-Clause" ]
null
null
null
lib/oeqa/runtime/cases/rubygems_rubygems_aws_sdk_shield.py
tuxable-ltd/meta-rubygems
e80630e79b64e1be8339e1add0ab07644ec99425
[ "BSD-2-Clause" ]
141
2021-02-04T16:22:13.000Z
2022-03-27T08:29:40.000Z
lib/oeqa/runtime/cases/rubygems_rubygems_aws_sdk_shield.py
tuxable-ltd/meta-rubygems
e80630e79b64e1be8339e1add0ab07644ec99425
[ "BSD-2-Clause" ]
3
2021-02-04T14:02:01.000Z
2022-02-02T16:46:52.000Z
from rubygems_utils import RubyGemsTestUtils class RubyGemsTestrubygems_aws_sdk_shield(RubyGemsTestUtils): def test_gem_list_rubygems_aws_sdk_shield(self): self.gem_is_installed("aws-sdk-shield") def test_load_aws_sdk_shield(self): self.gem_is_loadable("aws-sdk-shield")
27.181818
61
0.789298
41
299
5.317073
0.463415
0.137615
0.275229
0.146789
0.229358
0.229358
0.229358
0
0
0
0
0
0.133779
299
10
62
29.9
0.841699
0
0
0
0
0
0.09396
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
7b2ca71b64e16869627207f8b076639ae36c902a
624
py
Python
exercicios/ex008.py
marcellass/Exercicios-de-Python-Curso-em-Video
cdc1609a7afc59b67615d78c20c3611ee5634b5c
[ "MIT" ]
null
null
null
exercicios/ex008.py
marcellass/Exercicios-de-Python-Curso-em-Video
cdc1609a7afc59b67615d78c20c3611ee5634b5c
[ "MIT" ]
null
null
null
exercicios/ex008.py
marcellass/Exercicios-de-Python-Curso-em-Video
cdc1609a7afc59b67615d78c20c3611ee5634b5c
[ "MIT" ]
null
null
null
metros = int(input('Digite o valor em metros: ')) conv_cm = metros * 100 conv_milimetros = metros * 1000 conv_km = metros * 1000 conv_deca = metros / 10 conv_deci = metros * 10 conv_hect = metros / 100 print(f'Segue abaixo a conversão de metros para os valores solicitados (Km, Hect, Decametros, Decimetros, Centimetros e Milimetros)') print(f'De metros para Hect: {conv_hect}') print(f'De metros para Decametros: {conv_deca}') print(f'De metros para Decimetros: {conv_deci}') print(f'De metros para Centímetros: {conv_cm}') print(f'De metros para Km: {conv_km} ') print(f'De metros para Milimetros: {conv_milimetros}')
39
133
0.740385
99
624
4.545455
0.333333
0.093333
0.186667
0.186667
0.24
0
0
0
0
0
0
0.033708
0.144231
624
16
134
39
0.808989
0
0
0
0
0.071429
0.5872
0
0
0
0
0
0
1
0
false
0
0
0
0
0.5
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
9e31611584fc9b5fb10bf1d9486f28df96f7a81a
94
py
Python
engine/algorithm/__init__.py
jackaduma/py-recommender-framework
9c47ae23ccfeccbc2146f9091bf9fa6cb69dc90b
[ "Apache-2.0" ]
1
2022-03-21T01:44:59.000Z
2022-03-21T01:44:59.000Z
engine/algorithm/__init__.py
jackaduma/py-recommender-framework
9c47ae23ccfeccbc2146f9091bf9fa6cb69dc90b
[ "Apache-2.0" ]
null
null
null
engine/algorithm/__init__.py
jackaduma/py-recommender-framework
9c47ae23ccfeccbc2146f9091bf9fa6cb69dc90b
[ "Apache-2.0" ]
null
null
null
#!python2.7 # -*- coding: utf-8 -*- """ Created by kun on 2016/10/10. """ __author__ = 'kun'
11.75
29
0.56383
14
94
3.5
0.857143
0
0
0
0
0
0
0
0
0
0
0.142857
0.180851
94
7
30
13.428571
0.493506
0.659574
0
0
0
0
0.130435
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
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
3
9e40f901697564a2e501c644c57c933023015333
195
py
Python
Curso de Cisco/Actividades/Act 7 - Modulo 3.py
tomasfriz/Curso-de-Cisco
a50ee5fa96bd86d468403e29ccdc3565a181af60
[ "MIT" ]
null
null
null
Curso de Cisco/Actividades/Act 7 - Modulo 3.py
tomasfriz/Curso-de-Cisco
a50ee5fa96bd86d468403e29ccdc3565a181af60
[ "MIT" ]
null
null
null
Curso de Cisco/Actividades/Act 7 - Modulo 3.py
tomasfriz/Curso-de-Cisco
a50ee5fa96bd86d468403e29ccdc3565a181af60
[ "MIT" ]
null
null
null
while True: palabra = input ("Estás atrapado en un ciclo infinito.Ingresa la palabra secreta para dejar el ciclo:") if palabra == "chupacabra": break print("¡Has dejado el ciclo con éxito!")
39
104
0.733333
31
195
4.677419
0.83871
0.096552
0
0
0
0
0
0
0
0
0
0
0.164103
195
5
105
39
0.877301
0
0
0
0
0
0.635897
0
0
0
0
0
0
0
null
null
0
0
null
null
0.2
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
9e7f4cdbccfa1e29f0b1a87b43f9ce5dedbf0af1
194
py
Python
mkgu/__init__.py
jjpr-mit/mkgu
4773cd2ebb3370449fa2ff32c9f17a695c0138c9
[ "MIT" ]
null
null
null
mkgu/__init__.py
jjpr-mit/mkgu
4773cd2ebb3370449fa2ff32c9f17a695c0138c9
[ "MIT" ]
1
2018-01-17T16:24:56.000Z
2018-01-17T16:24:56.000Z
mkgu/__init__.py
jjpr-mit/mkgu
4773cd2ebb3370449fa2ff32c9f17a695c0138c9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = """Jon Prescott-Roy""" __email__ = 'jjpr@mit.edu' __version__ = '0.1.0' from . import fetch def get_assembly(name): return fetch.get_assembly(name)
14.923077
35
0.659794
27
194
4.222222
0.814815
0.192982
0.263158
0
0
0
0
0
0
0
0
0.024691
0.164948
194
12
36
16.166667
0.679012
0.108247
0
0
0
0
0.194118
0
0
0
0
0
0
1
0.166667
false
0
0.166667
0.166667
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
0
0
0
0
1
0
0
0
3
9e83f9640baa82f4bc00fda983b0c31702b12694
185
py
Python
terrarium/adapters/accumulator.py
dredington/terrarium
691d4c4eca24df6ead69bd76badce30161a43050
[ "MIT" ]
null
null
null
terrarium/adapters/accumulator.py
dredington/terrarium
691d4c4eca24df6ead69bd76badce30161a43050
[ "MIT" ]
null
null
null
terrarium/adapters/accumulator.py
dredington/terrarium
691d4c4eca24df6ead69bd76badce30161a43050
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from sentinel import DataAdapter class Accumulator(DataAdapter): def __init__(self): self.data = [] def publish(self, data): self.data.append(data)
18.5
32
0.708108
24
185
5.291667
0.666667
0.188976
0
0
0
0
0
0
0
0
0
0.006494
0.167568
185
10
33
18.5
0.818182
0.113514
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0.166667
0
0.666667
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
0
1
0
0
3
9e85f791036731ddff45a8c1e1a424c0650347ad
2,669
py
Python
tests/MediaTest.py
lakhman/restructuredBootstrap
57002c6db2d3b5b97dc23820b91711db4f00c07e
[ "MIT" ]
1
2020-08-30T08:58:46.000Z
2020-08-30T08:58:46.000Z
tests/MediaTest.py
lakhman/restructuredBootstrap
57002c6db2d3b5b97dc23820b91711db4f00c07e
[ "MIT" ]
null
null
null
tests/MediaTest.py
lakhman/restructuredBootstrap
57002c6db2d3b5b97dc23820b91711db4f00c07e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from .BaseTest import BaseTest class MediaTest(BaseTest): def test_media(self): """ Test a simple media """ self.do_component_fixture_test('media', 'media') def test_media_arg_class(self): """ Test class via argument """ self.do_component_fixture_test('media', 'media-arg-class') def test_media_body(self): """ Test a media object with a media-body """ self.do_component_fixture_test('media', 'media-body') def test_media_heading(self): """ Test a media-heading class is applied """ self.do_component_fixture_test('media', 'media-heading') def test_media_heading_link(self): """ Test a media-heading class is applied with a link """ self.do_component_fixture_test('media', 'media-heading-link') def test_media_heading_inline(self): """ Test our heading is parsed (so we can use icons) """ self.do_component_fixture_test('media', 'media-heading-inliner') def test_media_heading_page_header(self): """ Test our media :page-header: flag """ self.do_component_fixture_test('media', 'media-heading-page-header') def test_media_left_arg(self): """ Test a media left object with a class argument """ self.do_component_fixture_test('media', 'media-left-class-arg') def test_media_left_arg_error(self): """ Test a media left object with an invalid class argument """ self.do_component_fixture_test('media', 'media-left-class-arg-error') def test_media_left_image(self): """ Test a media object with a media-body and media-left image """ self.do_component_fixture_test('media', 'media-left-image') def test_media_right_image(self): """ Test a media object with a media-body and media-right image """ self.do_component_fixture_test('media', 'media-right-image') def test_media_right_image_no_target(self): """ Test media-object class is applied direct image children """ self.do_component_fixture_test('media', 'media-right-image-no-target') def test_media_list(self): """ Test media list is returned as a ul """ self.do_component_fixture_test('media', 'media-list') def test_media_list_arg_class(self): """ Test user classes can be applied to media list via arguments """ self.do_component_fixture_test('media', 'media-list-arg-class')
29.988764
78
0.618209
342
2,669
4.578947
0.172515
0.172414
0.10728
0.196679
0.628352
0.59387
0.565773
0.484036
0.218391
0.137931
0
0.000514
0.271637
2,669
88
79
30.329545
0.805041
0.243912
0
0
0
0
0.184661
0.058407
0
0
0
0
0
1
0.466667
false
0
0.033333
0
0.533333
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
0
1
0
0
3
9e8702660247d92fa2662d0a3871b48b223da8e2
164
py
Python
language_basics/write_file_example.py
nebulx29/LearnPython
519a29b04c36bbd1feb2cda5a0c0669e15062ba4
[ "Apache-2.0" ]
null
null
null
language_basics/write_file_example.py
nebulx29/LearnPython
519a29b04c36bbd1feb2cda5a0c0669e15062ba4
[ "Apache-2.0" ]
null
null
null
language_basics/write_file_example.py
nebulx29/LearnPython
519a29b04c36bbd1feb2cda5a0c0669e15062ba4
[ "Apache-2.0" ]
null
null
null
#file = open("data.csv", "r") #for line in file: # print(line) with open("output.csv", "a") as fileout: fileout.write("Hello World") fileout.close()
23.428571
40
0.603659
24
164
4.125
0.75
0
0
0
0
0
0
0
0
0
0
0
0.20122
164
7
41
23.428571
0.755725
0.365854
0
0
0
0
0.215686
0
0
0
0
0
0
1
0
true
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
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
9ea6927f59d3e675c3ba7b8e4b5e1da3cd9073df
1,713
py
Python
credential.py
Peet-pitz/Password-Locker
17588b045a573af9dced405dda086a8631abecf1
[ "Unlicense" ]
null
null
null
credential.py
Peet-pitz/Password-Locker
17588b045a573af9dced405dda086a8631abecf1
[ "Unlicense" ]
null
null
null
credential.py
Peet-pitz/Password-Locker
17588b045a573af9dced405dda086a8631abecf1
[ "Unlicense" ]
null
null
null
class Credential : """ Class that generates new instances of credentials """ credential_list = [] def __init__ (self,account_name,email,password): """ __init__ method that helps us define properties for our objects. """ """ Args: accountname : New name of the account. email : New contact email address. password : New password of the user. """ self.account_name = account_name self.email = email self.password = password def delete_user(self): """ delete_user method deletes user objects from our user_list """ Credential.credential_list.remove(self) @classmethod def find_by_accountname(cls,accountname): """ Method that takes in an account name and returns an account that matches that account name Args: account name: Account name to search for Returns : Account of user that matches the account name. """ for user in cls.credential_list: if user.accountname == accountname: return user @classmethod def user_exist(cls,email): """ Method that checks if a user exists Args: email: Email to search if it exists Returns : Boolean: True or false depending if the contact exists """ for user in cls.credential_list: if user.email == email: return True return False @classmethod def display_users(cls): """ method that returns the user list """ return cls.credential_list
28.081967
98
0.573263
188
1,713
5.101064
0.319149
0.091762
0.05318
0.045881
0.066736
0.066736
0.066736
0.066736
0
0
0
0
0.363689
1,713
61
99
28.081967
0.879817
0.328079
0
0.227273
1
0
0
0
0
0
0
0
0
1
0.227273
false
0.090909
0
0
0.5
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
1
0
0
0
0
0
3
9ea6d548c103f2a6252f53444b0e3615dc7afb18
187
py
Python
src/DAIDE/syntax/lvl10/statement.py
trigaten/DAIDE
5fbef0cbe26bcf0fc46dcb0dceec3325b404f8f6
[ "MIT" ]
null
null
null
src/DAIDE/syntax/lvl10/statement.py
trigaten/DAIDE
5fbef0cbe26bcf0fc46dcb0dceec3325b404f8f6
[ "MIT" ]
null
null
null
src/DAIDE/syntax/lvl10/statement.py
trigaten/DAIDE
5fbef0cbe26bcf0fc46dcb0dceec3325b404f8f6
[ "MIT" ]
null
null
null
__author__ = "Sander Schulhoff" __email__ = "sanderschulhoff@gmail.com" from DAIDE.core import SimpleParensObject class FCT(SimpleParensObject): """FCT (arrangement)""" pass
23.375
41
0.737968
18
187
7.222222
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.15508
187
8
42
23.375
0.822785
0.090909
0
0
0
0
0.248485
0.151515
0
0
0
0
0
1
0
false
0.2
0.2
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
9eb13d8136ccb5ae04f12a6564afe71f96988a9e
469
py
Python
library/tests/test_setup.py
jordanmcdougall/lsm303d-python
ae33470b4a729f51df31475b917dc41d2e08af94
[ "MIT" ]
null
null
null
library/tests/test_setup.py
jordanmcdougall/lsm303d-python
ae33470b4a729f51df31475b917dc41d2e08af94
[ "MIT" ]
null
null
null
library/tests/test_setup.py
jordanmcdougall/lsm303d-python
ae33470b4a729f51df31475b917dc41d2e08af94
[ "MIT" ]
null
null
null
import sys import mock import pytest def test_setup_not_present(): sys.modules['smbus'] = mock.MagicMock() from lsm303d import LSM303D lsm303d = LSM303D() with pytest.raises(RuntimeError): lsm303d.setup() def test_setup_mock_present(): from tools import SMBusFakeDevice smbus = mock.Mock() smbus.SMBus = SMBusFakeDevice sys.modules['smbus'] = smbus from lsm303d import LSM303D lsm303d = LSM303D() lsm303d.setup()
21.318182
43
0.695096
55
469
5.818182
0.345455
0.21875
0.196875
0.15
0.2375
0.2375
0
0
0
0
0
0.081301
0.21322
469
21
44
22.333333
0.785908
0
0
0.352941
0
0
0.021322
0
0
0
0
0
0
1
0.117647
false
0
0.352941
0
0.470588
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
9eb8119a01ceec3d63a45e31f398858cede8184a
1,603
py
Python
src/reed_solomon/calc_slot.py
umedoblock/fugou
45d95f20bba6f85764fb686081098d92fc8cdb20
[ "BSD-3-Clause" ]
null
null
null
src/reed_solomon/calc_slot.py
umedoblock/fugou
45d95f20bba6f85764fb686081098d92fc8cdb20
[ "BSD-3-Clause" ]
2
2018-11-25T12:06:08.000Z
2018-12-05T14:37:59.000Z
src/reed_solomon/calc_slot.py
umedoblock/fugou
45d95f20bba6f85764fb686081098d92fc8cdb20
[ "BSD-3-Clause" ]
null
null
null
primes = [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251 ] # len(primes) = 54 # symbol_size = 3 # for prime in primes: # column_size = prime * symbol_size # if 1048576 % (column_size) == 1 or \ # 1048576 % (column_size) == (column_size - 1): # print('1048576 % column_size(={}, 3 * prime={}) = {}'. # format(column_size, prime, 1048576 % column_size)) divisions = (17, 32, 41) symbol_size = 3 target_size = 1048576 for d in divisions: column_size = symbol_size * d remainder = target_size % column_size if remainder == 0: padding_size = 0 else: padding_size = column_size - remainder rate = (1048576 + padding_size) / d print('(1048576 + {:3d}) / {} = {}, column_size = {:3d}, division = {}'. format(padding_size, d, rate, column_size, d)) # (1048576 + 35) / 17 = 61683.0, column_size = 51, division = 17 # (1048576 + 32) / 32 = 32769.0, column_size = 96, division = 32 # (1048576 + 122) / 41 = 25578.0, column_size = 123, division = 41 # 1048576 % prime=17 = 16 # 1048576 % prime=32 = 0 # 1048576 % prime=41 = 1 # (1048576 + 1) / 17 = 61681.0 # (1048576 + 0) / 16 = 65536.0 # (1048576 + 40) / 41 = 25576.0 # 1048576 % column_size(= 15, 3 * prime= 5) = 1 # 1048576 % column_size(= 33, 3 * prime=11) = 1 # 1048576 % column_size(= 93, 3 * prime=31) = 1 # 1048576 % column_size(=123, 3 * prime=41) = 1
34.847826
79
0.579538
240
1,603
3.75
0.4
0.211111
0.151111
0.06
0
0
0
0
0
0
0
0.330827
0.253275
1,603
45
80
35.622222
0.421053
0.528384
0
0
0
0
0.085831
0
0
0
0
0
0
1
0
false
0
0
0
0
0.052632
0
0
0
null
1
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
0
0
0
0
0
3
7b4019608f78dcd3956b41e2433d23591c3285ec
5,284
py
Python
backend/authentication/tests.py
r-kaminski/innovativeproject-inventory-of-supplies
b3352cb6432ec2e7c5b83b648231808eabf56734
[ "MIT" ]
1
2019-05-05T17:50:37.000Z
2019-05-05T17:50:37.000Z
backend/authentication/tests.py
r-kaminski/innovativeproject-inventory-of-supplies
b3352cb6432ec2e7c5b83b648231808eabf56734
[ "MIT" ]
117
2019-03-05T20:34:55.000Z
2022-03-11T23:45:54.000Z
backend/authentication/tests.py
r-kaminski/innovativeproject-inventory-of-supplies
b3352cb6432ec2e7c5b83b648231808eabf56734
[ "MIT" ]
5
2019-08-04T15:36:43.000Z
2021-06-16T20:49:49.000Z
from rest_framework.test import APIRequestFactory, APITestCase from django.urls import reverse from rest_framework import status from users.models import User class RegistrationTests(APITestCase): @classmethod def setUpTestData(cls): cls.username = 'testuser' cls.password = 'testpassword' cls.email = 'test@mail.com' cls.invalid_email = 'invalid_email.com' cls.first_name = 'John' cls.last_name = 'Doe' def test_register_user(self): """ Test default rest-auth registration with valid credentials. First and last names would fail silently. (User would be created, but wouldn't have names assigned) """ url = reverse('rest_register') response = self.client.post(url, {'username': self.username, 'password1': self.password, 'password2': self.password, 'email': self.email}) self.assertEqual(response.status_code, status.HTTP_201_CREATED) try: User.objects.get(username=self.username) except: self.assertTrue(False) def test_register_invalid_user(self): """ Test default rest-auth registration with invalid credentials. Given email is not in accepted form. """ url = reverse('rest_register') response = self.client.post(url, {'username': self.username, 'password1': self.password, 'password2': self.password, 'email': self.invalid_email}) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) try: User.objects.get(username=self.username) self.assertTrue(False) except: pass def test_register_user_with_name(self): """ Test custom registration with first and last names on top of rest-auth. First and last names are optional. """ url = reverse('rest_name_register') response = self.client.post(url, {'username': self.username, 'password1': self.password, 'password2': self.password, 'email': self.email, 'first_name': self.first_name, 'last_name': self.last_name}) self.assertEqual(response.status_code, status.HTTP_201_CREATED) try: user = User.objects.get(username=self.username) self.assertEqual(user.first_name, self.first_name) self.assertEqual(user.last_name, self.last_name) except: self.assertTrue(False) def test_register_invalid_user_with_name(self): """ Test custom registration with first and last names on top of rest-auth. Invalid email is given. """ url = reverse('rest_name_register') response = self.client.post(url, {'username': self.username, 'password1': self.password, 'password2': self.password, 'email': self.invalid_email, 'first_name': self.first_name, 'last_name': self.last_name}) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) try: user = User.objects.get(username=self.username) self.assertTrue(False) except: pass class LoginTests(APITestCase): @classmethod def setUpTestData(cls): cls.username = 'testuser' cls.password = 'testpassword' cls.url = '/rest-auth/login/' cls.testuser = User.objects.create_user( username=cls.username, password=cls.password) cls.testuser.save() def test_login(self): """ Test default rest-auth login. Valid username and password are given. """ response = self.client.post(self.url, {'username': self.username, 'password': self.password}) self.assertEqual(response.status_code, status.HTTP_200_OK) def test_invalid_password_login(self): """ Test default rest-auth login. Valid username and invalid password are given. """ invalid_password = 'invalidpassword' response = self.client.post(self.url, {'username': self.username, 'password': invalid_password}) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST) def test_invalid_username_login(self): """ Test default rest-auth login. Invalid username and valid password are given. """ invalid_username = 'invalidusername' response = self.client.post(self.url, {'username': invalid_username, 'password': self.password}) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
36.191781
79
0.5581
521
5,284
5.512476
0.178503
0.054318
0.069638
0.053621
0.717618
0.702994
0.702994
0.668175
0.639624
0.59227
0
0.008482
0.352952
5,284
145
80
36.441379
0.83153
0.129447
0
0.629213
0
0
0.090535
0
0
0
0
0
0.146067
1
0.101124
false
0.202247
0.044944
0
0.168539
0
0
0
0
null
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
7b5e11e9478a056653f35344e350c9f8733cebe9
257
py
Python
keyvaluestore/admin.py
sdelements/django-keyvaluestore
cd18fbfba902e9992589e414838f1f1c5ed1d234
[ "BSD-3-Clause" ]
null
null
null
keyvaluestore/admin.py
sdelements/django-keyvaluestore
cd18fbfba902e9992589e414838f1f1c5ed1d234
[ "BSD-3-Clause" ]
3
2018-04-17T18:51:44.000Z
2020-02-12T21:38:00.000Z
keyvaluestore/admin.py
sdelements/django-keyvaluestore
cd18fbfba902e9992589e414838f1f1c5ed1d234
[ "BSD-3-Clause" ]
1
2018-04-13T16:44:08.000Z
2018-04-13T16:44:08.000Z
from django.contrib import admin from keyvaluestore.models import KeyValueStore class KeyValueStoreAdmin(admin.ModelAdmin): list_display = ('key', 'value') search_fields = ('key', 'value') admin.site.register(KeyValueStore, KeyValueStoreAdmin)
21.416667
54
0.766537
27
257
7.222222
0.666667
0.082051
0
0
0
0
0
0
0
0
0
0
0.128405
257
11
55
23.363636
0.870536
0
0
0
0
0
0.062257
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.833333
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
0
1
0
0
3
7b61903b13f69c6cdab8755366c63c425a5d9341
33
py
Python
VKConfig.py
hyper-cookie/VK-chat-statistics
9bb5a12fc131f672ece035a6a3855cf00f36f18b
[ "Apache-2.0" ]
null
null
null
VKConfig.py
hyper-cookie/VK-chat-statistics
9bb5a12fc131f672ece035a6a3855cf00f36f18b
[ "Apache-2.0" ]
null
null
null
VKConfig.py
hyper-cookie/VK-chat-statistics
9bb5a12fc131f672ece035a6a3855cf00f36f18b
[ "Apache-2.0" ]
null
null
null
GROUP_TOKEN = "#" GROUP_ID = 1
11
18
0.606061
5
33
3.6
0.8
0
0
0
0
0
0
0
0
0
0
0.04
0.242424
33
2
19
16.5
0.68
0
0
0
0
0
0.032258
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
7b6dad91e7719da645b5bcb8113acca1cb651ae5
130
py
Python
Lista 01/02.py
GabrielTaka/Fatec-Lists-PYTHON-language-Masanori
3c438d03646ee7bd7fe3c57c6008e31a293b6b11
[ "MIT" ]
1
2018-01-14T21:55:54.000Z
2018-01-14T21:55:54.000Z
Lista 01/02.py
GabrielTaka/Fatec-Lists-PYTHON-language-Masanori
3c438d03646ee7bd7fe3c57c6008e31a293b6b11
[ "MIT" ]
null
null
null
Lista 01/02.py
GabrielTaka/Fatec-Lists-PYTHON-language-Masanori
3c438d03646ee7bd7fe3c57c6008e31a293b6b11
[ "MIT" ]
null
null
null
metros = float(input("Digite a medida em metros: ")) print("O tamanho convertido em milímetros e de: {}".format(metros * 1000))
43.333333
75
0.7
19
130
4.789474
0.842105
0
0
0
0
0
0
0
0
0
0
0.036364
0.153846
130
2
76
65
0.790909
0
0
0
0
0
0.546875
0
0
0
0
0
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
0
0
0
0
0
0
0
0
0
1
0
3
7b8a71bf2647092105d5201d3cb6261912a120c7
115
py
Python
students/K33402/Beresnev_Andrey/practical2.1/django_project_beresnev/project_first_app/urls.py
agentofknowledge/ITMO_ICT_WebDevelopment_2020-2021
7d5eab0d68af378083f21473cbbd5e5def6aa60a
[ "MIT" ]
4
2020-09-03T15:41:42.000Z
2021-12-24T15:28:20.000Z
students/K33402/Beresnev_Andrey/practical2.1/django_project_beresnev/project_first_app/urls.py
agentofknowledge/ITMO_ICT_WebDevelopment_2020-2021
7d5eab0d68af378083f21473cbbd5e5def6aa60a
[ "MIT" ]
48
2020-09-13T20:22:42.000Z
2021-04-30T11:13:30.000Z
students/K33402/Beresnev_Andrey/practical2.1/django_project_beresnev/project_first_app/urls.py
agentofknowledge/ITMO_ICT_WebDevelopment_2020-2021
7d5eab0d68af378083f21473cbbd5e5def6aa60a
[ "MIT" ]
69
2020-09-06T10:32:37.000Z
2021-11-28T18:13:17.000Z
from django.urls import path from . import views urlpatterns = [ path('owner/<int:owner_id>', views.index), ]
16.428571
46
0.695652
16
115
4.9375
0.6875
0
0
0
0
0
0
0
0
0
0
0
0.165217
115
6
47
19.166667
0.822917
0
0
0
0
0
0.173913
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
7b8d1231e30bd2996ff70de3598e174f0b8f93e4
827
py
Python
schemas/sku.py
troyharvey/stripe_plugin
cb3a9500b1c084d844f3dd3d9fc1db20b537bac5
[ "Apache-2.0" ]
5
2018-01-11T16:11:14.000Z
2020-06-19T20:16:57.000Z
schemas/sku.py
troyharvey/stripe_plugin
cb3a9500b1c084d844f3dd3d9fc1db20b537bac5
[ "Apache-2.0" ]
2
2018-07-19T21:41:04.000Z
2021-06-08T21:54:06.000Z
schemas/sku.py
troyharvey/stripe_plugin
cb3a9500b1c084d844f3dd3d9fc1db20b537bac5
[ "Apache-2.0" ]
14
2018-04-24T04:32:45.000Z
2022-02-16T17:21:21.000Z
sku = [{"name": "id", "type": "varchar(256)"}, {"name": "object", "type": "varchar(256)"}, {"name": "active", "type": "boolean"}, {"name": "attributes", "type": "varchar(max)"}, {"name": "created", "type": "timestamp"}, {"name": "currency", "type": "varchar(256)"}, {"name": "image", "type": "varchar(256)"}, {"name": "inventory", "type": "varchar(512)"}, {"name": "livemode", "type": "boolean"}, {"name": "metadata", "type": "varchar(max)"}, {"name": "package_dimensions", "type": "varchar(512)"}, {"name": "price", "type": "integer"}, {"name": "product", "type": "varchar(256)"}, {"name": "updated", "type": "timestamp"}]
28.517241
37
0.423216
67
827
5.208955
0.373134
0.283668
0.200573
0.25788
0
0
0
0
0
0
0
0.037102
0.315599
827
28
38
29.535714
0.579505
0
0
0.392857
0
0
0.441354
0
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
7b9433c1cebc159d157cbcf23874a577c9360971
218
py
Python
feder/letters/sitemaps.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
16
2015-08-11T17:20:26.000Z
2022-02-11T20:15:41.000Z
feder/letters/sitemaps.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
534
2015-08-04T00:10:54.000Z
2022-03-17T10:44:47.000Z
feder/letters/sitemaps.py
dzemeuksis/feder
32ef7793af6256d4ecada61505c7baf334b34419
[ "MIT" ]
10
2017-08-30T13:34:32.000Z
2022-02-18T13:00:35.000Z
from django.contrib.sitemaps import Sitemap from .models import Letter class LetterSitemap(Sitemap): def items(self): return Letter.objects.all() def lastmod(self, obj): return obj.modified
18.166667
43
0.701835
27
218
5.666667
0.703704
0
0
0
0
0
0
0
0
0
0
0
0.215596
218
11
44
19.818182
0.894737
0
0
0
0
0
0
0
0
0
0
0
0
1
0.285714
false
0
0.285714
0.285714
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
3
7ba33e1d6fdfb29fa7ee93a964e2ed74b7e5bb98
167
py
Python
apps/breakfast/toast/testADC/hexToDec.py
tp-freeforall/breakfast
0399619cdb7a81b3c3cc4c5a1b7d69f5c32b8c65
[ "BSD-3-Clause" ]
1
2020-05-15T18:08:48.000Z
2020-05-15T18:08:48.000Z
apps/breakfast/toast/testADC/hexToDec.py
tp-freeforall/breakfast
0399619cdb7a81b3c3cc4c5a1b7d69f5c32b8c65
[ "BSD-3-Clause" ]
null
null
null
apps/breakfast/toast/testADC/hexToDec.py
tp-freeforall/breakfast
0399619cdb7a81b3c3cc4c5a1b7d69f5c32b8c65
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import sys if __name__ == '__main__': for line in sys.stdin: if 'DATA' in line: print int(line.strip().split()[-1], 16)
20.875
51
0.57485
25
167
3.52
0.8
0
0
0
0
0
0
0
0
0
0
0.02439
0.263473
167
7
52
23.857143
0.691057
0.11976
0
0
0
0
0.082192
0
0
0
0
0
0
0
null
null
0
0.2
null
null
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
7bae940fcdc78cd1fecd57d6f7d9d013f8110971
5,330
py
Python
connector.py
ByJoker8625/JFQLShell
d4eb2b9b72ccad3d9e6092597ae442c9d0b1dcc4
[ "MIT" ]
null
null
null
connector.py
ByJoker8625/JFQLShell
d4eb2b9b72ccad3d9e6092597ae442c9d0b1dcc4
[ "MIT" ]
null
null
null
connector.py
ByJoker8625/JFQLShell
d4eb2b9b72ccad3d9e6092597ae442c9d0b1dcc4
[ "MIT" ]
null
null
null
import json from dataclasses import dataclass from enum import * from typing import List import requests class ConnectorError(Exception): pass class ResponseType(Enum): ERROR = auto() RESULT = auto() FORBIDDEN = auto() SUCCESS = auto() SYNTAX_ERROR = auto() class ResultType(Enum): RELATIONAL = auto() DOCUMENT = auto() DEPRECATED = auto() @dataclass class User: name: str password: str class Token(User): name = "%TOKEN%" def __init__(self, token: str): self.password = token class TableEntry: def get(self, field: str = None) -> ...: pass def is_present(self, field: str) -> bool: pass def is_null(self, field: str) -> bool: pass def creation(self) -> int: pass class SimpleTableEntry(TableEntry): def __init__(self, content, creation): self.content = content self.creation = creation def get(self, field: str = None) -> ...: return self.content[field] def is_present(self, field) -> bool: return self.content[field] is not None def is_null(self, field: str) -> bool: return self.content[field] is None or self.content[field] == "null" def creation(self) -> int: return self.creation class SingletonTableEntry(TableEntry): def __init__(self, content): self.content = content def get(self, field: str = None) -> ...: return self.content def is_present(self, field) -> bool: raise ConnectorError("Unsupported in singleton entry!") def is_null(self, field: str) -> bool: raise ConnectorError("Unsupported in singleton entry!") def creation(self) -> int: raise ConnectorError("Unsupported in singleton entry!") @dataclass class Response: type: ResponseType response: ... class SimpleResponse(Response): def __init__(self, response: ..., exception: bool): self.type = ResponseType[response["type"]] self.response = response if exception: if type == ResponseType.ERROR: raise ConnectorError(response["exception"]) elif type == ResponseType.FORBIDDEN: raise ConnectorError("You don't have the permissions to do that!") elif type == ResponseType.SYNTAX_ERROR: raise ConnectorError("Unknown syntax!") class ErrorResult(SimpleResponse): def exception(self) -> str: return self.response["exception"] class Result(SimpleResponse): def entries(self) -> List[TableEntry]: results = self.response["result"] if "result" in self.response else self.response["answer"] entries: List[TableEntry] = [] for result in results: if type(result) is str: entries.append(SingletonTableEntry(result)) else: entries.append(SimpleTableEntry(result["content"], result["creation"])) return entries def structure(self) -> List[str]: return self.response["structure"] def resultType(self) -> ResultType: return ResultType[self.response["resultType"]] if self.response["resultType"] is None else ResultType.DEPRECATED class Connection: def connect(self) -> None: pass def disconnect(self) -> None: pass def closeSession(self) -> None: pass def connected(self) -> bool: pass def query(self, query: str, exception: bool = True) -> Response: pass class TokenConnection(Connection): def __init__(self, host: str, user: User, ignore_static_sessions: bool = True): self.host = host self.user = user self.ignore_static_sessions = ignore_static_sessions self.token = None @staticmethod def __send(host: str, payload) -> ...: try: return requests.post(host, json.dumps(payload)).json() except Exception as ex: raise ConnectorError(ex) def connect(self) -> None: if not self.host.startswith("http://") and not self.host.startswith("https://"): self.host = "http://" + self.host try: self.token = \ self.__send(f"{self.host}/api/v1/session/open", {"user": self.user.name, "password": self.user.password})[ "result"][0] except Exception as ex: raise ConnectorError("Connection failed!") def disconnect(self) -> None: self.token = None def closeSession(self) -> None: if self.user.name == "%TOKEN%" and self.ignore_static_sessions: self.disconnect() return self.__send(f"{self.host}/api/v1/session/close", {"token": self.token}) self.disconnect() def connected(self) -> bool: return self.token is not None def query(self, query: str, exception: bool = True) -> Response: response = SimpleResponse( self.__send(f"{self.host}/api/v1/query", {"token": self.token, 'query': query}), exception) if response.type == ResponseType.RESULT: return Result(response.response, exception) elif response.type == ResponseType.ERROR: return ErrorResult(response.response, exception) else: return response
26.127451
120
0.609756
582
5,330
5.508591
0.187285
0.025265
0.026201
0.019963
0.235496
0.214286
0.131628
0.103556
0.052402
0
0
0.001035
0.275235
5,330
203
121
26.256158
0.828889
0
0
0.338028
0
0
0.077298
0.016323
0
0
0
0
0
1
0.225352
false
0.091549
0.035211
0.06338
0.556338
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
0
1
0
0
3
7bb05e2603a510f35070e2c0eefd2234ed98c5df
360
py
Python
src/config/config.py
Badmuts/hsleiden-ipsenh-sensor
3ca853febacb37e3ea33e9dfcfa71361d1dd07d2
[ "MIT" ]
null
null
null
src/config/config.py
Badmuts/hsleiden-ipsenh-sensor
3ca853febacb37e3ea33e9dfcfa71361d1dd07d2
[ "MIT" ]
null
null
null
src/config/config.py
Badmuts/hsleiden-ipsenh-sensor
3ca853febacb37e3ea33e9dfcfa71361d1dd07d2
[ "MIT" ]
null
null
null
class Config(object): _instance = None def __new__(self): if not self._instance: self._instance = super(Config, self).__new__(self) return self._instance def setConfig(self, config): self.config = config def get(self, key): return self.config[key] def getAll(self): return self.config
22.5
62
0.608333
43
360
4.813953
0.372093
0.193237
0.135266
0
0
0
0
0
0
0
0
0
0.294444
360
16
63
22.5
0.814961
0
0
0
0
0
0
0
0
0
0
0
0
1
0.333333
false
0
0
0.166667
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
7bbd819d8fe7e8b1e187a01f5e02f5d1eac32d61
1,949
py
Python
resources/dot_PyCharm/system/python_stubs/-762174762/PySide/QtNetwork/QUdpSocket.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
1
2020-04-20T02:27:20.000Z
2020-04-20T02:27:20.000Z
resources/dot_PyCharm/system/python_stubs/cache/83fffae014956db69fadcc8dc156c529d265a60c3b195dc003754531e5b5eafd/PySide/QtNetwork/QUdpSocket.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
resources/dot_PyCharm/system/python_stubs/cache/83fffae014956db69fadcc8dc156c529d265a60c3b195dc003754531e5b5eafd/PySide/QtNetwork/QUdpSocket.py
basepipe/developer_onboarding
05b6a776f8974c89517868131b201f11c6c2a5ad
[ "MIT" ]
null
null
null
# encoding: utf-8 # module PySide.QtNetwork # from C:\Python27\lib\site-packages\PySide\QtNetwork.pyd # by generator 1.147 # no doc # imports import PySide.QtCore as __PySide_QtCore import Shiboken as __Shiboken from QAbstractSocket import QAbstractSocket class QUdpSocket(QAbstractSocket): # no doc def bind(self, *args, **kwargs): # real signature unknown pass def hasPendingDatagrams(self, *args, **kwargs): # real signature unknown pass def joinMulticastGroup(self, *args, **kwargs): # real signature unknown pass def leaveMulticastGroup(self, *args, **kwargs): # real signature unknown pass def multicastInterface(self, *args, **kwargs): # real signature unknown pass def pendingDatagramSize(self, *args, **kwargs): # real signature unknown pass def readDatagram(self, *args, **kwargs): # real signature unknown pass def setMulticastInterface(self, *args, **kwargs): # real signature unknown pass def writeDatagram(self, *args, **kwargs): # real signature unknown pass def __init__(self, *args, **kwargs): # real signature unknown pass @staticmethod # known case of __new__ def __new__(S, *more): # real signature unknown; restored from __doc__ """ T.__new__(S, ...) -> a new object with type S, a subtype of T """ pass BindFlag = None # (!) real value is "<type 'PySide.QtNetwork.QUdpSocket.BindFlag'>" BindMode = None # (!) real value is "<type 'BindMode'>" DefaultForPlatform = PySide.QtNetwork.QUdpSocket.BindFlag.DefaultForPlatform DontShareAddress = PySide.QtNetwork.QUdpSocket.BindFlag.DontShareAddress ReuseAddressHint = PySide.QtNetwork.QUdpSocket.BindFlag.ReuseAddressHint ShareAddress = PySide.QtNetwork.QUdpSocket.BindFlag.ShareAddress staticMetaObject = None # (!) real value is '<PySide.QtCore.QMetaObject object at 0x00000000038B6F08>'
32.483333
106
0.698307
212
1,949
6.301887
0.339623
0.107036
0.164671
0.134731
0.333084
0.304641
0.304641
0.276198
0
0
0
0.014148
0.202155
1,949
59
107
33.033898
0.845016
0.348384
0
0.323529
0
0
0
0
0
0
0
0
0
1
0.323529
false
0.323529
0.088235
0
0.647059
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
0
1
0
0
3
7bc80b6ed19db5cf3291daec131c5584e57620e5
493
py
Python
pygrabber/image_process.py
tianhaopeng/oasis_camera_acquisition
14b3441f0ba359e52bd4690b625c9961a880388d
[ "MIT" ]
null
null
null
pygrabber/image_process.py
tianhaopeng/oasis_camera_acquisition
14b3441f0ba359e52bd4690b625c9961a880388d
[ "MIT" ]
null
null
null
pygrabber/image_process.py
tianhaopeng/oasis_camera_acquisition
14b3441f0ba359e52bd4690b625c9961a880388d
[ "MIT" ]
null
null
null
# # python_grabber # import cv2 import numpy as np def save_image(filename, img): cv2.imwrite(filename, img) def sepia(img): kernel = np.float32([ [0.272, 0.534, 0.131], [0.349, 0.686, 0.168], [0.393, 0.769, 0.189]]) return cv2.transform(img, kernel) def edge_preserving(img): return cv2.edgePreservingFilter(img) def stylization(img): return cv2.stylization(img) def pencil_sketch(img): _, res = cv2.pencilSketch(img) return res
15.40625
40
0.638945
71
493
4.366197
0.507042
0.058065
0.077419
0
0
0
0
0
0
0
0
0.115183
0.225152
493
31
41
15.903226
0.696335
0.028398
0
0
0
0
0
0
0
0
0
0
0
1
0.294118
false
0
0.117647
0.117647
0.647059
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c872ae8bbff8f7c12e66b7859d2c5a6b5a90c56d
1,066
py
Python
tests/model/create_model_repr_test.py
Timothyyung/bravado-core
baaef12d2908f803deed4e220e6bdaec4ee6e029
[ "BSD-3-Clause" ]
122
2015-04-22T17:31:18.000Z
2021-11-08T10:29:57.000Z
tests/model/create_model_repr_test.py
Timothyyung/bravado-core
baaef12d2908f803deed4e220e6bdaec4ee6e029
[ "BSD-3-Clause" ]
364
2015-04-10T22:19:23.000Z
2022-02-25T08:55:10.000Z
tests/model/create_model_repr_test.py
Timothyyung/bravado-core
baaef12d2908f803deed4e220e6bdaec4ee6e029
[ "BSD-3-Clause" ]
118
2015-04-20T15:11:53.000Z
2021-12-09T10:03:34.000Z
# -*- coding: utf-8 -*- import pytest import six def test_success(user): expected = "User(email=None, firstName=None, id=None, lastName=None, password=None, phone=None, userStatus=None, username=None)" # noqa assert expected == repr(user) def test_allOf(cat, cat_spec, cat_swagger_spec): expected = "Cat(category=None, id=None, name=None, neutered=None, photoUrls=None, tags=None)" # noqa assert expected == repr(cat) @pytest.mark.skipif(six.PY3, reason="py2 has ascii default strings") def test_unicode_py2(user): user.firstName = 'Ümlaut' expected = r"User(email=None, firstName='\xc3\x9cmlaut', id=None, lastName=None, password=None, phone=None, userStatus=None, username=None)" # noqa assert expected == repr(user) @pytest.mark.skipif(six.PY2, reason="py3 has unicode default strings") def test_unicode_py3(user): user.firstName = 'Ümlaut' expected = "User(email=None, firstName='Ümlaut', id=None, lastName=None, password=None, phone=None, userStatus=None, username=None)" # noqa assert expected == repr(user)
38.071429
152
0.714822
148
1,066
5.087838
0.310811
0.037185
0.074369
0.116866
0.622842
0.36255
0.36255
0.36255
0.36255
0.36255
0
0.009836
0.141651
1,066
27
153
39.481481
0.813115
0.038462
0
0.277778
0
0.222222
0.502453
0.025515
0
0
0
0
0.222222
1
0.222222
false
0.166667
0.111111
0
0.333333
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
1
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
3
c8af45dab2804789b4f90bdb099782b18c8aa94f
93
py
Python
code/6.py
KoyanagiHitoshi/AtCoder-Beginners-Selection
a659c58251b39097e355bbeafc4453eabb287fe8
[ "MIT" ]
null
null
null
code/6.py
KoyanagiHitoshi/AtCoder-Beginners-Selection
a659c58251b39097e355bbeafc4453eabb287fe8
[ "MIT" ]
null
null
null
code/6.py
KoyanagiHitoshi/AtCoder-Beginners-Selection
a659c58251b39097e355bbeafc4453eabb287fe8
[ "MIT" ]
null
null
null
N = int(input()) a = sorted(map(int, input().split()))[::-1] print(sum(a[::2])-sum(a[1::2]))
23.25
43
0.526882
18
93
2.722222
0.611111
0.326531
0
0
0
0
0
0
0
0
0
0.047059
0.086022
93
3
44
31
0.529412
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
0
0
3
c8bfcd6a8b3feb9af892fe2b826f8885804a1f5c
155
py
Python
test.py
1Jack2/cordcloud-action
6f2ce38b7c6605c7f42fbec89710168226b3ed82
[ "MIT" ]
1
2021-12-15T01:50:08.000Z
2021-12-15T01:50:08.000Z
test.py
Cholly-Tse/cordcloud-action
0ce6028993c3caca67c5b314a7792fef8284388f
[ "MIT" ]
null
null
null
test.py
Cholly-Tse/cordcloud-action
0ce6028993c3caca67c5b314a7792fef8284388f
[ "MIT" ]
null
null
null
from app.action import Action email = 'contact@yanglibin.info' passwd = 'xxx' host = 'c-cloud.xyz' action = Action(email, passwd, host=host) action.run()
19.375
41
0.722581
23
155
4.869565
0.652174
0.196429
0
0
0
0
0
0
0
0
0
0
0.129032
155
7
42
22.142857
0.82963
0
0
0
0
0
0.232258
0.141935
0
0
0
0
0
1
0
false
0.333333
0.166667
0
0.166667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
c8c4c36a5c956aea81d70df158f87cf083ae0c23
1,264
py
Python
dns_messages/dns_objects/rr_data/HINFO.py
wahlflo/dns-messages
f42a1c1d0c933f44ca819b9a7f6e54daf48a7140
[ "MIT" ]
null
null
null
dns_messages/dns_objects/rr_data/HINFO.py
wahlflo/dns-messages
f42a1c1d0c933f44ca819b9a7f6e54daf48a7140
[ "MIT" ]
null
null
null
dns_messages/dns_objects/rr_data/HINFO.py
wahlflo/dns-messages
f42a1c1d0c933f44ca819b9a7f6e54daf48a7140
[ "MIT" ]
null
null
null
from dns_messages.utilities import decode_character_string from typing import List from .items import * from .resource_record import ResourceRecord from ...utilities.character_string_encoder_and_decoder import encode_character_string class HINFO(ResourceRecord): def __init__(self, name: str, rr_class: RRClass, ttl: int, cpu: bytes, os: bytes): super().__init__(name=name, rr_class=rr_class, ttl=ttl) self.cpu = cpu self.os = os def __str__(self) -> str: return 'HINFO[name={}, cpu={}, os={}]'.format(self.name, self.cpu, self.os) def get_RR_type(self) -> RRType: return RRType.HINFO @staticmethod def from_bytes(raw_bytes: bytes, raw_bits: List[int], byte_offset: int, rr_data_length: int, name: str, rr_class: RRClass, ttl: int) -> 'HINFO': byte_offset, cpu = decode_character_string(raw_bytes=raw_bytes, raw_bits=raw_bits, byte_offset=byte_offset) _, os = decode_character_string(raw_bytes=raw_bytes, raw_bits=raw_bits, byte_offset=byte_offset) return HINFO(name=name, rr_class=rr_class, ttl=ttl, cpu=cpu, os=os) def _data_to_bytes(self) -> bytes: return encode_character_string(character_string=self.cpu) + encode_character_string(character_string=self.os)
45.142857
148
0.728639
184
1,264
4.663043
0.25
0.157343
0.051282
0.032634
0.386946
0.386946
0.293706
0.230769
0.165501
0.165501
0
0
0.162184
1,264
27
149
46.814815
0.810198
0
0
0
0
0
0.026899
0
0
0
0
0
0
1
0.238095
false
0
0.238095
0.142857
0.714286
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
3
c8ce715a4b5bce43593e8ad8311b461ec448c997
58
py
Python
problem/01000~09999/01427/1427.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-19T16:37:44.000Z
2019-04-19T16:37:44.000Z
problem/01000~09999/01427/1427.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
1
2019-04-20T11:42:44.000Z
2019-04-20T11:42:44.000Z
problem/01000~09999/01427/1427.py3.py
njw1204/BOJ-AC
1de41685725ae4657a7ff94e413febd97a888567
[ "MIT" ]
3
2019-04-19T16:37:47.000Z
2021-10-25T00:45:00.000Z
for i in sorted(map(int,[*input()]))[::-1]:print(i,end='')
58
58
0.568966
11
58
3
0.909091
0
0
0
0
0
0
0
0
0
0
0.018182
0.051724
58
1
58
58
0.581818
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
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
0
0
0
0
0
1
0
3
c8d22cc9808558f815a5d7d28b0ba82d589a0fb2
214
py
Python
easymunk/matplotlib/__init__.py
fabiommendes/easymunk
420dfc4a006997c47887f6876876249674feb3cd
[ "MIT" ]
1
2021-07-02T11:59:07.000Z
2021-07-02T11:59:07.000Z
easymunk/matplotlib/__init__.py
fabiommendes/easymunk
420dfc4a006997c47887f6876876249674feb3cd
[ "MIT" ]
null
null
null
easymunk/matplotlib/__init__.py
fabiommendes/easymunk
420dfc4a006997c47887f6876876249674feb3cd
[ "MIT" ]
1
2022-01-14T20:18:35.000Z
2022-01-14T20:18:35.000Z
""" This submodule contains helper functions to help with working with datascience tools such as Jupyter notebooks and Streamlit via matplotlib. """ __all__ = ["DrawOptions"] from .draw_options import DrawOptions
26.75
78
0.799065
27
214
6.148148
0.925926
0
0
0
0
0
0
0
0
0
0
0
0.140187
214
7
79
30.571429
0.902174
0.654206
0
0
0
0
0.166667
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
cdbcadcd6645d1212ff79dd330931537286b02ff
339
py
Python
sanstyle/display/_html.py
xinetzone/sanstyle
b9349b40f26fa76372bc3d32e1a5a956b30fdf74
[ "Apache-2.0" ]
null
null
null
sanstyle/display/_html.py
xinetzone/sanstyle
b9349b40f26fa76372bc3d32e1a5a956b30fdf74
[ "Apache-2.0" ]
null
null
null
sanstyle/display/_html.py
xinetzone/sanstyle
b9349b40f26fa76372bc3d32e1a5a956b30fdf74
[ "Apache-2.0" ]
null
null
null
class _EventTarget: '''https://developer.mozilla.org/en-US/docs/Web/API/EventTarget''' NotImplemented class _Node(_EventTarget): '''https://developer.mozilla.org/en-US/docs/Web/API/Node''' NotImplemented class _Element(_Node): '''ref of https://developer.mozilla.org/en-US/docs/Web/API/Element''' NotImplemented
26.076923
73
0.707965
43
339
5.465116
0.372093
0.178723
0.268085
0.306383
0.578723
0.578723
0.578723
0.578723
0.578723
0.417021
0
0
0.120944
339
13
74
26.076923
0.788591
0.525074
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
cdc5888e7b2399c23a68d49b57eb59164ead567e
1,562
py
Python
jma_feed/feed.py
tearoom6/jma-feed
4853c6ebe2dcd1ea47ff090bdcd21d3c98c6cc25
[ "MIT" ]
null
null
null
jma_feed/feed.py
tearoom6/jma-feed
4853c6ebe2dcd1ea47ff090bdcd21d3c98c6cc25
[ "MIT" ]
null
null
null
jma_feed/feed.py
tearoom6/jma-feed
4853c6ebe2dcd1ea47ff090bdcd21d3c98c6cc25
[ "MIT" ]
null
null
null
from jma_feed.xml import XmlDocument class AtomFeed(XmlDocument): """Model class which represents Atom feed.""" def __init__(self, target): super(AtomFeed, self).__init__(target, {'atom': 'http://www.w3.org/2005/Atom'}) @property def title(self): return self._element_text('atom:title') @property def subtitle(self): return self._element_text('atom:subtitle') @property def updated(self): return self._element_text('atom:updated') @property def id(self): return self._element_text('atom:id') @property def rights(self): return self._element_text('atom:rights') @property def entries(self): elements = self._elements('atom:entry') return [AtomFeedEntry(element) for element in elements] class AtomFeedEntry(XmlDocument): """Model class which represents Atom feed each entry.""" def __init__(self, target): super(AtomFeedEntry, self).__init__(target, {'atom': 'http://www.w3.org/2005/Atom'}) @property def title(self): return self._element_text('atom:title') @property def updated(self): return self._element_text('atom:updated') @property def id(self): return self._element_text('atom:id') @property def author(self): return self._element_text('atom:author/atom:name') @property def content(self): return self._element_text('atom:content') @property def link(self): return self._element_attr('atom:link', 'href')
24.030769
92
0.644686
187
1,562
5.171123
0.235294
0.136505
0.159255
0.238883
0.675284
0.629783
0.509824
0.418821
0.418821
0.418821
0
0.008278
0.226633
1,562
64
93
24.40625
0.792219
0.057618
0
0.590909
0
0
0.136893
0.014374
0
0
0
0
0
1
0.318182
false
0
0.022727
0.25
0.659091
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
0
0
0
3
cdcbd4dbac8b225af52c39aed83ef2a4e897c47c
4,296
py
Python
app/models.py
MugeraH/Letewaa
3067ab183cf814a670930236992f8fadc78dd3e7
[ "MIT" ]
null
null
null
app/models.py
MugeraH/Letewaa
3067ab183cf814a670930236992f8fadc78dd3e7
[ "MIT" ]
1
2021-05-06T18:52:24.000Z
2021-05-06T18:52:24.000Z
app/models.py
MugeraH/Letewaa
3067ab183cf814a670930236992f8fadc78dd3e7
[ "MIT" ]
2
2021-05-05T22:58:21.000Z
2021-07-19T20:44:04.000Z
from . import db from werkzeug.security import generate_password_hash,check_password_hash from datetime import datetime import time from flask_login import UserMixin from . import login_manager @login_manager.user_loader def load_user(user_id): return User.query.get(int(user_id)) # @login_manager.user_loader # def load_user(seller_id): # return Seller.query.get(int(seller_id)) class User(db.Model,UserMixin): __tablename__='users' id=db.Column(db.Integer, primary_key=True) username=db.Column(db.String) email=db.Column(db.String) pass_secure = db.Column(db.String(255)) phone=db.Column(db.String) profile_picture_path=db.Column(db.String) orders =db.relationship("Orders", backref="users", lazy="dynamic") cart =db.relationship("Cart", backref="users", lazy="dynamic") @property def password(self): raise AttributeError('You cannot read the password attribute') @password.setter def password(self,password): self.pass_secure = generate_password_hash(password) def verify_password(self,password): return check_password_hash(self.pass_secure,password) def __repr__(self): return f'User{self.username}' class Seller(db.Model,UserMixin): __tablename__='sellers' id=db.Column(db.Integer, primary_key=True) username=db.Column(db.String) bio=db.Column(db.String) profile_pic_path=db.Column(db.String) email=db.Column(db.String) pass_secure=db.Column(db.String) phone=db.Column(db.String) products=db.relationship("Product",backref="sellers", lazy="dynamic") orders =db.relationship("Orders", backref="sellers", lazy="dynamic") @property def password(self): raise AttributeError('You cannot read the password attribute') @password.setter def password(self,password): self.pass_secure = generate_password_hash(password) def verify_password(self,password): return check_password_hash(self.pass_secure,password) def __repr__(self): return f'Seller{self.username}' class Product(db.Model): __tablename__="products" id=db.Column(db.Integer, primary_key=True) product_name=db.Column(db.String) product_picture=db.Column(db.String) description=db.Column(db.String) seller_id=db.Column(db.Integer, db.ForeignKey('sellers.id',ondelete='SET NULL'),nullable = True) orders=db.relationship("Orders", backref="products", lazy="dynamic") cart=db.relationship("Cart", backref="products", lazy="dynamic") def save_new_product(self): db.session.add(self) db.session.commit() def __repr__(self): return f'Product{self.product}' class Orders(db.Model): __tablename__="orders" id=db.Column(db.Integer, primary_key=True) pizza_name=db.Column(db.String) pizza_size=db.Column(db.String) price=db.Column(db.Integer) isAccepted=db.Column(db.Boolean,default=False, server_default="false") product_id=db.Column(db.Integer, db.ForeignKey('products.id',ondelete='SET NULL'),nullable = True) time=db.Column(db.DateTime(),default=datetime.utcnow) user_id=db.Column(db.Integer, db.ForeignKey("users.id",ondelete='SET NULL'),nullable = True) seller_id=db.Column(db.Integer, db.ForeignKey('sellers.id',ondelete='SET NULL'),nullable = True) def add_order(self): db.session.add(self) db.session.commit() def __repr__(self): return f'Orders{self.pizza_name}' class Cart(db.Model): __tablename__="cart" id=db.Column(db.Integer, primary_key=True) product=db.Column(db.String) product_picture=db.Column(db.String) product_price = db.Column(db.Integer) amount = db.Column(db.Integer,default=0) size=db.Column(db.String) product_cost = db.Column(db.Integer,default=0) product_id=db.Column(db.Integer, db.ForeignKey('products.id',ondelete='SET NULL'),nullable = True) user_id=db.Column(db.Integer, db.ForeignKey("users.id",ondelete='SET NULL'),nullable = True) def add_item_to_cart(self): db.session.add(self) db.session.commit() def __repr__(self): return f'Cart{self.product}'
29.627586
102
0.688082
574
4,296
4.972125
0.165505
0.100911
0.126139
0.106517
0.722144
0.611072
0.593553
0.542397
0.526629
0.498598
0
0.001422
0.181564
4,296
144
103
29.833333
0.810296
0.022346
0
0.479167
1
0
0.103457
0.015495
0
0
0
0
0
1
0.15625
false
0.177083
0.0625
0.083333
0.84375
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
1
0
0
1
0
0
3
a801de5018dc09023e50c78ae7b9123e973d09ea
835
py
Python
tests/test_dev_mode.py
hoelzl/nbex
31b02c37890b05071d2cca9431aa7a683b3c482a
[ "MIT" ]
null
null
null
tests/test_dev_mode.py
hoelzl/nbex
31b02c37890b05071d2cca9431aa7a683b3c482a
[ "MIT" ]
1
2020-11-12T04:21:45.000Z
2020-11-12T13:32:56.000Z
tests/test_dev_mode.py
hoelzl/nbex
31b02c37890b05071d2cca9431aa7a683b3c482a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for the `nbex.dev_mode` module.""" import nbex.dev_mode # noqa: F401 from nbex.interactive import session def test_dev_mode_can_be_set_to_false(): session.dev_mode = False assert session.dev_mode is False def test_dev_mode_can_be_set_to_true(): session.dev_mode = True assert session.dev_mode is True def test_default_dev_mode_table_size_is_1000(): assert session.dev_mode_table_size == 1000 def test_pandas_table_size_is_available(): assert "pandas_table_size" in dir(session) def test_pandas_table_size_returns_size_in_dev_mode(): session.dev_mode = True assert session.pandas_table_size == session.dev_mode_table_size def test_pandas_table_size_returns_none_in_production_mode(): session.dev_mode = False assert session.pandas_table_size is None
23.857143
67
0.786826
135
835
4.407407
0.281481
0.164706
0.188235
0.10084
0.584874
0.389916
0.080672
0.080672
0
0
0
0.015363
0.142515
835
34
68
24.558824
0.815642
0.082635
0
0.222222
0
0
0.022398
0
0
0
0
0
0.333333
1
0.333333
true
0
0.111111
0
0.444444
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
1
0
0
0
0
0
0
3
a80968cbdda0d342e7c3663a532e92baca0798ca
1,965
py
Python
samplesheets/rules.py
bihealth/sodar-server
0c6a03c274ab34cd8987280fe97dc8989551d4bd
[ "MIT" ]
null
null
null
samplesheets/rules.py
bihealth/sodar-server
0c6a03c274ab34cd8987280fe97dc8989551d4bd
[ "MIT" ]
1
2021-05-28T10:59:49.000Z
2021-06-03T12:30:23.000Z
samplesheets/rules.py
bihealth/sodar-server
0c6a03c274ab34cd8987280fe97dc8989551d4bd
[ "MIT" ]
null
null
null
import rules # Projectroles dependency from projectroles import rules as pr_rules # To access common predicates # Predicates ------------------------------------------------------------- # TODO: If we need to assign new predicates, we do it here # Rules ------------------------------------------------------------------ # TODO: Rules should not be needed, use permissions for user rights # Permissions ------------------------------------------------------------ # Allow viewing the sample sheet of the project rules.add_perm( 'samplesheets.view_sheet', pr_rules.is_project_owner | pr_rules.is_project_delegate | pr_rules.is_project_contributor | pr_rules.is_project_guest, ) # Allow creating, importing or modifying the project's sample sheet rules.add_perm( 'samplesheets.edit_sheet', pr_rules.is_project_owner | pr_rules.is_project_delegate | pr_rules.is_project_contributor, ) # Allow managing sample sheet configuration and editing rules.add_perm( 'samplesheets.manage_sheet', pr_rules.is_project_owner | pr_rules.is_project_delegate, ) # Allow exporting a sample sheet from project rules.add_perm( 'samplesheets.export_sheet', pr_rules.is_project_owner | pr_rules.is_project_delegate | pr_rules.is_project_contributor | pr_rules.is_project_guest, ) # Allow viewing sample sheet versions rules.add_perm( 'samplesheets.view_versions', pr_rules.is_project_owner | pr_rules.is_project_delegate | pr_rules.is_project_contributor | pr_rules.is_project_guest, ) # Allow creating collection structure in iRODS rules.add_perm( 'samplesheets.create_colls', pr_rules.is_project_owner | pr_rules.is_project_delegate | pr_rules.is_project_contributor, ) # Allow deleting the project sample sheet rules.add_perm( 'samplesheets.delete_sheet', pr_rules.is_project_owner | pr_rules.is_project_delegate | pr_rules.is_project_contributor, )
25.192308
74
0.69313
247
1,965
5.174089
0.275304
0.131455
0.161972
0.28795
0.602504
0.528951
0.474178
0.474178
0.474178
0.474178
0
0
0.153181
1,965
77
75
25.519481
0.768029
0.368448
0
0.622222
0
0
0.140294
0.140294
0
0
0
0.012987
0
1
0
true
0
0.044444
0
0.044444
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
1
0
0
0
1
0
0
0
0
0
0
3
a80b7ee37befc015b69f414d8f9ca6ae4034f4c0
8,132
py
Python
soda/core/soda/sodacl/antlr/SodaCLAntlrVisitor.py
sodadata/soda-core
d9b98d4f6f3364c5eb8210e8288c4c861bcf8f8a
[ "Apache-2.0" ]
4
2022-03-23T02:43:42.000Z
2022-03-31T15:20:54.000Z
soda/core/soda/sodacl/antlr/SodaCLAntlrVisitor.py
sodadata/soda-core
d9b98d4f6f3364c5eb8210e8288c4c861bcf8f8a
[ "Apache-2.0" ]
543
2022-03-22T09:02:17.000Z
2022-03-31T16:29:41.000Z
soda/core/soda/sodacl/antlr/SodaCLAntlrVisitor.py
sodadata/soda-core
d9b98d4f6f3364c5eb8210e8288c4c861bcf8f8a
[ "Apache-2.0" ]
1
2022-03-27T03:37:55.000Z
2022-03-27T03:37:55.000Z
# Generated from /Users/tom/Code/soda-core/soda/core/soda/sodacl/antlr/SodaCLAntlr.g4 by ANTLR 4.9.3 from antlr4 import * if __name__ is not None and "." in __name__: from .SodaCLAntlrParser import SodaCLAntlrParser else: from SodaCLAntlrParser import SodaCLAntlrParser # This class defines a complete generic visitor for a parse tree produced by SodaCLAntlrParser. class SodaCLAntlrVisitor(ParseTreeVisitor): # Visit a parse tree produced by SodaCLAntlrParser#check. def visitCheck(self, ctx:SodaCLAntlrParser.CheckContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#freshness_check. def visitFreshness_check(self, ctx:SodaCLAntlrParser.Freshness_checkContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#freshness_variable. def visitFreshness_variable(self, ctx:SodaCLAntlrParser.Freshness_variableContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#warn_qualifier. def visitWarn_qualifier(self, ctx:SodaCLAntlrParser.Warn_qualifierContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#failed_rows_check. def visitFailed_rows_check(self, ctx:SodaCLAntlrParser.Failed_rows_checkContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#row_count_comparison_check. def visitRow_count_comparison_check(self, ctx:SodaCLAntlrParser.Row_count_comparison_checkContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#metric_check. def visitMetric_check(self, ctx:SodaCLAntlrParser.Metric_checkContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#default_anomaly_threshold. def visitDefault_anomaly_threshold(self, ctx:SodaCLAntlrParser.Default_anomaly_thresholdContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#change_over_time. def visitChange_over_time(self, ctx:SodaCLAntlrParser.Change_over_timeContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#change_over_time_config. def visitChange_over_time_config(self, ctx:SodaCLAntlrParser.Change_over_time_configContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#change_aggregation. def visitChange_aggregation(self, ctx:SodaCLAntlrParser.Change_aggregationContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#anomaly_score. def visitAnomaly_score(self, ctx:SodaCLAntlrParser.Anomaly_scoreContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#metric. def visitMetric(self, ctx:SodaCLAntlrParser.MetricContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#metric_name. def visitMetric_name(self, ctx:SodaCLAntlrParser.Metric_nameContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#metric_args. def visitMetric_args(self, ctx:SodaCLAntlrParser.Metric_argsContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#metric_arg. def visitMetric_arg(self, ctx:SodaCLAntlrParser.Metric_argContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#threshold. def visitThreshold(self, ctx:SodaCLAntlrParser.ThresholdContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#between_threshold. def visitBetween_threshold(self, ctx:SodaCLAntlrParser.Between_thresholdContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#comparator_threshold. def visitComparator_threshold(self, ctx:SodaCLAntlrParser.Comparator_thresholdContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#zones_threshold. def visitZones_threshold(self, ctx:SodaCLAntlrParser.Zones_thresholdContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#outcome. def visitOutcome(self, ctx:SodaCLAntlrParser.OutcomeContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#zone_comparator. def visitZone_comparator(self, ctx:SodaCLAntlrParser.Zone_comparatorContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#comparator. def visitComparator(self, ctx:SodaCLAntlrParser.ComparatorContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#threshold_value. def visitThreshold_value(self, ctx:SodaCLAntlrParser.Threshold_valueContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#freshness_threshold_value. def visitFreshness_threshold_value(self, ctx:SodaCLAntlrParser.Freshness_threshold_valueContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#reference_check. def visitReference_check(self, ctx:SodaCLAntlrParser.Reference_checkContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#source_column_name. def visitSource_column_name(self, ctx:SodaCLAntlrParser.Source_column_nameContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#target_column_name. def visitTarget_column_name(self, ctx:SodaCLAntlrParser.Target_column_nameContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#section_header. def visitSection_header(self, ctx:SodaCLAntlrParser.Section_headerContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#table_checks_header. def visitTable_checks_header(self, ctx:SodaCLAntlrParser.Table_checks_headerContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#partition_name. def visitPartition_name(self, ctx:SodaCLAntlrParser.Partition_nameContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#table_filter_header. def visitTable_filter_header(self, ctx:SodaCLAntlrParser.Table_filter_headerContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#column_configurations_header. def visitColumn_configurations_header(self, ctx:SodaCLAntlrParser.Column_configurations_headerContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#checks_for_each_dataset_header. def visitChecks_for_each_dataset_header(self, ctx:SodaCLAntlrParser.Checks_for_each_dataset_headerContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#checks_for_each_column_header. def visitChecks_for_each_column_header(self, ctx:SodaCLAntlrParser.Checks_for_each_column_headerContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#signed_number. def visitSigned_number(self, ctx:SodaCLAntlrParser.Signed_numberContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#number. def visitNumber(self, ctx:SodaCLAntlrParser.NumberContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#integer. def visitInteger(self, ctx:SodaCLAntlrParser.IntegerContext): return self.visitChildren(ctx) # Visit a parse tree produced by SodaCLAntlrParser#identifier. def visitIdentifier(self, ctx:SodaCLAntlrParser.IdentifierContext): return self.visitChildren(ctx) del SodaCLAntlrParser
39.096154
111
0.783202
910
8,132
6.825275
0.150549
0.038641
0.064402
0.115923
0.577685
0.531637
0.52568
0.505072
0.505072
0.505072
0
0.000728
0.155927
8,132
208
112
39.096154
0.904138
0.338785
0
0.458824
1
0
0.000189
0
0
0
0
0
0
1
0.458824
false
0
0.035294
0.458824
0.964706
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
0
0
0
3
a82362dbfa7cadc60a10c04c8ffb2c13a5c71df4
128
py
Python
model/record.py
YunYinORG/social
5020e980cacd8eca39fccc36faabc584f3c3e15f
[ "Apache-2.0" ]
4
2015-12-20T14:57:57.000Z
2021-01-23T12:54:20.000Z
model/record.py
YunYinORG/social
5020e980cacd8eca39fccc36faabc584f3c3e15f
[ "Apache-2.0" ]
1
2016-03-13T15:19:02.000Z
2016-03-18T03:11:18.000Z
model/record.py
YunYinORG/social
5020e980cacd8eca39fccc36faabc584f3c3e15f
[ "Apache-2.0" ]
4
2015-12-21T02:26:29.000Z
2016-09-03T02:57:07.000Z
#!/usr/bin/env python # coding=utf-8 from db import Model __doc__ = "记录数据库层封装" recordModel = Model('record') #类添加函数 # join查找
14.222222
29
0.703125
18
128
4.777778
0.944444
0
0
0
0
0
0
0
0
0
0
0.009259
0.15625
128
9
30
14.222222
0.787037
0.351563
0
0
0
0
0.175
0
0
0
0
0
0
1
0
false
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
0
0
1
0
0
0
0
3
b52e5079a4f57009914edf313eb20a325a36212d
478
py
Python
vendor-local/lib/python/picklefield/compat.py
satdav/mozillians
97d764f68d930275c1d722ba21c40ec2a963491d
[ "BSD-3-Clause" ]
null
null
null
vendor-local/lib/python/picklefield/compat.py
satdav/mozillians
97d764f68d930275c1d722ba21c40ec2a963491d
[ "BSD-3-Clause" ]
null
null
null
vendor-local/lib/python/picklefield/compat.py
satdav/mozillians
97d764f68d930275c1d722ba21c40ec2a963491d
[ "BSD-3-Clause" ]
null
null
null
# django 1.5 introduces force_text instead of force_unicode try: from django.utils.encoding import force_text except ImportError: from django.utils.encoding import force_unicode as force_text # python 3.x does not have cPickle module try: from cPickle import loads, dumps # cpython 2.x except ImportError: from pickle import loads, dumps # cpython 3.x, other interpreters try: from django.utils import simplejson as json except ImportError: import json
29.875
69
0.774059
71
478
5.140845
0.478873
0.073973
0.123288
0.09863
0.186301
0.186301
0
0
0
0
0
0.012755
0.179916
478
15
70
31.866667
0.918367
0.294979
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0
0.75
0
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
b532c8fd2b0f18b97f3f97c980f6cbdf5d096c7a
293
py
Python
lang/test_dict_key/test_dict_key.py
songofhawk/python-learning
b2693547ed71974a7d84e3b46125f1a0161f3376
[ "MIT" ]
null
null
null
lang/test_dict_key/test_dict_key.py
songofhawk/python-learning
b2693547ed71974a7d84e3b46125f1a0161f3376
[ "MIT" ]
null
null
null
lang/test_dict_key/test_dict_key.py
songofhawk/python-learning
b2693547ed71974a7d84e3b46125f1a0161f3376
[ "MIT" ]
null
null
null
from lang.test_dict_key.ClassEnum import ClassEnum VAR_FOR_KEY = 'test' dict2 = dict(x=3) if __name__ == "__main__": print({VAR_FOR_KEY: 'value'}) print({ClassEnum.VAR_FOR_KEY: 'value'}) print({ClassEnum.VAR_FOR_KEY2: 'value'}) print({ClassEnum.VAR_FOR_KEY.value: 'value'})
24.416667
50
0.703072
43
293
4.325581
0.418605
0.16129
0.322581
0.290323
0.510753
0.510753
0.510753
0.333333
0
0
0
0.011905
0.139932
293
11
51
26.636364
0.72619
0
0
0
0
0
0.109215
0
0
0
0
0
0
1
0
false
0
0.125
0
0.125
0.5
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
b5959e34a0706a83723e58d97cd2c3e00800b3cd
386
bzl
Python
third_party/repos/grpc.bzl
mingkaic/travis-test
84d45f7c7a079dfd66316d7c31969b43fb9e7c7f
[ "BSL-1.0", "MIT" ]
null
null
null
third_party/repos/grpc.bzl
mingkaic/travis-test
84d45f7c7a079dfd66316d7c31969b43fb9e7c7f
[ "BSL-1.0", "MIT" ]
8
2019-11-07T03:59:17.000Z
2022-02-19T19:42:47.000Z
third_party/repos/grpc.bzl
mingkaic/travis-test
84d45f7c7a079dfd66316d7c31969b43fb9e7c7f
[ "BSL-1.0", "MIT" ]
null
null
null
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") def grpc_rules_repository(): http_archive( name = "rules_proto_grpc", urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/archive/2.0.0.tar.gz"], sha256 = "d771584bbff98698e7cb3cb31c132ee206a972569f4dc8b65acbdd934d156b33", strip_prefix = "rules_proto_grpc-2.0.0", )
38.6
93
0.707254
47
386
5.531915
0.574468
0.153846
0.215385
0
0
0
0
0
0
0
0
0.146789
0.15285
386
9
94
42.888889
0.648318
0
0
0
0
0.125
0.598446
0.336788
0
0
0
0
0
1
0.125
true
0
0
0
0.125
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
b59a8949a97b46965f4cb5bc5c16ab2dbea3b100
469
py
Python
web/main/tests/tests.py
Mikhail-Gorelov/django-blog-master
7fd18f228f795773abb8228999d8e331dcfcf619
[ "MIT" ]
null
null
null
web/main/tests/tests.py
Mikhail-Gorelov/django-blog-master
7fd18f228f795773abb8228999d8e331dcfcf619
[ "MIT" ]
1
2022-03-28T08:23:26.000Z
2022-03-28T08:23:26.000Z
web/main/tests/tests.py
Mikhail-Gorelov/django-blog-master
7fd18f228f795773abb8228999d8e331dcfcf619
[ "MIT" ]
1
2022-01-06T15:14:21.000Z
2022-01-06T15:14:21.000Z
from django.test import TestCase from django.test import TransactionTestCase from main import tasks from celery.contrib.testing.worker import start_worker from main.models import User from src.celery import app class UserModelTests(TestCase): @classmethod def setUpTestData(cls): cls.user = User.objects.create_user('user@test.com', 'pass') def test_user_str(self): email = str(self.user) self.assertEqual(email, 'user@test.com')
27.588235
68
0.742004
64
469
5.375
0.484375
0.05814
0.081395
0.116279
0
0
0
0
0
0
0
0
0.168444
469
16
69
29.3125
0.882051
0
0
0
0
0
0.063966
0
0
0
0
0
0.076923
1
0.153846
false
0.076923
0.461538
0
0.692308
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
1
0
1
0
0
3
b59fb9b536998c7c83553b471ee33f32f2ff346f
15
py
Python
src/tuning/__init__.py
zhaoliuUT/tuning
1f1a9b1d66b994196de076f08f74a48c60dd7141
[ "MIT" ]
null
null
null
src/tuning/__init__.py
zhaoliuUT/tuning
1f1a9b1d66b994196de076f08f74a48c60dd7141
[ "MIT" ]
null
null
null
src/tuning/__init__.py
zhaoliuUT/tuning
1f1a9b1d66b994196de076f08f74a48c60dd7141
[ "MIT" ]
null
null
null
name = "tuning"
15
15
0.666667
2
15
5
1
0
0
0
0
0
0
0
0
0
0
0
0.133333
15
1
15
15
0.769231
0
0
0
0
0
0.375
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
b5ab073958b515ebbd098e41f71e5d09520b2dd8
54
py
Python
bitrix24/__init__.py
awesomebitrix/bitrix24-python3-client
919b7d6b19f915d0045e57faa1662273a70c486c
[ "MIT" ]
4
2018-08-28T06:02:45.000Z
2020-07-05T17:40:57.000Z
bitrix24/__init__.py
miklobit/bitrix24-python3-client
919b7d6b19f915d0045e57faa1662273a70c486c
[ "MIT" ]
null
null
null
bitrix24/__init__.py
miklobit/bitrix24-python3-client
919b7d6b19f915d0045e57faa1662273a70c486c
[ "MIT" ]
1
2019-03-21T06:07:32.000Z
2019-03-21T06:07:32.000Z
from .bitrix24 import Bitrix24 __version__ = '0.3.2'
13.5
30
0.740741
8
54
4.5
0.875
0
0
0
0
0
0
0
0
0
0
0.152174
0.148148
54
3
31
18
0.630435
0
0
0
0
0
0.092593
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
a927678709f92896e2a081b02713e32f3eb09f10
103
py
Python
python_training/debugger.py
Shogo-Sakai/everybodys_ai
8ea227d3b998e558f7dabbebd121eaff06a09085
[ "MIT" ]
null
null
null
python_training/debugger.py
Shogo-Sakai/everybodys_ai
8ea227d3b998e558f7dabbebd121eaff06a09085
[ "MIT" ]
null
null
null
python_training/debugger.py
Shogo-Sakai/everybodys_ai
8ea227d3b998e558f7dabbebd121eaff06a09085
[ "MIT" ]
null
null
null
a = 7 b = 3 def func1(c,d): e = c + d e += c e *= d return e f = func1(a,b) print (f)
9.363636
15
0.407767
23
103
1.826087
0.521739
0.095238
0.142857
0.190476
0
0
0
0
0
0
0
0.066667
0.417476
103
11
16
9.363636
0.633333
0
0
0
0
0
0
0
0
0
0
0
0
1
0.111111
false
0
0
0
0.222222
0.111111
1
0
1
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
0
0
0
0
0
0
0
3
a9499043f1cbb7bfdfdfca47ca509a75f32c2daf
402
py
Python
vorn/sensors/ultrasonic.py
vornet/VORN
edea4c2a0f24cc6ca07cc4781fb1a4970d95a453
[ "Apache-2.0" ]
1
2018-09-24T23:51:22.000Z
2018-09-24T23:51:22.000Z
vorn/sensors/ultrasonic.py
vornet/VORN
edea4c2a0f24cc6ca07cc4781fb1a4970d95a453
[ "Apache-2.0" ]
null
null
null
vorn/sensors/ultrasonic.py
vornet/VORN
edea4c2a0f24cc6ca07cc4781fb1a4970d95a453
[ "Apache-2.0" ]
null
null
null
class UltrasonicSensor: def __init__(self, megapi, slot): self._megapi = megapi self._slot = slot self._last_val = 400 def read(self): self._megapi.ultrasonicSensorRead(self._slot, self._on_forward_ultrasonic_read) def get_value(self): return self._last_val def _on_forward_ultrasonic_read(self, val): self._last_val = val
21.157895
87
0.651741
49
402
4.877551
0.367347
0.125523
0.138075
0.192469
0
0
0
0
0
0
0
0.010204
0.268657
402
18
88
22.333333
0.802721
0
0
0
0
0
0
0
0
0
0
0
0
1
0.363636
false
0
0
0.090909
0.545455
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
0
1
0
0
3
a96423840918a2967200138c1d403350c2cc5e5f
791
py
Python
hydra/supervisor/manager.py
rpacholek/hydra
60e3c2eec5ab1fd1dde8e510baa5175173c66a6a
[ "MIT" ]
null
null
null
hydra/supervisor/manager.py
rpacholek/hydra
60e3c2eec5ab1fd1dde8e510baa5175173c66a6a
[ "MIT" ]
null
null
null
hydra/supervisor/manager.py
rpacholek/hydra
60e3c2eec5ab1fd1dde8e510baa5175173c66a6a
[ "MIT" ]
null
null
null
from typing import Type from .node import SupervisorNode from ..core.node.manager import NodeManager from ..core.node.base_node import Node from ..core.action.executor import action_executor, executor_forwarder from ..core.common.coro import NoneCoroManager class SupervisorManager(NodeManager): def __init__(self, action_queue, config=None, env=None): super().__init__(action_queue, config.get("supervisor"), env) def get_class(self) -> Type[Node]: return SupervisorNode @action_executor("event") def task_executor(self, action): action_type = action.get_type() @action_executor(executor_forwarder(SupervisorNode)) def forward(self, action): if len(self.nodes) == 1: list(self.nodes.values())[0].exec_action(action)
31.64
70
0.724399
99
791
5.575758
0.40404
0.057971
0.043478
0.112319
0
0
0
0
0
0
0
0.00303
0.165613
791
24
71
32.958333
0.833333
0
0
0
0
0
0.018963
0
0
0
0
0
0
1
0.222222
false
0
0.333333
0.055556
0.666667
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
1
0
1
0
0
3
a99cde5565f7515424f8c571e9c4c70afe5c3ecc
70
py
Python
config/__init__.py
ak04nv/boilerplate
04eab053f01fbf30cabfe8fbf5d6a39914acd129
[ "MIT" ]
1
2018-08-02T10:06:23.000Z
2018-08-02T10:06:23.000Z
config/__init__.py
ak04nv/boilerplate
04eab053f01fbf30cabfe8fbf5d6a39914acd129
[ "MIT" ]
null
null
null
config/__init__.py
ak04nv/boilerplate
04eab053f01fbf30cabfe8fbf5d6a39914acd129
[ "MIT" ]
null
null
null
from .db_wrapper import DBWrapper, SignalsDBWrapper db = DBWrapper()
17.5
51
0.8
8
70
6.875
0.75
0
0
0
0
0
0
0
0
0
0
0
0.128571
70
3
52
23.333333
0.901639
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
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
3
8d44827b8dda92a806ffe60cbd560014ea6bc768
111
py
Python
base/hello3.py
Aaa986750854/git_app1
4bea7b141c57562f9ab576c84eb08ec37992a0ef
[ "MIT" ]
null
null
null
base/hello3.py
Aaa986750854/git_app1
4bea7b141c57562f9ab576c84eb08ec37992a0ef
[ "MIT" ]
null
null
null
base/hello3.py
Aaa986750854/git_app1
4bea7b141c57562f9ab576c84eb08ec37992a0ef
[ "MIT" ]
null
null
null
ll=range(5, 20, 5) for i in ll: print(i) print (ll) x = 'Python' for i in range(len(x)) : print(x[i])
11.1
24
0.54955
24
111
2.541667
0.458333
0.131148
0.196721
0
0
0
0
0
0
0
0
0.048193
0.252252
111
10
25
11.1
0.686747
0
0
0
0
0
0.053571
0
0
0
0
0
0
1
0
false
0
0
0
0
0.428571
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
8d4a517ed5e08ac22cecf6f0da4506e30acf9346
78
py
Python
list_practice.py
debojit666/Python-PracticeFiles
a90d2102b9f9fa217853215a8605b4909c41ce0b
[ "Python-2.0", "OLDAP-2.4", "OLDAP-2.3", "OLDAP-2.8" ]
null
null
null
list_practice.py
debojit666/Python-PracticeFiles
a90d2102b9f9fa217853215a8605b4909c41ce0b
[ "Python-2.0", "OLDAP-2.4", "OLDAP-2.3", "OLDAP-2.8" ]
null
null
null
list_practice.py
debojit666/Python-PracticeFiles
a90d2102b9f9fa217853215a8605b4909c41ce0b
[ "Python-2.0", "OLDAP-2.4", "OLDAP-2.3", "OLDAP-2.8" ]
null
null
null
li = [] for x in range (21): li.append(x) print(li) del(li[4]) print(li)
9.75
20
0.564103
16
78
2.75
0.625
0.318182
0
0
0
0
0
0
0
0
0
0.04918
0.217949
78
7
21
11.142857
0.672131
0
0
0.333333
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.333333
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
0
0
3
8d5205613efa8be1e8710bf5043e72b1bbcfa2aa
159
py
Python
src/ua/raccoon/task12/solution.py
DataArt/kiddo-tasks
9e15241a6a3f152b4b64a345d923224450c0adee
[ "Apache-2.0" ]
12
2020-10-01T12:37:26.000Z
2022-01-11T09:00:24.000Z
src/ua/raccoon/task12/solution.py
DataArt/kiddo-tasks
9e15241a6a3f152b4b64a345d923224450c0adee
[ "Apache-2.0" ]
1
2021-01-15T07:15:54.000Z
2021-01-15T07:15:54.000Z
src/ua/raccoon/task12/solution.py
DataArt/kiddo-tasks
9e15241a6a3f152b4b64a345d923224450c0adee
[ "Apache-2.0" ]
2
2020-10-16T09:27:33.000Z
2021-07-11T13:19:31.000Z
import raccoon raccoon.go_up(3) raccoon.go_left(3) raccoon.go_down() raccoon.go_right() raccoon.go_up() raccoon.go_right(3) raccoon.go_up(2) raccoon.go_left()
15.9
19
0.786164
30
159
3.9
0.3
0.615385
0.282051
0
0
0
0
0
0
0
0
0.026846
0.062893
159
10
20
15.9
0.758389
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.111111
0
0.111111
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
3
8d65094a0c84eacc6d166d31dd751315440bc269
179
py
Python
l10n_br_sale/models/delivery_carrier.py
kaoecoito/odoo-brasil
6e019efc4e03b2e7be6ca51d08ace095240e0f07
[ "MIT" ]
181
2016-11-11T04:39:43.000Z
2022-03-14T21:17:19.000Z
l10n_br_sale/models/delivery_carrier.py
kaoecoito/odoo-brasil
6e019efc4e03b2e7be6ca51d08ace095240e0f07
[ "MIT" ]
899
2016-11-14T02:42:56.000Z
2022-03-29T20:47:39.000Z
l10n_br_sale/models/delivery_carrier.py
kaoecoito/odoo-brasil
6e019efc4e03b2e7be6ca51d08ace095240e0f07
[ "MIT" ]
227
2016-11-10T17:16:59.000Z
2022-03-26T16:46:38.000Z
from odoo import fields, models class DeliveryCarrier(models.Model): _inherit = 'delivery.carrier' partner_id = fields.Many2one('res.partner', string='Transportadora')
22.375
72
0.748603
20
179
6.6
0.85
0
0
0
0
0
0
0
0
0
0
0.006494
0.139665
179
7
73
25.571429
0.850649
0
0
0
0
0
0.22905
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
8d8dea287982f934f0008af0387cac9c41ba5048
264
py
Python
jsonclasses_pymongo/exceptions.py
Jesse-Yung/jsonclasses-pymongo
03cf763cb0f8e95497397ac85652126ddd256b13
[ "MIT" ]
2
2021-11-02T02:54:01.000Z
2021-12-02T10:38:18.000Z
jsonclasses_pymongo/exceptions.py
Jesse-Yung/jsonclasses-pymongo
03cf763cb0f8e95497397ac85652126ddd256b13
[ "MIT" ]
1
2021-12-09T09:54:53.000Z
2021-12-09T09:54:53.000Z
jsonclasses_pymongo/excs.py
zhichao-github/jsonclasses-pymongo
eaf08e4342a08f484bf99d06a3bceae447925189
[ "MIT" ]
5
2021-07-22T06:30:05.000Z
2021-12-09T02:02:30.000Z
class DatabaseNotConnectedException(Exception): """This exception is raised when collection is accessed however database is not connected. """ def __init__(self, message: str): self.message = message super().__init__(self.message)
29.333333
79
0.69697
28
264
6.285714
0.678571
0.1875
0.170455
0
0
0
0
0
0
0
0
0
0.215909
264
8
80
33
0.850242
0.329545
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
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
8d917b76b613d338f45d78ec90b03cfe791fe628
154
py
Python
_beta/sentences.py
timothyjrbeck/py-lingvon-telegram-bot
ff06dd6a1f378abc3724e8ffcd9768df50cfd702
[ "MIT" ]
null
null
null
_beta/sentences.py
timothyjrbeck/py-lingvon-telegram-bot
ff06dd6a1f378abc3724e8ffcd9768df50cfd702
[ "MIT" ]
null
null
null
_beta/sentences.py
timothyjrbeck/py-lingvon-telegram-bot
ff06dd6a1f378abc3724e8ffcd9768df50cfd702
[ "MIT" ]
null
null
null
import requests word = 'cheval' r = requests.get('https://www.dicts.info/examples.php?disa=1&lang2=french&word=' + word + '&go=Search') print(r.content)
25.666667
103
0.707792
24
154
4.541667
0.833333
0
0
0
0
0
0
0
0
0
0
0.014286
0.090909
154
6
104
25.666667
0.764286
0
0
0
0
0.25
0.496774
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
8da7328f0a2a2fa135fefc6b0b02ed469c15d540
146
py
Python
clientsideapp/apps.py
bashmak/djing
8cc0c670600254d288178acd47965f7b3db6856e
[ "Unlicense" ]
23
2017-04-27T20:13:22.000Z
2022-03-16T12:47:29.000Z
clientsideapp/apps.py
bashmak/djing
8cc0c670600254d288178acd47965f7b3db6856e
[ "Unlicense" ]
2
2017-04-04T15:03:12.000Z
2021-01-26T15:30:57.000Z
clientsideapp/apps.py
bashmak/djing
8cc0c670600254d288178acd47965f7b3db6856e
[ "Unlicense" ]
13
2017-08-22T16:00:03.000Z
2022-03-20T03:12:15.000Z
from django.apps import AppConfig class ClientsideappConfig(AppConfig): name = 'clientsideapp' verbose_name = 'Client side application'
20.857143
44
0.767123
15
146
7.4
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.164384
146
6
45
24.333333
0.909836
0
0
0
0
0
0.246575
0
0
0
0
0
0
1
0
false
0
0.25
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
a5c6f4bcf0c100e3bfba1c5a3b512fe7a82d3fda
332
py
Python
mlprogram/utils/data/__init__.py
HiroakiMikami/mlprogram
573e94c567064705fa65267dd83946bf183197de
[ "MIT" ]
9
2020-05-24T11:25:01.000Z
2022-03-28T15:32:10.000Z
mlprogram/utils/data/__init__.py
HiroakiMikami/mlprogram
573e94c567064705fa65267dd83946bf183197de
[ "MIT" ]
87
2020-05-09T08:56:55.000Z
2022-03-31T14:46:45.000Z
mlprogram/utils/data/__init__.py
HiroakiMikami/NL2Prog
573e94c567064705fa65267dd83946bf183197de
[ "MIT" ]
3
2021-02-22T20:38:29.000Z
2021-11-11T18:48:44.000Z
from mlprogram.utils.data.functions import ( # noqa Collate, CollateOptions, get_characters, get_samples, get_words, split_by_n_error, ) from mlprogram.utils.data.random import random_split # noqa from mlprogram.utils.data.utils import ( # noqa ListDataset, to_map_style_dataset, transform, )
22.133333
60
0.71988
41
332
5.585366
0.585366
0.170306
0.235808
0.28821
0
0
0
0
0
0
0
0
0.204819
332
14
61
23.714286
0.867424
0.042169
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0.214286
0
0.214286
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
0
0
0
0
0
3
a5e0abfb7e8a8ebf9ca9fe2d5ab205dd23e2a00b
265
py
Python
icml_launchers/ml45_meta_test.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
2
2020-03-15T14:35:15.000Z
2021-02-15T16:38:00.000Z
neurips_launchers/ml45_meta_test.py
neurips2020submission11699/metarl
ae4825d21478fa1fd0aa6b116941ea40caa152a5
[ "MIT" ]
null
null
null
neurips_launchers/ml45_meta_test.py
neurips2020submission11699/metarl
ae4825d21478fa1fd0aa6b116941ea40caa152a5
[ "MIT" ]
1
2020-02-24T03:04:23.000Z
2020-02-24T03:04:23.000Z
"""This script is used for doing off-line meta testing.""" from metaworld.benchmarks import ML45WithPinnedGoal from metarl.experiment.meta_test_helper import MetaTestHelper if __name__ == "__main__": MetaTestHelper.read_cmd(ML45WithPinnedGoal.get_test_tasks)
33.125
62
0.818868
33
265
6.181818
0.818182
0
0
0
0
0
0
0
0
0
0
0.016878
0.10566
265
7
63
37.857143
0.843882
0.196226
0
0
0
0
0.038647
0
0
0
0
0
0
1
0
true
0
0.5
0
0.5
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
3
a5e57728ed8774087bfc1dac45537a0240ca2d9b
1,356
py
Python
app/books/migrations/0009_auto_20200315_2015.py
kaantecik/yazlab2_p_1
5ff94b08bf3148de63697fec3565f9f557ff2f0f
[ "MIT" ]
null
null
null
app/books/migrations/0009_auto_20200315_2015.py
kaantecik/yazlab2_p_1
5ff94b08bf3148de63697fec3565f9f557ff2f0f
[ "MIT" ]
null
null
null
app/books/migrations/0009_auto_20200315_2015.py
kaantecik/yazlab2_p_1
5ff94b08bf3148de63697fec3565f9f557ff2f0f
[ "MIT" ]
null
null
null
# Generated by Django 3.0.4 on 2020-03-15 20:15 import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('books', '0008_auto_20200312_2222'), ] operations = [ migrations.AlterField( model_name='book', name='ISBN_Data', field=models.CharField(max_length=50, null=True), ), migrations.AlterField( model_name='book', name='ISBN_Image', field=models.FileField(null=True, upload_to='', verbose_name='ISBN_Image'), ), migrations.AlterField( model_name='book', name='current_user', field=models.CharField(max_length=50, null=True), ), migrations.AlterField( model_name='book', name='deadline_date', field=models.DateTimeField(default=datetime.datetime(2020, 3, 22, 23, 15, 9, 384270), null=True), ), migrations.AlterField( model_name='book', name='detail', field=models.CharField(max_length=500, null=True), ), migrations.AlterField( model_name='book', name='upload_date', field=models.DateTimeField(default=datetime.datetime(2020, 3, 15, 23, 15, 9, 384365)), ), ]
30.133333
109
0.569322
141
1,356
5.333333
0.404255
0.159574
0.199468
0.231383
0.618351
0.579787
0.530585
0.470745
0.351064
0.202128
0
0.078723
0.306785
1,356
44
110
30.818182
0.721277
0.033186
0
0.526316
1
0
0.093965
0.017571
0
0
0
0
0
1
0
false
0
0.052632
0
0.131579
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
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
570531161edc2e59be766b55cf457aa69e06311b
316
py
Python
src/libcurl/__init__.py
karpierz/libcurl
531bd28ab32fb07c152e5b5ca4bd4dbde059b9a8
[ "Zlib" ]
null
null
null
src/libcurl/__init__.py
karpierz/libcurl
531bd28ab32fb07c152e5b5ca4bd4dbde059b9a8
[ "Zlib" ]
null
null
null
src/libcurl/__init__.py
karpierz/libcurl
531bd28ab32fb07c152e5b5ca4bd4dbde059b9a8
[ "Zlib" ]
null
null
null
# Copyright (c) 2021-2022 Adam Karpierz # Licensed under the zlib/libpng License # https://opensource.org/licenses/Zlib from . import __config__ ; del __config__ from .__about__ import * ; del __about__ # noqa from .__config__ import set_config as config from ._curl import * # noqa from ._ct import * # noqa
28.727273
48
0.743671
43
316
4.930233
0.604651
0.09434
0
0
0
0
0
0
0
0
0
0.030651
0.174051
316
10
49
31.6
0.781609
0.405063
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
3
57286610585a27dfc3f7292ff10506660eac1852
15
py
Python
my_python_example/hello/__init__.py
ccthomas/my-python-example
3cb2cb3a304d52b31b3486899cdc4fdc3e35eaa9
[ "Apache-2.0" ]
null
null
null
my_python_example/hello/__init__.py
ccthomas/my-python-example
3cb2cb3a304d52b31b3486899cdc4fdc3e35eaa9
[ "Apache-2.0" ]
null
null
null
my_python_example/hello/__init__.py
ccthomas/my-python-example
3cb2cb3a304d52b31b3486899cdc4fdc3e35eaa9
[ "Apache-2.0" ]
null
null
null
name = "hello"
7.5
14
0.6
2
15
4.5
1
0
0
0
0
0
0
0
0
0
0
0
0.2
15
1
15
15
0.75
0
0
0
0
0
0.333333
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
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
574d2ebeee313c6c21d263f37ea4f2f3ca74b435
1,744
py
Python
core/plugin.py
Avedo/Ezrael
ce2b9ac40ed6100ec86267ab0636a442c7a83f7a
[ "Apache-2.0" ]
1
2016-09-24T18:11:43.000Z
2016-09-24T18:11:43.000Z
core/plugin.py
Avedo/Ezrael
ce2b9ac40ed6100ec86267ab0636a442c7a83f7a
[ "Apache-2.0" ]
6
2015-05-15T13:21:13.000Z
2015-06-23T18:47:22.000Z
core/plugin.py
Bornageek/Ezrael
ce2b9ac40ed6100ec86267ab0636a442c7a83f7a
[ "Apache-2.0" ]
1
2016-02-26T14:17:38.000Z
2016-02-26T14:17:38.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from core.msghandler import MessageHandler from queue import * import logging import _thread import time class Plugin(MessageHandler): def __init__(self, context=None): # Fetch an instance of the logger. if context is not None and context['debugging']: self.logger = logging.getLogger('development') else: self.logger = logging.getLogger('production') self.context = context self.queue_in = Queue() self.queue_out = Queue() _thread.start_new_thread(self.run,()) self.resttime = 0 self.lastcmd = 0 def run(self): while True: event, args, kwargs = self.queue_in.get() try: getattr(self, event)(*args, **kwargs) except IndexError: print("IndexError") pass except ValueError: print("ValueError") pass def queue(self, event, *args, **kwargs): self.queue_in.put((event, args, kwargs)) def send(self, data): self.queue_out.put(data) def init(self): pass def on_receive(self, message): pass def on_private_message(self, message): pass def on_channel_message(self, message): pass def on_message(self, message): pass def on_command(self, message): pass def on_kick(self, message): pass def on_join(self, message): pass def on_ping(self, message): pass def on_notice(self, message): pass def on_quit(self, message): pass
23.253333
59
0.545298
193
1,744
4.797927
0.378238
0.083153
0.097192
0.174946
0.273218
0.143629
0
0
0
0
0
0.002686
0.359518
1,744
74
60
23.567568
0.826321
0.043005
0
0.240741
0
0
0.031407
0
0
0
0
0
0
1
0.277778
false
0.240741
0.092593
0
0.388889
0.037037
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
1
0
0
0
0
0
3
939039d5859e9c7b53755e162f81aeffe89a4fae
205
py
Python
chapter2/intogen-mutations/develop/lib/python/intogensm/command/results.py
chris-zen/phd-thesis
1eefdff8e7ca1910304e27ae42551dc64496b101
[ "Unlicense" ]
1
2015-12-22T00:53:18.000Z
2015-12-22T00:53:18.000Z
chapter2/intogen-mutations/develop/lib/python/intogensm/command/results.py
chris-zen/phd-thesis
1eefdff8e7ca1910304e27ae42551dc64496b101
[ "Unlicense" ]
null
null
null
chapter2/intogen-mutations/develop/lib/python/intogensm/command/results.py
chris-zen/phd-thesis
1eefdff8e7ca1910304e27ae42551dc64496b101
[ "Unlicense" ]
null
null
null
from intogensm.command import RunCommand from intogensm.analysis import RESULTS_FLOW_NAME class ResultsCommand(RunCommand): cmd_name = "results" def execute(self): self._wok_run(RESULTS_FLOW_NAME)
18.636364
48
0.814634
27
205
5.925926
0.62963
0.1625
0.1875
0
0
0
0
0
0
0
0
0
0.117073
205
10
49
20.5
0.883978
0
0
0
0
0
0.034146
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.833333
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
93b6ff5b60c95ea48597da25e11baecbe603b710
118
py
Python
image/urls.py
kuroye/python_final_project2
8feeb78a1a72dc631e3fe2ae0bb07e73b02082dd
[ "MIT" ]
null
null
null
image/urls.py
kuroye/python_final_project2
8feeb78a1a72dc631e3fe2ae0bb07e73b02082dd
[ "MIT" ]
null
null
null
image/urls.py
kuroye/python_final_project2
8feeb78a1a72dc631e3fe2ae0bb07e73b02082dd
[ "MIT" ]
null
null
null
from django.urls import path from .views import ImageView urlpatterns = [ path('image/', ImageView.as_view()), ]
16.857143
40
0.711864
15
118
5.533333
0.733333
0
0
0
0
0
0
0
0
0
0
0
0.161017
118
6
41
19.666667
0.838384
0
0
0
0
0
0.050847
0
0
0
0
0
0
1
0
false
0
0.4
0
0.4
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
93bc9cbf4b01365317ccb9688cca4dd8839f4fba
658
py
Python
processor/DataProcessor.py
amrjlg/MultiLabelClassification
62b3291c00fc244852358ae39026860b523ea35d
[ "Apache-2.0" ]
null
null
null
processor/DataProcessor.py
amrjlg/MultiLabelClassification
62b3291c00fc244852358ae39026860b523ea35d
[ "Apache-2.0" ]
null
null
null
processor/DataProcessor.py
amrjlg/MultiLabelClassification
62b3291c00fc244852358ae39026860b523ea35d
[ "Apache-2.0" ]
null
null
null
class DataProcessor(object): """Base class for data converters for sequence classification data sets.""" def get_train_examples(self, data_dir): """Gets a collection of `InputExample`s for the train set.""" raise NotImplementedError() def get_dev_examples(self, data_dir): """Gets a collection of `InputExample`s for the dev set.""" raise NotImplementedError() def get_test_examples(self, data_dir, data_file_name, size=-1): """Gets a collection of `InputExample`s for the dev set.""" raise NotImplementedError() def get_labels(self): """Gets the list of labels for this data set.""" raise NotImplementedError()
34.631579
77
0.717325
90
658
5.111111
0.388889
0.052174
0.234783
0.123913
0.545652
0.473913
0.473913
0.473913
0.473913
0.473913
0
0.001842
0.174772
658
18
78
36.555556
0.845304
0.419453
0
0.444444
0
0
0
0
0
0
0
0
0
1
0.444444
false
0
0
0
0.555556
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
3
93cc24742b31f09869c8a192d6e40e1039ba8c11
23,634
py
Python
python/pb/envoy/config/endpoint/v4alpha/endpoint_components_pb2.py
adriangb/enterprise-client
5d50b457425b0c6d08415b0d986fa9151b792151
[ "Apache-2.0" ]
null
null
null
python/pb/envoy/config/endpoint/v4alpha/endpoint_components_pb2.py
adriangb/enterprise-client
5d50b457425b0c6d08415b0d986fa9151b792151
[ "Apache-2.0" ]
null
null
null
python/pb/envoy/config/endpoint/v4alpha/endpoint_components_pb2.py
adriangb/enterprise-client
5d50b457425b0c6d08415b0d986fa9151b792151
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: envoy/config/endpoint/v4alpha/endpoint_components.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() from envoy.config.core.v4alpha import address_pb2 as envoy_dot_config_dot_core_dot_v4alpha_dot_address__pb2 from envoy.config.core.v4alpha import base_pb2 as envoy_dot_config_dot_core_dot_v4alpha_dot_base__pb2 from envoy.config.core.v4alpha import config_source_pb2 as envoy_dot_config_dot_core_dot_v4alpha_dot_config__source__pb2 from envoy.config.core.v4alpha import health_check_pb2 as envoy_dot_config_dot_core_dot_v4alpha_dot_health__check__pb2 from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2 from udpa.annotations import status_pb2 as udpa_dot_annotations_dot_status__pb2 from udpa.annotations import versioning_pb2 as udpa_dot_annotations_dot_versioning__pb2 from validate import validate_pb2 as validate_dot_validate__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='envoy/config/endpoint/v4alpha/endpoint_components.proto', package='envoy.config.endpoint.v4alpha', syntax='proto3', serialized_options=b'\n+io.envoyproxy.envoy.config.endpoint.v4alphaB\027EndpointComponentsProtoP\001\272\200\310\321\006\002\020\003', create_key=_descriptor._internal_create_key, serialized_pb=b'\n7envoy/config/endpoint/v4alpha/endpoint_components.proto\x12\x1d\x65nvoy.config.endpoint.v4alpha\x1a\'envoy/config/core/v4alpha/address.proto\x1a$envoy/config/core/v4alpha/base.proto\x1a-envoy/config/core/v4alpha/config_source.proto\x1a,envoy/config/core/v4alpha/health_check.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1dudpa/annotations/status.proto\x1a!udpa/annotations/versioning.proto\x1a\x17validate/validate.proto\"\xd6\x02\n\x08\x45ndpoint\x12\x33\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\".envoy.config.core.v4alpha.Address\x12V\n\x13health_check_config\x18\x02 \x01(\x0b\x32\x39.envoy.config.endpoint.v4alpha.Endpoint.HealthCheckConfig\x12\x10\n\x08hostname\x18\x03 \x01(\t\x1a\x80\x01\n\x11HealthCheckConfig\x12\x1d\n\nport_value\x18\x01 \x01(\rB\t\xfa\x42\x06*\x04\x18\xff\xff\x03\x12\x10\n\x08hostname\x18\x02 \x01(\t::\x9a\xc5\x88\x1e\x35\n3envoy.config.endpoint.v3.Endpoint.HealthCheckConfig:(\x9a\xc5\x88\x1e#\n!envoy.config.endpoint.v3.Endpoint\"\xde\x02\n\nLbEndpoint\x12;\n\x08\x65ndpoint\x18\x01 \x01(\x0b\x32\'.envoy.config.endpoint.v4alpha.EndpointH\x00\x12\x17\n\rendpoint_name\x18\x05 \x01(\tH\x00\x12>\n\rhealth_status\x18\x02 \x01(\x0e\x32\'.envoy.config.core.v4alpha.HealthStatus\x12\x35\n\x08metadata\x18\x03 \x01(\x0b\x32#.envoy.config.core.v4alpha.Metadata\x12\x44\n\x15load_balancing_weight\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x07\xfa\x42\x04*\x02(\x01:*\x9a\xc5\x88\x1e%\n#envoy.config.endpoint.v3.LbEndpointB\x11\n\x0fhost_identifier\"\xb2\x01\n\x19LedsClusterLocalityConfig\x12<\n\x0bleds_config\x18\x01 \x01(\x0b\x32\'.envoy.config.core.v4alpha.ConfigSource\x12\x1c\n\x14leds_collection_name\x18\x02 \x01(\t:9\x9a\xc5\x88\x1e\x34\n2envoy.config.endpoint.v3.LedsClusterLocalityConfig\"\xbc\x05\n\x13LocalityLbEndpoints\x12\x35\n\x08locality\x18\x01 \x01(\x0b\x32#.envoy.config.core.v4alpha.Locality\x12?\n\x0clb_endpoints\x18\x02 \x03(\x0b\x32).envoy.config.endpoint.v4alpha.LbEndpoint\x12^\n\x11lb_endpoints_list\x18\x07 \x01(\x0b\x32\x41.envoy.config.endpoint.v4alpha.LocalityLbEndpoints.LbEndpointListH\x00\x12`\n\x1cleds_cluster_locality_config\x18\x08 \x01(\x0b\x32\x38.envoy.config.endpoint.v4alpha.LedsClusterLocalityConfigH\x00\x12\x44\n\x15load_balancing_weight\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32ValueB\x07\xfa\x42\x04*\x02(\x01\x12\x1a\n\x08priority\x18\x05 \x01(\rB\x08\xfa\x42\x05*\x03\x18\x80\x01\x12/\n\tproximity\x18\x06 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x1a\x95\x01\n\x0eLbEndpointList\x12?\n\x0clb_endpoints\x18\x01 \x03(\x0b\x32).envoy.config.endpoint.v4alpha.LbEndpoint:B\x9a\xc5\x88\x1e=\n;envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList:3\x9a\xc5\x88\x1e.\n,envoy.config.endpoint.v3.LocalityLbEndpointsB\x0b\n\tlb_configBP\n+io.envoyproxy.envoy.config.endpoint.v4alphaB\x17\x45ndpointComponentsProtoP\x01\xba\x80\xc8\xd1\x06\x02\x10\x03\x62\x06proto3' , dependencies=[envoy_dot_config_dot_core_dot_v4alpha_dot_address__pb2.DESCRIPTOR,envoy_dot_config_dot_core_dot_v4alpha_dot_base__pb2.DESCRIPTOR,envoy_dot_config_dot_core_dot_v4alpha_dot_config__source__pb2.DESCRIPTOR,envoy_dot_config_dot_core_dot_v4alpha_dot_health__check__pb2.DESCRIPTOR,google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,udpa_dot_annotations_dot_status__pb2.DESCRIPTOR,udpa_dot_annotations_dot_versioning__pb2.DESCRIPTOR,validate_dot_validate__pb2.DESCRIPTOR,]) _ENDPOINT_HEALTHCHECKCONFIG = _descriptor.Descriptor( name='HealthCheckConfig', full_name='envoy.config.endpoint.v4alpha.Endpoint.HealthCheckConfig', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='port_value', full_name='envoy.config.endpoint.v4alpha.Endpoint.HealthCheckConfig.port_value', index=0, number=1, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\372B\006*\004\030\377\377\003', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hostname', full_name='envoy.config.endpoint.v4alpha.Endpoint.HealthCheckConfig.hostname', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=b'\232\305\210\0365\n3envoy.config.endpoint.v3.Endpoint.HealthCheckConfig', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=558, serialized_end=686, ) _ENDPOINT = _descriptor.Descriptor( name='Endpoint', full_name='envoy.config.endpoint.v4alpha.Endpoint', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='address', full_name='envoy.config.endpoint.v4alpha.Endpoint.address', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='health_check_config', full_name='envoy.config.endpoint.v4alpha.Endpoint.health_check_config', index=1, number=2, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='hostname', full_name='envoy.config.endpoint.v4alpha.Endpoint.hostname', index=2, number=3, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_ENDPOINT_HEALTHCHECKCONFIG, ], enum_types=[ ], serialized_options=b'\232\305\210\036#\n!envoy.config.endpoint.v3.Endpoint', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=386, serialized_end=728, ) _LBENDPOINT = _descriptor.Descriptor( name='LbEndpoint', full_name='envoy.config.endpoint.v4alpha.LbEndpoint', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='endpoint', full_name='envoy.config.endpoint.v4alpha.LbEndpoint.endpoint', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='endpoint_name', full_name='envoy.config.endpoint.v4alpha.LbEndpoint.endpoint_name', index=1, number=5, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='health_status', full_name='envoy.config.endpoint.v4alpha.LbEndpoint.health_status', index=2, number=2, type=14, cpp_type=8, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='metadata', full_name='envoy.config.endpoint.v4alpha.LbEndpoint.metadata', index=3, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='load_balancing_weight', full_name='envoy.config.endpoint.v4alpha.LbEndpoint.load_balancing_weight', index=4, number=4, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\372B\004*\002(\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=b'\232\305\210\036%\n#envoy.config.endpoint.v3.LbEndpoint', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='host_identifier', full_name='envoy.config.endpoint.v4alpha.LbEndpoint.host_identifier', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=731, serialized_end=1081, ) _LEDSCLUSTERLOCALITYCONFIG = _descriptor.Descriptor( name='LedsClusterLocalityConfig', full_name='envoy.config.endpoint.v4alpha.LedsClusterLocalityConfig', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='leds_config', full_name='envoy.config.endpoint.v4alpha.LedsClusterLocalityConfig.leds_config', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='leds_collection_name', full_name='envoy.config.endpoint.v4alpha.LedsClusterLocalityConfig.leds_collection_name', index=1, number=2, type=9, cpp_type=9, label=1, has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=b'\232\305\210\0364\n2envoy.config.endpoint.v3.LedsClusterLocalityConfig', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1084, serialized_end=1262, ) _LOCALITYLBENDPOINTS_LBENDPOINTLIST = _descriptor.Descriptor( name='LbEndpointList', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.LbEndpointList', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='lb_endpoints', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.LbEndpointList.lb_endpoints', index=0, number=1, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=b'\232\305\210\036=\n;envoy.config.endpoint.v3.LocalityLbEndpoints.LbEndpointList', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=1750, serialized_end=1899, ) _LOCALITYLBENDPOINTS = _descriptor.Descriptor( name='LocalityLbEndpoints', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='locality', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.locality', index=0, number=1, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='lb_endpoints', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.lb_endpoints', index=1, number=2, type=11, cpp_type=10, label=3, has_default_value=False, default_value=[], message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='lb_endpoints_list', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.lb_endpoints_list', index=2, number=7, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='leds_cluster_locality_config', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.leds_cluster_locality_config', index=3, number=8, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='load_balancing_weight', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.load_balancing_weight', index=4, number=3, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\372B\004*\002(\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='priority', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.priority', index=5, number=5, type=13, cpp_type=3, label=1, has_default_value=False, default_value=0, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\372B\005*\003\030\200\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='proximity', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.proximity', index=6, number=6, type=11, cpp_type=10, label=1, has_default_value=False, default_value=None, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[_LOCALITYLBENDPOINTS_LBENDPOINTLIST, ], enum_types=[ ], serialized_options=b'\232\305\210\036.\n,envoy.config.endpoint.v3.LocalityLbEndpoints', is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='lb_config', full_name='envoy.config.endpoint.v4alpha.LocalityLbEndpoints.lb_config', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=1265, serialized_end=1965, ) _ENDPOINT_HEALTHCHECKCONFIG.containing_type = _ENDPOINT _ENDPOINT.fields_by_name['address'].message_type = envoy_dot_config_dot_core_dot_v4alpha_dot_address__pb2._ADDRESS _ENDPOINT.fields_by_name['health_check_config'].message_type = _ENDPOINT_HEALTHCHECKCONFIG _LBENDPOINT.fields_by_name['endpoint'].message_type = _ENDPOINT _LBENDPOINT.fields_by_name['health_status'].enum_type = envoy_dot_config_dot_core_dot_v4alpha_dot_health__check__pb2._HEALTHSTATUS _LBENDPOINT.fields_by_name['metadata'].message_type = envoy_dot_config_dot_core_dot_v4alpha_dot_base__pb2._METADATA _LBENDPOINT.fields_by_name['load_balancing_weight'].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT32VALUE _LBENDPOINT.oneofs_by_name['host_identifier'].fields.append( _LBENDPOINT.fields_by_name['endpoint']) _LBENDPOINT.fields_by_name['endpoint'].containing_oneof = _LBENDPOINT.oneofs_by_name['host_identifier'] _LBENDPOINT.oneofs_by_name['host_identifier'].fields.append( _LBENDPOINT.fields_by_name['endpoint_name']) _LBENDPOINT.fields_by_name['endpoint_name'].containing_oneof = _LBENDPOINT.oneofs_by_name['host_identifier'] _LEDSCLUSTERLOCALITYCONFIG.fields_by_name['leds_config'].message_type = envoy_dot_config_dot_core_dot_v4alpha_dot_config__source__pb2._CONFIGSOURCE _LOCALITYLBENDPOINTS_LBENDPOINTLIST.fields_by_name['lb_endpoints'].message_type = _LBENDPOINT _LOCALITYLBENDPOINTS_LBENDPOINTLIST.containing_type = _LOCALITYLBENDPOINTS _LOCALITYLBENDPOINTS.fields_by_name['locality'].message_type = envoy_dot_config_dot_core_dot_v4alpha_dot_base__pb2._LOCALITY _LOCALITYLBENDPOINTS.fields_by_name['lb_endpoints'].message_type = _LBENDPOINT _LOCALITYLBENDPOINTS.fields_by_name['lb_endpoints_list'].message_type = _LOCALITYLBENDPOINTS_LBENDPOINTLIST _LOCALITYLBENDPOINTS.fields_by_name['leds_cluster_locality_config'].message_type = _LEDSCLUSTERLOCALITYCONFIG _LOCALITYLBENDPOINTS.fields_by_name['load_balancing_weight'].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT32VALUE _LOCALITYLBENDPOINTS.fields_by_name['proximity'].message_type = google_dot_protobuf_dot_wrappers__pb2._UINT32VALUE _LOCALITYLBENDPOINTS.oneofs_by_name['lb_config'].fields.append( _LOCALITYLBENDPOINTS.fields_by_name['lb_endpoints_list']) _LOCALITYLBENDPOINTS.fields_by_name['lb_endpoints_list'].containing_oneof = _LOCALITYLBENDPOINTS.oneofs_by_name['lb_config'] _LOCALITYLBENDPOINTS.oneofs_by_name['lb_config'].fields.append( _LOCALITYLBENDPOINTS.fields_by_name['leds_cluster_locality_config']) _LOCALITYLBENDPOINTS.fields_by_name['leds_cluster_locality_config'].containing_oneof = _LOCALITYLBENDPOINTS.oneofs_by_name['lb_config'] DESCRIPTOR.message_types_by_name['Endpoint'] = _ENDPOINT DESCRIPTOR.message_types_by_name['LbEndpoint'] = _LBENDPOINT DESCRIPTOR.message_types_by_name['LedsClusterLocalityConfig'] = _LEDSCLUSTERLOCALITYCONFIG DESCRIPTOR.message_types_by_name['LocalityLbEndpoints'] = _LOCALITYLBENDPOINTS _sym_db.RegisterFileDescriptor(DESCRIPTOR) Endpoint = _reflection.GeneratedProtocolMessageType('Endpoint', (_message.Message,), { 'HealthCheckConfig' : _reflection.GeneratedProtocolMessageType('HealthCheckConfig', (_message.Message,), { 'DESCRIPTOR' : _ENDPOINT_HEALTHCHECKCONFIG, '__module__' : 'envoy.config.endpoint.v4alpha.endpoint_components_pb2' # @@protoc_insertion_point(class_scope:envoy.config.endpoint.v4alpha.Endpoint.HealthCheckConfig) }) , 'DESCRIPTOR' : _ENDPOINT, '__module__' : 'envoy.config.endpoint.v4alpha.endpoint_components_pb2' # @@protoc_insertion_point(class_scope:envoy.config.endpoint.v4alpha.Endpoint) }) _sym_db.RegisterMessage(Endpoint) _sym_db.RegisterMessage(Endpoint.HealthCheckConfig) LbEndpoint = _reflection.GeneratedProtocolMessageType('LbEndpoint', (_message.Message,), { 'DESCRIPTOR' : _LBENDPOINT, '__module__' : 'envoy.config.endpoint.v4alpha.endpoint_components_pb2' # @@protoc_insertion_point(class_scope:envoy.config.endpoint.v4alpha.LbEndpoint) }) _sym_db.RegisterMessage(LbEndpoint) LedsClusterLocalityConfig = _reflection.GeneratedProtocolMessageType('LedsClusterLocalityConfig', (_message.Message,), { 'DESCRIPTOR' : _LEDSCLUSTERLOCALITYCONFIG, '__module__' : 'envoy.config.endpoint.v4alpha.endpoint_components_pb2' # @@protoc_insertion_point(class_scope:envoy.config.endpoint.v4alpha.LedsClusterLocalityConfig) }) _sym_db.RegisterMessage(LedsClusterLocalityConfig) LocalityLbEndpoints = _reflection.GeneratedProtocolMessageType('LocalityLbEndpoints', (_message.Message,), { 'LbEndpointList' : _reflection.GeneratedProtocolMessageType('LbEndpointList', (_message.Message,), { 'DESCRIPTOR' : _LOCALITYLBENDPOINTS_LBENDPOINTLIST, '__module__' : 'envoy.config.endpoint.v4alpha.endpoint_components_pb2' # @@protoc_insertion_point(class_scope:envoy.config.endpoint.v4alpha.LocalityLbEndpoints.LbEndpointList) }) , 'DESCRIPTOR' : _LOCALITYLBENDPOINTS, '__module__' : 'envoy.config.endpoint.v4alpha.endpoint_components_pb2' # @@protoc_insertion_point(class_scope:envoy.config.endpoint.v4alpha.LocalityLbEndpoints) }) _sym_db.RegisterMessage(LocalityLbEndpoints) _sym_db.RegisterMessage(LocalityLbEndpoints.LbEndpointList) DESCRIPTOR._options = None _ENDPOINT_HEALTHCHECKCONFIG.fields_by_name['port_value']._options = None _ENDPOINT_HEALTHCHECKCONFIG._options = None _ENDPOINT._options = None _LBENDPOINT.fields_by_name['load_balancing_weight']._options = None _LBENDPOINT._options = None _LEDSCLUSTERLOCALITYCONFIG._options = None _LOCALITYLBENDPOINTS_LBENDPOINTLIST._options = None _LOCALITYLBENDPOINTS.fields_by_name['load_balancing_weight']._options = None _LOCALITYLBENDPOINTS.fields_by_name['priority']._options = None _LOCALITYLBENDPOINTS._options = None # @@protoc_insertion_point(module_scope)
55.609412
2,891
0.796734
2,993
23,634
5.933177
0.088874
0.0446
0.063126
0.071742
0.746706
0.701036
0.655085
0.588861
0.524609
0.499155
0
0.043256
0.08932
23,634
424
2,892
55.740566
0.781815
0.033173
0
0.585492
1
0.015544
0.256722
0.213716
0
0
0
0
0
1
0
false
0
0.031088
0
0.031088
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
93cdd5cfc2489773559432c54e55337aed75ff82
485
py
Python
docs/source/examples/example_1.py
astooke/gtimer
2146dab459e5d959feb291821733d3d3ba7c523c
[ "MIT" ]
8
2016-09-08T05:40:40.000Z
2020-04-29T18:17:54.000Z
docs/source/examples/example_1.py
astooke/gtimer
2146dab459e5d959feb291821733d3d3ba7c523c
[ "MIT" ]
1
2022-01-27T13:11:58.000Z
2022-01-27T13:11:58.000Z
docs/source/examples/example_1.py
astooke/gtimer
2146dab459e5d959feb291821733d3d3ba7c523c
[ "MIT" ]
null
null
null
import gtimer as gt import time # Could be in another file with gtimer import. @gt.wrap def func_1(): time.sleep(0.1) gt.stamp('f_first') def func_2(): time.sleep(0.1) gt.stamp('f_inline') time.sleep(0.1) func_1() gt.stamp('first') func_2() gt.stamp('second') time.sleep(0.1) gt.stamp('third', quick_print=True) gt.subdivide('sub') time.sleep(0.1) func_1() gt.stamp('sub_1') time.sleep(0.1) gt.stamp('sub_2') gt.end_subdivision() gt.stamp('fourth') print gt.report()
16.724138
46
0.684536
92
485
3.48913
0.358696
0.174455
0.186916
0.205607
0.380062
0.380062
0.323988
0.143302
0
0
0
0.044706
0.123711
485
29
47
16.724138
0.710588
0.090722
0
0.32
0
0
0.113636
0
0
0
0
0
0
0
null
null
0
0.08
null
null
0.08
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
1
0
0
0
0
0
0
0
0
3