hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 245 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 245 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c20a03ffcfd4b36a1ae78734ec9fc03cb23c36f | 8,434 | py | Python | Code/Water/WaterManager.py | croxis/RenderPipeline | 43482c03a835dd620e6d45b08e56fa5679742482 | [
"WTFPL"
] | null | null | null | Code/Water/WaterManager.py | croxis/RenderPipeline | 43482c03a835dd620e6d45b08e56fa5679742482 | [
"WTFPL"
] | null | null | null | Code/Water/WaterManager.py | croxis/RenderPipeline | 43482c03a835dd620e6d45b08e56fa5679742482 | [
"WTFPL"
] | null | null | null |
from panda3d.core import Texture, NodePath, ShaderAttrib, LVecBase2i, PTAFloat
from panda3d.core import Vec2, PNMImage, LVecBase3d, Shader
from ..DebugObject import DebugObject
from ..Globals import Globals
from GPUFFT import GPUFFT
from random import random as generateRandom
from random import seed as setRandomSee... | 40.161905 | 79 | 0.657576 |
from panda3d.core import Texture, NodePath, ShaderAttrib, LVecBase2i, PTAFloat
from panda3d.core import Vec2, PNMImage, LVecBase3d, Shader
from ..DebugObject import DebugObject
from ..Globals import Globals
from GPUFFT import GPUFFT
from random import random as generateRandom
from random import seed as setRandomSee... | true | true |
1c20a15e4c3df24a3a4a12b3368ed747b8bdc621 | 11,879 | py | Python | dataset/cityscapes.py | WenmuZhou/DABNet_Paddle | b551085009faf07b351df98ecb625e1f82ddd50e | [
"MIT"
] | null | null | null | dataset/cityscapes.py | WenmuZhou/DABNet_Paddle | b551085009faf07b351df98ecb625e1f82ddd50e | [
"MIT"
] | null | null | null | dataset/cityscapes.py | WenmuZhou/DABNet_Paddle | b551085009faf07b351df98ecb625e1f82ddd50e | [
"MIT"
] | null | null | null | import os.path as osp
import numpy as np
import random
import cv2
from paddle.io import Dataset
import pickle
class CityscapesDataSet(Dataset):
"""
CityscapesDataSet is employed to load train set
Args:
root: the Cityscapes dataset path,
cityscapes
├── gtFine
├─... | 37.711111 | 118 | 0.557623 | import os.path as osp
import numpy as np
import random
import cv2
from paddle.io import Dataset
import pickle
class CityscapesDataSet(Dataset):
def __init__(self, root='', list_path='', max_iters=None, crop_size=(512, 1024), mean=(128, 128, 128), scale=True,
mirror=True, ignore_label=255):
... | true | true |
1c20a1b4089cd21e5d2c63d957a4217171a63b7a | 3,894 | bzl | Python | defs.bzl | menny/bazel_android_jetify | 6620ba40c8fb141f508b5ceda2d9c01118506417 | [
"Apache-2.0"
] | 1 | 2019-09-18T21:55:11.000Z | 2019-09-18T21:55:11.000Z | defs.bzl | menny/bazel_android_jetify | 6620ba40c8fb141f508b5ceda2d9c01118506417 | [
"Apache-2.0"
] | null | null | null | defs.bzl | menny/bazel_android_jetify | 6620ba40c8fb141f508b5ceda2d9c01118506417 | [
"Apache-2.0"
] | 1 | 2019-10-25T15:13:34.000Z | 2019-10-25T15:13:34.000Z | def _jetify_impl(ctx):
srcs = ctx.attr.srcs
outfiles = []
jetifing_commands = []
for src in srcs:
for artifact in src.files.to_list():
jetified_outfile = ctx.actions.declare_file("jetified_{}_{}".format(ctx.attr.name, artifact.basename))
ctx.actions.run_shell(
... | 44.758621 | 179 | 0.585516 | def _jetify_impl(ctx):
srcs = ctx.attr.srcs
outfiles = []
jetifing_commands = []
for src in srcs:
for artifact in src.files.to_list():
jetified_outfile = ctx.actions.declare_file("jetified_{}_{}".format(ctx.attr.name, artifact.basename))
ctx.actions.run_shell(
... | true | true |
1c20a1c86f425579850b6af333226eef7400a91e | 419 | py | Python | decorator/cli-sample-decorator.py | rawswift/python-collections | 05b61611473a15c666058de3bd5f2707f82d9a4d | [
"MIT"
] | null | null | null | decorator/cli-sample-decorator.py | rawswift/python-collections | 05b61611473a15c666058de3bd5f2707f82d9a4d | [
"MIT"
] | null | null | null | decorator/cli-sample-decorator.py | rawswift/python-collections | 05b61611473a15c666058de3bd5f2707f82d9a4d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
class Decor(object):
def __init__(self, func):
self.func = func
def __call__(self, *args, **kwargs):
result = self.func(*args, **kwargs)
# multiple it by itself
result = result * result
return result
@Decor
def process(x=0, y=0):
return x+y
... | 19.045455 | 43 | 0.594272 |
class Decor(object):
def __init__(self, func):
self.func = func
def __call__(self, *args, **kwargs):
result = self.func(*args, **kwargs)
result = result * result
return result
@Decor
def process(x=0, y=0):
return x+y
print process(1, 1)
print process(2, 2)
pr... | false | true |
1c20a1d8f44a989e9eec99fae8743fd91f1bf6f1 | 10,031 | py | Python | fedlearner/data_join/raw_data_visitor.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 772 | 2020-01-21T13:59:42.000Z | 2022-03-30T08:20:16.000Z | fedlearner/data_join/raw_data_visitor.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 126 | 2020-03-03T07:54:39.000Z | 2022-03-08T23:24:03.000Z | fedlearner/data_join/raw_data_visitor.py | Hsy-Intel/fedlearner | d5d0bb5549e115eaf0dec5a00a78dcb21ac0909d | [
"Apache-2.0"
] | 198 | 2020-01-22T02:16:17.000Z | 2022-03-31T01:13:05.000Z | # Copyright 2020 The FedLearner Authors. 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 applica... | 43.995614 | 77 | 0.617785 |
import logging
import os
import traceback
from google.protobuf import text_format
from fedlearner.common import data_join_service_pb2 as dj_pb
from fedlearner.common import common_pb2 as common_pb
from fedlearner.data_join import visitor, common
from fedlearner.data_join.raw_data_iter_impl import cre... | true | true |
1c20a297ddab49df488398047a24cdac7ff9cf8c | 442 | py | Python | venv/Scripts2/easy_install-3.6-script.py | ykchen12/UserCenter | c3562893ee18f5ade877a6c3db2e4638512799b4 | [
"MIT"
] | null | null | null | venv/Scripts2/easy_install-3.6-script.py | ykchen12/UserCenter | c3562893ee18f5ade877a6c3db2e4638512799b4 | [
"MIT"
] | 4 | 2020-02-12T00:13:06.000Z | 2021-06-10T21:26:39.000Z | venv/Scripts2/easy_install-3.6-script.py | ykchen12/UserCenter | c3562893ee18f5ade877a6c3db2e4638512799b4 | [
"MIT"
] | 1 | 2019-05-07T03:44:30.000Z | 2019-05-07T03:44:30.000Z | #!E:\PycharmProjects\ssa\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.6'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '',... | 34 | 87 | 0.687783 |
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('setuptools==39.1.0', 'console_scripts', 'easy_install-3.6')()
)
| true | true |
1c20a300a3306f88ed699232c05728fd5105e39f | 5,300 | py | Python | desktop/libs/notebook/src/notebook/connectors/ksql.py | nils-braun/hue | 1d834ed2d7bbfc06d55f2d9277a2dd055ce0e727 | [
"Apache-2.0"
] | 2 | 2020-02-02T15:22:13.000Z | 2020-07-29T15:25:44.000Z | desktop/libs/notebook/src/notebook/connectors/ksql.py | nils-braun/hue | 1d834ed2d7bbfc06d55f2d9277a2dd055ce0e727 | [
"Apache-2.0"
] | 7 | 2019-11-28T21:48:38.000Z | 2020-08-02T18:06:40.000Z | desktop/libs/notebook/src/notebook/connectors/ksql.py | nils-braun/hue | 1d834ed2d7bbfc06d55f2d9277a2dd055ce0e727 | [
"Apache-2.0"
] | 6 | 2020-05-29T21:46:30.000Z | 2020-12-15T20:32:19.000Z | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | 28.648649 | 133 | 0.617547 |
from __future__ import absolute_import
import logging
import json
from django.utils.translation import ugettext as _
from desktop.lib.i18n import force_unicode
from desktop.conf import has_channels
from kafka.ksql_client import KSqlApi as KSqlClientApi
from notebook.connectors.base import Api, Quer... | true | true |
1c20a364017bc1448aa4a58bdef16f51ca14e951 | 5,057 | py | Python | Projet/Black Jack sans mise.py | FDaCostaB/INF101-Black_Jack | 6d41c199b63a7f72ebc97d5660f795e550b7296b | [
"MIT"
] | null | null | null | Projet/Black Jack sans mise.py | FDaCostaB/INF101-Black_Jack | 6d41c199b63a7f72ebc97d5660f795e550b7296b | [
"MIT"
] | null | null | null | Projet/Black Jack sans mise.py | FDaCostaB/INF101-Black_Jack | 6d41c199b63a7f72ebc97d5660f795e550b7296b | [
"MIT"
] | null | null | null | import random
def paquet():
couleurs =["carreau","pique","trefle","coeur"]
valeurs =["as","2","3","4","5","6","7","8","9","10","valet","dame","roi"]
paquet=[]
for couleur in couleurs:
for valeur in valeurs:
paquet.append(valeur+" de "+couleur)
return paquet
def valeurC... | 33.939597 | 140 | 0.564959 | import random
def paquet():
couleurs =["carreau","pique","trefle","coeur"]
valeurs =["as","2","3","4","5","6","7","8","9","10","valet","dame","roi"]
paquet=[]
for couleur in couleurs:
for valeur in valeurs:
paquet.append(valeur+" de "+couleur)
return paquet
def valeurC... | true | true |
1c20a397a882ca65e063c16aa091afd7a2483d4e | 3,624 | py | Python | analyzer/tests/functional/config/test_config.py | gocarlos/codechecker | 17678b103375a9dbff6e69328d0996d54de78ef3 | [
"Apache-2.0"
] | null | null | null | analyzer/tests/functional/config/test_config.py | gocarlos/codechecker | 17678b103375a9dbff6e69328d0996d54de78ef3 | [
"Apache-2.0"
] | null | null | null | analyzer/tests/functional/config/test_config.py | gocarlos/codechecker | 17678b103375a9dbff6e69328d0996d54de78ef3 | [
"Apache-2.0"
] | null | null | null | #
# -------------------------------------------------------------------------
#
# Part of the CodeChecker project, under the Apache License v2.0 with
# LLVM Exceptions. See LICENSE for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#
# -------------------------------------------------... | 32.945455 | 75 | 0.564294 |
import json
import os
import subprocess
import unittest
from libtest import env
class TestConfig(unittest.TestCase):
_ccClient = None
def setUp(self):
self.test_workspace = os.environ['TEST_WORKSPACE']
test_class = self.__class__.__name__
print('Running ' + test... | true | true |
1c20a478f7a247cb1c58a8ac0fb334b3689e80d0 | 20,091 | py | Python | VSTMPsychopyFiles/VSTM_PassConfigFile.py | NCMlab/CogntiveTasksOnline | 02e2bdb2b54a96b609fd5658cac4323322f183f0 | [
"MIT"
] | 1 | 2021-08-28T03:09:19.000Z | 2021-08-28T03:09:19.000Z | VSTMPsychopyFiles/VSTM_PassConfigFile.py | NCMlab/CogntiveTasksOnline | 02e2bdb2b54a96b609fd5658cac4323322f183f0 | [
"MIT"
] | null | null | null | VSTMPsychopyFiles/VSTM_PassConfigFile.py | NCMlab/CogntiveTasksOnline | 02e2bdb2b54a96b609fd5658cac4323322f183f0 | [
"MIT"
] | null | null | null | '''
This version of the task takes a config file when called along with a flag based
on whether to use a fixed dot location or not.
The config file creates three different lists of probe pos/neg orders and dot
locations for load levels 1 to 15.
'''
# https://docs.python.org/3/library/configparser.html
from psychopy i... | 36.2 | 221 | 0.621373 |
from psychopy import locale_setup, gui, visual, core, data, event, logging
import numpy as np
import os
import sys
import random
import wx
_thisDir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(_thisDir, '..','ConfigFiles'))
countDown = core.CountdownTimer()
'] = expName
if le... | true | true |
1c20a4c25b5c30f0bed928860d0242cdb109f729 | 3,566 | py | Python | examples/contrib/autoname/tree_data.py | ruohoruotsi/pyro | b54a4b42b9474eb3ecee11505e45fde85b1cdc54 | [
"MIT"
] | null | null | null | examples/contrib/autoname/tree_data.py | ruohoruotsi/pyro | b54a4b42b9474eb3ecee11505e45fde85b1cdc54 | [
"MIT"
] | null | null | null | examples/contrib/autoname/tree_data.py | ruohoruotsi/pyro | b54a4b42b9474eb3ecee11505e45fde85b1cdc54 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function
import argparse
import torch
from torch.distributions import constraints
import pyro
import pyro.distributions as dist
from pyro.contrib.autoname import named
from pyro.infer import SVI, Trace_ELBO
from pyro.optim import Adam
# This is a linear mixed-... | 31.839286 | 85 | 0.643017 | from __future__ import absolute_import, division, print_function
import argparse
import torch
from torch.distributions import constraints
import pyro
import pyro.distributions as dist
from pyro.contrib.autoname import named
from pyro.infer import SVI, Trace_ELBO
from pyro.optim import Adam
def model(data)... | true | true |
1c20a5a89b044ae17fafe51a8a022558e134ed3e | 4,188 | py | Python | parser/team22/lex.py | wendychamale/tytus | e5e6d9349f609360370edcfbb65b8c93b21f1bab | [
"MIT"
] | null | null | null | parser/team22/lex.py | wendychamale/tytus | e5e6d9349f609360370edcfbb65b8c93b21f1bab | [
"MIT"
] | null | null | null | parser/team22/lex.py | wendychamale/tytus | e5e6d9349f609360370edcfbb65b8c93b21f1bab | [
"MIT"
] | null | null | null | ##-------------------------GRAMATICA ASCENDENTE-------------------------------
reservadas = {
'create' : 'CREATE',
'database' : 'DATABASE',
'table' : 'TABLE',
'char' : 'CHAR',
'varchar' : 'VARCHAR',
'boolean' : 'BOOLEAN',
'int' : 'INT',
'integer' : 'INTEGER',
'float' : 'FLOAT',
... | 21.8125 | 80 | 0.461079 | 'table' : 'TABLE',
'char' : 'CHAR',
'varchar' : 'VARCHAR',
'boolean' : 'BOOLEAN',
'int' : 'INT',
'integer' : 'INTEGER',
'float' : 'FLOAT',
'double' : 'DOUBLE',
'date' : 'DATE',
'year' : 'YEAR',
'datetime' : 'DATETIME',
'time' : 'TIME',
'drop' : 'DROP',
'alter' : 'ALT... | true | true |
1c20a7c1c098d723640e9893c7fdfcef3d78deb5 | 2,403 | py | Python | flytekit/core/node.py | sbrunk/flytekit | 0aa9cdb1be928f799170da61f1135121ccb64657 | [
"Apache-2.0"
] | null | null | null | flytekit/core/node.py | sbrunk/flytekit | 0aa9cdb1be928f799170da61f1135121ccb64657 | [
"Apache-2.0"
] | 1 | 2021-02-05T02:57:25.000Z | 2021-02-05T02:57:25.000Z | flytekit/core/node.py | sbrunk/flytekit | 0aa9cdb1be928f799170da61f1135121ccb64657 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import Any, List
from flytekit.common.utils import _dnsify
from flytekit.models import literals as _literal_models
from flytekit.models.core import workflow as _workflow_model
class Node(object):
"""
This class will hold all the things necessary to make an SdkN... | 35.338235 | 116 | 0.660424 | from __future__ import annotations
from typing import Any, List
from flytekit.common.utils import _dnsify
from flytekit.models import literals as _literal_models
from flytekit.models.core import workflow as _workflow_model
class Node(object):
def __init__(
self,
id: str,
metadata: _work... | true | true |
1c20a7e834cc4fafc70ce7a1383acefd88bbcc0a | 6,726 | py | Python | utils/loss.py | Yoshino-master/FreeAnchor_TensorFlow | 656a07c85da8b3de21416d1e5162134665abd164 | [
"MIT"
] | 7 | 2019-10-18T12:11:55.000Z | 2021-04-13T14:38:50.000Z | utils/loss.py | Yoshino-master/FreeAnchor_TensorFlow | 656a07c85da8b3de21416d1e5162134665abd164 | [
"MIT"
] | null | null | null | utils/loss.py | Yoshino-master/FreeAnchor_TensorFlow | 656a07c85da8b3de21416d1e5162134665abd164 | [
"MIT"
] | 4 | 2019-10-21T06:44:59.000Z | 2020-08-31T07:57:28.000Z | import tensorflow as tf
import math
from utils.evals import calc_iou_tf
from utils.evals import decode, encode
class FreeAnchorLoss(object):
def __init__(self, cfg):
self.cfg = cfg
self.xywh_weights = (10.0, 10.0, 5.0, 5.0)
self.bbox_xform_clip = math.log(1000. / 16)
def matched_bo... | 56.05 | 146 | 0.637526 | import tensorflow as tf
import math
from utils.evals import calc_iou_tf
from utils.evals import decode, encode
class FreeAnchorLoss(object):
def __init__(self, cfg):
self.cfg = cfg
self.xywh_weights = (10.0, 10.0, 5.0, 5.0)
self.bbox_xform_clip = math.log(1000. / 16)
def matched_bo... | true | true |
1c20a93d8962ccf0ce99edeb29f1aa0689afc796 | 3,721 | py | Python | sem/utils.py | singhgargi/SEM2 | d0f260e10a3e34067b8c2d73abdeae36e5fa55bb | [
"MIT"
] | null | null | null | sem/utils.py | singhgargi/SEM2 | d0f260e10a3e34067b8c2d73abdeae36e5fa55bb | [
"MIT"
] | null | null | null | sem/utils.py | singhgargi/SEM2 | d0f260e10a3e34067b8c2d73abdeae36e5fa55bb | [
"MIT"
] | null | null | null | import os
import sys
import traceback
import numpy as np
from functools import wraps
from multiprocessing import Process, Queue
def unroll_data(x, t=1):
"""
This function is used by recurrent neural nets to do back-prop through time.
Unrolls a data_set for with time-steps, truncated for t time-steps
... | 27.360294 | 94 | 0.617576 | import os
import sys
import traceback
import numpy as np
from functools import wraps
from multiprocessing import Process, Queue
def unroll_data(x, t=1):
if np.ndim(x) == 2:
n, d = np.shape(x)
elif np.ndim(x):
n, d = 1, np.shape(x)[0]
x = np.reshape(x, (1, d))
x_unrolled = np.zeros... | true | true |
1c20a95a097eb2d698f8c3fec38d752f4df967c1 | 12,037 | py | Python | bentoml/cli/deployment.py | kmr0877/BentoML | 6f2435baf89145f29a4007f124fe9329d46b2a6a | [
"Apache-2.0"
] | null | null | null | bentoml/cli/deployment.py | kmr0877/BentoML | 6f2435baf89145f29a4007f124fe9329d46b2a6a | [
"Apache-2.0"
] | null | null | null | bentoml/cli/deployment.py | kmr0877/BentoML | 6f2435baf89145f29a4007f124fe9329d46b2a6a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Atalaya Tech, Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, ... | 37.971609 | 88 | 0.60555 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import click
import logging
from datetime import datetime
from bentoml.cli.click_utils import (
BentoMLCommandGroup,
_echo,
CLI_COLOR_ERROR,
CLI_COLOR_SUCCESS,
parse_yaml_file... | true | true |
1c20aa66d5773a0fdfb13c64c31d4d28d6a87348 | 3,497 | py | Python | .github/scripts/test_trymerge.py | Haijunlv/pytorch | 02ba0fa8e8bf4364b211b61670e221255e23e1f5 | [
"Intel"
] | null | null | null | .github/scripts/test_trymerge.py | Haijunlv/pytorch | 02ba0fa8e8bf4364b211b61670e221255e23e1f5 | [
"Intel"
] | null | null | null | .github/scripts/test_trymerge.py | Haijunlv/pytorch | 02ba0fa8e8bf4364b211b61670e221255e23e1f5 | [
"Intel"
] | null | null | null | #!/usr/bin/env python3
import json
import os
from hashlib import sha256
from trymerge import find_matching_merge_rule, gh_graphql, GitHubPR
from gitutils import get_git_remote_name, get_git_repo_dir, GitRepo
from typing import Any
from unittest import TestCase, main, mock
def mocked_gh_graphql(query: str, **kwargs: An... | 39.292135 | 131 | 0.678868 |
import json
import os
from hashlib import sha256
from trymerge import find_matching_merge_rule, gh_graphql, GitHubPR
from gitutils import get_git_remote_name, get_git_repo_dir, GitRepo
from typing import Any
from unittest import TestCase, main, mock
def mocked_gh_graphql(query: str, **kwargs: Any) -> Any:
gql_db_... | true | true |
1c20ab3e216c7db2a8c04435771a6e915dbec648 | 3,459 | py | Python | lambda/py/lambda_upload/ask_sdk_model/slu/entityresolution/status.py | frivas/alexa-mixed-polly | bf0fde9005a66f3d6f0193799eacef934d166de7 | [
"W3C"
] | null | null | null | lambda/py/lambda_upload/ask_sdk_model/slu/entityresolution/status.py | frivas/alexa-mixed-polly | bf0fde9005a66f3d6f0193799eacef934d166de7 | [
"W3C"
] | null | null | null | lambda/py/lambda_upload/ask_sdk_model/slu/entityresolution/status.py | frivas/alexa-mixed-polly | bf0fde9005a66f3d6f0193799eacef934d166de7 | [
"W3C"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 32.327103 | 122 | 0.598728 |
import pprint
import re
import six
import typing
from enum import Enum
if typing.TYPE_CHECKING:
from typing import Dict, List, Optional
from datetime import datetime
from ask_sdk_model.slu.entityresolution.status_code import StatusCode
class Status(object):
deserialized_types = {
... | true | true |
1c20ab63572de6264270b3f5439237ba22069657 | 10,411 | py | Python | omics_dashboard_client/session.py | BiRG/Omics-Dashboard-Python-Client | c5122978d61c4060e015d97742c779b88d95267e | [
"MIT"
] | null | null | null | omics_dashboard_client/session.py | BiRG/Omics-Dashboard-Python-Client | c5122978d61c4060e015d97742c779b88d95267e | [
"MIT"
] | null | null | null | omics_dashboard_client/session.py | BiRG/Omics-Dashboard-Python-Client | c5122978d61c4060e015d97742c779b88d95267e | [
"MIT"
] | null | null | null | import json
from typing import Union, Dict, Type, List, Any
import requests
from omics_dashboard_client.record.analysis import Analysis
from omics_dashboard_client.record.collection import Collection
from omics_dashboard_client.record.external_file import ExternalFile
from omics_dashboard_client.record.file_record im... | 41.644 | 136 | 0.59514 | import json
from typing import Union, Dict, Type, List, Any
import requests
from omics_dashboard_client.record.analysis import Analysis
from omics_dashboard_client.record.collection import Collection
from omics_dashboard_client.record.external_file import ExternalFile
from omics_dashboard_client.record.file_record im... | true | true |
1c20ab68c6f5aca87f0b74318bdc37c0ec6b4f56 | 5,998 | py | Python | invar-example/target/generated-sources/example/python/TestProtocTestUserLoginR2C.py | struqt/invar | 4547a6de593839ae68e19bc108918fb0d2530d5e | [
"MIT"
] | 7 | 2016-08-26T05:10:20.000Z | 2017-08-09T14:28:56.000Z | invar-example/target/generated-sources/example/python/TestProtocTestUserLoginR2C.py | struqt/invar | 4547a6de593839ae68e19bc108918fb0d2530d5e | [
"MIT"
] | null | null | null | invar-example/target/generated-sources/example/python/TestProtocTestUserLoginR2C.py | struqt/invar | 4547a6de593839ae68e19bc108918fb0d2530d5e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ===------------------------------* Python *------------------------------===
# THIS FILE IS GENERATED BY INVAR. DO NOT EDIT !!!
# ===------------------------------------------------------------------------===
from TestProtocProtoc2C import Protoc2C
try:
... | 29.693069 | 102 | 0.500667 |
from TestProtocProtoc2C import Protoc2C
try:
from cStringIO import StringIO
except:
from StringIO import StringIO
from InvarCodec import DataWriter
from InvarCodec import DataReader
class TestUserLoginR2C(object):
CRC32_ = 0x3840542A
SIZE_ = 24
__slots__ = (
'_protocError',
... | true | true |
1c20ac0e6857e42968f63c65e72aa7c24e470fc8 | 10,453 | py | Python | src/msm/model.py | wingrune/Parietal | bdd82de0a0c98b22fd5b5c5dd7b42bc775b1bf48 | [
"MIT"
] | null | null | null | src/msm/model.py | wingrune/Parietal | bdd82de0a0c98b22fd5b5c5dd7b42bc775b1bf48 | [
"MIT"
] | null | null | null | src/msm/model.py | wingrune/Parietal | bdd82de0a0c98b22fd5b5c5dd7b42bc775b1bf48 | [
"MIT"
] | null | null | null | import logging
import nibabel as nib
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from scipy.stats import pearsonr
import os
from pathlib import Path
import shlex
import subprocess
from tempfile import TemporaryDirectory
from msm.run import run_msm
from msm import utils
class MSM(BaseE... | 34.272131 | 119 | 0.541567 | import logging
import nibabel as nib
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from scipy.stats import pearsonr
import os
from pathlib import Path
import shlex
import subprocess
from tempfile import TemporaryDirectory
from msm.run import run_msm
from msm import utils
class MSM(BaseE... | true | true |
1c20ad13879ebac20e38cd4e1d16aed94e35ae47 | 4,841 | py | Python | venv/lib/python3.8/site-packages/vsts/build/v4_0/models/__init__.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/build/v4_0/models/__init__.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/build/v4_0/models/__init__.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 40.341667 | 95 | 0.757901 |
from .agent_pool_queue import AgentPoolQueue
from .artifact_resource import ArtifactResource
from .build import Build
from .build_artifact import BuildArtifact
from .build_badge import BuildBadge
from .build_controller import BuildController
from .build_definition import BuildDefinition
from .build_defi... | true | true |
1c20ad3bf7f74503b3ebd8ba62f903d8df294132 | 1,413 | py | Python | profiles/migrations/0001_initial.py | iiostefanos/honeyshopstef | 1e59f4ac38c4bbabbc8d2961bd09ba37a1f537fc | [
"BSD-Source-Code"
] | null | null | null | profiles/migrations/0001_initial.py | iiostefanos/honeyshopstef | 1e59f4ac38c4bbabbc8d2961bd09ba37a1f537fc | [
"BSD-Source-Code"
] | 12 | 2021-03-30T13:53:22.000Z | 2022-01-13T12:35:30.000Z | profiles/migrations/0001_initial.py | iiostefanos/honeyshopstef | 1e59f4ac38c4bbabbc8d2961bd09ba37a1f537fc | [
"BSD-Source-Code"
] | 1 | 2020-07-30T20:27:18.000Z | 2020-07-30T20:27:18.000Z | # Generated by Django 3.0.8 on 2020-07-18 13:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.A... | 42.818182 | 121 | 0.65959 |
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
... | true | true |
1c20adc9096c3a10a635b088b0d00633b959b335 | 153 | py | Python | script/TS1.py | WRS-TDRRC/WRS-TDRRC-2020 | 5bb66f8494d8998549b87047c3501cc3241c9388 | [
"CC0-1.0"
] | null | null | null | script/TS1.py | WRS-TDRRC/WRS-TDRRC-2020 | 5bb66f8494d8998549b87047c3501cc3241c9388 | [
"CC0-1.0"
] | null | null | null | script/TS1.py | WRS-TDRRC/WRS-TDRRC-2020 | 5bb66f8494d8998549b87047c3501cc3241c9388 | [
"CC0-1.0"
] | 2 | 2020-05-26T04:14:06.000Z | 2021-09-30T06:35:14.000Z | import WRSUtil
WRSUtil.loadProject(
"MultiSceneViews", "TS1", "AGXSimulator", "DoubleArmV7A",
enableVisionSimulation = True, remoteType = "ROS")
| 30.6 | 61 | 0.732026 | import WRSUtil
WRSUtil.loadProject(
"MultiSceneViews", "TS1", "AGXSimulator", "DoubleArmV7A",
enableVisionSimulation = True, remoteType = "ROS")
| true | true |
1c20ae86db2edfe5122d9501dbd0697bc76779ec | 268 | py | Python | app/schemas/__init__.py | DzhonPetrus/Treatment-Management | 6b08c59d2d4e79181bbae4e951b7a5fd2e3162f1 | [
"MIT"
] | null | null | null | app/schemas/__init__.py | DzhonPetrus/Treatment-Management | 6b08c59d2d4e79181bbae4e951b7a5fd2e3162f1 | [
"MIT"
] | null | null | null | app/schemas/__init__.py | DzhonPetrus/Treatment-Management | 6b08c59d2d4e79181bbae4e951b7a5fd2e3162f1 | [
"MIT"
] | null | null | null | from .surgery import *
from .lab_test import *
from .surgery_type import*
from .lab_result import*
from .lab_request import*
from .profile import *
from .treatment import *
from .treatment_type import *
from .patient import *
from .user import *
from .token import * | 20.615385 | 29 | 0.761194 | from .surgery import *
from .lab_test import *
from .surgery_type import*
from .lab_result import*
from .lab_request import*
from .profile import *
from .treatment import *
from .treatment_type import *
from .patient import *
from .user import *
from .token import * | true | true |
1c20af6a12419917a020160173c4babb060ba403 | 272 | py | Python | 3dship/users/apps.py | Gauravwagh/3dship | 0308eaba2b3df46217130163f34bc9808afa16a0 | [
"MIT"
] | null | null | null | 3dship/users/apps.py | Gauravwagh/3dship | 0308eaba2b3df46217130163f34bc9808afa16a0 | [
"MIT"
] | null | null | null | 3dship/users/apps.py | Gauravwagh/3dship | 0308eaba2b3df46217130163f34bc9808afa16a0 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class UsersConfig(AppConfig):
name = '3dship.users'
verbose_name = "Users"
def ready(self):
"""Override this to put in:
Users system checks
Users signal registration
"""
pass
| 19.428571 | 37 | 0.591912 | from django.apps import AppConfig
class UsersConfig(AppConfig):
name = '3dship.users'
verbose_name = "Users"
def ready(self):
pass
| true | true |
1c20afed4aee7540cba4b7c4418bc291cef49d4b | 3,983 | py | Python | demo/emotion_recognition_demo.py | romilbhardwaj/nomad | c6a8289872bfd07d1aa0b913f0aee7a2fccd5bf1 | [
"MIT"
] | 2 | 2019-02-06T19:47:48.000Z | 2019-10-30T07:30:14.000Z | demo/emotion_recognition_demo.py | romilbhardwaj/nomad | c6a8289872bfd07d1aa0b913f0aee7a2fccd5bf1 | [
"MIT"
] | 6 | 2019-03-21T18:29:04.000Z | 2019-04-11T18:31:34.000Z | demo/emotion_recognition_demo.py | romilbhardwaj/nomad | c6a8289872bfd07d1aa0b913f0aee7a2fccd5bf1 | [
"MIT"
] | null | null | null | import random
import time
import numpy as np
import cv2
import datetime
import inspect
import os
# import picamera
from nomad.core.edge.sensors.camera import Camera
from nomad.demo.nomad_emotion.loader import get_model, preprocess_input
def read_picamera_downsampled():
camera = Camera(resolution=(480, 270))
i... | 30.875969 | 113 | 0.670098 | import random
import time
import numpy as np
import cv2
import datetime
import inspect
import os
from nomad.core.edge.sensors.camera import Camera
from nomad.demo.nomad_emotion.loader import get_model, preprocess_input
def read_picamera_downsampled():
camera = Camera(resolution=(480, 270))
image = camera.get... | false | true |
1c20b01ddc0844bdddc6b5926708140fbac58f57 | 4,641 | py | Python | core/handler_schema_constants.py | KKhushhalR2405/oppia | 0133c038a83193bfff270c2c45ee3406e78028ba | [
"Apache-2.0"
] | 1 | 2021-12-23T17:53:37.000Z | 2021-12-23T17:53:37.000Z | core/handler_schema_constants.py | KKhushhalR2405/oppia | 0133c038a83193bfff270c2c45ee3406e78028ba | [
"Apache-2.0"
] | null | null | null | core/handler_schema_constants.py | KKhushhalR2405/oppia | 0133c038a83193bfff270c2c45ee3406e78028ba | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
# Copyright 2021 The Oppia Authors. 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 requir... | 33.388489 | 75 | 0.756949 |
from __future__ import annotations
HANDLER_CLASS_NAMES_WHICH_STILL_NEED_SCHEMAS = [
'AnswerSubmittedEventHandler',
'AssetDevHandler',
'AudioUploadHandler',
'BulkEmailWebhookEndpoint',
'DeferredTasksHandler',
'DeleteAccountPage',
'EditableQuestionDataHandler',
'Edit... | true | true |
1c20b117817f03c3e0525eb4cb3ab4d6d5e2d6f1 | 1,500 | py | Python | trabalho_final/events/start_request.py | filipeRmlh/Trabalho_Final_AD_2020_2 | eed64b1d383674a8212de570aaa6e1ec46f6bd52 | [
"Apache-2.0"
] | null | null | null | trabalho_final/events/start_request.py | filipeRmlh/Trabalho_Final_AD_2020_2 | eed64b1d383674a8212de570aaa6e1ec46f6bd52 | [
"Apache-2.0"
] | null | null | null | trabalho_final/events/start_request.py | filipeRmlh/Trabalho_Final_AD_2020_2 | eed64b1d383674a8212de570aaa6e1ec46f6bd52 | [
"Apache-2.0"
] | null | null | null | from ..request_data import RequestData
from .event import Event
from numpy import random
from .timeout import Timeout
from .client_2_cache import Client2Cache
from ..config import Config
class StartRequest(Event):
request_id = 0
def __init__(self, config, timestamp=0, cache_list=[], max_requests = 10000):
... | 30.612245 | 81 | 0.642 | from ..request_data import RequestData
from .event import Event
from numpy import random
from .timeout import Timeout
from .client_2_cache import Client2Cache
from ..config import Config
class StartRequest(Event):
request_id = 0
def __init__(self, config, timestamp=0, cache_list=[], max_requests = 10000):
... | true | true |
1c20b1dde5299915ea24c56bd9ac1770cd0549c7 | 27,843 | py | Python | twilio/rest/verify/v2/service/__init__.py | timgates42/twilio-python | ef29d03a4857b62b616df4a8f4f2b7c294afbb99 | [
"MIT"
] | 1 | 2021-01-07T11:41:11.000Z | 2021-01-07T11:41:11.000Z | venv/Lib/site-packages/twilio/rest/verify/v2/service/__init__.py | syt1209/PythonProjects | 0409dbd3c0b0ddf00debc38875059c828eb31dec | [
"MIT"
] | null | null | null | venv/Lib/site-packages/twilio/rest/verify/v2/service/__init__.py | syt1209/PythonProjects | 0409dbd3c0b0ddf00debc38875059c828eb31dec | [
"MIT"
] | 4 | 2021-03-25T09:00:08.000Z | 2021-08-05T06:54:23.000Z | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | 37.778833 | 132 | 0.657903 |
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.page import Page
from twilio.rest.verify.v2.service.access_token im... | true | true |
1c20b24bbe68f11ac0a112dfab39319dda91c0ae | 3,330 | py | Python | synapse/util/versionstring.py | maxkratz/synapse | e46ac85d674d90fa01aa49aee9587093ab6d8677 | [
"Apache-2.0"
] | null | null | null | synapse/util/versionstring.py | maxkratz/synapse | e46ac85d674d90fa01aa49aee9587093ab6d8677 | [
"Apache-2.0"
] | null | null | null | synapse/util/versionstring.py | maxkratz/synapse | e46ac85d674d90fa01aa49aee9587093ab6d8677 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 OpenMarket 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 in writin... | 31.121495 | 88 | 0.56997 |
import logging
import os
import subprocess
logger = logging.getLogger(__name__)
def get_version_string(module) -> str:
cached_version = getattr(module, "_synapse_version_string_cache", None)
if cached_version:
return cached_version
version_string = module.__version__
try:
... | true | true |
1c20b28261a76ec38ae6171cf1ff17dd6e9289cf | 956 | py | Python | UnitTests/test_BaseSettings_test.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | null | null | null | UnitTests/test_BaseSettings_test.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | null | null | null | UnitTests/test_BaseSettings_test.py | DavidNaizheZhou/RFEM_Python_Client | a5f7790b67de3423907ce10c0aa513c0a1aca47b | [
"MIT"
] | null | null | null | import sys
import os
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
import pytest
from RFEM.enums import GlobalAxesOrientationType, LocalAxesOrientationType
from RFEM.baseSettings import BaseSettings
from RFEM.initMo... | 36.769231 | 163 | 0.776151 | import sys
import os
PROJECT_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__),
os.pardir)
)
sys.path.append(PROJECT_ROOT)
import pytest
from RFEM.enums import GlobalAxesOrientationType, LocalAxesOrientationType
from RFEM.baseSettings import BaseSettings
from RFEM.initMo... | true | true |
1c20b32fe8436db2bc0c003d86fc07ef414f66bc | 2,081 | py | Python | flask_mysqlpool/__init__.py | dthorell/mysqlpool | 918401eb4379c374513af47f146c65a691b20088 | [
"MIT"
] | 3 | 2019-12-12T11:27:04.000Z | 2021-11-05T22:03:49.000Z | flask_mysqlpool/__init__.py | dthorell/mysqlpool | 918401eb4379c374513af47f146c65a691b20088 | [
"MIT"
] | 1 | 2021-09-06T20:08:42.000Z | 2021-09-06T20:08:42.000Z | flask_mysqlpool/__init__.py | dthorell/mysqlpool | 918401eb4379c374513af47f146c65a691b20088 | [
"MIT"
] | 1 | 2019-12-12T14:54:41.000Z | 2019-12-12T14:54:41.000Z | """
flask_mysqlpool
~~~~~~~~~~~~~~~~
:copyright: (c) 2019 by Daniel Thorell.
:license: MIT, see LICENSE for more details.
"""
import mysql.connector.pooling
from flask import current_app, _app_ctx_stack
__version__ = "1.0.5"
class MySQLPool(object):
def __init__(self, app=None):
self.cn... | 35.271186 | 81 | 0.630947 |
import mysql.connector.pooling
from flask import current_app, _app_ctx_stack
__version__ = "1.0.5"
class MySQLPool(object):
def __init__(self, app=None):
self.cnx = None
self.app = app
if app is not None:
self.init_app(app)
def init_app(self, app):
app.config.set... | true | true |
1c20b478c21ad51fb5f97bf19e15101bf1461425 | 6,994 | py | Python | setup.py | JoseCarlosGarcia95/Mathics | 1927ada93c5ce2d8cbe731731ab1f55cd5527467 | [
"Apache-2.0"
] | 1 | 2019-07-10T14:41:21.000Z | 2019-07-10T14:41:21.000Z | setup.py | JoseCarlosGarcia95/Mathics | 1927ada93c5ce2d8cbe731731ab1f55cd5527467 | [
"Apache-2.0"
] | null | null | null | setup.py | JoseCarlosGarcia95/Mathics | 1927ada93c5ce2d8cbe731731ab1f55cd5527467 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Setuptools based setup script for Mathics.
For the easiest installation just type the following command (you'll probably
need root privileges):
python setup.py install
This will install the library in the default location. For instructions on
how to customize the... | 31.790909 | 98 | 0.625536 |
import sys
import platform
import os
from setuptools import setup, Command, Extension
if sys.version_info < (3, 3):
print("Mathics does not support Python %d.%d" % sys.version_info[:2])
sys.exit(-1)
exec(compile(open('mathics/version.py').read(), 'mathics/version.py', 'exec'))
is_PyPy = (platform.pytho... | true | true |
1c20b50efef472ff853c0b9864e939536d9f0285 | 3,493 | py | Python | bnpy/datasets/zzz_unsupported/ToyMMSBK6.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 184 | 2016-12-13T21:05:48.000Z | 2022-02-28T11:47:23.000Z | bnpy/datasets/zzz_unsupported/ToyMMSBK6.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 37 | 2016-12-18T14:07:53.000Z | 2022-03-13T10:58:14.000Z | bnpy/datasets/zzz_unsupported/ToyMMSBK6.py | jun2tong/bnp-anomaly | c7fa106b5bb29ed6688a3d91e3f302a0a130b896 | [
"BSD-3-Clause"
] | 50 | 2017-01-25T19:44:34.000Z | 2022-03-15T10:22:01.000Z | '''
ToyMMSBK6.py
'''
import numpy as np
from bnpy.data import GraphXData
K = 6
def get_data(
seed=123, nNodes=100, alpha=0.05,
w_diag=.95,
w_offdiag_eps=.01,
**kwargs):
''' Create toy dataset as bnpy GraphXData object.
Uses a simple mixed membership generative model.
Ass... | 27.503937 | 77 | 0.605497 |
import numpy as np
from bnpy.data import GraphXData
K = 6
def get_data(
seed=123, nNodes=100, alpha=0.05,
w_diag=.95,
w_offdiag_eps=.01,
**kwargs):
nNodes = int(nNodes)
prng = np.random.RandomState(seed)
if not hasattr(alpha, '__len__'):
alpha = alpha * np.o... | true | true |
1c20b5e2cee45f2814001cd55632a5a94169f875 | 7,173 | py | Python | pynodegl-utils/pynodegl_utils/misc.py | jerry-belaston/gopro-lib-node.gl | 623031489ddc82ed980c15bad349391c5b6bab5c | [
"Apache-2.0"
] | null | null | null | pynodegl-utils/pynodegl_utils/misc.py | jerry-belaston/gopro-lib-node.gl | 623031489ddc82ed980c15bad349391c5b6bab5c | [
"Apache-2.0"
] | null | null | null | pynodegl-utils/pynodegl_utils/misc.py | jerry-belaston/gopro-lib-node.gl | 623031489ddc82ed980c15bad349391c5b6bab5c | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2016 GoPro Inc.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 ... | 33.0553 | 104 | 0.607835 |
import os
import os.path as op
import tempfile
import platform
import math
import inspect
import json
import subprocess
import pynodegl as ngl
from collections import namedtuple
def scene(**controls):
def real_decorator(scene_func):
def func_wrapper(idict=None, **extra_args):
... | true | true |
1c20b80eb47f1afbfba3002bc9e85ee4c7417abe | 1,212 | py | Python | littlelambocoin/plotters/install_plotter.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | 5 | 2022-01-10T08:12:19.000Z | 2022-03-14T07:20:30.000Z | littlelambocoin/plotters/install_plotter.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | 5 | 2022-01-18T18:17:29.000Z | 2022-03-01T18:14:44.000Z | littlelambocoin/plotters/install_plotter.py | Tony4467/littlelambocoin-blockchain | 3d4f2b577cd5a2feb324fca50e0981a728583aee | [
"Apache-2.0"
] | 5 | 2022-01-11T03:19:43.000Z | 2022-03-20T19:42:28.000Z | import os
from littlelambocoin.plotters.bladebit import install_bladebit
from littlelambocoin.plotters.madmax import install_madmax
def install_plotter(plotter, root_path):
if plotter == "chiapos":
print("Littlelambocoinpos already installed. No action taken.")
return
elif plotter == "madmax":... | 36.727273 | 87 | 0.617162 | import os
from littlelambocoin.plotters.bladebit import install_bladebit
from littlelambocoin.plotters.madmax import install_madmax
def install_plotter(plotter, root_path):
if plotter == "chiapos":
print("Littlelambocoinpos already installed. No action taken.")
return
elif plotter == "madmax":... | true | true |
1c20b86ac2013cf445a79cb8fbf7fcc70dcb3020 | 2,393 | py | Python | grpc/utils.py | olafayomi/srv6-controller | b570a0793d50ff1d41411484e0682add301c5f6f | [
"Apache-2.0"
] | 12 | 2020-06-24T10:52:22.000Z | 2022-02-03T20:03:21.000Z | grpc/utils.py | olafayomi/srv6-controller | b570a0793d50ff1d41411484e0682add301c5f6f | [
"Apache-2.0"
] | 25 | 2020-05-13T20:23:26.000Z | 2022-01-04T02:15:15.000Z | grpc/utils.py | olafayomi/srv6-controller | b570a0793d50ff1d41411484e0682add301c5f6f | [
"Apache-2.0"
] | 2 | 2020-12-09T06:46:31.000Z | 2021-07-14T09:10:35.000Z | #!/usr/bin/python
##########################################################################
# Copyright (C) 2020 Carmine Scarpitta
# (Consortium GARR and University of Rome "Tor Vergata")
# www.garr.it - www.uniroma2.it/netgroup
#
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use t... | 28.488095 | 74 | 0.701212 | true | true | |
1c20b9418268d36b65aef5ed37d30fb39128bee4 | 24,090 | py | Python | tests/test_verify.py | omgitsmoe/checksum_helper | e6f9a8ad43841cf5493582afc86f6d6db84aa959 | [
"MIT"
] | 2 | 2021-05-10T07:42:08.000Z | 2021-11-13T18:45:17.000Z | tests/test_verify.py | omgitsmoe/checksum_helper | e6f9a8ad43841cf5493582afc86f6d6db84aa959 | [
"MIT"
] | null | null | null | tests/test_verify.py | omgitsmoe/checksum_helper | e6f9a8ad43841cf5493582afc86f6d6db84aa959 | [
"MIT"
] | null | null | null | import os
import logging
import time
from utils import TESTS_DIR, Args
from checksum_helper import ChecksumHelper, _cl_verify_hfile, _cl_verify_all, _cl_verify_filter
def x_contains_all_y(x, y) -> bool:
for yy in y:
if yy in x:
continue
else:
return False
return True
... | 60.225 | 192 | 0.638356 | import os
import logging
import time
from utils import TESTS_DIR, Args
from checksum_helper import ChecksumHelper, _cl_verify_hfile, _cl_verify_all, _cl_verify_filter
def x_contains_all_y(x, y) -> bool:
for yy in y:
if yy in x:
continue
else:
return False
return True
... | true | true |
1c20b9b266127f479dbb23dd63b793110939b5b0 | 52 | py | Python | ai/parameters.py | xelahalo/khet | c4aca94703c24c01d106959849240b890fa6744b | [
"MIT"
] | null | null | null | ai/parameters.py | xelahalo/khet | c4aca94703c24c01d106959849240b890fa6744b | [
"MIT"
] | null | null | null | ai/parameters.py | xelahalo/khet | c4aca94703c24c01d106959849240b890fa6744b | [
"MIT"
] | 1 | 2022-03-19T22:25:54.000Z | 2022-03-19T22:25:54.000Z | C_CONST = 0.375
MC_ITERATION_COUNT = 100
D_MAX = 100 | 17.333333 | 24 | 0.769231 | C_CONST = 0.375
MC_ITERATION_COUNT = 100
D_MAX = 100 | true | true |
1c20ba6dc4a3cb0980c799701d77dcd3bc44e74c | 798 | py | Python | netbox/extras/signals.py | BrnoPCmaniak/netbox | 7b517abdb68a6324950dfd0375861163c7bfff00 | [
"Apache-2.0"
] | 6 | 2017-12-01T05:13:39.000Z | 2020-01-23T13:04:43.000Z | netbox/extras/signals.py | BrnoPCmaniak/netbox | 7b517abdb68a6324950dfd0375861163c7bfff00 | [
"Apache-2.0"
] | 8 | 2021-04-16T01:38:00.000Z | 2022-01-04T21:27:27.000Z | netbox/extras/signals.py | BrnoPCmaniak/netbox | 7b517abdb68a6324950dfd0375861163c7bfff00 | [
"Apache-2.0"
] | 3 | 2017-11-18T01:28:22.000Z | 2018-05-17T14:04:43.000Z | from cacheops.signals import cache_invalidated, cache_read
from django.dispatch import Signal
from prometheus_client import Counter
#
# Caching
#
cacheops_cache_hit = Counter('cacheops_cache_hit', 'Number of cache hits')
cacheops_cache_miss = Counter('cacheops_cache_miss', 'Number of cache misses')
cacheops_cache_in... | 22.8 | 99 | 0.785714 | from cacheops.signals import cache_invalidated, cache_read
from django.dispatch import Signal
from prometheus_client import Counter
cacheops_cache_hit = Counter('cacheops_cache_hit', 'Number of cache hits')
cacheops_cache_miss = Counter('cacheops_cache_miss', 'Number of cache misses')
cacheops_cache_invalidated =... | true | true |
1c20ba8d70afd5f6b98a499ec6f5a04d36cbbf84 | 347 | py | Python | workspace/src/barc_gui/setup.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | 1 | 2019-01-10T22:07:07.000Z | 2019-01-10T22:07:07.000Z | workspace/src/barc_gui/setup.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | null | null | null | workspace/src/barc_gui/setup.py | migarstka/barc | deacfd974f251693d74b273d58d22e9fead2354f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
## don't do this unless you want a globally visible script
# scripts=['bin/myscript'],
packages=['barc_gui'],
package_dir={'': 'src'},
scripts=['script... | 23.133333 | 63 | 0.706052 |
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
,
package_dir={'': 'src'},
scripts=['scripts/barc_gui']
)
setup(**d)
| true | true |
1c20baae3a28f6091e82ae57a2592880fe8db96c | 857 | py | Python | services/messenger/app/send_email.py | Counter0021/Anti-Freelancer-microservices-back-end | e55481e0a4353107036cd5ba664fee57e29c7597 | [
"MIT"
] | null | null | null | services/messenger/app/send_email.py | Counter0021/Anti-Freelancer-microservices-back-end | e55481e0a4353107036cd5ba664fee57e29c7597 | [
"MIT"
] | null | null | null | services/messenger/app/send_email.py | Counter0021/Anti-Freelancer-microservices-back-end | e55481e0a4353107036cd5ba664fee57e29c7597 | [
"MIT"
] | null | null | null | from app.models import Notification
from app.requests import get_user_data_and_server_token
from config import TEST, PROJECT_NAME, SERVER_MESSENGER_BACKEND, API
from send_email import send_email
async def send_notification_email(notification: Notification) -> None:
"""
Send notification email
:par... | 31.740741 | 93 | 0.705951 | from app.models import Notification
from app.requests import get_user_data_and_server_token
from config import TEST, PROJECT_NAME, SERVER_MESSENGER_BACKEND, API
from send_email import send_email
async def send_notification_email(notification: Notification) -> None:
if int(TEST):
return
server_token,... | true | true |
1c20bb6a9dc4798f8f689c3463d40b64e87307a2 | 932 | py | Python | python/code/fabric/fileupdate.py | hgfgood/note | f89febca3ce925cba4cd4c8068a4fa124f23c810 | [
"Apache-2.0"
] | null | null | null | python/code/fabric/fileupdate.py | hgfgood/note | f89febca3ce925cba4cd4c8068a4fa124f23c810 | [
"Apache-2.0"
] | null | null | null | python/code/fabric/fileupdate.py | hgfgood/note | f89febca3ce925cba4cd4c8068a4fa124f23c810 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
# coding:utf-8
from fabric.api import *
from fabric.context_managers import *
from fabric.contrib.console import confirm
__author__ = 'hgf'
env.user = 'root'
env.hosts = ['192.168.122.190', '192.168.122.8']
env.password = 'hgfgood'
@task
@runs_once
def tar_task():
with lcd('/home/hgf'):
... | 24.526316 | 78 | 0.606223 |
from fabric.api import *
from fabric.context_managers import *
from fabric.contrib.console import confirm
__author__ = 'hgf'
env.user = 'root'
env.hosts = ['192.168.122.190', '192.168.122.8']
env.password = 'hgfgood'
@task
@runs_once
def tar_task():
with lcd('/home/hgf'):
local('tar -zcf 国重.tar.gz 国... | true | true |
1c20bbe71e505c6fa66d642c9fa1fa194def6a72 | 27 | py | Python | python/train.py | xuenhappy/darts | 2fb0eab5044fc7dee1531cc58e94ba26430cc35f | [
"Apache-2.0"
] | 1 | 2021-12-14T02:47:25.000Z | 2021-12-14T02:47:25.000Z | python/train.py | xuenhappy/darts | 2fb0eab5044fc7dee1531cc58e94ba26430cc35f | [
"Apache-2.0"
] | null | null | null | python/train.py | xuenhappy/darts | 2fb0eab5044fc7dee1531cc58e94ba26430cc35f | [
"Apache-2.0"
] | null | null | null | from .darts.devel import *
| 13.5 | 26 | 0.740741 | from .darts.devel import *
| true | true |
1c20bd3b93a74d2c416698515a539262395ce184 | 5,528 | py | Python | airflow/kubernetes/kube_client.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 15,947 | 2019-01-05T13:51:02.000Z | 2022-03-31T23:33:16.000Z | airflow/kubernetes/kube_client.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 14,603 | 2019-01-05T09:43:19.000Z | 2022-03-31T23:11:59.000Z | airflow/kubernetes/kube_client.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 8,429 | 2019-01-05T19:45:47.000Z | 2022-03-31T22:13:01.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.605442 | 104 | 0.724493 |
import logging
from typing import Optional
from airflow.configuration import conf
log = logging.getLogger(__name__)
try:
from kubernetes import client, config
from kubernetes.client import Configuration
from kubernetes.client.api_client import ApiClient
from kubernetes.client.rest imp... | true | true |
1c20be3d4258d88b9d8cb0c3061380e86f13e969 | 780 | py | Python | recipe_modules/milo/examples/full.py | luci/recipes-py | 13b77f0e1dc3e0f15f540679262ce966917c15a3 | [
"Apache-2.0"
] | 23 | 2016-01-20T00:45:26.000Z | 2022-02-26T04:25:30.000Z | recipe_modules/milo/examples/full.py | luci/recipes-py | 13b77f0e1dc3e0f15f540679262ce966917c15a3 | [
"Apache-2.0"
] | 8 | 2016-01-15T19:00:38.000Z | 2018-03-06T00:15:24.000Z | recipe_modules/milo/examples/full.py | luci/recipes-py | 13b77f0e1dc3e0f15f540679262ce966917c15a3 | [
"Apache-2.0"
] | 13 | 2015-09-05T05:52:43.000Z | 2019-07-08T17:34:27.000Z | # Copyright 2020 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb2
PYTHON_VERSION_COMPATIBILITY = 'PY2+3'
DEPS = [
'milo',
]
def Ru... | 25.16129 | 75 | 0.680769 |
from PB.go.chromium.org.luci.buildbucket.proto import common as common_pb2
PYTHON_VERSION_COMPATIBILITY = 'PY2+3'
DEPS = [
'milo',
]
def RunSteps(api):
api.milo.show_blamelist_for([
common_pb2.GitilesCommit(
host='chromium.googlesource.com',
project='chromium/src',
id='5163... | true | true |
1c20be82e509f4421ade936534c759b35274ff67 | 485 | py | Python | parser/fase2/team10/InstruccionesPL/Returns/ReturnsNext.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 35 | 2020-12-07T03:11:43.000Z | 2021-04-15T17:38:16.000Z | parser/fase2/team10/InstruccionesPL/Returns/ReturnsNext.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 47 | 2020-12-09T01:29:09.000Z | 2021-01-13T05:37:50.000Z | parser/fase2/team10/InstruccionesPL/Returns/ReturnsNext.py | Josue-Zea/tytus | f9e4be9a8c03eb698fade7a748972e4f52d46685 | [
"MIT"
] | 556 | 2020-12-07T03:13:31.000Z | 2021-06-17T17:41:10.000Z | from InstruccionesPL.TablaSimbolosPL.InstruccionPL import InstruccionPL
class ReturnsNext(InstruccionPL):
def __init__(self, OperacionLogica, tipo, linea, columna, strGram):
InstruccionPL.__init__(self, tipo, linea, columna, strGram)
self.OperacionLogica = OperacionLogica
def ej... | 40.416667 | 75 | 0.696907 | from InstruccionesPL.TablaSimbolosPL.InstruccionPL import InstruccionPL
class ReturnsNext(InstruccionPL):
def __init__(self, OperacionLogica, tipo, linea, columna, strGram):
InstruccionPL.__init__(self, tipo, linea, columna, strGram)
self.OperacionLogica = OperacionLogica
def ej... | true | true |
1c20be96343eb96c78d9d5aac60212f4d114493b | 425 | py | Python | polls/migrations/0004_auto_20190326_1453.py | LCOGT/lco_survey | 88f83cebe488ee965f51946c02ec941c35b370a3 | [
"MIT"
] | null | null | null | polls/migrations/0004_auto_20190326_1453.py | LCOGT/lco_survey | 88f83cebe488ee965f51946c02ec941c35b370a3 | [
"MIT"
] | null | null | null | polls/migrations/0004_auto_20190326_1453.py | LCOGT/lco_survey | 88f83cebe488ee965f51946c02ec941c35b370a3 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-26 14:53
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0003_survey_cookie_name'),
]
operations = [
migrations.AlterField(
model_name='survey',
name='cookie_name',... | 22.368421 | 86 | 0.614118 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0003_survey_cookie_name'),
]
operations = [
migrations.AlterField(
model_name='survey',
name='cookie_name',
field=models.CharField(help_text="... | true | true |
1c20c00d52d90c1dc18d01ceefe21f9c4d2739fb | 4,493 | py | Python | intake/source/textfiles.py | raybellwaves/intake | 8acc70d9adb19344ca15dee948315828b61e87b2 | [
"BSD-2-Clause"
] | 3 | 2020-04-14T17:47:53.000Z | 2021-07-09T05:35:12.000Z | intake/source/textfiles.py | raybellwaves/intake | 8acc70d9adb19344ca15dee948315828b61e87b2 | [
"BSD-2-Clause"
] | 2 | 2019-05-15T20:42:24.000Z | 2019-07-25T00:35:24.000Z | intake/source/textfiles.py | raybellwaves/intake | 8acc70d9adb19344ca15dee948315828b61e87b2 | [
"BSD-2-Clause"
] | 1 | 2019-07-24T22:26:58.000Z | 2019-07-24T22:26:58.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2018, Anaconda, Inc. and Intake contributors
# All rights reserved.
#
# The full license is in the LICENSE file, distributed with this software.
#------------------------------------------------------------------------... | 36.233871 | 80 | 0.569553 |
from . import base, import_name
class TextFilesSource(base.DataSource):
name = 'textfiles'
version = '0.0.1'
container = 'python'
partition_access = True
def __init__(self, urlpath, text_mode=True, text_encoding='utf8',
compression=None, decoder=None, read=True, metadata=N... | true | true |
1c20c014a28f5adc04442fac5c46e29d40afd7db | 1,001 | py | Python | API/models/spending_history.py | Slavkata/MAC | 1ba8f830367b550922af87b1acf8d22caf93dc23 | [
"MIT"
] | 3 | 2019-02-19T11:53:39.000Z | 2019-05-26T15:36:52.000Z | API/models/spending_history.py | Slavkata/MAC-website | 1ba8f830367b550922af87b1acf8d22caf93dc23 | [
"MIT"
] | 24 | 2019-02-26T12:26:34.000Z | 2022-03-11T23:49:43.000Z | API/models/spending_history.py | Slavkata/MAC | 1ba8f830367b550922af87b1acf8d22caf93dc23 | [
"MIT"
] | 1 | 2019-02-19T08:04:48.000Z | 2019-02-19T08:04:48.000Z | from models.db_init import db
class SpendingHistory(db.Model):
__tablename__ = 'spending_history'
id = db.Column(db.Integer, primary_key=True)
ticket_number = db.Column(db.Integer, nullable=False)
amount = db.Column(db.Float, default=0)
def __init__(self, ticket_number):
self.ticket_numbe... | 25.666667 | 71 | 0.624376 | from models.db_init import db
class SpendingHistory(db.Model):
__tablename__ = 'spending_history'
id = db.Column(db.Integer, primary_key=True)
ticket_number = db.Column(db.Integer, nullable=False)
amount = db.Column(db.Float, default=0)
def __init__(self, ticket_number):
self.ticket_numbe... | true | true |
1c20c0823e07275cde64d0b5baf874c8a0d5b6af | 224 | py | Python | captain_console/cart/views.py | PalinaKG/Verklegt_2 | 7bc80d2708ec2530470527b18c2aec259dddd99c | [
"MIT"
] | null | null | null | captain_console/cart/views.py | PalinaKG/Verklegt_2 | 7bc80d2708ec2530470527b18c2aec259dddd99c | [
"MIT"
] | null | null | null | captain_console/cart/views.py | PalinaKG/Verklegt_2 | 7bc80d2708ec2530470527b18c2aec259dddd99c | [
"MIT"
] | null | null | null |
from django.shortcuts import render
from .models import Cart
def view(request):
cart = Cart.objects.all()
context = {"cart": cart}
template = "cart/index.html"
return render(request, template, context)
| 16 | 45 | 0.683036 |
from django.shortcuts import render
from .models import Cart
def view(request):
cart = Cart.objects.all()
context = {"cart": cart}
template = "cart/index.html"
return render(request, template, context)
| true | true |
1c20c115b48d51d61202ef555da97cda94614e1e | 1,743 | py | Python | evaluation/plot01.py | josephnoir/indexing | 99f6a02c22451d0db204731a6c53ed56ad751365 | [
"BSD-3-Clause"
] | 5 | 2017-01-30T17:02:24.000Z | 2017-04-22T04:20:41.000Z | evaluation/plot01.py | josephnoir/indexing | 99f6a02c22451d0db204731a6c53ed56ad751365 | [
"BSD-3-Clause"
] | null | null | null | evaluation/plot01.py | josephnoir/indexing | 99f6a02c22451d0db204731a6c53ed56ad751365 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/local/bin/python3
# import modules
#import matplotlib.pyplot as plt
#import numpy as np
#from sys import argv
#script, filename = argv
#txt = open(filename)
#print(txt.read())
#plt.plot([1,2,3,4])
#plt.ylabel('some numbers')
#plt.show();
import csv
from sys import argv
import numpy as np
import matplotlib.pypl... | 23.554054 | 111 | 0.658061 |
import csv
from sys import argv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
script, filename = argv
f = open(filename, 'r')
reader = csv.reader(f, delimiter=',')
rows = [x for x in reader]
algos = [row[0] for row in rows]
nums = [row[1:] for row in rows]
len(num... | true | true |
1c20c201f8eb37b7172b999f31255760c1120bbf | 544 | py | Python | src/etc/sm_1round/6.py | iml1111/algorithm-study | f21f6f9f43235248f3496f034a899f2314ab6fcc | [
"MIT"
] | 1 | 2021-01-03T13:01:33.000Z | 2021-01-03T13:01:33.000Z | src/etc/sm_1round/6.py | iml1111/algorithm-study | f21f6f9f43235248f3496f034a899f2314ab6fcc | [
"MIT"
] | null | null | null | src/etc/sm_1round/6.py | iml1111/algorithm-study | f21f6f9f43235248f3496f034a899f2314ab6fcc | [
"MIT"
] | null | null | null | def search(tree, a, b):
if a >= len(tree) // 2:
return tree[a] + tree[b]
left_max = tree[a] + search(tree, b * 2, b * 2 + 1)
right_max = tree[b] + search(tree, a * 2, a * 2 + 1)
return max(left_max, right_max)
def solution(arr):
if len(arr) == 2:
return max(arr)
tree = []
wh... | 30.222222 | 80 | 0.522059 | def search(tree, a, b):
if a >= len(tree) // 2:
return tree[a] + tree[b]
left_max = tree[a] + search(tree, b * 2, b * 2 + 1)
right_max = tree[b] + search(tree, a * 2, a * 2 + 1)
return max(left_max, right_max)
def solution(arr):
if len(arr) == 2:
return max(arr)
tree = []
wh... | true | true |
1c20c2ee49455b73df36a8d96453a21eb39bfd2b | 628 | py | Python | urbarium/manage.py | nikerzetic/zacasno-ime | 7ca42665a0f64cae7233c994c879f2d81502efec | [
"MIT"
] | null | null | null | urbarium/manage.py | nikerzetic/zacasno-ime | 7ca42665a0f64cae7233c994c879f2d81502efec | [
"MIT"
] | 5 | 2021-03-30T14:18:31.000Z | 2021-09-22T19:35:18.000Z | urbarium/manage.py | nikerzetic/zacasno-ime | 7ca42665a0f64cae7233c994c879f2d81502efec | [
"MIT"
] | 1 | 2020-09-08T10:38:54.000Z | 2020-09-08T10:38:54.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'urbarium.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Impor... | 28.545455 | 73 | 0.683121 |
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'urbarium.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
... | true | true |
1c20c3c072a52b1b19f4828746019fec46694eb5 | 1,168 | py | Python | setup.py | jludwig75/secure-smtpd | f3f76e72c7d610759097921405e88782a19129fe | [
"0BSD"
] | 81 | 2015-01-25T13:16:31.000Z | 2021-05-29T13:35:53.000Z | setup.py | jludwig75/secure-smtpd | f3f76e72c7d610759097921405e88782a19129fe | [
"0BSD"
] | 16 | 2015-01-01T13:52:23.000Z | 2020-06-12T01:13:18.000Z | setup.py | jludwig75/secure-smtpd | f3f76e72c7d610759097921405e88782a19129fe | [
"0BSD"
] | 38 | 2015-01-16T10:23:07.000Z | 2021-08-24T14:14:27.000Z | #!/usr/bin/env python
#from distutils.core import setup
from setuptools import setup, find_packages
with open('README.markdown') as f:
long_description = f.read()
setup(
name="secure-smtpd",
version="3.0.0",
description="Adds support for SSL, AUTH, and other goodies, to Petri Lehtinen's SMTPD library.... | 31.567568 | 100 | 0.638699 |
from setuptools import setup, find_packages
with open('README.markdown') as f:
long_description = f.read()
setup(
name="secure-smtpd",
version="3.0.0",
description="Adds support for SSL, AUTH, and other goodies, to Petri Lehtinen's SMTPD library.",
long_description=long_description,
author="... | true | true |
1c20c4107221f9db96ece50912e99932d7ae1771 | 4,051 | py | Python | qspreadsheet/_ndx.py | SabevAtGitHub/qspreadsheet | 29127dd6f38573c7ede7680cf8f4852368fb2c38 | [
"MIT"
] | null | null | null | qspreadsheet/_ndx.py | SabevAtGitHub/qspreadsheet | 29127dd6f38573c7ede7680cf8f4852368fb2c38 | [
"MIT"
] | null | null | null | qspreadsheet/_ndx.py | SabevAtGitHub/qspreadsheet | 29127dd6f38573c7ede7680cf8f4852368fb2c38 | [
"MIT"
] | null | null | null | import logging
import sys
import os
from typing import Dict
from numpy.core.fromnumeric import alltrue
import pandas as pd
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from qspreadsheet.common import DF, SER, pandas_obj_insert_rows, pandas_obj_remove_rows
from qspreadsheet i... | 35.226087 | 100 | 0.664034 | import logging
import sys
import os
from typing import Dict
from numpy.core.fromnumeric import alltrue
import pandas as pd
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from qspreadsheet.common import DF, SER, pandas_obj_insert_rows, pandas_obj_remove_rows
from qspreadsheet i... | true | true |
1c20c45aa999cc0babefe9a2a2461cab0287ad4f | 4,242 | py | Python | gaphor/SysML/blocks/tests/test_connectors.py | bertob/gaphor | a1d6f8dd8c878f299980bba6c055436148573274 | [
"Apache-2.0"
] | null | null | null | gaphor/SysML/blocks/tests/test_connectors.py | bertob/gaphor | a1d6f8dd8c878f299980bba6c055436148573274 | [
"Apache-2.0"
] | null | null | null | gaphor/SysML/blocks/tests/test_connectors.py | bertob/gaphor | a1d6f8dd8c878f299980bba6c055436148573274 | [
"Apache-2.0"
] | null | null | null | import pytest
from gaphor import UML
from gaphor.diagram.connectors import Connector
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.blocks.block import BlockItem
from gaphor.SysML.blocks.connectors import BlockProperyProxyPortConnector
from gaphor.... | 34.209677 | 87 | 0.807402 | import pytest
from gaphor import UML
from gaphor.diagram.connectors import Connector
from gaphor.diagram.tests.fixtures import allow, connect, disconnect
from gaphor.SysML import sysml
from gaphor.SysML.blocks.block import BlockItem
from gaphor.SysML.blocks.connectors import BlockProperyProxyPortConnector
from gaphor.... | true | true |
1c20c50f6e91905fdb643264e83b781703aefe19 | 538 | py | Python | users/models.py | Radhesh-Sarma/Resource-Sharing-Portal | b9754ba4a6a49a523ad3f31309cfce83ac45bd28 | [
"MIT"
] | null | null | null | users/models.py | Radhesh-Sarma/Resource-Sharing-Portal | b9754ba4a6a49a523ad3f31309cfce83ac45bd28 | [
"MIT"
] | null | null | null | users/models.py | Radhesh-Sarma/Resource-Sharing-Portal | b9754ba4a6a49a523ad3f31309cfce83ac45bd28 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
mobile_number = models.CharField(max_length = 10)
address = models.CharField(max_length = 256)
email = models.EmailField(('email address'), unique=True)
def __str__(self):
return sel... | 29.888889 | 61 | 0.713755 | from django.contrib.auth.models import AbstractUser
from django.db import models
class CustomUser(AbstractUser):
mobile_number = models.CharField(max_length = 10)
address = models.CharField(max_length = 256)
email = models.EmailField(('email address'), unique=True)
def __str__(self):
return sel... | true | true |
1c20c59d2adf2271d0fe279c6baa7689f85753a0 | 3,865 | py | Python | kitty-detector/detector.py | yaacov/pyconil-2018-pymodbus | ec69c175834c96f708c3b637190fcba0d6c2fda5 | [
"Apache-2.0"
] | null | null | null | kitty-detector/detector.py | yaacov/pyconil-2018-pymodbus | ec69c175834c96f708c3b637190fcba0d6c2fda5 | [
"Apache-2.0"
] | null | null | null | kitty-detector/detector.py | yaacov/pyconil-2018-pymodbus | ec69c175834c96f708c3b637190fcba0d6c2fda5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import cv2
import time
import imutils
is_pi = True
try:
import RPi.GPIO as GPIO
except ImportError:
is_pi = False
# ---------------------------------------------
# classifiers
# ---------------------------------------------
# Load cascade files
casc_frontalface_1 = "./data/haarcascades... | 23.711656 | 78 | 0.570505 |
import cv2
import time
import imutils
is_pi = True
try:
import RPi.GPIO as GPIO
except ImportError:
is_pi = False
casc_frontalface_1 = "./data/haarcascades/haarcascade_frontalface_default.xml"
casc_frontalface_2 = "./data/lbpcascades/lbpcascade_frontalface_improved.xml"
casc_catface_1 = "./data/haarcas... | true | true |
1c20c68b145f3f3f18671fb21235ff9f5f936b67 | 15,918 | py | Python | homeassistant/components/knx/light.py | rgnets/core | 1e107724976f34884359e1bf1ff1a3190176c797 | [
"Apache-2.0"
] | 4 | 2020-08-10T20:02:24.000Z | 2022-01-31T02:14:22.000Z | homeassistant/components/knx/light.py | rgnets/core | 1e107724976f34884359e1bf1ff1a3190176c797 | [
"Apache-2.0"
] | 78 | 2020-07-23T07:13:08.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/knx/light.py | rgnets/core | 1e107724976f34884359e1bf1ff1a3190176c797 | [
"Apache-2.0"
] | 3 | 2022-01-17T20:10:54.000Z | 2022-01-17T20:17:22.000Z | """Support for KNX/IP lights."""
from __future__ import annotations
from typing import Any, cast
from xknx import XKNX
from xknx.devices import Light as XknxLight
from xknx.telegram.address import parse_device_group_address
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
AT... | 39.498759 | 110 | 0.6634 | from __future__ import annotations
from typing import Any, cast
from xknx import XKNX
from xknx.devices import Light as XknxLight
from xknx.telegram.address import parse_device_group_address
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_RGB_COLOR,
ATTR_RGBW_COLOR... | true | true |
1c20c69a2c855d043c1aac1b7d6c6cfefed95d10 | 14,349 | py | Python | RetinaFace/train.py | javedali786/Insightface | f243dcc2ed8832f979d2a1eda7ac2ea3f6935611 | [
"MIT"
] | null | null | null | RetinaFace/train.py | javedali786/Insightface | f243dcc2ed8832f979d2a1eda7ac2ea3f6935611 | [
"MIT"
] | null | null | null | RetinaFace/train.py | javedali786/Insightface | f243dcc2ed8832f979d2a1eda7ac2ea3f6935611 | [
"MIT"
] | null | null | null | from __future__ import print_function
import sys
import argparse
import os
import pprint
import re
import mxnet as mx
import numpy as np
from mxnet.module import Module
import mxnet.optimizer as optimizer
from rcnn.logger import logger
from rcnn.config import config, default, generate_config
from rcnn.symbol import *
... | 43.481818 | 124 | 0.655795 | from __future__ import print_function
import sys
import argparse
import os
import pprint
import re
import mxnet as mx
import numpy as np
from mxnet.module import Module
import mxnet.optimizer as optimizer
from rcnn.logger import logger
from rcnn.config import config, default, generate_config
from rcnn.symbol import *
... | true | true |
1c20c6dc2b033d89529eb138a507ab0c31852205 | 3,579 | py | Python | fpga/myhdl/test_spi_slave.py | wingel/sds7102 | 77d85533d2ddfd26a0fb45f3ceff4cf8e6ff447a | [
"MIT"
] | 47 | 2016-07-16T20:03:19.000Z | 2021-12-21T03:35:41.000Z | fpga/myhdl/test_spi_slave.py | wingel/sds7102 | 77d85533d2ddfd26a0fb45f3ceff4cf8e6ff447a | [
"MIT"
] | null | null | null | fpga/myhdl/test_spi_slave.py | wingel/sds7102 | 77d85533d2ddfd26a0fb45f3ceff4cf8e6ff447a | [
"MIT"
] | 15 | 2016-07-29T08:10:11.000Z | 2020-11-28T15:49:55.000Z | #! /usr/bin/python
import hacking
if __name__ == '__main__':
hacking.reexec_if_needed('test_spi_slave.py')
from myhdl import Signal, intbv, always_seq, always_comb
from ram import Ram
from spi_slave import SpiSlave, SpiInterface
from myhdl import instance, delay
def spi_test(bus, sclk_interval = 43):
from m... | 22.229814 | 59 | 0.524728 |
import hacking
if __name__ == '__main__':
hacking.reexec_if_needed('test_spi_slave.py')
from myhdl import Signal, intbv, always_seq, always_comb
from ram import Ram
from spi_slave import SpiSlave, SpiInterface
from myhdl import instance, delay
def spi_test(bus, sclk_interval = 43):
from myhdl import instan... | false | true |
1c20c6f1210a93d7b4893dcb27f48dae805dc0cc | 5,806 | py | Python | RESEPT/Embedding_Ground_Truth_Quality_Rank.py | YuLin-code/MP-MIM | 0871a27d1717dc6f5dad623c6721824b104c3bb8 | [
"CECILL-B"
] | null | null | null | RESEPT/Embedding_Ground_Truth_Quality_Rank.py | YuLin-code/MP-MIM | 0871a27d1717dc6f5dad623c6721824b104c3bb8 | [
"CECILL-B"
] | null | null | null | RESEPT/Embedding_Ground_Truth_Quality_Rank.py | YuLin-code/MP-MIM | 0871a27d1717dc6f5dad623c6721824b104c3bb8 | [
"CECILL-B"
] | null | null | null | import numpy as np
import pandas as pd
import os
from sklearn.cluster import KMeans
from sklearn.metrics.cluster import adjusted_rand_score
import argparse
parser = argparse.ArgumentParser(description='Embedding_Ground_Truth_Quality_Rank_')
parser.add_argument('--sampleName', type=str, default='151507')
arg... | 55.826923 | 317 | 0.596969 | import numpy as np
import pandas as pd
import os
from sklearn.cluster import KMeans
from sklearn.metrics.cluster import adjusted_rand_score
import argparse
parser = argparse.ArgumentParser(description='Embedding_Ground_Truth_Quality_Rank_')
parser.add_argument('--sampleName', type=str, default='151507')
arg... | true | true |
1c20c6f91c170f591f1c93ab77dcc5386a57fdff | 27,517 | py | Python | aesara/gpuarray/neighbours.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/gpuarray/neighbours.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | aesara/gpuarray/neighbours.py | anirudhacharya/Theano-PyMC | 55f54243cf88397b032ebc7121d1090ee91aea7d | [
"BSD-3-Clause"
] | null | null | null | import aesara.tensor as at
from aesara.graph.basic import Apply
from aesara.graph.op import _NoPythonOp
from aesara.graph.params_type import ParamsType
from aesara.tensor.nnet.neighbours import Images2Neibs
from aesara.tensor.type import integer_dtypes
try:
from pygpu import gpuarray
except ImportError:
pass
... | 43.608558 | 125 | 0.422611 | import aesara.tensor as at
from aesara.graph.basic import Apply
from aesara.graph.op import _NoPythonOp
from aesara.graph.params_type import ParamsType
from aesara.tensor.nnet.neighbours import Images2Neibs
from aesara.tensor.type import integer_dtypes
try:
from pygpu import gpuarray
except ImportError:
pass
... | true | true |
1c20c78991f5c20a86ec570f2ba9159df3772729 | 725 | py | Python | app.py | theriley106/SpinxMakingLifeEasier | 9d2b78af33bb4059cc53ba65ce2e17f09cc5f391 | [
"MIT"
] | null | null | null | app.py | theriley106/SpinxMakingLifeEasier | 9d2b78af33bb4059cc53ba65ce2e17f09cc5f391 | [
"MIT"
] | null | null | null | app.py | theriley106/SpinxMakingLifeEasier | 9d2b78af33bb4059cc53ba65ce2e17f09cc5f391 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, url_for, redirect, Markup, jsonify, make_response, send_from_directory, session
import main
import aaaInteraction
app = Flask(__name__, static_url_path='/static')
a = main.spinxAPI()
@app.route('/', methods=['GET'])
def index():
storeInfo = a.DB()
return render_tem... | 25.892857 | 130 | 0.718621 | from flask import Flask, render_template, request, url_for, redirect, Markup, jsonify, make_response, send_from_directory, session
import main
import aaaInteraction
app = Flask(__name__, static_url_path='/static')
a = main.spinxAPI()
@app.route('/', methods=['GET'])
def index():
storeInfo = a.DB()
return render_tem... | true | true |
1c20c7e1c8d51a5dfa9de863275ac7f6671d1cf6 | 8,155 | py | Python | tournamentcontrol/competition/wizards.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | tournamentcontrol/competition/wizards.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | 28 | 2016-12-09T21:14:19.000Z | 2022-01-11T07:17:16.000Z | tournamentcontrol/competition/wizards.py | goodtune/vitriolic | d135eecf7acbc229a872585ebafb8bbefca52df4 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import functools
from functools import reduce
from operator import add, or_
from dateutil.parser import parse
from django import forms
from django.db.models import Q
from django.http import HttpResponse, HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from first import firs... | 32.106299 | 88 | 0.596199 | import datetime
import functools
from functools import reduce
from operator import add, or_
from dateutil.parser import parse
from django import forms
from django.db.models import Q
from django.http import HttpResponse, HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from first import firs... | true | true |
1c20cab4a8d71315b711aa7a66aaead3f31a9ccc | 3,786 | py | Python | test/test_type/test_array.py | takahish/lispy | 8a6eaf209d1564d20b457cbac7428b78dc529241 | [
"Apache-2.0"
] | 4 | 2018-04-07T09:11:29.000Z | 2021-11-20T03:02:07.000Z | test/test_type/test_array.py | takahish/clispy | 8a6eaf209d1564d20b457cbac7428b78dc529241 | [
"Apache-2.0"
] | null | null | null | test/test_type/test_array.py | takahish/clispy | 8a6eaf209d1564d20b457cbac7428b78dc529241 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Takahiro Ishikawa. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 29.578125 | 80 | 0.586107 |
import unittest
from clispy.type.sequence import *
from clispy.type.array import *
class UnitTestCase(unittest.TestCase):
def testArrayObjectRegistry(self):
na = np.array([1, 2, 3])
nb = np.array([1, 2, 3])
a = Array(na)
b = Array(na)
c = Array(nb)
... | true | true |
1c20cac432cf8564f086db9105fa972eb53c1cf9 | 5,909 | py | Python | pdoc/render.py | joubs/pdoc | 4191a6a798256b620125ee78c51e4d4c47ff283f | [
"Unlicense"
] | null | null | null | pdoc/render.py | joubs/pdoc | 4191a6a798256b620125ee78c51e4d4c47ff283f | [
"Unlicense"
] | null | null | null | pdoc/render.py | joubs/pdoc | 4191a6a798256b620125ee78c51e4d4c47ff283f | [
"Unlicense"
] | null | null | null | from __future__ import annotations
import os
import types
from pathlib import Path
from typing import Collection, Mapping, Optional, cast
import jinja2
from jinja2 import Environment, FileSystemLoader
import pdoc.doc
import pdoc.docstrings
from pdoc._compat import Literal
from pdoc.render_helpers import (
Defaul... | 33.384181 | 115 | 0.681164 | from __future__ import annotations
import os
import types
from pathlib import Path
from typing import Collection, Mapping, Optional, cast
import jinja2
from jinja2 import Environment, FileSystemLoader
import pdoc.doc
import pdoc.docstrings
from pdoc._compat import Literal
from pdoc.render_helpers import (
Defaul... | true | true |
1c20cb38c580636d7d86a7181e006bb66123709f | 1,291 | py | Python | app/core/parsers.py | kwahome/pycon-monitoring-workshop | 24ff177352fb13b686ab46a96c30066556d2e92d | [
"MIT"
] | 7 | 2018-10-25T08:31:05.000Z | 2021-12-31T11:41:50.000Z | app/core/parsers.py | nknganda/pycon-monitoring-workshop | 24ff177352fb13b686ab46a96c30066556d2e92d | [
"MIT"
] | null | null | null | app/core/parsers.py | nknganda/pycon-monitoring-workshop | 24ff177352fb13b686ab46a96c30066556d2e92d | [
"MIT"
] | 5 | 2018-10-24T10:18:24.000Z | 2019-09-13T09:15:59.000Z | """
Module containing classes that parses data from one format to another.
"""
import copy
import json
class BaseDataParser(object):
"""
Base data parser
"""
def all_params(self):
return copy.deepcopy(self.__dict__)
def to_json(self):
return json.dumps(self.all_params())
class M... | 26.346939 | 79 | 0.661503 | import copy
import json
class BaseDataParser(object):
def all_params(self):
return copy.deepcopy(self.__dict__)
def to_json(self):
return json.dumps(self.all_params())
class MessageDataParser(BaseDataParser):
def __init__(self, message_id, **kwargs):
self.message_id = message_id... | true | true |
1c20cb52412f70f975496fabf83b70ee4448b7f8 | 739 | py | Python | architecture/timer.py | ChrisKonishi/multi-stream-crowd-counting-extended | 4b1590499bd93ac09e62c4c7760b88ae92e6b301 | [
"MIT"
] | 3 | 2020-10-14T12:52:04.000Z | 2022-03-02T11:38:23.000Z | architecture/timer.py | ChrisKonishi/multi-stream-crowd-counting-extended | 4b1590499bd93ac09e62c4c7760b88ae92e6b301 | [
"MIT"
] | null | null | null | architecture/timer.py | ChrisKonishi/multi-stream-crowd-counting-extended | 4b1590499bd93ac09e62c4c7760b88ae92e6b301 | [
"MIT"
] | 1 | 2020-11-16T22:33:53.000Z | 2020-11-16T22:33:53.000Z | from __future__ import absolute_import
from __future__ import division
import time
class Timer(object):
def __init__(self):
self.tot_time = 0.
self.calls = 0
self.start_time = 0.
self.diff = 0.
self.average_time = 0.
def tic(self):
# using time.time instead of ... | 26.392857 | 71 | 0.610284 | from __future__ import absolute_import
from __future__ import division
import time
class Timer(object):
def __init__(self):
self.tot_time = 0.
self.calls = 0
self.start_time = 0.
self.diff = 0.
self.average_time = 0.
def tic(self):
self.start_... | true | true |
1c20cbe0b38e6ad3a2f755366ca9a7297e68c50d | 2,679 | py | Python | RI/flask_server/tapi_server/models/tapi_notification_createnotificationsubscriptionservice_output.py | arthurMll/TAPI | e1171bb139c6791a953af09cfc2bc7ad928da73d | [
"Apache-2.0"
] | 57 | 2018-04-09T08:56:18.000Z | 2022-03-23T08:31:06.000Z | RI/flask_server/tapi_server/models/tapi_notification_createnotificationsubscriptionservice_output.py | arthurMll/TAPI | e1171bb139c6791a953af09cfc2bc7ad928da73d | [
"Apache-2.0"
] | 143 | 2016-06-08T04:09:54.000Z | 2018-02-23T10:45:59.000Z | RI/flask_server/tapi_server/models/tapi_notification_createnotificationsubscriptionservice_output.py | arthurMll/TAPI | e1171bb139c6791a953af09cfc2bc7ad928da73d | [
"Apache-2.0"
] | 64 | 2018-03-07T07:55:17.000Z | 2022-03-28T07:14:28.000Z | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from tapi_server.models.base_model_ import Model
from tapi_server.models.tapi_notification_notification_subscription_service import TapiNotificationNotificationSubscrip... | 40.590909 | 166 | 0.768944 |
from __future__ import absolute_import
from datetime import date, datetime
from typing import List, Dict
from tapi_server.models.base_model_ import Model
from tapi_server.models.tapi_notification_notification_subscription_service import TapiNotificationNotificationSubscriptionService
from tapi_server import u... | true | true |
1c20cbf739f2a0b3fa56d32863227eae3e68a85f | 2,339 | py | Python | setup.py | bsh98/ethereum-etl | 8a49edcae38ecfb9657d355a7463fe1c0eff4734 | [
"MIT"
] | 1 | 2021-12-24T03:44:32.000Z | 2021-12-24T03:44:32.000Z | setup.py | bsh98/ethereum-etl | 8a49edcae38ecfb9657d355a7463fe1c0eff4734 | [
"MIT"
] | null | null | null | setup.py | bsh98/ethereum-etl | 8a49edcae38ecfb9657d355a7463fe1c0eff4734 | [
"MIT"
] | null | null | null | import os
from setuptools import find_packages, setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
long_description = read('README.md') if os.path.isfile("README.md") else ""
setup(
name='ethereum-etl',
version='1.10.1',
author='Evgeny Medvedev',
author_e... | 32.486111 | 120 | 0.579307 | import os
from setuptools import find_packages, setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
long_description = read('README.md') if os.path.isfile("README.md") else ""
setup(
name='ethereum-etl',
version='1.10.1',
author='Evgeny Medvedev',
author_e... | true | true |
1c20cc286215693e345d7527b15274bfda13cca4 | 18,469 | py | Python | src/splsensors/geodetic.py | Shadoward/splsensors | 6d6e77eeac0ab74dd2bcebedef84399cddc2b35d | [
"MIT"
] | 7 | 2019-04-17T12:38:31.000Z | 2021-01-12T09:55:37.000Z | src/splsensors/geodetic.py | Shadoward/splsensors | 6d6e77eeac0ab74dd2bcebedef84399cddc2b35d | [
"MIT"
] | 1 | 2021-02-01T21:57:24.000Z | 2021-02-01T21:57:24.000Z | src/splxtfremane/geodetic.py | Shadoward/splxtfrename | 308875e807df0924de81f2ef9ec2b8fc1cd04a89 | [
"MIT"
] | 2 | 2019-12-16T21:39:48.000Z | 2020-11-13T01:15:45.000Z | #!/usr/bin/python
#
# ---------------------------------------------------------------------
# | |
# | geodetic.cc - a collection of geodetic functions |
# | Paul Kennedy May 2016 |
# | Jim Leven... | 40.770419 | 131 | 0.507066 |
# | for lines ranging from a few cm to nearly 20,000 km, |
# | with millimetre accuracy. |
# | The formulae have been extensively tested |
# | for the Australian region, by comparison with results |
# | from other formu... | true | true |
1c20cc71a54f6ccd2b958a68ce8f93a5f217e7cd | 28,114 | py | Python | apsconnectcli/hub.py | cloudblue/apsconnect-cli | 3c0cb0863f87e1351de7e7cc8d8962bf3a4060c9 | [
"Apache-2.0"
] | 13 | 2017-06-16T11:20:48.000Z | 2020-03-19T18:42:13.000Z | apsconnectcli/hub.py | ingrammicro/apsconnect-cli | 3c0cb0863f87e1351de7e7cc8d8962bf3a4060c9 | [
"Apache-2.0"
] | 42 | 2017-07-07T08:41:05.000Z | 2020-04-15T07:40:57.000Z | apsconnectcli/hub.py | ingrammicro/apsconnect-cli | 3c0cb0863f87e1351de7e7cc8d8962bf3a4060c9 | [
"Apache-2.0"
] | 18 | 2017-06-16T11:20:51.000Z | 2020-03-18T15:09:35.000Z | from __future__ import print_function
import json
import re
import sys
from xml.etree import ElementTree as xml_et
import osaapi
import requests
from apsconnectcli.config import get_config, CFG_FILE_PATH
RPC_CONNECT_PARAMS = ('host', 'user', 'password', 'ssl', 'port')
APS_CONNECT_PARAMS = ('aps_host', 'aps_port', ... | 38.354707 | 100 | 0.526642 | from __future__ import print_function
import json
import re
import sys
from xml.etree import ElementTree as xml_et
import osaapi
import requests
from apsconnectcli.config import get_config, CFG_FILE_PATH
RPC_CONNECT_PARAMS = ('host', 'user', 'password', 'ssl', 'port')
APS_CONNECT_PARAMS = ('aps_host', 'aps_port', ... | true | true |
1c20ccead0b33277a093b5548f258d9a399fd2d2 | 4,478 | py | Python | custom/learn.py | jackyoung96/gym-pybullet-drones | 770a22a4f1102f08ce4617560fab06ba405715bd | [
"MIT"
] | null | null | null | custom/learn.py | jackyoung96/gym-pybullet-drones | 770a22a4f1102f08ce4617560fab06ba405715bd | [
"MIT"
] | null | null | null | custom/learn.py | jackyoung96/gym-pybullet-drones | 770a22a4f1102f08ce4617560fab06ba405715bd | [
"MIT"
] | null | null | null | """Script demonstrating the use of `gym_pybullet_drones`' Gym interface.
Class TakeoffAviary is used as a learning env for the A2C and PPO algorithms.
Example
-------
In a terminal, run as:
$ python learn.py
Notes
-----
The boolean argument --rllib switches between `stable-baselines3` and `ray[rllib]`.
This is ... | 36.112903 | 125 | 0.65364 | import time
import argparse
import gym
import numpy as np
import yaml
import os
import shutil
from torchsummary import summary
import torch
import stable_baselines3
from stable_baselines3 import A2C, SAC
from stable_baselines3.a2c import MlpPolicy
from stable_baselines3.common.env_checker import check_env
from stable... | true | true |
1c20cd5211ecd6173444913ff36b2395daf19418 | 5,457 | py | Python | doc/conf.py | anoadragon453/matrix-nio | e157c5fed96d75797bbb0fadaa0c473fe11b5e6a | [
"Apache-2.0"
] | null | null | null | doc/conf.py | anoadragon453/matrix-nio | e157c5fed96d75797bbb0fadaa0c473fe11b5e6a | [
"Apache-2.0"
] | null | null | null | doc/conf.py | anoadragon453/matrix-nio | e157c5fed96d75797bbb0fadaa0c473fe11b5e6a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 29.026596 | 79 | 0.645043 |
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
project = 'nio'
copyright = '2019, Damir Jelić'
author = 'Damir Jelić'
version = ''
release = '0.5'
autodoc_mock_imports = ["olm"]
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming wit... | true | true |
1c20ceb8b2eae48dca820cf85526a13f00f042ad | 3,587 | py | Python | script-list.py | Accords-Library/YouTube-Archiver | afc0d4dd92924350d167f7dbf34d17ffdf14b90f | [
"MIT"
] | null | null | null | script-list.py | Accords-Library/YouTube-Archiver | afc0d4dd92924350d167f7dbf34d17ffdf14b90f | [
"MIT"
] | null | null | null | script-list.py | Accords-Library/YouTube-Archiver | afc0d4dd92924350d167f7dbf34d17ffdf14b90f | [
"MIT"
] | null | null | null | import csv
import os
import sys
import json
def getTitle(uid):
fileList = os.listdir('output/' + uid)
fileList.remove('meta')
return fileList[0][:-4]
def getMeta(uid):
fileList = os.listdir('output/' + uid + '/meta')
jsonFile = [e for e in fileList if '.json' in e][0]
with open('o... | 37.757895 | 292 | 0.572345 | import csv
import os
import sys
import json
def getTitle(uid):
fileList = os.listdir('output/' + uid)
fileList.remove('meta')
return fileList[0][:-4]
def getMeta(uid):
fileList = os.listdir('output/' + uid + '/meta')
jsonFile = [e for e in fileList if '.json' in e][0]
with open('o... | true | true |
1c20cef5070225b369bb028ba26527ed744da33d | 6,603 | py | Python | setup.py | karlwestin/gumbo-parser | 830cf08e7691249979a4c148e3f84bf70d07d4a6 | [
"Apache-2.0"
] | null | null | null | setup.py | karlwestin/gumbo-parser | 830cf08e7691249979a4c148e3f84bf70d07d4a6 | [
"Apache-2.0"
] | null | null | null | setup.py | karlwestin/gumbo-parser | 830cf08e7691249979a4c148e3f84bf70d07d4a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
from setuptools import setup
from setuptools.command.sdist import sdist
_name_of_lib = 'libgumbo.so'
if sys.platform.startswith('darwin'):
_name_of_lib = 'libgumbo.dylib'
elif sys.platform.startswith('win'):
_name_of_lib = 'gumbo.dll'
class CustomSdistCommand(sdist):
"""Cu... | 35.5 | 147 | 0.719824 |
import sys
from setuptools import setup
from setuptools.command.sdist import sdist
_name_of_lib = 'libgumbo.so'
if sys.platform.startswith('darwin'):
_name_of_lib = 'libgumbo.dylib'
elif sys.platform.startswith('win'):
_name_of_lib = 'gumbo.dll'
class CustomSdistCommand(sdist):
def run(self):
try... | true | true |
1c20d0017432d87ff5db247486a2d16f7987182c | 3,806 | py | Python | python/datagraph/graphviz/svc/generate_synonyms_graph.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/datagraph/graphviz/svc/generate_synonyms_graph.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | python/datagraph/graphviz/svc/generate_synonyms_graph.py | jiportilla/ontology | 8a66bb7f76f805c64fc76cfc40ab7dfbc1146f40 | [
"MIT"
] | null | null | null | # !/usr/bin/env python
# -*- coding: UTF-8 -*-
from base import BaseObject
from datadict import FindSynonym
class GenerateSynonymsGraph(BaseObject):
"""
Purpose:
Service that creates a Graphviz diagram exploring Language Variability in the Synonyms file
Traceability:
https://github.ibm.com/GTS-... | 29.276923 | 95 | 0.529427 |
from base import BaseObject
from datadict import FindSynonym
class GenerateSynonymsGraph(BaseObject):
def __init__(self,
synonyms: list,
ontology_name: str = 'base',
is_debug: bool = True):
BaseObject.__init__(self, __name__)
self._is_debug =... | true | true |
1c20d0820cdceb8519407a39ceb220944e5369a2 | 1,131 | py | Python | setup.py | unt-libraries/codalib | d3f2cdf3cc8e9aae14cfab00d1a6de760cc1220b | [
"BSD-3-Clause"
] | null | null | null | setup.py | unt-libraries/codalib | d3f2cdf3cc8e9aae14cfab00d1a6de760cc1220b | [
"BSD-3-Clause"
] | 31 | 2015-06-15T22:50:50.000Z | 2021-09-30T14:14:51.000Z | setup.py | unt-libraries/codalib | d3f2cdf3cc8e9aae14cfab00d1a6de760cc1220b | [
"BSD-3-Clause"
] | null | null | null | #! /usr/bin/env python
import re
from setuptools import setup, find_packages
version = ''
with open('codalib/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
install_requires = [
'lxml>=3.3',
'pytz>=2016.10'... | 28.275 | 71 | 0.615385 |
import re
from setuptools import setup, find_packages
version = ''
with open('codalib/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
install_requires = [
'lxml>=3.3',
'pytz>=2016.10',
'tzlocal>=3.0'
]... | true | true |
1c20d1cd727a8c29590916ae1be0c105071dbfe9 | 85 | py | Python | src/config/info.py | toutpuissantged/youtubeDownload | 0a085c2d9b134eb9344001000b66994c5cd916ad | [
"MIT"
] | 2 | 2021-08-06T01:30:24.000Z | 2021-11-14T20:16:22.000Z | src/config/info.py | toutpuissantged/youtubeDownload | 0a085c2d9b134eb9344001000b66994c5cd916ad | [
"MIT"
] | null | null | null | src/config/info.py | toutpuissantged/youtubeDownload | 0a085c2d9b134eb9344001000b66994c5cd916ad | [
"MIT"
] | null | null | null |
def Config():
return {
"AppName":"YoutubeSlack",
"AppScreen":"300x500"
} | 14.166667 | 29 | 0.588235 |
def Config():
return {
"AppName":"YoutubeSlack",
"AppScreen":"300x500"
} | true | true |
1c20d29499c60a956b35798816d9ad8b15b4a2bf | 1,354 | py | Python | tests/utils/test_anglecalculations.py | mfbehrens99/sailsim | 800d71ec966345b0819a28921e14deb141bb3a35 | [
"MIT"
] | 2 | 2021-01-13T13:31:41.000Z | 2022-03-10T10:17:29.000Z | tests/utils/test_anglecalculations.py | mfbehrens99/sailsim | 800d71ec966345b0819a28921e14deb141bb3a35 | [
"MIT"
] | 37 | 2021-01-08T07:49:01.000Z | 2022-02-08T22:22:50.000Z | tests/utils/test_anglecalculations.py | mfbehrens99/sailsim | 800d71ec966345b0819a28921e14deb141bb3a35 | [
"MIT"
] | 1 | 2021-01-03T15:07:29.000Z | 2021-01-03T15:07:29.000Z | """Test module sailsim.utils.anglecalculations."""
from pytest import approx
from math import pi
from sailsim.utils.anglecalculations import angleKeepInterval, directionKeepInterval
def testAngleKeepInterval():
assert angleKeepInterval( 0 + 0 * pi) == approx( 0)
assert angleKeepInterval( 0 + 2 * pi) == appr... | 42.3125 | 84 | 0.661004 |
from pytest import approx
from math import pi
from sailsim.utils.anglecalculations import angleKeepInterval, directionKeepInterval
def testAngleKeepInterval():
assert angleKeepInterval( 0 + 0 * pi) == approx( 0)
assert angleKeepInterval( 0 + 2 * pi) == approx( 0)
assert angleKeepInterval( 0 - 2 * pi) ==... | true | true |
1c20d2e76025021224163dbc56d2b3de42292915 | 4,573 | py | Python | benchmark/startQiskit_QC2969.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC2969.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_QC2969.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=46
import cirq
import qiskit
from qiskit import IBMQ
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from ma... | 35.726563 | 165 | 0.656462 |
import cirq
import qiskit
from qiskit import IBMQ
from qiskit.providers.ibmq import least_busy
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import FakeVigo
from math import log2
import numpy as np... | true | true |
1c20d3b2ddf53997fbed3735df6cf4e79d6adaa2 | 672 | py | Python | musicpro/migrations/0020_auto_20210704_2346.py | Felipeplz/MusicPro | 1cad63aef4d36f206aeaba9148b097ae1020aeb7 | [
"MIT"
] | null | null | null | musicpro/migrations/0020_auto_20210704_2346.py | Felipeplz/MusicPro | 1cad63aef4d36f206aeaba9148b097ae1020aeb7 | [
"MIT"
] | null | null | null | musicpro/migrations/0020_auto_20210704_2346.py | Felipeplz/MusicPro | 1cad63aef4d36f206aeaba9148b097ae1020aeb7 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-07-05 03:46
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('musicpro', '0019_auto_20210704_2220'),
]
operations = [
migrations.RemoveField(
model_name='usuario',
name='nombre',... | 29.217391 | 226 | 0.613095 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('musicpro', '0019_auto_20210704_2220'),
]
operations = [
migrations.RemoveField(
model_name='usuario',
name='nombre',
),
migrations.AlterField(
... | true | true |
1c20d43706483f4394187f39b35d0820d4c33fcf | 16,282 | py | Python | tensorflow/python/keras/layers/local_test.py | DonliFly/tensorflow | 715e6a881f8c73d3045b3e65385006ecb96d6a5d | [
"Apache-2.0"
] | 2 | 2018-12-05T10:58:40.000Z | 2019-01-24T11:36:01.000Z | tensorflow/python/keras/layers/local_test.py | sjang42/tensorflow | 3db3e972a33760ebe6662341d5f4320a906582f7 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/keras/layers/local_test.py | sjang42/tensorflow | 3db3e972a33760ebe6662341d5f4320a906582f7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. 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 applica... | 35.015054 | 80 | 0.569095 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
from tensorflow.python import keras
from tensorflow.python.framework import test_util as tf_test_util
from tensorflow.python.keras import testing_utils
from tensorflow.python.... | true | true |
1c20d4849a17bdf1dca26196182e9aec6697a9f3 | 3,159 | py | Python | examples/T0958/myFunctions_helper.py | XingchengLin/openawsem | a9f155d72e359b76d350e6d4c2ee476410ebe4c6 | [
"MIT"
] | 15 | 2019-11-01T21:43:43.000Z | 2022-01-05T15:53:15.000Z | examples/T0958/myFunctions_helper.py | XingchengLin/openawsem | a9f155d72e359b76d350e6d4c2ee476410ebe4c6 | [
"MIT"
] | 10 | 2019-02-06T17:07:45.000Z | 2021-10-19T02:20:41.000Z | examples/T0958/myFunctions_helper.py | XingchengLin/openawsem | a9f155d72e359b76d350e6d4c2ee476410ebe4c6 | [
"MIT"
] | 8 | 2018-12-30T18:01:47.000Z | 2021-05-27T21:07:17.000Z | #!/usr/bin/env python3
import math
# line = "{type:4} {serialNumber:5} {AtomName:4} {ReidueName:3} {Chain:1}{ResId:4} {x:8.3f}{y:8.3f}{z:8.3f}{1:6.2f}{0:6.2f} {element} \n"
def dotproduct(v1, v2):
return sum((a*b) for a, b in zip(v1, v2))
def length(v):
return math.sqrt(dotproduct(v, v))
def read_lammp... | 39.987342 | 141 | 0.338715 |
import math
def dotproduct(v1, v2):
return sum((a*b) for a, b in zip(v1, v2))
def length(v):
return math.sqrt(dotproduct(v, v))
def read_lammps(lammps_file="dump.lammpstrj", center=False, ca=True):
nFrame = 0
with open(lammps_file, "r") as lfile:
for line in lfile:
l = line.st... | true | true |
1c20d489257a0c803379a69fab88590993a96b1a | 610 | py | Python | Common/StockMarketIndex/Yahoo/TnxIndex.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | Common/StockMarketIndex/Yahoo/TnxIndex.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | Common/StockMarketIndex/Yahoo/TnxIndex.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | from Common.Measures.Time.TimeSpan import TimeSpan
from Common.StockMarketIndex.AbstractStockMarketIndex import AbstractStockMarketIndex
from pyarrow.lib import null
class TnxIndex(AbstractStockMarketIndex):
def __init__(self, source: str = 'yahoo', ticker: str = "^TNX", tm_spn: TimeSpan = null):
a_ticke... | 43.571429 | 93 | 0.704918 | from Common.Measures.Time.TimeSpan import TimeSpan
from Common.StockMarketIndex.AbstractStockMarketIndex import AbstractStockMarketIndex
from pyarrow.lib import null
class TnxIndex(AbstractStockMarketIndex):
def __init__(self, source: str = 'yahoo', ticker: str = "^TNX", tm_spn: TimeSpan = null):
a_ticke... | true | true |
1c20d53be87d3d3e6f7a2b8bd15d6a2ff185adbe | 2,024 | py | Python | test/student_t_repeated_measures.py | kozzion/tensealstat | 93314a8721ec6b1a2bea466aaeadb06cbf5a4f63 | [
"Apache-2.0"
] | 6 | 2020-12-17T16:05:24.000Z | 2021-12-28T13:26:31.000Z | test/student_t_repeated_measures.py | kozzion/tensealstat | 93314a8721ec6b1a2bea466aaeadb06cbf5a4f63 | [
"Apache-2.0"
] | null | null | null | test/student_t_repeated_measures.py | kozzion/tensealstat | 93314a8721ec6b1a2bea466aaeadb06cbf5a4f63 | [
"Apache-2.0"
] | null | null | null | import sys
import os
from scipy import stats
import tenseal as ts
import numpy as np
from scipy.stats import t
sys.path.append(os.path.abspath('../../tensealstat'))
from tensealstat.tools_context import ToolsContext as tc
from tensealstat.algebra.algebra_numpy import AlgebraNumpy
from tensealstat.algebra.algebra_tens... | 34.896552 | 109 | 0.784091 | import sys
import os
from scipy import stats
import tenseal as ts
import numpy as np
from scipy.stats import t
sys.path.append(os.path.abspath('../../tensealstat'))
from tensealstat.tools_context import ToolsContext as tc
from tensealstat.algebra.algebra_numpy import AlgebraNumpy
from tensealstat.algebra.algebra_tens... | true | true |
1c20d5445b654fdea06faa2ad54f9c06c0fc57b4 | 3,869 | py | Python | rlkit/data_management/simple_replay_buffer.py | maxiaoba/rlk | 3e23473f6bbc59552b6b2bcd97245e024d7ca95d | [
"MIT"
] | 1 | 2021-09-28T21:16:54.000Z | 2021-09-28T21:16:54.000Z | rlkit/data_management/simple_replay_buffer.py | maxiaoba/rlkit | 3e23473f6bbc59552b6b2bcd97245e024d7ca95d | [
"MIT"
] | null | null | null | rlkit/data_management/simple_replay_buffer.py | maxiaoba/rlkit | 3e23473f6bbc59552b6b2bcd97245e024d7ca95d | [
"MIT"
] | null | null | null | from collections import OrderedDict
import numpy as np
from rlkit.data_management.replay_buffer import ReplayBuffer
class SimpleReplayBuffer(ReplayBuffer):
def __init__(
self,
max_replay_buffer_size,
observation_dim,
action_dim,
env_info_sizes,
store_raw_action=F... | 36.847619 | 81 | 0.6397 | from collections import OrderedDict
import numpy as np
from rlkit.data_management.replay_buffer import ReplayBuffer
class SimpleReplayBuffer(ReplayBuffer):
def __init__(
self,
max_replay_buffer_size,
observation_dim,
action_dim,
env_info_sizes,
store_raw_action=F... | true | true |
1c20d615b431a7883f4d58467e510718132f3dc8 | 7,722 | py | Python | Library/firebase_admin/credentials.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | Library/firebase_admin/credentials.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | Library/firebase_admin/credentials.py | TrojanCrypto/Dashboard | 3af795980c7aa90505afae684297e43366cb6ee5 | [
"MIT"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.125 | 97 | 0.672753 |
import collections
import json
import six
import google.auth
from google.auth.transport import requests
from google.oauth2 import credentials
from google.oauth2 import service_account
_request = requests.Request()
_scopes = [
'https://www.googleapis.com/auth/cloud-platform',
'https://www.google... | true | true |
1c20d88fe4bcbe2c1f1e3413502dbf276f2d21b3 | 92,661 | py | Python | tensorflow/contrib/rnn/python/kernel_tests/core_rnn_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/rnn/python/kernel_tests/core_rnn_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/rnn/python/kernel_tests/core_rnn_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2015 The TensorFlow Authors. 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 applica... | 37.89816 | 85 | 0.657558 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import numpy as np
from six.moves import xrange
from tensorflow.contrib import rnn as rnn_lib
from tensorflow.core.protobuf import config_pb2
from tensorflow.python.eager imp... | true | true |
1c20d988a83a5aa91304bf4a5d8db4f9c6839e8c | 3,083 | py | Python | src/sentry/utils/warnings.py | hieast/sentry | 1179b6b13e86f552d18da0578d7b3bc5d002c0d9 | [
"BSD-3-Clause"
] | 1 | 2019-05-28T06:18:03.000Z | 2019-05-28T06:18:03.000Z | src/sentry/utils/warnings.py | c88888/sentry | 53837d9e8dad2443c3881fcd05f1b261bdd922fd | [
"BSD-3-Clause"
] | 6 | 2018-10-19T10:04:23.000Z | 2019-12-09T20:29:12.000Z | src/sentry/utils/warnings.py | zaasmi/codeerrorhelp | 1ab8d3e314386b9b2d58dad9df45355bf6014ac9 | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | from __future__ import absolute_import
import collections
import six
import warnings
class UnsupportedBackend(RuntimeWarning):
pass
class DeprecatedSettingWarning(DeprecationWarning):
def __init__(self, setting, replacement, url=None, removed_in_version=None):
self.setting = setting
self.re... | 27.526786 | 96 | 0.627311 | from __future__ import absolute_import
import collections
import six
import warnings
class UnsupportedBackend(RuntimeWarning):
pass
class DeprecatedSettingWarning(DeprecationWarning):
def __init__(self, setting, replacement, url=None, removed_in_version=None):
self.setting = setting
self.re... | true | true |
1c20d9a3eb85ca8f6b4d5dbf636e1acda3138487 | 1,419 | py | Python | bilireq/login/sms_login.py | SK-415/bilireq | ce4dfa2ae05a88291162907b86caf29ab868bedc | [
"MIT"
] | 2 | 2021-10-20T06:32:35.000Z | 2022-03-26T11:40:07.000Z | bilireq/login/sms_login.py | SK-415/bilireq | ce4dfa2ae05a88291162907b86caf29ab868bedc | [
"MIT"
] | 1 | 2021-12-06T01:37:08.000Z | 2021-12-06T01:37:08.000Z | bilireq/login/sms_login.py | SK-415/bilireq | ce4dfa2ae05a88291162907b86caf29ab868bedc | [
"MIT"
] | null | null | null | from typing import Union
from ..utils import post
BASE_URL = "https://passport.bilibili.com/x/passport-tv-login/"
async def send_sms(tel: Union[int, str], cid: Union[int, str] = 86, **kwargs):
"""
发送短信验证码
Args:
tel (int): 手机号
cid (int, optional): 区号,默认 86
Raises:
ResponseCo... | 22.887097 | 79 | 0.551797 | from typing import Union
from ..utils import post
BASE_URL = "https://passport.bilibili.com/x/passport-tv-login/"
async def send_sms(tel: Union[int, str], cid: Union[int, str] = 86, **kwargs):
url = f"{BASE_URL}sms/send"
params = {"tel": tel, "cid": cid}
return await post(url, params=params, reqtype="ap... | true | true |
1c20da87c9befd7a3855a566f17681b92bdbba40 | 1,387 | py | Python | mopidy/backends/spotify/playback.py | swinton/mopidy | c32c73f5112c29ef7ccccf36a508c571adb39759 | [
"Apache-2.0"
] | null | null | null | mopidy/backends/spotify/playback.py | swinton/mopidy | c32c73f5112c29ef7ccccf36a508c571adb39759 | [
"Apache-2.0"
] | null | null | null | mopidy/backends/spotify/playback.py | swinton/mopidy | c32c73f5112c29ef7ccccf36a508c571adb39759 | [
"Apache-2.0"
] | null | null | null | import logging
from spotify import Link, SpotifyError
from mopidy.backends.base import BasePlaybackProvider
from mopidy.core import PlaybackState
logger = logging.getLogger('mopidy.backends.spotify.playback')
class SpotifyPlaybackProvider(BasePlaybackProvider):
def play(self, track):
if self.backend.pla... | 33.829268 | 66 | 0.661139 | import logging
from spotify import Link, SpotifyError
from mopidy.backends.base import BasePlaybackProvider
from mopidy.core import PlaybackState
logger = logging.getLogger('mopidy.backends.spotify.playback')
class SpotifyPlaybackProvider(BasePlaybackProvider):
def play(self, track):
if self.backend.pla... | true | true |
1c20dc9cc02630149e9163031a136780de5d2097 | 4,194 | py | Python | FreeGames.py | Verduxo/FreeGames | e68bd3d2264b7f8c61af94889ceb5c682311efcc | [
"Unlicense"
] | null | null | null | FreeGames.py | Verduxo/FreeGames | e68bd3d2264b7f8c61af94889ceb5c682311efcc | [
"Unlicense"
] | null | null | null | FreeGames.py | Verduxo/FreeGames | e68bd3d2264b7f8c61af94889ceb5c682311efcc | [
"Unlicense"
] | null | null | null | import requests
import pandas as pd
def save(url):
jsonF = open('db.json','w+')
r= requests.get(url)
jsonF.write(r.text)
df = pd.read_json('db.json')
df.to_csv (r'OpenWithLibreOffice.csv', index = None)
def todos():
url = ' https://www.freetogame.com/api/games'
seVienenCosita... | 30.838235 | 98 | 0.395565 | import requests
import pandas as pd
def save(url):
jsonF = open('db.json','w+')
r= requests.get(url)
jsonF.write(r.text)
df = pd.read_json('db.json')
df.to_csv (r'OpenWithLibreOffice.csv', index = None)
def todos():
url = ' https://www.freetogame.com/api/games'
seVienenCosita... | true | true |
1c20dd98252f1c7ee434875277744719dfd18e12 | 132 | py | Python | Autoencoders/__init__.py | ngroebner/Autoencoders | 49105c4aba2959c6973aeba41b9df4eb012f44ac | [
"MIT"
] | 1 | 2021-07-23T13:07:11.000Z | 2021-07-23T13:07:11.000Z | Autoencoders/__init__.py | ngroebner/Autoencoders | 49105c4aba2959c6973aeba41b9df4eb012f44ac | [
"MIT"
] | null | null | null | Autoencoders/__init__.py | ngroebner/Autoencoders | 49105c4aba2959c6973aeba41b9df4eb012f44ac | [
"MIT"
] | null | null | null | from .autoencoders import Autoencoder, VAE
from .decoders import Decoder2DConv
from .encoders import Encoder2DConv, VAEEncoder2DConv | 44 | 53 | 0.863636 | from .autoencoders import Autoencoder, VAE
from .decoders import Decoder2DConv
from .encoders import Encoder2DConv, VAEEncoder2DConv | true | true |
1c20de86616b45b114d2907ce17513cb8b6917d8 | 269 | py | Python | compile.py | fvalle1/TANS | 6eadd64c7385222f61321ea119a93f21652a8a43 | [
"MIT"
] | null | null | null | compile.py | fvalle1/TANS | 6eadd64c7385222f61321ea119a93f21652a8a43 | [
"MIT"
] | null | null | null | compile.py | fvalle1/TANS | 6eadd64c7385222f61321ea119a93f21652a8a43 | [
"MIT"
] | null | null | null | from ROOT import *
gSystem.CompileMacro("StopWatch.cxx", "kO");
gSystem.CompileMacro("TRandomPlus.cxx", "kO");
gSystem.CompileMacro("SimulatorConfiguration.cxx", "kO");
gSystem.CompileMacro("Simulator.cxx", "kO");
gSystem.CompileMacro("RandomF.cxx", "kO");
randomF()
| 26.9 | 57 | 0.739777 | from ROOT import *
gSystem.CompileMacro("StopWatch.cxx", "kO");
gSystem.CompileMacro("TRandomPlus.cxx", "kO");
gSystem.CompileMacro("SimulatorConfiguration.cxx", "kO");
gSystem.CompileMacro("Simulator.cxx", "kO");
gSystem.CompileMacro("RandomF.cxx", "kO");
randomF()
| true | true |
1c20df0440b6276729cf5ec7fc90886fe1b22225 | 137 | py | Python | linkerd/datadog_checks/linkerd/__about__.py | kzap/integrations-core | 88c3a72dbf5223b496be1c549ca2857d8489c491 | [
"BSD-3-Clause"
] | null | null | null | linkerd/datadog_checks/linkerd/__about__.py | kzap/integrations-core | 88c3a72dbf5223b496be1c549ca2857d8489c491 | [
"BSD-3-Clause"
] | 1 | 2021-02-23T14:03:42.000Z | 2021-03-25T16:52:05.000Z | linkerd/datadog_checks/linkerd/__about__.py | kzap/integrations-core | 88c3a72dbf5223b496be1c549ca2857d8489c491 | [
"BSD-3-Clause"
] | null | null | null | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
__version__ = "2.6.0"
| 27.4 | 59 | 0.722628 |
__version__ = "2.6.0"
| true | true |
1c20df95848f183f060237fb7a812be478211720 | 1,459 | py | Python | config/yolov3_config_voc.py | yuhuangying/YOLO_v3 | 6bac5de658b32092081a6099e11e4d34b3f79224 | [
"MIT"
] | null | null | null | config/yolov3_config_voc.py | yuhuangying/YOLO_v3 | 6bac5de658b32092081a6099e11e4d34b3f79224 | [
"MIT"
] | null | null | null | config/yolov3_config_voc.py | yuhuangying/YOLO_v3 | 6bac5de658b32092081a6099e11e4d34b3f79224 | [
"MIT"
] | null | null | null | # coding=utf-8
# project
DATA_PATH = "D:\workspace\Deepshare\Paper_research\YoloV3\YOLOV3-deepshare/data/VOC"
PROJECT_PATH = "D:\workspace\Deepshare\Paper_research\YoloV3\YOLOV3-deepshare"
DATA = {"CLASSES":['aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus',
'car', 'cat', 'chair', 'cow', 'dining... | 31.042553 | 92 | 0.516107 |
DATA_PATH = "D:\workspace\Deepshare\Paper_research\YoloV3\YOLOV3-deepshare/data/VOC"
PROJECT_PATH = "D:\workspace\Deepshare\Paper_research\YoloV3\YOLOV3-deepshare"
DATA = {"CLASSES":['aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus',
'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse',
... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.