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
0bba5475db829e8b08838f7efa5a6f64cda08aef
86
py
Python
examples/failure.py
KevinColemanInc/Testify
bd2fabfac64c99da22d078130b8061a773d6457f
[ "Apache-2.0" ]
null
null
null
examples/failure.py
KevinColemanInc/Testify
bd2fabfac64c99da22d078130b8061a773d6457f
[ "Apache-2.0" ]
null
null
null
examples/failure.py
KevinColemanInc/Testify
bd2fabfac64c99da22d078130b8061a773d6457f
[ "Apache-2.0" ]
null
null
null
import testify as T class Test(T.TestCase): def test(self): assert False
14.333333
23
0.651163
13
86
4.307692
0.846154
0
0
0
0
0
0
0
0
0
0
0
0.267442
86
5
24
17.2
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.25
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
e7f1444ffdc0aff766c42d2f3ce4aeb0daf4597c
1,339
py
Python
search/service/api.py
Bennu-Li/phantoscope
64445b83d155c9c4dc81d435ee1387c5ff1d2ee9
[ "Apache-2.0" ]
null
null
null
search/service/api.py
Bennu-Li/phantoscope
64445b83d155c9c4dc81d435ee1387c5ff1d2ee9
[ "Apache-2.0" ]
null
null
null
search/service/api.py
Bennu-Li/phantoscope
64445b83d155c9c4dc81d435ee1387c5ff1d2ee9
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2019-2020 Zilliz. 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. from settings.settings_api import settings #from resource.images_api import images from application.application_api import application #from search.search_api import search #from storage.storage_api import storage from pipeline.pipeline_api import pipeline from operators.operators_api import operator from service import app app.register_blueprint(settings, url_prefix='/v1/settings') #app.register_blueprint(images, url_prefix='/v1/images') #app.register_blueprint(search, url_prefix='/v1/search') #app.register_blueprint(storage, url_prefix='/v1/storage') app.register_blueprint(pipeline, url_prefix='/v1/pipeline') app.register_blueprint(operator, url_prefix='/v1/operator') app.register_blueprint(application, url_prefix='/v1/application')
46.172414
112
0.806572
196
1,339
5.403061
0.438776
0.05949
0.1322
0.030217
0
0
0
0
0
0
0
0.0159
0.107543
1,339
28
113
47.821429
0.870293
0.634802
0
0
0
0
0.108051
0
0
0
0
0
0
1
0
true
0
0.555556
0
0.555556
0.444444
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
1
0
4
e7f557cfec620a91ee9b7797bff390d2d28c4998
2,502
py
Python
Blender/blender_tools/lights.py
gregnordin/python-notes_to_self
6458271d585f5beabfd18577290de64b82666018
[ "MIT" ]
2
2017-04-18T18:41:44.000Z
2022-03-19T20:18:25.000Z
Blender/blender_tools/lights.py
gregnordin/python-notes_to_self
6458271d585f5beabfd18577290de64b82666018
[ "MIT" ]
10
2021-03-30T13:50:55.000Z
2022-01-13T02:54:45.000Z
Blender/blender_tools/lights.py
gregnordin/python-notes_to_self
6458271d585f5beabfd18577290de64b82666018
[ "MIT" ]
2
2021-05-07T19:20:08.000Z
2021-11-11T20:37:57.000Z
import bpy from math import pi def point_light(location, rotation, power=1000.0, name="Light_pt"): """Point light. Args: power (float, optional): [description]. Defaults to 1000.0. name (str, optional): [description]. Defaults to "Light_pt". location ([type], optional): [description]. Defaults to light_location. rotation ([type], optional): [description]. Defaults to light_rotation. Returns: [type]: Light object """ light_data = bpy.data.lights.new(name, type="POINT") light = bpy.data.objects.new(name, light_data) bpy.context.collection.objects.link(light) light.location = location light.rotation_euler = rotation light.data.energy = power return light def sun_light( location, rotation, power=2.5, angle=135, name="Light_sun", ): """Sun light. Args: power (float, optional): [description]. Defaults to 2.5. angle (int, optional): [description]. Defaults to 135. name (str, optional): [description]. Defaults to "Light_sun". location ([type], optional): [description]. Defaults to light_location. rotation ([type], optional): [description]. Defaults to light_rotation. Returns: [type]: Light object """ light_data = bpy.data.lights.new(name, type="SUN") light = bpy.data.objects.new(name, light_data) bpy.context.collection.objects.link(light) light.location = location light.rotation_euler = rotation light.data.energy = power light.data.specular_factor = 0.4 light.data.angle = angle * pi / 180.0 return light def area_light( location, rotation, power=800, size=5.0, name="Light_area", ): """Area light. Args: power (int, optional): [description]. Defaults to 800. size (float, optional): [description]. Defaults to 5.0. name (str, optional): [description]. Defaults to "Light_area". location ([type], optional): [description]. Defaults to light_location. rotation ([type], optional): [description]. Defaults to light_rotation. Returns: [type]: Light object """ light_data = bpy.data.lights.new(name, type="AREA") light = bpy.data.objects.new(name, light_data) bpy.context.collection.objects.link(light) light.location = location light.rotation_euler = rotation light.data.energy = power light.data.specular_factor = 0.2 light.data.shape = "SQUARE" light.data.size = size return light
32.493506
79
0.657874
309
2,502
5.242718
0.161812
0.164198
0.233333
0.250617
0.783951
0.723457
0.723457
0.698148
0.587037
0.587037
0
0.019329
0.214229
2,502
76
80
32.921053
0.80468
0.446843
0
0.571429
0
0
0.035686
0
0
0
0
0
0
1
0.085714
false
0
0.057143
0
0.228571
0
0
0
0
null
0
1
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
4
e7f7bcbd1d15ef59be62d066ea2bb553f80ad81b
77
py
Python
py2app/setup.py
ezgranet/mmp-calc
739ee7bbeec47cb28988903fca9da00ff08b2df3
[ "MIT" ]
2
2020-08-24T05:46:35.000Z
2021-03-11T22:20:36.000Z
py2app/setup.py
ezgranet/mmp-calc
739ee7bbeec47cb28988903fca9da00ff08b2df3
[ "MIT" ]
1
2022-01-05T12:06:06.000Z
2022-01-05T12:06:06.000Z
py2app/setup.py
ezgranet/mmp-calc
739ee7bbeec47cb28988903fca9da00ff08b2df3
[ "MIT" ]
null
null
null
from distutils.core import setup import py2exe setup(console=['mmp-calc.py'])
25.666667
32
0.792208
12
77
5.083333
0.833333
0
0
0
0
0
0
0
0
0
0
0.014085
0.077922
77
3
33
25.666667
0.84507
0
0
0
0
0
0.141026
0
0
0
0
0
0
1
0
true
0
0.666667
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
e7f9b5c82e7a298550142053fdc39f4f21ceb362
1,455
py
Python
python/tests/t_request_header.py
viveksinghggits/ambassador
76395e903bbc0040a6169e16641fe04acf0d2702
[ "Apache-2.0" ]
1
2021-01-05T18:27:18.000Z
2021-01-05T18:27:18.000Z
python/tests/t_request_header.py
viveksinghggits/ambassador
76395e903bbc0040a6169e16641fe04acf0d2702
[ "Apache-2.0" ]
1
2021-03-04T10:33:23.000Z
2021-05-03T12:27:51.000Z
python/tests/t_request_header.py
viveksinghggits/ambassador
76395e903bbc0040a6169e16641fe04acf0d2702
[ "Apache-2.0" ]
2
2020-10-01T18:59:27.000Z
2021-02-04T06:23:18.000Z
from kat.harness import variants, Query from abstract_tests import AmbassadorTest, ServiceType, HTTP class XRequestIdHeaderPreserveTest(AmbassadorTest): target: ServiceType def init(self): self.target = HTTP(name="target") def config(self): yield self.target, self.format(""" --- apiVersion: ambassador/v0 kind: Module name: ambassador config: preserve_external_request_id: true --- apiVersion: ambassador/v2 kind: Mapping name: {self.name}-target prefix: /target/ service: http://{self.target.path.fqdn} """) def queries(self): yield Query(self.url("target/"), headers={"x-request-id": "hello"}) def check(self): assert self.results[0].backend.request.headers['x-request-id'] == ['hello'] class XRequestIdHeaderDefaultTest(AmbassadorTest): target: ServiceType def init(self): self.xfail = "Need to figure out passing header through external connections from KAT" self.target = HTTP(name="target") def config(self): yield self.target, self.format(""" --- apiVersion: ambassador/v0 kind: Module name: ambassador --- apiVersion: ambassador/v2 kind: Mapping name: {self.name}-target prefix: /target/ service: http://{self.target.path.fqdn} """) def queries(self): yield Query(self.url("target/"), headers={"X-Request-Id": "hello"}) def check(self): assert self.results[0].backend.request.headers['x-request-id'] != ['hello']
24.661017
94
0.682474
176
1,455
5.619318
0.323864
0.060667
0.060667
0.068756
0.746208
0.746208
0.746208
0.65723
0.65723
0.65723
0
0.004979
0.171821
1,455
58
95
25.086207
0.815768
0
0
0.765957
0
0
0.40756
0.019931
0
0
0
0
0.042553
1
0.170213
false
0.021277
0.042553
0
0.297872
0
0
0
0
null
0
0
0
0
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
e7fd15652284d67fbab0bf095ba8621fbd654fb7
409
py
Python
indoorair/profilebyjimmy/views.py
Jimmyjtc001/indoorair-webapp-a
e82da0512ac124fd0d5d9c31d8f537d55169cd02
[ "BSD-3-Clause" ]
null
null
null
indoorair/profilebyjimmy/views.py
Jimmyjtc001/indoorair-webapp-a
e82da0512ac124fd0d5d9c31d8f537d55169cd02
[ "BSD-3-Clause" ]
null
null
null
indoorair/profilebyjimmy/views.py
Jimmyjtc001/indoorair-webapp-a
e82da0512ac124fd0d5d9c31d8f537d55169cd02
[ "BSD-3-Clause" ]
null
null
null
from django.shortcuts import render from django.http import JsonResponse def retrieve_profile_page(request): return render(request, "profilebyjimmy/retrieve.html",{},) def update_profile_page(request): return render(request, "profilebyjimmy/update.html",{},) def update_profile_api(request): return JsonResponse({ }) def retrieve_profile_api(request): return JsonResponse({ })
21.526316
62
0.745721
46
409
6.456522
0.369565
0.175084
0.154882
0.20202
0.579125
0.343434
0.343434
0
0
0
0
0
0.146699
409
18
63
22.722222
0.851003
0
0
0.333333
0
0
0.132029
0.132029
0
0
0
0
0
1
0.333333
false
0
0.166667
0.333333
0.833333
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
f019655a6c19b2638e72bba2b8bb707f5ad6af82
87
py
Python
capstone/capweb/apps.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
null
null
null
capstone/capweb/apps.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
4
2021-09-02T20:54:31.000Z
2022-02-27T14:04:06.000Z
capstone/capweb/apps.py
jcushman/capstone
ef3ced77f69aabe14c89ab67003a6e88736bf777
[ "MIT" ]
null
null
null
from django.apps import AppConfig class CapwebConfig(AppConfig): name = 'capweb'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
f022a1ce2fa50d5cabda96e4a19bdbe183089ea6
9,382
py
Python
src/model/ch20p1305_test.py
secworks/ChaCha20-Poly1305
f9cb373191d1f73d3be3eee4e537be60df74c42f
[ "BSD-2-Clause" ]
10
2016-08-22T20:18:16.000Z
2022-01-29T23:28:19.000Z
src/model/ch20p1305_test.py
secworks/ChaCha20-Poly1305
f9cb373191d1f73d3be3eee4e537be60df74c42f
[ "BSD-2-Clause" ]
1
2017-08-24T17:07:06.000Z
2017-08-25T10:21:40.000Z
src/model/ch20p1305_test.py
secworks/ChaCha20-Poly1305
f9cb373191d1f73d3be3eee4e537be60df74c42f
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # ch20p1305_test.py # ----------------- # Simple model of the Chacha20-Poly1305 construction as specified # in RFC 7539 (https://tools.ietf.org/html/rfc7539). The model # uses the test vectors in the RFC. # # The model is used as a reference for the HW implementation. # The code follows the structure of the HW implementation as much # as possible. # # # Copyright (c) 2016 Secworks Sweden AB # Author: Joachim Strömbergson # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #======================================================================= #------------------------------------------------------------------- # Python module imports. #------------------------------------------------------------------- import sys from chacha_test import chacha_encryption from chacha_test import chacha_block from ch20p1305_utils import * #------------------------------------------------------------------- # Constants. #------------------------------------------------------------------- #------------------------------------------------------------------- # aead_chacha20_poly1305_test() # # Test that we can perform complete AEAD encryption and tag # generation. Testvectors from 2.8.2 in the RFC. #------------------------------------------------------------------- def aead_chacha20_poly1305_test(): plaintext = [0x4c, 0x61, 0x64, 0x69, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x47, 0x65, 0x6e, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x27, 0x39, 0x39, 0x3a, 0x20, 0x49, 0x66, 0x20, 0x49, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x66, 0x65, 0x72, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x69, 0x70, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x2c, 0x20, 0x73, 0x75, 0x6e, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, 0x74, 0x2e] aad = [0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7] key = [0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f] iv = [0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47] common = [0x07, 0x00, 0x00, 0x00] ciphertext = [0xd3, 0x1a, 0x8d, 0x34, 0x64, 0x8e, 0x60, 0xdb, 0x7b, 0x86, 0xaf, 0xbc, 0x53, 0xef, 0x7e, 0xc2, 0xa4, 0xad, 0xed, 0x51, 0x29, 0x6e, 0x08, 0xfe, 0xa9, 0xe2, 0xb5, 0xa7, 0x36, 0xee, 0x62, 0xd6, 0x3d, 0xbe, 0xa4, 0x5e, 0x8c, 0xa9, 0x67, 0x12, 0x82, 0xfa, 0xfb, 0x69, 0xda, 0x92, 0x72, 0x8b, 0x1a, 0x71, 0xde, 0x0a, 0x9e, 0x06, 0x0b, 0x29, 0x05, 0xd6, 0xa5, 0xb6, 0x7e, 0xcd, 0x3b, 0x36, 0x92, 0xdd, 0xbd, 0x7f, 0x2d, 0x77, 0x8b, 0x8c, 0x98, 0x03, 0xae, 0xe3, 0x28, 0x09, 0x1b, 0x58, 0xfa, 0xb3, 0x24, 0xe4, 0xfa, 0xd6, 0x75, 0x94, 0x55, 0x85, 0x80, 0x8b, 0x48, 0x31, 0xd7, 0xbc, 0x3f, 0xf4, 0xde, 0xf0, 0x8e, 0x4b, 0x7a, 0x9d, 0xe5, 0x76, 0xd2, 0x65, 0x86, 0xce, 0xc6, 0x4b, 0x61, 0x16] aead_construct = [0x50, 0x51, 0x52, 0x53, 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x1a, 0x8d, 0x34, 0x64, 0x8e, 0x60, 0xdb, 0x7b, 0x86, 0xaf, 0xbc, 0x53, 0xef, 0x7e, 0xc2, 0xa4, 0xad, 0xed, 0x51, 0x29, 0x6e, 0x08, 0xfe, 0xa9, 0xe2, 0xb5, 0xa7, 0x36, 0xee, 0x62, 0xd6, 0x3d, 0xbe, 0xa4, 0x5e, 0x8c, 0xa9, 0x67, 0x12, 0x82, 0xfa, 0xfb, 0x69, 0xda, 0x92, 0x72, 0x8b, 0x1a, 0x71, 0xde, 0x0a, 0x9e, 0x06, 0x0b, 0x29, 0x05, 0xd6, 0xa5, 0xb6, 0x7e, 0xcd, 0x3b, 0x36, 0x92, 0xdd, 0xbd, 0x7f, 0x2d, 0x77, 0x8b, 0x8c, 0x98, 0x03, 0xae, 0xe3, 0x28, 0x09, 0x1b, 0x58, 0xfa, 0xb3, 0x24, 0xe4, 0xfa, 0xd6, 0x75, 0x94, 0x55, 0x85, 0x80, 0x8b, 0x48, 0x31, 0xd7, 0xbc, 0x3f, 0xf4, 0xde, 0xf0, 0x8e, 0x4b, 0x7a, 0x9d, 0xe5, 0x76, 0xd2, 0x65, 0x86, 0xce, 0xc6, 0x4b, 0x61, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] tag = [0x1a, 0xe1, 0x0b, 0x59, 0x4f, 0x09, 0xe2, 0x6a, 0x7e, 0x90, 0x2e, 0xcb, 0xd0, 0x60, 0x06, 0x91] #------------------------------------------------------------------- # poly1305_keygen_test() # # Test that we can generate a correct Poly1305 key using chacha20. # Testvectors from 2.6.2 in the RFC. #------------------------------------------------------------------- def poly1305_keygen_test(): key_bytes = [0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f] key = l2lw32(key_bytes) nonce_bytes = [0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07] nonce = l2lw32(nonce_bytes) counter = 0x00000000; print("*** Test of the Poly1305 key generation using ChaCha20 block function.") block = chacha_block(key, counter, nonce) print("Generated block bytes:") block_bytes = w32bl(block) print_bytelist(0, block_bytes) print() p1305_key_bytes = block_bytes[0:32] print("Generated key bytes:") print_bytelist(0, p1305_key_bytes) print() #------------------------------------------------------------------- # ch20p1305_tests() #------------------------------------------------------------------- def ch20p1305_tests(): key = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] counter = 0x00000001 nonce = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x00, 0x00, 0x00, 0x00] ptext = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00] print("*** Test of the Ch20P1305 AEAD function.") ciphertext = chacha_encryption(key, counter, nonce, ptext) print("Ciphertext:") print(ciphertext) print() #------------------------------------------------------------------- # main() # # If executed tests the ChaCha class using known test vectors. #------------------------------------------------------------------- def main(): ch20p1305_tests() poly1305_keygen_test() #------------------------------------------------------------------- # __name__ # Python thingy which allows the file to be run standalone as # well as parsed from within a Python interpreter. #------------------------------------------------------------------- if __name__=="__main__": # Run the main function. sys.exit(main()) #======================================================================= # EOF ch20p1305_test.py #=======================================================================
43.841121
83
0.520358
1,065
9,382
4.537089
0.347418
0.173841
0.235927
0.281457
0.425083
0.371689
0.371689
0.354305
0.354305
0.354305
0
0.231088
0.254637
9,382
213
84
44.046948
0.459888
0.367619
0
0.396226
0
0
0.029211
0
0
0
0.399727
0
0
1
0.037736
false
0
0.037736
0
0.075472
0.103774
0
0
0
null
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f026b90cddbad4a242a2dc6f4d32ab0590dc7568
133
py
Python
firstlanguage_python/controllers/__init__.py
FirstLanguage/fl-python
1db77bbf41a78159451abb91e4e0cf3fd519ec54
[ "MIT" ]
null
null
null
firstlanguage_python/controllers/__init__.py
FirstLanguage/fl-python
1db77bbf41a78159451abb91e4e0cf3fd519ec54
[ "MIT" ]
null
null
null
firstlanguage_python/controllers/__init__.py
FirstLanguage/fl-python
1db77bbf41a78159451abb91e4e0cf3fd519ec54
[ "MIT" ]
null
null
null
__all__ = [ 'base_controller', 'basic_api_controller', 'advanced_api_controller', 'enterprise_only_controller', ]
19
33
0.684211
12
133
6.666667
0.666667
0.325
0
0
0
0
0
0
0
0
0
0
0.203008
133
6
34
22.166667
0.754717
0
0
0
0
0
0.646154
0.376923
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
f03c7c3709d218b89a925eeb8a6fa52a2dfc029e
342
py
Python
api/python/arrus/exceptions.py
us4useu/arrus
10487b09f556e327ddb1bec28fbaccf3b8b08064
[ "BSL-1.0", "MIT" ]
11
2021-02-04T19:56:08.000Z
2022-02-18T09:41:51.000Z
api/python/arrus/exceptions.py
us4useu/arrus
10487b09f556e327ddb1bec28fbaccf3b8b08064
[ "BSL-1.0", "MIT" ]
60
2020-11-06T04:59:06.000Z
2022-03-12T17:39:06.000Z
api/python/arrus/exceptions.py
us4useu/arrus
10487b09f556e327ddb1bec28fbaccf3b8b08064
[ "BSL-1.0", "MIT" ]
4
2021-07-22T16:13:06.000Z
2021-12-13T08:53:31.000Z
""" Definition of exceptions thrown by arrus functions. """ class ArrusError(Exception): pass class IllegalArgumentError(ArrusError, ValueError): pass class DeviceNotFoundError(ArrusError, ValueError): pass class IllegalStateError(ArrusError, RuntimeError): pass class TimeoutError(ArrusError, TimeoutError): pass
15.545455
51
0.760234
31
342
8.387097
0.548387
0.138462
0.184615
0.223077
0
0
0
0
0
0
0
0
0.163743
342
22
52
15.545455
0.909091
0.149123
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
f04067aa4244c1edd7dcd0e3d35eb4b84b236ae9
28,430
py
Python
controller/api/south_migrations/0007_auto__del_flavor__del_unique_flavor_owner_id__del_layer__del_unique_la.py
yun-an/deis
de27c11475bb7ca24816f288aa115699a1c37e26
[ "Apache-2.0" ]
3,375
2015-01-01T04:03:45.000Z
2022-02-08T14:53:45.000Z
controller/api/south_migrations/0007_auto__del_flavor__del_unique_flavor_owner_id__del_layer__del_unique_la.py
yun-an/deis
de27c11475bb7ca24816f288aa115699a1c37e26
[ "Apache-2.0" ]
2,422
2015-01-01T02:40:01.000Z
2021-11-30T07:50:32.000Z
controller/api/south_migrations/0007_auto__del_flavor__del_unique_flavor_owner_id__del_layer__del_unique_la.py
yun-an/deis
de27c11475bb7ca24816f288aa115699a1c37e26
[ "Apache-2.0" ]
688
2015-01-01T00:36:48.000Z
2022-01-22T00:32:07.000Z
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'Container', fields ['formation', 'port'] db.delete_unique(u'api_container', ['formation_id', 'port']) # Removing unique constraint on 'Container', fields ['app', 'type', 'num'] db.delete_unique(u'api_container', ['app_id', 'type', 'num']) # Removing unique constraint on 'Config', fields ['app', 'version'] db.delete_unique(u'api_config', ['app_id', 'version']) # Removing unique constraint on 'Formation', fields ['owner', 'id'] db.delete_unique(u'api_formation', ['owner_id', 'id']) # Removing unique constraint on 'Node', fields ['formation', 'id'] db.delete_unique(u'api_node', ['formation_id', 'id']) # Removing unique constraint on 'Provider', fields ['owner', 'id'] db.delete_unique(u'api_provider', ['owner_id', 'id']) # Removing unique constraint on 'Layer', fields ['formation', 'id'] db.delete_unique(u'api_layer', ['formation_id', 'id']) # Removing unique constraint on 'Flavor', fields ['owner', 'id'] db.delete_unique(u'api_flavor', ['owner_id', 'id']) # Deleting model 'Flavor' db.delete_table(u'api_flavor') # Deleting model 'Layer' db.delete_table(u'api_layer') # Deleting model 'Provider' db.delete_table(u'api_provider') # Deleting model 'Node' db.delete_table(u'api_node') # Deleting model 'Formation' db.delete_table(u'api_formation') # Adding model 'Cluster' db.create_table(u'api_cluster', ( ('uuid', self.gf('api.fields.UuidField')(unique=True, max_length=32, primary_key=True)), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=128)), ('type', self.gf('django.db.models.fields.CharField')(max_length=16)), ('domain', self.gf('django.db.models.fields.CharField')(max_length=128)), ('hosts', self.gf('django.db.models.fields.CharField')(max_length=256)), ('auth', self.gf('django.db.models.fields.TextField')()), ('options', self.gf('json_field.fields.JSONField')(default=u'{}', blank=True)), )) db.send_create_signal(u'api', ['Cluster']) # Changing field 'Release.build' db.alter_column(u'api_release', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(default='5e5dba0d-a7fe-4019-b392-62b7b993f1a8', to=orm['api.Build'])) # Deleting field 'Config.version' db.delete_column(u'api_config', 'version') # Adding unique constraint on 'Config', fields ['app', 'uuid'] db.create_unique(u'api_config', ['app_id', 'uuid']) # Deleting field 'Container.node' db.delete_column(u'api_container', 'node_id') # Deleting field 'Container.status' db.delete_column(u'api_container', 'status') # Deleting field 'Container.formation' db.delete_column(u'api_container', 'formation_id') # Deleting field 'Container.port' db.delete_column(u'api_container', 'port') # Adding field 'Container.release' db.add_column(u'api_container', 'release', self.gf('django.db.models.fields.related.ForeignKey')(default='5e5dba0d-a7fe-4019-b392-62b7b993f1a8', to=orm['api.Release']), keep_default=False) # Adding field 'Container.state' db.add_column(u'api_container', 'state', self.gf('django.db.models.fields.CharField')(default=u'initializing', max_length=64), keep_default=False) # Deleting field 'Build.procfile' db.delete_column(u'api_build', 'procfile') # Deleting field 'Build.size' db.delete_column(u'api_build', 'size') # Deleting field 'Build.url' db.delete_column(u'api_build', 'url') # Deleting field 'Build.checksum' db.delete_column(u'api_build', 'checksum') # Deleting field 'Build.dockerfile' db.delete_column(u'api_build', 'dockerfile') # Deleting field 'Build.sha' db.delete_column(u'api_build', 'sha') # Deleting field 'Build.output' db.delete_column(u'api_build', 'output') # Deleting field 'Build.config' db.delete_column(u'api_build', 'config') # Deleting field 'App.formation' db.delete_column(u'api_app', 'formation_id') # Deleting field 'App.containers' db.delete_column(u'api_app', 'containers') # Adding field 'App.cluster' db.add_column(u'api_app', 'cluster', self.gf('django.db.models.fields.related.ForeignKey')(default='5e5dba0d-a7fe-4019-b392-62b7b993f1a8', to=orm['api.Cluster']), keep_default=False) # Adding field 'App.structure' db.add_column(u'api_app', 'structure', self.gf('json_field.fields.JSONField')(default=u'{}', blank=True), keep_default=False) def backwards(self, orm): # Removing unique constraint on 'Config', fields ['app', 'uuid'] db.delete_unique(u'api_config', ['app_id', 'uuid']) # Adding model 'Flavor' db.create_table(u'api_flavor', ( ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), ('params', self.gf('json_field.fields.JSONField')(default=u'null', blank=True)), ('uuid', self.gf('api.fields.UuidField')(max_length=32, unique=True, primary_key=True)), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('provider', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Provider'])), ('id', self.gf('django.db.models.fields.SlugField')(max_length=64)), )) db.send_create_signal(u'api', ['Flavor']) # Adding unique constraint on 'Flavor', fields ['owner', 'id'] db.create_unique(u'api_flavor', ['owner_id', 'id']) # Adding model 'Layer' db.create_table(u'api_layer', ( ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), ('ssh_port', self.gf('django.db.models.fields.SmallIntegerField')(default=22)), ('ssh_username', self.gf('django.db.models.fields.CharField')(default=u'ubuntu', max_length=64)), ('formation', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Formation'])), ('proxy', self.gf('django.db.models.fields.BooleanField')(default=False)), ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('flavor', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Flavor'])), ('id', self.gf('django.db.models.fields.SlugField')(max_length=64)), ('uuid', self.gf('api.fields.UuidField')(max_length=32, unique=True, primary_key=True)), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), ('ssh_public_key', self.gf('django.db.models.fields.TextField')()), ('runtime', self.gf('django.db.models.fields.BooleanField')(default=False)), ('config', self.gf('json_field.fields.JSONField')(default=u'{}', blank=True)), ('ssh_private_key', self.gf('django.db.models.fields.TextField')()), )) db.send_create_signal(u'api', ['Layer']) # Adding unique constraint on 'Layer', fields ['formation', 'id'] db.create_unique(u'api_layer', ['formation_id', 'id']) # Adding model 'Provider' db.create_table(u'api_provider', ( ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), ('uuid', self.gf('api.fields.UuidField')(max_length=32, unique=True, primary_key=True)), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('type', self.gf('django.db.models.fields.SlugField')(max_length=16)), ('id', self.gf('django.db.models.fields.SlugField')(max_length=64)), ('creds', self.gf('json_field.fields.JSONField')(default=u'null', blank=True)), )) db.send_create_signal(u'api', ['Provider']) # Adding unique constraint on 'Provider', fields ['owner', 'id'] db.create_unique(u'api_provider', ['owner_id', 'id']) # Adding model 'Node' db.create_table(u'api_node', ( ('status', self.gf('json_field.fields.JSONField')(default=u'null', null=True, blank=True)), ('layer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Layer'])), ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), ('num', self.gf('django.db.models.fields.PositiveIntegerField')()), ('formation', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Formation'])), ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('id', self.gf('django.db.models.fields.CharField')(max_length=64)), ('uuid', self.gf('api.fields.UuidField')(max_length=32, unique=True, primary_key=True)), ('provider_id', self.gf('django.db.models.fields.SlugField')(max_length=64, null=True, blank=True)), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), ('fqdn', self.gf('django.db.models.fields.CharField')(max_length=256, null=True, blank=True)), )) db.send_create_signal(u'api', ['Node']) # Adding unique constraint on 'Node', fields ['formation', 'id'] db.create_unique(u'api_node', ['formation_id', 'id']) # Adding model 'Formation' db.create_table(u'api_formation', ( ('domain', self.gf('django.db.models.fields.CharField')(max_length=128, null=True, blank=True)), ('updated', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)), ('uuid', self.gf('api.fields.UuidField')(max_length=32, unique=True, primary_key=True)), ('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)), ('owner', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])), ('nodes', self.gf('json_field.fields.JSONField')(default=u'{}', blank=True)), ('id', self.gf('django.db.models.fields.SlugField')(max_length=64, unique=True)), )) db.send_create_signal(u'api', ['Formation']) # Adding unique constraint on 'Formation', fields ['owner', 'id'] db.create_unique(u'api_formation', ['owner_id', 'id']) # Deleting model 'Cluster' db.delete_table(u'api_cluster') # Changing field 'Release.build' db.alter_column(u'api_release', 'build_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Build'], null=True)) # User chose to not deal with backwards NULL issues for 'Config.version' raise RuntimeError("Cannot reverse this migration. 'Config.version' and its values cannot be restored.") # The following code is provided here to aid in writing a correct migration # Adding field 'Config.version' db.add_column(u'api_config', 'version', self.gf('django.db.models.fields.PositiveIntegerField')(), keep_default=False) # Adding unique constraint on 'Config', fields ['app', 'version'] db.create_unique(u'api_config', ['app_id', 'version']) # User chose to not deal with backwards NULL issues for 'Container.node' raise RuntimeError("Cannot reverse this migration. 'Container.node' and its values cannot be restored.") # The following code is provided here to aid in writing a correct migration # Adding field 'Container.node' db.add_column(u'api_container', 'node', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Node']), keep_default=False) # Adding field 'Container.status' db.add_column(u'api_container', 'status', self.gf('django.db.models.fields.CharField')(default=u'up', max_length=64), keep_default=False) # User chose to not deal with backwards NULL issues for 'Container.formation' raise RuntimeError("Cannot reverse this migration. 'Container.formation' and its values cannot be restored.") # The following code is provided here to aid in writing a correct migration # Adding field 'Container.formation' db.add_column(u'api_container', 'formation', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Formation']), keep_default=False) # User chose to not deal with backwards NULL issues for 'Container.port' raise RuntimeError("Cannot reverse this migration. 'Container.port' and its values cannot be restored.") # The following code is provided here to aid in writing a correct migration # Adding field 'Container.port' db.add_column(u'api_container', 'port', self.gf('django.db.models.fields.PositiveIntegerField')(), keep_default=False) # Deleting field 'Container.release' db.delete_column(u'api_container', 'release_id') # Deleting field 'Container.state' db.delete_column(u'api_container', 'state') # Adding unique constraint on 'Container', fields ['app', 'type', 'num'] db.create_unique(u'api_container', ['app_id', 'type', 'num']) # Adding unique constraint on 'Container', fields ['formation', 'port'] db.create_unique(u'api_container', ['formation_id', 'port']) # Adding field 'Build.procfile' db.add_column(u'api_build', 'procfile', self.gf('json_field.fields.JSONField')(default=u'null', blank=True), keep_default=False) # Adding field 'Build.size' db.add_column(u'api_build', 'size', self.gf('django.db.models.fields.IntegerField')(null=True, blank=True), keep_default=False) # User chose to not deal with backwards NULL issues for 'Build.url' raise RuntimeError("Cannot reverse this migration. 'Build.url' and its values cannot be restored.") # The following code is provided here to aid in writing a correct migration # Adding field 'Build.url' db.add_column(u'api_build', 'url', self.gf('django.db.models.fields.URLField')(max_length=200), keep_default=False) # Adding field 'Build.checksum' db.add_column(u'api_build', 'checksum', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) # Adding field 'Build.dockerfile' db.add_column(u'api_build', 'dockerfile', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False) # Adding field 'Build.sha' db.add_column(u'api_build', 'sha', self.gf('django.db.models.fields.CharField')(default='', max_length=255, blank=True), keep_default=False) # Adding field 'Build.output' db.add_column(u'api_build', 'output', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False) # Adding field 'Build.config' db.add_column(u'api_build', 'config', self.gf('json_field.fields.JSONField')(default=u'null', blank=True), keep_default=False) # User chose to not deal with backwards NULL issues for 'App.formation' raise RuntimeError("Cannot reverse this migration. 'App.formation' and its values cannot be restored.") # The following code is provided here to aid in writing a correct migration # Adding field 'App.formation' db.add_column(u'api_app', 'formation', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['api.Formation']), keep_default=False) # Adding field 'App.containers' db.add_column(u'api_app', 'containers', self.gf('json_field.fields.JSONField')(default=u'{}', blank=True), keep_default=False) # Deleting field 'App.cluster' db.delete_column(u'api_app', 'cluster_id') # Deleting field 'App.structure' db.delete_column(u'api_app', 'structure') models = { u'api.app': { 'Meta': {'object_name': 'App'}, 'cluster': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Cluster']"}), 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '64'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'structure': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) }, u'api.build': { 'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'app', u'uuid'),)", 'object_name': 'Build'}, 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'image': ('django.db.models.fields.CharField', [], {'max_length': '256'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) }, u'api.cluster': { 'Meta': {'object_name': 'Cluster'}, 'auth': ('django.db.models.fields.TextField', [], {}), 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'domain': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'hosts': ('django.db.models.fields.CharField', [], {'max_length': '256'}), 'id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '128'}), 'options': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'type': ('django.db.models.fields.CharField', [], {'max_length': '16'}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) }, u'api.config': { 'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'app', u'uuid'),)", 'object_name': 'Config'}, 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}), 'values': ('json_field.fields.JSONField', [], {'default': "u'{}'", 'blank': 'True'}) }, u'api.container': { 'Meta': {'ordering': "[u'created']", 'object_name': 'Container'}, 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'num': ('django.db.models.fields.PositiveIntegerField', [], {}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'release': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Release']"}), 'state': ('django.db.models.fields.CharField', [], {'default': "u'initializing'", 'max_length': '64'}), 'type': ('django.db.models.fields.CharField', [], {'max_length': '128', 'blank': 'True'}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) }, u'api.key': { 'Meta': {'unique_together': "((u'owner', u'id'),)", 'object_name': 'Key'}, 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'id': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'public': ('django.db.models.fields.TextField', [], {'unique': 'True'}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) }, u'api.push': { 'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'app', u'uuid'),)", 'object_name': 'Push'}, 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'fingerprint': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'receive_repo': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'receive_user': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'sha': ('django.db.models.fields.CharField', [], {'max_length': '40'}), 'ssh_connection': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'ssh_original_command': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}) }, u'api.release': { 'Meta': {'ordering': "[u'-created']", 'unique_together': "((u'app', u'version'),)", 'object_name': 'Release'}, 'app': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.App']"}), 'build': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Build']"}), 'config': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['api.Config']"}), 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']"}), 'summary': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'uuid': ('api.fields.UuidField', [], {'unique': 'True', 'max_length': '32', 'primary_key': 'True'}), 'version': ('django.db.models.fields.PositiveIntegerField', [], {}) }, u'auth.group': { 'Meta': {'object_name': 'Group'}, u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) }, u'auth.permission': { 'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'}, 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) }, u'auth.user': { 'Meta': {'object_name': 'User'}, 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}), 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}) }, u'contenttypes.contenttype': { 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) } } complete_apps = ['api']
59.106029
195
0.589518
3,323
28,430
4.927174
0.06139
0.067917
0.117999
0.16857
0.855433
0.806755
0.726379
0.672876
0.55787
0.512551
0
0.009064
0.212241
28,430
481
196
59.106029
0.722004
0.12733
0
0.335443
0
0
0.464432
0.235128
0
0
0
0
0
1
0.006329
false
0.003165
0.012658
0
0.028481
0.003165
0
0
0
null
0
0
1
1
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
4
f04c613baa1c6a4b96b5e7f7576756130af354f9
619
py
Python
util/colorlog.py
spWang/gitHooks
b98ccb25c2d683a3cec293a7b93458961d9b9dab
[ "MIT" ]
11
2017-08-09T08:05:09.000Z
2018-04-10T01:49:24.000Z
util/colorlog.py
spWang/gitHooks
b98ccb25c2d683a3cec293a7b93458961d9b9dab
[ "MIT" ]
null
null
null
util/colorlog.py
spWang/gitHooks
b98ccb25c2d683a3cec293a7b93458961d9b9dab
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 import re, os, sys def logblack(msg): print "\033[1;30;1m%s\033[0m" % msg; pass def logred(msg): print "\033[1;31;1m%s\033[0m" % msg; pass def loggreen(msg): print "\033[1;32;1m%s\033[0m" % msg; pass def logyellow(msg): print "\033[1;33;1m%s\033[0m" % msg; pass def logblue(msg): print "\033[1;34;1m%s\033[0m" % msg; pass def logpurple(msg): print "\033[1;35;1m%s\033[0m" % msg; pass def logbule_green(msg): print "\033[1;36;1m%s\033[0m" % msg; pass def loggray(msg): print "\033[1;37;1m%s\033[0m" % msg; pass
17.194444
40
0.583199
116
619
3.103448
0.318966
0.177778
0.244444
0.266667
0.391667
0.391667
0.35
0
0
0
0
0.184265
0.219709
619
36
41
17.194444
0.561077
0.053312
0
0.32
0
0
0.287179
0.287179
0
0
0
0
0
0
null
null
0.32
0.04
null
null
0.32
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
4
f05bf85f9be16c1041151e2b829c58fffedac804
162
py
Python
virtualenv-test.py
vanbelle/CMPUT404--Lab1
9b77f9547b6db8b97b1ca1d96935522f63c30975
[ "Apache-2.0" ]
null
null
null
virtualenv-test.py
vanbelle/CMPUT404--Lab1
9b77f9547b6db8b97b1ca1d96935522f63c30975
[ "Apache-2.0" ]
null
null
null
virtualenv-test.py
vanbelle/CMPUT404--Lab1
9b77f9547b6db8b97b1ca1d96935522f63c30975
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import requests print requests.__version__ response = requests.get('http://google.com/') print response.status_code print response.text
14.727273
45
0.777778
22
162
5.5
0.727273
0.214876
0
0
0
0
0
0
0
0
0
0
0.104938
162
10
46
16.2
0.834483
0.123457
0
0
0
0
0.12766
0
0
0
0
0
0
0
null
null
0
0.2
null
null
0.6
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
1
0
4
f073b6b80fdd7fb7f5c4362d00b7264d9a573588
397
py
Python
mini-programs/memoization.py
fhansmann/coding-local
6cb8e8fb8ad7ac619dfdd068cfd70559b04e4b6a
[ "MIT" ]
null
null
null
mini-programs/memoization.py
fhansmann/coding-local
6cb8e8fb8ad7ac619dfdd068cfd70559b04e4b6a
[ "MIT" ]
null
null
null
mini-programs/memoization.py
fhansmann/coding-local
6cb8e8fb8ad7ac619dfdd068cfd70559b04e4b6a
[ "MIT" ]
null
null
null
import time ef_cache = {} def expensive_func(num): if num in ef_cache: return ef_cache[num] print "Computing {}...".format(num) time.sleep(1) result = num*num ef_cache[num] = result return result result = expensive_func(4) print result result = expensive_func(10) print result result = expensive_func(4) print result result = expensive_func(10) print result
15.269231
39
0.690176
57
397
4.649123
0.333333
0.245283
0.316981
0.377358
0.498113
0.498113
0.498113
0.498113
0.498113
0.498113
0
0.022364
0.211587
397
25
40
15.88
0.824281
0
0
0.444444
0
0
0.037783
0
0
0
0
0
0
0
null
null
0
0.055556
null
null
0.277778
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
0
0
0
0
0
0
4
f079c2d3b02cb61a8f6cfd3829485422547df85c
1,514
py
Python
src/estacao.py
JnCM/TP_redes
63cd8dc5814bb3e76b9ca4d75c2cd04da67db5a6
[ "MIT" ]
null
null
null
src/estacao.py
JnCM/TP_redes
63cd8dc5814bb3e76b9ca4d75c2cd04da67db5a6
[ "MIT" ]
null
null
null
src/estacao.py
JnCM/TP_redes
63cd8dc5814bb3e76b9ca4d75c2cd04da67db5a6
[ "MIT" ]
null
null
null
#coding: utf-8 #Classe que define uma estação da simulação class Estacao: #Construtor da classe def __init__(self, idEstacao): #Atributo responsável por armazenar o identificador de uma estação self.idEstacao = idEstacao #Atributo responsável por armazenar o slot de transmissão correspondente de uma estação self.slot = 1 #Atributo responsável por indicar se uma estação transmitiu seu quadro self.transmitiu = 0 #Atributo responsável por indicar o número de colisões sucessivas de uma estação self.nColisoes = 0 #Método que altera o valor do slot de uma estação def setSlot(self, novoSlot): self.slot = novoSlot #Método que altera o valor da flag que indica se uma estação transmitiu def setTransmitiu(self): self.transmitiu = 1 #Método que retorna o identificador de uma estação def getIdEstacao(self): return self.idEstacao #Método que retorna o respectivo slot de uma estação def getSlot(self): return self.slot #Método que retorna a flag de transmissão de uma estação def getTransmitiu(self): return self.transmitiu #Método que retorna o número de colisões sucessivas de uma estação def getNColisoes(self): return self.nColisoes #Método que incrementa o número de colisões sucessivas de uma estação def incrementaColisao(self): self.nColisoes += 1
34.409091
96
0.67107
189
1,514
5.354497
0.301587
0.118577
0.106719
0.088933
0.332016
0.202569
0.121542
0.121542
0.083004
0
0
0.005566
0.287979
1,514
43
97
35.209302
0.93321
0.515192
0
0
0
0
0
0
0
0
0
0.023256
0
1
0.4
false
0
0
0.2
0.65
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
1
1
0
0
4
b2ea9d5f31c76e9dd14529f3cd49285a03a5fde6
25,967
py
Python
tests/fixtures/authenticate.py
rackmetzler/pitchfork
af0ff8284214b53d6331c55ac38711c449e562a3
[ "Apache-2.0" ]
17
2015-11-05T10:55:05.000Z
2020-05-14T15:51:33.000Z
tests/fixtures/authenticate.py
rackmetzler/pitchfork
af0ff8284214b53d6331c55ac38711c449e562a3
[ "Apache-2.0" ]
7
2015-12-29T20:15:28.000Z
2018-10-17T18:17:26.000Z
tests/fixtures/authenticate.py
rackmetzler/pitchfork
af0ff8284214b53d6331c55ac38711c449e562a3
[ "Apache-2.0" ]
6
2016-01-21T19:09:14.000Z
2018-09-22T03:04:32.000Z
# Copyright 2014 Dave Kludt # # 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. auth_return = { 'access': { 'token': { 'RAX-AUTH:authenticatedBy': [ 'APIKEY' ], 'expires': '2015-06-23T12:44:18.758Z', 'id': '183e2f66535d4e03a04b2a91cf4a4f83', 'tenant': { 'id': '123456', 'name': '123456' } }, 'serviceCatalog': [ { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://cdn5.clouddrive.com/' 'v1/MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' }, { 'region': 'SYD', 'publicURL': ( 'https://cdn4.clouddrive.com/v1/' 'MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' }, { 'region': 'DFW', 'publicURL': ( 'https://cdn1.clouddrive.com/v1/' 'MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' }, { 'region': 'HKG', 'publicURL': ( 'https://cdn6.clouddrive.com/v1/' 'MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' } ], 'type': 'rax:object-cdn', 'name': 'cloudFilesCDN' }, { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://storage101.iad3.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'internalURL': ( 'https://snet-storage101.iad3.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' }, { 'region': 'SYD', 'publicURL': ( 'https://storage101.syd2.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'internalURL': ( 'https://snet-storage101.syd2.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' }, { 'region': 'DFW', 'publicURL': ( 'https://storage101.dfw1.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'internalURL': ( 'https://snet-storage101.dfw1.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' }, { 'region': 'HKG', 'publicURL': ( 'https://storage101.hkg1.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'internalURL': ( 'https://snet-storage101.hkg1.clouddrive.com/v1' '/MossoCloudFS_123456' ), 'tenantId': 'MossoCloudFS_123456' } ], 'type': 'object-store', 'name': 'cloudFiles' }, { 'endpoints': [ { 'region': 'DFW', 'publicURL': ( 'https://dfw.blockstorage.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.blockstorage.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'IAD', 'publicURL': ( 'https://iad.blockstorage.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'HKG', 'publicURL': ( 'https://hkg.blockstorage.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' } ], 'type': 'volume', 'name': 'cloudBlockStorage' }, { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://iad.images.api.rackspacecloud.com/v2' ), 'tenantId': '123456' }, { 'region': 'HKG', 'publicURL': ( 'https://hkg.images.api.rackspacecloud.com/v2' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.images.api.rackspacecloud.com/v2' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.images.api.rackspacecloud.com/v2' ), 'tenantId': '123456' } ], 'type': 'image', 'name': 'cloudImages' }, { 'endpoints': [ { 'region': 'HKG', 'publicURL': ( 'https://hkg.queues.api.rackspacecloud.com/' 'v1/123456' ), 'internalURL': ( 'https://snet-hkg.queues.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.queues.api.rackspacecloud.com/' 'v1/123456' ), 'internalURL': ( 'https://snet-syd.queues.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.queues.api.rackspacecloud.com/' 'v1/123456' ), 'internalURL': ( 'https://snet-dfw.queues.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'IAD', 'publicURL': ( 'https://iad.queues.api.rackspacecloud.com/' 'v1/123456' ), 'internalURL': ( 'https://snet-iad.queues.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' } ], 'type': 'rax:queues', 'name': 'cloudQueues' }, { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://iad.bigdata.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.bigdata.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:bigdata', 'name': 'cloudBigData' }, { 'endpoints': [ { 'region': 'HKG', 'publicURL': ( 'https://hkg.orchestration.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.orchestration.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'IAD', 'publicURL': ( 'https://iad.orchestration.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.orchestration.api.rackspacecloud.com/' 'v1/123456' ), 'tenantId': '123456' } ], 'type': 'orchestration', 'name': 'cloudOrchestration' }, { 'endpoints': [ { 'region': 'IAD', 'tenantId': '123456', 'versionId': '2', 'versionList': ( 'https://iad.servers.api.rackspacecloud.com/' ), 'versionInfo': ( 'https://iad.servers.api.rackspacecloud.com/v2' ), 'publicURL': ( 'https://iad.servers.api.rackspacecloud.com/' 'v2/123456' ) }, { 'region': 'DFW', 'tenantId': '123456', 'versionId': '2', 'versionList': ( 'https://dfw.servers.api.rackspacecloud.com/' ), 'versionInfo': ( 'https://dfw.servers.api.rackspacecloud.com/v2' ), 'publicURL': ( 'https://dfw.servers.api.rackspacecloud.com/' 'v2/123456' ) }, { 'region': 'SYD', 'tenantId': '123456', 'versionId': '2', 'versionList': ( 'https://syd.servers.api.rackspacecloud.com/' ), 'versionInfo': ( 'https://syd.servers.api.rackspacecloud.com/v2' ), 'publicURL': ( 'https://syd.servers.api.rackspacecloud.com/' 'v2/123456' ) }, { 'region': 'HKG', 'tenantId': '123456', 'versionId': '2', 'versionList': ( 'https://hkg.servers.api.rackspacecloud.com/' ), 'versionInfo': ( 'https://hkg.servers.api.rackspacecloud.com/v2' ), 'publicURL': ( 'https://hkg.servers.api.rackspacecloud.com/' 'v2/123456' ) } ], 'type': 'compute', 'name': 'cloudServersOpenStack' }, { 'endpoints': [ { 'region': 'DFW', 'publicURL': ( 'https://dfw.autoscale.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'HKG', 'publicURL': ( 'https://hkg.autoscale.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'IAD', 'publicURL': ( 'https://iad.autoscale.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.autoscale.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:autoscale', 'name': 'autoscale' }, { 'endpoints': [ { 'region': 'DFW', 'publicURL': ( 'https://dfw.databases.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'IAD', 'publicURL': ( 'https://iad.databases.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.databases.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'HKG', 'publicURL': ( 'https://hkg.databases.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:database', 'name': 'cloudDatabases' }, { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://iad.backup.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'HKG', 'publicURL': ( 'https://hkg.backup.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.backup.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.backup.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:backup', 'name': 'cloudBackup' }, { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://iad.networks.api.rackspacecloud.com/v2.0' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.networks.api.rackspacecloud.com/v2.0' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.networks.api.rackspacecloud.com/v2.0' ), 'tenantId': '123456' }, { 'region': 'HKG', 'publicURL': ( 'https://hkg.networks.api.rackspacecloud.com/v2.0' ), 'tenantId': '123456' } ], 'type': 'network', 'name': 'cloudNetworks' }, { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://iad.loadbalancers.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'HKG', 'publicURL': ( 'https://hkg.loadbalancers.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.loadbalancers.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.loadbalancers.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:load-balancer', 'name': 'cloudLoadBalancers' }, { 'endpoints': [ { 'region': 'IAD', 'publicURL': ( 'https://global.metrics.api.rackspacecloud.com/' 'v2.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:cloudmetrics', 'name': 'cloudMetrics' }, { 'endpoints': [ { 'region': 'HKG', 'publicURL': ( 'https://hkg.feeds.api.rackspacecloud.com/123456' ), 'internalURL': ( 'https://atom.prod.hkg1.us.ci.rackspace.net/123456' ), 'tenantId': '123456' }, { 'region': 'SYD', 'publicURL': ( 'https://syd.feeds.api.rackspacecloud.com/123456' ), 'internalURL': ( 'https://atom.prod.syd2.us.ci.rackspace.net/123456' ), 'tenantId': '123456' }, { 'region': 'IAD', 'publicURL': ( 'https://iad.feeds.api.rackspacecloud.com/123456' ), 'internalURL': ( 'https://atom.prod.iad3.us.ci.rackspace.net/123456' ), 'tenantId': '123456' }, { 'region': 'DFW', 'publicURL': ( 'https://dfw.feeds.api.rackspacecloud.com/123456' ), 'internalURL': ( 'https://atom.prod.dfw1.us.ci.rackspace.net/123456' ), 'tenantId': '123456' }, { 'region': 'ORD', 'publicURL': ( 'https://ord.feeds.api.rackspacecloud.com/123456' ), 'internalURL': ( 'https://atom.prod.ord1.us.ci.rackspace.net/123456' ), 'tenantId': '123456' } ], 'type': 'rax:feeds', 'name': 'cloudFeeds' }, { 'endpoints': [ { 'region': 'DFW', 'publicURL': ( 'https://sites.api.rackspacecloud.com/v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:sites', 'name': 'cloudSites' }, { 'endpoints': [ { 'publicURL': ( 'https://monitoring.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:monitor', 'name': 'cloudMonitoring' }, { 'endpoints': [ { 'publicURL': ( 'https://dns.api.rackspacecloud.com/v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:dns', 'name': 'cloudDNS' }, { 'endpoints': [ { 'region': 'DFW', 'publicURL': ( 'https://global.cdn.api.rackspacecloud.com/' 'v1.0/123456' ), 'internalURL': ( 'https://global.cdn.api.rackspacecloud.com/' 'v1.0/123456' ), 'tenantId': '123456' } ], 'type': 'rax:cdn', 'name': 'rackCDN' } ], 'user': { 'RAX-AUTH:defaultRegion': 'IAD', 'id': 'a432dbe77f5e4e20a88aaf1cab26c51b', 'roles': [ { 'description': ( 'A Role that allows a user access' ' to keystone Service methods' ), 'id': '5', 'name': 'object-store:default', 'tenantId': 'MossoCloudFS_123456' }, { 'description': ( 'A Role that allows a user access' ' to keystone Service methods' ), 'id': '6', 'name': 'compute:default', 'tenantId': '123456' }, { 'id': '3', 'name': 'identity:user-admin', 'description': 'User Admin Role.' } ], 'name': 'rusty.shackelford' } } }
39.523592
79
0.290484
1,284
25,967
5.857477
0.145639
0.146922
0.172849
0.114081
0.808004
0.783141
0.684749
0.597926
0.517351
0.348358
0
0.093994
0.596026
25,967
656
80
39.583841
0.622974
0.021065
0
0.708723
0
0
0.310438
0.006967
0
0
0
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
1
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
65143537e2432949fd571b54a12c562b05efe48a
185
py
Python
chat/forms.py
oussama4/sn
bf83a9caba0b1816119b572e4d511e8111152306
[ "MIT" ]
4
2018-09-08T16:39:09.000Z
2021-12-17T16:24:37.000Z
chat/forms.py
oussama4/sn
bf83a9caba0b1816119b572e4d511e8111152306
[ "MIT" ]
3
2020-06-05T19:06:04.000Z
2021-07-06T20:17:34.000Z
chat/forms.py
oussama4/sn
bf83a9caba0b1816119b572e4d511e8111152306
[ "MIT" ]
1
2018-09-08T16:39:09.000Z
2018-09-08T16:39:09.000Z
from django.forms import ModelForm from .models import Room class RoomForm(ModelForm): class Meta: model = Room fields = ('name', 'description', 'public')
20.555556
50
0.632432
20
185
5.85
0.75
0
0
0
0
0
0
0
0
0
0
0
0.27027
185
9
51
20.555556
0.866667
0
0
0
0
0
0.112903
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
1
0
0
4
6523c3f3008aaa7f593e5377a1bbf81f1c15750d
284
py
Python
angora/text/__init__.py
MacHu-GWU/angora-project
689a60da51cd88680ddbe26e28dbe81e6b01d275
[ "MIT" ]
null
null
null
angora/text/__init__.py
MacHu-GWU/angora-project
689a60da51cd88680ddbe26e28dbe81e6b01d275
[ "MIT" ]
null
null
null
angora/text/__init__.py
MacHu-GWU/angora-project
689a60da51cd88680ddbe26e28dbe81e6b01d275
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from .formatter import fmt_title, fmt_sentence, fmt_name from .rnd import (rand_str, rand_pwd, rand_phone, rand_ssn, rand_email, rand_article) from .rerecipe import ReParser as reparser from .strtemplate import StrTemplate as strtpl
35.5
72
0.767606
43
284
4.860465
0.627907
0
0
0
0
0
0
0
0
0
0
0.004082
0.137324
284
8
73
35.5
0.84898
0.147887
0
0
0
0
0
0
0
0
0
0
0
1
0
true
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
1
0
1
0
1
0
0
4
e8fdfb8b9afc19c4c7d4820341aa6575c0b2651b
16,383
py
Python
zvmsdk/tests/unit/test_database.py
jichenjc/python-zvm-sdk
c081805c6079107b4823af898babdf92cf5577ee
[ "Apache-2.0" ]
null
null
null
zvmsdk/tests/unit/test_database.py
jichenjc/python-zvm-sdk
c081805c6079107b4823af898babdf92cf5577ee
[ "Apache-2.0" ]
null
null
null
zvmsdk/tests/unit/test_database.py
jichenjc/python-zvm-sdk
c081805c6079107b4823af898babdf92cf5577ee
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 IBM Corp. # # 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 mock import unittest import uuid from zvmsdk import config from zvmsdk import database from zvmsdk.database import VolumeDBUtils from zvmsdk import exception from zvmsdk import log from zvmsdk.tests.unit import base CONF = config.CONF LOG = log.LOG def _to_db_str(sequential_list): """Convert a list or tuple object to a string of database format.""" entry_list = [] for _entry in sequential_list: # I know only text type need to be converted by now. More types could # be added in the future when we know. if isinstance(_entry, str): entry_list.append("u'%s'" % _entry) else: entry_list.append(str(_entry)) return "(%s)" % ", ".join(entry_list) class VolumeDBUtilsTestCase(unittest.TestCase): @classmethod def setUpClass(cls): cls.db_path = CONF.database.path CONF.database.path = '/tmp/test_sdk.db' cls._util = VolumeDBUtils() @classmethod def tearDownClass(cls): with database.get_db_conn() as conn: conn.execute("DROP TABLE volumes") conn.execute("DROP TABLE volume_attachments") CONF.database.path = cls.db_path @mock.patch.object(VolumeDBUtils, '_initialize_table_volume_attachments') @mock.patch.object(VolumeDBUtils, '_initialize_table_volumes') def test__init__(self, _initialize_table_volumes, _initialize_table_volume_attachments): self._util.__init__() _initialize_table_volumes.assert_called_once_with() _initialize_table_volume_attachments.assert_called_once_with() def test_get_volume_by_id_errors(self): # error - Empty volume id volume_id_null = None self.assertRaises(exception.DatabaseException, self._util.get_volume_by_id, volume_id_null) # not found volume_id = str(uuid.uuid4()) self.assertIsNone(self._util.get_volume_by_id(volume_id)) def test_get_volume_by_id(self): # setup test volume volume = {'protocol_type': 'fc', 'size': '3G'} volume_id = self._util.insert_volume(volume) # query volume = self._util.get_volume_by_id(volume_id) expected = [volume_id, 'fc', '3G'] actual = [volume[0], volume[1], volume[2]] self.assertEqual(expected, actual) # clean test volume self._util.delete_volume(volume_id) def test_insert_volume_errors(self): # empty volume volume = None self.assertRaises(exception.DatabaseException, self._util.insert_volume, volume) # protocol_type absent volume = {'size': '3G'} self.assertRaises(exception.DatabaseException, self._util.insert_volume, volume) volume = {'protocol_type': 'fc'} self.assertRaises(exception.DatabaseException, self._util.insert_volume, volume) def test_insert_volume(self): # insert a simplest volume volume = {'protocol_type': 'fc', 'size': '3G'} volume_id = self._util.insert_volume(volume) # query volume = self._util.get_volume_by_id(volume_id) expected = [volume_id, 'fc', '3G', 'free', 0] actual = [volume[0], volume[1], volume[2], volume[3], volume[6]] self.assertEqual(expected, actual) # clean test volume self._util.delete_volume(volume_id) # insert a complicated volume image_id = str(uuid.uuid4()) snapshot_id = str(uuid.uuid4()) volume = {'protocol_type': 'fc', 'size': '3G', 'image_id': image_id, 'snapshot_id': snapshot_id, 'comment': 'hello world'} volume_id = self._util.insert_volume(volume) # query volume = self._util.get_volume_by_id(volume_id) expected = _to_db_str((volume_id, 'fc', '3G', 'free', image_id, snapshot_id, 0, None, 'hello world')) self.assertEqual(expected, str(volume)) def test_update_volume_errors(self): # empty volume volume = None self.assertRaises(exception.DatabaseException, self._util.update_volume, volume) volume = {} self.assertRaises(exception.DatabaseException, self._util.update_volume, volume) # volume not found volume_id = str(uuid.uuid4()) volume = {'id': volume_id} self.assertRaises(exception.DatabaseException, self._util.update_volume, volume) def test_update_volume(self): # set up the test volume image_id = str(uuid.uuid4()) snapshot_id = str(uuid.uuid4()) volume = {'protocol_type': 'fc', 'size': '3G', 'image_id': image_id, 'snapshot_id': snapshot_id, 'comment': 'hello world'} volume_id = self._util.insert_volume(volume) # make update image_id = str(uuid.uuid4()) snapshot_id = str(uuid.uuid4()) volume = {'id': volume_id, 'size': '5G', 'status': 'in-use', 'image_id': image_id, 'snapshot_id': snapshot_id, 'comment': 'goodbye world'} self._util.update_volume(volume) # query the volume volume = self._util.get_volume_by_id(volume_id) expected = _to_db_str((volume_id, 'fc', '5G', 'in-use', image_id, snapshot_id, 0, None, 'goodbye world')) self.assertEqual(expected, str(volume)) # clean the volume self._util.delete_volume(volume_id) def test_delete_volume_errors(self): # empty volume volume_id = None self.assertRaises(exception.DatabaseException, self._util.insert_volume, volume_id) # not found volume_id = str(uuid.uuid4()) self.assertIsNone(self._util.get_volume_by_id(volume_id)) def test_delete_volume(self): # insert a simplest volume volume = {'protocol_type': 'fc', 'size': '3G'} volume_id = self._util.insert_volume(volume) # query it self.assertIsNotNone(self._util.get_volume_by_id(volume_id)) # delete it self._util.delete_volume(volume_id) # query again self.assertIsNone(self._util.get_volume_by_id(volume_id)) class GuestDbOperatorTestCase(base.SDKTestCase): @classmethod def setUpClass(cls): super(GuestDbOperatorTestCase, cls).setUpClass() cls.old_db_path = CONF.database.path base.set_conf('database', 'path', '/tmp/test_sdk.db') cls.db_op = database.GuestDbOperator() @classmethod def tearDownClass(cls): super(GuestDbOperatorTestCase, cls).tearDownClass() with database.get_db_conn() as conn: conn.execute("DROP TABLE guests") # Restore the original db path CONF.database.path = cls.old_db_path @mock.patch.object(uuid, 'uuid4') def test_add_guest(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Query, the guest should in table guests = self.db_op.get_guest_list() self.assertEqual(1, len(guests)) self.assertListEqual([(u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', u'FAKEUSER', u'fakemeta=1, fakemeta2=True', u'')], guests) self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') @mock.patch.object(uuid, 'uuid4') def test_add_guest_twice_error(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Add same user the second time self.assertRaises(exception.DatabaseException, self.db_op.add_guest, 'fakeuser') self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') @mock.patch.object(uuid, 'uuid4') def test_delete_guest_by_id(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Delete self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') guests = self.db_op.get_guest_list() self.assertListEqual([], guests) def test_delete_guest_by_id_not_exist(self): self.assertRaises(exception.DatabaseException, self.db_op.delete_guest_by_id, 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') @mock.patch.object(uuid, 'uuid4') def test_delete_guest_by_userid(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Delete self.db_op.delete_guest_by_userid('FaKeuser') guests = self.db_op.get_guest_list() self.assertListEqual([], guests) def test_delete_guest_by_userid_not_exist(self): self.assertRaises(exception.DatabaseException, self.db_op.delete_guest_by_userid, 'Fakeuser') @mock.patch.object(uuid, 'uuid4') def test_get_guest_by_userid(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # get guest guest = self.db_op.get_guest_by_userid('FaKeuser') self.assertEqual((u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', u'FAKEUSER', u'fakemeta=1, fakemeta2=True', u''), guest) self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') def test_get_guest_by_userid_not_exist(self): guest = self.db_op.get_guest_by_userid('FaKeuser') self.assertEqual(None, guest) @mock.patch.object(uuid, 'uuid4') def test_get_guest_by_id(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # get guest guest = self.db_op.get_guest_by_id( 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') self.assertEqual((u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', u'FAKEUSER', u'fakemeta=1, fakemeta2=True', u''), guest) self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') def test_get_guest_by_id_not_exist(self): guest = self.db_op.get_guest_by_id( 'aa8f352e-4c9e-4335-aafa-4f4eb2fcc77c') self.assertEqual(None, guest) @mock.patch.object(uuid, 'uuid4') def test_update_guest_by_id(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Update self.db_op.update_guest_by_id( 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', meta='newmeta', comments='newcomment') guest = self.db_op.get_guest_by_id( 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') self.assertEqual((u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', u'FAKEUSER', u'newmeta', u'newcomment'), guest) self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') @mock.patch.object(uuid, 'uuid4') def test_update_guest_by_id_wrong_input(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Update self.assertRaises(exception.DatabaseException, self.db_op.update_guest_by_id, 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') def test_update_guest_by_id_not_exist(self): self.assertRaises(exception.DatabaseException, self.db_op.update_guest_by_id, 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', meta='newmeta') @mock.patch.object(uuid, 'uuid4') def test_update_guest_by_id_null_value(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Update self.db_op.update_guest_by_id( 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', meta='', comments='') guest = self.db_op.get_guest_by_id( 'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') self.assertEqual((u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', u'FAKEUSER', u'', u''), guest) self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') @mock.patch.object(uuid, 'uuid4') def test_update_guest_by_userid(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Update self.db_op.update_guest_by_userid( 'Fakeuser', meta='newmetauserid', comments='newcommentuserid') guest = self.db_op.get_guest_by_userid('Fakeuser') self.assertEqual((u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', u'FAKEUSER', u'newmetauserid', u'newcommentuserid'), guest) self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') @mock.patch.object(uuid, 'uuid4') def test_update_guest_by_userid_wrong_input(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Update self.assertRaises(exception.DatabaseException, self.db_op.update_guest_by_userid, 'FakeUser') self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c') def test_update_guest_by_userid_not_exist(self): self.assertRaises(exception.DatabaseException, self.db_op.update_guest_by_userid, 'FaKeUser', meta='newmeta') @mock.patch.object(uuid, 'uuid4') def test_update_guest_by_userid_null_value(self, get_uuid): userid = 'fakeuser' meta = 'fakemeta=1, fakemeta2=True' get_uuid.return_value = u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c' self.db_op.add_guest(userid, meta=meta) # Update self.db_op.update_guest_by_userid( 'FaKeUser', meta='', comments='') guest = self.db_op.get_guest_by_userid('fakeuser') self.assertEqual((u'ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c', u'FAKEUSER', u'', u''), guest) self.db_op.delete_guest_by_id('ad8f352e-4c9e-4335-aafa-4f4eb2fcc77c')
39.764563
78
0.624428
1,986
16,383
4.89577
0.113293
0.019336
0.037848
0.096267
0.793788
0.770544
0.73537
0.718503
0.695876
0.659262
0
0.055644
0.268327
16,383
411
79
39.861314
0.755485
0.078252
0
0.623762
0
0
0.179141
0.097381
0
0
0
0
0.122112
1
0.105611
false
0
0.029703
0
0.145215
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
3319662d073c7e1745cd2b80b5629faf51a74230
130
py
Python
ckan/ckanext-ldap/ckanext/ldap/lib/__init__.py
lorenzoeusepi77/ckan
3a620e9c81ba1750d12941c02184092d507f71df
[ "Apache-2.0" ]
null
null
null
ckan/ckanext-ldap/ckanext/ldap/lib/__init__.py
lorenzoeusepi77/ckan
3a620e9c81ba1750d12941c02184092d507f71df
[ "Apache-2.0" ]
null
null
null
ckan/ckanext-ldap/ckanext/ldap/lib/__init__.py
lorenzoeusepi77/ckan
3a620e9c81ba1750d12941c02184092d507f71df
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ Created by 'bens3' on 2013-06-21. Copyright (c) 2013 'bens3'. All rights reserved. """
21.666667
48
0.669231
21
130
4.142857
0.904762
0
0
0
0
0
0
0
0
0
0
0.133929
0.138462
130
6
49
21.666667
0.642857
0.915385
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
332be8f7261f83205655b2acb7d4527fbd9cdd92
1,315
py
Python
data/test_main.py
Balaji-Gowda/backend-engineer
2bcba2e23dc800cccc4e7a5fa1b38c8b9818640e
[ "MIT" ]
null
null
null
data/test_main.py
Balaji-Gowda/backend-engineer
2bcba2e23dc800cccc4e7a5fa1b38c8b9818640e
[ "MIT" ]
null
null
null
data/test_main.py
Balaji-Gowda/backend-engineer
2bcba2e23dc800cccc4e7a5fa1b38c8b9818640e
[ "MIT" ]
null
null
null
from main import * def test_days(): assert days(flights)== 365 def test_cities(): assert cities(flights,airports) == ['Newark', 'New York'] def test_relationship(): assert relationship(flights,planes) == "one-to-many relationship" def test_most_delays_manf(): assert most_delays_manf(flights) == ['EMBRAER', 2589621.0] def test_two_connected_cities(): assert two_connected_cities(flights) == ['New York', 'Los Angeles'] # output """ pytest test_main.py ================================================================== test session starts =================================================================== platform win32 -- Python 3.8.8, pytest-6.2.3, py-1.10.0, pluggy-0.13.1 rootdir: C:\Documents\Pandas\Projects\pandas\Telegram projects\Revolve solutions\backend-engineer\data plugins: anyio-2.2.0, dash-2.0.0 collected 5 items test_main.py ..... [100%] ============================================================== 5 passed, 1 warning in 6.45s ============================================================== """
38.676471
154
0.429658
120
1,315
4.583333
0.558333
0.063636
0.050909
0
0
0
0
0
0
0
0
0.044776
0.286692
1,315
34
155
38.676471
0.541578
0.004563
0
0
0
0
0.142222
0
0
0
0
0
0.454545
1
0.454545
true
0
0.090909
0
0.545455
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
1
0
1
1
0
0
0
1
0
0
4
333299e8caf1daf633dde8e50447db0eaf0a861b
148
py
Python
Servidor/app_folder/run_app.py
alejandrosanchezm/SNPTool
8bcfcf29bd5cb8a47870625a9eb4b0e2b9a75ee5
[ "Apache-2.0" ]
null
null
null
Servidor/app_folder/run_app.py
alejandrosanchezm/SNPTool
8bcfcf29bd5cb8a47870625a9eb4b0e2b9a75ee5
[ "Apache-2.0" ]
null
null
null
Servidor/app_folder/run_app.py
alejandrosanchezm/SNPTool
8bcfcf29bd5cb8a47870625a9eb4b0e2b9a75ee5
[ "Apache-2.0" ]
null
null
null
from app import app """ Se encarga de ejecutar la aplicación de Flask. """ if __name__ == "__main__": app.run(host="192.168.1.67", debug=True)
18.5
46
0.675676
24
148
3.833333
0.875
0
0
0
0
0
0
0
0
0
0
0.073171
0.168919
148
8
47
18.5
0.674797
0
0
0
0
0
0.210526
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
333966a9356773b21b65b5ed07b3400ab47faa86
85
py
Python
wikis/apps.py
aristo-master/uzuwiki
3149253765c14edc1637e589d904bb950f04e193
[ "MIT" ]
null
null
null
wikis/apps.py
aristo-master/uzuwiki
3149253765c14edc1637e589d904bb950f04e193
[ "MIT" ]
null
null
null
wikis/apps.py
aristo-master/uzuwiki
3149253765c14edc1637e589d904bb950f04e193
[ "MIT" ]
null
null
null
from django.apps import AppConfig class WikisConfig(AppConfig): name = 'wikis'
14.166667
33
0.741176
10
85
6.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.176471
85
5
34
17
0.9
0
0
0
0
0
0.058824
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
3352c1c53acc833a3f39a887dd3bdb3af22b860e
142
py
Python
atcoder/abc159A_the_number_of_even_pairs.py
da-edra/kyopro
ad531d15bcccf6aafdaaef3cc69db850b0f7c471
[ "BSD-3-Clause" ]
2
2020-08-31T17:19:07.000Z
2021-01-08T21:35:48.000Z
atcoder/abc159A_the_number_of_even_pairs.py
edglaz/kyopro
b8ac4f6873418ad20ad417e46d731c35a8062c0d
[ "BSD-3-Clause" ]
null
null
null
atcoder/abc159A_the_number_of_even_pairs.py
edglaz/kyopro
b8ac4f6873418ad20ad417e46d731c35a8062c0d
[ "BSD-3-Clause" ]
null
null
null
# unihernandez22 # https://atcoder.jp/contests/abc159/tasks/abc159_a # math print(sum(map(lambda i: int(i)*(int(i)-1)//2, input().split())))
23.666667
64
0.683099
23
142
4.173913
0.826087
0.083333
0.104167
0
0
0
0
0
0
0
0
0.076336
0.077465
142
5
65
28.4
0.656489
0.485915
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
33580c550f3b3b467e54b29463c8d8f59f2d07a5
416
py
Python
swcms_social/faq/serializers.py
ivanff/swcms
20d121003243abcc26e41409bc44f1c0ef3c6c2a
[ "MIT" ]
null
null
null
swcms_social/faq/serializers.py
ivanff/swcms
20d121003243abcc26e41409bc44f1c0ef3c6c2a
[ "MIT" ]
1
2019-06-25T11:17:35.000Z
2019-06-25T11:17:54.000Z
swcms_social/faq/serializers.py
ivanff/swcms-social
20d121003243abcc26e41409bc44f1c0ef3c6c2a
[ "MIT" ]
null
null
null
from rest_framework import serializers from .models import Faq class FaqSerList(serializers.ModelSerializer): subject = serializers.ReadOnlyField(source='subject.h1') class Meta: model = Faq exclude = ('text',) class FaqSerRetrieve(serializers.ModelSerializer): subject = serializers.ReadOnlyField(source='subject.h1') class Meta: model = Faq fields = '__all__'
21.894737
60
0.697115
41
416
6.95122
0.512195
0.182456
0.231579
0.308772
0.624561
0.624561
0.624561
0.624561
0.624561
0.624561
0
0.006098
0.211538
416
18
61
23.111111
0.862805
0
0
0.5
0
0
0.074519
0
0
0
0
0
0
1
0
false
0
0.166667
0
0.666667
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
1
0
0
4
6822cd5a749f13d778ceb96330739dbbec6ece1a
256
py
Python
NoteBooks/Curso de Python/Python/Modulos/os/OS_concepts.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
1
2021-02-26T13:12:22.000Z
2021-02-26T13:12:22.000Z
NoteBooks/Curso de Python/Python/Modulos/os/OS_concepts.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
NoteBooks/Curso de Python/Python/Modulos/os/OS_concepts.py
Alejandro-sin/Learning_Notebooks
161d6bed4c7b1d171b45f61c0cc6fa91e9894aad
[ "MIT" ]
null
null
null
import os cwd = os.getcwd() print(os.path) print(cwd) # Me trae todo lo que tiene que ver con el ditrectorio de trbajo. print(os.listdir(cwd)) # Me traer el contenido. print(os.path.isdir('projects')) # True print(os.path.isdir('false_projects')) # False
28.444444
76
0.726563
44
256
4.204545
0.568182
0.151351
0.178378
0.172973
0
0
0
0
0
0
0
0
0.132813
256
9
77
28.444444
0.833333
0.378906
0
0
0
0
0.141935
0
0
0
0
0.111111
0
1
0
false
0
0.142857
0
0.142857
0.714286
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
1
0
4
682450a2090ee98e8a46d495997db1f713080e6b
157
py
Python
handler.py
vincentsarago/threadbench
6b67b9e882d368b4264d99312480cefd38a768be
[ "MIT" ]
3
2020-06-29T21:31:59.000Z
2020-08-09T01:13:25.000Z
handler.py
vincentsarago/threadbench
6b67b9e882d368b4264d99312480cefd38a768be
[ "MIT" ]
null
null
null
handler.py
vincentsarago/threadbench
6b67b9e882d368b4264d99312480cefd38a768be
[ "MIT" ]
null
null
null
"""handler.""" import pytest def handler(event, context): """handler.""" pytest.main(["tests/test_benchmarks.py"], ["benchmark"]) return True
15.7
60
0.630573
17
157
5.764706
0.823529
0
0
0
0
0
0
0
0
0
0
0
0.165605
157
9
61
17.444444
0.748092
0.10828
0
0
0
0
0.255814
0.186047
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
68547a1d56739ee0e0ec6352711edc6cfcc59800
127
py
Python
stage/event/test_local_fs_destination.py
Sentienz/datacollector-tests
ca27988351dc3366488098b5db6c85a8be2f7b85
[ "Apache-2.0" ]
null
null
null
stage/event/test_local_fs_destination.py
Sentienz/datacollector-tests
ca27988351dc3366488098b5db6c85a8be2f7b85
[ "Apache-2.0" ]
1
2019-04-24T11:06:38.000Z
2019-04-24T11:06:38.000Z
stage/event/test_local_fs_destination.py
anubandhan/datacollector-tests
301c024c66d68353735256b262b681dd05ba16cc
[ "Apache-2.0" ]
2
2019-05-24T06:34:37.000Z
2020-03-30T11:48:18.000Z
from streamsets.testframework.decorators import stub @stub def test_whole_file_processed(sdc_builder, sdc_executor): pass
21.166667
57
0.834646
17
127
5.941176
0.882353
0
0
0
0
0
0
0
0
0
0
0
0.110236
127
5
58
25.4
0.893805
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0.25
0.25
0
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
0
0
0
0
4
686cbb3a2fa541f8b0c8c0293a599d4e4b030550
145
py
Python
fwl-automation-decisions/application/src/application/zone_connection/ZoneConnectionDTO.py
aherculano/fwl-project
6d4c4d40393b76d45cf13b572b5aabc0696e9285
[ "MIT" ]
null
null
null
fwl-automation-decisions/application/src/application/zone_connection/ZoneConnectionDTO.py
aherculano/fwl-project
6d4c4d40393b76d45cf13b572b5aabc0696e9285
[ "MIT" ]
null
null
null
fwl-automation-decisions/application/src/application/zone_connection/ZoneConnectionDTO.py
aherculano/fwl-project
6d4c4d40393b76d45cf13b572b5aabc0696e9285
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class ZoneConnectionDTO(ABC): @abstractmethod def to_dict(self): raise NotImplementedError
18.125
35
0.737931
15
145
7.066667
0.8
0.320755
0
0
0
0
0
0
0
0
0
0
0.206897
145
7
36
20.714286
0.921739
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
686dda9873ace7b697e4d7cda5dbc09016d0b005
100
py
Python
boot/payload/usr/lib/cgi-bin/test.py
rshom/DEEPi-OS
80fdb9638b241c22471fc7e108fe2f24c577bfca
[ "MIT" ]
null
null
null
boot/payload/usr/lib/cgi-bin/test.py
rshom/DEEPi-OS
80fdb9638b241c22471fc7e108fe2f24c577bfca
[ "MIT" ]
null
null
null
boot/payload/usr/lib/cgi-bin/test.py
rshom/DEEPi-OS
80fdb9638b241c22471fc7e108fe2f24c577bfca
[ "MIT" ]
1
2020-11-12T22:18:42.000Z
2020-11-12T22:18:42.000Z
#!/bin/python3 print("Status: 200") print("Content-Type: text/plain") print() print("Hello World!")
16.666667
33
0.69
14
100
4.928571
0.785714
0
0
0
0
0
0
0
0
0
0
0.043478
0.08
100
5
34
20
0.706522
0.13
0
0
0
0
0.546512
0
0
0
0
0
0
1
0
true
0
0
0
0
1
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
68a03e62b3a0eb667279637660f85c775cd4723c
146
py
Python
src/anilius/core/permission.py
sadegh-moayedizadeh/Anilius
669cb9a7af72ae251a979a88f6556d14ccb63c2f
[ "MIT" ]
3
2020-02-07T11:54:36.000Z
2020-02-09T11:53:26.000Z
src/anilius/core/permission.py
TomanPay/Anilius
24a7ff3ae8bd21901e46b475feadf72e46516481
[ "MIT" ]
null
null
null
src/anilius/core/permission.py
TomanPay/Anilius
24a7ff3ae8bd21901e46b475feadf72e46516481
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod class Permission(ABC): @abstractmethod def has_perm(self, controller): raise NotImplemented
18.25
35
0.726027
16
146
6.5625
0.8125
0.32381
0
0
0
0
0
0
0
0
0
0
0.212329
146
7
36
20.857143
0.913043
0
0
0
0
0
0
0
0
0
0
0
0
1
0.2
false
0
0.2
0
0.6
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
68a51f7f8827c1c13feaf009b8c226c9200360e0
91
py
Python
shipping/apps.py
kevin-ci/janeric2
df07508a76ad8194a63be7786d8b84a905b3d2e9
[ "MIT" ]
1
2021-02-28T11:54:14.000Z
2021-02-28T11:54:14.000Z
shipping/apps.py
kevin-ci/janeric2
df07508a76ad8194a63be7786d8b84a905b3d2e9
[ "MIT" ]
17
2019-01-04T00:36:31.000Z
2019-01-24T14:01:08.000Z
bookstore/apps/shipping/apps.py
jgmartinss/bookstore
e629d5b58ed8f59f7b33b7a76da97a014f196f72
[ "MIT" ]
1
2021-12-21T16:20:49.000Z
2021-12-21T16:20:49.000Z
from django.apps import AppConfig class ShippingConfig(AppConfig): name = 'shipping'
15.166667
33
0.758242
10
91
6.9
0.9
0
0
0
0
0
0
0
0
0
0
0
0.164835
91
5
34
18.2
0.907895
0
0
0
0
0
0.087912
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
d7c0a94a821433e5966176a04d5c7407853c2b63
436
py
Python
alive_progress/utils/terminal/void.py
Shinyh29/alive-progress
767445917e7cb384981c0dc29b3b3204384353b1
[ "MIT" ]
3,304
2019-08-05T07:16:40.000Z
2022-03-31T11:50:57.000Z
alive_progress/utils/terminal/void.py
Shinyh29/alive-progress
767445917e7cb384981c0dc29b3b3204384353b1
[ "MIT" ]
126
2019-08-07T09:08:32.000Z
2022-03-31T14:27:17.000Z
alive_progress/utils/terminal/void.py
Shinyh29/alive-progress
767445917e7cb384981c0dc29b3b3204384353b1
[ "MIT" ]
151
2019-08-12T19:14:15.000Z
2022-03-31T07:17:48.000Z
def write(_text): return 0 def flush(): pass def _emit_ansi_escape(_=''): def inner(_=None): pass return inner clear_line = _emit_ansi_escape() clear_end = _emit_ansi_escape() hide_cursor = _emit_ansi_escape() show_cursor = _emit_ansi_escape() factory_cursor_up = lambda _: _emit_ansi_escape() def cols(): return 0 # more details in `alive_progress.tools.sampling#overhead`. carriage_return = ''
15.571429
73
0.706422
59
436
4.711864
0.525424
0.172662
0.302158
0.122302
0
0
0
0
0
0
0
0.005666
0.190367
436
27
74
16.148148
0.78187
0.12844
0
0.25
0
0
0
0
0
0
0
0
0
1
0.3125
false
0.125
0
0.125
0.5
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
0
0
0
4
d7c947bffaf8fe8b1287d60dc7d068f796a98c38
333
py
Python
pyfor/__init__.py
jtpils/pyfor
2277f3604d650c89205cd477544bf50c1f91b46c
[ "MIT" ]
1
2019-06-23T05:17:52.000Z
2019-06-23T05:17:52.000Z
pyfor/__init__.py
jtpils/pyfor
2277f3604d650c89205cd477544bf50c1f91b46c
[ "MIT" ]
null
null
null
pyfor/__init__.py
jtpils/pyfor
2277f3604d650c89205cd477544bf50c1f91b46c
[ "MIT" ]
null
null
null
from __future__ import absolute_import __version__ = '0.3.3' from pyfor import cloud from pyfor import rasterizer from pyfor import gisexport from pyfor import clip from pyfor import ground_filter from pyfor import plot from pyfor import collection from pyfor import voxelizer from pyfor import detection from pyfor import metrics
22.2
38
0.837838
50
333
5.38
0.38
0.334572
0.557621
0
0
0
0
0
0
0
0
0.010563
0.147147
333
14
39
23.785714
0.93662
0
0
0
0
0
0.015015
0
0
0
0
0
0
1
0
false
0
0.916667
0
0.916667
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
d7fd379437e9aa016591bad82cf976e009ec2c19
1,735
py
Python
loadbalancer/validator.py
angelbarrera92/simple-python-load-balancer
d17c3a9ef7fb9b2400e9a547143ec9a240699d5e
[ "MIT" ]
1
2020-04-10T19:22:27.000Z
2020-04-10T19:22:27.000Z
loadbalancer/validator.py
angelbarrera92/simple-python-load-balancer
d17c3a9ef7fb9b2400e9a547143ec9a240699d5e
[ "MIT" ]
null
null
null
loadbalancer/validator.py
angelbarrera92/simple-python-load-balancer
d17c3a9ef7fb9b2400e9a547143ec9a240699d5e
[ "MIT" ]
null
null
null
from jsonschema import validate import jsonschema, sys user_schema = { "type": "object", "properties": { "email": {"type": "string", "pattern": "(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"}, "password": {"type": "string", "minLength": 6, "maxLength": 30}, }, "required": ["email", "password"] } app_new_machine_schema = { "type": "object", "properties": { "host": {"type": "string"}, "port": {"type": "number", "minimum": 0, "maximum": 65535}, "statuspath" : {"type": "string"} }, "required": ["host", "port", "statuspath"] } app_machine_schema = { "type": "object", "properties": { "host": {"type": "string"}, "port": {"type": "number", "minimum": 0, "maximum": 65535} }, "required": ["host", "port"] } def is_user_json_valid(user_json): try: validate(user_json,user_schema) return True except jsonschema.exceptions.ValidationError as ve: #sys.stderr.write("Record #{}: ERROR\n".format(user_json)) sys.stderr.write(str(ve) + "\n") return False def is_new_machine_json_valid(machine_json): try: validate(machine_json, app_new_machine_schema) return True except jsonschema.exceptions.ValidationError as ve: # sys.stderr.write("Record #{}: ERROR\n".format(user_json)) sys.stderr.write(str(ve) + "\n") return False def is_machine_json_valid(machine_json): try: validate(machine_json, app_machine_schema) return True except jsonschema.exceptions.ValidationError as ve: # sys.stderr.write("Record #{}: ERROR\n".format(user_json)) sys.stderr.write(str(ve) + "\n") return False
28.916667
101
0.588473
199
1,735
4.969849
0.271357
0.048534
0.084934
0.078868
0.71183
0.71183
0.71183
0.71183
0.69363
0.69363
0
0.01566
0.227089
1,735
60
102
28.916667
0.721849
0.097983
0
0.479167
0
0.020833
0.21859
0.032051
0
0
0
0
0
1
0.0625
false
0.041667
0.041667
0
0.229167
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
cc0d2abcbbb87596961d91592ef0202b0be24f98
217
py
Python
src/waldur_mastermind/marketplace_rancher/registrators.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_mastermind/marketplace_rancher/registrators.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_mastermind/marketplace_rancher/registrators.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
from waldur_mastermind.marketplace import registrators as marketplace_registrators from . import PLUGIN_NAME class RancherRegistrator(marketplace_registrators.MarketplaceRegistrator): plugin_name = PLUGIN_NAME
27.125
82
0.866359
22
217
8.272727
0.545455
0.164835
0
0
0
0
0
0
0
0
0
0
0.101382
217
7
83
31
0.933333
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.5
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
cc1bfd0a4e9ddefb109574d3f8383722d87ecde5
174
py
Python
app/t1health_app/data_entry.py
siyaochen/Tier1Health
536591a7534bbb3fb27fe889bfed9de152ec1864
[ "MIT" ]
null
null
null
app/t1health_app/data_entry.py
siyaochen/Tier1Health
536591a7534bbb3fb27fe889bfed9de152ec1864
[ "MIT" ]
3
2020-02-11T23:48:20.000Z
2021-06-10T21:22:43.000Z
app/t1health_app/data_entry.py
siyaochen/Tier1Health
536591a7534bbb3fb27fe889bfed9de152ec1864
[ "MIT" ]
3
2019-01-13T19:51:42.000Z
2019-01-19T16:52:50.000Z
from django import forms from .models import Statistic class StatisticForm(forms.ModelForm): class Meta: model = Statistic fields = ('title', 'text',)
17.4
37
0.666667
19
174
6.105263
0.736842
0
0
0
0
0
0
0
0
0
0
0
0.241379
174
9
38
19.333333
0.878788
0
0
0
0
0
0.051724
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
1
0
0
4
cc26763886ae67934fd6f64562b64bae04201b0a
3,546
py
Python
ST7735/Fonts.py
Hafnernuss/ESP8266Libraries
7d4f3b7f3d7e99a42b4963583254271060f41626
[ "Apache-2.0" ]
null
null
null
ST7735/Fonts.py
Hafnernuss/ESP8266Libraries
7d4f3b7f3d7e99a42b4963583254271060f41626
[ "Apache-2.0" ]
null
null
null
ST7735/Fonts.py
Hafnernuss/ESP8266Libraries
7d4f3b7f3d7e99a42b4963583254271060f41626
[ "Apache-2.0" ]
null
null
null
terminalfont = { "width": 6, "height": 8, "start": 32, "end": 127, "data": bytearray([ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x5F, 0x06, 0x00, 0x00, 0x07, 0x03, 0x00, 0x07, 0x03, 0x00, 0x24, 0x7E, 0x24, 0x7E, 0x24, 0x00, 0x24, 0x2B, 0x6A, 0x12, 0x00, 0x00, 0x63, 0x13, 0x08, 0x64, 0x63, 0x00, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x00, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x41, 0x00, 0x00, 0x00, 0x00, 0x41, 0x3E, 0x00, 0x00, 0x00, 0x08, 0x3E, 0x1C, 0x3E, 0x08, 0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x00, 0xE0, 0x60, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, 0x62, 0x51, 0x49, 0x49, 0x46, 0x00, 0x22, 0x49, 0x49, 0x49, 0x36, 0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, 0x2F, 0x49, 0x49, 0x49, 0x31, 0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30, 0x00, 0x01, 0x71, 0x09, 0x05, 0x03, 0x00, 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, 0x06, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0xEC, 0x6C, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, 0x00, 0x24, 0x24, 0x24, 0x24, 0x24, 0x00, 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x5D, 0x55, 0x1E, 0x00, 0x7E, 0x11, 0x11, 0x11, 0x7E, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A, 0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, 0x30, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, 0x7F, 0x02, 0x04, 0x02, 0x7F, 0x00, 0x7F, 0x02, 0x04, 0x08, 0x7F, 0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, 0x7F, 0x09, 0x09, 0x19, 0x66, 0x00, 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, 0x01, 0x01, 0x7F, 0x01, 0x01, 0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, 0x3F, 0x40, 0x3C, 0x40, 0x3F, 0x00, 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, 0x07, 0x08, 0x70, 0x08, 0x07, 0x00, 0x71, 0x49, 0x45, 0x43, 0x00, 0x00, 0x00, 0x7F, 0x41, 0x41, 0x00, 0x00, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x41, 0x41, 0x7F, 0x00, 0x00, 0x04, 0x02, 0x01, 0x02, 0x04, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, 0x20, 0x54, 0x54, 0x54, 0x78, 0x00, 0x7F, 0x44, 0x44, 0x44, 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, 0x38, 0x44, 0x44, 0x44, 0x7F, 0x00, 0x38, 0x54, 0x54, 0x54, 0x08, 0x00, 0x08, 0x7E, 0x09, 0x09, 0x00, 0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C, 0x00, 0x7F, 0x04, 0x04, 0x78, 0x00, 0x00, 0x00, 0x00, 0x7D, 0x40, 0x00, 0x00, 0x40, 0x80, 0x84, 0x7D, 0x00, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x40, 0x00, 0x00, 0x7C, 0x04, 0x18, 0x04, 0x78, 0x00, 0x7C, 0x04, 0x04, 0x78, 0x00, 0x00, 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, 0xFC, 0x44, 0x44, 0x44, 0x38, 0x00, 0x38, 0x44, 0x44, 0x44, 0xFC, 0x00, 0x44, 0x78, 0x44, 0x04, 0x08, 0x00, 0x08, 0x54, 0x54, 0x54, 0x20, 0x00, 0x04, 0x3E, 0x44, 0x24, 0x00, 0x00, 0x3C, 0x40, 0x20, 0x7C, 0x00, 0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, 0x3C, 0x60, 0x30, 0x60, 0x3C, 0x00, 0x6C, 0x10, 0x10, 0x6C, 0x00, 0x00, 0x9C, 0xA0, 0x60, 0x3C, 0x00, 0x00, 0x64, 0x54, 0x54, 0x4C, 0x00, 0x00, 0x08, 0x3E, 0x41, 0x41, 0x00, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x41, 0x41, 0x3E, 0x08, 0x00, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x3C, 0x26, 0x23, 0x26, 0x3C ])}
34.096154
35
0.664129
587
3,546
4.011925
0.156729
0.227601
0.132484
0.081529
0.261571
0.064544
0.044161
0.030573
0.030573
0
0
0.553451
0.166385
3,546
103
36
34.427184
0.243234
0
0
0
0
0
0.006486
0
0
0
0.649746
0
0
1
0
false
0
0
0
0
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
4
cc331f2e5da8cad262ec904564c7128e19b7edc3
96
py
Python
import_data/apps.py
cjb/quantified-flu
c925c95704de846aab16273807ebc75f52024816
[ "MIT" ]
17
2020-03-24T18:51:08.000Z
2022-03-18T21:39:43.000Z
import_data/apps.py
cjb/quantified-flu
c925c95704de846aab16273807ebc75f52024816
[ "MIT" ]
39
2020-03-25T09:17:52.000Z
2020-07-23T08:06:42.000Z
import_data/apps.py
cjb/quantified-flu
c925c95704de846aab16273807ebc75f52024816
[ "MIT" ]
3
2020-03-25T12:18:23.000Z
2020-05-16T11:03:07.000Z
from django.apps import AppConfig class ImportDataConfig(AppConfig): name = "import_data"
16
34
0.770833
11
96
6.636364
0.818182
0
0
0
0
0
0
0
0
0
0
0
0.15625
96
5
35
19.2
0.901235
0
0
0
0
0
0.114583
0
0
0
0
0
0
1
0
false
0
1
0
1.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
1
0
0
4
0bdfa1b239a962dd2b1f2b4ed85eb0a7005381f9
92
py
Python
src/geneagrapher/graph/__init__.py
d-torrance/Geneagrapher
036bec11ac63771ec5dab6a22f3175853a5b2bfe
[ "MIT" ]
null
null
null
src/geneagrapher/graph/__init__.py
d-torrance/Geneagrapher
036bec11ac63771ec5dab6a22f3175853a5b2bfe
[ "MIT" ]
null
null
null
src/geneagrapher/graph/__init__.py
d-torrance/Geneagrapher
036bec11ac63771ec5dab6a22f3175853a5b2bfe
[ "MIT" ]
null
null
null
from graph import DuplicateNodeError, Graph from node import Node from record import Record
23
43
0.847826
13
92
6
0.461538
0
0
0
0
0
0
0
0
0
0
0
0.141304
92
3
44
30.666667
0.987342
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
04018c94fbbbbcce6eef08ce32f4e048cc8378ed
121
py
Python
ev3sim/events.py
LEGO-Robotics/EV3Sim
3a194bc5de05d80ed867a4d2bb282b7a864462d5
[ "BSD-3-Clause" ]
11
2020-08-15T18:28:02.000Z
2022-03-10T05:07:08.000Z
ev3sim/events.py
LEGO-Robotics/EV3Sim
3a194bc5de05d80ed867a4d2bb282b7a864462d5
[ "BSD-3-Clause" ]
153
2020-08-15T14:54:04.000Z
2021-12-04T23:15:17.000Z
ev3sim/events.py
LEGO-Robotics/EV3Sim
3a194bc5de05d80ed867a4d2bb282b7a864462d5
[ "BSD-3-Clause" ]
13
2020-08-15T14:09:16.000Z
2021-12-03T05:54:41.000Z
GAME_RESET = "on_reset" GOAL_SCORED = "on_goal_scored" START_PENALTY = "on_penalty_start" END_PENALTY = "on_penalty_end"
24.2
34
0.801653
19
121
4.526316
0.421053
0.232558
0.372093
0
0
0
0
0
0
0
0
0
0.099174
121
4
35
30.25
0.788991
0
0
0
0
0
0.429752
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
0422cc1e92451d65223de5eb78e2b269ae8c06fb
133
py
Python
srcs/ast/nodes/leaves/complex_number_node.py
pomponchik/computor_v2
742b3f3b47c8d46806b2f733b4ec07ae63a23f00
[ "MIT" ]
null
null
null
srcs/ast/nodes/leaves/complex_number_node.py
pomponchik/computor_v2
742b3f3b47c8d46806b2f733b4ec07ae63a23f00
[ "MIT" ]
null
null
null
srcs/ast/nodes/leaves/complex_number_node.py
pomponchik/computor_v2
742b3f3b47c8d46806b2f733b4ec07ae63a23f00
[ "MIT" ]
null
null
null
from srcs.ast.nodes.leaves.abstract_leave_node import AbstractLeaveNode class ComplexNumberNode(AbstractLeaveNode): name = '5'
22.166667
71
0.81203
15
133
7.066667
0.933333
0
0
0
0
0
0
0
0
0
0
0.008475
0.112782
133
5
72
26.6
0.889831
0
0
0
0
0
0.007519
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
0423bc033c3378c739e32e7e7f051ab3a0350e41
727
py
Python
tests/unit/test_api_tools.py
cglewis/vent
73723271cea018afd5345baa782cc903ebf6825a
[ "Apache-2.0" ]
75
2016-07-02T21:50:32.000Z
2022-02-04T12:39:00.000Z
tests/unit/test_api_tools.py
CyberReboot/vent
5ca8baf82b4198f38609e1fc471ebd278335536f
[ "Apache-2.0" ]
1,317
2016-07-03T21:57:15.000Z
2019-12-24T21:49:20.000Z
tests/unit/test_api_tools.py
cglewis/vent
73723271cea018afd5345baa782cc903ebf6825a
[ "Apache-2.0" ]
75
2016-07-02T21:50:41.000Z
2020-11-26T14:38:28.000Z
from vent.api.tools import Tools def test_configure(): """ Test the configure function """ tools = Tools() tools.configure('foo') def test_new(): """ Test the new function """ tools = Tools() tools.new('image', 'redis') tools.new('core', '') tools.new('repo', 'https://github.com/cyberreboot/vent') def test_inventory(): """ Test the inventory function """ tools = Tools() tools.inventory() def test_stop(): """ Test the stop function """ tools = Tools() tools.stop('https://github.com/cyberreboot/vent', 'rabbitmq') def test_remove(): """ Test the remove function """ tools = Tools() tools.remove('https://github.com/cyberreboot/vent', 'rabbitmq')
21.382353
67
0.618982
87
727
5.114943
0.275862
0.224719
0.202247
0.258427
0.231461
0.166292
0
0
0
0
0
0
0.204952
727
33
68
22.030303
0.769896
0.177442
0
0.277778
0
0
0.250883
0
0
0
0
0
0
1
0.277778
false
0
0.055556
0
0.333333
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
0424bed5a3cc93db1a2e369f7f3bb60054dd6e19
97
py
Python
attendances/apps.py
wilmoz/attendance-django
c08405079406d8b2a7307643c48d173e5d8d57b8
[ "MIT" ]
4
2016-11-02T20:38:22.000Z
2022-02-11T11:39:01.000Z
attendances/apps.py
wilmoz/attendance-django
c08405079406d8b2a7307643c48d173e5d8d57b8
[ "MIT" ]
null
null
null
attendances/apps.py
wilmoz/attendance-django
c08405079406d8b2a7307643c48d173e5d8d57b8
[ "MIT" ]
1
2018-05-22T01:44:52.000Z
2018-05-22T01:44:52.000Z
from django.apps import AppConfig class AttendancesConfig(AppConfig): name = 'attendances'
16.166667
35
0.773196
10
97
7.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.154639
97
5
36
19.4
0.914634
0
0
0
0
0
0.113402
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
043a8a6a527090bfc550139a3c4f7ccd02cf2312
99
py
Python
escolaridade/apps.py
Bleno/sisgestor-django
c35f76eafc3e51afb99c84245e01881cef43aa5b
[ "MIT" ]
1
2017-04-27T19:26:49.000Z
2017-04-27T19:26:49.000Z
escolaridade/apps.py
Bleno/sisgestor-django
c35f76eafc3e51afb99c84245e01881cef43aa5b
[ "MIT" ]
null
null
null
escolaridade/apps.py
Bleno/sisgestor-django
c35f76eafc3e51afb99c84245e01881cef43aa5b
[ "MIT" ]
null
null
null
from django.apps import AppConfig class EscolaridadeConfig(AppConfig): name = 'escolaridade'
16.5
36
0.777778
10
99
7.7
0.9
0
0
0
0
0
0
0
0
0
0
0
0.151515
99
5
37
19.8
0.916667
0
0
0
0
0
0.121212
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
045d2fcfd1ee2227bf5832e324bcc245aaaa3e77
3,432
py
Python
etl/parsers/etw/Microsoft_Windows_International_RegionalOptionsControlPanel.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
104
2020-03-04T14:31:31.000Z
2022-03-28T02:59:36.000Z
etl/parsers/etw/Microsoft_Windows_International_RegionalOptionsControlPanel.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
7
2020-04-20T09:18:39.000Z
2022-03-19T17:06:19.000Z
etl/parsers/etw/Microsoft_Windows_International_RegionalOptionsControlPanel.py
IMULMUL/etl-parser
76b7c046866ce0469cd129ee3f7bb3799b34e271
[ "Apache-2.0" ]
16
2020-03-05T18:55:59.000Z
2022-03-01T10:19:28.000Z
# -*- coding: utf-8 -*- """ Microsoft-Windows-International-RegionalOptionsControlPanel GUID : c6bf6832-f7bd-4151-ac21-753ce4707453 """ from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct from etl.utils import WString, CString, SystemTime, Guid from etl.dtyp import Sid from etl.parsers.etw.core import Etw, declare, guid @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15000, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15000_0(Etw): pattern = Struct( "LocaleName" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15001, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15001_0(Etw): pattern = Struct( "LocaleName" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15002, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15002_0(Etw): pattern = Struct( "LCType" / WString, "Data" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15003, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15003_0(Etw): pattern = Struct( "LocaleName" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15004, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15004_0(Etw): pattern = Struct( "String" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15005, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15005_0(Etw): pattern = Struct( "String" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15006, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15006_0(Etw): pattern = Struct( "Value" / Int32ul ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15007, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15007_0(Etw): pattern = Struct( "LocaleName" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15010, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15010_0(Etw): pattern = Struct( "LocaleName" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=15011, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_15011_0(Etw): pattern = Struct( "LocaleName" / WString ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=16000, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_16000_0(Etw): pattern = Struct( "LocaleName" / WString, "StatusCode" / Int32ul ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=16001, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_16001_0(Etw): pattern = Struct( "LocaleName" / WString, "StatusCode" / Int32ul ) @declare(guid=guid("c6bf6832-f7bd-4151-ac21-753ce4707453"), event_id=16002, version=0) class Microsoft_Windows_International_RegionalOptionsControlPanel_16002_0(Etw): pattern = Struct( "LocaleName" / WString )
32.685714
123
0.752914
381
3,432
6.577428
0.167979
0.089385
0.162011
0.312849
0.817638
0.817638
0.789705
0.431764
0.431764
0.431764
0
0.16425
0.136072
3,432
104
124
33
0.680944
0.036713
0
0.361111
0
0
0.1835
0.141947
0
0
0
0
0
1
0
false
0
0.055556
0
0.416667
0
0
0
0
null
0
0
1
1
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
4
f091f0911acf849365a51db21113cd3c63d6a854
176
py
Python
python_modules/dagster/dagster/core/storage/schedules/__init__.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/dagster/dagster/core/storage/schedules/__init__.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/dagster/dagster/core/storage/schedules/__init__.py
dbatten5/dagster
d76e50295054ffe5a72f9b292ef57febae499528
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
from .base import ScheduleStorage from .schema import ScheduleStorageSqlMetadata from .sql_schedule_storage import SqlScheduleStorage from .sqlite import SqliteScheduleStorage
35.2
52
0.886364
18
176
8.555556
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.090909
176
4
53
44
0.9625
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
f0b898d85cae838163f11406e507ed4062da986f
75
py
Python
tests/strings/lstrip1.py
treeform/pystorm
3a2224bcdaccc5a2abf6a820c0bcf7afa3e6fed4
[ "MIT" ]
50
2015-03-24T19:45:34.000Z
2022-02-20T04:34:26.000Z
tests/strings/lstrip1.py
dusty-phillips/pyjaco
066895ae38d1828498e529c1875cb88df6cbc54d
[ "MIT" ]
2
2017-02-26T09:43:07.000Z
2017-03-06T20:04:24.000Z
tests/strings/lstrip1.py
Slater-Victoroff/pyjaco
89c4e3c46399c5023b0e160005d855a01241c58a
[ "MIT" ]
12
2016-03-07T09:30:49.000Z
2021-09-05T20:38:47.000Z
s = "abcxyz" print "original("+s+")" print "strip("+s.lstrip("cba")+")"
10.714286
34
0.546667
10
75
4.1
0.7
0
0
0
0
0
0
0
0
0
0
0
0.133333
75
6
35
12.5
0.630769
0
0
0
0
0
0.356164
0
0
0
0
0
0
0
null
null
0
0
null
null
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
1
0
0
0
0
0
0
1
0
4
f0d52113ac6472c2476145c52fb301284e0e32e4
99
py
Python
cride/circles/models/__init__.py
jpablocardona/platzi-django-advance
591fbfbb318ba235933544e585a6866ede829d63
[ "MIT" ]
null
null
null
cride/circles/models/__init__.py
jpablocardona/platzi-django-advance
591fbfbb318ba235933544e585a6866ede829d63
[ "MIT" ]
6
2020-06-06T01:34:33.000Z
2022-03-12T00:21:34.000Z
cride/circles/models/__init__.py
jpablocardona/platzi-django-advance
591fbfbb318ba235933544e585a6866ede829d63
[ "MIT" ]
null
null
null
from .cicles import Circle from .memberships import Membership from .invitations import Invitation
24.75
35
0.848485
12
99
7
0.666667
0
0
0
0
0
0
0
0
0
0
0
0.121212
99
3
36
33
0.965517
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
9bcccdd9968a76b96630888a7794fc6481e14f03
63
py
Python
tests/syntax/unicode_quote3.py
hoefling/friendly-traceback
26acac903521c5f0e5cf837d32bda750918d4afb
[ "MIT" ]
45
2021-07-06T03:30:20.000Z
2022-03-16T17:30:58.000Z
tests/syntax/unicode_quote3.py
hoefling/friendly-traceback
26acac903521c5f0e5cf837d32bda750918d4afb
[ "MIT" ]
110
2021-06-28T11:48:46.000Z
2022-03-25T20:41:25.000Z
tests/syntax/unicode_quote3.py
hoefling/friendly-traceback
26acac903521c5f0e5cf837d32bda750918d4afb
[ "MIT" ]
4
2021-07-05T20:56:39.000Z
2021-11-11T20:24:34.000Z
# unicode quote not in pair; mistaken < if a ‹ hello: pass
15.75
39
0.650794
11
63
3.818182
1
0
0
0
0
0
0
0
0
0
0
0
0.269841
63
3
40
21
0.891304
0.587302
0
0
0
0
0
0
0
0
0
0
0
0
null
null
0.5
0
null
null
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
1
0
0
1
0
0
0
0
0
4
9bccf966a88fcfd2112c52286f3a624c5615246b
137
py
Python
sct4.py
PythonProgramming/MPI4Py-Parallel-Computing-tutorial
3cb408738fd4306d33757d640c2757686f22bb79
[ "MIT" ]
4
2017-09-15T17:01:27.000Z
2021-11-15T06:35:01.000Z
sct4.py
PythonProgramming/MPI4Py-Parallel-Computing-tutorial
3cb408738fd4306d33757d640c2757686f22bb79
[ "MIT" ]
null
null
null
sct4.py
PythonProgramming/MPI4Py-Parallel-Computing-tutorial
3cb408738fd4306d33757d640c2757686f22bb79
[ "MIT" ]
5
2018-07-14T11:47:14.000Z
2021-05-31T02:21:10.000Z
from mpi4py import MPI comm = MPI.COMM_WORLD rank=comm.rank size=comm.size print 'Rank:',rank print 'Node Count:',size print 9**(rank+3)
17.125
24
0.744526
25
137
4.04
0.52
0.138614
0
0
0
0
0
0
0
0
0
0.024793
0.116788
137
7
25
19.571429
0.809917
0
0
0
0
0
0.116788
0
0
0
0
0
0
0
null
null
0
0.142857
null
null
0.428571
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
1
0
4
9bcf3004437c13a1ac677a23048dbbec19e28cec
164
py
Python
tests/mdown/examples/code/code.py
looking-for-a-job/mdown.py
75733ceaf4c6970d0e631b6efdfcd422098cea65
[ "Unlicense" ]
1
2020-10-09T22:57:20.000Z
2020-10-09T22:57:20.000Z
tests/mdown/examples/code/code.py
looking-for-a-job/mdown.py
75733ceaf4c6970d0e631b6efdfcd422098cea65
[ "Unlicense" ]
null
null
null
tests/mdown/examples/code/code.py
looking-for-a-job/mdown.py
75733ceaf4c6970d0e631b6efdfcd422098cea65
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python import mdown string = """```bash $ [sudo] pip install readme-md ```""" assert string == mdown.code("$ [sudo] pip install readme-md", "bash")
20.5
69
0.640244
23
164
4.565217
0.652174
0.133333
0.266667
0.380952
0.419048
0
0
0
0
0
0
0
0.140244
164
7
70
23.428571
0.744681
0.121951
0
0
0
0
0.531469
0
0
0
0
0
0.2
1
0
false
0
0.2
0
0.2
0
1
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
9bd3bb538686f839606627f6c046e212211a3be3
158
py
Python
Python/driver.py
stivenramireza/uber-oop
56f9f78d2c01d59f62cb59671d90a90c69e8b099
[ "MIT" ]
null
null
null
Python/driver.py
stivenramireza/uber-oop
56f9f78d2c01d59f62cb59671d90a90c69e8b099
[ "MIT" ]
null
null
null
Python/driver.py
stivenramireza/uber-oop
56f9f78d2c01d59f62cb59671d90a90c69e8b099
[ "MIT" ]
null
null
null
from account import Account class Driver(Account): def __init__(self, name: str, document: str) -> None: super().__init__(name, document)
22.571429
58
0.658228
19
158
5.052632
0.684211
0
0
0
0
0
0
0
0
0
0
0
0.227848
158
6
59
26.333333
0.786885
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.75
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
9bda365c251254dfaa4696ab32f3a444723fcf98
620
py
Python
codigo/Live32/myfunctor.py
cassiasamp/live-de-python
00b5e51793097544ba9b75c97a0d30e63970bf45
[ "MIT" ]
572
2018-04-03T03:17:08.000Z
2022-03-31T19:05:32.000Z
codigo/Live32/myfunctor.py
cassiasamp/live-de-python
00b5e51793097544ba9b75c97a0d30e63970bf45
[ "MIT" ]
176
2018-05-18T15:56:16.000Z
2022-03-28T20:39:07.000Z
codigo/Live32/myfunctor.py
cassiasamp/live-de-python
00b5e51793097544ba9b75c97a0d30e63970bf45
[ "MIT" ]
140
2018-04-18T13:59:11.000Z
2022-03-29T00:43:49.000Z
from myABC import Functor class MyFunctor(Functor): def __init__(self, list_): self._d = list_ def __getitem__(self, pos): return self._d[pos] def __len__(self): return len(self._d) def fmap(self, function): return MyFunctor([function(x) for x in self._d]) def __repr__(self): return '{}'.format(self._d) def __mul__(self, functor): """ver em oslash ou pymonad.""" # if isinstance(functor, Functor): # return list(map(lambda value: [func(value) for func in functor], # self._d)) pass
23.846154
79
0.569355
76
620
4.276316
0.460526
0.092308
0.073846
0
0
0
0
0
0
0
0
0
0.312903
620
25
80
24.8
0.762911
0.256452
0
0
0
0
0.004415
0
0
0
0
0
0
1
0.428571
false
0.071429
0.071429
0.285714
0.857143
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
1
0
1
1
0
0
4
9bf72099effa527bd842e9401b1f9011e79fe59c
81
py
Python
setup.py
uzh-rpg/aegnn
d96e13b2f80f3c7515a65baf966544e0914d068d
[ "MIT" ]
null
null
null
setup.py
uzh-rpg/aegnn
d96e13b2f80f3c7515a65baf966544e0914d068d
[ "MIT" ]
null
null
null
setup.py
uzh-rpg/aegnn
d96e13b2f80f3c7515a65baf966544e0914d068d
[ "MIT" ]
null
null
null
from distutils.core import setup setup(name='aegnn', packages=['aegnn'])
13.5
32
0.679012
10
81
5.5
0.8
0
0
0
0
0
0
0
0
0
0
0
0.17284
81
5
33
16.2
0.820896
0
0
0
0
0
0.125
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
500707b11eb495336f3c8b3bf25d04849fe74b2d
168
py
Python
LR2Server/__init__.py
sjb9703/LR2Server
51d2684d8cc19f92799fb75053e942324c35be7e
[ "MIT" ]
1
2016-09-01T15:48:42.000Z
2016-09-01T15:48:42.000Z
LR2Server/__init__.py
kuna/LR2Server
51d2684d8cc19f92799fb75053e942324c35be7e
[ "MIT" ]
null
null
null
LR2Server/__init__.py
kuna/LR2Server
51d2684d8cc19f92799fb75053e942324c35be7e
[ "MIT" ]
null
null
null
# check - http://stackoverflow.com/questions/12881294/django-create-a-zip-of-multiple-files-and-make-it-downloadable # http://blog.hannal.net/07-python_django_lecture/
56
116
0.797619
25
168
5.28
0.92
0
0
0
0
0
0
0
0
0
0
0.061728
0.035714
168
2
117
84
0.753086
0.970238
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
50279a48d3ec656c2f0edc245ab0938810c0e428
1,203
py
Python
tests/unit/test_abstract_base.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
null
null
null
tests/unit/test_abstract_base.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
null
null
null
tests/unit/test_abstract_base.py
xolynrac/examen_final_4c
dfa19b44fee6a17b7efc5630f1c8580aabc549e9
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, Moritz E. Beber. # # 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 # # https://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. """Ensure the expected behaviour of the abstract base class.""" from structurizr.abstract_base import AbstractBase class ConcreteBase(AbstractBase): """Implement a concrete class for testing purposes.""" pass def test_base_init(): """Expect proper initialization from arguments.""" ConcreteBase() def test_hash_int(): """Expect that a concrete class's hash is an integer.""" assert isinstance(hash(ConcreteBase()), int) def test_set_collection(): """Expect that a concrete class can be collected in a set.""" {ConcreteBase(), ConcreteBase(), ConcreteBase()} # noqa: B018
29.341463
74
0.731505
167
1,203
5.227545
0.610778
0.068729
0.04811
0.036655
0.054983
0
0
0
0
0
0
0.011089
0.175395
1,203
40
75
30.075
0.868952
0.689942
0
0
0
0
0
0
0
0
0
0
0.111111
1
0.333333
true
0.111111
0.111111
0
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
1
1
0
0
1
0
0
4
503f2efc6cc82e9ee7de6b584f03bc9aaaad90df
209
py
Python
arguments.py
arshadkazmi42/py-redirect
410a8f08be03ce65e1e9224bba9a3aafd85030db
[ "MIT" ]
1
2021-09-26T10:35:24.000Z
2021-09-26T10:35:24.000Z
arguments.py
arshadkazmi42/py-redirect
410a8f08be03ce65e1e9224bba9a3aafd85030db
[ "MIT" ]
null
null
null
arguments.py
arshadkazmi42/py-redirect
410a8f08be03ce65e1e9224bba9a3aafd85030db
[ "MIT" ]
null
null
null
import sys class Arguments: def __init__(self): self.args = sys.argv def get_filename(self): if len(self.args) < 2: return False return self.args[1]
12.294118
30
0.535885
26
209
4.115385
0.653846
0.224299
0
0
0
0
0
0
0
0
0
0.015385
0.37799
209
16
31
13.0625
0.807692
0
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.125
0
0.75
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
504a26feba642a89a4b72171364831e458121437
105
py
Python
weather/forms.py
kiwiheretic/logos-v2
22739221a6d431322c809b7e17aba54f37eb9617
[ "Apache-2.0" ]
4
2015-02-20T08:11:59.000Z
2019-05-15T23:48:11.000Z
weather/forms.py
kiwiheretic/logos-v2
22739221a6d431322c809b7e17aba54f37eb9617
[ "Apache-2.0" ]
58
2015-01-11T02:10:09.000Z
2022-03-20T01:20:15.000Z
weather/forms.py
kiwiheretic/logos-v2
22739221a6d431322c809b7e17aba54f37eb9617
[ "Apache-2.0" ]
1
2016-06-15T00:49:44.000Z
2016-06-15T00:49:44.000Z
from django import forms class SiteSetupForm(forms.Form): api_key = forms.CharField(max_length=200)
21
45
0.780952
15
105
5.333333
0.866667
0
0
0
0
0
0
0
0
0
0
0.032967
0.133333
105
4
46
26.25
0.846154
0
0
0
0
0
0
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
ac9af217bb1665509e5894c600f4b88b95c74389
22,426
py
Python
ili9341/fonts/etypo_23.py
HadrienLG/micropython-ili9341
975101949a722570c76b7bda72d8b292d2a9fd8d
[ "MIT" ]
2
2021-09-28T07:56:50.000Z
2022-02-08T07:26:13.000Z
ili9341/fonts/etypo_23.py
HadrienLG/micropython-ili9341
975101949a722570c76b7bda72d8b292d2a9fd8d
[ "MIT" ]
null
null
null
ili9341/fonts/etypo_23.py
HadrienLG/micropython-ili9341
975101949a722570c76b7bda72d8b292d2a9fd8d
[ "MIT" ]
3
2021-06-15T03:48:10.000Z
2022-02-28T02:52:18.000Z
# Created from ttf-fonts/Entypo.otf with freetype-generator. # freetype-generator created by Meurisse D ( MCHobby.be ). Entypo_23 = { 'width' : 0x16, 'height' : 0x17, 33:( 0x800000, 0x980000, 0xbc0000, 0xbe0000, 0xbe0000, 0xbc0000, 0xbc0000, 0x9c0000, 0x9e0000, 0x8f0000, 0x8f8000, 0x87c600, 0x83ef00, 0x81ff80, 0x807f80, 0x803f80, 0x800f00, 0x800000), 34:( 0xbffff8, 0xfffffc, 0xf8001c, 0xf8001c, 0xf8001c, 0xc8001c, 0xc8001c, 0xf8001c, 0xf8001c, 0xf8001c, 0xf8001c, 0xbffffc), 35:( 0x800f06, 0x80ff9e, 0x87fff8, 0x9ffce0, 0x9ffc60, 0xbffce0, 0xbfffc0, 0xbfffc0, 0xbfff80, 0x9ffc00, 0x8fe000, 0x878000), 36:( 0x800400, 0x800e00, 0x801e00, 0x801f00, 0x801f00, 0x801f00, 0x801f00, 0x801f00, 0xfffff0, 0x800000, 0x8001c0, 0x8007c0, 0x8007c0, 0x8007c0, 0x8007c0, 0x8007c0, 0x8007c0, 0x8007c0, 0x800780, 0x800380, 0x800100), 37:( 0xff8800, 0xff9800, 0xff3800, 0xff3800, 0xfe7800, 0xfe7800, 0xfcf800, 0xfcf800, 0xf9f800, 0xf9f800, 0xf9f800, 0xfcf800, 0xfcf800, 0xfe7800, 0xfe7800, 0xff3800, 0xff3800, 0xff9800, 0xff9800), 38:( 0xe00000, 0xfc0000, 0xe20000, 0xc70000, 0xcf8000, 0xbfc000, 0x9fe000, 0x8ff000, 0x87f800, 0x83fc00, 0x81fe00, 0x80ff00, 0x807f80, 0x803f80, 0x801f00, 0x800e00, 0x800400), 39:( 0x800000, 0x8f0000, 0x9fc000, 0xb06000, 0xe23000, 0xe79800, 0xe4cc00, 0xe66600, 0xa73300, 0xb39980, 0x99ccc0, 0x8ce660, 0x867330, 0x833918, 0x819c0c, 0x80ce0c, 0x80630c, 0x80318c, 0x801cf8, 0x800e70, 0x800600), 40:( 0x808000, 0x81c000, 0x83e000, 0x87f000, 0x8ff000, 0x9ff800, 0xbffc00, 0xbffe00, 0x83e000, 0x83e000, 0x83e000, 0x83e000, 0x83c000, 0x878000, 0x878000, 0x870000, 0x8e0000, 0x980000, 0xa00000), 41:( 0x808000, 0x81c000, 0x83e000, 0x877000, 0x8e3000, 0x9cb800, 0xbddc00, 0xbbce00, 0x83e000, 0x87f000, 0x8ff800, 0x9ffc00, 0xbffe00, 0x83e000, 0x83e000, 0x83e000, 0x83c000, 0x87c000, 0x8f8000, 0x9e0000, 0xb80000), 42:( 0xa00000, 0x980000, 0x8c0000, 0x870000, 0x878000, 0x878000, 0x83c000, 0x83c000, 0x83e000, 0x83e000, 0x83e000, 0xfffe00, 0xbffc00, 0x9ff800, 0x8ff800, 0x87f000, 0x83e000, 0x81c000, 0x808000), 43:( 0xf00000, 0xf80000, 0xf80000, 0xfc0000, 0xfc0000, 0xfc0000, 0xfe0fe0, 0xff3fe0, 0xfffff0, 0xfffff0, 0xfffff0, 0xfffff0, 0xff3fe0, 0xfe0fe0, 0xfc0000, 0xfc0000, 0xfc0000, 0xf80000, 0xf80000, 0xf00000), 44:( 0xfc0000, 0xfc0000, 0xfe0000, 0xfe0fc0, 0xffbfe0, 0xffffe0, 0xffffe0, 0xffffe0, 0xff3fc0, 0xfe0f80, 0xfe0000, 0xfc0000, 0xfc1e00, 0xf9ff00, 0xf9ff00, 0x83ff00, 0xff3f00, 0xfe0000, 0xfe0000, 0xfc0000, 0xfc0000), 45:( 0xfc0000, 0xfc0000, 0xfe0000, 0xfe07c0, 0xff1ff0, 0xfffff0, 0xfffff0, 0xfffff0, 0xfffff0, 0xfffff0, 0xff1fe0, 0xfe07c0, 0xfe0000, 0xfc3000, 0xfc3000, 0xf83000, 0xf9fe00, 0x81fe00, 0x803000, 0x803000, 0x803000), 46:( 0xbfff80, 0xffffc0, 0xe000c0, 0xe000c0, 0xe6ecc0, 0xe6ecc0, 0xe6ecc0, 0xe6ecc0, 0xe6ecc0, 0xe6ecc0, 0xe000c0, 0xe000c0, 0xe230c0, 0xe3f8c0, 0xe3f8c0, 0xe278c0, 0xe200c0, 0xe000c0, 0xe000c0, 0xffffc0, 0xbfff80), 47:( 0xfffe00, 0xfffe00, 0xe00600, 0xe00600, 0xe00600, 0xe00200, 0xe1c200, 0xe07000, 0xe03800, 0xe03800, 0xe01c00, 0xe01c00, 0xe01c00, 0xe01e00, 0xe1ffc0, 0xe0ff80, 0xf87f00, 0xfc3e00, 0x801e00, 0x801c00, 0x800800), 48:( 0x803e00, 0x81ff00, 0x87ff80, 0x8fe1c0, 0xbfc1c0, 0xffc1c0, 0x9fc1c0, 0x8fe3c0, 0x83ff80, 0x80ff00, 0x801c00), 49:( 0xfffe00, 0xfffe00, 0xb00300, 0x900180, 0x980080, 0x8fffc0, 0x8800c0, 0x980180, 0xb00100, 0xa00300, 0xfffe00, 0xa00300, 0xb00100, 0x980180, 0x9800c0, 0x8fffc0, 0x9800c0, 0x980180, 0xb00100, 0xa00300, 0xfffe00), 50:( 0x80fc00, 0x83ff00, 0x8f8780, 0x9e01c0, 0x9c00e0, 0xb80070, 0xb3c030, 0xf1f038, 0xe1f818, 0xe1cc18, 0xe0c418, 0xe0c618, 0xe07218, 0xf01e30, 0xb00730, 0xb80070, 0x9c00e0, 0x8f03c0, 0x87ff80, 0x81fe00), 51:( 0x802000, 0x802000, 0x803000, 0x803000, 0x803800, 0x803800, 0x807c00, 0x807c00, 0x83fe00, 0xbffe00, 0x8e0f00, 0x878700, 0x81e380, 0x8071c0, 0x801cc0, 0x800760, 0x8001e0, 0x800060, 0x800000), 52:( 0x81f800, 0x87fe00, 0x8e2380, 0x9c21c0, 0x9820c0, 0xb02060, 0xa00020, 0xe00030, 0xfe03f0, 0xfe03f0, 0xe00030, 0xa00020, 0xb02060, 0xb020e0, 0x9821c0, 0x8e2380, 0x87ff00, 0x81fc00), 53:( 0x807000, 0x80f800, 0x80fc00, 0x80fc00, 0x80fc00, 0x80fc00, 0x81dc00, 0x818e00, 0x838e00, 0x870700, 0x860380, 0xbe03e0, 0xfe03f0, 0xfe03f0, 0xfe03f0, 0xbe03f0, 0x9c01e0), 54:( 0x807800, 0x80fc00, 0x81fe00, 0x83fe00, 0x87ff00, 0x8fff00, 0x9ffe00, 0xbffe00, 0xbffc00, 0xfffc00, 0xbffe00, 0x9ffe00, 0x8ffe00, 0x87ff00, 0x83ff00, 0x81fe00, 0x80fe00, 0x807c00, 0x800000), 55:( 0x800000, 0x800800, 0x801800, 0x803800, 0xb83800, 0x9ff800, 0x8ff800, 0x87fe00, 0x87ffc0, 0x83fff0, 0x87ff80, 0x8ffc00, 0x9ff800, 0x9f7800, 0xb03800, 0x801800, 0x801800, 0x800800, 0x800000), 56:( 0x8ff000, 0x8ff000, 0x8ff000, 0x8ff000, 0x800000, 0x8ff000, 0x9ff000, 0x9ff800, 0xbffc00, 0xfffe00, 0xffffc0, 0xffffe0, 0xffffe0, 0xfff800, 0xfff800, 0xfff800, 0xbff800, 0xbff800, 0x9ff000), 57:( 0x87fc00, 0x8ffe00, 0x8ffe00, 0xfffe00, 0xbffe00, 0x9ffe00, 0x8f0000, 0x8f3fe0, 0x8f3ff0, 0x8f3ff0, 0x8f3ff0, 0x8f3ff0, 0x8f3ff0, 0x873ff0, 0x803ff0, 0x807ff0, 0x80fff0, 0x81fff0, 0x803ff0, 0x803ff0, 0x803ff0), 58:( 0x87fe00, 0x87ff00, 0x8fff00, 0x8fff00, 0x8fff00, 0x8fff00, 0x8fff00, 0x8fff00, 0x9fff00, 0xbfff00, 0xffff00, 0x8fff00, 0x8fff00, 0x8fff00, 0x8fff00, 0x87ff00, 0x87fe00), 59:( 0xc03800, 0xc0fc00, 0xe0fc00, 0xb0fc00, 0x9dfc00, 0x8ffc00, 0x83f800, 0x800000, 0x800000, 0xc07800, 0xc0fc00, 0xe0fc00, 0xb0fc00, 0x9ffc00, 0x8ff800, 0x83f000, 0x800000, 0x800000, 0x800000), 60:( 0x83e000, 0x83f400, 0xc3f400, 0xfff400, 0xfff600, 0xe1f600, 0xe077c0, 0xe077c0, 0xe077c0, 0xe077c0, 0xe077c0, 0xe077c0, 0xe077c0, 0xe077c0, 0xe07600, 0xe3f600, 0xfff600, 0xfff400, 0x83f400, 0x83f400, 0x83e000), 61:( 0x800000, 0x881f00, 0x9fffc0, 0xb7ffe0, 0xb1fff0, 0xb5fff8, 0xb6fff0, 0xb6fff0, 0xb37ff0, 0x937ff0, 0x907fe0, 0x983fc0, 0x883f80, 0x8c3e00, 0x863800, 0x833000, 0x81e000, 0x80e000), 62:( 0x9e0000, 0xbf0000, 0xf38000, 0xe1c000, 0xe0e000, 0xf07000, 0xb83800, 0x999800, 0x839800, 0x833b00, 0x838380, 0x81c1c0, 0x80e0c0, 0x8070c0, 0x8039c0, 0x801f80, 0x800f00), 63:( 0x800180, 0x801f80, 0x81ff80, 0x9fffc0, 0xbf7fe0, 0xb03fe0, 0x801fe0, 0x801fe0, 0x801fc0, 0x801f80, 0x803f00, 0x807e00, 0x807e00, 0x807e00, 0x803e00, 0x801e00, 0x800e00, 0x800300, 0x800100), 64:( 0x820800, 0x873800, 0x87fc00, 0x87fc00, 0xbfff80, 0xff1fc0, 0xfe0fc0, 0xbc0780, 0x9c0700, 0xbc0700, 0xbc0780, 0xfe0fc0, 0xff1fc0, 0x8fff00, 0x87fc00, 0x87fc00, 0x831800, 0x820800), 65:( 0x9c0000, 0xbe0000, 0xbf0000, 0xff8000, 0xbfc000, 0x9fe000, 0x8ff000, 0x87d800, 0x83cc00, 0x81cf80, 0x80ffc0, 0x807fe0, 0x803ff0, 0x803fd0, 0x803f10, 0x801e30, 0x801e60, 0x800ec0, 0x800780), 66:( 0x8003c0, 0x8007c0, 0x800c40, 0x801840, 0x8033c0, 0xb07fe0, 0xf07f30, 0xf8ff30, 0xffff10, 0xfffe10, 0xffff10, 0xf9ff10, 0xf0ff30, 0xb07fe0, 0x8037c0, 0x803040, 0x801c40, 0x800fc0, 0x8003c0), 67:( 0x818000, 0x83c000, 0x87e000, 0x9fe000, 0xbff000, 0xfff800, 0xbffc00, 0xbffc00, 0x9ffe00, 0x8fff00, 0x8fff00, 0x87ff80, 0x83ff80, 0x81f180, 0x81f180, 0x80f700, 0x807e00, 0x800d00, 0x8000c0, 0x80007c, 0x800000), 68:( 0xbffc00, 0xfffe00, 0xfffe00, 0xfffe00, 0xfffe00, 0xff3f00, 0xf80fc0, 0xf087c0, 0xf3e7c0, 0xe7f3c0, 0xe7f3c0, 0xe7e3c0, 0xe3e3c0, 0xf1c7c0, 0xf80fc0, 0xfe3f00, 0xfffe00, 0xfffe00, 0xffe600, 0xfffe00, 0xbffc00), 69:( 0x820000, 0x840000, 0x8c0000, 0x9c0000, 0x9c0000, 0xbc0000, 0xbc0000, 0xbc0000, 0xbc0000, 0xbe0000, 0xbf0000, 0x9f8000, 0x9fc000, 0x8ff060, 0x87ffc0, 0x83ff80, 0x81fe00, 0x800000), 70:( 0x83c000, 0x8ff000, 0x9ffc00, 0xbffe00, 0xbfff00, 0xffff00, 0xffff80, 0xffff80, 0xffff80, 0xffff80, 0xf8ff80, 0xf8ff80, 0xb8ff80, 0xbfff80, 0x9fff80, 0x9c7f00, 0x803f00, 0x803f00, 0x803e00, 0x803c00, 0x803000), 71:( 0xb00000, 0xb8e000, 0x9c7800, 0x863c00, 0x831e00, 0x878f00, 0x87cf00, 0x87e780, 0x87e780, 0x87f780, 0x87f380, 0x87fb80, 0x83fb80, 0x81ff80, 0x807f80, 0x801f80, 0x800780, 0x800380, 0x800180, 0x800000, 0x800000), 72:( 0x980000, 0xbe0000, 0xbe0000, 0xbf0000, 0xbf0000, 0xbf0000, 0x9ffff8, 0x8ffff8, 0x8000f0, 0x8000e0, 0x8001c0, 0x801f00, 0x800000, 0x800000, 0x800000), 73:( 0x800f00, 0x83ff80, 0xfffe80, 0xfffec0, 0xfffe40, 0xffe640, 0xff8640, 0xff3e40, 0xfe7e40, 0xfe7e40, 0xfe3e40, 0xff0640, 0xffc640, 0xfffe40, 0xfffe40, 0xfffec0, 0x9fff80, 0x803f00), 74:( 0x810400, 0x81dc00, 0x81fc00, 0x80f800, 0x807000, 0x807000, 0xe07070, 0xfe73f0, 0xbfffe0, 0x8fff80, 0x87fe00, 0x81fc00, 0x807000, 0x807000, 0x807000, 0x807000, 0x807000, 0x807000, 0x807000, 0x807000, 0x802000), 75:( 0x80f800, 0x87de00, 0x8e0380, 0x9e03c0, 0xbfffe0, 0xbf8fe0, 0xee03b0, 0xc60310, 0xc40110, 0xc40110, 0xc40110, 0xc40110, 0xc60330, 0xbf07f0, 0xbfffe0, 0x9f77c0, 0x8e03c0, 0x860300, 0x83fe00, 0x802000), 76:( 0x87c060, 0x9ff090, 0xbc7890, 0xb018f0, 0xf03e00, 0xe0ff80, 0xe1ffc0, 0xe3cce0, 0xf39c70, 0xb73830, 0xbf7830, 0x9ff030, 0x87c030, 0x870030, 0x830070, 0x838060, 0x81c1e0, 0x80ffc0, 0x807f80), 77:( 0x860000, 0x8f0000, 0x9f8000, 0x9fc000, 0xbfe000, 0xbfe000, 0xf0f000, 0xe03000, 0xc63000, 0xcf1000, 0xcf9000, 0xcc1000, 0xc41000, 0xe03000, 0xf07000, 0xbfe000, 0xbfe000, 0x9fc000, 0x9fc000, 0x8f8000, 0x870000), 78:( 0x80f800, 0x87fe00, 0x8f8f80, 0x9c01c0, 0xb800e0, 0xb00060, 0xf00070, 0xe00030, 0xe00030, 0xe03f30, 0xe07f30, 0xe0c030, 0xf18070, 0xb00060, 0xb800e0, 0x9c01c0, 0x8e0380, 0x87ff00, 0x83fe00), 79:( 0x807c00, 0x80fc00, 0x818000, 0xe30000, 0xe37cf8, 0xe37cfc, 0xfe7cfc, 0xff7cfc, 0xe37cfc, 0xe33cf8, 0xe10000, 0x818000, 0x80fc00, 0x803c00), 80:( 0xbfff80, 0xffffc0, 0xe00fc0, 0xe00f00, 0xe00f70, 0xe00f70, 0xe00fc0, 0xe00fc0, 0xe00fc0, 0xe00fc0, 0xe00fc0, 0xe00fc0, 0xe00fc0, 0xe00f70, 0xe00f70, 0xe00f00, 0xe00fc0, 0xffffc0, 0xbfff80), 81:( 0x801000, 0xa03800, 0x983c00, 0x8e7e00, 0x87ff80, 0x83f3c0, 0x81e060, 0x80e010, 0x800000), 82:( 0x9e00f0, 0xb301b8, 0xb88248, 0xf8444c, 0xfc784c, 0xfe1044, 0xfe1044, 0xfc7844, 0xf8c44c, 0xb98248, 0xb301b8, 0x9e00f0), 83:( 0xb83180, 0xfc3180, 0xfc3180, 0xfc7180, 0xb87380, 0x80e380, 0x81c700, 0x87c700, 0xbf8e00, 0xfe1c00, 0xf83c00, 0x80f800, 0x83f000, 0xffc000, 0xff8000, 0xfc0000), 84:( 0x800400, 0x800e00, 0x800700, 0x802300, 0x807380, 0x803180, 0x813980, 0x8318c0, 0xb19cc0, 0xf98cc0, 0xf98cc0, 0xf98cc0, 0x939cc0, 0x8318c0, 0x813980, 0x803180, 0x807380, 0x802300, 0x800700, 0x800600, 0x800000), 85:( 0x9ff800, 0xbff800, 0xbff800, 0xbfff00, 0xffffc0, 0xfff8e0, 0xfff860, 0xfff860, 0xfff860, 0xffffe0, 0xffffc0, 0xbfff00, 0xbff800, 0xbff800, 0x9ff000), 86:( 0xbff000, 0xbff800, 0xfff800, 0xfff980, 0xfff9e0, 0xfff8f0, 0xfff830, 0xfff830, 0xfff830, 0xfffff0, 0xffffe0, 0xffff80, 0xfff800, 0xbff800, 0xbff000), 87:( 0x818000, 0x878000, 0x8f8000, 0x9f0000, 0xbc0000, 0xfc0000, 0xbe0000, 0x9f8000, 0x87e000, 0x81f000, 0x80fc00, 0x803e00, 0x801f00, 0x800700), 88:( 0xe03000, 0xf07000, 0xbde000, 0x9fc000, 0x8f8000, 0x8f8000, 0x9fc000, 0xbde000, 0xf87000, 0xe03000), 89:( 0x81f000, 0x87fc00, 0x8ffe00, 0x9fff00, 0xbfbf80, 0xbfbf80, 0xffbfc0, 0xffbfc0, 0xffbfc0, 0xffbfc0, 0xffbfc0, 0xffbfc0, 0xbfbf80, 0xbfbf80, 0x9fff00, 0x8ffe00, 0x87fc00, 0x81f000), 90:( 0x80f800, 0x83fe00, 0x8fff80, 0x9fffc0, 0x9f8fc0, 0xbf8fe0, 0xbf8fe0, 0xbf8fe0, 0xb800e0, 0xb800e0, 0xbf8fe0, 0xbf8fe0, 0xbf8fe0, 0x9f8fc0, 0x9fffc0, 0x8fff80, 0x83fe00, 0x80f800), 91:( 0x81f000, 0x87fe00, 0x8fff00, 0x9fff80, 0xbdf380, 0xb8e1c0, 0xfc43c0, 0xfe07c0, 0xff0fe0, 0xfe0fe0, 0xfc07e0, 0xf863c0, 0xb8f3c0, 0xbdff80, 0x9fff80, 0x8fff00, 0x87fc00, 0x80f000), 92:( 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000, 0xe00000), 93:( 0x830000, 0x830000, 0x830000, 0x830000, 0x830000, 0xfff800, 0xfff800, 0x830000, 0x830000, 0x830000, 0x830000, 0x830000), 94:( 0x81f800, 0x87ff00, 0x8fdf80, 0x9e03c0, 0xbc00e0, 0xb60060, 0xf30070, 0xe18030, 0xe0c030, 0xe06030, 0xe03030, 0xe01830, 0xf00c70, 0xf00670, 0xb803e0, 0x9c01c0, 0x9f07c0, 0x87ff80, 0x83fe00), 95:( 0x802000, 0x801000, 0xfe1800, 0xfff800, 0xfffc00, 0xbffc38, 0xb7fc7c, 0x987e7c, 0x88003c, 0x880018), 96:( 0x80f800, 0x83fe00, 0x8fff80, 0x9fffc0, 0x9fffe0, 0xbfffe0, 0xbffff0, 0xfbdff0, 0xf80ff0, 0xf80c70, 0xf90c70, 0xfdfc70, 0xfffff0, 0xbffff0, 0xbfffe0, 0x9fffc0, 0x8fffc0, 0x87ff00, 0x83fe00, 0x802000), 97:( 0x800380, 0x8003c0, 0x8003e0, 0x8003f0, 0xf9c070, 0xf9e070, 0xf9f070, 0xb8f870, 0x803df0, 0x801fe0, 0x801fe0, 0x800fc0), 98:( 0x80f800, 0x83fe00, 0x8fff80, 0x9fffc0, 0x9fffc0, 0xbfffe0, 0xbff9e0, 0xfff8f0, 0xf9fcf0, 0xf89cf0, 0xf98cf0, 0xffc0f0, 0xffe1f0, 0xbffbe0, 0xbfffe0, 0x9fffc0, 0x8fff80, 0x87ff00, 0x83fe00, 0x802000), 99:( 0xc00000, 0xf00000, 0xfc0000, 0xfe0000, 0xff8000, 0xffe000, 0xfff800, 0xfffc00, 0xffff00, 0xec0fc0, 0xec0fc0, 0xffff80, 0xfffe00, 0xfff800, 0xfff000, 0xffc000, 0xff0000, 0xfe0000, 0xf80000, 0xe00000), 100:( 0x81f000, 0x87fc00, 0x9f1e00, 0x9c0700, 0xb80380, 0xf001c0, 0xe000c0, 0xe000c0, 0xe000c0, 0xe000c0, 0xe000c0, 0xf001c0, 0xb04180, 0xa0c380, 0x81cf00, 0x83fe00, 0x83f800, 0x81c000, 0x80c000, 0x804000), 101:( 0x804000, 0x80c000, 0x81c000, 0x83f800, 0x83fe00, 0x81cf00, 0xa0c380, 0xb04180, 0xf001c0, 0xe000c0, 0xe000c0, 0xe000c0, 0xe000c0, 0xe000c0, 0xf001c0, 0xb80380, 0x9c0700, 0x8f1e00, 0x87fc00, 0x81f000), 102:( 0x8e0380, 0x8e0380, 0x8e0380, 0x8e0380, 0x8f0780, 0x870f00, 0x878700, 0x83e000, 0x81f000, 0x80f800, 0x823c00, 0x831e00, 0x878f00, 0x8f0700, 0x8e0380, 0x8e0380, 0x8e8380, 0xbf0fe0, 0x9f07c0, 0x8e0380, 0x840100), 103:( 0x802000, 0xf07000, 0xf0f800, 0xf1f800, 0xf3fc00, 0xf07000, 0xf07000, 0xf07000, 0xf07000, 0xf07000, 0xf07000, 0xf07000, 0xf07000, 0xf07000, 0xf07000, 0xfff000, 0xfff000, 0xbfe000), 104:( 0x800000, 0x802000, 0x803000, 0xfff800, 0xfffc00, 0xfff000, 0xf02000, 0xf04000, 0xf00000, 0xf00400, 0xf01c00, 0xe01c00, 0xc01c00, 0x801c00, 0x881c00, 0x981c00, 0xbffc00, 0xfffc00, 0xbff800, 0x880000, 0x880000), 105:( 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000), 106:( 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0xe33000, 0x800000, 0x800000, 0x800000, 0x830000, 0x830000, 0x830000, 0x830000, 0xfff000, 0xfff000, 0x830000, 0x830000, 0x830000, 0x830000), 107:( 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0x800000, 0x800000, 0xb83800, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xbc7800), 108:( 0xbfffe0, 0xfffff0, 0xe00030, 0xe00030, 0xe63330, 0xe63330, 0xe63330, 0xe63330, 0xe63330, 0xe63330, 0xe00030, 0xe00030, 0xe00030, 0xfffff0, 0xbfffe0), 109:( 0xbfffe0, 0xfffff0, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xe00030, 0xfffff0, 0xbfffe0), 110:( 0x87fff0, 0x87fff0, 0x860030, 0x860030, 0xffff30, 0xffff30, 0xe00330, 0xe00330, 0xe003f0, 0xe003f0, 0xe003e0, 0xe00300, 0xe00300, 0xffff00, 0xffff00), 111:( 0xbffe00, 0xffff00, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xe00300, 0xffff00, 0xbffe00), 112:( 0x800600, 0x803e00, 0x80ff00, 0x800700, 0xfff380, 0xfff380, 0xfff380, 0xe1f3c0, 0xe073c0, 0xe0f3c0, 0xe3f1e0, 0xe3f0e0, 0xe1f0e0, 0xe1f070, 0xe0f0f0, 0xe073f0, 0xe073c0, 0xe07300, 0xe1f000, 0xfff000, 0xfff000), 113:( 0xe63300, 0xe63300, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xf80f00, 0xfc1f00, 0xfe3f00, 0xfe3f00, 0xff7f00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xffff00, 0xe63300, 0xe63300), 114:( 0xbfffe0, 0xfffff0, 0xfffff0, 0xfffff0, 0xf8fff0, 0xf8fff0, 0xf8fff0, 0xf800f0, 0xfc00f0, 0xfff3f0, 0xffc7f0, 0xfffff0, 0xfffff0, 0xfffff0, 0xbfffe0), 115:( 0x81f000, 0xfff800, 0xfffb80, 0xfffbc0, 0xfffbc0, 0xfffbc0, 0xfffbc0, 0xfffbc0, 0xfffb80, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffb00, 0xfffa00, 0x8ff000), 116:( 0x803800, 0x8ffc00, 0xfff800, 0xfffb00, 0xfffb00, 0xfffb40, 0xfe3b40, 0xfe3b40, 0xfefb40, 0xfefb40, 0xfefb40, 0xfefb40, 0xfefb40, 0xfe3b40, 0xff3b40, 0xfffb40, 0xfffb00, 0xfffb00, 0xfff800, 0x87fc00, 0x801800), 117:( 0x800f00, 0x9fff80, 0xbffc80, 0xfffcc0, 0xfffcc0, 0xfffc40, 0xfffc40, 0xfffc40, 0xfffc40, 0xfffcc0, 0xfffcc0, 0xbffcc0, 0xbfff80, 0x80ff80, 0x800000), 118:( 0x9e0000, 0xff0000, 0xff0000, 0xff8000, 0xfec000, 0xfe4400, 0xfe0200, 0xf00300, 0xf07f80, 0xf07fc0, 0xf07fe0, 0xf07fc0, 0xf07f80, 0xf00300, 0xfc0300, 0xfe4200, 0xfec000, 0xfe8000, 0xff8000, 0xff0000, 0xbe0000), 119:( 0xbe0000, 0xff0000, 0xff0000, 0xfd8000, 0xfc8000, 0xfc0400, 0xfc0c00, 0xf01c00, 0xf03fe0, 0xf07fe0, 0xf07fe0, 0xf07fe0, 0xf03fe0, 0xf01c00, 0xfc0c00, 0xfc8400, 0xfc8000, 0xfd8000, 0xff0000, 0xfe0000, 0x9e0000), 120:( 0x8f8000, 0xbfe000, 0xf1fc00, 0xe1ff00, 0xe1ff80, 0xe1f780, 0xe1e780, 0xe1e000, 0xe1c000, 0xe18000, 0xe1c000, 0xe1c000, 0xe1e780, 0xe1f780, 0xe1ff80, 0xe1ff00, 0xe1fc00, 0xbff000, 0x8f8000), 121:( 0x9c0000, 0xfe0000, 0xff0000, 0xff0000, 0xffc000, 0xfff000, 0xfff800, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfff800, 0xfff000, 0xffc000, 0xffc000, 0xffc000, 0xffc000, 0xbf8000, 0x9f0000), 122:( 0x9c0000, 0xbf0000, 0xff0000, 0xff0000, 0xffe000, 0xfff800, 0xfff800, 0xfbfc00, 0xf9fc00, 0x80fe00, 0x803e00, 0x807c00, 0xf9fc00, 0xfbf800, 0xfff000, 0xffe000, 0xffe000, 0xffe000, 0xbfc000, 0xbfc000, 0x8f0000), 123:( 0xfffc00, 0xbffc00, 0xbff800, 0x9ff000, 0x8ff000, 0x8fe000, 0x87e000, 0x87c000, 0x838000, 0x818000, 0x810000), 124:( 0xbfff00, 0xffff00, 0xffff00, 0xbfff00, 0x800000, 0x800000, 0x800000, 0xbffe00, 0xffff00, 0xffff00, 0xbfff00), 125:( 0x83e000, 0x8ff800, 0x9ffc00, 0xbffe00, 0xbffe00, 0xbfff00, 0xffff00, 0xffff00, 0xffff00, 0xbfff00, 0xbffe00, 0x9ffe00, 0x9ffc00, 0x8ff800, 0x83e000), 126:( 0xbffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xfffc00, 0xbffc00), 174:( 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0x800000, 0x800000, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00, 0xfc7c00), 196:( 0xfff800, 0xfff000, 0xbff000, 0x9fe000, 0x9fc000, 0x8fc000, 0x878000, 0x870000, 0x830000, 0xfff800, 0xfff800, 0xbff000, 0x9fe000, 0x9fe000, 0x8fc000, 0x878000, 0x878000, 0x830000, 0x800000), 197:( 0x820000, 0x830000, 0x878000, 0x8f8000, 0x8fc000, 0x9fe000, 0xbfe000, 0xbff000, 0xfff800, 0x800000, 0x830000, 0x870000, 0x878000, 0x8fc000, 0x9fe000, 0xbfe000, 0xbff000, 0xfff800, 0xfff000), 199:( 0xfff800, 0xfff800, 0xfff800, 0x800000, 0x830000, 0x870000, 0x878000, 0x8fc000, 0x8fc000, 0x9fe000, 0xbfe000, 0xbff000, 0xbff000), 201:( 0xbff000, 0xbff000, 0x9fe000, 0x9fe000, 0x8fc000, 0x8f8000, 0x878000, 0x830000, 0x830000, 0xbff000, 0xfff800, 0xfff800, 0xfff800), 209:( 0xfe0000, 0xfc0000, 0xfc0000, 0xfe0000, 0xaf0000, 0x870000, 0x820000, 0x800000, 0x800000, 0x800000, 0x800c00, 0x801e40, 0x801fc0, 0x800fc0, 0x8007c0, 0x8007c0, 0x800fc0), 214:( 0x900000, 0xb80000, 0xfd0000, 0xbf0000, 0x9f0000, 0x8f0000, 0x9f0000, 0x800000, 0x800000, 0x800000, 0x801f80, 0x801f00, 0x801e00, 0x801f80, 0x801fc0, 0x8013c0, 0x800180), 220:( 0xc00000, 0xe00000, 0xe00000, 0xf00000, 0xf00000, 0xf80000, 0xfc0000, 0xfc0000, 0xfe0000, 0xfe0000, 0xff0000, 0xff0000, 0xff8000, 0xffc000, 0xffc000, 0xffe000, 0xffe000, 0xfff000, 0xbff000), 224:( 0xe00000, 0xf00000, 0xb9e000, 0x9cfc00, 0x8e7f00, 0x873f80, 0x939fc0, 0x99c8c0, 0x9ce080, 0x9e7180, 0x9f3900, 0x9f9c00, 0x9f0e00, 0x8f0700, 0x8e3380, 0x87e1c0, 0x83c0e0, 0x800070, 0x800020), 225:( 0x800000, 0x800000, 0x800000, 0x80f800, 0x83fe00, 0x87ff80, 0x87ffc0, 0x8fffe0, 0x8ffe60, 0x8ff860, 0x8ff040, 0x8fe0c0, 0x87c198, 0x87c31e, 0x87860e, 0x838c02, 0x81f860, 0x81e070, 0x800338, 0x800318, 0x800380, 0x800180), 226:( 0x808000, 0x81c000, 0x83e000, 0x87f000, 0x8ff800, 0x9ffc00, 0xbffe00, 0xffff80, 0x87f800, 0x87f800, 0x87f800, 0x87f800, 0x87f800, 0x87f800, 0x87f800), 227:( 0x800000, 0x808000, 0x80c000, 0x80e000, 0xfff000, 0xfff800, 0xfffc00, 0xfffe00, 0xffff00, 0xfffe00, 0xfffc00, 0xfff800, 0x80f000, 0x80e000, 0x80c000, 0x808000), 228:( 0x808000, 0x818000, 0x838000, 0x878000, 0x8fff00, 0x9fff00, 0xbfff00, 0xffff00, 0xffff00, 0xbfff00, 0x9fff00, 0x8fff00, 0x878000, 0x838000, 0x818000, 0x808000), 229:( 0x87f800, 0x87f800, 0x87f800, 0x87f800, 0x87f800, 0x87f800, 0x87f800, 0xffff80, 0xbfff00, 0x9ffe00, 0x8ffc00, 0x87f800, 0x83f000, 0x81e000, 0x80c000), 231:( 0x800000, 0x818000, 0x83c000, 0x87e000, 0x8ff000, 0x9ff800, 0xbff800, 0xfffc00, 0x87e000, 0x87e000, 0x87e000, 0x87e000, 0x87e000, 0x87e000, 0x87e000), 232:( 0x808000, 0x80c000, 0x80e000, 0x80f000, 0xfff800, 0xfffc00, 0xfffe00, 0xffff00, 0xfffc00, 0xfff800, 0x80f000, 0x80e000, 0x80c000, 0x808000), 233:( 0x808000, 0x818000, 0x838000, 0x878000, 0x8fff00, 0xbfff00, 0xffff00, 0xffff00, 0xbfff00, 0x9fff00, 0x878000, 0x838000, 0x818000, 0x808000), 234:( 0x87e000, 0x87e000, 0x87e000, 0x87e000, 0x87e000, 0x87e000, 0x87e000, 0xfffe00, 0xbffc00, 0x9ff800, 0x8ff000, 0x87f000, 0x83e000, 0x83c000, 0x818000), 235:( 0x80fc00, 0x83ff00, 0x8f8780, 0x9e01c0, 0xb800e0, 0xb00060, 0xf03070, 0xe07830, 0xe0fc30, 0xe3fe30, 0xe07830, 0xe07830, 0xf07870, 0xb07860, 0xb800e0, 0x9c01c0, 0x8e03c0, 0x87ff80, 0x81fe00), 236:( 0x80f800, 0x87fe00, 0x8f8f80, 0x9c01c0, 0xb800e0, 0xb00060, 0xf01070, 0xe01830, 0xe3fc30, 0xe3fe30, 0xe3fc30, 0xe3f830, 0xf01070, 0xb02060, 0xb800e0, 0x9c01c0, 0x8e0380, 0x87ff00, 0x83fe00), 237:( 0x80f800, 0x87fe00, 0x8f8f80, 0x9c01c0, 0xb800e0, 0xb00060, 0xf04070, 0xe0c030, 0xe1fe30, 0xe3fe30, 0xe1fe30, 0xe0fe30, 0xf04070, 0xb04060, 0xb800e0, 0x9c01c0, 0x8e0380, 0x87ff00, 0x83fe00), 238:( 0x80fc00, 0x83ff00, 0x8f8780, 0x9e01c0, 0xb800e0, 0xb00060, 0xf07870, 0xe07830, 0xe07830, 0xe07a30, 0xe1fc30, 0xe0f830, 0xf07070, 0xb02060, 0xb800e0, 0x9c01c0, 0x8e03c0, 0x87ff80, 0x81fe00), 239:( 0x808000, 0x80c000, 0xffe000, 0xfff000, 0xfff800, 0xfffc00, 0xfffe00, 0x80ff00, 0x80ff80, 0x80ffc0, 0x80ffc0, 0x80ff80, 0xffff00, 0xfffe00, 0xfffc00, 0xfff800, 0xfff000, 0x80e000, 0x80c000), 241:( 0xfffff0, 0xbffff0, 0x9ffff0, 0x8ffff0, 0x8ffff0, 0x9ffff0, 0xbffff0, 0xfffff0), 242:( 0xbf8000, 0xff8000, 0xe00000, 0xe00000, 0xe3ff80, 0xe7ffc0, 0xe600c0, 0xe600c0, 0xe600c0, 0x8600c0, 0x8600c0, 0x8600c0, 0x8600c0, 0x8600c0, 0x8600c0, 0x87ffc0, 0x83ff80), 243:( 0x87fff0, 0x8ffff0, 0x8c0070, 0x98c460, 0x988c60, 0x9188c0, 0xb118c0, 0xb001c0, 0xffff80, 0xffff80, 0xffff80, 0xb00180, 0xb118c0, 0x9188c0, 0x988c60, 0x98c460, 0x8c0060, 0x8ffff0, 0x87fff0), 244:( 0x807c00, 0x80ff00, 0x81c780, 0x830180, 0x8701c0, 0x8600c0, 0x8600c0, 0x8600c0, 0x8600c0, 0x830180, 0x878380, 0x8fff00, 0x9ffe00, 0xbe0000, 0xbc0000, 0xb80000, 0x900000), 246:( 0xb80000, 0xbc0000, 0xfc0000, 0xbc0000, 0x980000, 0x800000, 0x800000, 0x900000, 0xbc0000, 0xfc0000, 0xbc0000, 0xb80000, 0x800000, 0x800000, 0x800000, 0xb80000, 0xfc0000, 0xfc0000, 0xbc0000) }
172.507692
226
0.784625
2,292
22,426
7.676702
0.371291
0.020006
0.025916
0.030918
0.170048
0.120034
0.080477
0.047741
0.044103
0.03501
0
0.545378
0.102337
22,426
129
227
173.844961
0.328647
0.005128
0
0
0
0
0.000493
0
0
0
0.770307
0
0
1
0
false
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
1
1
0
0
0
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
4
acca3bfb192faee9239223eac33783d5ec4ed845
26
py
Python
myenv/lib/python3.7/site-packages/grpc/_grpcio_metadata.py
theCydonian/AudioEyes
3dece4529b31e6c63771c4358457962999bda3b4
[ "MIT" ]
2
2021-04-19T13:50:55.000Z
2022-02-04T13:29:35.000Z
myenv/lib/python3.7/site-packages/grpc/_grpcio_metadata.py
theCydonian/AudioEyes
3dece4529b31e6c63771c4358457962999bda3b4
[ "MIT" ]
null
null
null
myenv/lib/python3.7/site-packages/grpc/_grpcio_metadata.py
theCydonian/AudioEyes
3dece4529b31e6c63771c4358457962999bda3b4
[ "MIT" ]
3
2020-06-19T03:21:35.000Z
2022-02-04T13:29:39.000Z
__version__ = """1.29.0"""
26
26
0.576923
4
26
2.75
1
0
0
0
0
0
0
0
0
0
0
0.166667
0.076923
26
1
26
26
0.291667
0
0
0
0
0
0.222222
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
acf5be7253dfb2f29d5de2566b1d05d772c4fbf1
307
py
Python
feedback_form/app_settings.py
joebos/django-feedback-form
522dd907c06b231b2c663ee9abe2d2c003ea10e1
[ "MIT" ]
4
2017-04-25T23:03:36.000Z
2021-07-27T06:55:13.000Z
feedback_form/app_settings.py
joebos/django-feedback-form
522dd907c06b231b2c663ee9abe2d2c003ea10e1
[ "MIT" ]
1
2021-06-10T23:15:16.000Z
2021-06-10T23:15:16.000Z
feedback_form/app_settings.py
joebos/django-feedback-form
522dd907c06b231b2c663ee9abe2d2c003ea10e1
[ "MIT" ]
3
2015-02-09T09:32:42.000Z
2016-09-30T14:43:16.000Z
"""Settings of the ``feedback_form``` application.""" from django.conf import settings FEEDBACK_FORM_COLOR = getattr(settings, 'FEEDBACK_FORM_COLOR', '#6caec9') FEEDBACK_FORM_TEXTCOLOR = getattr(settings, 'FEEDBACK_FORM_TEXTCOLOR', '#fff') FEEDBACK_FORM_TEXT = getattr(settings, 'FEEDBACK_FORM_TEXT', '')
38.375
78
0.778502
37
307
6.108108
0.432432
0.371681
0.353982
0.358407
0
0
0
0
0
0
0
0.007117
0.084691
307
7
79
43.857143
0.797153
0.153094
0
0
0
0
0.279528
0.090551
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c57cb2ac50f1f69f8e7956f020862a4ce296f551
80
py
Python
signac/src/wsgi.py
berceanu/signac-driven-fbpic
49567e6fd59bd6d097a1ded8b14890ceb9ee47c3
[ "BSD-3-Clause" ]
1
2021-07-18T11:37:49.000Z
2021-07-18T11:37:49.000Z
signac/src/wsgi.py
berceanu/signac-driven-fbpic
49567e6fd59bd6d097a1ded8b14890ceb9ee47c3
[ "BSD-3-Clause" ]
7
2019-06-19T08:55:00.000Z
2019-10-17T17:03:05.000Z
signac/src/wsgi.py
berceanu/signac-driven-fbpic
49567e6fd59bd6d097a1ded8b14890ceb9ee47c3
[ "BSD-3-Clause" ]
2
2020-07-03T03:05:40.000Z
2021-07-16T11:57:51.000Z
from dashboard import dashboard if __name__ == "__main__": dashboard.run()
16
31
0.725
9
80
5.555556
0.777778
0
0
0
0
0
0
0
0
0
0
0
0.175
80
4
32
20
0.757576
0
0
0
0
0
0.1
0
0
0
0
0
0
1
0
true
0
0.333333
0
0.333333
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
c5976595eacedd1228b6369c1017d6db64d0a877
359
py
Python
microbiome_analyzer/__init__.py
FranckLejzerowicz/microbiome_analyzer
7d48f69eac85fecc0016efba52ea23d846cdcaa2
[ "BSD-3-Clause" ]
null
null
null
microbiome_analyzer/__init__.py
FranckLejzerowicz/microbiome_analyzer
7d48f69eac85fecc0016efba52ea23d846cdcaa2
[ "BSD-3-Clause" ]
null
null
null
microbiome_analyzer/__init__.py
FranckLejzerowicz/microbiome_analyzer
7d48f69eac85fecc0016efba52ea23d846cdcaa2
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2022, Franck Lejzerowicz. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ---------------------------------------------------------------------------- __version__ = "2.0"
35.9
78
0.417827
29
359
5.034483
0.793103
0
0
0
0
0
0
0
0
0
0
0.01875
0.108635
359
9
79
39.888889
0.4375
0.899721
0
0
0
0
0.107143
0
0
0
0
0
0
1
0
false
0
0
0
0
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
1
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c59fa74f10c5ad94d318e5d7b1e2c0bd3de2763b
36,157
py
Python
tests/snc/environments/test_rl_environment_wrapper.py
dmcnamee/snc
c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786
[ "Apache-2.0" ]
null
null
null
tests/snc/environments/test_rl_environment_wrapper.py
dmcnamee/snc
c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786
[ "Apache-2.0" ]
null
null
null
tests/snc/environments/test_rl_environment_wrapper.py
dmcnamee/snc
c2da8c1e9ecdc42c59b9de73224b3d50ee1c9786
[ "Apache-2.0" ]
null
null
null
import pytest import numpy as np import tensorflow as tf from gym import spaces as gym_spaces from tf_agents.environments.gym_wrapper import GymWrapper from tf_agents.environments.tf_py_environment import TFPyEnvironment import snc.utils.snc_tools as snc from snc.environments.rl_environment_wrapper \ import RLControlledRandomWalk, rl_env_from_snc_env from snc.environments.job_generators. \ scaled_bernoulli_services_poisson_arrivals_generator \ import ScaledBernoulliServicesPoissonArrivalsGenerator from snc.environments.job_generators.discrete_review_job_generator \ import DeterministicDiscreteReviewJobGenerator import snc.environments.state_initialiser as stinit from snc.environments.scenarios import load_scenario def test_find_coupled_resource_sets_a(): """ Test the _find_coupled_resource_sets method of the wrapped RL environment directly. The method takes in a binary matrix denoting which resources are affected by which constraints and returns a list of sets of resources the actions of which are made dependent by the constraints. This is essentially noticing and interpreting the chaining effect of multiple constraints on activities. """ # Each resource has one activity and all are independent. independent_resource_constraints_matrix = np.eye(4) # => resource sets are [{0}, {1}, {2}, {3}] # Run the method for the test case defined above independent_resource_sets = RLControlledRandomWalk._find_coupled_resource_sets( independent_resource_constraints_matrix) # Assert that the responses are as expected. assert independent_resource_sets == [{0}, {1}, {2}, {3}] def test_find_coupled_resource_sets_b(): """ Test the _find_coupled_resource_sets method of the wrapped RL environment directly. The method takes in a binary matrix denoting which resources are affected by which constraints and returns a list of sets of resources the actions of which are made dependent by the constraints. This is essentially noticing and interpreting the chaining effect of multiple constraints on activities. """ # The constraints lead to resources 0 and 2, and 1 and 3 being coupled into two dependent sets. simple_resource_constraints_matrix = np.array([ [1, 0], [0, 1], [1, 0], [0, 1] ]) # => Resource sets are [{0, 2}, {1, 3}] # Run the method for the test case defined above simple_resource_sets = RLControlledRandomWalk._find_coupled_resource_sets( simple_resource_constraints_matrix ) # Assert that the responses are as expected. assert simple_resource_sets == [{0, 2}, {1, 3}] def test_find_coupled_resource_sets_c(): """ Test the _find_coupled_resource_sets method of the wrapped RL environment directly. The method takes in a binary matrix denoting which resources are affected by which constraints and returns a list of sets of resources the actions of which are made dependent by the constraints. This is essentially noticing and interpreting the chaining effect of multiple constraints on activities. """ # This test case tests the chaining effect. The first constraint links resources 0 and 1 then # the second links resources 2 and 3 and the third links 1 and 2 which creates a chain such that # resources 0, 1, 2 and 3 form one large dependent resource set overlapping_resource_constraints_matrix = np.array([ [1, 0, 0], [1, 0, 1], [0, 1, 1], [0, 1, 0] ]) # => Resource set is {0, 1, 2, 3} # Run the method for the test case defined above overlapping_resource_sets = RLControlledRandomWalk._find_coupled_resource_sets( overlapping_resource_constraints_matrix ) # Assert that the responses are as expected. assert overlapping_resource_sets == [{0, 1, 2, 3}] def test_single_server_queue_spaces(): """ Tests the RL environment wrapper for the Single Server Queue. The set up is copied from the examples file: snc/stochastic_network_control/environments/examples.py """ # Set up the environment parameters. cost_per_buffer = np.ones((1, 1)) initial_state = (0,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.7 job_conservation_flag = True seed = 72 demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) assert job_generator.routes == {} state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) # Test that the wrapper sets the spaces up as we would expect. assert isinstance(env.action_space, gym_spaces.Tuple) assert len(env._rl_action_space.spaces) == 1 assert isinstance(env._rl_action_space.spaces[0], gym_spaces.Box) assert env.action_space.spaces[0].shape == (1, 2) assert isinstance(env.activities_action_space, gym_spaces.Box) assert env.activities_action_space.shape == (1, 1) assert isinstance(env.observation_space, gym_spaces.Box) assert env.observation_space.shape == (1,) def test_independent_resource_actions(): """ Tests the RL environment wrapper for the ksrs_network_model example as per the examples file from which the initial set up code is copied. see snc/stochastic_network_control/environments/examples.py for the original code. """ # Set up the environment parameters. alpha1, alpha3 = 2, 2 mu1, mu2, mu3, mu4 = 10, 3, 10, 3 cost_per_buffer = np.ones((4, 1)) initial_state = (0, 0, 0, 0) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = True seed = 72 demand_rate = np.array([alpha1, 0, alpha3, 0])[:, None] buffer_processing_matrix = np.array([[-mu1, 0, 0, 0], [mu1, -mu2, 0, 0], [0, 0, -mu3, 0], [0, 0, mu3, -mu4]]) constituency_matrix = np.array([[1, 0, 0, 1], [0, 1, 1, 0]]) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag) # Test that the wrapper sets the spaces up as we would expect. assert len(env._rl_action_space.spaces) == 2 assert np.all(np.array([s.shape[1] for s in env._rl_action_space.spaces]) == 3) assert len(env._action_vectors) == 3 + 3 assert env.observation_space.shape == (4,) def test_input_queued_switch_spaces(): """ Test the RL environment wrapper for the input_queued_switch_3x3_model example. This is a good test for resources with activity constraints. See snc/stochastic_network_control/environments/examples.py for the original set up code. """ # Set up the environment parameters. mu11, mu12, mu13, mu21, mu22, mu23, mu31, mu32, mu33 = (1,) * 9 cost_per_buffer = np.ones((9, 1)) initial_state = np.zeros((9, 1)) capacity = np.ones((9, 1)) * np.inf demand_rate = 0.3 * np.ones((9, 1)) job_conservation_flag = True seed = 72 buffer_processing_matrix = - np.diag([mu11, mu12, mu13, mu21, mu22, mu23, mu31, mu32, mu33]) constraints = np.array([[1, 0, 0, 1, 0, 0, 1, 0, 0], [0, 1, 0, 0, 1, 0, 0, 1, 0], [0, 0, 1, 0, 0, 1, 0, 0, 1]]) constituency_matrix = np.vstack([ np.array([[1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1]]), constraints] ) index_phys_resources = (0, 1, 2) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, index_phys_resources=index_phys_resources) # Test that the environment wrapper works as expected. assert isinstance(env._rl_action_space, gym_spaces.Tuple) assert len(env._rl_action_space.spaces) == 1 # There are overall 34 combinations of activities (or inactivity) that are feasible. assert len(env._action_vectors) == 34 assert env._action_vectors.shape == (34, 9) assert snc.is_binary(env._action_vectors) assert snc.is_binary(np.matmul(env._action_vectors, constraints.T)) def test_rl_env_with_simple_activity_conditions(): """ Sets up a simple case of a tandem model with 4 independent resources each with one action. Activity constraints are then added as a way of testing the wrapper's handling of such activity constraints. """ # Set up the environment parameters. alpha1 = 4 cost_per_buffer = np.ones((4, 1)) initial_state = np.zeros((4, 1)) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = False seed = 72 demand_rate = np.array([alpha1, 0, 0, 0])[:, None] buffer_processing_matrix = np.array([ [-1, 0, 0, 0], [1, -1, 0, 0], [0, 1, -1, 0], [0, 0, 1, -1] ]) constituency_matrix = np.vstack([np.eye(4), np.array([[1, 1, 0, 0]])]) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, index_phys_resources=(0, 1, 2, 3)) # Ensure that the action spaces are as expected. assert len(env._rl_action_space.spaces) == 3 assert env._rl_action_space.spaces[0].shape == (1, 3) assert env._rl_action_space.spaces[1].shape == (1, 2) def test_rl_env_with_complex_activity_conditions(): """ A more complicated version of the previous test (test_rl_env_with_simple_activity_conditions). Tests the handling of more complex activity constraints in an 8 resource and 8 activity tandem model. """ # Set up environment parameters. alpha1 = 4 cost_per_buffer = np.ones((8, 1)) initial_state = np.zeros((8, 1)) capacity = np.ones((8, 1)) * np.inf job_conservation_flag = False seed = 72 demand_rate = np.array([alpha1, 0, 0, 0, 0, 0, 0, 0])[:, None] buffer_processing_matrix = np.array([ [-1, 0, 0, 0, 0, 0, 0, 0], [1, -1, 0, 0, 0, 0, 0, 0], [0, 1, -1, 0, 0, 0, 0, 0], [0, 0, 1, -1, 0, 0, 0, 0], [0, 0, 0, 1, -1, 0, 0, 0], [0, 0, 0, 0, 1, -1, 0, 0], [0, 0, 0, 0, 0, 1, -1, 0], [0, 0, 0, 0, 0, 0, 1, -1] ]) constraints_matrix = np.array([ [1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0] ]) constituency_matrix = np.vstack([np.eye(8), constraints_matrix]) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, index_phys_resources=(0, 1, 2, 3, 4, 5, 6, 7)) # Test that action spaces are as expected. assert len(env._rl_action_space.spaces) == 5 # First group has 4 resources, and 8 actions. assert env._rl_action_space.spaces[0].shape == (1, 8) # Each independent group has only two actions. assert env._rl_action_space.spaces[1].shape == (1, 2) def test_simple_rl_action_interpretation(): """ Tests the mechanism for reading in actions from an RL model. This utilises the 4 resource 4 activity tandem model. """ # Tandem model set up without any additional activity constraints alpha1 = 4 cost_per_buffer = np.ones((4, 1)) initial_state = np.zeros((4, 1)) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = False seed = 72 demand_rate = np.array([alpha1, 0, 0, 0])[:, None] buffer_processing_matrix = np.array([ [-1, 0, 0, 0], [1, -1, 0, 0], [0, 1, -1, 0], [0, 0, 1, -1] ]) constituency_matrix = np.eye(4) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, index_phys_resources=(0, 1, 2, 3)) # Build various test RL actions in increasing complexity null_action = env._interpret_rl_action(np.zeros(8)) binary_action_one = np.zeros(8) binary_action_one[1] = 1 action_one = env._interpret_rl_action(binary_action_one) binary_action_two = np.zeros(8) binary_action_two[[1, 3, 5, 7]] = 1 action_two = env._interpret_rl_action(binary_action_two) # Test that the actions are interpreted correctly assert np.all(null_action == np.zeros(4)) assert np.all(action_one == np.array([1, 0, 0, 0])) assert np.all(action_two == np.ones(4)) def test_complex_rl_action_interpretation(): """ Tests the RL environment's action interpretation for the ksrs_network_model example as per the examples file from which the initial set up code is copied. See snc/stochastic_network_control/environments/examples.py for the original code. This tests action interpretation where each resource controls multiple activities. """ # Set up model parameters alpha1, alpha3 = 2, 2 mu1, mu2, mu3, mu4 = 10, 3, 10, 3 cost_per_buffer = np.ones((4, 1)) initial_state = (0, 0, 0, 0) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = True seed = 72 demand_rate = np.array([alpha1, 0, alpha3, 0])[:, None] buffer_processing_matrix = np.array([[-mu1, 0, 0, 0], [mu1, -mu2, 0, 0], [0, 0, -mu3, 0], [0, 0, mu3, -mu4]]) constituency_matrix = np.array([[1, 0, 0, 1], [0, 1, 1, 0]]) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag) # ----------------- Enumeration of Actions ----------------- # Zero: First group idles # First: First activity on (first action of first group) # Second: Fourth activity on (second action of first group) # Third: Second group idles # Fourth: Second activity (first action of second group) # Fifth: Third activity (second action of second group) # Build various test RL actions in increasing complexity idle_action = env._interpret_rl_action(np.zeros(6)) binary_action_a = np.zeros(6) binary_action_a[2] = 1 action_a = env._interpret_rl_action(binary_action_a) binary_action_b = np.zeros(6) binary_action_b[[2, 4]] = 1 action_b = env._interpret_rl_action(binary_action_b) # Check that the null action, a simple action and an action combining activities across resource # sets is set up correctly. assert np.all(idle_action == np.zeros(4)) assert np.all(action_a == np.array([0, 0, 0, 1])) assert np.all(action_b == np.array([0, 1, 0, 1])) def test_simple_numpy_action_interpretation(): """ Test interpretation of action where there is only one action space. This is done in the single server queue setting so that there is one resource and therefore one action space. This tests actions as numpy arrays. """ # Set up single server queue. cost_per_buffer = np.ones((1, 1)) initial_state = (0,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.7 job_conservation_flag = True seed = 72 demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) assert job_generator.routes == {} state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) action = np.array([0, 1]) assert env.preprocess_action(action) == np.array([1]) def test_simple_tensorflow_action_interpretation(): """ Test interpretation of action where there is only one action space. This is done in the single server queue setting so that there is one resource and therefore one action space. This tests actions as TensorFlow arrays. """ # Set up single server queue. cost_per_buffer = np.ones((1, 1)) initial_state = (0,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.7 job_conservation_flag = True seed = 72 demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) assert job_generator.routes == {} state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) action = tf.convert_to_tensor([0, 1], tf.float32) assert env.preprocess_action(action) == np.array([1]) def test_tensorflow_action_interpretation(): """ Tests that tuples of TensorFlow tensors can be handled correctly by the environment. """ # Set up the environment parameters. alpha1, alpha3 = 2, 2 mu1, mu2, mu3, mu4 = 10, 3, 10, 3 cost_per_buffer = np.ones((4, 1)) initial_state = (0, 0, 0, 0) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = True seed = 72 demand_rate = np.array([alpha1, 0, alpha3, 0])[:, None] buffer_processing_matrix = np.array([[-mu1, 0, 0, 0], [mu1, -mu2, 0, 0], [0, 0, -mu3, 0], [0, 0, mu3, -mu4]]) constituency_matrix = np.array([[1, 0, 0, 1], [0, 1, 1, 0]]) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag) # Set up a TensorFlow action tuple with an action for each resource and ensure that the # environment is able to interpret it and update itself. action_tuple = (tf.convert_to_tensor([0, 1, 0]), tf.convert_to_tensor([0, 0, 1])) assert np.all(env.preprocess_action(action_tuple) == np.array([[1], [0], [1], [0]])) def test_action_interpretation_error(): """ Tests that when actions are not of an expected format that the correct error is thrown. Uses the single server queue for simplicity. """ # Set up single server queue. cost_per_buffer = np.ones((1, 1)) initial_state = (0,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.7 job_conservation_flag = True seed = 72 demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) assert job_generator.routes == {} state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) misformatted_action_tuple = (1, 2, 3) misformatted_action_value = int(1) pytest.raises(ValueError, env.preprocess_action, misformatted_action_tuple) pytest.raises(ValueError, env.preprocess_action, misformatted_action_value) def test_stepping_environment_with_action_tuple(): """ Tests the RL environment wrapper for the ksrs_network_model example as per the examples file from which the initial set up code is copied. see snc/stochastic_network_control/environments/examples.py for the original code. """ # Set up the environment parameters. alpha1, alpha3 = 2, 2 mu1, mu2, mu3, mu4 = 10, 3, 10, 3 cost_per_buffer = np.ones((4, 1)) initial_state = (0, 0, 0, 0) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = True seed = 72 demand_rate = np.array([alpha1, 0, alpha3, 0])[:, None] buffer_processing_matrix = np.array([[-mu1, 0, 0, 0], [mu1, -mu2, 0, 0], [0, 0, -mu3, 0], [0, 0, mu3, -mu4]]) constituency_matrix = np.array([[1, 0, 0, 1], [0, 1, 1, 0]]) # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag) # Set up a numpy action tuple with an action for each resource and ensure that the environment # is able to interpret it and update itself. action_tuple = (np.array([0, 1, 0]), np.array([0, 0, 1])) env.step(action_tuple) def test_tf_environment_wrapping(): """ Test wrapping the RL environment for use with TensorFlow Agents. Use Simple Server Queue for simplicity """ # Set up single server queue. cost_per_buffer = np.ones((1, 1)) initial_state = (0,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.7 job_conservation_flag = True seed = 72 demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) assert job_generator.routes == {} state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) # Try wrapping environment for tf agents. tf_env = TFPyEnvironment(GymWrapper(env)) del tf_env def test_render_error(): """ Test the render method. Included to give full test coverage. """ # Set up single server queue. cost_per_buffer = np.ones((1, 1)) initial_state = (0,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.7 job_conservation_flag = True seed = 72 demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) assert job_generator.routes == {} state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) # Test that the environment fails to render. This will need to be fixed should we wish to # visualise episodes in future. pytest.raises(NotImplementedError, env.render) def test_action_processing_in_single_server_queue(): """ Tests the interpretation and application of actions in the single server queue with deterministic dynamics. This is validated in terms of the environment state and rewards. """ # Set up single server queue with no arrivals and deterministic dynamics. cost_per_buffer = np.ones((1, 1)) initial_state = (10,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.0 job_conservation_flag = True demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = DeterministicDiscreteReviewJobGenerator( sim_time_interval=1, demand_rate=demand_rate, buffer_processing_matrix=buffer_processing_matrix ) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) new_state_idle, reward_idle, _, _ = env.step(np.array([1, 0])) assert new_state_idle[0] == initial_state[0] assert reward_idle == initial_state[0] * -1. new_state_active, reward_active, _, _ = env.step(np.array([0, 1])) assert new_state_active[0] == initial_state[0] - 1 assert reward_active == (initial_state[0] - 1) * -1. def test_action_processing_with_multiple_resource_sets(): """ Tests the interpretation and application of actions in a more complex environment with deterministic dynamics. This is validated in terms of the environment state and rewards. """ # Set up the environment parameters with no arrivals and deterministic dynamics. alpha1, alpha3 = 0, 0 mu1, mu2, mu3, mu4 = 10, 3, 10, 3 cost_per_buffer = np.ones((4, 1)) initial_state = (100, 100, 100, 100) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = True demand_rate = np.array([alpha1, 0, alpha3, 0])[:, None] buffer_processing_matrix = np.array([[-mu1, 0, 0, 0], [mu1, -mu2, 0, 0], [0, 0, -mu3, 0], [0, 0, mu3, -mu4]]) constituency_matrix = np.array([[1, 0, 0, 1], [0, 1, 1, 0]]) # Construct deterministic job generator. job_generator = DeterministicDiscreteReviewJobGenerator( sim_time_interval=1, demand_rate=demand_rate, buffer_processing_matrix=buffer_processing_matrix ) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag) # Ensure that the idling actions do not change the environment state and are rewarded # accordingly. idle_action = (np.array([1, 0, 0]), np.array([1, 0, 0])) new_state_idle, reward_idle, _, _ = env.step(idle_action) assert all((np.array(initial_state) / sum(initial_state)) == new_state_idle) assert reward_idle == -1 * np.dot(initial_state, cost_per_buffer) # Ensure that the action which activates activities 2 and 4 is interpreted and rewarded # correctly. active_action = (np.array([0, 0, 1]), np.array([0, 1, 0])) new_state_active, reward_active, _, _ = env.step(active_action) assert np.allclose(new_state_active, np.array([100, 97, 100, 97]) / 394) assert reward_active == -1 * np.dot(env.state.flatten(), cost_per_buffer) def test_state_scaling_only_for_rl(): """ Tests that the state of the underlying ControlledRandomWalk object is not mutated as a side effect of the RLControlledRandomWalk wrapper. """ # Set up the environment parameters with no arrivals and deterministic dynamics. alpha1, alpha3 = 0, 0 mu1, mu2, mu3, mu4 = 10, 3, 10, 3 cost_per_buffer = np.ones((4, 1)) initial_state = (100, 100, 100, 100) capacity = np.ones((4, 1)) * np.inf job_conservation_flag = True demand_rate = np.array([alpha1, 0, alpha3, 0])[:, None] buffer_processing_matrix = np.array([[-mu1, 0, 0, 0], [mu1, -mu2, 0, 0], [0, 0, -mu3, 0], [0, 0, mu3, -mu4]]) constituency_matrix = np.array([[1, 0, 0, 1], [0, 1, 1, 0]]) # Construct deterministic job generator. job_generator = DeterministicDiscreteReviewJobGenerator( sim_time_interval=1, demand_rate=demand_rate, buffer_processing_matrix=buffer_processing_matrix ) state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag) # Ensure that scaling is applied to the RL state but not the underlying stated. assert np.all(env.state == np.array([[100], [100], [100], [100]])) active_action = (np.array([0, 0, 1]), np.array([0, 1, 0])) new_state_active, _, _, _ = env.step(active_action) assert np.all(env.state == np.array([[100], [97], [100], [97]])) assert np.allclose(new_state_active, np.array([100, 97, 100, 97]) / 394) def test_rl_env_from_snc_env_action_space_dims_simple(): """ Tests the formation and stability of the action space dimensions of the environment through the RL environment pipeline in a simple setting. """ # Set up the environment parameters. cost_per_buffer = np.ones((1, 1)) initial_state = (0,) capacity = np.ones((1, 1)) * np.inf demand_rate_val = 0.7 job_conservation_flag = True seed = 72 demand_rate = np.array([demand_rate_val])[:, None] buffer_processing_matrix = - np.ones((1, 1)) constituency_matrix = np.ones((1, 1)) list_boundary_constraint_matrices = [constituency_matrix] # Construct environment. job_generator = ScaledBernoulliServicesPoissonArrivalsGenerator( demand_rate, buffer_processing_matrix, job_gen_seed=seed) assert job_generator.routes == {} state_initialiser = stinit.DeterministicCRWStateInitialiser(initial_state) env = RLControlledRandomWalk(cost_per_buffer, capacity, constituency_matrix, job_generator, state_initialiser, job_conservation_flag, list_boundary_constraint_matrices) _, action_space_dims = rl_env_from_snc_env(env, discount_factor=0.99, for_tf_agent=False) _, action_space_dims_tf = rl_env_from_snc_env(env, discount_factor=0.99, for_tf_agent=True) assert action_space_dims == action_space_dims_tf assert len(env.action_vectors) == sum(action_space_dims) def test_rl_env_from_snc_env_action_space_dims_multiple_resource_sets(): """ Tests the formation and stability of the action space dimensions of the environment through the RL environment pipeline in a more complex setting. """ # Set the environment name for this case as the asserts are difficult to make as variables. env_name = 'double_reentrant_line_shared_res_homogeneous_cost' # Set up the environment parameters. # Environment parameters do not affect the test result here. env = load_scenario(env_name, job_gen_seed=10).env rl_env, action_space_dims = rl_env_from_snc_env(env, discount_factor=0.99, for_tf_agent=False) _, action_space_dims_tf = rl_env_from_snc_env(env, discount_factor=0.99, for_tf_agent=True) assert action_space_dims == action_space_dims_tf assert len(rl_env.action_vectors) == sum(action_space_dims) def test_rl_env_normalise_obs_property(): """ Ensure that the normalise_obs property of RLControlledRandomWalk is set and updated correctly. """ # Set the environment name for this case as the asserts are difficult to make as variables. env_name = 'double_reentrant_line_shared_res_homogeneous_cost' # Set up the environment parameters. # Environment parameters do not affect the test result here. env = load_scenario(env_name, job_gen_seed=10).env rl_env, _ = rl_env_from_snc_env(env, discount_factor=0.99, for_tf_agent=False) assert rl_env.normalise_obs is True rl_env.normalise_obs = False assert rl_env.normalise_obs is False def test_rl_env_normalise_obs_action(): """ Ensure that the normalise_obs property of RLControlledRandomWalk is used correctly. """ # Set the environment name for this case as the asserts are difficult to make as variables. env_name = 'klimov_model' # Set up the environment parameters. # Environment parameters do not affect the test result here. env = load_scenario(env_name, job_gen_seed=10, override_env_params={"initial_state": [100, 100, 100, 100]}).env rl_env, _ = rl_env_from_snc_env(env, discount_factor=0.99, for_tf_agent=False) assert rl_env.normalise_obs is True s0_normalised = rl_env.reset() assert s0_normalised.tolist() == [0.25, 0.25, 0.25, 0.25] rl_env.normalise_obs = False s0_unnormalised = rl_env.reset() assert s0_unnormalised.tolist() == [100, 100, 100, 100]
43.405762
100
0.672207
4,722
36,157
4.91529
0.081957
0.015683
0.014218
0.010857
0.794787
0.766437
0.733003
0.702973
0.681646
0.662904
0
0.037554
0.234809
36,157
832
101
43.457933
0.801352
0.24507
0
0.646035
0
0
0.004609
0.003672
0
0
0
0
0.121857
1
0.046422
false
0
0.023211
0
0.069633
0
0
0
0
null
0
0
0
0
1
1
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
c5a725625349105f46d31145bb645e4af9c65a8b
153
py
Python
.history/ClassFiles/OOP/ClassCreation_20210103124307.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/OOP/ClassCreation_20210103124307.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/OOP/ClassCreation_20210103124307.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
''' Creating a class Created with the keyword class followed by a name, Common practice is to make the names Pascal Casing: Example '''
30.6
60
0.679739
22
153
4.727273
0.863636
0
0
0
0
0
0
0
0
0
0
0
0.267974
153
5
61
30.6
0.928571
0.836601
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
c5d7cab0c05e5faebf8ea37da7a5e16936c8bdda
453
py
Python
error.py
excelsia/pyvee
9d1d7a03df8bf562f5e8f40f83fc618439a45b60
[ "MIT" ]
1
2018-10-09T07:32:46.000Z
2018-10-09T07:32:46.000Z
error.py
excelsia/pyvee
9d1d7a03df8bf562f5e8f40f83fc618439a45b60
[ "MIT" ]
1
2018-11-15T12:07:28.000Z
2018-11-16T07:31:30.000Z
error.py
excelsia/pyvee
9d1d7a03df8bf562f5e8f40f83fc618439a45b60
[ "MIT" ]
null
null
null
class PyVeeException(Exception): pass class InvalidAddressException(PyVeeException): pass class InvalidParameterException(PyVeeException): pass class MissingPrivateKeyException(PyVeeException): pass class MissingPublicKeyException(PyVeeException): pass class MissingAddressException(PyVeeException): pass class InsufficientBalanceException(PyVeeException): pass class NetworkException(PyVeeException): pass
14.612903
51
0.792494
32
453
11.21875
0.34375
0.175487
0.384401
0
0
0
0
0
0
0
0
0
0.154525
453
30
52
15.1
0.937337
0
0
0.5
0
0
0
0
0
0
0
0
0
1
0
true
0.5
0
0
0.5
0
0
0
1
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
1
0
0
0
0
0
4
c5fb36626cc0a6a34722552b7589b3a8f532c37e
492
py
Python
tests/basics/builtin_type.py
MakeItZone/circuitpython
7f803c0b51c333210ed267502422ed7bb28b9be7
[ "Unlicense", "BSD-3-Clause", "MIT-0", "MIT" ]
13,648
2015-01-01T01:34:51.000Z
2022-03-31T16:19:53.000Z
tests/basics/builtin_type.py
MakeItZone/circuitpython
7f803c0b51c333210ed267502422ed7bb28b9be7
[ "Unlicense", "BSD-3-Clause", "MIT-0", "MIT" ]
7,092
2015-01-01T07:59:11.000Z
2022-03-31T23:52:18.000Z
tests/basics/builtin_type.py
MakeItZone/circuitpython
7f803c0b51c333210ed267502422ed7bb28b9be7
[ "Unlicense", "BSD-3-Clause", "MIT-0", "MIT" ]
4,942
2015-01-02T11:48:50.000Z
2022-03-31T19:57:10.000Z
# test builtin type print(type(int)) try: type() except TypeError: print('TypeError') try: type(1, 2) except TypeError: print('TypeError') # second arg should be a tuple try: type('abc', None, None) except TypeError: print('TypeError') # third arg should be a dict try: type('abc', (), None) except TypeError: print('TypeError') # elements of second arg (the bases) should be types try: type('abc', (1,), {}) except TypeError: print('TypeError')
15.375
52
0.640244
66
492
4.772727
0.378788
0.111111
0.31746
0.460317
0.209524
0
0
0
0
0
0
0.007792
0.21748
492
31
53
15.870968
0.81039
0.252033
0
0.714286
0
0
0.14876
0
0
0
0
0
0
1
0
true
0
0
0
0
0.285714
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
a842da1ad430a1b68766e502b849746c4ef30354
54
py
Python
backend/wsgi.py
pecimuth/synthia
a54265ca6f772959d395de789bfe16bf054d97ad
[ "MIT" ]
null
null
null
backend/wsgi.py
pecimuth/synthia
a54265ca6f772959d395de789bfe16bf054d97ad
[ "MIT" ]
null
null
null
backend/wsgi.py
pecimuth/synthia
a54265ca6f772959d395de789bfe16bf054d97ad
[ "MIT" ]
null
null
null
from web import create_app application = create_app()
18
26
0.814815
8
54
5.25
0.75
0.428571
0
0
0
0
0
0
0
0
0
0
0.12963
54
2
27
27
0.893617
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
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
a8603e04e5e01f2dbb61598035942ff94cc3185d
304
py
Python
linkedin/web-scraping/user-details/src/main.py
GuillaumeFalourd/formulas-python
8fb299598f6d63d42ceb39d2a64f65485aa39428
[ "Apache-2.0" ]
16
2021-02-17T14:40:07.000Z
2022-01-14T23:44:43.000Z
linkedin/web-scraping/user-details/src/main.py
ErosMLima/formulas-python
15f1f56630131a2d3202ca7a1f685c2708a4815b
[ "Apache-2.0" ]
1
2021-03-08T16:06:17.000Z
2021-03-08T16:06:17.000Z
linkedin/web-scraping/user-details/src/main.py
ErosMLima/formulas-python
15f1f56630131a2d3202ca7a1f685c2708a4815b
[ "Apache-2.0" ]
4
2021-02-04T16:31:42.000Z
2021-04-09T04:16:44.000Z
#!/usr/bin/python3 import os import re from formula import formula email = os.environ.get("LINKEDIN_EMAIL") password = os.environ.get("LINKEDIN_PASSWORD") profiles = os.environ.get("RIT_PROFILES") names = profiles.split('|') path = os.environ.get("RIT_PATH") formula.run(email, password, names, path)
21.714286
46
0.746711
44
304
5.068182
0.431818
0.161435
0.215247
0.179372
0
0
0
0
0
0
0
0.003663
0.101974
304
13
47
23.384615
0.813187
0.055921
0
0
0
0
0.181818
0
0
0
0
0
0
1
0
false
0.222222
0.333333
0
0.333333
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
1
1
0
0
0
0
4
a8a8dbc80c874444264b6aa4d4595015d156630d
27
py
Python
ibranch/__init__.py
iBranch-DataScience/scraping_scheduler
721b237f71c43a7f4922f19dcc9c15de7a19b4e5
[ "CC-BY-4.0" ]
null
null
null
ibranch/__init__.py
iBranch-DataScience/scraping_scheduler
721b237f71c43a7f4922f19dcc9c15de7a19b4e5
[ "CC-BY-4.0" ]
null
null
null
ibranch/__init__.py
iBranch-DataScience/scraping_scheduler
721b237f71c43a7f4922f19dcc9c15de7a19b4e5
[ "CC-BY-4.0" ]
null
null
null
name = "scraping_scheduler"
27
27
0.814815
3
27
7
1
0
0
0
0
0
0
0
0
0
0
0
0.074074
27
1
27
27
0.84
0
0
0
0
0
0.642857
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
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
a8cb99b3d3c9b06b23479700a9f5f47d26283a25
299
py
Python
torch_pipeline/autotorch/auto/utils/__init__.py
Fanxingye/AutoDL
6f409aefc8b81e5fe47df57b82332c8df427875d
[ "Apache-2.0" ]
1
2021-11-04T09:19:14.000Z
2021-11-04T09:19:14.000Z
torch_pipeline/autotorch/auto/utils/__init__.py
Fanxingye/AutoDL
6f409aefc8b81e5fe47df57b82332c8df427875d
[ "Apache-2.0" ]
null
null
null
torch_pipeline/autotorch/auto/utils/__init__.py
Fanxingye/AutoDL
6f409aefc8b81e5fe47df57b82332c8df427875d
[ "Apache-2.0" ]
null
null
null
from .early_stopper import _suggest_load_context from .early_stopper import EarlyStopperOnPlateau from .error_handler import TorchErrorCatcher from .space_sanitizer import sanitize_batch_size __all__ = ['_suggest_load_context', 'EarlyStopperOnPlateau', 'TorchErrorCatcher', 'sanitize_batch_size']
37.375
104
0.859532
33
299
7.242424
0.515152
0.075314
0.133891
0.1841
0
0
0
0
0
0
0
0
0.080268
299
7
105
42.714286
0.869091
0
0
0
0
0
0.261745
0.14094
0
0
0
0
0
1
0
false
0
0.8
0
0.8
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
76500873cc71319d91e0707b891b64af87c3e90b
8,186
py
Python
relation_extraction_yelp.py
panda0881/Selectional_Preference
e48c5ff3feade82fd7f6963bca8135989ce148fe
[ "MIT" ]
null
null
null
relation_extraction_yelp.py
panda0881/Selectional_Preference
e48c5ff3feade82fd7f6963bca8135989ce148fe
[ "MIT" ]
null
null
null
relation_extraction_yelp.py
panda0881/Selectional_Preference
e48c5ff3feade82fd7f6963bca8135989ce148fe
[ "MIT" ]
null
null
null
import json import os import pandas def filter_word(input_word): tmp_output = '' for c in input_word: if c in 'zxcvbnmasdfghjklqwertyuiopZXCVBNMASDFGHJKLQWERTYUIOP': tmp_output += c return tmp_output def counting_pairs_from_yelp_parsed_data(parsed_data, verb_nsubj_amod_dict, verb_dobj_amod_dict, verb_nsubj_dict, verb_dobj_dict, noun_amod_dict): for i, sentence in enumerate(parsed_data): if i % 10000 == 0: print('We have counted:', i, '/', len(parsed_data)) for subsentence in sentence: # print('subsentence:', subsentence) for pair in subsentence: if pair[1] == 'amod': tmp_noun = pair[0][1] tmp_adj = pair[2][1] if tmp_noun not in noun_amod_dict: noun_amod_dict[tmp_noun] = dict() if tmp_adj not in noun_amod_dict[tmp_noun]: noun_amod_dict[tmp_noun][tmp_adj] = 0 noun_amod_dict[tmp_noun][tmp_adj] += 1 # print('pair:', pair) if pair[1] == 'nsubj': tmp_verb = pair[0][1] tmp_subj = pair[2][1] if tmp_verb not in verb_nsubj_dict: verb_nsubj_dict[tmp_verb] = dict() if tmp_subj not in verb_nsubj_dict[tmp_verb]: verb_nsubj_dict[tmp_verb][tmp_subj] = 0 verb_nsubj_dict[tmp_verb][tmp_subj] += 1 for tmp_pair in subsentence: if tmp_pair[1] == 'amod' and tmp_pair[0][0] == pair[2][0]: tmp_adj = tmp_pair[2][1] if tmp_verb not in verb_nsubj_amod_dict: verb_nsubj_amod_dict[tmp_verb] = dict() if tmp_adj not in verb_nsubj_amod_dict[tmp_verb]: verb_nsubj_amod_dict[tmp_verb][tmp_adj] = 0 verb_nsubj_amod_dict[tmp_verb][tmp_adj] += 1 if pair[1] == 'dobj': tmp_verb = pair[0][1] tmp_dobj = pair[2][1] if tmp_verb not in verb_dobj_dict: verb_dobj_dict[tmp_verb] = dict() if tmp_dobj not in verb_dobj_dict[tmp_verb]: verb_dobj_dict[tmp_verb][tmp_dobj] = 0 verb_dobj_dict[tmp_verb][tmp_dobj] += 1 for tmp_pair in subsentence: if tmp_pair[1] == 'amod' and tmp_pair[0][0] == pair[2][0]: tmp_adj = tmp_pair[2][1] if tmp_verb not in verb_dobj_amod_dict: verb_dobj_amod_dict[tmp_verb] = dict() if tmp_adj not in verb_dobj_amod_dict[tmp_verb]: verb_dobj_amod_dict[tmp_verb][tmp_adj] = 0 verb_dobj_amod_dict[tmp_verb][tmp_adj] += 1 def counting_pairs_from_wiki_parsed_data(parsed_data, verb_nsubj_amod_dict, verb_dobj_amod_dict, verb_nsubj_dict, verb_dobj_dict, noun_amod_dict): for i, sentence in enumerate(parsed_data): if i % 10000 == 0: print('We have counted:', i, '/', len(parsed_data)) for pair in sentence: # print('subsentence:', subsentence) if pair[1] == 'amod': tmp_noun = pair[0][1] tmp_adj = pair[2][1] if tmp_noun not in noun_amod_dict: noun_amod_dict[tmp_noun] = dict() if tmp_adj not in noun_amod_dict[tmp_noun]: noun_amod_dict[tmp_noun][tmp_adj] = 0 noun_amod_dict[tmp_noun][tmp_adj] += 1 # print('pair:', pair) if pair[1] == 'nsubj': tmp_verb = pair[0][1] tmp_subj = pair[2][1] if tmp_verb not in verb_nsubj_dict: verb_nsubj_dict[tmp_verb] = dict() if tmp_subj not in verb_nsubj_dict[tmp_verb]: verb_nsubj_dict[tmp_verb][tmp_subj] = 0 verb_nsubj_dict[tmp_verb][tmp_subj] += 1 for tmp_pair in sentence: if tmp_pair[1] == 'amod' and tmp_pair[0][0] == pair[2][0]: tmp_adj = tmp_pair[2][1] if tmp_verb not in verb_nsubj_amod_dict: verb_nsubj_amod_dict[tmp_verb] = dict() if tmp_adj not in verb_nsubj_amod_dict[tmp_verb]: verb_nsubj_amod_dict[tmp_verb][tmp_adj] = 0 verb_nsubj_amod_dict[tmp_verb][tmp_adj] += 1 if pair[1] == 'dobj': tmp_verb = pair[0][1] tmp_dobj = pair[2][1] if tmp_verb not in verb_dobj_dict: verb_dobj_dict[tmp_verb] = dict() if tmp_dobj not in verb_dobj_dict[tmp_verb]: verb_dobj_dict[tmp_verb][tmp_dobj] = 0 verb_dobj_dict[tmp_verb][tmp_dobj] += 1 for tmp_pair in sentence: if tmp_pair[1] == 'amod' and tmp_pair[0][0] == pair[2][0]: tmp_adj = tmp_pair[2][1] if tmp_verb not in verb_dobj_amod_dict: verb_dobj_amod_dict[tmp_verb] = dict() if tmp_adj not in verb_dobj_amod_dict[tmp_verb]: verb_dobj_amod_dict[tmp_verb][tmp_adj] = 0 verb_dobj_amod_dict[tmp_verb][tmp_adj] += 1 print('Start to count the yelp dataset') # tmp_file_name = '/home/data/corpora/wikipedia/stanford_enhanced++_parsed_data/1000000.json' verb_nsubj_amod_dict = dict() verb_dobj_amod_dict = dict() verb_nsubj_dict = dict() verb_dobj_dict = dict() noun_amod_dict = dict() if os.path.isfile('verb_nsubj_amod_dict_yelp.json'): with open('verb_nsubj_amod_dict_yelp.json', 'r') as f: verb_nsubj_amod_dict = json.load(f) if os.path.isfile('verb_dobj_amod_dict_yelp.json'): with open('verb_dobj_amod_dict_yelp.json', 'r') as f: verb_dobj_amod_dict = json.load(f) if os.path.isfile('verb_nsubj_dict_yelp.json'): with open('verb_nsubj_dict_yelp.json', 'r') as f: verb_nsubj_dict = json.load(f) if os.path.isfile('verb_dobj_dict_yelp.json'): with open('verb_dobj_dict_yelp.json', 'r') as f: verb_dobj_dict = json.load(f) if os.path.isfile('noun_amod_dict_yelp.json'): with open('noun_amod_dict_yelp.json', 'r') as f: noun_amod_dict = json.load(f) if os.path.isfile('counted_yelp_file.json'): with open('counted_yelp_file.json', 'r') as f: counted_yelp_file = json.load(f) else: counted_yelp_file = list() yelp_folder_location = '/home/data/corpora/YELP/parsed_yelp_data_with_stanford/' for f_name in os.listdir(yelp_folder_location): tmp_file_name = yelp_folder_location + f_name if tmp_file_name in counted_yelp_file: print('We have counted this file') continue print('We are working on file:', tmp_file_name) sampled_data = list() with open(tmp_file_name, 'r') as original_f: sampled_data = json.load(original_f) counting_pairs_from_yelp_parsed_data(sampled_data, verb_nsubj_amod_dict, verb_dobj_amod_dict, verb_nsubj_dict, verb_dobj_dict, noun_amod_dict) counted_yelp_file.append(tmp_file_name) with open('verb_dobj_dict_yelp.json', 'w') as f: json.dump(verb_dobj_dict, f) with open('verb_nsubj_dict_yelp.json', 'w') as f: json.dump(verb_nsubj_dict, f) with open('verb_dobj_amod_dict_yelp.json', 'w') as f: json.dump(verb_dobj_amod_dict, f) with open('verb_nsubj_amod_dict_yelp.json', 'w') as f: json.dump(verb_nsubj_amod_dict, f) with open('noun_amod_dict_yelp.json', 'w') as f: json.dump(noun_amod_dict, f) with open('counted_yelp_file.json', 'w') as f: json.dump(counted_yelp_file, f) print('end')
45.477778
114
0.563157
1,147
8,186
3.644289
0.073235
0.109091
0.084211
0.077273
0.801675
0.774402
0.733254
0.693541
0.645933
0.631818
0
0.01797
0.340581
8,186
179
115
45.731844
0.756391
0.024798
0
0.571429
0
0
0.092767
0.07133
0
0
0
0
0
1
0.019481
false
0
0.019481
0
0.045455
0.038961
0
0
0
null
0
0
0
1
1
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
7652fdbfaab633df1240fedd9342349f8ab364e1
385
py
Python
tests/unit/utils/test_net_utils.py
matt-mercer/localstack
b69ba25e495c6ef889d33a050b216d0cd1035041
[ "Apache-2.0" ]
null
null
null
tests/unit/utils/test_net_utils.py
matt-mercer/localstack
b69ba25e495c6ef889d33a050b216d0cd1035041
[ "Apache-2.0" ]
null
null
null
tests/unit/utils/test_net_utils.py
matt-mercer/localstack
b69ba25e495c6ef889d33a050b216d0cd1035041
[ "Apache-2.0" ]
null
null
null
import pytest as pytest from localstack.constants import LOCALHOST from localstack.utils.common import short_uid from localstack.utils.net import resolve_hostname @pytest.mark.skip_offline def test_resolve_hostname(): assert "127." in resolve_hostname(LOCALHOST) assert resolve_hostname("example.com") assert resolve_hostname(f"non-existing-host-{short_uid()}") is None
29.615385
71
0.802597
53
385
5.660377
0.566038
0.25
0.126667
0
0
0
0
0
0
0
0
0.008798
0.114286
385
12
72
32.083333
0.870968
0
0
0
0
0
0.119481
0.080519
0
0
0
0
0.333333
1
0.111111
true
0
0.444444
0
0.555556
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
76558a2ca0fdf4809da7284ec77390844da20f4f
95
py
Python
srim/__init__.py
agoose77/pysrim
9b8e1b7e91fe65bf17e9366e1fd9b9406ad125d2
[ "MIT" ]
17
2018-07-06T00:23:58.000Z
2022-03-09T20:48:14.000Z
srim/__init__.py
Yobmod/srimpy
3071a9d48fb2201810a863fb3d881248b365d2cf
[ "MIT" ]
5
2016-05-11T10:05:30.000Z
2022-03-01T02:09:37.000Z
srim/__init__.py
Yobmod/srimpy
3071a9d48fb2201810a863fb3d881248b365d2cf
[ "MIT" ]
15
2017-04-20T00:44:42.000Z
2022-02-22T14:10:48.000Z
from .srim import TRIM, SR from .core import ElementDB, Element, Material, Ion, Layer, Target
23.75
66
0.757895
14
95
5.142857
0.857143
0
0
0
0
0
0
0
0
0
0
0
0.157895
95
3
67
31.666667
0.9
0
0
0
0
0
0
0
0
0
0
0
0
1
0
true
0
1
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
0
0
0
4
7678e4aac87550a1204894aba84c787f1f6bbdca
87
py
Python
binset/apps.py
skyydq/GreaterWMS
e14014a73b36ec0f0df03712a229b0931cb388fb
[ "Apache-2.0" ]
1
2021-02-17T14:04:29.000Z
2021-02-17T14:04:29.000Z
binset/apps.py
skyydq/GreaterWMS
e14014a73b36ec0f0df03712a229b0931cb388fb
[ "Apache-2.0" ]
null
null
null
binset/apps.py
skyydq/GreaterWMS
e14014a73b36ec0f0df03712a229b0931cb388fb
[ "Apache-2.0" ]
1
2021-07-01T03:05:21.000Z
2021-07-01T03:05:21.000Z
from django.apps import AppConfig class BinsetConfig(AppConfig): name = 'binset'
14.5
33
0.747126
10
87
6.5
0.9
0
0
0
0
0
0
0
0
0
0
0
0.172414
87
5
34
17.4
0.902778
0
0
0
0
0
0.068966
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
7683d41d34eac06c3450c23560b0f32024eea82d
20
py
Python
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/streams/__init__.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
176
2019-07-03T00:20:15.000Z
2022-03-14T07:51:22.000Z
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/streams/__init__.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
121
2019-06-24T20:47:27.000Z
2022-03-28T02:16:18.000Z
factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/streams/__init__.py
kaka-lin/azure-intelligent-edge-patterns
766833c7c25d2458cec697937be288202d1763bc
[ "MIT" ]
144
2019-06-18T18:48:43.000Z
2022-03-31T12:14:46.000Z
"""Streams App. """
6.666667
15
0.5
2
20
5
1
0
0
0
0
0
0
0
0
0
0
0
0.15
20
2
16
10
0.588235
0.6
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
76933fd4fb91e8af58211c82aed2ee218cfe297d
188
py
Python
dashboard/views/rest.py
davidmoremad/clouder
5ad0e036a5665f749297a5f336b04aeecff57112
[ "Apache-2.0" ]
null
null
null
dashboard/views/rest.py
davidmoremad/clouder
5ad0e036a5665f749297a5f336b04aeecff57112
[ "Apache-2.0" ]
null
null
null
dashboard/views/rest.py
davidmoremad/clouder
5ad0e036a5665f749297a5f336b04aeecff57112
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse # Create your views here. def my_view(request): output = "Welcome to my site." return HttpResponse(output)
26.857143
36
0.765957
26
188
5.5
0.769231
0.13986
0
0
0
0
0
0
0
0
0
0
0.164894
188
7
37
26.857143
0.910828
0.12234
0
0
0
0
0.115854
0
0
0
0
0
0
1
0.2
false
0
0.4
0
0.8
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
4f2985f0b6721235cf21ba3687399d2fc4948c0a
207
py
Python
1 - Sequenciais/sequenciais1.py
igor1043/logica-de-programacao
20e8a8cd802573e6547d551da93ba7390774a5db
[ "MIT" ]
null
null
null
1 - Sequenciais/sequenciais1.py
igor1043/logica-de-programacao
20e8a8cd802573e6547d551da93ba7390774a5db
[ "MIT" ]
null
null
null
1 - Sequenciais/sequenciais1.py
igor1043/logica-de-programacao
20e8a8cd802573e6547d551da93ba7390774a5db
[ "MIT" ]
null
null
null
# Author: Igor Vinicius Freitas de Souza # GitHub: https://github.com/igor1043 # E-mail: igorviniciusfreitasouza@gmail.com #Faça um programa que mostre a mensagem "Alo mundo" na tela. print("Alo mundo")
23
60
0.748792
30
207
5.166667
0.866667
0.103226
0
0
0
0
0
0
0
0
0
0.022599
0.144928
207
8
61
25.875
0.853107
0.850242
0
0
0
0
0.36
0
0
0
0
0
0
1
0
true
0
0
0
0
1
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
1
0
4
4f6c816ffa68b0f64a27b8da2bb5162fdb49fd95
1,393
py
Python
projetos/campo_minado.py
Guilherme-Cruz-Ferreira/My_repository
a1841cd2fb828d405bfd639a884d9fa79830743e
[ "MIT" ]
null
null
null
projetos/campo_minado.py
Guilherme-Cruz-Ferreira/My_repository
a1841cd2fb828d405bfd639a884d9fa79830743e
[ "MIT" ]
null
null
null
projetos/campo_minado.py
Guilherme-Cruz-Ferreira/My_repository
a1841cd2fb828d405bfd639a884d9fa79830743e
[ "MIT" ]
null
null
null
#campo minado global tabuleiro tabuleiro = [ ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'], ['•', '•', '•', '•', '•', '•', '•', '•', '•'] ] def printTabuleiro(): cont2 = 0 print(' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'F') for i, v in enumerate(tabuleiro): cont = 0 print(cont2, end=' ') cont2 += 1 for k in tabuleiro[i]: cont += 1 print(k, end=' ') if cont == len(tabuleiro[0]): print(' ') def fazJogada(discover): printTabuleiro() coluna = int(input('coordenada número >>> ')) fileira = str(input('coordenada letra >>> ')).upper() conversor = {'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, 'F':8} for i, v in conversor.items(): if i == fileira: fileira = v for i, v in enumerate(tabuleiro): if i == coluna: for o, b in enumerate(tabuleiro): if o == fileira: tabuleiro[i][o] = 'X' # printTabuleiro() while True: fazJogada('X')
30.282609
87
0.325915
201
1,393
2.661692
0.263682
0.299065
0.442991
0.583178
0.24486
0.24486
0.151402
0.151402
0.151402
0.151402
0
0.017472
0.301508
1,393
45
88
30.955556
0.449126
0.020818
0
0.25641
0
0
0.108744
0
0
0
0
0
0
1
0.051282
false
0
0
0
0.051282
0.153846
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
4f7a113aff373cfcc59c85575d0a208ad693db84
253
py
Python
src/compas/datastructures/network/core/operations/__init__.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
235
2017-11-07T07:33:22.000Z
2022-03-25T16:20:00.000Z
src/compas/datastructures/network/core/operations/__init__.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
770
2017-09-22T13:42:06.000Z
2022-03-31T21:26:45.000Z
src/compas/datastructures/network/core/operations/__init__.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
99
2017-11-06T23:15:28.000Z
2022-03-25T16:05:36.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from .split import * # noqa: F401 F403 from .join import * # noqa: F401 F403 __all__ = [name for name in dir() if not name.startswith('_')]
28.111111
62
0.762846
36
253
4.833333
0.555556
0.172414
0.275862
0.206897
0
0
0
0
0
0
0
0.056872
0.166008
253
8
63
31.625
0.767773
0.12253
0
0
0
0
0.004566
0
0
0
0
0
0
1
0
false
0
0.833333
0
0.833333
0.166667
0
0
0
null
0
1
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
4f869ca96872ebcab32bc1b1dec79d60360b1572
226
py
Python
src/globus_cli/commands/group/member/__init__.py
rudyardrichter/globus-cli
35c5fbfbca7599566ab7995f782306d1f1378ed7
[ "Apache-2.0" ]
47
2016-04-21T19:51:17.000Z
2022-02-25T14:13:30.000Z
src/globus_cli/commands/group/member/__init__.py
rudyardrichter/globus-cli
35c5fbfbca7599566ab7995f782306d1f1378ed7
[ "Apache-2.0" ]
421
2016-04-20T18:45:24.000Z
2022-03-14T14:50:41.000Z
src/globus_cli/commands/group/member/__init__.py
rudyardrichter/globus-cli
35c5fbfbca7599566ab7995f782306d1f1378ed7
[ "Apache-2.0" ]
20
2016-09-10T20:25:27.000Z
2021-10-06T16:02:47.000Z
from globus_cli.commands.group.member.add import member_add from globus_cli.parsing import group @group("member") def group_member() -> None: """Manage members in a Globus Group""" group_member.add_command(member_add)
20.545455
59
0.769912
34
226
4.911765
0.470588
0.263473
0.155689
0
0
0
0
0
0
0
0
0
0.123894
226
10
60
22.6
0.843434
0.141593
0
0
0
0
0.031915
0
0
0
0
0
0
1
0.2
true
0
0.4
0
0.6
0
0
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
1
0
1
0
0
4
4fa281e3503a05ed4526dcfbbfce77a62dda0c14
100
py
Python
Deployment/test2/login_example/apps.py
meddhafer97/Telecommunication-project
30a732f817c6573b596806470e54f0e2e9cd0c59
[ "MIT" ]
null
null
null
Deployment/test2/login_example/apps.py
meddhafer97/Telecommunication-project
30a732f817c6573b596806470e54f0e2e9cd0c59
[ "MIT" ]
null
null
null
Deployment/test2/login_example/apps.py
meddhafer97/Telecommunication-project
30a732f817c6573b596806470e54f0e2e9cd0c59
[ "MIT" ]
null
null
null
from django.apps import AppConfig class LoginExampleConfig(AppConfig): name = 'login_example'
16.666667
36
0.78
11
100
7
0.909091
0
0
0
0
0
0
0
0
0
0
0
0.15
100
5
37
20
0.905882
0
0
0
0
0
0.13
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
4fa28a27b824954dcbee2a702f75acdbcedbacb6
254
py
Python
travel_distance_map/cache/cache.py
pdyban/travel_distance_map
4e36fcee5fcb6a1682001aaff93912482deb05e7
[ "MIT" ]
1
2020-07-02T20:13:21.000Z
2020-07-02T20:13:21.000Z
travel_distance_map/cache/cache.py
pdyban/travel_distance_map
4e36fcee5fcb6a1682001aaff93912482deb05e7
[ "MIT" ]
null
null
null
travel_distance_map/cache/cache.py
pdyban/travel_distance_map
4e36fcee5fcb6a1682001aaff93912482deb05e7
[ "MIT" ]
null
null
null
""" Cache interface. """ class Cache: def __contains__(self, key): raise NotImplementedError() def __getitem__(self, key): raise NotImplementedError() def __setitem__(self, key, value): raise NotImplementedError()
16.933333
38
0.649606
23
254
6.652174
0.521739
0.137255
0.156863
0.405229
0.444444
0
0
0
0
0
0
0
0.244094
254
14
39
18.142857
0.796875
0.062992
0
0.428571
0
0
0
0
0
0
0
0
0
1
0.428571
false
0
0
0
0.571429
0
1
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4
96efcdb78a5446cfaec608be6d8c01b7d932a343
19,428
py
Python
scalyr_agent/third_party/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py
code-sauce/scalyr-agent-2
41023d5c1272186193dd02900782b150dda5f38e
[ "Apache-2.0" ]
67
2015-02-03T00:35:33.000Z
2022-03-23T10:14:26.000Z
scalyr_agent/third_party/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py
code-sauce/scalyr-agent-2
41023d5c1272186193dd02900782b150dda5f38e
[ "Apache-2.0" ]
578
2015-04-09T08:58:56.000Z
2022-03-30T12:13:21.000Z
scalyr_agent/third_party/pysnmp/smi/mibs/SNMP-NOTIFICATION-MIB.py
code-sauce/scalyr-agent-2
41023d5c1272186193dd02900782b150dda5f38e
[ "Apache-2.0" ]
58
2015-01-15T22:00:43.000Z
2022-02-18T15:48:31.000Z
# # PySNMP MIB module SNMP-NOTIFICATION-MIB (http://pysnmp.sf.net) # ASN.1 source file:///usr/share/snmp/mibs/SNMP-NOTIFICATION-MIB.txt # Produced by pysmi-0.0.5 at Sat Sep 19 23:00:18 2015 # On host grommit.local platform Darwin version 14.4.0 by user ilya # Using Python version 2.7.6 (default, Sep 9 2014, 15:04:36) # ( Integer, ObjectIdentifier, OctetString, ) = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") ( NamedValues, ) = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ( ConstraintsUnion, SingleValueConstraint, ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ) = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsUnion", "SingleValueConstraint", "ConstraintsIntersection", "ValueSizeConstraint", "ValueRangeConstraint") ( SnmpAdminString, ) = mibBuilder.importSymbols("SNMP-FRAMEWORK-MIB", "SnmpAdminString") ( snmpTargetParamsName, SnmpTagValue, ) = mibBuilder.importSymbols("SNMP-TARGET-MIB", "snmpTargetParamsName", "SnmpTagValue") ( NotificationGroup, ModuleCompliance, ObjectGroup, ) = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") ( Integer32, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, MibIdentifier, IpAddress, TimeTicks, Counter64, Unsigned32, ModuleIdentity, Gauge32, snmpModules, iso, ObjectIdentity, Bits, Counter32, ) = mibBuilder.importSymbols("SNMPv2-SMI", "Integer32", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "MibIdentifier", "IpAddress", "TimeTicks", "Counter64", "Unsigned32", "ModuleIdentity", "Gauge32", "snmpModules", "iso", "ObjectIdentity", "Bits", "Counter32") ( StorageType, DisplayString, RowStatus, TextualConvention, ) = mibBuilder.importSymbols("SNMPv2-TC", "StorageType", "DisplayString", "RowStatus", "TextualConvention") snmpNotificationMIB = ModuleIdentity((1, 3, 6, 1, 6, 3, 13)).setRevisions(("2002-10-14 00:00", "1998-08-04 00:00", "1997-07-14 00:00",)) if mibBuilder.loadTexts: snmpNotificationMIB.setLastUpdated('200210140000Z') if mibBuilder.loadTexts: snmpNotificationMIB.setOrganization('IETF SNMPv3 Working Group') if mibBuilder.loadTexts: snmpNotificationMIB.setContactInfo('WG-email: snmpv3@lists.tislabs.com\n Subscribe: majordomo@lists.tislabs.com\n In message body: subscribe snmpv3\n\n Co-Chair: Russ Mundy\n Network Associates Laboratories\n Postal: 15204 Omega Drive, Suite 300\n Rockville, MD 20850-4601\n USA\n EMail: mundy@tislabs.com\n Phone: +1 301-947-7107\n\n Co-Chair: David Harrington\n Enterasys Networks\n Postal: 35 Industrial Way\n P. O. Box 5004\n Rochester, New Hampshire 03866-5005\n USA\n EMail: dbh@enterasys.com\n Phone: +1 603-337-2614\n\n Co-editor: David B. Levi\n Nortel Networks\n Postal: 3505 Kesterwood Drive\n Knoxville, Tennessee 37918\n EMail: dlevi@nortelnetworks.com\n Phone: +1 865 686 0432\n\n Co-editor: Paul Meyer\n Secure Computing Corporation\n Postal: 2675 Long Lake Road\n Roseville, Minnesota 55113\n EMail: paul_meyer@securecomputing.com\n Phone: +1 651 628 1592\n\n Co-editor: Bob Stewart\n Retired') if mibBuilder.loadTexts: snmpNotificationMIB.setDescription('This MIB module defines MIB objects which provide\n mechanisms to remotely configure the parameters\n used by an SNMP entity for the generation of\n notifications.\n\n Copyright (C) The Internet Society (2002). This\n version of this MIB module is part of RFC 3413;\n see the RFC itself for full legal notices.\n ') snmpNotifyObjects = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 1)) snmpNotifyConformance = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 3)) snmpNotifyTable = MibTable((1, 3, 6, 1, 6, 3, 13, 1, 1), ) if mibBuilder.loadTexts: snmpNotifyTable.setDescription('This table is used to select management targets which should\n receive notifications, as well as the type of notification\n which should be sent to each selected management target.') snmpNotifyEntry = MibTableRow((1, 3, 6, 1, 6, 3, 13, 1, 1, 1), ).setIndexNames((1, "SNMP-NOTIFICATION-MIB", "snmpNotifyName")) if mibBuilder.loadTexts: snmpNotifyEntry.setDescription('An entry in this table selects a set of management targets\n which should receive notifications, as well as the type of\n\n notification which should be sent to each selected\n management target.\n\n Entries in the snmpNotifyTable are created and\n deleted using the snmpNotifyRowStatus object.') snmpNotifyName = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1,32))) if mibBuilder.loadTexts: snmpNotifyName.setDescription('The locally arbitrary, but unique identifier associated\n with this snmpNotifyEntry.') snmpNotifyTag = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 2), SnmpTagValue()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyTag.setDescription('This object contains a single tag value which is used\n to select entries in the snmpTargetAddrTable. Any entry\n in the snmpTargetAddrTable which contains a tag value\n which is equal to the value of an instance of this\n object is selected. If this object contains a value\n of zero length, no entries are selected.') snmpNotifyType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("trap", 1), ("inform", 2),)).clone('trap')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyType.setDescription('This object determines the type of notification to\n\n be generated for entries in the snmpTargetAddrTable\n selected by the corresponding instance of\n snmpNotifyTag. This value is only used when\n generating notifications, and is ignored when\n using the snmpTargetAddrTable for other purposes.\n\n If the value of this object is trap(1), then any\n messages generated for selected rows will contain\n Unconfirmed-Class PDUs.\n\n If the value of this object is inform(2), then any\n messages generated for selected rows will contain\n Confirmed-Class PDUs.\n\n Note that if an SNMP entity only supports\n generation of Unconfirmed-Class PDUs (and not\n Confirmed-Class PDUs), then this object may be\n read-only.') snmpNotifyStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 4), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyStorageType.setDescription("The storage type for this conceptual row.\n Conceptual rows having the value 'permanent' need not\n allow write-access to any columnar objects in the row.") snmpNotifyRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 1, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyRowStatus.setDescription('The status of this conceptual row.\n\n To create a row in this table, a manager must\n set this object to either createAndGo(4) or\n createAndWait(5).') snmpNotifyFilterProfileTable = MibTable((1, 3, 6, 1, 6, 3, 13, 1, 2), ) if mibBuilder.loadTexts: snmpNotifyFilterProfileTable.setDescription('This table is used to associate a notification filter\n profile with a particular set of target parameters.') snmpNotifyFilterProfileEntry = MibTableRow((1, 3, 6, 1, 6, 3, 13, 1, 2, 1), ).setIndexNames((1, "SNMP-TARGET-MIB", "snmpTargetParamsName")) if mibBuilder.loadTexts: snmpNotifyFilterProfileEntry.setDescription('An entry in this table indicates the name of the filter\n profile to be used when generating notifications using\n the corresponding entry in the snmpTargetParamsTable.\n\n Entries in the snmpNotifyFilterProfileTable are created\n and deleted using the snmpNotifyFilterProfileRowStatus\n object.') snmpNotifyFilterProfileName = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 2, 1, 1), SnmpAdminString().subtype(subtypeSpec=ValueSizeConstraint(1,32))).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterProfileName.setDescription('The name of the filter profile to be used when generating\n notifications using the corresponding entry in the\n snmpTargetAddrTable.') snmpNotifyFilterProfileStorType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 2, 1, 2), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterProfileStorType.setDescription("The storage type for this conceptual row.\n Conceptual rows having the value 'permanent' need not\n allow write-access to any columnar objects in the row.") snmpNotifyFilterProfileRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 2, 1, 3), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterProfileRowStatus.setDescription("The status of this conceptual row.\n\n To create a row in this table, a manager must\n set this object to either createAndGo(4) or\n createAndWait(5).\n\n Until instances of all corresponding columns are\n appropriately configured, the value of the\n corresponding instance of the\n snmpNotifyFilterProfileRowStatus column is 'notReady'.\n\n In particular, a newly created row cannot be made\n active until the corresponding instance of\n snmpNotifyFilterProfileName has been set.") snmpNotifyFilterTable = MibTable((1, 3, 6, 1, 6, 3, 13, 1, 3), ) if mibBuilder.loadTexts: snmpNotifyFilterTable.setDescription('The table of filter profiles. Filter profiles are used\n to determine whether particular management targets should\n receive particular notifications.\n\n When a notification is generated, it must be compared\n with the filters associated with each management target\n which is configured to receive notifications, in order to\n determine whether it may be sent to each such management\n target.\n\n A more complete discussion of notification filtering\n can be found in section 6. of [SNMP-APPL].') snmpNotifyFilterEntry = MibTableRow((1, 3, 6, 1, 6, 3, 13, 1, 3, 1), ).setIndexNames((0, "SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileName"), (1, "SNMP-NOTIFICATION-MIB", "snmpNotifyFilterSubtree")) if mibBuilder.loadTexts: snmpNotifyFilterEntry.setDescription('An element of a filter profile.\n\n Entries in the snmpNotifyFilterTable are created and\n deleted using the snmpNotifyFilterRowStatus object.') snmpNotifyFilterSubtree = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 1), ObjectIdentifier()) if mibBuilder.loadTexts: snmpNotifyFilterSubtree.setDescription('The MIB subtree which, when combined with the corresponding\n instance of snmpNotifyFilterMask, defines a family of\n subtrees which are included in or excluded from the\n filter profile.') snmpNotifyFilterMask = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0,16)).clone(hexValue="")).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterMask.setDescription("The bit mask which, in combination with the corresponding\n instance of snmpNotifyFilterSubtree, defines a family of\n subtrees which are included in or excluded from the\n filter profile.\n\n Each bit of this bit mask corresponds to a\n sub-identifier of snmpNotifyFilterSubtree, with the\n most significant bit of the i-th octet of this octet\n string value (extended if necessary, see below)\n corresponding to the (8*i - 7)-th sub-identifier, and\n the least significant bit of the i-th octet of this\n octet string corresponding to the (8*i)-th\n sub-identifier, where i is in the range 1 through 16.\n\n Each bit of this bit mask specifies whether or not\n the corresponding sub-identifiers must match when\n determining if an OBJECT IDENTIFIER matches this\n family of filter subtrees; a '1' indicates that an\n exact match must occur; a '0' indicates 'wild card',\n i.e., any sub-identifier value matches.\n\n Thus, the OBJECT IDENTIFIER X of an object instance\n is contained in a family of filter subtrees if, for\n each sub-identifier of the value of\n snmpNotifyFilterSubtree, either:\n\n the i-th bit of snmpNotifyFilterMask is 0, or\n\n the i-th sub-identifier of X is equal to the i-th\n sub-identifier of the value of\n snmpNotifyFilterSubtree.\n\n If the value of this bit mask is M bits long and\n there are more than M sub-identifiers in the\n corresponding instance of snmpNotifyFilterSubtree,\n then the bit mask is extended with 1's to be the\n required length.\n\n Note that when the value of this object is the\n zero-length string, this extension rule results in\n a mask of all-1's being used (i.e., no 'wild card'),\n and the family of filter subtrees is the one\n subtree uniquely identified by the corresponding\n instance of snmpNotifyFilterSubtree.") snmpNotifyFilterType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=SingleValueConstraint(1, 2,)).clone(namedValues=NamedValues(("included", 1), ("excluded", 2),)).clone('included')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterType.setDescription('This object indicates whether the family of filter subtrees\n defined by this entry are included in or excluded from a\n filter. A more detailed discussion of the use of this\n object can be found in section 6. of [SNMP-APPL].') snmpNotifyFilterStorageType = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 4), StorageType().clone('nonVolatile')).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterStorageType.setDescription("The storage type for this conceptual row.\n Conceptual rows having the value 'permanent' need not\n\n allow write-access to any columnar objects in the row.") snmpNotifyFilterRowStatus = MibTableColumn((1, 3, 6, 1, 6, 3, 13, 1, 3, 1, 5), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: snmpNotifyFilterRowStatus.setDescription('The status of this conceptual row.\n\n To create a row in this table, a manager must\n set this object to either createAndGo(4) or\n createAndWait(5).') snmpNotifyCompliances = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 3, 1)) snmpNotifyGroups = MibIdentifier((1, 3, 6, 1, 6, 3, 13, 3, 2)) snmpNotifyBasicCompliance = ModuleCompliance((1, 3, 6, 1, 6, 3, 13, 3, 1, 1)).setObjects(*(("SNMP-TARGET-MIB", "snmpTargetBasicGroup"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyGroup"),)) if mibBuilder.loadTexts: snmpNotifyBasicCompliance.setDescription('The compliance statement for minimal SNMP entities which\n implement only SNMP Unconfirmed-Class notifications and\n read-create operations on only the snmpTargetAddrTable.') snmpNotifyBasicFiltersCompliance = ModuleCompliance((1, 3, 6, 1, 6, 3, 13, 3, 1, 2)).setObjects(*(("SNMP-TARGET-MIB", "snmpTargetBasicGroup"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyGroup"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterGroup"),)) if mibBuilder.loadTexts: snmpNotifyBasicFiltersCompliance.setDescription('The compliance statement for SNMP entities which implement\n SNMP Unconfirmed-Class notifications with filtering, and\n read-create operations on all related tables.') snmpNotifyFullCompliance = ModuleCompliance((1, 3, 6, 1, 6, 3, 13, 3, 1, 3)).setObjects(*(("SNMP-TARGET-MIB", "snmpTargetBasicGroup"), ("SNMP-TARGET-MIB", "snmpTargetResponseGroup"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyGroup"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterGroup"),)) if mibBuilder.loadTexts: snmpNotifyFullCompliance.setDescription('The compliance statement for SNMP entities which either\n implement only SNMP Confirmed-Class notifications, or both\n SNMP Unconfirmed-Class and Confirmed-Class notifications,\n plus filtering and read-create operations on all related\n tables.') snmpNotifyGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 13, 3, 2, 1)).setObjects(*(("SNMP-NOTIFICATION-MIB", "snmpNotifyTag"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyStorageType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyRowStatus"),)) if mibBuilder.loadTexts: snmpNotifyGroup.setDescription('A collection of objects for selecting which management\n targets are used for generating notifications, and the\n type of notification to be generated for each selected\n management target.') snmpNotifyFilterGroup = ObjectGroup((1, 3, 6, 1, 6, 3, 13, 3, 2, 2)).setObjects(*(("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileName"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileStorType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterProfileRowStatus"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterMask"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterStorageType"), ("SNMP-NOTIFICATION-MIB", "snmpNotifyFilterRowStatus"),)) if mibBuilder.loadTexts: snmpNotifyFilterGroup.setDescription('A collection of objects providing remote configuration\n of notification filters.') mibBuilder.exportSymbols("SNMP-NOTIFICATION-MIB", snmpNotifyBasicCompliance=snmpNotifyBasicCompliance, snmpNotifyEntry=snmpNotifyEntry, snmpNotifyFilterType=snmpNotifyFilterType, snmpNotifyConformance=snmpNotifyConformance, snmpNotifyFilterGroup=snmpNotifyFilterGroup, snmpNotifyFilterTable=snmpNotifyFilterTable, PYSNMP_MODULE_ID=snmpNotificationMIB, snmpNotifyFilterMask=snmpNotifyFilterMask, snmpNotifyFullCompliance=snmpNotifyFullCompliance, snmpNotifyFilterProfileEntry=snmpNotifyFilterProfileEntry, snmpNotifyFilterProfileRowStatus=snmpNotifyFilterProfileRowStatus, snmpNotifyFilterProfileStorType=snmpNotifyFilterProfileStorType, snmpNotifyFilterRowStatus=snmpNotifyFilterRowStatus, snmpNotifyBasicFiltersCompliance=snmpNotifyBasicFiltersCompliance, snmpNotifyFilterProfileTable=snmpNotifyFilterProfileTable, snmpNotifyType=snmpNotifyType, snmpNotifyTag=snmpNotifyTag, snmpNotifyName=snmpNotifyName, snmpNotifyObjects=snmpNotifyObjects, snmpNotifyGroup=snmpNotifyGroup, snmpNotifyGroups=snmpNotifyGroups, snmpNotifyRowStatus=snmpNotifyRowStatus, snmpNotifyFilterProfileName=snmpNotifyFilterProfileName, snmpNotificationMIB=snmpNotificationMIB, snmpNotifyFilterSubtree=snmpNotifyFilterSubtree, snmpNotifyStorageType=snmpNotifyStorageType, snmpNotifyCompliances=snmpNotifyCompliances, snmpNotifyFilterStorageType=snmpNotifyFilterStorageType, snmpNotifyFilterEntry=snmpNotifyFilterEntry, snmpNotifyTable=snmpNotifyTable)
262.540541
2,139
0.730132
2,376
19,428
5.968855
0.198653
0.005641
0.006135
0.008179
0.360245
0.294669
0.255112
0.244817
0.199831
0.167889
0
0.036039
0.173049
19,428
73
2,140
266.136986
0.846695
0.015802
0
0
0
0.348485
0.606216
0.065979
0
0
0
0
0
1
0
false
0
0.121212
0
0.121212
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
1
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8c3509cac349dcd5ad849c4d6cf9a8723d045c81
141
py
Python
reddit2telegram/channels/r_windows10/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
null
null
null
reddit2telegram/channels/r_windows10/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
null
null
null
reddit2telegram/channels/r_windows10/app.py
mainyordle/reddit2telegram
1163e15aed3b6ff0fba65b222d3d9798f644c386
[ "MIT" ]
null
null
null
#encoding:utf-8 subreddit = 'Windows10' t_channel = '@r_Windows10' def send_post(submission, r2t): return r2t.send_simple(submission)
15.666667
38
0.744681
19
141
5.315789
0.789474
0
0
0
0
0
0
0
0
0
0
0.057377
0.134752
141
8
39
17.625
0.770492
0.099291
0
0
0
0
0.166667
0
0
0
0
0
0
1
0.25
false
0
0
0.25
0.5
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
0
0
0
4
8c3b081ea6a32101801acd268cd0ed4f347fa770
656
py
Python
twitter_dashboard.py
diegogonzalezmaneyro/twitter_app
e4df875f47049bd1ce7cc1379e297ab4c4493033
[ "MIT" ]
null
null
null
twitter_dashboard.py
diegogonzalezmaneyro/twitter_app
e4df875f47049bd1ce7cc1379e297ab4c4493033
[ "MIT" ]
8
2020-04-10T20:13:40.000Z
2020-04-10T20:13:42.000Z
twitter_dashboard.py
diegogonzalezmaneyro/twitter_app
e4df875f47049bd1ce7cc1379e297ab4c4493033
[ "MIT" ]
null
null
null
#Start the code here #import libs from flask import Flask, render_template, make_response #init app app = Flask(__name__) #define differents pages to work @app.route('/') def home(): return render_template('home.html') @app.route('/about') def about(): return render_template('about.html') @app.route('/register') def register(): return render_template('register.html') @app.route('/login') def login(): return render_template('login.html') @app.route('/<page_name>') def other_page(page_name): response = make_response(render_template('error.html'), 404) return response if __name__ == '__main__': app.run(debug=True)
19.294118
64
0.707317
89
656
4.955056
0.41573
0.190476
0.181406
0
0
0
0
0
0
0
0
0.005329
0.141768
656
33
65
19.878788
0.777975
0.105183
0
0
0
0
0.161235
0
0
0
0
0
0
1
0.25
false
0
0.05
0.2
0.55
0
0
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
4fcdd2b84575bb4ef18617bd03aba0131d9a1af2
127
py
Python
F_Machine_learning/1_Unsupervised-Learning/solutions/ex2_5.py
oercompbiomed/CBM101
20010dcb99fbf218c4789eb5918dcff8ceb94898
[ "MIT" ]
7
2019-07-03T07:41:55.000Z
2022-02-06T20:25:37.000Z
F_Machine_learning/1_Unsupervised-Learning/solutions/ex2_5.py
oercompbiomed/CBM101
20010dcb99fbf218c4789eb5918dcff8ceb94898
[ "MIT" ]
9
2019-03-14T15:15:09.000Z
2019-08-01T14:18:21.000Z
F_Machine_learning/1_Unsupervised-Learning/solutions/ex2_5.py
oercompbiomed/CBM101
20010dcb99fbf218c4789eb5918dcff8ceb94898
[ "MIT" ]
11
2019-03-12T10:43:11.000Z
2021-10-05T12:15:00.000Z
# ANSWER: # a few values that work together for (color_threshold, t) pairs are # (20, 1); (15,2); (8,3); (6,4); (5,5); (3,11)
25.4
68
0.582677
25
127
2.92
0.92
0
0
0
0
0
0
0
0
0
0
0.144231
0.181102
127
4
69
31.75
0.557692
0.937008
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
4fcfcea886eb98be22aae151c9fab71e74e94466
53
py
Python
tests/conftest.py
mullinix/afwerx-datathon
22cc0f0d14b71c1035d678f2dd2efcaeeec7b102
[ "MIT" ]
null
null
null
tests/conftest.py
mullinix/afwerx-datathon
22cc0f0d14b71c1035d678f2dd2efcaeeec7b102
[ "MIT" ]
5
2021-10-01T15:20:51.000Z
2021-10-09T13:15:06.000Z
tests/conftest.py
mullinix/afwerx-datathon
22cc0f0d14b71c1035d678f2dd2efcaeeec7b102
[ "MIT" ]
null
null
null
"""Resuable testing fixtures for afwerx-datathon."""
26.5
52
0.754717
6
53
6.666667
1
0
0
0
0
0
0
0
0
0
0
0
0.09434
53
1
53
53
0.833333
0.867925
0
null
0
null
0
0
null
0
0
0
null
1
null
true
0
0
null
null
null
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
8b0fb30e73506062885829e58005feedc45de893
476
py
Python
aldryn_forms/admin/formsubmission.py
protoroto/aldryn-forms
076365f391c096805c5ffea26f40ab728a6fcd2a
[ "BSD-3-Clause" ]
null
null
null
aldryn_forms/admin/formsubmission.py
protoroto/aldryn-forms
076365f391c096805c5ffea26f40ab728a6fcd2a
[ "BSD-3-Clause" ]
null
null
null
aldryn_forms/admin/formsubmission.py
protoroto/aldryn-forms
076365f391c096805c5ffea26f40ab728a6fcd2a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.contrib import admin from .base import BaseFormSubmissionAdmin from .views import FormExportWizardView from ..models import FormSubmission class FormSubmissionAdmin(BaseFormSubmissionAdmin): readonly_fields = BaseFormSubmissionAdmin.readonly_fields + ['form_url'] def get_form_export_view(self): return FormExportWizardView.as_view(admin=self, file_type='xls') admin.site.register(FormSubmission, FormSubmissionAdmin)
28
76
0.796218
50
476
7.42
0.64
0.167116
0.199461
0
0
0
0
0
0
0
0
0.002387
0.119748
476
16
77
29.75
0.883055
0.044118
0
0
0
0
0.024283
0
0
0
0
0
0
1
0.111111
false
0
0.444444
0.111111
0.888889
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
1
1
0
0
4
8b36296b09c61949630fc31d586cc538dc2007db
95
py
Python
compounddb/apps.py
xingyifei2016/clusterCAD
fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6
[ "BSD-3-Clause-LBNL" ]
7
2018-11-06T00:04:47.000Z
2021-08-05T04:37:12.000Z
compounddb/apps.py
xingyifei2016/clusterCAD
fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6
[ "BSD-3-Clause-LBNL" ]
26
2017-08-11T21:51:46.000Z
2022-03-11T23:18:25.000Z
compounddb/apps.py
xingyifei2016/clusterCAD
fb139edc90e3b963ac6bfc9f6890f0a4e4f356d6
[ "BSD-3-Clause-LBNL" ]
7
2017-08-16T17:28:40.000Z
2022-03-02T00:07:00.000Z
from django.apps import AppConfig class CompounddbConfig(AppConfig): name = 'compounddb'
15.833333
34
0.768421
10
95
7.3
0.9
0
0
0
0
0
0
0
0
0
0
0
0.157895
95
5
35
19
0.9125
0
0
0
0
0
0.105263
0
0
0
0
0
0
1
0
false
0
0.333333
0
1
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8b456ce328426c4c161d32177f6054f386366284
473
py
Python
distillation/datasets/__init__.py
valeoai/QuEST
02a23d2d8e0d059b4a30433f92eec5db146467f4
[ "Apache-2.0" ]
3
2021-06-03T22:45:47.000Z
2022-03-27T18:50:06.000Z
distillation/datasets/__init__.py
valeoai/QuEST
02a23d2d8e0d059b4a30433f92eec5db146467f4
[ "Apache-2.0" ]
null
null
null
distillation/datasets/__init__.py
valeoai/QuEST
02a23d2d8e0d059b4a30433f92eec5db146467f4
[ "Apache-2.0" ]
1
2021-08-20T15:39:40.000Z
2021-08-20T15:39:40.000Z
from distillation.datasets.imagenet_dataset import ImageNet from distillation.datasets.cifar_dataset import CIFAR100 from distillation.datasets.mit67_datasets import MITScenes def dataset_factory(dataset_name, *args, **kwargs): datasets_collection = {} datasets_collection['ImageNet'] = ImageNet datasets_collection['CIFAR100'] = CIFAR100 datasets_collection['MITScenes'] = MITScenes return datasets_collection[dataset_name](*args, **kwargs)
43
62
0.784355
49
473
7.346939
0.346939
0.25
0.2
0.116667
0
0
0
0
0
0
0
0.026764
0.131078
473
10
63
47.3
0.849148
0
0
0
0
0
0.053996
0
0
0
0
0
0
1
0.111111
false
0
0.333333
0
0.555556
0
0
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8c8cd31caa8539291519297b9ec64699680f1e65
412
py
Python
extract_gear/preprocess_factory.py
kamerons/dde-extract-gear
44464ae470bd5de6279d32e3587b469ce006ea42
[ "Apache-2.0" ]
null
null
null
extract_gear/preprocess_factory.py
kamerons/dde-extract-gear
44464ae470bd5de6279d32e3587b469ce006ea42
[ "Apache-2.0" ]
null
null
null
extract_gear/preprocess_factory.py
kamerons/dde-extract-gear
44464ae470bd5de6279d32e3587b469ce006ea42
[ "Apache-2.0" ]
null
null
null
from extract_gear.preprocess_level import PreProcessLevel from extract_gear.preprocess_set import PreProcessSet from extract_gear.preprocess_stat import PreProcessStat class PreprocessFactory: def get_set_preprocessor(self, img): return PreProcessSet(img) def get_stat_preprocessor(self, img): return PreProcessStat(img) def get_level_preprocessor(self, img): return PreProcessLevel(img)
24.235294
57
0.817961
50
412
6.5
0.38
0.101538
0.138462
0.230769
0
0
0
0
0
0
0
0
0.128641
412
16
58
25.75
0.905292
0
0
0
0
0
0
0
0
0
0
0
0
1
0.3
false
0
0.3
0.3
1
0
0
0
0
null
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
1
1
0
0
4
8ca1d282ad0cf51ab1e6cbc824e72caef231af32
151
py
Python
pathexclusion/__init__.py
mr-tl/project-checker
f919dc274aa10b3cef9bc18805d61683a7919e56
[ "MIT" ]
null
null
null
pathexclusion/__init__.py
mr-tl/project-checker
f919dc274aa10b3cef9bc18805d61683a7919e56
[ "MIT" ]
null
null
null
pathexclusion/__init__.py
mr-tl/project-checker
f919dc274aa10b3cef9bc18805d61683a7919e56
[ "MIT" ]
1
2020-01-28T12:54:53.000Z
2020-01-28T12:54:53.000Z
"""Provide functionality for file system operations.""" from pathexclusion.pathexclusion_ import exclude_file_paths __all__ = ["exclude_file_paths"]
25.166667
59
0.81457
17
151
6.705882
0.705882
0.192982
0.280702
0
0
0
0
0
0
0
0
0
0.099338
151
5
60
30.2
0.838235
0.324503
0
0
0
0
0.1875
0
0
0
0
0
0
1
0
false
0
0.5
0
0.5
0
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
1
0
0
0
0
4
8cc5a56b612cbe006c424f670775180e12c2c00d
228
py
Python
learning_racer/robot/donkey_sim/core/simple_client.py
tikisi/airc-rl-agent
280ae6e1f30fff991ccf78e1075c5c25edab6866
[ "MIT" ]
69
2020-03-27T03:02:20.000Z
2022-03-03T10:08:09.000Z
learning_racer/robot/donkey_sim/core/simple_client.py
rl-jetbot/airc-rl-agent
b8266f5b09a81fe2d1fdeeb72e48f4bb24273049
[ "MIT" ]
46
2020-02-28T13:42:40.000Z
2022-01-26T23:47:12.000Z
learning_racer/robot/donkey_sim/core/simple_client.py
rl-jetbot/airc-rl-agent
b8266f5b09a81fe2d1fdeeb72e48f4bb24273049
[ "MIT" ]
22
2020-03-16T17:32:05.000Z
2022-02-15T23:50:10.000Z
import gym import gym_donkeycar def create_simulator_agent(donkey_sim_path="remote", host="127.0.0,1", port=9091): env = gym.make('donkey-generated-track-v0', exe_path=donkey_sim_path, host=host, port=port) return env
28.5
95
0.754386
38
228
4.315789
0.631579
0.109756
0.158537
0
0
0
0
0
0
0
0
0.054455
0.114035
228
7
96
32.571429
0.757426
0
0
0
1
0
0.175439
0.109649
0
0
0
0
0
1
0.2
false
0
0.4
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
1
0
0
0
null
0
0
0
0
0
0
0
0
1
0
1
0
0
4
8cc63d0d37d018137751c29aa35c95c0801b66c3
125
py
Python
.history/main_20171106171028.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/main_20171106171028.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
.history/main_20171106171028.py
reecebenson/DADSA-Tennis-PartA
d0763f819b300fcd0ce27041f5bc4ef0519c00bf
[ "MIT" ]
null
null
null
# DADSA - Assignment 1 # Reece Benson from classes import * def __main__(): handler = Handler.Handler() __main__()
13.888889
31
0.672
14
125
5.428571
0.785714
0.368421
0
0
0
0
0
0
0
0
0
0.010309
0.224
125
9
32
13.888889
0.773196
0.264
0
0
0
0
0
0
0
0
0
0
0
1
0.25
false
0
0.25
0
0.5
0
1
0
0
null
1
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
0
0
0
4
8cc6a15d1c923b68a84a8eb4a5dd0fbada5ce7f7
99
py
Python
examples/arrayFunctions/arf.py
Nemika-Haj/PyJS
5a67164f8b8d445467edb304c0728ca7a0463be6
[ "MIT" ]
5
2021-02-22T14:22:17.000Z
2021-10-31T23:54:45.000Z
examples/arrayFunctions/arf.py
Nemika-Haj/PyJS
5a67164f8b8d445467edb304c0728ca7a0463be6
[ "MIT" ]
null
null
null
examples/arrayFunctions/arf.py
Nemika-Haj/PyJS
5a67164f8b8d445467edb304c0728ca7a0463be6
[ "MIT" ]
null
null
null
from PyJS import * _list = [1,2,3,4] console.log(_list.toString()) console.log(_list.join(" * "))
16.5
30
0.656566
16
99
3.875
0.75
0.322581
0.451613
0
0
0
0
0
0
0
0
0.045977
0.121212
99
6
30
16.5
0.666667
0
0
0
0
0
0.03
0
0
0
0
0
0
1
0
false
0
0.25
0
0.25
0
1
0
0
null
1
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
4
8cdbb1073ba10f3d8df00e40c566fc575f0207ad
377
py
Python
rest-framework-tutorial/services/serializer.py
josip-milic/asc_qwerty_test
90a8a7ed009822c03054303828fde1e55a71fd15
[ "Apache-2.0" ]
null
null
null
rest-framework-tutorial/services/serializer.py
josip-milic/asc_qwerty_test
90a8a7ed009822c03054303828fde1e55a71fd15
[ "Apache-2.0" ]
null
null
null
rest-framework-tutorial/services/serializer.py
josip-milic/asc_qwerty_test
90a8a7ed009822c03054303828fde1e55a71fd15
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers from .models import Event class EventSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Event fields = ('id','title','date','location_lat','location_lng','marker_type',) class EventDetailSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Event fields = ('id','description','created',)
31.416667
77
0.774536
39
377
7.384615
0.615385
0.256944
0.291667
0.319444
0.444444
0.444444
0.444444
0.444444
0
0
0
0
0.103448
377
12
78
31.416667
0.852071
0
0
0.4
0
0
0.174603
0
0
0
0
0
0
1
0
false
0
0.2
0
0.6
0
0
0
0
null
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
0
0
0
0
1
0
0
4
8cfd1de3bb13f50d526a35dfe69693637e816505
175
py
Python
simple_captcha_type/main.py
samorojy/captcha_solver
6e210a01efdb8515a0326c7920975f66e3c64c0c
[ "Apache-2.0" ]
null
null
null
simple_captcha_type/main.py
samorojy/captcha_solver
6e210a01efdb8515a0326c7920975f66e3c64c0c
[ "Apache-2.0" ]
null
null
null
simple_captcha_type/main.py
samorojy/captcha_solver
6e210a01efdb8515a0326c7920975f66e3c64c0c
[ "Apache-2.0" ]
null
null
null
import captcha_algo_decoder if __name__ == '__main__': print(captcha_algo_decoder.decoder( 'captcha_dataset\\evergreen\\evergreen_00081102082021Z3Kehezt9s.png'))
29.166667
78
0.782857
18
175
6.833333
0.666667
0.178862
0.292683
0
0
0
0
0
0
0
0
0.103896
0.12
175
5
79
35
0.694805
0
0
0
0
0
0.422857
0.377143
0
0
0
0
0
1
0
true
0
0.25
0
0.25
0.25
1
0
0
null
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
0
1
0
0
0
0
0
0
4
509c52158169f1df1144985735e1e500c0269c41
66
py
Python
python/testData/completion/qualifiedAssignmentPatternStringPath/a.py
tgodzik/intellij-community
f5ef4191fc30b69db945633951fb160c1cfb7b6f
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/completion/qualifiedAssignmentPatternStringPath/a.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2022-02-19T09:45:05.000Z
2022-02-27T20:32:55.000Z
python/testData/completion/qualifiedAssignmentPatternStringPath/a.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
class C: def __init__(self): self.path = "foo<caret>"
16.5
32
0.560606
9
66
3.666667
0.888889
0
0
0
0
0
0
0
0
0
0
0
0.287879
66
3
33
22
0.702128
0
0
0
0
0
0.151515
0
0
0
0
0
0
1
0.333333
false
0
0
0
0.666667
0
1
0
0
null
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
null
0
0
0
0
0
1
0
0
0
0
1
0
0
4