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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
69b76f258153e3260b3ba25e7cf4af2dca15b876 | 210 | py | Python | src/playground/test_import/tool.py | objcat/test-python | 97b3cb610a80b8e00b8a032ca94bb3fead4102fb | [
"MIT"
] | null | null | null | src/playground/test_import/tool.py | objcat/test-python | 97b3cb610a80b8e00b8a032ca94bb3fead4102fb | [
"MIT"
] | null | null | null | src/playground/test_import/tool.py | objcat/test-python | 97b3cb610a80b8e00b8a032ca94bb3fead4102fb | [
"MIT"
] | null | null | null | # description: tool
# date: 2020/6/7 19:07
# author: objcat
# version: 1.0
import time
class Tool:
def __init__(self):
print("Tool初始化了")
def say(self):
print(23333)
# tool = Tool()
| 12.352941 | 25 | 0.595238 | 29 | 210 | 4.172414 | 0.793103 | 0.14876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11039 | 0.266667 | 210 | 16 | 26 | 13.125 | 0.675325 | 0.380952 | 0 | 0 | 0 | 0 | 0.064516 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.166667 | 0 | 0.666667 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
69c08d0a5233785d5283c758701c1890fc87f127 | 438 | py | Python | exercism/gigasecond.py | NewForester/spl-python | 5d79be7bd602e8e6ba7669a1db06a9465483c754 | [
"MIT"
] | null | null | null | exercism/gigasecond.py | NewForester/spl-python | 5d79be7bd602e8e6ba7669a1db06a9465483c754 | [
"MIT"
] | null | null | null | exercism/gigasecond.py | NewForester/spl-python | 5d79be7bd602e8e6ba7669a1db06a9465483c754 | [
"MIT"
] | null | null | null | """
Python 3 solution to the Exercism 'gigasecond' exercise
"""
from datetime import timedelta
def add_gigasecond(birth_date):
"""
add a gigasecond to a date in datetime.datetime format
and return the result in the same format
"""
return birth_date + timedelta(seconds=10**9)
##
## It seems everyone found this trivial.
## The main difference was the representation of 1E9.
## I think I prefer 1E9 over 10**9
##
| 24.333333 | 59 | 0.705479 | 64 | 438 | 4.78125 | 0.65625 | 0.058824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0317 | 0.207763 | 438 | 17 | 60 | 25.764706 | 0.850144 | 0.623288 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.333333 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
69ccf0b4a44bb339ece5d795a32292e9c7cb51db | 390 | py | Python | awardsapp/serializer.py | AnnabelNkir/Awards | 79d2b3bf7fe7491425b469df9f95fd3a62431e80 | [
"MIT",
"Unlicense"
] | null | null | null | awardsapp/serializer.py | AnnabelNkir/Awards | 79d2b3bf7fe7491425b469df9f95fd3a62431e80 | [
"MIT",
"Unlicense"
] | null | null | null | awardsapp/serializer.py | AnnabelNkir/Awards | 79d2b3bf7fe7491425b469df9f95fd3a62431e80 | [
"MIT",
"Unlicense"
] | null | null | null | from rest_framework import serializers
from .models import Profile, Projects
class ProfileSerializer(serializers.ModelSerializer):
class Meta:
model = Profile
fields = ('name', 'pro_photo', 'bio','user')
class ProjectsSerializer(serializers.ModelSerializer):
class Meta:
model = Projects
fields = ('name', 'screenshot', 'description','link','user') | 32.5 | 68 | 0.694872 | 38 | 390 | 7.078947 | 0.605263 | 0.193309 | 0.230483 | 0.260223 | 0.297398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.189744 | 390 | 12 | 68 | 32.5 | 0.851266 | 0 | 0 | 0.2 | 0 | 0 | 0.13555 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.6 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
69dae4982c1f804212e8cf9037b224d8ee6131b9 | 80 | py | Python | setup.py | karafra/steg-utility | 04eef24d7c6baff636522764fc7c8e39f0d2f743 | [
"Apache-2.0"
] | 1 | 2022-01-26T01:07:25.000Z | 2022-01-26T01:07:25.000Z | setup.py | karafra/steg-utility | 04eef24d7c6baff636522764fc7c8e39f0d2f743 | [
"Apache-2.0"
] | 8 | 2022-01-24T14:11:27.000Z | 2022-03-28T08:55:19.000Z | setup.py | karafra/steg-utility | 04eef24d7c6baff636522764fc7c8e39f0d2f743 | [
"Apache-2.0"
] | null | null | null | import setuptools
setuptools.setup(
packages=setuptools.find_packages()
)
| 11.428571 | 39 | 0.775 | 8 | 80 | 7.625 | 0.625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.1375 | 80 | 6 | 40 | 13.333333 | 0.884058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
69f2870c3c06eaa7bf0d67ac7bf780042050cc40 | 38 | py | Python | config.py | mikkokallio/mitodo | 09cc4958622e0016bcd03304e550161493f3c5fd | [
"MIT"
] | null | null | null | config.py | mikkokallio/mitodo | 09cc4958622e0016bcd03304e550161493f3c5fd | [
"MIT"
] | null | null | null | config.py | mikkokallio/mitodo | 09cc4958622e0016bcd03304e550161493f3c5fd | [
"MIT"
] | null | null | null | FILENAME = 'todo.json'
MIN_LENGTH = 2
| 12.666667 | 22 | 0.710526 | 6 | 38 | 4.333333 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03125 | 0.157895 | 38 | 2 | 23 | 19 | 0.78125 | 0 | 0 | 0 | 0 | 0 | 0.236842 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0e1621ba3b58b75fb07ca7140c73a5eb138c6c54 | 165 | py | Python | aula8a.py | Laurahpro/EXERCICIOS-EM-PYTHON | 7eb896e322f183fdbcf3a7d93b21ab5b6162f303 | [
"MIT"
] | null | null | null | aula8a.py | Laurahpro/EXERCICIOS-EM-PYTHON | 7eb896e322f183fdbcf3a7d93b21ab5b6162f303 | [
"MIT"
] | null | null | null | aula8a.py | Laurahpro/EXERCICIOS-EM-PYTHON | 7eb896e322f183fdbcf3a7d93b21ab5b6162f303 | [
"MIT"
] | null | null | null | import math import sqrt, floor
num = int(input('Digite um número: '))
raiz = sqrt(num)
print ('A raiz quadrada de {} é igual a {:.0f}.'.format(num, raiz))
print ('') | 33 | 67 | 0.654545 | 27 | 165 | 4 | 0.703704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007194 | 0.157576 | 165 | 5 | 68 | 33 | 0.769784 | 0 | 0 | 0 | 0 | 0 | 0.343373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.4 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
38528b8f01ad4a0f5b9ddb4615224d7e7ebb563e | 55 | py | Python | panel-backend/scripts/panelconfig.py | Karliscraft/dotfiles | ff26026410fb4112008f2a1c02f25a10d00a2429 | [
"MIT"
] | null | null | null | panel-backend/scripts/panelconfig.py | Karliscraft/dotfiles | ff26026410fb4112008f2a1c02f25a10d00a2429 | [
"MIT"
] | null | null | null | panel-backend/scripts/panelconfig.py | Karliscraft/dotfiles | ff26026410fb4112008f2a1c02f25a10d00a2429 | [
"MIT"
] | null | null | null | wifi = 'wlp6s0'
configdir = '/home/void/panel-backend'
| 18.333333 | 38 | 0.709091 | 7 | 55 | 5.571429 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.040816 | 0.109091 | 55 | 2 | 39 | 27.5 | 0.755102 | 0 | 0 | 0 | 0 | 0 | 0.545455 | 0.436364 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
385d3e83c66a13cd805df1579db1c4637ac4752a | 253 | py | Python | iridauploader/api/exceptions/irida_connection_error.py | COMBAT-SARS-COV-2/irida-uploader | b9d04d187d6a5a9fdcaef5b27135965ffac99db0 | [
"Apache-2.0"
] | 7 | 2019-01-25T16:56:11.000Z | 2021-01-12T15:32:08.000Z | iridauploader/api/exceptions/irida_connection_error.py | COMBAT-SARS-COV-2/irida-uploader | b9d04d187d6a5a9fdcaef5b27135965ffac99db0 | [
"Apache-2.0"
] | 80 | 2019-01-29T14:54:26.000Z | 2022-03-25T18:51:51.000Z | iridauploader/api/exceptions/irida_connection_error.py | COMBAT-SARS-COV-2/irida-uploader | b9d04d187d6a5a9fdcaef5b27135965ffac99db0 | [
"Apache-2.0"
] | 9 | 2019-03-14T09:58:05.000Z | 2022-01-06T20:14:45.000Z | class IridaConnectionError(Exception):
"""
This error is thrown when the api cannot connect to the IRIDA api
Either the server is unreachable or the credentials are invalid
All calls to the api should expect this error
"""
pass
| 28.111111 | 69 | 0.719368 | 36 | 253 | 5.055556 | 0.722222 | 0.098901 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.245059 | 253 | 8 | 70 | 31.625 | 0.95288 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.5 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
3890eba2e914177cfa14bc0730d281f4ace41611 | 222 | py | Python | main.py | KretschiGL/RPi_SensorController | 57c0db08901b92deff0706b5b35b11a2a8c36d63 | [
"MIT"
] | null | null | null | main.py | KretschiGL/RPi_SensorController | 57c0db08901b92deff0706b5b35b11a2a8c36d63 | [
"MIT"
] | null | null | null | main.py | KretschiGL/RPi_SensorController | 57c0db08901b92deff0706b5b35b11a2a8c36d63 | [
"MIT"
] | null | null | null | # Author: Lukas Kretschmar (lukas.kretschmar@ost.ch)
# License: MIT
from src.Program import Program
# Example program to execute on the RPi
if __name__ == "__main__":
program = Program()
program.run()
| 22.2 | 58 | 0.68018 | 28 | 222 | 5.107143 | 0.75 | 0.20979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.220721 | 222 | 9 | 59 | 24.666667 | 0.82659 | 0.504505 | 0 | 0 | 0 | 0 | 0.075472 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
38a8181ed5c0474062640cb8571e1aa5db1c0d30 | 7,383 | py | Python | server/generateconfig.py | ehackify/hnp | ba0e10e9ca390616dfa3888ceafc94672f41d26d | [
"MIT"
] | 2 | 2020-04-29T09:58:21.000Z | 2020-05-08T20:23:33.000Z | server/generateconfig.py | ehackify/hnp | ba0e10e9ca390616dfa3888ceafc94672f41d26d | [
"MIT"
] | 1 | 2020-05-01T11:00:58.000Z | 2020-05-01T11:00:58.000Z | server/generateconfig.py | ehackify/hnp | ba0e10e9ca390616dfa3888ceafc94672f41d26d | [
"MIT"
] | null | null | null | """
This is a helper script meant to generate a
working config.py file from the config template.
"""
from getpass import getpass
import json
import os.path
from random import choice
import string
import sys
from urllib2 import urlopen
import argparse
el = string.ascii_letters + string.digits
rand_str = lambda n: ''.join(choice(el) for _ in range(n))
def get_pub_ip():
sock = urlopen('http://icanhazip.com/')
ip = sock.read().rstrip()
sock.close()
return ip
def generate_config():
# Check if config file already exists
if os.path.isfile('config.py'):
print('config.py already exists')
sys.exit()
pub_ip = get_pub_ip()
default_base_url = 'http://{}'.format(pub_ip)
default_honeymap_url = '{}:3000'.format(default_base_url)
default_log_path = '/var/log/hnp/hnp.log'
localconfig = {}
localconfig['SECRET_KEY'] = rand_str(32)
localconfig['DEPLOY_KEY'] = rand_str(8)
is_unattended = False
# Get and parse args for command unattended install
parser_description = 'This is a help script to generate a working config.py file from the config template.'
parser = argparse.ArgumentParser(description=parser_description)
subparsers = parser.add_subparsers(help='commands')
parser_generate = subparsers.add_parser('generate', help='Generate a config.py and prompt for options')
parser_generate.set_defaults(which='generate')
parser_unatt = subparsers.add_parser('unattended', help='Unattended install')
parser_unatt.set_defaults(which='unattended')
parser_unatt.add_argument('-e', '--email', type=str, required=True,
help='Superuser email address')
parser_unatt.add_argument('-p', '--password', type=str, required=True,
help='Superuser password')
parser_unatt.add_argument('-b', '--base_url', type=str, default=default_base_url,
help='Server base url')
parser_unatt.add_argument('-y', '--honeymap_url', type=str, default=default_honeymap_url,
help='Honeymap url')
parser_unatt.add_argument('-m', '--mail_server', type=str, default='localhost',
help='Mail server address')
parser_unatt.add_argument('-s', '--mail_port', type=int, default=25,
help='Mail server port')
parser_unatt.add_argument('--mail_tls', action='store_true',
help='Use TLS for mail')
parser_unatt.add_argument('--mail_ssl', action='store_true',
help='Use SSL for mail')
parser_unatt.add_argument('--mail_user', type=str, default='',
help='Mail username')
parser_unatt.add_argument('--mail_pass', type=str, default='',
help='Mail password')
parser_unatt.add_argument('--mail_sender', type=str, default='',
help='Mail sender')
parser_unatt.add_argument('-l', '--log_file_path', type=str, default=default_log_path,
help='Log file path')
parser_unatt.add_argument('-d', '--debug', action='store_true',
help='Run in debug mode')
if (len(sys.argv) < 2):
args = parser.parse_args(['generate'])
else:
args = parser.parse_args(sys.argv[1:])
# check for unattended install
if args.which is 'unattended':
is_unattended = True
if is_unattended:
# Collect values from arguments
debug = args.debug
email = args.email
password = args.password
server_base_url= args.base_url
honeymap_url = args.honeymap_url
mail_server = args.mail_server
mail_port = args.mail_port
mail_tls = args.mail_tls
mail_ssl = args.mail_ssl
mail_username = args.mail_user
mail_password = args.mail_pass
default_mail_sender = args.mail_sender
log_file_path = args.log_file_path
else:
# Collect values from user
debug = raw_input('Do you wish to run in Debug mode?: y/n ')
while debug not in ['y', 'n']:
debug = raw_input('Please y or n ')
debug = True if debug == 'y' else False
email = raw_input('Superuser email: ')
while '@' not in email:
email = raw_input('Superuser email (must be valid): ')
while True:
password = getpass('Superuser password: ')
while not password:
password = getpass('Superuser password (cannot be blank): ')
password2 = getpass('Superuser password: (again): ')
while not password2:
password2 = getpass('Superuser password (again; cannot be blank): ')
if password == password2:
break
else:
print "Passwords did not match. Try again"
server_base_url = raw_input('Server base url ["{}"]: '.format(default_base_url))
if server_base_url.endswith('/'):
server_base_url = server_base_url[:-1]
server_base_url = server_base_url if server_base_url.strip() else default_base_url
default_honeymap_url = '{}:3000'.format(server_base_url)
honeymap_url = raw_input('Honeymap url ["{}"]: '.format(default_honeymap_url))
if honeymap_url.endswith('/'):
honeymap_url = honeymap_url[:-1]
mail_server = raw_input('Mail server address ["localhost"]: ')
mail_port = raw_input('Mail server port [25]: ')
mail_tls = raw_input('Use TLS for email?: y/n ')
while mail_tls not in ['y', 'n']:
mail_tls = raw_input('Please y or n ')
mail_ssl = raw_input('Use SSL for email?: y/n ')
while mail_ssl not in ['y', 'n']:
mail_ssl = raw_input('Please y or n ')
mail_username = raw_input('Mail server username [""]: ')
mail_password = getpass('Mail server password [""]: ')
default_mail_sender = raw_input('Mail default sender [""]: ')
log_file_path = raw_input('Path for log file ["{}"]: '.format(default_log_path))
honeymap_url = honeymap_url if honeymap_url.strip() else default_honeymap_url
log_file_path = log_file_path if log_file_path else default_log_path
localconfig['DEBUG'] = debug
localconfig['SUPERUSER_EMAIL'] = email
localconfig['SUPERUSER_PASSWORD'] = password
localconfig['SERVER_BASE_URL'] = server_base_url
localconfig['HONEYMAP_URL'] = honeymap_url
localconfig['MAIL_SERVER'] = mail_server if mail_server else "localhost"
localconfig['MAIL_PORT'] = mail_port if mail_port else 25
localconfig['MAIL_USE_TLS'] = 'y' == mail_tls
localconfig['MAIL_USE_SSL'] = 'y' == mail_ssl
localconfig['MAIL_USERNAME'] = mail_username if mail_username else ''
localconfig['MAIL_PASSWORD'] = mail_password if mail_password else ''
localconfig['DEFAULT_MAIL_SENDER'] = default_mail_sender if default_mail_sender else ""
localconfig['LOG_FILE_PATH'] = log_file_path
with open('config.py.template', 'r') as templfile,\
open('config.py', 'w') as confile:
templ = templfile.read()
for key, setting in localconfig.iteritems():
templ = templ.replace('{{' + key + '}}', str(setting))
confile.write(templ)
if __name__ == '__main__':
generate_config()
| 39.908108 | 111 | 0.629554 | 922 | 7,383 | 4.79718 | 0.186551 | 0.031653 | 0.041149 | 0.064662 | 0.258422 | 0.111011 | 0.047931 | 0.023061 | 0.023061 | 0.023061 | 0 | 0.004719 | 0.253691 | 7,383 | 184 | 112 | 40.125 | 0.798004 | 0.02289 | 0 | 0.021127 | 1 | 0 | 0.211874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0.126761 | 0.056338 | null | null | 0.014085 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
38b27566b1259125c82f23bb410465baad833115 | 146 | py | Python | data/yaml_reader.py | Aadesh-Baral/OSM-chatbot | 346779f66e1b16b9605588f57644703cf8790607 | [
"MIT"
] | null | null | null | data/yaml_reader.py | Aadesh-Baral/OSM-chatbot | 346779f66e1b16b9605588f57644703cf8790607 | [
"MIT"
] | null | null | null | data/yaml_reader.py | Aadesh-Baral/OSM-chatbot | 346779f66e1b16b9605588f57644703cf8790607 | [
"MIT"
] | null | null | null | import yaml
from yaml.loader import SafeLoader
with open('chitchat.yml') as f:
data = yaml.load(f, Loader=SafeLoader)
print(data['nlu']) | 24.333333 | 43 | 0.705479 | 22 | 146 | 4.681818 | 0.681818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164384 | 146 | 6 | 44 | 24.333333 | 0.844262 | 0 | 0 | 0 | 0 | 0 | 0.105634 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0.2 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
38e079f25d15e79b7eabb93241bdba303f7cd204 | 2,915 | py | Python | tests/test_gui.py | bscott711/LLSpy | b99aab165ed2c9ebbb957880e15b7b869e266c23 | [
"BSD-3-Clause"
] | null | null | null | tests/test_gui.py | bscott711/LLSpy | b99aab165ed2c9ebbb957880e15b7b869e266c23 | [
"BSD-3-Clause"
] | null | null | null | tests/test_gui.py | bscott711/LLSpy | b99aab165ed2c9ebbb957880e15b7b869e266c23 | [
"BSD-3-Clause"
] | null | null | null | import os
from llspy.gui.mainwindow import main_GUI
from PyQt5 import QtWidgets, QtCore
from pytestqt import qtbot
from llspy.llsdir import LLSdir
def test_basic_processing(qtbot):
testdata = os.path.join(os.path.dirname(__file__), 'testdata', 'sample')
LLSdir(testdata).reduce_to_raw(keepmip=False)
n_testfiles = len(os.listdir(testdata))
otfdir = os.path.join(os.path.dirname(__file__), 'testdata', 'otfs')
APP = QtWidgets.QApplication([])
mainGUI = main_GUI()
mainGUI.loadProgramDefaults()
mainGUI.setOTFdirPath(otfdir)
assert mainGUI.listbox.rowCount() == 0
mainGUI.listbox.addPath(testdata)
assert mainGUI.listbox.rowCount() == 1
with qtbot.waitSignal(mainGUI.sig_processing_done, timeout=12000):
qtbot.mouseClick(mainGUI.processButton, QtCore.Qt.LeftButton)
deconFolder = os.path.join(testdata, 'GPUdecon')
MIPfolder = os.path.join(deconFolder, 'MIPs')
assert os.path.isdir(deconFolder)
assert os.path.isdir(MIPfolder)
assert len(os.listdir(deconFolder)) == 3
assert len(os.listdir(MIPfolder)) == 1
LLSdir(testdata).reduce_to_raw(keepmip=False)
assert not os.path.isdir(deconFolder)
assert not os.path.isdir(MIPfolder)
assert len(os.listdir(testdata)) == n_testfiles
mainGUI.quitProgram(save=False)
# def test_spimagine_preview(qtbot):
# testdata = os.path.join(os.path.dirname(__file__), 'testdata', 'sample')
# otfdir = os.path.join(os.path.dirname(__file__), 'testdata', 'otfs')
# APP = QtWidgets.QApplication([])
# mainGUI = main_GUI()
# mainGUI.loadProgramDefaults()
# mainGUI.setOTFdirPath(otfdir)
# assert mainGUI.listbox.rowCount() == 0
# mainGUI.listbox.addPath(testdata)
# assert mainGUI.listbox.rowCount() == 1
# def preview_exists():
# assert len(mainGUI.spimwins)
# mainGUI.prevBackendSpimagineRadio.setChecked(True)
# qtbot.mouseClick(mainGUI.previewButton, QtCore.Qt.LeftButton)
# qtbot.waitUntil(preview_exists, timeout=10000)
# mainGUI.close_all_previews()
# assert len(mainGUI.spimwins) == 0
# mainGUI.quitProgram(save=False)
def test_matplotlib_preview(qtbot):
testdata = os.path.join(os.path.dirname(__file__), 'testdata', 'sample')
otfdir = os.path.join(os.path.dirname(__file__), 'testdata', 'otfs')
APP = QtWidgets.QApplication([])
mainGUI = main_GUI()
mainGUI.loadProgramDefaults()
mainGUI.setOTFdirPath(otfdir)
assert mainGUI.listbox.rowCount() == 0
mainGUI.listbox.addPath(testdata)
assert mainGUI.listbox.rowCount() == 1
def preview_exists():
assert len(mainGUI.spimwins)
mainGUI.prevBackendMatplotlibRadio.setChecked(True)
qtbot.mouseClick(mainGUI.previewButton, QtCore.Qt.LeftButton)
qtbot.waitUntil(preview_exists, timeout=10000)
mainGUI.close_all_previews()
assert len(mainGUI.spimwins) == 0
mainGUI.quitProgram(save=False)
| 37.857143 | 78 | 0.718696 | 340 | 2,915 | 6.014706 | 0.232353 | 0.052812 | 0.03912 | 0.035208 | 0.761369 | 0.728117 | 0.708068 | 0.671883 | 0.634719 | 0.634719 | 0 | 0.010543 | 0.154031 | 2,915 | 76 | 79 | 38.355263 | 0.818735 | 0.267581 | 0 | 0.458333 | 0 | 0 | 0.03026 | 0 | 0 | 0 | 0 | 0 | 0.270833 | 1 | 0.0625 | false | 0 | 0.104167 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2a000f80356a5312781a30411e6a7a8d86918fdb | 379 | py | Python | astropy/io/registry/__init__.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2019-03-11T12:26:49.000Z | 2019-03-11T12:26:49.000Z | astropy/io/registry/__init__.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | 1 | 2019-10-09T18:54:27.000Z | 2019-10-09T18:54:27.000Z | astropy/io/registry/__init__.py | MatiasRepetto/astropy | 689f9d3b063145150149e592a879ee40af1fac06 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Unified I/O Registry.
"""
from . import base, compat, core, interface
from .base import *
from .compat import *
from .compat import _identifiers, _readers, _writers # for backwards compat
from .core import *
from .interface import *
__all__ = core.__all__ + interface.__all__ + compat.__all__ + base.__all__
| 27.071429 | 76 | 0.744063 | 51 | 379 | 5.078431 | 0.509804 | 0.11583 | 0.123552 | 0.169884 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003145 | 0.16095 | 379 | 13 | 77 | 29.153846 | 0.811321 | 0.277045 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.857143 | 0 | 0.857143 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
2a04e2880189d993b36ce4377554cbe94ad29268 | 183 | py | Python | Mundo01/ex003.py | anemesio/Pyyhon3-Exercicios | 7f2c6ec62545f411c79e96070db5cf3198ba4c80 | [
"Apache-2.0"
] | null | null | null | Mundo01/ex003.py | anemesio/Pyyhon3-Exercicios | 7f2c6ec62545f411c79e96070db5cf3198ba4c80 | [
"Apache-2.0"
] | null | null | null | Mundo01/ex003.py | anemesio/Pyyhon3-Exercicios | 7f2c6ec62545f411c79e96070db5cf3198ba4c80 | [
"Apache-2.0"
] | null | null | null | num01 = int(input('Digite um valor: '))
num02 = int(input('Digite outro valor: '))
soma = num01 + num02
print('A soma entre {} e {} é igual a {}!'.format(num01, num02, soma))
| 26.142857 | 71 | 0.612022 | 27 | 183 | 4.148148 | 0.592593 | 0.142857 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.082192 | 0.202186 | 183 | 6 | 72 | 30.5 | 0.684932 | 0 | 0 | 0 | 0 | 0 | 0.405714 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2a1238361703dbce64c86cb1b725dcb3ecedc2bc | 756 | py | Python | backend_sqlalchemy/backend_app/models/user.py | jiz148/medical_app | 2f8b3f299ff6a87e62ac7483b6d2bac156a08874 | [
"MIT"
] | null | null | null | backend_sqlalchemy/backend_app/models/user.py | jiz148/medical_app | 2f8b3f299ff6a87e62ac7483b6d2bac156a08874 | [
"MIT"
] | null | null | null | backend_sqlalchemy/backend_app/models/user.py | jiz148/medical_app | 2f8b3f299ff6a87e62ac7483b6d2bac156a08874 | [
"MIT"
] | null | null | null | from backend_sqlalchemy.backend_app.db import db
from backend_sqlalchemy.backend_app.db import app
from sqlalchemy.ext.automap import automap_base
from sqlalchemy.orm import relationship
from passlib.hash import pbkdf2_sha256
# defining a custom hash function to be used for encrypting the password
custom_hash = pbkdf2_sha256.using(salt=bytes(app.secret_key, 'utf-8')).using(rounds=10000).hash
base = automap_base()
class UserModel(base):
__tablename__ = 'User'
visits = relationship('Visit', foreign_keys='Visit.uid')
def encrypt_password(self):
self.password = custom_hash(self.password)
def new_password_encrypted(self, password):
self.password = custom_hash(password)
base.prepare(db.engine, reflect=True)
| 25.2 | 95 | 0.769841 | 104 | 756 | 5.403846 | 0.509615 | 0.071174 | 0.096085 | 0.099644 | 0.13879 | 0.13879 | 0.13879 | 0 | 0 | 0 | 0 | 0.021572 | 0.141534 | 756 | 29 | 96 | 26.068966 | 0.844376 | 0.092593 | 0 | 0 | 0 | 0 | 0.033774 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.133333 | false | 0.333333 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
2a464ba0527d1863b8407c18a0248d9e6c7bc349 | 532 | py | Python | rent/rent/forms.py | ahmedsadman/house-rent-service | b2054f67e61e81153b8b2d78613b37e296d4e863 | [
"MIT"
] | 1 | 2019-09-11T10:39:59.000Z | 2019-09-11T10:39:59.000Z | rent/rent/forms.py | ahmedsadman/house-rent-service | b2054f67e61e81153b8b2d78613b37e296d4e863 | [
"MIT"
] | null | null | null | rent/rent/forms.py | ahmedsadman/house-rent-service | b2054f67e61e81153b8b2d78613b37e296d4e863 | [
"MIT"
] | null | null | null | from django import forms
from posts.models import District, Area
class SearchForm(forms.Form):
district = forms.ModelChoiceField(queryset=District.objects.all(
), widget=forms.Select(attrs={'id': 'district_choice'}))
area = forms.ModelChoiceField(required=False, queryset=Area.objects.all(
), widget=forms.Select(attrs={'id': 'area_choice'}))
family_allowed = forms.BooleanField(required=False)
office_allowed = forms.BooleanField(required=False)
bachelors_allowed = forms.BooleanField(required=False)
| 40.923077 | 76 | 0.755639 | 62 | 532 | 6.403226 | 0.435484 | 0.130982 | 0.18136 | 0.241814 | 0.450882 | 0.171285 | 0.171285 | 0 | 0 | 0 | 0 | 0 | 0.118421 | 532 | 12 | 77 | 44.333333 | 0.846482 | 0 | 0 | 0 | 0 | 0 | 0.056391 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
2a517b58e71273f992cffda3b861cf923d54767b | 1,771 | py | Python | solutions/dcp367/test_dcp367.py | hiimalexjgarcia/dailycodingproblem | 5c70dc86ec98821a552cb411cf97fa43c9fde638 | [
"MIT"
] | null | null | null | solutions/dcp367/test_dcp367.py | hiimalexjgarcia/dailycodingproblem | 5c70dc86ec98821a552cb411cf97fa43c9fde638 | [
"MIT"
] | 1 | 2021-04-08T03:23:05.000Z | 2021-04-08T03:23:05.000Z | solutions/dcp367/test_dcp367.py | hiimalexjgarcia/dailycodingproblem | 5c70dc86ec98821a552cb411cf97fa43c9fde638 | [
"MIT"
] | null | null | null | #
# Daily Coding Problem: Problem #367 [Medium]
#
# Good morning! Here's your coding interview problem for today.
#
# This problem was asked by Two Sigma.
#
# Given two sorted iterators, merge it into one iterator.
#
# For example, given these two iterators:
#
# foo = iter([5, 10, 15])
# bar = iter([3, 8, 9])
#
# You should be able to do:
#
# for num in merge_iterators(foo, bar):
# print(num)
#
# # 3
# # 5
# # 8
# # 9
# # 10
# # 15
#
# Bonus: Make it work without pulling in the contents of the iterators in memory.
#
import unittest
import dcp367
class TestDcp367(unittest.TestCase):
def test_merge_iterator_exists(self):
self.assertEqual('merge_iterator' in dir(dcp367), True)
def test_merge_iterator_basic(self):
foo = iter([5, 10, 15])
bar = iter([3, 8, 9])
merge_iterator = dcp367.merge_iterator
mi = merge_iterator(foo, bar)
self.assertEqual(next(mi), 3)
self.assertEqual(next(mi), 5)
self.assertEqual(next(mi), 8)
self.assertEqual(next(mi), 9)
self.assertEqual(next(mi), 10)
self.assertEqual(next(mi), 15)
self.assertRaises(StopIteration, next, mi)
def test_merge_iterator_custom(self):
foo = iter([1, 2, 4])
bar = iter([3, 4, 5, 9, 20])
merge_iterator = dcp367.merge_iterator
mi = merge_iterator(foo, bar)
self.assertEqual(next(mi), 1)
self.assertEqual(next(mi), 2)
self.assertEqual(next(mi), 3)
self.assertEqual(next(mi), 4)
self.assertEqual(next(mi), 4)
self.assertEqual(next(mi), 5)
self.assertEqual(next(mi), 9)
self.assertEqual(next(mi), 20)
self.assertRaises(StopIteration, next, mi)
if __name__ == '__main__':
unittest.main()
| 26.044118 | 81 | 0.625071 | 244 | 1,771 | 4.434426 | 0.336066 | 0.088725 | 0.245841 | 0.271719 | 0.443623 | 0.378928 | 0.378928 | 0.378928 | 0.378928 | 0.177449 | 0 | 0.050708 | 0.242801 | 1,771 | 67 | 82 | 26.432836 | 0.756152 | 0.26087 | 0 | 0.424242 | 0 | 0 | 0.017282 | 0 | 0 | 0 | 0 | 0 | 0.515152 | 1 | 0.090909 | false | 0 | 0.060606 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2a5f66fb7bc72f469e5a9d4125ceaa357bf6e2ab | 316 | py | Python | qr_code_service/appengine_config.py | stanwood/stanwood-services | a9a3afcb10c94877b656bbf48994e74560ab0166 | [
"MIT"
] | null | null | null | qr_code_service/appengine_config.py | stanwood/stanwood-services | a9a3afcb10c94877b656bbf48994e74560ab0166 | [
"MIT"
] | 8 | 2019-12-26T17:33:37.000Z | 2022-03-21T22:17:52.000Z | qr_code_service/appengine_config.py | stanwood/stanwood-services | a9a3afcb10c94877b656bbf48994e74560ab0166 | [
"MIT"
] | 1 | 2019-02-14T13:43:36.000Z | 2019-02-14T13:43:36.000Z | import os
from google.appengine.ext import vendor
# Third-party libraries are stored in "ext", vendoring will make
# sure that they are importable by the application.
vendor.add(os.path.join(os.path.dirname(__file__), 'ext'))
import requests
from requests_toolbelt.adapters import appengine
appengine.monkeypatch() | 31.6 | 64 | 0.803797 | 46 | 316 | 5.413043 | 0.695652 | 0.072289 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.110759 | 316 | 10 | 65 | 31.6 | 0.886121 | 0.35443 | 0 | 0 | 0 | 0 | 0.014851 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.666667 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
2a6d809b71bda74dfb1163170b6005a475a3148b | 3,750 | py | Python | test_pyqueued.py | miku/pyqueued | 30156dae682a07418b116f1d67430325e998e769 | [
"MIT"
] | 1 | 2015-05-11T08:06:09.000Z | 2015-05-11T08:06:09.000Z | test_pyqueued.py | miku/pyqueued | 30156dae682a07418b116f1d67430325e998e769 | [
"MIT"
] | null | null | null | test_pyqueued.py | miku/pyqueued | 30156dae682a07418b116f1d67430325e998e769 | [
"MIT"
] | null | null | null | # coding: utf-8
import pyqueued
import random
import requests
import time
import unittest
def random_queue_name():
return "test_pyqueued_%d" % random.randint(0, 99999999)
class TestClient(unittest.TestCase):
def test_init(self):
c = pyqueued.Client()
self.assertTrue(c is not None)
def test_enqueue(self):
Q = random_queue_name()
c = pyqueued.Client()
location = c.enqueue(Q, "Hello")
self.assertTrue(location.startswith(c.queue_url(Q)))
_, _ = c.dequeue(Q)
self.assertEquals(c.stats(Q), {u'timeouts': 0, u'depth': 0, u'enqueued': 1, u'dequeued': 1})
def test_dequeue(self):
Q = random_queue_name()
c = pyqueued.Client()
c.enqueue(Q, "Hello")
msg, location = c.dequeue(Q)
self.assertEquals(msg, "Hello")
self.assertTrue(location.startswith(c.queue_url(Q)))
def test_dequeue_timeout(self):
Q = random_queue_name()
c = pyqueued.Client()
c.enqueue(Q, "Hello")
msg, location = c.dequeue(Q, timeout=1)
self.assertEquals(msg, "Hello")
self.assertTrue(location.startswith(c.queue_url(Q)))
id = location.split('/')[-1]
self.assertEquals(c.stats(Q), {u'timeouts': 0, u'depth': 0, u'enqueued': 1, u'dequeued': 1})
c.complete(Q, id)
self.assertEquals(c.stats(Q), {u'timeouts': 0, u'depth': 0, u'enqueued': 1, u'dequeued': 1})
def test_dequeue_timeout_expire(self):
Q = random_queue_name()
c = pyqueued.Client()
c.enqueue(Q, "Hello")
msg, location = c.dequeue(Q, timeout=1)
self.assertEquals(msg, "Hello")
self.assertTrue(location.startswith(c.queue_url(Q)))
id = location.split('/')[-1]
self.assertEquals(c.stats(Q), {u'timeouts': 0, u'depth': 0, u'enqueued': 1, u'dequeued': 1})
time.sleep(1.1)
self.assertEquals(c.stats(Q), {u'timeouts': 1, u'depth': 1, u'enqueued': 2, u'dequeued': 1})
def test_dequeue_wait(self):
Q = random_queue_name()
c = pyqueued.Client()
with self.assertRaises(RuntimeError):
msg, location = c.dequeue(Q, wait=0.2)
def test_get_requests(self):
Q = random_queue_name()
c = pyqueued.Client()
location = c.enqueue(Q, "Hello")
r = requests.get(location)
self.assertEquals(r.status_code, 200)
self.assertEquals(r.text, "Hello")
def test_get(self):
Q = random_queue_name()
c = pyqueued.Client()
location = c.enqueue(Q, "Hello")
id = location.split('/')[-1]
self.assertEquals(c.get(Q, id), "Hello")
def test_complete_by_url(self):
Q = random_queue_name()
c = pyqueued.Client()
location = c.enqueue(Q, "Hello")
msg, location = c.dequeue(Q)
with self.assertRaises(RuntimeError):
c.complete_by_url(location)
def test_complete_by_url_mismatch(self):
Q = random_queue_name()
c = pyqueued.Client()
location = c.enqueue(Q, "Hello")
c.dequeue(Q, timeout=1)
with self.assertRaises(RuntimeError):
c.complete_by_url('http://localhost:1111/q/123')
def test_complete_by_url_bad_input(self):
Q = random_queue_name()
c = pyqueued.Client()
location = c.enqueue(Q, "Hello")
c.dequeue(Q, timeout=1)
with self.assertRaises(ValueError):
c.complete_by_url('http://localhost:1111/q')
def test_complete(self):
Q = random_queue_name()
c = pyqueued.Client()
location = c.enqueue(Q, "Hello")
msg, location = c.dequeue(Q)
with self.assertRaises(RuntimeError):
c.complete(*location.split('/')[-2:])
| 34.090909 | 100 | 0.5992 | 492 | 3,750 | 4.434959 | 0.144309 | 0.053621 | 0.082493 | 0.08066 | 0.757562 | 0.716774 | 0.705775 | 0.690651 | 0.622365 | 0.603116 | 0 | 0.02 | 0.253333 | 3,750 | 109 | 101 | 34.40367 | 0.759286 | 0.003467 | 0 | 0.623656 | 0 | 0 | 0.077644 | 0 | 0 | 0 | 0 | 0 | 0.225806 | 1 | 0.139785 | false | 0 | 0.053763 | 0.010753 | 0.215054 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2a77bc03c23c3e4bdf7a744a26aaaa0f08da2174 | 1,479 | py | Python | src/python/doufo/collections/composite.py | Hong-Xiang/doufo | 3d375fef30670597768a6eef809b75b4b1b5a3fd | [
"Apache-2.0"
] | 3 | 2018-08-05T07:16:34.000Z | 2018-08-10T05:28:24.000Z | src/python/doufo/collections/composite.py | tech-pi/doufo | 3d375fef30670597768a6eef809b75b4b1b5a3fd | [
"Apache-2.0"
] | 10 | 2018-09-16T15:44:19.000Z | 2018-10-06T10:39:59.000Z | src/python/doufo/collections/composite.py | tech-pi/doufo | 3d375fef30670597768a6eef809b75b4b1b5a3fd | [
"Apache-2.0"
] | 1 | 2018-08-04T08:13:50.000Z | 2018-08-04T08:13:50.000Z | """
Objective:
Lazy "concatenated" lists/table or other Sequence[T], thus combining
multiple sequences without actually concatenating them.
"""
from doufo import Functor, Monoid, List
from typing import Sequence, TypeVar, Callable
from itertools import chain
T = TypeVar('T')
B = TypeVar('B')
class CompositeSequence(Sequence[T], Functor[T], Monoid[T]):
"""
Virtual concatenated sequence, for used in some high-cost concatenate, like merging multiple HDF5 files into
one "virtual" table.
"""
def __init__(self, sources: List[Sequence[T]]):
self.sources = List(sources)
def __getitem__(self, s):
id_source, s = index_and_new_slice(self.sources, s)
return self.sources[id_source][s]
def __iter__(self):
return chain(*self.unbox())
def __len__(self):
return sum(map(len, self.unbox()))
def unbox(self):
return self.sources
def extend(self, x: 'Monoid[T]'):
return CompositeSequence(List(self.sources).extend([x]))
def fmap(self, f: Callable[[T], B]):
return CompositeSequence(self.sources.fmap(lambda s: s.fmap(f)))
def index_and_new_slice(source, s):
if isinstance(s, int):
acc, idx = 0, 0
while acc < s:
if acc + len(source[idx]) > s:
break
acc += len(source[idx])
idx += 1
return idx, s - acc
raise TypeError("slice is not supported yet, getitem is works with int only.")
| 27.388889 | 112 | 0.636241 | 197 | 1,479 | 4.654822 | 0.436548 | 0.083969 | 0.032715 | 0.034896 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.003575 | 0.243408 | 1,479 | 53 | 113 | 27.90566 | 0.815907 | 0.180527 | 0 | 0 | 0 | 0 | 0.059122 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.258065 | false | 0 | 0.096774 | 0.16129 | 0.612903 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
2a8b20e98f264c8d0fbe480372459477d7caf58c | 634 | py | Python | pydashlite/collections/head.py | glowlex/pydashlite | cbc96478fa610aeae95b5584b406aa0c35b89db1 | [
"MIT"
] | null | null | null | pydashlite/collections/head.py | glowlex/pydashlite | cbc96478fa610aeae95b5584b406aa0c35b89db1 | [
"MIT"
] | null | null | null | pydashlite/collections/head.py | glowlex/pydashlite | cbc96478fa610aeae95b5584b406aa0c35b89db1 | [
"MIT"
] | null | null | null | from typing import Any, Iterable, TypeVar, Union, overload, KeysView, Optional, Dict
T = TypeVar('T')
Y = TypeVar('Y')
@overload
def head(iterable: KeysView[T], default: Y) -> Union[T, Y]:
...
@overload
def head(iterable: Iterable[T], default: Y) -> Union[T, Y]:
...
@overload
def head(iterable: KeysView[T], default=None) -> Optional[T]:
...
@overload
def head(iterable: Iterable[T], default=None) -> Optional[T]:
...
def head(iterable: Union[Iterable[T], Dict[T, Any]], default: Y = None) -> Union[Optional[T], Y]:
try:
return next(iter(iterable), default)
except:
return default
| 19.212121 | 97 | 0.62776 | 84 | 634 | 4.738095 | 0.261905 | 0.08794 | 0.188442 | 0.231156 | 0.5 | 0.434673 | 0.434673 | 0.316583 | 0.19598 | 0.19598 | 0 | 0 | 0.195584 | 634 | 32 | 98 | 19.8125 | 0.780392 | 0 | 0 | 0.4 | 0 | 0 | 0.003155 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.05 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2a91d2a470d3a566a36a8ddcc755241dad3f1939 | 165 | py | Python | Desafios/Desafio 1.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | 2 | 2021-02-06T04:35:44.000Z | 2021-02-08T02:37:33.000Z | Desafios/Desafio 1.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | null | null | null | Desafios/Desafio 1.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | null | null | null | # Desafio 1
n1 = float(input('Digite um número!! '))
n2 = float(input('Agora outro!!! '))
s = int( n1 / n2 )
print('A divisão entre {} e {} é {}'.format(n1, n2, s)) | 27.5 | 55 | 0.575758 | 27 | 165 | 3.518519 | 0.740741 | 0.210526 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052239 | 0.187879 | 165 | 6 | 55 | 27.5 | 0.656716 | 0.054545 | 0 | 0 | 0 | 0 | 0.4 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.25 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
aa72d3d1483141392d7c230d27352e96cfc81293 | 143 | py | Python | 26.Mayor10TripleValor.py | JDKdevStudio/Taller30Abril | fe8094b6669899aae50154a6d380ce583531699a | [
"CC0-1.0"
] | null | null | null | 26.Mayor10TripleValor.py | JDKdevStudio/Taller30Abril | fe8094b6669899aae50154a6d380ce583531699a | [
"CC0-1.0"
] | null | null | null | 26.Mayor10TripleValor.py | JDKdevStudio/Taller30Abril | fe8094b6669899aae50154a6d380ce583531699a | [
"CC0-1.0"
] | null | null | null | numero = int(input("Introduzca el numero= "))
if numero >= 10:
numero *= 3
print(numero)
else:
numero *=4
print(numero)
| 17.875 | 46 | 0.573427 | 18 | 143 | 4.555556 | 0.611111 | 0.268293 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.039216 | 0.286713 | 143 | 7 | 47 | 20.428571 | 0.764706 | 0 | 0 | 0.285714 | 0 | 0 | 0.161765 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.285714 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
aa809ddac91ed2debaf2e80711fd70e8db57e6bf | 22 | py | Python | utils/__init__.py | JyothibabuAmudala/test | ed8749a7356d127c772b69152da46d629dc2accc | [
"MIT"
] | null | null | null | utils/__init__.py | JyothibabuAmudala/test | ed8749a7356d127c772b69152da46d629dc2accc | [
"MIT"
] | null | null | null | utils/__init__.py | JyothibabuAmudala/test | ed8749a7356d127c772b69152da46d629dc2accc | [
"MIT"
] | null | null | null | __author__ = 'ruddra'
| 11 | 21 | 0.727273 | 2 | 22 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 22 | 1 | 22 | 22 | 0.631579 | 0 | 0 | 0 | 0 | 0 | 0.272727 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
aa91ee1ba9d24bdd74e90859a0911d87a504b368 | 143 | py | Python | xtdate_utils/__init__.py | mxtadmin/xtdate-utils | 779160b8da601b4a2a89239e6b243bf7cd1ffba0 | [
"MIT"
] | null | null | null | xtdate_utils/__init__.py | mxtadmin/xtdate-utils | 779160b8da601b4a2a89239e6b243bf7cd1ffba0 | [
"MIT"
] | null | null | null | xtdate_utils/__init__.py | mxtadmin/xtdate-utils | 779160b8da601b4a2a89239e6b243bf7cd1ffba0 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding:utf-8 -*-
# @Author : mao
from xtdate_utils.xtdate_utils import TimeUtils
__all__ = [
"TimeUtils",
]
| 14.3 | 47 | 0.65035 | 18 | 143 | 4.833333 | 0.833333 | 0.252874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008547 | 0.181818 | 143 | 9 | 48 | 15.888889 | 0.735043 | 0.384615 | 0 | 0 | 0 | 0 | 0.107143 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
aa942fc1cbd85078be78e85e297952ab9a5a478b | 2,367 | py | Python | list/migrations/0001_initial.py | haochengz/wvote | 7e7a909bd4aa90750cb79bbcabdb328e70cf3744 | [
"MIT"
] | null | null | null | list/migrations/0001_initial.py | haochengz/wvote | 7e7a909bd4aa90750cb79bbcabdb328e70cf3744 | [
"MIT"
] | null | null | null | list/migrations/0001_initial.py | haochengz/wvote | 7e7a909bd4aa90750cb79bbcabdb328e70cf3744 | [
"MIT"
] | null | null | null | # Generated by Django 2.0.2 on 2018-05-22 17:12
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='EventModel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=20)),
('desc', models.CharField(max_length=200)),
('start_date', models.DateField(max_length=30)),
('end_date', models.DateField(max_length=30)),
('add_time', models.DateField(max_length=30)),
],
),
migrations.CreateModel(
name='PicsModel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=20)),
('file', models.FileField(upload_to='')),
('add_time', models.DateField(max_length=30)),
],
),
migrations.CreateModel(
name='PlayerModel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=20)),
('desc', models.CharField(max_length=200)),
('add_time', models.DateField(max_length=30)),
('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='list.EventModel')),
],
),
migrations.CreateModel(
name='VoteModel',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('voter', models.CharField(max_length=20)),
('add_time', models.DateField(max_length=30)),
('player', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='list.PlayerModel')),
],
),
migrations.AddField(
model_name='picsmodel',
name='owner',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='list.PlayerModel'),
),
]
| 39.45 | 114 | 0.562738 | 236 | 2,367 | 5.495763 | 0.283898 | 0.083269 | 0.083269 | 0.111025 | 0.720894 | 0.700848 | 0.654588 | 0.603701 | 0.603701 | 0.603701 | 0 | 0.024536 | 0.294043 | 2,367 | 59 | 115 | 40.118644 | 0.751646 | 0.019011 | 0 | 0.576923 | 1 | 0 | 0.088793 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.038462 | 0 | 0.115385 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
aa9ef9eaef0079e0a77c606a805f2198a7fcb61d | 1,099 | py | Python | sahara/api/v2/job_types.py | ksshanam/sahara | 0d259f7a71447cd0cefe4f11184cc2ee335f4e33 | [
"Apache-2.0"
] | null | null | null | sahara/api/v2/job_types.py | ksshanam/sahara | 0d259f7a71447cd0cefe4f11184cc2ee335f4e33 | [
"Apache-2.0"
] | 1 | 2020-10-06T07:50:12.000Z | 2020-10-06T07:50:12.000Z | sahara/api/v2/job_types.py | ksshanam/sahara | 0d259f7a71447cd0cefe4f11184cc2ee335f4e33 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Red Hat, Inc.
#
# 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 sahara.api import acl
from sahara.service.api.v2 import job_types as api
import sahara.utils.api as u
rest = u.RestV2('job-types', __name__)
@rest.get('/job-types')
@acl.enforce("data-processing:job-types:get_all")
def job_types_get():
# We want to use flat=False with to_dict() so that
# the value of each arg is given as a list. This supports
# filters of the form ?type=Pig&type=Java, etc.
return u.render(job_types=api.get_job_types(
**u.get_request_args().to_dict(flat=False)))
| 34.34375 | 69 | 0.735214 | 184 | 1,099 | 4.309783 | 0.586957 | 0.070618 | 0.032787 | 0.040353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.010941 | 0.168335 | 1,099 | 31 | 70 | 35.451613 | 0.856674 | 0.640582 | 0 | 0 | 0 | 0 | 0.137931 | 0.087533 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0.333333 | 0.111111 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 3 |
aad754e209e80c69eaa686f0494e6614197c13b0 | 204 | py | Python | mmic_mda/__init__.py | MolSSI/mmic_mda | a412a2c96b445c0e584d9c3cc4d636e8b0214fbc | [
"BSD-3-Clause"
] | null | null | null | mmic_mda/__init__.py | MolSSI/mmic_mda | a412a2c96b445c0e584d9c3cc4d636e8b0214fbc | [
"BSD-3-Clause"
] | 2 | 2021-02-16T20:23:44.000Z | 2021-03-30T00:43:42.000Z | mmic_mda/__init__.py | MolSSI/mmic_mda | a412a2c96b445c0e584d9c3cc4d636e8b0214fbc | [
"BSD-3-Clause"
] | 2 | 2021-04-09T23:05:52.000Z | 2021-11-05T19:50:04.000Z | """
mmic_mda
A short description of the project.
"""
# Add imports here
from . import components, models
from .mmic_mda import *
_classes_map = {"Molecule": models.MdaMol, "Trajectory": models.MdaTraj}
| 18.545455 | 72 | 0.735294 | 27 | 204 | 5.407407 | 0.777778 | 0.09589 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.147059 | 204 | 10 | 73 | 20.4 | 0.83908 | 0.303922 | 0 | 0 | 0 | 0 | 0.134328 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.666667 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
aae498ddcdeee69f93d815f7648d5123929964ce | 747 | py | Python | Chapter13/pythonlog.py | VinushaVemuri/learn | 077349d34063b49af24de4ffeb654ecf729ddb65 | [
"MIT"
] | 185 | 2020-10-23T18:08:21.000Z | 2022-03-28T12:08:11.000Z | Chapter13/pythonlog.py | VinushaVemuri/learn | 077349d34063b49af24de4ffeb654ecf729ddb65 | [
"MIT"
] | 2 | 2021-01-30T13:28:47.000Z | 2021-12-11T14:13:12.000Z | Chapter13/pythonlog.py | VinushaVemuri/learn | 077349d34063b49af24de4ffeb654ecf729ddb65 | [
"MIT"
] | 103 | 2020-10-26T13:12:56.000Z | 2022-03-29T16:53:45.000Z | import logging
logging.basicConfig(level=0,filename='python-log.log', filemode='w', format='%(levelname)s - %(message)s')
logging.debug('Attempted to divide by zero')
logging.warning('User left field blank in the form')
logging.error("Couldn't find specified file")
# > DEBUG - Attempted to divide by zero
# > WARNING - User left field blank in the form
# > ERROR - Couldn't find specified file
logging.basicConfig(level=0,filename='python-log.log', filemode='w', format='%(asctime)s - %(levelname)s - %(message)s')
logging.info('Something happened')
logging.info('Something else happened, and it was bad')
# > 2020-06-21 10:55:40,278 - INFO - Something happened
# > 2020-06-21 10:55:40,278 - INFO - Something else happened, and it was bad
| 35.571429 | 120 | 0.722892 | 115 | 747 | 4.695652 | 0.434783 | 0.096296 | 0.085185 | 0.088889 | 0.868519 | 0.775926 | 0.564815 | 0.564815 | 0.32963 | 0.218519 | 0 | 0.055385 | 0.129853 | 747 | 20 | 121 | 37.35 | 0.775385 | 0.336011 | 0 | 0 | 0 | 0 | 0.496933 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.125 | 0 | 0.125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2ab2819e05accbf8e1aa25cf5065851ec9a0e372 | 102 | py | Python | src/interfaces/python/opengm/opengmcore/dtypes.py | burcin/opengm | a1b21eecb93c6c5a7b11ab312d26b1c98c55ff41 | [
"MIT"
] | 318 | 2015-01-07T15:22:02.000Z | 2022-01-22T10:10:29.000Z | src/interfaces/python/opengm/opengmcore/dtypes.py | burcin/opengm | a1b21eecb93c6c5a7b11ab312d26b1c98c55ff41 | [
"MIT"
] | 89 | 2015-03-24T14:33:01.000Z | 2020-07-10T13:59:13.000Z | src/interfaces/python/opengm/opengmcore/dtypes.py | burcin/opengm | a1b21eecb93c6c5a7b11ab312d26b1c98c55ff41 | [
"MIT"
] | 119 | 2015-01-13T08:35:03.000Z | 2022-03-01T01:49:08.000Z | from numpy import uint64,uint64,float64
index_type = uint64
label_type = uint64
value_type = float64
| 17 | 39 | 0.813725 | 15 | 102 | 5.333333 | 0.6 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.136364 | 0.137255 | 102 | 5 | 40 | 20.4 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2abcc6e5c1c572096ea2db886854b576b7fd5bf0 | 484 | py | Python | Python/isPrimeNumber.py | PushpneetSingh/Hello-world | def0f44737e02fb40063cd347e93e456658e2532 | [
"MIT"
] | 1,428 | 2018-10-03T15:15:17.000Z | 2019-03-31T18:38:36.000Z | Python/isPrimeNumber.py | PushpneetSingh/Hello-world | def0f44737e02fb40063cd347e93e456658e2532 | [
"MIT"
] | 1,162 | 2018-10-03T15:05:49.000Z | 2018-10-18T14:17:52.000Z | Python/isPrimeNumber.py | PushpneetSingh/Hello-world | def0f44737e02fb40063cd347e93e456658e2532 | [
"MIT"
] | 3,909 | 2018-10-03T15:07:19.000Z | 2019-03-31T18:39:08.000Z | def isPrime(n):
# 1 is not a prime number by definition
if n < 2:
return False
return sum(d for d in xrange(2, n) if n % d == 0) == 0
def UnitTests():
assert isPrime(1) == False
assert isPrime(2) == True
assert isPrime(3) == True
assert isPrime(4) == False
assert isPrime(13) == True
assert isPrime(23) == True
assert isPrime(30011) == True
assert isPrime(1009) == True
assert isPrime(17 * 19) == False
assert isPrime(16) == False
assert isPrime(101)
UnitTests()
| 22 | 55 | 0.661157 | 77 | 484 | 4.155844 | 0.441558 | 0.446875 | 0.31875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.080729 | 0.206612 | 484 | 21 | 56 | 23.047619 | 0.752604 | 0.076446 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.647059 | 1 | 0.117647 | false | 0 | 0 | 0 | 0.235294 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2ae92f194d6333af24855367620993f48d11df97 | 1,943 | py | Python | tests/test_is_ip_v4.py | alvistack/daveoncode-python-string-utils | 78929d88d90b1f90cb4837528ed955166bf0f559 | [
"MIT"
] | 3 | 2020-08-20T10:27:13.000Z | 2021-11-02T20:28:16.000Z | tests/test_is_ip_v4.py | alvistack/daveoncode-python-string-utils | 78929d88d90b1f90cb4837528ed955166bf0f559 | [
"MIT"
] | null | null | null | tests/test_is_ip_v4.py | alvistack/daveoncode-python-string-utils | 78929d88d90b1f90cb4837528ed955166bf0f559 | [
"MIT"
] | null | null | null | from unittest import TestCase
from string_utils import is_ip_v4
class IsIpV4TestCase(TestCase):
def test_return_false_for_non_string_objects(self):
# noinspection PyTypeChecker
self.assertFalse(is_ip_v4(None))
# noinspection PyTypeChecker
self.assertFalse(is_ip_v4(1))
# noinspection PyTypeChecker
self.assertFalse(is_ip_v4([]))
# noinspection PyTypeChecker
self.assertFalse(is_ip_v4({'a': 1}))
# noinspection PyTypeChecker
self.assertFalse(is_ip_v4(True))
def test_ip_cannot_be_blank(self):
self.assertFalse(is_ip_v4(''))
self.assertFalse(is_ip_v4(' '))
def test_recognize_ip_strings(self):
self.assertTrue(is_ip_v4('127.0.0.1'))
self.assertTrue(is_ip_v4('0.0.0.0'))
self.assertTrue(is_ip_v4('255.255.10.1'))
def test_returns_false_if_ipv4_out_of_range(self):
self.assertFalse(is_ip_v4('999.200.100.75'))
self.assertFalse(is_ip_v4('255.999.100.75'))
self.assertFalse(is_ip_v4('255.200.999.75'))
self.assertFalse(is_ip_v4('255.200.100.999'))
def test_ip_cannot_contain_spaces(self):
self.assertFalse(is_ip_v4(' 127.0.0.1 '))
self.assertFalse(is_ip_v4('0.0.0.0 '))
self.assertFalse(is_ip_v4(' 255.255.10.1'))
self.assertFalse(is_ip_v4('255. 255.10.1'))
def test_ip_cannot_have_multiple_dots(self):
self.assertFalse(is_ip_v4('127.0.0..1'))
self.assertFalse(is_ip_v4('0..0.0.0'))
self.assertFalse(is_ip_v4('255.255.10.1.'))
def test_numbers_cannot_be_divided_by_other_signs_in_ipv4(self):
self.assertFalse(is_ip_v4('127:0:0:1'))
self.assertFalse(is_ip_v4('127-0-0-1'))
self.assertFalse(is_ip_v4('0_0_0_0'))
self.assertFalse(is_ip_v4('255,255,10,1'))
def test_ip_v6_is_not_recognized(self):
self.assertFalse(is_ip_v4('2001:db8:85a3:0:0:8a2e:370:7334'))
| 34.087719 | 69 | 0.670612 | 306 | 1,943 | 3.928105 | 0.215686 | 0.08985 | 0.134775 | 0.363561 | 0.702163 | 0.656406 | 0.59401 | 0.479201 | 0.301165 | 0.282862 | 0 | 0.119365 | 0.189398 | 1,943 | 56 | 70 | 34.696429 | 0.64381 | 0.068966 | 0 | 0.108108 | 0 | 0 | 0.12812 | 0.017194 | 0 | 0 | 0 | 0 | 0.702703 | 1 | 0.216216 | false | 0 | 0.054054 | 0 | 0.297297 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2aedc30d70348b531ff69134841412a0fc59f4cc | 2,277 | py | Python | src/pyrin/utils/exceptions.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/pyrin/utils/exceptions.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | src/pyrin/utils/exceptions.py | wilsonGmn/pyrin | 25dbe3ce17e80a43eee7cfc7140b4c268a6948e0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
utils exceptions module.
"""
from pyrin.core.exceptions import CoreException, CoreBusinessException
class UtilsException(CoreException):
"""
utils exception.
"""
pass
class UtilsBusinessException(CoreBusinessException, UtilsException):
"""
utils business exception.
"""
pass
class InputNotCallableError(UtilsException):
"""
input not callable error.
"""
pass
class ConfigurationFileNotFoundError(UtilsException):
"""
configuration file not found error.
"""
pass
class InvalidSchemaNameError(UtilsException):
"""
invalid schema name error.
"""
pass
class InvalidTableNameError(UtilsException):
"""
invalid table name error.
"""
pass
class InvalidColumnNameError(UtilsException):
"""
invalid column name error.
"""
pass
class InvalidRowResultFieldsAndValuesError(UtilsException):
"""
invalid row result fields and values error.
"""
pass
class FieldsAndValuesCountMismatchError(UtilsException):
"""
fields and values count mismatch error.
"""
pass
class DictKeyPrefixIsNotProvidedError(UtilsException):
"""
dict key prefix is not provided error.
"""
pass
class PathIsNotAbsoluteError(UtilsBusinessException):
"""
path is not absolute error.
"""
pass
class PathAlreadyExistedError(UtilsBusinessException):
"""
path already existed error.
"""
pass
class InvalidPathError(UtilsBusinessException):
"""
invalid path error.
"""
pass
class PathNotExistedError(UtilsBusinessException):
"""
path not existed error.
"""
pass
class IsNotDirectoryError(UtilsBusinessException):
"""
is not directory error.
"""
pass
class IsNotFileError(UtilsBusinessException):
"""
is not file error.
"""
pass
class CheckConstraintValuesRequiredError(UtilsException):
"""
check constraint values required error.
"""
pass
class MultipleDeclarativeClassesFoundError(UtilsException):
"""
multiple declarative classes found error.
"""
pass
class InvalidOrderingColumnError(UtilsBusinessException):
"""
invalid ordering column error.
"""
pass
| 16.264286 | 70 | 0.671498 | 174 | 2,277 | 8.787356 | 0.408046 | 0.105952 | 0.146501 | 0.035317 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.000575 | 0.236276 | 2,277 | 139 | 71 | 16.381295 | 0.878666 | 0.268336 | 0 | 0.487179 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0.487179 | 0.025641 | 0 | 0.512821 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
630c5ca4e1c7b02f3067e4efdcbe76d98ebd2c36 | 361 | py | Python | done/18-2-python-ds-practice/10_frequency.py | demohack/yute | 2fb136118733394e3595bf707cb32f1b7b2aede0 | [
"MIT"
] | null | null | null | done/18-2-python-ds-practice/10_frequency.py | demohack/yute | 2fb136118733394e3595bf707cb32f1b7b2aede0 | [
"MIT"
] | 17 | 2021-03-24T14:59:50.000Z | 2022-03-05T23:52:31.000Z | done/18-2-python-ds-practice/10_frequency.py | demohack/yute | 2fb136118733394e3595bf707cb32f1b7b2aede0 | [
"MIT"
] | null | null | null | def frequency(lst, search_term):
"""Return frequency of term in lst.
>>> frequency([1, 4, 3, 4, 4], 4)
3
>>> frequency([1, 4, 3], 7)
0
"""
d = {}
for x in lst:
if x in d:
d[x] = d[x] + 1
else:
d[x] = 1
if search_term in d:
return d[search_term]
return 0
| 18.05 | 41 | 0.418283 | 54 | 361 | 2.740741 | 0.333333 | 0.202703 | 0.216216 | 0.162162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.074257 | 0.440443 | 361 | 19 | 42 | 19 | 0.658416 | 0.277008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.1 | false | 0 | 0 | 0 | 0.3 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2d4b676d2044d81e9fad7b128d20dcfe0824b079 | 2,064 | py | Python | src/cube2common/bvec.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | 1 | 2020-03-23T20:28:06.000Z | 2020-03-23T20:28:06.000Z | src/cube2common/bvec.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | 1 | 2022-02-05T16:59:53.000Z | 2022-02-08T17:30:55.000Z | src/cube2common/bvec.py | DanSeraf/spyd | af893b7f9c67785613b25754eb2cf150523a9fe4 | [
"Zlib"
] | null | null | null | from cube2common.vec import vec
def uchar(val):
return val&0xFF
class bvec(object):
def __init__(self, *args):
self.v = bytearray(3)
if len(args) == 1 and isinstance(args[0], vec):
v = args[0]
self.x = uchar((v.x+1)*255/2)
self.y = uchar((v.y+1)*255/2)
self.z = uchar((v.z+1)*255/2)
elif len(args) == 3:
self.v = bytearray(args)
def __repr__(self):
return "<vec: {x}, {y}, {z}>".format(x=self.x, y=self.y, z=self.z)
def copy(self):
return vec(self.x, self.y, self.z)
def __eq__(self, other):
if isinstance(other, bvec):
return self.x == other.x and self.y == other.y and self.z == other.z
else:
return False
def __ne__(self, other):
if isinstance(other, bvec):
return self.x != other.x or self.y != other.y or self.z != other.z
else:
return False
def __getitem__(self, index):
return self.v[index]
def __setitem__(self, index, value):
self.v[index] = value
@property
def x(self):
return self.v[0]
@x.setter
def x(self, value):
self.v[0] = value
@property
def y(self):
return self.v[1]
@y.setter
def y(self, value):
self.v[1] = value
@property
def z(self):
return self.v[2]
@z.setter
def z(self, value):
self.v[2] = value
@property
def r(self):
return self.v[0]
@r.setter
def r(self, value):
self.v[0] = value
@property
def g(self):
return self.v[1]
@g.setter
def g(self, value):
self.v[1] = value
@property
def b(self):
return self.v[2]
@b.setter
def b(self, value):
self.v[2] = value
def iszero(self):
return self.x == 0 and self.y == 0 and self.z == 0
| 21.5 | 80 | 0.474322 | 287 | 2,064 | 3.327526 | 0.170732 | 0.08377 | 0.080628 | 0.094241 | 0.431414 | 0.33089 | 0.289005 | 0.289005 | 0.098429 | 0.098429 | 0 | 0.029435 | 0.390988 | 2,064 | 95 | 81 | 21.726316 | 0.73031 | 0 | 0 | 0.347826 | 0 | 0 | 0.009695 | 0 | 0 | 0 | 0.001939 | 0 | 0 | 1 | 0.304348 | false | 0 | 0.014493 | 0.15942 | 0.550725 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
2d54582755db17f5c496589fbadef8653adece51 | 221 | py | Python | src/thenewboston/third_party/factory/utils.py | achalpatel/thenewboston-python | 4044ce07cb5e0d1f92b4332bbd8c6ac8f33bcdb9 | [
"MIT"
] | 122 | 2020-07-12T23:08:49.000Z | 2021-12-18T16:14:10.000Z | src/thenewboston/third_party/factory/utils.py | achalpatel/thenewboston-python | 4044ce07cb5e0d1f92b4332bbd8c6ac8f33bcdb9 | [
"MIT"
] | 47 | 2020-07-15T02:18:09.000Z | 2021-09-22T19:51:59.000Z | src/thenewboston/third_party/factory/utils.py | achalpatel/thenewboston-python | 4044ce07cb5e0d1f92b4332bbd8c6ac8f33bcdb9 | [
"MIT"
] | 52 | 2020-07-13T10:49:52.000Z | 2021-10-30T03:34:55.000Z | import factory
def build_json(factory_class, **kwargs):
"""Build json representation for object using factory."""
return factory.build(
dict,
FACTORY_CLASS=factory_class,
**kwargs,
)
| 20.090909 | 61 | 0.647059 | 24 | 221 | 5.791667 | 0.541667 | 0.258993 | 0.258993 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.253394 | 221 | 10 | 62 | 22.1 | 0.842424 | 0.230769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.142857 | 0 | 0.428571 | 0 | 1 | 0 | 0 | null | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2d85b59adfe741de18b948f9ef4ab0b034c0cd7a | 6,692 | py | Python | src/genie/libs/parser/iosxe/tests/ShowBridgeDomain/cli/equal/golden_output_bridge_domain_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 204 | 2018-06-27T00:55:27.000Z | 2022-03-06T21:12:18.000Z | src/genie/libs/parser/iosxe/tests/ShowBridgeDomain/cli/equal/golden_output_bridge_domain_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 468 | 2018-06-19T00:33:18.000Z | 2022-03-31T23:23:35.000Z | src/genie/libs/parser/iosxe/tests/ShowBridgeDomain/cli/equal/golden_output_bridge_domain_expected.py | balmasea/genieparser | d1e71a96dfb081e0a8591707b9d4872decd5d9d3 | [
"Apache-2.0"
] | 309 | 2019-01-16T20:21:07.000Z | 2022-03-30T12:56:41.000Z | expected_output = {
"bridge_domain": {
3051: {
"number_of_ports_in_all": 2,
"state": "UP",
"member_ports": [
"vfi VPLS-3051 neighbor 192.168.36.220 3051",
"GigabitEthernet0/0/3 service instance 3051",
],
"mac_table": {
"GigabitEthernet0/0/3.EFP3051": {
"pseudoport": "GigabitEthernet0/0/3.EFP3051",
"mac_address": {
"0000.A0FF.0118": {
"tag": "dynamic",
"age": 3441,
"aed": 0,
"mac_address": "0000.A0FF.0118",
"policy": "forward",
},
"0000.A0FF.0077": {
"tag": "dynamic",
"age": 3426,
"aed": 0,
"mac_address": "0000.A0FF.0077",
"policy": "forward",
},
"0000.A0FF.011C": {
"tag": "dynamic",
"age": 3442,
"aed": 0,
"mac_address": "0000.A0FF.011C",
"policy": "forward",
},
"0000.A0FF.001F": {
"tag": "dynamic",
"age": 3416,
"aed": 0,
"mac_address": "0000.A0FF.001F",
"policy": "forward",
},
"0000.A0FF.0068": {
"tag": "dynamic",
"age": 3424,
"aed": 0,
"mac_address": "0000.A0FF.0068",
"policy": "forward",
},
"0000.A0FF.00C5": {
"tag": "dynamic",
"age": 3433,
"aed": 0,
"mac_address": "0000.A0FF.00C5",
"policy": "forward",
},
"0000.A0FF.0108": {
"tag": "dynamic",
"age": 3440,
"aed": 0,
"mac_address": "0000.A0FF.0108",
"policy": "forward",
},
"0000.A0FF.0010": {
"tag": "dynamic",
"age": 3415,
"aed": 0,
"mac_address": "0000.A0FF.0010",
"policy": "forward",
},
"0000.A0FF.000F": {
"tag": "dynamic",
"age": 3415,
"aed": 0,
"mac_address": "0000.A0FF.000F",
"policy": "forward",
},
"0000.A0FF.007F": {
"tag": "dynamic",
"age": 3426,
"aed": 0,
"mac_address": "0000.A0FF.007F",
"policy": "forward",
},
"0000.A0FF.007B": {
"tag": "dynamic",
"age": 3426,
"aed": 0,
"mac_address": "0000.A0FF.007B",
"policy": "forward",
},
"0000.A0FF.0087": {
"tag": "dynamic",
"age": 3427,
"aed": 0,
"mac_address": "0000.A0FF.0087",
"policy": "forward",
},
"0000.A0FF.00AA": {
"tag": "dynamic",
"age": 3430,
"aed": 0,
"mac_address": "0000.A0FF.00AA",
"policy": "forward",
},
"0000.A0FF.012C": {
"tag": "dynamic",
"age": 3443,
"aed": 0,
"mac_address": "0000.A0FF.012C",
"policy": "forward",
},
"0000.A0FF.00D0": {
"tag": "dynamic",
"age": 3434,
"aed": 0,
"mac_address": "0000.A0FF.00D0",
"policy": "forward",
},
"0000.A0FF.00F6": {
"tag": "dynamic",
"age": 3438,
"aed": 0,
"mac_address": "0000.A0FF.00F6",
"policy": "forward",
},
"0000.A0FF.00F7": {
"tag": "dynamic",
"age": 3438,
"aed": 0,
"mac_address": "0000.A0FF.00F7",
"policy": "forward",
},
"0000.A0FF.00F2": {
"tag": "dynamic",
"age": 3438,
"aed": 0,
"mac_address": "0000.A0FF.00F2",
"policy": "forward",
},
"0000.A0FF.0129": {
"tag": "dynamic",
"age": 3443,
"aed": 0,
"mac_address": "0000.A0FF.0129",
"policy": "forward",
},
},
}
},
"aging_timer": 3600,
"bd_domain_id": 3051,
"split-horizon_group": {
"0": {
"num_of_ports": "1",
"interfaces": ["GigabitEthernet0/0/3 service instance 3051"],
}
},
"mac_learning_state": "Enabled",
}
}
}
| 41.308642 | 81 | 0.249701 | 373 | 6,692 | 4.383378 | 0.225201 | 0.185933 | 0.171254 | 0.220183 | 0.424465 | 0.408563 | 0.287462 | 0.238532 | 0.238532 | 0.238532 | 0 | 0.191886 | 0.63165 | 6,692 | 161 | 82 | 41.565217 | 0.4714 | 0 | 0 | 0.416149 | 0 | 0 | 0.246414 | 0.011656 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2d86a408526bb07d12706876dcedbbfd71280eb7 | 152 | py | Python | pyckaxe/utils/default.py | Arcensoth/pyckaxe | 09ed0828d6660a233b827721454293579329991b | [
"MIT"
] | 3 | 2018-09-23T05:16:44.000Z | 2021-12-23T03:06:07.000Z | pyckaxe/utils/default.py | Arcensoth/pyckaxe | 09ed0828d6660a233b827721454293579329991b | [
"MIT"
] | 5 | 2018-07-11T02:31:56.000Z | 2018-07-11T03:15:05.000Z | pyckaxe/utils/default.py | Arcensoth/pyckaxe | 09ed0828d6660a233b827721454293579329991b | [
"MIT"
] | null | null | null | from typing import Any, cast
__all__ = ("DEFAULT",)
# Unique object that can be used as a default for nullable fields.
DEFAULT = cast(Any, object())
| 19 | 66 | 0.717105 | 23 | 152 | 4.565217 | 0.782609 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.184211 | 152 | 7 | 67 | 21.714286 | 0.846774 | 0.421053 | 0 | 0 | 0 | 0 | 0.081395 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
2d88fcc935bd14f39b74408cb426471b76aa149d | 313 | py | Python | mtproxy/utils/__init__.py | i-Naji/mtproxy | b8fe68023cf35bc6bc8e96d797f1f39304d4e5fa | [
"MIT"
] | 16 | 2019-06-21T11:26:26.000Z | 2021-03-14T08:06:36.000Z | mtproxy/utils/__init__.py | WhymustIhaveaname/mtproxy | b8fe68023cf35bc6bc8e96d797f1f39304d4e5fa | [
"MIT"
] | 2 | 2020-02-27T16:25:41.000Z | 2021-03-14T08:31:14.000Z | mtproxy/utils/__init__.py | WhymustIhaveaname/mtproxy | b8fe68023cf35bc6bc8e96d797f1f39304d4e5fa | [
"MIT"
] | 4 | 2019-06-21T15:59:56.000Z | 2021-03-17T04:54:42.000Z | from .async_tools import AsyncTools
from .user import User
from .ip_info import IPInfo
from .socket_settings import set_keepalive, set_ack_timeout, set_bufsizes
from .ext import setup_files_limit
__all__ = ['AsyncTools', 'User', 'IPInfo', 'set_keepalive', 'set_ack_timeout', 'set_bufsizes', 'setup_files_limit']
| 39.125 | 115 | 0.801917 | 45 | 313 | 5.155556 | 0.466667 | 0.103448 | 0.12931 | 0.155172 | 0.310345 | 0.310345 | 0.310345 | 0 | 0 | 0 | 0 | 0 | 0.102236 | 313 | 7 | 116 | 44.714286 | 0.825623 | 0 | 0 | 0 | 0 | 0 | 0.246006 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.833333 | 0 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
2d9748fdac3fa400b0f8b65ece06c4785477b43a | 92 | py | Python | overholt/__init__.py | prdonahue/overholt | e03209f7a059d165a9154355d090738af3159028 | [
"MIT"
] | 1,152 | 2015-01-04T16:30:17.000Z | 2022-03-27T19:50:52.000Z | overholt/__init__.py | prdonahue/overholt | e03209f7a059d165a9154355d090738af3159028 | [
"MIT"
] | 25 | 2020-07-06T08:49:08.000Z | 2021-07-27T06:15:43.000Z | overholt/__init__.py | prdonahue/overholt | e03209f7a059d165a9154355d090738af3159028 | [
"MIT"
] | 218 | 2015-01-06T20:41:52.000Z | 2022-03-25T19:07:53.000Z | # -*- coding: utf-8 -*-
"""
overholt
~~~~~~~~
overholt application package
"""
| 11.5 | 32 | 0.478261 | 7 | 92 | 6.285714 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014925 | 0.271739 | 92 | 7 | 33 | 13.142857 | 0.641791 | 0.76087 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2da6673efc09c78028b8fa2cfc84c380ff8cde13 | 7,438 | py | Python | dpa/product/version/__init__.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 55 | 2015-07-15T02:33:55.000Z | 2020-12-28T08:02:54.000Z | dpa/product/version/__init__.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 5 | 2015-07-11T03:21:10.000Z | 2016-12-27T12:20:07.000Z | dpa/product/version/__init__.py | Clemson-DPA/dpa-pipe | 2482b8a0fd96dc19c0be4e82c3eaf0508914a968 | [
"MIT"
] | 12 | 2015-07-08T04:48:39.000Z | 2020-06-27T11:35:58.000Z | """Classes and functions related to DPA pipeline product versions."""
# -----------------------------------------------------------------------------
# Imports:
# -----------------------------------------------------------------------------
from dateutil import parser as date_parser
from dpa.ptask.spec import PTaskSpec
from dpa.restful import RestfulObject, RestfulObjectError
from dpa.restful.mixins import CreateMixin, GetMixin, ListMixin, UpdateMixin
from dpa.user import User
# -----------------------------------------------------------------------------
# Public Classes:
# -----------------------------------------------------------------------------
class ProductVersion(CreateMixin, GetMixin, ListMixin, UpdateMixin,
RestfulObject):
"""Product Version API.
.creator
.creator_username
.created
.deprecated
.id
.number
.number_padded
.product
.product_spec
.ptask_version
.ptask_version_spec
.published
.release_note
.spec
"""
# -------------------------------------------------------------------------
# Class attributes:
# -------------------------------------------------------------------------
data_type = 'product-versions'
# -------------------------------------------------------------------------
# Class Methods
# -------------------------------------------------------------------------
@classmethod
def create(cls, ptask_version, product, release_note=None, creator=None):
# XXX validation
data = {
"ptask_version": ptask_version,
"product": product,
"release_note": release_note,
"creator": creator,
}
return super(ProductVersion, cls).create(data)
# -------------------------------------------------------------------------
@classmethod
def get(cls, spec, relative_to=None):
# convenience that allows calling code to not have to type check
# input that allows either spec or ptask
if isinstance(spec, ProductVersion):
return spec
# XXX PTaskSpec >> ContextSpec
# XXX PTaskArea >> ContextArea
# XXX PTaskEnv >> ContextEnv
if not isinstance(spec, PTaskSpec):
spec = PTaskSpec.get(spec, relative_to=relative_to)
return super(ProductVersion, cls).get(spec)
# -------------------------------------------------------------------------
# Special methods:
# -------------------------------------------------------------------------
def __eq__(self, other):
return self.spec == other.spec
# -------------------------------------------------------------------------
def __ne__(self, other):
return self.spec != other.spec
# -------------------------------------------------------------------------
def __repr__(self):
""":returns: Unique string represntation of the product."""
return self.__class__.__name__ + "('" + self.spec + "')"
# -------------------------------------------------------------------------
# Public methods:
# -------------------------------------------------------------------------
def deprecate(self):
self.update(deprecated=True)
# -------------------------------------------------------------------------
def undeprecate(self):
self.update(deprecated=False)
# -------------------------------------------------------------------------
def official(self):
self.product.set_official(self)
# -------------------------------------------------------------------------
def publish(self):
self.update(published=True)
# -------------------------------------------------------------------------
def unpublish(self):
self.update(published=False)
# -------------------------------------------------------------------------
def update(self, release_note=None, published=None, deprecated=None):
data = {
"release_note": release_note,
"published": published,
"deprecated": deprecated,
}
return super(ProductVersion, self).update(self.spec, data)
# -------------------------------------------------------------------------
def has_representation(self, rep_type, resolution='none'):
from dpa.product.representation import ProductRepresentation
prod_rep = ProductRepresentation.list(product_version=self.spec,
representation_type=rep_type, resolution=resolution)
if len(prod_rep) == 1:
return True
else:
return False
# -------------------------------------------------------------------------
@property
def creator(self):
return User.get(self.creator_username)
# -------------------------------------------------------------------------
@property
def creator_username(self):
return self._data.get('creator')
# -------------------------------------------------------------------------
@property
def created(self):
return date_parser.parse(self._data.get('created'))
# -------------------------------------------------------------------------
@property
def is_official(self):
return self.product.official_version_number == self.number
# -------------------------------------------------------------------------
@property
def number_padded(self):
return str(self._data.get("number")).zfill(4)
# -------------------------------------------------------------------------
@property
def product(self):
from dpa.product import Product
return Product.get(self.product_spec)
# -------------------------------------------------------------------------
@property
def product_spec(self):
return self._data.get('product')
# -------------------------------------------------------------------------
@property
def ptask(self):
return self.ptask_version.ptask
# -------------------------------------------------------------------------
@property
def ptask_version(self):
from dpa.ptask.version import PTaskVersion
return PTaskVersion.get(self.ptask_version_spec)
# -------------------------------------------------------------------------
@property
def ptask_version_spec(self):
return self._data.get('ptask_version')
# -------------------------------------------------------------------------
@property
def representations(self):
from dpa.product.representation import ProductRepresentation
return ProductRepresentation.list(product_version=self.spec)
# -------------------------------------------------------------------------
@property
def subscribers(self):
return [sub.ptask_version for sub in self.subscriptions]
# -------------------------------------------------------------------------
@property
def subscriptions(self):
from dpa.product.subscription import ProductSubscription
return ProductSubscription.list(product_version=self.spec)
# -----------------------------------------------------------------------------
class ProductVersionError(RestfulObjectError):
pass
ProductVersion.exception_class = ProductVersionError
| 35.251185 | 79 | 0.404813 | 493 | 7,438 | 5.957404 | 0.255578 | 0.048689 | 0.023834 | 0.022472 | 0.126319 | 0.110317 | 0.023834 | 0.023834 | 0 | 0 | 0 | 0.000332 | 0.18997 | 7,438 | 210 | 80 | 35.419048 | 0.487137 | 0.431433 | 0 | 0.207921 | 0 | 0 | 0.03316 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.247525 | false | 0.009901 | 0.09901 | 0.108911 | 0.594059 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
2db3f169c6b8edc1c8319eb41165c588fa8f1af8 | 1,380 | py | Python | talks-articles/languages-n-runtimes/python/terminal-whisper/netcat-sample.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 37 | 2015-02-01T23:16:39.000Z | 2021-12-22T16:50:48.000Z | talks-articles/languages-n-runtimes/python/terminal-whisper/netcat-sample.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 1 | 2017-03-02T04:55:48.000Z | 2018-01-14T10:51:11.000Z | talks-articles/languages-n-runtimes/python/terminal-whisper/netcat-sample.py | abhishekkr/tutorials_as_code | f355dc62a5025b710ac6d4a6ac2f9610265fad54 | [
"MIT"
] | 15 | 2015-03-02T08:09:01.000Z | 2021-06-10T03:25:41.000Z | #!/usr/bin/env python3
## netcat -lv -s 127.0.0.1 -p 8080
import socket, time
def connect():
s = socket.socket()
s.connect(('localhost', 8080))
return s
def publish_with_delay(txt):
conn.send(b"%s" % txt)
time.sleep(0.5)
def line_demo(conn):
publish_with_delay("this is a text")
publish_with_delay("\n")
def typewriter_demo(conn):
publish_with_delay("this is a text again")
publish_with_delay("\b")
publish_with_delay("\b\b\b\b")
publish_with_delay("changed")
publish_with_delay("\r")
publish_with_delay("this is a line changed")
publish_with_delay("\n")
def progress_bar(conn):
publish_with_delay("[# ]")
publish_with_delay("\r[## ]")
publish_with_delay("\r[### ]")
publish_with_delay("\r[#### ]")
publish_with_delay("\r[#####]")
def change_char():
publish_with_delay("\xc3\xb1")
[ publish_with_delay(chr(x)) for x in range(32) ] ## \a\n\r\v\b\f\t
publish_with_delay("\x0e")
publish_with_delay("changed")
publish_with_delay("\x0f")
publish_with_delay("changed")
publish_with_delay("\x1b[33m")
publish_with_delay("changed")
publish_with_delay("\x1b[0m")
publish_with_delay("changed")
publish_with_delay("\n")
if __name__ == "__main__":
conn = connect()
line_demo(conn)
typewriter_demo(conn)
progress_bar(conn)
change_char()
| 25.090909 | 71 | 0.652174 | 201 | 1,380 | 4.139303 | 0.308458 | 0.34375 | 0.5 | 0.165865 | 0.49399 | 0.436298 | 0.427885 | 0.266827 | 0.165865 | 0.081731 | 0 | 0.024779 | 0.181159 | 1,380 | 54 | 72 | 25.555556 | 0.711504 | 0.05 | 0 | 0.186047 | 0 | 0 | 0.154671 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.139535 | false | 0 | 0.023256 | 0 | 0.186047 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2db7f9f213f29e0565892df428369ab039e087c3 | 1,377 | py | Python | src/group_manager.py | luckykadam/kickup | 7a9a4dc6ace5e9fe71e67f92b96705637dd2772a | [
"MIT"
] | 4 | 2019-11-16T10:34:55.000Z | 2020-06-21T14:35:24.000Z | src/group_manager.py | luckykadam/kickup | 7a9a4dc6ace5e9fe71e67f92b96705637dd2772a | [
"MIT"
] | 2 | 2019-11-25T16:26:55.000Z | 2019-11-25T16:53:50.000Z | src/group_manager.py | luckykadam/kickup | 7a9a4dc6ace5e9fe71e67f92b96705637dd2772a | [
"MIT"
] | null | null | null | from exceptions import UnknownUser, UnknownGroup, UserNotInGroup, UserAlreadyInGroup
class GroupManager:
def __init__(self, dao):
self.dao = dao
def all_users(self):
return self.dao.users
def all_groups(self):
return self.dao.groups
def check_user_in_group(self, user_id, group_id):
return group_id in self.dao.user_to_groups[user_id] and user_id in self.dao.group_to_users[group_id]
def add_user_to_group(self, user_id, group_id):
# validation
if user_id not in self.dao.users:
raise UnknownUser
if group_id not in self.dao.groups:
raise UnknownGroup
if group_id in self.dao.user_to_groups[user_id] and user_id in self.dao.group_to_users[group_id]:
raise UserAlreadyInGroup
self.dao.add_relation(self.dao.user_to_groups, self.dao.group_to_users, user_id, group_id)
def remove_user_from_group(self, user_id, group_id):
# validation
if user_id not in self.dao.users:
raise UnknownUser
if group_id not in self.dao.groups:
raise UnknownGroup
if group_id not in self.dao.user_to_groups[user_id] and user_id not in self.dao.group_to_users[group_id]:
raise UserNotInGroup
self.dao.remove_relation(self.dao.user_to_groups, self.dao.group_to_users, user_id, group_id)
| 36.236842 | 113 | 0.695715 | 212 | 1,377 | 4.221698 | 0.146226 | 0.156425 | 0.100559 | 0.073743 | 0.678212 | 0.678212 | 0.650279 | 0.646927 | 0.646927 | 0.604469 | 0 | 0 | 0.233842 | 1,377 | 37 | 114 | 37.216216 | 0.848341 | 0.015251 | 0 | 0.307692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.230769 | false | 0 | 0.038462 | 0.115385 | 0.423077 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
2dc155cb300189b73bfa24cb441cd6949aac4292 | 99 | py | Python | FetchStockPricesAndIndicators/config.py | Snowflake-Labs/sfguide-ExternalFunctions | cb38a3e18076b467c1cb79c7e59766b1be03f638 | [
"Apache-2.0"
] | 14 | 2020-12-04T18:01:28.000Z | 2021-11-02T12:13:09.000Z | FetchStockPricesAndIndicators/config.py | Snowflake-Labs/sfguide-ExternalFunctions | cb38a3e18076b467c1cb79c7e59766b1be03f638 | [
"Apache-2.0"
] | 1 | 2020-12-07T18:36:07.000Z | 2021-01-25T20:35:54.000Z | FetchStockPricesAndIndicators/config.py | Snowflake-Labs/sfguide-ExternalFunctions | cb38a3e18076b467c1cb79c7e59766b1be03f638 | [
"Apache-2.0"
] | 10 | 2020-12-10T06:22:15.000Z | 2022-02-22T01:34:22.000Z | class FinnHubAPI:
TOKEN="yourTokenHere"
# Get a FinHubb API from
# https://finnhub.io/ | 19.8 | 28 | 0.656566 | 12 | 99 | 5.416667 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.232323 | 99 | 5 | 29 | 19.8 | 0.855263 | 0.424242 | 0 | 0 | 0 | 0 | 0.236364 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
2dca07fb4478db7525d6c199ec37dbf3667b740d | 937 | py | Python | geodjango/world/migrations/0003_auto_20191222_1056.py | Zhimin90/Chicago_Pothole_Tracker_Pub | 5d46e130e861fd8aaf01ab8e1b214f20d8d0c02b | [
"MIT"
] | 1 | 2020-04-02T16:59:58.000Z | 2020-04-02T16:59:58.000Z | geodjango/world/migrations/0003_auto_20191222_1056.py | Zhimin90/Chicago_Pothole_Tracker_Pub | 5d46e130e861fd8aaf01ab8e1b214f20d8d0c02b | [
"MIT"
] | 1 | 2021-09-22T18:31:46.000Z | 2021-09-22T18:31:46.000Z | geodjango/world/migrations/0003_auto_20191222_1056.py | Zhimin90/Chicago_Pothole_Tracker_Pub | 5d46e130e861fd8aaf01ab8e1b214f20d8d0c02b | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2019-12-22 16:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('world', '0002_t_potholes'),
]
operations = [
migrations.AlterField(
model_name='t_potholes',
name='COMPLETION_DATE',
field=models.DateTimeField(),
),
migrations.AlterField(
model_name='t_potholes',
name='LATITUDE',
field=models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True),
),
migrations.AlterField(
model_name='t_potholes',
name='LONGITUDE',
field=models.DecimalField(blank=True, decimal_places=6, max_digits=9, null=True),
),
migrations.AlterField(
model_name='t_potholes',
name='REQUEST_DATE',
field=models.DateTimeField(),
),
]
| 27.558824 | 93 | 0.578442 | 93 | 937 | 5.655914 | 0.473118 | 0.085551 | 0.190114 | 0.220532 | 0.562738 | 0.562738 | 0.562738 | 0.403042 | 0.403042 | 0.403042 | 0 | 0.033898 | 0.307364 | 937 | 33 | 94 | 28.393939 | 0.776579 | 0.045891 | 0 | 0.592593 | 1 | 0 | 0.116592 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.037037 | 0 | 0.148148 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2dd5c217c89509f42983ffe6d2b0f75ac6a643ec | 5,212 | py | Python | src/tests/architect_tests/test_planner.py | josephbajor/triage_NN | cbaee6e5a06e597c91fec372717d89a2b5f34fa5 | [
"MIT"
] | 160 | 2017-06-13T09:59:59.000Z | 2022-03-21T22:00:35.000Z | src/tests/architect_tests/test_planner.py | josephbajor/triage_NN | cbaee6e5a06e597c91fec372717d89a2b5f34fa5 | [
"MIT"
] | 803 | 2016-10-21T19:44:02.000Z | 2022-03-29T00:02:33.000Z | src/tests/architect_tests/test_planner.py | josephbajor/triage_NN | cbaee6e5a06e597c91fec372717d89a2b5f34fa5 | [
"MIT"
] | 59 | 2017-01-31T22:10:22.000Z | 2022-03-19T12:35:03.000Z | import datetime
from triage.component.architect import Planner
from triage.component.architect.feature_group_creator import FeatureGroup
def test_Planner():
matrix_set_definitions = [
{
"feature_start_time": datetime.datetime(1990, 1, 1, 0, 0),
"modeling_start_time": datetime.datetime(2010, 1, 1, 0, 0),
"modeling_end_time": datetime.datetime(2010, 1, 16, 0, 0),
"train_matrix": {
"first_as_of_time": datetime.datetime(2010, 1, 1, 0, 0),
"matrix_info_end_time": datetime.datetime(2010, 1, 6, 0, 0),
"as_of_times": [
datetime.datetime(2010, 1, 1, 0, 0),
datetime.datetime(2010, 1, 2, 0, 0),
datetime.datetime(2010, 1, 3, 0, 0),
datetime.datetime(2010, 1, 4, 0, 0),
datetime.datetime(2010, 1, 5, 0, 0),
],
},
"test_matrices": [
{
"first_as_of_time": datetime.datetime(2010, 1, 6, 0, 0),
"matrix_info_end_time": datetime.datetime(2010, 1, 11, 0, 0),
"as_of_times": [
datetime.datetime(2010, 1, 6, 0, 0),
datetime.datetime(2010, 1, 7, 0, 0),
datetime.datetime(2010, 1, 8, 0, 0),
datetime.datetime(2010, 1, 9, 0, 0),
datetime.datetime(2010, 1, 10, 0, 0),
],
}
],
},
{
"feature_start_time": datetime.datetime(1990, 1, 1, 0, 0),
"modeling_start_time": datetime.datetime(2010, 1, 1, 0, 0),
"modeling_end_time": datetime.datetime(2010, 1, 16, 0, 0),
"train_matrix": {
"first_as_of_time": datetime.datetime(2010, 1, 6, 0, 0),
"matrix_info_end_time": datetime.datetime(2010, 1, 11, 0, 0),
"as_of_times": [
datetime.datetime(2010, 1, 6, 0, 0),
datetime.datetime(2010, 1, 7, 0, 0),
datetime.datetime(2010, 1, 8, 0, 0),
datetime.datetime(2010, 1, 9, 0, 0),
datetime.datetime(2010, 1, 10, 0, 0),
],
},
"test_matrices": [
{
"first_as_of_time": datetime.datetime(2010, 1, 11, 0, 0),
"matrix_info_end_time": datetime.datetime(2010, 1, 16, 0, 0),
"as_of_times": [
datetime.datetime(2010, 1, 11, 0, 0),
datetime.datetime(2010, 1, 12, 0, 0),
datetime.datetime(2010, 1, 13, 0, 0),
datetime.datetime(2010, 1, 14, 0, 0),
datetime.datetime(2010, 1, 15, 0, 0),
],
}
],
},
]
feature_dict_one = FeatureGroup(
name="first_features",
features_by_table={"features0": ["f1", "f2"], "features1": ["f1", "f2"]},
)
feature_dict_two = FeatureGroup(
name="second_features",
features_by_table={"features2": ["f3", "f4"], "features3": ["f5", "f6"]},
)
feature_dicts = [feature_dict_one, feature_dict_two]
planner = Planner(
feature_start_time=datetime.datetime(2010, 1, 1, 0, 0),
label_names=["booking"],
label_types=["binary"],
cohort_names=["prior_bookings"],
user_metadata={},
)
updated_matrix_definitions, build_tasks = planner.generate_plans(
matrix_set_definitions, feature_dicts
)
# test that it added uuids: we don't much care what they are
matrix_uuids = []
for matrix_def in updated_matrix_definitions:
assert isinstance(matrix_def["train_uuid"], str)
matrix_uuids.append(matrix_def["train_uuid"])
for test_uuid in matrix_def["test_uuids"]:
assert isinstance(test_uuid, str)
assert len(set(matrix_uuids)) == 4
# not going to assert anything on the keys (uuids), just get out the values
build_tasks = build_tasks.values()
assert len(build_tasks) == 8 # 2 splits * 2 matrices per split * 2 feature dicts
assert sum(1 for task in build_tasks if task["matrix_type"] == "train") == 4
assert sum(1 for task in build_tasks if task["matrix_type"] == "test") == 4
assert (
sum(1 for task in build_tasks if task["feature_dictionary"] == feature_dict_one)
== 4
)
assert (
sum(1 for task in build_tasks if task["feature_dictionary"] == feature_dict_two)
== 4
)
assert (
sum(
1
for task in build_tasks
if task["matrix_metadata"]["feature_groups"] == ["first_features"]
)
== 4
)
assert (
sum(
1
for task in build_tasks
if task["matrix_metadata"]["feature_groups"] == ["second_features"]
)
== 4
)
assert (
sum(
1
for task in build_tasks
if task["matrix_metadata"]["cohort_name"] == "prior_bookings"
)
== 8
)
| 38.607407 | 88 | 0.512471 | 607 | 5,212 | 4.197694 | 0.197694 | 0.21978 | 0.259027 | 0.271978 | 0.613815 | 0.611068 | 0.540424 | 0.537677 | 0.536107 | 0.497253 | 0 | 0.097649 | 0.363392 | 5,212 | 134 | 89 | 38.895522 | 0.670283 | 0.034919 | 0 | 0.388889 | 0 | 0 | 0.134899 | 0 | 0 | 0 | 0 | 0 | 0.087302 | 1 | 0.007937 | false | 0 | 0.02381 | 0 | 0.031746 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
2de3e17c2cb3df19509f2e6aeb2b3ce407983468 | 149 | py | Python | nose2/tests/functional/support/lib/plugin_a.py | Metaswitch/nose2 | 1fdb46ef9eb279fb1f9b2321dc978977876e8230 | [
"BSD-2-Clause"
] | null | null | null | nose2/tests/functional/support/lib/plugin_a.py | Metaswitch/nose2 | 1fdb46ef9eb279fb1f9b2321dc978977876e8230 | [
"BSD-2-Clause"
] | null | null | null | nose2/tests/functional/support/lib/plugin_a.py | Metaswitch/nose2 | 1fdb46ef9eb279fb1f9b2321dc978977876e8230 | [
"BSD-2-Clause"
] | 1 | 2019-11-24T12:11:52.000Z | 2019-11-24T12:11:52.000Z | from nose2 import events
class PluginA(events.Plugin):
configSection = 'a'
def __init__(self):
self.a = self.config.as_int('a', 0)
| 18.625 | 43 | 0.651007 | 21 | 149 | 4.380952 | 0.761905 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017241 | 0.221477 | 149 | 7 | 44 | 21.285714 | 0.775862 | 0 | 0 | 0 | 0 | 0 | 0.013423 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 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 | 0 | 0 | 1 | 0 | 0 | 3 |
2dfbed0b4428675615d51607e6acf82ef204e50e | 478 | py | Python | analytics/urls.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | null | null | null | analytics/urls.py | dehnert/zulip | f5935e81c7cf2f11ff4ccfcd31d2a1061b8d7ff5 | [
"Apache-2.0"
] | 1 | 2019-11-02T09:06:05.000Z | 2019-11-02T09:06:05.000Z | analytics/urls.py | erinis-eligro/zulip-outcasts | 51153a6ce219370aee79bfe462f6e4fb956993d9 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import url
import analytics.views
i18n_urlpatterns = [
url(r'^activity$', analytics.views.get_activity,
name='analytics.views.get_activity'),
url(r'^realm_activity/(?P<realm>[\S]+)/$', analytics.views.get_realm_activity,
name='analytics.views.get_realm_activity'),
url(r'^user_activity/(?P<email>[\S]+)/$', analytics.views.get_user_activity,
name='analytics.views.get_user_activity'),
]
urlpatterns = i18n_urlpatterns
| 34.142857 | 82 | 0.713389 | 62 | 478 | 5.274194 | 0.306452 | 0.299694 | 0.311927 | 0.238532 | 0.474006 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009569 | 0.125523 | 478 | 13 | 83 | 36.769231 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0.359833 | 0.338912 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.181818 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
930339e13f408ad46d0504fac557ef8cf0a57a56 | 620 | py | Python | projects/DensePose/densepose/converters/__init__.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 21,274 | 2019-10-10T17:50:46.000Z | 2022-03-31T17:58:45.000Z | projects/DensePose/densepose/converters/__init__.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 3,253 | 2019-10-10T20:39:47.000Z | 2022-03-31T22:27:53.000Z | projects/DensePose/densepose/converters/__init__.py | mmabrouk/detectron2 | 158e395acdb8ca6ed6d488b43475f9ef9d200405 | [
"Apache-2.0"
] | 6,288 | 2019-10-10T18:00:27.000Z | 2022-03-31T21:22:58.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
from .hflip import HFlipConverter
from .to_mask import ToMaskConverter
from .to_chart_result import ToChartResultConverter, ToChartResultConverterWithConfidences
from .segm_to_mask import (
predictor_output_with_fine_and_coarse_segm_to_mask,
predictor_output_with_coarse_segm_to_mask,
resample_fine_and_coarse_segm_to_bbox,
)
from .chart_output_to_chart_result import (
densepose_chart_predictor_output_to_result,
densepose_chart_predictor_output_to_result_with_confidences,
)
from .chart_output_hflip import densepose_chart_predictor_output_hflip
| 38.75 | 90 | 0.866129 | 82 | 620 | 5.97561 | 0.341463 | 0.153061 | 0.061224 | 0.177551 | 0.312245 | 0.15102 | 0 | 0 | 0 | 0 | 0 | 0 | 0.098387 | 620 | 15 | 91 | 41.333333 | 0.876565 | 0.077419 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.461538 | 0 | 0.461538 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
93090e0db3054d8dae613294c451bd5825045a1e | 3,088 | py | Python | operator_api/operator_api/crypto.py | liquidity-network/nocust-hub | 76f49f9b8a6c264fcbe9e0c110e98031d463c0a8 | [
"MIT"
] | 1 | 2021-08-04T06:09:46.000Z | 2021-08-04T06:09:46.000Z | operator_api/operator_api/crypto.py | liquidity-network/nocust-hub | 76f49f9b8a6c264fcbe9e0c110e98031d463c0a8 | [
"MIT"
] | 8 | 2020-11-01T19:48:21.000Z | 2022-02-10T14:12:25.000Z | operator_api/operator_api/crypto.py | liquidity-network/nocust-hub | 76f49f9b8a6c264fcbe9e0c110e98031d463c0a8 | [
"MIT"
] | 3 | 2020-11-01T15:59:56.000Z | 2021-09-16T07:18:18.000Z | import bitcoin
import random
from eth_utils import keccak, decode_hex, int_to_big_endian, big_endian_to_int, encode_hex, remove_0x_prefix, is_hex
from ecdsa import SigningKey, SECP256k1
def uint512(x):
return zfill(unsigned_int_to_bytes(int(x)), 64)
def uint256(x):
return zfill(unsigned_int_to_bytes(int(x)))
def uint32(x):
return zfill(unsigned_int_to_bytes(int(x)), 4)
def uint64(x):
return zfill(unsigned_int_to_bytes(int(x)), 8)
def int256(x):
return zfill(signed_int_to_bytes(int(x)))
def address(s):
return zfill(decode_hex(s), 20) if is_hex(s) else zfill(s, 20)
def hex_address(s):
return remove_0x_prefix(hex_value(address(s)))[-40:] if is_hex(s) else hex_address(hex_value(s))
def zfill(x, p=32):
return (p - len(x))*b'\x00' + x
def unsigned_int_to_bytes(x):
return int_to_big_endian(x)
def signed_int_to_bytes(x):
# pyethereum int to bytes does not handle negative numbers
assert -(1 << 255) <= x < (1 << 255)
return int_to_big_endian((1 << 256) + x if x < 0 else x)
def hash_message(m):
return keccak(b'\x19Ethereum Signed Message:\n32' + m)
def has_lqd_message(m):
return hash_message(keccak(b'\x19Liquidity.Network Authorization:\n32' + m))
def sign_message(m, k):
h = has_lqd_message(m)
return sign(h, k)
def sign(h, priv):
assert len(h) == 32
v, r, s = bitcoin.ecdsa_raw_sign(h, priv)
return v, r, s
def verify_message_signature(addr, m, v_r_s):
h = has_lqd_message(m)
return verify_signature(addr, h, v_r_s)
def verify_signature(addr, h, v_r_s):
pub = bitcoin.ecdsa_raw_recover(h, v_r_s)
pub = bitcoin.encode_pubkey(pub, 'bin')
addr_ = keccak(pub[1:])[12:]
return addr_.lower() == addr.lower()
def hex_value(bytes_value):
return remove_0x_prefix(encode_hex(bytes_value))
def encode_decimal(dec):
return int(dec).to_bytes(32, byteorder='big')
def parse_web3_sig(rsv):
return encode_signature((int(rsv[128:130]),
big_endian_to_int(decode_hex(rsv[0:64])),
big_endian_to_int(decode_hex(rsv[64:128]))))
def encode_signature(vrs):
return hex_value(join_signature_to_rsv(*vrs))
def decode_signature(encoded_rsv):
return decompose_sig_to_vrs(decode_hex(encoded_rsv))
def join_signature_to_rsv(v, r, s):
return uint256(r) + uint256(s) + int_to_big_endian(v)
def decompose_sig_to_vrs(rsv):
return big_endian_to_int(rsv[64:65]),\
big_endian_to_int(rsv[0:32]),\
big_endian_to_int(rsv[32:64])
def hash_array_pad(arr):
return keccak(b''.join([zfill(x) for x in arr]))
def hash_array(arr):
return keccak(b''.join(arr))
def generate_wallet():
private_key = SigningKey.generate(curve=SECP256k1)
public_key = private_key.get_verifying_key().to_string()
wallet_address = keccak(public_key).hex()[24:]
return private_key, public_key, wallet_address
def random_wei():
return int(random.random()*1e18 + 2020)
def same_hex_value(a, b):
return remove_0x_prefix(a).lower() == remove_0x_prefix(b).lower()
| 22.874074 | 116 | 0.692034 | 513 | 3,088 | 3.879142 | 0.231969 | 0.030151 | 0.040201 | 0.042211 | 0.256281 | 0.160804 | 0.117588 | 0.068342 | 0.068342 | 0 | 0 | 0.04293 | 0.177785 | 3,088 | 134 | 117 | 23.044776 | 0.740843 | 0.018135 | 0 | 0.026667 | 0 | 0 | 0.027063 | 0.006931 | 0 | 0 | 0 | 0 | 0.026667 | 1 | 0.373333 | false | 0 | 0.053333 | 0.293333 | 0.8 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
93142ced2f885d7147cedac17b0eda29617b93a7 | 65 | py | Python | mmdet3d/models/fusion_layers/__init__.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 136 | 2021-06-03T06:37:56.000Z | 2022-03-29T13:29:03.000Z | mmdet3d/models/fusion_layers/__init__.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 38 | 2021-06-05T12:41:30.000Z | 2022-03-23T07:31:28.000Z | mmdet3d/models/fusion_layers/__init__.py | BB88Lee/mmdetection3d | 62aeeadf70ac1229c595e3a4fe09d8a49df808f1 | [
"Apache-2.0"
] | 15 | 2021-04-23T01:13:28.000Z | 2022-03-27T11:15:25.000Z | from .point_fusion import PointFusion
__all__ = ['PointFusion']
| 16.25 | 37 | 0.784615 | 7 | 65 | 6.571429 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.123077 | 65 | 3 | 38 | 21.666667 | 0.807018 | 0 | 0 | 0 | 0 | 0 | 0.169231 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
932a415cb941d58fb5af7cebd188d1ee857650ff | 254 | py | Python | utils/WindowDATA.py | AngeloXD13/Simple_ATM_Interface | 4ca64c085a21c90acdd2d98b3064a266920cfffa | [
"MIT"
] | null | null | null | utils/WindowDATA.py | AngeloXD13/Simple_ATM_Interface | 4ca64c085a21c90acdd2d98b3064a266920cfffa | [
"MIT"
] | null | null | null | utils/WindowDATA.py | AngeloXD13/Simple_ATM_Interface | 4ca64c085a21c90acdd2d98b3064a266920cfffa | [
"MIT"
] | null | null | null | class WindowDatas():
def __init__(self):
self.previousWindow = None
self.nextWindow = None
self.finalWindow = None
self.accountDATA = None
self.actions= None
self.show= True
self.database = None | 28.222222 | 34 | 0.598425 | 26 | 254 | 5.692308 | 0.538462 | 0.27027 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.322835 | 254 | 9 | 35 | 28.222222 | 0.860465 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | false | 0 | 0 | 0 | 0.222222 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
9351a62d93ef7feca971287259a384d0f4dcbdc1 | 277 | py | Python | ai/STA/Tactic/Stop.py | wonwon0/RobocupStrategyIA | 891028f616d476b05b23b40924d7c99502a718e3 | [
"MIT"
] | null | null | null | ai/STA/Tactic/Stop.py | wonwon0/RobocupStrategyIA | 891028f616d476b05b23b40924d7c99502a718e3 | [
"MIT"
] | null | null | null | ai/STA/Tactic/Stop.py | wonwon0/RobocupStrategyIA | 891028f616d476b05b23b40924d7c99502a718e3 | [
"MIT"
] | null | null | null | # Under MIT license, see LICENSE.txt
from .Tactic import Tactic
from . tactic_constants import Flags
class Stop(Tactic):
def __init__(self, game_state, player_id, *args, **kwargs):
super().__init__(game_state, player_id)
self.status_flag = Flags.SUCCESS
| 25.181818 | 63 | 0.718412 | 38 | 277 | 4.868421 | 0.657895 | 0.108108 | 0.162162 | 0.183784 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.184116 | 277 | 10 | 64 | 27.7 | 0.818584 | 0.122744 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
93528bcd1e6ed11d23d81ef908b594ef5d78c89b | 422 | py | Python | src/testing/TestON/lib/updatedriver/fvtadd.py | securedataplane/preacher | 2f76581de47036e79cd6e1183948c88b35ce4950 | [
"MIT"
] | 1 | 2020-07-23T08:06:44.000Z | 2020-07-23T08:06:44.000Z | src/testing/TestON/lib/updatedriver/fvtadd.py | securedataplane/preacher | 2f76581de47036e79cd6e1183948c88b35ce4950 | [
"MIT"
] | null | null | null | src/testing/TestON/lib/updatedriver/fvtadd.py | securedataplane/preacher | 2f76581de47036e79cd6e1183948c88b35ce4950 | [
"MIT"
] | null | null | null | class FVTADD :
def __init__(self):
self.default = ''
def runTest(self,self) :
return TemplateTest.runTest(self)
def tearDown(self,self) :
return TemplateTest.tearDown(self)
def setUp(self,self) :
return TemplateTest.setUp(self)
def chkSetUpCondition(self,self,fv,sv_ret,ctl_ret,sw_ret) :
return TemplateTest.chkSetUpCondition(self,fv,sv_ret,ctl_ret,sw_ret)
| 24.823529 | 76 | 0.675355 | 53 | 422 | 5.188679 | 0.320755 | 0.145455 | 0.152727 | 0.283636 | 0.16 | 0.16 | 0.16 | 0.16 | 0 | 0 | 0 | 0 | 0.220379 | 422 | 16 | 77 | 26.375 | 0.835866 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.454545 | false | 0 | 0 | 0.363636 | 0.909091 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
935b31332c3c700a5959adebcf2982d2a6481509 | 232 | py | Python | training/Leetcode/380.py | voleking/ICPC | fc2cf408fa2607ad29b01eb00a1a212e6d0860a5 | [
"MIT"
] | 68 | 2017-10-08T04:44:23.000Z | 2019-08-06T20:15:02.000Z | training/Leetcode/380.py | voleking/ICPC | fc2cf408fa2607ad29b01eb00a1a212e6d0860a5 | [
"MIT"
] | null | null | null | training/Leetcode/380.py | voleking/ICPC | fc2cf408fa2607ad29b01eb00a1a212e6d0860a5 | [
"MIT"
] | 18 | 2017-05-31T02:52:23.000Z | 2019-07-05T09:18:34.000Z | from functools import reduce
class Solution:
def findTheDifference(self, s, t):
"""
:type s: str
:type t: str
:rtype: str
"""
return chr(reduce(lambda x, y: x ^ ord(y), s + t, 0))
| 23.2 | 61 | 0.512931 | 31 | 232 | 3.83871 | 0.677419 | 0.033613 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006711 | 0.357759 | 232 | 9 | 62 | 25.777778 | 0.791946 | 0.159483 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 3 |
9375ab00ba5c79d7e2c56510f35000c3f25585ca | 105 | py | Python | Project_Euler/problem13.py | csixteen/HackerRank | 3ef6fa48599341f481b9e266c69df2d449a7b313 | [
"MIT"
] | 4 | 2018-04-19T20:32:54.000Z | 2020-04-21T12:28:00.000Z | Project_Euler/problem13.py | csixteen/HackerRank | 3ef6fa48599341f481b9e266c69df2d449a7b313 | [
"MIT"
] | null | null | null | Project_Euler/problem13.py | csixteen/HackerRank | 3ef6fa48599341f481b9e266c69df2d449a7b313 | [
"MIT"
] | null | null | null | n = int(input())
res = 0
for i in range(n):
res += int((input().strip())[:25])
print(str(res)[:10])
| 15 | 38 | 0.533333 | 19 | 105 | 2.947368 | 0.736842 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.05814 | 0.180952 | 105 | 6 | 39 | 17.5 | 0.593023 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
877e9d0ceab6040c857094c0b8f8359064ef39b9 | 107 | py | Python | operator/test_operator.py | Carglglz/micropython-lib | 07102c56aa1087b97ee313cedc1d89fd20452e11 | [
"PSF-2.0"
] | 2 | 2021-02-24T13:59:02.000Z | 2021-04-06T22:25:03.000Z | operator/test_operator.py | Carglglz/micropython-lib | 07102c56aa1087b97ee313cedc1d89fd20452e11 | [
"PSF-2.0"
] | null | null | null | operator/test_operator.py | Carglglz/micropython-lib | 07102c56aa1087b97ee313cedc1d89fd20452e11 | [
"PSF-2.0"
] | 3 | 2021-02-24T12:16:11.000Z | 2022-01-04T08:35:59.000Z | import operator
class A: pass
a = A()
a.name = "foo"
f = operator.attrgetter('name')
assert f(a) == "foo"
| 13.375 | 31 | 0.635514 | 18 | 107 | 3.777778 | 0.555556 | 0.058824 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.17757 | 107 | 7 | 32 | 15.285714 | 0.772727 | 0 | 0 | 0 | 0 | 0 | 0.093458 | 0 | 0 | 0 | 0 | 0 | 0.166667 | 1 | 0 | false | 0.166667 | 0.166667 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
8782e035420767b2fe93311fae828f5ced1260aa | 172 | py | Python | settings.py | NekoSarada1101/twitter-wordcloud-generator | 67607ef4bdce0d474008c9a8afc45e5f7043143b | [
"MIT"
] | null | null | null | settings.py | NekoSarada1101/twitter-wordcloud-generator | 67607ef4bdce0d474008c9a8afc45e5f7043143b | [
"MIT"
] | 1 | 2021-01-24T15:53:59.000Z | 2021-01-25T06:13:27.000Z | settings.py | NekoSarada1101/twitter-wordcloud-generator | 67607ef4bdce0d474008c9a8afc45e5f7043143b | [
"MIT"
] | null | null | null | BEARER_KEY = "BEARER_KEY"
MECAB_DICT_PATH = "MECAB_DICT_PATH" # MeCabの辞書ファイルへのパス
FONT_PATH = "./font/ヒラギノ角ゴシック W3.ttc" # WordCloud用のフォントファイルへのパス
TWEET_COUNT = 5 # * 100
| 34.4 | 64 | 0.761628 | 22 | 172 | 5.590909 | 0.681818 | 0.146341 | 0.211382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.033557 | 0.133721 | 172 | 4 | 65 | 43 | 0.791946 | 0.267442 | 0 | 0 | 0 | 0 | 0.393443 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
87869aac00c79c014cf9620d2ed6c985258b0109 | 8,018 | py | Python | scrapers/scrape_sh.py | zukunft/covid_19 | 458cc0369aa5ffe2ba738b8048416784c402ee3e | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_sh.py | zukunft/covid_19 | 458cc0369aa5ffe2ba738b8048416784c402ee3e | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_sh.py | zukunft/covid_19 | 458cc0369aa5ffe2ba738b8048416784c402ee3e | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
import scrape_common as sc
print('SH')
# A JavaScript content loaded from https://sh.ch/CMS/Webseite/Kanton-Schaffhausen/Beh-rde/Verwaltung/Departement-des-Innern/Gesundheitsamt-3209198-DE.html
d = sc.download('https://sh.ch/CMS/content.jsp?contentid=3209198&language=DE&_=1584807070095')
sc.timestamp()
d = sc.filter('data_post_content', d)
d = d.replace('\\n', '\n')
d = d.replace(' ', ' ')
d = d.replace('ä', 'ä')
# 2020-03-25
"""
"data_post_content":"<p class=\"post_text\">Im Kanton Schaffhausen gibt es aktuell (Stand 25.03.2020 08:00 Uhr) <strong>34 bestätige Coronavirus-Fälle<\/strong>.<\/p>
"""
# 2020-03-29
"""
"data_post_content":""<p class=\"post_text\">Im Kanton Schaffhausen gibt es aktuell (Stand 29.03.2020, 08:00 Uhr) <strong> 40 bestätige Coronavirus-Fälle</strong>.<
"""
# 2020-04-03
"""
"data_post_content":"<p class=\"post_text\">Im Kanton Schaffhausen gibt es aktuell (Stand 02.04.2020): <\/p>\n\n<p class=\"post_text\"><strong>Anzahl Infizierte Fälle (kumuliert): 47<\/strong><\/p>\n\n<p class=\"post_text\"><strong>Anzahl Hospitalisationen Isolation (aktuell): 15<\/strong><\/p>\n\n<p class=\"post_text\"><strong>Anzahl Hospitalisationen Intensiv (aktuell): 3<\/strong><\/p>\n\n<p class=\"post_text\"><strong>Verstorbene (kummuliert): 1<\/strong><\/p>\n\n<p ....
"""
# 2020-04-06
"""
"data_post_content":"<p class=\"post_text\">Im Kanton Schaffhausen gibt es aktuell (Stand 05.04.2020): <\/p>\n\n<p class=\"post_text\"><strong>Anzahl positiv getestete Personen (kumuliert): 49<\/strong><\/p>\n\n<p class=\"post_text\"><strong>Anzahl Hospitalisationen Isolation (aktuell): 9<\/strong><\/p>\n\n<p class=\"post_text\"><strong>Anzahl Hospitalisationen Intensiv (aktuell): 3<\/strong><\/p>\n\n<p class=\"post_text\"><strong>Verstorbene (kumuliert): 1<\/strong><br \/>\n<br \/>\n <\/p>\n\n<p class=\"post_lead\" style=\"margin-left:0cm; margin-right:0cm\"><strong>Freiwillige Corona-Einsatz <\/strong><\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\">Der Regierungsrat ersucht Personen mit Wohnsitz im Kanton Schaffhausen, die einen Abschluss im Gesundheitsbereich vorweisen, jedoch nicht mehr im gelernten Beruf arbeiten und nicht zu einer Risikogruppe gehören, sich mittels <a contentid=\"3578453\" href=\"javascript:;\" label=\"Online-Formular\" language=\"DE\" linktype=\"internal\" phoenixlink=\"true\" target=\"_self\">Online-Formular<\/a> für freiwillige Einsätze in der Corona-Krise zu melden. Dies gilt auch für Studierende der Humanmedizin mit Wohnsitz im Kanton Schaffhausen.<br \/>\n<br \/>\n<strong>Besuchsverbot<\/strong><\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\">Mit Beschluss des Regierungsrates vom 17. März 2020 herrscht bis 19. April 2020 ein Besuchsverbot in Spitälern, Alters- und Pflegeheimen und ähnlichen Institutionen<strong> <\/strong>(<a contentid=\"3320742\" href=\"javascript:;\" label=\"Umsetzung Besuchsverbot\" language=\"DE\" linktype=\"internal\" phoenixlink=\"true\" target=\"_self\">Umsetzung Besuchsverbot<\/a>). <\/p>\n\n<p style=\"margin-left:0cm; margin-right:0cm\"> <\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\"><strong>Besorgungsdienst<\/strong><br \/>\nDas Schweizerische Rote Kreuz des Kantons Schaffhausen bietet ab sofort einen <a href=\"javascript:;\" target=\"_self\">Besorgungsdienst für Personen in Quarantäne<\/a> an. <\/p>\n\n<p style=\"margin-left:0cm; margin-right:0cm\"> <\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\"><strong>Abklärungszentrum<\/strong><\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\">Schaffhauser Hausärzte richten ein COVID-19-Abklärungszentrum ein<\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\">Am Mittwoch, 25. März 2020, wurde im ehemaligen Pflegezentrum an der J.J. Wepfer-Strasse 12 in Schaffhausen ein COVID-19-Abklärungszentrum eröffnet. Abklärungen und medizinische Beurteilungen von Corona-Verdachtsfällen erfolgen damit an einem zentralen Ort und nicht mehr in den Hausarztpraxen.<\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\">Patienten mit (grippalen) Symptomen eines Atemwegsinfektes bzw. Verdacht auf Coronavirus-Infektion sollen sich weiterhin telefonisch bei ihrem Hausarzt melden. Dort erhalten sie Informationen zu den weiteren Schritten bzw. Massnahmen. Die Zuweisung ins COVID-19 Abklärungszentrum erfolgt via die Hausärzte, die kantonale Hotline oder die Spitäler. Es werden ausschliesslich Patienten mit telefonischer Voranmeldung abgeklärt; es handelt sich nicht um eine Walk-in-Abklärungsstelle. Das Abklärungszentrum ergänzt die bestehende Vor-Triage-Stelle am Kantonsspital Schaffhausen. <\/p>\n\n<p style=\"margin-left:0cm; margin-right:0cm\"> <\/p>\n\n<p class=\"post_text\"><strong>Verfügbarkeit Schutzmaterial<\/strong><\/p>\n\n<p class=\"post_text\">Der Kanton Schaffhausen verfügt über Schutzmaterial, welches für die Versorgung von Corona Patienten reserviert und bei Bedarf gezielt abgerufen werden kann. Gesunde brauchen keine Masken und Personen mit Grippesymptomen sollten in der Selbstisolation zu Hause jeglichen Kontakt vermeiden. Wir sind auf verschiedensten Kanälen daran Nachschub zu besorgen.<\/p>\n\n<p class=\"post_text\"> <\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\"><strong>Verfügbarkeit Desinfektionsmittel<\/strong><\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\">Aktuell kann kaum Desinfektionsmittel (Hand\/Oberflächen) geliefert werden. In den Detailhandel gelangen immer wieder kleinere Mengen an zugelassenem Desinfektionsmittel. Die zusätzliche Herstellung in Apotheken und Drogerien läuft auf Hochtouren. Für diese Herstellung wird weiterhin genügend Ethanol geliefert und die Mengen sind somit sichergestellt. Versuchen Sie daher in Apotheken und Drogerien die Desinfektionsmittel zu beziehen.<\/p>\n\n<p style=\"margin-left:0cm; margin-right:0cm\"> <\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\"><strong>Verhaltensregeln<\/strong><br \/>\nIn fast allen Regionen der Welt besteht das Risiko einer Ansteckung mit dem neuen Coronavirus. Die Bevölkerung wird daher gebeten, die Verhaltensregeln des <a href=\"javascript:;\" target=\"_blank\">Bundesamtes für Gesundheit<\/a> zu befolgen.<\/p>\n\n<p style=\"margin-left:0cm; margin-right:0cm\"> <\/p>\n\n<p class=\"post_text\" style=\"margin-left:0cm; margin-right:0cm\"><strong>Weiterführende Informationen<\/strong><br \/>\nInformationen zur Öffung und Schliessung von Betrieben finden Sie unter <a href=\"javascript:;\" target=\"_blank\">Massnahmen<\/a>. Die aktuelle Übersicht zu den offenen \/ geschlossenen <a href=\"javascript:;\" target=\"_self\">Grenzübergänge zu Deutschland<\/a> ist über den Link ersichtlich.<\/p>",
"""
print('Date and time:', sc.find(r'\(Stand ([^\)]+)\)', d)) # sc.filter('Im Kanton Schaffhausen gibt.*', d)
print('Confirmed cases:',
sc.find(r'\b([0-9]+)\s*bestätige\s*(Coronavirus)?-?\s*Fälle', d) or
sc.find(r'(?:Anzahl)?\s*Infizierte\s*Fälle\s*(?:\(kumuliert\))?:\s*([0-9]+)<', d) or
sc.find(r'(?:Anzahl)?\s*positiv\s*getestete\s*Personen\s*(?:\(kumuliert\))?:?\s*([0-9]+)', d))
hospitalized = sc.find(r'(?:Anzahl)?\s*Hospitalisationen\s*Isolation\s*(?:\(aktuell\))?:\s*([0-9]+)<', d)
if hospitalized:
print('Hospitalized:', hospitalized)
icu = sc.find(r'(?:Anzahl)?\s*Hospitalisationen\s*Intensiv\s*(?:\(aktuell\))?:\s*([0-9]+)<', d)
if icu:
print('ICU:', icu)
print('Deaths:', sc.find(r'Verstorbene\s*(?:\(kumm?uliert\))?:\s*([0-9]+)<', d))
| 178.177778 | 5,820 | 0.726989 | 1,232 | 8,018 | 4.694805 | 0.30763 | 0.010373 | 0.015041 | 0.020055 | 0.392289 | 0.356155 | 0.334544 | 0.306881 | 0.2787 | 0.263485 | 0 | 0.027321 | 0.08244 | 8,018 | 44 | 5,821 | 182.227273 | 0.758869 | 0.032926 | 0 | 0 | 0 | 0.25 | 0.567194 | 0.384387 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.05 | 0 | 0.05 | 0.3 | 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 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
878a4119c034db03676d68374dbd3bd7990c79cb | 216 | py | Python | priv/python/test/__init__.py | hnrkptrsn/erlport_python_example | 1484e24218ffeca4e91916f92b86657a08db987d | [
"BSD-3-Clause"
] | null | null | null | priv/python/test/__init__.py | hnrkptrsn/erlport_python_example | 1484e24218ffeca4e91916f92b86657a08db987d | [
"BSD-3-Clause"
] | null | null | null | priv/python/test/__init__.py | hnrkptrsn/erlport_python_example | 1484e24218ffeca4e91916f92b86657a08db987d | [
"BSD-3-Clause"
] | null | null | null | import random
import fortune
def example():
return random.random()
# Remember that the return value will be a unicode UTF-8
def myfortune():
f = fortune.get_random_fortune('priv/fortunes/fortunes')
return f
| 18 | 58 | 0.75 | 32 | 216 | 5 | 0.65625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005525 | 0.162037 | 216 | 11 | 59 | 19.636364 | 0.878453 | 0.25 | 0 | 0 | 0 | 0 | 0.1375 | 0.1375 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.285714 | 0.142857 | 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 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
879e0a0f0a7f318587a439d8da7d7990843f52b4 | 107 | py | Python | pyamg/relaxation/__init__.py | Alexey-Voronin/pyamg-1 | 59d35010e4bd660aae3526e8a206a42cb1a54bfa | [
"MIT"
] | null | null | null | pyamg/relaxation/__init__.py | Alexey-Voronin/pyamg-1 | 59d35010e4bd660aae3526e8a206a42cb1a54bfa | [
"MIT"
] | null | null | null | pyamg/relaxation/__init__.py | Alexey-Voronin/pyamg-1 | 59d35010e4bd660aae3526e8a206a42cb1a54bfa | [
"MIT"
] | null | null | null | """Relaxation methods"""
from .info import __doc__
__all__ = [s for s in dir() if not s.startswith('_')]
| 17.833333 | 53 | 0.672897 | 16 | 107 | 3.9375 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.168224 | 107 | 5 | 54 | 21.4 | 0.707865 | 0.168224 | 0 | 0 | 0 | 0 | 0.012048 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
e200020f48349e86ffef10cf892f1aef58d0142d | 1,375 | py | Python | setup.py | dhagrow/profig | ee10a8af030f7b387320e2a8d110f25e8b2395da | [
"MIT"
] | 16 | 2015-03-28T14:55:18.000Z | 2022-03-03T00:19:19.000Z | setup.py | dhagrow/profig | ee10a8af030f7b387320e2a8d110f25e8b2395da | [
"MIT"
] | 4 | 2019-10-24T14:38:49.000Z | 2021-09-07T20:40:07.000Z | setup.py | dhagrow/profig | ee10a8af030f7b387320e2a8d110f25e8b2395da | [
"MIT"
] | 1 | 2017-08-20T09:49:25.000Z | 2017-08-20T09:49:25.000Z | #!/usr/bin/env python
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import profig
BASE_DIR = os.path.dirname(__file__)
README_PATH = os.path.join(BASE_DIR, 'README.rst')
DESCRIPTION = open(README_PATH).read()
setup(
name='profig',
version=profig.__version__,
description='A configuration library.',
long_description=DESCRIPTION,
author=profig.__author__,
author_email='cymrow@gmail.com',
url='https://github.com/dhagrow/profig',
py_modules=['profig'],
license=profig.__license__,
platforms='any',
keywords=['config', 'configuration', 'options', 'settings'],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Topic :: Software Development :: Libraries',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
],
)
| 31.25 | 64 | 0.627636 | 145 | 1,375 | 5.793103 | 0.496552 | 0.22619 | 0.297619 | 0.247619 | 0.127381 | 0 | 0 | 0 | 0 | 0 | 0 | 0.017908 | 0.228364 | 1,375 | 43 | 65 | 31.976744 | 0.773798 | 0.014545 | 0 | 0 | 0 | 0 | 0.471935 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.131579 | 0 | 0.131579 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
35585f1e2cf1be3e67fa916851cf16cbd2bec8c1 | 311 | py | Python | app/users/api/serializers.py | DakobedBard/Bookings | 6738fd52d2bcd5ab16228b7bfe9c06fee3ee49aa | [
"MIT"
] | null | null | null | app/users/api/serializers.py | DakobedBard/Bookings | 6738fd52d2bcd5ab16228b7bfe9c06fee3ee49aa | [
"MIT"
] | null | null | null | app/users/api/serializers.py | DakobedBard/Bookings | 6738fd52d2bcd5ab16228b7bfe9c06fee3ee49aa | [
"MIT"
] | null | null | null | from rest_framework import serializers
from users.models import Host, Guest
class GuestSerializer(serializers.ModelSerializer):
class Meta:
model = Guest
fields = '__all__'
class HostSerializer(serializers.ModelSerializer):
class Meta:
model = Host
fields = '__all__'
| 22.214286 | 51 | 0.70418 | 31 | 311 | 6.774194 | 0.548387 | 0.247619 | 0.295238 | 0.333333 | 0.380952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.231511 | 311 | 13 | 52 | 23.923077 | 0.878661 | 0 | 0 | 0.4 | 0 | 0 | 0.045016 | 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 | 0 | 0 | 0 | 3 |
355a68a3c38d59a404b83f0584fa684a0dd27b6b | 40 | py | Python | adversarial_robustness/datasets/__init__.py | dtak/adversarial_robustness | eb1e3af5301789cc6e7562750145ab91f80dcca7 | [
"MIT"
] | 50 | 2017-12-07T02:46:38.000Z | 2022-02-12T08:06:27.000Z | adversarial_robustness/datasets/__init__.py | dtak/adversarial_robustness | eb1e3af5301789cc6e7562750145ab91f80dcca7 | [
"MIT"
] | 4 | 2018-03-09T04:10:36.000Z | 2019-05-06T10:00:11.000Z | adversarial_robustness/datasets/__init__.py | dtak/adversarial_robustness | eb1e3af5301789cc6e7562750145ab91f80dcca7 | [
"MIT"
] | 13 | 2018-05-02T08:32:26.000Z | 2021-12-28T11:16:07.000Z | __all__ = ['mnist', 'notmnist', 'svhn']
| 20 | 39 | 0.6 | 4 | 40 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.125 | 40 | 1 | 40 | 40 | 0.571429 | 0 | 0 | 0 | 0 | 0 | 0.425 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3581c945b6cd4f2028980af4bcb034ddbeaee534 | 307 | py | Python | textgenrnn/run_model.py | demo835/textgenrnn | bf5a57c09a2ccec080ead52ffad33f219bd38cfe | [
"MIT"
] | null | null | null | textgenrnn/run_model.py | demo835/textgenrnn | bf5a57c09a2ccec080ead52ffad33f219bd38cfe | [
"MIT"
] | null | null | null | textgenrnn/run_model.py | demo835/textgenrnn | bf5a57c09a2ccec080ead52ffad33f219bd38cfe | [
"MIT"
] | null | null | null | #! python3
from textgenrnn import textgenrnn
textgen = textgenrnn(weights_path='gaunt_weights.hdf5', vocab_path='gaunt_vocab.json', config_path='gaunt_config.json')
textgen.generate_samples(temperatures=[0.1, 0.2, 0.3], max_gen_length=500)
# textgen.generate_to_file('generated.txt', max_gen_length=1000) | 38.375 | 119 | 0.801303 | 46 | 307 | 5.065217 | 0.608696 | 0.11588 | 0.103004 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052265 | 0.065147 | 307 | 8 | 120 | 38.375 | 0.759582 | 0.234528 | 0 | 0 | 1 | 0 | 0.217949 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
35bee0dab6564aeebd86827daf4311898db81ec2 | 184 | py | Python | project_name/urls.py | cirlabs/django-project-template | 8d96cfaff18ef7958591387ea1d1df656d2bc2ab | [
"MIT",
"Unlicense"
] | 15 | 2015-03-06T16:21:27.000Z | 2020-03-25T02:21:40.000Z | project_name/urls.py | josnin/django-project-template | 8d96cfaff18ef7958591387ea1d1df656d2bc2ab | [
"MIT",
"Unlicense"
] | 60 | 2015-01-08T20:36:46.000Z | 2016-04-19T00:21:59.000Z | project_name/urls.py | cirlabs/django-project-template | 8d96cfaff18ef7958591387ea1d1df656d2bc2ab | [
"MIT",
"Unlicense"
] | 12 | 2015-03-01T03:33:20.000Z | 2022-03-30T23:35:11.000Z | from django.contrib import admin
from django.conf.urls import patterns, include, url
admin.autodiscover()
urlpatterns = patterns('',
# Admin
(r'^admin/', admin.site.urls),
)
| 18.4 | 51 | 0.706522 | 23 | 184 | 5.652174 | 0.608696 | 0.153846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.157609 | 184 | 9 | 52 | 20.444444 | 0.83871 | 0.027174 | 0 | 0 | 0 | 0 | 0.039548 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
35c32710c2d120f84df9439fb0e2288578d6ff2a | 309 | py | Python | datalad_osf/osfclient/osfclient/models/__init__.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | 80 | 2017-10-24T05:06:00.000Z | 2022-02-20T18:44:17.000Z | datalad_osf/osfclient/osfclient/models/__init__.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | 133 | 2017-03-07T22:36:54.000Z | 2017-10-24T04:43:57.000Z | datalad_osf/osfclient/osfclient/models/__init__.py | adswa/datalad-osf-2 | 25988f898ffc6f489c0855933136f39f79cf8c65 | [
"BSD-3-Clause"
] | 37 | 2017-10-26T03:34:17.000Z | 2021-11-17T05:24:10.000Z | """Model OSF entities.
Users should not have to instantiate classes from here, instead they should
use `osfclient.OSF()` to access the OSF.
"""
from .core import OSFCore
from .file import File
from .file import Folder
from .project import Project
from .session import OSFSession
from .storage import Storage
| 25.75 | 75 | 0.783172 | 46 | 309 | 5.26087 | 0.586957 | 0.066116 | 0.115702 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.152104 | 309 | 11 | 76 | 28.090909 | 0.923664 | 0.443366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
35c3f69b32c67376d0c0eed43825629cc18230c7 | 540 | py | Python | amu_bachelor_thesis_app/views/auth_views.py | remes2000/amu_bachelor_thesis | 9e0a97f5e28ab65d7953e38dedbab8fe8f04f6cd | [
"MIT"
] | null | null | null | amu_bachelor_thesis_app/views/auth_views.py | remes2000/amu_bachelor_thesis | 9e0a97f5e28ab65d7953e38dedbab8fe8f04f6cd | [
"MIT"
] | null | null | null | amu_bachelor_thesis_app/views/auth_views.py | remes2000/amu_bachelor_thesis | 9e0a97f5e28ab65d7953e38dedbab8fe8f04f6cd | [
"MIT"
] | null | null | null | from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from django.urls import reverse
from amu_bachelor_thesis_app.models import User
@login_required
def login_redirect(request):
if not request.user.is_authenticated:
return HttpResponse('Unauthorized', status=401)
if request.user.role == User.SUPERUSER:
return HttpResponseRedirect(reverse('amu_bachelor_thesis:home'))
return HttpResponseRedirect(reverse('amu_bachelor_thesis:search_engine'))
| 31.764706 | 77 | 0.801852 | 65 | 540 | 6.476923 | 0.538462 | 0.071259 | 0.12114 | 0.171021 | 0.23753 | 0.23753 | 0 | 0 | 0 | 0 | 0 | 0.006342 | 0.124074 | 540 | 16 | 78 | 33.75 | 0.883721 | 0 | 0 | 0 | 0 | 0 | 0.128253 | 0.105948 | 0 | 0 | 0 | 0 | 0 | 1 | 0.090909 | false | 0 | 0.363636 | 0 | 0.727273 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
35cbdb886d2da0ba36553593e2cf231f34246352 | 260 | py | Python | linza/__init__.py | wallarelvo/linza | a27b9f3c565d145b12d93898765e3d8f7add1cd0 | [
"Apache-2.0"
] | 1 | 2015-02-22T18:03:48.000Z | 2015-02-22T18:03:48.000Z | linza/__init__.py | wallarelvo/linza | a27b9f3c565d145b12d93898765e3d8f7add1cd0 | [
"Apache-2.0"
] | null | null | null | linza/__init__.py | wallarelvo/linza | a27b9f3c565d145b12d93898765e3d8f7add1cd0 | [
"Apache-2.0"
] | 2 | 2017-02-10T18:28:47.000Z | 2020-02-25T03:19:08.000Z |
__all__ = ["Planner", "Linza", "nn_roadmap", "Visualizer", "grid_graph",
"PositiveSine"]
from planner import Planner
from linza import Linza
from visualizer import Visualizer
from graphs import nn_roadmap, grid_graph
from sine import PositiveSine
| 26 | 72 | 0.757692 | 32 | 260 | 5.90625 | 0.40625 | 0.095238 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.161538 | 260 | 9 | 73 | 28.888889 | 0.866972 | 0 | 0 | 0 | 0 | 0 | 0.208494 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.714286 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
35dcb29d4cc63db21b565dbca9e09344a24922ac | 319 | py | Python | exercicios/ex004.py | Siqueira-Vinicius/Python | bd1f7e2bcdfd5481724d32db387f51636bb4ad60 | [
"MIT"
] | null | null | null | exercicios/ex004.py | Siqueira-Vinicius/Python | bd1f7e2bcdfd5481724d32db387f51636bb4ad60 | [
"MIT"
] | null | null | null | exercicios/ex004.py | Siqueira-Vinicius/Python | bd1f7e2bcdfd5481724d32db387f51636bb4ad60 | [
"MIT"
] | null | null | null | x = input('Digite algo:')
print('o tipo da variavel é', type(x))
print('é apenas numerico?', x.isnumeric())
print('é apenas alfabetico?', x.isalpha())
print('é apenas maiusculo?', x.isupper())
print('é apenas minusculo?', x.islower())
print('é numerico e alfabetico?', x.isalnum())
print('Só tem espaços?', x.isspace()) | 39.875 | 46 | 0.683386 | 49 | 319 | 4.44898 | 0.530612 | 0.137615 | 0.220183 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106583 | 319 | 8 | 47 | 39.875 | 0.764912 | 0 | 0 | 0 | 0 | 0 | 0.459375 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.875 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
35e0ee04c80e3610d8ef7bfc588b5f4ce4d30518 | 492 | py | Python | salesforce_api/utils/misc.py | dont-panic-llc/python-salesforce-api | 793011ec32248f7ccf37339c0c0f5087980b9270 | [
"MIT"
] | null | null | null | salesforce_api/utils/misc.py | dont-panic-llc/python-salesforce-api | 793011ec32248f7ccf37339c0c0f5087980b9270 | [
"MIT"
] | null | null | null | salesforce_api/utils/misc.py | dont-panic-llc/python-salesforce-api | 793011ec32248f7ccf37339c0c0f5087980b9270 | [
"MIT"
] | 1 | 2020-04-20T06:06:16.000Z | 2020-04-20T06:06:16.000Z | import distutils.util
import requests
import hashlib
def parse_bool(input_value: str) -> bool:
return distutils.util.strtobool(input_value)
def get_session(session: requests.Session = None):
return session if isinstance(session, requests.Session) else requests.Session()
def hash_list(input_list):
if not isinstance(input_list, list) or input_list is None:
return None
return hashlib.md5(str(input_list).encode())\
.hexdigest()
| 27.333333 | 84 | 0.70122 | 63 | 492 | 5.333333 | 0.428571 | 0.107143 | 0.130952 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002577 | 0.211382 | 492 | 17 | 85 | 28.941176 | 0.863402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.166667 | 0.833333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
ea2a7a6994e778aadabb6ba539f5c811dc530594 | 458 | py | Python | run.py | nagataaaas/dinagon | a41f647ebe3feafedce1e68902ecb589999219ed | [
"MIT"
] | 1 | 2021-06-14T09:10:46.000Z | 2021-06-14T09:10:46.000Z | run.py | nagataaaas/dinagon | a41f647ebe3feafedce1e68902ecb589999219ed | [
"MIT"
] | 13 | 2021-06-21T08:59:57.000Z | 2022-01-23T16:29:38.000Z | run.py | nagataaaas/dinagon | a41f647ebe3feafedce1e68902ecb589999219ed | [
"MIT"
] | null | null | null | import uvicorn
from app.config import HOST, PORT, IS_DEV
from app.models import create_database, clear_database
from testing.load_fixture import load
from sqlalchemy.exc import IntegrityError
if __name__ == '__main__':
# clear_database()
# create_database()
# if IS_DEV:
# try:
# load()
# except IntegrityError:
# pass
uvicorn.run(app='app.routes:app', reload=True, host=HOST, port=PORT, workers=2)
| 25.444444 | 83 | 0.674672 | 58 | 458 | 5.068966 | 0.534483 | 0.047619 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002833 | 0.229258 | 458 | 17 | 84 | 26.941176 | 0.830028 | 0.237991 | 0 | 0 | 0 | 0 | 0.064516 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.714286 | 0 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
ea651a073123fe10b9a0e8f8dbfc6eda92fbdb68 | 438 | py | Python | full_cost/imag/migrations/0005_auto_20200122_1614.py | CEMES-CNRS/full_cost_git | 600409b49db123db82e7f66462395294dde320ce | [
"CECILL-B"
] | null | null | null | full_cost/imag/migrations/0005_auto_20200122_1614.py | CEMES-CNRS/full_cost_git | 600409b49db123db82e7f66462395294dde320ce | [
"CECILL-B"
] | null | null | null | full_cost/imag/migrations/0005_auto_20200122_1614.py | CEMES-CNRS/full_cost_git | 600409b49db123db82e7f66462395294dde320ce | [
"CECILL-B"
] | null | null | null | # Generated by Django 2.2.8 on 2020-01-22 15:14
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('imag', '0004_auto_20200122_1418'),
]
operations = [
migrations.RemoveField(
model_name='historicalrecord',
name='subexp',
),
migrations.RemoveField(
model_name='record',
name='subexp',
),
]
| 19.909091 | 47 | 0.56621 | 42 | 438 | 5.785714 | 0.714286 | 0.17284 | 0.213992 | 0.246914 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.104377 | 0.321918 | 438 | 21 | 48 | 20.857143 | 0.713805 | 0.10274 | 0 | 0.4 | 1 | 0 | 0.15601 | 0.058824 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.066667 | 0 | 0.266667 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
ea78da9568d3f117eb796bb5b388d91ada83b271 | 200 | py | Python | humans_api/apps/match/urls.py | isz/humans-api | b6a680f2a2f96f41d3773de598da0e790ece0764 | [
"BSD-3-Clause"
] | null | null | null | humans_api/apps/match/urls.py | isz/humans-api | b6a680f2a2f96f41d3773de598da0e790ece0764 | [
"BSD-3-Clause"
] | 5 | 2021-03-19T01:59:53.000Z | 2022-01-13T02:35:36.000Z | humans_api/apps/match/urls.py | isz/humans-api | b6a680f2a2f96f41d3773de598da0e790ece0764 | [
"BSD-3-Clause"
] | null | null | null | from django.urls import path
from rest_framework import routers
from . import views
urlpatterns = [
path(r"", views.MatchListView.as_view()),
path(r"<int:pk>/", views.MatchView.as_view()),
] | 22.222222 | 50 | 0.71 | 28 | 200 | 4.964286 | 0.607143 | 0.071942 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.145 | 200 | 9 | 51 | 22.222222 | 0.812866 | 0 | 0 | 0 | 0 | 0 | 0.044776 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.428571 | 0 | 0.428571 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
eaa14de049d6719899bb2b5982901501b303900b | 234 | py | Python | django-server/fras/attendance/serializers/CapturedFrameSerializer.py | ArleneAndrews/Facial-Recognition-Attendance-System | 104d17e56af87358974331ef491949b557ab2f01 | [
"MIT"
] | 52 | 2019-01-29T14:46:17.000Z | 2022-01-14T16:11:37.000Z | django-server/fras/attendance/serializers/CapturedFrameSerializer.py | etrigaen47/Facial-Recognition-Attendance-System | ad0bd18cf9582cc12002baf8c92f6638f632c46e | [
"MIT"
] | 13 | 2018-11-04T12:29:48.000Z | 2020-02-11T23:47:35.000Z | django-server/fras/attendance/serializers/CapturedFrameSerializer.py | etrigaen47/Facial-Recognition-Attendance-System | ad0bd18cf9582cc12002baf8c92f6638f632c46e | [
"MIT"
] | 16 | 2019-03-07T11:07:16.000Z | 2021-08-13T07:19:28.000Z | from rest_framework import serializers
from attendance.models.CapturedFrame import CapturedFrame
class CapturedFrameSerializer(serializers.ModelSerializer):
class Meta:
model = CapturedFrame
fields = '__all__'
| 21.272727 | 59 | 0.773504 | 21 | 234 | 8.380952 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.179487 | 234 | 10 | 60 | 23.4 | 0.916667 | 0 | 0 | 0 | 0 | 0 | 0.029915 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.666667 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
576f17ecb141a3f161e50137110468d8282a86bf | 3,011 | py | Python | se34euca/lib/EucaUITestLib_IP_Address.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | 8 | 2015-01-08T21:06:08.000Z | 2019-10-26T13:17:16.000Z | se34euca/lib/EucaUITestLib_IP_Address.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | null | null | null | se34euca/lib/EucaUITestLib_IP_Address.py | eucalyptus/se34euca | af5da36754fccca84b7f260ba7605b8fdc30fa55 | [
"BSD-2-Clause"
] | 7 | 2016-08-31T07:02:21.000Z | 2020-07-18T00:10:36.000Z | from se34euca.lib.EucaUITestLib_Base import *
class EucaUITestLib_IP_Address(EucaUITestLib_Base):
def test_ui_allocate_ip_address(self, ip_count):
print
print "Started Test: Allocate IP Address: IP_COUNT " + str(ip_count)
print
self.click_element_by_link_text("Dashboard")
self.verify_element_by_link_text("Launch new instance")
print
print "Test: Go to the Page IP Address"
self.click_element_by_id("dashboard-netsec-eip")
time.sleep(3)
self.click_element_by_id("table-eips-new")
self.verify_element_by_id("eip-allocate-count")
print
print "Test: Allocate IP Address"
self.set_keys_by_id("eip-allocate-count", str(ip_count))
self.click_element_by_id("eip-allocate-btn")
print
print "Finished: Allocate IP Addresses"
print
return 0
def test_ui_check_ip_address_count(self, ip_count):
print
print "Started Test: Check IP Address Count"
print
self.click_element_by_link_text("Dashboard")
self.verify_element_by_link_text("Launch new instance")
time.sleep(3)
print "Verifying that IP Address Count on Dashboard is " + ip_count
self.verify_text_displayed_by_css("#dashboard-netsec-eip > span", ip_count)
print
print "Finished Test: IP Address Count"
print
return 0
def test_ui_release_ip_address_all(self):
print
print "Started Test: Release IP Address"
print
self.click_element_by_link_text("Dashboard")
self.verify_element_by_link_text("Launch new instance")
print
print "Test: Go to the Page IP Address"
self.click_element_by_css_selector("#dashboard-netsec-eip > span")
time.sleep(3)
self.click_element_by_id("eips-check-all")
self.click_element_by_id("more-actions-eips")
self.click_element_by_link_text("Release to cloud")
self.click_element_by_id("btn-eips-release-release")
print
print "Finished: Release IP Address"
print
return 0
def test_ui_get_available_ip_address(self):
'''
Returns an available IP address at random
'''
print
print "Started Test: Get Available IP Address"
print
self.click_element_by_link_text("Dashboard")
self.click_element_by_link_text("Network & Security")
self.click_element_by_link_text("IP Addresses")
time.sleep(3)
self.click_element_by_css_selector("div.VS-search-inner")
self.click_element_by_link_text("Assignment")
self.click_element_by_link_text("Unassigned")
time.sleep(3)
available_ip = self.get_text_by_xpath("//table[@id='eips']/tbody/tr/td[2]")
print
print "Finished Test: Get Available IP Address. Returning IP: " + available_ip
print
return available_ip
if __name__ == "__main__":
unittest.main()
| 34.609195 | 86 | 0.660578 | 400 | 3,011 | 4.6525 | 0.2125 | 0.101558 | 0.146158 | 0.164428 | 0.511553 | 0.42504 | 0.31166 | 0.262225 | 0.229984 | 0.229984 | 0 | 0.004893 | 0.253404 | 3,011 | 86 | 87 | 35.011628 | 0.822954 | 0 | 0 | 0.5 | 0 | 0 | 0.287802 | 0.033979 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.013889 | null | null | 0.430556 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
577e485407058af16724b536b98c0eebdac167ea | 269 | py | Python | simulation/models/env_db/ci_roads/traffic_island.py | LeonardII/KitCarFork | b2802c5b08cc8250446ce3731cb622af064db4ca | [
"MIT"
] | 13 | 2020-06-30T17:18:28.000Z | 2021-07-20T16:55:35.000Z | simulation/models/env_db/ci_roads/traffic_island.py | LeonardII/KitCarFork | b2802c5b08cc8250446ce3731cb622af064db4ca | [
"MIT"
] | 1 | 2020-11-10T20:15:42.000Z | 2020-12-25T18:27:56.000Z | simulation/models/env_db/ci_roads/traffic_island.py | LeonardII/KitCarFork | b2802c5b08cc8250446ce3731cb622af064db4ca | [
"MIT"
] | 3 | 2020-07-20T09:09:08.000Z | 2021-07-20T17:00:37.000Z | from simulation.utils.road.road import Road
from simulation.utils.road.sections import StraightRoad, TrafficIsland
road = Road()
road.append(StraightRoad(length=3))
road.append(TrafficIsland(zebra_marking_type=TrafficIsland.LINES))
road.append(StraightRoad(length=2))
| 33.625 | 70 | 0.832714 | 35 | 269 | 6.342857 | 0.457143 | 0.108108 | 0.171171 | 0.207207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007905 | 0.05948 | 269 | 7 | 71 | 38.428571 | 0.869565 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 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 | 0 | 0 | 0 | 3 |
577ee228f592900c99d73bd8d1baf5b93fbdf545 | 656 | py | Python | python_pass.py | aliradi3/python-pass | 562d8164f901fec104ce72441d274d07a1fe7b4c | [
"MIT"
] | null | null | null | python_pass.py | aliradi3/python-pass | 562d8164f901fec104ce72441d274d07a1fe7b4c | [
"MIT"
] | null | null | null | python_pass.py | aliradi3/python-pass | 562d8164f901fec104ce72441d274d07a1fe7b4c | [
"MIT"
] | null | null | null | """
Instructions:
1. Create a class named ReversedString that inherits from StringOperations class
2. Implement the function reverse
3. reverse function should be a one liner function that returns the reverse string to_be_reversed
4. Instantiate the class ReversedString
5. Print to show your function implementation result
"""
class StringOperations:
def reverse(self, *, to_be_reversed: str ):return to_be_reversed[::-1]
class ReversedString (StringOperations):
def init(self):
super().reverse()
message = ReversedString.reverse(self=None,to_be_reversed="!nohtyP ot emocleW")
#The output = Welcome to Python!
print(message)
| 27.333333 | 97 | 0.76372 | 87 | 656 | 5.666667 | 0.54023 | 0.032454 | 0.097363 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.01087 | 0.158537 | 656 | 23 | 98 | 28.521739 | 0.882246 | 0.536585 | 0 | 0 | 0 | 0 | 0.060811 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0 | 0.142857 | 0.571429 | 0.142857 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
5783b7eb00929c612e2eb71e5fc68e44330f8425 | 174 | py | Python | app.py | jepster/python_for_web | ee4fa0922e54427521b93f2dd905ee92b462ce6f | [
"MIT"
] | null | null | null | app.py | jepster/python_for_web | ee4fa0922e54427521b93f2dd905ee92b462ce6f | [
"MIT"
] | null | null | null | app.py | jepster/python_for_web | ee4fa0922e54427521b93f2dd905ee92b462ce6f | [
"MIT"
] | null | null | null | from flask import Flask, request
app = Flask(__name__)
"""
Run like this:
> flask run --host 0.0.0.0 --port 3000
"""
@app.route('/')
def home():
return 'hello world!' | 14.5 | 38 | 0.626437 | 27 | 174 | 3.888889 | 0.703704 | 0.057143 | 0.057143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.056738 | 0.189655 | 174 | 12 | 39 | 14.5 | 0.687943 | 0 | 0 | 0 | 0 | 0 | 0.115044 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.2 | 0.2 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
5784aa445ed0f90d3f5d480f21462c433d6f4075 | 185 | py | Python | 001-math/001-Greatest Common Divisor/Python/Solution.py | raveerocks/problem-solving | 0d3980ac68e434500762ba09c501284846a3df51 | [
"MIT"
] | 1 | 2020-07-10T19:29:11.000Z | 2020-07-10T19:29:11.000Z | 001-math/001-Greatest Common Divisor/Python/Solution.py | raveerocks/problem-solving | 0d3980ac68e434500762ba09c501284846a3df51 | [
"MIT"
] | null | null | null | 001-math/001-Greatest Common Divisor/Python/Solution.py | raveerocks/problem-solving | 0d3980ac68e434500762ba09c501284846a3df51 | [
"MIT"
] | 1 | 2020-07-11T07:17:51.000Z | 2020-07-11T07:17:51.000Z | class Solution:
# @param A : integer
# @param B : integer
# @return an integer
def gcd(self,A, B):
if(B==0):
return A
return self.gcd(B,A%B)
| 20.555556 | 30 | 0.502703 | 27 | 185 | 3.444444 | 0.481481 | 0.043011 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008547 | 0.367568 | 185 | 8 | 31 | 23.125 | 0.786325 | 0.302703 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0 | 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 | 0 | 0 | 1 | 0 | 0 | 3 |
57a798db617631067d2ae447d71f07fff528086c | 232 | py | Python | utils/templatetags/jsonify.py | bulv1ne/django_utils | bf19923dcfdff5c2655500e5b61962c479074d58 | [
"MIT"
] | 1 | 2017-05-05T11:57:26.000Z | 2017-05-05T11:57:26.000Z | utils/templatetags/jsonify.py | bulv1ne/django_utils | bf19923dcfdff5c2655500e5b61962c479074d58 | [
"MIT"
] | 2 | 2021-04-06T18:14:52.000Z | 2021-06-01T22:46:45.000Z | utils/templatetags/jsonify.py | bulv1ne/django-utils | bf19923dcfdff5c2655500e5b61962c479074d58 | [
"MIT"
] | null | null | null | import json
from django import template
from django.utils.safestring import mark_safe
register = template.Library()
@register.filter(is_safe=True)
def jsonify(obj, indent=0):
return mark_safe(json.dumps(obj, indent=indent))
| 19.333333 | 52 | 0.780172 | 34 | 232 | 5.235294 | 0.617647 | 0.11236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004902 | 0.12069 | 232 | 11 | 53 | 21.090909 | 0.867647 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.428571 | 0.142857 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 3 |
57bdbb2a62c8a58448b5d8da7d9d80037df16631 | 739 | py | Python | core/projects/migrations/0005_auto_20211016_1626.py | Nikita-Filonov/lama_logger | 7b3f474ddf35685e6949ab00d7272d16c630295c | [
"Apache-2.0"
] | null | null | null | core/projects/migrations/0005_auto_20211016_1626.py | Nikita-Filonov/lama_logger | 7b3f474ddf35685e6949ab00d7272d16c630295c | [
"Apache-2.0"
] | null | null | null | core/projects/migrations/0005_auto_20211016_1626.py | Nikita-Filonov/lama_logger | 7b3f474ddf35685e6949ab00d7272d16c630295c | [
"Apache-2.0"
] | 1 | 2021-12-21T09:39:02.000Z | 2021-12-21T09:39:02.000Z | # Generated by Django 3.2.7 on 2021-10-16 16:26
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('projects', '0004_rename_last_updated_project_lastupdated'),
]
operations = [
migrations.RenameField(
model_name='projectsettings',
old_name='exclude_methods',
new_name='excludeMethods',
),
migrations.RenameField(
model_name='projectsettings',
old_name='exclude_statuses',
new_name='excludeStatuses',
),
migrations.RenameField(
model_name='projectsettings',
old_name='filter_methods',
new_name='filterMethods',
),
]
| 25.482759 | 69 | 0.598106 | 66 | 739 | 6.439394 | 0.590909 | 0.148235 | 0.183529 | 0.211765 | 0.4 | 0.4 | 0.4 | 0.277647 | 0 | 0 | 0 | 0.036893 | 0.303112 | 739 | 28 | 70 | 26.392857 | 0.78835 | 0.060893 | 0 | 0.409091 | 1 | 0 | 0.265896 | 0.063584 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.045455 | 0 | 0.181818 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
57e9846f6dd730c9b6f417b346518e8d5a1c38d4 | 750 | py | Python | flask_modular_auth/__init__.py | fabian-rump/flask_modular_auth | 509def7b2cb366cba5d0d18187d99932c8ca00ef | [
"MIT"
] | null | null | null | flask_modular_auth/__init__.py | fabian-rump/flask_modular_auth | 509def7b2cb366cba5d0d18187d99932c8ca00ef | [
"MIT"
] | null | null | null | flask_modular_auth/__init__.py | fabian-rump/flask_modular_auth | 509def7b2cb366cba5d0d18187d99932c8ca00ef | [
"MIT"
] | null | null | null | from .manager import AuthManager
from .abstract import AbstractAuthProvider, AbstractAuthEntity, AbstractUnauthenticatedEntity, AbstractPrivilege
from .privilege import AndPrivilege, RolePrivilege, AuthenticatedPrivilege
from .auth_providers import BasicAuthProvider, KeyBasedAuthProvider, SessionBasedAuthProvider
from .utils import current_authenticated_entity, privilege_required
__all__ = [
'AuthManager',
'AbstractAuthProvider',
'AbstractAuthEntity',
'AbstractUnauthenticatedEntity',
'AbstractPrivilege',
'AndPrivilege',
'RolePrivilege',
'AuthenticatedPrivilege',
'BasicAuthProvider',
'KeyBasedAuthProvider',
'SessionBasedAuthProvider',
'current_authenticated_entity',
'privilege_required'
]
| 34.090909 | 112 | 0.797333 | 49 | 750 | 11.979592 | 0.489796 | 0.129472 | 0.228279 | 0.286201 | 0.146508 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.130667 | 750 | 21 | 113 | 35.714286 | 0.900307 | 0 | 0 | 0 | 0 | 0 | 0.332 | 0.137333 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.25 | 0 | 0.25 | 0 | 0 | 0 | 1 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
17bb696fe1f5a70b3168e3c06a9c22f80f617101 | 1,692 | py | Python | artifacts-corepy/artifacts_corepy/common/controller.py | WeBankPartners/wecube-plugins-artifacts | dd3b45648f9d40de83fae2b9b1bf8e8c82e90ccd | [
"Apache-2.0"
] | 22 | 2019-11-26T00:38:49.000Z | 2021-07-16T05:52:43.000Z | artifacts-corepy/artifacts_corepy/common/controller.py | WeBankPartners/wecube-plugins-artifacts | dd3b45648f9d40de83fae2b9b1bf8e8c82e90ccd | [
"Apache-2.0"
] | 101 | 2019-11-21T02:25:16.000Z | 2021-06-03T10:48:33.000Z | artifacts-corepy/artifacts_corepy/common/controller.py | WeBankPartners/wecube-plugins-artifacts | dd3b45648f9d40de83fae2b9b1bf8e8c82e90ccd | [
"Apache-2.0"
] | 8 | 2019-12-03T09:24:33.000Z | 2022-02-11T13:55:38.000Z | # coding=utf-8
from __future__ import absolute_import
import falcon
from talos.common.controller import CollectionController
from talos.common.controller import ItemController
from talos.core import exceptions
from talos.core import utils
from talos.core.i18n import _
from artifacts_corepy.common import exceptions as my_exceptions
class Collection(CollectionController):
def on_get(self, req, resp, **kwargs):
self._validate_method(req)
resp.json = {'code': 200, 'status': 'OK', 'data': self.list(req, None, **kwargs), 'message': 'success'}
def list(self, req, criteria, **kwargs):
return self.make_resource(req).list(req.params, **kwargs)
class Item(ItemController):
def on_get(self, req, resp, **kwargs):
self._validate_method(req)
resp.json = {'code': 200, 'status': 'OK', 'data': self.get(req, **kwargs), 'message': 'success'}
def get(self, req, **kwargs):
return self.make_resource(req).get(**kwargs)
def on_post(self, req, resp, **kwargs):
self._validate_method(req)
self._validate_data(req)
data = req.json
resp.json = {'code': 200, 'status': 'OK', 'data': self.update(req, data, **kwargs), 'message': 'success'}
def update(self, req, data, **kwargs):
return self.make_resource(req).update(data, **kwargs)
class POSTCollection(CollectionController):
def on_post(self, req, resp, **kwargs):
self._validate_method(req)
resp.json = {'code': 200, 'status': 'OK', 'data': self.list(req, None, **kwargs), 'message': 'success'}
def list(self, req, criteria, **kwargs):
return self.make_resource(req).list_by_post(req.json, **kwargs) | 35.25 | 113 | 0.669622 | 219 | 1,692 | 5.045662 | 0.237443 | 0.050679 | 0.039819 | 0.061538 | 0.552036 | 0.495928 | 0.439819 | 0.439819 | 0.411765 | 0.411765 | 0 | 0.010791 | 0.178487 | 1,692 | 48 | 114 | 35.25 | 0.784173 | 0.007092 | 0 | 0.363636 | 0 | 0 | 0.071471 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.242424 | false | 0 | 0.242424 | 0.121212 | 0.69697 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
17bb6ffd54ee4946827040e7eeb8313c64eac49f | 887 | py | Python | tests/test_compilers_git.py | collectiveacuity/labPack | c8fb0d1ee23608f6dbcb99c232373eee886000fd | [
"MIT"
] | 2 | 2017-06-20T15:20:46.000Z | 2019-11-18T01:28:49.000Z | tests/test_compilers_git.py | collectiveacuity/labPack | c8fb0d1ee23608f6dbcb99c232373eee886000fd | [
"MIT"
] | null | null | null | tests/test_compilers_git.py | collectiveacuity/labPack | c8fb0d1ee23608f6dbcb99c232373eee886000fd | [
"MIT"
] | null | null | null | __author__ = 'rcj1492'
__created__ = '2021.03'
__license__ = '©2021 Collective Acuity'
from labpack.compilers.git import merge_diff
if __name__ == '__main__':
f1 = 'test20210330a.scss'
f2 = 'test20210330b.scss'
f3 = 'test20210330c.scss'
merged = merge_diff(f1, f2, f3)
assert merged.find('// A new header') == 0
assert merged.find('$index-content') < merged.find('$index-header')
assert merged.find('// a new sections') < merged.find('// determine line heights')
assert merged.find('// a new section at end') > merged.find('$height-title')
assert merged.find('$width-desktop: 1750') == -1
assert merged.find('a new comment') == -1
assert merged.find('// change near end') == -1
assert merged.find('$height-title: 10028;') == -1
assert merged.find('$height-portrait-ratio: 1;') + len('$height-portrait-ratio: 1;') == len(merged) | 40.318182 | 103 | 0.65389 | 116 | 887 | 4.818966 | 0.474138 | 0.214669 | 0.257603 | 0.121646 | 0.296959 | 0 | 0 | 0 | 0 | 0 | 0 | 0.081744 | 0.172492 | 887 | 22 | 103 | 40.318182 | 0.678474 | 0 | 0 | 0 | 0 | 0 | 0.386261 | 0.051802 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | false | 0 | 0.055556 | 0 | 0.055556 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
17c0537a4564982f3863efa58c767032a719be8b | 523 | py | Python | project0/companies/views.py | priyanshgupta1998/Python-django | 00ed73ddf22ebaaec9221c766f934d4fe42a3778 | [
"MIT"
] | null | null | null | project0/companies/views.py | priyanshgupta1998/Python-django | 00ed73ddf22ebaaec9221c766f934d4fe42a3778 | [
"MIT"
] | null | null | null | project0/companies/views.py | priyanshgupta1998/Python-django | 00ed73ddf22ebaaec9221c766f934d4fe42a3778 | [
"MIT"
] | null | null | null | from .serializers import serializers
from .models import Stock
from django.shortcuts import get_object_or_404
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
#Lists all stocks or create a new one
#stcoks/
class StockList(APIView):
def get(self , request):
stocks = Stock.objects.all()
serializer = StockSerializer(stocks , many = True)
return Response(serializer.data)
def post(self):
pass | 30.764706 | 59 | 0.720841 | 66 | 523 | 5.621212 | 0.590909 | 0.06469 | 0.137466 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.007353 | 0.219885 | 523 | 17 | 60 | 30.764706 | 0.901961 | 0.082218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.153846 | false | 0.076923 | 0.461538 | 0 | 0.769231 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 3 |
17f10ab53c97e13a619aa93ab20fb0ad601b0807 | 156 | py | Python | service/backend/logger.py | Shamilv05/Currency-Receiver | 9f98d9c9c809bfaeb834d19813f69cd221623a30 | [
"MIT"
] | null | null | null | service/backend/logger.py | Shamilv05/Currency-Receiver | 9f98d9c9c809bfaeb834d19813f69cd221623a30 | [
"MIT"
] | null | null | null | service/backend/logger.py | Shamilv05/Currency-Receiver | 9f98d9c9c809bfaeb834d19813f69cd221623a30 | [
"MIT"
] | null | null | null | import logging
from aiomisc.log import basic_config
basic_config(level=logging.INFO, buffered=False, log_format='json')
log = logging.getLogger('service')
| 26 | 67 | 0.807692 | 22 | 156 | 5.590909 | 0.681818 | 0.178862 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083333 | 156 | 5 | 68 | 31.2 | 0.86014 | 0 | 0 | 0 | 0 | 0 | 0.070513 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
17fd6f011175c9a0340c90ec75a1eaaa05adb45b | 813 | py | Python | volatility/framework/interfaces/__init__.py | dl9rdz/volatility3 | 9d9cdfb7d43b98662089503fdb85f103d551b543 | [
"Linux-OpenIB"
] | 3 | 2021-05-31T19:43:14.000Z | 2021-08-02T00:09:26.000Z | volatility/framework/interfaces/__init__.py | dl9rdz/volatility3 | 9d9cdfb7d43b98662089503fdb85f103d551b543 | [
"Linux-OpenIB"
] | null | null | null | volatility/framework/interfaces/__init__.py | dl9rdz/volatility3 | 9d9cdfb7d43b98662089503fdb85f103d551b543 | [
"Linux-OpenIB"
] | 1 | 2021-06-14T13:32:53.000Z | 2021-06-14T13:32:53.000Z | # This file is Copyright 2019 Volatility Foundation and licensed under the Volatility Software License 1.0
# which is available at https://www.volatilityfoundation.org/license/vsl-v1.0
#
"""The interfaces module contains the API interface for the core volatility
framework.
These interfaces should help developers attempting to write components
for the main framework and help them understand how to use the internal
components of volatility to write plugins.
"""
# Import the submodules we want people to be able to use without importing them themselves
# This will also avoid namespace issues, because people can use interfaces.layers to
# avoid clashing with the layers package
from volatility.framework.interfaces import renderers, configuration, context, layers, objects, plugins, symbols, \
automagic
| 47.823529 | 115 | 0.810578 | 115 | 813 | 5.730435 | 0.66087 | 0.018209 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.011511 | 0.145141 | 813 | 16 | 116 | 50.8125 | 0.936691 | 0.815498 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
aa0b3c5f7a01e2d58f0aee17288e6fe813c07ac2 | 529 | py | Python | passwordhelper.py | andrusstrockiy/uploads | 3b4199c519f5ed65938e2491a0feb201e9b985ce | [
"Apache-2.0"
] | null | null | null | passwordhelper.py | andrusstrockiy/uploads | 3b4199c519f5ed65938e2491a0feb201e9b985ce | [
"Apache-2.0"
] | null | null | null | passwordhelper.py | andrusstrockiy/uploads | 3b4199c519f5ed65938e2491a0feb201e9b985ce | [
"Apache-2.0"
] | null | null | null | import hashlib
import os
import base64
class PasswordHelper:
def get_hash(self, plain):
hash = hashlib.sha512()
hash.update(('%s%s' % (self.get_salt(), plain)).encode('utf-8'))
return hash.hexdigest()
def get_salt(self):
password_salt = os.urandom(32).hex()
return password_salt
# return base64.b64encode(os.urandom(20))
def validate_password(self, plain, salt, expected):
print(plain, salt, expected)
return self.get_hash(plain + salt) == expected
| 26.45 | 72 | 0.638941 | 67 | 529 | 4.940299 | 0.432836 | 0.081571 | 0.154079 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.034568 | 0.234405 | 529 | 19 | 73 | 27.842105 | 0.782716 | 0.073724 | 0 | 0 | 0 | 0 | 0.018443 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0.285714 | 0.214286 | 0 | 0.714286 | 0.071429 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
aa1d1145381d2ac071008866a8aec6b198c1f460 | 356 | py | Python | qtrio/_tests/test_cli.py | nodeselector/qtrio | 4bc25ef97d7e6e01a9751de9c84a4214e637e9d4 | [
"Apache-2.0",
"MIT"
] | null | null | null | qtrio/_tests/test_cli.py | nodeselector/qtrio | 4bc25ef97d7e6e01a9751de9c84a4214e637e9d4 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-03-30T21:14:20.000Z | 2021-03-30T21:14:20.000Z | qtrio/_tests/test_cli.py | nodeselector/qtrio | 4bc25ef97d7e6e01a9751de9c84a4214e637e9d4 | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import pathlib
import subprocess
import sys
import sysconfig
def test_emissions_help_dash_m():
"""The CLI run via ``python -m qtrio`` doesn't fail when asked for --help for the
emissions example. Woooot more stuff.
"""
subprocess.run(
[sys.executable, "-m", "qtrio", "examples", "emissions", "--help"], check=True
)
| 23.733333 | 86 | 0.671348 | 48 | 356 | 4.895833 | 0.666667 | 0.110638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.202247 | 356 | 14 | 87 | 25.428571 | 0.827465 | 0.325843 | 0 | 0 | 0 | 0 | 0.133333 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | true | 0 | 0.555556 | 0 | 0.666667 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
aa34887cc8378c05890e7cf48ffccedf21b0721e | 277 | py | Python | tests/test_mceditlib/session_lock_test.py | elcarrion06/mcedit2 | 4bb98da521447b6cf43d923cea9f00acf2f427e9 | [
"BSD-3-Clause"
] | 673 | 2015-01-02T02:08:13.000Z | 2022-03-24T19:38:14.000Z | tests/test_mceditlib/session_lock_test.py | ozzhates/mcedit2 | 4bb98da521447b6cf43d923cea9f00acf2f427e9 | [
"BSD-3-Clause"
] | 526 | 2015-01-01T02:10:53.000Z | 2022-02-06T16:24:21.000Z | tests/test_mceditlib/session_lock_test.py | ozzhates/mcedit2 | 4bb98da521447b6cf43d923cea9f00acf2f427e9 | [
"BSD-3-Clause"
] | 231 | 2015-01-01T16:47:30.000Z | 2022-03-31T21:51:55.000Z | from mceditlib.anvil.adapter import SessionLockLost
from mceditlib.worldeditor import WorldEditor
import pytest
def test_session_lock(pc_world):
level2 = WorldEditor(pc_world.filename, resume=False)
with pytest.raises(SessionLockLost):
pc_world.saveChanges()
| 27.7 | 57 | 0.797834 | 33 | 277 | 6.545455 | 0.636364 | 0.097222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.004167 | 0.133574 | 277 | 9 | 58 | 30.777778 | 0.895833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.428571 | 0 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
aa3ab1da9543a953e682464e46874e56b7adea5a | 52,778 | py | Python | template_container_human/labels/slice_150.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_human/labels/slice_150.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | template_container_human/labels/slice_150.py | lkondratova/Brainplot | 3c8a88c1995dedeaa5cbd88ee71499c7cf9c571d | [
"MIT"
] | null | null | null | coordinates_E0E1E1 = ((125, 114),
(126, 93), (126, 114), (126, 130), (126, 132), (127, 92), (127, 93), (127, 104), (127, 114), (127, 115), (127, 130), (128, 91), (128, 92), (128, 102), (128, 104), (128, 114), (128, 117), (128, 119), (128, 131), (128, 132), (129, 91), (129, 101), (129, 114), (129, 119), (129, 131), (129, 132), (130, 86), (130, 87), (130, 88), (130, 91), (130, 114), (130, 116), (130, 118), (130, 131), (130, 133), (131, 82), (131, 84), (131, 85), (131, 90), (131, 115), (131, 118), (131, 131), (132, 87), (132, 90), (132, 116), (132, 118), (132, 132), (133, 89), (133, 91), (133, 117), (133, 119), (133, 130), (133, 131), (134, 90), (134, 91), (134, 118), (134, 119), (134, 130), (135, 90), (135, 91), (135, 101), (135, 106), (135, 108), (135, 119), (135, 121), (135, 122), (135, 125), (135, 129), (135, 130), (135, 138), (136, 91), (136, 92), (136, 102),
(136, 104), (136, 105), (136, 109), (136, 119), (136, 126), (136, 129), (136, 138), (137, 91), (137, 92), (137, 104), (137, 107), (137, 108), (137, 120), (137, 122), (137, 123), (137, 124), (137, 125), (137, 128), (137, 136), (137, 137), (138, 90), (138, 92), (138, 106), (138, 108), (138, 109), (138, 112), (138, 120), (138, 122), (138, 123), (138, 124), (138, 125), (138, 127), (138, 135), (138, 136), (139, 90), (139, 93), (139, 107), (139, 109), (139, 110), (139, 113), (139, 120), (139, 122), (139, 123), (139, 124), (139, 125), (139, 127), (139, 134), (139, 135), (140, 89), (140, 91), (140, 93), (140, 107), (140, 114), (140, 115), (140, 118), (140, 119), (140, 120), (140, 121), (140, 122), (140, 123), (140, 124), (140, 125), (140, 127), (140, 133), (140, 135), (141, 88), (141, 94), (141, 108), (141, 110), (141, 111), (141, 112), (141, 116),
(141, 117), (141, 120), (141, 121), (141, 122), (141, 123), (141, 124), (141, 125), (141, 126), (141, 128), (141, 132), (141, 135), (142, 86), (142, 87), (142, 88), (142, 89), (142, 90), (142, 91), (142, 92), (142, 93), (142, 95), (142, 108), (142, 114), (142, 118), (142, 119), (142, 120), (142, 121), (142, 122), (142, 123), (142, 124), (142, 125), (142, 126), (142, 127), (142, 130), (142, 131), (142, 133), (142, 135), (143, 85), (143, 94), (143, 96), (143, 115), (143, 117), (143, 118), (143, 119), (143, 120), (143, 121), (143, 122), (143, 123), (143, 124), (143, 125), (143, 126), (143, 127), (143, 128), (143, 132), (143, 133), (143, 134), (143, 136), (144, 97), (144, 99), (144, 101), (144, 115), (144, 117), (144, 118), (144, 119), (144, 120), (144, 121), (144, 122), (144, 123), (144, 124), (144, 125), (144, 126), (144, 127), (144, 128),
(144, 129), (144, 130), (144, 131), (144, 132), (144, 133), (144, 134), (144, 135), (144, 138), (145, 98), (145, 100), (145, 102), (145, 114), (145, 115), (145, 116), (145, 117), (145, 118), (145, 119), (145, 120), (145, 121), (145, 122), (145, 123), (145, 124), (145, 125), (145, 126), (145, 127), (145, 128), (145, 129), (145, 130), (145, 131), (145, 132), (145, 133), (145, 134), (145, 136), (146, 114), (146, 116), (146, 117), (146, 118), (146, 119), (146, 120), (146, 121), (146, 122), (146, 123), (146, 124), (146, 125), (146, 126), (146, 127), (146, 128), (146, 129), (146, 130), (146, 131), (146, 132), (146, 133), (146, 135), (147, 114), (147, 116), (147, 117), (147, 118), (147, 119), (147, 120), (147, 121), (147, 122), (147, 123), (147, 124), (147, 125), (147, 126), (147, 127), (147, 128), (147, 129), (147, 130), (147, 131), (147, 132), (147, 134),
(148, 114), (148, 116), (148, 117), (148, 118), (148, 119), (148, 120), (148, 121), (148, 122), (148, 123), (148, 124), (148, 125), (148, 126), (148, 127), (148, 128), (148, 129), (148, 130), (148, 131), (148, 132), (148, 134), (149, 115), (149, 117), (149, 118), (149, 119), (149, 120), (149, 121), (149, 122), (149, 123), (149, 124), (149, 125), (149, 126), (149, 127), (149, 128), (149, 129), (149, 130), (149, 131), (149, 132), (149, 134), (150, 116), (150, 118), (150, 119), (150, 120), (150, 121), (150, 122), (150, 123), (150, 124), (150, 125), (150, 126), (150, 127), (150, 128), (150, 129), (150, 130), (150, 131), (150, 132), (150, 134), (151, 95), (151, 116), (151, 117), (151, 118), (151, 119), (151, 120), (151, 121), (151, 122), (151, 123), (151, 124), (151, 125), (151, 126), (151, 127), (151, 128), (151, 129), (151, 130), (151, 131), (151, 132),
(151, 133), (151, 134), (151, 135), (151, 136), (151, 137), (151, 138), (151, 140), (152, 95), (152, 96), (152, 117), (152, 119), (152, 120), (152, 121), (152, 122), (152, 123), (152, 124), (152, 125), (152, 126), (152, 127), (152, 128), (152, 129), (152, 130), (152, 131), (152, 132), (152, 133), (152, 134), (152, 135), (152, 138), (152, 140), (153, 96), (153, 99), (153, 117), (153, 119), (153, 120), (153, 121), (153, 122), (153, 123), (153, 124), (153, 125), (153, 126), (153, 127), (153, 128), (153, 129), (153, 130), (153, 131), (153, 132), (153, 134), (154, 97), (154, 100), (154, 101), (154, 105), (154, 108), (154, 116), (154, 118), (154, 119), (154, 120), (154, 121), (154, 122), (154, 123), (154, 124), (154, 125), (154, 126), (154, 127), (154, 128), (154, 129), (154, 130), (154, 131), (154, 132), (154, 134), (155, 99), (155, 104), (155, 109),
(155, 114), (155, 117), (155, 118), (155, 119), (155, 120), (155, 121), (155, 122), (155, 123), (155, 124), (155, 125), (155, 126), (155, 127), (155, 128), (155, 129), (155, 130), (155, 131), (155, 132), (155, 134), (156, 98), (156, 105), (156, 107), (156, 108), (156, 111), (156, 112), (156, 113), (156, 122), (156, 123), (156, 124), (156, 125), (156, 126), (156, 127), (156, 128), (156, 129), (156, 130), (156, 131), (156, 134), (157, 105), (157, 107), (157, 108), (157, 109), (157, 115), (157, 116), (157, 117), (157, 118), (157, 119), (157, 120), (157, 123), (157, 124), (157, 125), (157, 126), (157, 127), (157, 128), (157, 129), (157, 132), (157, 133), (157, 135), (158, 105), (158, 106), (158, 107), (158, 108), (158, 109), (158, 110), (158, 113), (158, 122), (158, 123), (158, 124), (158, 125), (158, 126), (158, 127), (158, 128), (158, 130), (158, 131),
(158, 136), (159, 106), (159, 108), (159, 109), (159, 111), (159, 123), (159, 125), (159, 126), (159, 127), (159, 129), (160, 106), (160, 108), (160, 110), (160, 123), (160, 125), (160, 126), (160, 128), (161, 106), (161, 109), (161, 123), (161, 125), (161, 127), (162, 107), (162, 109), (162, 123), (162, 125), (162, 127), (163, 107), (163, 109), (163, 122), (163, 124), (163, 126), (163, 137), (164, 107), (164, 122), (164, 124), (164, 126), (164, 137), (165, 108), (165, 122), (165, 125), (166, 122), (166, 125), (167, 122), (167, 124), (168, 122), (168, 123), )
coordinates_E1E1E1 = ((77, 124),
(77, 125), (78, 123), (78, 126), (79, 110), (79, 126), (80, 104), (80, 106), (80, 111), (80, 124), (80, 127), (80, 139), (81, 104), (81, 107), (81, 110), (81, 112), (81, 125), (81, 127), (81, 139), (82, 104), (82, 106), (82, 109), (82, 110), (82, 111), (82, 113), (82, 125), (82, 127), (82, 139), (83, 103), (83, 105), (83, 106), (83, 107), (83, 108), (83, 109), (83, 110), (83, 111), (83, 112), (83, 114), (83, 127), (83, 139), (84, 103), (84, 105), (84, 106), (84, 107), (84, 108), (84, 109), (84, 110), (84, 111), (84, 112), (84, 113), (84, 126), (84, 127), (84, 139), (85, 103), (85, 105), (85, 106), (85, 107), (85, 108), (85, 109), (85, 110), (85, 111), (85, 112), (85, 113), (85, 115), (85, 126), (85, 127), (85, 139), (85, 140), (86, 103), (86, 105), (86, 110), (86, 111), (86, 112),
(86, 113), (86, 114), (86, 116), (86, 126), (86, 127), (86, 139), (86, 141), (87, 103), (87, 107), (87, 108), (87, 109), (87, 110), (87, 111), (87, 112), (87, 113), (87, 114), (87, 115), (87, 117), (87, 125), (87, 128), (87, 139), (87, 141), (88, 102), (88, 105), (88, 110), (88, 112), (88, 113), (88, 114), (88, 115), (88, 116), (88, 118), (88, 124), (88, 126), (88, 128), (88, 139), (88, 140), (89, 102), (89, 104), (89, 110), (89, 113), (89, 114), (89, 115), (89, 116), (89, 117), (89, 120), (89, 121), (89, 122), (89, 125), (89, 126), (89, 127), (89, 129), (89, 139), (90, 102), (90, 111), (90, 114), (90, 115), (90, 116), (90, 124), (90, 125), (90, 126), (90, 127), (90, 128), (90, 130), (90, 138), (90, 139), (91, 101), (91, 113), (91, 117), (91, 118), (91, 120), (91, 121), (91, 122),
(91, 123), (91, 124), (91, 125), (91, 126), (91, 127), (91, 128), (91, 129), (91, 131), (91, 132), (91, 136), (91, 138), (92, 100), (92, 114), (92, 119), (92, 121), (92, 122), (92, 123), (92, 124), (92, 125), (92, 126), (92, 127), (92, 128), (92, 129), (92, 130), (92, 133), (92, 134), (92, 135), (92, 138), (93, 99), (93, 120), (93, 122), (93, 123), (93, 124), (93, 125), (93, 126), (93, 127), (93, 128), (93, 129), (93, 130), (93, 131), (93, 132), (93, 133), (93, 135), (93, 139), (94, 98), (94, 121), (94, 123), (94, 124), (94, 125), (94, 126), (94, 127), (94, 128), (94, 129), (94, 130), (94, 131), (94, 132), (94, 133), (94, 134), (94, 137), (94, 141), (95, 94), (95, 97), (95, 121), (95, 123), (95, 124), (95, 125), (95, 126), (95, 127), (95, 128), (95, 129), (95, 130), (95, 131),
(95, 132), (95, 133), (95, 135), (95, 139), (95, 141), (96, 89), (96, 121), (96, 123), (96, 124), (96, 125), (96, 126), (96, 127), (96, 128), (96, 129), (96, 130), (96, 131), (96, 132), (96, 134), (97, 107), (97, 109), (97, 110), (97, 111), (97, 113), (97, 121), (97, 123), (97, 124), (97, 125), (97, 126), (97, 127), (97, 128), (97, 129), (97, 130), (97, 131), (97, 133), (98, 106), (98, 114), (98, 120), (98, 122), (98, 123), (98, 124), (98, 125), (98, 126), (98, 127), (98, 128), (98, 129), (98, 130), (98, 131), (98, 133), (99, 105), (99, 110), (99, 111), (99, 112), (99, 113), (99, 116), (99, 120), (99, 122), (99, 123), (99, 124), (99, 125), (99, 126), (99, 127), (99, 128), (99, 129), (99, 130), (99, 131), (99, 133), (100, 104), (100, 107), (100, 108), (100, 109), (100, 112), (100, 113),
(100, 114), (100, 117), (100, 118), (100, 120), (100, 121), (100, 122), (100, 123), (100, 124), (100, 125), (100, 126), (100, 127), (100, 128), (100, 129), (100, 130), (100, 132), (101, 103), (101, 106), (101, 110), (101, 113), (101, 114), (101, 115), (101, 116), (101, 120), (101, 121), (101, 122), (101, 123), (101, 124), (101, 125), (101, 126), (101, 127), (101, 128), (101, 129), (101, 130), (101, 132), (102, 101), (102, 105), (102, 112), (102, 114), (102, 115), (102, 116), (102, 117), (102, 118), (102, 119), (102, 120), (102, 121), (102, 122), (102, 123), (102, 124), (102, 125), (102, 126), (102, 127), (102, 128), (102, 129), (102, 130), (102, 132), (103, 94), (103, 96), (103, 97), (103, 98), (103, 99), (103, 100), (103, 101), (103, 102), (103, 103), (103, 113), (103, 115), (103, 116), (103, 117), (103, 118), (103, 119), (103, 120), (103, 121),
(103, 122), (103, 123), (103, 124), (103, 125), (103, 126), (103, 127), (103, 128), (103, 132), (104, 83), (104, 94), (104, 100), (104, 113), (104, 115), (104, 116), (104, 117), (104, 118), (104, 119), (104, 120), (104, 124), (104, 125), (104, 126), (104, 127), (104, 130), (104, 132), (105, 83), (105, 94), (105, 96), (105, 98), (105, 113), (105, 115), (105, 116), (105, 117), (105, 118), (105, 119), (105, 121), (105, 122), (105, 125), (105, 126), (105, 128), (105, 132), (106, 82), (106, 84), (106, 94), (106, 97), (106, 113), (106, 116), (106, 117), (106, 120), (106, 124), (106, 127), (106, 132), (107, 82), (107, 84), (107, 94), (107, 96), (107, 114), (107, 116), (107, 119), (107, 125), (107, 127), (108, 82), (108, 84), (108, 95), (108, 116), (108, 118), (108, 125), (108, 126), (108, 133), (109, 81), (109, 85), (109, 93), (109, 94),
(109, 116), (109, 117), (109, 125), (109, 126), (109, 133), (110, 81), (110, 83), (110, 84), (110, 86), (110, 93), (110, 94), (110, 115), (110, 116), (110, 126), (110, 133), (111, 85), (111, 93), (111, 94), (111, 114), (111, 115), (111, 124), (111, 126), (112, 87), (112, 88), (112, 93), (112, 94), (112, 100), (112, 113), (112, 114), (112, 123), (112, 126), (112, 134), (113, 88), (113, 90), (113, 91), (113, 93), (113, 94), (113, 99), (113, 112), (113, 113), (113, 123), (113, 127), (113, 134), (114, 89), (114, 96), (114, 98), (114, 111), (114, 112), (114, 122), (114, 124), (114, 125), (114, 127), (114, 134), (115, 90), (115, 92), (115, 93), (115, 94), (115, 95), (115, 96), (115, 98), (115, 110), (115, 112), (115, 127), (116, 91), (116, 98), (116, 110), (116, 112), (116, 127), (117, 98), (117, 109), (117, 112), (118, 98),
(118, 109), (118, 112), (119, 108), (119, 109), )
coordinates_771286 = ((142, 125),
(143, 125), )
coordinates_781286 = ((102, 125),
(103, 126), (104, 125), )
coordinates_DCF8A4 = ((104, 152),
(105, 152), (105, 162), (108, 161), (109, 161), (110, 161), (111, 161), (112, 160), (113, 160), (114, 159), (115, 159), (116, 159), (117, 158), (118, 157), )
coordinates_DBF8A4 = ((132, 157),
(133, 157), (134, 158), (135, 158), (135, 159), (136, 159), (137, 160), (138, 160), (139, 160), (140, 160), (145, 152), (150, 162), (151, 162), )
coordinates_60CC60 = ((81, 159),
(81, 162), (82, 156), (82, 163), (83, 154), (83, 155), (83, 159), (83, 160), (83, 161), (83, 163), (84, 153), (84, 156), (84, 157), (84, 158), (84, 159), (84, 160), (84, 161), (84, 162), (84, 164), (85, 153), (85, 155), (85, 156), (85, 157), (85, 158), (85, 159), (85, 160), (85, 161), (85, 162), (85, 163), (85, 165), (86, 153), (86, 155), (86, 156), (86, 157), (86, 158), (86, 159), (86, 160), (86, 161), (86, 162), (86, 163), (86, 164), (86, 166), (87, 152), (87, 153), (87, 154), (87, 155), (87, 156), (87, 157), (87, 158), (87, 159), (87, 160), (87, 161), (87, 162), (87, 163), (87, 164), (87, 165), (87, 167), (88, 150), (88, 153), (88, 154), (88, 155), (88, 156), (88, 157), (88, 158), (88, 159), (88, 160), (88, 161), (88, 162), (88, 163), (88, 164), (88, 165), (88, 166), (88, 169),
(89, 150), (89, 152), (89, 153), (89, 154), (89, 155), (89, 156), (89, 157), (89, 158), (89, 159), (89, 160), (89, 161), (89, 162), (89, 163), (89, 164), (89, 165), (89, 166), (89, 167), (89, 170), (90, 150), (90, 152), (90, 153), (90, 154), (90, 155), (90, 156), (90, 157), (90, 158), (90, 159), (90, 160), (90, 161), (90, 162), (90, 163), (90, 164), (90, 165), (90, 166), (90, 167), (90, 168), (90, 170), (91, 150), (91, 152), (91, 153), (91, 154), (91, 155), (91, 156), (91, 157), (91, 158), (91, 159), (91, 160), (91, 161), (91, 162), (91, 163), (91, 164), (91, 165), (91, 166), (91, 167), (91, 168), (91, 170), (92, 149), (92, 151), (92, 152), (92, 153), (92, 154), (92, 155), (92, 156), (92, 157), (92, 158), (92, 159), (92, 160), (92, 161), (92, 162), (92, 163), (92, 164), (92, 165),
(92, 166), (92, 167), (92, 168), (92, 170), (93, 149), (93, 151), (93, 152), (93, 153), (93, 154), (93, 155), (93, 156), (93, 157), (93, 158), (93, 159), (93, 160), (93, 161), (93, 162), (93, 163), (93, 164), (93, 165), (93, 166), (93, 167), (93, 168), (93, 169), (93, 171), (94, 148), (94, 150), (94, 151), (94, 152), (94, 153), (94, 154), (94, 155), (94, 156), (94, 157), (94, 158), (94, 159), (94, 160), (94, 161), (94, 162), (94, 163), (94, 164), (94, 165), (94, 166), (94, 167), (94, 168), (94, 169), (94, 171), (95, 148), (95, 150), (95, 151), (95, 152), (95, 153), (95, 154), (95, 155), (95, 156), (95, 157), (95, 158), (95, 159), (95, 160), (95, 161), (95, 162), (95, 163), (95, 164), (95, 165), (95, 166), (95, 167), (95, 168), (95, 169), (95, 170), (95, 172), (96, 148), (96, 150),
(96, 151), (96, 152), (96, 153), (96, 154), (96, 155), (96, 156), (96, 157), (96, 158), (96, 159), (96, 160), (96, 161), (96, 162), (96, 163), (96, 164), (96, 165), (96, 166), (96, 167), (96, 168), (96, 169), (96, 170), (96, 172), (97, 148), (97, 150), (97, 151), (97, 152), (97, 153), (97, 154), (97, 155), (97, 156), (97, 157), (97, 158), (97, 159), (97, 160), (97, 161), (97, 162), (97, 164), (97, 165), (97, 166), (97, 167), (97, 168), (97, 169), (97, 170), (97, 171), (97, 173), (98, 147), (98, 149), (98, 150), (98, 151), (98, 152), (98, 153), (98, 154), (98, 155), (98, 156), (98, 157), (98, 158), (98, 159), (98, 160), (98, 161), (98, 162), (98, 164), (98, 165), (98, 166), (98, 167), (98, 168), (98, 169), (98, 170), (98, 171), (98, 173), (99, 147), (99, 149), (99, 150), (99, 151),
(99, 152), (99, 153), (99, 154), (99, 155), (99, 156), (99, 157), (99, 158), (99, 159), (99, 160), (99, 161), (99, 164), (99, 166), (99, 167), (99, 168), (99, 169), (99, 170), (99, 171), (99, 173), (100, 147), (100, 149), (100, 150), (100, 151), (100, 154), (100, 155), (100, 156), (100, 157), (100, 158), (100, 159), (100, 161), (100, 164), (100, 166), (100, 167), (100, 168), (100, 169), (100, 170), (100, 171), (100, 172), (100, 174), (101, 146), (101, 148), (101, 149), (101, 150), (101, 151), (101, 153), (101, 154), (101, 155), (101, 156), (101, 157), (101, 158), (101, 159), (101, 161), (101, 164), (101, 166), (101, 167), (101, 168), (101, 169), (101, 170), (101, 171), (101, 172), (101, 174), (102, 146), (102, 148), (102, 149), (102, 151), (102, 154), (102, 156), (102, 157), (102, 158), (102, 159), (102, 161), (102, 164), (102, 166),
(102, 167), (102, 168), (102, 169), (102, 170), (102, 171), (102, 172), (102, 174), (103, 146), (103, 148), (103, 149), (103, 150), (103, 154), (103, 156), (103, 157), (103, 158), (103, 159), (103, 161), (103, 164), (103, 166), (103, 167), (103, 168), (103, 169), (103, 170), (103, 171), (103, 172), (103, 174), (104, 145), (104, 147), (104, 149), (104, 150), (104, 154), (104, 156), (104, 157), (104, 158), (104, 160), (104, 164), (104, 166), (104, 167), (104, 168), (104, 169), (104, 170), (104, 171), (104, 172), (104, 174), (105, 145), (105, 147), (105, 149), (105, 154), (105, 156), (105, 157), (105, 158), (105, 160), (105, 164), (105, 166), (105, 167), (105, 168), (105, 169), (105, 170), (105, 171), (105, 172), (105, 174), (106, 145), (106, 147), (106, 149), (106, 154), (106, 156), (106, 157), (106, 158), (106, 160), (106, 164), (106, 166), (106, 167),
(106, 168), (106, 169), (106, 170), (106, 171), (106, 172), (106, 174), (107, 145), (107, 147), (107, 149), (107, 153), (107, 155), (107, 156), (107, 157), (107, 158), (107, 160), (107, 163), (107, 165), (107, 166), (107, 167), (107, 168), (107, 169), (107, 170), (107, 171), (107, 172), (107, 174), (108, 144), (108, 146), (108, 147), (108, 149), (108, 153), (108, 155), (108, 156), (108, 157), (108, 159), (108, 163), (108, 165), (108, 166), (108, 167), (108, 168), (108, 169), (108, 170), (108, 171), (108, 172), (108, 174), (109, 144), (109, 146), (109, 147), (109, 148), (109, 149), (109, 153), (109, 154), (109, 155), (109, 156), (109, 157), (109, 159), (109, 163), (109, 165), (109, 166), (109, 167), (109, 168), (109, 169), (109, 170), (109, 171), (109, 173), (110, 144), (110, 146), (110, 147), (110, 148), (110, 149), (110, 150), (110, 153), (110, 154),
(110, 155), (110, 156), (110, 157), (110, 159), (110, 163), (110, 165), (110, 166), (110, 167), (110, 168), (110, 169), (110, 170), (110, 171), (110, 173), (111, 143), (111, 145), (111, 146), (111, 147), (111, 148), (111, 149), (111, 150), (111, 152), (111, 153), (111, 154), (111, 155), (111, 156), (111, 158), (111, 163), (111, 165), (111, 166), (111, 167), (111, 168), (111, 169), (111, 170), (111, 171), (111, 173), (112, 142), (112, 144), (112, 145), (112, 146), (112, 147), (112, 148), (112, 149), (112, 150), (112, 151), (112, 152), (112, 153), (112, 154), (112, 155), (112, 156), (112, 158), (112, 163), (112, 165), (112, 166), (112, 167), (112, 168), (112, 169), (112, 170), (112, 171), (112, 173), (113, 140), (113, 143), (113, 144), (113, 145), (113, 146), (113, 147), (113, 148), (113, 149), (113, 150), (113, 151), (113, 152), (113, 153), (113, 154),
(113, 155), (113, 156), (113, 158), (113, 162), (113, 164), (113, 165), (113, 166), (113, 167), (113, 168), (113, 169), (113, 170), (113, 171), (113, 173), (114, 140), (114, 142), (114, 143), (114, 144), (114, 145), (114, 146), (114, 147), (114, 148), (114, 149), (114, 150), (114, 151), (114, 152), (114, 153), (114, 154), (114, 155), (114, 157), (114, 162), (114, 164), (114, 165), (114, 166), (114, 167), (114, 168), (114, 169), (114, 170), (114, 171), (114, 173), (115, 140), (115, 142), (115, 143), (115, 144), (115, 145), (115, 146), (115, 147), (115, 148), (115, 149), (115, 150), (115, 151), (115, 152), (115, 153), (115, 154), (115, 155), (115, 157), (115, 161), (115, 163), (115, 164), (115, 165), (115, 166), (115, 167), (115, 168), (115, 169), (115, 170), (115, 171), (115, 173), (116, 140), (116, 142), (116, 143), (116, 144), (116, 145), (116, 146),
(116, 147), (116, 148), (116, 149), (116, 150), (116, 151), (116, 152), (116, 153), (116, 154), (116, 156), (116, 161), (116, 163), (116, 164), (116, 165), (116, 166), (116, 167), (116, 168), (116, 169), (116, 170), (116, 172), (117, 140), (117, 147), (117, 148), (117, 149), (117, 150), (117, 151), (117, 152), (117, 153), (117, 155), (117, 160), (117, 161), (117, 162), (117, 163), (117, 164), (117, 165), (117, 166), (117, 167), (117, 168), (117, 169), (117, 170), (117, 172), (118, 140), (118, 142), (118, 143), (118, 144), (118, 145), (118, 146), (118, 148), (118, 149), (118, 150), (118, 151), (118, 152), (118, 154), (118, 160), (118, 162), (118, 163), (118, 164), (118, 165), (118, 166), (118, 167), (118, 168), (118, 169), (118, 171), (119, 152), (119, 154), (119, 159), (119, 161), (119, 162), (119, 163), (119, 164), (119, 165), (119, 166), (119, 167),
(119, 168), (119, 169), (119, 171), (120, 148), (120, 150), (120, 152), (120, 153), (120, 154), (120, 155), (120, 158), (120, 160), (120, 161), (120, 162), (120, 163), (120, 164), (120, 165), (120, 166), (120, 167), (120, 168), (120, 170), (121, 152), (121, 154), (121, 159), (121, 160), (121, 161), (121, 162), (121, 163), (121, 164), (121, 165), (121, 166), (121, 167), (121, 168), (121, 170), (122, 152), (122, 169), (123, 153), (123, 155), (123, 156), (123, 157), (123, 158), (123, 159), (123, 160), (123, 161), (123, 162), (123, 163), (123, 164), (123, 165), (123, 166), (123, 168), )
coordinates_5FCC60 = ((125, 166),
(126, 155), (126, 157), (126, 158), (126, 159), (126, 160), (126, 161), (126, 162), (126, 163), (126, 164), (126, 166), (127, 154), (128, 149), (128, 151), (128, 152), (128, 155), (128, 156), (128, 157), (128, 158), (128, 159), (128, 160), (128, 161), (128, 162), (128, 163), (128, 164), (128, 165), (128, 166), (128, 170), (129, 148), (129, 153), (129, 154), (129, 155), (129, 156), (129, 157), (129, 158), (129, 159), (129, 160), (129, 161), (129, 162), (129, 163), (129, 164), (129, 165), (129, 166), (129, 167), (129, 168), (129, 170), (130, 145), (130, 146), (130, 149), (130, 150), (130, 151), (130, 152), (130, 153), (130, 154), (130, 155), (130, 156), (130, 157), (130, 158), (130, 159), (130, 160), (130, 161), (130, 162), (130, 163), (130, 164), (130, 165), (130, 166), (130, 167), (130, 168), (130, 169), (130, 171), (131, 141), (131, 142), (131, 143),
(131, 144), (131, 148), (131, 149), (131, 150), (131, 151), (131, 152), (131, 153), (131, 154), (131, 155), (131, 156), (131, 157), (131, 158), (131, 159), (131, 160), (131, 161), (131, 162), (131, 163), (131, 164), (131, 165), (131, 166), (131, 167), (131, 168), (131, 169), (131, 171), (132, 142), (132, 145), (132, 146), (132, 147), (132, 148), (132, 149), (132, 150), (132, 151), (132, 152), (132, 153), (132, 154), (132, 155), (132, 156), (132, 157), (132, 158), (132, 159), (132, 160), (132, 161), (132, 162), (132, 163), (132, 164), (132, 165), (132, 166), (132, 167), (132, 168), (132, 169), (132, 171), (133, 142), (133, 144), (133, 145), (133, 146), (133, 147), (133, 148), (133, 149), (133, 150), (133, 151), (133, 152), (133, 153), (133, 154), (133, 155), (133, 156), (133, 157), (133, 158), (133, 159), (133, 160), (133, 161), (133, 162), (133, 163),
(133, 164), (133, 165), (133, 166), (133, 167), (133, 168), (133, 169), (133, 170), (133, 172), (134, 142), (134, 144), (134, 145), (134, 146), (134, 147), (134, 148), (134, 149), (134, 150), (134, 151), (134, 152), (134, 153), (134, 154), (134, 155), (134, 156), (134, 157), (134, 158), (134, 159), (134, 160), (134, 161), (134, 162), (134, 163), (134, 164), (134, 165), (134, 166), (134, 167), (134, 168), (134, 169), (134, 170), (134, 172), (135, 142), (135, 144), (135, 145), (135, 146), (135, 147), (135, 148), (135, 149), (135, 150), (135, 151), (135, 152), (135, 153), (135, 154), (135, 155), (135, 156), (135, 157), (135, 158), (135, 159), (135, 160), (135, 161), (135, 162), (135, 163), (135, 164), (135, 165), (135, 166), (135, 167), (135, 168), (135, 169), (135, 170), (135, 172), (136, 142), (136, 144), (136, 145), (136, 146), (136, 147), (136, 148),
(136, 149), (136, 150), (136, 151), (136, 152), (136, 153), (136, 154), (136, 155), (136, 156), (136, 157), (136, 158), (136, 159), (136, 160), (136, 161), (136, 162), (136, 163), (136, 164), (136, 165), (136, 166), (136, 167), (136, 168), (136, 169), (136, 170), (136, 172), (137, 142), (137, 144), (137, 145), (137, 146), (137, 147), (137, 148), (137, 149), (137, 150), (137, 151), (137, 152), (137, 153), (137, 154), (137, 155), (137, 156), (137, 157), (137, 158), (137, 159), (137, 160), (137, 161), (137, 162), (137, 163), (137, 164), (137, 165), (137, 166), (137, 167), (137, 168), (137, 169), (137, 170), (137, 171), (137, 173), (138, 143), (138, 145), (138, 146), (138, 147), (138, 148), (138, 149), (138, 150), (138, 151), (138, 152), (138, 153), (138, 154), (138, 155), (138, 156), (138, 157), (138, 158), (138, 159), (138, 160), (138, 161), (138, 162),
(138, 163), (138, 164), (138, 165), (138, 166), (138, 167), (138, 168), (138, 169), (138, 170), (138, 171), (138, 173), (139, 143), (139, 145), (139, 146), (139, 147), (139, 148), (139, 149), (139, 150), (139, 151), (139, 152), (139, 153), (139, 154), (139, 155), (139, 156), (139, 157), (139, 158), (139, 159), (139, 160), (139, 161), (139, 162), (139, 163), (139, 164), (139, 165), (139, 166), (139, 167), (139, 168), (139, 169), (139, 170), (139, 171), (139, 173), (140, 143), (140, 145), (140, 146), (140, 147), (140, 148), (140, 149), (140, 150), (140, 151), (140, 152), (140, 153), (140, 154), (140, 155), (140, 156), (140, 157), (140, 158), (140, 159), (140, 160), (140, 161), (140, 162), (140, 163), (140, 164), (140, 165), (140, 166), (140, 167), (140, 168), (140, 169), (140, 170), (140, 171), (140, 173), (141, 143), (141, 145), (141, 146), (141, 147),
(141, 148), (141, 149), (141, 150), (141, 151), (141, 152), (141, 153), (141, 154), (141, 155), (141, 156), (141, 157), (141, 158), (141, 159), (141, 160), (141, 161), (141, 162), (141, 163), (141, 164), (141, 165), (141, 166), (141, 167), (141, 168), (141, 169), (141, 170), (141, 171), (141, 172), (141, 174), (142, 144), (142, 146), (142, 147), (142, 148), (142, 149), (142, 150), (142, 151), (142, 152), (142, 153), (142, 154), (142, 155), (142, 156), (142, 157), (142, 158), (142, 159), (142, 160), (142, 161), (142, 162), (142, 163), (142, 164), (142, 165), (142, 166), (142, 167), (142, 168), (142, 169), (142, 170), (142, 171), (142, 172), (142, 174), (143, 144), (143, 146), (143, 147), (143, 148), (143, 149), (143, 150), (143, 151), (143, 152), (143, 153), (143, 154), (143, 155), (143, 156), (143, 157), (143, 158), (143, 159), (143, 160), (143, 161),
(143, 162), (143, 163), (143, 164), (143, 165), (143, 166), (143, 167), (143, 168), (143, 169), (143, 170), (143, 171), (143, 172), (143, 174), (144, 144), (144, 146), (144, 147), (144, 148), (144, 149), (144, 150), (144, 151), (144, 152), (144, 153), (144, 154), (144, 155), (144, 156), (144, 157), (144, 158), (144, 159), (144, 160), (144, 161), (144, 162), (144, 163), (144, 164), (144, 165), (144, 166), (144, 167), (144, 168), (144, 169), (144, 170), (144, 171), (144, 172), (144, 174), (145, 144), (145, 146), (145, 147), (145, 148), (145, 149), (145, 150), (145, 151), (145, 152), (145, 153), (145, 154), (145, 155), (145, 156), (145, 157), (145, 158), (145, 159), (145, 160), (145, 161), (145, 162), (145, 163), (145, 164), (145, 165), (145, 166), (145, 167), (145, 168), (145, 169), (145, 170), (145, 171), (145, 172), (145, 174), (146, 144), (146, 146),
(146, 147), (146, 148), (146, 149), (146, 150), (146, 151), (146, 152), (146, 153), (146, 154), (146, 155), (146, 156), (146, 157), (146, 158), (146, 159), (146, 160), (146, 161), (146, 162), (146, 163), (146, 164), (146, 165), (146, 166), (146, 167), (146, 168), (146, 169), (146, 170), (146, 171), (146, 173), (147, 145), (147, 147), (147, 148), (147, 149), (147, 150), (147, 151), (147, 152), (147, 153), (147, 154), (147, 155), (147, 156), (147, 157), (147, 158), (147, 159), (147, 160), (147, 161), (147, 162), (147, 163), (147, 164), (147, 165), (147, 166), (147, 167), (147, 168), (147, 169), (147, 170), (147, 171), (147, 173), (148, 146), (148, 148), (148, 149), (148, 150), (148, 151), (148, 152), (148, 153), (148, 154), (148, 155), (148, 156), (148, 157), (148, 158), (148, 159), (148, 160), (148, 161), (148, 162), (148, 163), (148, 164), (148, 165),
(148, 166), (148, 167), (148, 168), (148, 169), (148, 170), (148, 171), (148, 173), (149, 145), (149, 147), (149, 148), (149, 149), (149, 150), (149, 151), (149, 152), (149, 153), (149, 154), (149, 155), (149, 156), (149, 157), (149, 158), (149, 159), (149, 160), (149, 161), (149, 162), (149, 163), (149, 164), (149, 165), (149, 166), (149, 167), (149, 168), (149, 169), (149, 170), (149, 171), (149, 173), (150, 145), (150, 147), (150, 148), (150, 149), (150, 150), (150, 151), (150, 152), (150, 153), (150, 154), (150, 155), (150, 156), (150, 157), (150, 158), (150, 159), (150, 160), (150, 161), (150, 162), (150, 163), (150, 164), (150, 165), (150, 166), (150, 167), (150, 168), (150, 169), (150, 170), (150, 171), (150, 173), (151, 146), (151, 148), (151, 149), (151, 150), (151, 151), (151, 152), (151, 153), (151, 154), (151, 155), (151, 156), (151, 157),
(151, 158), (151, 159), (151, 160), (151, 161), (151, 162), (151, 163), (151, 164), (151, 165), (151, 166), (151, 167), (151, 168), (151, 169), (151, 170), (151, 172), (152, 147), (152, 149), (152, 150), (152, 151), (152, 152), (152, 153), (152, 154), (152, 155), (152, 156), (152, 157), (152, 158), (152, 159), (152, 160), (152, 161), (152, 162), (152, 163), (152, 164), (152, 165), (152, 166), (152, 167), (152, 168), (152, 169), (152, 170), (152, 172), (153, 147), (153, 149), (153, 150), (153, 151), (153, 152), (153, 153), (153, 154), (153, 155), (153, 156), (153, 157), (153, 158), (153, 159), (153, 160), (153, 161), (153, 162), (153, 163), (153, 164), (153, 165), (153, 166), (153, 167), (153, 168), (153, 169), (153, 171), (154, 147), (154, 149), (154, 150), (154, 151), (154, 152), (154, 153), (154, 154), (154, 155), (154, 156), (154, 157), (154, 158),
(154, 159), (154, 160), (154, 161), (154, 162), (154, 163), (154, 164), (154, 165), (154, 166), (154, 167), (154, 168), (154, 169), (154, 171), (155, 147), (155, 149), (155, 150), (155, 151), (155, 152), (155, 153), (155, 154), (155, 155), (155, 156), (155, 157), (155, 158), (155, 159), (155, 160), (155, 161), (155, 162), (155, 163), (155, 164), (155, 165), (155, 166), (155, 167), (155, 168), (155, 170), (156, 147), (156, 149), (156, 150), (156, 151), (156, 152), (156, 153), (156, 154), (156, 155), (156, 156), (156, 157), (156, 158), (156, 159), (156, 160), (156, 161), (156, 162), (156, 163), (156, 164), (156, 165), (156, 166), (156, 167), (156, 169), (157, 148), (157, 150), (157, 151), (157, 152), (157, 153), (157, 154), (157, 155), (157, 156), (157, 157), (157, 158), (157, 159), (157, 160), (157, 161), (157, 162), (157, 163), (157, 164), (157, 165),
(157, 166), (157, 167), (157, 169), (158, 149), (158, 151), (158, 152), (158, 153), (158, 154), (158, 155), (158, 156), (158, 157), (158, 158), (158, 159), (158, 160), (158, 161), (158, 162), (158, 163), (158, 164), (158, 165), (158, 166), (158, 168), (159, 150), (159, 152), (159, 153), (159, 154), (159, 155), (159, 156), (159, 157), (159, 158), (159, 159), (159, 160), (159, 161), (159, 162), (159, 163), (159, 164), (159, 165), (159, 166), (159, 168), (160, 150), (160, 152), (160, 153), (160, 154), (160, 155), (160, 156), (160, 157), (160, 158), (160, 159), (160, 160), (160, 161), (160, 162), (160, 163), (160, 164), (160, 165), (160, 167), (161, 151), (161, 153), (161, 154), (161, 155), (161, 156), (161, 157), (161, 158), (161, 159), (161, 160), (161, 161), (161, 162), (161, 163), (161, 164), (161, 166), (162, 151), (162, 153), (162, 154), (162, 155),
(162, 156), (162, 157), (162, 160), (162, 161), (162, 162), (162, 163), (162, 166), (163, 152), (163, 153), (163, 154), (163, 155), (163, 156), (163, 158), (163, 159), (163, 165), (164, 152), (164, 154), (164, 155), (164, 156), (164, 160), (164, 161), (164, 163), (165, 152), (165, 154), (165, 156), (166, 153), (166, 155), (167, 154), (167, 155), )
coordinates_F4DEB3 = ((130, 78),
(130, 79), (131, 78), (131, 80), (132, 77), (132, 80), (133, 77), (133, 79), (133, 80), (133, 82), (133, 83), (133, 84), (133, 85), (134, 77), (134, 79), (134, 80), (134, 87), (134, 97), (135, 77), (135, 79), (135, 80), (135, 81), (135, 82), (135, 83), (135, 84), (135, 85), (135, 88), (135, 94), (135, 96), (136, 77), (136, 79), (136, 80), (136, 81), (136, 82), (136, 83), (136, 84), (136, 85), (136, 86), (136, 87), (136, 94), (136, 96), (137, 77), (137, 79), (137, 80), (137, 81), (137, 82), (137, 83), (137, 84), (137, 85), (137, 86), (137, 87), (137, 89), (137, 94), (137, 96), (138, 77), (138, 82), (138, 83), (138, 84), (138, 85), (138, 86), (138, 88), (138, 96), (139, 79), (139, 80), (139, 81), (139, 82), (139, 83), (139, 84), (139, 85), (139, 87), (139, 95), (139, 97), (140, 83),
(140, 86), (140, 96), (140, 97), (141, 83), (141, 85), (141, 97), (142, 82), (142, 84), (143, 81), (143, 83), (144, 80), (144, 82), (144, 83), (144, 87), (144, 89), (144, 90), (144, 91), (144, 92), (145, 80), (145, 83), (145, 86), (145, 89), (145, 93), (145, 95), (146, 80), (146, 82), (146, 84), (146, 87), (146, 96), (147, 83), (147, 85), )
coordinates_26408B = ((123, 88),
(123, 90), (123, 91), (123, 92), (123, 93), (123, 94), (123, 95), (124, 86), (124, 93), (124, 96), (124, 97), (124, 98), (124, 99), (124, 100), (124, 101), (124, 102), (124, 103), (124, 104), (124, 105), (124, 106), (124, 108), (125, 85), (125, 88), (125, 89), (125, 91), (125, 94), (125, 95), (125, 108), (126, 84), (126, 86), (126, 87), (126, 88), (126, 90), (126, 95), (126, 97), (126, 98), (126, 99), (126, 100), (126, 101), (126, 102), (126, 103), (126, 104), (126, 105), (126, 106), (126, 108), (127, 81), (127, 89), (127, 95), (127, 97), (127, 98), (127, 99), (127, 100), (127, 101), (127, 102), (127, 103), (127, 104), (127, 105), (127, 106), (127, 108), (128, 80), (128, 84), (128, 85), (128, 86), (128, 87), (128, 94), (128, 96), (128, 97), (128, 98), (128, 99), (128, 100), (128, 101), (128, 102), (128, 103),
(128, 104), (128, 105), (128, 108), (129, 81), (129, 83), (129, 94), (129, 97), (129, 98), (129, 99), (129, 100), (129, 101), (129, 102), (129, 103), (129, 107), (130, 93), (130, 96), (130, 105), (131, 94), (131, 97), (131, 99), (131, 100), (131, 101), (131, 103), (133, 93), )
coordinates_F5DEB3 = ((94, 106),
(95, 105), (95, 106), (96, 104), (97, 103), (97, 105), (98, 103), (99, 81), (99, 83), (99, 101), (99, 102), (100, 80), (100, 85), (100, 97), (100, 98), (100, 99), (100, 101), (101, 80), (101, 82), (101, 86), (101, 93), (101, 94), (101, 95), (101, 96), (101, 97), (101, 98), (101, 100), (102, 79), (102, 81), (102, 83), (102, 86), (102, 91), (102, 92), (103, 79), (103, 81), (103, 82), (103, 85), (103, 86), (103, 90), (103, 92), (104, 79), (104, 81), (104, 85), (104, 86), (104, 90), (104, 92), (105, 78), (105, 81), (105, 86), (105, 90), (106, 78), (106, 80), (106, 86), (106, 90), (106, 91), (107, 78), (107, 80), (107, 86), (107, 90), (107, 91), (108, 77), (108, 79), (108, 87), (108, 91), (109, 77), (109, 79), (109, 87), (109, 91), (110, 77), (110, 79), (110, 88), (110, 91), (111, 77),
(111, 79), (111, 89), (111, 91), (112, 77), (112, 79), (113, 77), (113, 79), (114, 77), (114, 79), (115, 77), (115, 78), )
coordinates_016400 = ((123, 130),
(123, 132), (123, 133), (124, 132), (124, 134), (124, 135), (124, 136), (124, 138), (125, 134), (126, 134), (126, 136), (126, 137), (126, 139), (127, 134), (127, 136), (127, 137), (127, 139), (128, 134), (128, 136), (128, 137), (128, 139), (129, 135), (129, 137), (129, 139), (130, 135), (130, 137), (130, 139), (131, 135), (131, 137), (131, 139), (132, 134), (132, 136), (132, 140), (133, 133), (133, 135), (133, 138), (133, 140), (134, 133), (134, 136), (134, 140), (135, 132), (135, 135), (135, 140), (136, 131), (136, 134), (136, 140), (137, 130), (137, 133), (137, 140), (138, 129), (138, 133), (138, 139), (138, 140), (139, 129), (139, 132), (139, 138), (139, 141), (140, 130), (140, 137), (140, 139), (140, 141), (141, 137), (141, 139), (141, 141), (142, 138), (142, 141), (143, 139), (143, 141), (144, 140), (144, 142), (145, 142), (146, 137), (146, 140),
(146, 142), (147, 137), (147, 139), (148, 136), )
coordinates_CC5B45 = ((147, 89),
(147, 91), (147, 92), (147, 93), (147, 94), (148, 87), (148, 97), (149, 86), (149, 89), (149, 90), (149, 91), (149, 92), (149, 93), (149, 94), (149, 95), (149, 97), (150, 86), (150, 88), (150, 89), (150, 90), (150, 91), (150, 92), (150, 93), (150, 96), (150, 97), (151, 86), (151, 88), (151, 89), (151, 90), (151, 91), (151, 93), (152, 86), (152, 88), (152, 89), (152, 90), (152, 91), (152, 93), (153, 86), (153, 88), (153, 89), (153, 90), (153, 91), (153, 92), (153, 94), (154, 87), (154, 89), (154, 90), (154, 91), (154, 92), (154, 94), (155, 87), (155, 89), (155, 90), (155, 91), (155, 92), (155, 93), (155, 95), (156, 88), (156, 90), (156, 91), (156, 92), (156, 94), (156, 96), (157, 88), (157, 90), (157, 91), (157, 96), (158, 89), (158, 94), (158, 96), (159, 90), (159, 91), )
coordinates_27408B = ((104, 105),
(105, 102), (105, 105), (106, 100), (106, 105), (107, 98), (107, 99), (107, 102), (107, 103), (107, 105), (108, 97), (108, 100), (108, 101), (108, 102), (108, 103), (108, 105), (109, 97), (109, 102), (109, 103), (109, 104), (109, 106), (110, 96), (110, 100), (110, 101), (110, 102), (110, 103), (110, 104), (110, 106), (111, 96), (111, 98), (111, 102), (111, 104), (111, 106), (112, 82), (112, 96), (112, 97), (112, 102), (112, 104), (112, 106), (113, 81), (113, 85), (113, 102), (113, 105), (114, 81), (114, 83), (114, 86), (114, 101), (114, 103), (114, 105), (115, 80), (115, 82), (115, 83), (115, 84), (115, 85), (115, 87), (115, 100), (115, 102), (115, 104), (116, 81), (116, 82), (116, 83), (116, 84), (116, 85), (116, 86), (116, 88), (116, 100), (116, 102), (116, 104), (117, 78), (117, 81), (117, 82), (117, 83), (117, 84),
(117, 85), (117, 86), (117, 87), (117, 90), (117, 93), (117, 96), (117, 100), (117, 103), (118, 78), (118, 82), (118, 83), (118, 84), (118, 85), (118, 86), (118, 87), (118, 88), (118, 91), (118, 96), (118, 100), (118, 103), (119, 81), (119, 83), (119, 84), (119, 85), (119, 86), (119, 87), (119, 88), (119, 89), (119, 92), (119, 93), (119, 95), (119, 97), (119, 100), (119, 103), (120, 82), (120, 86), (120, 90), (120, 95), (120, 102), (121, 83), (121, 85), (121, 88), (121, 89), (121, 95), (121, 97), (121, 98), (121, 99), (121, 100), (121, 102), (122, 102), )
coordinates_006400 = ((105, 134),
(105, 136), (105, 137), (105, 138), (105, 139), (105, 140), (105, 141), (105, 143), (106, 130), (106, 134), (107, 129), (107, 131), (107, 135), (107, 137), (107, 138), (107, 139), (107, 140), (107, 142), (108, 128), (108, 131), (108, 135), (108, 137), (108, 138), (108, 139), (108, 140), (108, 142), (109, 128), (109, 131), (109, 135), (109, 137), (109, 138), (109, 139), (109, 140), (109, 142), (110, 128), (110, 131), (110, 135), (110, 137), (110, 141), (111, 128), (111, 131), (111, 136), (111, 138), (111, 140), (112, 129), (112, 131), (112, 136), (113, 129), (113, 131), (113, 136), (113, 137), (114, 129), (114, 132), (114, 136), (115, 129), (115, 132), (115, 136), (115, 138), (116, 122), (116, 125), (116, 129), (116, 131), (116, 133), (116, 136), (116, 138), (117, 122), (117, 126), (117, 129), (117, 131), (117, 132), (117, 135), (117, 136), (117, 138),
(118, 121), (118, 123), (118, 124), (118, 125), (118, 127), (118, 128), (118, 130), (118, 133), (118, 136), (118, 138), (119, 121), (119, 124), (119, 126), (119, 130), (119, 134), (120, 120), (120, 121), (120, 124), (120, 130), (121, 119), (121, 122), (121, 125), (121, 126), (121, 127), (121, 128), (121, 130), (122, 119), (122, 121), (122, 122), (122, 123), )
coordinates_CD5B45 = ((75, 103),
(75, 105), (75, 106), (75, 108), (76, 102), (76, 108), (77, 101), (77, 103), (77, 108), (78, 101), (78, 104), (78, 105), (78, 106), (78, 108), (79, 101), (79, 103), (80, 101), (80, 102), (81, 95), (81, 96), (81, 100), (81, 102), (82, 93), (82, 94), (82, 100), (82, 101), (83, 92), (83, 95), (83, 96), (83, 98), (83, 101), (84, 91), (84, 93), (84, 94), (84, 95), (84, 96), (84, 97), (84, 99), (84, 101), (85, 89), (85, 92), (85, 93), (85, 94), (85, 95), (85, 96), (85, 97), (85, 98), (85, 99), (85, 101), (86, 88), (86, 91), (86, 92), (86, 93), (86, 94), (86, 95), (86, 96), (86, 97), (86, 98), (86, 100), (87, 88), (87, 90), (87, 91), (87, 92), (87, 93), (87, 94), (87, 95), (87, 96), (87, 97), (87, 98), (87, 100), (88, 87), (88, 89), (88, 90),
(88, 91), (88, 92), (88, 93), (88, 94), (88, 95), (88, 96), (88, 97), (88, 98), (88, 100), (89, 87), (89, 89), (89, 90), (89, 91), (89, 92), (89, 93), (89, 94), (89, 95), (89, 96), (89, 97), (89, 98), (89, 100), (89, 108), (90, 87), (90, 89), (90, 90), (90, 91), (90, 92), (90, 93), (90, 94), (90, 95), (90, 96), (90, 97), (90, 99), (90, 105), (90, 108), (91, 87), (91, 89), (91, 90), (91, 91), (91, 92), (91, 93), (91, 94), (91, 95), (91, 96), (91, 99), (91, 104), (91, 107), (92, 86), (92, 88), (92, 89), (92, 90), (92, 91), (92, 92), (92, 93), (92, 98), (92, 103), (92, 107), (93, 84), (93, 87), (93, 88), (93, 89), (93, 90), (93, 91), (93, 92), (93, 95), (93, 102), (93, 105), (94, 83), (94, 86), (94, 87), (94, 88), (94, 89),
(94, 90), (94, 91), (94, 93), (94, 101), (94, 104), (95, 83), (95, 85), (95, 86), (95, 87), (95, 88), (95, 89), (95, 90), (95, 92), (95, 100), (95, 103), (96, 84), (96, 86), (96, 87), (96, 88), (96, 89), (96, 90), (96, 91), (96, 92), (96, 99), (96, 102), (97, 84), (97, 87), (97, 88), (97, 89), (97, 90), (97, 91), (97, 92), (97, 93), (97, 94), (97, 95), (97, 96), (97, 97), (97, 101), (98, 85), (98, 89), (98, 90), (98, 91), (98, 97), (98, 99), (99, 87), (99, 92), (99, 93), (99, 94), (99, 95), (100, 89), (100, 91), )
coordinates_6395ED = ((124, 124),
(124, 126), (124, 128), (125, 123), (125, 128), (126, 122), (126, 124), (126, 125), (126, 126), (126, 128), (127, 122), (127, 124), (127, 125), (127, 126), (127, 128), (128, 121), (128, 123), (128, 124), (128, 125), (128, 126), (128, 128), (129, 121), (129, 123), (129, 124), (129, 125), (129, 126), (129, 127), (129, 129), (130, 121), (130, 123), (130, 124), (130, 125), (130, 126), (130, 127), (130, 129), (131, 121), (131, 125), (131, 126), (131, 127), (131, 129), (132, 123), (132, 124), (132, 126), (132, 128), (133, 121), (133, 122), (133, 125), (133, 128), (134, 126), (134, 127), )
coordinates_00FFFE = ((148, 142),
(149, 138), (149, 139), (149, 140), (149, 143), (150, 142), (150, 143), (151, 142), (151, 144), (152, 142), (152, 144), (153, 142), (153, 143), (153, 145), (154, 136), (154, 138), (154, 139), (154, 140), (154, 142), (154, 143), (154, 145), (155, 138), (155, 141), (155, 142), (155, 143), (155, 145), (156, 140), (156, 142), (156, 143), (156, 145), (157, 141), (157, 144), (158, 142), (158, 144), (159, 143), (159, 144), )
coordinates_B4E7FA = ((120, 140),
(120, 142), (120, 143), (120, 144), (120, 146), (121, 141), (122, 143), (122, 144), (122, 146), (122, 147), (123, 145), (123, 147), (124, 146), (124, 147), (125, 146), (125, 147), (126, 145), (126, 147), (127, 143), (127, 147), (128, 141), (128, 144), (128, 146), (129, 141), (129, 143), )
coordinates_F98072 = ((124, 110),
(125, 110), (125, 112), (125, 116), (125, 118), (125, 121), (126, 110), (126, 112), (126, 117), (126, 119), (127, 110), (128, 110), (129, 109), (129, 111), (130, 108), (130, 110), (130, 112), (131, 107), (131, 109), (131, 110), (131, 112), (132, 105), (132, 110), (132, 111), (133, 102), (133, 106), (133, 107), (133, 108), (133, 111), (133, 112), (134, 102), (134, 104), (134, 110), (134, 112), (134, 113), (134, 115), (135, 111), (135, 113), (135, 114), (135, 116), (136, 112), (136, 115), (136, 117), (137, 113), (137, 118), (138, 114), (138, 116), (138, 118), )
coordinates_97FB98 = ((156, 137),
(157, 137), (157, 138), (158, 138), (158, 139), (159, 138), (159, 140), (160, 121), (160, 130), (160, 131), (160, 133), (160, 134), (160, 135), (160, 136), (160, 137), (160, 138), (160, 139), (160, 141), (161, 121), (161, 130), (161, 138), (161, 139), (161, 140), (161, 144), (162, 129), (162, 131), (162, 132), (162, 133), (162, 134), (162, 135), (162, 136), (162, 137), (162, 138), (162, 139), (162, 140), (162, 141), (163, 120), (163, 129), (163, 131), (163, 132), (163, 133), (163, 134), (163, 135), (163, 136), (163, 137), (163, 138), (163, 139), (163, 140), (163, 143), (164, 119), (164, 120), (164, 128), (164, 130), (164, 131), (164, 132), (164, 133), (164, 134), (164, 135), (164, 136), (164, 137), (164, 138), (164, 139), (164, 141), (165, 120), (165, 128), (165, 129), (165, 130), (165, 131), (165, 132), (165, 133), (165, 134), (165, 135), (165, 136),
(165, 137), (165, 138), (165, 139), (165, 141), (166, 118), (166, 120), (166, 127), (166, 129), (166, 130), (166, 133), (166, 134), (166, 135), (166, 136), (166, 137), (166, 138), (166, 140), (167, 117), (167, 120), (167, 126), (167, 128), (167, 129), (167, 132), (167, 135), (167, 136), (167, 137), (167, 138), (167, 140), (168, 116), (168, 118), (168, 120), (168, 126), (168, 128), (168, 130), (168, 133), (168, 134), (168, 140), (169, 116), (169, 118), (169, 120), (169, 125), (169, 127), (169, 130), (169, 135), (169, 136), (169, 137), (169, 138), (169, 140), (170, 116), (170, 118), (170, 119), (170, 120), (170, 122), (170, 123), (170, 126), (170, 129), (171, 116), (171, 127), (171, 128), (172, 118), (172, 120), (172, 121), (172, 122), (172, 123), (172, 124), (172, 125), )
coordinates_323287 = ((148, 108),
(149, 105), (149, 109), (150, 103), (150, 108), (150, 110), (151, 99), (151, 101), (151, 106), (151, 107), (151, 111), (152, 101), (152, 104), (152, 105), (152, 108), (152, 112), (153, 102), (153, 103), (153, 110), (153, 114), (154, 111), (154, 112), (156, 101), (156, 102), (157, 100), (157, 103), (158, 98), (158, 101), (158, 103), (159, 98), (159, 100), (159, 101), (159, 103), (160, 99), (160, 100), (160, 101), (160, 102), (160, 104), (160, 113), (160, 115), (160, 116), (160, 117), (160, 119), (161, 98), (161, 100), (161, 101), (161, 102), (161, 104), (161, 112), (161, 119), (162, 98), (162, 102), (162, 104), (162, 111), (162, 113), (162, 114), (162, 115), (162, 116), (162, 118), (163, 99), (163, 103), (163, 105), (163, 111), (163, 113), (163, 114), (163, 115), (163, 116), (163, 118), (164, 102), (164, 105), (164, 111), (164, 113), (164, 114),
(164, 115), (164, 117), (165, 103), (165, 105), (165, 111), (165, 113), (165, 114), (165, 116), (166, 104), (166, 106), (166, 110), (166, 111), (166, 112), (166, 113), (166, 115), (167, 104), (167, 110), (167, 111), (167, 112), (167, 113), (167, 115), (168, 105), (168, 109), (168, 110), (168, 111), (168, 112), (168, 114), (169, 105), (169, 114), (170, 106), (170, 108), (170, 109), (170, 110), (170, 111), (170, 112), )
coordinates_6495ED = ((107, 121),
(108, 120), (108, 123), (109, 119), (109, 121), (109, 123), (110, 118), (110, 120), (110, 122), (111, 117), (111, 120), (111, 122), (112, 116), (112, 118), (112, 119), (112, 121), (113, 115), (113, 118), (113, 120), (114, 114), (114, 117), (114, 118), (114, 120), (115, 114), (115, 116), (115, 117), (115, 119), (116, 114), (116, 116), (116, 117), (116, 119), (117, 114), (117, 116), (117, 118), (118, 114), (118, 116), (118, 118), (119, 117), (120, 115), (120, 117), (121, 116), (121, 117), (122, 117), )
coordinates_01FFFF = ((90, 141),
(90, 143), (90, 144), (90, 145), (90, 146), (90, 147), (91, 140), (92, 140), (92, 143), (92, 144), (92, 146), (93, 142), (93, 144), (93, 146), (94, 143), (94, 146), (95, 143), (95, 146), (96, 137), (96, 142), (96, 144), (96, 146), (97, 136), (97, 138), (97, 139), (97, 140), (97, 141), (97, 143), (97, 145), (98, 135), (98, 137), (98, 142), (98, 143), (98, 145), (99, 135), (99, 137), (99, 138), (99, 139), (99, 140), (99, 141), (99, 142), (99, 143), (99, 145), (100, 135), (100, 137), (100, 138), (100, 139), (100, 140), (100, 141), (100, 142), (100, 143), (100, 144), (100, 145), (101, 134), (101, 136), (101, 137), (101, 138), (101, 139), (101, 140), (101, 141), (101, 142), (101, 144), (102, 134), (102, 144), (103, 134), (103, 136), (103, 137), (103, 138), (103, 139), (103, 140), (103, 141), (103, 143), )
coordinates_FA8072 = ((102, 108),
(103, 107), (103, 110), (104, 107), (104, 111), (105, 107), (105, 109), (105, 111), (106, 107), (106, 109), (106, 111), (107, 108), (107, 111), (108, 108), (108, 110), (108, 111), (108, 112), (109, 108), (109, 110), (109, 111), (110, 108), (110, 110), (110, 113), (111, 108), (111, 112), (112, 108), (112, 111), (113, 108), (113, 110), (114, 107), (114, 109), (115, 107), (115, 108), (116, 106), (117, 106), (117, 107), (118, 105), (118, 107), (119, 105), (119, 106), (120, 106), (120, 111), (120, 113), (121, 104), (121, 109), (121, 114), (122, 104), (122, 106), (122, 107), (122, 108), (122, 109), (122, 110), (122, 111), (122, 112), (122, 113), (122, 115), )
coordinates_98FB98 = ((75, 132),
(75, 134), (75, 135), (76, 136), (76, 137), (76, 138), (77, 133), (77, 135), (77, 140), (77, 141), (77, 142), (77, 144), (78, 133), (78, 135), (78, 136), (78, 137), (78, 139), (78, 145), (79, 133), (79, 135), (79, 136), (79, 137), (79, 141), (79, 142), (79, 143), (79, 146), (80, 134), (80, 137), (80, 141), (80, 143), (80, 144), (80, 146), (81, 134), (81, 137), (81, 141), (81, 143), (81, 144), (81, 146), (82, 133), (82, 136), (82, 141), (82, 143), (82, 144), (82, 145), (82, 147), (83, 133), (83, 136), (83, 141), (83, 143), (83, 144), (83, 145), (83, 147), (84, 132), (84, 134), (84, 136), (84, 141), (84, 143), (84, 144), (84, 145), (84, 147), (85, 132), (85, 134), (85, 135), (85, 137), (85, 142), (85, 144), (85, 145), (85, 147), (86, 133), (86, 135), (86, 137), (86, 143), (86, 145),
(86, 147), (87, 134), (87, 137), (87, 143), (87, 147), (88, 134), (88, 137), (88, 142), (88, 144), (88, 146), (89, 135), (89, 136), )
coordinates_FEC0CB = ((133, 99),
(133, 100), (134, 99), (135, 99), (136, 99), (137, 98), (137, 100), (138, 98), (138, 102), (139, 100), (139, 104), (140, 100), (140, 102), (140, 105), (141, 99), (141, 103), (141, 104), (141, 105), (142, 98), (142, 99), (142, 100), (142, 101), (142, 104), (142, 106), (143, 103), (143, 106), (143, 110), (143, 112), (144, 104), (144, 106), (144, 108), (144, 109), (144, 113), (145, 104), (145, 110), (145, 112), (146, 104), (146, 106), (146, 107), (146, 108), (146, 110), (146, 112), (147, 99), (147, 101), (147, 104), (147, 105), (147, 109), (147, 112), (148, 100), (148, 103), (148, 110), (148, 112), (149, 101), (149, 111), (149, 113), (150, 112), (150, 114), (151, 114), )
coordinates_333287 = ((72, 118),
(72, 120), (72, 121), (73, 117), (73, 122), (73, 123), (73, 124), (73, 125), (73, 127), (74, 110), (74, 112), (74, 116), (74, 118), (74, 119), (74, 120), (74, 128), (75, 110), (75, 113), (75, 114), (75, 117), (75, 118), (75, 122), (75, 124), (75, 125), (75, 129), (76, 110), (76, 112), (76, 116), (76, 118), (76, 122), (76, 127), (76, 130), (77, 110), (77, 113), (77, 114), (77, 115), (77, 116), (77, 117), (77, 119), (77, 128), (78, 112), (78, 114), (78, 115), (78, 116), (78, 117), (78, 118), (78, 120), (78, 128), (78, 131), (79, 113), (79, 115), (79, 116), (79, 117), (79, 118), (79, 119), (79, 121), (79, 129), (79, 131), (80, 114), (80, 116), (80, 117), (80, 118), (80, 119), (80, 120), (80, 122), (80, 129), (80, 131), (81, 115), (81, 117), (81, 118), (81, 119), (81, 120), (81, 122),
(81, 129), (81, 131), (82, 117), (82, 118), (82, 119), (82, 120), (82, 121), (82, 123), (82, 129), (82, 131), (83, 116), (83, 118), (83, 119), (83, 120), (83, 121), (83, 123), (83, 129), (83, 130), (84, 117), (84, 119), (84, 120), (84, 121), (84, 122), (84, 123), (84, 124), (84, 130), (85, 118), (85, 120), (85, 121), (85, 122), (85, 124), (85, 130), (86, 119), (86, 123), (86, 130), (87, 120), (87, 122), (87, 130), (87, 131), (88, 130), (88, 132), (89, 131), (89, 133), (91, 109), (91, 110), (92, 111), (93, 113), (94, 116), (94, 118), (95, 118), (95, 119), )
coordinates_FFC0CB = ((94, 108),
(94, 110), (94, 111), (95, 108), (95, 110), (95, 111), (95, 112), (95, 114), (96, 115), (96, 116), (97, 116), (97, 118), (98, 118), )
| 493.252336 | 865 | 0.485183 | 8,996 | 52,778 | 2.843264 | 0.014784 | 0.000704 | 0.000704 | 0.000938 | 0.001407 | 0.001407 | 0 | 0 | 0 | 0 | 0 | 0.578173 | 0.174467 | 52,778 | 106 | 866 | 497.90566 | 0.008882 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a4b2eb29026b39b9d0463c237b0585046ff08884 | 176 | py | Python | haproxy/haproxy-hooks.py | laundrapp/docker-thumor | 60bb15b0196486cca67a8cee33b4aebe6845a56c | [
"MIT"
] | null | null | null | haproxy/haproxy-hooks.py | laundrapp/docker-thumor | 60bb15b0196486cca67a8cee33b4aebe6845a56c | [
"MIT"
] | null | null | null | haproxy/haproxy-hooks.py | laundrapp/docker-thumor | 60bb15b0196486cca67a8cee33b4aebe6845a56c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from haproxy_helper import create_conf
def before_start(watcher, arbiter, hook_name, **kwargs):
create_conf()
return True | 25.142857 | 56 | 0.710227 | 25 | 176 | 4.8 | 0.92 | 0.166667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006711 | 0.153409 | 176 | 7 | 57 | 25.142857 | 0.798658 | 0.238636 | 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 | 0 | 0 | 0 | 3 |
350eb2e604161c82691929910f393b323d247390 | 546 | py | Python | backend/src/account/permissions.py | NgoQuocBao1010/Shipping-System-Management | 4b9f26c63f1db46ed1beac3b867f40756d0ba980 | [
"MIT"
] | 4 | 2022-01-03T16:26:42.000Z | 2022-01-04T02:55:52.000Z | backend/src/account/permissions.py | NgoQuocBao1010/Shipping-System-Management | 4b9f26c63f1db46ed1beac3b867f40756d0ba980 | [
"MIT"
] | null | null | null | backend/src/account/permissions.py | NgoQuocBao1010/Shipping-System-Management | 4b9f26c63f1db46ed1beac3b867f40756d0ba980 | [
"MIT"
] | 1 | 2022-01-16T21:41:20.000Z | 2022-01-16T21:41:20.000Z | from rest_framework import permissions
class AdminOnly(permissions.BasePermission):
"""
Only allow admin user to access this endpoint
"""
def has_permission(self, request, view):
message = "Non-admin user not allowed"
return request.user.is_admin
class StaffOnly(permissions.BasePermission):
"""
Only allow staff user (driver and manager) to access this endpoint
"""
def has_permission(self, request, view):
message = "Non-staff user not allowed"
return request.user.is_staff
| 24.818182 | 70 | 0.690476 | 66 | 546 | 5.636364 | 0.5 | 0.134409 | 0.155914 | 0.182796 | 0.505376 | 0.505376 | 0.505376 | 0.327957 | 0.327957 | 0.327957 | 0 | 0 | 0.228938 | 546 | 21 | 71 | 26 | 0.88361 | 0.205128 | 0 | 0.222222 | 0 | 0 | 0.129032 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0.111111 | 0 | 0.777778 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 |
352bd88d9ec657f77f3754c54637dc693126ef29 | 919 | py | Python | tubbs/formatter/scala/rewrite.py | tek/tubbs | cd4c174c31b6c58a6935ca8a5f0f141377a9a04c | [
"MIT"
] | null | null | null | tubbs/formatter/scala/rewrite.py | tek/tubbs | cd4c174c31b6c58a6935ca8a5f0f141377a9a04c | [
"MIT"
] | null | null | null | tubbs/formatter/scala/rewrite.py | tek/tubbs | cd4c174c31b6c58a6935ca8a5f0f141377a9a04c | [
"MIT"
] | null | null | null | from amino import Left, Either, List
from amino.util.string import snake_case
from ribosome.nvim.components import NvimComponent
from tubbs.tatsu.ast import AstMap, AstElem
from tubbs.formatter.base import Formatter as FormatterBase
class Formatter(FormatterBase):
def no_rule(self, ast: AstElem) -> Either[str, List[str]]:
return Left('cannot format rule `{}`'.format(ast.info.rule))
def _format_rule(self, ast: AstMap) -> Either[str, List[str]]:
handler = getattr(self, snake_case(ast.rule), self.no_rule)
return handler(ast)
def format(self, ast: AstElem) -> Either[str, List[str]]:
return self._format_rule(ast.root)
def template_stat(self, ast: AstElem) -> Either[str, List[str]]:
return Left('NI')
class VimFormatter(Formatter):
def __init__(self, vim: NvimComponent) -> None:
self.vim = vim
__all__ = ('Formatter', 'VimFormatter')
| 27.848485 | 68 | 0.694233 | 122 | 919 | 5.090164 | 0.360656 | 0.045089 | 0.083736 | 0.10306 | 0.186795 | 0.186795 | 0.186795 | 0.186795 | 0.128824 | 0 | 0 | 0 | 0.181719 | 919 | 32 | 69 | 28.71875 | 0.825798 | 0 | 0 | 0 | 0 | 0 | 0.050054 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0 | 0.263158 | 0.157895 | 0.842105 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
353293893eaf8bbe5e279b16a241c39b0b6d3b4b | 294 | py | Python | SolidColour.py | timpelican/raytrace | 2ffe9f4de093b856c71301480feb6fb2e095407c | [
"Apache-2.0"
] | null | null | null | SolidColour.py | timpelican/raytrace | 2ffe9f4de093b856c71301480feb6fb2e095407c | [
"Apache-2.0"
] | null | null | null | SolidColour.py | timpelican/raytrace | 2ffe9f4de093b856c71301480feb6fb2e095407c | [
"Apache-2.0"
] | null | null | null | # Solid colour "pattern"
from Pattern import Pattern
class SolidColour(Pattern):
def __init__(self, c):
super(SolidColour, self).__init__()
self.c = c
def pattern(self, point):
# Solid colour, this is in preparation for nesting patterns
return self.c
| 22.615385 | 67 | 0.656463 | 37 | 294 | 5 | 0.567568 | 0.081081 | 0.097297 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.258503 | 294 | 12 | 68 | 24.5 | 0.848624 | 0.272109 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.285714 | false | 0 | 0.142857 | 0.142857 | 0.714286 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
3536b03022e4b3fa8944d70a20fe699c93fc1612 | 269 | py | Python | pinterest_problems/problem_4.py | Neilblaze/Circadian-Coding-Problems | 25f87087341b6d6d622bcbbdb8c60e86360da131 | [
"MIT"
] | 129 | 2018-10-14T17:52:29.000Z | 2022-01-29T15:45:57.000Z | pinterest_problems/problem_4.py | Neilblaze/Circadian-Coding-Problems | 25f87087341b6d6d622bcbbdb8c60e86360da131 | [
"MIT"
] | 2 | 2019-11-30T23:28:23.000Z | 2020-01-03T16:30:32.000Z | pinterest_problems/problem_4.py | Neilblaze/Circadian-Coding-Problems | 25f87087341b6d6d622bcbbdb8c60e86360da131 | [
"MIT"
] | 60 | 2019-02-21T09:18:31.000Z | 2022-03-25T21:01:04.000Z | """This problem was asked by Pinterest.
Given a binary tree, write a function to determine whether the tree is a
mirror image of itself.
Two trees are a mirror image if their root values are the same and the
left subtree is a mirror image of the right subtree.
""" | 33.625 | 73 | 0.762082 | 49 | 269 | 4.183673 | 0.673469 | 0.102439 | 0.17561 | 0.136585 | 0.156098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.200743 | 269 | 8 | 74 | 33.625 | 0.953488 | 0.973978 | 0 | null | 0 | null | 0 | 0 | null | 0 | 0 | 0 | null | 1 | null | true | 0 | 0 | null | null | null | 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 | 0 | 0 | 3 |
353e25c3cd7ce94b5eb8b1b14772ade82fdd445b | 411 | py | Python | plugin2/plugin2/__init__.py | philipov/python-plugins-demo | a8f7fa3ba4862bf62e96104080ced5bde560a473 | [
"MIT"
] | null | null | null | plugin2/plugin2/__init__.py | philipov/python-plugins-demo | a8f7fa3ba4862bf62e96104080ced5bde560a473 | [
"MIT"
] | null | null | null | plugin2/plugin2/__init__.py | philipov/python-plugins-demo | a8f7fa3ba4862bf62e96104080ced5bde560a473 | [
"MIT"
] | null | null | null | #-- plugin2.__init__
""" Documentation for Plugin 2
"""
from master import Thing
#----------------------------------------------------------------------------------------------#
PARAMETER = False
###############
class Dog(Thing):
__key__ = 'Dog'
###############
class Cat(Thing):
__key__ = 'Cat'
#----------------------------------------------------------------------------------------------#
| 17.125 | 96 | 0.289538 | 22 | 411 | 4.863636 | 0.727273 | 0.149533 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005495 | 0.114355 | 411 | 23 | 97 | 17.869565 | 0.288462 | 0.569343 | 0 | 0 | 0 | 0 | 0.044444 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.166667 | 0 | 0.833333 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 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 | 1 | 0 | 0 | 3 |
103828c473b07d82693334cd15f2b60d3c992144 | 1,034 | py | Python | Lib/site-packages/svgwrite/data/pattern.py | Carshy/blogApplication | a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f | [
"bzip2-1.0.6"
] | 46 | 2020-05-25T21:10:19.000Z | 2022-03-27T12:33:40.000Z | Lib/site-packages/svgwrite/data/pattern.py | Carshy/blogApplication | a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f | [
"bzip2-1.0.6"
] | 110 | 2017-12-13T08:36:06.000Z | 2020-05-07T05:42:19.000Z | Lib/site-packages/svgwrite/data/pattern.py | Carshy/blogApplication | a471cd8627510ebc2bd3ba213fe2dbe6e4eca60f | [
"bzip2-1.0.6"
] | 31 | 2020-05-25T21:14:56.000Z | 2022-03-25T08:57:43.000Z | #!/usr/bin/env python
#coding:utf-8
# Author: mozman --<mozman@gmx.at>
# Purpose: pattern module
# Created: 27.09.2010
# Copyright (C) 2010, Manfred Moitzi
# License: MIT License
import re
#coordinate ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")?
coordinate = re.compile(r"(^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)(cm|em|ex|in|mm|pc|pt|px|%)?$")
#length ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")?
length = coordinate
#angle ::= number (~"deg" | ~"grad" | ~"rad")?
angle = re.compile(r"(^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)(deg|rad|grad)?$")
# numbers without units
number = re.compile(r"(^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)$")
# number as percentage value '###%'
percentage = re.compile(r"(^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)%$")
#frequency ::= number (~"Hz" | ~"kHz")
frequency = re.compile(r"(^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)(Hz|kHz)?$")
#time ::= number (~"s" | ~"ms")
time = re.compile(r"(^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)(s|ms)?$")
| 33.354839 | 98 | 0.476789 | 152 | 1,034 | 3.243421 | 0.381579 | 0.073022 | 0.121704 | 0.133874 | 0.308316 | 0.308316 | 0.308316 | 0.308316 | 0.308316 | 0.219067 | 0 | 0.053965 | 0.121857 | 1,034 | 30 | 99 | 34.466667 | 0.488987 | 0.478723 | 0 | 0 | 0 | 0.25 | 0.597701 | 0.597701 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.125 | 0 | 0.125 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
107ce8890a6a37c4f3abc7bcbd0dd3d94fd641a7 | 414 | py | Python | example/flashing_light.py | lolloberga/Capsian-Engine | 086e0fee9392df1642c8199e61e2e24fb6b81e77 | [
"Apache-2.0"
] | 10 | 2020-09-26T15:10:48.000Z | 2022-02-03T19:13:56.000Z | example/flashing_light.py | lolloberga/Capsian-Engine | 086e0fee9392df1642c8199e61e2e24fb6b81e77 | [
"Apache-2.0"
] | 2 | 2020-09-29T19:13:50.000Z | 2021-12-24T12:04:29.000Z | example/flashing_light.py | lolloberga/Capsian-Engine | 086e0fee9392df1642c8199e61e2e24fb6b81e77 | [
"Apache-2.0"
] | 3 | 2021-03-05T20:14:38.000Z | 2022-01-26T21:34:36.000Z | from Capsian import *
import random
class FlashingLight(AmbientLight):
def flash(self, *args, **kwargs):
offset = random.uniform(-30, 20)
if not self.intensity[0] > 0:
self.intensity[0] = 50
self.intensity[1] = 50
return
if self.intensity[0] + offset > 5:
self.intensity[0] += offset
self.intensity[1] += offset
| 24.352941 | 42 | 0.543478 | 47 | 414 | 4.787234 | 0.510638 | 0.346667 | 0.248889 | 0.177778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.058824 | 0.342995 | 414 | 16 | 43 | 25.875 | 0.768382 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.083333 | false | 0 | 0.166667 | 0 | 0.416667 | 0 | 0 | 0 | 0 | null | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.