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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ef41a17afcfac48d8984afd61cf71b380ea6f707 | 85 | py | Python | authx/middleware/__init__.py | theoohoho/authx | 5c79983cedd4f33fe4c6c3d744c6857f830653fc | [
"MIT"
] | 141 | 2021-11-08T18:59:57.000Z | 2022-03-31T18:49:23.000Z | authx/middleware/__init__.py | theoohoho/authx | 5c79983cedd4f33fe4c6c3d744c6857f830653fc | [
"MIT"
] | 85 | 2021-11-08T17:30:08.000Z | 2022-03-24T18:23:51.000Z | authx/middleware/__init__.py | theoohoho/authx | 5c79983cedd4f33fe4c6c3d744c6857f830653fc | [
"MIT"
] | 15 | 2021-11-09T00:01:13.000Z | 2022-03-26T20:25:18.000Z | from authx.middleware.Oauth2 import MiddlewareOauth2
__all__ = ["MiddlewareOauth2"]
| 21.25 | 52 | 0.823529 | 8 | 85 | 8.25 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.038961 | 0.094118 | 85 | 3 | 53 | 28.333333 | 0.818182 | 0 | 0 | 0 | 0 | 0 | 0.188235 | 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 |
ef4875220a3f1fc682c10d3c445761a778a40c39 | 250 | py | Python | net/activations.py | LBartolini/GKPositioning | b522e1620be68e64fc2e02554c7ee19ff2698bf8 | [
"MIT"
] | null | null | null | net/activations.py | LBartolini/GKPositioning | b522e1620be68e64fc2e02554c7ee19ff2698bf8 | [
"MIT"
] | null | null | null | net/activations.py | LBartolini/GKPositioning | b522e1620be68e64fc2e02554c7ee19ff2698bf8 | [
"MIT"
] | null | null | null | import numpy as np
# activation functions and its derivatives
def tanh(x):
return np.tanh(x)
def tanh_prime(x):
return 1-np.tanh(x)**2
def sigmoid(x):
return 1/(1+np.exp(-x))
def sigmoid_prime(x):
return sigmoid(x)*(1-sigmoid(x))
| 16.666667 | 42 | 0.664 | 45 | 250 | 3.644444 | 0.4 | 0.170732 | 0.085366 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02451 | 0.184 | 250 | 14 | 43 | 17.857143 | 0.779412 | 0.16 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.444444 | false | 0 | 0.111111 | 0.444444 | 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 | 0 | 1 | 1 | 0 | 0 | 3 |
32386c7efd3b6e87071529a8cc284879a7abff0f | 519 | py | Python | code/utilities/date_util.py | msinkinson/CommonOwnerReplication | 59a4b275464521623c6bfc22738959c27a534504 | [
"MIT"
] | 23 | 2020-06-24T21:07:35.000Z | 2022-02-25T10:58:15.000Z | code/utilities/date_util.py | msinkinson/CommonOwnerReplication | 59a4b275464521623c6bfc22738959c27a534504 | [
"MIT"
] | 1 | 2020-06-29T16:56:06.000Z | 2020-06-29T16:56:06.000Z | code/utilities/date_util.py | msinkinson/CommonOwnerReplication | 59a4b275464521623c6bfc22738959c27a534504 | [
"MIT"
] | 14 | 2020-06-24T19:46:57.000Z | 2022-03-24T17:06:44.000Z | import pandas as pd
def lookup_dates(s):
"""
This is an extremely fast approach to datetime parsing.
For large data, the same dates are often repeated. Rather than
re-parse these, we store all unique dates, parse them, and
use a lookup to convert all dates.
"""
dates_dict = {date:pd.to_datetime(date,errors='coerce') for date in s.unique()}
return s.map(dates_dict)
def end_quarter(series):
return (series - pd.tseries.offsets.DateOffset(days=1) + pd.tseries.offsets.QuarterEnd()) | 37.071429 | 93 | 0.709056 | 81 | 519 | 4.481481 | 0.679012 | 0.055096 | 0.088154 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002381 | 0.190751 | 519 | 14 | 93 | 37.071429 | 0.861905 | 0.408478 | 0 | 0 | 0 | 0 | 0.021429 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.166667 | 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 |
323a616d276db5c2930e9506fc0638036106f972 | 721 | py | Python | pisap/__init__.py | hanaecarrie/pisap | 958f53dbc28afc6fb84c7f3d678c8549307ef9f5 | [
"CECILL-B"
] | null | null | null | pisap/__init__.py | hanaecarrie/pisap | 958f53dbc28afc6fb84c7f3d678c8549307ef9f5 | [
"CECILL-B"
] | null | null | null | pisap/__init__.py | hanaecarrie/pisap | 958f53dbc28afc6fb84c7f3d678c8549307ef9f5 | [
"CECILL-B"
] | null | null | null | ##########################################################################
# XXX - Copyright (C) XXX, 2017
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
# for details.
##########################################################################
"""
piSAP is a Python package related to sparsity and its application in
astronomical data analysis. This package is based on the 'sparse2d' C++ library
that allows sparse decomposition, denoising and deconvolution.
"""
from .info import __version__
from pisap.base import io
from pisap.base.image import Image
import pisap.extensions
| 37.947368 | 79 | 0.617198 | 90 | 721 | 4.877778 | 0.711111 | 0.031891 | 0.059226 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.009434 | 0.117892 | 721 | 18 | 80 | 40.055556 | 0.680818 | 0.604716 | 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 |
326959053fce1cd28c3bb17cf3ce8d35a636a081 | 228 | pyde | Python | session_3/Examples/LoadImage/LoadImage.pyde | matthias-jaeger-net/coding-sessions | 01196ec3277f1199bdee0fb3a7771bfc970a08c5 | [
"MIT"
] | 1 | 2020-01-25T15:27:22.000Z | 2020-01-25T15:27:22.000Z | session_3/Examples/LoadImage/LoadImage.pyde | matthias-jaeger-net/coding-sessions | 01196ec3277f1199bdee0fb3a7771bfc970a08c5 | [
"MIT"
] | null | null | null | session_3/Examples/LoadImage/LoadImage.pyde | matthias-jaeger-net/coding-sessions | 01196ec3277f1199bdee0fb3a7771bfc970a08c5 | [
"MIT"
] | null | null | null | # Example 1
def setup():
# Set to the same size as the source image
# https://unsplash.com/photos/mGy1Jjr2e6M
size(900, 600)
# Load and display and position the image
image(loadImage("file.jpg"), 0, 0)
| 22.8 | 46 | 0.644737 | 34 | 228 | 4.323529 | 0.794118 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.069767 | 0.245614 | 228 | 9 | 47 | 25.333333 | 0.784884 | 0.574561 | 0 | 0 | 0 | 0 | 0.086957 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | true | 0 | 0 | 0 | 0.333333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3279d3e14d40fa6b329d283e373be3470ec67605 | 277 | py | Python | Validation/RecoB/python/bTagAnalysis_harvesting_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | Validation/RecoB/python/bTagAnalysis_harvesting_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | Validation/RecoB/python/bTagAnalysis_harvesting_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
# BTagPerformanceAnalyzer configuration
from Validation.RecoB.bTagAnalysis_cfi import *
bTagValidationHarvest = bTagHarvestMC.clone()
from DQMOffline.RecoB.bTagAnalysisData_cfi import *
bTagValidationHarvestData = bTagHarvest.clone()
| 30.777778 | 51 | 0.855596 | 26 | 277 | 9.038462 | 0.769231 | 0.076596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.083032 | 277 | 8 | 52 | 34.625 | 0.925197 | 0.133574 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.6 | 0 | 0.6 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
328ab31966b94bac98d6aabe62a200019dc04926 | 50 | py | Python | api/src/app.py | marreche/deep_film | 257b30298f991c85432235eccbb5acdba110a2d8 | [
"MIT"
] | null | null | null | api/src/app.py | marreche/deep_film | 257b30298f991c85432235eccbb5acdba110a2d8 | [
"MIT"
] | null | null | null | api/src/app.py | marreche/deep_film | 257b30298f991c85432235eccbb5acdba110a2d8 | [
"MIT"
] | 1 | 2021-11-18T09:36:21.000Z | 2021-11-18T09:36:21.000Z | from flask import Flask
app = Flask("movies_api") | 16.666667 | 25 | 0.76 | 8 | 50 | 4.625 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.14 | 50 | 3 | 25 | 16.666667 | 0.860465 | 0 | 0 | 0 | 0 | 0 | 0.196078 | 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 |
32c5e2fc97453b7141b89e70d8e4673258e24429 | 152 | py | Python | coding/product_of_array_except_self/starter.py | skumaravelan/tech-interview-questions | 637dfbf131123c77a8e2e4e45ba420355dcb381f | [
"MIT"
] | 14 | 2022-02-08T17:29:29.000Z | 2022-03-27T17:22:14.000Z | coding/product_of_array_except_self/starter.py | skumaravelan/tech-interview-questions | 637dfbf131123c77a8e2e4e45ba420355dcb381f | [
"MIT"
] | 18 | 2022-01-27T17:37:26.000Z | 2022-03-29T15:16:18.000Z | coding/product_of_array_except_self/starter.py | skumaravelan/tech-interview-questions | 637dfbf131123c77a8e2e4e45ba420355dcb381f | [
"MIT"
] | 9 | 2022-02-08T16:03:10.000Z | 2022-03-19T03:26:30.000Z | class Solution(object):
def productExceptSelf(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
| 19 | 38 | 0.486842 | 14 | 152 | 5.285714 | 0.785714 | 0.189189 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.375 | 152 | 7 | 39 | 21.714286 | 0.778947 | 0.256579 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
0875555187c962f1beee2c7a91d74d3b3cacb958 | 149 | py | Python | cwd.py | Nuk3lar/FluxBot | 96d604a7178e83d29030f61bddd7cdc032b18249 | [
"MIT"
] | null | null | null | cwd.py | Nuk3lar/FluxBot | 96d604a7178e83d29030f61bddd7cdc032b18249 | [
"MIT"
] | null | null | null | cwd.py | Nuk3lar/FluxBot | 96d604a7178e83d29030f61bddd7cdc032b18249 | [
"MIT"
] | null | null | null | import os, sys
#Determines the system type
if sys.platform == "linux":
cwd = os.getenv('PWD')
elif sys.platform == "win32":
cwd = os.getcwd() | 24.833333 | 29 | 0.651007 | 22 | 149 | 4.409091 | 0.727273 | 0.226804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016529 | 0.187919 | 149 | 6 | 30 | 24.833333 | 0.785124 | 0.174497 | 0 | 0 | 0 | 0 | 0.105691 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.2 | 0 | 0.2 | 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 |
08863baf1738e858617066f7df18b1e279cc449d | 317 | py | Python | Data Scientist Career Path/5. Data Manipulation with Pandas/2. Hands On with Pandas/2. Modifying/8. lambda row.py | myarist/Codecademy | 2ba0f104bc67ab6ef0f8fb869aa12aa02f5f1efb | [
"MIT"
] | 23 | 2021-06-06T15:35:55.000Z | 2022-03-21T06:53:42.000Z | Data Scientist Career Path/5. Data Manipulation with Pandas/2. Hands On with Pandas/2. Modifying/8. lambda row.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | null | null | null | Data Scientist Career Path/5. Data Manipulation with Pandas/2. Hands On with Pandas/2. Modifying/8. lambda row.py | shivaniverma1/Data-Scientist | f82939a411484311171465591455880c8e354750 | [
"MIT"
] | 9 | 2021-06-08T01:32:04.000Z | 2022-03-18T15:38:09.000Z | import codecademylib
import pandas as pd
df = pd.read_csv('employees.csv')
total_earned = lambda row: row['hours_worked'] * row['hourly_wage'] if row['hours_worked'] <= 40 else (40 * row['hourly_wage']) + (row['hours_worked'] - 40) * (row['hourly_wage'] * 1.50)
df['total_earned'] = df.apply(total_earned, axis=1) | 39.625 | 187 | 0.694006 | 50 | 317 | 4.2 | 0.48 | 0.157143 | 0.2 | 0.152381 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.035971 | 0.123028 | 317 | 8 | 188 | 39.625 | 0.719424 | 0 | 0 | 0 | 0 | 0 | 0.295597 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
0894210380f9f449a95fc68c8cc8da3b277f0ca5 | 157 | py | Python | src/flask_app_generator/templates/views/__init__.py | SeoDongMyeong/flask-generator | 420ed31d3b0fca2822fed9903446d75d9a93bec5 | [
"MIT"
] | null | null | null | src/flask_app_generator/templates/views/__init__.py | SeoDongMyeong/flask-generator | 420ed31d3b0fca2822fed9903446d75d9a93bec5 | [
"MIT"
] | null | null | null | src/flask_app_generator/templates/views/__init__.py | SeoDongMyeong/flask-generator | 420ed31d3b0fca2822fed9903446d75d9a93bec5 | [
"MIT"
] | 1 | 2018-02-03T10:33:57.000Z | 2018-02-03T10:33:57.000Z | import index
BLUEPRINTS = [
index.blueprint
]
def register_blueprint(app):
for blueprint in BLUEPRINTS:
app.register_blueprint(blueprint)
| 14.272727 | 41 | 0.719745 | 17 | 157 | 6.529412 | 0.529412 | 0.306306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.210191 | 157 | 10 | 42 | 15.7 | 0.895161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.142857 | false | 0 | 0.142857 | 0 | 0.285714 | 0.571429 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
08a3c2d8042cbbc05353c7cc312ee8ddbe7dc9ce | 175 | py | Python | examples/testZedPose.py | rraid/navi-v2 | 9b4bff86791cf81fc00f6c9bd16cb257f9949afb | [
"MIT"
] | null | null | null | examples/testZedPose.py | rraid/navi-v2 | 9b4bff86791cf81fc00f6c9bd16cb257f9949afb | [
"MIT"
] | 9 | 2017-07-20T23:16:24.000Z | 2017-08-12T01:13:32.000Z | examples/testZedPose.py | rraid/navi-v2 | 9b4bff86791cf81fc00f6c9bd16cb257f9949afb | [
"MIT"
] | null | null | null | import sys
sys.path.append("../device/")
import zed
import numpy as np
import cv2
import time
zed.open()
while True:
print zed.getPose()
time.sleep(.01)
zed.close()
| 10.9375 | 29 | 0.691429 | 28 | 175 | 4.321429 | 0.678571 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02069 | 0.171429 | 175 | 15 | 30 | 11.666667 | 0.813793 | 0 | 0 | 0 | 0 | 0 | 0.057143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.454545 | null | null | 0.090909 | 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 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
08cb4fa5fb5fad51699435af3ff02778340e982b | 124 | py | Python | baekjoon/math/13277-big-multiply.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | 2 | 2019-02-08T01:23:07.000Z | 2020-11-19T12:23:52.000Z | baekjoon/math/13277-big-multiply.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | baekjoon/math/13277-big-multiply.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | from decimal import Decimal,getcontext
getcontext().prec=10**6
a,b = map(Decimal,input().split())
print(format(a * b,'f'))
| 20.666667 | 38 | 0.701613 | 20 | 124 | 4.35 | 0.75 | 0.045977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.026786 | 0.096774 | 124 | 5 | 39 | 24.8 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0.008065 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.25 | 0 | 0.25 | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
08d0368c5343c998090afcf80c32d52904a8109f | 1,470 | py | Python | tests/conftest.py | sunwei/ddd-nginx | 77796351a3fc61df1afbbbf353f0058f7a0e8ed3 | [
"MIT"
] | null | null | null | tests/conftest.py | sunwei/ddd-nginx | 77796351a3fc61df1afbbbf353f0058f7a0e8ed3 | [
"MIT"
] | null | null | null | tests/conftest.py | sunwei/ddd-nginx | 77796351a3fc61df1afbbbf353f0058f7a0e8ed3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test data"""
import os
import pytest
TEST_PATH = os.path.abspath(os.path.dirname(__file__))
TEST_DATA_PATH = os.path.join(TEST_PATH, 'test_data')
def _get_test_data(filename):
file_path = os.path.join(TEST_DATA_PATH, filename)
with open(file_path, encoding='utf-8') as data_file:
data = data_file.read()
return data
@pytest.fixture(name='map_empty_conf')
def map_empty_conf():
return _get_test_data('map-empty.conf')
@pytest.fixture(name='map_conf')
def map_conf():
return _get_test_data('map.conf')
@pytest.fixture(name='location_api')
def location_api():
return _get_test_data('location-api.conf')
@pytest.fixture(name='location_policy')
def location_policy():
return _get_test_data('location-policy.conf')
@pytest.fixture(name='upstream_conf')
def upstream_conf():
return _get_test_data('upstream.conf')
@pytest.fixture(name='server_conf')
def server_conf():
return _get_test_data('server.conf')
@pytest.fixture(name='server_no_tls_conf')
def server_no_tls_conf():
return _get_test_data('server-no-tls.conf')
@pytest.fixture(name='server_location_conf')
def server_location_conf():
return _get_test_data('server-location.conf')
@pytest.fixture(name='server_location_no_tls_conf')
def server_location_no_tls_conf():
return _get_test_data('server-location-no-tls.conf')
@pytest.fixture(name='nginx_conf')
def nginx_conf():
return _get_test_data('nginx.conf')
| 22.615385 | 56 | 0.742177 | 221 | 1,470 | 4.565611 | 0.158371 | 0.11893 | 0.119921 | 0.168484 | 0.561943 | 0.280476 | 0.106046 | 0.063429 | 0 | 0 | 0 | 0.001535 | 0.113605 | 1,470 | 64 | 57 | 22.96875 | 0.772832 | 0.021769 | 0 | 0 | 0 | 0 | 0.223464 | 0.03771 | 0 | 0 | 0 | 0 | 0 | 1 | 0.282051 | false | 0 | 0.051282 | 0.25641 | 0.615385 | 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 |
08dffaba463e7f42bf6ecb90d6ab534d7ee530be | 300 | py | Python | sample/fastapi/server.py | egmkang/koala | 70ea68c0d4380242c61faa8a6f023fa248049ec8 | [
"MIT"
] | 15 | 2021-06-02T12:43:26.000Z | 2022-01-24T19:14:02.000Z | sample/fastapi/server.py | egmkang/flash | 70ea68c0d4380242c61faa8a6f023fa248049ec8 | [
"MIT"
] | 1 | 2021-06-14T10:08:46.000Z | 2021-06-14T10:08:46.000Z | sample/fastapi/server.py | egmkang/flash | 70ea68c0d4380242c61faa8a6f023fa248049ec8 | [
"MIT"
] | 1 | 2021-01-20T06:38:01.000Z | 2021-01-20T06:38:01.000Z | import os
from koala.server import koala_host
from koala.server.fastapi import *
from sample.fastapi.http_api import *
import sample.player
koala_host.init_server(globals().copy(), f"{os.getcwd()}/sample/app.yaml")
koala_host.use_pd()
koala_host.listen_fastapi()
koala_host.run_server()
| 25 | 75 | 0.766667 | 46 | 300 | 4.782609 | 0.478261 | 0.204545 | 0.136364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.113333 | 300 | 11 | 76 | 27.272727 | 0.827068 | 0 | 0 | 0 | 0 | 0 | 0.100346 | 0.100346 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.555556 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
3e956e23b115a9462efdc3b663ad5bc35a8e7669 | 229 | py | Python | Python/School/C1/Q9C1.py | abdalrhmanyasser/Abdalrhman_Rep | e0fc3caa2cc04e92f591ccd7934586986d194000 | [
"CC0-1.0"
] | null | null | null | Python/School/C1/Q9C1.py | abdalrhmanyasser/Abdalrhman_Rep | e0fc3caa2cc04e92f591ccd7934586986d194000 | [
"CC0-1.0"
] | null | null | null | Python/School/C1/Q9C1.py | abdalrhmanyasser/Abdalrhman_Rep | e0fc3caa2cc04e92f591ccd7934586986d194000 | [
"CC0-1.0"
] | null | null | null | x = int(input("Enter the meal price in AED: "))
y = int(input("Enter the tip you want to leave : "))
print("Total (tip unincluded) : " + str(x) + "\nTip : " + str(y) + "%" + "\nTotal (tip included) : " + str(x+x*(y/100)) + "AED") | 76.333333 | 128 | 0.563319 | 37 | 229 | 3.486486 | 0.621622 | 0.124031 | 0.20155 | 0.248062 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.016216 | 0.19214 | 229 | 3 | 128 | 76.333333 | 0.681081 | 0 | 0 | 0 | 0 | 0 | 0.543478 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3ea1801e8b544d3cf1b90b0af1dbb474db55e499 | 302 | py | Python | dl/graph/__init__.py | skankhunt76/deeplearning-py | e0a0363e84db94d7aebe18240dcda49981b67f74 | [
"MIT"
] | null | null | null | dl/graph/__init__.py | skankhunt76/deeplearning-py | e0a0363e84db94d7aebe18240dcda49981b67f74 | [
"MIT"
] | null | null | null | dl/graph/__init__.py | skankhunt76/deeplearning-py | e0a0363e84db94d7aebe18240dcda49981b67f74 | [
"MIT"
] | null | null | null | from .op import *
from .variable import *
# Layers created will hold variable of weight and bias
# Create placeholder for input values
# Compute to create the final y
# go backward to compute gradient for each variables
# if variable is not constant, gradient ++
# if not, recurrent over
| 30.2 | 55 | 0.731788 | 44 | 302 | 5.022727 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.221854 | 302 | 9 | 56 | 33.555556 | 0.940426 | 0.784768 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
3ebb9cba32c733132a167b7f95a5854a27ce8a67 | 334 | py | Python | jp.atcoder/abc070/abc070_c/9100646.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc070/abc070_c/9100646.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc070/abc070_c/9100646.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
from functools import reduce
def gcd(a, b):
while b:
a, b = b, a % b
return abs(a)
def lcm(a, b):
return abs(a // gcd(a, b) * b)
n, *t = map(int, sys.stdin.read().split())
def main():
return reduce(lcm, t)
if __name__ == "__main__":
ans = main()
print(ans)
| 13.36 | 43 | 0.502994 | 52 | 334 | 3.076923 | 0.480769 | 0.0625 | 0.0625 | 0.1375 | 0.15 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.341317 | 334 | 24 | 44 | 13.916667 | 0.727273 | 0 | 0 | 0 | 0 | 0 | 0.025806 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.214286 | false | 0 | 0.142857 | 0.142857 | 0.571429 | 0.071429 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
3ec39b4508bcbacfa71294dd41ec65e7ca3f4332 | 2,138 | py | Python | examples/gridworld/GridWorldUnitTests/GridFactory.py | parrisma/TicTacToe-DeepLearning | 4fefb1ef9d172eb19709f0f2a681307537769f58 | [
"MIT"
] | 1 | 2021-08-17T12:09:48.000Z | 2021-08-17T12:09:48.000Z | examples/gridworld/GridWorldUnitTests/GridFactory.py | parrisma/TicTacToe-DeepLearning | 4fefb1ef9d172eb19709f0f2a681307537769f58 | [
"MIT"
] | null | null | null | examples/gridworld/GridWorldUnitTests/GridFactory.py | parrisma/TicTacToe-DeepLearning | 4fefb1ef9d172eb19709f0f2a681307537769f58 | [
"MIT"
] | null | null | null | import numpy as np
from examples.gridworld.Grid import Grid
from examples.gridworld.SimpleGridOne import SimpleGridOne
class GridFactory:
step = SimpleGridOne.STEP
fire = SimpleGridOne.FIRE
blck = SimpleGridOne.BLCK
goal = SimpleGridOne.GOAL
@classmethod
def test_grid_one(cls) -> Grid:
grid = [
[cls.step, cls.fire, cls.goal, cls.step, cls.step],
[cls.step, cls.blck, cls.blck, cls.fire, cls.step],
[cls.step, cls.blck, cls.blck, cls.blck, cls.step],
[cls.step, cls.step, cls.step, cls.step, cls.step]
]
sg1 = SimpleGridOne(3,
grid,
[3, 0])
return sg1
@classmethod
def test_grid_two(cls) -> Grid:
grid = [
[cls.step, cls.step, cls.step, cls.step, cls.goal]
]
sg1 = SimpleGridOne(3,
grid,
[0, 0])
return sg1
@classmethod
def test_grid_three(cls) -> Grid:
grid = [
[cls.step, cls.step, cls.step, cls.step, cls.goal],
[cls.step, cls.step, cls.step, cls.step, cls.step],
[cls.step, cls.step, cls.step, cls.step, cls.step],
[cls.step, cls.step, cls.step, cls.step, cls.step],
[cls.step, cls.step, cls.step, cls.step, cls.step]
]
sg1 = SimpleGridOne(3,
grid,
[4, 0])
return sg1
@classmethod
def test_grid_four(cls) -> Grid:
r = 20
c = 20
grid = np.full((r, c), cls.step)
grid[5][5] = cls.goal
grid[15][15] = cls.fire
sg1 = SimpleGridOne(4,
grid,
[r - 1, c - 1])
return sg1
@classmethod
def test_grid_five(cls) -> Grid:
r = 10
c = 10
grid = np.full((r, c), cls.step)
grid[2][2] = cls.goal
grid[7][7] = cls.fire
sg1 = SimpleGridOne(4,
grid,
[r - 1, c - 1])
return sg1
| 27.410256 | 63 | 0.471001 | 254 | 2,138 | 3.925197 | 0.153543 | 0.294885 | 0.381143 | 0.46339 | 0.664995 | 0.660983 | 0.617854 | 0.521565 | 0.475426 | 0.399198 | 0 | 0.033965 | 0.407858 | 2,138 | 77 | 64 | 27.766234 | 0.753555 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.078125 | false | 0 | 0.046875 | 0 | 0.28125 | 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 |
3ee324df90696dce9c9397a03ef8bba15b629121 | 1,120 | py | Python | adam_astrom_photom_condition_checker.py | deapplegate/wtgpipeline | 9693e8562022cc97bf5a96427e22965e1a5e8497 | [
"MIT"
] | 1 | 2019-03-15T04:01:19.000Z | 2019-03-15T04:01:19.000Z | adam_astrom_photom_condition_checker.py | deapplegate/wtgpipeline | 9693e8562022cc97bf5a96427e22965e1a5e8497 | [
"MIT"
] | 5 | 2017-12-11T00:11:39.000Z | 2021-07-09T17:05:16.000Z | adam_astrom_photom_condition_checker.py | deapplegate/wtgpipeline | 9693e8562022cc97bf5a96427e22965e1a5e8497 | [
"MIT"
] | 2 | 2017-08-15T21:19:11.000Z | 2017-10-12T00:36:35.000Z | #! /usr/bin/env python
#astref=starcat astref_wt=1 stability_type=exp
#astref=starcat astref_wt=1 stability_type=instrum
#astref=starcat astref_wt=10 stability_type=exp
#astref=starcat astref_wt=10 stability_type=instrum
#astref=refcat astref_wt=1 stability_type=exp
#astref=refcat astref_wt=1 stability_type=instrum
#astref=refcat astref_wt=10 stability_type=exp
#astref=refcat astref_wt=10 stability_type=instrum
tags=['refcat_wt10','exp_wt10','instrum_wt1','instrum_wt10']
import itertools
for tag1,tag2 in itertools.combinations(tags,2):
print "ic '%1 %2 -' "+"coadd_%s.fits coadd_%s.fits > coadd_%s-%s.fits" % (tag1,tag2,tag1,tag2)
astref=['starcat','refcat']
astref_wt=[1,10]
stability_type=['exp','instrum']
for cond1 in astref:
for cond2 in astref_wt:
for cond3 in stability_type:
print "astref=%s astref_wt=%s stability_type=%s" % (cond1,cond2,cond3)
astref=['starcat','refcat ']
astref_wt=['1 ','10']
for cond1 in astref:
for cond2 in astref_wt:
for cond3 in stability_type:
print "astref=%s astref_wt=%s stability_type=%s" % (cond1,cond2,cond3)
| 36.129032 | 98 | 0.730357 | 175 | 1,120 | 4.48 | 0.188571 | 0.142857 | 0.068878 | 0.107143 | 0.790816 | 0.757653 | 0.748724 | 0.272959 | 0.272959 | 0.272959 | 0 | 0.047521 | 0.135714 | 1,120 | 30 | 99 | 37.333333 | 0.762397 | 0.361607 | 0 | 0.588235 | 0 | 0 | 0.314894 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.058824 | null | null | 0.176471 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3ee9d6760e20b48019abff452023cb0a513879ef | 6,582 | py | Python | cogs/kawaii.py | exunious/Noella-Bot | ef119cf1ffc102188954962d54f07d895f4a7a94 | [
"MIT"
] | null | null | null | cogs/kawaii.py | exunious/Noella-Bot | ef119cf1ffc102188954962d54f07d895f4a7a94 | [
"MIT"
] | 1 | 2019-01-08T21:53:38.000Z | 2019-01-08T21:53:38.000Z | cogs/kawaii.py | exunious/Noella-Bot | ef119cf1ffc102188954962d54f07d895f4a7a94 | [
"MIT"
] | 3 | 2018-01-05T02:58:01.000Z | 2018-06-14T20:56:51.000Z | #########################################
############ Kawaii Commands ############
#########################################
import discord
import random
from config import embed_color, embed_color_attention, embed_color_error, embed_color_succes
from discord.ext import commands
from cogs.data.kawaiidata import *
class Kawaii():
def __init__(self, bot):
self.bot = bot
#hug command (-hug [@mention])
@commands.guild_only()
@commands.command()
async def hug(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(hugs)
embed = discord.Embed(description = f"**{member.name}** you got hugged by **{author.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#poke command (-poke [@mention])
@commands.guild_only()
@commands.command()
async def poke(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(pokes)
embed = discord.Embed(description = f"**{member.name}** you got poked by **{author.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#love command (-love [@mention])
@commands.guild_only()
@commands.command()
async def gg(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(gg)
embed = discord.Embed(description = f"**{author.name}** said: GG **{member.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#love command (-love [@mention])
@commands.guild_only()
@commands.command()
async def love(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(love)
embed = discord.Embed(description = f"**{author.name}** loves **{member.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#wave command (-wave [@mention])
@commands.guild_only()
@commands.command()
async def wave(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(waves)
embed = discord.Embed(description = f"**{author.name}** waves at you **{member.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#hide command (-hide [@mention])
@commands.guild_only()
@commands.command()
async def hide(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(hides)
embed = discord.Embed(description = f"**{author.name}** is hiding for **{member.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#pat command (-pat [@mention])
@commands.guild_only()
@commands.command()
async def pat(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(pats)
embed = discord.Embed(description = f"**{member.name}** you got a pat from **{author.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#hit command (-hit [@mention])
@commands.guild_only()
@commands.command()
async def hit(self, ctx, *, member : discord.Member = None):
author = ctx.author
if not member:
member = self.bot.user
choice = random.choice(hits)
embed = discord.Embed(description = f"**{member.name}** got hit by **{author.name}**", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#blush command (-blush)
@commands.guild_only()
@commands.command()
async def blush(self, ctx):
choice = random.choice(blush)
embed = discord.Embed(description = f"**{ctx.author.name}** is blushing!", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#shine command (-shine)
@commands.guild_only()
@commands.command()
async def shine(self, ctx):
choice = random.choice(shines)
embed = discord.Embed(description = f"**{ctx.author.name}** is shining!", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#happy command (-happy)
@commands.guild_only()
@commands.command()
async def happy(self, ctx):
choice = random.choice(happy)
embed = discord.Embed(description = f"**{ctx.author.name}** feels happy!", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#angry command (-angry)
@commands.guild_only()
@commands.command()
async def angry(self, ctx):
choice = random.choice(angry)
embed = discord.Embed(description = f"**{ctx.author.name}** feels angry!", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#sad command (-sad)
@commands.guild_only()
@commands.command()
async def sad(self, ctx):
choice = random.choice(sad)
embed = discord.Embed(description = f"**{ctx.author.name}** feels sad!", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#dancing command (-dance)
@commands.guild_only()
@commands.command()
async def dance(self, ctx):
choice = random.choice(dancing)
embed = discord.Embed(description = f"**{ctx.author.name}** is cheerfully dancing!", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
#Not Kawaii but still really needed!
#dab command (-dab)
@commands.guild_only()
@commands.command()
async def dab(self, ctx):
choice = random.choice(dabs)
embed = discord.Embed(description = f"**{ctx.author.name}** is dabbing!", color = embed_color)
embed.set_image(url = f"{choice}")
await ctx.send(embed = embed)
def setup(bot):
bot.add_cog(Kawaii(bot))
| 32.91 | 123 | 0.60392 | 806 | 6,582 | 4.861042 | 0.111663 | 0.079122 | 0.061256 | 0.095712 | 0.822358 | 0.777693 | 0.777693 | 0.656457 | 0.584482 | 0.469117 | 0 | 0 | 0.237618 | 6,582 | 199 | 124 | 33.075377 | 0.780789 | 0.067001 | 0 | 0.604317 | 0 | 0 | 0.124792 | 0.024427 | 0 | 0 | 0 | 0 | 0 | 1 | 0.014388 | false | 0 | 0.035971 | 0 | 0.057554 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f5b7bdc14adf7bf146ed029f0374809f23d84a2f | 2,186 | py | Python | synergos/abstract.py | aimakerspace/Synergos | ce972f6b031535e82be6724f42118c33f90e9189 | [
"Apache-2.0"
] | null | null | null | synergos/abstract.py | aimakerspace/Synergos | ce972f6b031535e82be6724f42118c33f90e9189 | [
"Apache-2.0"
] | null | null | null | synergos/abstract.py | aimakerspace/Synergos | ce972f6b031535e82be6724f42118c33f90e9189 | [
"Apache-2.0"
] | 3 | 2021-11-25T03:26:52.000Z | 2022-01-24T09:48:37.000Z | #!/usr/bin/env python
####################
# Required Modules #
####################
# Generic/Built-in
import abc
import logging
from typing import Callable
# Libs
# Custom
##################
# Configurations #
##################
class AbstractTask(abc.ABC):
@abc.abstractmethod
def create(self, *args, **kwargs):
""" Creates a task in the federated grid
As AbstractTask implies, you should never instantiate this class by
itself. Instead, you should extend AbstractTask in a new class which
overrides `run`.
"""
pass
@abc.abstractmethod
def read_all(self, *args, **kwargs):
""" Retrieves information/configurations of all all tasks created in the
federated grid
As AbstractTask implies, you should never instantiate this class by
itself. Instead, you should extend AbstractTask in a new class which
overrides `read`.
"""
pass
@abc.abstractmethod
def read(self, *args, **kwargs):
""" Retrieves a single task's information/configurations created in the
federated grid
As AbstractTask implies, you should never instantiate this class by
itself. Instead, you should extend AbstractTask in a new class which
overrides `read`.
"""
pass
@abc.abstractmethod
def update(self, *args, **kwargs):
""" Updates task information/configurations created in the federated
grid
As AbstractTask implies, you should never instantiate this class by
itself. Instead, you should extend AbstractTask in a new class which
overrides `update`.
"""
pass
@abc.abstractmethod
def delete(self, *args, **kwargs):
""" Removes task information/configurations previously created from the
federated grid
As AbstractTask implies, you should never instantiate this class by
itself. Instead, you should extend AbstractTask in a new class which
overrides `delete`.
"""
pass | 27.325 | 80 | 0.593321 | 230 | 2,186 | 5.634783 | 0.269565 | 0.069444 | 0.07716 | 0.069444 | 0.661265 | 0.636574 | 0.636574 | 0.636574 | 0.636574 | 0.636574 | 0 | 0 | 0.31107 | 2,186 | 80 | 81 | 27.325 | 0.860558 | 0.559927 | 0 | 0.526316 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0.263158 | 0.157895 | 0 | 0.473684 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
f5cd68d25f0f464a74ab59c942bd6abc3a3b227b | 940 | py | Python | bento_meta_shim/models/mdbnode.py | CBIIT/bento-meta-shim | 42396456088f1d53158fe831bf774101c9ec0c33 | [
"MIT"
] | null | null | null | bento_meta_shim/models/mdbnode.py | CBIIT/bento-meta-shim | 42396456088f1d53158fe831bf774101c9ec0c33 | [
"MIT"
] | null | null | null | bento_meta_shim/models/mdbnode.py | CBIIT/bento-meta-shim | 42396456088f1d53158fe831bf774101c9ec0c33 | [
"MIT"
] | null | null | null | from bento_meta.objects import Node
from bento_meta_shim.models.mdbproperty import MDBproperty
class MDBnode():
__node = None
"""give proper life"""
def __init__(self, node):
self.__node = node
self.kind = node.mapspec_['label']
self.name = node.handle
self.handle = node.handle
self.model = node.model
self.nanoid = node.nanoid
self.props = self.__convert_props()
def old(self):
return self.__node
def __convert_props(self):
mdbprops = []
for tuple_key in self.__node.props:
_prop = self.__node.props[tuple_key]
mdbprops.append(MDBproperty(property=_prop, key=tuple_key))
return mdbprops
def __str__(self):
return 'a {}: {} called {}'.format(self.kind, self.nanoid, self.name)
def __repr__(self):
return '{}:{}:{}'.format(self.kind, self.nanoid, self.name) | 29.375 | 77 | 0.608511 | 112 | 940 | 4.776786 | 0.375 | 0.074766 | 0.048598 | 0.06729 | 0.119626 | 0.119626 | 0.119626 | 0 | 0 | 0 | 0 | 0 | 0.274468 | 940 | 32 | 78 | 29.375 | 0.784457 | 0 | 0 | 0 | 0 | 0 | 0.033732 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.208333 | false | 0 | 0.083333 | 0.125 | 0.541667 | 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 |
f5e63db575d87e32054810556f16fe242a14feb1 | 500 | py | Python | weather_models/flo2d/utils.py | CUrW-SL/DSS-Framework | 43a39b322ffb0eb92dd116e77cf9a8479357a121 | [
"MIT"
] | null | null | null | weather_models/flo2d/utils.py | CUrW-SL/DSS-Framework | 43a39b322ffb0eb92dd116e77cf9a8479357a121 | [
"MIT"
] | null | null | null | weather_models/flo2d/utils.py | CUrW-SL/DSS-Framework | 43a39b322ffb0eb92dd116e77cf9a8479357a121 | [
"MIT"
] | null | null | null | INVALID_VALUE = -9999
def search_in_dictionary_list(dictionary_list, key_name, key_value):
for dictionary in dictionary_list:
if dictionary[key_name] == key_value:
return dictionary
return None
def search_value_in_dictionary_list(dictionary_list, key_name, key_value, value_key):
dictionary = search_in_dictionary_list(dictionary_list, key_name, key_value)
if dictionary is not None:
return dictionary[value_key]
else:
return INVALID_VALUE
| 29.411765 | 85 | 0.746 | 67 | 500 | 5.179104 | 0.253731 | 0.282421 | 0.184438 | 0.172911 | 0.423631 | 0.423631 | 0.423631 | 0.423631 | 0.423631 | 0.293948 | 0 | 0.009975 | 0.198 | 500 | 16 | 86 | 31.25 | 0.855362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0 | 0 | 0.5 | 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 |
f5fc8645e590b7f69a2bd6b9fb48cd7b7c228e2c | 269 | py | Python | jd/api/rest/UnionOpenCouponQueryRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 5 | 2019-10-30T01:16:30.000Z | 2020-06-14T03:32:19.000Z | jd/api/rest/UnionOpenCouponQueryRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 2 | 2020-10-12T07:12:48.000Z | 2021-06-02T03:15:47.000Z | jd/api/rest/UnionOpenCouponQueryRequest.py | fengjinqi/linjuanbang | 8cdc4e81df73ccd737ac547da7f2c7dca545862a | [
"MIT"
] | 3 | 2019-12-06T17:33:49.000Z | 2021-03-01T13:24:22.000Z | from jd.api.base import RestApi
class UnionOpenCouponQueryRequest(RestApi):
def __init__(self,domain='gw.api.360buy.com',port=80):
RestApi.__init__(self,domain, port)
self.couponUrls = None
def getapiname(self):
return 'jd.union.open.coupon.query'
| 16.8125 | 56 | 0.736059 | 36 | 269 | 5.277778 | 0.694444 | 0.084211 | 0.147368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.021645 | 0.141264 | 269 | 15 | 57 | 17.933333 | 0.800866 | 0 | 0 | 0 | 0 | 0 | 0.163498 | 0.098859 | 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 |
f5fe1933ba7b8a1126ade73e4b309833a36080a3 | 59 | py | Python | python/testData/codeInsight/controlflow/break.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/codeInsight/controlflow/break.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/codeInsight/controlflow/break.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | while foo:
if condition:
break
print "Hello"
| 11.8 | 17 | 0.576271 | 7 | 59 | 4.857143 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.355932 | 59 | 4 | 18 | 14.75 | 0.894737 | 0 | 0 | 0 | 0 | 0 | 0.084746 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 0.25 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
eb02133e1de0e08dd0d0d8f17e971a051889d539 | 82 | py | Python | yalzma/__init__.py | messa/yalzma | 4d5672f07ef5499544a2cef35d0b1526699da790 | [
"MIT"
] | 1 | 2018-12-15T11:52:02.000Z | 2018-12-15T11:52:02.000Z | yalzma/__init__.py | messa/yalzma | 4d5672f07ef5499544a2cef35d0b1526699da790 | [
"MIT"
] | null | null | null | yalzma/__init__.py | messa/yalzma | 4d5672f07ef5499544a2cef35d0b1526699da790 | [
"MIT"
] | null | null | null | __version__ = '0.0.4'
__all__ = ['LZMAEncoder']
from .encoder import LZMAEncoder
| 16.4 | 32 | 0.731707 | 10 | 82 | 5.2 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.042254 | 0.134146 | 82 | 4 | 33 | 20.5 | 0.690141 | 0 | 0 | 0 | 0 | 0 | 0.195122 | 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 |
eb1c110cdbba36a259e3ab83ec031b6aae322ec3 | 10,020 | py | Python | jerex/entities.py | Brant-Skywalker/jerex | 09b330fe4472cb9dde2dd7f8ac4d0c574fa08cd0 | [
"MIT"
] | 39 | 2021-02-19T12:56:30.000Z | 2022-03-26T08:08:57.000Z | jerex/entities.py | Brant-Skywalker/jerex | 09b330fe4472cb9dde2dd7f8ac4d0c574fa08cd0 | [
"MIT"
] | 13 | 2021-03-07T05:22:22.000Z | 2022-03-17T13:21:44.000Z | jerex/entities.py | Brant-Skywalker/jerex | 09b330fe4472cb9dde2dd7f8ac4d0c574fa08cd0 | [
"MIT"
] | 7 | 2021-04-29T08:02:52.000Z | 2022-03-31T02:00:06.000Z | from typing import List
class RelationType:
def __init__(self, identifier, index, short_name, verbose_name, symmetric=False):
self._identifier = identifier
self._index = index
self._short_name = short_name
self._verbose_name = verbose_name
self._symmetric = symmetric
@property
def identifier(self):
return self._identifier
@property
def index(self):
return self._index
@property
def short_name(self):
return self._short_name
@property
def verbose_name(self):
return self._verbose_name
@property
def symmetric(self):
return self._symmetric
def __str__(self):
return self._verbose_name
def __repr__(self):
return self.__str__()
def __int__(self):
return self._index
def __eq__(self, other):
if isinstance(other, RelationType):
return self._identifier == other._identifier
return False
def __hash__(self):
return hash(self._identifier)
class EntityType:
def __init__(self, identifier, index, short_name, verbose_name):
self._identifier = identifier
self._index = index
self._short_name = short_name
self._verbose_name = verbose_name
@property
def identifier(self):
return self._identifier
@property
def index(self):
return self._index
@property
def short_name(self):
return self._short_name
@property
def verbose_name(self):
return self._verbose_name
def __str__(self):
return self._verbose_name
def __repr__(self):
return self.__str__()
def __int__(self):
return self._index
def __eq__(self, other):
if isinstance(other, EntityType):
return self._identifier == other._identifier
return False
def __hash__(self):
return hash(self._identifier)
class Token:
def __init__(self, tid: int, doc_index: int, sent_index: int, span_start: int, span_end: int, phrase: str):
self._tid = tid # ID within the corresponding dataset
self._doc_index = doc_index # original token index in document
self._sent_index = sent_index # original token index in sentence
self._span_start = span_start # start of token span in document (inclusive)
self._span_end = span_end # end of token span in document (exclusive)
self._phrase = phrase
@property
def doc_index(self):
return self._doc_index
@property
def sent_index(self):
return self._sent_index
@property
def span_start(self):
return self._span_start
@property
def span_end(self):
return self._span_end
@property
def span(self):
return self._span_start, self._span_end
@property
def phrase(self):
return self._phrase
def __eq__(self, other):
if isinstance(other, Token):
return self._tid == other._tid
return False
def __hash__(self):
return hash(self._tid)
def __str__(self):
return self._phrase
def __repr__(self):
return self._phrase
class TokenSpan:
def __init__(self, tokens):
self._tokens = tokens
@property
def span_start(self):
return self._tokens[0].span_start
@property
def span_end(self):
return self._tokens[-1].span_end
@property
def span(self):
return self.span_start, self.span_end
@property
def orig_span_start(self):
return self._tokens[0].doc_index
@property
def orig_span_end(self):
return self._tokens[-1].doc_index + 1
@property
def orig_span(self):
return self.orig_span_start, self.orig_span_end
def __getitem__(self, s):
if isinstance(s, slice):
return TokenSpan(self._tokens[s.start:s.stop:s.step])
else:
return self._tokens[s]
def __iter__(self):
return iter(self._tokens)
def __len__(self):
return len(self._tokens)
def __str__(self):
return ' '.join([str(t) for t in self._tokens])
def __repr__(self):
return self.__str__()
class Entity:
def __init__(self, eid: int, entity_type: EntityType, phrase: str):
self._eid = eid
self._entity_type = entity_type
self._phrase = phrase
self._entity_mentions = []
def add_entity_mention(self, mention):
self._entity_mentions.append(mention)
@property
def entity_type(self):
return self._entity_type
@property
def entity_mentions(self):
return self._entity_mentions
@property
def phrase(self):
return self._phrase
def __eq__(self, other):
if isinstance(other, Entity):
return self._eid == other._eid
return False
def __hash__(self):
return hash(self._eid)
def __str__(self):
return self._phrase
class EntityMention:
def __init__(self, emid: int, entity: Entity, tokens: List[Token], sentence: 'Sentence', phrase: str):
self._emid = emid # ID within the corresponding dataset
self._entity = entity
self._tokens = tokens
self._sentence = sentence
self._phrase = phrase
@property
def entity(self):
return self._entity
@property
def entity_type(self):
return self._entity.entity_type
@property
def tokens(self):
return TokenSpan(self._tokens)
@property
def span_start(self):
return self._tokens[0].span_start
@property
def span_end(self):
return self._tokens[-1].span_end
@property
def span(self):
return self.span_start, self.span_end
@property
def orig_span_start(self):
return self._tokens[0].doc_index
@property
def orig_span_end(self):
return self._tokens[-1].doc_index + 1
@property
def orig_span(self):
return self.orig_span_start, self.orig_span_end
@property
def sentence(self):
return self._sentence
@property
def phrase(self):
return self._phrase
def __eq__(self, other):
if isinstance(other, EntityMention):
return self._emid == other._emid
return False
def __hash__(self):
return hash(self._emid)
def __str__(self):
return self._phrase
class Sentence:
def __init__(self, sent_id: int, index: int, tokens: List[Token]):
self._sent_id = sent_id # ID within the corresponding dataset
self._index = index
self._tokens = tokens
self._entity_mentions = []
def add_entity_mention(self, entity_mention):
self._entity_mentions.append(entity_mention)
@property
def sent_id(self):
return self._sent_id
@property
def index(self):
return self._index
@property
def span_start(self):
return self._tokens[0].span_start
@property
def span_end(self):
return self._tokens[-1].span_end
@property
def span(self):
return self.span_start, self.span_end
@property
def entity_mentions(self):
return self._entity_mentions
@property
def tokens(self):
return TokenSpan(self._tokens)
def __str__(self):
return ' '.join([str(t) for t in self.tokens])
def __repr__(self):
return self.__str__()
def __eq__(self, other):
if isinstance(other, Sentence):
return self._sent_id == other._sent_id
return False
def __hash__(self):
return hash(self._sent_id)
class Relation:
def __init__(self, rid: int, relation_type: RelationType, head_entity: Entity, tail_entity: Entity,
evidence_sentences: List[Sentence]):
self._rid = rid # ID within the corresponding dataset
self._relation_type = relation_type
self._head_entity = head_entity
self._tail_entity = tail_entity
self._evidence_sentences = evidence_sentences
@property
def relation_type(self):
return self._relation_type
@property
def head_entity(self):
return self._head_entity
@property
def tail_entity(self):
return self._tail_entity
@property
def evidence_sentences(self):
return self._evidence_sentences
def __eq__(self, other):
if isinstance(other, Relation):
return self._rid == other._rid
return False
def __hash__(self):
return hash(self._rid)
class Document:
def __init__(self, doc_id: int, tokens: List[Token], sentences: List[Sentence],
entities: List[Entity], relations: List[Relation], encoding: List[int], title: str):
self._doc_id = doc_id # ID within the corresponding dataset
self._sentences = sentences
self._tokens = tokens
self._entities = entities
self._relations = relations
# sub-word document encoding
self._encoding = encoding
self._title = title
@property
def doc_id(self):
return self._doc_id
@property
def sentences(self):
return self._sentences
@property
def entities(self):
return self._entities
@property
def relations(self):
return self._relations
@property
def tokens(self):
return TokenSpan(self._tokens)
@property
def encodings(self):
return self._encoding
@encodings.setter
def encodings(self, value):
self._encoding = value
@property
def title(self):
return self._title
def __repr__(self):
return self.__str__()
def __str__(self):
return ' '.join([str(s) for s in self.sentences])
def __eq__(self, other):
if isinstance(other, Document):
return self._doc_id == other._doc_id
return False
def __hash__(self):
return hash(self._doc_id)
| 22.929062 | 111 | 0.631737 | 1,202 | 10,020 | 4.877704 | 0.072379 | 0.134743 | 0.150435 | 0.034112 | 0.611973 | 0.571039 | 0.545284 | 0.512195 | 0.435101 | 0.393485 | 0 | 0.001672 | 0.283633 | 10,020 | 436 | 112 | 22.981651 | 0.81513 | 0.035729 | 0 | 0.621451 | 0 | 0 | 0.00114 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.315457 | false | 0 | 0.003155 | 0.249211 | 0.652997 | 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 |
eb353e540e53adc46d65436d27e95950ed9e1685 | 194 | py | Python | utils/time_converter.py | sarzz2/bonafide-bot | c61c738124099144ed4eb173d423567d3465a95e | [
"MIT"
] | 1 | 2021-06-14T23:41:18.000Z | 2021-06-14T23:41:18.000Z | utils/time_converter.py | sarzz2/bonafide-bot | c61c738124099144ed4eb173d423567d3465a95e | [
"MIT"
] | null | null | null | utils/time_converter.py | sarzz2/bonafide-bot | c61c738124099144ed4eb173d423567d3465a95e | [
"MIT"
] | null | null | null | time_convert = {"s": 1, "m": 60, "h": 3600, "d": 86400}
def convert_time_to_seconds(time):
try:
return int(time[:-1]) * time_convert[time[-1]]
except:
raise ValueError
| 21.555556 | 55 | 0.582474 | 28 | 194 | 3.857143 | 0.678571 | 0.203704 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.094595 | 0.237113 | 194 | 8 | 56 | 24.25 | 0.635135 | 0 | 0 | 0 | 0 | 0 | 0.020619 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.166667 | false | 0 | 0 | 0 | 0.333333 | 0 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
de1697c853b523656c534204afe853ba808d1454 | 257 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C13Java/questions/13.8-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C13Java/questions/13.8-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C13Java/questions/13.8-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 13.8 Lambda Random
# Using Lambda expressions, write a function
# List<Integer> getRandomSubset(List<Integer> list)
# that returns a random subset of arbitrary size.
# All subsets, including the empty set, should be equally likely to be chosen. | 42.833333 | 78 | 0.747082 | 37 | 257 | 5.189189 | 0.810811 | 0.114583 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.014354 | 0.18677 | 257 | 6 | 78 | 42.833333 | 0.904306 | 0.92607 | 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 |
de1f9b0c3f326cf2825498b1b68c28117beab436 | 497 | py | Python | hw/hw10/tests/q1_2.py | ds-modules/Colab-demo | cccaff13633f8a5ec697cd4aeca9087f2feec2e4 | [
"BSD-3-Clause"
] | null | null | null | hw/hw10/tests/q1_2.py | ds-modules/Colab-demo | cccaff13633f8a5ec697cd4aeca9087f2feec2e4 | [
"BSD-3-Clause"
] | null | null | null | hw/hw10/tests/q1_2.py | ds-modules/Colab-demo | cccaff13633f8a5ec697cd4aeca9087f2feec2e4 | [
"BSD-3-Clause"
] | null | null | null | test = { 'name': 'q1_2',
'points': 1,
'suites': [ { 'cases': [ {'code': '>>> sum(standard_units(make_array(1,2,3,4,5))) == 0\nTrue', 'hidden': False, 'locked': False},
{'code': '>>> np.isclose(standard_units(make_array(1,2,3,4,5))[0], -1.41421356)\nTrue', 'hidden': False, 'locked': False}],
'scored': True,
'setup': '',
'teardown': '',
'type': 'doctest'}]}
| 55.222222 | 158 | 0.416499 | 51 | 497 | 3.960784 | 0.607843 | 0.128713 | 0.168317 | 0.217822 | 0.544554 | 0.277228 | 0.277228 | 0.277228 | 0.277228 | 0.277228 | 0 | 0.074766 | 0.354125 | 497 | 8 | 159 | 62.125 | 0.554517 | 0 | 0 | 0 | 0 | 0.25 | 0.440644 | 0.189135 | 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 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
de323f0ef5068ed2edbc006d1b9afa7a1aeb535c | 55 | py | Python | code/abc053_b_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/abc053_b_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/abc053_b_01.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | s=input()
print(len(s)-s[::-1].index("Z")-s.index("A")) | 27.5 | 45 | 0.545455 | 12 | 55 | 2.5 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.018519 | 0.018182 | 55 | 2 | 45 | 27.5 | 0.537037 | 0 | 0 | 0 | 0 | 0 | 0.035714 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
de57bfcee72c95047c8acca64e459f16c3a7c1e0 | 205 | py | Python | src/callbacks/getFiles.py | dinesh-0602/TorrentSeedr | 51bc75f34e9b07feba39af91021655914be85b6e | [
"MIT"
] | 32 | 2021-08-20T04:05:26.000Z | 2022-03-27T17:35:47.000Z | src/callbacks/getFiles.py | rajV2/TorrentSeedr | 51bc75f34e9b07feba39af91021655914be85b6e | [
"MIT"
] | null | null | null | src/callbacks/getFiles.py | rajV2/TorrentSeedr | 51bc75f34e9b07feba39af91021655914be85b6e | [
"MIT"
] | 32 | 2021-08-21T14:21:46.000Z | 2022-03-30T02:05:02.000Z | from src.objs import *
from src.commands.getFiles import getFiles
@bot.callback_query_handler(func=lambda call: True and call.data[:9] == 'getFiles_')
def getFilesCb(call):
getFiles(call, called=True) | 34.166667 | 84 | 0.765854 | 30 | 205 | 5.133333 | 0.666667 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005495 | 0.112195 | 205 | 6 | 85 | 34.166667 | 0.840659 | 0 | 0 | 0 | 0 | 0 | 0.043689 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.2 | false | 0 | 0.4 | 0 | 0.6 | 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 |
de64d568db19a47035b8523e540ffd8a889f996f | 509 | py | Python | bavard_ml_utils/persistence/record_store/__init__.py | bavard-ai/bavard-ml-utils | 00b6575d5c74c66f57ca1da753b91d3ceef6d1e4 | [
"MIT"
] | 1 | 2022-02-24T21:25:02.000Z | 2022-02-24T21:25:02.000Z | bavard_ml_utils/persistence/record_store/__init__.py | bavard-ai/bavard-ml-utils | 00b6575d5c74c66f57ca1da753b91d3ceef6d1e4 | [
"MIT"
] | null | null | null | bavard_ml_utils/persistence/record_store/__init__.py | bavard-ai/bavard-ml-utils | 00b6575d5c74c66f57ca1da753b91d3ceef6d1e4 | [
"MIT"
] | null | null | null | """
Contains methods for easily persisting `Pydantic <https://pydantic-docs.helpmanual.io/>`_ data structures to and from
arbitrary storage back-ends. Contains a base class for the store behavior, as well as subclasses which allow Google
Cloud Firestore or in-memory to be used as the storage back-end. Supports saving, retrieving, and deleting records by
ID, or performing `WHERE equals` clause-based retrieval and deletion. Pydantic models that include numpy array members
are supported out of the box.
"""
| 63.625 | 118 | 0.797642 | 78 | 509 | 5.192308 | 0.820513 | 0.054321 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.141454 | 509 | 7 | 119 | 72.714286 | 0.926773 | 0.982318 | 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 |
de69f2b5531a2e88de06ca2d6c91affc2280a036 | 475 | py | Python | globals/moduleaccess.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 97 | 2016-09-16T08:44:04.000Z | 2022-01-29T22:30:18.000Z | globals/moduleaccess.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 34 | 2016-09-20T00:42:45.000Z | 2021-04-16T07:21:44.000Z | globals/moduleaccess.py | RogueScholar/debreate | 0abc168c51336b31ff87c61f84bc7bb6000e88f4 | [
"MIT"
] | 24 | 2016-09-16T08:44:56.000Z | 2021-07-29T11:32:47.000Z | # -*- coding: utf-8 -*-
## \package dbr.moduleaccess
# MIT licensing
# See: docs/LICENSE.txt
## This class allows access to a 'name' attribute
#
# \param module_name
# \b \e unicode|str : Ideally set to the module's __name__ attribute
class ModuleAccessCtrl:
def __init__(self, moduleName):
self.ModuleName = moduleName
## Retrieves the module_name attribute
#
# \return
# \b \e unicode|str : Module's name
def GetModuleName(self):
return self.ModuleName
| 19.791667 | 69 | 0.707368 | 63 | 475 | 5.174603 | 0.603175 | 0.119632 | 0.055215 | 0.07362 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.002571 | 0.181053 | 475 | 23 | 70 | 20.652174 | 0.835476 | 0.627368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.4 | false | 0 | 0 | 0.2 | 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 |
de7549d924587b80175b899522c6565f010ece0c | 874 | py | Python | package/awesome_streamlit/shared/models.py | Ben0mmen/.-MfG-ThC-. | 7d53d813d237c0b3ca3b2bd9bda5a7d7e042379e | [
"CC0-1.0"
] | 1 | 2019-10-19T20:03:40.000Z | 2019-10-19T20:03:40.000Z | package/awesome_streamlit/shared/models.py | Ben0mmen/.-MfG-ThC-. | 7d53d813d237c0b3ca3b2bd9bda5a7d7e042379e | [
"CC0-1.0"
] | null | null | null | package/awesome_streamlit/shared/models.py | Ben0mmen/.-MfG-ThC-. | 7d53d813d237c0b3ca3b2bd9bda5a7d7e042379e | [
"CC0-1.0"
] | null | null | null | """Models of app"""
from typing import List, NamedTuple, Optional
class Tag(NamedTuple):
"""Model of a Tag"""
name: str
def __str__(self):
return self.name
def __repr__(self):
return self.name
class Author(NamedTuple):
"""Model of an Author"""
name: str
url: str
def __str__(self):
return self.name
def __repr__(self):
return self.name
class Resource(NamedTuple):
"""Model of a Resource"""
name: str
url: str
is_awesome: bool
tags: List[Tag] = []
author: Optional[Author] = None
def to_markdown_bullet(self) -> str:
"""A markdown bullet string
Returns:
[str] -- The Resource as a Markdown bullet string
"""
result = f"- [{self.name}]({self.url})"
return result
def __str__(self):
return self.name
| 17.137255 | 61 | 0.576659 | 107 | 874 | 4.495327 | 0.345794 | 0.099792 | 0.14553 | 0.18711 | 0.286902 | 0.286902 | 0.237006 | 0.237006 | 0.237006 | 0.237006 | 0 | 0 | 0.30778 | 874 | 50 | 62 | 17.48 | 0.795041 | 0.17849 | 0 | 0.6 | 0 | 0 | 0.04048 | 0.037481 | 0 | 0 | 0 | 0 | 0 | 1 | 0.24 | false | 0 | 0.04 | 0.2 | 0.96 | 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 |
de781d0b3eb2681c916997213e363f685b8fa360 | 89 | py | Python | Python_Basics/02_Conditional_Statements/03_Greater_Num.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | Python_Basics/02_Conditional_Statements/03_Greater_Num.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | Python_Basics/02_Conditional_Statements/03_Greater_Num.py | Dochko0/Python | e9612c4e842cfd3d9a733526cc7485765ef2238f | [
"MIT"
] | null | null | null | num1 = int(input())
num2 = int(input())
if(num1>=num2):
print(num1)
else:print(num2) | 14.833333 | 19 | 0.629213 | 14 | 89 | 4 | 0.5 | 0.285714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.078947 | 0.146067 | 89 | 6 | 20 | 14.833333 | 0.657895 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.4 | 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 |
debf4fc183ea480cc5d2cd001a682d1f7c5887ba | 57 | py | Python | public_data/__init__.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 57 | 2016-09-01T21:55:52.000Z | 2022-03-27T22:15:32.000Z | public_data/__init__.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 464 | 2015-03-23T18:08:28.000Z | 2016-08-25T04:57:36.000Z | public_data/__init__.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 25 | 2017-01-24T16:23:27.000Z | 2021-11-07T01:51:42.000Z | default_app_config = "public_data.apps.PublicDataConfig"
| 28.5 | 56 | 0.859649 | 7 | 57 | 6.571429 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052632 | 57 | 1 | 57 | 57 | 0.851852 | 0 | 0 | 0 | 0 | 0 | 0.578947 | 0.578947 | 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 |
dec3677b20d4adc3eb68a08d3387d17a39e78d6a | 513 | py | Python | src/config/__init__.py | jonwhittlestone/mongo-csfle-beanie-fastapi | 8194822a59114558d01f00e9c8c80f42aa78a412 | [
"MIT"
] | null | null | null | src/config/__init__.py | jonwhittlestone/mongo-csfle-beanie-fastapi | 8194822a59114558d01f00e9c8c80f42aa78a412 | [
"MIT"
] | null | null | null | src/config/__init__.py | jonwhittlestone/mongo-csfle-beanie-fastapi | 8194822a59114558d01f00e9c8c80f42aa78a412 | [
"MIT"
] | null | null | null | import os
from pydantic import BaseSettings
class CommonSettings(BaseSettings):
APP_NAME: str = "CustomerDB"
class ServerSettings(BaseSettings):
pass
class DatabaseSettings(BaseSettings):
DB_USERNAME: str = os.environ.get("MONGO_USERNAME")
DB_PASSWORD: str = os.environ.get("MONGO_PASSWORD")
DB_NAME: str = os.environ.get("MONGO_DATABASE")
DB_URL: str = os.environ.get("MONGO_URL")
class Settings(CommonSettings, ServerSettings, DatabaseSettings):
pass
settings = Settings()
| 20.52 | 65 | 0.74269 | 60 | 513 | 6.2 | 0.383333 | 0.053763 | 0.129032 | 0.16129 | 0.215054 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.153996 | 513 | 24 | 66 | 21.375 | 0.857143 | 0 | 0 | 0.142857 | 0 | 0 | 0.118908 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.214286 | 0.142857 | 0 | 0.785714 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
dee33c6d8f905d64708267fd1cdf85d343ee0a76 | 4,123 | py | Python | gpsearch/core/acquisitions/ints.py | Fluid-Dynamics-Group/gpsearch | 8c5758c9fb2b623ef79952c3e9c113cb157d79bc | [
"MIT"
] | 6 | 2020-07-13T00:02:17.000Z | 2022-03-11T08:49:27.000Z | gpsearch/core/acquisitions/ints.py | Fluid-Dynamics-Group/gpsearch | 8c5758c9fb2b623ef79952c3e9c113cb157d79bc | [
"MIT"
] | null | null | null | gpsearch/core/acquisitions/ints.py | Fluid-Dynamics-Group/gpsearch | 8c5758c9fb2b623ef79952c3e9c113cb157d79bc | [
"MIT"
] | 9 | 2020-07-18T13:29:46.000Z | 2022-03-22T15:14:14.000Z | import numpy as np
from .base import Acquisition, AcquisitionWeighted
from ..utils import grid_nint, add_xnew, jacobian_fdiff
class IVRInt(Acquisition):
"""A class for IVR computed by numerical integration.
Parameters
----------
model, inputs : see parent class (Acquisition)
ngrid : int
Number of grid points in each direction
Attributes
----------
model, inputs, ngrid : see Parameters
pts : array
Grid points as a vector of size ngrid^dim
Notes
-----
This class computes IVR by numerical integration on a grid. This
is intractable/inaccurate in dimensions greater than 4, so it is
intended for debugging purposes only.
"""
def __init__(self, model, inputs, ngrid=200):
super().__init__(model, inputs)
self.ngrid = ngrid
grd = np.mgrid[ [slice(-5*np.max(np.abs(bd)),
5*np.max(np.abs(bd)), ngrid*1j) \
for bd in inputs.domain] ]
self.pts = grd.T.reshape(-1, inputs.input_dim)
def evaluate(self, x):
x = np.atleast_2d(x)
_, var = self.model.predict(x)
if self.model.normalizer:
var /= self.model.normalizer.std**2
cov = self.model.posterior_covariance_between_points(x, self.pts)
wghts = self.get_weights(self.pts)
int_cov = grid_nint(self.pts, wghts.flatten() * cov.flatten()**2,
ngrid=self.ngrid)
return -int_cov/var
def jacobian(self, x):
return jacobian_fdiff(self, x)
class IVR_LWInt(AcquisitionWeighted, IVRInt):
"""A class for IVR-LW computed by numerical integration.
Parameters
----------
model, inputs, likelihood : see parent class (AcquisitionWeighted)
ngrid : int
Number of grid points in each direction
Attributes
----------
model, inputs, likelihood, ngrid : see Parameters
pts : array
Grid points as a vector of size ngrid^dim
Notes
-----
This class computes IVR-LW by numerical integration on a grid. This
is intractable/inaccurate in dimensions greater than 4, so it is
intended for debugging purposes only.
"""
def __init__(self, model, inputs, likelihood=None, ngrid=200):
super().__init__(model, inputs, likelihood=likelihood)
self.ngrid = ngrid
grd = np.mgrid[ [slice(-5*np.max(np.abs(bd)),
5*np.max(np.abs(bd)), ngrid*1j) \
for bd in inputs.domain] ]
self.pts = grd.T.reshape(-1, inputs.input_dim)
class QInt(AcquisitionWeighted):
"""A class for the Q criterion computed by numerical integration.
Parameters
----------
model, inputs, likelihood : see parent class (AcquisitionWeighted)
ngrid : int
Number of grid points in each direction
Attributes
----------
model, inputs, likelihood, ngrid : see Parameters
pts : array
Grid points as a vector of size ngrid^dim
Notes
-----
This class computes Q by numerical integration on a grid. This
is intractable/inaccurate in dimensions greater than 4, so it is
intended for debugging purposes only.
"""
def __init__(self, model, inputs, likelihood=None, ngrid=200):
super().__init__(model, inputs, likelihood=likelihood)
self.ngrid = ngrid
grd = np.mgrid[ [slice(-5*np.max(np.abs(bd)),
5*np.max(np.abs(bd)), ngrid*1j) \
for bd in inputs.domain] ]
self.pts = grd.T.reshape(-1, inputs.input_dim)
def evaluate(self, x):
x = np.atleast_2d(x)
gpn = add_xnew(x, self.model)
_, var_new = gpn.predict(self.pts)
wghts = np.exp(self.likelihood.gmm.score_samples(self.pts))
qdx = wghts * var_new.flatten()
# Normalize by current variance
if gpn.normalizer:
qdx /= gpn.normalizer.std**2
Q = grid_nint(self.pts, qdx, ngrid=self.ngrid)
return Q
def jacobian(self, x):
return jacobian_fdiff(self, x)
| 31.473282 | 74 | 0.603929 | 525 | 4,123 | 4.649524 | 0.219048 | 0.054076 | 0.068824 | 0.019664 | 0.715281 | 0.715281 | 0.70381 | 0.682917 | 0.682917 | 0.650143 | 0 | 0.009884 | 0.288382 | 4,123 | 130 | 75 | 31.715385 | 0.822086 | 0.377395 | 0 | 0.529412 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.137255 | false | 0 | 0.058824 | 0.039216 | 0.333333 | 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 |
deef8546df445c075b8feff707660404e0c6b23e | 312 | py | Python | cmsplugin_oembed/models.py | ausgestrahlt/cmsplugin_oembed | d8e5fc61c518af70d31730ca3eff69a1176f6a32 | [
"BSD-2-Clause"
] | null | null | null | cmsplugin_oembed/models.py | ausgestrahlt/cmsplugin_oembed | d8e5fc61c518af70d31730ca3eff69a1176f6a32 | [
"BSD-2-Clause"
] | null | null | null | cmsplugin_oembed/models.py | ausgestrahlt/cmsplugin_oembed | d8e5fc61c518af70d31730ca3eff69a1176f6a32 | [
"BSD-2-Clause"
] | null | null | null | from django.db import models
from cms.models import CMSPlugin
from embed_video.fields import EmbedVideoField
class VideoPluginModel(CMSPlugin):
video_url = EmbedVideoField()
max_width = models.IntegerField(blank=True, null=True, help_text="in px")
def __str__(self):
return self.video_url
| 26 | 77 | 0.762821 | 41 | 312 | 5.585366 | 0.682927 | 0.069869 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.160256 | 312 | 11 | 78 | 28.363636 | 0.874046 | 0 | 0 | 0 | 0 | 0 | 0.016026 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.375 | 0.125 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 3 |
def2e671af56348127cebb854cea3c0d91bf0465 | 4,896 | py | Python | py/docria/query.py | marcusklang/docria | e2fc9d85d3e40a3e089e26e5e26e776b2eab9300 | [
"Apache-2.0"
] | 6 | 2019-01-23T15:44:22.000Z | 2020-06-01T09:25:53.000Z | py/docria/query.py | marcusklang/docria | e2fc9d85d3e40a3e089e26e5e26e776b2eab9300 | [
"Apache-2.0"
] | null | null | null | py/docria/query.py | marcusklang/docria | e2fc9d85d3e40a3e089e26e5e26e776b2eab9300 | [
"Apache-2.0"
] | 1 | 2021-06-04T05:35:10.000Z | 2021-06-04T05:35:10.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2021 Marcus Klang (marcus.klang@cs.lth.se)
#
# 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.
#
"""Internal functionality for queries"""
from typing import Set, TYPE_CHECKING
if TYPE_CHECKING:
from .model import Node, NodeFieldCollection
class NodePredicate:
def __call__(self, *args, **kwargs)->bool:
raise NotImplementedError
def __and__(self, other):
return NodePredicateAnd(self, other)
def __or__(self, other):
return NodePredicateOr(self, other)
def __invert__(self):
return NodePredicateInvert(self)
class NodeLambdaPredicate(NodePredicate):
def __init__(self, fn, fields):
self.fn = fn
self.fields = fields
def __call__(self, n):
field_data = [n.get(fld) for fld in self.fields]
return self.fn(*field_data)
def __repr__(self):
return "Lambda(%s, fields=%s)" % (repr(self.fn), repr(self.fields))
class NodePredicateOr(NodePredicate):
def __init__(self, lft, rgt):
self.lft = lft
self.rgt = rgt
def __call__(self, *args, **kwargs):
return self.lft(*args, **kwargs) or self.rgt(*args, **kwargs)
def __repr__(self):
return "Or(%s, %s)" % (repr(self.lft), repr(self.rgt))
class NodePredicateInvert(NodePredicate):
def __init__(self, pred):
self.pred = pred
def __call__(self, *args, **kwargs):
return not self.pred(*args, **kwargs)
def __repr__(self):
return "Not(%s)" % repr(self.pred)
class NodePredicateAnd(NodePredicate):
def __init__(self, lft, rgt):
self.lft = lft
self.rgt = rgt
def __call__(self, *args, **kwargs):
return self.lft(*args, **kwargs) and self.rgt(*args, **kwargs)
def __repr__(self):
return "And(%s, %s)" % (repr(self.lft), repr(self.rgt))
class NodeFieldPredicateContains(NodePredicate):
def __init__(self, field: "NodeFieldCollection", values: Set[any]):
self.fld = field.field
self.values = values
def __call__(self, n: "Node"):
return n.get(self.fld) in self.values
def __repr__(self):
return "({%s} is any of %s)" % (self.fld, repr(self.values))
class NodeFieldPredicateEq(NodePredicate):
def __init__(self, field: "NodeFieldCollection", eq):
self.fld = field.field
self.eq = eq
def __call__(self, n: "Node"):
return n.get(self.fld) == self.eq
def __repr__(self):
return "({%s} == %s)" % (self.fld, repr(self.eq))
class NodeFieldPredicateNeq(NodePredicate):
def __init__(self, field: "NodeFieldCollection", neq):
self.fld = field.field
self.neq = neq
def __call__(self, n: "Node"):
return n.get(self.fld) != self.neq
def __repr__(self):
return "({%s} != %s)" % (self.fld, repr(self.neq))
class NodeFieldPredicateLe(NodePredicate):
def __init__(self, field: "NodeFieldCollection", le):
self.fld = field.field
self.le = le
def __call__(self, n: "Node"):
return n.get(self.fld) <= self.le
def __repr__(self):
return "({%s} <= %s)" % (self.fld, repr(self.le))
class NodeFieldPredicateLt(NodePredicate):
def __init__(self, field: "NodeFieldCollection", lt):
self.fld = field.field
self.lt = lt
def __call__(self, n: "Node"):
return n.get(self.fld) < self.lt
def __repr__(self):
return "({%s} < %s)" % (self.fld, repr(self.lt))
class NodeFieldPredicateGe(NodePredicate):
def __init__(self, field: "NodeFieldCollection", ge):
self.fld = field.field
self.ge = ge
def __call__(self, n: "Node"):
return n.get(self.fld) >= self.ge
def __repr__(self):
return "({%s} > %s)" % (self.fld, repr(self.ge))
class NodeFieldPredicateGt(NodePredicate):
def __init__(self, field: "NodeFieldCollection", gt):
self.fld = field.field
self.gt = gt
def __call__(self, n: "Node"):
return n.get(self.fld) > self.gt
def __repr__(self):
return "({%s} > %s)" % (self.fld, repr(self.gt))
class NodeFieldPredicateLambda(NodePredicate):
def __init__(self, field, fn):
self.field = field
self.fn = fn
def __call__(self, n):
return self.fn(n.get(self.field))
def __repr__(self):
return "Lambda(%s, %s)" % (repr(self.field), repr(self.fn))
| 27.351955 | 75 | 0.63031 | 626 | 4,896 | 4.667732 | 0.204473 | 0.07666 | 0.048939 | 0.098563 | 0.493498 | 0.414442 | 0.264545 | 0.264545 | 0.241273 | 0.221424 | 0 | 0.00239 | 0.230801 | 4,896 | 178 | 76 | 27.505618 | 0.7735 | 0.128268 | 0 | 0.361111 | 0 | 0 | 0.073464 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.37037 | false | 0 | 0.018519 | 0.240741 | 0.759259 | 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 |
defa371f642b654b3c4557ba4345e184bce73691 | 84 | py | Python | MSMetaEnhancer/libs/converters/compute/__init__.py | RECETOX/MSMetaEnhancer | 863077330740a5b2c91f005599460cee238b2e6f | [
"MIT"
] | null | null | null | MSMetaEnhancer/libs/converters/compute/__init__.py | RECETOX/MSMetaEnhancer | 863077330740a5b2c91f005599460cee238b2e6f | [
"MIT"
] | 33 | 2021-11-16T15:12:45.000Z | 2022-03-31T08:59:50.000Z | MSMetaEnhancer/libs/converters/compute/__init__.py | RECETOX/MSMetaEnhancer | 863077330740a5b2c91f005599460cee238b2e6f | [
"MIT"
] | null | null | null | from MSMetaEnhancer.libs.converters.compute.RDKit import RDKit
__all__ = ['RDKit']
| 21 | 62 | 0.797619 | 10 | 84 | 6.3 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.095238 | 84 | 3 | 63 | 28 | 0.828947 | 0 | 0 | 0 | 0 | 0 | 0.059524 | 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 |
7202a86b6530b9cd4b72cb5b876dd11df4b395d9 | 1,239 | py | Python | day5/common.py | NekohimeMusou/advent-of-code | a1215336a24713e63f77018f379ff90675afdd0d | [
"MIT"
] | null | null | null | day5/common.py | NekohimeMusou/advent-of-code | a1215336a24713e63f77018f379ff90675afdd0d | [
"MIT"
] | null | null | null | day5/common.py | NekohimeMusou/advent-of-code | a1215336a24713e63f77018f379ff90675afdd0d | [
"MIT"
] | null | null | null | from itertools import permutations
from string import ascii_lowercase
INPUT_PATH = 'input.txt'
def get_input(path=INPUT_PATH):
"""Get the input for day 5.
This should all be one long string. I tested with the given input and we don't need to join
the lines but it's just a bit less brittle this way."""
with open(path) as f:
return ''.join(f.readlines()).strip()
def react_polymer(polymer):
"""React the polymer with a brute force method.
Just iterate the possible character pairs and remove them, then check whether the
new string is the same as the old one."""
pairs = [''.join(s) for s in permutations('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 2)
if s[0].casefold() == s[1].casefold() and s[0].islower() != s[1].islower()]
while True:
old_polymer = polymer
for pair in pairs:
polymer = polymer.replace(pair, '')
if polymer == '' or old_polymer == polymer:
return polymer
def polymer_reductions(polymer):
return (polymer.replace(l, '').replace(l.upper(), '') for l in ascii_lowercase)
def shortest_reduced_polymer(polymer):
return min(len(react_polymer(p)) for p in polymer_reductions(polymer))
| 30.219512 | 104 | 0.675545 | 178 | 1,239 | 4.629213 | 0.494382 | 0.084951 | 0.033981 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.006205 | 0.219532 | 1,239 | 40 | 105 | 30.975 | 0.845915 | 0.271994 | 0 | 0 | 0 | 0 | 0.069714 | 0.059429 | 0 | 0 | 0 | 0 | 0 | 1 | 0.210526 | false | 0 | 0.105263 | 0.105263 | 0.526316 | 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 |
7213effc82d859939de919f4f6899e6a116eeb07 | 807 | py | Python | flog/testing/views.py | mutalisk999/Flog | 5d836e26967b39faebdf2d5a2c558316bf93221b | [
"MIT"
] | 1 | 2020-08-24T03:39:52.000Z | 2020-08-24T03:39:52.000Z | flog/testing/views.py | mutalisk999/Flog | 5d836e26967b39faebdf2d5a2c558316bf93221b | [
"MIT"
] | null | null | null | flog/testing/views.py | mutalisk999/Flog | 5d836e26967b39faebdf2d5a2c558316bf93221b | [
"MIT"
] | null | null | null | """
MIT License
Copyright(c) 2021 Andy Zhou
"""
from flask import abort
from . import testing_bp
from flog.utils import redirect_back
@testing_bp.route("/400")
def trigger_bad_request():
abort(400)
@testing_bp.route("/403")
def trigger_forbidden():
abort(403)
@testing_bp.route("/404")
def trigger_not_found():
abort(404)
@testing_bp.route("/405")
def trigger_method_not_allowed():
abort(405)
@testing_bp.route("/413")
def trigger_payload_too_large():
abort(413)
@testing_bp.route("/429")
def trigger_too_many_requests():
abort(429)
@testing_bp.route("/500")
def trigger_server_error():
abort(500)
@testing_bp.route("/redirect")
def trigger_redirect_back():
return redirect_back("main.main", next="example.com")
| 16.8125 | 58 | 0.674102 | 109 | 807 | 4.724771 | 0.422018 | 0.157282 | 0.217476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.069909 | 0.184634 | 807 | 47 | 59 | 17.170213 | 0.712766 | 0.048327 | 0 | 0 | 0 | 0 | 0.079944 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.296296 | true | 0 | 0.111111 | 0.037037 | 0.444444 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
7225e1430f84c05f3579a0af6341fb20d179d2e9 | 1,089 | py | Python | qdscreen/tests/encoding_ref_help.py | python-qds/pyqds | c2d3c173a7edccf17241fef3aedeca1d30a59fe4 | [
"BSD-3-Clause"
] | null | null | null | qdscreen/tests/encoding_ref_help.py | python-qds/pyqds | c2d3c173a7edccf17241fef3aedeca1d30a59fe4 | [
"BSD-3-Clause"
] | 19 | 2021-01-20T08:58:46.000Z | 2022-01-07T08:42:09.000Z | qdscreen/tests/encoding_ref_help.py | python-qds/qdscreen | c2d3c173a7edccf17241fef3aedeca1d30a59fe4 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# the above encoding declaration is needed to have non-ascii characters in this file (anywhere even in comments)
from __future__ import unicode_literals
# this module mimics what happens in main.py:
# - there are special characters in the Foo.__str__ method. To support them in python 2 we need the line 1 (coding)
# - since in python 2 __str__ is supposed to return bytes, we use @python_2_unicode_compatible
# - since the special characters in the Foo.__str__ are not ascii, we need them to be declared as unicode literal. For
# this we can either do it by using a u as in 'u"└─"' or by importing unicode_literals from __future__ (line 2).
# Note: if we want to have some strings as unicode and some others not we MUST use u"" and not this import.
from qdscreen.compat import python_2_unicode_compatible, encode_if_py2
# @python_2_unicode_compatible
class Foo(object):
@encode_if_py2
def __str__(self):
return u"└─ab\n"
# def toto(self):
# return "fjdlkdlms"
def __repr__(self):
return str(self) # + self.toto()
| 41.884615 | 118 | 0.728191 | 179 | 1,089 | 4.212291 | 0.497207 | 0.046419 | 0.055703 | 0.095491 | 0.074271 | 0.074271 | 0 | 0 | 0 | 0 | 0 | 0.011468 | 0.199265 | 1,089 | 25 | 119 | 43.56 | 0.848624 | 0.737374 | 0 | 0 | 0 | 0 | 0.021978 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.25 | 0.875 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
72395949c3e1f4f2c2a205a12f860287d106ffc9 | 66 | py | Python | src/twocaptcha/__init__.py | tiagocardosoweb/2captcha-wrapper | e507e36b9b94895c9fd66bd8fe9910a7d8457054 | [
"BSD-2-Clause-FreeBSD"
] | 4 | 2017-09-29T23:14:00.000Z | 2018-02-19T23:50:14.000Z | src/twocaptcha/__init__.py | streetgt/2captcha-wrapper | e507e36b9b94895c9fd66bd8fe9910a7d8457054 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/twocaptcha/__init__.py | streetgt/2captcha-wrapper | e507e36b9b94895c9fd66bd8fe9910a7d8457054 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | __author__ = 'tiagocardosoweb'
from .twocaptcha import TwoCaptcha
| 22 | 34 | 0.833333 | 6 | 66 | 8.5 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106061 | 66 | 2 | 35 | 33 | 0.864407 | 0 | 0 | 0 | 0 | 0 | 0.227273 | 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 |
723dd85970e8a6126b2ebe6fe39fdafa77613901 | 431 | py | Python | soccerpy/modules/Fixture/fixtures_specific.py | SlapBot/soccerpy | e70cd9bf2ad130f004d85328a83deba0815461bd | [
"MIT"
] | null | null | null | soccerpy/modules/Fixture/fixtures_specific.py | SlapBot/soccerpy | e70cd9bf2ad130f004d85328a83deba0815461bd | [
"MIT"
] | 1 | 2017-07-18T17:04:58.000Z | 2017-07-19T02:02:46.000Z | soccerpy/modules/Fixture/fixtures_specific.py | SlapBot/soccerpy | e70cd9bf2ad130f004d85328a83deba0815461bd | [
"MIT"
] | 1 | 2018-08-17T23:51:31.000Z | 2018-08-17T23:51:31.000Z | from soccerpy.modules.Fixture.base_fixture import BaseFixture
from soccerpy.modules.Fundamentals.fixtures import Fixture
from soccerpy.modules.Fundamentals.head2head import Head2Head
class FixturesSpecific(BaseFixture):
def __init__(self, data, headers, request):
super().__init__(headers, request)
self.fixture = Fixture(data['fixture'], self.r)
self.head2head = Head2Head(data['head2head'], self.r)
| 39.181818 | 61 | 0.761021 | 49 | 431 | 6.510204 | 0.408163 | 0.112853 | 0.178683 | 0.194357 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.013441 | 0.136891 | 431 | 10 | 62 | 43.1 | 0.844086 | 0 | 0 | 0 | 0 | 0 | 0.037123 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.125 | false | 0 | 0.375 | 0 | 0.625 | 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 |
a0c9cef0a5cf89e8a00d7f38ba016b4f5a0bc2ac | 1,801 | py | Python | src/Logikanalysator/sigrok-integration/libsigrokdecode/decoders/uart/__init__.py | dm7h/fpga-event-recorder | 4e53babbbb514ee375f4b5585b1d24e5b40f8df7 | [
"0BSD"
] | null | null | null | src/Logikanalysator/sigrok-integration/libsigrokdecode/decoders/uart/__init__.py | dm7h/fpga-event-recorder | 4e53babbbb514ee375f4b5585b1d24e5b40f8df7 | [
"0BSD"
] | null | null | null | src/Logikanalysator/sigrok-integration/libsigrokdecode/decoders/uart/__init__.py | dm7h/fpga-event-recorder | 4e53babbbb514ee375f4b5585b1d24e5b40f8df7 | [
"0BSD"
] | null | null | null | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, write to the Free Software
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
'''
UART protocol decoder.
Universal Asynchronous Receiver Transmitter (UART) is a simple serial
communication protocol which allows two devices to talk to each other.
This decoder should work on all "UART-like" async protocols with one
start bit (0), 7-9 databits, an (optional) parity bit, and one or more
stop bits (1), in this order.
It can be run on one signal line (RX or TX) only, or on two lines (RX + TX).
There are various standards for the physical layer specification of the
signals, including RS232, (TTL) UART, RS485, and others. However, the logic
level of the respective pins is only relevant when acquiring the data via
a logic analyzer (you have to select the correct logic analyzer and/or
the correct place where to probe). Once the data is in digital form and
matches the "UART" description above, this protocol decoder can work with
it though, no matter whether the source was on TTL UART levels, or RS232,
or others.
'''
from .pd import *
| 40.022222 | 76 | 0.755691 | 297 | 1,801 | 4.582492 | 0.582492 | 0.022043 | 0.028655 | 0.041881 | 0.06025 | 0.041146 | 0 | 0 | 0 | 0 | 0 | 0.019595 | 0.178234 | 1,801 | 44 | 77 | 40.931818 | 0.9 | 0.952249 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
a0e9ac7f1613a030fb1d8a2f65415b51cea46365 | 127 | py | Python | quandl/api_config.py | dpete2008/quandl | e2540dc8333c03802583344820bb0dd6b93f07df | [
"MIT"
] | 2 | 2020-02-01T23:41:58.000Z | 2020-05-19T02:11:33.000Z | quandl/api_config.py | dpete2008/quandl | e2540dc8333c03802583344820bb0dd6b93f07df | [
"MIT"
] | null | null | null | quandl/api_config.py | dpete2008/quandl | e2540dc8333c03802583344820bb0dd6b93f07df | [
"MIT"
] | 2 | 2019-02-14T08:13:33.000Z | 2019-04-23T21:47:48.000Z | class ApiConfig:
api_key = None
api_base = 'https://www.quandl.com/api/v3'
api_version = None
page_limit = 100
| 21.166667 | 46 | 0.653543 | 19 | 127 | 4.157895 | 0.789474 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.041237 | 0.23622 | 127 | 5 | 47 | 25.4 | 0.773196 | 0 | 0 | 0 | 0 | 0 | 0.228346 | 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 |
a0f59170c948cfd667c46384e5d83c71d62026b3 | 6,971 | py | Python | client/tests/test_proof.py | mithril-security/blindai | 48739da059d30ab28429ca5106d7f07f8d5d3f66 | [
"Apache-2.0"
] | 121 | 2022-02-15T17:37:53.000Z | 2022-03-30T14:55:19.000Z | client/tests/test_proof.py | mithril-security/blindai | 48739da059d30ab28429ca5106d7f07f8d5d3f66 | [
"Apache-2.0"
] | 18 | 2022-02-16T12:23:24.000Z | 2022-03-27T20:33:33.000Z | client/tests/test_proof.py | mithril-security/blindai | 48739da059d30ab28429ca5106d7f07f8d5d3f66 | [
"Apache-2.0"
] | 10 | 2022-02-24T20:54:52.000Z | 2022-03-25T19:39:53.000Z | from copy import deepcopy
from hashlib import sha256
import os
import unittest
from google.protobuf.timestamp_pb2 import Timestamp
from blindai.pb.securedexchange_pb2 import (
Payload,
)
from blindai.client import (
RunModelResponse,
UploadModelResponse,
)
from blindai.dcap_attestation import Policy
from blindai.utils.errors import SignatureError, AttestationError
from .covidnet import get_input, get_model
exec_run = os.path.join(os.path.dirname(__file__), "exec_run.proof")
exec_upload = os.path.join(os.path.dirname(__file__), "exec_upload.proof")
tmp_path = os.path.join(os.path.dirname(__file__), "tmp_exec.proof")
policy_file = os.path.join(os.path.dirname(__file__), "policy.toml")
class TestProof(unittest.TestCase):
def test_parse_run(self):
response = RunModelResponse()
response.load_from_file(exec_run)
self.assertTrue(response.is_signed())
response2 = RunModelResponse()
with open(exec_run, "rb") as file:
response2.load_from_bytes(file.read())
self.assertEqual(response.payload, response2.payload)
self.assertEqual(response.signature, response2.signature)
self.assertEqual(response.attestation, response2.attestation)
self.assertEqual(response.output, response2.output)
response3 = RunModelResponse()
response3.load_from_bytes(response.as_bytes())
self.assertEqual(response.payload, response3.payload)
self.assertEqual(response.signature, response3.signature)
self.assertEqual(response.attestation, response3.attestation)
self.assertEqual(response.output, response3.output)
response3.save_to_file(tmp_path)
response4 = RunModelResponse()
response4.load_from_file(tmp_path)
self.assertEqual(response.payload, response4.payload)
self.assertEqual(response.signature, response4.signature)
self.assertEqual(response.attestation, response4.attestation)
self.assertEqual(response.output, response4.output)
def test_parse_upload(self):
response = UploadModelResponse()
response.load_from_file(exec_upload)
self.assertTrue(response.is_signed())
response2 = UploadModelResponse()
with open(exec_upload, "rb") as file:
response2.load_from_bytes(file.read())
self.assertEqual(response.payload, response2.payload)
self.assertEqual(response.signature, response2.signature)
self.assertEqual(response.attestation, response2.attestation)
response3 = UploadModelResponse()
response3.load_from_bytes(response.as_bytes())
self.assertEqual(response.payload, response3.payload)
self.assertEqual(response.signature, response3.signature)
self.assertEqual(response.attestation, response3.attestation)
response3.save_to_file(tmp_path)
response4 = UploadModelResponse()
response4.load_from_file(tmp_path)
self.assertEqual(response.payload, response4.payload)
self.assertEqual(response.signature, response4.signature)
self.assertEqual(response.attestation, response4.attestation)
def test_validate_run(self):
response = RunModelResponse()
response.load_from_file(exec_run)
policy = Policy.from_file(policy_file)
response.validate(
get_input(),
policy=policy,
)
# Not signed
response2 = deepcopy(response)
response2.signature = None
response2.attestation = None
with self.assertRaises(SignatureError):
response2.validate(
get_input(),
policy=policy,
)
# Quote validation
response2 = deepcopy(response)
response2.attestation.quote += b"a"
with self.assertRaises(AttestationError):
response2.validate(
get_input(),
policy=policy,
)
response2 = deepcopy(response)
response2.attestation.enclave_held_data += b"a"
with self.assertRaises(AttestationError):
response2.validate(
get_input(),
policy=policy,
)
# Payload validation
response2 = deepcopy(response)
payload = Payload.FromString(response2.payload)
payload.run_model_payload.output[0] += 0.1
response2.payload = payload.SerializeToString()
with self.assertRaises(SignatureError):
response2.validate(
get_input(),
policy=policy,
)
# Input validation
response2 = deepcopy(response)
data = deepcopy(get_input())
data[4] += 1
with self.assertRaises(SignatureError):
response2.validate(
data,
policy=policy,
)
# Using file
response.validate(
get_input(),
policy_file=policy_file,
)
def test_validate_upload(self):
response = UploadModelResponse()
response.load_from_file(exec_upload)
policy = Policy.from_file(policy_file)
model_hash = sha256(get_model()).digest()
response.validate(
model_hash,
policy=policy,
)
# Not signed
response2 = deepcopy(response)
response2.signature = None
response2.attestation = None
with self.assertRaises(SignatureError):
response2.validate(
model_hash,
policy=policy,
)
# Quote validation
response2 = deepcopy(response)
response2.attestation.quote += b"a"
with self.assertRaises(AttestationError):
response2.validate(
model_hash,
policy=policy,
)
response2 = deepcopy(response)
response2.attestation.enclave_held_data += b"a"
with self.assertRaises(AttestationError):
response2.validate(
model_hash,
policy=policy,
)
# Payload validation
response2 = deepcopy(response)
payload = Payload.FromString(response2.payload)
payload.send_model_payload.model_hash = (
b"1" + payload.send_model_payload.model_hash[1:]
)
response2.payload = payload.SerializeToString()
with self.assertRaises(SignatureError):
response2.validate(
model_hash,
policy=policy,
)
# Input validation
response2 = deepcopy(response)
new_hash = model_hash[:5] + b"1" + model_hash[6:]
with self.assertRaises(SignatureError):
response2.validate(
new_hash,
policy=policy,
)
# Using file
response.validate(
model_hash,
policy_file=policy_file,
)
| 30.709251 | 74 | 0.631904 | 656 | 6,971 | 6.542683 | 0.135671 | 0.073392 | 0.112535 | 0.041938 | 0.801491 | 0.771901 | 0.676608 | 0.629077 | 0.614632 | 0.614632 | 0 | 0.01699 | 0.282312 | 6,971 | 226 | 75 | 30.845133 | 0.840895 | 0.021374 | 0 | 0.650888 | 0 | 0 | 0.00969 | 0 | 0 | 0 | 0 | 0 | 0.195266 | 1 | 0.023669 | false | 0 | 0.059172 | 0 | 0.088757 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a0fb91abced3e5f15faa2fb6f86c227da7378fc0 | 39 | py | Python | src/IceRayPy/core/material/instruction/label/coord3d/const.py | dmilos/IceRay | 4e01f141363c0d126d3c700c1f5f892967e3d520 | [
"MIT-0"
] | 2 | 2020-09-04T12:27:15.000Z | 2022-01-17T14:49:40.000Z | src/IceRayPy/core/material/instruction/label/coord3d/const.py | dmilos/IceRay | 4e01f141363c0d126d3c700c1f5f892967e3d520 | [
"MIT-0"
] | null | null | null | src/IceRayPy/core/material/instruction/label/coord3d/const.py | dmilos/IceRay | 4e01f141363c0d126d3c700c1f5f892967e3d520 | [
"MIT-0"
] | 1 | 2020-09-04T12:27:52.000Z | 2020-09-04T12:27:52.000Z | _BEGIN = 0
ZERO=0
RAND=1
_END = 10
| 7.8 | 11 | 0.589744 | 8 | 39 | 2.625 | 0.875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.185185 | 0.307692 | 39 | 4 | 12 | 9.75 | 0.592593 | 0 | 0 | 0 | 0 | 0 | 0 | 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 |
9d02e24cc3e773e9c6844ba553a6e9450a812cca | 662 | py | Python | examples/by_systems/mass_spring_damper/two_mass_with_pid.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 14 | 2019-05-03T15:22:38.000Z | 2022-03-14T15:31:54.000Z | examples/by_systems/mass_spring_damper/two_mass_with_pid.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 9 | 2019-08-01T14:22:13.000Z | 2021-06-12T01:44:50.000Z | examples/by_systems/mass_spring_damper/two_mass_with_pid.py | SherbyRobotics/PyRobotics | 86eb1189258f6f41642a149c813dd2fd6853bcc1 | [
"MIT"
] | 9 | 2019-05-21T12:38:36.000Z | 2022-03-29T16:28:45.000Z | # -*- coding: utf-8 -*-
"""
Created on Jun 2 2021
@author: Alex
"""
import numpy as np
from pyro.dynamic import massspringdamper
from pyro.control.linear import PIDController
# Plant
sys = massspringdamper.TwoMass()
sys.m1 = 2
sys.m2 = 3
sys.k1 = 5
sys.k2 = 2
sys.b1 = 0.1
sys.b2 = 0.2
sys.compute_ABCD()
# LQR controller
kp = 5
ki = 0
kd = 2
tau = 0.1
ctl = PIDController(kp, ki, kd, tau)
# Simulation Closed-Loop Non-linear with LQR controller
cl_sys = ctl + sys
cl_sys.x0[1] = 1
cl_sys.compute_trajectory()
cl_sys.plot_trajectory('xu')
cl_sys.plot_linearized_pz_map()
cl_sys.plot_linearized_bode()
cl_sys.animate_simulation() | 662 | 662 | 0.691843 | 110 | 662 | 4.018182 | 0.527273 | 0.079186 | 0.061086 | 0.085973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.052045 | 0.187311 | 662 | 1 | 662 | 662 | 0.769517 | 1.049849 | 0 | 0 | 0 | 0 | 0.003861 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.130435 | 0 | 0.130435 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
9d267256f8642c23b94674d0e9575f186d81491d | 164 | py | Python | Udemy/Secao5/aula132/tempCodeRunnerFile.py | rafaelgama/Curso_Python | 908231de9de4a17f5aa829f2671fd88de9261eda | [
"MIT"
] | 1 | 2020-05-07T20:21:15.000Z | 2020-05-07T20:21:15.000Z | Udemy/Secao5/aula132/tempCodeRunnerFile.py | rafaelgama/Curso_Python | 908231de9de4a17f5aa829f2671fd88de9261eda | [
"MIT"
] | null | null | null | Udemy/Secao5/aula132/tempCodeRunnerFile.py | rafaelgama/Curso_Python | 908231de9de4a17f5aa829f2671fd88de9261eda | [
"MIT"
] | null | null | null | for arquivo in os.listdir(caminho):
caminho_completo = os.path.join(caminho, arquivo)
#zip.write(caminho_completo, arquivo)
print(caminho_completo) | 32.8 | 53 | 0.731707 | 21 | 164 | 5.571429 | 0.571429 | 0.384615 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.164634 | 164 | 5 | 54 | 32.8 | 0.854015 | 0.219512 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 1 | 0 | 0 | null | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
9d3cdcb3f4a0fb1df8c5f6d0ed17022f0dcbc137 | 1,441 | py | Python | AcdUtilLib.py | fermi-lat/AcdUtil | 0fc8537ebc7c90dec9cb4a72e1ee274b78dd1b09 | [
"BSD-3-Clause"
] | null | null | null | AcdUtilLib.py | fermi-lat/AcdUtil | 0fc8537ebc7c90dec9cb4a72e1ee274b78dd1b09 | [
"BSD-3-Clause"
] | null | null | null | AcdUtilLib.py | fermi-lat/AcdUtil | 0fc8537ebc7c90dec9cb4a72e1ee274b78dd1b09 | [
"BSD-3-Clause"
] | null | null | null | # $Header: /nfs/slac/g/glast/ground/cvs/GlastRelease-scons/AcdUtil/AcdUtilLib.py,v 1.4 2009/08/08 01:08:04 jrb Exp $
def generate(env, **kw):
if not kw.get('depsOnly', 0):
env.Tool('addLibrary', library = ['AcdUtil'])
if env['PLATFORM'] == 'win32':
env.Tool('findPkgPath', package = 'AcdUtil')
env.Tool('addLibrary', library = ['AcdUtilCommon'])
env.Tool('CalibDataLib')
env.Tool('geometryLib')
env.Tool('xmlBaseLib')
env.Tool('rdbModelLib')
env.Tool('calibUtilLib')
env.Tool('EventLib')
env.Tool('GlastSvcLib')
env.Tool('mootCoreLib')
env.Tool('facilitiesLib')
env.Tool('addLibrary', library = env['gaudiLibs'])
env.Tool('addLibrary', library = env['mysqlLibs'])
env.Tool('addLibrary', library = env['clhepLibs'])
env.Tool('addLibrary', library = env['cppunitLibs'])
env.Tool('addLibrary', library = env['xercesLibs'])
if env['PLATFORM']=='win32' and env.get('CONTAINERNAME','')=='GlastRelease':
env.Tool('findPkgPath', package='CalibSvc')
# only needed for building static lib and compiling TestAcdUtil.cxx
if kw.get('incsOnly', 0) == 1:
env.Tool('findPkgPath', package = 'GlastSvc')
env.Tool('findPkgPath', package = 'idents')
env.Tool('findPkgPath', package = 'geometry')
env.Tool('findPkgPath', package = 'Event')
env.Tool('findPkgPath', package = 'enums')
def exists(env):
return 1;
| 40.027778 | 116 | 0.637752 | 169 | 1,441 | 5.43787 | 0.426036 | 0.17519 | 0.129489 | 0.182807 | 0.146899 | 0 | 0 | 0 | 0 | 0 | 0 | 0.020287 | 0.179042 | 1,441 | 35 | 117 | 41.171429 | 0.756551 | 0.124913 | 0 | 0 | 1 | 0 | 0.340223 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0 | null | null | 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 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
19d35e18e58b4952ba92b768fcb825dac54015d2 | 1,643 | py | Python | myenv/Lib/site-packages/github/enums/repositorysubscription.py | thestackcoder/notifao_app | e21ab3c0eed72a64ee24508b92045de13c8385bb | [
"MIT"
] | null | null | null | myenv/Lib/site-packages/github/enums/repositorysubscription.py | thestackcoder/notifao_app | e21ab3c0eed72a64ee24508b92045de13c8385bb | [
"MIT"
] | null | null | null | myenv/Lib/site-packages/github/enums/repositorysubscription.py | thestackcoder/notifao_app | e21ab3c0eed72a64ee24508b92045de13c8385bb | [
"MIT"
] | null | null | null | """
/github/enums/repositorysubscription.py
Copyright (c) 2019-2020 ShineyDev
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.
"""
class RepositorySubscription():
"""
Represents a user's subscription state.
https://developer.github.com/v4/enum/subscriptionstate/
"""
__slots__ = ("_subscription",)
def __init__(self, subscription):
self._subscription = subscription
def __repr__(self) -> str:
return "<{0.__class__.__name__} '{0._subscription}'>".format(self)
@classmethod
def from_data(cls, subscription):
return cls(subscription)
@property
def ignored(self) -> bool:
"""
The user is never notified.
"""
return self._subscription == "IGNORED"
@property
def subscribed(self) -> bool:
"""
The user is notified of all conversations.
"""
return self._subscription == "SUBSCRIBED"
@property
def unsubscribed(self) -> bool:
"""
The user is only notified when participating or mentioned.
"""
return self._subscription == "UNSUBSCRIBED"
| 26.934426 | 76 | 0.655508 | 188 | 1,643 | 5.585106 | 0.56383 | 0.057143 | 0.031429 | 0.042857 | 0.048571 | 0 | 0 | 0 | 0 | 0 | 0 | 0.012215 | 0.252587 | 1,643 | 60 | 77 | 27.383333 | 0.842834 | 0.529519 | 0 | 0.166667 | 0 | 0 | 0.127031 | 0.033973 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0 | 0.111111 | 0.722222 | 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 |
c21a42299fa0e15ccf9db8ab8af70841a1ea0272 | 109 | py | Python | fb4/sqldb.py | tholzheim/pyFlaskBootstrap4 | 7e08ce6b98fc247ff97379385c41db42974db26d | [
"Apache-2.0"
] | 3 | 2021-07-31T03:40:28.000Z | 2022-02-16T06:47:45.000Z | fb4/sqldb.py | tholzheim/pyFlaskBootstrap4 | 7e08ce6b98fc247ff97379385c41db42974db26d | [
"Apache-2.0"
] | 31 | 2021-01-08T14:21:18.000Z | 2022-02-25T16:00:57.000Z | fb4/sqldb.py | tholzheim/pyFlaskBootstrap4 | 7e08ce6b98fc247ff97379385c41db42974db26d | [
"Apache-2.0"
] | 3 | 2021-02-03T10:58:43.000Z | 2021-12-20T18:57:41.000Z | '''
Created on 21.01.2021
@author: wf
'''
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy() | 13.625 | 39 | 0.669725 | 14 | 109 | 5.142857 | 0.857143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.093023 | 0.211009 | 109 | 8 | 40 | 13.625 | 0.744186 | 0.311927 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
dfa4c2f3dec2ddadb16069cf01ac883ebe6907a1 | 784 | py | Python | test.py | mokha/natas | a43c8014db33c47953da59c108ba5c1f5c42920f | [
"Apache-2.0"
] | null | null | null | test.py | mokha/natas | a43c8014db33c47953da59c108ba5c1f5c42920f | [
"Apache-2.0"
] | null | null | null | test.py | mokha/natas | a43c8014db33c47953da59c108ba5c1f5c42920f | [
"Apache-2.0"
] | null | null | null | from natas import ocr_builder
from mikatools import *
#from gensim.models import Word2Vec
#from gensim.models.keyedvectors import Word2VecKeyedVectors
import natas
print(natas.normalize_words(["seacreat", "wiþe"], n_best=5))
print(natas.ocr_correct_words(["paft", "friendlhip"]))
#print(natas.is_correctly_spelled("cat"))
#print(natas.is_correctly_spelled("ca7"))
#model = Word2Vec.load("/Users/mikahama/Downloads/models/model_fi_1820-1917.w2v")
#model = Word2VecKeyedVectors.load_word2vec_format("/mnt/c/Users/Mika/Downloads/enwiki_20180420_100d.txt")
#print("ok")
#seed_words = set(json_load("natas/wiktionary_lemmas.json"))
#print("ok")
#res = ocr_builder.extract_parallel(seed_words, model, dictionary=seed_words, lemmatize=False, use_freq=False)
#json_dump(res, "test.json")
| 37.333333 | 110 | 0.790816 | 109 | 784 | 5.46789 | 0.550459 | 0.067114 | 0.053691 | 0.07047 | 0.09396 | 0 | 0 | 0 | 0 | 0 | 0 | 0.036735 | 0.0625 | 784 | 20 | 111 | 39.2 | 0.77415 | 0.733418 | 0 | 0 | 0 | 0 | 0.13198 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.6 | 0 | 0.6 | 0.4 | 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 |
dfcccf0b26cecb7b0c2bdc6e54c4d550bcb2667f | 264 | py | Python | src/python/main.py | daboross/dxnr | 8f73e9d5f4473b97dcfe05804a40c9a0826e51b6 | [
"MIT"
] | null | null | null | src/python/main.py | daboross/dxnr | 8f73e9d5f4473b97dcfe05804a40c9a0826e51b6 | [
"MIT"
] | null | null | null | src/python/main.py | daboross/dxnr | 8f73e9d5f4473b97dcfe05804a40c9a0826e51b6 | [
"MIT"
] | null | null | null | from defs import *
def main() -> None:
"""
Main game logic loop shim.
"""
from providers import cpucheck
cpucheck.instantiate()
if cpucheck.is_over_limit():
return
import logic
logic.main()
module.exports.loop = main
| 13.2 | 34 | 0.613636 | 31 | 264 | 5.16129 | 0.645161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.287879 | 264 | 19 | 35 | 13.894737 | 0.851064 | 0.098485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.111111 | true | 0 | 0.333333 | 0 | 0.555556 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
dfcdb76f2a65b29e8c04159d0cf267e398aafe7d | 266 | py | Python | helper.py | alterthefuture/modmail | 2be9b044270fc0c5a24803effb4e3680fefdce65 | [
"MIT"
] | null | null | null | helper.py | alterthefuture/modmail | 2be9b044270fc0c5a24803effb4e3680fefdce65 | [
"MIT"
] | null | null | null | helper.py | alterthefuture/modmail | 2be9b044270fc0c5a24803effb4e3680fefdce65 | [
"MIT"
] | null | null | null | import discord
import random
def create_embed(text):
embed=discord.Embed(description=text,color=discord.Color.blurple())
return embed
def error_embed(text):
embed=discord.Embed(description=text,color=discord.Color.red())
return embed
| 20.461538 | 72 | 0.721805 | 34 | 266 | 5.588235 | 0.382353 | 0.094737 | 0.147368 | 0.221053 | 0.610526 | 0.610526 | 0.610526 | 0.610526 | 0.610526 | 0.610526 | 0 | 0 | 0.172932 | 266 | 12 | 73 | 22.166667 | 0.863636 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
dfce3a700d385f866fe5baa6ae87a25014aca0d2 | 310 | py | Python | ranking/models.py | ShitamatsugeFactory/KokoWalk_Server | 9af36f750a512aa56635b04a190589d76822bc86 | [
"MIT"
] | 3 | 2017-01-01T07:34:54.000Z | 2017-01-04T02:18:37.000Z | ranking/models.py | ShitamatsugeFactory/KokoWalk_Server | 9af36f750a512aa56635b04a190589d76822bc86 | [
"MIT"
] | null | null | null | ranking/models.py | ShitamatsugeFactory/KokoWalk_Server | 9af36f750a512aa56635b04a190589d76822bc86 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
# Create your models here.
class Ranking(models.Model):
# marikoojisan / doitsujin / ....
part = models.CharField(max_length=64)
# user name
name = models.CharField(max_length=64)
score = models.IntegerField(null=True)
| 25.833333 | 42 | 0.725806 | 39 | 310 | 5.589744 | 0.692308 | 0.137615 | 0.165138 | 0.220183 | 0.238532 | 0 | 0 | 0 | 0 | 0 | 0 | 0.015686 | 0.177419 | 310 | 11 | 43 | 28.181818 | 0.839216 | 0.212903 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 3 |
dfd070d32d8603034c917a0d80eb4f7bd3712d05 | 194 | py | Python | day_1/range_object.py | anishLearnsToCode/python-workshop-wac-5 | edaa5d9fdc1dd0b2a7557155215ff823b0be44b5 | [
"MIT"
] | 3 | 2020-07-23T13:44:16.000Z | 2021-09-15T20:28:52.000Z | day_1/range_object.py | anishLearnsToCode/python-workshop-wac-5 | edaa5d9fdc1dd0b2a7557155215ff823b0be44b5 | [
"MIT"
] | null | null | null | day_1/range_object.py | anishLearnsToCode/python-workshop-wac-5 | edaa5d9fdc1dd0b2a7557155215ff823b0be44b5 | [
"MIT"
] | 1 | 2020-11-01T00:53:00.000Z | 2020-11-01T00:53:00.000Z | """
Range
range(stop)
range(start, stop)
range(start, stop, step)
start = 0
step = 1
- iterable object
- string is iterable
"""
r = range(5, 10, 2)
print(r.start)
print(r.stop)
print(r.step)
| 10.777778 | 24 | 0.659794 | 33 | 194 | 3.878788 | 0.454545 | 0.140625 | 0.21875 | 0.28125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037267 | 0.170103 | 194 | 17 | 25 | 11.411765 | 0.757764 | 0.623711 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.75 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
a05d0fc15f30512f54b09f2d9e7e7188a722329e | 965 | py | Python | web/users/migrations/0002_auto_20200906_2028.py | MariaMozgunova/dockerized_rest_api | aa6aef810317dd58bfd36e4f3d64c3067c6cade0 | [
"MIT"
] | null | null | null | web/users/migrations/0002_auto_20200906_2028.py | MariaMozgunova/dockerized_rest_api | aa6aef810317dd58bfd36e4f3d64c3067c6cade0 | [
"MIT"
] | null | null | null | web/users/migrations/0002_auto_20200906_2028.py | MariaMozgunova/dockerized_rest_api | aa6aef810317dd58bfd36e4f3d64c3067c6cade0 | [
"MIT"
] | 12 | 2021-02-11T16:39:00.000Z | 2022-03-30T19:18:24.000Z | # Generated by Django 3.0.5 on 2020-09-06 20:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='bio',
field=models.TextField(blank=True, max_length=500, verbose_name='description'),
),
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(max_length=40, unique=True, verbose_name='email'),
),
migrations.AlterField(
model_name='user',
name='role',
field=models.CharField(default='user', max_length=30, verbose_name='role'),
),
migrations.AlterField(
model_name='user',
name='token',
field=models.CharField(blank=True, max_length=36, verbose_name='token'),
),
]
| 28.382353 | 91 | 0.570984 | 99 | 965 | 5.434343 | 0.484848 | 0.148699 | 0.185874 | 0.215613 | 0.275093 | 0.275093 | 0 | 0 | 0 | 0 | 0 | 0.041481 | 0.300518 | 965 | 33 | 92 | 29.242424 | 0.755556 | 0.046632 | 0 | 0.444444 | 1 | 0 | 0.086057 | 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 |
a06f62c7fccfc8824dad9109000dd483cda84151 | 299 | py | Python | no12/no12.py | shopetan/ksnctf | f4b7724c956a5dc0590c83ff6f5fb6a249b81371 | [
"MIT"
] | null | null | null | no12/no12.py | shopetan/ksnctf | f4b7724c956a5dc0590c83ff6f5fb6a249b81371 | [
"MIT"
] | null | null | null | no12/no12.py | shopetan/ksnctf | f4b7724c956a5dc0590c83ff6f5fb6a249b81371 | [
"MIT"
] | null | null | null | import requests
postdata = """<?php system('cat flag_flag_flag.txt'); die();?>"""
url = """http://ctfq.sweetduet.info:10080/~q12/?-d+allow_url_include%3DOn+-d+auto_prepend_file%3Dphp://input"""
#url = """http://ctfq.sweetduet.info:10080/~q12/?-s"""
hax = requests.post(url,postdata)
print hax.text
| 37.375 | 111 | 0.692308 | 45 | 299 | 4.466667 | 0.666667 | 0.079602 | 0.109453 | 0.199005 | 0.318408 | 0.318408 | 0.318408 | 0 | 0 | 0 | 0 | 0.057348 | 0.06689 | 299 | 7 | 112 | 42.714286 | 0.663082 | 0.177258 | 0 | 0 | 0 | 0.2 | 0.6 | 0.085714 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.2 | null | null | 0.2 | 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 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a07b635dce815ae1f05cbb0cacee5b50409ac6c9 | 1,804 | py | Python | graphs/graphs.py | mihir86/Client-Server-Architecture-with-Shift-Repeat-protocol | 4c647f4db53499668b5ecfbff0e186e416e69799 | [
"MIT"
] | null | null | null | graphs/graphs.py | mihir86/Client-Server-Architecture-with-Shift-Repeat-protocol | 4c647f4db53499668b5ecfbff0e186e416e69799 | [
"MIT"
] | null | null | null | graphs/graphs.py | mihir86/Client-Server-Architecture-with-Shift-Repeat-protocol | 4c647f4db53499668b5ecfbff0e186e416e69799 | [
"MIT"
] | null | null | null |
# Gaurang Gupta - 2018A7PS0225H
# Rushabh Musthyala - 2018A7PS0433H
# Mihir Bansal - 2018A7PS0215H
# Aditya Jhaveri Alok - 2018A7PS0209H
# Dev Gupta - 2017B3A71082H
import numpy as np
import matplotlib.pyplot as plt
filesize = 10615705
plt.figure(figsize=(20, 10))
x = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]
y1 = [66.235, 105.564, 177.241, 198.462, 234.572, 301.134, 377.306, 462.941, 553.350, 639.462, 749.213]
plt.xlabel("Corruption Percentage")
plt.ylabel("Time in seconds")
plt.plot(x, y1)
plt.show()
plt.figure(figsize=(20, 10))
x = [0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000]
y2 = [66.235, 69.2313, 93.137, 128.571, 170.532, 179.420, 196.167, 228.451, 261.628, 294.373, 310.907]
plt.xlabel("Delay in ms")
plt.ylabel("Time in seconds")
plt.plot(x, y2)
plt.show()
plt.figure(figsize=(20, 10))
x = [0, 5, 10, 20, 30, 40, 50, 60, 70, 80]
y3 = [50.768, 51.0588, 52.516, 57.212, 88.568, 106.338, 169.662, 272.732, 461.918, 1211.521]
plt.xlabel("Packet Loss Percentage")
plt.ylabel("Time in seconds")
plt.plot(x, y3)
plt.show()
# Throughput graphs
plt.figure(figsize=(20, 10))
x = [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50]
newY = [filesize/i for i in y1]
plt.xlabel("Corruption Percentage")
plt.ylabel("Throughput in bytes/sec")
plt.plot(x, newY)
plt.show()
plt.figure(figsize=(20, 10))
x = [0, 500, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 4500, 5000]
newY = [filesize/i for i in y2]
plt.xlabel("Delay in ms")
plt.ylabel("Throughput in bytes/sec")
plt.plot(x, newY)
plt.show()
plt.figure(figsize=(20, 10))
x = [0, 5, 10, 20, 30, 40, 50, 60, 70, 80]
newY = [filesize/i for i in y3]
plt.xlabel("Packet Loss Percentage")
plt.ylabel("Throughput in bytes/sec")
plt.plot(x, newY)
plt.show() | 26.144928 | 104 | 0.639135 | 314 | 1,804 | 3.671975 | 0.423567 | 0.046834 | 0.083261 | 0.093669 | 0.640937 | 0.640937 | 0.558543 | 0.494363 | 0.468343 | 0.398959 | 0 | 0.291638 | 0.18459 | 1,804 | 69 | 105 | 26.144928 | 0.492182 | 0.095344 | 0 | 0.733333 | 0 | 0 | 0.142582 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.044444 | 0 | 0.044444 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a0836229e225c17b6864f4aefb709b275b9cd0e5 | 1,121 | py | Python | torch_scae/math_ops.py | KohavTal/SCAE_Project | bc6d1c3697fcb9327dd96e9657c3299b47cf355e | [
"Apache-2.0"
] | 40 | 2020-05-25T02:38:45.000Z | 2022-03-24T03:21:46.000Z | torch_scae/math_ops.py | KohavTal/SCAE_Project | bc6d1c3697fcb9327dd96e9657c3299b47cf355e | [
"Apache-2.0"
] | 11 | 2020-05-26T10:19:20.000Z | 2022-03-26T01:33:12.000Z | torch_scae/math_ops.py | karayanni/torch-scae | e044662d8942d8d1923d13d071f375144cf4a1e8 | [
"Apache-2.0"
] | 13 | 2020-06-15T17:14:55.000Z | 2022-03-24T07:57:33.000Z | # Copyright 2020 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import torch
def log_safe(tensor, eps=1e-16):
is_zero = tensor < eps
tensor = torch.where(is_zero, torch.ones_like(tensor), tensor)
tensor = torch.where(is_zero, torch.zeros_like(tensor) - 1e8, torch.log(tensor))
return tensor
def cross_entropy_safe(true_probs, probs, dim=-1):
return torch.mean(-torch.sum(true_probs * log_safe(probs), dim=dim))
def normalize(tensor, dim):
return tensor / (torch.sum(tensor, dim, keepdim=True) + 1e-8)
def l2_loss(tensor):
return torch.sum(tensor ** 2) / 2
| 32.028571 | 84 | 0.73149 | 175 | 1,121 | 4.617143 | 0.531429 | 0.074257 | 0.032178 | 0.039604 | 0.066832 | 0.066832 | 0 | 0 | 0 | 0 | 0 | 0.020408 | 0.169492 | 1,121 | 34 | 85 | 32.970588 | 0.847476 | 0.504014 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0 | 0.083333 | 0.25 | 0.75 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 3 |
a09a0b1f223679dd83e645e430796432082c7b8f | 103 | py | Python | tests/paths.py | ffoxin/kodi.kino.pub | f085beb99fcbab3da4efc698d56775d9553b9f28 | [
"BSD-3-Clause"
] | 59 | 2018-10-07T19:54:27.000Z | 2022-03-27T08:55:57.000Z | tests/paths.py | ffoxin/kodi.kino.pub | f085beb99fcbab3da4efc698d56775d9553b9f28 | [
"BSD-3-Clause"
] | 147 | 2018-10-07T19:02:13.000Z | 2022-03-05T17:15:16.000Z | tests/paths.py | ffoxin/kodi.kino.pub | f085beb99fcbab3da4efc698d56775d9553b9f28 | [
"BSD-3-Clause"
] | 22 | 2018-11-14T16:40:19.000Z | 2022-02-11T22:30:28.000Z | from pathlib import Path
HOST_DIR = f"{Path('.').absolute()}/tests/data"
CON_DIR = "/home/kodi/.kodi"
| 20.6 | 47 | 0.679612 | 16 | 103 | 4.25 | 0.8125 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.106796 | 103 | 4 | 48 | 25.75 | 0.73913 | 0 | 0 | 0 | 0 | 0 | 0.475728 | 0.320388 | 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 |
a0a1449a7d23d9b79a452d8c43dc6d174b0430bd | 559 | py | Python | passcode_decipher/tests.py | IamTechknow/team-arcana-magnus | 527218b71aefe624155fdd3ac3f77d14a2d4b8c9 | [
"MIT"
] | 1 | 2018-04-06T06:07:35.000Z | 2018-04-06T06:07:35.000Z | passcode_decipher/tests.py | IamTechknow/team-arcana-magnus | 527218b71aefe624155fdd3ac3f77d14a2d4b8c9 | [
"MIT"
] | null | null | null | passcode_decipher/tests.py | IamTechknow/team-arcana-magnus | 527218b71aefe624155fdd3ac3f77d14a2d4b8c9 | [
"MIT"
] | null | null | null | from time import sleep
import pygame, sys
import RPi.GPIO as GPIO
from classes.rotary import Rotary
from classes.algorithm import Algorithm
from classes.algorithm import AlgorithmType
algo = Algorithm(AlgorithmType.VIGENERE)
print (algo.encrypt("mathieu","ee"))
algo = Algorithm(AlgorithmType.BASE64)
print (algo.encrypt("mathieu"))
algo = Algorithm(AlgorithmType.ROT13)
print (algo.encrypt("mathieu"))
algo = Algorithm(AlgorithmType.ATBASH)
print (algo.encrypt("mathieu"))
algo = Algorithm(AlgorithmType.COLTRANS)
print (algo.encrypt("mathieu", "1234")) | 26.619048 | 43 | 0.78712 | 69 | 559 | 6.376812 | 0.347826 | 0.147727 | 0.295455 | 0.261364 | 0.334091 | 0.334091 | 0.334091 | 0 | 0 | 0 | 0 | 0.01581 | 0.094812 | 559 | 21 | 44 | 26.619048 | 0.853755 | 0 | 0 | 0.1875 | 0 | 0 | 0.073214 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.375 | 0 | 0.375 | 0.3125 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
a0a34163c4948e9387959a4cdc3764a4ac10116f | 20,290 | py | Python | tests/test_api_device.py | skylli/devicehive-python | c61da550443b2d59938076b8394ac3e1eadc5fba | [
"Apache-2.0"
] | 28 | 2015-07-26T10:39:33.000Z | 2021-04-16T11:33:50.000Z | tests/test_api_device.py | skylli/devicehive-python | c61da550443b2d59938076b8394ac3e1eadc5fba | [
"Apache-2.0"
] | 24 | 2015-05-27T08:55:32.000Z | 2020-12-23T06:03:07.000Z | tests/test_api_device.py | skylli/devicehive-python | c61da550443b2d59938076b8394ac3e1eadc5fba | [
"Apache-2.0"
] | 21 | 2015-09-29T20:17:40.000Z | 2021-02-12T05:02:27.000Z | # Copyright (C) 2018 DataArt
#
# 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 devicehive import DeviceError, SubscriptionError
from devicehive import ApiResponseError
def test_save(test):
device_hive_api = test.device_hive_api()
device_id = test.generate_id('d-s', test.DEVICE_ENTITY)
device = device_hive_api.put_device(device_id)
name = '%s-name' % device_id
data = {'data_key': 'data_value'}
device.name = name
device.data = data
device.is_blocked = True
device.save()
device = device_hive_api.get_device(device_id)
assert device.id == device_id
assert device.name == name
assert device.data == data
assert isinstance(device.network_id, int)
assert isinstance(device.device_type_id, int)
assert device.is_blocked
device.remove()
try:
device.save()
assert False
except DeviceError:
pass
def test_remove(test):
device_hive_api = test.device_hive_api()
device_id = test.generate_id('d-r', test.DEVICE_ENTITY)
device = device_hive_api.put_device(device_id)
device_1 = device_hive_api.get_device(device_id)
device.remove()
assert not device.id
assert not device.name
assert not device.data
assert not device.network_id
assert not device.device_type_id
assert not device.is_blocked
try:
device.remove()
assert False
except DeviceError:
pass
try:
device_1.remove()
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
def test_subscribe_insert_commands(test):
def init_data(handler):
device_id = test.generate_id('d-s-i-c', test.DEVICE_ENTITY)
command_names = ['%s-name-%s' % (device_id, i) for i in range(2)]
device = handler.api.put_device(device_id)
return device, command_names, []
def send_data(handler, device, command_names):
for command_name in command_names:
command = device.send_command(command_name)
handler.data['command_ids'].append(command.id)
def set_handler_data(handler, device, command_names, command_ids):
handler.data['device'] = device
handler.data['command_names'] = command_names
handler.data['command_ids'] = command_ids
def handle_connect(handler):
device, command_names, command_ids = init_data(handler)
set_handler_data(handler, device, command_names, command_ids)
send_data(handler, device, command_names)
handler.data['subscription'] = device.subscribe_insert_commands()
def handle_command_insert(handler, command):
assert command.id in handler.data['command_ids']
handler.data['command_ids'].remove(command.id)
if handler.data['command_ids']:
return
handler.data['subscription'].remove()
handler.data['device'].remove()
handler.disconnect()
test.run(handle_connect, handle_command_insert)
def handle_connect(handler):
device, command_names, command_ids = init_data(handler)
command_name = command_names[:1]
set_handler_data(handler, device, command_names, command_ids)
send_data(handler, device, command_name)
handler.data['subscription'] = device.subscribe_insert_commands(
names=command_name)
def handle_command_insert(handler, command):
assert command.id == handler.data['command_ids'][0]
handler.data['subscription'].remove()
handler.data['device'].remove()
handler.disconnect()
test.run(handle_connect, handle_command_insert)
def handle_connect(handler):
device, commands, command_ids = init_data(handler)
device_1 = handler.api.get_device(device.id)
device.remove()
try:
device_1.subscribe_insert_commands()
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
test.run(handle_connect)
def test_unsubscribe_insert_commands(test):
def handle_connect(handler):
device_id = test.generate_id('d-u-i-c', test.DEVICE_ENTITY)
device = handler.api.put_device(device_id)
subscription = device.subscribe_insert_commands()
subscription.remove()
try:
subscription.remove()
assert False
except SubscriptionError:
pass
device.remove()
test.run(handle_connect)
def test_subscribe_update_commands(test):
def init_data(handler):
device_id = test.generate_id('d-s-u-c', test.DEVICE_ENTITY)
command_names = ['%s-name-%s' % (device_id, i) for i in range(2)]
device = handler.api.put_device(device_id)
return device, command_names, []
def send_data(handler, device, command_names):
for command_name in command_names:
command = device.send_command(command_name)
handler.data['command_ids'].append(command.id)
command.status = 'status'
command.save()
def set_handler_data(handler, device, command_names, command_ids):
handler.data['device'] = device
handler.data['command_names'] = command_names
handler.data['command_ids'] = command_ids
def handle_connect(handler):
device, command_names, command_ids = init_data(handler)
set_handler_data(handler, device, command_names, command_ids)
send_data(handler, device, command_names)
handler.data['subscription'] = device.subscribe_update_commands()
def handle_command_update(handler, command):
assert command.id in handler.data['command_ids']
handler.data['command_ids'].remove(command.id)
if handler.data['command_ids']:
return
handler.data['subscription'].remove()
handler.data['device'].remove()
handler.disconnect()
test.run(handle_connect, handle_command_update=handle_command_update)
def handle_connect(handler):
device, command_names, command_ids = init_data(handler)
command_name = command_names[:1]
set_handler_data(handler, device, command_names, command_ids)
send_data(handler, device, command_name)
handler.data['subscription'] = device.subscribe_update_commands(
names=command_name)
def handle_command_update(handler, command):
assert command.id == handler.data['command_ids'][0]
handler.data['subscription'].remove()
handler.data['device'].remove()
handler.disconnect()
test.run(handle_connect, handle_command_update=handle_command_update)
def handle_connect(handler):
device, commands, command_ids = init_data(handler)
device_1 = handler.api.get_device(device.id)
device.remove()
try:
device_1.subscribe_update_commands()
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
test.run(handle_connect)
def test_unsubscribe_update_commands(test):
def handle_connect(handler):
device_id = test.generate_id('d-u-u-c', test.DEVICE_ENTITY)
device = handler.api.put_device(device_id)
subscription = device.subscribe_update_commands()
subscription.remove()
try:
subscription.remove()
assert False
except SubscriptionError:
pass
device.remove()
test.run(handle_connect)
def test_list_commands(test):
device_hive_api = test.device_hive_api()
server_timestamp = device_hive_api.get_info()['server_timestamp']
test_id = test.generate_id('d-l-c', test.DEVICE_ENTITY)
options = [{'command': '%s-name-1' % test_id, 'lifetime': 100,
'status': '1'},
{'command': '%s-name-2' % test_id, 'lifetime': 100,
'status': '2'}]
device = device_hive_api.put_device(test_id)
for option in options:
device.send_command(option['command'], lifetime=option['lifetime'],
status=option['status'])
commands = device.list_commands()
assert len(commands) == len(options)
commands = device.list_commands(start=server_timestamp)
assert len(commands) == len(options)
assert not device.list_commands(start=server_timestamp,
end=server_timestamp)
command_name = options[0]['command']
command, = device.list_commands(command=command_name)
assert command.command == command_name
status = options[0]['status']
command, = device.list_commands(status=status)
assert command.status == status
command_0, command_1 = device.list_commands(sort_field='command',
sort_order='ASC')
assert command_0.command == options[0]['command']
assert command_1.command == options[1]['command']
command_0, command_1 = device.list_commands(sort_field='command',
sort_order='DESC')
assert command_0.command == options[1]['command']
assert command_1.command == options[0]['command']
command, = device.list_commands(sort_field='command', sort_order='ASC',
take=1)
assert command.command == options[0]['command']
command, = device.list_commands(sort_field='command', sort_order='ASC',
take=1, skip=1)
assert command.command == options[1]['command']
device_1 = device_hive_api.get_device(test_id)
device.remove()
try:
device.list_commands()
assert False
except DeviceError:
pass
try:
device_1.list_commands()
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
def test_send_command(test):
device_hive_api = test.device_hive_api()
device_id = test.generate_id('d-s-c', test.DEVICE_ENTITY)
command_name = test.generate_id('d-s-c')
device = device_hive_api.put_device(device_id)
command = device.send_command(command_name)
assert command.device_id == device_id
assert isinstance(command.id, int)
assert isinstance(command.user_id, int)
assert command.command == command_name
assert not command.parameters
assert not command.lifetime
assert command.timestamp
assert command.last_updated
assert not command.status
assert not command.result
command_name = test.generate_id('d-s-c')
parameters = {'parameters_key': 'parameters_value'}
lifetime = 10
status = 'status'
result = {'result_key': 'result_value'}
command = device.send_command(command_name, parameters=parameters,
lifetime=lifetime, status=status,
result=result)
assert command.device_id == device_id
assert isinstance(command.id, int)
assert isinstance(command.user_id, int)
assert command.command == command_name
assert command.parameters == parameters
assert command.lifetime == lifetime
assert command.timestamp
assert command.last_updated
assert command.status == status
assert command.result == result
device_1 = device_hive_api.get_device(device_id)
device.remove()
try:
device.send_command(command_name)
assert False
except DeviceError:
pass
try:
device_1.send_command(command_name)
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
def test_subscribe_notifications(test):
def init_data(handler):
device_id = test.generate_id('d-s-n', test.DEVICE_ENTITY)
notification_names = ['%s-name-%s' % (device_id, i) for i in range(2)]
device = handler.api.put_device(device_id)
return device, notification_names, []
def send_data(handler, device, notification_names):
for notification_name in notification_names:
notification = device.send_notification(notification_name)
handler.data['notification_ids'].append(notification.id)
def set_handler_data(handler, device, notification_names,
notification_ids):
handler.data['device'] = device
handler.data['notification_names'] = notification_names
handler.data['notification_ids'] = notification_ids
def handle_connect(handler):
device, notification_names, notification_ids = init_data(handler)
set_handler_data(handler, device, notification_names, notification_ids)
send_data(handler, device, notification_names)
handler.data['subscription'] = device.subscribe_notifications()
def handle_notification(handler, notification):
assert notification.id in handler.data['notification_ids']
handler.data['notification_ids'].remove(notification.id)
if handler.data['notification_ids']:
return
handler.data['subscription'].remove()
handler.data['device'].remove()
handler.disconnect()
test.run(handle_connect, handle_notification=handle_notification)
def handle_connect(handler):
device, notification_names, notification_ids = init_data(handler)
notification_name = notification_names[:1]
set_handler_data(handler, device, notification_names, notification_ids)
send_data(handler, device, notification_name)
handler.data['subscription'] = device.subscribe_notifications(
names=notification_name)
def handle_notification(handler, notification):
assert notification.id == handler.data['notification_ids'][0]
handler.data['subscription'].remove()
handler.data['device'].remove()
handler.disconnect()
test.run(handle_connect, handle_notification=handle_notification)
def handle_connect(handler):
device, notification_names, notification_ids = init_data(handler)
device_1 = handler.api.get_device(device.id)
device.remove()
try:
device_1.subscribe_notifications()
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
test.run(handle_connect)
def test_unsubscribe_notifications(test):
def handle_connect(handler):
device_id = test.generate_id('d-u-n', test.DEVICE_ENTITY)
device = handler.api.put_device(device_id)
subscription = device.subscribe_notifications()
subscription.remove()
try:
subscription.remove()
assert False
except SubscriptionError:
pass
device.remove()
test.run(handle_connect)
def list_notifications(device, **params):
notifications = device.list_notifications(**params)
return [notification for notification in notifications
if notification.notification[0] != '$']
def test_list_notifications(test):
device_hive_api = test.device_hive_api()
server_timestamp = device_hive_api.get_info()['server_timestamp']
test_id = test.generate_id('d-l-n', test.DEVICE_ENTITY)
options = [{'notification': '%s-name-1' % test_id,
'parameters': {'parameters_key': '1'}},
{'notification': '%s-name-2' % test_id,
'parameters': {'parameters_key': '2'}}]
device = device_hive_api.put_device(test_id)
for option in options:
device.send_notification(option['notification'],
parameters=option['parameters'])
notifications = list_notifications(device)
assert len(notifications) == len(options)
notifications = list_notifications(device, start=server_timestamp)
assert len(notifications) == len(options)
assert not list_notifications(device, start=server_timestamp,
end=server_timestamp)
notification_name = options[0]['notification']
notification, = list_notifications(device,
notification=notification_name)
assert notification.notification == notification_name
notification_0, notification_1 = list_notifications(
device, sort_field='notification', sort_order='ASC')
assert notification_0.notification == options[0]['notification']
assert notification_1.notification == options[1]['notification']
notification_0, notification_1 = list_notifications(
device, sort_field='notification', sort_order='DESC')
assert notification_0.notification == options[1]['notification']
assert notification_1.notification == options[0]['notification']
notification_name = test_id
notification_0 = device.send_notification(notification_name)
notification_1 = device.send_notification(notification_name)
notification, = device.list_notifications(
notification=notification_name, sort_field='timestamp',
sort_order='ASC', take=1)
assert notification.id == notification_0.id
notification, = device.list_notifications(
notification=notification_name, sort_field='timestamp',
sort_order='ASC', take=1, skip=1)
assert notification.id == notification_1.id
device_1 = device_hive_api.get_device(test_id)
device.remove()
try:
device.list_notifications()
assert False
except DeviceError:
pass
try:
device_1.list_commands()
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
def test_send_notification(test):
device_hive_api = test.device_hive_api()
device_id = test.generate_id('d-s-n', test.DEVICE_ENTITY)
notification_name = test.generate_id('d-s-n')
device = device_hive_api.put_device(device_id)
notification = device.send_notification(notification_name)
assert notification.device_id == device_id
assert isinstance(notification.id, int)
assert notification.notification == notification_name
assert not notification.parameters
assert notification.timestamp
parameters = {'parameters_key': 'parameters_value'}
notification = device.send_notification(notification_name,
parameters=parameters)
assert notification.device_id == device_id
assert isinstance(notification.id, int)
assert notification.notification == notification_name
assert notification.parameters == parameters
assert notification.timestamp
device_1 = device_hive_api.get_device(device_id)
device.remove()
try:
device.send_notification(notification_name)
assert False
except DeviceError:
pass
try:
device_1.send_notification(notification_name)
assert False
except ApiResponseError as api_response_error:
if test.is_user_admin:
assert api_response_error.code == 404
else:
assert api_response_error.code == 403
| 37.854478 | 79 | 0.670774 | 2,352 | 20,290 | 5.534864 | 0.067602 | 0.043094 | 0.025964 | 0.027039 | 0.801429 | 0.74228 | 0.676525 | 0.655093 | 0.630973 | 0.610232 | 0 | 0.008789 | 0.23174 | 20,290 | 535 | 80 | 37.925234 | 0.826341 | 0.030853 | 0 | 0.666667 | 0 | 0 | 0.057967 | 0 | 0 | 0 | 0 | 0 | 0.226667 | 1 | 0.088889 | false | 0.02 | 0.004444 | 0 | 0.108889 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
a0b73b2b8afc0e8920b81429945e0bee043f55fe | 1,731 | py | Python | test/testAbCoastalCellDetector.py | menta78/alphaBetaLab | 8fac6cc5bd640a008bb9c0d85702053bf010e071 | [
"MIT"
] | 3 | 2019-11-18T21:06:40.000Z | 2022-01-28T14:45:00.000Z | test/testAbCoastalCellDetector.py | menta78/alphaBetaLab | 8fac6cc5bd640a008bb9c0d85702053bf010e071 | [
"MIT"
] | 2 | 2020-09-19T14:32:02.000Z | 2022-01-24T12:22:44.000Z | test/testAbCoastalCellDetector.py | menta78/alphaBetaLab | 8fac6cc5bd640a008bb9c0d85702053bf010e071 | [
"MIT"
] | 2 | 2018-11-29T10:36:01.000Z | 2021-06-16T03:29:01.000Z | import unittest
from shapely import geometry as g
from alphaBetaLab import abCoastalCellDetector
class testAbCoastalCellDetector(unittest.TestCase):
def testCellOnLand(self):
dtctr = abCoastalCellDetector.abCoastalCellDetector(None)
cell = g.Polygon([[6, 47], [12, 47], [12, 49], [6, 49]])
cellbnd = cell.boundary
cellsfc = cell.area
self.assertTrue(dtctr.isCoastalCell(cell))
self.assertTrue(dtctr.isCoastalCell(cell, cellbnd))
self.assertTrue(dtctr.isCoastalCell(cell, cellbnd, cellsfc))
def testCellOnSea(self):
dtctr = abCoastalCellDetector.abCoastalCellDetector(None)
cell = g.Polygon([[-40, 47], [-35, 47], [-35, 49], [-40, 49]])
cellbnd = cell.boundary
cellsfc = cell.area
self.assertFalse(dtctr.isCoastalCell(cell))
self.assertFalse(dtctr.isCoastalCell(cell, cellbnd))
self.assertFalse(dtctr.isCoastalCell(cell, cellbnd, cellsfc))
def testCellOnCoast(self):
dtctr = abCoastalCellDetector.abCoastalCellDetector(None)
cell = g.Polygon([[-9.5, 40], [-8, 40], [-8, 41.5], [-9.5, 41.5]])
cellbnd = cell.boundary
cellsfc = cell.area
self.assertTrue(dtctr.isCoastalCell(cell))
self.assertTrue(dtctr.isCoastalCell(cell, cellbnd))
self.assertTrue(dtctr.isCoastalCell(cell, cellbnd, cellsfc))
def testCellOnCoast2(self):
dtctr = abCoastalCellDetector.abCoastalCellDetector(None)
cell = g.Polygon([[-9.5, 40], [-8.83, 40], [-8.83, 41], [-9.5, 41]])
cellbnd = cell.boundary
cellsfc = cell.area
self.assertTrue(dtctr.isCoastalCell(cell))
self.assertTrue(dtctr.isCoastalCell(cell, cellbnd))
self.assertTrue(dtctr.isCoastalCell(cell, cellbnd, cellsfc))
if __name__ == '__main__':
unittest.main()
| 36.829787 | 72 | 0.70364 | 197 | 1,731 | 6.142132 | 0.218274 | 0.178512 | 0.218182 | 0.238017 | 0.781818 | 0.754545 | 0.673554 | 0.673554 | 0.528099 | 0.528099 | 0 | 0.04446 | 0.155402 | 1,731 | 46 | 73 | 37.630435 | 0.783174 | 0 | 0 | 0.552632 | 0 | 0 | 0.004622 | 0 | 0 | 0 | 0 | 0 | 0.315789 | 1 | 0.105263 | false | 0 | 0.078947 | 0 | 0.210526 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
39fe996c390365307afdbce6db8fd7d8367caabe | 510 | py | Python | mlreflect/models/__init__.py | schreiber-lab/mlreflect | 88a80ccac48461cc8934a46041726b70e469c6b8 | [
"MIT"
] | null | null | null | mlreflect/models/__init__.py | schreiber-lab/mlreflect | 88a80ccac48461cc8934a46041726b70e469c6b8 | [
"MIT"
] | null | null | null | mlreflect/models/__init__.py | schreiber-lab/mlreflect | 88a80ccac48461cc8934a46041726b70e469c6b8 | [
"MIT"
] | null | null | null | from pathlib import Path
from . import model_helpers
from . import simple_model
from .trained_model import TrainedModel, DefaultTrainedModel
default_model_path = Path(__file__).parents[1] / Path('resources', 'models', 'default_trained_model_with_absorption.h5')
alternative_model_path = Path(__file__).parents[1] / Path('resources', 'models', 'different_model.h5')
__all__ = ['model_helpers', 'simple_model', 'TrainedModel', 'DefaultTrainedModel', 'default_model_path',
'alternative_model_path']
| 42.5 | 120 | 0.778431 | 60 | 510 | 6.116667 | 0.366667 | 0.098093 | 0.207084 | 0.234332 | 0.47139 | 0.239782 | 0.239782 | 0.239782 | 0.239782 | 0 | 0 | 0.008753 | 0.103922 | 510 | 11 | 121 | 46.363636 | 0.794311 | 0 | 0 | 0 | 0 | 0 | 0.360784 | 0.121569 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
2602becc3d164d95ff23178fab0254f13cf47360 | 4,417 | py | Python | arxpy/smt/tests/test_types.py | ranea/RX-difference-tool | 28b4a42bc0c602956f980a8b0d7d758f4147ff5e | [
"MIT"
] | 25 | 2018-07-11T08:52:56.000Z | 2022-01-02T10:01:00.000Z | arxpy/smt/tests/test_types.py | ranea/RX-difference-tool | 28b4a42bc0c602956f980a8b0d7d758f4147ff5e | [
"MIT"
] | 3 | 2020-12-28T03:49:11.000Z | 2022-01-11T16:47:35.000Z | arxpy/smt/tests/test_types.py | ranea/RX-difference-tool | 28b4a42bc0c602956f980a8b0d7d758f4147ff5e | [
"MIT"
] | 4 | 2018-03-04T06:46:38.000Z | 2020-09-28T01:53:52.000Z | """Tests for the Types module."""
import doctest
import functools
import unittest
from arxpy.bitvector.core import Constant, Variable
from arxpy.bitvector.operation import (
BvNot, BvComp, RotateLeft, RotateRight, Concat, Repeat, ZeroExtend, Ite)
import arxpy.smt.types
from arxpy.smt.types import bv2pysmt as _bv2pysmt
from pysmt import environment
class TestConversion(unittest.TestCase):
"""Tests of the bv2pysmt function."""
def setUp(self):
self.env = environment.reset_env()
def test_bv2pysmt(self):
bv2pysmt = functools.partial(_bv2pysmt, env=self.env)
fm = self.env.formula_manager
tm = self.env.type_manager
bx, by = Variable("x", 8), Variable("y", 8)
b1x, b1y = Variable("x1", 1), Variable("y1", 1)
b6x, b6y = Variable("x6", 6), Variable("y6", 6)
px, py = bv2pysmt(bx), bv2pysmt(by)
p1x, p1y = bv2pysmt(b1x, True), bv2pysmt(b1y, True)
p6x, p6y = bv2pysmt(b6x), bv2pysmt(b6y)
self.assertEqual(bv2pysmt(Constant(0, 8)), fm.BV(0, 8))
self.assertEqual(px, fm.Symbol("x", tm.BVType(8)))
self.assertEqual(p1x, fm.Symbol("x1", tm.BOOL()))
self.assertEqual(bv2pysmt(~bx), fm.BVNot(px))
self.assertEqual(bv2pysmt(~b1x, True), fm.Not(p1x))
self.assertEqual(bv2pysmt(bx & by), fm.BVAnd(px, py))
self.assertEqual(bv2pysmt(b1x & b1y, True), fm.And(p1x, p1y))
self.assertEqual(bv2pysmt(bx | by), fm.BVOr(px, py))
self.assertEqual(bv2pysmt(b1x | b1y, True), fm.Or(p1x, p1y))
self.assertEqual(bv2pysmt(bx ^ by), fm.BVXor(px, py))
self.assertEqual(bv2pysmt(b1x ^ b1y, True), fm.Xor(p1x, p1y))
self.assertEqual(bv2pysmt(BvComp(bx, by)), fm.BVComp(px, py))
self.assertEqual(bv2pysmt(BvComp(bx, by), True), fm.Equals(px, py))
self.assertEqual(bv2pysmt(BvNot(BvComp(bx, by))),
fm.BVNot(fm.BVComp(px, py)))
self.assertEqual(bv2pysmt(BvNot(BvComp(bx, by)), True),
fm.Not(fm.Equals(px, py)))
self.assertEqual(bv2pysmt(bx < by), fm.BVULT(px, py))
self.assertEqual(bv2pysmt(bx <= by), fm.BVULE(px, py))
self.assertEqual(bv2pysmt(bx > by), fm.BVUGT(px, py))
self.assertEqual(bv2pysmt(bx >= by), fm.BVUGE(px, py))
self.assertEqual(bv2pysmt(bx << by), fm.BVLShl(px, py))
self.assertEqual(bv2pysmt(bx >> by), fm.BVLShr(px, py))
self.assertEqual(bv2pysmt(RotateLeft(bx, 1)), fm.BVRol(px, 1))
self.assertEqual(bv2pysmt(RotateRight(bx, 1)), fm.BVRor(px, 1))
def zext(pysmt_type, offset):
# zero_extend reduces to Concat
return fm.BVConcat(fm.BV(0, offset), pysmt_type)
self.assertEqual(bv2pysmt(b6x << b6y, strict_shift=True),
fm.BVExtract(fm.BVLShl(zext(p6x, 2), zext(p6y, 2)), 0, 5))
self.assertEqual(bv2pysmt(RotateRight(b6x, 1), strict_shift=True),
fm.BVConcat(fm.BVExtract(p6x, 0, 0), fm.BVExtract(p6x, 1, 5)))
self.assertEqual(bv2pysmt(bx[4:2]), fm.BVExtract(px, 2, 4))
self.assertEqual(bv2pysmt(Concat(bx, by)), fm.BVConcat(px, py))
self.assertEqual(bv2pysmt(ZeroExtend(bx, 2)), zext(px, 2))
self.assertEqual(bv2pysmt(Repeat(bx, 2)), px.BVRepeat(2))
self.assertEqual(bv2pysmt(-bx), fm.BVNeg(px))
self.assertEqual(bv2pysmt(bx + by), fm.BVAdd(px, py))
# bv_sum reduces to add
self.assertEqual(bv2pysmt(bx - by), fm.BVSub(px, py))
self.assertEqual(bv2pysmt(bx * by), fm.BVMul(px, py))
self.assertEqual(bv2pysmt(bx / by), fm.BVUDiv(px, py))
self.assertEqual(bv2pysmt(bx % by), fm.BVURem(px, py))
# cannot reuse Bool and BV{1} variable with the same name
bxx, byy = Variable("xx", 8), Variable("yy", 8)
b1xx, b1yy, b1zz = Variable("xx1", 1), Variable("yy1", 1), Variable("zz1", 1)
pxx, pyy = bv2pysmt(bxx), bv2pysmt(byy)
p1xx, p1yy, p1zz = bv2pysmt(b1xx, False), bv2pysmt(b1yy, True), bv2pysmt(b1zz, True)
self.assertEqual(bv2pysmt(Ite(b1xx, bxx, byy)), fm.Ite(fm.Equals(p1xx, fm.BV(1, 1)), pxx, pyy))
self.assertEqual(bv2pysmt(Ite(b1xx, b1yy, b1zz), True), fm.Ite(fm.Equals(p1xx, fm.BV(1, 1)), p1yy, p1zz))
def load_tests(loader, tests, ignore):
"""Add doctests."""
tests.addTests(doctest.DocTestSuite(arxpy.smt.types))
return tests
| 44.616162 | 113 | 0.621463 | 609 | 4,417 | 4.486043 | 0.229885 | 0.203148 | 0.294656 | 0.155564 | 0.361274 | 0.293924 | 0.24634 | 0.224744 | 0.09041 | 0 | 0 | 0.044509 | 0.216663 | 4,417 | 98 | 114 | 45.071429 | 0.745087 | 0.041204 | 0 | 0 | 0 | 0 | 0.006166 | 0 | 0 | 0 | 0 | 0 | 0.513889 | 1 | 0.055556 | false | 0 | 0.111111 | 0.013889 | 0.208333 | 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 |
26079cb831c995ef36f89bc926a92b906304cfce | 108 | py | Python | ref/initialtest/read_output.py | dli-invest/zipline-docker | ed5ec66b6151e6eb0b560bca3485af77985fecfd | [
"MIT"
] | null | null | null | ref/initialtest/read_output.py | dli-invest/zipline-docker | ed5ec66b6151e6eb0b560bca3485af77985fecfd | [
"MIT"
] | 1 | 2021-04-19T16:47:10.000Z | 2021-04-19T16:47:10.000Z | ref/initialtest/read_output.py | dli-invest/zipline-docker | ed5ec66b6151e6eb0b560bca3485af77985fecfd | [
"MIT"
] | null | null | null | import pandas as pd
perf = pd.read_pickle('buyapple_out.pickle') # read in perf DataFrame
print(perf.head()) | 36 | 69 | 0.768519 | 18 | 108 | 4.5 | 0.722222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 108 | 3 | 70 | 36 | 0.84375 | 0.203704 | 0 | 0 | 0 | 0 | 0.223529 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.333333 | 0 | 0.333333 | 0.333333 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
264d107d51dff729e7940e558ab0f4d45e9883c4 | 47 | py | Python | extra_apps/__init__.py | super-GY/jtwcspider | 45a6e69b93c79f6e175a0d105f2636e026ecb714 | [
"Apache-2.0"
] | null | null | null | extra_apps/__init__.py | super-GY/jtwcspider | 45a6e69b93c79f6e175a0d105f2636e026ecb714 | [
"Apache-2.0"
] | null | null | null | extra_apps/__init__.py | super-GY/jtwcspider | 45a6e69b93c79f6e175a0d105f2636e026ecb714 | [
"Apache-2.0"
] | null | null | null | # _*_ coding:utf-8 _*_
__author__ = "super.gyk" | 23.5 | 24 | 0.680851 | 6 | 47 | 4 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02439 | 0.12766 | 47 | 2 | 24 | 23.5 | 0.560976 | 0.425532 | 0 | 0 | 0 | 0 | 0.346154 | 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 |
264d71529741f0abf129d5183e888c76a74c88af | 444 | py | Python | tests/test_usgsm2m.py | ashutoshkumarjha/usgsm2m | eb655d4a57e2c0d6f770003e682b6ae0591e632e | [
"MIT"
] | null | null | null | tests/test_usgsm2m.py | ashutoshkumarjha/usgsm2m | eb655d4a57e2c0d6f770003e682b6ae0591e632e | [
"MIT"
] | null | null | null | tests/test_usgsm2m.py | ashutoshkumarjha/usgsm2m | eb655d4a57e2c0d6f770003e682b6ae0591e632e | [
"MIT"
] | null | null | null | """Tests for usgsm2m module."""
import os
import pytest
from usgsm2m.usgsm2m import USGSM2M
from usgsm2m.errors import USGSM2MError
@pytest.fixture(scope="module")
def ee():
return USGSM2M(
os.getenv("USGSM2M_USERNAME"), os.getenv("USGSM2M_PASSWORD")
)
def test_ee_login(ee):
assert ee.logged_in()
def test_ee_login_error():
with pytest.raises(USGSM2MError):
USGSM2MError("bad_username", "bad_password")
| 18.5 | 68 | 0.716216 | 57 | 444 | 5.403509 | 0.473684 | 0.071429 | 0.097403 | 0.090909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02973 | 0.166667 | 444 | 23 | 69 | 19.304348 | 0.802703 | 0.056306 | 0 | 0 | 0 | 0 | 0.150121 | 0 | 0 | 0 | 0 | 0 | 0.071429 | 1 | 0.214286 | false | 0.142857 | 0.285714 | 0.071429 | 0.571429 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
26525da2ef42b0bfd988c84a74bb307737ebff90 | 85,056 | py | Python | pw_tokenizer/py/varint_test_data.py | curtin-space/pigweed | fe2e1743e03fabd2676f01d9de0ac9d34a426076 | [
"Apache-2.0"
] | 86 | 2021-03-09T23:49:40.000Z | 2022-03-30T08:14:51.000Z | pw_tokenizer/py/varint_test_data.py | curtin-space/pigweed | fe2e1743e03fabd2676f01d9de0ac9d34a426076 | [
"Apache-2.0"
] | 4 | 2021-07-27T20:32:03.000Z | 2022-03-08T10:39:07.000Z | pw_tokenizer/py/varint_test_data.py | curtin-space/pigweed | fe2e1743e03fabd2676f01d9de0ac9d34a426076 | [
"Apache-2.0"
] | 22 | 2021-03-11T15:15:47.000Z | 2022-02-09T06:16:36.000Z | # Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
# AUTOGENERATED - DO NOT EDIT
# This file contains test data generated by generate_decoding_test_data.cc.
"""Generated test data."""
# pylint: disable=line-too-long
# C++ test case type for varint_decoding:
# std::tuple<const char*, const char*, const char*, const char*, std::string_view>
def TestCase(*args): # pylint: disable=invalid-name
return tuple(args)
# yapf: disable
TEST_DATA = (
# Important numbers
TestCase("%d", "0", "%u", "0", b'\x00'),
TestCase("%d", "-32768", "%u", "4294934528", b'\xff\xff\x03'),
TestCase("%d", "-32767", "%u", "4294934529", b'\xfd\xff\x03'),
TestCase("%d", "32766", "%u", "32766", b'\xfc\xff\x03'),
TestCase("%d", "32767", "%u", "32767", b'\xfe\xff\x03'),
TestCase("%d", "-2147483648", "%u", "2147483648", b'\xff\xff\xff\xff\x0f'),
TestCase("%d", "-2147483647", "%u", "2147483649", b'\xfd\xff\xff\xff\x0f'),
TestCase("%d", "2147483646", "%u", "2147483646", b'\xfc\xff\xff\xff\x0f'),
TestCase("%d", "2147483647", "%u", "2147483647", b'\xfe\xff\xff\xff\x0f'),
TestCase("%lld", "-9223372036854775808", "%llu", "9223372036854775808", b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
TestCase("%lld", "-9223372036854775807", "%llu", "9223372036854775809", b'\xfd\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
TestCase("%lld", "9223372036854775806", "%llu", "9223372036854775806", b'\xfc\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
TestCase("%lld", "9223372036854775807", "%llu", "9223372036854775807", b'\xfe\xff\xff\xff\xff\xff\xff\xff\xff\x01'),
# Random 64-bit ints
TestCase("%lld", "5922204476835468009", "%llu", "5922204476835468009", b'\xd2\xcb\x8c\x90\x86\xe6\xf2\xaf\xa4\x01'),
TestCase("%lld", "2004795154352895159", "%llu", "2004795154352895159", b'\xee\xd2\x87\xea\xc5\xa4\xbb\xd2\x37'),
TestCase("%lld", "7672492112153174982", "%llu", "7672492112153174982", b'\x8c\x8f\x83\xee\x9c\xbb\x95\xfa\xd4\x01'),
TestCase("%lld", "6325664365257058358", "%llu", "6325664365257058358", b'\xec\xa0\xf3\xb7\xb6\x8e\xa3\xc9\xaf\x01'),
TestCase("%lld", "4553661289274231220", "%llu", "4553661289274231220", b'\xe8\xa6\x9a\xea\x9e\xb4\xed\xb1\x7e'),
TestCase("%lld", "6372308406878241426", "%llu", "6372308406878241426", b'\xa4\x8a\xb4\xf3\xfd\xae\xfe\xee\xb0\x01'),
TestCase("%lld", "7156998241444634343", "%llu", "7156998241444634343", b'\xce\xfb\xb8\xf6\xe5\xfe\xe1\xd2\xc6\x01'),
TestCase("%lld", "1376699938710259787", "%llu", "1376699938710259787", b'\x96\xa1\x84\x92\x9b\xd3\x82\x9b\x26'),
TestCase("%lld", "3051600409971083011", "%llu", "3051600409971083011", b'\x86\x9c\x9a\x8c\xf4\x99\xbb\xd9\x54'),
TestCase("%lld", "6288685020493584850", "%llu", "6288685020493584850", b'\xa4\xe7\xb8\xed\xa1\xed\xf2\xc5\xae\x01'),
TestCase("%lld", "5705831195318701531", "%llu", "5705831195318701531", b'\xb6\xb7\x82\x95\xb9\xcf\x97\xaf\x9e\x01'),
TestCase("%lld", "2504359322455446492", "%llu", "2504359322455446492", b'\xb8\xcf\xa8\xce\x9f\xe2\xa2\xc1\x45'),
TestCase("%lld", "3679108774547190895", "%llu", "3679108774547190895", b'\xde\xd1\xc3\xce\x81\xfc\xe8\x8e\x66'),
TestCase("%lld", "1452704646622358274", "%llu", "1452704646622358274", b'\x84\xac\xe1\x97\xbd\xcb\x85\xa9\x28'),
TestCase("%lld", "1846464682573605487", "%llu", "1846464682573605487", b'\xde\xa9\xd5\xf1\x90\xf6\xfa\x9f\x33'),
TestCase("%lld", "4528166100111793966", "%llu", "4528166100111793966", b'\xdc\xfc\x88\x92\xf5\xc4\xa3\xd7\x7d'),
TestCase("%lld", "8393903718445878140", "%llu", "8393903718445878140", b'\xf8\xad\xe0\x8c\xb1\xbd\x91\xfd\xe8\x01'),
TestCase("%lld", "3957962835363152585", "%llu", "3957962835363152585", b'\x92\x8b\xa6\xc0\xd0\x8e\xc1\xed\x6d'),
TestCase("%lld", "3190545832108956470", "%llu", "3190545832108956470", b'\xec\xec\xa8\xa7\xf6\xa1\x8c\xc7\x58'),
TestCase("%lld", "5105279414768576647", "%llu", "5105279414768576647", b'\x8e\xa2\xa9\xc6\x85\xa5\xcc\xd9\x8d\x01'),
TestCase("%lld", "6049173436098818195", "%llu", "6049173436098818195", b'\xa6\xc2\xb1\xb6\x96\xcc\xfd\xf2\xa7\x01'),
TestCase("%lld", "3892265018717256260", "%llu", "3892265018717256260", b'\x88\xe9\x91\xc5\xb2\x9a\x8d\x84\x6c'),
TestCase("%lld", "6832059613091767623", "%llu", "6832059613091767623", b'\x8e\x95\x85\xaa\xa6\x81\xad\xd0\xbd\x01'),
TestCase("%lld", "810303956798710343", "%llu", "810303956798710343", b'\x8e\x89\xa5\x91\xfa\xc9\xe3\xbe\x16'),
TestCase("%lld", "970283311264054945", "%llu", "970283311264054945", b'\xc2\xfa\x91\xb6\xfc\xe1\x91\xf7\x1a'),
TestCase("%lld", "8832180626190956378", "%llu", "8832180626190956378", b'\xb4\xdd\x97\x83\x82\xdf\x9a\x92\xf5\x01'),
TestCase("%lld", "5816722312163363604", "%llu", "5816722312163363604", b'\xa8\xac\xb0\xd9\xfc\x87\x93\xb9\xa1\x01'),
TestCase("%lld", "4851344105826850048", "%llu", "4851344105826850048", b'\x80\xd4\xf4\xef\xd7\xf0\xb7\xd3\x86\x01'),
TestCase("%lld", "7829421709149921671", "%llu", "7829421709149921671", b'\x8e\x86\xe7\xa9\xff\xe3\xd8\xa7\xd9\x01'),
TestCase("%lld", "3885303859151835407", "%llu", "3885303859151835407", b'\x9e\xc4\x98\x93\xca\xd1\xaf\xeb\x6b'),
TestCase("%lld", "7185454812706950393", "%llu", "7185454812706950393", b'\xf2\xb3\xa6\xd0\x9f\xc5\xee\xb7\xc7\x01'),
TestCase("%lld", "4013414114257689954", "%llu", "4013414114257689954", b'\xc4\xf5\xf2\x8d\xef\xb7\xc1\xb2\x6f'),
TestCase("%lld", "964780727032512252", "%llu", "964780727032512252", b'\xf8\xfb\xd3\x8e\xb5\xbd\xcb\xe3\x1a'),
TestCase("%lld", "4207054084101944455", "%llu", "4207054084101944455", b'\x8e\xd2\x85\x9c\xc9\xd9\xba\xe2\x74'),
TestCase("%lld", "3970605724487453205", "%llu", "3970605724487453205", b'\xaa\xa8\xa8\xf3\xd0\xb7\xb6\x9a\x6e'),
TestCase("%lld", "7289505649862167307", "%llu", "7289505649862167307", b'\x96\xac\xe6\x83\x8c\xb1\xc3\xa9\xca\x01'),
TestCase("%lld", "1556249843733915123", "%llu", "1556249843733915123", b'\xe6\x97\xa3\xd8\x99\xbf\xf4\x98\x2b'),
TestCase("%lld", "646757550612212450", "%llu", "646757550612212450", b'\xc4\xab\xd7\xc0\x99\xa4\xdf\xf9\x11'),
TestCase("%lld", "551608669266414637", "%llu", "551608669266414637", b'\xda\xb0\xb4\xaa\xb0\xca\xda\xa7\x0f'),
TestCase("%lld", "5294527771240555016", "%llu", "5294527771240555016", b'\x90\x88\xdf\xa3\x9a\xbd\xf8\xf9\x92\x01'),
TestCase("%lld", "6427334826534330711", "%llu", "6427334826534330711", b'\xae\x85\x9b\xc1\x94\xbe\xbd\xb2\xb2\x01'),
TestCase("%lld", "4061389961487213535", "%llu", "4061389961487213535", b'\xbe\x8f\xc3\xcc\xdb\xa9\xfa\xdc\x70'),
TestCase("%lld", "6681126070454200740", "%llu", "6681126070454200740", b'\xc8\xa6\xb1\x90\xea\xb0\x90\xb8\xb9\x01'),
TestCase("%lld", "7083829078452288754", "%llu", "7083829078452288754", b'\xe4\xf3\xd9\xeb\xfb\xc0\xe8\xce\xc4\x01'),
TestCase("%lld", "4993075148853633222", "%llu", "4993075148853633222", b'\x8c\x83\x83\x84\x97\xd9\xfb\xca\x8a\x01'),
TestCase("%lld", "4002626457632111277", "%llu", "4002626457632111277", b'\xda\xea\xef\xfb\xcd\xe3\x97\x8c\x6f'),
TestCase("%lld", "6319581401334276901", "%llu", "6319581401334276901", b'\xca\x8c\x8f\xbb\xa9\xf3\xd4\xb3\xaf\x01'),
TestCase("%lld", "3705575452837642392", "%llu", "3705575452837642392", b'\xb0\x82\xdc\xac\xb9\xcf\xec\xec\x66'),
TestCase("%lld", "4291800171892412066", "%llu", "4291800171892412066", b'\xc4\xba\xdc\xc9\x8e\xe1\xc4\x8f\x77'),
TestCase("%lld", "6557245727662973594", "%llu", "6557245727662973594", b'\xb4\x8a\xe5\xe4\xeb\x8f\x82\x80\xb6\x01'),
TestCase("%lld", "3849893339411366329", "%llu", "3849893339411366329", b'\xf2\x86\x8e\xec\x86\xe6\xc8\xed\x6a'),
TestCase("%lld", "5454275499512896944", "%llu", "5454275499512896944", b'\xe0\xf6\xa8\xf9\xe6\xaa\xbd\xb1\x97\x01'),
TestCase("%lld", "5265826841850021261", "%llu", "5265826841850021261", b'\x9a\x96\x80\xd3\x9e\xe7\xfc\x93\x92\x01'),
TestCase("%lld", "9044083069173435164", "%llu", "9044083069173435164", b'\xb8\xac\xa8\x93\xc8\xe8\x84\x83\xfb\x01'),
TestCase("%lld", "7588739275664019217", "%llu", "7588739275664019217", b'\xa2\xbc\x92\xb0\xc2\x8a\xcf\xd0\xd2\x01'),
TestCase("%lld", "5076270483973408909", "%llu", "5076270483973408909", b'\x9a\xa2\xc8\xd0\x84\xc7\xc4\xf2\x8c\x01'),
TestCase("%lld", "4196804979465246477", "%llu", "4196804979465246477", b'\x9a\xdc\xee\x89\x95\xf9\x85\xbe\x74'),
TestCase("%lld", "6514086955327654755", "%llu", "6514086955327654755", b'\xc6\xad\xfc\x84\xd4\xe4\xd7\xe6\xb4\x01'),
TestCase("%lld", "9208944818170478756", "%llu", "9208944818170478756", b'\xc8\x82\xce\xb3\xac\xa1\xdf\xcc\xff\x01'),
TestCase("%lld", "4628058100229254151", "%llu", "4628058100229254151", b'\x8e\xb0\xc5\x80\xcb\x94\x95\xba\x80\x01'),
TestCase("%lld", "5505985599159795437", "%llu", "5505985599159795437", b'\xda\xfb\xaf\x85\xe0\xae\x98\xe9\x98\x01'),
TestCase("%lld", "1076793340331741575", "%llu", "1076793340331741575", b'\x8e\xc6\xd6\xaf\xd0\xf5\xc4\xf1\x1d'),
TestCase("%lld", "8835790874608329711", "%llu", "8835790874608329711", b'\xde\x8f\xd7\xea\x90\xbf\x84\x9f\xf5\x01'),
TestCase("%lld", "5264779051526567427", "%llu", "5264779051526567427", b'\x86\xd8\xc5\xb2\xe8\xa9\xa0\x90\x92\x01'),
TestCase("%lld", "3825505252128459194", "%llu", "3825505252128459194", b'\xf4\xa6\x90\xf8\xc4\xb0\xf6\x96\x6a'),
TestCase("%lld", "6197432947465793532", "%llu", "6197432947465793532", b'\xf8\xbf\x81\x90\xc5\x9b\xda\x81\xac\x01'),
TestCase("%lld", "6345326312201569781", "%llu", "6345326312201569781", b'\xea\x97\xb6\xeb\xae\xaa\x90\x8f\xb0\x01'),
TestCase("%lld", "1939578830432974807", "%llu", "1939578830432974807", b'\xae\xdf\x99\x9d\xf0\xaa\xe2\xea\x35'),
TestCase("%lld", "2091703771056304968", "%llu", "2091703771056304968", b'\x90\xcd\xbf\x92\xeb\xdf\x9c\x87\x3a'),
TestCase("%lld", "4252410814844357301", "%llu", "4252410814844357301", b'\xea\xaa\x9e\x9d\xe3\xc6\xcc\x83\x76'),
TestCase("%lld", "8660402439522563566", "%llu", "8660402439522563566", b'\xdc\xd7\xd9\xba\xc9\x88\xf7\xaf\xf0\x01'),
TestCase("%lld", "4095317955084962012", "%llu", "4095317955084962012", b'\xb8\xa3\xf2\xb1\xee\xfe\xbe\xd5\x71'),
TestCase("%lld", "3854481529221205087", "%llu", "3854481529221205087", b'\xbe\xb1\xc6\xe8\xec\xa1\xef\xfd\x6a'),
TestCase("%lld", "8433702361086030159", "%llu", "8433702361086030159", b'\x9e\xc5\xbf\xde\xa3\xe7\xc3\x8a\xea\x01'),
TestCase("%lld", "9155414173781516949", "%llu", "9155414173781516949", b'\xaa\x8a\x97\xfd\xdf\xab\xc8\x8e\xfe\x01'),
TestCase("%lld", "5127196966915280688", "%llu", "5127196966915280688", b'\xe0\xbc\x90\xa7\xbe\x9e\xbb\xa7\x8e\x01'),
TestCase("%lld", "4492265357832577542", "%llu", "4492265357832577542", b'\x8c\x88\xbb\xa6\xd7\xe2\xdd\xd7\x7c'),
TestCase("%lld", "8259453203008866922", "%llu", "8259453203008866922", b'\xd4\xa9\xf2\xc4\xaf\xbb\xbc\x9f\xe5\x01'),
TestCase("%lld", "5064367472631091289", "%llu", "5064367472631091289", b'\xb2\xc1\xc0\xa3\xcb\xd8\x9f\xc8\x8c\x01'),
TestCase("%lld", "8275937406817640763", "%llu", "8275937406817640763", b'\xf6\x84\xdd\xcb\xa8\xce\x84\xda\xe5\x01'),
TestCase("%lld", "1904310933731893847", "%llu", "1904310933731893847", b'\xae\x89\xdb\xaf\x8d\xad\xbc\xed\x34'),
TestCase("%lld", "997754361730893686", "%llu", "997754361730893686", b'\xec\x9d\x88\x81\xc8\x93\xde\xd8\x1b'),
TestCase("%lld", "4328168087819780921", "%llu", "4328168087819780921", b'\xf2\x8c\xf0\xaa\xb7\xfc\xde\x90\x78'),
TestCase("%lld", "256781249510239018", "%llu", "256781249510239018", b'\xd4\xac\xcf\xa0\xf3\xcb\xa2\x90\x07'),
TestCase("%lld", "7784993871819474513", "%llu", "7784993871819474513", b'\xa2\x99\xa4\xc6\xc0\xab\xed\x89\xd8\x01'),
TestCase("%lld", "2332871340892345868", "%llu", "2332871340892345868", b'\x98\xd8\x9e\xc9\xfb\x87\x83\xe0\x40'),
TestCase("%lld", "4894959346005630664", "%llu", "4894959346005630664", b'\x90\xfb\xa6\x8a\xe6\xe5\xb1\xee\x87\x01'),
TestCase("%lld", "1987972021100915124", "%llu", "1987972021100915124", b'\xe8\xa6\x95\xd2\xa7\x81\xd9\x96\x37'),
TestCase("%lld", "3114100465793448092", "%llu", "3114100465793448092", b'\xb8\xe2\xf9\xa7\xfb\xf7\xc0\xb7\x56'),
TestCase("%lld", "5784824274936856659", "%llu", "5784824274936856659", b'\xa6\x81\xd8\xba\xeb\xc1\xe9\xc7\xa0\x01'),
TestCase("%lld", "3207654208325833422", "%llu", "3207654208325833422", b'\x9c\xcb\xe2\x98\xbe\xa0\xf0\x83\x59'),
TestCase("%lld", "1164916386415315063", "%llu", "1164916386415315063", b'\xee\xa1\x88\xd5\x81\xd2\xce\xaa\x20'),
TestCase("%lld", "293049028994436992", "%llu", "293049028994436992", b'\x80\xbe\xe4\xaf\xc1\xa2\x8f\x91\x08'),
TestCase("%lld", "3140932642079254647", "%llu", "3140932642079254647", b'\xee\xa1\x81\xa9\x97\xe6\xea\x96\x57'),
TestCase("%lld", "1847278515897189565", "%llu", "1847278515897189565", b'\xfa\x92\x9a\xd4\xbb\x81\xed\xa2\x33'),
TestCase("%lld", "7940449326902609449", "%llu", "7940449326902609449", b'\xd2\x98\xa8\xf0\xf5\xa5\x92\xb2\xdc\x01'),
TestCase("%lld", "4324626723061920101", "%llu", "4324626723061920101", b'\xca\xc5\xa3\xe4\xef\xc5\x94\x84\x78'),
TestCase("%lld", "5240496025593009868", "%llu", "5240496025593009868", b'\x98\xdb\x8a\xc5\xd6\xd7\xfd\xb9\x91\x01'),
TestCase("%lld", "483285195300941883", "%llu", "483285195300941883", b'\xf6\xc0\xf1\xf1\xe2\xd4\xfc\xb4\x0d'),
TestCase("%lld", "5038839083535780307", "%llu", "5038839083535780307", b'\xa6\xa7\x8a\xe8\xe2\xdc\xc6\xed\x8b\x01'),
TestCase("%lld", "3649778670280906901", "%llu", "3649778670280906901", b'\xaa\xe2\xa0\xee\x9f\x97\xcf\xa6\x65'),
TestCase("%lld", "3630797309549363234", "%llu", "3630797309549363234", b'\xc4\x80\x92\xf2\xd1\xba\x97\xe3\x64'),
TestCase("%lld", "8062002663843236945", "%llu", "8062002663843236945", b'\xa2\xb1\x88\xca\xab\xad\xfe\xe1\xdf\x01'),
TestCase("%lld", "3467724524658884800", "%llu", "3467724524658884800", b'\x80\x83\xa0\xf3\xa2\xc5\xea\x9f\x60'),
TestCase("%lld", "5254956975956143854", "%llu", "5254956975956143854", b'\xdc\xbb\x9d\xdd\xe2\xe1\xad\xed\x91\x01'),
TestCase("%lld", "7712429266319135356", "%llu", "7712429266319135356", b'\xf8\xc9\xba\xe4\xc6\xe3\x86\x88\xd6\x01'),
TestCase("%lld", "5229125731492990833", "%llu", "5229125731492990833", b'\xe2\xbd\xf4\xf7\xb9\x89\xcb\x91\x91\x01'),
TestCase("%lld", "3291981441856444913", "%llu", "3291981441856444913", b'\xe2\xe7\xc0\x90\xc0\xeb\xbb\xaf\x5b'),
TestCase("%lld", "7968602228742132523", "%llu", "7968602228742132523", b'\xd6\xcc\xfc\x88\xbe\xe0\x94\x96\xdd\x01'),
TestCase("%lld", "4919847686728209916", "%llu", "4919847686728209916", b'\xf8\xd7\xb2\xc7\xf2\xd9\xe7\xc6\x88\x01'),
TestCase("%lld", "3071319170242969136", "%llu", "3071319170242969136", b'\xe0\xf8\xef\xe2\xe8\xa0\xc2\x9f\x55'),
TestCase("%lld", "6001314382948090489", "%llu", "6001314382948090489", b'\xf2\x89\x82\xd1\xd1\xe8\xf9\xc8\xa6\x01'),
TestCase("%lld", "5477548339997458345", "%llu", "5477548339997458345", b'\xd2\xfe\xa1\xd9\xb4\xcc\x94\x84\x98\x01'),
TestCase("%lld", "3119268858057174477", "%llu", "3119268858057174477", b'\x9a\xb7\xfd\xb6\xfe\x9f\xef\xc9\x56'),
TestCase("%lld", "2972175343159318480", "%llu", "2972175343159318480", b'\xa0\xdf\xfc\xb2\xc6\xee\xa4\xbf\x52'),
TestCase("%lld", "3141952960809904282", "%llu", "3141952960809904282", b'\xb4\xa2\xfd\xa0\xc6\xe4\xba\x9a\x57'),
TestCase("%lld", "7404358508754117308", "%llu", "7404358508754117308", b'\xf8\x8a\xf1\xfe\xad\xb5\xc8\xc1\xcd\x01'),
TestCase("%lld", "3962329461475475834", "%llu", "3962329461475475834", b'\xf4\x85\xfc\xa4\xdc\xe9\x82\xfd\x6d'),
TestCase("%lld", "8646072927884668865", "%llu", "8646072927884668865", b'\x82\xbf\xff\x8a\x9c\xe1\x82\xfd\xef\x01'),
TestCase("%lld", "6705183005166907218", "%llu", "6705183005166907218", b'\xa4\xbd\xad\x8f\xdd\x9a\xcc\x8d\xba\x01'),
TestCase("%lld", "8724568879186548965", "%llu", "8724568879186548965", b'\xca\xe3\xbc\xe5\xf7\xca\xf2\x93\xf2\x01'),
TestCase("%lld", "5275577307833715720", "%llu", "5275577307833715720", b'\x90\xb0\xd2\xa8\x87\xe7\xce\xb6\x92\x01'),
TestCase("%lld", "6278774444907314544", "%llu", "6278774444907314544", b'\xe0\xf5\x81\xd8\xeb\x85\xd8\xa2\xae\x01'),
TestCase("%lld", "4999233507689781945", "%llu", "4999233507689781945", b'\xf2\xea\xa2\xf1\xeb\x98\xec\xe0\x8a\x01'),
TestCase("%lld", "4257240410533938703", "%llu", "4257240410533938703", b'\x9e\x98\x82\x95\x9f\xe6\xe0\x94\x76'),
TestCase("%lld", "2788213596089450528", "%llu", "2788213596089450528", b'\xc0\x80\x9c\x8d\xc7\xdf\xdc\xb1\x4d'),
TestCase("%lld", "7141567845119971606", "%llu", "7141567845119971606", b'\xac\xc4\xd2\xbb\xc2\x87\xf9\x9b\xc6\x01'),
TestCase("%lld", "1507235571856201971", "%llu", "1507235571856201971", b'\xe6\xe3\x92\xd5\x8a\xb1\xe3\xea\x29'),
TestCase("%lld", "2967582888677845820", "%llu", "2967582888677845820", b'\xf8\xac\xdd\x92\xc2\xba\xfc\xae\x52'),
TestCase("%lld", "8120818212305491728", "%llu", "8120818212305491728", b'\xa0\xdc\xee\xdf\xeb\xc8\xf8\xb2\xe1\x01'),
TestCase("%lld", "8554950908976020523", "%llu", "8554950908976020523", b'\xd6\xf0\xdd\x86\xd2\xa1\xa5\xb9\xed\x01'),
TestCase("%lld", "850107129610567275", "%llu", "850107129610567275", b'\xd6\xf9\xb7\x97\xc5\xfb\x97\xcc\x17'),
TestCase("%lld", "3548380829014863866", "%llu", "3548380829014863866", b'\xf4\xbf\xe5\x93\x8b\xe4\xb0\xbe\x62'),
TestCase("%lld", "3619717899166040237", "%llu", "3619717899166040237", b'\xda\x82\xd2\xee\x89\x90\xe9\xbb\x64'),
TestCase("%lld", "25117409533303638", "%llu", "25117409533303638", b'\xac\xed\xc8\x8e\xd4\x89\x9e\x59'),
TestCase("%lld", "4766478454387430761", "%llu", "4766478454387430761", b'\xd2\xd5\x86\xf5\xcf\xb9\xf7\xa5\x84\x01'),
TestCase("%lld", "4030046377721652704", "%llu", "4030046377721652704", b'\xc0\x97\x97\xc7\x82\xf5\xcc\xed\x6f'),
TestCase("%lld", "7278057998974406311", "%llu", "7278057998974406311", b'\xce\xba\xfa\xb8\x8e\xcc\xed\x80\xca\x01'),
TestCase("%lld", "8751771536062737093", "%llu", "8751771536062737093", b'\x8a\xab\xa7\xa6\xfb\xf5\xc4\xf4\xf2\x01'),
TestCase("%lld", "3273441488341945355", "%llu", "3273441488341945355", b'\x96\xb0\xae\x9a\x96\xec\xcc\xed\x5a'),
TestCase("%lld", "5220278114967040707", "%llu", "5220278114967040707", b'\x86\xcb\xd9\xf5\xb1\xd2\x93\xf2\x90\x01'),
TestCase("%lld", "1352148195246416250", "%llu", "1352148195246416250", b'\xf4\x85\xc9\xd5\xd3\xe7\xe5\xc3\x25'),
TestCase("%lld", "5133499936442391273", "%llu", "5133499936442391273", b'\xd2\xeb\x9c\xe2\xcc\xbf\xed\xbd\x8e\x01'),
TestCase("%lld", "1676322249364352341", "%llu", "1676322249364352341", b'\xaa\xb5\x91\xa7\x89\x8d\xbf\xc3\x2e'),
TestCase("%lld", "5174306005887408729", "%llu", "5174306005887408729", b'\xb2\xe9\xb6\x81\xba\xf9\xe9\xce\x8f\x01'),
TestCase("%lld", "2333671424671038513", "%llu", "2333671424671038513", b'\xe2\xf0\xf9\x9f\xfc\xf2\xee\xe2\x40'),
TestCase("%lld", "6396005668587144321", "%llu", "6396005668587144321", b'\x82\x92\xac\x98\x94\xd1\x96\xc3\xb1\x01'),
TestCase("%lld", "4281900075145433102", "%llu", "4281900075145433102", b'\x9c\xc0\x98\xec\xd1\xdb\xae\xec\x76'),
TestCase("%lld", "8097189911969434437", "%llu", "8097189911969434437", b'\x8a\xad\x84\xdd\xdf\xd4\xff\xde\xe0\x01'),
TestCase("%lld", "1034989118514460270", "%llu", "1034989118514460270", b'\xdc\xd9\x97\xb7\xd4\xc7\x82\xdd\x1c'),
TestCase("%lld", "2879184457747193418", "%llu", "2879184457747193418", b'\x94\xf9\xc6\xed\xcf\xc0\xf5\xf4\x4f'),
TestCase("%lld", "2474224803315291647", "%llu", "2474224803315291647", b'\xfe\xd7\x8c\x81\xb0\x96\x9b\xd6\x44'),
TestCase("%lld", "3663174277129677254", "%llu", "3663174277129677254", b'\x8c\xa7\xcd\xaa\x98\xe6\x9a\xd6\x65'),
TestCase("%lld", "6086297047179889204", "%llu", "6086297047179889204", b'\xe8\xa8\xd4\xea\xde\xba\xef\xf6\xa8\x01'),
TestCase("%lld", "3403521624041286389", "%llu", "3403521624041286389", b'\xea\xab\xbb\xa5\xcd\xb8\xde\xbb\x5e'),
TestCase("%lld", "4129732865765686804", "%llu", "4129732865765686804", b'\xa8\xf8\xc1\x93\xa8\x8a\xe1\xcf\x72'),
TestCase("%lld", "8456228405596121943", "%llu", "8456228405596121943", b'\xae\xad\xff\xf1\xd1\xbb\xc7\xda\xea\x01'),
TestCase("%lld", "8297459921109698914", "%llu", "8297459921109698914", b'\xc4\xa5\xc6\xfc\xc3\xf5\xbf\xa6\xe6\x01'),
TestCase("%lld", "2758981765762549667", "%llu", "2758981765762549667", b'\xc6\x9e\xf4\xa0\x8b\xd3\xef\xc9\x4c'),
TestCase("%lld", "8848352886883606505", "%llu", "8848352886883606505", b'\xd2\xff\xfe\xdf\xbd\x84\xd5\xcb\xf5\x01'),
TestCase("%lld", "1195805645371054808", "%llu", "1195805645371054808", b'\xb0\xeb\xfc\x8b\xc3\xb9\xad\x98\x21'),
TestCase("%lld", "639367729021931858", "%llu", "639367729021931858", b'\xa4\xc5\x9a\x93\xfc\xe3\xbe\xdf\x11'),
TestCase("%lld", "2232000679497729109", "%llu", "2232000679497729109", b'\xaa\x91\xa4\xfe\xda\xb2\xd4\xf9\x3d'),
TestCase("%lld", "4168177859746898377", "%llu", "4168177859746898377", b'\x92\x87\xe5\xad\xbe\xeb\xab\xd8\x73'),
TestCase("%lld", "1260186573202255124", "%llu", "1260186573202255124", b'\xa8\xb4\xff\xe6\xde\xc0\x8a\xfd\x22'),
TestCase("%lld", "8933020158994285890", "%llu", "8933020158994285890", b'\x84\x95\x90\xc4\xac\xa0\xbb\xf8\xf7\x01'),
TestCase("%lld", "7418694076181766474", "%llu", "7418694076181766474", b'\x94\x85\xdf\xc1\x9a\xbd\xbf\xf4\xcd\x01'),
TestCase("%lld", "2904831533300168615", "%llu", "2904831533300168615", b'\xce\xde\xad\xab\xf3\xb8\x84\xd0\x50'),
TestCase("%lld", "7673041265242461202", "%llu", "7673041265242461202", b'\xa4\xd0\x86\x9b\x92\x98\x8f\xfc\xd4\x01'),
TestCase("%lld", "625118648746706096", "%llu", "625118648746706096", b'\xe0\x92\xa8\x90\xab\x86\xef\xac\x11'),
TestCase("%lld", "7640289034141395187", "%llu", "7640289034141395187", b'\xe6\xa3\xfb\xd4\xb0\x99\xe1\x87\xd4\x01'),
TestCase("%lld", "3317249430279903162", "%llu", "3317249430279903162", b'\xf4\xde\x9a\xb3\x80\xb2\x9e\x89\x5c'),
TestCase("%lld", "3172349440293538054", "%llu", "3172349440293538054", b'\x8c\xa4\xd8\xc1\xc2\xc0\xb9\x86\x58'),
TestCase("%lld", "2529759202900350655", "%llu", "2529759202900350655", b'\xfe\xda\xb4\x82\xf0\xa5\xc1\x9b\x46'),
TestCase("%lld", "7039166187898074754", "%llu", "7039166187898074754", b'\x84\xda\xd7\x89\xca\x96\x92\xb0\xc3\x01'),
TestCase("%lld", "4162847733300040370", "%llu", "4162847733300040370", b'\xe4\xca\x9c\xd6\xa5\xfd\xb3\xc5\x73'),
TestCase("%lld", "2754081621805980671", "%llu", "2754081621805980671", b'\xfe\xef\xea\xe2\x95\xa9\xbb\xb8\x4c'),
TestCase("%lld", "8048952107112912959", "%llu", "8048952107112912959", b'\xfe\xe0\xc6\xe9\xfa\xd2\xcf\xb3\xdf\x01'),
TestCase("%lld", "6063152674026149391", "%llu", "6063152674026149391", b'\x9e\xd8\xce\xa4\xf5\xce\xd2\xa4\xa8\x01'),
TestCase("%lld", "1860779983819210237", "%llu", "1860779983819210237", b'\xfa\xf7\x9b\xcb\xaa\xe2\xe8\xd2\x33'),
TestCase("%lld", "5403475014208127092", "%llu", "5403475014208127092", b'\xe8\x81\x98\xe9\xb0\xf9\xff\xfc\x95\x01'),
TestCase("%lld", "133586295505940516", "%llu", "133586295505940516", b'\xc8\xc0\xef\xa7\xe5\x81\xcc\xda\x03'),
TestCase("%lld", "5951209029639904448", "%llu", "5951209029639904448", b'\x80\xf3\xc4\xbc\x9c\xc5\xf8\x96\xa5\x01'),
TestCase("%lld", "476590412526583632", "%llu", "476590412526583632", b'\xa0\xfd\x87\xa0\x90\x9d\x98\x9d\x0d'),
TestCase("%lld", "6125277199963519765", "%llu", "6125277199963519765", b'\xaa\xec\xff\xe9\xa0\xca\xad\x81\xaa\x01'),
TestCase("%lld", "7182329075191030773", "%llu", "7182329075191030773", b'\xea\x8f\xc5\xab\xb0\x8f\xe1\xac\xc7\x01'),
TestCase("%lld", "3739073677431428339", "%llu", "3739073677431428339", b'\xe6\xd3\x82\xc5\xdf\xec\xed\xe3\x67'),
TestCase("%lld", "6781911602451840052", "%llu", "6781911602451840052", b'\xe8\xf0\xef\xa3\xf3\xaa\x98\x9e\xbc\x01'),
TestCase("%lld", "5097852782557067317", "%llu", "5097852782557067317", b'\xea\xe0\xe7\xd8\x93\x86\x9b\xbf\x8d\x01'),
TestCase("%lld", "2755779697069684711", "%llu", "2755779697069684711", b'\xce\xdf\x93\xb1\x94\xc2\xbf\xbe\x4c'),
TestCase("%lld", "4587140119625129692", "%llu", "4587140119625129692", b'\xb8\xfb\x96\xd3\xd2\xe8\xe5\xa8\x7f'),
TestCase("%lld", "7605101363071432517", "%llu", "7605101363071432517", b'\x8a\xdd\xb1\xab\xad\xd9\xdf\x8a\xd3\x01'),
TestCase("%lld", "785644280652604147", "%llu", "785644280652604147", b'\xe6\x8b\xed\xc1\xf1\xd3\x95\xe7\x15'),
TestCase("%lld", "8440954818933111077", "%llu", "8440954818933111077", b'\xca\xe4\x89\xba\xf1\xeb\xa5\xa4\xea\x01'),
TestCase("%lld", "3478923299848040400", "%llu", "3478923299848040400", b'\xa0\xbf\xad\x84\xe4\x93\xcf\xc7\x60'),
TestCase("%lld", "177390365453428882", "%llu", "177390365453428882", b'\xa4\xa2\xed\xf6\x9e\xe6\x9b\xf6\x04'),
TestCase("%lld", "2241679290640917987", "%llu", "2241679290640917987", b'\xc6\x97\x83\xb0\x83\xdc\x85\x9c\x3e'),
TestCase("%lld", "2690515256289614444", "%llu", "2690515256289614444", b'\xd8\xe9\xca\x9e\xdc\xd7\xd0\xd6\x4a'),
TestCase("%lld", "5284047940288483819", "%llu", "5284047940288483819", b'\xd6\xc7\xbc\x90\xe1\xe6\xda\xd4\x92\x01'),
TestCase("%lld", "7345613454774364586", "%llu", "7345613454774364586", b'\xd4\xa6\xbf\xd2\x96\xa1\xee\xf0\xcb\x01'),
TestCase("%lld", "7027616933390126935", "%llu", "7027616933390126935", b'\xae\xbd\xe8\xc3\xbe\x97\x8e\x87\xc3\x01'),
TestCase("%lld", "6370586723714568954", "%llu", "6370586723714568954", b'\xf4\xcb\x9c\xdd\xea\xb7\xef\xe8\xb0\x01'),
TestCase("%lld", "5815295050302678849", "%llu", "5815295050302678849", b'\x82\x9d\x87\x96\xb3\x82\x8a\xb4\xa1\x01'),
TestCase("%lld", "731720363738568228", "%llu", "731720363738568228", b'\xc8\xd8\xf4\xb8\xe8\xf2\xcb\xa7\x14'),
TestCase("%lld", "7895064303389261530", "%llu", "7895064303389261530", b'\xb4\xfb\x91\xa6\xee\xc9\xf3\x90\xdb\x01'),
TestCase("%lld", "9161537274294991160", "%llu", "9161537274294991160", b'\xf0\xe4\xd3\xed\x8d\xe7\xa8\xa4\xfe\x01'),
TestCase("%lld", "5626051873332343381", "%llu", "5626051873332343381", b'\xaa\xc9\xa9\xde\xdc\x97\xe0\x93\x9c\x01'),
TestCase("%lld", "1558715097695343451", "%llu", "1558715097695343451", b'\xb6\xcd\xda\x82\xef\xc7\xd5\xa1\x2b'),
TestCase("%lld", "418389641884993571", "%llu", "418389641884993571", b'\xc6\xa0\x90\xe4\xb3\xca\xb5\xce\x0b'),
TestCase("%lld", "366808135709449019", "%llu", "366808135709449019", b'\xf6\xec\xfa\xda\xca\x83\x95\x97\x0a'),
TestCase("%lld", "7559429297343079575", "%llu", "7559429297343079575", b'\xae\x92\x85\xcd\x9e\xb9\xbe\xe8\xd1\x01'),
TestCase("%lld", "891656539731055874", "%llu", "891656539731055874", b'\x84\xd4\x96\x85\xc2\xb9\xe6\xdf\x18'),
TestCase("%lld", "3187530423573642791", "%llu", "3187530423573642791", b'\xce\xf8\xdb\xfd\x85\x82\xb1\xbc\x58'),
TestCase("%lld", "3732114429930137548", "%llu", "3732114429930137548", b'\x98\x9f\xc3\x91\x9d\x93\x91\xcb\x67'),
TestCase("%lld", "4317425874089886561", "%llu", "4317425874089886561", b'\xc2\x8d\xaa\x93\xa6\xfd\xc9\xea\x77'),
TestCase("%lld", "8113837181842537067", "%llu", "8113837181842537067", b'\xd6\xe9\xa5\xd1\xb1\xfb\x91\x9a\xe1\x01'),
TestCase("%lld", "4647576880061632962", "%llu", "4647576880061632962", b'\x84\xc7\xa2\xa6\x8d\xa3\xc1\xff\x80\x01'),
TestCase("%lld", "2770024080011047550", "%llu", "2770024080011047550", b'\xfc\xc9\xb1\xc5\xaf\x8e\x8d\xf1\x4c'),
TestCase("%lld", "5715833275239865339", "%llu", "5715833275239865339", b'\xf6\xef\xbc\xe0\x8f\x85\xdc\xd2\x9e\x01'),
TestCase("%lld", "4697198541546045125", "%llu", "4697198541546045125", b'\x8a\xfb\xad\xc5\xf9\xcb\xe6\xaf\x82\x01'),
TestCase("%lld", "9140962295727161515", "%llu", "9140962295727161515", b'\xd6\x82\xf4\xe0\xdd\xb1\x9c\xdb\xfd\x01'),
TestCase("%lld", "1018100739973888361", "%llu", "1018100739973888361", b'\xd2\xe5\xa5\xfb\xd2\xce\x82\xa1\x1c'),
TestCase("%lld", "2450943428072886064", "%llu", "2450943428072886064", b'\xe0\xbc\xe6\xad\xfd\x83\xc0\x83\x44'),
TestCase("%lld", "4859753067646279323", "%llu", "4859753067646279323", b'\xb6\xfa\xde\xd2\xd7\xea\xa7\xf1\x86\x01'),
TestCase("%lld", "2904532547632894569", "%llu", "2904532547632894569", b'\xd2\xc9\xc0\xc3\xd2\xbd\xfc\xce\x50'),
TestCase("%lld", "549670438443165922", "%llu", "549670438443165922", b'\xc4\xa3\x81\xaf\xbf\x96\xe9\xa0\x0f'),
TestCase("%lld", "569815776002665926", "%llu", "569815776002665926", b'\x8c\xb7\xeb\xc0\xbc\x9b\xb2\xe8\x0f'),
TestCase("%lld", "3444356383434812300", "%llu", "3444356383434812300", b'\x98\xae\xd9\xa7\xb7\xf8\xe7\xcc\x5f'),
TestCase("%lld", "2151972984861854191", "%llu", "2151972984861854191", b'\xde\xa7\xec\x8e\xe6\x81\xac\xdd\x3b'),
TestCase("%lld", "2011546512680833085", "%llu", "2011546512680833085", b'\xfa\xc0\xa2\x98\xa9\xb9\xb9\xea\x37'),
TestCase("%lld", "4628394148228357534", "%llu", "4628394148228357534", b'\xbc\xf6\xae\xda\x93\xfd\xad\xbb\x80\x01'),
TestCase("%lld", "4692262078416922470", "%llu", "4692262078416922470", b'\xcc\x9d\x9d\x91\xfd\xdf\xa1\x9e\x82\x01'),
TestCase("%lld", "7858502056959645817", "%llu", "7858502056959645817", b'\xf2\xe1\x8c\xbc\x82\xff\x80\x8f\xda\x01'),
TestCase("%lld", "4919691286333696629", "%llu", "4919691286333696629", b'\xea\xa9\x89\xe8\x98\xca\xa0\xc6\x88\x01'),
TestCase("%lld", "5678520073874798535", "%llu", "5678520073874798535", b'\x8e\xdf\xdb\xd3\xf9\xfa\x93\xce\x9d\x01'),
TestCase("%lld", "1241746909443220722", "%llu", "1241746909443220722", b'\xe4\x93\xeb\xe4\x85\x8f\xc9\xbb\x22'),
TestCase("%lld", "5292137023426454572", "%llu", "5292137023426454572", b'\xd8\x90\xb7\x80\xaf\xa5\xb9\xf1\x92\x01'),
TestCase("%lld", "1941514050836526867", "%llu", "1941514050836526867", b'\xa6\xdc\xd3\xe8\xc3\xaf\xd2\xf1\x35'),
TestCase("%lld", "9145606885382902500", "%llu", "9145606885382902500", b'\xc8\xcb\xea\xa9\xb7\xc0\xdc\xeb\xfd\x01'),
TestCase("%lld", "3509957387132194637", "%llu", "3509957387132194637", b'\x9a\xbd\xae\xcc\xb4\xe9\xef\xb5\x61'),
TestCase("%lld", "8233948220616670992", "%llu", "8233948220616670992", b'\xa0\xfc\x87\xcd\x80\x92\xee\xc4\xe4\x01'),
TestCase("%lld", "8024983545482782384", "%llu", "8024983545482782384", b'\xe0\x9a\xd9\xcd\x86\x81\xbc\xde\xde\x01'),
TestCase("%lld", "6571000011597423770", "%llu", "6571000011597423770", b'\xb4\x92\xd1\xe5\xc4\xec\xf0\xb0\xb6\x01'),
TestCase("%lld", "5058360797369425151", "%llu", "5058360797369425151", b'\xfe\xf3\xba\x8f\x89\x96\xf4\xb2\x8c\x01'),
TestCase("%lld", "4606483085449113835", "%llu", "4606483085449113835", b'\xd6\xc3\xd1\xc0\xb8\xfd\xc1\xed\x7f'),
TestCase("%lld", "6529118911438932678", "%llu", "6529118911438932678", b'\x8c\xab\xd2\xc9\xd4\xc3\x8b\x9c\xb5\x01'),
TestCase("%lld", "4203154114144238442", "%llu", "4203154114144238442", b'\xd4\xed\xcf\xdc\xb8\x99\xcd\xd4\x74'),
TestCase("%lld", "4463425652718897265", "%llu", "4463425652718897265", b'\xe2\xa1\xe8\xfa\xf3\xfe\xa2\xf1\x7b'),
TestCase("%lld", "75152304545876858", "%llu", "75152304545876858", b'\xf4\xad\x92\x88\xee\xa7\xff\x8a\x02'),
TestCase("%lld", "5434900075521908661", "%llu", "5434900075521908661", b'\xea\xfe\xd0\xf3\xd8\xb4\xd2\xec\x96\x01'),
TestCase("%lld", "5308383100912368033", "%llu", "5308383100912368033", b'\xc2\xe6\x8b\xd9\xc4\x93\x95\xab\x93\x01'),
TestCase("%lld", "715267470600062067", "%llu", "715267470600062067", b'\xe6\x91\x92\x88\xb2\xfe\x91\xed\x13'),
TestCase("%lld", "5171700275229723650", "%llu", "5171700275229723650", b'\x84\xb0\xdc\xdd\xfb\xff\xc8\xc5\x8f\x01'),
TestCase("%lld", "3926011308434788247", "%llu", "3926011308434788247", b'\xae\xbe\xe0\xf6\xfd\x9e\xff\xfb\x6c'),
TestCase("%lld", "5440336360732713747", "%llu", "5440336360732713747", b'\xa6\x8c\xeb\x81\x92\xc6\xfa\xff\x96\x01'),
TestCase("%lld", "1478056893002169192", "%llu", "1478056893002169192", b'\xd0\xed\xb1\x93\xb8\xba\x8e\x83\x29'),
TestCase("%lld", "3160377536621687761", "%llu", "3160377536621687761", b'\xa2\xcf\xad\xa7\x81\xa8\xf5\xdb\x57'),
TestCase("%lld", "7128491551588143718", "%llu", "7128491551588143718", b'\xcc\xc9\xc6\xcc\x87\xd3\xbe\xed\xc5\x01'),
TestCase("%lld", "7376169372313052441", "%llu", "7376169372313052441", b'\xb2\x94\xaf\xfd\xd4\xbd\xb5\xdd\xcc\x01'),
TestCase("%lld", "193231861624509923", "%llu", "193231861624509923", b'\xc6\xd7\xd4\xf6\xd6\xd6\xbf\xae\x05'),
TestCase("%lld", "1955429981000213095", "%llu", "1955429981000213095", b'\xce\x89\xd5\x8a\xa3\xcd\x8a\xa3\x36'),
TestCase("%lld", "4888125773563526975", "%llu", "4888125773563526975", b'\xfe\xfc\xfb\xea\xc3\x9f\x8e\xd6\x87\x01'),
TestCase("%lld", "5921662978695331131", "%llu", "5921662978695331131", b'\xf6\xf4\xbb\xcb\xda\xc6\xfc\xad\xa4\x01'),
TestCase("%lld", "7673779374634366645", "%llu", "7673779374634366645", b'\xea\xda\xe7\xdc\xe1\xeb\xde\xfe\xd4\x01'),
TestCase("%lld", "48609148367913892", "%llu", "48609148367913892", b'\xc8\x8e\xee\xd4\xe9\xf0\xd8\xac\x01'),
TestCase("%lld", "5854341954344571365", "%llu", "5854341954344571365", b'\xca\xc7\xfe\xe5\xac\xbf\xe6\xbe\xa2\x01'),
TestCase("%lld", "4673618806014082273", "%llu", "4673618806014082273", b'\xc2\xf3\xef\xc0\xd9\xe2\x83\xdc\x81\x01'),
TestCase("%lld", "2326184191199164007", "%llu", "2326184191199164007", b'\xce\xd9\xf1\xe8\xcf\x8c\xa2\xc8\x40'),
TestCase("%lld", "3495015264127128735", "%llu", "3495015264127128735", b'\xbe\xd2\xec\xed\xb0\xf7\xe4\x80\x61'),
TestCase("%lld", "1424330851786829530", "%llu", "1424330851786829530", b'\xb4\xbb\x91\xf6\x9f\xd7\x9e\xc4\x27'),
TestCase("%lld", "5191701707746974065", "%llu", "5191701707746974065", b'\xe2\xe5\xe0\xe0\xc8\xcc\xd0\x8c\x90\x01'),
TestCase("%lld", "6389735809259880362", "%llu", "6389735809259880362", b'\xd4\xfe\xb9\xf8\xa7\xb7\xf3\xac\xb1\x01'),
TestCase("%lld", "7792983928750025393", "%llu", "7792983928750025393", b'\xe2\xaa\xc9\xd7\x83\xe6\x9e\xa6\xd8\x01'),
TestCase("%lld", "4564825427452770815", "%llu", "4564825427452770815", b'\xfe\xe7\xf1\x8f\xce\xa2\xc2\xd9\x7e'),
TestCase("%lld", "943049921933903574", "%llu", "943049921933903574", b'\xac\x9b\xa4\xa5\x8a\xba\xb1\x96\x1a'),
TestCase("%lld", "1621021906259841134", "%llu", "1621021906259841134", b'\xdc\xc1\xf4\xfb\xb9\xb5\x83\xff\x2c'),
TestCase("%lld", "7630179381739069820", "%llu", "7630179381739069820", b'\xf8\x85\x89\xd1\x94\xee\xeb\xe3\xd3\x01'),
TestCase("%lld", "8025284571884195522", "%llu", "8025284571884195522", b'\x84\xbb\xa4\x89\x8c\xf3\xc4\xdf\xde\x01'),
TestCase("%lld", "5839395391962199967", "%llu", "5839395391962199967", b'\xbe\xde\xad\x8f\xf5\xca\xd9\x89\xa2\x01'),
TestCase("%lld", "1310759272316304459", "%llu", "1310759272316304459", b'\x96\xf1\xb3\xc7\xa1\xa7\xe0\xb0\x24'),
TestCase("%lld", "3663531610526815443", "%llu", "3663531610526815443", b'\xa6\xd3\xec\xcd\xdd\xa5\xbd\xd7\x65'),
TestCase("%lld", "3661335273992329249", "%llu", "3661335273992329249", b'\xc2\xe0\xdc\x9e\x8f\xc2\xd6\xcf\x65'),
TestCase("%lld", "3545512604455022758", "%llu", "3545512604455022758", b'\xcc\xc2\xb1\xf3\xb8\xbb\x98\xb4\x62'),
TestCase("%lld", "4908269103466540013", "%llu", "4908269103466540013", b'\xda\xaf\xaf\xe2\xd2\xaf\xd6\x9d\x88\x01'),
TestCase("%lld", "9012690640501821443", "%llu", "9012690640501821443", b'\x86\xc0\xca\x99\xdc\x98\xc1\x93\xfa\x01'),
TestCase("%lld", "6541851858139706195", "%llu", "6541851858139706195", b'\xa6\xcd\xab\x9a\xda\xe6\xa9\xc9\xb5\x01'),
TestCase("%lld", "6391701285149964727", "%llu", "6391701285149964727", b'\xee\xe6\xab\xbc\x88\x9d\xf1\xb3\xb1\x01'),
TestCase("%lld", "4510904210489015127", "%llu", "4510904210489015127", b'\xae\xed\x97\xa0\xd9\xde\xf9\x99\x7d'),
TestCase("%lld", "5119199357584793664", "%llu", "5119199357584793664", b'\x80\x81\xff\xb3\xad\xac\x86\x8b\x8e\x01'),
TestCase("%lld", "1751202991906984173", "%llu", "1751202991906984173", b'\xda\xc3\xbc\xe3\xf8\xf5\xc2\xcd\x30'),
TestCase("%lld", "4471970899266236465", "%llu", "4471970899266236465", b'\xe2\xc0\xaf\x8a\xdc\xf5\xd0\x8f\x7c'),
TestCase("%lld", "7912743439818658557", "%llu", "7912743439818658557", b'\xfa\xcb\x8c\x93\x85\x8f\xdb\xcf\xdb\x01'),
TestCase("%lld", "6642713590355959471", "%llu", "6642713590355959471", b'\xde\xfa\x9c\x9d\x9b\xb4\xd4\xaf\xb8\x01'),
TestCase("%lld", "7865046769076850396", "%llu", "7865046769076850396", b'\xb8\xbb\xc6\xca\xb3\x97\xa1\xa6\xda\x01'),
TestCase("%lld", "4109397703148639581", "%llu", "4109397703148639581", b'\xba\xd5\xd8\x8f\x88\xdc\xc1\x87\x72'),
TestCase("%lld", "436719658465345699", "%llu", "436719658465345699", b'\xc6\x82\x8e\xd4\xe5\x8d\xc5\x8f\x0c'),
TestCase("%lld", "2553774266074455395", "%llu", "2553774266074455395", b'\xc6\xf5\xb6\xde\xc3\x8a\xea\xf0\x46'),
TestCase("%lld", "6212224561138197241", "%llu", "6212224561138197241", b'\xf2\x8b\xcb\xf9\xe2\xd4\xa0\xb6\xac\x01'),
TestCase("%lld", "53039180701654763", "%llu", "53039180701654763", b'\xd6\xfb\xb2\xce\xd2\xb6\xb7\xbc\x01'),
TestCase("%lld", "5419660422277913790", "%llu", "5419660422277913790", b'\xfc\xf2\xf2\x91\x90\x9c\xc0\xb6\x96\x01'),
TestCase("%lld", "7637231844465361135", "%llu", "7637231844465361135", b'\xde\x83\xc6\xca\xc2\xf9\xf2\xfc\xd3\x01'),
TestCase("%lld", "1955771002711010609", "%llu", "1955771002711010609", b'\xe2\xb4\xcb\xe9\xac\xd7\xa5\xa4\x36'),
TestCase("%lld", "7552146003088329848", "%llu", "7552146003088329848", b'\xf0\xb1\xba\xdf\xdb\xb1\xce\xce\xd1\x01'),
TestCase("%lld", "4550116504720438569", "%llu", "4550116504720438569", b'\xd2\xd4\x87\xe8\xcf\xb6\xa1\xa5\x7e'),
TestCase("%lld", "757246289038783544", "%llu", "757246289038783544", b'\xf0\xd0\x9d\x9a\x9c\xdf\xa3\x82\x15'),
TestCase("%lld", "4684454901623556905", "%llu", "4684454901623556905", b'\xd2\xac\xe0\x99\xbd\xba\xc3\x82\x82\x01'),
TestCase("%lld", "2100956932097049429", "%llu", "2100956932097049429", b'\xaa\x8d\xd0\xa0\xd9\xcc\x8c\xa8\x3a'),
TestCase("%lld", "6234369280162760629", "%llu", "6234369280162760629", b'\xea\x9e\xac\xeb\x88\xf5\xf6\x84\xad\x01'),
TestCase("%lld", "1690133901535631706", "%llu", "1690133901535631706", b'\xb4\xe5\x82\xfe\x84\xf5\xc7\xf4\x2e'),
TestCase("%lld", "8944940508995398022", "%llu", "8944940508995398022", b'\x8c\xa6\xe1\xfa\x84\x80\xe8\xa2\xf8\x01'),
TestCase("%lld", "5911305799563392167", "%llu", "5911305799563392167", b'\xce\xd2\xf5\xda\xc4\xd3\x96\x89\xa4\x01'),
TestCase("%lld", "4077388965675931531", "%llu", "4077388965675931531", b'\x96\xde\xb0\xe3\xa9\xea\xe5\x95\x71'),
TestCase("%lld", "1245196532623960857", "%llu", "1245196532623960857", b'\xb2\xac\xcb\xa9\xc5\xe9\xe9\xc7\x22'),
TestCase("%lld", "8856210144434134086", "%llu", "8856210144434134086", b'\x8c\xf1\xa8\xb3\x88\x8d\xca\xe7\xf5\x01'),
TestCase("%lld", "8547254512181346310", "%llu", "8547254512181346310", b'\x8c\x80\xe4\xb6\xb1\xac\xf9\x9d\xed\x01'),
TestCase("%lld", "6269182192420305924", "%llu", "6269182192420305924", b'\x88\xf0\xd5\xb6\xa1\xff\xcd\x80\xae\x01'),
TestCase("%lld", "6831000756220180063", "%llu", "6831000756220180063", b'\xbe\xd9\xed\xee\xdb\xbf\xcb\xcc\xbd\x01'),
TestCase("%lld", "3168030316008523010", "%llu", "3168030316008523010", b'\x84\x94\xda\xf5\xb2\xb2\x8d\xf7\x57'),
TestCase("%lld", "2407920475746907080", "%llu", "2407920475746907080", b'\x90\xcf\xc5\xc4\xc7\xba\xd3\xea\x42'),
TestCase("%lld", "7828361129715530032", "%llu", "7828361129715530032", b'\xe0\xe4\xdb\xe2\x92\xbe\xf6\xa3\xd9\x01'),
TestCase("%lld", "5162541696057507903", "%llu", "5162541696057507903", b'\xfe\x80\xb4\xba\xbf\x94\x84\xa5\x8f\x01'),
TestCase("%lld", "4684430121285811332", "%llu", "4684430121285811332", b'\x88\xf2\x8b\xa6\x89\x98\xb8\x82\x82\x01'),
TestCase("%lld", "7069327273055818092", "%llu", "7069327273055818092", b'\xd8\xc5\xc8\xf7\xe5\xec\xa5\x9b\xc4\x01'),
TestCase("%lld", "1094908319066476988", "%llu", "1094908319066476988", b'\xf8\xc6\x9e\xb9\x95\xd4\xf2\xb1\x1e'),
TestCase("%lld", "8623611379126599086", "%llu", "8623611379126599086", b'\xdc\xf6\xdb\xdd\x80\xb7\x9c\xad\xef\x01'),
TestCase("%lld", "4188361875415362989", "%llu", "4188361875415362989", b'\xda\xb6\xdf\xee\xe9\xbb\x86\xa0\x74'),
TestCase("%lld", "8306128555371214226", "%llu", "8306128555371214226", b'\xa4\xd6\x89\x9a\xba\xfa\xa5\xc5\xe6\x01'),
TestCase("%lld", "6350883509347762576", "%llu", "6350883509347762576", b'\xa0\x86\xfa\x88\xe8\xb9\xef\xa2\xb0\x01'),
TestCase("%lld", "6330969482079692999", "%llu", "6330969482079692999", b'\x8e\xa3\x97\xf3\xee\xcc\x8f\xdc\xaf\x01'),
TestCase("%lld", "3843711385867305612", "%llu", "3843711385867305612", b'\x98\x8a\xf6\xdb\xff\xc8\xcd\xd7\x6a'),
TestCase("%lld", "7659651832434418091", "%llu", "7659651832434418091", b'\xd6\x86\xe3\xf6\xc9\xb0\xc6\xcc\xd4\x01'),
TestCase("%lld", "5535789636778214509", "%llu", "5535789636778214509", b'\xda\x91\xa2\xb7\x88\xd6\x89\xd3\x99\x01'),
TestCase("%lld", "5087759841087488516", "%llu", "5087759841087488516", b'\x88\x88\xa4\xe8\xd1\xa7\xad\x9b\x8d\x01'),
TestCase("%lld", "8891437578007474517", "%llu", "8891437578007474517", b'\xaa\xc5\x8f\xbb\xc9\xd7\xdd\xe4\xf6\x01'),
TestCase("%lld", "728151566226426022", "%llu", "728151566226426022", b'\xcc\xa2\x90\xf9\xba\xff\xf4\x9a\x14'),
TestCase("%lld", "2483479174720276235", "%llu", "2483479174720276235", b'\x96\x9c\xc2\x84\xd8\xc9\x8b\xf7\x44'),
TestCase("%lld", "6359340322607236594", "%llu", "6359340322607236594", b'\xe4\x97\x94\xed\x90\x95\xf5\xc0\xb0\x01'),
TestCase("%lld", "6416832625845083020", "%llu", "6416832625845083020", b'\x98\xee\x90\xea\xcf\xd1\x95\x8d\xb2\x01'),
TestCase("%lld", "5711184686518624115", "%llu", "5711184686518624115", b'\xe6\xfd\xbe\xe9\xd2\x8d\x9a\xc2\x9e\x01'),
TestCase("%lld", "3612059979445064775", "%llu", "3612059979445064775", b'\x8e\xd1\xd2\xe3\xbd\xda\xce\xa0\x64'),
TestCase("%lld", "8992370046494348158", "%llu", "8992370046494348158", b'\xfc\xcd\xc4\xe2\xbc\xba\xa8\xcb\xf9\x01'),
TestCase("%lld", "8599514281591661754", "%llu", "8599514281591661754", b'\xf4\x92\xdb\xb2\xa9\xab\xce\xd7\xee\x01'),
TestCase("%lld", "63057463895113152", "%llu", "63057463895113152", b'\x80\xf7\xbd\xfe\xbc\x9b\x83\xe0\x01'),
TestCase("%lld", "1367741239369008397", "%llu", "1367741239369008397", b'\x9a\x94\xf0\xd3\xa3\xda\x98\xfb\x25'),
TestCase("%lld", "22816942625156124", "%llu", "22816942625156124", b'\xb8\xb0\xc3\x80\xee\xf8\x87\x51'),
TestCase("%lld", "5473904087316166353", "%llu", "5473904087316166353", b'\xa2\xdb\xcf\xb0\xfe\xb0\x9b\xf7\x97\x01'),
TestCase("%lld", "2176574837538100650", "%llu", "2176574837538100650", b'\xd4\xd6\x98\xa8\x8c\xd2\xdf\xb4\x3c'),
TestCase("%lld", "1822527202856628083", "%llu", "1822527202856628083", b'\xe6\xbd\x8b\xfc\xb6\xb5\xf5\xca\x32'),
TestCase("%lld", "6704455477950302825", "%llu", "6704455477950302825", b'\xd2\xa9\xb2\xfa\x88\xaf\x81\x8b\xba\x01'),
TestCase("%lld", "3032341809633898873", "%llu", "3032341809633898873", b'\xf2\xc5\xd9\x8c\xea\xb3\x85\x95\x54'),
TestCase("%lld", "4392190674790178652", "%llu", "4392190674790178652", b'\xb8\xfd\xb6\xca\xbb\x89\x99\xf4\x79'),
TestCase("%lld", "6856757614633255152", "%llu", "6856757614633255152", b'\xe0\x83\xdc\xb2\x99\xae\x8c\xa8\xbe\x01'),
TestCase("%lld", "353529678637100035", "%llu", "353529678637100035", b'\x86\xb0\xc7\x8b\xd4\xd7\xfe\xe7\x09'),
TestCase("%lld", "3224702228554841730", "%llu", "3224702228554841730", b'\x84\xfa\xdf\xf6\xee\xe5\xb8\xc0\x59'),
TestCase("%lld", "8122609781749075974", "%llu", "8122609781749075974", b'\x8c\xc0\xa2\xa4\xf4\xa3\xa7\xb9\xe1\x01'),
TestCase("%lld", "3988658283410987938", "%llu", "3988658283410987938", b'\xc4\xee\x8c\x92\xee\xe4\xc7\xda\x6e'),
TestCase("%lld", "7588966234436262844", "%llu", "7588966234436262844", b'\xf8\xee\x8e\x80\xa1\xa5\xb6\xd1\xd2\x01'),
TestCase("%lld", "72920210115635164", "%llu", "72920210115635164", b'\xb8\x9f\x9d\xce\xee\xa2\x88\x83\x02'),
TestCase("%lld", "8168752409782378632", "%llu", "8168752409782378632", b'\x90\x82\x8f\xb3\xad\xc2\x9e\xdd\xe2\x01'),
TestCase("%lld", "4655403017017936000", "%llu", "4655403017017936000", b'\x80\xa2\x96\xba\x9d\x98\xa8\x9b\x81\x01'),
TestCase("%lld", "8183602528750449920", "%llu", "8183602528750449920", b'\x80\xd4\xc5\xd2\x85\xc9\xff\x91\xe3\x01'),
TestCase("%lld", "288952216557681443", "%llu", "288952216557681443", b'\xc6\xec\xdb\x8f\xd2\xa0\xc8\x82\x08'),
TestCase("%lld", "1676746537447019293", "%llu", "1676746537447019293", b'\xba\xcc\xaa\xee\xf1\x85\x80\xc5\x2e'),
TestCase("%lld", "3219359012813218523", "%llu", "3219359012813218523", b'\xb6\x8b\xf9\xb2\xe3\xfd\xba\xad\x59'),
TestCase("%lld", "9123809425872405130", "%llu", "9123809425872405130", b'\x94\x8a\xe2\xb7\xa6\x95\xa4\x9e\xfd\x01'),
TestCase("%lld", "7496923004744506260", "%llu", "7496923004744506260", b'\xa8\xee\x80\xe4\x93\xf0\xb5\x8a\xd0\x01'),
TestCase("%lld", "2810327810830374172", "%llu", "2810327810830374172", b'\xb8\xd4\x90\xaf\xa2\x90\xa5\x80\x4e'),
TestCase("%lld", "5886875793686089828", "%llu", "5886875793686089828", b'\xc8\xc1\x8a\xf8\x84\x96\xb1\xb2\xa3\x01'),
TestCase("%lld", "1043235540762466020", "%llu", "1043235540762466020", b'\xc8\xdb\xac\x83\xce\xcc\xa8\xfa\x1c'),
TestCase("%lld", "8352418169916257811", "%llu", "8352418169916257811", b'\xa6\xd8\x83\x96\xd2\x84\xe0\xe9\xe7\x01'),
TestCase("%lld", "674709631558538790", "%llu", "674709631558538790", b'\xcc\xd8\xa6\xb9\xb9\xb5\x86\xdd\x12'),
TestCase("%lld", "6425607598961991251", "%llu", "6425607598961991251", b'\xa6\xf9\xf0\xa2\xa4\x84\xac\xac\xb2\x01'),
TestCase("%lld", "6117996971473322038", "%llu", "6117996971473322038", b'\xec\x80\xaa\xd9\x97\xf5\xbe\xe7\xa9\x01'),
TestCase("%lld", "2394571431170796410", "%llu", "2394571431170796410", b'\xf4\xad\xdf\x83\xf3\x81\x9d\xbb\x42'),
TestCase("%lld", "9192320418779887179", "%llu", "9192320418779887179", b'\x96\xd9\x8f\xef\xf8\xad\xd7\x91\xff\x01'),
TestCase("%lld", "891164515808164858", "%llu", "891164515808164858", b'\xf4\xef\xed\x92\xfa\xd9\x86\xde\x18'),
TestCase("%lld", "4569690489566792107", "%llu", "4569690489566792107", b'\xd6\xa6\xe0\xc1\xbf\xd2\xe6\xea\x7e'),
TestCase("%lld", "4245075167591901055", "%llu", "4245075167591901055", b'\xfe\x9d\xad\x92\xf4\xd7\xc4\xe9\x75'),
TestCase("%lld", "9019812505721196330", "%llu", "9019812505721196330", b'\xd4\xbc\x9a\x82\xeb\xeb\xe7\xac\xfa\x01'),
TestCase("%lld", "979687222629424543", "%llu", "979687222629424543", b'\xbe\xf6\x86\xfd\xd3\x95\xc6\x98\x1b'),
TestCase("%lld", "4114720885129059820", "%llu", "4114720885129059820", b'\xd8\xf7\xfc\xbf\x84\xb6\xb6\x9a\x72'),
TestCase("%lld", "2602113737417537288", "%llu", "2602113737417537288", b'\x90\xdc\xfd\xfe\x8a\xaa\xc8\x9c\x48'),
TestCase("%lld", "4025468271985009702", "%llu", "4025468271985009702", b'\xcc\x90\xad\xe4\x98\x84\xab\xdd\x6f'),
TestCase("%lld", "3036291044299697402", "%llu", "3036291044299697402", b'\xf4\xb3\xf7\xa2\xc5\xa7\x89\xa3\x54'),
TestCase("%lld", "1070534622568918680", "%llu", "1070534622568918680", b'\xb0\xba\xd1\x9f\xa7\xe4\xa6\xdb\x1d'),
TestCase("%lld", "5631405388638357750", "%llu", "5631405388638357750", b'\xec\xa3\x94\x80\xaa\xd7\xe2\xa6\x9c\x01'),
TestCase("%lld", "53610470084017162", "%llu", "53610470084017162", b'\x94\xf0\xcb\x99\x88\x9c\xbb\xbe\x01'),
TestCase("%lld", "6477169593541844553", "%llu", "6477169593541844553", b'\x92\xf9\xae\xd0\xb0\xdb\xc3\xe3\xb3\x01'),
TestCase("%lld", "1775599305804553124", "%llu", "1775599305804553124", b'\xc8\xee\xc8\xde\xa7\x8a\x99\xa4\x31'),
TestCase("%lld", "720129488086281194", "%llu", "720129488086281194", b'\xd4\xaf\xd5\x9a\x87\xfd\xb4\xfe\x13'),
TestCase("%lld", "6711270492673007555", "%llu", "6711270492673007555", b'\x86\xff\xae\xb5\x91\xbd\x9c\xa3\xba\x01'),
TestCase("%lld", "7513165068981918756", "%llu", "7513165068981918756", b'\xc8\xf0\xd2\xb8\xdc\xf4\x8f\xc4\xd0\x01'),
TestCase("%lld", "2983712669290254370", "%llu", "2983712669290254370", b'\xc4\xc0\x86\xce\xa8\xb7\xa3\xe8\x52'),
TestCase("%lld", "3737216259576487553", "%llu", "3737216259576487553", b'\x82\xfa\xf6\x8d\xe6\x98\xa1\xdd\x67'),
TestCase("%lld", "2274224013798231728", "%llu", "2274224013798231728", b'\xe0\xba\xda\xa1\x9e\xac\xd5\x8f\x3f'),
TestCase("%lld", "3565198557459535882", "%llu", "3565198557459535882", b'\x94\xe0\xe2\xb1\xdc\xcc\x90\xfa\x62'),
TestCase("%lld", "3732880420468774142", "%llu", "3732880420468774142", b'\xfc\xd3\xea\xb0\xdf\xbd\xed\xcd\x67'),
TestCase("%lld", "5371965991102827603", "%llu", "5371965991102827603", b'\xa6\xb1\xce\xd2\xec\xa6\x87\x8d\x95\x01'),
TestCase("%lld", "484335498791767840", "%llu", "484335498791767840", b'\xc0\xbc\xc2\xd9\xbd\xa4\xda\xb8\x0d'),
TestCase("%lld", "5776656679787538668", "%llu", "5776656679787538668", b'\xd8\xa3\xfd\xc1\x9d\xa9\xe7\xaa\xa0\x01'),
TestCase("%lld", "7846457973737734692", "%llu", "7846457973737734692", b'\xc8\x88\xda\xda\x8d\xfd\x9b\xe4\xd9\x01'),
TestCase("%lld", "749331093609658474", "%llu", "749331093609658474", b'\xd4\xe1\x91\xdc\x9a\xaa\x94\xe6\x14'),
TestCase("%lld", "4154208822466872538", "%llu", "4154208822466872538", b'\xb4\x93\xf4\x9e\xc0\xba\xdb\xa6\x73'),
TestCase("%lld", "8161063962699005564", "%llu", "8161063962699005564", b'\xf8\xf9\xd3\xde\xea\x9b\xf6\xc1\xe2\x01'),
TestCase("%lld", "3729503431677340594", "%llu", "3729503431677340594", b'\xe4\xae\xd3\x9b\x90\xe7\xed\xc1\x67'),
TestCase("%lld", "3621720449882747425", "%llu", "3621720449882747425", b'\xc2\xc8\xbb\xb0\xef\xe3\xf7\xc2\x64'),
TestCase("%lld", "3654452981777753952", "%llu", "3654452981777753952", b'\xc0\x9d\xd7\xb3\xfe\xe7\x9c\xb7\x65'),
TestCase("%lld", "8747087227033699739", "%llu", "8747087227033699739", b'\xb6\x96\x9a\xab\xa5\xdf\xf2\xe3\xf2\x01'),
TestCase("%lld", "7841542346336811454", "%llu", "7841542346336811454", b'\xfc\xe6\xb5\xc9\xf7\xcd\xe0\xd2\xd9\x01'),
TestCase("%lld", "8253451662283365177", "%llu", "8253451662283365177", b'\xf2\xec\x8e\xd4\xdc\xa3\x93\x8a\xe5\x01'),
TestCase("%lld", "3367538680468566654", "%llu", "3367538680468566654", b'\xfc\xc9\xbb\x8b\xd0\xa5\xf3\xbb\x5d'),
TestCase("%lld", "134795648044988988", "%llu", "134795648044988988", b'\xf8\xe8\xeb\xef\xaf\xfb\xf1\xde\x03'),
TestCase("%lld", "2210978119973242473", "%llu", "2210978119973242473", b'\xd2\x99\xd4\xf2\xd8\xb8\xfc\xae\x3d'),
TestCase("%lld", "421750780720578633", "%llu", "421750780720578633", b'\x92\x81\xc0\xc9\xb7\x86\xae\xda\x0b'),
TestCase("%lld", "5885301061939406661", "%llu", "5885301061939406661", b'\x8a\x9d\x85\x92\xcb\x88\xe5\xac\xa3\x01'),
TestCase("%lld", "8457438023241447265", "%llu", "8457438023241447265", b'\xc2\xdd\x81\xd3\xd3\xc4\xed\xde\xea\x01'),
TestCase("%lld", "8625342049665019705", "%llu", "8625342049665019705", b'\xf2\xbc\xaf\x88\xa5\xb9\xaf\xb3\xef\x01'),
TestCase("%lld", "4522738759120336903", "%llu", "4522738759120336903", b'\x8e\xe0\x91\xd4\x8b\xbc\xff\xc3\x7d'),
TestCase("%lld", "2671059116919281788", "%llu", "2671059116919281788", b'\xf8\xe1\xd6\xe0\xad\x87\xc1\x91\x4a'),
TestCase("%lld", "3110596655769706088", "%llu", "3110596655769706088", b'\xd0\xf9\xde\xaa\xb0\xcb\x87\xab\x56'),
TestCase("%lld", "7187907223546304710", "%llu", "7187907223546304710", b'\x8c\xe3\x88\x9f\xac\xe2\xc9\xc0\xc7\x01'),
TestCase("%lld", "6450021345187045785", "%llu", "6450021345187045785", b'\xb2\x86\xfd\x98\xac\x8f\x8a\x83\xb3\x01'),
TestCase("%lld", "1678455339349899965", "%llu", "1678455339349899965", b'\xfa\xea\xf7\x94\xa0\x8f\x89\xcb\x2e'),
TestCase("%lld", "8586083292869710126", "%llu", "8586083292869710126", b'\xdc\xc4\xd2\xb6\xf1\xd0\xf2\xa7\xee\x01'),
TestCase("%lld", "7328869729981674031", "%llu", "7328869729981674031", b'\xde\xc8\xdd\xca\x8f\x8c\xb0\xb5\xcb\x01'),
TestCase("%lld", "88833738086841272", "%llu", "88833738086841272", b'\xf0\xee\xe3\xab\x8d\xf4\xcc\xbb\x02'),
TestCase("%lld", "3875204489276489361", "%llu", "3875204489276489361", b'\xa2\xfa\x97\xf5\xf0\xfc\xbe\xc7\x6b'),
TestCase("%lld", "349662797203771308", "%llu", "349662797203771308", b'\xd8\xbe\x80\xa8\xc4\x9d\xa0\xda\x09'),
TestCase("%lld", "7970924659150689441", "%llu", "7970924659150689441", b'\xc2\xd2\xa0\x81\xdd\xef\xb4\x9e\xdd\x01'),
TestCase("%lld", "163280929539230956", "%llu", "163280929539230956", b'\xd8\xb3\xc0\xbc\xfd\xc8\x8b\xc4\x04'),
TestCase("%lld", "1719947238548425297", "%llu", "1719947238548425297", b'\xa2\xa9\xbe\xa1\xd3\xb9\xbd\xde\x2f'),
TestCase("%lld", "4371241115470848126", "%llu", "4371241115470848126", b'\xfc\x81\xc7\xb3\xcf\xa8\xe2\xa9\x79'),
TestCase("%lld", "4845845044868885160", "%llu", "4845845044868885160", b'\xd0\xaa\xf9\xff\x9a\x99\xf3\xbf\x86\x01'),
TestCase("%lld", "428374782176628108", "%llu", "428374782176628108", b'\x98\xb6\xfc\xa5\x88\xa6\xf2\xf1\x0b'),
TestCase("%lld", "7356256820074242781", "%llu", "7356256820074242781", b'\xba\x8b\x8f\xd1\xc9\xa6\xd6\x96\xcc\x01'),
TestCase("%lld", "7023621621475593673", "%llu", "7023621621475593673", b'\x92\xb7\xf2\x8c\xdd\xa9\xf5\xf8\xc2\x01'),
TestCase("%lld", "844047554037800681", "%llu", "844047554037800681", b'\xd2\xfb\xae\xff\xe8\xb1\xd4\xb6\x17'),
TestCase("%lld", "817568236458138451", "%llu", "817568236458138451", b'\xa6\xed\xd6\x9b\xd7\xfe\xca\xd8\x16'),
TestCase("%lld", "8750594193206555908", "%llu", "8750594193206555908", b'\x88\xd4\xe1\xba\xcb\xc3\xad\xf0\xf2\x01'),
TestCase("%lld", "8310288564467194046", "%llu", "8310288564467194046", b'\xfc\xe2\xf6\xa0\xed\xda\x89\xd4\xe6\x01'),
TestCase("%lld", "6530303901192542500", "%llu", "6530303901192542500", b'\xc8\xe4\xee\x9e\x92\xb3\xa6\xa0\xb5\x01'),
TestCase("%lld", "7528511123548308292", "%llu", "7528511123548308292", b'\x88\x8d\xe4\xea\xd4\xbe\xd2\xfa\xd0\x01'),
TestCase("%lld", "9162331973142792201", "%llu", "9162331973142792201", b'\x92\xa0\x8a\xd6\xd5\x98\x92\xa7\xfe\x01'),
TestCase("%lld", "2011986664423345991", "%llu", "2011986664423345991", b'\x8e\xbd\xb6\x9c\xc3\xcd\x81\xec\x37'),
TestCase("%lld", "9019302408819509", "%llu", "9019302408819509", b'\xea\xcc\x98\xc3\xbf\xc0\x85\x20'),
TestCase("%lld", "789517241633323881", "%llu", "789517241633323881", b'\xd2\xed\xcd\xb9\xf1\xef\xf6\xf4\x15'),
TestCase("%lld", "5000802077860900174", "%llu", "5000802077860900174", b'\x9c\xb5\xf9\xae\xd2\xbf\xb5\xe6\x8a\x01'),
TestCase("%lld", "634081739389621380", "%llu", "634081739389621380", b'\x88\xd2\x8a\xae\xf0\xfe\xda\xcc\x11'),
TestCase("%lld", "112762393776366951", "%llu", "112762393776366951", b'\xce\x95\x81\x91\x97\xb3\xce\x90\x03'),
TestCase("%lld", "6054079168136366365", "%llu", "6054079168136366365", b'\xba\xa4\xe2\xad\xae\xbb\xb4\x84\xa8\x01'),
TestCase("%lld", "3980060469571494571", "%llu", "3980060469571494571", b'\xd6\x8a\x91\x96\x9d\xfa\x81\xbc\x6e'),
TestCase("%lld", "5966260566188732596", "%llu", "5966260566188732596", b'\xe8\xc2\xcd\xd1\xfa\x97\xb5\xcc\xa5\x01'),
TestCase("%lld", "7994806728603097981", "%llu", "7994806728603097981", b'\xfa\xed\xd2\xa4\x90\x97\xa1\xf3\xdd\x01'),
TestCase("%lld", "4215789446045917951", "%llu", "4215789446045917951", b'\xfe\x8b\xc3\xb6\xc7\x8a\xbf\x81\x75'),
TestCase("%lld", "3106694682520283096", "%llu", "3106694682520283096", b'\xb0\x9f\xbb\x93\xd2\x96\x99\x9d\x56'),
TestCase("%lld", "7417099544643803895", "%llu", "7417099544643803895", b'\xee\xeb\xa4\xe3\xa0\xaf\xea\xee\xcd\x01'),
TestCase("%lld", "2442715921212337368", "%llu", "2442715921212337368", b'\xb0\xb3\xeb\xb0\x86\xcc\xa2\xe6\x43'),
TestCase("%lld", "3969107660140201186", "%llu", "3969107660140201186", b'\xc4\x93\x82\xdf\xe7\x98\x8d\x95\x6e'),
TestCase("%lld", "2820313669595847223", "%llu", "2820313669595847223", b'\xee\xe8\x82\xf7\xdf\x95\xe2\xa3\x4e'),
TestCase("%lld", "1153942061124594568", "%llu", "1153942061124594568", b'\x90\xae\xb5\xcb\x9a\x8c\xd0\x83\x20'),
TestCase("%lld", "7255377737678567782", "%llu", "7255377737678567782", b'\xcc\xe5\xdd\xd9\x93\xe7\xa3\xb0\xc9\x01'),
TestCase("%lld", "8010794524226708564", "%llu", "8010794524226708564", b'\xa8\x91\xeb\x92\xa8\xcb\x87\xac\xde\x01'),
TestCase("%lld", "2397984212273136806", "%llu", "2397984212273136806", b'\xcc\x92\xc8\xd8\xf3\xfb\xac\xc7\x42'),
TestCase("%lld", "3911421735689494721", "%llu", "3911421735689494721", b'\x82\x83\x9d\xa8\x8a\xd6\x94\xc8\x6c'),
TestCase("%lld", "8110862279364352221", "%llu", "8110862279364352221", b'\xba\xe3\x84\xfa\xa2\x91\xc9\x8f\xe1\x01'),
TestCase("%lld", "8302240689147774718", "%llu", "8302240689147774718", b'\xfc\x9b\x94\xc7\xed\xfa\xbd\xb7\xe6\x01'),
TestCase("%lld", "8137682451091990657", "%llu", "8137682451091990657", b'\x82\xa2\xa5\x84\xde\xc4\xed\xee\xe1\x01'),
TestCase("%lld", "7692576112763082769", "%llu", "7692576112763082769", b'\xa2\xe0\xb0\x8e\xf6\xcd\xc2\xc1\xd5\x01'),
TestCase("%lld", "4332208573039164264", "%llu", "4332208573039164264", b'\xd0\xed\xb5\x8e\xd0\xaf\x8c\x9f\x78'),
TestCase("%lld", "1408790260442838317", "%llu", "1408790260442838317", b'\xda\xd4\xcd\xcb\xe3\xd1\x83\x8d\x27'),
TestCase("%lld", "674974620879983391", "%llu", "674974620879983391", b'\xbe\xcc\xa4\xdf\xed\xf5\xfe\xdd\x12'),
TestCase("%lld", "2717882686191243732", "%llu", "2717882686191243732", b'\xa8\xc7\xe8\xb9\xe6\xf9\xed\xb7\x4b'),
TestCase("%lld", "2252874181081070317", "%llu", "2252874181081070317", b'\xda\xeb\xe3\xef\xb4\xc8\xe8\xc3\x3e'),
TestCase("%lld", "561600661159813802", "%llu", "561600661159813802", b'\xd4\x8a\xf1\xa0\xed\xb4\x9a\xcb\x0f'),
TestCase("%lld", "1743861870362420461", "%llu", "1743861870362420461", b'\xda\x93\xe7\x84\xb7\xc8\xb8\xb3\x30'),
TestCase("%lld", "469546530241540223", "%llu", "469546530241540223", b'\xfe\xc1\x83\xc9\x9b\x85\x95\x84\x0d'),
TestCase("%lld", "2803811754125283747", "%llu", "2803811754125283747", b'\xc6\xc6\x9e\xdb\xec\xfb\x91\xe9\x4d'),
TestCase("%lld", "1450094191759522064", "%llu", "1450094191759522064", b'\xa0\xe4\xf7\xea\x80\xbf\xe2\x9f\x28'),
TestCase("%lld", "973928254324237827", "%llu", "973928254324237827", b'\x86\x98\xb3\xbb\xca\xa5\x8b\x84\x1b'),
TestCase("%lld", "5007711289774136962", "%llu", "5007711289774136962", b'\x84\xfa\x9a\xcb\xda\xb8\xfb\xfe\x8a\x01'),
TestCase("%lld", "5617796192393039749", "%llu", "5617796192393039749", b'\x8a\xbe\x88\xc2\xec\xf7\xb5\xf6\x9b\x01'),
TestCase("%lld", "7609052204185497138", "%llu", "7609052204185497138", b'\xe4\xb8\x89\xbe\xc9\xaa\xe4\x98\xd3\x01'),
TestCase("%lld", "4109234434773033977", "%llu", "4109234434773033977", b'\xf2\x8f\x99\xf7\xcb\xbc\xf7\x86\x72'),
TestCase("%lld", "6196547806636196643", "%llu", "6196547806636196643", b'\xc6\x8c\xb6\x84\xc8\xd9\xc7\xfe\xab\x01'),
TestCase("%lld", "1242378025984660164", "%llu", "1242378025984660164", b'\x88\xcb\x88\xb9\xee\x8e\xe8\xbd\x22'),
TestCase("%lld", "3684142195824821322", "%llu", "3684142195824821322", b'\x94\x91\xd4\xc2\xd8\xf3\xd9\xa0\x66'),
TestCase("%lld", "7118933327258815856", "%llu", "7118933327258815856", b'\xe0\xb5\x9c\xef\x96\x89\xc4\xcb\xc5\x01'),
TestCase("%lld", "230557021351043665", "%llu", "230557021351043665", b'\xa2\x89\xcf\xe1\xf5\x98\x8d\xb3\x06'),
TestCase("%lld", "8445293705764922090", "%llu", "8445293705764922090", b'\xd4\x8b\xaf\xbf\xab\xf8\xda\xb3\xea\x01'),
TestCase("%lld", "1574191283697066832", "%llu", "1574191283697066832", b'\xa0\x8d\xbd\x94\xba\xa8\xd3\xd8\x2b'),
TestCase("%lld", "6141978416086614643", "%llu", "6141978416086614643", b'\xe6\x89\xac\xcf\xfd\xb4\xd8\xbc\xaa\x01'),
TestCase("%lld", "2281449725566748391", "%llu", "2281449725566748391", b'\xce\x9b\x8c\x95\x82\x9c\xab\xa9\x3f'),
TestCase("%lld", "784722535322631703", "%llu", "784722535322631703", b'\xae\xf8\xb1\xd2\x9f\xbf\xf2\xe3\x15'),
TestCase("%lld", "5758531472775216899", "%llu", "5758531472775216899", b'\x86\xfc\xe3\xea\xa9\xf7\xb4\xea\x9f\x01'),
TestCase("%lld", "3230692938369337673", "%llu", "3230692938369337673", b'\x92\xa5\xf0\x9d\x89\x87\xdd\xd5\x59'),
TestCase("%lld", "6060043374493141457", "%llu", "6060043374493141457", b'\xa2\xa7\xfc\xc1\xee\xd5\xcc\x99\xa8\x01'),
TestCase("%lld", "2194452418321024659", "%llu", "2194452418321024659", b'\xa6\x9a\xac\xe8\xa0\xb6\xa1\xf4\x3c'),
TestCase("%lld", "1179720724324426892", "%llu", "1179720724324426892", b'\x98\x92\xb1\xb8\xf2\xef\x9a\xdf\x20'),
TestCase("%lld", "6869292628752205971", "%llu", "6869292628752205971", b'\xa6\xa2\xe0\xaf\x86\xd0\xd0\xd4\xbe\x01'),
TestCase("%lld", "66666931390606463", "%llu", "66666931390606463", b'\xfe\xb1\xeb\xbc\x91\xce\xec\xec\x01'),
# Random 32-bit ints
TestCase("%d", "548530896", "%u", "548530896", b'\xa0\xab\x8f\x8b\x04'),
TestCase("%d", "821325877", "%u", "821325877", b'\xea\xc0\xa3\x8f\x06'),
TestCase("%d", "511383431", "%u", "511383431", b'\x8e\xde\xd8\xe7\x03'),
TestCase("%d", "73179717", "%u", "73179717", b'\x8a\x89\xe5\x45'),
TestCase("%d", "644966342", "%u", "644966342", b'\x8c\x9f\x8b\xe7\x04'),
TestCase("%d", "1980405737", "%u", "1980405737", b'\xd2\xdf\xd4\xe0\x0e'),
TestCase("%d", "476646907", "%u", "476646907", b'\xf6\xb7\xc8\xc6\x03'),
TestCase("%d", "2032236920", "%u", "2032236920", b'\xf0\xe5\x8b\x92\x0f'),
TestCase("%d", "1293986078", "%u", "1293986078", b'\xbc\xa4\x85\xd2\x09'),
TestCase("%d", "301233235", "%u", "301233235", b'\xa6\xd1\xa3\x9f\x02'),
TestCase("%d", "558217992", "%u", "558217992", b'\x90\xec\xad\x94\x04'),
TestCase("%d", "2097556487", "%u", "2097556487", b'\x8e\xb0\xb1\xd0\x0f'),
TestCase("%d", "1914275808", "%u", "1914275808", b'\xc0\x9f\xcc\xa1\x0e'),
TestCase("%d", "817548252", "%u", "817548252", b'\xb8\xaf\xd6\x8b\x06'),
TestCase("%d", "409952181", "%u", "409952181", b'\xea\xfe\xfa\x86\x03'),
TestCase("%d", "1247456066", "%u", "1247456066", b'\x84\xad\xd5\xa5\x09'),
TestCase("%d", "1516178395", "%u", "1516178395", b'\xb6\xaf\xf8\xa5\x0b'),
TestCase("%d", "119460598", "%u", "119460598", b'\xec\xcb\xf6\x71'),
TestCase("%d", "1712502589", "%u", "1712502589", b'\xfa\xdc\x95\xe1\x0c'),
TestCase("%d", "1688223314", "%u", "1688223314", b'\xa4\xf9\x81\xca\x0c'),
TestCase("%d", "706807765", "%u", "706807765", b'\xaa\x9f\x88\xa2\x05'),
TestCase("%d", "1774808552", "%u", "1774808552", b'\xd0\xb7\xcb\x9c\x0d'),
TestCase("%d", "1789229650", "%u", "1789229650", b'\xa4\xe9\xab\xaa\x0d'),
TestCase("%d", "1849514292", "%u", "1849514292", b'\xe8\xe4\xea\xe3\x0d'),
TestCase("%d", "1655538874", "%u", "1655538874", b'\xf4\x92\xec\xaa\x0c'),
TestCase("%d", "34451703", "%u", "34451703", b'\xee\xc3\xed\x20'),
TestCase("%d", "1217027822", "%u", "1217027822", b'\xdc\xfb\xd2\x88\x09'),
TestCase("%d", "1722335750", "%u", "1722335750", b'\x8c\x88\xc6\xea\x0c'),
TestCase("%d", "1755007515", "%u", "1755007515", b'\xb6\xa8\xda\x89\x0d'),
TestCase("%d", "1016776167", "%u", "1016776167", b'\xce\x97\xd6\xc9\x07'),
TestCase("%d", "2053515555", "%u", "2053515555", b'\xc6\xa4\xb1\xa6\x0f'),
TestCase("%d", "652344632", "%u", "652344632", b'\xf0\xf4\x8f\xee\x04'),
TestCase("%d", "2075650855", "%u", "2075650855", b'\xce\xac\xbf\xbb\x0f'),
TestCase("%d", "1374899794", "%u", "1374899794", b'\xa4\xb9\x9a\x9f\x0a'),
TestCase("%d", "631591603", "%u", "631591603", b'\xe6\xca\xaa\xda\x04'),
TestCase("%d", "1017271797", "%u", "1017271797", b'\xea\xd7\x92\xca\x07'),
TestCase("%d", "659199737", "%u", "659199737", b'\xf2\xdb\xd4\xf4\x04'),
TestCase("%d", "1782422140", "%u", "1782422140", b'\xf8\xe9\xec\xa3\x0d'),
TestCase("%d", "1572071831", "%u", "1572071831", b'\xae\xa6\x9f\xdb\x0b'),
TestCase("%d", "2105608301", "%u", "2105608301", b'\xda\xa1\x88\xd8\x0f'),
TestCase("%d", "1534509283", "%u", "1534509283", b'\xc6\x83\xb6\xb7\x0b'),
TestCase("%d", "1360016822", "%u", "1360016822", b'\xec\xd6\x81\x91\x0a'),
TestCase("%d", "66588090", "%u", "66588090", b'\xf4\xb6\xc0\x3f'),
TestCase("%d", "2010287594", "%u", "2010287594", b'\xd4\xb7\x94\xfd\x0e'),
TestCase("%d", "1409055793", "%u", "1409055793", b'\xe2\xf0\xe3\xbf\x0a'),
TestCase("%d", "1312806256", "%u", "1312806256", b'\xe0\xd5\xfe\xe3\x09'),
TestCase("%d", "117699373", "%u", "117699373", b'\xda\xcc\x9f\x70'),
TestCase("%d", "1875416592", "%u", "1875416592", b'\xa0\xd8\xc4\xfc\x0d'),
TestCase("%d", "550403142", "%u", "550403142", b'\x8c\xf1\xf3\x8c\x04'),
TestCase("%d", "1556101213", "%u", "1556101213", b'\xba\xe1\x81\xcc\x0b'),
TestCase("%d", "1397393149", "%u", "1397393149", b'\xfa\x9b\xd4\xb4\x0a'),
TestCase("%d", "504462025", "%u", "504462025", b'\x92\xeb\x8b\xe1\x03'),
TestCase("%d", "1578855448", "%u", "1578855448", b'\xb0\xb0\xdb\xe1\x0b'),
TestCase("%d", "341299952", "%u", "341299952", b'\xe0\xcb\xbe\xc5\x02'),
TestCase("%d", "554765077", "%u", "554765077", b'\xaa\xac\x88\x91\x04'),
TestCase("%d", "1581023732", "%u", "1581023732", b'\xe8\x87\xe4\xe3\x0b'),
TestCase("%d", "1415869606", "%u", "1415869606", b'\xcc\xd2\xa3\xc6\x0a'),
TestCase("%d", "724653249", "%u", "724653249", b'\x82\xd3\x8a\xb3\x05'),
TestCase("%d", "88302425", "%u", "88302425", b'\xb2\x8d\x9b\x54'),
TestCase("%d", "1742669733", "%u", "1742669733", b'\xca\x9e\xf8\xfd\x0c'),
TestCase("%d", "878166891", "%u", "878166891", b'\xd6\x8d\xbe\xc5\x06'),
TestCase("%d", "1416428619", "%u", "1416428619", b'\x96\xf1\xe7\xc6\x0a'),
TestCase("%d", "1034414669", "%u", "1034414669", b'\x9a\xa9\xbf\xda\x07'),
TestCase("%d", "905412084", "%u", "905412084", b'\xe8\xf7\xbb\xdf\x06'),
TestCase("%d", "63837368", "%u", "63837368", b'\xf0\xd2\xf0\x3c'),
TestCase("%d", "645161396", "%u", "645161396", b'\xe8\x86\xa3\xe7\x04'),
TestCase("%d", "2107597739", "%u", "2107597739", b'\xd6\x8e\xfb\xd9\x0f'),
TestCase("%d", "76301137", "%u", "76301137", b'\xa2\x8d\xe2\x48'),
TestCase("%d", "459966688", "%u", "459966688", b'\xc0\xa3\xd4\xb6\x03'),
TestCase("%d", "1966018032", "%u", "1966018032", b'\xe0\xb7\xf8\xd2\x0e'),
TestCase("%d", "1781593154", "%u", "1781593154", b'\x84\xd1\x87\xa3\x0d'),
TestCase("%d", "558910911", "%u", "558910911", b'\xfe\xb6\x82\x95\x04'),
TestCase("%d", "1968681756", "%u", "1968681756", b'\xb8\xcc\xbd\xd5\x0e'),
TestCase("%d", "1898903331", "%u", "1898903331", b'\xc6\xdc\xf7\x92\x0e'),
TestCase("%d", "667424750", "%u", "667424750", b'\xdc\xdf\xc0\xfc\x04'),
TestCase("%d", "1831749058", "%u", "1831749058", b'\x84\x97\xf2\xd2\x0d'),
TestCase("%d", "1630416710", "%u", "1630416710", b'\x8c\xbd\xf1\x92\x0c'),
TestCase("%d", "1774702744", "%u", "1774702744", b'\xb0\xc2\xbe\x9c\x0d'),
TestCase("%d", "46739084", "%u", "46739084", b'\x98\xba\xc9\x2c'),
TestCase("%d", "709255105", "%u", "709255105", b'\x82\xff\xb2\xa4\x05'),
TestCase("%d", "1264949590", "%u", "1264949590", b'\xac\xe5\xac\xb6\x09'),
TestCase("%d", "2785021", "%u", "2785021", b'\xfa\xfb\xd3\x02'),
TestCase("%d", "1940076275", "%u", "1940076275", b'\xe6\xdb\x99\xba\x0e'),
TestCase("%d", "1436099990", "%u", "1436099990", b'\xac\x96\xc9\xd9\x0a'),
TestCase("%d", "622422778", "%u", "622422778", b'\xf4\xab\xcb\xd1\x04'),
TestCase("%d", "506192594", "%u", "506192594", b'\xa4\x8b\xdf\xe2\x03'),
TestCase("%d", "1329083686", "%u", "1329083686", b'\xcc\xd4\xc1\xf3\x09'),
TestCase("%d", "724686473", "%u", "724686473", b'\x92\xda\x8e\xb3\x05'),
TestCase("%d", "1693465014", "%u", "1693465014", b'\xec\xe6\x81\xcf\x0c'),
TestCase("%d", "986175143", "%u", "986175143", b'\xce\xda\xbe\xac\x07'),
TestCase("%d", "165118383", "%u", "165118383", b'\xde\x86\xbc\x9d\x01'),
TestCase("%d", "1364735728", "%u", "1364735728", b'\xe0\xdb\xc1\x95\x0a'),
TestCase("%d", "426265571", "%u", "426265571", b'\xc6\xaf\xc2\x96\x03'),
TestCase("%d", "1019467505", "%u", "1019467505", b'\xe2\xdb\x9e\xcc\x07'),
TestCase("%d", "353536599", "%u", "353536599", b'\xae\xa9\x94\xd1\x02'),
TestCase("%d", "1275925671", "%u", "1275925671", b'\xce\xd2\xe8\xc0\x09'),
TestCase("%d", "1250514267", "%u", "1250514267", b'\xb6\xd5\xca\xa8\x09'),
TestCase("%d", "1600951834", "%u", "1600951834", b'\xb4\xd8\xe4\xf6\x0b'),
TestCase("%d", "799391776", "%u", "799391776", b'\xc0\x80\xae\xfa\x05'),
TestCase("%d", "1812577120", "%u", "1812577120", b'\xc0\xed\xcd\xc0\x0d'),
# Random 16-bit ints
TestCase("%d", "12031", "%u", "12031", b'\xfe\xbb\x01'),
TestCase("%d", "17500", "%u", "17500", b'\xb8\x91\x02'),
TestCase("%d", "14710", "%u", "14710", b'\xec\xe5\x01'),
TestCase("%d", "8546", "%u", "8546", b'\xc4\x85\x01'),
TestCase("%d", "25208", "%u", "25208", b'\xf0\x89\x03'),
TestCase("%d", "29977", "%u", "29977", b'\xb2\xd4\x03'),
TestCase("%d", "31629", "%u", "31629", b'\x9a\xee\x03'),
TestCase("%d", "28612", "%u", "28612", b'\x88\xbf\x03'),
TestCase("%d", "4804", "%u", "4804", b'\x88\x4b'),
TestCase("%d", "7142", "%u", "7142", b'\xcc\x6f'),
TestCase("%d", "18567", "%u", "18567", b'\x8e\xa2\x02'),
TestCase("%d", "9376", "%u", "9376", b'\xc0\x92\x01'),
TestCase("%d", "19912", "%u", "19912", b'\x90\xb7\x02'),
TestCase("%d", "18", "%u", "18", b'\x24'),
TestCase("%d", "12097", "%u", "12097", b'\x82\xbd\x01'),
TestCase("%d", "4004", "%u", "4004", b'\xc8\x3e'),
TestCase("%d", "13241", "%u", "13241", b'\xf2\xce\x01'),
TestCase("%d", "17823", "%u", "17823", b'\xbe\x96\x02'),
TestCase("%d", "11129", "%u", "11129", b'\xf2\xad\x01'),
TestCase("%d", "16567", "%u", "16567", b'\xee\x82\x02'),
TestCase("%d", "9138", "%u", "9138", b'\xe4\x8e\x01'),
TestCase("%d", "31404", "%u", "31404", b'\xd8\xea\x03'),
TestCase("%d", "1072", "%u", "1072", b'\xe0\x10'),
TestCase("%d", "12870", "%u", "12870", b'\x8c\xc9\x01'),
TestCase("%d", "25499", "%u", "25499", b'\xb6\x8e\x03'),
TestCase("%d", "1640", "%u", "1640", b'\xd0\x19'),
TestCase("%d", "26764", "%u", "26764", b'\x98\xa2\x03'),
TestCase("%d", "2078", "%u", "2078", b'\xbc\x20'),
TestCase("%d", "10264", "%u", "10264", b'\xb0\xa0\x01'),
TestCase("%d", "15533", "%u", "15533", b'\xda\xf2\x01'),
TestCase("%d", "7701", "%u", "7701", b'\xaa\x78'),
TestCase("%d", "24302", "%u", "24302", b'\xdc\xfb\x02'),
TestCase("%d", "10568", "%u", "10568", b'\x90\xa5\x01'),
TestCase("%d", "2206", "%u", "2206", b'\xbc\x22'),
TestCase("%d", "16240", "%u", "16240", b'\xe0\xfd\x01'),
TestCase("%d", "16600", "%u", "16600", b'\xb0\x83\x02'),
TestCase("%d", "30984", "%u", "30984", b'\x90\xe4\x03'),
TestCase("%d", "18489", "%u", "18489", b'\xf2\xa0\x02'),
TestCase("%d", "8613", "%u", "8613", b'\xca\x86\x01'),
TestCase("%d", "26441", "%u", "26441", b'\x92\x9d\x03'),
TestCase("%d", "22831", "%u", "22831", b'\xde\xe4\x02'),
TestCase("%d", "2307", "%u", "2307", b'\x86\x24'),
TestCase("%d", "24179", "%u", "24179", b'\xe6\xf9\x02'),
TestCase("%d", "6400", "%u", "6400", b'\x80\x64'),
TestCase("%d", "4264", "%u", "4264", b'\xd0\x42'),
TestCase("%d", "20770", "%u", "20770", b'\xc4\xc4\x02'),
TestCase("%d", "24276", "%u", "24276", b'\xa8\xfb\x02'),
TestCase("%d", "27013", "%u", "27013", b'\x8a\xa6\x03'),
TestCase("%d", "30434", "%u", "30434", b'\xc4\xdb\x03'),
TestCase("%d", "8338", "%u", "8338", b'\xa4\x82\x01'),
TestCase("%d", "20544", "%u", "20544", b'\x80\xc1\x02'),
TestCase("%d", "22908", "%u", "22908", b'\xf8\xe5\x02'),
TestCase("%d", "7111", "%u", "7111", b'\x8e\x6f'),
TestCase("%d", "30015", "%u", "30015", b'\xfe\xd4\x03'),
TestCase("%d", "16241", "%u", "16241", b'\xe2\xfd\x01'),
TestCase("%d", "6262", "%u", "6262", b'\xec\x61'),
TestCase("%d", "30724", "%u", "30724", b'\x88\xe0\x03'),
TestCase("%d", "7761", "%u", "7761", b'\xa2\x79'),
TestCase("%d", "12306", "%u", "12306", b'\xa4\xc0\x01'),
TestCase("%d", "5472", "%u", "5472", b'\xc0\x55'),
TestCase("%d", "20833", "%u", "20833", b'\xc2\xc5\x02'),
TestCase("%d", "19726", "%u", "19726", b'\x9c\xb4\x02'),
TestCase("%d", "20971", "%u", "20971", b'\xd6\xc7\x02'),
TestCase("%d", "12697", "%u", "12697", b'\xb2\xc6\x01'),
TestCase("%d", "29872", "%u", "29872", b'\xe0\xd2\x03'),
TestCase("%d", "20930", "%u", "20930", b'\x84\xc7\x02'),
TestCase("%d", "11185", "%u", "11185", b'\xe2\xae\x01'),
TestCase("%d", "4894", "%u", "4894", b'\xbc\x4c'),
TestCase("%d", "21973", "%u", "21973", b'\xaa\xd7\x02'),
TestCase("%d", "32040", "%u", "32040", b'\xd0\xf4\x03'),
TestCase("%d", "26757", "%u", "26757", b'\x8a\xa2\x03'),
TestCase("%d", "18963", "%u", "18963", b'\xa6\xa8\x02'),
TestCase("%d", "338", "%u", "338", b'\xa4\x05'),
TestCase("%d", "18607", "%u", "18607", b'\xde\xa2\x02'),
TestCase("%d", "7633", "%u", "7633", b'\xa2\x77'),
TestCase("%d", "14357", "%u", "14357", b'\xaa\xe0\x01'),
TestCase("%d", "14672", "%u", "14672", b'\xa0\xe5\x01'),
TestCase("%d", "13025", "%u", "13025", b'\xc2\xcb\x01'),
TestCase("%d", "4413", "%u", "4413", b'\xfa\x44'),
TestCase("%d", "2946", "%u", "2946", b'\x84\x2e'),
TestCase("%d", "12641", "%u", "12641", b'\xc2\xc5\x01'),
TestCase("%d", "28130", "%u", "28130", b'\xc4\xb7\x03'),
TestCase("%d", "6892", "%u", "6892", b'\xd8\x6b'),
TestCase("%d", "27495", "%u", "27495", b'\xce\xad\x03'),
TestCase("%d", "11488", "%u", "11488", b'\xc0\xb3\x01'),
TestCase("%d", "23283", "%u", "23283", b'\xe6\xeb\x02'),
TestCase("%d", "29949", "%u", "29949", b'\xfa\xd3\x03'),
TestCase("%d", "5161", "%u", "5161", b'\xd2\x50'),
TestCase("%d", "10664", "%u", "10664", b'\xd0\xa6\x01'),
TestCase("%d", "22534", "%u", "22534", b'\x8c\xe0\x02'),
TestCase("%d", "6502", "%u", "6502", b'\xcc\x65'),
TestCase("%d", "28037", "%u", "28037", b'\x8a\xb6\x03'),
TestCase("%d", "305", "%u", "305", b'\xe2\x04'),
TestCase("%d", "32042", "%u", "32042", b'\xd4\xf4\x03'),
TestCase("%d", "8481", "%u", "8481", b'\xc2\x84\x01'),
TestCase("%d", "22068", "%u", "22068", b'\xe8\xd8\x02'),
TestCase("%d", "13788", "%u", "13788", b'\xb8\xd7\x01'),
TestCase("%d", "29904", "%u", "29904", b'\xa0\xd3\x03'),
TestCase("%d", "12689", "%u", "12689", b'\xa2\xc6\x01'),
TestCase("%d", "1205", "%u", "1205", b'\xea\x12'),
# All 8-bit numbers
TestCase("%d", "-128", "%u", "4294967168", b'\xff\x01'),
TestCase("%d", "-127", "%u", "4294967169", b'\xfd\x01'),
TestCase("%d", "-126", "%u", "4294967170", b'\xfb\x01'),
TestCase("%d", "-125", "%u", "4294967171", b'\xf9\x01'),
TestCase("%d", "-124", "%u", "4294967172", b'\xf7\x01'),
TestCase("%d", "-123", "%u", "4294967173", b'\xf5\x01'),
TestCase("%d", "-122", "%u", "4294967174", b'\xf3\x01'),
TestCase("%d", "-121", "%u", "4294967175", b'\xf1\x01'),
TestCase("%d", "-120", "%u", "4294967176", b'\xef\x01'),
TestCase("%d", "-119", "%u", "4294967177", b'\xed\x01'),
TestCase("%d", "-118", "%u", "4294967178", b'\xeb\x01'),
TestCase("%d", "-117", "%u", "4294967179", b'\xe9\x01'),
TestCase("%d", "-116", "%u", "4294967180", b'\xe7\x01'),
TestCase("%d", "-115", "%u", "4294967181", b'\xe5\x01'),
TestCase("%d", "-114", "%u", "4294967182", b'\xe3\x01'),
TestCase("%d", "-113", "%u", "4294967183", b'\xe1\x01'),
TestCase("%d", "-112", "%u", "4294967184", b'\xdf\x01'),
TestCase("%d", "-111", "%u", "4294967185", b'\xdd\x01'),
TestCase("%d", "-110", "%u", "4294967186", b'\xdb\x01'),
TestCase("%d", "-109", "%u", "4294967187", b'\xd9\x01'),
TestCase("%d", "-108", "%u", "4294967188", b'\xd7\x01'),
TestCase("%d", "-107", "%u", "4294967189", b'\xd5\x01'),
TestCase("%d", "-106", "%u", "4294967190", b'\xd3\x01'),
TestCase("%d", "-105", "%u", "4294967191", b'\xd1\x01'),
TestCase("%d", "-104", "%u", "4294967192", b'\xcf\x01'),
TestCase("%d", "-103", "%u", "4294967193", b'\xcd\x01'),
TestCase("%d", "-102", "%u", "4294967194", b'\xcb\x01'),
TestCase("%d", "-101", "%u", "4294967195", b'\xc9\x01'),
TestCase("%d", "-100", "%u", "4294967196", b'\xc7\x01'),
TestCase("%d", "-99", "%u", "4294967197", b'\xc5\x01'),
TestCase("%d", "-98", "%u", "4294967198", b'\xc3\x01'),
TestCase("%d", "-97", "%u", "4294967199", b'\xc1\x01'),
TestCase("%d", "-96", "%u", "4294967200", b'\xbf\x01'),
TestCase("%d", "-95", "%u", "4294967201", b'\xbd\x01'),
TestCase("%d", "-94", "%u", "4294967202", b'\xbb\x01'),
TestCase("%d", "-93", "%u", "4294967203", b'\xb9\x01'),
TestCase("%d", "-92", "%u", "4294967204", b'\xb7\x01'),
TestCase("%d", "-91", "%u", "4294967205", b'\xb5\x01'),
TestCase("%d", "-90", "%u", "4294967206", b'\xb3\x01'),
TestCase("%d", "-89", "%u", "4294967207", b'\xb1\x01'),
TestCase("%d", "-88", "%u", "4294967208", b'\xaf\x01'),
TestCase("%d", "-87", "%u", "4294967209", b'\xad\x01'),
TestCase("%d", "-86", "%u", "4294967210", b'\xab\x01'),
TestCase("%d", "-85", "%u", "4294967211", b'\xa9\x01'),
TestCase("%d", "-84", "%u", "4294967212", b'\xa7\x01'),
TestCase("%d", "-83", "%u", "4294967213", b'\xa5\x01'),
TestCase("%d", "-82", "%u", "4294967214", b'\xa3\x01'),
TestCase("%d", "-81", "%u", "4294967215", b'\xa1\x01'),
TestCase("%d", "-80", "%u", "4294967216", b'\x9f\x01'),
TestCase("%d", "-79", "%u", "4294967217", b'\x9d\x01'),
TestCase("%d", "-78", "%u", "4294967218", b'\x9b\x01'),
TestCase("%d", "-77", "%u", "4294967219", b'\x99\x01'),
TestCase("%d", "-76", "%u", "4294967220", b'\x97\x01'),
TestCase("%d", "-75", "%u", "4294967221", b'\x95\x01'),
TestCase("%d", "-74", "%u", "4294967222", b'\x93\x01'),
TestCase("%d", "-73", "%u", "4294967223", b'\x91\x01'),
TestCase("%d", "-72", "%u", "4294967224", b'\x8f\x01'),
TestCase("%d", "-71", "%u", "4294967225", b'\x8d\x01'),
TestCase("%d", "-70", "%u", "4294967226", b'\x8b\x01'),
TestCase("%d", "-69", "%u", "4294967227", b'\x89\x01'),
TestCase("%d", "-68", "%u", "4294967228", b'\x87\x01'),
TestCase("%d", "-67", "%u", "4294967229", b'\x85\x01'),
TestCase("%d", "-66", "%u", "4294967230", b'\x83\x01'),
TestCase("%d", "-65", "%u", "4294967231", b'\x81\x01'),
TestCase("%d", "-64", "%u", "4294967232", b'\x7f'),
TestCase("%d", "-63", "%u", "4294967233", b'\x7d'),
TestCase("%d", "-62", "%u", "4294967234", b'\x7b'),
TestCase("%d", "-61", "%u", "4294967235", b'\x79'),
TestCase("%d", "-60", "%u", "4294967236", b'\x77'),
TestCase("%d", "-59", "%u", "4294967237", b'\x75'),
TestCase("%d", "-58", "%u", "4294967238", b'\x73'),
TestCase("%d", "-57", "%u", "4294967239", b'\x71'),
TestCase("%d", "-56", "%u", "4294967240", b'\x6f'),
TestCase("%d", "-55", "%u", "4294967241", b'\x6d'),
TestCase("%d", "-54", "%u", "4294967242", b'\x6b'),
TestCase("%d", "-53", "%u", "4294967243", b'\x69'),
TestCase("%d", "-52", "%u", "4294967244", b'\x67'),
TestCase("%d", "-51", "%u", "4294967245", b'\x65'),
TestCase("%d", "-50", "%u", "4294967246", b'\x63'),
TestCase("%d", "-49", "%u", "4294967247", b'\x61'),
TestCase("%d", "-48", "%u", "4294967248", b'\x5f'),
TestCase("%d", "-47", "%u", "4294967249", b'\x5d'),
TestCase("%d", "-46", "%u", "4294967250", b'\x5b'),
TestCase("%d", "-45", "%u", "4294967251", b'\x59'),
TestCase("%d", "-44", "%u", "4294967252", b'\x57'),
TestCase("%d", "-43", "%u", "4294967253", b'\x55'),
TestCase("%d", "-42", "%u", "4294967254", b'\x53'),
TestCase("%d", "-41", "%u", "4294967255", b'\x51'),
TestCase("%d", "-40", "%u", "4294967256", b'\x4f'),
TestCase("%d", "-39", "%u", "4294967257", b'\x4d'),
TestCase("%d", "-38", "%u", "4294967258", b'\x4b'),
TestCase("%d", "-37", "%u", "4294967259", b'\x49'),
TestCase("%d", "-36", "%u", "4294967260", b'\x47'),
TestCase("%d", "-35", "%u", "4294967261", b'\x45'),
TestCase("%d", "-34", "%u", "4294967262", b'\x43'),
TestCase("%d", "-33", "%u", "4294967263", b'\x41'),
TestCase("%d", "-32", "%u", "4294967264", b'\x3f'),
TestCase("%d", "-31", "%u", "4294967265", b'\x3d'),
TestCase("%d", "-30", "%u", "4294967266", b'\x3b'),
TestCase("%d", "-29", "%u", "4294967267", b'\x39'),
TestCase("%d", "-28", "%u", "4294967268", b'\x37'),
TestCase("%d", "-27", "%u", "4294967269", b'\x35'),
TestCase("%d", "-26", "%u", "4294967270", b'\x33'),
TestCase("%d", "-25", "%u", "4294967271", b'\x31'),
TestCase("%d", "-24", "%u", "4294967272", b'\x2f'),
TestCase("%d", "-23", "%u", "4294967273", b'\x2d'),
TestCase("%d", "-22", "%u", "4294967274", b'\x2b'),
TestCase("%d", "-21", "%u", "4294967275", b'\x29'),
TestCase("%d", "-20", "%u", "4294967276", b'\x27'),
TestCase("%d", "-19", "%u", "4294967277", b'\x25'),
TestCase("%d", "-18", "%u", "4294967278", b'\x23'),
TestCase("%d", "-17", "%u", "4294967279", b'\x21'),
TestCase("%d", "-16", "%u", "4294967280", b'\x1f'),
TestCase("%d", "-15", "%u", "4294967281", b'\x1d'),
TestCase("%d", "-14", "%u", "4294967282", b'\x1b'),
TestCase("%d", "-13", "%u", "4294967283", b'\x19'),
TestCase("%d", "-12", "%u", "4294967284", b'\x17'),
TestCase("%d", "-11", "%u", "4294967285", b'\x15'),
TestCase("%d", "-10", "%u", "4294967286", b'\x13'),
TestCase("%d", "-9", "%u", "4294967287", b'\x11'),
TestCase("%d", "-8", "%u", "4294967288", b'\x0f'),
TestCase("%d", "-7", "%u", "4294967289", b'\x0d'),
TestCase("%d", "-6", "%u", "4294967290", b'\x0b'),
TestCase("%d", "-5", "%u", "4294967291", b'\x09'),
TestCase("%d", "-4", "%u", "4294967292", b'\x07'),
TestCase("%d", "-3", "%u", "4294967293", b'\x05'),
TestCase("%d", "-2", "%u", "4294967294", b'\x03'),
TestCase("%d", "-1", "%u", "4294967295", b'\x01'),
TestCase("%d", "0", "%u", "0", b'\x00'),
TestCase("%d", "1", "%u", "1", b'\x02'),
TestCase("%d", "2", "%u", "2", b'\x04'),
TestCase("%d", "3", "%u", "3", b'\x06'),
TestCase("%d", "4", "%u", "4", b'\x08'),
TestCase("%d", "5", "%u", "5", b'\x0a'),
TestCase("%d", "6", "%u", "6", b'\x0c'),
TestCase("%d", "7", "%u", "7", b'\x0e'),
TestCase("%d", "8", "%u", "8", b'\x10'),
TestCase("%d", "9", "%u", "9", b'\x12'),
TestCase("%d", "10", "%u", "10", b'\x14'),
TestCase("%d", "11", "%u", "11", b'\x16'),
TestCase("%d", "12", "%u", "12", b'\x18'),
TestCase("%d", "13", "%u", "13", b'\x1a'),
TestCase("%d", "14", "%u", "14", b'\x1c'),
TestCase("%d", "15", "%u", "15", b'\x1e'),
TestCase("%d", "16", "%u", "16", b'\x20'),
TestCase("%d", "17", "%u", "17", b'\x22'),
TestCase("%d", "18", "%u", "18", b'\x24'),
TestCase("%d", "19", "%u", "19", b'\x26'),
TestCase("%d", "20", "%u", "20", b'\x28'),
TestCase("%d", "21", "%u", "21", b'\x2a'),
TestCase("%d", "22", "%u", "22", b'\x2c'),
TestCase("%d", "23", "%u", "23", b'\x2e'),
TestCase("%d", "24", "%u", "24", b'\x30'),
TestCase("%d", "25", "%u", "25", b'\x32'),
TestCase("%d", "26", "%u", "26", b'\x34'),
TestCase("%d", "27", "%u", "27", b'\x36'),
TestCase("%d", "28", "%u", "28", b'\x38'),
TestCase("%d", "29", "%u", "29", b'\x3a'),
TestCase("%d", "30", "%u", "30", b'\x3c'),
TestCase("%d", "31", "%u", "31", b'\x3e'),
TestCase("%d", "32", "%u", "32", b'\x40'),
TestCase("%d", "33", "%u", "33", b'\x42'),
TestCase("%d", "34", "%u", "34", b'\x44'),
TestCase("%d", "35", "%u", "35", b'\x46'),
TestCase("%d", "36", "%u", "36", b'\x48'),
TestCase("%d", "37", "%u", "37", b'\x4a'),
TestCase("%d", "38", "%u", "38", b'\x4c'),
TestCase("%d", "39", "%u", "39", b'\x4e'),
TestCase("%d", "40", "%u", "40", b'\x50'),
TestCase("%d", "41", "%u", "41", b'\x52'),
TestCase("%d", "42", "%u", "42", b'\x54'),
TestCase("%d", "43", "%u", "43", b'\x56'),
TestCase("%d", "44", "%u", "44", b'\x58'),
TestCase("%d", "45", "%u", "45", b'\x5a'),
TestCase("%d", "46", "%u", "46", b'\x5c'),
TestCase("%d", "47", "%u", "47", b'\x5e'),
TestCase("%d", "48", "%u", "48", b'\x60'),
TestCase("%d", "49", "%u", "49", b'\x62'),
TestCase("%d", "50", "%u", "50", b'\x64'),
TestCase("%d", "51", "%u", "51", b'\x66'),
TestCase("%d", "52", "%u", "52", b'\x68'),
TestCase("%d", "53", "%u", "53", b'\x6a'),
TestCase("%d", "54", "%u", "54", b'\x6c'),
TestCase("%d", "55", "%u", "55", b'\x6e'),
TestCase("%d", "56", "%u", "56", b'\x70'),
TestCase("%d", "57", "%u", "57", b'\x72'),
TestCase("%d", "58", "%u", "58", b'\x74'),
TestCase("%d", "59", "%u", "59", b'\x76'),
TestCase("%d", "60", "%u", "60", b'\x78'),
TestCase("%d", "61", "%u", "61", b'\x7a'),
TestCase("%d", "62", "%u", "62", b'\x7c'),
TestCase("%d", "63", "%u", "63", b'\x7e'),
TestCase("%d", "64", "%u", "64", b'\x80\x01'),
TestCase("%d", "65", "%u", "65", b'\x82\x01'),
TestCase("%d", "66", "%u", "66", b'\x84\x01'),
TestCase("%d", "67", "%u", "67", b'\x86\x01'),
TestCase("%d", "68", "%u", "68", b'\x88\x01'),
TestCase("%d", "69", "%u", "69", b'\x8a\x01'),
TestCase("%d", "70", "%u", "70", b'\x8c\x01'),
TestCase("%d", "71", "%u", "71", b'\x8e\x01'),
TestCase("%d", "72", "%u", "72", b'\x90\x01'),
TestCase("%d", "73", "%u", "73", b'\x92\x01'),
TestCase("%d", "74", "%u", "74", b'\x94\x01'),
TestCase("%d", "75", "%u", "75", b'\x96\x01'),
TestCase("%d", "76", "%u", "76", b'\x98\x01'),
TestCase("%d", "77", "%u", "77", b'\x9a\x01'),
TestCase("%d", "78", "%u", "78", b'\x9c\x01'),
TestCase("%d", "79", "%u", "79", b'\x9e\x01'),
TestCase("%d", "80", "%u", "80", b'\xa0\x01'),
TestCase("%d", "81", "%u", "81", b'\xa2\x01'),
TestCase("%d", "82", "%u", "82", b'\xa4\x01'),
TestCase("%d", "83", "%u", "83", b'\xa6\x01'),
TestCase("%d", "84", "%u", "84", b'\xa8\x01'),
TestCase("%d", "85", "%u", "85", b'\xaa\x01'),
TestCase("%d", "86", "%u", "86", b'\xac\x01'),
TestCase("%d", "87", "%u", "87", b'\xae\x01'),
TestCase("%d", "88", "%u", "88", b'\xb0\x01'),
TestCase("%d", "89", "%u", "89", b'\xb2\x01'),
TestCase("%d", "90", "%u", "90", b'\xb4\x01'),
TestCase("%d", "91", "%u", "91", b'\xb6\x01'),
TestCase("%d", "92", "%u", "92", b'\xb8\x01'),
TestCase("%d", "93", "%u", "93", b'\xba\x01'),
TestCase("%d", "94", "%u", "94", b'\xbc\x01'),
TestCase("%d", "95", "%u", "95", b'\xbe\x01'),
TestCase("%d", "96", "%u", "96", b'\xc0\x01'),
TestCase("%d", "97", "%u", "97", b'\xc2\x01'),
TestCase("%d", "98", "%u", "98", b'\xc4\x01'),
TestCase("%d", "99", "%u", "99", b'\xc6\x01'),
TestCase("%d", "100", "%u", "100", b'\xc8\x01'),
TestCase("%d", "101", "%u", "101", b'\xca\x01'),
TestCase("%d", "102", "%u", "102", b'\xcc\x01'),
TestCase("%d", "103", "%u", "103", b'\xce\x01'),
TestCase("%d", "104", "%u", "104", b'\xd0\x01'),
TestCase("%d", "105", "%u", "105", b'\xd2\x01'),
TestCase("%d", "106", "%u", "106", b'\xd4\x01'),
TestCase("%d", "107", "%u", "107", b'\xd6\x01'),
TestCase("%d", "108", "%u", "108", b'\xd8\x01'),
TestCase("%d", "109", "%u", "109", b'\xda\x01'),
TestCase("%d", "110", "%u", "110", b'\xdc\x01'),
TestCase("%d", "111", "%u", "111", b'\xde\x01'),
TestCase("%d", "112", "%u", "112", b'\xe0\x01'),
TestCase("%d", "113", "%u", "113", b'\xe2\x01'),
TestCase("%d", "114", "%u", "114", b'\xe4\x01'),
TestCase("%d", "115", "%u", "115", b'\xe6\x01'),
TestCase("%d", "116", "%u", "116", b'\xe8\x01'),
TestCase("%d", "117", "%u", "117", b'\xea\x01'),
TestCase("%d", "118", "%u", "118", b'\xec\x01'),
TestCase("%d", "119", "%u", "119", b'\xee\x01'),
TestCase("%d", "120", "%u", "120", b'\xf0\x01'),
TestCase("%d", "121", "%u", "121", b'\xf2\x01'),
TestCase("%d", "122", "%u", "122", b'\xf4\x01'),
TestCase("%d", "123", "%u", "123", b'\xf6\x01'),
TestCase("%d", "124", "%u", "124", b'\xf8\x01'),
TestCase("%d", "125", "%u", "125", b'\xfa\x01'),
TestCase("%d", "126", "%u", "126", b'\xfc\x01'),
TestCase("%d", "127", "%u", "127", b'\xfe\x01'),
)
| 84.130564 | 117 | 0.651571 | 11,938 | 85,056 | 4.641816 | 0.111325 | 0.100047 | 0.062403 | 0.004764 | 0.045656 | 0.008211 | 0.006424 | 0.006424 | 0.005215 | 0.002851 | 0 | 0.375998 | 0.05922 | 85,056 | 1,010 | 118 | 84.213861 | 0.316512 | 0.011428 | 0 | 0.004111 | 0 | 0 | 0.641445 | 0.22733 | 0 | 0 | 0 | 0 | 0 | 1 | 0.001028 | false | 0 | 0 | 0.001028 | 0.002056 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
26710ae602f22531c1992410068d92816040b136 | 37 | py | Python | string/stringmatching.py | ashutoshdumiyan/CSES-Solutions | 48ff04f0003c2a1f808412497a22c7c7841bb3db | [
"MIT"
] | null | null | null | string/stringmatching.py | ashutoshdumiyan/CSES-Solutions | 48ff04f0003c2a1f808412497a22c7c7841bb3db | [
"MIT"
] | null | null | null | string/stringmatching.py | ashutoshdumiyan/CSES-Solutions | 48ff04f0003c2a1f808412497a22c7c7841bb3db | [
"MIT"
] | null | null | null | s = input()
t = input()
print()
| 7.4 | 12 | 0.459459 | 5 | 37 | 3.4 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.324324 | 37 | 4 | 13 | 9.25 | 0.68 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.333333 | 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 |
13fe5c712851d7975ca8618f0f04b443e272383e | 36 | py | Python | server/constants.py | deepti-96/ConvoCare-Mental-Health- | 1bae3febc3bc1253eec4f3fee63fb867756bcb5b | [
"MIT"
] | 1 | 2022-02-06T20:44:17.000Z | 2022-02-06T20:44:17.000Z | server/constants.py | deepti-96/ConvoCare-Mental-Health | 1bae3febc3bc1253eec4f3fee63fb867756bcb5b | [
"MIT"
] | null | null | null | server/constants.py | deepti-96/ConvoCare-Mental-Health | 1bae3febc3bc1253eec4f3fee63fb867756bcb5b | [
"MIT"
] | null | null | null | CLASSES = ['anxiety', 'depression']
| 18 | 35 | 0.666667 | 3 | 36 | 8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.111111 | 36 | 1 | 36 | 36 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0.472222 | 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 |
cd07c968339135843b4cf9c8f0149fcdaf84bdcd | 609 | py | Python | animationGenerator.py | Memnarch1113/keyboardAnimation | 93e7124fdb10abc03be59021a5a92d0535e82a6b | [
"MIT"
] | null | null | null | animationGenerator.py | Memnarch1113/keyboardAnimation | 93e7124fdb10abc03be59021a5a92d0535e82a6b | [
"MIT"
] | null | null | null | animationGenerator.py | Memnarch1113/keyboardAnimation | 93e7124fdb10abc03be59021a5a92d0535e82a6b | [
"MIT"
] | null | null | null | # print ("hello world")
# import sys
# print(sys.version)
# columns = [0,2,4,6,8,10,12,14,16,18,20,22,24,25,27,29,31,33,35,37,39,41,43,45,47,49,50,52,54,56,58,60,62,64,66,68,70,72,74,75,77,79,81,83,85,87,89,91,93,95,97,]
for x in range(0, 125):
print('P[c:{0}] (0,255,0), '.format(x%125), end='') # Green
print('P[c:{0}] (255,255,0), '.format((x+25)%125), end='') # Yellow
print('P[c:{0}] (255,255,255), '.format((x+50)%125), end='') # White
print('P[c:{0}] (127,0,255), '.format((x+75)%125), end='') # Purple
print('P[c:{0}] (0,0,255)'.format((x+100)%125), end='') # Blue
print(';') | 46.846154 | 162 | 0.551724 | 131 | 609 | 2.564886 | 0.572519 | 0.089286 | 0.104167 | 0.119048 | 0.136905 | 0.083333 | 0 | 0 | 0 | 0 | 0 | 0.304104 | 0.119869 | 609 | 13 | 163 | 46.846154 | 0.322761 | 0.399015 | 0 | 0 | 0 | 0 | 0.29972 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.857143 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 3 |
cd1b0e66960e25c44228f14d97d7cbc499be6547 | 347 | py | Python | functional_tests/server_tools.py | jeckt/mindful-spending | e77d991ab6eb0302a75da51ec3802e64877f972a | [
"Apache-2.0"
] | 2 | 2018-07-23T21:12:38.000Z | 2018-07-23T21:54:59.000Z | functional_tests/server_tools.py | jeckt/mindful-spending | e77d991ab6eb0302a75da51ec3802e64877f972a | [
"Apache-2.0"
] | null | null | null | functional_tests/server_tools.py | jeckt/mindful-spending | e77d991ab6eb0302a75da51ec3802e64877f972a | [
"Apache-2.0"
] | null | null | null | from fabric.api import run
from fabric.context_managers import settings
def _get_manage_dot_py(host):
return f'~/sites/{host}/virtualenv/bin/python ~/sites/{host}/manage.py'
def reset_database(host):
manage_dot_py = _get_manage_dot_py(host)
with settings(host_string=f'steve@{host}'):
run(f'{manage_dot_py} flush --noinput')
| 31.545455 | 75 | 0.740634 | 54 | 347 | 4.481481 | 0.5 | 0.14876 | 0.181818 | 0.115702 | 0.14876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.129683 | 347 | 10 | 76 | 34.7 | 0.801325 | 0 | 0 | 0 | 0 | 0 | 0.299712 | 0.172911 | 0 | 0 | 0 | 0 | 0 | 1 | 0.25 | false | 0 | 0.25 | 0.125 | 0.625 | 0 | 0 | 0 | 0 | null | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 3 |
cd260b6f41987246d8c61522e606080bcc0d5196 | 452 | py | Python | config/debug/settings.py | saengate/django | 699a42f661e7cf0d1461553775caee65f6823f09 | [
"Apache-2.0"
] | null | null | null | config/debug/settings.py | saengate/django | 699a42f661e7cf0d1461553775caee65f6823f09 | [
"Apache-2.0"
] | 9 | 2021-04-06T18:47:10.000Z | 2021-09-22T19:48:02.000Z | config/debug/settings.py | saengate/wagtail-blog | db875d8f455fc92d5f9ac7ce98a4efdac1744381 | [
"Apache-2.0"
] | null | null | null | """
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 2.2.7.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
from config.settings import * # NOQA
WSGI_APPLICATION = 'config.debug.wsgi.application'
ASGI_APPLICATION = 'config.debug.routing.application'
| 25.111111 | 60 | 0.769912 | 67 | 452 | 5.164179 | 0.61194 | 0.017341 | 0.069364 | 0.144509 | 0.184971 | 0.184971 | 0.184971 | 0.184971 | 0 | 0 | 0 | 0.0175 | 0.115044 | 452 | 17 | 61 | 26.588235 | 0.8475 | 0.670354 | 0 | 0 | 1 | 0 | 0.432624 | 0.432624 | 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
cd69a6f72d833191d5d6cc3c149e3f9a5af34868 | 132 | py | Python | back-end/stripe_payment/urls.py | BloomTech-Labs/CS10-employee-shift | bb45c8e0ece121b8e38db9f156bddd8ac204d875 | [
"MIT"
] | null | null | null | back-end/stripe_payment/urls.py | BloomTech-Labs/CS10-employee-shift | bb45c8e0ece121b8e38db9f156bddd8ac204d875 | [
"MIT"
] | 6 | 2022-02-12T15:59:53.000Z | 2022-03-08T22:53:17.000Z | back-end/stripe_payment/urls.py | BloomTech-Labs/CS10-employee-shift | bb45c8e0ece121b8e38db9f156bddd8ac204d875 | [
"MIT"
] | 4 | 2018-09-10T16:13:48.000Z | 2021-01-30T20:04:37.000Z | from django.conf.urls import url
from .api import checkout
urlpatterns = [
url(r'^create-charge/$', checkout, name="cout"),
] | 16.5 | 52 | 0.689394 | 18 | 132 | 5.055556 | 0.777778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.159091 | 132 | 8 | 53 | 16.5 | 0.81982 | 0 | 0 | 0 | 0 | 0 | 0.150376 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.4 | 0 | 0.4 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
cd879ba204b62757471cf287dc2db247b8098608 | 1,116 | py | Python | tangos/input_handlers/halo_stat_files/translations.py | TobiBu/tangos | decab8c892c5937fd68474a375089abef198dba2 | [
"BSD-3-Clause"
] | null | null | null | tangos/input_handlers/halo_stat_files/translations.py | TobiBu/tangos | decab8c892c5937fd68474a375089abef198dba2 | [
"BSD-3-Clause"
] | null | null | null | tangos/input_handlers/halo_stat_files/translations.py | TobiBu/tangos | decab8c892c5937fd68474a375089abef198dba2 | [
"BSD-3-Clause"
] | null | null | null | """Helper classes for defining translations between .stat file of different formats."""
class Function(object):
"""Define a column which is actually a function of other columns"""
def __init__(self, fn, *input_arg_names):
self.fn = fn
self.input_arg_names = input_arg_names
def __call__(self, raw_input_names, raw_input_values):
input_args = [raw_input_values[raw_input_names.index(name)] for name in self.input_arg_names]
return self.fn(*input_args)
def inputs(self):
return self.input_arg_names
class Rename(object):
"""Define a column by renaming an existing column"""
def __init__(self, name):
self.name = name
def __call__(self, raw_input_names, raw_input_values):
return raw_input_values[raw_input_names.index(self.name)]
def inputs(self):
return [self.name]
class Value(object):
"""Define a column by a fixed value"""
def __init__(self, value):
self.value = value
def __call__(self, raw_input_names, raw_input_values):
return self.value
def inputs(self):
return [] | 31 | 101 | 0.683692 | 157 | 1,116 | 4.503185 | 0.286624 | 0.113154 | 0.091938 | 0.080622 | 0.393211 | 0.268741 | 0.268741 | 0.178218 | 0.178218 | 0.12447 | 0 | 0 | 0.22043 | 1,116 | 36 | 102 | 31 | 0.812644 | 0.199821 | 0 | 0.26087 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.391304 | false | 0 | 0 | 0.217391 | 0.782609 | 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 |
26a73ee1ad8fce816b89a620cd83db2775918e4d | 354 | py | Python | hard-gists/9842903/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/9842903/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/9842903/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | from django.views.generic import TemplateView
if settings.DEBUG:
# enable local preview of error pages
urlpatterns += patterns('',
(r'^403/$', TemplateView.as_view(template_name="403.html")),
(r'^404/$', TemplateView.as_view(template_name="404.html")),
(r'^500/$', TemplateView.as_view(template_name="500.html")),
) | 32.181818 | 68 | 0.658192 | 44 | 354 | 5.159091 | 0.590909 | 0.185022 | 0.237885 | 0.343612 | 0.396476 | 0 | 0 | 0 | 0 | 0 | 0 | 0.061433 | 0.172316 | 354 | 11 | 69 | 32.181818 | 0.713311 | 0.09887 | 0 | 0 | 0 | 0 | 0.132075 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | true | 0 | 0.142857 | 0 | 0.142857 | 0 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
26d0964d29f16c3fe3367e1615a396577eb30743 | 527 | py | Python | Classes.py | max15474/Lesson_9 | 554c0a542e2a308876aa523369c8ea67168485a2 | [
"MIT"
] | null | null | null | Classes.py | max15474/Lesson_9 | 554c0a542e2a308876aa523369c8ea67168485a2 | [
"MIT"
] | null | null | null | Classes.py | max15474/Lesson_9 | 554c0a542e2a308876aa523369c8ea67168485a2 | [
"MIT"
] | null | null | null | class Point:
def __init__(self, x, y):
self.x = x
self.y = y
def __str__(self):
return f'Точка: ({self.x}, {self.y})'
def __add__(self, other):
return Point(self.x + other.x, self.y + other.y)
def distance(self):
return (self.x ** 2 + self.y ** 2) ** 0.5
def point_dis(self, a, b):
return ((self.x - a) ** 2 + (self.y - b) ** 2) ** 0.5
p = Point(4, 1)
q = Point(8, -2)
print(p + q)
print(p.x, p.y)
print(p)
print(p.distance())
print(p.point_dis(3, 4))
| 19.518519 | 61 | 0.514231 | 93 | 527 | 2.763441 | 0.290323 | 0.116732 | 0.070039 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.037135 | 0.28463 | 527 | 26 | 62 | 20.269231 | 0.644562 | 0 | 0 | 0 | 0 | 0 | 0.051233 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.263158 | false | 0 | 0 | 0.210526 | 0.526316 | 0.263158 | 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 |
26dd8130b8930722c7e3143c6c7519fd5744e3bd | 1,814 | py | Python | hexfarm/gen.py | bhgomes/hexfarm | f5804944fb8a59d15fb5e6666612c74b935e8191 | [
"MIT"
] | 1 | 2018-05-30T00:42:45.000Z | 2018-05-30T00:42:45.000Z | hexfarm/gen.py | bhgomes/hexfarm | f5804944fb8a59d15fb5e6666612c74b935e8191 | [
"MIT"
] | 6 | 2019-04-04T05:24:11.000Z | 2020-09-20T18:47:14.000Z | hexfarm/gen.py | bhgomes/hexfarm | f5804944fb8a59d15fb5e6666612c74b935e8191 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*- #
#
# hexfarm/gen.py
#
#
# MIT License
#
# Copyright (c) 2018-2019 Brandon Gomes
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
"""
HexFarm Event Generation Library.
"""
# -------------- Standard Library -------------- #
import logging
# -------------- External Library -------------- #
import numpythia
import particle
import decaylanguage
import decaylanguage.decay as decay
import pyhepmc_ng as hepmc
# -------------- Hexfarm Library -------------- #
from .util import try_import
LOGGER = logging.getLogger(__name__)
pyjet, PYJET_SUPPORT = try_import("pyjet", log_error=LOGGER.info)
madminer, MADMINER_SUPPORT = try_import("madminer", log_error=LOGGER.info)
if MADMINER_SUPPORT:
from madminer.core import MadMiner
else:
class MadMiner:
pass
| 27.484848 | 80 | 0.723264 | 246 | 1,814 | 5.280488 | 0.54065 | 0.067744 | 0.020015 | 0.027714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.005956 | 0.167034 | 1,814 | 65 | 81 | 27.907692 | 0.853739 | 0.708931 | 0 | 0 | 0 | 0 | 0.026804 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0.066667 | 0.666667 | 0 | 0.733333 | 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 |
26e1d5051739702008720bfbad6b3e30046a06e9 | 164 | py | Python | hon/structure/readme.py | swquinn/hon | 333332029ee884a8822d38024659d5d7da64ff1a | [
"MIT"
] | null | null | null | hon/structure/readme.py | swquinn/hon | 333332029ee884a8822d38024659d5d7da64ff1a | [
"MIT"
] | 14 | 2019-06-23T01:49:55.000Z | 2021-02-22T01:26:51.000Z | hon/structure/readme.py | swquinn/hon | 333332029ee884a8822d38024659d5d7da64ff1a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
hon.structure.readme
~~~~~
The structure module for parsing the README.md file.
"""
def parse_readme(app, text):
pass | 14.909091 | 56 | 0.591463 | 21 | 164 | 4.571429 | 0.809524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.008 | 0.237805 | 164 | 11 | 57 | 14.909091 | 0.76 | 0.628049 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.5 | false | 0.5 | 0 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 3 |
26f4adff86d676b725fdcfdca1ae89254dbdde30 | 87 | py | Python | tools/bin/pythonSrc/pychecker-0.8.18/test_input/import37.py | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 450 | 2015-09-05T09:12:51.000Z | 2018-08-30T01:45:36.000Z | tools/bin/pythonSrc/pychecker-0.8.18/test_input/import37.py | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 1,274 | 2015-09-22T20:06:16.000Z | 2018-08-31T22:14:00.000Z | tools/bin/pythonSrc/pychecker-0.8.18/test_input/import37.py | YangHao666666/hawq | 10cff8350f1ba806c6fec64eb67e0e6f6f24786c | [
"Artistic-1.0-Perl",
"ISC",
"bzip2-1.0.5",
"TCL",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"PostgreSQL",
"BSD-3-Clause"
] | 278 | 2015-09-21T19:15:06.000Z | 2018-08-31T00:36:51.000Z | 'd'
class Test:
'doc'
def x(self):
import struct
print struct
| 10.875 | 21 | 0.505747 | 11 | 87 | 4 | 0.909091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.402299 | 87 | 7 | 22 | 12.428571 | 0.846154 | 0 | 0 | 0 | 0 | 0 | 0.045977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | null | 0 | 0.166667 | null | null | 0.166667 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f8123c35013b03bf3ffe3a3a4ec12be9ee73f764 | 2,584 | py | Python | ToolsTwitter/preprocess/twitter.py | inspectorgadgetteknofest/inspector-gadget-acikhack2021 | 026e54f1cdc793f92eb33dcbc212cef6d7655b0a | [
"MIT"
] | null | null | null | ToolsTwitter/preprocess/twitter.py | inspectorgadgetteknofest/inspector-gadget-acikhack2021 | 026e54f1cdc793f92eb33dcbc212cef6d7655b0a | [
"MIT"
] | null | null | null | ToolsTwitter/preprocess/twitter.py | inspectorgadgetteknofest/inspector-gadget-acikhack2021 | 026e54f1cdc793f92eb33dcbc212cef6d7655b0a | [
"MIT"
] | 1 | 2021-12-10T18:39:11.000Z | 2021-12-10T18:39:11.000Z | import re
import os
class Twitter():
def __init__(self):
pass
def removeHastag(self, tweet):
"""
Remove hastag in a tweet. (Tweet içerisindeki hastag'i kaldırır.)
Example:
Input:
\ttext [string] => "Merhaba #Hello"
Output:
\ttext [string] => "Merhaba"
"""
return re.sub(r"#\S+","", tweet)
def removeMention(self, tweet):
"""
Remove mention in a tweet. (Tweet içerisindeki mention'ı kaldırır.)
Example:
Input:
\ttext [string] => "Merhaba @example"
Output:
\ttext [string] => "Merhaba"
"""
return re.sub(r"@\S+","", tweet).strip()
def removeRT(self, tweet):
"""
Remove retweet in a tweet. (Tweet içerisindeki retweet'i kaldırır.)
Example:
Input:
\ttext [string] => "rt Bugün hava çok güzel"
Output:
\ttext [string] => "Bugün hava çok güzel"
"""
return re.sub(r"\brt\b","", tweet)
def getTweet(self, q = "", from_ = "", maxResult = 500, since = "", until = "", showQuery = True):
"""
Get retweet using snscrape library. (snscrape kütüphanesini kullanarak tweet toplar.)
Params:
* q: Query word. (Sorgu kelimesi)
* from_: Twitter user name. Ex. jack (Twitter kullanıcı adı. Örn. jack)
* maxResult: Count of tweets. (Tweet sayısı)
* since: Start date. Usage yyyy-mm-dd. (Başlangıç tarihi. Kullanımı yyyy-mm-dd.)
* until: Finish date. Usage yyyy-mm-dd. (Bitiş tarihi. Kullanımı yyyy-mm-dd.)
* showQuery: snscrape query (snscrape sorgusu)
Example:
Input:
\ttext (query)
Output:
\tfile (json)
"""
if until != "": until = " until:" + until
if from_ != "": from_ = " from:" + from_
if since != "": since = "--since " + since
if showQuery:
# Using OS library to call CLI commands in Python
print(f'snscrape --jsonl --max-results {maxResult} {since} twitter-search "{q}{until}{from_}" > text-query-tweets.json')
os.system(f'snscrape --jsonl --max-results {maxResult} {since} twitter-search "{q}{until}{from_}" > text-query-tweets.json')
| 25.087379 | 132 | 0.485681 | 251 | 2,584 | 4.956175 | 0.406375 | 0.053055 | 0.054662 | 0.03135 | 0.40836 | 0.283762 | 0.196141 | 0.196141 | 0.196141 | 0.196141 | 0 | 0.001908 | 0.391641 | 2,584 | 102 | 133 | 25.333333 | 0.78944 | 0.436533 | 0 | 0 | 0 | 0.111111 | 0.254237 | 0.043868 | 0 | 0 | 0 | 0 | 0 | 1 | 0.277778 | false | 0.055556 | 0.111111 | 0 | 0.611111 | 0.055556 | 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 |
f823c93d6bccec2028f60c651c2a80957d6e66fa | 57 | py | Python | aswan/security/__init__.py | papsebestyen/aswan | ed1b2a3dae6a8b7de355edd75de8d4ad577c97cd | [
"MIT"
] | 1 | 2021-04-28T23:08:07.000Z | 2021-04-28T23:08:07.000Z | aswan/security/__init__.py | papsebestyen/aswan | ed1b2a3dae6a8b7de355edd75de8d4ad577c97cd | [
"MIT"
] | 1 | 2022-01-22T22:02:55.000Z | 2022-01-22T22:02:55.000Z | aswan/security/__init__.py | papsebestyen/aswan | ed1b2a3dae6a8b7de355edd75de8d4ad577c97cd | [
"MIT"
] | 2 | 2022-01-05T10:01:22.000Z | 2022-02-16T10:58:46.000Z | from .proxy_base import NoProxy
DEFAULT_PROXY = NoProxy
| 14.25 | 31 | 0.824561 | 8 | 57 | 5.625 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.140351 | 57 | 3 | 32 | 19 | 0.918367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.5 | 0 | 0.5 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 |
f85592d9d2ddfd6e85896942255c8e5ac98e5967 | 525 | py | Python | bert-ranker/experiment/qa/train/no_training.py | UKPLab/emnlp2020-multicqa | 9d08a89dba5e51786bb3153ca3733b23006eb628 | [
"Apache-2.0"
] | 14 | 2020-09-23T11:47:05.000Z | 2022-01-10T07:18:55.000Z | bert-ranker/experiment/qa/train/no_training.py | UKPLab/emnlp2020-multicqa | 9d08a89dba5e51786bb3153ca3733b23006eb628 | [
"Apache-2.0"
] | 1 | 2020-07-17T07:32:46.000Z | 2020-07-17T07:34:19.000Z | bert-ranker/experiment/qa/train/no_training.py | UKPLab/emnlp2020-multicqa | 9d08a89dba5e51786bb3153ca3733b23006eb628 | [
"Apache-2.0"
] | 2 | 2021-03-05T05:19:10.000Z | 2021-09-13T08:26:39.000Z | import tensorflow as tf
import experiment
class NoTraining(experiment.Training):
"""This is a replacement component that skips the training process"""
def __init__(self, config, config_global, logger):
super(NoTraining, self).__init__(config, config_global, logger)
def start(self, model, data, evaluation):
self.logger.info("Skipping training")
def restore_best_epoch(self, model, data, evaluation):
pass
def remove_checkpoints(self):
pass
component = NoTraining
| 22.826087 | 73 | 0.708571 | 62 | 525 | 5.790323 | 0.580645 | 0.066852 | 0.100279 | 0.133705 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.20381 | 525 | 22 | 74 | 23.863636 | 0.858852 | 0.12 | 0 | 0.166667 | 0 | 0 | 0.037281 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.333333 | false | 0.166667 | 0.166667 | 0 | 0.583333 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 3 |
f85cbd43724defb0fe5f52252845c409f39b65ea | 329 | py | Python | course/TronShow/Domino2/sample.py | playpuppy/course-demo | 7dd787a3219f20d9bca8b7c7c2509844e32e35c7 | [
"MIT"
] | null | null | null | course/TronShow/Domino2/sample.py | playpuppy/course-demo | 7dd787a3219f20d9bca8b7c7c2509844e32e35c7 | [
"MIT"
] | null | null | null | course/TronShow/Domino2/sample.py | playpuppy/course-demo | 7dd787a3219f20d9bca8b7c7c2509844e32e35c7 | [
"MIT"
] | null | null | null | from puppy2d import *
setGravity(0, -1)
Rectangle(-100, 200, 700, 30, isStatic=True)
for i in [-300, -200, -100, 0]:
Rectangle(i, 300, 20, 200)
Circle(200, 300, 150)
Rectangle(0, -200, 1000, 30, isStatic=True)
for i in [-400, -300, -200, -100, 0, 100, 200, 300]:
Rectangle(i, -100, 20, 200)
Circle(-350, 500, 150)
| 18.277778 | 52 | 0.613982 | 56 | 329 | 3.607143 | 0.428571 | 0.059406 | 0.138614 | 0.168317 | 0.19802 | 0.19802 | 0 | 0 | 0 | 0 | 0 | 0.338346 | 0.191489 | 329 | 17 | 53 | 19.352941 | 0.421053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.1 | 0 | 0.1 | 0 | 0 | 0 | 0 | null | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f87f05fcc3b8372c33c9e29a96d27a78ca11a96a | 182 | py | Python | problem0579.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0579.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | problem0579.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | ###########################
#
# #579 Lattice points in lattice cubes - Project Euler
# https://projecteuler.net/problem=579
#
# Code by Kevin Marciniak
#
###########################
| 20.222222 | 54 | 0.505495 | 17 | 182 | 5.411765 | 0.882353 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.0375 | 0.120879 | 182 | 8 | 55 | 22.75 | 0.5375 | 0.615385 | 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 |
f88630113525150ad6ff4cf3167bea57fc4bf63e | 20 | py | Python | tests/__init__.py | eladhayun/cinnamon-server | 559fb2f41c0d1dd22e3170e29900f4df22107b42 | [
"MIT"
] | 4 | 2019-09-03T04:10:55.000Z | 2020-10-02T10:14:37.000Z | tests/__init__.py | eladhayun/activity-monitor | 559fb2f41c0d1dd22e3170e29900f4df22107b42 | [
"MIT"
] | null | null | null | tests/__init__.py | eladhayun/activity-monitor | 559fb2f41c0d1dd22e3170e29900f4df22107b42 | [
"MIT"
] | null | null | null | __author__ = 'Elad'
| 10 | 19 | 0.7 | 2 | 20 | 5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 20 | 1 | 20 | 20 | 0.588235 | 0 | 0 | 0 | 0 | 0 | 0.2 | 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 |
f88f72dd74d324249a2dd6b2124604809bc7ab37 | 1,888 | py | Python | hd_ansible/migrations/0001_initial.py | Rmond/OperMge | 926f00107614ed55b26ff3beac178fe955de856a | [
"Apache-2.0"
] | 1 | 2017-08-18T07:03:34.000Z | 2017-08-18T07:03:34.000Z | hd_ansible/migrations/0001_initial.py | Rmond/OperMge | 926f00107614ed55b26ff3beac178fe955de856a | [
"Apache-2.0"
] | null | null | null | hd_ansible/migrations/0001_initial.py | Rmond/OperMge | 926f00107614ed55b26ff3beac178fe955de856a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-06-01 09:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='MysqlAduit',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=32)),
('mysqluser', models.CharField(max_length=64)),
('mysqlhost', models.CharField(default='', max_length=16)),
('login_host', models.CharField(default='localhost', max_length=16)),
('pridate', models.DateTimeField(auto_now=True)),
('pri_database', models.CharField(default='', max_length=32)),
('pri_table', models.CharField(default='', max_length=32)),
('privilege', models.CharField(default='', max_length=64)),
],
),
migrations.CreateModel(
name='OptionLog',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('username', models.CharField(max_length=32)),
('option', models.CharField(max_length=10)),
('mysqlhost', models.CharField(max_length=16)),
('mysqluser', models.CharField(max_length=64)),
('pridate', models.DateTimeField(auto_now_add=True)),
('pri_database', models.CharField(default='', max_length=32)),
('pri_table', models.CharField(default='', max_length=32)),
('privilege', models.CharField(max_length=48)),
],
),
]
| 41.955556 | 115 | 0.559852 | 181 | 1,888 | 5.657459 | 0.364641 | 0.205078 | 0.123047 | 0.164063 | 0.620117 | 0.509766 | 0.441406 | 0.441406 | 0.441406 | 0.441406 | 0 | 0.033033 | 0.294492 | 1,888 | 44 | 116 | 42.909091 | 0.735736 | 0.034958 | 0 | 0.5 | 1 | 0 | 0.100282 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0.055556 | 0 | 0.166667 | 0 | 0 | 0 | 0 | null | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f8a26ba3748a39af3cf02b5817e00cb98e19b8e6 | 183 | py | Python | 03.Complete Python Developer - Zero to Mastery - AN/04.Advanced Python Functional Programming/zip.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 3 | 2020-06-01T04:17:18.000Z | 2020-12-18T03:05:55.000Z | 03.Complete Python Developer - Zero to Mastery - AN/04.Advanced Python Functional Programming/zip.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 1 | 2020-04-25T08:01:59.000Z | 2020-04-25T08:01:59.000Z | 03.Complete Python Developer - Zero to Mastery - AN/04.Advanced Python Functional Programming/zip.py | ptyadana/python-dojo | 98c7234b84f0afea99a091c7198342d66bbdff5b | [
"MIT"
] | 7 | 2020-04-26T10:02:36.000Z | 2021-06-08T05:12:46.000Z | #zip
my_list = [1,2,3]
your_list = [100,200,300]
their_list = [1000,2000,3000]
print(list(zip(my_list, your_list, their_list))[0][2])
print(list(zip(my_list, your_list, their_list))) | 26.142857 | 54 | 0.715847 | 36 | 183 | 3.388889 | 0.444444 | 0.122951 | 0.221311 | 0.229508 | 0.57377 | 0.57377 | 0.57377 | 0.57377 | 0.57377 | 0 | 0 | 0.155689 | 0.087432 | 183 | 7 | 55 | 26.142857 | 0.57485 | 0.016393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0.4 | 0 | 0 | 0 | null | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
f8aac16af4863d042429c0588ae1998760a8a7ef | 10,470 | py | Python | api_v3/tests/views/test_subscribers.py | DrWhax/id-backend | 603abbf4193591932708313662da9b2811f6867a | [
"MIT"
] | null | null | null | api_v3/tests/views/test_subscribers.py | DrWhax/id-backend | 603abbf4193591932708313662da9b2811f6867a | [
"MIT"
] | 1 | 2021-06-10T23:43:34.000Z | 2021-06-10T23:43:34.000Z | api_v3/tests/views/test_subscribers.py | DrWhax/id-backend | 603abbf4193591932708313662da9b2811f6867a | [
"MIT"
] | null | null | null | import json
from django.conf import settings
from django.template.loader import render_to_string
from api_v3.factories import (
ProfileFactory, TicketFactory, ResponderFactory, SubscriberFactory)
from api_v3.factories.support import Faker
from api_v3.models import Subscriber, Action
from api_v3.serializers import SubscriberSerializer
from api_v3.serializers.mixins import ResponderSubscriberSerializer
from api_v3.views.subscribers import SubscribersEndpoint
from .support import ApiTestCase, APIClient, reverse
class SubscribersEndpointTestCase(ApiTestCase):
def setUp(self):
self.client = APIClient()
self.users = [
ProfileFactory.create(),
ProfileFactory.create(),
ProfileFactory.create(is_superuser=True),
ProfileFactory.create()
]
self.tickets = [
TicketFactory.create(requester=self.users[0]),
TicketFactory.create(requester=self.users[1])
]
self.responders = [
ResponderFactory.create(ticket=self.tickets[0], user=self.users[1]),
ResponderFactory.create(ticket=self.tickets[1], user=self.users[2])
]
self.subscriber = SubscriberFactory.create(
ticket=self.tickets[0], user=self.users[0]
)
def test_create_arbitrary_user(self):
self.client.force_authenticate(self.users[3])
new_data = self.as_jsonapi_payload(
SubscriberSerializer, self.subscriber)
new_data['data']['attributes']['email'] = self.users[3].email
response = self.client.post(
reverse('subscriber-list'),
data=json.dumps(new_data),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 422)
response = json.loads(response.content)
self.assertEqual(
response['errors'][0]['detail']['data/attributes/ticket'],
'Ticket not found.'
)
def test_create_superuser_user_is_subscriber(self):
self.client.force_authenticate(self.users[2])
new_data = self.as_jsonapi_payload(
SubscriberSerializer, self.subscriber)
new_data['data']['attributes']['email'] = self.subscriber.user.email
response = self.client.post(
reverse('subscriber-list'),
data=json.dumps(new_data),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 422)
response = json.loads(response.content)
self.assertEqual(
response['errors'][0]['source']['pointer'],
'/data/attributes/user'
)
self.assertEqual(
response['errors'][0]['detail'],
'Subscriber already exists.'
)
def test_create_superuser_user_is_responder(self):
self.client.force_authenticate(self.users[2])
new_data = self.as_jsonapi_payload(
SubscriberSerializer, self.subscriber)
new_data['data']['attributes']['email'] = self.users[1].email
response = self.client.post(
reverse('subscriber-list'),
data=json.dumps(new_data),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 422)
response = json.loads(response.content)
self.assertEqual(
response['errors'][0]['source']['pointer'],
'/data/attributes/user'
)
self.assertEqual(
response['errors'][0]['detail'],
'User is a responder.'
)
def test_create_superuser(self):
self.client.force_authenticate(self.users[2])
subscribers_count = Subscriber.objects.count()
new_data = self.as_jsonapi_payload(
SubscriberSerializer, self.subscriber)
new_data['data']['attributes']['email'] = self.users[2].email
response = self.client.post(
reverse('subscriber-list'),
data=json.dumps(new_data),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 201)
self.assertEqual(Subscriber.objects.count(), subscribers_count + 1)
def test_create_non_superuser(self):
self.client.force_authenticate(self.users[0])
subscribers_count = Subscriber.objects.count()
new_data = self.as_jsonapi_payload(
SubscriberSerializer, self.subscriber)
new_data['data']['attributes']['email'] = self.users[3].email
response = self.client.post(
reverse('subscriber-list'),
data=json.dumps(new_data),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 201)
self.assertEqual(Subscriber.objects.count(), subscribers_count + 1)
def test_create_non_superuser_arbitrary_email(self):
self.client.force_authenticate(self.users[0])
subscribers_count = Subscriber.objects.count()
new_data = self.as_jsonapi_payload(
SubscriberSerializer, self.subscriber)
new_email = Faker('email').generate({})
new_data['data']['attributes']['user'] = {}
new_data['data']['attributes']['email'] = new_email
response = self.client.post(
reverse('subscriber-list'),
data=json.dumps(new_data),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 201)
self.assertEqual(Subscriber.objects.count(), subscribers_count + 1)
self.assertEqual(Subscriber.objects.last().email, new_email)
def test_create_non_superuser_arbitrary_email_exists(self):
self.client.force_authenticate(self.users[0])
new_email = Faker('email').generate({})
Subscriber.objects.create(
ticket=self.subscriber.ticket, email=new_email)
subscribers_count = Subscriber.objects.count()
new_data = self.as_jsonapi_payload(
SubscriberSerializer, self.subscriber)
new_data['data']['attributes'].pop('user')
new_data['data']['attributes']['email'] = new_email
response = self.client.post(
reverse('subscriber-list'),
data=json.dumps(new_data),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 422)
self.assertEqual(Subscriber.objects.count(), subscribers_count)
data = json.loads(response.content)
self.assertEqual(
data['errors'][0]['source']['pointer'],
'/data/attributes/email'
)
self.assertEqual(
data['errors'][0]['detail'],
ResponderSubscriberSerializer.EMAIL_SUBSCRIBER_ERROR_MESSAGE
)
def test_delete_non_superuser(self):
self.client.force_authenticate(self.users[3])
response = self.client.delete(
reverse('subscriber-detail', args=[self.subscriber.id]),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 404)
def test_delete_self_subscriber(self):
self.client.force_authenticate(self.users[0])
subscribers_count = Subscriber.objects.count()
response = self.client.delete(
reverse('subscriber-detail', args=[self.subscriber.id]),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 204)
self.assertEqual(Subscriber.objects.count(), subscribers_count - 1)
def test_delete_superuser(self):
self.client.force_authenticate(self.users[2])
subscribers_count = Subscriber.objects.count()
response = self.client.delete(
reverse('subscriber-detail', args=[self.subscriber.id]),
content_type=self.JSON_API_CONTENT_TYPE
)
self.assertEqual(response.status_code, 204)
self.assertEqual(Subscriber.objects.count(), subscribers_count - 1)
def test_list_anonymous(self):
response = self.client.get(reverse('subscriber-list'))
self.assertEqual(response.status_code, 401)
def test_list_authenticated(self):
self.client.force_authenticate(self.users[0])
response = self.client.get(reverse('subscriber-list'))
self.assertEqual(response.status_code, 200)
self.assertEqual(len(json.loads(response.content)['data']), 1)
self.assertEqual(
json.loads(response.content)['data'][0]['id'],
str(self.subscriber.id)
)
def test_get_authenticated_subscriber(self):
self.client.force_authenticate(self.users[0])
response = self.client.get(
reverse('subscriber-detail', args=[self.subscriber.id]))
self.assertEqual(response.status_code, 200)
self.assertEqual(
json.loads(response.content)['data']['id'],
str(self.subscriber.id)
)
def test_get_authenticated_responder(self):
self.client.force_authenticate(self.users[1])
response = self.client.get(
reverse('subscriber-detail', args=[self.subscriber.id]))
self.assertEqual(response.status_code, 200)
self.assertEqual(
json.loads(response.content)['data']['id'],
str(self.subscriber.id)
)
def test_get_authenticated_without_access(self):
self.client.force_authenticate(self.users[3])
response = self.client.get(
reverse('subscriber-detail', args=[self.subscriber.id]))
self.assertEqual(response.status_code, 404)
def test_email_notify(self):
controller = SubscribersEndpoint()
activity = Action(
actor=self.subscriber.user,
action=self.users[0],
target=self.subscriber.ticket,
verb='test-subscriber-added'
)
count, emails = controller.email_notify(activity, self.subscriber)
self.assertEqual(count, 1)
self.assertEqual(emails[0], [
controller.EMAIL_SUBJECT.format(self.tickets[0].id),
render_to_string(
'mail/subscriber_added.txt', {
'ticket': self.tickets[0],
'name': self.users[0].display_name,
'site_name': settings.SITE_NAME
}
),
settings.DEFAULT_FROM_EMAIL,
[self.users[0].email]
])
| 33.132911 | 80 | 0.63362 | 1,107 | 10,470 | 5.813008 | 0.112014 | 0.081585 | 0.04662 | 0.067599 | 0.758819 | 0.722145 | 0.701166 | 0.678011 | 0.637296 | 0.625486 | 0 | 0.01249 | 0.250621 | 10,470 | 315 | 81 | 33.238095 | 0.807673 | 0 | 0 | 0.544304 | 0 | 0 | 0.072302 | 0.012607 | 0 | 0 | 0 | 0 | 0.147679 | 1 | 0.07173 | false | 0 | 0.042194 | 0 | 0.118143 | 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 |
3e0aedb8dadd5806fd35f0531765964c7e3e9f93 | 81 | py | Python | examples/develop/lp/002/__init__.py | cr0hn/OMSTD | 814eb60e36f2b6693dffa46c24f0bca190ed48c1 | [
"BSD-2-Clause"
] | 26 | 2015-01-26T15:34:03.000Z | 2021-02-25T03:02:57.000Z | examples/develop/st/003/__init__.py | cr0hn/OMSTD | 814eb60e36f2b6693dffa46c24f0bca190ed48c1 | [
"BSD-2-Clause"
] | null | null | null | examples/develop/st/003/__init__.py | cr0hn/OMSTD | 814eb60e36f2b6693dffa46c24f0bca190ed48c1 | [
"BSD-2-Clause"
] | 22 | 2015-01-03T00:27:51.000Z | 2021-02-24T18:56:28.000Z | # -*- coding: utf-8 -*-
__author__ = 'cr0hn - cr0hn<-at->cr0hn.com (@ggdaniel)'
| 20.25 | 55 | 0.592593 | 10 | 81 | 4.4 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.057971 | 0.148148 | 81 | 3 | 56 | 27 | 0.57971 | 0.259259 | 0 | 0 | 0 | 0 | 0.689655 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | null | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
3e13d9f04c5b9e380942a3048140fa5f7f9bee3d | 919 | py | Python | patterns/creational/factory_method.py | zhaijingrong/patterns_in_python | 8cb53a58cbb78dc7ed578887a8e7c481cfa72c80 | [
"MIT"
] | null | null | null | patterns/creational/factory_method.py | zhaijingrong/patterns_in_python | 8cb53a58cbb78dc7ed578887a8e7c481cfa72c80 | [
"MIT"
] | null | null | null | patterns/creational/factory_method.py | zhaijingrong/patterns_in_python | 8cb53a58cbb78dc7ed578887a8e7c481cfa72c80 | [
"MIT"
] | null | null | null | """
抽象工厂方法--对象创建型模式
1. 目标
定义一个用于创建对象的接口, 让子类决定实例化哪一个类, 使一个类的实例化延迟到子类。
"""
class CakeFactory(object):
def make_cake(self):
print('make a cake')
class CreamCakeFactory(CakeFactory):
def make_cake(self):
print('make a cream cake')
return CreamCake()
class FruitCakeFactory(CakeFactory):
def make_cake(self):
print('make a fruit cake')
return FruitCake()
class Cake(object):
def __repr__(self):
return 'This is a cake'
class CreamCake(Cake):
def __repr__(self):
return 'This is a cream cake'
class FruitCake(Cake):
def __repr__(self):
return 'This is a fruit cake'
if __name__ == '__main__':
cream_cake_factory = CreamCakeFactory()
cream_cake = cream_cake_factory.make_cake()
print(cream_cake)
fruit_cake_factory = FruitCakeFactory()
fruit_cake = fruit_cake_factory.make_cake()
print(fruit_cake) | 19.145833 | 47 | 0.671382 | 112 | 919 | 5.178571 | 0.267857 | 0.093103 | 0.056897 | 0.077586 | 0.387931 | 0.305172 | 0.305172 | 0.22069 | 0 | 0 | 0 | 0.001408 | 0.227421 | 919 | 48 | 48 | 19.145833 | 0.815493 | 0.071817 | 0 | 0.222222 | 0 | 0 | 0.126627 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0.222222 | false | 0 | 0 | 0.111111 | 0.62963 | 0.185185 | 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 |
3e3bf58cf5c34f249c2596d9cc528ff41686bfa7 | 286 | py | Python | tbans/consts/iid_error.py | BookWorm0103/the-blue-alliance | 39b2f33531308b19218d58c726d51f020ee9d8b5 | [
"MIT"
] | null | null | null | tbans/consts/iid_error.py | BookWorm0103/the-blue-alliance | 39b2f33531308b19218d58c726d51f020ee9d8b5 | [
"MIT"
] | null | null | null | tbans/consts/iid_error.py | BookWorm0103/the-blue-alliance | 39b2f33531308b19218d58c726d51f020ee9d8b5 | [
"MIT"
] | null | null | null | class IIDError:
INTERNAL_ERROR = 'internal-error'
UNKNOWN_ERROR = 'unknown-error'
ERROR_CODES = {
400: 'invalid-argument',
401: 'authentication-error',
403: 'authentication-error',
500: INTERNAL_ERROR,
503: 'server-unavailable'
}
| 26 | 37 | 0.611888 | 27 | 286 | 6.333333 | 0.592593 | 0.22807 | 0.19883 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.072115 | 0.272727 | 286 | 10 | 38 | 28.6 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0.353147 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | false | 0 | 0 | 0 | 0.4 | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.