hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f4547f32ba2dd53a8a0e71fc993cc07d7d1a58ed | 2,384 | py | Python | python/handwritten_baseline/pipeline/model/feature_extr/debug.py | UKPLab/cdcr-beyond-corpus-tailored | 52bf98692c7464f25628baea24addd1a988f9a1f | [
"Apache-2.0"
] | 10 | 2020-11-28T05:01:04.000Z | 2021-12-21T19:34:00.000Z | python/handwritten_baseline/pipeline/model/feature_extr/debug.py | UKPLab/cdcr-beyond-corpus-tailored | 52bf98692c7464f25628baea24addd1a988f9a1f | [
"Apache-2.0"
] | 1 | 2022-03-12T07:20:39.000Z | 2022-03-16T05:11:38.000Z | python/handwritten_baseline/pipeline/model/feature_extr/debug.py | UKPLab/cdcr-beyond-corpus-tailored | 52bf98692c7464f25628baea24addd1a988f9a1f | [
"Apache-2.0"
] | 1 | 2021-12-21T19:34:08.000Z | 2021-12-21T19:34:08.000Z | import pprint
from typing import Optional, List, Tuple, Set, Dict
import numpy as np
from overrides import overrides
from python.handwritten_baseline.pipeline.data.base import Dataset
from python.handwritten_baseline.pipeline.model.feature_extr import DEBUG_EXTR
from python.handwritten_baseline.pipeline.model.feature... | 43.345455 | 127 | 0.684983 | 2,016 | 0.845638 | 0 | 0 | 1,511 | 0.633809 | 0 | 0 | 286 | 0.119966 |
f454b6de1f5f5d7ea1e9cef6495a08d3a75a9606 | 1,253 | py | Python | kunquat/tracker/errorbase.py | cyberixae/kunquat | 06ae72b2c1519686cc510ce887d9d45a5c3fa3a3 | [
"CC0-1.0"
] | null | null | null | kunquat/tracker/errorbase.py | cyberixae/kunquat | 06ae72b2c1519686cc510ce887d9d45a5c3fa3a3 | [
"CC0-1.0"
] | null | null | null | kunquat/tracker/errorbase.py | cyberixae/kunquat | 06ae72b2c1519686cc510ce887d9d45a5c3fa3a3 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Author: Tomi Jylhä-Ollila, Finland 2014
#
# This file is part of Kunquat.
#
# CC0 1.0 Universal, http://creativecommons.org/publicdomain/zero/1.0/
#
# To the extent possible under law, Kunquat Affirmers have waived all
# copyright and related or neighboring rights to Kunquat.
#
from __futu... | 24.096154 | 71 | 0.73344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 540 | 0.430622 |
f456221256fc52688ca188318ed96a52141502e3 | 4,311 | py | Python | venv/lib/python3.5/site-packages/igraph/test/atlas.py | dtklinh/Protein-Rigid-Domains-Estimation | a27152ef5437eb87ee31c317091356c4787f82a4 | [
"MIT"
] | 2 | 2021-03-04T16:57:06.000Z | 2021-08-11T01:42:29.000Z | venv/lib/python3.5/site-packages/igraph/test/atlas.py | dtklinh/Protein-Rigid-Domains-Estimation | a27152ef5437eb87ee31c317091356c4787f82a4 | [
"MIT"
] | null | null | null | venv/lib/python3.5/site-packages/igraph/test/atlas.py | dtklinh/Protein-Rigid-Domains-Estimation | a27152ef5437eb87ee31c317091356c4787f82a4 | [
"MIT"
] | null | null | null |
import warnings
import unittest
from igraph import *
class TestBase(unittest.TestCase):
def testPageRank(self):
for idx, g in enumerate(self.__class__.graphs):
try:
pr = g.pagerank()
except Exception as ex:
self.assertTrue(False, msg="PageRank calcu... | 38.491071 | 118 | 0.52424 | 3,946 | 0.915333 | 0 | 0 | 0 | 0 | 0 | 0 | 932 | 0.216191 |
f4564217958b77537d1072c7c3fc29f0c202d7e9 | 3,509 | py | Python | pycspr/types/cl.py | momipsl/pycspr | 82c1ca003525a3d205d2aa3b7da5d1ecd275e9b5 | [
"Apache-2.0"
] | 2 | 2021-04-14T13:49:20.000Z | 2021-07-06T22:07:02.000Z | pycspr/types/cl.py | momipsl/pycspr | 82c1ca003525a3d205d2aa3b7da5d1ecd275e9b5 | [
"Apache-2.0"
] | null | null | null | pycspr/types/cl.py | momipsl/pycspr | 82c1ca003525a3d205d2aa3b7da5d1ecd275e9b5 | [
"Apache-2.0"
] | 1 | 2021-04-15T12:52:42.000Z | 2021-04-15T12:52:42.000Z | import dataclasses
import enum
class CLType(enum.Enum):
"""Enumeration over set of CL types.
"""
BOOL = 0
I32 = 1
I64 = 2
U8 = 3
U32 = 4
U64 = 5
U128 = 6
U256 = 7
U512 = 8
UNIT = 9
STRING = 10
KEY = 11
UREF = 12
OPTION = 13
LIST = 14
BYTE_A... | 21.396341 | 85 | 0.667427 | 2,883 | 0.821602 | 0 | 0 | 2,705 | 0.770875 | 0 | 0 | 1,607 | 0.457965 |
f456c15808160c57f2b68cffa03b0cdb9fe05135 | 1,668 | py | Python | google/cloud/aiplatform_v1/types/env_var.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | null | null | null | google/cloud/aiplatform_v1/types/env_var.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | 1 | 2021-02-12T23:56:38.000Z | 2021-02-12T23:56:38.000Z | google/cloud/aiplatform_v1/types/env_var.py | nachocano/python-aiplatform | 1c6b998d9145309d79712f494a2b00b50a9a9bf4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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 o... | 34.040816 | 88 | 0.688249 | 894 | 0.535971 | 0 | 0 | 0 | 0 | 0 | 0 | 1,399 | 0.838729 |
f45776dc27791b0b8c76dabaff8a799c99fa956b | 3,119 | py | Python | tools/borplay/packlib.py | MrCoolSpan/openbor | 846cfeb924906849c8a11e76c442e47286b707ea | [
"BSD-3-Clause"
] | 25 | 2015-03-10T06:14:12.000Z | 2021-04-28T03:42:32.000Z | tools/borplay/packlib.py | MrCoolSpan/openbor | 846cfeb924906849c8a11e76c442e47286b707ea | [
"BSD-3-Clause"
] | 2 | 2019-09-29T11:35:30.000Z | 2021-02-08T11:10:32.000Z | tools/borplay/packlib.py | MrCoolSpan/openbor | 846cfeb924906849c8a11e76c442e47286b707ea | [
"BSD-3-Clause"
] | 18 | 2015-03-14T02:43:26.000Z | 2020-07-24T02:08:58.000Z | # Copyright (c) 2009 Bryan Cain ("Plombo")
# Class and functions to read .PAK files.
import struct
from cStringIO import StringIO
class PackFileReader(object):
''' Represents a BOR packfile. '''
files = dict() # the index holding the location of each file
packfile = None # the file object
def __in... | 29.990385 | 102 | 0.655338 | 2,259 | 0.724271 | 0 | 0 | 0 | 0 | 0 | 0 | 1,387 | 0.444694 |
f4584cfc0d782e8ed0b2d30fb8fdd386a63762a3 | 1,017 | py | Python | artascope/src/web/app.py | magus0219/icloud-photo-downloader | 6334530d971cf61089d031de99a38f204c201837 | [
"MIT"
] | 3 | 2020-09-24T16:19:28.000Z | 2022-02-09T21:10:11.000Z | artascope/src/web/app.py | magus0219/icloud-photo-downloader | 6334530d971cf61089d031de99a38f204c201837 | [
"MIT"
] | null | null | null | artascope/src/web/app.py | magus0219/icloud-photo-downloader | 6334530d971cf61089d031de99a38f204c201837 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Created by magus0219[magus0219@gmail.com] on 2020/3/23
from types import FunctionType
from flask import (
Flask,
redirect,
url_for,
)
import artascope.src.web.lib.filter as module_filter
from artascope.src.web.lib.content_processor import inject_version
d... | 23.113636 | 66 | 0.67355 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.222222 |
f4584d9b2545719be7d26d0474bfda0fc16fc902 | 2,251 | py | Python | tests/common/test_op/scatter_nd.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | tests/common/test_op/scatter_nd.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | tests/common/test_op/scatter_nd.py | KnowingNothing/akg-test | 114d8626b824b9a31af50a482afc07ab7121862b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Huawei Technologies Co., Ltd
#
# 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... | 37.516667 | 105 | 0.676588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,180 | 0.524211 |
f458c5e01d9e2170ec0f7c2f7180c5b33bb75bc9 | 16,446 | py | Python | spc/backend_utils.py | adamnew123456/spc | 8809d1817f66cf8266f145aa0c2474b32dc1087a | [
"MIT"
] | 1 | 2017-10-15T19:55:48.000Z | 2017-10-15T19:55:48.000Z | spc/backend_utils.py | adamnew123456/spc | 8809d1817f66cf8266f145aa0c2474b32dc1087a | [
"MIT"
] | null | null | null | spc/backend_utils.py | adamnew123456/spc | 8809d1817f66cf8266f145aa0c2474b32dc1087a | [
"MIT"
] | null | null | null | """
Utility functions and classes shared by multiple backends
"""
from collections import namedtuple
import logging
from . import symbols
from . import types
LOGGER = logging.getLogger('spc.backend_utils')
# NameContexts encapsulate both the function stack (which holds values) and
# the symbol table context (which b... | 34.2625 | 93 | 0.623921 | 15,260 | 0.927885 | 0 | 0 | 650 | 0.039523 | 0 | 0 | 6,712 | 0.408124 |
f45a0afb4a750100d6616bb61de6015d31db9869 | 25 | py | Python | heareval/__init__.py | neuralaudio/hear-eval-kit | f92119592954544dfb417f8e9aea21eadb4a65d0 | [
"Apache-2.0"
] | 24 | 2021-07-26T21:21:46.000Z | 2022-03-30T08:10:13.000Z | heareval/__init__.py | neuralaudio/hear-eval-kit | f92119592954544dfb417f8e9aea21eadb4a65d0 | [
"Apache-2.0"
] | 196 | 2021-07-26T17:58:23.000Z | 2022-01-26T17:40:25.000Z | heareval/__init__.py | neuralaudio/hear-eval-kit | f92119592954544dfb417f8e9aea21eadb4a65d0 | [
"Apache-2.0"
] | 3 | 2021-08-10T13:12:53.000Z | 2022-03-19T05:00:50.000Z | __version__ = "2021.0.6"
| 12.5 | 24 | 0.68 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.4 |
f45c36a2a7c87d236af65ffb124e4f77205e7048 | 744 | py | Python | recommender_engine/similarity_measure/__init__.py | tranlyvu/recommender | 4985c355d54ee22ba48f4891077fd7e12bd21b47 | [
"Apache-2.0"
] | 8 | 2019-03-14T07:53:51.000Z | 2021-06-22T06:19:32.000Z | recommender_engine/similarity_measure/__init__.py | tranlyvu/recommender-engine | 4985c355d54ee22ba48f4891077fd7e12bd21b47 | [
"Apache-2.0"
] | 3 | 2018-01-16T06:48:55.000Z | 2020-05-04T01:43:14.000Z | recommender_engine/similarity_measure/__init__.py | tranlyvu/recommender-engine | 4985c355d54ee22ba48f4891077fd7e12bd21b47 | [
"Apache-2.0"
] | 1 | 2019-03-14T07:53:59.000Z | 2019-03-14T07:53:59.000Z | """
recommender_engine
-----
recommender_engine is a recommendation application using either item-based or user-based approaches
:copyright: (c) 2016 - 2019 by Tran Ly Vu. All Rights Reserved.
:license: Apache License 2.0
"""
from .cosine import cosine
from .euclidean_distance import euclidean_distance
from .p... | 33.818182 | 100 | 0.766129 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 480 | 0.645161 |
f45caefa61ce261896189f11de67dd4621b4cff1 | 44 | py | Python | code/abc057_a_02.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | 3 | 2019-08-16T16:55:48.000Z | 2021-04-11T10:21:40.000Z | code/abc057_a_02.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | code/abc057_a_02.py | KoyanagiHitoshi/AtCoder | 731892543769b5df15254e1f32b756190378d292 | [
"MIT"
] | null | null | null | a,b=map(int,input().split())
print((a+b)%24) | 22 | 28 | 0.613636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f45d781494a8e177d3301348e5cd3f98b7503c8a | 1,925 | py | Python | 8/8_9.py | kopsh/python_cookbook | 298c092cd20404a0755e2170776c44a04e8648ad | [
"CNRI-Python"
] | null | null | null | 8/8_9.py | kopsh/python_cookbook | 298c092cd20404a0755e2170776c44a04e8648ad | [
"CNRI-Python"
] | null | null | null | 8/8_9.py | kopsh/python_cookbook | 298c092cd20404a0755e2170776c44a04e8648ad | [
"CNRI-Python"
] | null | null | null | class CheckType:
r"""
8.9 创建新的类或实例属性
使用描述器,实现参数类型检查
>>> @ParamAssert(a=int, b=list)
... class A:
... def __init__(self, a, b):
... self.a = a
... self.b = b
>>> a = A(1, [])
"""
def __init__(self, name, expected_type):
self.name = name
sel... | 25.666667 | 106 | 0.535584 | 1,895 | 0.960466 | 0 | 0 | 0 | 0 | 0 | 0 | 530 | 0.268626 |
f45dfb481b367182927b34141a1df143252d871f | 7,306 | py | Python | test/examples/test_simple_gp_regression.py | ediphy-dwild/gpytorch | 559c78a6446237ed7cc8e1cc7cf4ed8bf31a3c8a | [
"MIT"
] | null | null | null | test/examples/test_simple_gp_regression.py | ediphy-dwild/gpytorch | 559c78a6446237ed7cc8e1cc7cf4ed8bf31a3c8a | [
"MIT"
] | null | null | null | test/examples/test_simple_gp_regression.py | ediphy-dwild/gpytorch | 559c78a6446237ed7cc8e1cc7cf4ed8bf31a3c8a | [
"MIT"
] | null | null | null | import math
import torch
import unittest
import gpytorch
from torch import optim
from torch.autograd import Variable
from gpytorch.kernels import RBFKernel
from gpytorch.means import ConstantMean
from gpytorch.likelihoods import GaussianLikelihood
from gpytorch.random_variables import GaussianRandomVariable
# Simple ... | 38.861702 | 88 | 0.634684 | 6,673 | 0.913359 | 0 | 0 | 0 | 0 | 0 | 0 | 883 | 0.12086 |
f45ec536c2f2748641c051d8785db2394218cb3f | 4,264 | py | Python | samples/RiskManagement/Verification/customer-match-denied-parties-list.py | snavinch/cybersource-rest-samples-python | adb7a6b4b55dff6ac833295192d6677b53003c16 | [
"MIT"
] | 21 | 2019-01-22T17:48:32.000Z | 2022-02-07T17:40:58.000Z | samples/RiskManagement/Verification/customer-match-denied-parties-list.py | broadpay/cybersource-rest-samples-python | f7af6f58c70ea3bf725d34929b40ee4b5fd4d77c | [
"MIT"
] | 10 | 2018-12-03T22:45:17.000Z | 2021-04-19T20:40:14.000Z | samples/RiskManagement/Verification/customer-match-denied-parties-list.py | broadpay/cybersource-rest-samples-python | f7af6f58c70ea3bf725d34929b40ee4b5fd4d77c | [
"MIT"
] | 29 | 2018-11-09T11:44:53.000Z | 2022-03-18T08:56:46.000Z | from CyberSource import *
import os
import json
from importlib.machinery import SourceFileLoader
config_file = os.path.join(os.getcwd(), "data", "Configuration.py")
configuration = SourceFileLoader("module.name", config_file).load_module()
# To delete None values in Input Request Json body
def del_none(d):
for ke... | 38.414414 | 97 | 0.754221 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.106707 |
f45ec6261b1911d698e1ee71b90cc7668913450f | 936 | py | Python | SimulatePi.py | Lucchese-Anthony/MonteCarloSimulation | 45a625b88dab6658b43b472d49d82aaeb1e847bd | [
"CC0-1.0"
] | null | null | null | SimulatePi.py | Lucchese-Anthony/MonteCarloSimulation | 45a625b88dab6658b43b472d49d82aaeb1e847bd | [
"CC0-1.0"
] | null | null | null | SimulatePi.py | Lucchese-Anthony/MonteCarloSimulation | 45a625b88dab6658b43b472d49d82aaeb1e847bd | [
"CC0-1.0"
] | null | null | null | import numpy as np
import random
import math
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from matplotlib import style
angle = np.linspace( 0 , 2 * np.pi , 150)
radius = 1
x = radius * np.cos(angle)
y = radius * np.sin(angle)
#prints the circle
style.use('fivethirtyeight')
fig = plt.f... | 21.272727 | 55 | 0.628205 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.054487 |
f45faefa310c1d7891d6abffc0a5f0a804569172 | 219 | py | Python | run.py | aarvanitii/adminWebsite | cf9a07c287571ebbc9954326806b578f6d19a11b | [
"MIT"
] | null | null | null | run.py | aarvanitii/adminWebsite | cf9a07c287571ebbc9954326806b578f6d19a11b | [
"MIT"
] | null | null | null | run.py | aarvanitii/adminWebsite | cf9a07c287571ebbc9954326806b578f6d19a11b | [
"MIT"
] | null | null | null | """
This is where the web application starts running
"""
from app.index import create_app
app = create_app()
if __name__ == "__main__":
app.secret_key = 'mysecret'
app.run(port=8080, host="0.0.0.0", debug=True) | 24.333333 | 50 | 0.694064 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.388128 |
f45fea1b8823dbd01877ae9035e910e81d5b7faa | 267 | py | Python | tareas/3/GarciaFigueroaAlberto-GarciaEdgar/Proceso.py | jorgelmp/sistop-2022-1 | 5c3b7e5215247533446aa006affe6cc64a48d989 | [
"CC-BY-4.0"
] | 6 | 2021-08-30T19:11:57.000Z | 2021-09-05T01:30:59.000Z | tareas/3/GarciaFigueroaAlberto-GarciaEdgar/Proceso.py | jorgelmp/sistop-2022-1 | 5c3b7e5215247533446aa006affe6cc64a48d989 | [
"CC-BY-4.0"
] | 13 | 2021-09-07T22:24:47.000Z | 2021-11-23T05:26:38.000Z | tareas/3/GarciaFigueroaAlberto-GarciaEdgar/Proceso.py | jorgelmp/sistop-2022-1 | 5c3b7e5215247533446aa006affe6cc64a48d989 | [
"CC-BY-4.0"
] | 33 | 2021-09-01T00:44:27.000Z | 2022-02-09T06:17:55.000Z | class Proceso:
def __init__(self,tiempo_de_llegada,t,id):
self.t=t
self.tiempo_de_llegada=tiempo_de_llegada
self.id=id
self.inicio=0
self.fin=0
self.T=0
self.E=0
self.P=0
self.tRestantes = t
| 22.25 | 48 | 0.565543 | 266 | 0.996255 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f460edaf40609072f5da235373227615b76ded70 | 804 | py | Python | Algo and DSA/LeetCode-Solutions-master/Python/smallest-greater-multiple-made-of-two-digits.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 3,269 | 2018-10-12T01:29:40.000Z | 2022-03-31T17:58:41.000Z | Algo and DSA/LeetCode-Solutions-master/Python/smallest-greater-multiple-made-of-two-digits.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 53 | 2018-12-16T22:54:20.000Z | 2022-02-25T08:31:20.000Z | Algo and DSA/LeetCode-Solutions-master/Python/smallest-greater-multiple-made-of-two-digits.py | Sourav692/FAANG-Interview-Preparation | f523e5c94d582328b3edc449ea16ac6ab28cdc81 | [
"Unlicense"
] | 1,236 | 2018-10-12T02:51:40.000Z | 2022-03-30T13:30:37.000Z | # Time: sum(O(l * 2^l) for l in range(1, 11)) = O(20 * 2^10) = O(1)
# Space: O(1)
class Solution(object):
def findInteger(self, k, digit1, digit2):
"""
:type k: int
:type digit1: int
:type digit2: int
:rtype: int
"""
MAX_NUM_OF_DIGITS = 10
INT_MAX = ... | 28.714286 | 69 | 0.452736 | 719 | 0.894279 | 0 | 0 | 0 | 0 | 0 | 0 | 189 | 0.235075 |
f4647df8f083e67396d2554f67110e5d8f963972 | 7,875 | py | Python | aldryn_people/tests/test_plugins.py | compoundpartners/js-people | a3744c3880f6626e677034a693f337c927baf886 | [
"BSD-3-Clause"
] | null | null | null | aldryn_people/tests/test_plugins.py | compoundpartners/js-people | a3744c3880f6626e677034a693f337c927baf886 | [
"BSD-3-Clause"
] | 1 | 2019-01-15T16:06:44.000Z | 2019-01-15T16:06:44.000Z | aldryn_people/tests/test_plugins.py | compoundpartners/js-people | a3744c3880f6626e677034a693f337c927baf886 | [
"BSD-3-Clause"
] | 1 | 2019-01-09T11:53:59.000Z | 2019-01-09T11:53:59.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
try:
from django.core.urlresolvers import reverse
except ImportError:
# Django 2.0
from django.urls import reverse
from django.utils.translation import force_text
from cms import api
from cms.utils.i18n import force_language
from aldryn_peop... | 38.985149 | 80 | 0.657143 | 7,392 | 0.938667 | 0 | 0 | 0 | 0 | 0 | 0 | 1,340 | 0.170159 |
f464a115da93371471e70429639150e5a6c40508 | 661 | py | Python | turbo_transformers/python/tests/__init__.py | xcnick/TurboTransformers | 48b6ba09af2219616c6b97cc5c09222408e080c2 | [
"BSD-3-Clause"
] | 1,147 | 2020-04-24T06:45:50.000Z | 2022-03-30T15:33:16.000Z | turbo_transformers/python/tests/__init__.py | xcnick/TurboTransformers | 48b6ba09af2219616c6b97cc5c09222408e080c2 | [
"BSD-3-Clause"
] | 140 | 2020-04-25T10:54:15.000Z | 2022-03-11T08:13:11.000Z | turbo_transformers/python/tests/__init__.py | xcnick/TurboTransformers | 48b6ba09af2219616c6b97cc5c09222408e080c2 | [
"BSD-3-Clause"
] | 151 | 2020-04-24T06:49:01.000Z | 2022-03-21T13:48:54.000Z | # Copyright (C) 2020 THL A29 Limited, a Tencent company.
# All rights reserved.
# Licensed under the BSD 3-Clause License (the "License"); you may
# not use this file except in compliance with the License. You may
# obtain a copy of the License at
# https://opensource.org/licenses/BSD-3-Clause
# Unless required by appl... | 50.846154 | 69 | 0.774584 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 649 | 0.981846 |
f465aa8f0880334955fcdd358466dab059344d4b | 355 | py | Python | generate_joke.py | audreymychan/djsmile | 8dc5d6337f1b32db8bf3dfbf13315ec25049ebb5 | [
"MIT"
] | 5 | 2019-05-30T20:15:34.000Z | 2020-04-16T08:21:16.000Z | generate_joke.py | audreymychan/djsmile | 8dc5d6337f1b32db8bf3dfbf13315ec25049ebb5 | [
"MIT"
] | 5 | 2021-08-25T14:43:34.000Z | 2022-02-10T00:14:09.000Z | generate_joke.py | audreymychan/djsmile | 8dc5d6337f1b32db8bf3dfbf13315ec25049ebb5 | [
"MIT"
] | null | null | null | # This script contains the get_joke() function to generate a new dad joke
import requests
def get_joke():
"""Return new joke string from icanhazdadjoke.com."""
url = "https://icanhazdadjoke.com/"
response = requests.get(url, headers={'Accept': 'application/json'})
raw_joke = response.json()
joke ... | 27.307692 | 73 | 0.687324 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 187 | 0.526761 |
f4677aa07e0ad3e8da44d44b35bfb9d27f0006a2 | 136 | py | Python | bot/tests/test_triggers/__init__.py | elihschiff/Rubber-Duck-Python | 24dea3b64a8a46368cd8dd995c800375f355b55e | [
"MIT"
] | 7 | 2020-07-07T20:58:14.000Z | 2021-12-23T02:51:20.000Z | bot/tests/test_triggers/__init__.py | elihschiff/Rubber-Duck-Python | 24dea3b64a8a46368cd8dd995c800375f355b55e | [
"MIT"
] | null | null | null | bot/tests/test_triggers/__init__.py | elihschiff/Rubber-Duck-Python | 24dea3b64a8a46368cd8dd995c800375f355b55e | [
"MIT"
] | 1 | 2020-03-29T13:36:43.000Z | 2020-03-29T13:36:43.000Z | from .test_commands import all_commands
all_triggers = all_commands
from .test_quack import TestQuack
all_triggers.append(TestQuack)
| 17 | 39 | 0.845588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f467e6d9c07196905aa29d2a65e967cb8686b8d6 | 445 | py | Python | src/main/scripts/crassus_deployer_lambda.py | Scout24/crassus | 8e3d5ff073181cabaf0e764c3d8be18fc7d27992 | [
"Apache-2.0"
] | null | null | null | src/main/scripts/crassus_deployer_lambda.py | Scout24/crassus | 8e3d5ff073181cabaf0e764c3d8be18fc7d27992 | [
"Apache-2.0"
] | null | null | null | src/main/scripts/crassus_deployer_lambda.py | Scout24/crassus | 8e3d5ff073181cabaf0e764c3d8be18fc7d27992 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from crassus import Crassus
from crassus.output_converter import OutputConverter
def handler(event, context):
crassus = Crassus(event, context)
crassus.deploy()
def cfn_output_converter(event, context):
"""
Convert an AWS CloudFormation output message to our def... | 24.722222 | 63 | 0.759551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 101 | 0.226966 |
f4680fe37289f7c11ee4bd2ba12292268d591a53 | 1,960 | py | Python | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/pyreadline/clipboard/__init__.py | tchamabe1979/exareme | 462983e4feec7808e1fd447d02901502588a8879 | [
"MIT"
] | null | null | null | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/pyreadline/clipboard/__init__.py | tchamabe1979/exareme | 462983e4feec7808e1fd447d02901502588a8879 | [
"MIT"
] | null | null | null | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/pyreadline/clipboard/__init__.py | tchamabe1979/exareme | 462983e4feec7808e1fd447d02901502588a8879 | [
"MIT"
] | null | null | null | import sys
success = False
in_ironpython = "IronPython" in sys.version
if in_ironpython:
try:
from ironpython_clipboard import GetClipboardText, SetClipboardText
success = True
except ImportError:
pass
else:
try:
from win32_clipboard import GetClipboardText, SetClipboardTex... | 24.810127 | 79 | 0.558673 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 242 | 0.123469 |
f4689432e90e3326c569ffdf5beb1c42f606d0c9 | 17,634 | py | Python | mjrl/utils/train_agent.py | YujieLu10/tslam | 1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd | [
"Apache-2.0"
] | null | null | null | mjrl/utils/train_agent.py | YujieLu10/tslam | 1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd | [
"Apache-2.0"
] | null | null | null | mjrl/utils/train_agent.py | YujieLu10/tslam | 1341dbecdf02ee6b1b6cdd1a538272fffdea6ffd | [
"Apache-2.0"
] | null | null | null | import logging
logging.disable(logging.CRITICAL)
import math
from tabulate import tabulate
from mjrl.utils.make_train_plots import make_train_plots
from mjrl.utils.gym_env import GymEnv
from mjrl.samplers.core import sample_paths
import numpy as np
import torch
import pickle
import imageio
import time as timer
import o... | 46.898936 | 260 | 0.60304 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,034 | 0.228763 |
f4691a885e026834c8813dea028eee2eea8dcb79 | 4,499 | py | Python | src/tests/plugins/banktransfer/test_refund_export.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/tests/plugins/banktransfer/test_refund_export.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/tests/plugins/banktransfer/test_refund_export.py | NicsTr/pretix | e6d2380d9ed1836cc64a688b2be20d00a8500eab | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import json
from datetime import timedelta
from decimal import Decimal
import pytest
from django.utils.timezone import now
from pretix.base.models import Event, Order, OrderRefund, Organizer, Team, User
from pretix.plugins.banktransfer.models import RefundExport
from pretix.plugins.banktransfer.views import (
_ro... | 33.080882 | 100 | 0.608357 | 0 | 0 | 0 | 0 | 2,532 | 0.562792 | 0 | 0 | 1,432 | 0.318293 |
f469f8b898acc53c702a295cba9f7c500ecfacd0 | 872 | py | Python | datawinners/alldata/urls.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/alldata/urls.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/alldata/urls.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8
from django.conf.urls.defaults import patterns, url
from datawinners.alldata.views import get_entity_list_by_type
from datawinners.alldata.views import smart_phone_instruction
from datawinners.alldata.views import index, reports
from datawinners.alldata.views import failed_s... | 48.444444 | 114 | 0.751147 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 332 | 0.380734 |
f469fb9c0617beca4380191f4e87136c8e35c588 | 4,804 | py | Python | NewLifeUtils/LoggerModule.py | NewLife1324/NewLifeUtils-Dev | d955ad801da879d2888506853b0d0141c15dfafc | [
"MIT"
] | 2 | 2020-12-12T17:45:34.000Z | 2020-12-16T15:00:05.000Z | NewLifeUtils/LoggerModule.py | NewLife1324/NewLifeUtils | d955ad801da879d2888506853b0d0141c15dfafc | [
"MIT"
] | null | null | null | NewLifeUtils/LoggerModule.py | NewLife1324/NewLifeUtils | d955ad801da879d2888506853b0d0141c15dfafc | [
"MIT"
] | null | null | null | from NewLifeUtils.ColorModule import ACC, MCC
from NewLifeUtils.UtilsModule import hex_to_rgb
from NewLifeUtils.FileModule import DataStorage, LogFile
from NewLifeUtils.StringUtilModule import remove_csi
from datetime import datetime
import sys
class Formatter(dict):
def __init__(self, *args, date_format="%d-%m-%... | 39.056911 | 164 | 0.580766 | 956 | 0.199001 | 0 | 0 | 0 | 0 | 0 | 0 | 1,208 | 0.251457 |
f46ac6dc3031a12623e226f71b58aeded4ff617c | 440 | py | Python | config/api_urls.py | elcolie/battleship | 71b0a963c5b24ae243a193749813fec321d5f4d8 | [
"MIT"
] | null | null | null | config/api_urls.py | elcolie/battleship | 71b0a963c5b24ae243a193749813fec321d5f4d8 | [
"MIT"
] | 3 | 2018-04-22T04:40:25.000Z | 2020-06-05T19:10:08.000Z | config/api_urls.py | elcolie/battleship | 71b0a963c5b24ae243a193749813fec321d5f4d8 | [
"MIT"
] | null | null | null | from rest_framework import routers
from boards.api.viewsets import BoardViewSet
from fleets.api.viewsets import FleetViewSet
from missiles.api.viewsets import MissileViewSet
app_name = 'api'
router = routers.DefaultRouter()
router.register(r'boards', BoardViewSet, base_name='board')
router.register(r'fleets', FleetV... | 29.333333 | 65 | 0.811364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 57 | 0.129545 |
f46b0b539cef945ee6aa318ff4cb5a94326430db | 6,290 | py | Python | mealpy/evolutionary_based/MA.py | Alhassan20/mealpy | 7ed365c5c495ad1c1e066662c90159b3d5e9b8e3 | [
"MIT"
] | 1 | 2021-08-07T16:30:48.000Z | 2021-08-07T16:30:48.000Z | mealpy/evolutionary_based/MA.py | Alhassan20/mealpy | 7ed365c5c495ad1c1e066662c90159b3d5e9b8e3 | [
"MIT"
] | null | null | null | mealpy/evolutionary_based/MA.py | Alhassan20/mealpy | 7ed365c5c495ad1c1e066662c90159b3d5e9b8e3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# ------------------------------------------------------------------------------------------------------%
# Created by "Thieu Nguyen" at 14:22, 11/04/2020 %
# ... | 42.214765 | 134 | 0.550397 | 5,451 | 0.866614 | 0 | 0 | 0 | 0 | 0 | 0 | 2,097 | 0.333386 |
f46c203558ba08eaf57d58a68abbbd1315976d22 | 16,106 | py | Python | src/estimagic/estimation/estimate_ml.py | OpenSourceEconomics/estimagic | 85163b4cdc601d60d654c6ca1f42b9db17a130a3 | [
"MIT"
] | 83 | 2019-09-26T04:44:03.000Z | 2022-03-17T20:24:02.000Z | src/estimagic/estimation/estimate_ml.py | OpenSourceEconomics/estimagic | 85163b4cdc601d60d654c6ca1f42b9db17a130a3 | [
"MIT"
] | 243 | 2019-06-25T18:15:53.000Z | 2022-03-26T09:17:44.000Z | src/estimagic/estimation/estimate_ml.py | OpenSourceEconomics/estimagic | 85163b4cdc601d60d654c6ca1f42b9db17a130a3 | [
"MIT"
] | 23 | 2019-07-03T11:16:55.000Z | 2022-03-07T00:57:38.000Z | from estimagic.inference.ml_covs import cov_cluster_robust
from estimagic.inference.ml_covs import cov_hessian
from estimagic.inference.ml_covs import cov_jacobian
from estimagic.inference.ml_covs import cov_robust
from estimagic.inference.ml_covs import cov_strata_robust
from estimagic.inference.shared import calculat... | 47.934524 | 88 | 0.626537 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10,193 | 0.63287 |
f46ca3af523c02675160a6c57c283a2d49c86f50 | 6,503 | py | Python | neural_architecture_search_appendix_a.py | NunoEdgarGFlowHub/neural_architecture_search_with_reinforcement_learning_appendix_a | 67e4876d428e5155f5526ee02875b0a89a52305d | [
"MIT"
] | 68 | 2017-01-31T06:35:53.000Z | 2021-02-24T09:39:55.000Z | neural_architecture_search_appendix_a.py | NunoEdgarGFlowHub/neural_architecture_search_with_reinforcement_learning_appendix_a | 67e4876d428e5155f5526ee02875b0a89a52305d | [
"MIT"
] | 3 | 2017-05-14T13:41:39.000Z | 2020-04-21T04:23:50.000Z | neural_architecture_search_appendix_a.py | NunoEdgarGFlowHub/neural_architecture_search_with_reinforcement_learning_appendix_a | 67e4876d428e5155f5526ee02875b0a89a52305d | [
"MIT"
] | 15 | 2017-03-16T03:04:46.000Z | 2018-07-05T15:07:39.000Z | import six
import chainer
import numpy as np
import chainer.links as L
import chainer.functions as F
import nutszebra_chainer
import functools
from collections import defaultdict
class Conv(nutszebra_chainer.Model):
def __init__(self, in_channel, out_channel, filter_size=(3, 3), stride=(1, 1), pad=(1, 1)):
... | 42.227273 | 138 | 0.531755 | 6,315 | 0.97109 | 0 | 0 | 1,089 | 0.167461 | 0 | 0 | 164 | 0.025219 |
f46d4201935576f7c5b0f071b01e8b9a5b4caddc | 2,945 | py | Python | test/test_proportions_delta.py | quizlet/abracadabra | eda599bd02f14b96efdc521f53132d93c9100ede | [
"MIT"
] | 24 | 2020-06-12T16:12:32.000Z | 2021-09-01T12:25:38.000Z | test/test_proportions_delta.py | quizlet/abracadabra | eda599bd02f14b96efdc521f53132d93c9100ede | [
"MIT"
] | 20 | 2020-06-12T06:26:08.000Z | 2022-03-12T00:57:51.000Z | test/test_proportions_delta.py | quizlet/abracadabra | eda599bd02f14b96efdc521f53132d93c9100ede | [
"MIT"
] | 4 | 2020-06-14T12:14:11.000Z | 2021-05-28T15:36:44.000Z | import pytest
from abra import Experiment, HypothesisTest
def test_large_proportions_delta_expermiment(proportions_data_large):
exp = Experiment(proportions_data_large, name='proportions-test')
# run 'A/A' test
test_aa = HypothesisTest(
metric='metric',
control='A', variation='A',
... | 29.45 | 80 | 0.69236 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 533 | 0.180985 |
f46d89c9f6b67abfd2563de23f0ea1549928a68e | 1,441 | py | Python | src/bootils/plugins/core/jsw.py | Build-The-Web/bootils | 8ee88f4d0583352f58fbb89c018e7caef8f07ce3 | [
"Apache-2.0"
] | 3 | 2015-03-25T23:00:58.000Z | 2018-01-03T15:50:41.000Z | src/bootils/plugins/core/jsw.py | Build-The-Web/bootils | 8ee88f4d0583352f58fbb89c018e7caef8f07ce3 | [
"Apache-2.0"
] | 8 | 2015-04-10T14:53:20.000Z | 2015-12-18T09:59:58.000Z | src/bootils/plugins/core/jsw.py | Build-The-Web/bootils | 8ee88f4d0583352f58fbb89c018e7caef8f07ce3 | [
"Apache-2.0"
] | 2 | 2015-09-10T13:01:09.000Z | 2018-03-04T20:46:09.000Z | # -*- coding: utf-8 -*-
# pylint: disable=
""" Tanuki Java Service Wrapper runtime environment.
Debian JSW paths (Wheezy 3.5.3; Jessie 3.5.22)::
/usr/sbin/wrapper – ELF executable
/usr/share/wrapper/daemon.sh
/usr/share/wrapper/make-wrapper-init.sh
/usr/share/wrapper/wrapper.conf
"... | 35.146341 | 74 | 0.700208 | 404 | 0.279778 | 0 | 0 | 0 | 0 | 0 | 0 | 1,103 | 0.76385 |
f46df9cfbed7221c6dfc035138710969c22cfd18 | 1,992 | py | Python | MachineLearning/hw1/models/LinearRegression.py | ChoKyuWon/SchoolProjects | 71a5decefc85ae941ba2d537c4507ba8e615cc34 | [
"MIT"
] | null | null | null | MachineLearning/hw1/models/LinearRegression.py | ChoKyuWon/SchoolProjects | 71a5decefc85ae941ba2d537c4507ba8e615cc34 | [
"MIT"
] | null | null | null | MachineLearning/hw1/models/LinearRegression.py | ChoKyuWon/SchoolProjects | 71a5decefc85ae941ba2d537c4507ba8e615cc34 | [
"MIT"
] | null | null | null | import numpy as np
class LinearRegression:
def __init__(self, num_features):
self.num_features = num_features
self.W = np.zeros((self.num_features, 1))
def train(self, x, y, epochs, batch_size, lr, optim):
final_loss = None # loss of final epoch
# Training should b... | 33.2 | 89 | 0.449799 | 1,982 | 0.988036 | 0 | 0 | 0 | 0 | 0 | 0 | 622 | 0.31007 |
f46e88c174121a507ecd5ff0eff0efa5c6c1e776 | 1,655 | py | Python | apps/bc_scraper/actions/schedule.py | aurmeneta/ramos-uc | 364ab3c5a55032ab7ffc08665a2da4c5ff04ae58 | [
"MIT"
] | 7 | 2021-07-14T18:13:35.000Z | 2021-11-21T20:10:54.000Z | apps/bc_scraper/actions/schedule.py | aurmeneta/ramos-uc | 364ab3c5a55032ab7ffc08665a2da4c5ff04ae58 | [
"MIT"
] | 57 | 2021-07-10T01:31:56.000Z | 2022-01-14T02:02:58.000Z | apps/bc_scraper/actions/schedule.py | aurmeneta/ramos-uc | 364ab3c5a55032ab7ffc08665a2da4c5ff04ae58 | [
"MIT"
] | 4 | 2021-07-23T16:51:55.000Z | 2021-08-31T02:41:41.000Z | from copy import copy
DEFAULT_SCHEDULE = {}
for day in "lmwjvs":
for mod in "12345678":
DEFAULT_SCHEDULE[day + mod] = "'FREE'"
def process_schedule(text_sc):
"""For a given schedule text in BC format, returns the SQL queries for inserting
the full schedule and schedule info. Those queries have t... | 33.77551 | 87 | 0.583686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 552 | 0.333535 |
f46f4f4b92656a15af396d51e27d17942b2af4aa | 9,739 | py | Python | openstack_dashboard/dashboards/admin/volumes/views.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | 1 | 2018-04-17T02:32:05.000Z | 2018-04-17T02:32:05.000Z | openstack_dashboard/dashboards/admin/volumes/views.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | 3 | 2021-01-21T14:27:55.000Z | 2021-06-10T23:08:49.000Z | openstack_dashboard/dashboards/admin/volumes/views.py | Surfndez/horizon | a56765b6b3dbc09fd467b83a57bea2433ae3909e | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 38.34252 | 78 | 0.652736 | 8,310 | 0.85327 | 0 | 0 | 1,499 | 0.153917 | 0 | 0 | 2,237 | 0.229695 |
f46f5e7244355f200cf15f2877d74e3a5f0c0027 | 26 | py | Python | tests/__init__.py | flowolf/yessssms | 438928967aca38d3d2bb07799d3723757e928553 | [
"MIT"
] | 6 | 2015-02-17T09:51:11.000Z | 2021-01-05T12:39:26.000Z | tests/__init__.py | flowolf/yessssms | 438928967aca38d3d2bb07799d3723757e928553 | [
"MIT"
] | 1 | 2019-09-19T20:07:22.000Z | 2019-09-24T09:24:04.000Z | tests/__init__.py | flowolf/yessssms | 438928967aca38d3d2bb07799d3723757e928553 | [
"MIT"
] | 2 | 2017-05-06T09:14:19.000Z | 2020-03-04T20:43:33.000Z | """Tests for YesssSMS."""
| 13 | 25 | 0.615385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 25 | 0.961538 |
f4710b19edd2c97dbafb4bd7d15c47788db38366 | 677 | py | Python | bldr/dep/env.py | bldr-cmd/bldr-cmd | 300750fbccc2987efd23f69b7b2d76d8563e2995 | [
"Apache-2.0"
] | null | null | null | bldr/dep/env.py | bldr-cmd/bldr-cmd | 300750fbccc2987efd23f69b7b2d76d8563e2995 | [
"Apache-2.0"
] | null | null | null | bldr/dep/env.py | bldr-cmd/bldr-cmd | 300750fbccc2987efd23f69b7b2d76d8563e2995 | [
"Apache-2.0"
] | null | null | null | # This is used by Environment to populate its env
# Due to circular dependencies it cannot reference other parts of bldr
import toml
def default(dotbldr_path: str) -> dict:
dep = {
'config': toml.load(f"{dotbldr_path}/dependency.toml"),
'lock': toml.load(f"{dotbldr_path}/dependency.lock.toml")
... | 37.611111 | 72 | 0.703102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 281 | 0.415066 |
f471777a68cf3b70989f0f48f2b4ea4d759a30a8 | 5,382 | py | Python | rasa-sample/actions.py | ijufumi/demo-python | b48bdebde172ca581a48346a77b12c30ff202e73 | [
"MIT"
] | null | null | null | rasa-sample/actions.py | ijufumi/demo-python | b48bdebde172ca581a48346a77b12c30ff202e73 | [
"MIT"
] | null | null | null | rasa-sample/actions.py | ijufumi/demo-python | b48bdebde172ca581a48346a77b12c30ff202e73 | [
"MIT"
] | null | null | null | import re
from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from rasa_sdk.events import SlotSet
import lark_module
class ActionHelloWorld(Action):
state_map = {}
def name(self) -> Text:
return "action_hello_world"
d... | 35.642384 | 120 | 0.556856 | 5,171 | 0.960795 | 0 | 0 | 0 | 0 | 0 | 0 | 1,080 | 0.200669 |
f471a2c4554505f4474a4ceb98a24f55991c2cdc | 1,557 | py | Python | parsers/politico.py | plympton/newsdiffs | 2a055850bda850b9b6c28c989512d4e4b3e9b64e | [
"MIT"
] | null | null | null | parsers/politico.py | plympton/newsdiffs | 2a055850bda850b9b6c28c989512d4e4b3e9b64e | [
"MIT"
] | null | null | null | parsers/politico.py | plympton/newsdiffs | 2a055850bda850b9b6c28c989512d4e4b3e9b64e | [
"MIT"
] | null | null | null | from baseparser import BaseParser, grab_url, logger
# Different versions of BeautifulSoup have different properties.
# Some work with one site, some with another.
# This is BeautifulSoup 3.2.
from BeautifulSoup import BeautifulSoup
# This is BeautifulSoup 4
import bs4
class PoliticoParser(BaseParser):
domains = ... | 35.386364 | 80 | 0.620424 | 1,284 | 0.824663 | 0 | 0 | 0 | 0 | 0 | 0 | 474 | 0.304432 |
f472e924139d73818eedf6b97de856c2ca049e7a | 6,535 | py | Python | integration-tests/bats/server_multiclient_test.py | fairhopeweb/dolt | 276b85b7b1287f883640ef3fcacb0bdb112749b2 | [
"Apache-2.0"
] | 2 | 2021-03-09T07:32:40.000Z | 2021-06-11T21:41:30.000Z | integration-tests/bats/server_multiclient_test.py | albertusortiz/dolt | 38fc4fcb0357a56eb97abdb25296f45571a5418f | [
"Apache-2.0"
] | null | null | null | integration-tests/bats/server_multiclient_test.py | albertusortiz/dolt | 38fc4fcb0357a56eb97abdb25296f45571a5418f | [
"Apache-2.0"
] | 1 | 2021-08-06T13:05:57.000Z | 2021-08-06T13:05:57.000Z | import os
import sys
from queue import Queue
from threading import Thread
from helper.pytest import DoltConnection
# Utility functions
def print_err(e):
print(e, file=sys.stderr)
def query(dc, query_str):
return dc.query(query_str, False)
def query_with_expected_error(dc, non_error_msg , query_str):
... | 32.839196 | 140 | 0.680643 | 152 | 0.023259 | 0 | 0 | 0 | 0 | 0 | 0 | 2,289 | 0.350268 |
f47301fb50cbf2affb241d7c61d027660a0014ae | 24,598 | py | Python | messenger/client/messenger.py | marik348/python-messenger | 6c1916b0df439cd997cb6e9376221fe587c3f1c1 | [
"MIT"
] | 2 | 2021-05-24T08:44:51.000Z | 2022-03-17T10:41:48.000Z | messenger/client/messenger.py | marik348/python-messenger | 6c1916b0df439cd997cb6e9376221fe587c3f1c1 | [
"MIT"
] | 1 | 2020-11-28T12:08:25.000Z | 2020-11-28T12:08:25.000Z | messenger/client/messenger.py | marik348/python-messegner | 6c1916b0df439cd997cb6e9376221fe587c3f1c1 | [
"MIT"
] | 1 | 2021-05-24T08:50:42.000Z | 2021-05-24T08:50:42.000Z | from requests import get, post, exceptions
from datetime import datetime
from PyQt5 import QtWidgets, QtCore
from PyQt5.QtWidgets import QMessageBox
from PyQt5.QtGui import QFont
from qtwidgets import PasswordEdit
from client_commands import (help_client, online, status, myself, reg, role, ban, unban)
from client_con... | 38.982567 | 120 | 0.622693 | 23,914 | 0.972193 | 0 | 0 | 0 | 0 | 0 | 0 | 7,647 | 0.310879 |
f475a7baedbb00d2706f41a680754762b1e5e2d7 | 6,599 | py | Python | oscar/lib/python2.7/site-packages/prompt_toolkit/utils.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/prompt_toolkit/utils.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/prompt_toolkit/utils.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
import inspect
import os
import signal
import sys
import threading
import weakref
from wcwidth import wcwidth
from six.moves import range
__all__ = (
'Event',
'DummyContext',
'get_cwidth',
'suspend_to_background_supported',
'is_conemu_ansi'... | 27.381743 | 88 | 0.575542 | 2,432 | 0.368541 | 1,330 | 0.201546 | 0 | 0 | 0 | 0 | 2,876 | 0.435824 |
f476ce15c4cf3ddf393197690eec2e823de61189 | 92,209 | py | Python | lmdb/cffi.py | hirnimeshrampuresoftware/py-lmdb | 9aa7560f8e1a89b437fb3fed7ea36f5888b7a963 | [
"OLDAP-2.8"
] | 185 | 2019-06-18T15:58:49.000Z | 2022-03-09T09:42:57.000Z | lmdb/cffi.py | hirnimeshrampuresoftware/py-lmdb | 9aa7560f8e1a89b437fb3fed7ea36f5888b7a963 | [
"OLDAP-2.8"
] | 114 | 2019-06-15T04:19:04.000Z | 2022-03-30T06:34:44.000Z | lmdb/cffi.py | hirnimeshrampuresoftware/py-lmdb | 9aa7560f8e1a89b437fb3fed7ea36f5888b7a963 | [
"OLDAP-2.8"
] | 32 | 2019-07-03T23:56:58.000Z | 2022-02-12T04:46:16.000Z | #
# Copyright 2013 The py-lmdb authors, all rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
# Public License.
#
# A copy of this license is available in the file LICENSE in the
# top-level directory of the distribut... | 37.728723 | 105 | 0.596298 | 78,289 | 0.849039 | 582 | 0.006312 | 228 | 0.002473 | 0 | 0 | 60,712 | 0.658417 |
f477633c1badf20c6b9aa7cdc1d086ce3dd6b193 | 6,425 | py | Python | .virtual_documents/00_core.ipynb.py | AtomScott/image_folder_datasets | 935580929abc9d8ec9eeaf944a0d3c670a09d04d | [
"Apache-2.0"
] | null | null | null | .virtual_documents/00_core.ipynb.py | AtomScott/image_folder_datasets | 935580929abc9d8ec9eeaf944a0d3c670a09d04d | [
"Apache-2.0"
] | null | null | null | .virtual_documents/00_core.ipynb.py | AtomScott/image_folder_datasets | 935580929abc9d8ec9eeaf944a0d3c670a09d04d | [
"Apache-2.0"
] | null | null | null | # default_exp core
#hide
from nbdev.showdoc import *
from fastcore.test import *
# export
import os
import torch
from torch import nn
from torch.nn import functional as F
from torch.utils.data import DataLoader
import warnings
import torchvision
from torchvision.datasets import MNIST, ImageFolder
from torchvision... | 32.286432 | 127 | 0.651518 | 4,633 | 0.721089 | 0 | 0 | 0 | 0 | 0 | 0 | 1,131 | 0.176031 |
f477a30d49ec339fb9956b3d20c8d92ea00908ad | 641 | py | Python | src/modules/iam/module.py | pgorecki/python-ddd | 0073ccce35c651be263f5d7d3d63f9a49bc0b78a | [
"MIT"
] | 10 | 2022-03-16T19:26:51.000Z | 2022-03-31T23:50:51.000Z | src/modules/iam/module.py | pgorecki/python-ddd | 0073ccce35c651be263f5d7d3d63f9a49bc0b78a | [
"MIT"
] | null | null | null | src/modules/iam/module.py | pgorecki/python-ddd | 0073ccce35c651be263f5d7d3d63f9a49bc0b78a | [
"MIT"
] | 2 | 2022-03-16T19:26:54.000Z | 2022-03-27T13:21:02.000Z | from seedwork.application.modules import BusinessModule
from modules.iam.application.services import AuthenticationService
class IdentityAndAccessModule(BusinessModule):
def __init__(self, authentication_service: AuthenticationService):
self.authentication_service = authentication_service
# @staticm... | 35.611111 | 94 | 0.730109 | 514 | 0.801872 | 0 | 0 | 0 | 0 | 0 | 0 | 295 | 0.460218 |
f477fec40612fa1a5fd9ffbd050a890ebec79d19 | 2,030 | py | Python | test_scripts/pyfora2/containerTests.py | ufora/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 571 | 2015-11-05T20:07:07.000Z | 2022-01-24T22:31:09.000Z | test_scripts/pyfora2/containerTests.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 218 | 2015-11-05T20:37:55.000Z | 2021-05-30T03:53:50.000Z | test_scripts/pyfora2/containerTests.py | timgates42/ufora | 04db96ab049b8499d6d6526445f4f9857f1b6c7e | [
"Apache-2.0",
"CC0-1.0",
"MIT",
"BSL-1.0",
"BSD-3-Clause"
] | 40 | 2015-11-07T21:42:19.000Z | 2021-05-23T03:48:19.000Z | # Copyright 2015 Ufora Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 33.833333 | 76 | 0.733005 | 921 | 0.453695 | 0 | 0 | 687 | 0.338424 | 0 | 0 | 639 | 0.314778 |
f4782d553047c0d6c83eb8c3ac341a236af78e5e | 597 | py | Python | src/utils/torch_common.py | quochungto/SIIM-COVID19-Detection | 88bc10d7b01d277d223c4dddd4c223a782616611 | [
"MIT"
] | null | null | null | src/utils/torch_common.py | quochungto/SIIM-COVID19-Detection | 88bc10d7b01d277d223c4dddd4c223a782616611 | [
"MIT"
] | null | null | null | src/utils/torch_common.py | quochungto/SIIM-COVID19-Detection | 88bc10d7b01d277d223c4dddd4c223a782616611 | [
"MIT"
] | null | null | null | import os
import gc
import random
import numpy as np
import torch
def seed_everything(seed):
os.environ['PYTHONHASHSEED'] = str(seed)
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.be... | 21.321429 | 59 | 0.673367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.187605 |
f4793bd8d4530ee80fabe88563d6a3ddbecb48d2 | 6,713 | py | Python | recipes/freeimage/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | null | null | null | recipes/freeimage/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | null | null | null | recipes/freeimage/all/conanfile.py | marsven/conan-center-index | d8bb4ad617cee02d8664e8341fa32cdf702e4284 | [
"MIT"
] | null | null | null | from conans import ConanFile, CMake, tools
import os
import shutil
required_conan_version = ">=1.43.0"
class FreeImageConan(ConanFile):
name = "freeimage"
description = "Open Source library project for developers who would like to support popular graphics image formats"\
"like PNG, BMP, JPE... | 40.439759 | 120 | 0.619097 | 6,606 | 0.984061 | 0 | 0 | 150 | 0.022345 | 0 | 0 | 1,689 | 0.251601 |
f47944bb4b7b60683bb6b4d4d72854dfc4c98c2a | 110,180 | py | Python | src/google/appengine/datastore/datastore_query.py | myelin/appengine-python-standard | 2a99acd114f7cdd66fbad9bfd185384eef847c84 | [
"Apache-2.0"
] | null | null | null | src/google/appengine/datastore/datastore_query.py | myelin/appengine-python-standard | 2a99acd114f7cdd66fbad9bfd185384eef847c84 | [
"Apache-2.0"
] | null | null | null | src/google/appengine/datastore/datastore_query.py | myelin/appengine-python-standard | 2a99acd114f7cdd66fbad9bfd185384eef847c84 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2007 Google LLC
#
# 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... | 32.482311 | 81 | 0.690634 | 101,509 | 0.921302 | 0 | 0 | 27,853 | 0.252795 | 0 | 0 | 40,008 | 0.363115 |
f479e4c7564b46ceb9cbf0369fdeb3cac10260f7 | 4,274 | py | Python | tests/Metrics/test_recall.py | Neklaustares-tPtwP/torchflare | 7af6b01ef7c26f0277a041619081f6df4eb1e42c | [
"Apache-2.0"
] | 1 | 2021-09-14T08:38:05.000Z | 2021-09-14T08:38:05.000Z | tests/Metrics/test_recall.py | weidao-Shi/torchflare | 3c55b5a0761f2e85dd6da95767c6ec03f0f5baad | [
"Apache-2.0"
] | null | null | null | tests/Metrics/test_recall.py | weidao-Shi/torchflare | 3c55b5a0761f2e85dd6da95767c6ec03f0f5baad | [
"Apache-2.0"
] | 1 | 2021-08-06T19:24:43.000Z | 2021-08-06T19:24:43.000Z | # flake8: noqa
import warnings
import pytest
import torch
from sklearn.exceptions import UndefinedMetricWarning
from sklearn.metrics import recall_score
from torchflare.metrics.recall_meter import Recall
from torchflare.metrics.meters import _BaseInputHandler
torch.manual_seed(42)
def test_binary_inputs():
def... | 33.920635 | 111 | 0.654422 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 112 | 0.026205 |
f47a1ea7f8990d7f8f0d9190441ddb6344e10412 | 1,785 | py | Python | parsing/tests/test_utils.py | davesque/parsing.py | ff8b20e53b94e79571971ef23f0e5091e2786566 | [
"MIT"
] | 1 | 2020-11-14T13:06:42.000Z | 2020-11-14T13:06:42.000Z | parsing/tests/test_utils.py | davesque/parsing.py | ff8b20e53b94e79571971ef23f0e5091e2786566 | [
"MIT"
] | null | null | null | parsing/tests/test_utils.py | davesque/parsing.py | ff8b20e53b94e79571971ef23f0e5091e2786566 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import unittest
from ..utils import compose, flatten, truncate, join, unary, equals
class TestEquals(unittest.TestCase):
def test_it_should_return_a_function_that_compares_against_x(self):
self.assertTrue(equals(234)(234))
self.assertFalse(equals(234)(123)... | 30.775862 | 87 | 0.652101 | 1,641 | 0.919328 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.073389 |
f47b6c51761fb432f29fb2e6eb1f0ea2e885172e | 1,807 | py | Python | Array/Final450/Move_Negative_Nums_To_One_End/relative_order_matters/move_negative_nums_to_one_end--insertion_sort_modified.py | prash-kr-meena/GoogleR | 27aca71e51cc2442e604e07ab00406a98d8d63a4 | [
"Apache-2.0"
] | null | null | null | Array/Final450/Move_Negative_Nums_To_One_End/relative_order_matters/move_negative_nums_to_one_end--insertion_sort_modified.py | prash-kr-meena/GoogleR | 27aca71e51cc2442e604e07ab00406a98d8d63a4 | [
"Apache-2.0"
] | null | null | null | Array/Final450/Move_Negative_Nums_To_One_End/relative_order_matters/move_negative_nums_to_one_end--insertion_sort_modified.py | prash-kr-meena/GoogleR | 27aca71e51cc2442e604e07ab00406a98d8d63a4 | [
"Apache-2.0"
] | null | null | null | from Utils.Array import input_array
# Time : O(n2)
# Space : O(1) Constant space
"""
Ill be having 2 pointers here
one of them will move through the array looking for -ve numbers to operate on
and another will be pointing to the correct location where i can put the -ve elements, after i find them
also this same... | 34.09434 | 105 | 0.646375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,195 | 0.661317 |
f47c09e34304fe10a016d16f624d1fb84ab59f99 | 2,786 | py | Python | python_test/test_epoll/test_epoll.py | zhtsh/test-examples | ed5a45bf8546a9bd7fc35e38f9679be385d0d9e6 | [
"Apache-2.0"
] | null | null | null | python_test/test_epoll/test_epoll.py | zhtsh/test-examples | ed5a45bf8546a9bd7fc35e38f9679be385d0d9e6 | [
"Apache-2.0"
] | null | null | null | python_test/test_epoll/test_epoll.py | zhtsh/test-examples | ed5a45bf8546a9bd7fc35e38f9679be385d0d9e6 | [
"Apache-2.0"
] | null | null | null | # coding=utf8
import socket
import select
from datetime import datetime
from datetime import timedelta
EOL = b'\n\n'
response = b'HTTP/1.0 200 OK\nDate: Mon, 1 Jan 1996 01:01:01 GMT\n'
response += b'Content-Type: text/plain\nContent-Length: 13\n\n'
response += b'Hello, world!\n'
# 创建套接字对象并绑定监听端口
servers... | 38.164384 | 79 | 0.561378 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 891 | 0.287234 |
f47cd9858ae9886cfca8b27e46c09a635662d571 | 2,771 | py | Python | 20.2-Donut/Donut2.py | Kehvarl/AdventOfCode2019 | f72cfeefdfbde365bc9a5b722d5875d556379cf2 | [
"MIT"
] | 1 | 2020-09-27T23:02:46.000Z | 2020-09-27T23:02:46.000Z | 20.2-Donut/Donut2.py | Kehvarl/AdventOfCode2019 | f72cfeefdfbde365bc9a5b722d5875d556379cf2 | [
"MIT"
] | null | null | null | 20.2-Donut/Donut2.py | Kehvarl/AdventOfCode2019 | f72cfeefdfbde365bc9a5b722d5875d556379cf2 | [
"MIT"
] | 1 | 2019-12-09T17:10:48.000Z | 2019-12-09T17:10:48.000Z | import collections
from pprint import pprint
example1 = open("input.txt", "r").read()
# grid = [[val for val in line] for line in example1.split("\n")]
grid = example1.split("\n")
length = 0
for line in grid:
length = max(len(line), length)
out = []
for line in grid:
out.append(line[::-1].zfill(length)[::-1... | 24.741071 | 93 | 0.498015 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 238 | 0.08589 |
f47e72619d39a8c165d31a3169ddc7283ecd466a | 845 | py | Python | OR_Client_Library/openrefine_client/tests/test_history.py | idaks/OpenRefine-Provenance-Tools | cc469c3eb8e56c8b0f4616cc501546db3c4176ea | [
"MIT"
] | null | null | null | OR_Client_Library/openrefine_client/tests/test_history.py | idaks/OpenRefine-Provenance-Tools | cc469c3eb8e56c8b0f4616cc501546db3c4176ea | [
"MIT"
] | null | null | null | OR_Client_Library/openrefine_client/tests/test_history.py | idaks/OpenRefine-Provenance-Tools | cc469c3eb8e56c8b0f4616cc501546db3c4176ea | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
test_history.py
"""
# Copyright (c) 2011 Paul Makepeace, Real Programmers. All rights reserved.
import unittest
from OR_Client_Library.openrefine_client.google.refine.history import *
class HistoryTest(unittest.TestCase):
def test_init(self):
response = {
u"code": ... | 26.40625 | 75 | 0.60355 | 580 | 0.686391 | 0 | 0 | 0 | 0 | 0 | 0 | 292 | 0.345562 |
f47f72a41b188aa9caae89718d01a31bf276031b | 6,160 | py | Python | tests/batch/test_get_batch.py | Remmeauth/remme-core-cli | 94cc09fe9d2e718b45273dde68d6c672c4773f6a | [
"MIT"
] | null | null | null | tests/batch/test_get_batch.py | Remmeauth/remme-core-cli | 94cc09fe9d2e718b45273dde68d6c672c4773f6a | [
"MIT"
] | 94 | 2019-03-27T09:34:28.000Z | 2019-08-27T05:32:33.000Z | tests/batch/test_get_batch.py | Remmeauth/remme-core-cli | 94cc09fe9d2e718b45273dde68d6c672c4773f6a | [
"MIT"
] | 6 | 2019-06-06T15:16:38.000Z | 2020-02-24T12:55:55.000Z | """
Provide tests for command line interface's get batch command.
"""
import json
import pytest
from click.testing import CliRunner
from cli.constants import (
DEV_BRANCH_NODE_IP_ADDRESS_FOR_TESTING,
FAILED_EXIT_FROM_COMMAND_CODE,
PASSED_EXIT_FROM_COMMAND_CODE,
)
from cli.entrypoint import cli
from cli.ut... | 34.606742 | 118 | 0.63961 | 0 | 0 | 0 | 0 | 905 | 0.146916 | 0 | 0 | 2,749 | 0.446266 |
f480097de648b87f17c2df8fc143686ff51cd136 | 364 | py | Python | experiments/scripts/preprocess_dataset.py | pbielak/graph-barlow-twins | f8e20134afed4f17ffcecf8f48764df362ffdcad | [
"MIT"
] | 9 | 2021-06-11T13:23:50.000Z | 2022-03-23T19:45:54.000Z | experiments/scripts/preprocess_dataset.py | pbielak/graph-barlow-twins | f8e20134afed4f17ffcecf8f48764df362ffdcad | [
"MIT"
] | 2 | 2021-09-22T13:58:39.000Z | 2021-11-23T02:26:50.000Z | experiments/scripts/preprocess_dataset.py | pbielak/graph-barlow-twins | f8e20134afed4f17ffcecf8f48764df362ffdcad | [
"MIT"
] | 2 | 2021-06-10T06:05:47.000Z | 2021-09-27T15:13:23.000Z | import sys
from gssl.datasets import load_dataset
from gssl.inductive.datasets import load_ppi
from gssl.utils import seed
def main():
seed()
# Read dataset name
dataset_name = sys.argv[1]
# Load dataset
if dataset_name == "PPI":
load_ppi()
else:
load_dataset(name=dataset_na... | 15.826087 | 44 | 0.662088 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.131868 |
f48259ce6371a22b92ea0a936d7be4886d4013dc | 4,030 | py | Python | agro_site/orders/migrations/0001_initial.py | LukoninDmitryPy/agro_site-2 | eab7694d42104774e5ce6db05a79f11215db6ae3 | [
"MIT"
] | null | null | null | agro_site/orders/migrations/0001_initial.py | LukoninDmitryPy/agro_site-2 | eab7694d42104774e5ce6db05a79f11215db6ae3 | [
"MIT"
] | null | null | null | agro_site/orders/migrations/0001_initial.py | LukoninDmitryPy/agro_site-2 | eab7694d42104774e5ce6db05a79f11215db6ae3 | [
"MIT"
] | 1 | 2022-03-13T11:32:48.000Z | 2022-03-13T11:32:48.000Z | # Generated by Django 2.2.16 on 2022-04-12 13:28
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.expressions
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('sales... | 52.337662 | 205 | 0.6134 | 3,948 | 0.946082 | 0 | 0 | 0 | 0 | 0 | 0 | 863 | 0.206806 |
f482b268cafb6a5a7b275bd6f15025933187f73e | 881 | py | Python | app/forms.py | FakeYou/flask-microblog | 021b786417a2ae1aaa957661beb25d381a7efdb2 | [
"MIT"
] | null | null | null | app/forms.py | FakeYou/flask-microblog | 021b786417a2ae1aaa957661beb25d381a7efdb2 | [
"MIT"
] | null | null | null | app/forms.py | FakeYou/flask-microblog | 021b786417a2ae1aaa957661beb25d381a7efdb2 | [
"MIT"
] | null | null | null | from flask.ext.wtf import Form
from wtforms import StringField, BooleanField, PasswordField
from wtforms.validators import InputRequired, Email, EqualTo, Length
class LoginForm(Form):
nickname = StringField('nickname', validators=[InputRequired()])
password = PasswordField('password', validators=[InputRequired... | 48.944444 | 104 | 0.704881 | 715 | 0.811578 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.129398 |
f482d9773506167246440d9307b62395f61caa1a | 2,353 | py | Python | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/astmath.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/astmath.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/problems/astmath.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | from problem import Problem
from typing import Any, Tuple
from random import randint
import ast
import json
def gen_num():
return str(randint(1, 9))
def gen_op():
return "+-*/"[randint(0, 3)]
def gen_expr(depth):
if randint(0, depth) == 0:
l = gen_expr(depth + 1)
r = gen_expr(depth + 1... | 37.349206 | 800 | 0.592435 | 1,947 | 0.827454 | 0 | 0 | 1,442 | 0.612835 | 0 | 0 | 1,332 | 0.566086 |
f4838193c2db95eaa11b6561ddf47a01a31acc59 | 690 | py | Python | pyllusion/movement/movement_circles.py | RebeccaHirst/Pyllusion | 9944076e38bced0eabb49c607482b71809150bdb | [
"MIT"
] | null | null | null | pyllusion/movement/movement_circles.py | RebeccaHirst/Pyllusion | 9944076e38bced0eabb49c607482b71809150bdb | [
"MIT"
] | null | null | null | pyllusion/movement/movement_circles.py | RebeccaHirst/Pyllusion | 9944076e38bced0eabb49c607482b71809150bdb | [
"MIT"
] | null | null | null | import numpy as np
from .movement_matrix import movement_matrix
from ..image import image_circles
def movement_circles(n=50, duration=2, fps=30, width=500, height=500, **kwargs):
"""
>>> import pyllusion as ill
>>>
>>> images = ill.movement_circles(n=50, duration=4, fps=30, color="black", size=0.05)
... | 27.6 | 89 | 0.631884 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 223 | 0.323188 |
f484180dc11ca61b16fecb37c23ed96a63de8738 | 6,853 | py | Python | sce.py | hzwfl2/Semantic-consistent-Embedding | d3712cc6f27febbf654e1eb8c43c0b48376a9be1 | [
"MIT"
] | 2 | 2021-12-22T07:39:30.000Z | 2022-01-02T14:45:39.000Z | sce.py | hch-xmu/Semantic-consistent-Embedding | 2e408267095079d70daff6b391209aabb3d9acd3 | [
"MIT"
] | null | null | null | sce.py | hch-xmu/Semantic-consistent-Embedding | 2e408267095079d70daff6b391209aabb3d9acd3 | [
"MIT"
] | 3 | 2021-12-16T12:56:10.000Z | 2022-01-18T02:03:31.000Z | #%%
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
from sklearn.naive_bayes import GaussianNB
f... | 33.758621 | 168 | 0.618707 | 2,261 | 0.329928 | 0 | 0 | 0 | 0 | 0 | 0 | 375 | 0.054721 |
f484cdb74eddcab3519034cf17a9751d9384ce4d | 1,876 | py | Python | graphsage/partition_predict.py | colirain/GraphSAGE | a63145ff18f87cb69340c7b457c34839e9124086 | [
"MIT"
] | null | null | null | graphsage/partition_predict.py | colirain/GraphSAGE | a63145ff18f87cb69340c7b457c34839e9124086 | [
"MIT"
] | null | null | null | graphsage/partition_predict.py | colirain/GraphSAGE | a63145ff18f87cb69340c7b457c34839e9124086 | [
"MIT"
] | null | null | null |
import tensorflow as tf
import numpy as np
from graphsage.models import FCPartition
from graphsage.partition_train import construct_placeholders
from graphsage.utils import load_graph_data, load_embedded_data, load_embedded_idmap
flags = tf.app.flags
FLAGS = flags.FLAGS
# flags.DEFINE_integer('dim_1', ... | 30.754098 | 95 | 0.678038 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 652 | 0.347548 |
f484e0eafc21497bc2d0dc913be6480e2eceab78 | 13,307 | py | Python | scripts/generate_XML_files/DS1/annotatedsen_to_xml.py | AmmarQaseem/CPI-Pipeline-test | 3866883c54d7bd77753ee4b72997949bdcf76359 | [
"PostgreSQL",
"ISC",
"Intel"
] | null | null | null | scripts/generate_XML_files/DS1/annotatedsen_to_xml.py | AmmarQaseem/CPI-Pipeline-test | 3866883c54d7bd77753ee4b72997949bdcf76359 | [
"PostgreSQL",
"ISC",
"Intel"
] | null | null | null | scripts/generate_XML_files/DS1/annotatedsen_to_xml.py | AmmarQaseem/CPI-Pipeline-test | 3866883c54d7bd77753ee4b72997949bdcf76359 | [
"PostgreSQL",
"ISC",
"Intel"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Copyright (c) 2015, Elham Abbasian <e_abbasian@yahoo.com>, Kersten Doering <kersten.doering@gmail.com>
This parser reads annotated sentences (output from get_relations.py) in a tab-separated format to generate a unified XML format (Tikk et al., 2010. A compreh... | 58.364035 | 425 | 0.618622 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,092 | 0.532953 |
f484e4f5510b4a5e4e942079f6f30e54e25d0b89 | 488 | py | Python | tests/test_add_contact.py | SergeyDorokhov/python_training | e15e561fe7ad055048643adcfc88b3f2d55530ca | [
"Apache-2.0"
] | null | null | null | tests/test_add_contact.py | SergeyDorokhov/python_training | e15e561fe7ad055048643adcfc88b3f2d55530ca | [
"Apache-2.0"
] | null | null | null | tests/test_add_contact.py | SergeyDorokhov/python_training | e15e561fe7ad055048643adcfc88b3f2d55530ca | [
"Apache-2.0"
] | null | null | null | def test_add_contact(app, db, json_contacts, check_ui):
contact = json_contacts
list_before = db.get_contact_list()
contact.id_contact = app.contact.get_next_id(list_before)
app.contact.create(contact)
assert len(list_before) + 1 == len(db.get_contact_list())
list_after = db.get_contact_list()
... | 44.363636 | 67 | 0.727459 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f485580fbee3d8993b0b04b4d71777a8883725b7 | 1,182 | py | Python | website/members/urls.py | eamanu/asoc_members | bf2e99e9c63c60a59bdfd10ca1812d78851cbde6 | [
"MIT"
] | null | null | null | website/members/urls.py | eamanu/asoc_members | bf2e99e9c63c60a59bdfd10ca1812d78851cbde6 | [
"MIT"
] | null | null | null | website/members/urls.py | eamanu/asoc_members | bf2e99e9c63c60a59bdfd10ca1812d78851cbde6 | [
"MIT"
] | null | null | null | from django.conf import settings
from django.conf.urls.static import static
from django.urls import path
from members import views
urlpatterns = [
path('solicitud-alta/', views.signup_initial, name='signup'),
path('solicitud-alta/persona/', views.signup_form_person, name='signup_person'),
path('solicitud-... | 47.28 | 88 | 0.755499 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.374788 |
f485c8b7834281c5e46b0be30ec91fef7f0a76cd | 2,482 | py | Python | Benchmarking/Keras/Tensorflow/TF_dataforcomparisongraphss.py | vais-ral/CCPi-ML | ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4 | [
"Apache-2.0"
] | null | null | null | Benchmarking/Keras/Tensorflow/TF_dataforcomparisongraphss.py | vais-ral/CCPi-ML | ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4 | [
"Apache-2.0"
] | null | null | null | Benchmarking/Keras/Tensorflow/TF_dataforcomparisongraphss.py | vais-ral/CCPi-ML | ca9baeb0dd5db3a97ac8ab9e33e03aeae42ebfa4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jul 18 14:04:03 2018
@author: zyv57124
"""
import scipy.io as sio
import tensorflow as tf
from tensorflow import keras
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from tensorflow.python.training import gradient_descent
from time import tim... | 17.236111 | 144 | 0.580983 | 248 | 0.099919 | 0 | 0 | 0 | 0 | 0 | 0 | 621 | 0.250201 |
f485d7305ea8da6e0bb04315c8cf68b15f093141 | 496 | py | Python | Exercise_8.py | aurimas13/Python-stuff | a6e89e9f6088a6ab29da5b57830e4b7750427454 | [
"MIT"
] | 1 | 2021-06-30T09:31:52.000Z | 2021-06-30T09:31:52.000Z | Exercise_8.py | aurimas13/Python-stuff | a6e89e9f6088a6ab29da5b57830e4b7750427454 | [
"MIT"
] | null | null | null | Exercise_8.py | aurimas13/Python-stuff | a6e89e9f6088a6ab29da5b57830e4b7750427454 | [
"MIT"
] | null | null | null | # Solution of Exercise 8 - Exercise_8.py
#
# Uploaded by Aurimas A. Nausedas on 11/23/20.
# Updated by Aurimas A. Nausedas on 11/06/21.
formatter = "%r %r %r %r"
print formatter % (1, 2, 3, 4)
print formatter % ("one", "two", "three", "four")
print formatter % (True, False, False, True)
print formatter % (formatter,... | 27.555556 | 62 | 0.645161 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 261 | 0.52621 |
f485da5cf70dcae9f004e6210259cc3b9e4d5254 | 402 | py | Python | Easy/two-numbers-sum/solution-1.py | MCFrank16/python-algo | dd48f6c5b9f4a941a18fc4620164c807c0e1d35e | [
"MIT"
] | null | null | null | Easy/two-numbers-sum/solution-1.py | MCFrank16/python-algo | dd48f6c5b9f4a941a18fc4620164c807c0e1d35e | [
"MIT"
] | null | null | null | Easy/two-numbers-sum/solution-1.py | MCFrank16/python-algo | dd48f6c5b9f4a941a18fc4620164c807c0e1d35e | [
"MIT"
] | null | null | null | # solution 1: Brute Force
# time complexity: O(n^2)
# space complexity: O(1)
def twoNumberSum(arr, n):
for i in range(len(arr) - 1):
firstNum = arr[i]
for j in range(i + 1, len(arr)):
secondNum = arr[j]
if firstNum + secondNum == n:
return [first... | 23.647059 | 45 | 0.524876 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.18408 |
f488b9695ea3d93d4ce613f2ebb45a1be83ca949 | 1,631 | py | Python | python/cac_tripplanner/destinations/migrations/0021_event.py | maurizi/cac-tripplanner | 3f4f1f1edc9be9e52c74eb3e124b6697429a79d6 | [
"Apache-2.0"
] | null | null | null | python/cac_tripplanner/destinations/migrations/0021_event.py | maurizi/cac-tripplanner | 3f4f1f1edc9be9e52c74eb3e124b6697429a79d6 | [
"Apache-2.0"
] | null | null | null | python/cac_tripplanner/destinations/migrations/0021_event.py | maurizi/cac-tripplanner | 3f4f1f1edc9be9e52c74eb3e124b6697429a79d6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-28 17:32
from __future__ import unicode_literals
import ckeditor.fields
import destinations.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('destinati... | 42.921053 | 171 | 0.624157 | 1,390 | 0.852238 | 0 | 0 | 0 | 0 | 0 | 0 | 389 | 0.238504 |
f488b98251360b04f0d4a4065b27efc58a8ffeb9 | 8,448 | py | Python | data_extraction/scripts/bnf_adr_extraction.py | elpidakon/CRESCENDDI | ab9e65621d331689f4aaeeb08902f29d90b7d1b9 | [
"MIT"
] | null | null | null | data_extraction/scripts/bnf_adr_extraction.py | elpidakon/CRESCENDDI | ab9e65621d331689f4aaeeb08902f29d90b7d1b9 | [
"MIT"
] | null | null | null | data_extraction/scripts/bnf_adr_extraction.py | elpidakon/CRESCENDDI | ab9e65621d331689f4aaeeb08902f29d90b7d1b9 | [
"MIT"
] | null | null | null | # Kontsioti, Maskell, Dutta & Pirmohamed, A reference set of clinically relevant
# adverse drug-drug interactions (2021)
# Code to extract single-drug side effect data from the BNF website
from bs4 import BeautifulSoup
import urllib
import os, csv
import numpy as np
import pandas as pd
import re
from tqdm i... | 43.546392 | 147 | 0.68608 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,763 | 0.445431 |
f489d029eb3e215d049f6f2f3cc368f56d30226f | 1,080 | py | Python | core/forms.py | nicoknoll/howimetcorona | c55198118b2c31ee8b76c023b5a9fc4454cc1e08 | [
"Apache-2.0"
] | 1 | 2020-03-21T09:47:17.000Z | 2020-03-21T09:47:17.000Z | core/forms.py | nicoknoll/howimetcorona | c55198118b2c31ee8b76c023b5a9fc4454cc1e08 | [
"Apache-2.0"
] | 5 | 2020-03-20T20:12:16.000Z | 2021-09-22T18:46:48.000Z | core/forms.py | nicoknoll/howimetcorona | c55198118b2c31ee8b76c023b5a9fc4454cc1e08 | [
"Apache-2.0"
] | null | null | null | from django import forms
class BaseFileForm(forms.Form):
# we try to minify the file to only submit the data
points_file = forms.FileField(
required=False,
widget=forms.FileInput(attrs={'required': 'required'}),
label="Location History File (.json)"
)
points_data = forms.CharFi... | 28.421053 | 77 | 0.662963 | 1,043 | 0.965741 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.239815 |
f48be2ac89c37ef219c2ad00751eceeb8e3e514f | 270 | py | Python | bartender/drinks/generators.py | autiwg/bartender | 1c26aefb777a01ce527745c543e60b11a972fe5d | [
"Unlicense",
"MIT"
] | null | null | null | bartender/drinks/generators.py | autiwg/bartender | 1c26aefb777a01ce527745c543e60b11a972fe5d | [
"Unlicense",
"MIT"
] | null | null | null | bartender/drinks/generators.py | autiwg/bartender | 1c26aefb777a01ce527745c543e60b11a972fe5d | [
"Unlicense",
"MIT"
] | null | null | null | from django.utils import timezone
from django.utils.text import slugify
def generate_billed_document_path(instance, filename):
cur_time = timezone.now()
return f"{cur_time.strftime('%Y/%m')}/{slugify(instance.name)}-{cur_time.strftime('%d.%m.%Y %H:%M')}.csv"
| 30 | 109 | 0.725926 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 98 | 0.362963 |
f48bfbdf82f8ea69c9578103bcb880d230cfe368 | 718 | py | Python | papers/wdmerger_I/plots/sponge.py | AMReX-Astro/wdmerger | 9f575efacc8d373b6d2961f731e30bf59ee15ffd | [
"MIT"
] | 2 | 2019-01-23T21:12:02.000Z | 2021-12-14T07:34:38.000Z | papers/wdmerger_I/plots/sponge.py | AMReX-Astro/wdmerger | 9f575efacc8d373b6d2961f731e30bf59ee15ffd | [
"MIT"
] | 1 | 2017-08-05T06:25:41.000Z | 2017-08-05T06:25:41.000Z | papers/wdmerger_I/plots/sponge.py | AMReX-Astro/wdmerger | 9f575efacc8d373b6d2961f731e30bf59ee15ffd | [
"MIT"
] | 2 | 2018-12-25T01:05:59.000Z | 2020-12-28T10:01:59.000Z | # This Python program is used to create a plot displaying the sponge
# function we use in the CASTRO hydrodynamics for the wdmerger problem.
import numpy as np
import matplotlib.pyplot as plt
def sponge(r):
sp
rs = 0.75
rt = 0.85
r = np.linspace(0.0, 1.0, 1000)
f = np.zeros(len(r))
idx = np.where(r < rs)
f[id... | 18.894737 | 71 | 0.635097 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.239554 |
f48c4c17d15169f83e1e0f82eed8e69642feb9a8 | 753 | py | Python | Python/110-1/Midterm Additional HW/005.py | JenFuChen/NKUST | bd80a449eddfdaf75709379d2e904ff70d409666 | [
"MIT"
] | 3 | 2021-11-07T17:33:54.000Z | 2021-12-28T08:31:20.000Z | Python/110-1/Midterm Additional HW/005.py | JenFuChen/NKUST | bd80a449eddfdaf75709379d2e904ff70d409666 | [
"MIT"
] | null | null | null | Python/110-1/Midterm Additional HW/005.py | JenFuChen/NKUST | bd80a449eddfdaf75709379d2e904ff70d409666 | [
"MIT"
] | null | null | null | # 005 印出菱形
while(1):
level = int(input())
if(level <= 0):
break
L = 2*level-1
mid = int((L - 1) / 2)
inspa = mid * 2 - 1
for i in range(L):
spa = level - i - 1
if spa >= 0:
print(" " * spa, end='')
print('*', end='')
if spa < 0... | 25.965517 | 44 | 0.332005 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0.07753 |
f48c7224abe2e2f0a451d9341ea395ac8a419de0 | 1,978 | py | Python | dynamo/plot/pseudotime.py | davisidarta/dynamo-release | 0dbd769f52ea07f3cdaa8fb31022ceb89938c382 | [
"BSD-3-Clause"
] | null | null | null | dynamo/plot/pseudotime.py | davisidarta/dynamo-release | 0dbd769f52ea07f3cdaa8fb31022ceb89938c382 | [
"BSD-3-Clause"
] | null | null | null | dynamo/plot/pseudotime.py | davisidarta/dynamo-release | 0dbd769f52ea07f3cdaa8fb31022ceb89938c382 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from ..tools.utils import update_dict
from .utils import save_fig
def plot_direct_graph(adata,
layout=None,
figsize=[6, 4],
save_show_or_return='show',
save_kwargs={},
):
df_mat = adata... | 28.257143 | 86 | 0.532356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.245703 |
f48d18e383286d35c87dd89bd5701bc78cbbbad7 | 4,327 | py | Python | ocean_lib/web3_internal/utils.py | joshualyguessennd/ocean.py | 23274698df4aae078d53b12d768c721af16f6e80 | [
"Apache-2.0"
] | null | null | null | ocean_lib/web3_internal/utils.py | joshualyguessennd/ocean.py | 23274698df4aae078d53b12d768c721af16f6e80 | [
"Apache-2.0"
] | 1 | 2021-02-16T18:31:53.000Z | 2021-02-16T18:31:53.000Z | ocean_lib/web3_internal/utils.py | joshualyguessennd/ocean.py | 23274698df4aae078d53b12d768c721af16f6e80 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Ocean Protocol Foundation
# SPDX-License-Identifier: Apache-2.0
import json
import logging
import os
from collections import namedtuple
import eth_account
import eth_keys
import eth_utils
from eth_keys import KeyAPI
from eth_utils import big_endian_to_int
from ocean_lib.web3_internal.web3_provider i... | 29.040268 | 95 | 0.697712 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,424 | 0.329096 |
f48e4de60f001ef56a4fbd661495b8d069dc740f | 192 | py | Python | autofront/__init__.py | JimmyLamothe/autofront | d179e54411f5d53046a5fa52b4430e09b01ebaca | [
"BSD-3-Clause"
] | 1 | 2020-11-16T22:18:03.000Z | 2020-11-16T22:18:03.000Z | autofront/__init__.py | JimmyLamothe/autofront | d179e54411f5d53046a5fa52b4430e09b01ebaca | [
"BSD-3-Clause"
] | null | null | null | autofront/__init__.py | JimmyLamothe/autofront | d179e54411f5d53046a5fa52b4430e09b01ebaca | [
"BSD-3-Clause"
] | null | null | null | import autofront.autofront as autofront
import autofront.utilities as utilities
initialize = autofront.initialize
add = autofront.add
run = autofront.run
get_display = utilities.get_display
| 21.333333 | 39 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f48e86cd3da483fb8b0fe253866faf1ceee934c8 | 8,444 | py | Python | src/main.py | ketsonroberto/PBDO | cdc1c5275bc17753be5c06a216f92391b6f1f1ab | [
"MIT"
] | null | null | null | src/main.py | ketsonroberto/PBDO | cdc1c5275bc17753be5c06a216f92391b6f1f1ab | [
"MIT"
] | null | null | null | src/main.py | ketsonroberto/PBDO | cdc1c5275bc17753be5c06a216f92391b6f1f1ab | [
"MIT"
] | null | null | null | # THIS IS A FILE TO TEST THE CODE. DO NOT USE IT AS PART OF THE CODE.
import matplotlib.pyplot as plt
import numpy as np
from StochasticMechanics import Stochastic
from scipy.optimize import minimize
from Performance import PerformanceOpt
from Hazards import Stationary
from Building import *
from BuildingProperties im... | 30.157143 | 114 | 0.620441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,756 | 0.56324 |
f48e9c0665ea9a8d85811305b04f10d8aba4b991 | 777 | py | Python | categorical_embedder/embedders/core/aux/custom_object_handler.py | erelcan/categorical-embedder | 376b8779500af2aa459c879f8e525f2ef25d6b31 | [
"Apache-2.0"
] | 3 | 2020-12-19T10:52:58.000Z | 2021-06-08T09:06:44.000Z | categorical_embedder/embedders/core/aux/custom_object_handler.py | erelcan/categorical-embedder | 376b8779500af2aa459c879f8e525f2ef25d6b31 | [
"Apache-2.0"
] | null | null | null | categorical_embedder/embedders/core/aux/custom_object_handler.py | erelcan/categorical-embedder | 376b8779500af2aa459c879f8e525f2ef25d6b31 | [
"Apache-2.0"
] | null | null | null | from categorical_embedder.embedders.core.aux.custom_layers import get_custom_layer_class
from categorical_embedder.embedders.core.aux.loss_factory import get_loss_function
def prepare_custom_objects(custom_object_info):
custom_objects = {}
custom_objects.update(_prepare_custom_layers(custom_object_info["layer... | 35.318182 | 88 | 0.804376 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 0.061776 |
f48f23b7a5506d60b9ac1a5607df61a337660101 | 10,406 | py | Python | osprofiler/cmd/shell.py | charliebr30/osprofiler | cffca4e29e373e3f09f2ffdd458761183a851569 | [
"Apache-2.0"
] | null | null | null | osprofiler/cmd/shell.py | charliebr30/osprofiler | cffca4e29e373e3f09f2ffdd458761183a851569 | [
"Apache-2.0"
] | 1 | 2017-04-15T22:16:06.000Z | 2017-04-15T22:16:06.000Z | osprofiler/cmd/shell.py | shwsun/osprofiler | 46d29fc5ab8a4068217e399883f39cdd443a7500 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 42.129555 | 79 | 0.548818 | 9,269 | 0.890736 | 0 | 0 | 0 | 0 | 0 | 0 | 3,980 | 0.382472 |
f48f3252e9a2f94d57cf6c129396083ea3b2d577 | 3,695 | py | Python | bmt/util.py | patrickkwang/bmt-lite | bf97f6155702a8eb38daf5a45df34b0ce1cb1a4b | [
"MIT"
] | null | null | null | bmt/util.py | patrickkwang/bmt-lite | bf97f6155702a8eb38daf5a45df34b0ce1cb1a4b | [
"MIT"
] | null | null | null | bmt/util.py | patrickkwang/bmt-lite | bf97f6155702a8eb38daf5a45df34b0ce1cb1a4b | [
"MIT"
] | null | null | null | """Utilities."""
from functools import wraps
import re
from typing import Callable, List, Optional, TypeVar, Union
from .data import (
all_classes, all_slots,
)
def pascal_to_snake(s: str, sep: str = "_") -> str:
"""Convert Pascal case to snake case.
Assumes that
a) all words are either all-lowercas... | 27.781955 | 83 | 0.558863 | 0 | 0 | 0 | 0 | 1,340 | 0.362652 | 0 | 0 | 1,320 | 0.35724 |
f48f57744939caba5685c9a4b651a9c481a371aa | 657 | py | Python | src/py_to_json/__init__.py | jlevitt/py-to-json | 26bb68926f5ada601e965f42980e438c9718be73 | [
"MIT"
] | null | null | null | src/py_to_json/__init__.py | jlevitt/py-to-json | 26bb68926f5ada601e965f42980e438c9718be73 | [
"MIT"
] | null | null | null | src/py_to_json/__init__.py | jlevitt/py-to-json | 26bb68926f5ada601e965f42980e438c9718be73 | [
"MIT"
] | null | null | null | #
# OMNIVORE CONFIDENTIAL
# __________________
#
# [2013] - [2019] Omnivore Technologies
# All Rights Reserved.
#
# NOTICE: All information contained herein is, and remains
# the property of Omnivore Technologies and its suppliers,
# if any. The intellectual and technical concepts contained
# herein are proprietary... | 36.5 | 73 | 0.78691 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 640 | 0.974125 |
be2e1617c4a15afe6886703b261c4b500fdae5e3 | 7,960 | py | Python | sktime/utils/time_series.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2020-09-11T06:26:08.000Z | 2020-09-11T06:26:08.000Z | sktime/utils/time_series.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/utils/time_series.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T18:19:01.000Z | 2022-02-14T18:19:01.000Z | __author__ = ["Markus Löning"]
__all__ = [
"compute_relative_to_n_timepoints",
"time_series_slope",
"fit_trend",
"remove_trend",
"add_trend"
]
import numpy as np
from sklearn.utils import check_array
from sktime.utils.validation.forecasting import check_time_index
def compute_relative_to_n_timep... | 29.157509 | 79 | 0.593593 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,608 | 0.578822 |
be2e7ef040dc5a54cf6259bfaf5348f1c97d85ac | 2,061 | py | Python | prog_vae/prog_encoder/prog_encoder.py | Hanjun-Dai/sdvae | bd26ea949c496419634fd2cf4802fc8e19a9194c | [
"MIT"
] | 70 | 2018-02-24T07:50:59.000Z | 2021-12-27T02:42:37.000Z | prog_vae/prog_encoder/prog_encoder.py | Hanjun-Dai/sdvae | bd26ea949c496419634fd2cf4802fc8e19a9194c | [
"MIT"
] | 7 | 2018-05-31T00:50:19.000Z | 2021-09-28T11:58:22.000Z | prog_vae/prog_encoder/prog_encoder.py | Hanjun-Dai/sdvae | bd26ea949c496419634fd2cf4802fc8e19a9194c | [
"MIT"
] | 19 | 2019-01-11T10:56:00.000Z | 2022-03-23T23:09:39.000Z | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
import csv
import numpy as np
import math
import random
from collections import defaultdict
import torch
from torch.autograd import Variable
from torch.nn.parameter import Parameter
import torch.nn as nn
import torch.nn.functional as F
i... | 30.308824 | 91 | 0.6623 | 1,366 | 0.662785 | 0 | 0 | 0 | 0 | 0 | 0 | 118 | 0.057254 |
be30c6f12931ff680481e45af1a532c7eab58cb2 | 1,089 | py | Python | pyvmu/messages.py | JosephRedfern/VarienseVMU | e27c05a83124e024cd049b10f7d682f7f41a5c73 | [
"MIT"
] | 5 | 2017-10-23T13:13:09.000Z | 2018-05-07T14:38:47.000Z | pyvmu/messages.py | JosephRedfern/VarienseVMU | e27c05a83124e024cd049b10f7d682f7f41a5c73 | [
"MIT"
] | 2 | 2018-04-18T08:15:52.000Z | 2018-05-17T11:32:47.000Z | pyvmu/messages.py | JosephRedfern/VarienseVMU | e27c05a83124e024cd049b10f7d682f7f41a5c73 | [
"MIT"
] | 3 | 2017-09-06T18:05:21.000Z | 2018-11-21T13:08:16.000Z | from collections import namedtuple
Accelerometer = namedtuple('Accelerometer', ["timestamp", "x", "y", "z"])
Magnetometer = namedtuple('Magnetometer', ['timestamp', 'x', 'y', 'z'])
Gyroscope = namedtuple('Gyroscope', ['timestamp', 'x', 'y', 'z'])
Euler = namedtuple('Euler', ['timestamp', 'x', 'y', 'z'])
Quaternion = ... | 45.375 | 73 | 0.486685 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 451 | 0.414141 |
be313f1e475a00f009ff53d9286703681a5859de | 2,847 | py | Python | scripts/Caesar-Cipher/CaesarCipher.py | Pythobit/python-projects | 1a6ee3f0f417846626dfa021af49c999771a0199 | [
"MIT"
] | 2 | 2021-10-19T06:17:33.000Z | 2021-10-19T06:17:37.000Z | scripts/Caesar-Cipher/CaesarCipher.py | Pythobit/Python-Projects | 1a6ee3f0f417846626dfa021af49c999771a0199 | [
"MIT"
] | 4 | 2021-10-19T06:04:36.000Z | 2021-10-19T11:42:57.000Z | scripts/Caesar-Cipher/CaesarCipher.py | Pythobit/Python-Projects | 1a6ee3f0f417846626dfa021af49c999771a0199 | [
"MIT"
] | 1 | 2021-10-19T06:55:26.000Z | 2021-10-19T06:55:26.000Z | from __future__ import print_function
import os
import string
import argparse
try:
maketrans = string.maketrans # python2
except AttributeError:
maketrans = str.maketrans # python3
def caeser_cipher(string_: str, offset: int, decode: bool, file_: string) -> None:
"""Caeser Cipher implementation, reads ... | 30.945652 | 88 | 0.663505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 908 | 0.318932 |
be31bc2fba335d1b861c92be573990bfd80133fd | 8,217 | py | Python | onadata/libs/permissions.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 38 | 2017-02-28T05:39:40.000Z | 2019-01-16T04:39:04.000Z | onadata/libs/permissions.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 20 | 2017-04-27T09:14:27.000Z | 2019-01-17T06:35:52.000Z | onadata/libs/permissions.py | BuildAMovement/whistler-kobocat | 7f61dd0761bb0aa5b27c909bcff8c29453d3311d | [
"BSD-2-Clause"
] | 5 | 2017-02-22T12:25:19.000Z | 2019-01-15T11:16:40.000Z | from collections import defaultdict
from django.contrib.contenttypes.models import ContentType
from guardian.shortcuts import (
assign_perm,
remove_perm,
get_perms,
get_users_with_perms)
from onadata.apps.api.models import OrganizationProfile
from onadata.apps.main.models.user_profile import UserProfi... | 31.848837 | 77 | 0.69271 | 4,877 | 0.593526 | 0 | 0 | 1,314 | 0.159912 | 0 | 0 | 1,339 | 0.162955 |
be330b0c9754c05467f2b02c3762c1390226f3d3 | 10,078 | py | Python | lanelines.py | gauborg/lane-finding-gborgaonkar | 466313a0da7c245e25f0987afa953300501d5322 | [
"MIT"
] | null | null | null | lanelines.py | gauborg/lane-finding-gborgaonkar | 466313a0da7c245e25f0987afa953300501d5322 | [
"MIT"
] | null | null | null | lanelines.py | gauborg/lane-finding-gborgaonkar | 466313a0da7c245e25f0987afa953300501d5322 | [
"MIT"
] | null | null | null | # Self-Driving Car Engineer Nanodegree
#
# ## Project: **Finding Lane Lines on the Road**
# ## Import Packages
#importing some useful packages
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import numpy as np
import cv2
import math
import moviepy
image = mpimg.imread('test_images/solidWhiteRight... | 36.514493 | 137 | 0.682675 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,727 | 0.56776 |
be3353aec22fa60209490a5516f7d6ee7289c13d | 1,873 | py | Python | zict/zip.py | phobson/zict | 666c7cd9fd4667cc8831a35cf958fd51788acd3e | [
"BSD-3-Clause"
] | null | null | null | zict/zip.py | phobson/zict | 666c7cd9fd4667cc8831a35cf958fd51788acd3e | [
"BSD-3-Clause"
] | null | null | null | zict/zip.py | phobson/zict | 666c7cd9fd4667cc8831a35cf958fd51788acd3e | [
"BSD-3-Clause"
] | null | null | null | try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
import zipfile
class Zip(MutableMapping):
"""Mutable Mapping interface to a Zip file
Keys must be strings, values must be bytes
Parameters
----------
filename: string
mode: stri... | 24.324675 | 88 | 0.595302 | 1,740 | 0.928991 | 0 | 0 | 250 | 0.133476 | 0 | 0 | 499 | 0.266418 |
be357d6f3c1ddf5962bf29bb44f0430102e3f1c8 | 7,741 | py | Python | neutron_lbaas/drivers/driver_mixins.py | containers-kraken/neutron-lbaas | 43fbc34cc90512e33202bc4187ccf712dda6a782 | [
"Apache-2.0"
] | null | null | null | neutron_lbaas/drivers/driver_mixins.py | containers-kraken/neutron-lbaas | 43fbc34cc90512e33202bc4187ccf712dda6a782 | [
"Apache-2.0"
] | null | null | null | neutron_lbaas/drivers/driver_mixins.py | containers-kraken/neutron-lbaas | 43fbc34cc90512e33202bc4187ccf712dda6a782 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 A10 Networks
#
# 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 agree... | 42.070652 | 79 | 0.628472 | 6,712 | 0.867071 | 0 | 0 | 6,808 | 0.879473 | 0 | 0 | 3,083 | 0.398269 |
be365df64e401dd1c966469e8ae1e80392fa4b62 | 1,207 | py | Python | Lib/hTools2/modules/ftp.py | miguelsousa/hTools2 | eab400677c1b21bb2519a7354a142e167c2b39ba | [
"BSD-3-Clause"
] | null | null | null | Lib/hTools2/modules/ftp.py | miguelsousa/hTools2 | eab400677c1b21bb2519a7354a142e167c2b39ba | [
"BSD-3-Clause"
] | null | null | null | Lib/hTools2/modules/ftp.py | miguelsousa/hTools2 | eab400677c1b21bb2519a7354a142e167c2b39ba | [
"BSD-3-Clause"
] | null | null | null | # [h] hTools2.modules.ftp
"""Tools to connect to a FTP server, upload files etc."""
# This module uses the `ftplib` library to handle FTP connection and upload.
# http://docs.python.org/library/ftplib.html
import os
from ftplib import FTP
def connect_to_server(url, login, password, folder, verbose=False):
"""Co... | 30.175 | 161 | 0.6686 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 705 | 0.584093 |
be368e6b255149306c28292dd49ca28ab1a75535 | 553 | py | Python | network/pytorch2onnx.py | MRsoymilk/toy-car | 5bd51bf231781a17e1d7acb4654c3d4b6adbed41 | [
"MIT"
] | null | null | null | network/pytorch2onnx.py | MRsoymilk/toy-car | 5bd51bf231781a17e1d7acb4654c3d4b6adbed41 | [
"MIT"
] | null | null | null | network/pytorch2onnx.py | MRsoymilk/toy-car | 5bd51bf231781a17e1d7acb4654c3d4b6adbed41 | [
"MIT"
] | null | null | null | import Net
import configparser
import torch
from PIL import Image
config = configparser.ConfigParser()
config.read('./config.ini')
MODEL = config.get("Network", "Model")
transformations = Net.transformations
net = Net.Net()
net.eval()
net.load_state_dict(torch.load(MODEL))
image = Image.open("./html/rwby.jpg")
imag... | 19.068966 | 49 | 0.703436 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.135624 |
be385b749f1c26b913c643d471ca79a2fd89e72b | 724 | py | Python | var/spack/repos/builtin/packages/r-gridextra/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/r-gridextra/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/r-gridextra/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RGridextra(RPackage):
"""Miscellaneous Functions for "Grid" Graphics.
Provides a numb... | 34.47619 | 95 | 0.754144 | 503 | 0.694751 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.794199 |
be387cca53cfcab985ce1dca7b42033320d21418 | 2,707 | py | Python | tuframework/training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py | Magnety/tuFramework | b31cb34d476ef306b52da955021f93c91c14ddf4 | [
"Apache-2.0"
] | null | null | null | tuframework/training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py | Magnety/tuFramework | b31cb34d476ef306b52da955021f93c91c14ddf4 | [
"Apache-2.0"
] | null | null | null | tuframework/training/network_training/competitions_with_custom_Trainers/MMS/nnUNetTrainerV2_MMS.py | Magnety/tuFramework | b31cb34d476ef306b52da955021f93c91c14ddf4 | [
"Apache-2.0"
] | null | null | null | import torch
from tuframework.network_architecture.generic_UNet import Generic_UNet
from tuframework.network_architecture.initialization import InitWeights_He
from tuframework.training.network_training.tuframework_variants.data_augmentation.tuframeworkTrainerV2_insaneDA import \
tuframeworkTrainerV2_insaneDA
from t... | 44.377049 | 120 | 0.663465 | 2,309 | 0.852974 | 0 | 0 | 0 | 0 | 0 | 0 | 517 | 0.190986 |
be3baf27f812f65c9b958afcfa252dbaf8d5e093 | 3,088 | py | Python | ansible/playbooks/roles/repository/files/download-requirements/src/command/yum.py | romsok24/epiphany | f058984939561fc8d51288765976118ae12e6c32 | [
"Apache-2.0"
] | null | null | null | ansible/playbooks/roles/repository/files/download-requirements/src/command/yum.py | romsok24/epiphany | f058984939561fc8d51288765976118ae12e6c32 | [
"Apache-2.0"
] | null | null | null | ansible/playbooks/roles/repository/files/download-requirements/src/command/yum.py | romsok24/epiphany | f058984939561fc8d51288765976118ae12e6c32 | [
"Apache-2.0"
] | null | null | null | from typing import List
from src.command.command import Command
class Yum(Command):
"""
Interface for `yum`
"""
def __init__(self, retries: int):
super().__init__('yum', retries)
def update(self, enablerepo: str,
package: str = None,
disablerepo... | 27.81982 | 66 | 0.51943 | 3,020 | 0.977979 | 0 | 0 | 0 | 0 | 0 | 0 | 876 | 0.283679 |
be3e44160e188056687e999ee1b846a80b373896 | 1,819 | py | Python | build/generate_confirmed_cases_by_counties.py | jtagcat/koroonakaart | 16a6eb24a19b286589b063742b03a123315feefc | [
"CC0-1.0",
"MIT"
] | 1 | 2021-12-20T23:05:58.000Z | 2021-12-20T23:05:58.000Z | build/generate_confirmed_cases_by_counties.py | jtagcat/koroonakaart | 16a6eb24a19b286589b063742b03a123315feefc | [
"CC0-1.0",
"MIT"
] | null | null | null | build/generate_confirmed_cases_by_counties.py | jtagcat/koroonakaart | 16a6eb24a19b286589b063742b03a123315feefc | [
"CC0-1.0",
"MIT"
] | 1 | 2021-12-20T23:05:47.000Z | 2021-12-20T23:05:47.000Z | from build.chart_data_functions import get_confirmed_cases_by_county
from build.chart_data_functions import get_county_by_day
from build.constants import CONFIRMED_CASES_BY_COUNTIES_PATH
from build.constants import COUNTY_MAPPING
from build.constants import COUNTY_POPULATION
from build.constants import DATE_SETTINGS
fr... | 30.316667 | 87 | 0.774601 | 0 | 0 | 0 | 0 | 1,122 | 0.616822 | 0 | 0 | 388 | 0.213304 |