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
3febf1000826286f0366f20b12f6bfbb30cc555f
872
py
Python
squirrelfriends/eagle/_feature.py
jacobyxu/squirrel-and-friends
9fbd41953dd3b388fafa0fa963dfe6e59afef162
[ "MIT" ]
2
2020-08-09T15:13:44.000Z
2020-09-04T21:44:23.000Z
squirrelfriends/eagle/_feature.py
JacobXPX/squirrel-and-friends
9fbd41953dd3b388fafa0fa963dfe6e59afef162
[ "MIT" ]
1
2021-11-10T19:43:40.000Z
2021-11-10T19:43:40.000Z
squirrelfriends/eagle/_feature.py
JacobXPX/squirrel-and-friends
9fbd41953dd3b388fafa0fa963dfe6e59afef162
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd def compute_cv_feature_importances(*feature_importances): """Compute the average feature importance. Args: *feature_importances: list or tuple of input objects. Objects are feature importances of each cv. Returns: importances (DataFrame): feature importance table with average importance score """ importances = feature_importances[0].rename( columns={"importance": "importance_0"}) for i, df in enumerate(feature_importances[1:]): tmp = df.rename(columns={"importance": "importance_%d" % (i + 1)}) importances = importances.merge(tmp, on="feature", how="outer") importance_cols = [c for c in importances.columns if c != "feature"] importances["ave_importance"] = importances[importance_cols].mean(axis=1) return importances
31.142857
77
0.682339
102
872
5.715686
0.490196
0.216124
0.099485
0.113208
0
0
0
0
0
0
0
0.00731
0.215596
872
27
78
32.296296
0.845029
0.295872
0
0
0
0
0.134715
0
0
0
0
0
0
1
0.090909
false
0
1
0
1.181818
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
0
0
1
0
1
0
0
3
3ff373a3fac97a7c38d91a95316bb8d17b3a8207
402
py
Python
runtimeTest/progs/01_precondition_aire_KO.py
LeGmask/MrPython
e4712590c52653d97f512e05133459870c12d7fa
[ "PSF-2.0" ]
26
2018-09-09T17:09:56.000Z
2021-10-01T12:51:15.000Z
runtimeTest/progs/01_precondition_aire_KO.py
LeGmask/MrPython
e4712590c52653d97f512e05133459870c12d7fa
[ "PSF-2.0" ]
85
2018-02-14T10:28:19.000Z
2021-12-16T17:38:47.000Z
runtimeTest/progs/01_precondition_aire_KO.py
LeGmask/MrPython
e4712590c52653d97f512e05133459870c12d7fa
[ "PSF-2.0" ]
26
2018-02-08T11:17:51.000Z
2021-12-16T17:43:19.000Z
##!FAIL: Erreur: ligne 7 import math def aire_triangle(a : float, b : float, c : float) -> float: """ PrEcOnDiTiOn : (a>0) and (b>0) and (c>0) """ p : float p = (a + b + c) / 2 return math.sqrt(p * (p - a) * (p - b) * (p - c)) # Jeu de tests assert aire_triangle(-3, 4, 5) == 6.0 assert aire_triangle(13, 14, 15) == 84.0 assert aire_triangle(1, 1, 1) == math.sqrt(3 / 16)
20.1
60
0.537313
71
402
2.985915
0.478873
0.226415
0.254717
0.179245
0
0
0
0
0
0
0
0.084746
0.266169
402
19
61
21.157895
0.633898
0.189055
0
0
0
0
0
0
0
0
0
0
0.375
1
0.125
false
0
0.125
0
0.375
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
b74ef97023623126912d22d2026a2d272c57ab10
29,581
py
Python
google/ads/google_ads/v6/proto/services/conversion_adjustment_upload_service_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/services/conversion_adjustment_upload_service_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
google/ads/google_ads/v6/proto/services/conversion_adjustment_upload_service_pb2.py
arammaliachi/google-ads-python
a4fe89567bd43eb784410523a6306b5d1dd9ee67
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/ads/googleads/v6/services/conversion_adjustment_upload_service.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 google.ads.google_ads.v6.proto.enums import conversion_adjustment_type_pb2 as google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__adjustment__type__pb2 from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.rpc import status_pb2 as google_dot_rpc_dot_status__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='google/ads/googleads/v6/services/conversion_adjustment_upload_service.proto', package='google.ads.googleads.v6.services', syntax='proto3', serialized_options=b'\n$com.google.ads.googleads.v6.servicesB&ConversionAdjustmentUploadServiceProtoP\001ZHgoogle.golang.org/genproto/googleapis/ads/googleads/v6/services;services\242\002\003GAA\252\002 Google.Ads.GoogleAds.V6.Services\312\002 Google\\Ads\\GoogleAds\\V6\\Services\352\002$Google::Ads::GoogleAds::V6::Services', create_key=_descriptor._internal_create_key, serialized_pb=b'\nKgoogle/ads/googleads/v6/services/conversion_adjustment_upload_service.proto\x12 google.ads.googleads.v6.services\x1a>google/ads/googleads/v6/enums/conversion_adjustment_type.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x17google/rpc/status.proto\"\xd0\x01\n\"UploadConversionAdjustmentsRequest\x12\x18\n\x0b\x63ustomer_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12[\n\x16\x63onversion_adjustments\x18\x02 \x03(\x0b\x32\x36.google.ads.googleads.v6.services.ConversionAdjustmentB\x03\xe0\x41\x02\x12\x1c\n\x0fpartial_failure\x18\x03 \x01(\x08\x42\x03\xe0\x41\x02\x12\x15\n\rvalidate_only\x18\x04 \x01(\x08\"\xa7\x01\n#UploadConversionAdjustmentsResponse\x12\x31\n\x15partial_failure_error\x18\x01 \x01(\x0b\x32\x12.google.rpc.Status\x12M\n\x07results\x18\x02 \x03(\x0b\x32<.google.ads.googleads.v6.services.ConversionAdjustmentResult\"\xc8\x03\n\x14\x43onversionAdjustment\x12\x1e\n\x11\x63onversion_action\x18\x08 \x01(\tH\x01\x88\x01\x01\x12!\n\x14\x61\x64justment_date_time\x18\t \x01(\tH\x02\x88\x01\x01\x12m\n\x0f\x61\x64justment_type\x18\x05 \x01(\x0e\x32T.google.ads.googleads.v6.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType\x12M\n\x11restatement_value\x18\x06 \x01(\x0b\x32\x32.google.ads.googleads.v6.services.RestatementValue\x12S\n\x14gclid_date_time_pair\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v6.services.GclidDateTimePairH\x00\x12\x12\n\x08order_id\x18\x07 \x01(\tH\x00\x42\x17\n\x15\x63onversion_identifierB\x14\n\x12_conversion_actionB\x17\n\x15_adjustment_date_time\"p\n\x10RestatementValue\x12\x1b\n\x0e\x61\x64justed_value\x18\x03 \x01(\x01H\x00\x88\x01\x01\x12\x1a\n\rcurrency_code\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x11\n\x0f_adjusted_valueB\x10\n\x0e_currency_code\"m\n\x11GclidDateTimePair\x12\x12\n\x05gclid\x18\x03 \x01(\tH\x00\x88\x01\x01\x12!\n\x14\x63onversion_date_time\x18\x04 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_gclidB\x17\n\x15_conversion_date_time\"\xff\x02\n\x1a\x43onversionAdjustmentResult\x12\x1e\n\x11\x63onversion_action\x18\x07 \x01(\tH\x01\x88\x01\x01\x12!\n\x14\x61\x64justment_date_time\x18\x08 \x01(\tH\x02\x88\x01\x01\x12m\n\x0f\x61\x64justment_type\x18\x05 \x01(\x0e\x32T.google.ads.googleads.v6.enums.ConversionAdjustmentTypeEnum.ConversionAdjustmentType\x12S\n\x14gclid_date_time_pair\x18\x01 \x01(\x0b\x32\x33.google.ads.googleads.v6.services.GclidDateTimePairH\x00\x12\x12\n\x08order_id\x18\x06 \x01(\tH\x00\x42\x17\n\x15\x63onversion_identifierB\x14\n\x12_conversion_actionB\x17\n\x15_adjustment_date_time2\x92\x03\n!ConversionAdjustmentUploadService\x12\xa5\x02\n\x1bUploadConversionAdjustments\x12\x44.google.ads.googleads.v6.services.UploadConversionAdjustmentsRequest\x1a\x45.google.ads.googleads.v6.services.UploadConversionAdjustmentsResponse\"y\x82\xd3\xe4\x93\x02>\"9/v6/customers/{customer_id=*}:uploadConversionAdjustments:\x01*\xda\x41\x32\x63ustomer_id,conversion_adjustments,partial_failure\x1a\x45\xca\x41\x18googleads.googleapis.com\xd2\x41\'https://www.googleapis.com/auth/adwordsB\x8d\x02\n$com.google.ads.googleads.v6.servicesB&ConversionAdjustmentUploadServiceProtoP\x01ZHgoogle.golang.org/genproto/googleapis/ads/googleads/v6/services;services\xa2\x02\x03GAA\xaa\x02 Google.Ads.GoogleAds.V6.Services\xca\x02 Google\\Ads\\GoogleAds\\V6\\Services\xea\x02$Google::Ads::GoogleAds::V6::Servicesb\x06proto3' , dependencies=[google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__adjustment__type__pb2.DESCRIPTOR,google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_api_dot_client__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_rpc_dot_status__pb2.DESCRIPTOR,]) _UPLOADCONVERSIONADJUSTMENTSREQUEST = _descriptor.Descriptor( name='UploadConversionAdjustmentsRequest', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsRequest', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='customer_id', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsRequest.customer_id', index=0, number=1, 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=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='conversion_adjustments', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsRequest.conversion_adjustments', 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=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='partial_failure', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsRequest.partial_failure', index=2, number=3, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=b'\340A\002', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), _descriptor.FieldDescriptor( name='validate_only', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsRequest.validate_only', index=3, number=4, type=8, cpp_type=7, label=1, has_default_value=False, default_value=False, 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=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=291, serialized_end=499, ) _UPLOADCONVERSIONADJUSTMENTSRESPONSE = _descriptor.Descriptor( name='UploadConversionAdjustmentsResponse', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsResponse', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='partial_failure_error', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsResponse.partial_failure_error', 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='results', full_name='google.ads.googleads.v6.services.UploadConversionAdjustmentsResponse.results', 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), ], extensions=[ ], nested_types=[], enum_types=[ ], serialized_options=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=502, serialized_end=669, ) _CONVERSIONADJUSTMENT = _descriptor.Descriptor( name='ConversionAdjustment', full_name='google.ads.googleads.v6.services.ConversionAdjustment', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='conversion_action', full_name='google.ads.googleads.v6.services.ConversionAdjustment.conversion_action', index=0, number=8, 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='adjustment_date_time', full_name='google.ads.googleads.v6.services.ConversionAdjustment.adjustment_date_time', index=1, number=9, 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='adjustment_type', full_name='google.ads.googleads.v6.services.ConversionAdjustment.adjustment_type', index=2, number=5, 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='restatement_value', full_name='google.ads.googleads.v6.services.ConversionAdjustment.restatement_value', index=3, 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), _descriptor.FieldDescriptor( name='gclid_date_time_pair', full_name='google.ads.googleads.v6.services.ConversionAdjustment.gclid_date_time_pair', index=4, 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='order_id', full_name='google.ads.googleads.v6.services.ConversionAdjustment.order_id', index=5, number=7, 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=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='conversion_identifier', full_name='google.ads.googleads.v6.services.ConversionAdjustment.conversion_identifier', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_conversion_action', full_name='google.ads.googleads.v6.services.ConversionAdjustment._conversion_action', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_adjustment_date_time', full_name='google.ads.googleads.v6.services.ConversionAdjustment._adjustment_date_time', index=2, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=672, serialized_end=1128, ) _RESTATEMENTVALUE = _descriptor.Descriptor( name='RestatementValue', full_name='google.ads.googleads.v6.services.RestatementValue', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='adjusted_value', full_name='google.ads.googleads.v6.services.RestatementValue.adjusted_value', index=0, number=3, type=1, cpp_type=5, label=1, has_default_value=False, default_value=float(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='currency_code', full_name='google.ads.googleads.v6.services.RestatementValue.currency_code', index=1, number=4, 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=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_adjusted_value', full_name='google.ads.googleads.v6.services.RestatementValue._adjusted_value', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_currency_code', full_name='google.ads.googleads.v6.services.RestatementValue._currency_code', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=1130, serialized_end=1242, ) _GCLIDDATETIMEPAIR = _descriptor.Descriptor( name='GclidDateTimePair', full_name='google.ads.googleads.v6.services.GclidDateTimePair', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='gclid', full_name='google.ads.googleads.v6.services.GclidDateTimePair.gclid', index=0, 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), _descriptor.FieldDescriptor( name='conversion_date_time', full_name='google.ads.googleads.v6.services.GclidDateTimePair.conversion_date_time', index=1, number=4, 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=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='_gclid', full_name='google.ads.googleads.v6.services.GclidDateTimePair._gclid', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_conversion_date_time', full_name='google.ads.googleads.v6.services.GclidDateTimePair._conversion_date_time', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=1244, serialized_end=1353, ) _CONVERSIONADJUSTMENTRESULT = _descriptor.Descriptor( name='ConversionAdjustmentResult', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult', filename=None, file=DESCRIPTOR, containing_type=None, create_key=_descriptor._internal_create_key, fields=[ _descriptor.FieldDescriptor( name='conversion_action', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult.conversion_action', index=0, number=7, 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='adjustment_date_time', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult.adjustment_date_time', index=1, number=8, 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='adjustment_type', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult.adjustment_type', index=2, number=5, 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='gclid_date_time_pair', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult.gclid_date_time_pair', index=3, 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='order_id', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult.order_id', index=4, number=6, 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=None, is_extendable=False, syntax='proto3', extension_ranges=[], oneofs=[ _descriptor.OneofDescriptor( name='conversion_identifier', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult.conversion_identifier', index=0, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_conversion_action', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult._conversion_action', index=1, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), _descriptor.OneofDescriptor( name='_adjustment_date_time', full_name='google.ads.googleads.v6.services.ConversionAdjustmentResult._adjustment_date_time', index=2, containing_type=None, create_key=_descriptor._internal_create_key, fields=[]), ], serialized_start=1356, serialized_end=1739, ) _UPLOADCONVERSIONADJUSTMENTSREQUEST.fields_by_name['conversion_adjustments'].message_type = _CONVERSIONADJUSTMENT _UPLOADCONVERSIONADJUSTMENTSRESPONSE.fields_by_name['partial_failure_error'].message_type = google_dot_rpc_dot_status__pb2._STATUS _UPLOADCONVERSIONADJUSTMENTSRESPONSE.fields_by_name['results'].message_type = _CONVERSIONADJUSTMENTRESULT _CONVERSIONADJUSTMENT.fields_by_name['adjustment_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__adjustment__type__pb2._CONVERSIONADJUSTMENTTYPEENUM_CONVERSIONADJUSTMENTTYPE _CONVERSIONADJUSTMENT.fields_by_name['restatement_value'].message_type = _RESTATEMENTVALUE _CONVERSIONADJUSTMENT.fields_by_name['gclid_date_time_pair'].message_type = _GCLIDDATETIMEPAIR _CONVERSIONADJUSTMENT.oneofs_by_name['conversion_identifier'].fields.append( _CONVERSIONADJUSTMENT.fields_by_name['gclid_date_time_pair']) _CONVERSIONADJUSTMENT.fields_by_name['gclid_date_time_pair'].containing_oneof = _CONVERSIONADJUSTMENT.oneofs_by_name['conversion_identifier'] _CONVERSIONADJUSTMENT.oneofs_by_name['conversion_identifier'].fields.append( _CONVERSIONADJUSTMENT.fields_by_name['order_id']) _CONVERSIONADJUSTMENT.fields_by_name['order_id'].containing_oneof = _CONVERSIONADJUSTMENT.oneofs_by_name['conversion_identifier'] _CONVERSIONADJUSTMENT.oneofs_by_name['_conversion_action'].fields.append( _CONVERSIONADJUSTMENT.fields_by_name['conversion_action']) _CONVERSIONADJUSTMENT.fields_by_name['conversion_action'].containing_oneof = _CONVERSIONADJUSTMENT.oneofs_by_name['_conversion_action'] _CONVERSIONADJUSTMENT.oneofs_by_name['_adjustment_date_time'].fields.append( _CONVERSIONADJUSTMENT.fields_by_name['adjustment_date_time']) _CONVERSIONADJUSTMENT.fields_by_name['adjustment_date_time'].containing_oneof = _CONVERSIONADJUSTMENT.oneofs_by_name['_adjustment_date_time'] _RESTATEMENTVALUE.oneofs_by_name['_adjusted_value'].fields.append( _RESTATEMENTVALUE.fields_by_name['adjusted_value']) _RESTATEMENTVALUE.fields_by_name['adjusted_value'].containing_oneof = _RESTATEMENTVALUE.oneofs_by_name['_adjusted_value'] _RESTATEMENTVALUE.oneofs_by_name['_currency_code'].fields.append( _RESTATEMENTVALUE.fields_by_name['currency_code']) _RESTATEMENTVALUE.fields_by_name['currency_code'].containing_oneof = _RESTATEMENTVALUE.oneofs_by_name['_currency_code'] _GCLIDDATETIMEPAIR.oneofs_by_name['_gclid'].fields.append( _GCLIDDATETIMEPAIR.fields_by_name['gclid']) _GCLIDDATETIMEPAIR.fields_by_name['gclid'].containing_oneof = _GCLIDDATETIMEPAIR.oneofs_by_name['_gclid'] _GCLIDDATETIMEPAIR.oneofs_by_name['_conversion_date_time'].fields.append( _GCLIDDATETIMEPAIR.fields_by_name['conversion_date_time']) _GCLIDDATETIMEPAIR.fields_by_name['conversion_date_time'].containing_oneof = _GCLIDDATETIMEPAIR.oneofs_by_name['_conversion_date_time'] _CONVERSIONADJUSTMENTRESULT.fields_by_name['adjustment_type'].enum_type = google_dot_ads_dot_googleads_dot_v6_dot_enums_dot_conversion__adjustment__type__pb2._CONVERSIONADJUSTMENTTYPEENUM_CONVERSIONADJUSTMENTTYPE _CONVERSIONADJUSTMENTRESULT.fields_by_name['gclid_date_time_pair'].message_type = _GCLIDDATETIMEPAIR _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['conversion_identifier'].fields.append( _CONVERSIONADJUSTMENTRESULT.fields_by_name['gclid_date_time_pair']) _CONVERSIONADJUSTMENTRESULT.fields_by_name['gclid_date_time_pair'].containing_oneof = _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['conversion_identifier'] _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['conversion_identifier'].fields.append( _CONVERSIONADJUSTMENTRESULT.fields_by_name['order_id']) _CONVERSIONADJUSTMENTRESULT.fields_by_name['order_id'].containing_oneof = _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['conversion_identifier'] _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['_conversion_action'].fields.append( _CONVERSIONADJUSTMENTRESULT.fields_by_name['conversion_action']) _CONVERSIONADJUSTMENTRESULT.fields_by_name['conversion_action'].containing_oneof = _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['_conversion_action'] _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['_adjustment_date_time'].fields.append( _CONVERSIONADJUSTMENTRESULT.fields_by_name['adjustment_date_time']) _CONVERSIONADJUSTMENTRESULT.fields_by_name['adjustment_date_time'].containing_oneof = _CONVERSIONADJUSTMENTRESULT.oneofs_by_name['_adjustment_date_time'] DESCRIPTOR.message_types_by_name['UploadConversionAdjustmentsRequest'] = _UPLOADCONVERSIONADJUSTMENTSREQUEST DESCRIPTOR.message_types_by_name['UploadConversionAdjustmentsResponse'] = _UPLOADCONVERSIONADJUSTMENTSRESPONSE DESCRIPTOR.message_types_by_name['ConversionAdjustment'] = _CONVERSIONADJUSTMENT DESCRIPTOR.message_types_by_name['RestatementValue'] = _RESTATEMENTVALUE DESCRIPTOR.message_types_by_name['GclidDateTimePair'] = _GCLIDDATETIMEPAIR DESCRIPTOR.message_types_by_name['ConversionAdjustmentResult'] = _CONVERSIONADJUSTMENTRESULT _sym_db.RegisterFileDescriptor(DESCRIPTOR) UploadConversionAdjustmentsRequest = _reflection.GeneratedProtocolMessageType('UploadConversionAdjustmentsRequest', (_message.Message,), { 'DESCRIPTOR' : _UPLOADCONVERSIONADJUSTMENTSREQUEST, '__module__' : 'google.ads.googleads.v6.services.conversion_adjustment_upload_service_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.services.UploadConversionAdjustmentsRequest) }) _sym_db.RegisterMessage(UploadConversionAdjustmentsRequest) UploadConversionAdjustmentsResponse = _reflection.GeneratedProtocolMessageType('UploadConversionAdjustmentsResponse', (_message.Message,), { 'DESCRIPTOR' : _UPLOADCONVERSIONADJUSTMENTSRESPONSE, '__module__' : 'google.ads.googleads.v6.services.conversion_adjustment_upload_service_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.services.UploadConversionAdjustmentsResponse) }) _sym_db.RegisterMessage(UploadConversionAdjustmentsResponse) ConversionAdjustment = _reflection.GeneratedProtocolMessageType('ConversionAdjustment', (_message.Message,), { 'DESCRIPTOR' : _CONVERSIONADJUSTMENT, '__module__' : 'google.ads.googleads.v6.services.conversion_adjustment_upload_service_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.services.ConversionAdjustment) }) _sym_db.RegisterMessage(ConversionAdjustment) RestatementValue = _reflection.GeneratedProtocolMessageType('RestatementValue', (_message.Message,), { 'DESCRIPTOR' : _RESTATEMENTVALUE, '__module__' : 'google.ads.googleads.v6.services.conversion_adjustment_upload_service_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.services.RestatementValue) }) _sym_db.RegisterMessage(RestatementValue) GclidDateTimePair = _reflection.GeneratedProtocolMessageType('GclidDateTimePair', (_message.Message,), { 'DESCRIPTOR' : _GCLIDDATETIMEPAIR, '__module__' : 'google.ads.googleads.v6.services.conversion_adjustment_upload_service_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.services.GclidDateTimePair) }) _sym_db.RegisterMessage(GclidDateTimePair) ConversionAdjustmentResult = _reflection.GeneratedProtocolMessageType('ConversionAdjustmentResult', (_message.Message,), { 'DESCRIPTOR' : _CONVERSIONADJUSTMENTRESULT, '__module__' : 'google.ads.googleads.v6.services.conversion_adjustment_upload_service_pb2' # @@protoc_insertion_point(class_scope:google.ads.googleads.v6.services.ConversionAdjustmentResult) }) _sym_db.RegisterMessage(ConversionAdjustmentResult) DESCRIPTOR._options = None _UPLOADCONVERSIONADJUSTMENTSREQUEST.fields_by_name['customer_id']._options = None _UPLOADCONVERSIONADJUSTMENTSREQUEST.fields_by_name['conversion_adjustments']._options = None _UPLOADCONVERSIONADJUSTMENTSREQUEST.fields_by_name['partial_failure']._options = None _CONVERSIONADJUSTMENTUPLOADSERVICE = _descriptor.ServiceDescriptor( name='ConversionAdjustmentUploadService', full_name='google.ads.googleads.v6.services.ConversionAdjustmentUploadService', file=DESCRIPTOR, index=0, serialized_options=b'\312A\030googleads.googleapis.com\322A\'https://www.googleapis.com/auth/adwords', create_key=_descriptor._internal_create_key, serialized_start=1742, serialized_end=2144, methods=[ _descriptor.MethodDescriptor( name='UploadConversionAdjustments', full_name='google.ads.googleads.v6.services.ConversionAdjustmentUploadService.UploadConversionAdjustments', index=0, containing_service=None, input_type=_UPLOADCONVERSIONADJUSTMENTSREQUEST, output_type=_UPLOADCONVERSIONADJUSTMENTSRESPONSE, serialized_options=b'\202\323\344\223\002>\"9/v6/customers/{customer_id=*}:uploadConversionAdjustments:\001*\332A2customer_id,conversion_adjustments,partial_failure', create_key=_descriptor._internal_create_key, ), ]) _sym_db.RegisterServiceDescriptor(_CONVERSIONADJUSTMENTUPLOADSERVICE) DESCRIPTOR.services_by_name['ConversionAdjustmentUploadService'] = _CONVERSIONADJUSTMENTUPLOADSERVICE # @@protoc_insertion_point(module_scope)
58.460474
3,384
0.805787
3,517
29,581
6.406028
0.081604
0.031957
0.047226
0.064802
0.788815
0.751354
0.669774
0.62308
0.553795
0.537106
0
0.033968
0.084412
29,581
505
3,385
58.576238
0.797888
0.028667
0
0.61039
1
0.008658
0.315736
0.267194
0
0
0
0
0
1
0
false
0
0.019481
0
0.019481
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
b754af41a737047ba7673c30586d70fe5394c27b
220
py
Python
setup.py
NotiCast/iot-core
1d602f258f1ad975bc753741e0da7428f1875aa6
[ "MIT" ]
null
null
null
setup.py
NotiCast/iot-core
1d602f258f1ad975bc753741e0da7428f1875aa6
[ "MIT" ]
1
2019-01-03T21:32:19.000Z
2019-01-03T21:46:28.000Z
setup.py
NotiCast/iot-core
1d602f258f1ad975bc753741e0da7428f1875aa6
[ "MIT" ]
null
null
null
# pylint: disable=missing-docstring from distutils.core import setup setup( name='noticast-iot-core', version='0.1-dev', packages=['noticast'], install_requires=['AWSIoTPythonSDK', 'requests', 'raven'])
24.444444
62
0.695455
25
220
6.08
0.88
0
0
0
0
0
0
0
0
0
0
0.010582
0.140909
220
8
63
27.5
0.793651
0.15
0
0
0
0
0.324324
0
0
0
0
0
0
1
0
true
0
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
1
0
0
0
0
0
0
3
b761cca0b657b3223726f14344e499337b514e14
1,456
py
Python
LatentView/tests/test_unittest_utilities_formatted_strings.py
royadityak94/Interview
40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f
[ "MIT" ]
null
null
null
LatentView/tests/test_unittest_utilities_formatted_strings.py
royadityak94/Interview
40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f
[ "MIT" ]
null
null
null
LatentView/tests/test_unittest_utilities_formatted_strings.py
royadityak94/Interview
40a7f7e2edddbb525bc6b71ea72d6cd2bda5708f
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # Adding src code to the test folder path import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../src'))) # Loading the required packages import unittest from utilities import formatted_strings # Helper module to unit test formatted_strings(input_lst) class TestFormattedStrings(unittest.TestCase): '''Test Modules for utilities.formatted_strings ''' @classmethod def setUpClass(self): pass @classmethod def tearDownClass(self): pass def test_default(self): input_list = ['ardent', 'brew', '2#d', ':sft', ',sdjn,', '@#,%absg', 'car'] self.assertEqual(formatted_strings(input_list), ['ardent', 'brew', 'car']) def test_nocorrupt(self): input_list = ['ardent', 'brew', 'erx', 'sft', 'sdjn', 'absg', 'car'] self.assertEqual(formatted_strings(input_list), input_list) def test_all_butone_corrupt(self): input_list = ['arda2dcx2ent', 'brew', '2#d', ':sft', ',sdjn,', '@#,%absg', 'c,ar'] self.assertEqual(formatted_strings(input_list), ['brew']) def test_empty_file(self): input_list = [] self.assertEqual(formatted_strings(input_list), []) def test_total_corrupt(self): input_list = ['ardent2', 'bre1w', '2#d', ':sft', ',sdjn,', '@#,%absg', 'c2ar'] self.assertEqual(formatted_strings(input_list), []) if __name__ == '__main__': unittest.main()
31.652174
90
0.647665
177
1,456
5.096045
0.40113
0.109756
0.13969
0.17184
0.339246
0.278271
0.119734
0.119734
0.119734
0.119734
0
0.008432
0.18544
1,456
45
91
32.355556
0.752108
0.132555
0
0.206897
0
0
0.135566
0
0
0
0
0
0.172414
1
0.241379
false
0.068966
0.137931
0
0.413793
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
1
0
0
0
0
0
3
b7710486319238a96b78e47414a0fbea7ca766a8
125
py
Python
userpath/__init__.py
michaeljoseph/userpath
f1b586b7a979c4a355cfeb53f975be743095df8e
[ "Apache-2.0", "MIT" ]
null
null
null
userpath/__init__.py
michaeljoseph/userpath
f1b586b7a979c4a355cfeb53f975be743095df8e
[ "Apache-2.0", "MIT" ]
null
null
null
userpath/__init__.py
michaeljoseph/userpath
f1b586b7a979c4a355cfeb53f975be743095df8e
[ "Apache-2.0", "MIT" ]
null
null
null
from .core import append, in_new_path, need_shell_restart, prepend from .utils import in_current_path __version__ = '1.3.0'
25
66
0.8
21
125
4.285714
0.809524
0
0
0
0
0
0
0
0
0
0
0.027273
0.12
125
4
67
31.25
0.790909
0
0
0
0
0
0.04
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
b7943869b9d3782a353efad4a1bedc35030f0389
175
py
Python
pmworker/config/test.py
ciur/papermerge-worker
cfd863e3f9a4bf2cfc35ce911a4f8ab7ee45bbc7
[ "Apache-2.0" ]
2
2020-01-08T18:10:46.000Z
2020-03-29T22:12:00.000Z
pmworker/config/test.py
ciur/papermerge-worker
cfd863e3f9a4bf2cfc35ce911a4f8ab7ee45bbc7
[ "Apache-2.0" ]
2
2020-07-21T16:34:49.000Z
2020-07-21T17:24:05.000Z
pmworker/config/test.py
ciur/papermerge-worker
cfd863e3f9a4bf2cfc35ce911a4f8ab7ee45bbc7
[ "Apache-2.0" ]
2
2020-06-03T00:09:46.000Z
2020-07-21T16:24:48.000Z
from pathlib import Path proj_dir = Path(__file__).parent.parent.parent media_dir = proj_dir / Path("run/media") s3_storage = "s3:/..." local_storage = f"local:{media_dir}"
21.875
46
0.731429
27
175
4.37037
0.518519
0.118644
0.186441
0
0
0
0
0
0
0
0
0.012903
0.114286
175
7
47
25
0.748387
0
0
0
0
0
0.188571
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
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
b799cc5eb70d9bd638b0485475f1d89c97b0d11d
318
py
Python
src/pretix/api/serializers/waitinglist.py
td00/pretix
e31bd7600c85598de135f2eb5012e2f33fdb1d11
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/api/serializers/waitinglist.py
td00/pretix
e31bd7600c85598de135f2eb5012e2f33fdb1d11
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/api/serializers/waitinglist.py
td00/pretix
e31bd7600c85598de135f2eb5012e2f33fdb1d11
[ "ECL-2.0", "Apache-2.0" ]
1
2017-08-09T17:11:28.000Z
2017-08-09T17:11:28.000Z
from pretix.api.serializers.i18n import I18nAwareModelSerializer from pretix.base.models import WaitingListEntry class WaitingListSerializer(I18nAwareModelSerializer): class Meta: model = WaitingListEntry fields = ('id', 'created', 'email', 'voucher', 'item', 'variation', 'locale', 'subevent')
31.8
97
0.735849
29
318
8.068966
0.793103
0.08547
0
0
0
0
0
0
0
0
0
0.022222
0.150943
318
9
98
35.333333
0.844444
0
0
0
0
0
0.150943
0
0
0
0
0
0
1
0
false
0
0.333333
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
b7a84204d611584901d6f6f5a4f2a70a97ad922f
360
py
Python
airesources/Python3/hlt/__init__.py
xinnosuke/Halite-II
99646c186bd6939460d451ef78d7af89fec6b1e1
[ "MIT" ]
232
2017-09-11T14:28:41.000Z
2022-01-19T10:26:07.000Z
airesources/Python3/hlt/__init__.py
xinnosuke/Halite-II
99646c186bd6939460d451ef78d7af89fec6b1e1
[ "MIT" ]
302
2017-09-13T04:46:25.000Z
2018-09-06T22:14:06.000Z
airesources/Python3/hlt/__init__.py
xinnosuke/Halite-II
99646c186bd6939460d451ef78d7af89fec6b1e1
[ "MIT" ]
151
2017-09-11T21:03:07.000Z
2020-11-28T04:58:55.000Z
""" Halite II Python 3 starter kit See MyBot.py for a basic usage example. In short, you should initialize() at the start, then in a loop, call get_map() to get the current game state, then build up a list of commands and send them with send_command_queue(). """ from . import collision, constants, entity, game_map, networking from .networking import Game
30
77
0.758333
61
360
4.409836
0.786885
0
0
0
0
0
0
0
0
0
0
0.003356
0.172222
360
11
78
32.727273
0.899329
0.708333
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
b7aeeede0e2410915af811d361202e818fd36af4
159
py
Python
Python/Topics/Preconditions and postconditions/HTML lists No problem_/main.py
drtierney/hyperskill-problems
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
[ "MIT" ]
5
2020-08-29T15:15:31.000Z
2022-03-01T18:22:34.000Z
Python/Topics/Preconditions and postconditions/HTML lists No problem_/main.py
drtierney/hyperskill-problems
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
[ "MIT" ]
null
null
null
Python/Topics/Preconditions and postconditions/HTML lists No problem_/main.py
drtierney/hyperskill-problems
b74da993f0ac7bcff1cbd5d89a3a1b06b05f33e0
[ "MIT" ]
1
2020-12-02T11:13:14.000Z
2020-12-02T11:13:14.000Z
import re string = input() # your code here pattern = r"(?<=<li>)(.*?)(?=</li>)" entries = re.findall(pattern, string) for entry in entries: print(entry)
17.666667
37
0.622642
22
159
4.5
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.163522
159
8
38
19.875
0.744361
0.08805
0
0
0
0
0.160839
0.160839
0
0
0
0.125
0
1
0
false
0
0.166667
0
0.166667
0.166667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
3
b7c88304d41f6dc4966f9269aa2b256be0330648
342
py
Python
FYP/RestAPI/TrainingPalAPI/api_app/constants/database/coach_athlete_table.py
Daniel-Tilley/College
42f055662d9de5dcadf09a189eb994c2f0f8dbb1
[ "MIT" ]
null
null
null
FYP/RestAPI/TrainingPalAPI/api_app/constants/database/coach_athlete_table.py
Daniel-Tilley/College
42f055662d9de5dcadf09a189eb994c2f0f8dbb1
[ "MIT" ]
null
null
null
FYP/RestAPI/TrainingPalAPI/api_app/constants/database/coach_athlete_table.py
Daniel-Tilley/College
42f055662d9de5dcadf09a189eb994c2f0f8dbb1
[ "MIT" ]
1
2018-11-11T22:32:25.000Z
2018-11-11T22:32:25.000Z
class CoachAthleteTable: def __init__(self): pass TABLE_NAME = "Coach_Athlete" ATHLETE_ID = "Athlete_Id" COACH_ID = "Coach_Id" CAN_ACCESS_TRAINING_LOG = "Can_Access_Training_Log" CAN_ACCESS_TARGETS = "Can_Access_Targets" IS_ACTIVE = "Is_Active" START_DATE = "Start_Date" INVITE_ID = "Invite_Id"
22.8
55
0.695906
44
342
4.818182
0.477273
0.169811
0.084906
0.188679
0.231132
0.231132
0
0
0
0
0
0
0.222222
342
14
56
24.428571
0.796992
0
0
0
0
0
0.292398
0.067251
0
0
0
0
0
1
0.090909
false
0.090909
0
0
0.909091
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
1
0
0
1
0
0
3
b7d787bda4691c9e74abc3ecb69d3e9dbeec3154
453
py
Python
apps/tts_tests/models/tts_test_result.py
michaldomino/Voice-interface-optimization-server
fff59d4c5db599e35d4b5f3915bbb272d2000a26
[ "MIT" ]
null
null
null
apps/tts_tests/models/tts_test_result.py
michaldomino/Voice-interface-optimization-server
fff59d4c5db599e35d4b5f3915bbb272d2000a26
[ "MIT" ]
null
null
null
apps/tts_tests/models/tts_test_result.py
michaldomino/Voice-interface-optimization-server
fff59d4c5db599e35d4b5f3915bbb272d2000a26
[ "MIT" ]
null
null
null
from django.db import models from Voice_interface_optimization_server import settings from apps.tts_tests.models import TtsTest class TtsTestResult(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.RESTRICT) tts_test = models.ForeignKey(TtsTest, on_delete=models.RESTRICT) result = models.BooleanField() def __str__(self): return f'test: {self.tts_test}, result: {self.result} ({self.user})'
32.357143
81
0.766004
60
453
5.55
0.516667
0.096096
0.084084
0.132132
0
0
0
0
0
0
0
0
0.134658
453
13
82
34.846154
0.84949
0
0
0
0
0
0.128035
0
0
0
0
0
0
1
0.111111
false
0
0.333333
0.111111
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
0
0
1
1
1
0
0
3
4d18936f76d5e7b98eeb6d17d2257da2a066fdc2
385
py
Python
py-basics/src/lectures/lists/exercise2.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
null
null
null
py-basics/src/lectures/lists/exercise2.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
null
null
null
py-basics/src/lectures/lists/exercise2.py
AndrasTarlos/s4f
bfe2d631a9a2715953d8ac5ddc8ef97d3cefb426
[ "CC0-1.0" ]
4
2021-12-13T15:52:00.000Z
2022-03-28T13:54:53.000Z
""" List Exercise 2 Implementieren Sie die Funktion includes() zur Überprüfung, ob ein bestimmtes Element 'search_element' in der Liste enthalten ist. Benutzen Sie die nachfolgenden Tests zur Kontrolle. """ def includes(my_list, search_element): return search_element in my_list # Tests print(includes([1, 2, 3, 4], 3)) # -> True print(includes([1, 2, 3, 4], 5)) # -> False
24.0625
105
0.716883
57
385
4.754386
0.596491
0.143911
0.110701
0.110701
0.125461
0.125461
0
0
0
0
0
0.034375
0.168831
385
15
106
25.666667
0.8125
0.579221
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0.5
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
0
1
0
3
4d1c4873fbed7eb8bbb64f1d8509748dcc480f35
170
py
Python
mundo2-EstruturasDeControle/047 - Contagem de pares.py
jonasht/CursoEmVideo-CursoDePython3
a1bbf1fe4226b1828213742ee5a440278d903fd1
[ "MIT" ]
null
null
null
mundo2-EstruturasDeControle/047 - Contagem de pares.py
jonasht/CursoEmVideo-CursoDePython3
a1bbf1fe4226b1828213742ee5a440278d903fd1
[ "MIT" ]
null
null
null
mundo2-EstruturasDeControle/047 - Contagem de pares.py
jonasht/CursoEmVideo-CursoDePython3
a1bbf1fe4226b1828213742ee5a440278d903fd1
[ "MIT" ]
null
null
null
#Exercício Python 047: #Crie um programa que mostre na tela todos os números pares que estão no intervalo entre 1 e 50. for i in range(1, 50+1, 2): print(i, end=' ')
34
96
0.7
33
170
3.606061
0.848485
0
0
0
0
0
0
0
0
0
0
0.081481
0.205882
170
5
97
34
0.8
0.682353
0
0
0
0
0.018868
0
0
0
0
0.2
0
1
0
false
0
0
0
0
0.5
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
1
0
0
0
0
0
0
0
0
1
0
3
4d1efa504746d88804c7c2110e0bbeb777a71a19
377
py
Python
06_advanced_python_topics/inheritance_mixin.py
iwanbolzern/python-course
a4e9088adab09b4e92710eb350392578c0977a71
[ "MIT" ]
null
null
null
06_advanced_python_topics/inheritance_mixin.py
iwanbolzern/python-course
a4e9088adab09b4e92710eb350392578c0977a71
[ "MIT" ]
null
null
null
06_advanced_python_topics/inheritance_mixin.py
iwanbolzern/python-course
a4e9088adab09b4e92710eb350392578c0977a71
[ "MIT" ]
null
null
null
class Vehicle(object): """A generic vehicle class.""" def __init__(self, position): self.position = position def travel(self, destination): print('Travelling...') class RadioMixin(object): def play_song_on_station(self, station): print('Playing station...') class Car(Vehicle, RadioMixin): pass class Boat(Vehicle): pass
17.136364
44
0.644562
42
377
5.619048
0.52381
0.101695
0
0
0
0
0
0
0
0
0
0
0.228117
377
21
45
17.952381
0.810997
0.06366
0
0.166667
0
0
0.089337
0
0
0
0
0
0
1
0.25
false
0.166667
0
0
0.583333
0.166667
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
4d1f51a343f3c83405168df254b6b042fc5665bb
67
py
Python
even-value-or-zero.py
Omi0604/DCU-Einstein-
b35e2657b8e27904035e881021c9bdf9e51675bb
[ "MIT" ]
null
null
null
even-value-or-zero.py
Omi0604/DCU-Einstein-
b35e2657b8e27904035e881021c9bdf9e51675bb
[ "MIT" ]
null
null
null
even-value-or-zero.py
Omi0604/DCU-Einstein-
b35e2657b8e27904035e881021c9bdf9e51675bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 n = int(input()) print(n * ((n - 1) % 2))
11.166667
24
0.507463
12
67
2.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0.056604
0.208955
67
5
25
13.4
0.584906
0.313433
0
0
0
0
0
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
4d202a0940a9f563195e41b6592bbde0fec24604
178
py
Python
finance/urls.py
thomasleese/finance
5ac45e295e3e858f90f7a69260b91bb3671a2b67
[ "MIT" ]
null
null
null
finance/urls.py
thomasleese/finance
5ac45e295e3e858f90f7a69260b91bb3671a2b67
[ "MIT" ]
null
null
null
finance/urls.py
thomasleese/finance
5ac45e295e3e858f90f7a69260b91bb3671a2b67
[ "MIT" ]
null
null
null
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.balance, name='balance'), url(r'^spending$', views.spending, name='spending'), ]
17.8
56
0.657303
23
178
5.086957
0.521739
0.068376
0
0
0
0
0
0
0
0
0
0
0.162921
178
9
57
19.777778
0.785235
0
0
0
0
0
0.151685
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
4d251a93edd53e799610db9b15bce7cbbb8f1e56
951
py
Python
src/aleph_client/chains/ethereum.py
antonioandara/aleph-client
69403b40899343dabfadb1fc57becdfca0d0c263
[ "MIT" ]
null
null
null
src/aleph_client/chains/ethereum.py
antonioandara/aleph-client
69403b40899343dabfadb1fc57becdfca0d0c263
[ "MIT" ]
null
null
null
src/aleph_client/chains/ethereum.py
antonioandara/aleph-client
69403b40899343dabfadb1fc57becdfca0d0c263
[ "MIT" ]
null
null
null
from .common import (BaseAccount, get_fallback_private_key, get_verification_buffer, get_public_key) from eth_account.messages import encode_defunct from eth_account import Account class ETHAccount(BaseAccount): CHAIN = "ETH" CURVE = "secp256k1" def __init__(self, private_key=None): self.private_key = private_key self._account = Account.from_key(self.private_key) def sign_message(self, message): msghash = encode_defunct(text=get_verification_buffer(message).decode('utf-8')) sig = self._account.sign_message(msghash) message['signature'] = sig['signature'].hex() return message def get_address(self): return self._account.address def get_public_key(self): return "0x" + get_public_key(private_key=self._account.key).hex() def get_fallback_account(): return ETHAccount(private_key=get_fallback_private_key())
33.964286
87
0.697161
117
951
5.324786
0.324786
0.128411
0.057785
0.067416
0.077047
0
0
0
0
0
0
0.007979
0.209253
951
28
88
33.964286
0.820479
0
0
0
0
0
0.038866
0
0
0
0
0
0
1
0.238095
false
0
0.142857
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
4d75631330661437f99ee061a3ccab169f7f2ae7
117
py
Python
example_pkg_sckmkny/main.py
larkintuckerllc/example-prj-sckmkny
ffb435eb17afd8469ef8237628e6cf8c4c4091bc
[ "MIT" ]
null
null
null
example_pkg_sckmkny/main.py
larkintuckerllc/example-prj-sckmkny
ffb435eb17afd8469ef8237628e6cf8c4c4091bc
[ "MIT" ]
null
null
null
example_pkg_sckmkny/main.py
larkintuckerllc/example-prj-sckmkny
ffb435eb17afd8469ef8237628e6cf8c4c4091bc
[ "MIT" ]
null
null
null
import requests def hello(): response = requests.get('https://api.github.com') print(response.status_code)
16.714286
53
0.700855
15
117
5.4
0.866667
0
0
0
0
0
0
0
0
0
0
0
0.153846
117
6
54
19.5
0.818182
0
0
0
0
0
0.188034
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
4d7c16abfe6e0ebae810d954aaf5b2f8d0379795
155
py
Python
Hackerrank_python/4.sets/31.Set .add().py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
39
2020-09-27T05:32:05.000Z
2022-01-08T18:04:05.000Z
Hackerrank_python/4.sets/31.Set .add().py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
5
2020-10-02T13:33:00.000Z
2021-03-01T14:06:08.000Z
Hackerrank_python/4.sets/31.Set .add().py
manish1822510059/Hackerrank
7c6e4553f033f067e04dc6c756ef90cb43f3c4a8
[ "MIT" ]
6
2020-10-03T04:04:55.000Z
2021-10-18T04:07:53.000Z
# Enter your code here. Read input from STDIN. Print output to STDOUT n=int(input()) country_name=set(input() for i in range(n)) print(len(country_name))
25.833333
69
0.741935
28
155
4.035714
0.785714
0.19469
0
0
0
0
0
0
0
0
0
0
0.135484
155
5
70
31
0.843284
0.432258
0
0
0
0
0
0
0
0
0
0.2
0
1
0
false
0
0
0
0
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
1
0
0
0
0
0
0
0
0
0
0
3
4d96745903b6f6feaee93831a1910f13bdc9a8d7
102
py
Python
src/factiva/core/auth/__init__.py
dowjones/factiva-core-python
138dfb2bc40550d0a9af7b358e80f58021a094eb
[ "MIT" ]
1
2021-12-04T16:06:48.000Z
2021-12-04T16:06:48.000Z
src/factiva/core/auth/__init__.py
dowjones/factiva-core-python
138dfb2bc40550d0a9af7b358e80f58021a094eb
[ "MIT" ]
5
2021-07-21T21:30:25.000Z
2022-02-02T09:36:49.000Z
src/factiva/core/auth/__init__.py
dowjones/factiva-core-python
138dfb2bc40550d0a9af7b358e80f58021a094eb
[ "MIT" ]
4
2020-04-24T15:29:39.000Z
2022-02-16T12:55:06.000Z
""" Factiva Core Auth Module """ __all__ = ['userkey', 'UserKey'] from .userkey import (UserKey)
14.571429
32
0.647059
11
102
5.636364
0.727273
0
0
0
0
0
0
0
0
0
0
0
0.186275
102
6
33
17
0.746988
0.235294
0
0
0
0
0.212121
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
4d9b4933bf13e2ae76c42f0bae4271b879e265bf
149
py
Python
iris_pipeline/background/__init__.py
zonca/iris_pipeline
a4c20a362037a94f66427521bb5cd5da1c918dd7
[ "BSD-3-Clause" ]
null
null
null
iris_pipeline/background/__init__.py
zonca/iris_pipeline
a4c20a362037a94f66427521bb5cd5da1c918dd7
[ "BSD-3-Clause" ]
38
2019-03-07T01:25:03.000Z
2022-03-01T13:02:29.000Z
iris_pipeline/background/__init__.py
zonca/iris_pipeline
a4c20a362037a94f66427521bb5cd5da1c918dd7
[ "BSD-3-Clause" ]
1
2019-02-28T02:39:06.000Z
2019-02-28T02:39:06.000Z
from .subtract_images_step import SubtractImagesStep from .background_step import BackgroundStep __all__ = ["SubtractImagesStep", "BackgroundStep"]
29.8
52
0.845638
14
149
8.5
0.642857
0.168067
0
0
0
0
0
0
0
0
0
0
0.087248
149
4
53
37.25
0.875
0
0
0
0
0
0.214765
0
0
0
0
0
0
1
0
false
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
4d9b90a293c2be27c1c30f1335d9e0e22cb0a456
482
py
Python
daemon/core/services/__init__.py
alehmannFRA-UAS/core
bcf74297851e40e383c279f1f0a7eff3257c258b
[ "BSD-2-Clause" ]
1
2022-02-12T06:34:49.000Z
2022-02-12T06:34:49.000Z
daemon/core/services/__init__.py
alehmannFRA-UAS/core
bcf74297851e40e383c279f1f0a7eff3257c258b
[ "BSD-2-Clause" ]
null
null
null
daemon/core/services/__init__.py
alehmannFRA-UAS/core
bcf74297851e40e383c279f1f0a7eff3257c258b
[ "BSD-2-Clause" ]
null
null
null
""" Services Services available to nodes can be put in this directory. Everything listed in __all__ is automatically loaded by the main core module. """ from pathlib import Path from core.services.coreservices import ServiceManager _PATH: Path = Path(__file__).resolve().parent def load(): """ Loads all services from the modules that reside under core.services. :return: list of services that failed to load """ return ServiceManager.add_services(_PATH)
22.952381
79
0.746888
65
482
5.369231
0.646154
0.068768
0
0
0
0
0
0
0
0
0
0
0.182573
482
20
80
24.1
0.885787
0.543568
0
0
0
0
0
0
0
0
0
0
0
1
0.2
true
0
0.4
0
0.8
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
4da94a89d7881ff07cb50a3d9125f20067081852
208
py
Python
djsearch/views.py
tdsprogramming/djsearch
a60b4ef1c46a925170357ba4adb7674d830d2744
[ "MIT" ]
null
null
null
djsearch/views.py
tdsprogramming/djsearch
a60b4ef1c46a925170357ba4adb7674d830d2744
[ "MIT" ]
7
2019-12-04T23:03:45.000Z
2022-02-10T09:28:30.000Z
djsearch/views.py
tdsprogramming/djsearch
a60b4ef1c46a925170357ba4adb7674d830d2744
[ "MIT" ]
null
null
null
from functools import reduce import operator from .utils import django_search_serializer, search_db def search(request): q = request.GET['q'] context = search_db(q) return JsonResponse(context)
20.8
54
0.754808
28
208
5.464286
0.607143
0.104575
0
0
0
0
0
0
0
0
0
0
0.168269
208
9
55
23.111111
0.884393
0
0
0
0
0
0.004808
0
0
0
0
0
0
1
0.142857
false
0
0.428571
0
0.714286
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3
4db6325ceef11ea949700e542c7796ed48bef3c9
2,056
py
Python
test_scripts/randomTester.py
bknueven/FindAlmostSymmetry
0d406d3f0c1dca1d56b79f077be4fdbf51bb85bf
[ "MIT" ]
null
null
null
test_scripts/randomTester.py
bknueven/FindAlmostSymmetry
0d406d3f0c1dca1d56b79f077be4fdbf51bb85bf
[ "MIT" ]
null
null
null
test_scripts/randomTester.py
bknueven/FindAlmostSymmetry
0d406d3f0c1dca1d56b79f077be4fdbf51bb85bf
[ "MIT" ]
null
null
null
#!/usr/bin/python import subprocess import re test_instances = [ ('games120.col', 2, 5), \ ('miles500.col', 2, 2), \ ('miles750.col', 2, 2), \ ('miles1000.col', 2, 2), \ ('miles1500.col', 2, 2), \ ('le450_15b.col', 6, 7), \ ('le450_25b.col', 4, 5), \ ('ran10_100_a.bliss', 9, 9), \ ('ran10_100_b.bliss', 9, 9), \ ('ran10_100_c.bliss', 9, 9), \ ('ran10_100_d.bliss', 9, 9), \ ] for f, low, high in test_instances: for B in range(low,high+1): print "running ./testRandomBranching.py " + str(f) + " " + str(B) subprocess.call(["./testRandomBranching.py", str(f), str(B)]) for f, low, high in test_instances: for B in range(low,high+1): call_list = ["../findAlmost", "--budget=" + str(B), "../test_graphs/" + str(f), "outfile"] print "running " + ' '.join(call_list) findAlmost_output = subprocess.check_output( call_list ) print findAlmost_output nodes_line = re.search('Created\s*\d\d*\s*100.0%', findAlmost_output).group(0) nodes = int(re.search('\d\d*', nodes_line).group(0)) print nodes with open( './node_counts/'+str(f)+'.budget'+str(B)+'.nodecount', 'w' ) as outFile: print >>outFile, nodes for f, low, high in test_instances: for B in range(low,high+1): call_list = ["../findAlmost", "--budget=" + str(B), "--localBranching=true", "../test_graphs/" + str(f), "outfile"] print "running " + ' '.join(call_list) findAlmost_output = subprocess.check_output( call_list ) print findAlmost_output nodes_line = re.search('Created\s*\d\d*\s*100.0%', findAlmost_output).group(0) nodes = int(re.search('\d\d*', nodes_line).group(0)) print nodes with open( './node_counts/'+str(f)+'.budget'+str(B)+'.localBranching.nodecount', 'w' ) as outFile: print >>outFile, nodes
41.12
123
0.535506
262
2,056
4.064886
0.259542
0.039437
0.018779
0.033803
0.794366
0.752113
0.697653
0.630047
0.630047
0.630047
0
0.056872
0.281615
2,056
49
124
41.959184
0.664184
0.007782
0
0.5
0
0
0.234429
0.069642
0
0
0
0
0
0
null
null
0
0.05
null
null
0.225
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
4dc06ec09d70e2609c9326499edec81c477ff283
101
py
Python
trame/__init__.py
Kitware/trame
41c4d62e7a6f5dba41fd9305b314c87fa8ed7b6f
[ "Apache-2.0" ]
42
2021-09-24T22:10:32.000Z
2022-03-30T19:39:25.000Z
trame/__init__.py
Kitware/trame
41c4d62e7a6f5dba41fd9305b314c87fa8ed7b6f
[ "Apache-2.0" ]
31
2021-10-01T21:19:56.000Z
2022-03-04T00:14:28.000Z
trame/__init__.py
Kitware/trame
41c4d62e7a6f5dba41fd9305b314c87fa8ed7b6f
[ "Apache-2.0" ]
7
2021-11-17T16:12:06.000Z
2022-03-26T21:08:40.000Z
__path__ = __import__("pkgutil").extend_path(__path__, __name__) __license__ = "Apache License 2.0"
25.25
64
0.772277
12
101
4.75
0.75
0
0
0
0
0
0
0
0
0
0
0.021978
0.09901
101
3
65
33.666667
0.604396
0
0
0
0
0
0.247525
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
4dc20d83bc265da48d49240dfb3018abad424f43
65
py
Python
src/dfana/__metadata__.py
mb-89/dfana
b21efccdd34eb7fb175e4721a810e04f813e5826
[ "MIT" ]
1
2022-01-12T15:34:08.000Z
2022-01-12T15:34:08.000Z
src/dfana/__metadata__.py
mb-89/dfana
b21efccdd34eb7fb175e4721a810e04f813e5826
[ "MIT" ]
null
null
null
src/dfana/__metadata__.py
mb-89/dfana
b21efccdd34eb7fb175e4721a810e04f813e5826
[ "MIT" ]
null
null
null
# this file is autogenerated on pre-commit __version__ = "0.0.1"
21.666667
42
0.738462
11
65
4
0.909091
0
0
0
0
0
0
0
0
0
0
0.054545
0.153846
65
2
43
32.5
0.745455
0.615385
0
0
1
0
0.217391
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
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
4de30a259a711ac7542af7dcb5668b605ed07fd6
353
py
Python
Python/5186.py
GeneralLi95/leetcode
f42392f2283e19ec76273d81b2912944f9039568
[ "MIT" ]
null
null
null
Python/5186.py
GeneralLi95/leetcode
f42392f2283e19ec76273d81b2912944f9039568
[ "MIT" ]
null
null
null
Python/5186.py
GeneralLi95/leetcode
f42392f2283e19ec76273d81b2912944f9039568
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # 区间内查询数字的频率 class RangeFreqQuery: def __init__(self, arr: [int]): self.arr = arr return None def query(self, left: int, right: int, value: int) -> int: return self.arr[left:right+1].count(value) a = RangeFreqQuery([12, 33, 4, 56, 22, 2, 34, 33, 22, 12, 34, 56]) print(RangeFreqQuery.query(a, 0, 11, 33))
19.611111
66
0.634561
56
353
3.928571
0.553571
0.095455
0
0
0
0
0
0
0
0
0
0.102474
0.1983
353
18
67
19.611111
0.674912
0.090652
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0
0.125
0.625
0.125
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
4de667e153cae602ff7e2b2c50b780accd74ed19
1,410
py
Python
src/assisted_test_infra/test_infra/helper_classes/cluster_host.py
nirarg/assisted-test-infra
e07c43501c1d9bfaa1aee3aea49f1ef359faee07
[ "Apache-2.0" ]
null
null
null
src/assisted_test_infra/test_infra/helper_classes/cluster_host.py
nirarg/assisted-test-infra
e07c43501c1d9bfaa1aee3aea49f1ef359faee07
[ "Apache-2.0" ]
248
2020-11-09T06:47:39.000Z
2022-03-28T06:02:39.000Z
src/assisted_test_infra/test_infra/helper_classes/cluster_host.py
nirarg/assisted-test-infra
e07c43501c1d9bfaa1aee3aea49f1ef359faee07
[ "Apache-2.0" ]
null
null
null
import json from typing import List from assisted_service_client import Host, Interface, Inventory DEFAULT_HOSTNAME = "localhost" class ClusterHost: def __init__(self, host_model: Host): self.__host_model = host_model self.__inventory = Inventory(**json.loads(self.__host_model.inventory)) def get_id(self): return self.__host_model.id def get_inventory(self) -> Inventory: return self.__inventory def get_hostname(self) -> str: return ( self.__host_model.requested_hostname if self.__host_model.requested_hostname else self.__inventory.hostname ) def has_hostname(self) -> bool: return self.get_hostname() != DEFAULT_HOSTNAME def interfaces(self) -> List[Interface]: return [Interface(**interface) for interface in self.__inventory.interfaces] def macs(self) -> List[str]: return [ifc.mac_address.lower() for ifc in self.interfaces()] def ips(self) -> List[str]: return self.ipv4_addresses() + self.ipv6_addresses() def ipv4_addresses(self) -> List[str]: results = list() for ifc in self.interfaces(): results.extend(ifc.ipv4_addresses) return results def ipv6_addresses(self) -> List[str]: results = list() for ifc in self.interfaces(): results.extend(ifc.ipv6_addresses) return results
27.115385
119
0.664539
169
1,410
5.266272
0.260355
0.070787
0.08764
0.040449
0.247191
0.155056
0.155056
0.155056
0.155056
0.155056
0
0.005576
0.236879
1,410
51
120
27.647059
0.821561
0
0
0.176471
0
0
0.006383
0
0
0
0
0
0
1
0.294118
false
0
0.088235
0.205882
0.676471
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
4de6e31d32fdaec5dcce8c1fa12f28d1cc8c32b1
350
py
Python
pybricks/libraries.py
emthomas/pybricks
adc212cd8d8e9b257be3139aa99116ba2505ead6
[ "MIT" ]
2
2019-09-21T02:53:09.000Z
2020-01-03T03:15:39.000Z
pybricks/libraries.py
emthomas/pybricks
adc212cd8d8e9b257be3139aa99116ba2505ead6
[ "MIT" ]
null
null
null
pybricks/libraries.py
emthomas/pybricks
adc212cd8d8e9b257be3139aa99116ba2505ead6
[ "MIT" ]
null
null
null
import json import os import requests class LibrariesApi(object): """The Libraries API""" def __init__(self, hostname, token): self.hostname = "%s/api/" % hostname self.__headers = {'authorization': "Bearer %s" % token, "content-type": "application/scim+json", "accept": "application/scim+json"}
25
104
0.614286
37
350
5.648649
0.648649
0.114833
0.181818
0
0
0
0
0
0
0
0
0
0.242857
350
13
105
26.923077
0.788679
0.048571
0
0
0
0
0.272171
0.12844
0
0
0
0
0
1
0.125
false
0
0.375
0
0.625
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
4df6988d8ecb849c02004757dd887a06149585d9
109
py
Python
remove_old.py
aidnem/jenga-lang
c46ca79a85b9a5e19c621fa7cc68af5db8c10ddc
[ "MIT" ]
null
null
null
remove_old.py
aidnem/jenga-lang
c46ca79a85b9a5e19c621fa7cc68af5db8c10ddc
[ "MIT" ]
null
null
null
remove_old.py
aidnem/jenga-lang
c46ca79a85b9a5e19c621fa7cc68af5db8c10ddc
[ "MIT" ]
null
null
null
import glob import os expecteds = glob.glob("examples/*.asm.expected") for g in expecteds: os.remove(g)
15.571429
48
0.715596
17
109
4.588235
0.647059
0
0
0
0
0
0
0
0
0
0
0
0.155963
109
7
49
15.571429
0.847826
0
0
0
0
0
0.209091
0.209091
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
1505e8a6d10b197a78482d7a2d14256a8a0fe17d
375
py
Python
project/settings/base/cache.py
vo0doO/pydj-persweb
efcd6b7090230f7c0b9ec056008f6d1d9e876ed9
[ "CC0-1.0" ]
null
null
null
project/settings/base/cache.py
vo0doO/pydj-persweb
efcd6b7090230f7c0b9ec056008f6d1d9e876ed9
[ "CC0-1.0" ]
4
2020-05-06T17:22:00.000Z
2021-12-13T20:43:30.000Z
project/settings/base/cache.py
vo0doO/pydj-persweb
efcd6b7090230f7c0b9ec056008f6d1d9e876ed9
[ "CC0-1.0" ]
null
null
null
from django.conf import settings CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': 'cache:11211' } } if settings.PRODUCTION: CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211' } }
22.058824
77
0.578667
35
375
6.2
0.571429
0.119816
0.184332
0.239631
0.682028
0.682028
0.682028
0.682028
0.682028
0.682028
0
0.058608
0.272
375
16
78
23.4375
0.736264
0
0
0.428571
0
0
0.458667
0.272
0
0
0
0
0
1
0
false
0
0.071429
0
0.071429
0
0
0
0
null
0
1
1
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
15071c5e550ec4a2bfd03a0254c66cda86e41011
363
py
Python
code/socialDistribution/models/category.py
CMPUT404F21TEAM/social-distribution
c6775bfa3bf93025d426bc4601431128a51d4c48
[ "W3C-20150513" ]
null
null
null
code/socialDistribution/models/category.py
CMPUT404F21TEAM/social-distribution
c6775bfa3bf93025d426bc4601431128a51d4c48
[ "W3C-20150513" ]
173
2021-09-30T00:12:03.000Z
2021-12-09T00:32:46.000Z
code/socialDistribution/models/category.py
CMPUT404F21TEAM/social-distribution
c6775bfa3bf93025d426bc4601431128a51d4c48
[ "W3C-20150513" ]
3
2021-12-09T01:27:49.000Z
2022-03-11T06:04:16.000Z
from django.db import models from cmput404.constants import STRING_MAXLEN class Category(models.Model): ''' Categories model: id Auto-generated id category Category name posts reference to post (Many-to-Many relationship) ''' category = models.CharField(max_length=STRING_MAXLEN)
33
74
0.628099
39
363
5.769231
0.666667
0.106667
0
0
0
0
0
0
0
0
0
0.011952
0.30854
363
10
75
36.3
0.884462
0.46281
0
0
1
0
0
0
0
0
0
0
0
1
0
false
0
0.5
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
1510ad207419006e8cd465764fb624d111700ee0
1,436
py
Python
JumpScale9Portal/portal/PortalAuthenticatorGitlab.py
Jumpscale/portal9
fd4c9718daf51b877a6a98bd0d1ff4bc0b272f67
[ "Apache-2.0" ]
1
2017-06-07T08:12:09.000Z
2017-06-07T08:12:09.000Z
JumpScale9Portal/portal/PortalAuthenticatorGitlab.py
Jumpscale/portal9
fd4c9718daf51b877a6a98bd0d1ff4bc0b272f67
[ "Apache-2.0" ]
36
2017-05-18T10:54:44.000Z
2019-03-27T11:24:20.000Z
JumpScale9Portal/portal/PortalAuthenticatorGitlab.py
Jumpscale/portal9
fd4c9718daf51b877a6a98bd0d1ff4bc0b272f67
[ "Apache-2.0" ]
1
2018-06-12T05:18:01.000Z
2018-06-12T05:18:01.000Z
from js9 import j import gitlab3 import time class PortalAuthenticatorGitlab(object): """ Main functionality is to provide authenticate() function and other helper functions Those functions are all added to client """ def __init__(self, instance='main'): self.client = j.clients.gitlab.get(instance=instance) def authenticate(self, login, password): return self.client.authenticate(login, password) def getGroups(self, username): return self.client.getGroups(username) def getUserFromKey(self, key): new_client = gitlab3.GitLab(self.client.addr, token=key) try: return new_client.current_user().username except gitlab3.exceptions.UnauthorizedRequest: return "guest" def getUserSpaces(self, username, **kwargs): return ["%s_%s" % (space['namespace']['name'], space['name']) for space in self.client.getUserSpacesObjects(username)] def getUserSpacesObjects(self, username): return self.client.getUserSpacesObjects(username) def getUserSpaceRights(self, username, space, **kwargs): space = self.client.getSpace(space) if not space: return username, '' return self.client.getUserSpaceRights(username, space.name) def getNonClonedGitlabSpaces(self, username, **kwargs): return self.client.getNonClonedGitlabSpaces(username, **kwargs)
32.636364
87
0.683148
151
1,436
6.443709
0.417219
0.092497
0.08222
0.073998
0.131552
0
0
0
0
0
0
0.003556
0.216574
1,436
43
88
33.395349
0.861333
0.085655
0
0
0
0
0.023975
0
0
0
0
0
0
1
0.285714
false
0.071429
0.107143
0.178571
0.75
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
3
1278c35ad13b7a71786850979b84cc65b1ed468e
650
py
Python
src/experiments/rewrite.py
squaresLab/SemanticCrashBucketing
1c64a92571f76d5495940fab74886ea42f293067
[ "Apache-2.0" ]
13
2018-08-01T22:42:07.000Z
2020-02-07T11:52:11.000Z
src/experiments/rewrite.py
squaresLab/SemanticCrashBucketing
1c64a92571f76d5495940fab74886ea42f293067
[ "Apache-2.0" ]
null
null
null
src/experiments/rewrite.py
squaresLab/SemanticCrashBucketing
1c64a92571f76d5495940fab74886ea42f293067
[ "Apache-2.0" ]
3
2018-12-07T01:39:40.000Z
2019-11-13T10:09:24.000Z
from debug import * from presto_instance import * def rewrite(source, match_template, rewrite_template): if DEBUG_ROOIBOS: print '[DEBUG ROOIBOS] source: %r' % source print '[DEBUG ROOIBOS] match template: %r' % match_template print '[DEBUG ROOIBOS] rewrite template: %r' % rewrite_template result = p.rewrite(source, match_template, rewrite_template) if result.status_code == 200: if DEBUG_ROOIBOS: print '[DEBUG ROOIBOS] rooibos result:', result return result.text else: if DEBUG_ROOIBOS: print '[DEBUG ROOIBOS] Error: could not rewrite!' return ''
32.5
71
0.655385
76
650
5.460526
0.328947
0.231325
0.204819
0.137349
0.426506
0.426506
0.207229
0
0
0
0
0.006211
0.256923
650
19
72
34.210526
0.853002
0
0
0.1875
0
0
0.258462
0
0
0
0
0
0
0
null
null
0
0.125
null
null
0.3125
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
1
0
0
0
0
0
0
0
0
3
1279860f4b64c3844aa28f1b33f9c856569c4494
1,711
py
Python
src/core/lib/yamlSupport.py
lilliputten/cam-rpi-server-2202
096646221e30128f6331d59584a0fbd5aa1900ec
[ "MIT" ]
null
null
null
src/core/lib/yamlSupport.py
lilliputten/cam-rpi-server-2202
096646221e30128f6331d59584a0fbd5aa1900ec
[ "MIT" ]
null
null
null
src/core/lib/yamlSupport.py
lilliputten/cam-rpi-server-2202
096646221e30128f6331d59584a0fbd5aa1900ec
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- # @module yamlSupport # @since 2020.02.23, 02:18 # @changed 2022.02.24, 00:43 import re import yaml from . import utils # Yaml extending (TODO: Extract to separated module)... # See: # - https://www.programcreek.com/python/example/104725/yaml.add_representer class CustomYamlDumper(yaml.Dumper): def increase_indent(self, flow=False, indentless=False): # # Got warning here: R1725: Consider using Python 3 style super() without arguments (super-with-arguments) # return super(CustomYamlDumper, self).increase_indent(flow, False) return super().increase_indent(flow, False) def yamlReprStr(dumper, data): yamlTag = 'tag:yaml.org,2002:str' hasNewlines = '\n' in data or '\r' in data if hasNewlines: # Block style for long multiline strings... useStyle = '|' if len(data) > 30 else '"' return dumper.represent_scalar(yamlTag, data, style=useStyle) if re.search(r'["\'\\ /]', data): # style = '"' if "'" in data and '"' not in data else "'" return dumper.represent_scalar(yamlTag, data, style='\'') return dumper.represent_str(data) # return dumper.represent_scalar('tag:yaml.org,2002:str', data, style='') yaml.add_representer(str, yamlReprStr) class BlockString: # default constructor def __init__(self, string, maxLength=0): self.string = string self.maxLength = maxLength def prepareString(self): return utils.prepareLongString(self.string, self.maxLength) def yamlReprBlockString(dumper, data): return dumper.represent_scalar('tag:yaml.org,2002:str', data.prepareString(), style='|') yaml.add_representer(BlockString, yamlReprBlockString)
30.017544
116
0.685564
212
1,711
5.462264
0.448113
0.051813
0.090674
0.093264
0.185665
0.170984
0.170984
0.170984
0.08981
0.08981
0
0.036429
0.181765
1,711
56
117
30.553571
0.790714
0.344828
0
0
0
0
0.04792
0.037975
0
0
0
0.017857
0
1
0.2
false
0
0.12
0.12
0.64
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
0
0
0
0
1
1
0
0
3
127e8e8f2eb48cdb823cd8dc4ca034e0e59a0673
1,152
py
Python
PuppeteerLibrary/library_context/library_context_factory.py
qahive/robotframework-puppeteer
6377156c2e5b3a4d3841c33a2d3ff9ab0b38854a
[ "Apache-2.0" ]
37
2019-10-28T01:35:43.000Z
2022-03-31T04:11:49.000Z
PuppeteerLibrary/library_context/library_context_factory.py
qahive/robotframework-puppeteer
6377156c2e5b3a4d3841c33a2d3ff9ab0b38854a
[ "Apache-2.0" ]
61
2020-07-16T00:18:22.000Z
2022-03-24T07:12:05.000Z
PuppeteerLibrary/library_context/library_context_factory.py
qahive/robotframework-puppeteer
6377156c2e5b3a4d3841c33a2d3ff9ab0b38854a
[ "Apache-2.0" ]
10
2020-03-03T05:28:05.000Z
2022-02-14T10:03:44.000Z
from .ilibrary_context import iLibraryContext from PuppeteerLibrary.puppeteer.puppeteer_context import PuppeteerContext from PuppeteerLibrary.playwright.playwright_context import PlaywrightContext class LibraryContextFactory: def create(self, browser_type: str) -> iLibraryContext: """Return iLibraryContext based on specific browser_type Create context based on browser type (chrome, pwchrome, ptchrome, safari, webkit) """ if browser_type.lower() == 'chrome': return PlaywrightContext(browser_type) elif browser_type.lower() == 'pwchrome': return PlaywrightContext(browser_type) elif browser_type.lower() == 'ptchrome': return PuppeteerContext(browser_type) elif browser_type.lower() == 'safari': return PlaywrightContext(browser_type) elif browser_type.lower() == 'webkit': return PlaywrightContext(browser_type) elif browser_type.lower() == 'firefox': return PlaywrightContext(browser_type) else: raise Exception('Sorry, not supported for library type '+str(browser_type)+'.')
44.307692
91
0.694444
112
1,152
6.982143
0.348214
0.225064
0.122762
0.217391
0.315857
0.315857
0.276215
0.276215
0
0
0
0
0.220486
1,152
25
92
46.08
0.870824
0.118056
0
0.263158
0
0
0.080564
0
0
0
0
0
0
1
0.052632
false
0
0.157895
0
0.578947
0
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
129a157dd887109045a30db92ee71830e518d33c
441
py
Python
Lesson_1_Python/Assignment3/neighbors.py
alee1412/activities
226b268e1a98fa19baf6ec9aab44140280ca2da9
[ "MIT" ]
null
null
null
Lesson_1_Python/Assignment3/neighbors.py
alee1412/activities
226b268e1a98fa19baf6ec9aab44140280ca2da9
[ "MIT" ]
null
null
null
Lesson_1_Python/Assignment3/neighbors.py
alee1412/activities
226b268e1a98fa19baf6ec9aab44140280ca2da9
[ "MIT" ]
null
null
null
my_first_name = str(input("My first name is ")) neighbor_first_name = str(input("My neighbor's first name is ")) my_coding = int(input("How many months have I been coding? ")) neighbor_coding = int(input("How many months has my neighbor been coding? ")) print("I am " + my_first_name + " and my neighbor is " + neighbor_first_name) print(str(my_first_name)) print(str(neighbor_first_name)) print(str(my_coding)) print(str(neighbor_coding))
40.090909
77
0.748299
74
441
4.243243
0.27027
0.229299
0.140127
0.16242
0.464968
0.343949
0
0
0
0
0
0
0.124717
441
11
78
40.090909
0.813472
0
0
0
0
0
0.341629
0
0
0
0
0
0
1
0
false
0
0
0
0
0.555556
0
0
0
null
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
12c6d2a6d7ea5fc05e29146652a06008596bba73
123
py
Python
python/problem-16.py
mijodong/euler
d979c8beec29d634a26f1bf279e502f8c15182c5
[ "Unlicense" ]
null
null
null
python/problem-16.py
mijodong/euler
d979c8beec29d634a26f1bf279e502f8c15182c5
[ "Unlicense" ]
null
null
null
python/problem-16.py
mijodong/euler
d979c8beec29d634a26f1bf279e502f8c15182c5
[ "Unlicense" ]
null
null
null
value = 2 ** 1000 value_string = str(value) value_sum = 0 for _ in value_string: value_sum += int(_) print(value_sum)
15.375
25
0.691057
20
123
3.9
0.55
0.307692
0
0
0
0
0
0
0
0
0
0.060606
0.195122
123
8
26
15.375
0.727273
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
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
12d81b9b4e2a2d4ce66bd7408033b5a03f29bedf
156
py
Python
ManageSnippetApp/SnippetApp/urls.py
mitalimn/PythonDjangoApp
9c8b3264991f1550732235a80775f3ed5813a416
[ "MIT" ]
null
null
null
ManageSnippetApp/SnippetApp/urls.py
mitalimn/PythonDjangoApp
9c8b3264991f1550732235a80775f3ed5813a416
[ "MIT" ]
null
null
null
ManageSnippetApp/SnippetApp/urls.py
mitalimn/PythonDjangoApp
9c8b3264991f1550732235a80775f3ed5813a416
[ "MIT" ]
null
null
null
# SnippetApp/urls.py from django.conf.urls import url, include from SnippetApp import views urlpatterns = [ url(r'^$', views.HomePageView.as_view()), ]
22.285714
45
0.730769
21
156
5.380952
0.714286
0
0
0
0
0
0
0
0
0
0
0
0.134615
156
7
46
22.285714
0.837037
0.115385
0
0
0
0
0.014599
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
12e8947eaec96cadb17bdaf1234d7a2fb54f6f05
596
py
Python
server/src/tests/samples/generators2.py
mewbak/pyright
f068baa6007f6d39136386b6f178bb6761197248
[ "MIT" ]
null
null
null
server/src/tests/samples/generators2.py
mewbak/pyright
f068baa6007f6d39136386b6f178bb6761197248
[ "MIT" ]
null
null
null
server/src/tests/samples/generators2.py
mewbak/pyright
f068baa6007f6d39136386b6f178bb6761197248
[ "MIT" ]
null
null
null
# This sample tests various type checking operations relating to # generator functions that use the "yield from" clause. from typing import Iterator class ClassA(): pass class ClassB(): def shouldContinue(self): return True class ClassC(): pass def generator1() -> Iterator[ClassA]: yield from generator1() def generator2() -> Iterator[ClassB]: # This should generate an error because it yields # an iterator of the wrong type. yield from generator1() # This should also generate an error because it # yields the wrong type. yield from 1
19.866667
64
0.696309
77
596
5.38961
0.558442
0.086747
0.091566
0.106024
0.245783
0.144578
0
0
0
0
0
0.010965
0.234899
596
29
65
20.551724
0.899123
0.442953
0
0.307692
0
0
0
0
0
0
0
0
0
1
0.230769
false
0.153846
0.076923
0.076923
0.615385
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
1
0
0
3
4233c181235c800b07080eeb9e7bbd5a86c9f785
122
py
Python
AIDEMY/Intro_2_2_1.py
vox256/Codes
c408ef0fbc25af46dacef93b3496985feb98dd5c
[ "MIT" ]
null
null
null
AIDEMY/Intro_2_2_1.py
vox256/Codes
c408ef0fbc25af46dacef93b3496985feb98dd5c
[ "MIT" ]
null
null
null
AIDEMY/Intro_2_2_1.py
vox256/Codes
c408ef0fbc25af46dacef93b3496985feb98dd5c
[ "MIT" ]
null
null
null
# 変数townに辞書を代入してください town = {"Aichi" : "Nagoya", "Kanagawa" : "Yokohama"} # townの出力 print(town) # 型の出力 print(type(town))
15.25
52
0.672131
13
122
6.307692
0.769231
0
0
0
0
0
0
0
0
0
0
0
0.139344
122
8
53
15.25
0.780952
0.254098
0
0
0
0
0.306818
0
0
0
0
0
0
1
0
false
0
0
0
0
0.666667
1
0
0
null
0
0
0
0
0
0
0
0
0
0
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
4260c2ff68a6760f375504ce5fb224c9b7b62560
145
py
Python
Codewars_Python/regex_pin_code_7_kyu.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
Codewars_Python/regex_pin_code_7_kyu.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
Codewars_Python/regex_pin_code_7_kyu.py
nlantau/Codewars_2020_2021
055fbf8785ddd52b9f8e8c2b59294ead01852467
[ "MIT" ]
null
null
null
# nlantau, 2021-10-28 validate_pin = lambda p:len([*filter(str.isdigit,p)]) == len(p) and (len(p)==6 or len(p)==4) print(validate_pin("1a34"))
20.714286
67
0.648276
27
145
3.407407
0.666667
0.130435
0
0
0
0
0
0
0
0
0
0.100775
0.110345
145
6
68
24.166667
0.612403
0.131034
0
0
0
0
0.032258
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
428d5280ca3d07cd77491a6f472b7d1afc8ff44f
49
py
Python
river_engine/settings/default_settings.py
cysnake4713/river
579ca1f6bdf45a3e51e35a181cf1912edfe724e7
[ "Apache-2.0" ]
null
null
null
river_engine/settings/default_settings.py
cysnake4713/river
579ca1f6bdf45a3e51e35a181cf1912edfe724e7
[ "Apache-2.0" ]
null
null
null
river_engine/settings/default_settings.py
cysnake4713/river
579ca1f6bdf45a3e51e35a181cf1912edfe724e7
[ "Apache-2.0" ]
null
null
null
RESOURCE_MAPPER_BASE = { 'sqlalchemy': '', }
12.25
24
0.612245
4
49
7
1
0
0
0
0
0
0
0
0
0
0
0
0.204082
49
3
25
16.333333
0.717949
0
0
0
0
0
0.204082
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
42a2d5413868bff90a7403326c1fc7400643077f
443
py
Python
python/codewars/num_of_likes/tests/num_of_likes.py
beasleyDOTcom/data-structures-and-algorithms
2915ed9d9ad5f2e8c983d0711c9e2b52e0ed14ff
[ "MIT" ]
1
2021-09-01T01:39:22.000Z
2021-09-01T01:39:22.000Z
python/codewars/num_of_likes/tests/num_of_likes.py
beasleyDOTcom/data-structures-and-algorithms
2915ed9d9ad5f2e8c983d0711c9e2b52e0ed14ff
[ "MIT" ]
47
2020-07-13T21:56:44.000Z
2021-03-06T03:53:25.000Z
python/codewars/num_of_likes/tests/num_of_likes.py
beasleyDOTcom/data-structures-and-algorithms
2915ed9d9ad5f2e8c983d0711c9e2b52e0ed14ff
[ "MIT" ]
null
null
null
def num_of_likes(names): if len(names) == 0: return 'no one likes this' elif len(names) == 1: return names[0] + ' likes this' elif len(names) == 2: return names[0] + ' and ' + names[1] + ' like this' elif len(names) == 3: return names[0] + ', ' + names[1] + ' and ' + names[2] + ' like this' else: return names[0] + ', ' + names[1] + ' and '+ str(len(names)-2) + ' others like this'
36.916667
92
0.510158
63
443
3.555556
0.333333
0.178571
0.214286
0.214286
0.375
0.1875
0
0
0
0
0
0.042345
0.306998
443
12
92
36.916667
0.687296
0
0
0
0
0
0.189616
0
0
0
0
0
0
1
0.090909
false
0
0
0
0.545455
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
0
0
1
0
0
3
42ad21b1c2f62ba745491de5155f9a883c1241a4
387
py
Python
data_access_layer/abstact_classes/user_dao.py
Uirfan/project1
8081e57cc97ec57a5d84f95def12039ec2101c6a
[ "Unlicense" ]
null
null
null
data_access_layer/abstact_classes/user_dao.py
Uirfan/project1
8081e57cc97ec57a5d84f95def12039ec2101c6a
[ "Unlicense" ]
null
null
null
data_access_layer/abstact_classes/user_dao.py
Uirfan/project1
8081e57cc97ec57a5d84f95def12039ec2101c6a
[ "Unlicense" ]
null
null
null
from abc import ABC, abstractmethod from entities.user import User class UserDAO(ABC): @abstractmethod def create_user_dao(self, user: User): pass @abstractmethod def get_user_dao(self, *argv): pass @abstractmethod def update_user_dao(self, user_id: int): pass @abstractmethod def delete_user_dao(self, *vargs): pass
17.590909
44
0.658915
48
387
5.125
0.416667
0.276423
0.178862
0.121951
0
0
0
0
0
0
0
0
0.26615
387
21
45
18.428571
0.866197
0
0
0.533333
0
0
0
0
0
0
0
0
0
1
0.266667
false
0.266667
0.133333
0
0.466667
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
1
0
1
0
0
0
0
0
3
35efaad72b80c6cd9bc0fadb73271293172a916b
936
py
Python
scenarios/appsec/test_unsupported.py
DataDog/system-tests
04f94312fddb135830dbe2df6d51d9246561ea6e
[ "Apache-2.0" ]
3
2021-11-15T20:28:25.000Z
2022-01-27T18:33:15.000Z
scenarios/appsec/test_unsupported.py
DataDog/system-tests
04f94312fddb135830dbe2df6d51d9246561ea6e
[ "Apache-2.0" ]
25
2021-11-08T15:50:38.000Z
2022-03-29T12:16:17.000Z
scenarios/appsec/test_unsupported.py
DataDog/system-tests
04f94312fddb135830dbe2df6d51d9246561ea6e
[ "Apache-2.0" ]
1
2021-11-15T20:28:28.000Z
2021-11-15T20:28:28.000Z
# Unless explicitly stated otherwise all files in this repository are licensed under the the Apache License Version 2.0. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2021 Datadog, Inc. from utils import BaseTestCase, interfaces class TestAppSecDeactivated(BaseTestCase): def test_no_attack_detected(self): """ Appsec does not catch any attack """ r = self.weblog_get("/", headers={"User-Agent": "Arachni/v1"}) interfaces.library.assert_no_appsec_event(r) r = self.weblog_get("/waf", params={"attack": "<script>"}) interfaces.library.assert_no_appsec_event(r) def test_unsupported_logs_present(self): pass # TODO have a solid way to read logs # f = open("/app/logs/docker/weblog.log", "r") # logs = f.read() # assert "AppSec could not start because the current environment is not supported." in logs
42.545455
120
0.696581
125
936
5.104
0.688
0.021944
0.034483
0.043887
0.115987
0.115987
0.115987
0
0
0
0
0.009309
0.196581
936
21
121
44.571429
0.839096
0.480769
0
0.222222
0
0
0.082452
0
0
0
0
0.047619
0.222222
1
0.222222
false
0.111111
0.111111
0
0.444444
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
35f3ea5eac63102cd4aea4b1ae053844b450389e
5,155
py
Python
arduino_iot_rest/__init__.py
akash73/iot-client-py
5335dbaa816fb2d26097f0403d3d51796ebd9d99
[ "Apache-2.0" ]
null
null
null
arduino_iot_rest/__init__.py
akash73/iot-client-py
5335dbaa816fb2d26097f0403d3d51796ebd9d99
[ "Apache-2.0" ]
null
null
null
arduino_iot_rest/__init__.py
akash73/iot-client-py
5335dbaa816fb2d26097f0403d3d51796ebd9d99
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # flake8: noqa """ Arduino IoT Cloud API Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) # noqa: E501 The version of the OpenAPI document: 2.0 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import __version__ = "1.3.3" # import apis into sdk package from arduino_iot_rest.api.devices_v2_api import DevicesV2Api from arduino_iot_rest.api.devices_v2_certs_api import DevicesV2CertsApi from arduino_iot_rest.api.devices_v2_pass_api import DevicesV2PassApi from arduino_iot_rest.api.properties_v2_api import PropertiesV2Api from arduino_iot_rest.api.series_v2_api import SeriesV2Api from arduino_iot_rest.api.things_v2_api import ThingsV2Api # import ApiClient from arduino_iot_rest.api_client import ApiClient from arduino_iot_rest.configuration import Configuration from arduino_iot_rest.exceptions import OpenApiException from arduino_iot_rest.exceptions import ApiTypeError from arduino_iot_rest.exceptions import ApiValueError from arduino_iot_rest.exceptions import ApiKeyError from arduino_iot_rest.exceptions import ApiException # import models into sdk package from arduino_iot_rest.models.arduino_compressedv2 import ArduinoCompressedv2 from arduino_iot_rest.models.arduino_devicev2 import ArduinoDevicev2 from arduino_iot_rest.models.arduino_devicev2_cert import ArduinoDevicev2Cert from arduino_iot_rest.models.arduino_devicev2_event_properties import ArduinoDevicev2EventProperties from arduino_iot_rest.models.arduino_devicev2_pass import ArduinoDevicev2Pass from arduino_iot_rest.models.arduino_devicev2_simple_properties import ArduinoDevicev2SimpleProperties from arduino_iot_rest.models.arduino_devicev2_webhook import ArduinoDevicev2Webhook from arduino_iot_rest.models.arduino_devicev2properties import ArduinoDevicev2properties from arduino_iot_rest.models.arduino_devicev2propertyvalue import ArduinoDevicev2propertyvalue from arduino_iot_rest.models.arduino_devicev2propertyvalue_value import ArduinoDevicev2propertyvalueValue from arduino_iot_rest.models.arduino_devicev2propertyvalue_value_statistics import ArduinoDevicev2propertyvalueValueStatistics from arduino_iot_rest.models.arduino_devicev2propertyvalues import ArduinoDevicev2propertyvalues from arduino_iot_rest.models.arduino_devicev2propertyvalues_last_evaluated_key import ArduinoDevicev2propertyvaluesLastEvaluatedKey from arduino_iot_rest.models.arduino_property import ArduinoProperty from arduino_iot_rest.models.arduino_series_batch import ArduinoSeriesBatch from arduino_iot_rest.models.arduino_series_raw_batch import ArduinoSeriesRawBatch from arduino_iot_rest.models.arduino_series_raw_batch_lastvalue import ArduinoSeriesRawBatchLastvalue from arduino_iot_rest.models.arduino_series_raw_last_value_response import ArduinoSeriesRawLastValueResponse from arduino_iot_rest.models.arduino_series_raw_response import ArduinoSeriesRawResponse from arduino_iot_rest.models.arduino_series_response import ArduinoSeriesResponse from arduino_iot_rest.models.arduino_thing import ArduinoThing from arduino_iot_rest.models.batch_last_value_requests_media_v1 import BatchLastValueRequestsMediaV1 from arduino_iot_rest.models.batch_query_raw_last_value_request_media_v1 import BatchQueryRawLastValueRequestMediaV1 from arduino_iot_rest.models.batch_query_raw_request_media_v1 import BatchQueryRawRequestMediaV1 from arduino_iot_rest.models.batch_query_raw_requests_media_v1 import BatchQueryRawRequestsMediaV1 from arduino_iot_rest.models.batch_query_raw_response_series_media_v1 import BatchQueryRawResponseSeriesMediaV1 from arduino_iot_rest.models.batch_query_request_media_v1 import BatchQueryRequestMediaV1 from arduino_iot_rest.models.batch_query_requests_media_v1 import BatchQueryRequestsMediaV1 from arduino_iot_rest.models.check_devices_v2_pass_payload import CheckDevicesV2PassPayload from arduino_iot_rest.models.create_devices_v2_certs_payload import CreateDevicesV2CertsPayload from arduino_iot_rest.models.create_devices_v2_payload import CreateDevicesV2Payload from arduino_iot_rest.models.create_things_v2_payload import CreateThingsV2Payload from arduino_iot_rest.models.devicev2 import Devicev2 from arduino_iot_rest.models.devicev2_cert import Devicev2Cert from arduino_iot_rest.models.devicev2_pass import Devicev2Pass from arduino_iot_rest.models.error import Error from arduino_iot_rest.models.model_property import ModelProperty from arduino_iot_rest.models.properties_value import PropertiesValue from arduino_iot_rest.models.properties_values import PropertiesValues from arduino_iot_rest.models.property_value import PropertyValue from arduino_iot_rest.models.thing import Thing from arduino_iot_rest.models.thing_sketch import ThingSketch from arduino_iot_rest.models.update_sketch import UpdateSketch
64.4375
434
0.894859
669
5,155
6.535127
0.243647
0.139524
0.179323
0.230558
0.454941
0.412397
0.269899
0.116651
0.020586
0
0
0.015797
0.066731
5,155
79
435
65.253165
0.892954
0.125121
0
0
0
0
0.001116
0
0
0
0
0
0
1
0
false
0.068966
0.982759
0
0.982759
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
1
1
0
0
0
0
3
35f7b2dfd4219eef481f432549b83459adcba49c
44
py
Python
urchin/__init__.py
kellen/urchinfs
ea47d8997b42b9b472ea16d1bc7921b988840e4b
[ "Unlicense" ]
2
2021-11-08T03:11:32.000Z
2021-11-08T08:21:24.000Z
urchin/__init__.py
kellen/urchinfs
ea47d8997b42b9b472ea16d1bc7921b988840e4b
[ "Unlicense" ]
null
null
null
urchin/__init__.py
kellen/urchinfs
ea47d8997b42b9b472ea16d1bc7921b988840e4b
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python __version__ = "0.1.0"
14.666667
21
0.659091
8
44
3.125
0.875
0
0
0
0
0
0
0
0
0
0
0.076923
0.113636
44
2
22
22
0.564103
0.454545
0
0
0
0
0.217391
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
35f9ea2a73aabe4af922ee8e9fbe3b4758ad5bee
126
py
Python
meiduo_mall/apps/carts/urls.py
Vent-Any/meiduo_first_commit
75c5da7a29733d8135342f4cd357c67c10a40ae1
[ "MIT" ]
1
2021-07-28T13:28:39.000Z
2021-07-28T13:28:39.000Z
meiduo_mall/apps/carts/urls.py
Vent-Any/meiduo_first_commit
75c5da7a29733d8135342f4cd357c67c10a40ae1
[ "MIT" ]
null
null
null
meiduo_mall/apps/carts/urls.py
Vent-Any/meiduo_first_commit
75c5da7a29733d8135342f4cd357c67c10a40ae1
[ "MIT" ]
null
null
null
from django.urls import path from apps.carts.views import CartsView urlpatterns = [ path('carts/', CartsView.as_view()), ]
25.2
40
0.738095
17
126
5.411765
0.705882
0
0
0
0
0
0
0
0
0
0
0
0.134921
126
5
41
25.2
0.844037
0
0
0
0
0
0.047244
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
c40e420b2f9b3dda6ac61a7bc4898bdf97fe2632
7,887
py
Python
sdk/python/pulumi_google_native/gameservices/v1beta/_enums.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
44
2021-04-18T23:00:48.000Z
2022-02-14T17:43:15.000Z
sdk/python/pulumi_google_native/gameservices/v1beta/_enums.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
354
2021-04-16T16:48:39.000Z
2022-03-31T17:16:39.000Z
sdk/python/pulumi_google_native/gameservices/v1beta/_enums.py
AaronFriel/pulumi-google-native
75d1cda425e33d4610348972cd70bddf35f1770d
[ "Apache-2.0" ]
8
2021-04-24T17:46:51.000Z
2022-01-05T10:40:21.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** from enum import Enum __all__ = [ 'AuditLogConfigLogType', 'AuthorizationLoggingOptionsPermissionType', 'CloudAuditOptionsLogName', 'ConditionIam', 'ConditionOp', 'ConditionSys', 'DataAccessOptionsLogMode', 'RuleAction', ] class AuditLogConfigLogType(str, Enum): """ The log type that this config enables. """ LOG_TYPE_UNSPECIFIED = "LOG_TYPE_UNSPECIFIED" """ Default case. Should never be this. """ ADMIN_READ = "ADMIN_READ" """ Admin reads. Example: CloudIAM getIamPolicy """ DATA_WRITE = "DATA_WRITE" """ Data writes. Example: CloudSQL Users create """ DATA_READ = "DATA_READ" """ Data reads. Example: CloudSQL Users list """ class AuthorizationLoggingOptionsPermissionType(str, Enum): """ The type of the permission that was checked. """ PERMISSION_TYPE_UNSPECIFIED = "PERMISSION_TYPE_UNSPECIFIED" """ Default. Should not be used. """ ADMIN_READ = "ADMIN_READ" """ A read of admin (meta) data. """ ADMIN_WRITE = "ADMIN_WRITE" """ A write of admin (meta) data. """ DATA_READ = "DATA_READ" """ A read of standard data. """ DATA_WRITE = "DATA_WRITE" """ A write of standard data. """ class CloudAuditOptionsLogName(str, Enum): """ The log_name to populate in the Cloud Audit Record. """ UNSPECIFIED_LOG_NAME = "UNSPECIFIED_LOG_NAME" """ Default. Should not be used. """ ADMIN_ACTIVITY = "ADMIN_ACTIVITY" """ Corresponds to "cloudaudit.googleapis.com/activity" """ DATA_ACCESS = "DATA_ACCESS" """ Corresponds to "cloudaudit.googleapis.com/data_access" """ class ConditionIam(str, Enum): """ Trusted attributes supplied by the IAM system. """ NO_ATTR = "NO_ATTR" """ Default non-attribute. """ AUTHORITY = "AUTHORITY" """ Either principal or (if present) authority selector. """ ATTRIBUTION = "ATTRIBUTION" """ The principal (even if an authority selector is present), which must only be used for attribution, not authorization. """ SECURITY_REALM = "SECURITY_REALM" """ Any of the security realms in the IAMContext (go/security-realms). When used with IN, the condition indicates "any of the request's realms match one of the given values; with NOT_IN, "none of the realms match any of the given values". Note that a value can be: - 'self' (i.e., allow connections from clients that are in the same security realm, which is currently but not guaranteed to be campus-sized) - 'self:metro' (i.e., clients that are in the same metro) - 'self:cloud-region' (i.e., allow connections from clients that are in the same cloud region) - 'self:prod-region' (i.e., allow connections from clients that are in the same prod region) - 'guardians' (i.e., allow connections from its guardian realms. See go/security-realms-glossary#guardian for more information.) - a realm (e.g., 'campus-abc') - a realm group (e.g., 'realms-for-borg-cell-xx', see: go/realm-groups) A match is determined by a realm group membership check performed by a RealmAclRep object (go/realm-acl-howto). It is not permitted to grant access based on the *absence* of a realm, so realm conditions can only be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). """ APPROVER = "APPROVER" """ An approver (distinct from the requester) that has authorized this request. When used with IN, the condition indicates that one of the approvers associated with the request matches the specified principal, or is a member of the specified group. Approvers can only grant additional access, and are thus only used in a strictly positive context (e.g. ALLOW/IN or DENY/NOT_IN). """ JUSTIFICATION_TYPE = "JUSTIFICATION_TYPE" """ What types of justifications have been supplied with this request. String values should match enum names from security.credentials.JustificationType, e.g. "MANUAL_STRING". It is not permitted to grant access based on the *absence* of a justification, so justification conditions can only be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). Multiple justifications, e.g., a Buganizer ID and a manually-entered reason, are normal and supported. """ CREDENTIALS_TYPE = "CREDENTIALS_TYPE" """ What type of credentials have been supplied with this request. String values should match enum names from security_loas_l2.CredentialsType - currently, only CREDS_TYPE_EMERGENCY is supported. It is not permitted to grant access based on the *absence* of a credentials type, so the conditions can only be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). """ CREDS_ASSERTION = "CREDS_ASSERTION" """ EXPERIMENTAL -- DO NOT USE. The conditions can only be used in a "positive" context (e.g., ALLOW/IN or DENY/NOT_IN). """ class ConditionOp(str, Enum): """ An operator to apply the subject with. """ NO_OP = "NO_OP" """ Default no-op. """ EQUALS = "EQUALS" """ DEPRECATED. Use IN instead. """ NOT_EQUALS = "NOT_EQUALS" """ DEPRECATED. Use NOT_IN instead. """ IN_ = "IN" """ The condition is true if the subject (or any element of it if it is a set) matches any of the supplied values. """ NOT_IN = "NOT_IN" """ The condition is true if the subject (or every element of it if it is a set) matches none of the supplied values. """ DISCHARGED = "DISCHARGED" """ Subject is discharged """ class ConditionSys(str, Enum): """ Trusted attributes supplied by any service that owns resources and uses the IAM system for access control. """ NO_ATTR = "NO_ATTR" """ Default non-attribute type """ REGION = "REGION" """ Region of the resource """ SERVICE = "SERVICE" """ Service name """ NAME = "NAME" """ Resource name """ IP = "IP" """ IP address of the caller """ class DataAccessOptionsLogMode(str, Enum): LOG_MODE_UNSPECIFIED = "LOG_MODE_UNSPECIFIED" """ Client is not required to write a partial Gin log immediately after the authorization check. If client chooses to write one and it fails, client may either fail open (allow the operation to continue) or fail closed (handle as a DENY outcome). """ LOG_FAIL_CLOSED = "LOG_FAIL_CLOSED" """ The application's operation in the context of which this authorization check is being made may only be performed if it is successfully logged to Gin. For instance, the authorization library may satisfy this obligation by emitting a partial log entry at authorization check time and only returning ALLOW to the application if it succeeds. If a matching Rule has this directive, but the client has not indicated that it will honor such requirements, then the IAM check will result in authorization failure by setting CheckPolicyResponse.success=false. """ class RuleAction(str, Enum): """ Required """ NO_ACTION = "NO_ACTION" """ Default no action. """ ALLOW = "ALLOW" """ Matching 'Entries' grant access. """ ALLOW_WITH_LOG = "ALLOW_WITH_LOG" """ Matching 'Entries' grant access and the caller promises to log the request per the returned log_configs. """ DENY = "DENY" """ Matching 'Entries' deny access. """ DENY_WITH_LOG = "DENY_WITH_LOG" """ Matching 'Entries' deny access and the caller promises to log the request per the returned log_configs. """ LOG = "LOG" """ Matching 'Entries' tell IAM.Check callers to generate logs. """
36.178899
1,161
0.675542
1,058
7,887
4.953686
0.278828
0.011448
0.00954
0.016218
0.258348
0.240412
0.212746
0.18756
0.18756
0.1639
0
0.000329
0.229365
7,887
217
1,162
36.345622
0.861961
0.063395
0
0.137931
1
0
0.278494
0.067889
0
0
0
0
0.017241
1
0
false
0
0.017241
0
0.827586
0
0
0
0
null
0
0
0
0
0
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
1
0
0
3
c4129053a80abde7481cb9fba23ac85912dec2b1
309
py
Python
torchexpo/vision/image_classification/mobilenet.py
torchexpo/torchexpo
88c875358e830065ee23f49f47d4995b5b2d3e3c
[ "Apache-2.0" ]
23
2020-09-08T05:08:46.000Z
2021-08-12T07:16:53.000Z
torchexpo/vision/image_classification/mobilenet.py
torchexpo/torchexpo
88c875358e830065ee23f49f47d4995b5b2d3e3c
[ "Apache-2.0" ]
1
2021-12-05T06:15:18.000Z
2021-12-20T08:10:19.000Z
torchexpo/vision/image_classification/mobilenet.py
torchexpo/torchexpo
88c875358e830065ee23f49f47d4995b5b2d3e3c
[ "Apache-2.0" ]
2
2021-01-12T06:10:53.000Z
2021-07-24T08:21:59.000Z
import torchvision from torchexpo.modules import ImageClassificationModule def mobilenet_v2(): """MobileNet V2 Model pre-trained on ImageNet""" model = torchvision.models.mobilenet_v2(pretrained=True) obj = ImageClassificationModule(model, "MobileNet_V2", model_example="default") return obj
34.333333
83
0.779935
34
309
6.970588
0.617647
0.185654
0.135021
0
0
0
0
0
0
0
0
0.014925
0.132686
309
9
84
34.333333
0.869403
0.135922
0
0
0
0
0.072519
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0
0.666667
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
0
0
1
0
1
0
0
3
c415fedca21244cf6cebda4e0d2ca5c8c9090c23
972
py
Python
line_detection_module/yolov5/detect.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
1
2021-06-30T11:01:25.000Z
2021-06-30T11:01:25.000Z
line_detection_module/yolov5/detect.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
null
null
null
line_detection_module/yolov5/detect.py
nhatnxn/ID_Passport-OCR
78322ec2b9648d0b027326dced7c4aec967bcab3
[ "MIT" ]
null
null
null
from logging import info import cv2 import numpy as np import matplotlib.pyplot as plt from .TabDetectDewarp import detect_bbox, get_dewarped_table def detect_line(im): ''' Args: im (np.array): input image Returns: dict: { 'address_line_1': [left,top,right,bottom] 'address_line_2': [left,top,right,bottom] 'birthday': [left,top,right,bottom] 'hometown_line_1': [left,top,right,bottom] 'hometown_line_2': [left,top,right,bottom] 'id': [left,top,right,bottom] 'name': [left,top,right,bottom] 'nation': [left,top,right,bottom] 'sex': [left,top,right,bottom] } ''' info = detect_bbox(im) return info if __name__ == '__main__': im = cv2.imread('') info = detect_line(im) print(info)
28.588235
60
0.515432
106
972
4.518868
0.415094
0.131524
0.22547
0.338205
0.263048
0.263048
0
0
0
0
0
0.009788
0.369342
972
34
61
28.588235
0.771615
0.598765
0
0
0
0
0.025478
0
0
0
0
0
0
1
0.083333
false
0
0.416667
0
0.583333
0.083333
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
c4360c62c954e247b0ebe79264b91822ee2b1644
240
py
Python
bills_service/bills_service/routes/users.py
reubinoff/bills
36163ff643046cbdf78ed572dd110e045a4b6d08
[ "MIT" ]
null
null
null
bills_service/bills_service/routes/users.py
reubinoff/bills
36163ff643046cbdf78ed572dd110e045a4b6d08
[ "MIT" ]
null
null
null
bills_service/bills_service/routes/users.py
reubinoff/bills
36163ff643046cbdf78ed572dd110e045a4b6d08
[ "MIT" ]
null
null
null
from flask_restful import Resource from .. import api class Users(Resource): def get(self): return {"moshe": "reubinoff"} api.add_resource(Users, '/users') # https://flask-restful.readthedocs.io/en/latest/quickstart.html
16
64
0.704167
31
240
5.387097
0.709677
0.143713
0
0
0
0
0
0
0
0
0
0
0.158333
240
14
65
17.142857
0.826733
0.258333
0
0
0
0
0.113636
0
0
0
0
0
0
1
0.166667
false
0
0.333333
0.166667
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
1
1
0
0
3
c44c1c1f313a2355d8079631433f524bc14e1924
881
py
Python
beziercurve.py
GSORF/VisualOdometry2Bezier
3805922f06472c5ed84502ac3eaa92da74ed3922
[ "Apache-2.0" ]
1
2021-09-09T07:48:11.000Z
2021-09-09T07:48:11.000Z
beziercurve.py
GSORF/VisualOdometry2Bezier
3805922f06472c5ed84502ac3eaa92da74ed3922
[ "Apache-2.0" ]
null
null
null
beziercurve.py
GSORF/VisualOdometry2Bezier
3805922f06472c5ed84502ac3eaa92da74ed3922
[ "Apache-2.0" ]
null
null
null
""" Author: Johannes Hauck Source: Content: File includes calculation of values on cubic Bézier curve. """ import numpy as np # calculates one point on a cubic Bézier curve # input: - uVal (float): parameter of value u # - b (list) = [b0, b1, ..., bn] control and Bézier points as list # output: - point on the curve (list) def getBezierValue(uVal, b): return b[0]*((1-uVal)**3) + b[1]*3*uVal*((1-uVal)**2) + b[2]*3*(uVal**2)*(1-uVal) + b[3]*(uVal**3) # calculates N discrete values on a cubic Bézier curve # input: - b (list) = [b0, b1, ..., bn] control and Bézier points as list # - N (int): number of points on the curve # output: - points on the curve (list) def getBezierValues(b, N): uValues = np.linspace(0, 1, N) bezValues = [] for i in uValues: bezValues.append(getBezierValue(i, b)) return bezValues
30.37931
102
0.620885
135
881
4.051852
0.422222
0.060329
0.087751
0.051188
0.292505
0.230347
0.142596
0.142596
0.142596
0.142596
0
0.028148
0.233825
881
28
103
31.464286
0.782222
0.600454
0
0
0
0
0
0
0
0
0
0
0
1
0.222222
false
0
0.111111
0.111111
0.555556
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
c44fb2d809e3e628869303f96d5d8be3a558bd8d
91
py
Python
src/pytest_recording/exceptions.py
kiwicom/pytest-recording
53f42b22f8ca5de00a534e95ea51b9fdcf4a84ef
[ "MIT" ]
186
2019-07-18T07:29:02.000Z
2022-03-29T02:13:08.000Z
src/pytest_recording/exceptions.py
sthagen/pytest-recording
d1bcc104bf45fa559ef039dbb2fd00e8cc24b05d
[ "MIT" ]
69
2019-07-18T14:52:44.000Z
2021-11-25T17:07:36.000Z
src/pytest_recording/exceptions.py
sthagen/pytest-recording
d1bcc104bf45fa559ef039dbb2fd00e8cc24b05d
[ "MIT" ]
11
2019-08-19T07:28:08.000Z
2022-01-10T18:21:10.000Z
class UsageError(Exception): """Error in plugin usage.""" __module__ = "builtins"
18.2
32
0.659341
9
91
6.222222
1
0
0
0
0
0
0
0
0
0
0
0
0.197802
91
4
33
22.75
0.767123
0.241758
0
0
0
0
0.126984
0
0
0
0
0
0
1
0
false
0
0
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
67021583e1eddf84a503066a918be1e9c93a16c6
3,217
py
Python
tests/test_parser.py
jrdzha/lux
4c54e24005c4f849ae647a9e0a761273eca57bac
[ "Apache-2.0" ]
null
null
null
tests/test_parser.py
jrdzha/lux
4c54e24005c4f849ae647a9e0a761273eca57bac
[ "Apache-2.0" ]
null
null
null
tests/test_parser.py
jrdzha/lux
4c54e24005c4f849ae647a9e0a761273eca57bac
[ "Apache-2.0" ]
null
null
null
# Copyright 2019-2020 The Lux Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import pandas as pd import lux def test_case1(): ldf = pd.read_csv("lux/data/car.csv") ldf.set_intent(["Horsepower"]) assert type(ldf._intent[0]) is lux.Clause assert ldf._intent[0].attribute == "Horsepower" def test_case2(): ldf = pd.read_csv("lux/data/car.csv") ldf.set_intent(["Horsepower", lux.Clause("MilesPerGal", channel="x")]) assert type(ldf._intent[0]) is lux.Clause assert ldf._intent[0].attribute == "Horsepower" assert type(ldf._intent[1]) is lux.Clause assert ldf._intent[1].attribute == "MilesPerGal" def test_case3(): ldf = pd.read_csv("lux/data/car.csv") ldf.set_intent(["Horsepower", "Origin=USA"]) assert type(ldf._intent[0]) is lux.Clause assert ldf._intent[0].attribute == "Horsepower" assert type(ldf._intent[1]) is lux.Clause assert ldf._intent[1].attribute == "Origin" assert ldf._intent[1].value == "USA" def test_case4(): ldf = pd.read_csv("lux/data/car.csv") ldf.set_intent(["Horsepower", "Origin=USA|Japan"]) assert type(ldf._intent[0]) is lux.Clause assert ldf._intent[0].attribute == "Horsepower" assert type(ldf._intent[1]) is lux.Clause assert ldf._intent[1].attribute == "Origin" assert ldf._intent[1].value == ["USA", "Japan"] def test_case5(): ldf = pd.read_csv("lux/data/car.csv") ldf.set_intent([["Horsepower", "MilesPerGal", "Weight"], "Origin=USA"]) assert type(ldf._intent[0]) is lux.Clause assert ldf._intent[0].attribute == ["Horsepower", "MilesPerGal", "Weight"] assert type(ldf._intent[1]) is lux.Clause assert ldf._intent[1].attribute == "Origin" assert ldf._intent[1].value == "USA" ldf.set_intent(["Horsepower|MilesPerGal|Weight", "Origin=USA"]) assert type(ldf._intent[0]) is lux.Clause assert ldf._intent[0].attribute == ["Horsepower", "MilesPerGal", "Weight"] assert type(ldf._intent[1]) is lux.Clause assert ldf._intent[1].attribute == "Origin" assert ldf._intent[1].value == "USA" def test_case6(): ldf = pd.read_csv("lux/data/car.csv") ldf.set_intent(["Horsepower", "Origin=?"]) ldf._repr_html_() assert type(ldf._intent[0]) is lux.Clause assert ldf._intent[0].attribute == "Horsepower" assert type(ldf._intent[1]) is lux.Clause assert ldf._intent[1].attribute == "Origin" assert ldf._intent[1].value == ["USA", "Japan", "Europe"] # TODO: Need to support this case """ lux.set_intent(["Horsepower","MPG","Acceleration"],"Origin") lux.set_intent("Horsepower/MPG/Acceleration", "Origin") --> [Clause(attr= ["Horsepower","MPG","Acceleration"], type= "attributeGroup")] """
36.146067
81
0.682313
460
3,217
4.652174
0.232609
0.130374
0.126168
0.115421
0.68785
0.68785
0.68785
0.647664
0.647664
0.647664
0
0.018101
0.158533
3,217
88
82
36.556818
0.772442
0.186198
0
0.641509
0
0
0.185386
0.012109
0
0
0
0.011364
0.584906
1
0.113208
false
0
0.037736
0
0.150943
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
1
0
0
0
0
0
0
0
0
0
3
6706ca4a705ea282aeed2b83f21f41f1c379ec82
1,283
py
Python
web/index.py
supersky07/lego
d98ca1a72458006e7649818146947a9a544cd09a
[ "MIT" ]
null
null
null
web/index.py
supersky07/lego
d98ca1a72458006e7649818146947a9a544cd09a
[ "MIT" ]
6
2021-03-31T18:47:36.000Z
2022-03-11T23:19:48.000Z
web/index.py
supersky07/lego
d98ca1a72458006e7649818146947a9a544cd09a
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- # Filename: index.py from flask import Flask from flask import render_template from flask import request import sys sys.path.append("./module/") import hopes import channels app = Flask(__name__) @app.route('/') def index_route(): return render_template('index.html') @app.route('/user/<user_id>') def show_user_info(user_id): return render_template('index.html', name=user_id) @app.route('/api/get/hope/<user_id>') def get_hope_by_user_id(user_id): return hopes.get_hopes(user_id) @app.route('/api/add/hope/<user_id>') def add_hope_by_user_id(user_id): hope_name = request.args.get("hope_name") temp_channels = request.args.get("channels").split(',') return hopes.add_hope(user_id, hope_name, temp_channels) @app.route('/api/add/channel/<hope_id>') def add_channel_by_hope_id(hope_id): temp_channel = request.args.get("channel") return channels.add_channel(hope_id, temp_channel) @app.route('/api/get/price') def get_price(): temp_channels = request.args.get("channels").split(',') return channels.get_channels(temp_channels) @app.errorhandler(404) def page_not_found(error): return render_template('page_not_found.html'), 404 # request.method request.args.get('key', '') request.cookies.get('username')
27.297872
76
0.733437
197
1,283
4.507614
0.243655
0.074324
0.078829
0.056306
0.245496
0.141892
0.101351
0.101351
0
0
0
0.00613
0.109899
1,283
47
76
27.297872
0.771454
0.089634
0
0.060606
0
0
0.15794
0.061803
0
0
0
0
0
1
0.212121
false
0
0.181818
0.121212
0.606061
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
6713ee2f01df6b08b16b0f93b8ff13b498258887
157
py
Python
pyredis/__init__.py
Faylixe/pyredis
48a94d5ccc0484afd238ab85b05770a50d9edec4
[ "MIT" ]
1
2020-04-25T20:05:21.000Z
2020-04-25T20:05:21.000Z
pyredis/__init__.py
Faylixe/pyredis
48a94d5ccc0484afd238ab85b05770a50d9edec4
[ "MIT" ]
null
null
null
pyredis/__init__.py
Faylixe/pyredis
48a94d5ccc0484afd238ab85b05770a50d9edec4
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf8 """ Pythonic Redis backed data structure """ __version__ = '1.0.0' __authors__ = 'Felix Voituret <felix@voituret.fr>'
19.625
50
0.700637
21
157
4.857143
0.857143
0.254902
0
0
0
0
0
0
0
0
0
0.02963
0.140127
157
7
51
22.428571
0.725926
0.452229
0
0
0
0
0.5
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
67233e2c142af3f3fed1777e09c19d5f9132041e
947
py
Python
examples/pytorch/fx/object_detection/maskrcnn/pytorch/maskrcnn_benchmark/utils/collect_env.py
intelkevinputnam/lpot-docs
1ff32b4d89074a6bd133ba531f7c0cea3b73152f
[ "Apache-2.0" ]
567
2018-09-13T05:07:49.000Z
2020-11-23T11:52:11.000Z
examples/pytorch/fx/object_detection/maskrcnn/pytorch/maskrcnn_benchmark/utils/collect_env.py
intelkevinputnam/lpot-docs
1ff32b4d89074a6bd133ba531f7c0cea3b73152f
[ "Apache-2.0" ]
222
2018-09-14T10:15:39.000Z
2020-11-20T22:21:09.000Z
examples/pytorch/fx/object_detection/maskrcnn/pytorch/maskrcnn_benchmark/utils/collect_env.py
intelkevinputnam/lpot-docs
1ff32b4d89074a6bd133ba531f7c0cea3b73152f
[ "Apache-2.0" ]
279
2018-09-16T12:40:29.000Z
2020-11-17T14:22:52.000Z
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import PIL from torch.utils.collect_env import get_pretty_env_info def get_pil_version(): return "\n Pillow ({})".format(PIL.__version__) def collect_env_info(): env_str = get_pretty_env_info() env_str += get_pil_version() return env_str
33.821429
74
0.747624
144
947
4.777778
0.604167
0.087209
0.049419
0.046512
0.046512
0
0
0
0
0
0
0.010217
0.173178
947
27
75
35.074074
0.868455
0.68849
0
0
0
0
0.075
0
0
0
0
0
0
1
0.25
false
0
0.25
0.125
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
672e95feacf8c87abf651ee37b07ff9c9091c2f0
583
py
Python
src/manager.py
jcasmer/grow_control_backend-
6a18a137e0a16138607413925727d7e5f8486777
[ "BSD-3-Clause" ]
1
2019-05-11T14:45:47.000Z
2019-05-11T14:45:47.000Z
src/manager.py
jcasmer/grow_control_backend-
6a18a137e0a16138607413925727d7e5f8486777
[ "BSD-3-Clause" ]
6
2021-03-18T20:45:02.000Z
2021-09-22T17:41:38.000Z
src/manager.py
jcasmer/grow_control_backend-
6a18a137e0a16138607413925727d7e5f8486777
[ "BSD-3-Clause" ]
null
null
null
''' Clases base para ORM. ''' from django.db import models class CustomManager(models.Manager): ''' Manager para los query a ejecutar. Todos los modelos del framework usaran este manager para hacer los query a la base de datos, este ajustará automáticamente los query simples con el valor deleted=False para evitar traer elementos eliminados. ''' def get_queryset(self): ''' Retorna los query con filtro deleted=False en cada query ejecutado. ''' return super().get_queryset().filter(deleted=False)
27.761905
79
0.667238
74
583
5.22973
0.675676
0.082687
0.046512
0
0
0
0
0
0
0
0
0
0.26072
583
21
80
27.761905
0.897912
0.569468
0
0
0
0
0
0
0
0
0
0.047619
0
1
0.25
false
0
0.25
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
1
0
0
1
0
0
0
0
1
0
0
3
673077d7a65355f96ff34085912b0eb47a27b1cb
26
py
Python
doc/conf.py
helkebir/ccnc
90f591caf6c41bce0de75772960190b5825f7927
[ "MIT" ]
null
null
null
doc/conf.py
helkebir/ccnc
90f591caf6c41bce0de75772960190b5825f7927
[ "MIT" ]
null
null
null
doc/conf.py
helkebir/ccnc
90f591caf6c41bce0de75772960190b5825f7927
[ "MIT" ]
null
null
null
DOXYFILE = 'Doxyfile-mcss'
26
26
0.769231
3
26
6.666667
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.076923
26
1
26
26
0.833333
0
0
0
0
0
0.481481
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
673ecf783e09b8b671fd7b5fd258693ba3744320
180
py
Python
Resources/Swapping.py
minefarmer/Think_like_a_programmer
d6b1363f96600445ea47f91c637c5d0bede2e8f6
[ "Unlicense" ]
null
null
null
Resources/Swapping.py
minefarmer/Think_like_a_programmer
d6b1363f96600445ea47f91c637c5d0bede2e8f6
[ "Unlicense" ]
null
null
null
Resources/Swapping.py
minefarmer/Think_like_a_programmer
d6b1363f96600445ea47f91c637c5d0bede2e8f6
[ "Unlicense" ]
null
null
null
A = int(input('Enter the value of A: ')) B = int(input('Enter the value of B: ')) #A = int(A) #B = int(B) C = A A = B B = C print('Value of A', A, 'Value of B', B)
13.846154
41
0.494444
37
180
2.405405
0.27027
0.314607
0.292135
0.359551
0.516854
0.516854
0
0
0
0
0
0
0.305556
180
12
42
15
0.712
0.111111
0
0
0
0
0.438356
0
0
0
0
0
0
1
0
false
0
0
0
0
0.166667
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
673febb6dae002cf470568791c9d76d793848945
874
py
Python
test/test_pyiter.py
ssameerr/pytubes
6b4a839b7503780930b667cf12053089bc66c027
[ "MIT" ]
166
2018-03-05T14:43:26.000Z
2022-01-01T17:59:37.000Z
test/test_pyiter.py
ssameerr/pytubes
6b4a839b7503780930b667cf12053089bc66c027
[ "MIT" ]
14
2018-02-27T10:23:33.000Z
2020-02-04T14:36:16.000Z
test/test_pyiter.py
ssameerr/pytubes
6b4a839b7503780930b667cf12053089bc66c027
[ "MIT" ]
15
2018-03-06T05:00:30.000Z
2021-12-04T19:43:12.000Z
import itertools import pytest import tubes def test_static_tube_takes_a_list(): tube = tubes.Each([1, 2, 3]) assert list(tube) == [1, 2, 3] def test_static_tube_takes_an_iter(): tube = tubes.Each(itertools.count(10)).first(3) assert list(tube) == [10, 11, 12] def test_static_tube_with_strings(): tube = tubes.Each(['a', 'b', 'c']) assert list(tube) == ['a', 'b', 'c'] def test_static_tube_with_strings(): tube = tubes.Each(['a', 'b', 'c']) assert list(tube.to(str)) == ['a', 'b', 'c'] assert list(tube.to(bytes)) == [b'a', b'b', b'c'] def test_static_tube_with_encoding(): tube = tubes.Each(['£', '😃', '']) assert list(tube.to(str)) == ['£', '😃', ''] assert list(tube.to(bytes)) == [b'\xc2\xa3', b'\xf0\x9f\x98\x83', b''] with pytest.raises(UnicodeEncodeError): list(tube.to(bytes, codec='ascii'))
23.621622
74
0.593822
137
874
3.656934
0.313869
0.143713
0.195609
0.169661
0.518962
0.419162
0.323353
0.231537
0.231537
0.231537
0
0.032168
0.181922
874
36
75
24.277778
0.662937
0
0
0.181818
0
0
0.055046
0
0
0
0
0
0.318182
1
0.227273
false
0
0.136364
0
0.363636
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
3
676611322f0ee0ca1cedf3dcf5501d15a70b05f9
2,141
py
Python
guest/managers.py
n-serrette/wedding-website
9086edee97b8c99beb2da7f833663ef15520b46a
[ "MIT" ]
null
null
null
guest/managers.py
n-serrette/wedding-website
9086edee97b8c99beb2da7f833663ef15520b46a
[ "MIT" ]
null
null
null
guest/managers.py
n-serrette/wedding-website
9086edee97b8c99beb2da7f833663ef15520b46a
[ "MIT" ]
null
null
null
from django.db import models from django.db.models import Q from django.core.exceptions import ObjectDoesNotExist import guest.models as mod class GetOrNoneManager(models.Manager): def get_or_none(self, **kwargs): try: return self.get(**kwargs) except ObjectDoesNotExist: return None class PartyQuerySet(models.QuerySet): def opened(self): return self.exclude(invitation_opened=None) def unopened(self): return self.filter(invitation_opened=None) def answered(self): return self.exclude(response_received=None).order_by('response_received') def unanswered(self): return self.filter(response_received=None) def attending_dinner(self): attending = {x.party.pk for x in mod.Guest.objects.attending_dinner()} return self.filter(pk__in=attending).order_by('response_received') def attending_cocktail(self): attending = {x.party.pk for x in mod.Guest.objects.attending_cocktail()} return self.filter(pk__in=attending).order_by('response_received') def attending_brunch(self): attending = {x.party.pk for x in mod.Guest.objects.attending_brunch()} return self.filter(pk__in=attending).order_by('response_received') class GuestQuerySet(models.QuerySet): def attending_dinner(self): return self.filter(attending_dinner=True) def attending_cocktail(self): return self.filter(attending_cocktail=True) def attending_brunch(self): return self.filter(attending_brunch=True) def child(self): return self.filter(is_child=True) def attending(self): return self.filter( Q(attending_cocktail=True) | Q(attending_brunch=True) | Q(attending_dinner=True)) def not_attending(self): return self.filter( Q(attending_cocktail=False) & Q(attending_brunch=False) & Q(attending_dinner=False)).exclude(party__response_received=None) PartyManager = GetOrNoneManager.from_queryset(PartyQuerySet) GuestManager = GetOrNoneManager.from_queryset(GuestQuerySet)
30.585714
81
0.700607
258
2,141
5.639535
0.213178
0.09622
0.120962
0.109966
0.371134
0.293471
0.293471
0.293471
0.228866
0.228866
0
0
0.20411
2,141
69
82
31.028986
0.853873
0
0
0.22449
0
0
0.031761
0
0
0
0
0
0
1
0.285714
false
0
0.081633
0.204082
0.734694
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
6792f694e4b908e7fea8afb1cd9fef9c4fd13b86
7,635
py
Python
alembic/versions/46a3d679666e_initial_database.py
morelab/labmanager
b44f97f26f224e4a94c7981e5cc84f3b5c8cc440
[ "BSD-2-Clause" ]
2
2015-11-05T01:43:19.000Z
2017-10-19T15:28:53.000Z
alembic/versions/46a3d679666e_initial_database.py
morelab/labmanager
b44f97f26f224e4a94c7981e5cc84f3b5c8cc440
[ "BSD-2-Clause" ]
3
2021-03-22T17:12:12.000Z
2021-12-13T19:39:20.000Z
alembic/versions/46a3d679666e_initial_database.py
morelab/labmanager
b44f97f26f224e4a94c7981e5cc84f3b5c8cc440
[ "BSD-2-Clause" ]
6
2016-03-08T09:32:16.000Z
2022-01-06T09:53:37.000Z
"""Initial database Revision ID: 46a3d679666e Revises: None Create Date: 2013-10-08 01:34:51.501561 """ # revision identifiers, used by Alembic. revision = '46a3d679666e' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('rlmss', sa.Column('id', sa.Integer(), nullable=False), sa.Column('kind', sa.Unicode(length=50), nullable=False), sa.Column('location', sa.Unicode(length=50), nullable=False), sa.Column('url', sa.Unicode(length=300), nullable=False), sa.Column('version', sa.Unicode(length=50), nullable=False), sa.Column('configuration', sa.Unicode(length=10240), nullable=True), sa.PrimaryKeyConstraint('id') ) op.create_table('learning_tools', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.Unicode(length=50), nullable=False), sa.Column('full_name', sa.Unicode(length=50), nullable=False), sa.Column('url', sa.Unicode(length=300), nullable=False), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('full_name'), sa.UniqueConstraint('name') ) op.create_table('labmanager_users', sa.Column('id', sa.Integer(), nullable=False), sa.Column('login', sa.Unicode(length=50), nullable=True), sa.Column('name', sa.Unicode(length=50), nullable=False), sa.Column('password', sa.Unicode(length=50), nullable=False), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('login') ) op.create_table('lt_users', sa.Column('id', sa.Integer(), nullable=False), sa.Column('login', sa.Unicode(length=50), nullable=False), sa.Column('full_name', sa.Unicode(length=50), nullable=False), sa.Column('password', sa.Unicode(length=128), nullable=False), sa.Column('access_level', sa.Unicode(length=50), nullable=False), sa.Column('lt_id', sa.Integer(), nullable=False), sa.ForeignKeyConstraint(['lt_id'], ['learning_tools.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('login','lt_id') ) op.create_table('basic_http_credentials', sa.Column('id', sa.Integer(), nullable=False), sa.Column('lt_id', sa.Integer(), nullable=False), sa.Column('lt_login', sa.Unicode(length=50), nullable=False), sa.Column('lt_password', sa.Unicode(length=50), nullable=False), sa.Column('lt_url', sa.Unicode(length=300), nullable=True), sa.Column('labmanager_login', sa.Unicode(length=50), nullable=True), sa.Column('labmanager_password', sa.Unicode(length=50), nullable=True), sa.ForeignKeyConstraint(['lt_id'], ['learning_tools.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('lt_id'), sa.UniqueConstraint('lt_login') ) op.create_table('laboratories', sa.Column('id', sa.Integer(), nullable=False), sa.Column('name', sa.Unicode(length=50), nullable=False), sa.Column('laboratory_id', sa.Unicode(length=50), nullable=False), sa.Column('rlms_id', sa.Integer(), nullable=False), sa.Column('visibility', sa.Unicode(length=50), nullable=False), sa.Column('available', sa.Boolean(), nullable=False), sa.Column('default_local_identifier', sa.Unicode(length=50), nullable=False), sa.ForeignKeyConstraint(['rlms_id'], ['rlmss.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('laboratory_id','rlms_id') ) op.create_table('courses', sa.Column('id', sa.Integer(), nullable=False), sa.Column('lt_id', sa.Integer(), nullable=False), sa.Column('name', sa.Unicode(length=50), nullable=False), sa.Column('context_id', sa.Unicode(length=50), nullable=False), sa.ForeignKeyConstraint(['lt_id'], ['learning_tools.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('lt_id','context_id') ) op.create_table('shindig_credentials', sa.Column('id', sa.Integer(), nullable=False), sa.Column('lt_id', sa.Integer(), nullable=False), sa.Column('shindig_url', sa.Unicode(length=50), nullable=False), sa.ForeignKeyConstraint(['lt_id'], ['learning_tools.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('lt_id') ) op.create_table('request_permissions_lt', sa.Column('id', sa.Integer(), nullable=False), sa.Column('local_identifier', sa.Unicode(length=100), nullable=False), sa.Column('laboratory_id', sa.Integer(), nullable=False), sa.Column('lt_id', sa.Integer(), nullable=False), sa.Column('configuration', sa.Unicode(length=10240), nullable=True), sa.Column('accessible', sa.Boolean(), nullable=False), sa.ForeignKeyConstraint(['laboratory_id'], ['laboratories.id'], ), sa.ForeignKeyConstraint(['lt_id'], ['learning_tools.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('laboratory_id','lt_id'), sa.UniqueConstraint('local_identifier','lt_id') ) op.create_table('users2courses', sa.Column('course_id', sa.Integer(), nullable=True), sa.Column('lt_user_id', sa.Integer(), nullable=True), sa.ForeignKeyConstraint(['course_id'], ['courses.id'], ), sa.ForeignKeyConstraint(['lt_user_id'], ['lt_users.id'], ), sa.PrimaryKeyConstraint() ) op.create_table('permissions2lt', sa.Column('id', sa.Integer(), nullable=False), sa.Column('local_identifier', sa.Unicode(length=100), nullable=False), sa.Column('laboratory_id', sa.Integer(), nullable=False), sa.Column('lt_id', sa.Integer(), nullable=False), sa.Column('configuration', sa.Unicode(length=10240), nullable=True), sa.Column('accessible', sa.Boolean(), nullable=False), sa.ForeignKeyConstraint(['laboratory_id'], ['laboratories.id'], ), sa.ForeignKeyConstraint(['lt_id'], ['learning_tools.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('laboratory_id','lt_id'), sa.UniqueConstraint('local_identifier','lt_id') ) op.create_table('permissions2course', sa.Column('id', sa.Integer(), nullable=False), sa.Column('configuration', sa.Unicode(length=10240), nullable=True), sa.Column('permission_to_lt_id', sa.Integer(), nullable=False), sa.Column('course_id', sa.Integer(), nullable=False), sa.ForeignKeyConstraint(['course_id'], ['courses.id'], ), sa.ForeignKeyConstraint(['permission_to_lt_id'], ['permissions2lt.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('permission_to_lt_id','course_id') ) op.create_table('permissions2ltuser', sa.Column('id', sa.Integer(), nullable=False), sa.Column('permission_to_lt_id', sa.Integer(), nullable=False), sa.Column('lt_user_id', sa.Integer(), nullable=False), sa.Column('key', sa.Unicode(length=100), nullable=False), sa.Column('secret', sa.Unicode(length=100), nullable=False), sa.ForeignKeyConstraint(['lt_user_id'], ['lt_users.id'], ), sa.ForeignKeyConstraint(['permission_to_lt_id'], ['permissions2lt.id'], ), sa.PrimaryKeyConstraint('id'), sa.UniqueConstraint('key'), sa.UniqueConstraint('permission_to_lt_id','lt_user_id') ) ### end Alembic commands ### def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.drop_table('permissions2ltuser') op.drop_table('permissions2course') op.drop_table('permissions2lt') op.drop_table('users2courses') op.drop_table('request_permissions_lt') op.drop_table('shindig_credentials') op.drop_table('courses') op.drop_table('laboratories') op.drop_table('basic_http_credentials') op.drop_table('lt_users') op.drop_table('labmanager_users') op.drop_table('learning_tools') op.drop_table('rlmss') ### end Alembic commands ###
44.389535
81
0.686444
955
7,635
5.347644
0.102618
0.100255
0.158606
0.180928
0.786372
0.766595
0.746035
0.695516
0.592324
0.531623
0
0.020445
0.128749
7,635
171
82
44.649123
0.747294
0.037459
0
0.437909
0
0
0.204483
0.015309
0
0
0
0
0
1
0.013072
false
0.026144
0.013072
0
0.026144
0
0
0
0
null
0
0
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
3
679c1bdd61160013e09977f80a1c4ac3cf70660a
107
py
Python
courtship/__init__.py
regginold/drosophila-courtship
a40249ee538a73f66b25d55c47e06f8505ba10f2
[ "MIT" ]
4
2019-05-01T19:14:45.000Z
2020-04-23T04:31:21.000Z
courtship/__init__.py
benshahary/drosophila-courtship
a40249ee538a73f66b25d55c47e06f8505ba10f2
[ "MIT" ]
null
null
null
courtship/__init__.py
benshahary/drosophila-courtship
a40249ee538a73f66b25d55c47e06f8505ba10f2
[ "MIT" ]
1
2020-02-26T17:14:03.000Z
2020-02-26T17:14:03.000Z
#__init__.py import numpy as np np.set_printoptions(threshold=10, precision=3) __version__ = '0.1.0'
17.833333
47
0.728972
17
107
4.058824
0.882353
0
0
0
0
0
0
0
0
0
0
0.065934
0.149533
107
6
48
17.833333
0.692308
0.102804
0
0
0
0
0.054945
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
67b6962f1f5642459d7723c9a8cd0395c1038d8b
692
py
Python
contentService/content/urls.py
rakshit-singh/PythonMicroservices
65e42c8c9767b8c8068563931be286033bd1c1e2
[ "Apache-2.0" ]
null
null
null
contentService/content/urls.py
rakshit-singh/PythonMicroservices
65e42c8c9767b8c8068563931be286033bd1c1e2
[ "Apache-2.0" ]
null
null
null
contentService/content/urls.py
rakshit-singh/PythonMicroservices
65e42c8c9767b8c8068563931be286033bd1c1e2
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from django.urls import path from content.views import contentServiceViewSet urlpatterns = [ path('content', contentServiceViewSet.as_view({ 'get':'list', 'post':'create' })), path( 'contentfile', contentServiceViewSet.as_view({ 'post':'fileupload' })), path('content/popular', contentServiceViewSet.as_view({ 'get':'getPopularContent' })), path('content/latest', contentServiceViewSet.as_view({ 'get':'getLatestContent' })), path('content/<str:pk>', contentServiceViewSet.as_view({ 'get':'retrieve', 'put':'update', 'delete':'deleteContent' })) ]
25.62963
60
0.624277
61
692
7
0.491803
0.269321
0.316159
0.28103
0
0
0
0
0
0
0
0
0.218208
692
26
61
26.615385
0.789279
0
0
0.173913
0
0
0.248555
0
0
0
0
0
0
1
0
false
0
0.130435
0
0.130435
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
67bf2b7b0e3a5a8f9a4a5e25eecfcb79eac7d1de
27
py
Python
core/sodasql/__version__.py
lucas-houles/soda-sql
c2862ba8f5fe9a2336848eb270b224b934f526f8
[ "Apache-2.0" ]
null
null
null
core/sodasql/__version__.py
lucas-houles/soda-sql
c2862ba8f5fe9a2336848eb270b224b934f526f8
[ "Apache-2.0" ]
null
null
null
core/sodasql/__version__.py
lucas-houles/soda-sql
c2862ba8f5fe9a2336848eb270b224b934f526f8
[ "Apache-2.0" ]
null
null
null
SODA_SQL_VERSION = '2.1.2'
13.5
26
0.703704
6
27
2.833333
0.833333
0
0
0
0
0
0
0
0
0
0
0.125
0.111111
27
1
27
27
0.583333
0
0
0
0
0
0.185185
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
67dc969ebc6378557985c191d26d2fdfb94e8a51
140
py
Python
Tareas/tarea5/quiz1menu.py
eliecer11/Uip-prog3
39117b230d83945f5fd3ec8450d1d954437b0ccd
[ "MIT" ]
null
null
null
Tareas/tarea5/quiz1menu.py
eliecer11/Uip-prog3
39117b230d83945f5fd3ec8450d1d954437b0ccd
[ "MIT" ]
null
null
null
Tareas/tarea5/quiz1menu.py
eliecer11/Uip-prog3
39117b230d83945f5fd3ec8450d1d954437b0ccd
[ "MIT" ]
null
null
null
def inicio(): print ("--PRINCIPAL--") print("1. AGREGAR") print("2. ELIMINAR") print("3. VER") opc = input ("------> ") return opc
15.555556
27
0.542857
17
140
4.470588
0.764706
0
0
0
0
0
0
0
0
0
0
0.026316
0.185714
140
8
28
17.5
0.640351
0
0
0
0
0
0.345324
0
0
0
0
0
0
1
0.142857
false
0
0
0
0.285714
0.571429
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
67eb9f22593058cd0f06b1a66e28fd115056504e
1,861
py
Python
samples/fn_functions.py
allancth/python3-with-linux
11411296d3d6abf876f6fe290a0a3f1a40980354
[ "MIT" ]
null
null
null
samples/fn_functions.py
allancth/python3-with-linux
11411296d3d6abf876f6fe290a0a3f1a40980354
[ "MIT" ]
null
null
null
samples/fn_functions.py
allancth/python3-with-linux
11411296d3d6abf876f6fe290a0a3f1a40980354
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # The MIT License (MIT) # # Copyright (c) 2017 allancth # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. from datetime import datetime def add(a: int, b: int) -> int: return a + b def multiply(a, b): return a * b def subtract(a, b): return b - a def divide(a, b): return a / b def greet(name: str="World") -> str: print("Hello {0}!".format(name)) def fib(n: int=0) -> int: if n == 0: return 0 if n == 1: return 1 return fib(n - 1) + fib(n - 2) result = add(1, 2) print(result) greet("Alice") greet() for i in range(10): print(fib(i)) def get_date(): return datetime.now().day, datetime.now().month, datetime.now().year t = get_date() print(t) print("{0}-{1}-{2}".format(t[2], t[1], t[0])) d, m, y = get_date() print("{0}-{1}-{2}".format(y, m, d))
26.971014
80
0.683503
303
1,861
4.188119
0.455446
0.069346
0.018913
0.026005
0.042553
0.020489
0
0
0
0
0
0.01752
0.202579
1,861
68
81
27.367647
0.837601
0.592692
0
0
0
0
0.057143
0
0
0
0
0
0
1
0.233333
false
0
0.033333
0.166667
0.533333
0.2
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
67fdd94040186b4318d1b0d3f910b53d83a244eb
301
py
Python
week-9/pSet-9/finance/forms/sell.py
AH-SALAH/CS50X
1753b0c403968a574821131fa33afc5c86699c86
[ "Xnet", "X11" ]
null
null
null
week-9/pSet-9/finance/forms/sell.py
AH-SALAH/CS50X
1753b0c403968a574821131fa33afc5c86699c86
[ "Xnet", "X11" ]
null
null
null
week-9/pSet-9/finance/forms/sell.py
AH-SALAH/CS50X
1753b0c403968a574821131fa33afc5c86699c86
[ "Xnet", "X11" ]
null
null
null
from flask_wtf import FlaskForm from wtforms import IntegerField, SelectField from wtforms.validators import required, number_range class SellForm(FlaskForm): symbol = SelectField('symbol', validators=[required()]) shares = IntegerField('shares', validators=[required(), number_range(min=1)])
43
81
0.784053
34
301
6.852941
0.529412
0.094421
0.16309
0
0
0
0
0
0
0
0
0.003731
0.109635
301
7
81
43
0.865672
0
0
0
0
0
0.039735
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
db00f20883812556cacbace3d6b8b5c081d1ec4c
200
py
Python
Python/Password.py
GoutamVerma/HacktoberFest2021
0d65565738211060a1a5286c20c0d924715808dd
[ "MIT" ]
41
2021-10-03T17:08:49.000Z
2022-03-29T03:06:37.000Z
Python/Password.py
GoutamVerma/HacktoberFest2021
0d65565738211060a1a5286c20c0d924715808dd
[ "MIT" ]
80
2021-10-03T13:57:27.000Z
2021-10-10T04:22:48.000Z
Python/Password.py
GoutamVerma/HacktoberFest2021
0d65565738211060a1a5286c20c0d924715808dd
[ "MIT" ]
159
2021-10-03T13:55:52.000Z
2021-11-06T12:34:25.000Z
import random passlen = int(input("enter the length of password")) s="abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()?" p = "".join(random.sample(s,passlen )) print (p)
20
78
0.73
20
200
7.3
0.8
0
0
0
0
0
0
0
0
0
0
0.061453
0.105
200
9
79
22.222222
0.75419
0
0
0
0
0
0.51
0.37
0
0
0
0
0
1
0
false
0.4
0.2
0
0.2
0.2
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
1
0
0
0
0
0
3
db02b614e957ecd9d42797c54535210c036719dd
862
py
Python
cmake_tidy/commands/command.py
MaciejPatro/cmake-tidy
ddab3d9c6dd1a6c9cfa47bff5a9f120defea9e6a
[ "MIT" ]
16
2020-05-16T17:20:00.000Z
2022-02-14T12:08:41.000Z
cmake_tidy/commands/command.py
MaciejPatro/cmake-tidy
ddab3d9c6dd1a6c9cfa47bff5a9f120defea9e6a
[ "MIT" ]
19
2020-05-18T06:17:42.000Z
2020-08-11T07:15:11.000Z
cmake_tidy/commands/command.py
MaciejPatro/cmake-tidy
ddab3d9c6dd1a6c9cfa47bff5a9f120defea9e6a
[ "MIT" ]
null
null
null
############################################################################### # Copyright Maciej Patro (maciej.patro@gmail.com) # MIT License ############################################################################### import sys from abc import ABC, abstractmethod from cmake_tidy.utils import ExitCodes class Command(ABC): def __init__(self, parser, command_name: str, description: str): self._command_parser = parser.add_parser(name=command_name, help=description) self._command_parser.set_defaults(func=self.execute_command) self._command_name = command_name @abstractmethod def execute_command(self, args) -> int: pass def _handle_error(self, raised_error: Exception) -> int: print(f'cmake-tidy {self._command_name}: {str(raised_error)}', file=sys.stderr) return ExitCodes.FAILURE
33.153846
87
0.590487
91
862
5.32967
0.483516
0.113402
0.057732
0
0
0
0
0
0
0
0
0
0.148492
862
25
88
34.48
0.660763
0.068445
0
0
0
0
0.080997
0.03271
0
0
0
0
0
1
0.214286
false
0.071429
0.214286
0
0.571429
0.071429
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
db187afaa3ab7f28e4daad57fd1912a89c578600
217
py
Python
buoi12/bai5.py
Viet7501/viet1
e0be1da1fb0f4736c8d0457733ccaaed9232c4e9
[ "Apache-2.0" ]
null
null
null
buoi12/bai5.py
Viet7501/viet1
e0be1da1fb0f4736c8d0457733ccaaed9232c4e9
[ "Apache-2.0" ]
null
null
null
buoi12/bai5.py
Viet7501/viet1
e0be1da1fb0f4736c8d0457733ccaaed9232c4e9
[ "Apache-2.0" ]
null
null
null
file1 = "" file2 = "" with open('Hello.txt') as f: file1 = f.read() with open('Hi.txt') as f: file2 = f.read() file1 += "\n" file1 += file2 with open('file3.txt', 'w') as f: f.write(file1)
15.5
34
0.516129
34
217
3.294118
0.411765
0.214286
0.25
0.321429
0
0
0
0
0
0
0
0.057325
0.276498
217
14
35
15.5
0.656051
0
0
0
0
0
0.131707
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
db27efc9504fd9687ea1f9d1ebf7b1afca56bfb8
712
py
Python
demo/ilya_demo/core/summarization.py
YourNorth/rezak-summarizator
3ab2f4bf1044ea9654b4084a39030987e4b8bfe8
[ "MIT" ]
3
2020-03-28T16:48:10.000Z
2020-12-01T17:18:55.000Z
demo/ilya_demo/core/summarization.py
YourNorth/rezak-summarizator
3ab2f4bf1044ea9654b4084a39030987e4b8bfe8
[ "MIT" ]
31
2020-03-20T17:53:08.000Z
2021-03-10T11:48:11.000Z
demo/ilya_demo/core/summarization.py
YourNorth/rezak-summarizator
3ab2f4bf1044ea9654b4084a39030987e4b8bfe8
[ "MIT" ]
1
2020-03-20T05:01:16.000Z
2020-03-20T05:01:16.000Z
""" Список реализаций сокращения текста. Каждая функция позволяет сконфигурировать сокращатели под себя """ # TODO: add impls def summarize_pytldr_lsa(text: str) -> str: from pytldr.summarize.lsa import LsaOzsoy return LsaOzsoy().summarize(text, length=5) def summarize_pytldr_textrank(text: str) -> str: from pytldr.summarize.textrank import TextRankSummarizer return TextRankSummarizer().summarize(text, length=5) def summarize_pytldr_relevance(text: str) -> str: from pytldr.summarize.relevance import RelevanceSummarizer return RelevanceSummarizer().summarize(text, length=5) impls = [ summarize_pytldr_textrank, summarize_pytldr_lsa, summarize_pytldr_relevance ]
25.428571
62
0.771067
81
712
6.62963
0.37037
0.167598
0.100559
0.078212
0.303538
0.303538
0.141527
0
0
0
0
0.004934
0.146067
712
27
63
26.37037
0.878289
0.162921
0
0
0
0
0
0
0
0
0
0.037037
0
1
0.214286
false
0
0.214286
0
0.642857
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
0
1
0
0
3
e1e09814199153aa94647c2246c983b2ba3ea303
581
py
Python
tools/autograd/nested_dict.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
206
2020-11-28T22:56:38.000Z
2022-03-27T02:33:04.000Z
tools/autograd/nested_dict.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
19
2020-12-09T23:13:14.000Z
2022-01-24T23:24:08.000Z
tools/autograd/nested_dict.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
28
2020-11-29T15:25:12.000Z
2022-01-20T02:16:27.000Z
# TODO: refactor nested_dict into common library with ATen class nested_dict(object): """ A nested dict is a dictionary with a parent. If key lookup fails, it recursively continues into the parent. Writes always happen to the top level dict. """ def __init__(self, base, parent): self.base, self.parent = base, parent def __contains__(self, item): return item in self.base or item in self.parent def __getitem__(self, x): r = self.base.get(x) if r is not None: return r return self.parent[x]
29.05
70
0.641997
85
581
4.223529
0.517647
0.089136
0.05571
0
0
0
0
0
0
0
0
0
0.282272
581
19
71
30.578947
0.860911
0.363167
0
0
0
0
0
0
0
0
0
0.052632
0
1
0.3
false
0
0
0.1
0.7
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
0
1
0
0
3
e1e0a6ec8dd221fedd02c1ca376c57efd6ca005c
293
py
Python
Judger/server/initEnv.py
YeGuangjun/eagle-oj-judger
8e75f1adc7856eba221f38fee31ea8f0e0ad1c4f
[ "Apache-2.0" ]
null
null
null
Judger/server/initEnv.py
YeGuangjun/eagle-oj-judger
8e75f1adc7856eba221f38fee31ea8f0e0ad1c4f
[ "Apache-2.0" ]
null
null
null
Judger/server/initEnv.py
YeGuangjun/eagle-oj-judger
8e75f1adc7856eba221f38fee31ea8f0e0ad1c4f
[ "Apache-2.0" ]
null
null
null
from config import sys_config import os #请在sudo命令和python3.5的环境下执行 #将server包以及model包添加到python环境当中 with open('/usr/local/lib/python3.5/dist-packages/JudgePath.pth','w') as file: file.write(sys_config['model']+'\n') file.write(sys_config['server']+'\n') os.mkdir(sys_config['outfile'])
26.636364
78
0.74744
41
293
5.243902
0.682927
0.167442
0.111628
0.167442
0
0
0
0
0
0
0
0.014925
0.085324
293
11
79
26.636364
0.787313
0.180887
0
0
0
0
0.313808
0.217573
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
1
0
1
0
0
0
0
3
e1ed051e331303c0d4bf6985c55a73279879fb58
301
py
Python
Python Fundamentals/List Basics/Exercise/Task04_02.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
1
2022-03-16T10:23:04.000Z
2022-03-16T10:23:04.000Z
Python Fundamentals/List Basics/Exercise/Task04_02.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
Python Fundamentals/List Basics/Exercise/Task04_02.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
beggars_jobs = [int(x) for x in input().split(", ")] count_of_beggars = int(input()) final_list = [] for num in range(count_of_beggars): jobs = 0 for index in range(num, len(beggars_jobs), count_of_beggars): jobs += beggars_jobs[index] final_list.append(jobs) print(final_list)
23.153846
65
0.681063
47
301
4.106383
0.404255
0.284974
0.217617
0.186529
0
0
0
0
0
0
0
0.004065
0.182724
301
12
66
25.083333
0.780488
0
0
0
0
0
0.006645
0
0
0
0
0
0
1
0
false
0
0
0
0
0.111111
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
c00f8f211b489904671fb9194a742d8b99045a4a
2,028
py
Python
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/german/timezone_extractor_config.py
felaray/Recognizers-Text
f514fd61c8d472ed92565261162712409f655312
[ "MIT" ]
null
null
null
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/german/timezone_extractor_config.py
felaray/Recognizers-Text
f514fd61c8d472ed92565261162712409f655312
[ "MIT" ]
6
2021-12-20T17:13:35.000Z
2022-03-29T08:54:11.000Z
Python/libraries/recognizers-date-time/recognizers_date_time/date_time/german/timezone_extractor_config.py
felaray/Recognizers-Text
f514fd61c8d472ed92565261162712409f655312
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from typing import List, Pattern from recognizers_text.matcher.string_matcher import StringMatcher from recognizers_text.utilities import QueryProcessor from ..base_timezone import TimeZoneExtractorConfiguration from ...resources.english_time_zone import TimeZoneDefinitions from ..utilities import TimeZoneUtility, RegExpUtility class GermanTimeZoneExtractorConfiguration(TimeZoneExtractorConfiguration): @property def timezone_matcher(self): return self._timezone_matcher @property def direct_utc_regex(self) -> Pattern: return self._direct_utc_regex @property def abbreviations_list(self) -> List[str]: return self._abbreviations_list @property def full_name_list(self) -> List[str]: return self._full_name_list @property def location_time_suffix_regex(self) -> Pattern: return self._location_time_suffix_regex @property def location_matcher(self) -> StringMatcher: return self._location_matcher @property def ambiguous_timezone_list(self) -> List[str]: return self._ambiguous_timezone_list def __init__(self): super().__init__() self._direct_utc_regex = RegExpUtility.get_safe_reg_exp(TimeZoneDefinitions.DirectUtcRegex) self._abbreviations_list = list(TimeZoneDefinitions.AbbreviationsList) self._full_name_list = list(TimeZoneDefinitions.FullNameList) self._timezone_matcher = TimeZoneUtility.build_matcher_from_lists(self.full_name_list, self.abbreviations_list) self._location_time_suffix_regex = RegExpUtility.get_safe_reg_exp(TimeZoneDefinitions.LocationTimeSuffixRegex) self._location_matcher = StringMatcher() self._ambiguous_timezone_list = list(TimeZoneDefinitions.AmbiguousTimezoneList) self._location_matcher.init(list(map(lambda o: QueryProcessor.remove_diacritics(o.lower()), TimeZoneDefinitions.MajorLocations)))
38.264151
137
0.773176
215
2,028
6.925581
0.325581
0.051713
0.032236
0.030222
0.182673
0.117529
0.067159
0
0
0
0
0
0.157791
2,028
52
138
39
0.87178
0.044379
0
0.184211
0
0
0
0
0
0
0
0
0
1
0.210526
false
0
0.157895
0.184211
0.578947
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
c04e9958fe98bc318b3fb64577fd6b4a4a42ab76
2,829
py
Python
bupt_ncov_report/_test/test_pure_utils.py
llllxq/bupt-ncov-report
8c0d276967a006628bd42c113a3a1787291d3459
[ "MIT" ]
8
2020-09-01T12:45:33.000Z
2020-11-02T01:37:01.000Z
bupt_ncov_report/_test/test_pure_utils.py
nbdyn/bupt-ncov-report
8ed7ccec94f5f3a153470f2075713f26491ec172
[ "MIT" ]
null
null
null
bupt_ncov_report/_test/test_pure_utils.py
nbdyn/bupt-ncov-report
8ed7ccec94f5f3a153470f2075713f26491ec172
[ "MIT" ]
2
2020-09-03T02:02:42.000Z
2021-12-11T09:11:21.000Z
import unittest from bupt_ncov_report.pure_utils import * class Test_PureUtils(unittest.TestCase): def setUp(self) -> None: self.u = PureUtils() def test_isNumberDataInRange_None(self): self.assertFalse(self.u.is_number_data_in_range(None, (-1, 1))) def test_isNumberDataInRange_EmptyStr(self): self.assertFalse(self.u.is_number_data_in_range('', (-1, 1))) def test_isNumberDataInRange_Hex_1(self): self.assertFalse(self.u.is_number_data_in_range('0X1A', (0, 32))) def test_isNumberDataInRange_Hex_2(self): self.assertFalse(self.u.is_number_data_in_range('1A', (0, 32))) def test_isNumberDataInRange_Text(self): self.assertFalse(self.u.is_number_data_in_range('abc', (0, 32))) def test_isNumberDataInRange_UpperBound(self): self.assertFalse(self.u.is_number_data_in_range(100, (-82, 100))) def test_isNumberDataInRange_NumInStr(self): self.assertTrue(self.u.is_number_data_in_range('233', (0, 1000))) def test_isNumberDataInRange_LowerBound(self): self.assertTrue(self.u.is_number_data_in_range('-82', (-82, 100))) def test_matchReGroup1_1Group(self): with self.assertRaises(BaseException) as _ctxt: self.u.match_re_group1(r'abc(\d+)def', 'abcdef') self.assertEqual('1234', self.u.match_re_group1(r'abc(\d+)def', 'abc1234def')) def test_matchReGroup1_2Group(self): self.assertEqual('1234', self.u.match_re_group1(r'abc(\d+)(def)', 'abc1234def')) def test_looksTruthy(self): self.assertTrue(PureUtils.looks_truthy('Fuck You')) self.assertTrue(PureUtils.looks_truthy('true')) self.assertTrue(PureUtils.looks_truthy('1 ')) self.assertTrue(PureUtils.looks_truthy(1)) self.assertTrue(PureUtils.looks_truthy([[]])) self.assertFalse(PureUtils.looks_truthy('fAlSe')) self.assertFalse(PureUtils.looks_truthy(' 0')) self.assertFalse(PureUtils.looks_truthy(0)) self.assertFalse(PureUtils.looks_truthy(dict())) self.assertFalse(PureUtils.looks_truthy([0])) self.assertFalse(PureUtils.looks_truthy(None)) def test_looksFalsy(self): self.assertFalse(PureUtils.looks_falsy('Fuck You')) self.assertFalse(PureUtils.looks_falsy('true')) self.assertFalse(PureUtils.looks_falsy('1 ')) self.assertFalse(PureUtils.looks_falsy(1)) self.assertFalse(PureUtils.looks_falsy([[]])) self.assertTrue(PureUtils.looks_falsy('fAlSe')) self.assertTrue(PureUtils.looks_falsy(' 0')) self.assertTrue(PureUtils.looks_falsy(0)) self.assertTrue(PureUtils.looks_falsy(dict())) self.assertTrue(PureUtils.looks_falsy([0])) self.assertTrue(PureUtils.looks_falsy(None)) if __name__ == '__main__': unittest.main()
37.72
88
0.696713
355
2,829
5.278873
0.202817
0.164354
0.135005
0.164354
0.74333
0.558164
0.558164
0.558164
0.558164
0.54429
0
0.031356
0.165783
2,829
74
89
38.22973
0.762712
0
0
0
0
0
0.047367
0
0
0
0.001414
0
0.622642
1
0.245283
false
0
0.037736
0
0.301887
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
1
0
1
0
0
0
0
0
0
0
3
c0592bea99ac498b4d92da7e736704a882252d48
1,533
py
Python
async_dns/core/nameserver.py
RomaLash/async_dns
badfa5302fe18a230bc9d6754f78a61b375affaa
[ "MIT" ]
24
2020-10-16T16:36:40.000Z
2020-10-16T16:37:01.000Z
async_dns/core/nameserver.py
RomaLash/async_dns
badfa5302fe18a230bc9d6754f78a61b375affaa
[ "MIT" ]
null
null
null
async_dns/core/nameserver.py
RomaLash/async_dns
badfa5302fe18a230bc9d6754f78a61b375affaa
[ "MIT" ]
null
null
null
import sys import time import random from .address import Address __all__ = [ 'NameServers', 'NoNameServer', ] class NoNameServer(Exception): pass class IterMixIn: def iter(self): if not self.data: raise NoNameServer return iter(self.data) def success(self, item): pass def fail(self, item): pass class WeightMixIn: def __init__(self, *k, **kw): self._failures = [0] * len(self.data) self.ts = 0 self._update() def _update(self): if time.time() > self.ts + 60: self.ts = time.time() self._sorted = list(self.data[i] for i in sorted(range(len(self.data)), key=lambda i: self._failures[i])) self._last_min_failures = self._failures self._failures = [0] * len(self.data) def success(self, item): self._update() def fail(self, item): self._update() index = self.data.index(item) self._failures[index] += 1 def iter(self): if not self.data: raise NoNameServer return iter(self._sorted) class NameServers(WeightMixIn, IterMixIn): def __init__(self, nameservers=[], **kw): self.data = [Address.parse(item, default_protocol='udp', allow_domain=True) for item in nameservers] super().__init__(**kw) def __bool__(self): return len(self.data) > 0 def __iter__(self): return iter(self.data) def __repr__(self): return '<NameServers [%s]>' % ','.join(map(str, self.data))
24.333333
117
0.600783
192
1,533
4.567708
0.3125
0.109464
0.050171
0.029647
0.249715
0.22577
0.125428
0.125428
0.125428
0.125428
0
0.006256
0.270059
1,533
62
118
24.725806
0.77748
0
0
0.375
0
0
0.029354
0
0
0
0
0
0
1
0.25
false
0.0625
0.083333
0.0625
0.520833
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
c059a5f86edd1027a0d4f92d9270db74ba75dcdd
4,176
py
Python
src/py_dss_interface/models/Meters/MetersV.py
davilamds/py_dss_interface
a447c97787aeac962381db88dd622ccb235eef4b
[ "MIT" ]
null
null
null
src/py_dss_interface/models/Meters/MetersV.py
davilamds/py_dss_interface
a447c97787aeac962381db88dd622ccb235eef4b
[ "MIT" ]
null
null
null
src/py_dss_interface/models/Meters/MetersV.py
davilamds/py_dss_interface
a447c97787aeac962381db88dd622ccb235eef4b
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- """ Created by eniocc at 11/10/2020 """ import ctypes from py_dss_interface.models import Bridge from py_dss_interface.models.Base import Base from py_dss_interface.models.Meters.MetersS import MetersS from py_dss_interface.models.Text.Text import Text class MetersV(Base): """ This interface can be used to read/write certain properties of the active DSS object. The structure of the interface is as follows: void MetersV(int32_t Parameter, VARIANT *Argument); This interface returns a variant according to the number sent in the variable “parameter”. The parameter can be one of the following. """ def meters_all_names(self): """Returns an array of all Energy Meter names.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(0), ctypes.c_int(0), None) def meters_register_names(self): """Returns an array of strings containing the names of the registers.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(1), ctypes.c_int(0), None) def meters_register_values(self): """Returns an array of values contained in the Meter registers for the active Meter.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(2), ctypes.c_int(0), None) def meters_totals(self): """Returns the totals for all registers of all Meters.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(3), ctypes.c_int(0), None) def meters_read_peak_current(self): """Returns an array of doubles with the Peak Current Property.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(4), ctypes.c_int(0), None) def meters_write_peak_current(self, argument): """Receives an array of doubles to set values of Peak Current Property.""" argument = Base.check_string_param(argument) t = Text(self.dss_obj) mt = MetersS(self.dss_obj) mt_name = mt.meters_read_name() return t.text(f'edit EnergyMeter.{mt_name} peakcurrent = {argument}') def meters_read_cal_current(self): """Returns the magnitude of the real part of the Calculated Current (normally determined by solution) for the meter to force some behavior on Load Allocation.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(6), ctypes.c_int(0), None) # TODO: Ênio - https://github.com/PauloRadatz/py_dss_interface/issues/6 def meters_write_calcurrent(self, argument: str): """Sets the magnitude of the real part of the Calculated Current (normally determined by solution) for the meter to force some behavior on Load Allocation.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(7), argument, None) def meters_read_alloc_factors(self): """Returns an array of doubles: allocation factors for the active Meter.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(8), ctypes.c_int(0), None) # TODO: Ênio - https://github.com/PauloRadatz/py_dss_interface/issues/7 def meters_write_alloc_factors(self, argument): """Receives an array of doubles to set the phase allocation factors for the active Meter.""" # argument = Base.check_string_param(argument) # return Bridge.VarArrayFunction(self.dss_obj.MetersV, ctypes.c_int(9), ctypes.c_int(1), None) t = Text(self.dss_obj) a = t.text("get mode ") return t.text(f'Allocateload {argument}') # TODO: Ênio - https://github.com/PauloRadatz/py_dss_interface/issues/8 def meters_all_end_elements(self): """Returns a variant array of names of all zone end elements.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(10), ctypes.c_int(0), None) # TODO: Ênio - https://github.com/PauloRadatz/py_dss_interface/issues/9 def meters_all_branches_in_zone(self): """Returns a wide string list of all branches in zone of the active Energy Meter object.""" return Bridge.var_array_function(self.dss_obj.MetersV, ctypes.c_int(11), ctypes.c_int(0), None)
49.714286
115
0.71432
629
4,176
4.565978
0.222576
0.051184
0.07312
0.065111
0.597493
0.541435
0.462396
0.427925
0.405641
0.377089
0
0.011163
0.184866
4,176
83
116
50.313253
0.83255
0.426964
0
0.055556
0
0
0.036548
0.009247
0
0
0
0.024096
0
1
0.333333
false
0
0.138889
0
0.833333
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
1
0
0
0
0
1
0
0
3
fbefc58650f56b095a658b861803f0fb08630933
693
py
Python
main/models.py
bobjiangps/django-blog
6afd36fa96c5a027546575b362b0a481c5d7c1a5
[ "MIT" ]
3
2019-10-25T13:08:04.000Z
2020-01-05T11:29:18.000Z
main/models.py
bobjiangps/django-blog
6afd36fa96c5a027546575b362b0a481c5d7c1a5
[ "MIT" ]
9
2020-05-10T10:13:56.000Z
2022-03-11T23:33:52.000Z
tool/models.py
bobjiangps/django-blog
6afd36fa96c5a027546575b362b0a481c5d7c1a5
[ "MIT" ]
3
2019-02-11T02:55:51.000Z
2020-01-05T11:29:20.000Z
from django.db import models from django.utils import timezone class Visitor(models.Model): ip = models.CharField(max_length=30) region = models.CharField(max_length=1000, blank=True, null=True) agent = models.CharField(max_length=1000) page = models.CharField(max_length=100) referer = models.CharField(max_length=500, blank=True, null=True) views = models.PositiveIntegerField(default=0) record_date = models.DateTimeField(default=timezone.now) update_date = models.DateTimeField(default=timezone.now) def increase_views(self): self.update_date = timezone.now() self.views += 1 self.save(update_fields=['views', 'update_date'])
36.473684
69
0.727273
90
693
5.477778
0.444444
0.15213
0.182556
0.243408
0.279919
0.166329
0
0
0
0
0
0.030928
0.160173
693
18
70
38.5
0.816151
0
0
0
0
0
0.023088
0
0
0
0
0
0
1
0.066667
false
0
0.133333
0
0.8
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
0
0
1
0
0
3
2201676950e0bff2da19862536b4fb0c0c4874fb
408
py
Python
Assignment-2/Temperature.py
HembramBeta777/Python-Programming
827611b0613d9d953d13fb04ea9b5c5ac3c510f2
[ "BSD-3-Clause" ]
2
2020-09-01T04:58:16.000Z
2021-01-30T03:45:52.000Z
Assignment-2/Temperature.py
HembramBeta777/Python-Programming
827611b0613d9d953d13fb04ea9b5c5ac3c510f2
[ "BSD-3-Clause" ]
null
null
null
Assignment-2/Temperature.py
HembramBeta777/Python-Programming
827611b0613d9d953d13fb04ea9b5c5ac3c510f2
[ "BSD-3-Clause" ]
null
null
null
# Temperature of an oven setting by reading from a pressure meter r = int(input("Enter the reading:- ")) if( (r == 2) or (r == 3) ): print("Temperature set to 500 degrees.") elif( r==4): print("Temperature set to 600 degrees.") elif((r==5)or(r==6)or(r==7)): print("Temperature set to 700 degrees.") elif((r<2) or (r>7)): print("DEFAULT:- The temperature setting is 300 degrees.")
21.473684
65
0.620098
67
408
3.776119
0.522388
0.047431
0.225296
0.249012
0
0
0
0
0
0
0
0.061538
0.203431
408
18
66
22.666667
0.716923
0.154412
0
0
0
0
0.476471
0
0
0
0
0
0
1
0
false
0
0
0
0
0.444444
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
2204874d76362a3b01cd9e67ee09a666ad8033b5
132
py
Python
upptime-exporter/settings.py
WindReserve/upptime-prometheus-exporter
d070606701bd4327fc8d7a365eeb482ee4f1a7a3
[ "MIT" ]
null
null
null
upptime-exporter/settings.py
WindReserve/upptime-prometheus-exporter
d070606701bd4327fc8d7a365eeb482ee4f1a7a3
[ "MIT" ]
null
null
null
upptime-exporter/settings.py
WindReserve/upptime-prometheus-exporter
d070606701bd4327fc8d7a365eeb482ee4f1a7a3
[ "MIT" ]
null
null
null
import os PORT = 8000 BIND_IP = '127.0.0.1' GH_ACCESS_TOKEN = os.getenv('GH_ACCESS_TOKEN') UPPTIME_REPO_NAME = 'WindReserve/status'
22
46
0.765152
23
132
4.086957
0.782609
0.170213
0.276596
0
0
0
0
0
0
0
0
0.084746
0.106061
132
6
47
22
0.711864
0
0
0
0
0
0.315789
0
0
0
0
0
0
1
0
false
0
0.2
0
0.2
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
225058e2972520afc8e26ce9046c454c01fb503b
136
py
Python
python/testData/intentions/PyInvertIfConditionIntentionTest/conditionAssignmentMultiple.py
Tasemo/intellij-community
50aeaf729b7073e91c7c77487a1f155e0dfe3fcd
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/intentions/PyInvertIfConditionIntentionTest/conditionAssignmentMultiple.py
Tasemo/intellij-community
50aeaf729b7073e91c7c77487a1f155e0dfe3fcd
[ "Apache-2.0" ]
null
null
null
python/testData/intentions/PyInvertIfConditionIntentionTest/conditionAssignmentMultiple.py
Tasemo/intellij-community
50aeaf729b7073e91c7c77487a1f155e0dfe3fcd
[ "Apache-2.0" ]
null
null
null
def get_value(): return 1 <caret>if not (value := get_value()) or value <= 1: print("Less or equal") else: print("Greater")
19.428571
51
0.610294
21
136
3.857143
0.666667
0.197531
0
0
0
0
0
0
0
0
0
0.018868
0.220588
136
7
52
19.428571
0.745283
0
0
0
0
0
0.145985
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
0
0
3
97d59431c1d51172bc2cbec72f083a74c541b946
193
py
Python
run_interface.py
bhermanmit/openmc_gui
7508b540a994141ee3326899fed30b01156b3ab8
[ "MIT" ]
2
2018-02-27T23:15:12.000Z
2021-11-09T16:11:34.000Z
run_interface.py
bhermanmit/openmc_gui
7508b540a994141ee3326899fed30b01156b3ab8
[ "MIT" ]
null
null
null
run_interface.py
bhermanmit/openmc_gui
7508b540a994141ee3326899fed30b01156b3ab8
[ "MIT" ]
1
2018-02-27T23:15:14.000Z
2018-02-27T23:15:14.000Z
#!/usr/bin/env python import os # unix only workaround for making sure to capture ALL stdout to the gui if __name__ == "__main__": os.system("python interface.py 2>&1 | tee output.log")
21.444444
71
0.709845
32
193
4.03125
0.90625
0
0
0
0
0
0
0
0
0
0
0.012658
0.181347
193
8
72
24.125
0.803797
0.466321
0
0
0
0
0.485149
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
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
97ded857ed2121fa5855c721e5bee58aca7d41c4
102
py
Python
challenge_1/python/sysek/src/reverse.py
rchicoli/2017-challenges
44f0b672e5dea34de1dde131b6df837d462f8e29
[ "Apache-2.0" ]
271
2017-01-01T22:58:36.000Z
2021-11-28T23:05:29.000Z
challenge_1/python/sysek/src/reverse.py
AakashOfficial/2017Challenges
a8f556f1d5b43c099a0394384c8bc2d826f9d287
[ "Apache-2.0" ]
283
2017-01-01T23:26:05.000Z
2018-03-23T00:48:55.000Z
challenge_1/python/sysek/src/reverse.py
AakashOfficial/2017Challenges
a8f556f1d5b43c099a0394384c8bc2d826f9d287
[ "Apache-2.0" ]
311
2017-01-01T22:59:23.000Z
2021-09-23T00:29:12.000Z
def reverse(string): return string[::-1] print('Gimmie some word') s = input() print(reverse(s))
14.571429
25
0.656863
15
102
4.466667
0.733333
0
0
0
0
0
0
0
0
0
0
0.011628
0.156863
102
6
26
17
0.767442
0
0
0
0
0
0.156863
0
0
0
0
0
0
1
0.2
false
0
0
0.2
0.4
0.4
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
1
0
0
0
3
3f10753558ac1b8ca2ed360dce924bdb842361d6
2,642
py
Python
samplefiles/dhtools/website/models.py
handyc/klurp
004c423cefbd72a7ada0367a86da730095c2f885
[ "MIT" ]
null
null
null
samplefiles/dhtools/website/models.py
handyc/klurp
004c423cefbd72a7ada0367a86da730095c2f885
[ "MIT" ]
null
null
null
samplefiles/dhtools/website/models.py
handyc/klurp
004c423cefbd72a7ada0367a86da730095c2f885
[ "MIT" ]
null
null
null
from django.db import models #from django.contrib.auth.models import User from django.contrib.auth import get_user_model class Home(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "999999999999999. Homes" name = models.CharField(max_length=2000, default="") def __str__(self): return self.name class Bibliography(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "Bibliographies" name = models.CharField(max_length=2000, default="") def __str__(self): return self.name class BibliographyEntry(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "Bibliography Entries" name = models.CharField(max_length=2000, default="") def __str__(self): return self.name class Member(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "Members" name = models.CharField(max_length=2000, default="", null=True, blank=True) email = models.CharField(max_length=500, default="", null=True, blank=True) bio = models.CharField(max_length=20000, default="", null=True, blank=True) pubs = models.CharField(max_length=20000, default="", null=True, blank=True) def __str__(self): return self.name class NewsItem(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "News Items" name = models.CharField(max_length=2000, default="") def __str__(self): return self.name class Resource(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "Resources" name = models.CharField(max_length=2000, default="") def __str__(self): return self.name class Language(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "Languages" name = models.CharField(max_length=2000, default="") def __str__(self): return self.name class Dictionary(models.Model): class Meta: ordering = ('name',) verbose_name_plural = "01. Dictionaries" name = models.CharField(max_length=200, default="") def __str__(self): return self.name class DictionaryEntry(models.Model): class Meta: ordering = ('term1','term2') verbose_name_plural = "02. Dictionary Entries" dictionary = models.ForeignKey('Dictionary', on_delete=models.SET_NULL, null=True, blank=True) term1 = models.CharField(max_length=200, default="") term2 = models.CharField(max_length=200, default="") def __str__(self): return self.term1
25.650485
98
0.657456
309
2,642
5.391586
0.197411
0.117047
0.140456
0.187275
0.719088
0.67527
0.654862
0.614046
0.608643
0.373349
0
0.035975
0.221423
2,642
102
99
25.901961
0.773943
0.016276
0
0.571429
0
0
0.069723
0
0
0
0
0
0
1
0.128571
false
0
0.028571
0.128571
0.742857
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
0
1
1
0
0
3
3f1e2676e022cac19b63d8ad37146174dc31b5a7
641
py
Python
tests/unit/test_states.py
hellmage/pacte
a3b6c2b39b52d6e8c1bb5d0df305e5fc30251fff
[ "MIT" ]
null
null
null
tests/unit/test_states.py
hellmage/pacte
a3b6c2b39b52d6e8c1bb5d0df305e5fc30251fff
[ "MIT" ]
null
null
null
tests/unit/test_states.py
hellmage/pacte
a3b6c2b39b52d6e8c1bb5d0df305e5fc30251fff
[ "MIT" ]
null
null
null
# Copyright (c) 2017 App Annie Inc. All rights reserved. import os.path from unittest import TestCase from pacte.states import load_states class StateCollectorTest(TestCase): def test_collect(self): """ tests/states/state*.py """ states = load_states(os.path.join(os.path.dirname(__file__), 'states')) self.assertEqual(4, len(states)) self.assertTrue('foo' in states) self.assertTrue('foo2' in states) self.assertTrue('bar' in states) self.assertTrue('subbaz' in states) foo_state = states['foo'] self.assertEqual('StateFoo', foo_state.__name__)
30.52381
79
0.656786
79
641
5.164557
0.518987
0.122549
0.196078
0.161765
0
0
0
0
0
0
0
0.012097
0.226209
641
20
80
32.05
0.810484
0.121685
0
0
0
0
0.061224
0
0
0
0
0
0.461538
1
0.076923
false
0
0.230769
0
0.384615
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
3f2eb73ec0f9d0eca241ea2456c3008b7e1a9180
1,304
py
Python
scrapers.py
SPELLGIRL/fb_selenium_parser
46d8f8fca9b52ec2239a14e10fdd2f9f0d974b8b
[ "MIT" ]
null
null
null
scrapers.py
SPELLGIRL/fb_selenium_parser
46d8f8fca9b52ec2239a14e10fdd2f9f0d974b8b
[ "MIT" ]
null
null
null
scrapers.py
SPELLGIRL/fb_selenium_parser
46d8f8fca9b52ec2239a14e10fdd2f9f0d974b8b
[ "MIT" ]
null
null
null
from datetime import datetime from bs4 import BeautifulSoup class FBPostScraper(object): def __init__(self, html, url=None): self._soup = BeautifulSoup(html, "html.parser") self._data = { 'url': url, 'date': '', 'content': { 'text': '', 'html': html, }, } self.parse() def __str__(self): return self.url @property def data(self): return self._data @property def date(self): return self.data.get('date') @property def text(self): return self.data.get('content').get('text') @property def url(self): return self.data.get('url') def parse(self): """ Метод для запуска цепочки обработчиков """ self._data['date'] = self._parse_date() self._data['content']['text'] = self._parse_text() def _parse_text(self): """ Метод получения текста публикации """ elem = self._soup.select_one('div[data-testid="post_message"]') return elem.text if elem else '' def _parse_date(self): """ Метод получения даты публикации """ elem = self._soup.select_one('abbr') return datetime.fromtimestamp(int(elem['data-utime'])) if elem else ''
23.709091
78
0.559049
145
1,304
4.848276
0.324138
0.079659
0.099573
0.102418
0.177809
0.088193
0
0
0
0
0
0.001103
0.304448
1,304
54
79
24.148148
0.77398
0.081288
0
0.108108
0
0
0.094228
0.026316
0
0
0
0
0
1
0.243243
false
0
0.054054
0.135135
0.513514
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
3f4b511d8b98322dc2997b1326b494ca416b85f5
184
py
Python
simdeblur/dataset/__init__.py
ljzycmd/SimDeblur
dd2f60c41176b75c4eaf80d740f547c206aa8227
[ "MIT" ]
190
2021-03-22T13:59:42.000Z
2022-03-08T21:14:41.000Z
simdeblur/dataset/__init__.py
ljzycmd/SimDeblur
dd2f60c41176b75c4eaf80d740f547c206aa8227
[ "MIT" ]
9
2021-04-26T06:44:40.000Z
2022-03-25T07:48:30.000Z
simdeblur/dataset/__init__.py
ljzycmd/SimDeblur
dd2f60c41176b75c4eaf80d740f547c206aa8227
[ "MIT" ]
27
2021-03-23T03:11:00.000Z
2022-03-19T21:26:02.000Z
from .dvd import DVD from .gopro import GOPRO from .reds import REDS # from .build import build_dataset, list_datasets __all__ = [k for k in globals().keys() if not k.startswith("_")]
26.285714
64
0.744565
30
184
4.333333
0.6
0
0
0
0
0
0
0
0
0
0
0
0.152174
184
7
64
26.285714
0.833333
0
0
0
0
0
0.005435
0
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
3
3f4e9c8f5cca78446cd28deb640fffe858412e09
50
py
Python
PyNet.Sample/Test.py
jbatonnet/PyNet
137e5a788e008d80548f751396a02c43755f805d
[ "MIT" ]
1
2019-10-25T02:56:35.000Z
2019-10-25T02:56:35.000Z
PyNet.Sample/Test.py
jbatonnet/pynet
137e5a788e008d80548f751396a02c43755f805d
[ "MIT" ]
null
null
null
PyNet.Sample/Test.py
jbatonnet/pynet
137e5a788e008d80548f751396a02c43755f805d
[ "MIT" ]
1
2017-04-21T06:14:34.000Z
2017-04-21T06:14:34.000Z
a = 1 b = 2 def show(message): print message
8.333333
18
0.6
9
50
3.333333
0.888889
0
0
0
0
0
0
0
0
0
0
0.057143
0.3
50
5
19
10
0.8
0
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0
0
null
null
0.25
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
3
58aacff8fdcd1863e4a625b944b55289f38ae45b
3,097
py
Python
work/gy86.py
yingnierxiao/piserver
5f33a7ce6990063077c0cec87fef706e05e3dc96
[ "Apache-2.0" ]
null
null
null
work/gy86.py
yingnierxiao/piserver
5f33a7ce6990063077c0cec87fef706e05e3dc96
[ "Apache-2.0" ]
null
null
null
work/gy86.py
yingnierxiao/piserver
5f33a7ce6990063077c0cec87fef706e05e3dc96
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python from Adafruit_I2C import Adafruit_I2C from time import sleep import math mpu6050 = Adafruit_I2C(0x68,2) # ADC 16bit hmc5883 = Adafruit_I2C(0x1e,2) # ADC 12bit ms5611 = Adafruit_I2C(0x77,2) # ADC 24bit # mpu6050 i2c master enable bit mpu6050.write8(0x6A, 0) # mpu6050 i2c bypass enable bit mpu6050.write8(0x37, 2) # mpu6050 turn off sleep mode mpu6050.write8(0x6B, 0) # hmc5883 continuous mode hmc5883.write8(0x02,0x00) # ms5611 reset ms5611.writeList(0x1e,[]) sleep(2/1000.0) # ms5611 prom t=ms5611.readList(0xa2,2) c1=t[0]*256+t[1] t=ms5611.readList(0xa4,2) c2=t[0]*256+t[1] t=ms5611.readList(0xa6,2) c3=t[0]*256+t[1] t=ms5611.readList(0xa8,2) c4=t[0]*256+t[1] t=ms5611.readList(0xaa,2) c5=t[0]*256+t[1] t=ms5611.readList(0xac,2) c6=t[0]*256+t[1] #c1=40127 #c2=36924 #c3=23317 #c4=23282 #c5=33464 #c6=28312 while True: #read mpu6050 accelerations in m/s^2 ax = (mpu6050.readS8(0x3b)*256+mpu6050.readU8(0x3c))/16384.0 ay = (mpu6050.readS8(0x3d)*256+mpu6050.readU8(0x3e))/16384.0 az = (mpu6050.readS8(0x3f)*256+mpu6050.readU8(0x40))/16384.0 #read mpu6050 temperature in C tt = (mpu6050.readS8(0x41)*256+mpu6050.readU8(0x42))/340.0 + 36.53 #read mpu6050 gyroscope in degree/s gx = (mpu6050.readS8(0x43)*256+mpu6050.readU8(0x44))/131.0 gy = (mpu6050.readS8(0x45)*256+mpu6050.readU8(0x46))/131.0 gz = (mpu6050.readS8(0x47)*256+mpu6050.readU8(0x48))/131.0 #wait hmc5883 to be ready while not hmc5883.readU8(0x09)&0x01 == 1: pass #read hmc5883 magnetometer in gauss magx = (hmc5883.readS8(0x3)*256+hmc5883.readU8(0x4))/1090.0 magz = (hmc5883.readS8(0x5)*256+hmc5883.readU8(0x6))/1090.0 magy = (hmc5883.readS8(0x7)*256+hmc5883.readU8(0x8))/1090.0 z=math.degrees(math.atan2(magy,magx)); y=math.degrees(-math.atan2(ax,az)); x=math.degrees(math.atan2(ay,az)); ms5611.writeList(0x48,[]) sleep(9/1000.0) adc=ms5611.readList(0x00,3) d1=adc[0]*65536+adc[1]*256+adc[2] #d1=9085466 ms5611.writeList(0x58,[]) sleep(9/1000.0) adc=ms5611.readList(0x00,3) d2=adc[0]*65536+adc[1]*256+adc[2] #d2=8569150 dt = d2 - c5*(1<<8) temp=2000+ dt*c6/(1<<23) off= c2*(1<<16) + c4*dt/(1<<7) sens=c1*(1<<15) + c3*dt/(1<<8) p=(d1*sens/(1<<21) - off)/(1<<15) #print c1,c2,c3,c4,c5,c6,d1,d2,dt,temp,off,sens,p tempc=temp/100.0 press_now=p/100.0 print "tempc=",tempc, "mbar=",press_now, print "angle=", print "{:+03.3f}".format(x), print "{:+03.3f}".format(y), print "{:+03.3f}".format(z), print "mag=", print "{:+03.3f}".format(magx), print "{:+03.3f}".format(magy), print "{:+03.3f}".format(magz), print "accel=", print "{:+03.3f}".format(ax), print "{:+03.3f}".format(ay), print "{:+03.3f}".format(az), print "tempc=", print "{:+03.3f}".format(tt), print "gyro=", print "{:+03.3f}".format(gx), print "{:+03.3f}".format(gy), print "{:+03.3f}".format(gz)
27.40708
74
0.613174
505
3,097
3.746535
0.312871
0.048097
0.061839
0.103066
0.117865
0.114165
0.114165
0.114165
0.034884
0
0
0.261734
0.188247
3,097
113
75
27.40708
0.490851
0.146916
0
0.054795
0
0
0.059183
0
0
0
0.060328
0
0
0
null
null
0.013699
0.041096
null
null
0.260274
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
58b01d0604054e92cedd09f64aa4627c3d018df3
3,129
py
Python
_pycharm_skeletons/renderdoc/ShaderResource.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/ShaderResource.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
_pycharm_skeletons/renderdoc/ShaderResource.py
Lex-DRL/renderdoc-py-stubs
75d280e4f500ded506f3315a49fc432b37ab4fa6
[ "MIT" ]
null
null
null
# encoding: utf-8 # module renderdoc # from P:\1-Scripts\_Python\Py-Autocomplete\renderdoc.pyd # by generator 1.146 # no doc # imports import enum as __enum from .SwigPyObject import SwigPyObject class ShaderResource(SwigPyObject): """ Contains the information for a shader resource that is made accessible to shaders directly by means of the API resource binding system. .. note:: that constant blocks and samplers will not have a shader resource entry, see :class:`ConstantBlock` and :class:`ShaderSampler`. """ def __eq__(self, *args, **kwargs): # real signature unknown """ Return self==value. """ pass def __ge__(self, *args, **kwargs): # real signature unknown """ Return self>=value. """ pass def __gt__(self, *args, **kwargs): # real signature unknown """ Return self>value. """ pass def __hash__(self, *args, **kwargs): # real signature unknown """ Return hash(self). """ pass def __init__(self, *args, **kwargs): # real signature unknown pass def __le__(self, *args, **kwargs): # real signature unknown """ Return self<=value. """ pass def __lt__(self, *args, **kwargs): # real signature unknown """ Return self<value. """ pass @staticmethod # known case of __new__ def __new__(*args, **kwargs): # real signature unknown """ Create and return a new object. See help(type) for accurate signature. """ pass def __ne__(self, *args, **kwargs): # real signature unknown """ Return self!=value. """ pass bindPoint = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """ The bindpoint for this block. This is an index in either the :data:`ShaderBindpointMapping.readOnlyResources` list or :data:`ShaderBindpointMapping.readWriteResources` list as appropriate (see :data:`isReadOnly`). """ isReadOnly = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """ ``True`` if this resource is available to the shader for reading only, otherwise it is able to be read from and written to arbitrarily. """ isTexture = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """``True`` if this resource is a texture, otherwise it is a buffer.""" name = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The name of this resource.""" resType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """The :class:`TextureType` that describes the type of this resource.""" this = property(lambda self: object(), lambda self, v: None, lambda self: None) # default thisown = property(lambda self: object(), lambda self, v: None, lambda self: None) # default variableType = property(lambda self: object(), lambda self, v: None, lambda self: None) # default """A :class:`ShaderVariableType` describing type of each element of this resource.""" __dict__ = None # (!) real value is ''
34.01087
102
0.654842
388
3,129
5.159794
0.332474
0.11988
0.062937
0.103397
0.481019
0.466034
0.449051
0.429071
0.429071
0.429071
0
0.002475
0.225312
3,129
91
103
34.384615
0.823432
0.297539
0
0.290323
0
0
0
0
0
0
0
0
0
1
0.290323
false
0.290323
0.064516
0
0.677419
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
58b994624726af775c4e3a2598e2ee614948ea0a
89
py
Python
socscrollsave/__init__.py
damianjwilliams/socscrollsave
8735e42b15df6e79251fc321e83b223aa9d1932f
[ "MIT" ]
2
2020-06-11T13:31:00.000Z
2020-06-20T19:13:43.000Z
socscrollsave/__init__.py
damianjwilliams/socscrollsave
8735e42b15df6e79251fc321e83b223aa9d1932f
[ "MIT" ]
null
null
null
socscrollsave/__init__.py
damianjwilliams/socscrollsave
8735e42b15df6e79251fc321e83b223aa9d1932f
[ "MIT" ]
null
null
null
from socscrollsave.core.constants import Constants __version__ = Constants.app_version
17.8
50
0.853933
10
89
7.1
0.7
0
0
0
0
0
0
0
0
0
0
0
0.101124
89
4
51
22.25
0.8875
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
58c5a459ca16213c8decaf83de6df049a1db497f
458
py
Python
VehicleFactory.py
srknbyrm/Python
d71a939fefdb9c405b5f531e9123cf2faaef0761
[ "MIT" ]
null
null
null
VehicleFactory.py
srknbyrm/Python
d71a939fefdb9c405b5f531e9123cf2faaef0761
[ "MIT" ]
null
null
null
VehicleFactory.py
srknbyrm/Python
d71a939fefdb9c405b5f531e9123cf2faaef0761
[ "MIT" ]
null
null
null
from DesignPatterns.Factory.Sedan import Sedan from DesignPatterns.Factory.SUV import SUV from DesignPatterns.Factory.Hatchback import Hatchback class VehicleFactory: def generate(self, vehicle_type): if vehicle_type is 'Sedan': return Sedan().produce_vehicle() elif vehicle_type is 'SUV': return SUV().produce_vehicle() elif vehicle_type is 'Hatchback': return Hatchback().produce_vehicle()
32.714286
54
0.703057
52
458
6.057692
0.365385
0.139683
0.238095
0.15873
0.196825
0.196825
0
0
0
0
0
0
0.220524
458
14
55
32.714286
0.882353
0
0
0
1
0
0.037037
0
0
0
0
0
0
1
0.090909
false
0
0.272727
0
0.727273
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
3
58c8c1b0db3e61997932fae78919d11e248ee3e6
3,448
py
Python
code.py
samkit5495/manipulating-data-with-numpy-code-along
8b5747268aeecfe961c2c7e2a407f62a133270e3
[ "MIT" ]
null
null
null
code.py
samkit5495/manipulating-data-with-numpy-code-along
8b5747268aeecfe961c2c7e2a407f62a133270e3
[ "MIT" ]
null
null
null
code.py
samkit5495/manipulating-data-with-numpy-code-along
8b5747268aeecfe961c2c7e2a407f62a133270e3
[ "MIT" ]
null
null
null
# -------------- # Using Numpy print('Using Numpy') import numpy as np # Not every data format will be in csv there are other file formats also. # This exercise will help you deal with other file formats and how toa read it. data_ipl = np.genfromtxt(path, delimiter=',',dtype='str' ,skip_header=True) # How many matches were held in total we need to know so that we can analyze further statistics keeping that in mind. print('How many matches were held in total',len(set(data_ipl[:,0]))) # this exercise deals with you getting to know that which are all those six teams that played in the tournament. team_1 = set(data_ipl[:,3]) team_2 = set(data_ipl[:,4]) print('six teams',team_1.union(team_2)) # An exercise to make you familiar with indexing and slicing up within data. print('sum of all extras in all deliveries in all matches in the dataset',data_ipl[:,17].astype(float).sum()) print('Total number of exta',len(data_ipl[data_ipl[:,17].astype(float)>0])) # Get the array of all delivery numbers when a given player got out. Also mention the wicket type. given_batsman = 'ST Jayasuriya' out_deliveries = data_ipl[data_ipl[:,-3]==given_batsman][:,[11,-2]] print('array of all delivery numbers when a given player got out',out_deliveries) # this exercise will help you get the statistics on one particular team given_team = 'Mumbai Indians' print('matches the team Mumbai Indians has won the toss',len(set(data_ipl[data_ipl[:,5]==given_team][:,0]))) # An exercise to know who is the most aggresive player or maybe the scoring player records_with_six_runs = data_ipl[data_ipl[:,-7].astype(int)==6] from collections import Counter sixes_scorers_count = Counter(records_with_six_runs[:,-10]) print('who has scored the maximum no. of sixes overall') print(max(sixes_scorers_count,key=sixes_scorers_count.get)) print('Using Pandas') # Using Pandas # Not every data format will be in csv there are other file formats also. # This exercise will help you deal with other file formats and how toa read it. import pandas as pd df = pd.read_csv(path) # How many matches were held in total we need to know so that we can analyze further statistics keeping that in mind. print('How many matches were held in total',len(df['match_code'].unique())) # this exercise deals with you getting to know that which are all those six teams that played in the tournament. teams = df['team1'].append(df['team2']).unique() print('six teams',teams) # An exercise to make you familiar with indexing and slicing up within data. print('sum of all extras in all deliveries in all matches in the dataset',sum(df['extras'])) # Get the array of all delivery numbers when a given player got out. Also mention the wicket type. given_batsman = 'ST Jayasuriya' out_deliveries = df[df['player_out']==given_batsman][['inning','delivery','wicket_kind']] print('array of all delivery numbers when a given player got out',out_deliveries) # this exercise will help you get the statistics on one particular team print('matches the team Mumbai Indians has won the toss',len(df[df['toss_winner']=='Mumbai Indians']['match_code'].unique())) # An exercise to know who is the most aggresive player or maybe the scoring player records_with_six_runs = df[df['runs']==6] sixes_scorers_count = records_with_six_runs['batsman'].value_counts() print('who has scored the maximum no. of sixes overall') print(sixes_scorers_count[sixes_scorers_count==sixes_scorers_count.max()])
43.64557
125
0.758121
587
3,448
4.349233
0.269165
0.035644
0.046612
0.031336
0.721112
0.705445
0.685468
0.685468
0.685468
0.685468
0
0.008426
0.139501
3,448
78
126
44.205128
0.852039
0.417633
0
0.176471
0
0
0.361434
0
0
0
0
0
0
1
0
false
0
0.088235
0
0.088235
0.5
0
0
0
null
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
1
0
3
58ef75e28fe19167a6e74605bb1fedfed0438456
739
py
Python
tabs/intro.py
Indrejue/Build-Week-App
0033e3136c2a996a6b996fb260880711a79158f3
[ "MIT" ]
null
null
null
tabs/intro.py
Indrejue/Build-Week-App
0033e3136c2a996a6b996fb260880711a79158f3
[ "MIT" ]
null
null
null
tabs/intro.py
Indrejue/Build-Week-App
0033e3136c2a996a6b996fb260880711a79158f3
[ "MIT" ]
null
null
null
from dash.dependencies import Input, Output import dash_core_components as dcc import dash_html_components as html from app import app layout = [dcc.Markdown(""" ### Intro There are aproxamatly 6.5 million animals taken in by shelters every year. Of those about 1.5 million wind up euthanized because they could not be addopted or the shelter had no other option. The goal is o determain what factors are likely to lead to a happy outcome of our four legged friends finding a good home. """), html.Img(src='https://raw.githubusercontent.com/Indrejue/Build-Week-App/master/model/cat.png', style={'width':'50%'}), html.Img(src='https://raw.githubusercontent.com/Indrejue/Build-Week-App/master/model/dog.png', style={'width':'50%'}), ]
41.055556
121
0.764547
121
739
4.636364
0.694215
0.035651
0.035651
0.053476
0.245989
0.245989
0.245989
0.245989
0.245989
0.245989
0
0.012346
0.123139
739
18
122
41.055556
0.853395
0
0
0
0
0.307692
0.677027
0
0
0
0
0
0
1
0
false
0
0.307692
0
0.307692
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
1
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
3