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 417k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 1
class | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c2d0f849557aee866125c4da8f8a94fe9de46f2 | 7,081 | py | Python | src/configparserenhanced/TypedProperty.py | sandialabs/ConfigParserEnhanced | 93c2b32fa67c47bc2194a95a2464529c4adfaa01 | [
"BSD-3-Clause"
] | 2 | 2021-12-08T15:34:03.000Z | 2021-12-21T21:54:19.000Z | src/configparserenhanced/TypedProperty.py | sandialabs/ConfigParserEnhanced | 93c2b32fa67c47bc2194a95a2464529c4adfaa01 | [
"BSD-3-Clause"
] | null | null | null | src/configparserenhanced/TypedProperty.py | sandialabs/ConfigParserEnhanced | 93c2b32fa67c47bc2194a95a2464529c4adfaa01 | [
"BSD-3-Clause"
] | 4 | 2021-12-08T01:02:15.000Z | 2022-01-31T14:08:57.000Z | #!/usr/bin/env python3
# -*- mode: python; py-indent-offset: 4; py-continuation-offset: 4 -*-
#===============================================================================
# Copyright Notice
# ----------------
# Copyright 2021 National Technology & Engineering Solutions of Sandia,
# LLC (NTESS). Under the terms of C... | 42.915152 | 114 | 0.642847 |
import copy
import typing
class SENTINEL:
pass
def typed_property(
name: str,
expected_type=(int, str),
default=SENTINEL,
default_factory=lambda: None,
req_assign_before_use=False,
internal_type=None,
validator=None,
transform=None
):
... | true | true |
1c2d105e7db966f407ca10d5da75611063f8eb1a | 16,206 | py | Python | utils/stable_baselines_plotter.py | malikasng/Bbox_HGG_with_CTR_and_RRTstarFND | 2b1aae6c347f544fefface0c9f26dc4ecde51108 | [
"MIT"
] | 1 | 2020-09-16T06:15:17.000Z | 2020-09-16T06:15:17.000Z | utils/stable_baselines_plotter.py | malikasng/Bbox_HGG_with_CTR_and_RRTstarFND | 2b1aae6c347f544fefface0c9f26dc4ecde51108 | [
"MIT"
] | 5 | 2020-09-26T01:30:01.000Z | 2022-01-13T03:15:42.000Z | utils/stable_baselines_plotter.py | malikasng/Bbox_HGG_with_CTR_and_RRTstarFND | 2b1aae6c347f544fefface0c9f26dc4ecde51108 | [
"MIT"
] | null | null | null | # from https://github.com/hill-a/stable-baselines/blob/master/stable_baselines/results_plotter.py
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
# matplotlib.use('TkAgg') # Can change to 'Agg' for non-interactive mode
plt.rcParams['svg.fonttype'] = 'none'
X_TIMESTEPS = 'tim... | 48.960725 | 118 | 0.648895 |
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import pandas as pd
STEPS = 'timesteps'
X_EPISODES = 'episodes'
X_WALLTIME = 'walltime_hrs'
POSSIBLE_X_AXES = [X_TIMESTEPS, X_EPISODES, X_WALLTIME]
COLORS = ['blue', 'green', 'red', 'cyan', 'magenta', 'yellow', 'black', 'purple', 'pink',
'... | true | true |
1c2d11ff8e57664d9a10a9757b4355520a675e8a | 3,325 | py | Python | mlio/resources/manager.py | Workable/milo | 66c6425188cd20efaadfea7dfb31d730e68fe84b | [
"MIT"
] | 5 | 2018-07-17T07:09:08.000Z | 2020-03-14T21:06:37.000Z | mlio/resources/manager.py | Workable/mlio | 66c6425188cd20efaadfea7dfb31d730e68fe84b | [
"MIT"
] | null | null | null | mlio/resources/manager.py | Workable/mlio | 66c6425188cd20efaadfea7dfb31d730e68fe84b | [
"MIT"
] | null | null | null | import logging as _logging
from mlio.resources.exceptions import ResourceNotFoundError
from .repositories import RepositoriesContainer
logger = _logging.getLogger(__name__)
class ResourceManager:
"""
A registry of resource objects that are dynamically discovered and loaded from a prioritized list of
sou... | 37.359551 | 116 | 0.667669 | import logging as _logging
from mlio.resources.exceptions import ResourceNotFoundError
from .repositories import RepositoriesContainer
logger = _logging.getLogger(__name__)
class ResourceManager:
def __init__(self):
self._resources = {}
self._repositories = RepositoriesContainer()
@pro... | true | true |
1c2d120d9830a54c809476f7ceb13e76d62d5b68 | 1,510 | py | Python | server/benchmarkdataset/permissions.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | 1 | 2021-09-24T18:09:53.000Z | 2021-09-24T18:09:53.000Z | server/benchmarkdataset/permissions.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | 2 | 2021-09-27T16:14:04.000Z | 2021-11-03T14:24:54.000Z | server/benchmarkdataset/permissions.py | johnugeorge/medperf | 5bc3f643064df14e9476bd4d4c1a4c0cce5337d5 | [
"Apache-2.0"
] | null | null | null | from rest_framework.permissions import BasePermission
from benchmark.models import Benchmark
from dataset.models import Dataset
class IsAdmin(BasePermission):
def has_permission(self, request, view):
return request.user.is_superuser
class IsDatasetOwner(BasePermission):
def get_object(self, pk):
... | 27.454545 | 53 | 0.588742 | from rest_framework.permissions import BasePermission
from benchmark.models import Benchmark
from dataset.models import Dataset
class IsAdmin(BasePermission):
def has_permission(self, request, view):
return request.user.is_superuser
class IsDatasetOwner(BasePermission):
def get_object(self, pk):
... | true | true |
1c2d123bb9f3f859a243b8a2d858280e6889d55f | 169 | py | Python | Helloapp/venv/Scripts/django-admin.py | ramadevim/Hello-World | df85d1c8d9650c2f1fb04955ac293a47cdba05bd | [
"MIT"
] | null | null | null | Helloapp/venv/Scripts/django-admin.py | ramadevim/Hello-World | df85d1c8d9650c2f1fb04955ac293a47cdba05bd | [
"MIT"
] | null | null | null | Helloapp/venv/Scripts/django-admin.py | ramadevim/Hello-World | df85d1c8d9650c2f1fb04955ac293a47cdba05bd | [
"MIT"
] | 1 | 2019-10-02T11:56:36.000Z | 2019-10-02T11:56:36.000Z | #!C:\Users\maxgen\django proj\Helloapp\venv\Scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 28.166667 | 62 | 0.786982 |
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| true | true |
1c2d144146c5d13357b58eb927531a2dbd9a0908 | 1,322 | py | Python | main.py | zero-bugs/littlepytest | c3929dee3d5d40ba9c33200d9f441ae61ff36673 | [
"MIT"
] | null | null | null | main.py | zero-bugs/littlepytest | c3929dee3d5d40ba9c33200d9f441ae61ff36673 | [
"MIT"
] | null | null | null | main.py | zero-bugs/littlepytest | c3929dee3d5d40ba9c33200d9f441ae61ff36673 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: UTF-8 -*-
import threading
from common.common_config import CommonConstant
from func.kc_scrawl import KcScrawlImpl, historyImgList
if __name__ == "__main__":
# 第一阶段api提取数据
kcScrawlImpl = KcScrawlImpl()
kcScrawlImpl.init()
# kcScrawlImpl.scrawPicUseApiAll()
print(l... | 25.921569 | 58 | 0.549924 |
import threading
from common.common_config import CommonConstant
from func.kc_scrawl import KcScrawlImpl, historyImgList
if __name__ == "__main__":
kcScrawlImpl = KcScrawlImpl()
kcScrawlImpl.init()
print(len(historyImgList))
try:
t1 = threading.Thread(
target... | true | true |
1c2d1454c5b45a992c0ec7434b5643be04552823 | 6,846 | py | Python | stock_plots.py | Preston5789/Stock_Regression_Algorithm | f65dd0c710be777628a0c03ce0fa851880cf0d81 | [
"MIT"
] | 1 | 2019-05-27T19:39:35.000Z | 2019-05-27T19:39:35.000Z | stock_plots.py | Preston5789/Stock_Regression_Algorithm | f65dd0c710be777628a0c03ce0fa851880cf0d81 | [
"MIT"
] | null | null | null | stock_plots.py | Preston5789/Stock_Regression_Algorithm | f65dd0c710be777628a0c03ce0fa851880cf0d81 | [
"MIT"
] | 2 | 2019-05-03T03:33:26.000Z | 2020-05-15T23:59:55.000Z |
import matplotlib.pyplot as plt
import numpy
import time
from matplotlib.widgets import Button
from stock_trade import Jesus
from stock_connect import Connection
from stock_reg import Errors
err = Errors()
graphswitcheroo = 0
con = Connection()
jes = Jesus()
con.socket()
plt.ion()
fig, axs = ... | 36.222222 | 193 | 0.647239 |
import matplotlib.pyplot as plt
import numpy
import time
from matplotlib.widgets import Button
from stock_trade import Jesus
from stock_connect import Connection
from stock_reg import Errors
err = Errors()
graphswitcheroo = 0
con = Connection()
jes = Jesus()
con.socket()
plt.ion()
fig, axs = ... | true | true |
1c2d157ae31bc30ab6e3cd6918790e543c9f2f6c | 1,196 | py | Python | setup.py | troywilson/so-lazy | bb5a884f2af2db975c065bb39874af9a47ff1f3b | [
"Apache-2.0"
] | null | null | null | setup.py | troywilson/so-lazy | bb5a884f2af2db975c065bb39874af9a47ff1f3b | [
"Apache-2.0"
] | null | null | null | setup.py | troywilson/so-lazy | bb5a884f2af2db975c065bb39874af9a47ff1f3b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
'''Setup configuration for so_lazy package'''
import json
import setuptools
PKG_NAME = 'so_lazy'
with open(PKG_NAME + '/pkg_info.json') as fh:
_pkg_info = json.load(fh)
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name=PKG_NAME,
version=_p... | 29.170732 | 70 | 0.655518 |
import json
import setuptools
PKG_NAME = 'so_lazy'
with open(PKG_NAME + '/pkg_info.json') as fh:
_pkg_info = json.load(fh)
with open('README.md', 'r') as fh:
long_description = fh.read()
setuptools.setup(
name=PKG_NAME,
version=_pkg_info['version'],
author=_pkg_info['author'],
description... | true | true |
1c2d15a29bbaf8b5ddc10f33905d8c185a433674 | 1,941 | py | Python | test/test_management_entity_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | test/test_management_entity_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | test/test_management_entity_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 51.078947 | 1,052 | 0.783101 |
from __future__ import absolute_import
import unittest
import intersight
from intersight.models.management_entity_all_of import ManagementEntityAllOf
from intersight.rest import ApiException
class TestManagementEntityAllOf(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pa... | true | true |
1c2d15c565c541b8309285469165d695092f9e23 | 117,050 | py | Python | emsdk.py | Hillsie/emsdk | bb61bc17bd9183fbe691c2b3d945731f63525958 | [
"MIT"
] | null | null | null | emsdk.py | Hillsie/emsdk | bb61bc17bd9183fbe691c2b3d945731f63525958 | [
"MIT"
] | null | null | null | emsdk.py | Hillsie/emsdk | bb61bc17bd9183fbe691c2b3d945731f63525958 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright 2019 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
from __future__ import print_function
import c... | 40.656478 | 323 | 0.6712 |
from __future__ import print_function
import copy
import errno
import json
import multiprocessing
import os
import os.path
import platform
import re
import shutil
import stat
import subprocess
import sys
import tempfile
import zipfile
if sys.version_info >= (3,):
from urllib.parse import urljoin
from urllib... | true | true |
1c2d1683276d18336a20cddf892fc118e276e093 | 15,191 | py | Python | tests/users/test_auth.py | itsmingjie/CTFd | 80df88f25d095ea7f7fc9cf8c8d0bf9cc7c2bf1f | [
"Apache-2.0"
] | 9 | 2020-05-07T01:39:06.000Z | 2022-01-21T09:32:03.000Z | tests/users/test_auth.py | itsmingjie/CTFd | 80df88f25d095ea7f7fc9cf8c8d0bf9cc7c2bf1f | [
"Apache-2.0"
] | 3 | 2021-03-11T00:50:06.000Z | 2022-02-10T23:13:17.000Z | tests/users/test_auth.py | erseco/CTFd | a6a4906ab058b79bca7af48038fa7badc1744340 | [
"Apache-2.0"
] | 7 | 2020-06-16T20:42:00.000Z | 2022-01-13T08:06:14.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import six
from freezegun import freeze_time
from mock import patch
from CTFd.models import Users, db
from CTFd.utils import get_config, set_config
from CTFd.utils.crypto import verify_password
from CTFd.utils.security.signing import serialize
from tests.helpers import cr... | 34.603645 | 116 | 0.612995 |
import six
from freezegun import freeze_time
from mock import patch
from CTFd.models import Users, db
from CTFd.utils import get_config, set_config
from CTFd.utils.crypto import verify_password
from CTFd.utils.security.signing import serialize
from tests.helpers import create_ctfd, destroy_ctfd, login_as_user, regi... | true | true |
1c2d18c57908c297096770b862aec97c9ff96d52 | 11,283 | py | Python | modify_weights.py | rayjyh/PyTorch_CIFAR10_rram_compenstion | 61a53c85a74abc965a5bea3e4b102e9a7ad8f03a | [
"MIT"
] | null | null | null | modify_weights.py | rayjyh/PyTorch_CIFAR10_rram_compenstion | 61a53c85a74abc965a5bea3e4b102e9a7ad8f03a | [
"MIT"
] | null | null | null | modify_weights.py | rayjyh/PyTorch_CIFAR10_rram_compenstion | 61a53c85a74abc965a5bea3e4b102e9a7ad8f03a | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import torch
'''
compensation = {
"no_comp":
"simple":
"dynamic":
"bias":
"double_sim":
}
'''
quantized = True
visualize = False
symmetric = True
def asym_quant_param(w, k):
num_intervals = 2 ** k - 1
scale = (torch.max(w) - torch.min(w)... | 39.041522 | 117 | 0.572011 | import numpy as np
import matplotlib.pyplot as plt
import torch
quantized = True
visualize = False
symmetric = True
def asym_quant_param(w, k):
num_intervals = 2 ** k - 1
scale = (torch.max(w) - torch.min(w)) / num_intervals
zero = int(-torch.min(w) / scale)
return num_intervals, scale, zero
def s... | true | true |
1c2d19186929b1032fb2c4eb224c5f81db2d2d09 | 312 | py | Python | src/vox/linters/python/clonedigger.py | Peilonrayz/vox | 026a82bb3c0d47988cd20d18639bcb0e249ee211 | [
"MIT"
] | null | null | null | src/vox/linters/python/clonedigger.py | Peilonrayz/vox | 026a82bb3c0d47988cd20d18639bcb0e249ee211 | [
"MIT"
] | null | null | null | src/vox/linters/python/clonedigger.py | Peilonrayz/vox | 026a82bb3c0d47988cd20d18639bcb0e249ee211 | [
"MIT"
] | null | null | null | import vox
from vox import flaggy, linty
from ..base_linter import BaseLinter
class Clonedigger(BaseLinter):
COMMAND = vox.FlagsBuilder().sugar(program="clonedigger")
DEPENDENCIES = ["clonedigger"]
FORMAT = None
NAME = "clonedigger"
PYTHON = "2.7"
extract_errors = linty.from_str.echo
| 22.285714 | 61 | 0.711538 | import vox
from vox import flaggy, linty
from ..base_linter import BaseLinter
class Clonedigger(BaseLinter):
COMMAND = vox.FlagsBuilder().sugar(program="clonedigger")
DEPENDENCIES = ["clonedigger"]
FORMAT = None
NAME = "clonedigger"
PYTHON = "2.7"
extract_errors = linty.from_str.echo
| true | true |
1c2d19569551341805cf3d50cc5ffb640693bf50 | 4,652 | py | Python | FemMed Microservice/ecommerce/settings.py | HimanshuBarak/FemPower | d3b7ed0d7f2f6eece9d9a1149fae083d88c1bb06 | [
"MIT"
] | null | null | null | FemMed Microservice/ecommerce/settings.py | HimanshuBarak/FemPower | d3b7ed0d7f2f6eece9d9a1149fae083d88c1bb06 | [
"MIT"
] | null | null | null | FemMed Microservice/ecommerce/settings.py | HimanshuBarak/FemPower | d3b7ed0d7f2f6eece9d9a1149fae083d88c1bb06 | [
"MIT"
] | null | null | null | """
Django settings for ecommerce project.
Generated by 'django-admin startproject' using Django 2.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
... | 25.844444 | 91 | 0.693465 |
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'lzj2axnee5!=1s5y17#ud4l^_n)krr*9wmn=^t6+o!^ry%&v_*'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'wishlists.apps.WishlistsConfig',
'orders.apps.OrdersConfig',
# 'users... | true | true |
1c2d19be1cf2c7370f09d63ee85ffc190a87325c | 13,747 | py | Python | src/sage/modular/modform_hecketriangle/element.py | defeo/sage | d8822036a9843bd4d75845024072515ede56bcb9 | [
"BSL-1.0"
] | 2 | 2018-06-30T01:37:35.000Z | 2018-06-30T01:37:39.000Z | src/sage/modular/modform_hecketriangle/element.py | boothby/sage | 1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f | [
"BSL-1.0"
] | null | null | null | src/sage/modular/modform_hecketriangle/element.py | boothby/sage | 1b1e6f608d1ef8ee664bb19e991efbbc68cbd51f | [
"BSL-1.0"
] | null | null | null | r"""
Elements of Hecke modular forms spaces
AUTHORS:
- Jonas Jermann (2013): initial version
"""
from __future__ import absolute_import
#*****************************************************************************
# Copyright (C) 2013-2014 Jonas Jermann <jjermann2@gmail.com>
#
# Distributed under the terms ... | 39.277143 | 146 | 0.552339 | from __future__ import absolute_import
from .graded_ring_element import FormsRingElement
class FormsElement(FormsRingElement):
def __init__(self, parent, rat):
super(FormsElement, self).__init__(parent, rat)
if self.AT(["quasi"])>=self._analytic_type:
pass
elif not... | true | true |
1c2d1b0956967dc60e6e8d41c3f9a916abc2aa28 | 3,292 | py | Python | config/settings.py | laactech/mastering-django-orm | 2e6e2806311250147023133a0812c1b0e109db11 | [
"BSD-3-Clause"
] | null | null | null | config/settings.py | laactech/mastering-django-orm | 2e6e2806311250147023133a0812c1b0e109db11 | [
"BSD-3-Clause"
] | null | null | null | config/settings.py | laactech/mastering-django-orm | 2e6e2806311250147023133a0812c1b0e109db11 | [
"BSD-3-Clause"
] | null | null | null | """
Django settings for mastering_django_orm project.
Generated by 'django-admin startproject' using Django 3.2.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
... | 26.126984 | 91 | 0.703524 |
from pathlib import Path
BASE_DIR = Path(__file__).resolve().parent.parent
SECRET_KEY = "django-insecure-4h--2s#hczboh8*30j0@ui9r__-6&mtd=)$##u@y)fd(y-+q_c"
DEBUG = True
ALLOWED_HOSTS: list[str] = []
# Application definition
INSTALLED_APPS = [
"django.contrib.admin",
"django.contrib.auth",
"d... | true | true |
1c2d1b0d281c0e2d6a7fb417e8c2a8b60e46b793 | 12,148 | py | Python | Commands/Counter/counter_StreamlabsSystem.py | RzR32/_streamlabs-chatbot-scripts | 8bedc18f112bf50c6795fc34993ed5fd4bdf6f00 | [
"MIT"
] | 1 | 2020-07-27T20:04:42.000Z | 2020-07-27T20:04:42.000Z | Commands/Counter/counter_StreamlabsSystem.py | RzR32/_streamlabs-chatbot-scripts | 8bedc18f112bf50c6795fc34993ed5fd4bdf6f00 | [
"MIT"
] | null | null | null | Commands/Counter/counter_StreamlabsSystem.py | RzR32/_streamlabs-chatbot-scripts | 8bedc18f112bf50c6795fc34993ed5fd4bdf6f00 | [
"MIT"
] | null | null | null | # coding=utf-8
# ---------------------------
# Import Libraries
# ---------------------------
import codecs
import os
import json
import clr
clr.AddReference("IronPython.SQLite.dll")
clr.AddReference("IronPython.Modules.dll")
# ---------------------------
# [Required] Script Information
# -----------------------... | 41.745704 | 122 | 0.627428 |
import codecs
import os
import json
import clr
clr.AddReference("IronPython.SQLite.dll")
clr.AddReference("IronPython.Modules.dll")
ScriptName = "Twitch Commands - Counter"
Website = "https://twitch.tv/RzR32"
Description = "Commands - Counter for the Stream - RzR32"
Creator = "RzR32"
Version = "0.1"
sett... | true | true |
1c2d1b3c4b4a86f83826a190d19ee704cbcf08cd | 17,569 | py | Python | influxdb_client/__init__.py | tomklapka/influxdb-client-python | f8d1407a6190533faed4d645f6ba973b4d2bc8b2 | [
"MIT"
] | null | null | null | influxdb_client/__init__.py | tomklapka/influxdb-client-python | f8d1407a6190533faed4d645f6ba973b4d2bc8b2 | [
"MIT"
] | null | null | null | influxdb_client/__init__.py | tomklapka/influxdb-client-python | f8d1407a6190533faed4d645f6ba973b4d2bc8b2 | [
"MIT"
] | null | null | null | # coding: utf-8
# flake8: noqa
"""
Influx API Service.
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
# import apis into sd... | 62.523132 | 120 | 0.906369 |
from __future__ import absolute_import
from influxdb_client.service.authorizations_service import AuthorizationsService
from influxdb_client.service.buckets_service import BucketsService
from influxdb_client.service.cells_service import CellsService
from influxdb_client.service.checks_service import ChecksServi... | true | true |
1c2d1c95cee30dd87c9a443915be8fd3956f0364 | 3,695 | py | Python | critiquebrainz/frontend/external/mbspotify.py | code-master5/critiquebrainz | a231ef27923f54f8c3abb0c368e871215423546e | [
"Apache-2.0"
] | null | null | null | critiquebrainz/frontend/external/mbspotify.py | code-master5/critiquebrainz | a231ef27923f54f8c3abb0c368e871215423546e | [
"Apache-2.0"
] | null | null | null | critiquebrainz/frontend/external/mbspotify.py | code-master5/critiquebrainz | a231ef27923f54f8c3abb0c368e871215423546e | [
"Apache-2.0"
] | null | null | null | """
This module provides interface to Spotify ID mapper - mbspotify.
Source code of mbspotify is available at https://github.com/metabrainz/mbspotify.
"""
import json
import requests
from requests.exceptions import RequestException
from requests.adapters import HTTPAdapter
from flask_babel import lazy_gettext
from bra... | 37.704082 | 120 | 0.646279 | import json
import requests
from requests.exceptions import RequestException
from requests.adapters import HTTPAdapter
from flask_babel import lazy_gettext
from brainzutils import cache
from critiquebrainz.frontend import flash
_base_url = ""
_key = ""
_CACHE_NAMESPACE = "mbspotify_mappings"
_UNAVAILABLE_MSG = "Spoti... | true | true |
1c2d1dd07514cd2508c30d802fca461fd7afaa77 | 21,327 | py | Python | nssrc/com/citrix/netscaler/nitro/resource/config/lsn/lsnappsprofile.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/lsn/lsnappsprofile.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | nssrc/com/citrix/netscaler/nitro/resource/config/lsn/lsnappsprofile.py | guardicore/nitro-python | 5346a5086134aead80968f15a41ff527adaa0ec1 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021 Citrix Systems, 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... | 44.06405 | 595 | 0.736625 |
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response
from nssrc.com.citrix.netscaler.nitro.service.options import options
from nssrc.com.citrix.netscaler.nitro.exception.nitro_excepti... | true | true |
1c2d1f49886d1c91a4c8d57b0a630de28838ef98 | 9,508 | py | Python | test/test_testcasecontainer.py | noralsydmp/icetea | b486cdc8e0d2211e118f1f8211aa4d284ca02422 | [
"Apache-2.0"
] | 6 | 2018-08-10T17:11:10.000Z | 2020-04-29T07:05:36.000Z | test/test_testcasecontainer.py | noralsydmp/icetea | b486cdc8e0d2211e118f1f8211aa4d284ca02422 | [
"Apache-2.0"
] | 58 | 2018-08-13T08:36:08.000Z | 2021-07-07T08:32:52.000Z | test/test_testcasecontainer.py | noralsydmp/icetea | b486cdc8e0d2211e118f1f8211aa4d284ca02422 | [
"Apache-2.0"
] | 7 | 2018-08-10T12:53:18.000Z | 2021-11-08T05:15:42.000Z | # pylint: disable=missing-docstring,no-self-use,redefined-builtin,too-many-arguments
# pylint: disable=protected-access,unused-variable
"""
Copyright 2017 ARM Limited
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 o... | 42.636771 | 100 | 0.640618 |
import json
import os
import unittest
import argparse
import mock
from icetea_lib.TestSuite.TestcaseContainer import TestcaseContainer, TestStatus
from icetea_lib.Result import Result
from icetea_lib.bench import Bench
def mock_load_tc(*args, **kwargs):
return None
def mock_raise_type(*args, **kwargs): ... | true | true |
1c2d1fc8a2b5942f018d1861c44ee51d2467d88e | 1,886 | py | Python | src/extended_webdrivers/frame.py | dillonm197/extended-webdrivers | 9cb4cdb75f37c66ee1ac7fa13b947ae3bcb17863 | [
"MIT"
] | null | null | null | src/extended_webdrivers/frame.py | dillonm197/extended-webdrivers | 9cb4cdb75f37c66ee1ac7fa13b947ae3bcb17863 | [
"MIT"
] | null | null | null | src/extended_webdrivers/frame.py | dillonm197/extended-webdrivers | 9cb4cdb75f37c66ee1ac7fa13b947ae3bcb17863 | [
"MIT"
] | 1 | 2019-08-07T01:48:36.000Z | 2019-08-07T01:48:36.000Z | class Frame:
""" Base class for handling switching to and from iframes using context managers. """
def __init__(self, child_frame):
self.driver = child_frame.parent
assert child_frame.tag_name.lower() == 'iframe'
self.child_frame = child_frame
def _switch_to(self):
""" Swit... | 35.584906 | 89 | 0.662248 | class Frame:
def __init__(self, child_frame):
self.driver = child_frame.parent
assert child_frame.tag_name.lower() == 'iframe'
self.child_frame = child_frame
def _switch_to(self):
self.parent_window = self.driver.current_window_handle
self.parent_frame = self.d... | true | true |
1c2d204ef61bc14c86ad018669c95549458a72ce | 16,764 | py | Python | cogs/queuecog.py | stealthlego/discord-queue-bot | 4f15a6e5aad4de333a685dfd32854c2898d4c6e6 | [
"MIT"
] | 3 | 2020-10-08T04:48:46.000Z | 2020-11-17T12:55:56.000Z | cogs/queuecog.py | stealthlego/discord-queue-bot | 4f15a6e5aad4de333a685dfd32854c2898d4c6e6 | [
"MIT"
] | 6 | 2020-10-07T19:05:53.000Z | 2021-05-09T12:55:33.000Z | cogs/queuecog.py | stealthlego/discord-queue-bot | 4f15a6e5aad4de333a685dfd32854c2898d4c6e6 | [
"MIT"
] | 1 | 2020-11-24T18:10:46.000Z | 2020-11-24T18:10:46.000Z | from asyncio.tasks import current_task
import os
import random
import time
import datetime
from attr import dataclass
import discord
from discord.ext import commands, tasks
import asyncio
server_handler = {}
reactions = ["\U000027A1", "\U00002705", "\U0000274C", "\U0001F504", "\U0001F500", "\U0001F6D1"]
instructions ... | 37.336303 | 149 | 0.596815 | from asyncio.tasks import current_task
import os
import random
import time
import datetime
from attr import dataclass
import discord
from discord.ext import commands, tasks
import asyncio
server_handler = {}
reactions = ["\U000027A1", "\U00002705", "\U0000274C", "\U0001F504", "\U0001F500", "\U0001F6D1"]
instructions ... | true | true |
1c2d2137de95de3a8e372e8383217ce2f7000d2c | 3,288 | py | Python | app/settings.py | khaledzaki2017/Recipe-app-api | c525b2764866fc3b8501baf9d8e9c7cc0374080b | [
"MIT"
] | null | null | null | app/settings.py | khaledzaki2017/Recipe-app-api | c525b2764866fc3b8501baf9d8e9c7cc0374080b | [
"MIT"
] | null | null | null | app/settings.py | khaledzaki2017/Recipe-app-api | c525b2764866fc3b8501baf9d8e9c7cc0374080b | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 2.1.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Bui... | 24.721805 | 91 | 0.690389 |
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = 'z+-!#mb%g3ridp=b(nyb-2e3g5y-lf@2agwp9p6d#v^*a^uff9'
DEBUG = True
ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.content... | true | true |
1c2d2151cd5b2fc48c97bf31c39a0ca0e80eb1a1 | 18,214 | py | Python | rex_gym/envs/gym/walk_env.py | Dzhange/rex-gym | 3ffb674ade13ceac3352c3329f1804eb21a08403 | [
"Apache-2.0"
] | null | null | null | rex_gym/envs/gym/walk_env.py | Dzhange/rex-gym | 3ffb674ade13ceac3352c3329f1804eb21a08403 | [
"Apache-2.0"
] | null | null | null | rex_gym/envs/gym/walk_env.py | Dzhange/rex-gym | 3ffb674ade13ceac3352c3329f1804eb21a08403 | [
"Apache-2.0"
] | null | null | null | """This file implements the gym environment of rex alternating legs.
"""
import math
import random
from gym import spaces
import numpy as np
from .. import rex_gym_env
from ...model import rex_constants
from ...model.gait_planner import GaitPlanner
from ...model.kinematics import Kinematics
NUM_LEGS = 4
class RexW... | 46.464286 | 138 | 0.566981 | import math
import random
from gym import spaces
import numpy as np
from .. import rex_gym_env
from ...model import rex_constants
from ...model.gait_planner import GaitPlanner
from ...model.kinematics import Kinematics
NUM_LEGS = 4
class RexWalkEnv(rex_gym_env.RexGymEnv):
metadata = {"render.modes": ["human", "... | true | true |
1c2d23a538a46a1a35586ddeca8f545e09db4f19 | 1,587 | py | Python | lib/galaxy/tool_util/deps/mulled/mulled_build_tool.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/tool_util/deps/mulled/mulled_build_tool.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | 6 | 2021-11-11T20:57:49.000Z | 2021-12-10T15:30:33.000Z | lib/galaxy/tool_util/deps/mulled/mulled_build_tool.py | beatrizserrano/galaxy | e149d9d32e1bca6c07c38b1a9cdabfee60323610 | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
"""Build a mulled images for a tool source (Galaxy or CWL tool).
Examples:
Build mulled images for requirements defined in a tool:
mulled-build-tool build path/to/tool_file.xml
"""
from galaxy.tool_util.parser import get_tool_source
from ._cli import arg_parser
from .mulled_build import (... | 29.943396 | 109 | 0.741021 |
from galaxy.tool_util.parser import get_tool_source
from ._cli import arg_parser
from .mulled_build import (
add_build_arguments,
add_single_image_arguments,
args_to_mull_targets_kwds,
mull_targets,
)
from .util import build_target
def main(argv=None):
parser = arg_parser(argv, globals())
ad... | true | true |
1c2d2413a1ef1a75bc362e732da7ec8c9048a08e | 3,848 | py | Python | everbean/tasks.py | messense/everbean | 2d93cff0f2f707aff25025b4e07ab1f6104b4854 | [
"MIT"
] | 2 | 2015-07-17T00:34:53.000Z | 2019-07-08T09:35:51.000Z | everbean/tasks.py | messense/everbean | 2d93cff0f2f707aff25025b4e07ab1f6104b4854 | [
"MIT"
] | 4 | 2015-05-21T13:36:39.000Z | 2017-08-21T12:40:35.000Z | everbean/tasks.py | messense/everbean | 2d93cff0f2f707aff25025b4e07ab1f6104b4854 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import (
with_statement,
absolute_import,
unicode_literals
)
from datetime import datetime
from flask import current_app as app
from flask.ext.mail import Message
from .core import mail, db, celery
from .account.models import User
from .note.models import Note
from .ext.doub... | 24.825806 | 77 | 0.650728 |
from __future__ import (
with_statement,
absolute_import,
unicode_literals
)
from datetime import datetime
from flask import current_app as app
from flask.ext.mail import Message
from .core import mail, db, celery
from .account.models import User
from .note.models import Note
from .ext.douban import (
... | true | true |
1c2d28a71efc509d66a44e44cc0bbc4d58484dd8 | 6,328 | py | Python | src/radixlib/parsers/no_parser.py | 0xOmarA/RadixLib | 85d75a47d4c4df4c1a319b74857ae2c513933623 | [
"MIT"
] | 32 | 2022-01-12T16:52:28.000Z | 2022-03-24T18:05:47.000Z | src/radixlib/parsers/no_parser.py | 0xOmarA/RadixLib | 85d75a47d4c4df4c1a319b74857ae2c513933623 | [
"MIT"
] | 3 | 2022-01-12T17:01:55.000Z | 2022-02-12T15:14:16.000Z | src/radixlib/parsers/no_parser.py | 0xOmarA/RadixLib | 85d75a47d4c4df4c1a319b74857ae2c513933623 | [
"MIT"
] | 1 | 2022-01-21T04:28:07.000Z | 2022-01-21T04:28:07.000Z | from typing import Callable, Optional, Any
from radixlib.parsers.base_parser import ParserBase
class NoParser(ParserBase):
""" Defines a parser which performs no parsing of the data whatsoever.
This class defines a parser which does not perform parsing over any of the data at all. While
this class might ... | 46.874074 | 101 | 0.70354 | from typing import Callable, Optional, Any
from radixlib.parsers.base_parser import ParserBase
class NoParser(ParserBase):
@classmethod
def parse(
cls,
data: Any,
data_type: str
) -> Any:
function_name: str = f'parse_{data_type}'
parsing_function: Optional... | true | true |
1c2d2a773462018896ad739e576823a0d2b1692c | 1,559 | py | Python | symphony/cli/gql/tests/test_transport.py | idoshveki/magma | 8022267bd8b8d94913fbb9a0836880361d785446 | [
"BSD-3-Clause"
] | 2 | 2020-11-05T18:58:26.000Z | 2021-02-09T06:42:49.000Z | symphony/cli/gql/tests/test_transport.py | idoshveki/magma | 8022267bd8b8d94913fbb9a0836880361d785446 | [
"BSD-3-Clause"
] | 10 | 2021-03-31T20:19:00.000Z | 2022-02-19T07:09:57.000Z | symphony/cli/gql/tests/test_transport.py | idoshveki/magma | 8022267bd8b8d94913fbb9a0836880361d785446 | [
"BSD-3-Clause"
] | 3 | 2020-08-20T18:45:34.000Z | 2020-08-20T20:18:42.000Z | #!/usr/bin/env python3
import pytest
import requests
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
@pytest.fixture
def client():
request = requests.get(
"http://swapi.graphene-python.org/graphql",
headers={"Host": "swapi.graphene-python.org", "Accept": "text... | 23.984615 | 77 | 0.479153 |
import pytest
import requests
from gql import Client, gql
from gql.transport.requests import RequestsHTTPTransport
@pytest.fixture
def client():
request = requests.get(
"http://swapi.graphene-python.org/graphql",
headers={"Host": "swapi.graphene-python.org", "Accept": "text/html"},
)
req... | true | true |
1c2d2aeb9f93a8945d0da4537d89d203cc18a3cb | 27,956 | py | Python | r6sapi/players.py | dasBunny/RainbowSixSiege-Python-API | dade9efd41b2a8855e65347ea1c70b85c3a36bbf | [
"MIT"
] | null | null | null | r6sapi/players.py | dasBunny/RainbowSixSiege-Python-API | dade9efd41b2a8855e65347ea1c70b85c3a36bbf | [
"MIT"
] | null | null | null | r6sapi/players.py | dasBunny/RainbowSixSiege-Python-API | dade9efd41b2a8855e65347ea1c70b85c3a36bbf | [
"MIT"
] | null | null | null | """
Copyright (c) 2016-2019 billyoyo
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, ... | 43.477449 | 460 | 0.639648 |
import asyncio
import inspect
from .exceptions import InvalidRequest
from .platforms import PlatformURLNames
from .weapons import *
from .gamemodes import *
from .gamequeues import *
from .operators import *
from .ranks import *
class PlayerUrlTemplates:
FETCH_STATISTIC = "https://public-ubiservices.ubi.com/v1/... | true | true |
1c2d2c23a3bcd443b95c043f6fb27c7092470d17 | 142 | py | Python | zcrmsdk/src/com/zoho/crm/api/bulk_write/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | zcrmsdk/src/com/zoho/crm/api/bulk_write/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | zcrmsdk/src/com/zoho/crm/api/bulk_write/response_wrapper.py | zoho/zohocrm-python-sdk-2.0 | 3a93eb3b57fed4e08f26bd5b311e101cb2995411 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
class ResponseWrapper(ABC):
def __init__(self):
"""Creates an instance of ResponseWrapper"""
pass
| 15.777778 | 46 | 0.746479 | from abc import ABC, abstractmethod
class ResponseWrapper(ABC):
def __init__(self):
pass
| true | true |
1c2d2c2a9b337d93ae73da357bf12fb17a8477bd | 52,929 | py | Python | py_entitymatching/catalog/catalog_manager.py | kvpradap/py_entitymatching | 4ff803df1a03cf4d77ef935357355e6de5dd9438 | [
"BSD-3-Clause"
] | 165 | 2016-08-28T14:30:01.000Z | 2022-03-29T17:24:03.000Z | py_entitymatching/catalog/catalog_manager.py | mvahit/py_entitymatching | 6724081d7d95c547e5a51625b4a8207c6c1737f8 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 70 | 2016-11-22T00:35:22.000Z | 2022-03-11T22:26:26.000Z | py_entitymatching/catalog/catalog_manager.py | mvahit/py_entitymatching | 6724081d7d95c547e5a51625b4a8207c6c1737f8 | [
"MIT",
"BSD-2-Clause",
"BSD-3-Clause"
] | 53 | 2016-09-22T02:07:34.000Z | 2022-03-19T18:57:06.000Z | # coding=utf-8
"""
This module contains wrapper functions for the catalog.
"""
import logging
import pandas as pd
import six
import py_entitymatching.utils.catalog_helper as ch
from py_entitymatching.catalog.catalog import Catalog
from py_entitymatching.utils.validation_helper import validate_object_type
logger = lo... | 36.832985 | 106 | 0.652006 |
import logging
import pandas as pd
import six
import py_entitymatching.utils.catalog_helper as ch
from py_entitymatching.catalog.catalog import Catalog
from py_entitymatching.utils.validation_helper import validate_object_type
logger = logging.getLogger(__name__)
def get_property(data_frame, property_name):
... | true | true |
1c2d2c9056f3f7435f1e80d6ff4b5cde68b9076d | 10,970 | py | Python | cvxpy/reductions/solvers/conic_solvers/conic_solver.py | adshieh/cvxpy | 73b696b71dbb2ceb66a805798c922461e33afc6b | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2021-12-21T03:11:12.000Z | 2022-03-02T16:56:24.000Z | cvxpy/reductions/solvers/conic_solvers/conic_solver.py | adshieh/cvxpy | 73b696b71dbb2ceb66a805798c922461e33afc6b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cvxpy/reductions/solvers/conic_solvers/conic_solver.py | adshieh/cvxpy | 73b696b71dbb2ceb66a805798c922461e33afc6b | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-11-17T15:45:54.000Z | 2020-11-17T15:45:54.000Z | """
Copyright 2017 Robin Verschueren, 2017 Akshay Agrawal
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... | 41.711027 | 86 | 0.583227 |
import cvxpy.settings as s
from cvxpy.constraints import SOC, ExpCone, PSD, Zero, NonNeg
from cvxpy.reductions.cvx_attr2constr import convex_attributes
from cvxpy.reductions.dcp2cone.cone_matrix_stuffing import ParamConeProg
from cvxpy.reductions.solution import Solution, failure_solution
from cvxpy.reductions.solvers... | true | true |
1c2d2cce86d70b42f0fd8a31f5f38480d589a8a6 | 2,914 | py | Python | f5_cccl/resource/ltm/test/test_irule.py | f5yacobucci/f5-cccl | 64e7fa0a6d4ead9b5209b5b46bf4ed1b6cef036a | [
"Apache-2.0"
] | null | null | null | f5_cccl/resource/ltm/test/test_irule.py | f5yacobucci/f5-cccl | 64e7fa0a6d4ead9b5209b5b46bf4ed1b6cef036a | [
"Apache-2.0"
] | null | null | null | f5_cccl/resource/ltm/test/test_irule.py | f5yacobucci/f5-cccl | 64e7fa0a6d4ead9b5209b5b46bf4ed1b6cef036a | [
"Apache-2.0"
] | 1 | 2019-11-02T05:22:48.000Z | 2019-11-02T05:22:48.000Z | #!/usr/bin/env python
# Copyright 2017 F5 Networks 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... | 21.746269 | 74 | 0.640014 |
from copy import copy
from f5_cccl.resource.ltm.irule import IRule
from mock import Mock
import pytest
ssl_redirect_irule_1 = """
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] \":\" 1][HTTP::uri]
}
"""
cfg_test = {
'name': 'ssl_redirect',
'partition': '... | true | true |
1c2d2d3875cb0e774551d5ff9f6a71a5260ab0f5 | 109 | py | Python | notes/admin.py | mbassale/noteprg | 31042224c396441ba6954de4ed5d0b4f3e1efa71 | [
"MIT"
] | null | null | null | notes/admin.py | mbassale/noteprg | 31042224c396441ba6954de4ed5d0b4f3e1efa71 | [
"MIT"
] | 4 | 2021-03-30T12:57:11.000Z | 2021-06-10T18:45:28.000Z | notes/admin.py | mbassale/noteprg | 31042224c396441ba6954de4ed5d0b4f3e1efa71 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Note
# Register your models here.
admin.register(Note)
| 18.166667 | 32 | 0.798165 | from django.contrib import admin
from .models import Note
admin.register(Note)
| true | true |
1c2d2d3cf5b1d5868ecf0db1f97ce9e33cb66b8c | 2,844 | py | Python | tests/common/test_run/truncatemod_run.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | 1 | 2020-08-31T02:43:43.000Z | 2020-08-31T02:43:43.000Z | tests/common/test_run/truncatemod_run.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | tests/common/test_run/truncatemod_run.py | laekov/akg | 5316b8cb2340bbf71bdc724dc9d81513a67b3104 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.056338 | 119 | 0.662799 |
from akg.utils import kernel_exec as utils
from tensorio import compare_tensor
import numpy as np
from gen_random import random_gaussian
from test_op import truncatemod
from base import get_rtol_atol
def truncatemod_run(shape1, shape2, dtype, attrs):
if 'tuning' in attrs.keys():
t = attrs.g... | true | true |
1c2d2defd3c46424bb893cb4ea7bdee520efc1cb | 821 | py | Python | lab5.py | GregoryLazarev/SP_LAB5_6 | 39b1914e2782d2f20fc412da82b485b187de6dda | [
"MIT"
] | null | null | null | lab5.py | GregoryLazarev/SP_LAB5_6 | 39b1914e2782d2f20fc412da82b485b187de6dda | [
"MIT"
] | null | null | null | lab5.py | GregoryLazarev/SP_LAB5_6 | 39b1914e2782d2f20fc412da82b485b187de6dda | [
"MIT"
] | null | null | null | import threading
tr_dict = dict()
mutex = threading.Lock()
prohibited = (',','.','?','!','-','+','\'','@')
def Count_trigrams(in_str):
trgrms = dict()
trgrm = ""
for i in in_str:
if i not in prohibited:
trgrm += i
else:
trgrm = ""
if len(trgrm) == 3:
if trgrm in trgrms:
trgrms[... | 18.244444 | 56 | 0.580999 | import threading
tr_dict = dict()
mutex = threading.Lock()
prohibited = (',','.','?','!','-','+','\'','@')
def Count_trigrams(in_str):
trgrms = dict()
trgrm = ""
for i in in_str:
if i not in prohibited:
trgrm += i
else:
trgrm = ""
if len(trgrm) == 3:
if trgrm in trgrms:
trgrms[... | true | true |
1c2d2df0d25244136dde5a5320b73448f8857bc0 | 22,649 | py | Python | certbot/tests/compat/filesystem_test.py | venim/certbot | fe01390f925eb72d13709e4cd065e727c9eeaa75 | [
"Apache-2.0"
] | null | null | null | certbot/tests/compat/filesystem_test.py | venim/certbot | fe01390f925eb72d13709e4cd065e727c9eeaa75 | [
"Apache-2.0"
] | null | null | null | certbot/tests/compat/filesystem_test.py | venim/certbot | fe01390f925eb72d13709e4cd065e727c9eeaa75 | [
"Apache-2.0"
] | null | null | null | """Tests for certbot.compat.filesystem"""
import contextlib
import errno
import unittest
try:
import mock
except ImportError: # pragma: no cover
from unittest import mock
from certbot import util
from certbot._internal import lock
from certbot.compat import filesystem
from certbot.compat import os
import cert... | 41.255009 | 119 | 0.692525 | import contextlib
import errno
import unittest
try:
import mock
except ImportError:
from unittest import mock
from certbot import util
from certbot._internal import lock
from certbot.compat import filesystem
from certbot.compat import os
import certbot.tests.util as test_util
from certbot.tests.util import T... | true | true |
1c2d2eeb5796406a7964c144d0b8b98a0c2da39a | 138 | py | Python | tests/types/test_types_package.py | authlete/authlete-python | 751514c525cd04a930373de78463a1fe71b6da60 | [
"Apache-2.0"
] | 5 | 2019-07-30T01:37:04.000Z | 2021-02-15T05:55:55.000Z | tests/types/test_types_package.py | DestinyCall/authlete-python | 751514c525cd04a930373de78463a1fe71b6da60 | [
"Apache-2.0"
] | null | null | null | tests/types/test_types_package.py | DestinyCall/authlete-python | 751514c525cd04a930373de78463a1fe71b6da60 | [
"Apache-2.0"
] | 1 | 2021-02-15T05:55:56.000Z | 2021-02-15T05:55:56.000Z | import unittest
from authlete.types import *
class TestDtoPackage(unittest.TestCase):
def test_1(self):
ApplicationType.WEB
| 17.25 | 40 | 0.746377 | import unittest
from authlete.types import *
class TestDtoPackage(unittest.TestCase):
def test_1(self):
ApplicationType.WEB
| true | true |
1c2d2fe1bb015c0395aa7a11e44cbb7e502a54cc | 6,922 | py | Python | src/healthcareapis/azext_healthcareapis/custom.py | dijyotir/azure-cli-extensions | db626a9d53f7a3a683d9629cbd3d86fdcce98118 | [
"MIT"
] | 1 | 2021-09-16T09:13:38.000Z | 2021-09-16T09:13:38.000Z | src/healthcareapis/azext_healthcareapis/custom.py | dijyotir/azure-cli-extensions | db626a9d53f7a3a683d9629cbd3d86fdcce98118 | [
"MIT"
] | null | null | null | src/healthcareapis/azext_healthcareapis/custom.py | dijyotir/azure-cli-extensions | db626a9d53f7a3a683d9629cbd3d86fdcce98118 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 56.276423 | 134 | 0.651401 |
def create_healthcareapis(cmd, client,
resource_group,
name,
kind,
location,
access_policies_object_id,
tags=None,
etag=None,
... | true | true |
1c2d348864a628a2ff495a5fdc2d7ebec058f190 | 122 | py | Python | plenum/test/primary_selection/test_primary_selection_routes.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | plenum/test/primary_selection/test_primary_selection_routes.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | plenum/test/primary_selection/test_primary_selection_routes.py | steptan/indy-plenum | 488bf63c82753a74a92ac6952da784825ffd4a3d | [
"Apache-2.0"
] | null | null | null | from plenum.test.conftest import looper
nodeCount = 7
def test_routes(nodeSet, up):
# TODO: Low priority.
pass
| 13.555556 | 39 | 0.704918 | from plenum.test.conftest import looper
nodeCount = 7
def test_routes(nodeSet, up):
pass
| true | true |
1c2d34d62c53dc9486da792127a3f5778a42701f | 3,092 | py | Python | cwharaj/cwharaj/spiders/_mstaml_debug_spider.py | trujunzhang/djzhang-targets | c2e327acde9d51f0455e7243f17d93d74b579501 | [
"MIT"
] | 2 | 2018-12-03T16:30:55.000Z | 2019-04-03T13:29:20.000Z | cwharaj/cwharaj/spiders/_mstaml_debug_spider.py | trujunzhang/djzhang-targets | c2e327acde9d51f0455e7243f17d93d74b579501 | [
"MIT"
] | null | null | null | cwharaj/cwharaj/spiders/_mstaml_debug_spider.py | trujunzhang/djzhang-targets | c2e327acde9d51f0455e7243f17d93d74b579501 | [
"MIT"
] | 1 | 2019-04-03T13:29:25.000Z | 2019-04-03T13:29:25.000Z | # -*- coding: utf-8 -*-
import scrapy
from cwharaj.scraped_websites import WebsiteTypes, websites_allowed_domains, is_pagination
class MstamlDebugWatchSpider(scrapy.Spider):
url_from = WebsiteTypes.mstaml
name = "{}_debug".format(url_from.value)
details_urls = [
# Details
# 'http://www.m... | 48.3125 | 105 | 0.559832 |
import scrapy
from cwharaj.scraped_websites import WebsiteTypes, websites_allowed_domains, is_pagination
class MstamlDebugWatchSpider(scrapy.Spider):
url_from = WebsiteTypes.mstaml
name = "{}_debug".format(url_from.value)
details_urls = [
... | true | true |
1c2d353839d357fc3f304e21e3a23bc1936234b5 | 30,587 | py | Python | bg/graphviz.py | sergey-aganezov-jr/bg | 1ec758193441e49e7b34e0da09571480f4c24455 | [
"MIT"
] | 2 | 2020-01-29T14:26:18.000Z | 2020-09-08T05:37:15.000Z | bg/graphviz.py | sergey-aganezov-jr/bg | 1ec758193441e49e7b34e0da09571480f4c24455 | [
"MIT"
] | 3 | 2015-12-25T17:36:50.000Z | 2017-11-23T17:06:09.000Z | bg/graphviz.py | sergey-aganezov-jr/bg | 1ec758193441e49e7b34e0da09571480f4c24455 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from collections import defaultdict
from collections import deque
from enum import Enum
from ete3 import TreeNode
from bg.edge import BGEdge
from bg.genome import BGGenome
from bg.multicolor import Multicolor
from bg.utils import get_from_dict_with_path
from bg.vertices import BGVertex, Infini... | 46.984639 | 157 | 0.679635 |
from collections import defaultdict
from collections import deque
from enum import Enum
from ete3 import TreeNode
from bg.edge import BGEdge
from bg.genome import BGGenome
from bg.multicolor import Multicolor
from bg.utils import get_from_dict_with_path
from bg.vertices import BGVertex, InfinityVertex, TaggedInfinit... | true | true |
1c2d353a656cee00eaf8f5db2afb2488b261dd8c | 685 | py | Python | app/middlewares.py | wasp/waspy-example | 98f25b68808925ef5ae14b68670650eeb61f47eb | [
"Apache-2.0"
] | null | null | null | app/middlewares.py | wasp/waspy-example | 98f25b68808925ef5ae14b68670650eeb61f47eb | [
"Apache-2.0"
] | null | null | null | app/middlewares.py | wasp/waspy-example | 98f25b68808925ef5ae14b68670650eeb61f47eb | [
"Apache-2.0"
] | 1 | 2018-03-19T22:00:12.000Z | 2018-03-19T22:00:12.000Z |
async def attach_object(app, handler):
""" This middleware shows an example of adding something
to the request object """
async def middleware(request):
request.some_object = object()
return await handler(request)
return middleware
async def add_header(app, handler):
""" This mid... | 32.619048 | 70 | 0.683212 |
async def attach_object(app, handler):
async def middleware(request):
request.some_object = object()
return await handler(request)
return middleware
async def add_header(app, handler):
async def middleware(request):
response = await handler(request)
if response.headers.ge... | true | true |
1c2d3572b7617a11b0cd4abb4a1e94698e519aaa | 375 | py | Python | configs/_base_/schedules/schedule_1k.py | AnonSubmission6150/submission6150 | 571633d9a12b4fd7a9546947787fc068966dab04 | [
"Apache-2.0"
] | null | null | null | configs/_base_/schedules/schedule_1k.py | AnonSubmission6150/submission6150 | 571633d9a12b4fd7a9546947787fc068966dab04 | [
"Apache-2.0"
] | null | null | null | configs/_base_/schedules/schedule_1k.py | AnonSubmission6150/submission6150 | 571633d9a12b4fd7a9546947787fc068966dab04 | [
"Apache-2.0"
] | null | null | null | # optimizer
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
optimizer_config = dict()
# learning policy
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
# runtime settings
runner = dict(type='IterBasedRunner', max_iters=2000)
checkpoint_config = dict(by_epoch=False, inter... | 41.666667 | 72 | 0.757333 |
optimizer = dict(type='SGD', lr=0.01, momentum=0.9, weight_decay=0.0005)
optimizer_config = dict()
lr_config = dict(policy='poly', power=0.9, min_lr=1e-4, by_epoch=False)
runner = dict(type='IterBasedRunner', max_iters=2000)
checkpoint_config = dict(by_epoch=False, interval=200)
evaluation = dict(interval=200, metri... | true | true |
1c2d35ec21d0c5f7564e7e31974aa32de2b16ac0 | 362 | py | Python | review/urls.py | jamilnoyda/login-sign-in-logout-changepassword-in-django | d8cbbe1d7cbab0607e5ca737728a5f4627c49c07 | [
"MIT"
] | null | null | null | review/urls.py | jamilnoyda/login-sign-in-logout-changepassword-in-django | d8cbbe1d7cbab0607e5ca737728a5f4627c49c07 | [
"MIT"
] | null | null | null | review/urls.py | jamilnoyda/login-sign-in-logout-changepassword-in-django | d8cbbe1d7cbab0607e5ca737728a5f4627c49c07 | [
"MIT"
] | null | null | null | from django.conf.urls import url,include
from . import *
from . import views
from django.views.generic.base import TemplateView
app_name='review'
urlpatterns = [
url(r'^signup/', views.SignUp.as_view(), name='signup'),
url(r'^customerlist/', views.CustomerListView.as_view(), name='list'),
#url(r'^hom... | 18.1 | 74 | 0.668508 | from django.conf.urls import url,include
from . import *
from . import views
from django.views.generic.base import TemplateView
app_name='review'
urlpatterns = [
url(r'^signup/', views.SignUp.as_view(), name='signup'),
url(r'^customerlist/', views.CustomerListView.as_view(), name='list'),
... | true | true |
1c2d360757f9b6fad75aee38c6ffc1f0a4c4c337 | 399 | py | Python | Assignment-3/gcdLcm.py | HembramBeta777/Python-Programming | 827611b0613d9d953d13fb04ea9b5c5ac3c510f2 | [
"BSD-3-Clause"
] | 2 | 2020-09-01T04:58:16.000Z | 2021-01-30T03:45:52.000Z | Assignment-3/gcdLcm.py | HembramBeta777/Python-Programming | 827611b0613d9d953d13fb04ea9b5c5ac3c510f2 | [
"BSD-3-Clause"
] | null | null | null | Assignment-3/gcdLcm.py | HembramBeta777/Python-Programming | 827611b0613d9d953d13fb04ea9b5c5ac3c510f2 | [
"BSD-3-Clause"
] | null | null | null | # To find GCD and LCM of two numbers.
num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
i=1
while( (i<=num1) and (i<=num2) ):
if( (num1%i==0) and (num2%i==0) ):
GCD = i;
i = i+1
print("The GCD of",num1,"and",num2,"is:",GCD)
lc... | 19.95 | 47 | 0.516291 |
num1 = int(input("Enter the first number: "))
num2 = int(input("Enter the second number: "))
i=1
while( (i<=num1) and (i<=num2) ):
if( (num1%i==0) and (num2%i==0) ):
GCD = i;
i = i+1
print("The GCD of",num1,"and",num2,"is:",GCD)
lcm = (num1 * num2) // GCD
print("The L... | true | true |
1c2d3746dc514c02495497b0e298410fc17f7ff9 | 1,349 | py | Python | pymager/resources/_path.py | samidalouche/pymager | 86a5f02163def40b7bbf81fd17e4c3e84bc5059c | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2015-01-20T03:24:13.000Z | 2015-01-20T03:24:13.000Z | pymager/resources/_path.py | samidalouche/pymager | 86a5f02163def40b7bbf81fd17e4c3e84bc5059c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | pymager/resources/_path.py | samidalouche/pymager | 86a5f02163def40b7bbf81fd17e4c3e84bc5059c | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """
Copyright 2010 Sami Dalouche
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 ... | 34.589744 | 86 | 0.72424 |
import os
class Path(object):
def __init__(self, reference_directory, path_elements=[]):
self.__reference_directory = reference_directory
self.__path_elements = path_elements
def parent_directory(self):
return Path(self.__reference_directory, self.__path_elements[:-1])
de... | true | true |
1c2d38ce51164a71d268b0df377e00336ed974d3 | 983 | py | Python | lib/spack/spack/analyzers/install_files.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | lib/spack/spack/analyzers/install_files.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | lib/spack/spack/analyzers/install_files.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
"""The install files json file (install_manifest.json) already exists in
the package install folder, so this analyzer simp... | 30.71875 | 79 | 0.733469 |
import os
import spack.monitor
from .analyzer_base import AnalyzerBase
class InstallFiles(AnalyzerBase):
name = "install_files"
outfile = "spack-analyzer-install-files.json"
description = "install file listing read from install_manifest.json"
def run(self):
manifest_file = os.path.j... | true | true |
1c2d3978d6b4d992081478a6033e9332b9d07db0 | 1,073 | py | Python | Luggage-Management-QR-System-master/Website/mongo_api.py | Shaunak04/S.C.A.M.S | 7f10f1c679a0b76269d0dcf05aa17cc26a268e1c | [
"Apache-2.0"
] | null | null | null | Luggage-Management-QR-System-master/Website/mongo_api.py | Shaunak04/S.C.A.M.S | 7f10f1c679a0b76269d0dcf05aa17cc26a268e1c | [
"Apache-2.0"
] | null | null | null | Luggage-Management-QR-System-master/Website/mongo_api.py | Shaunak04/S.C.A.M.S | 7f10f1c679a0b76269d0dcf05aa17cc26a268e1c | [
"Apache-2.0"
] | null | null | null | import pymongo
from bson import ObjectId
import dns
import gridfs
connection = None
database = None
QR_Gen_Accounts = None
QR_Read_Accounts = None
Flights = None
Luggage = None
Complaint = None
user_db = None
def get_obj_id(id):
return ObjectId(id)
def main():
global connection
global database
globa... | 22.829787 | 118 | 0.724138 | import pymongo
from bson import ObjectId
import dns
import gridfs
connection = None
database = None
QR_Gen_Accounts = None
QR_Read_Accounts = None
Flights = None
Luggage = None
Complaint = None
user_db = None
def get_obj_id(id):
return ObjectId(id)
def main():
global connection
global database
globa... | true | true |
1c2d3a2ae09f20773917cb473932130238c7a165 | 649 | py | Python | pil_resize_aspect_ratio/enums/fill_type.py | kkristof200/py_resize_image | 33824c691481b2166ade18e7fa6b5583ceeaa4f6 | [
"MIT"
] | null | null | null | pil_resize_aspect_ratio/enums/fill_type.py | kkristof200/py_resize_image | 33824c691481b2166ade18e7fa6b5583ceeaa4f6 | [
"MIT"
] | null | null | null | pil_resize_aspect_ratio/enums/fill_type.py | kkristof200/py_resize_image | 33824c691481b2166ade18e7fa6b5583ceeaa4f6 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------- Imports ---------------------------------------------------------------- #
# System
from enum import Enum
# ---------------------------------------------------------------------------------------------------------------------------------------- #
# ... | 40.5625 | 140 | 0.107858 |
from enum import Enum
class FillType(Enum):
Fill = 0
Fit = 1
| true | true |
1c2d3a915d317a05969c55ff714a638a4a1dca31 | 7,338 | py | Python | Modules/Gekokujo_vanilla_enhanced/Code/Module_system/ID_parties.py | roalyr/gekokujo_vanilla_enhanced | 84d8cc1033be98357ac139fafbc1c10851274019 | [
"MIT"
] | null | null | null | Modules/Gekokujo_vanilla_enhanced/Code/Module_system/ID_parties.py | roalyr/gekokujo_vanilla_enhanced | 84d8cc1033be98357ac139fafbc1c10851274019 | [
"MIT"
] | null | null | null | Modules/Gekokujo_vanilla_enhanced/Code/Module_system/ID_parties.py | roalyr/gekokujo_vanilla_enhanced | 84d8cc1033be98357ac139fafbc1c10851274019 | [
"MIT"
] | null | null | null | p_main_party = 0
p_temp_party = 1
p_camp_bandits = 2
p_temp_party_2 = 3
p_temp_casualties = 4
p_temp_casualties_2 = 5
p_temp_casualties_3 = 6
p_temp_wounded = 7
p_temp_killed = 8
p_main_party_backup = 9
p_encountered_party_backup = 10
p_collective_friends_backup = 11
p_player_casualties = 12
p_enemy_casual... | 19.832432 | 36 | 0.748569 | p_main_party = 0
p_temp_party = 1
p_camp_bandits = 2
p_temp_party_2 = 3
p_temp_casualties = 4
p_temp_casualties_2 = 5
p_temp_casualties_3 = 6
p_temp_wounded = 7
p_temp_killed = 8
p_main_party_backup = 9
p_encountered_party_backup = 10
p_collective_friends_backup = 11
p_player_casualties = 12
p_enemy_casual... | true | true |
1c2d3aced5ecffbaf0cfc56972803dc0a6b35f06 | 2,585 | py | Python | check_nifi_java_gc.py | adolci/nagios-plugins | 0d8cee0376467922b3315e9b0e08b98454eb9853 | [
"IBM-pibs",
"Apache-1.1"
] | null | null | null | check_nifi_java_gc.py | adolci/nagios-plugins | 0d8cee0376467922b3315e9b0e08b98454eb9853 | [
"IBM-pibs",
"Apache-1.1"
] | null | null | null | check_nifi_java_gc.py | adolci/nagios-plugins | 0d8cee0376467922b3315e9b0e08b98454eb9853 | [
"IBM-pibs",
"Apache-1.1"
] | 3 | 2019-07-25T11:46:32.000Z | 2019-12-17T05:01:03.000Z | #!/usr/bin/env python
# coding=utf-8
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2018-08-15 23:18:55 +0100 (Wed, 15 Aug 2018)
#
# https://github.com/harisekhon/nagios-plugins
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on Linke... | 29.375 | 96 | 0.688975 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import sys
import traceback
srcdir = os.path.abspath(os.path.dirname(__file__))
libdir = os.path.join(srcdir, 'pylib')
sys.path.append(libdir)... | true | true |
1c2d3c06541d8d9d49bb74af0946d1aa1c05a633 | 118 | py | Python | jr_tools/exceptions.py | erickgnavar/jr_tools | 46719b5708446ab19139fd5ac29d5bf51cf896b8 | [
"MIT"
] | 1 | 2017-11-02T01:39:11.000Z | 2017-11-02T01:39:11.000Z | jr_tools/exceptions.py | erickgnavar/jasper-reports-tools | 46719b5708446ab19139fd5ac29d5bf51cf896b8 | [
"MIT"
] | 1 | 2021-11-15T17:46:27.000Z | 2021-11-15T17:46:27.000Z | jr_tools/exceptions.py | erickgnavar/jr_tools | 46719b5708446ab19139fd5ac29d5bf51cf896b8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class ConnectionError(Exception):
pass
class InvalidOutputFormat(Exception):
pass
| 11.8 | 37 | 0.677966 |
class ConnectionError(Exception):
pass
class InvalidOutputFormat(Exception):
pass
| true | true |
1c2d3fd9537edf88a43260b481f18923fcf5e997 | 13,165 | py | Python | nipyapi/nifi/models/variable_registry_update_request_dto.py | esecules/nipyapi | e8a53b79a5e1a6b29446f43d2b23b6a3e60873f1 | [
"Apache-2.0"
] | null | null | null | nipyapi/nifi/models/variable_registry_update_request_dto.py | esecules/nipyapi | e8a53b79a5e1a6b29446f43d2b23b6a3e60873f1 | [
"Apache-2.0"
] | null | null | null | nipyapi/nifi/models/variable_registry_update_request_dto.py | esecules/nipyapi | e8a53b79a5e1a6b29446f43d2b23b6a3e60873f1 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
NiFi Rest Api
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... | 32.426108 | 479 | 0.638055 |
from pprint import pformat
from six import iteritems
import re
class VariableRegistryUpdateRequestDTO(object):
swagger_types = {
'request_id': 'str',
'uri': 'str',
'submission_time': 'datetime',
'last_updated': 'datetime',
'complete': 'bool',
'failure_reason':... | true | true |
1c2d409204403961a0d30302df49fce90c8889f3 | 5,683 | py | Python | EquationModels/BurgerEquationRar.py | mroberto166/PinnsSub | 338c5400080ba570fd8f53d7481539225fcf4d17 | [
"MIT"
] | 12 | 2020-12-02T13:04:55.000Z | 2022-01-07T21:48:30.000Z | EquationModels/BurgerEquationRar.py | mroberto166/PinnsSub | 338c5400080ba570fd8f53d7481539225fcf4d17 | [
"MIT"
] | null | null | null | EquationModels/BurgerEquationRar.py | mroberto166/PinnsSub | 338c5400080ba570fd8f53d7481539225fcf4d17 | [
"MIT"
] | 7 | 2020-12-02T13:04:57.000Z | 2021-12-28T14:28:19.000Z | from ImportFile import *
# n_coll = 8192
# n_u = 1024
# n_int = 0
pi = math.pi
v = 0.0 / pi
extrema_values = torch.tensor([[0, 0.5],
[-1, 1]])
def compute_res(network, x_f_train, space_dimensions, solid_object, computing_error):
x_f_train.requires_grad = True
u = network(x_f_t... | 35.968354 | 180 | 0.609537 | from ImportFile import *
pi = math.pi
v = 0.0 / pi
extrema_values = torch.tensor([[0, 0.5],
[-1, 1]])
def compute_res(network, x_f_train, space_dimensions, solid_object, computing_error):
x_f_train.requires_grad = True
u = network(x_f_train).reshape(-1, )
inputs = torch... | true | true |
1c2d40deae9c4867f2393d509669e5420a25eca0 | 410 | py | Python | pip-script.py | prudhvipaluvayi/user-register | 2460096043723d3c7a009319ecc6c756794cc8a4 | [
"BSD-3-Clause"
] | null | null | null | pip-script.py | prudhvipaluvayi/user-register | 2460096043723d3c7a009319ecc6c756794cc8a4 | [
"BSD-3-Clause"
] | null | null | null | pip-script.py | prudhvipaluvayi/user-register | 2460096043723d3c7a009319ecc6c756794cc8a4 | [
"BSD-3-Clause"
] | null | null | null | #!C:\Users\sys\registration\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip'
__requires__ = 'pip==10.0.1'
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])
... | 31.538462 | 70 | 0.641463 |
__requires__ = 'pip==10.0.1'
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('pip==10.0.1', 'console_scripts', 'pip')()
)
| true | true |
1c2d41716344b0434003b76094b8ad45ad1d49fb | 3,406 | py | Python | besspin/cwesEvaluation/resourceManagement/customCweScores/helpers.py | CTSRD-CHERI/BESSPIN-Tool-Suite | 26c0e7ce8cf6ffa6e33ea4ff9aa6194892ef6474 | [
"Apache-2.0"
] | null | null | null | besspin/cwesEvaluation/resourceManagement/customCweScores/helpers.py | CTSRD-CHERI/BESSPIN-Tool-Suite | 26c0e7ce8cf6ffa6e33ea4ff9aa6194892ef6474 | [
"Apache-2.0"
] | null | null | null | besspin/cwesEvaluation/resourceManagement/customCweScores/helpers.py | CTSRD-CHERI/BESSPIN-Tool-Suite | 26c0e7ce8cf6ffa6e33ea4ff9aa6194892ef6474 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
""" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
helpers functions for scoring the CWE tests
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # """
import re
from besspin.base.utils.misc import *
from besspin.cwesEvaluation.scoreTests import SCORE... | 38.704545 | 112 | 0.586025 |
import re
from besspin.base.utils.misc import *
from besspin.cwesEvaluation.scoreTests import SCORES, adjustToCustomScore
def getOsImage (lines,testNum=None):
warnText = "" if (testNum is None) else " in test_{0}.log".format(testNum)
for line in lines:
lineMatch = re.match(r'^<OSIMAGE=(?P<osImage>\w... | true | true |
1c2d41c1ae9ef43b0330b91a6179f977d991f8fd | 181 | py | Python | blender_f3b/Logger.py | riccardobl/f3b | 87a79e047e3754b81c3290a5b4849ec21bbfa363 | [
"BSD-3-Clause"
] | 3 | 2020-10-12T03:15:06.000Z | 2020-11-27T16:01:23.000Z | blender_f3b/Logger.py | riccardobl/f3b | 87a79e047e3754b81c3290a5b4849ec21bbfa363 | [
"BSD-3-Clause"
] | null | null | null | blender_f3b/Logger.py | riccardobl/f3b | 87a79e047e3754b81c3290a5b4849ec21bbfa363 | [
"BSD-3-Clause"
] | null | null | null | def info( txt):
print("INFO: " + txt)
def warning( txt):
print("WARNING: " + txt)
def error( txt):
print("ERROR: " + txt)
def debug( txt):
print("DEBUG: " + txt) | 15.083333 | 28 | 0.541436 | def info( txt):
print("INFO: " + txt)
def warning( txt):
print("WARNING: " + txt)
def error( txt):
print("ERROR: " + txt)
def debug( txt):
print("DEBUG: " + txt) | true | true |
1c2d423828e8ffc7f33b8112b54d90c1438bfbec | 1,680 | py | Python | tkinter/__canvas__/canvas-bubbles/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | tkinter/__canvas__/canvas-bubbles/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | tkinter/__canvas__/canvas-bubbles/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z | import tkinter as tk
import random
class Bubble():
def __init__(self, canvas, x, y, size, color='red', start_offset_y=0):
self.canvas = canvas
self.x = x
self.y = y + start_offset_y
self.start_x = x
self.start_y = y
self.size = size
... | 23.661972 | 99 | 0.564881 | import tkinter as tk
import random
class Bubble():
def __init__(self, canvas, x, y, size, color='red', start_offset_y=0):
self.canvas = canvas
self.x = x
self.y = y + start_offset_y
self.start_x = x
self.start_y = y
self.size = size
... | true | true |
1c2d43cd92bb7e556034be28f68e1600460f258f | 441 | py | Python | data/scripts/templates/object/mobile/skeleton/shared_astromech.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/mobile/skeleton/shared_astromech.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/mobile/skeleton/shared_astromech.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/skeleton/shared_astromech.iff"
result.attribute_template_id = 9
resu... | 25.941176 | 64 | 0.725624 | true | true | |
1c2d43d9981510e3c8607abd268d861aeaaffa26 | 2,810 | py | Python | experiments/experiment_osp.py | Weilando/bachelor_playground | e1455029384f05a48ea5d792f76aa5d232fc1ddc | [
"Apache-2.0"
] | 1 | 2020-11-09T12:00:59.000Z | 2020-11-09T12:00:59.000Z | experiments/experiment_osp.py | Weilando/bachelor_playground | e1455029384f05a48ea5d792f76aa5d232fc1ddc | [
"Apache-2.0"
] | null | null | null | experiments/experiment_osp.py | Weilando/bachelor_playground | e1455029384f05a48ea5d792f76aa5d232fc1ddc | [
"Apache-2.0"
] | null | null | null | import time
from data.plotter_evaluation import format_time
from experiments.experiment_pruning import ExperimentPruning
from training.logger import log_from_medium
def mimic_next_prune_rate(curr_prune_rate, prune_rate_specs):
""" Mimic the next pruning-rate from the current pruning-rate and the rate from specs.... | 49.298246 | 118 | 0.640569 | import time
from data.plotter_evaluation import format_time
from experiments.experiment_pruning import ExperimentPruning
from training.logger import log_from_medium
def mimic_next_prune_rate(curr_prune_rate, prune_rate_specs):
return curr_prune_rate + (1 - curr_prune_rate) * prune_rate_specs
class ExperimentOS... | true | true |
1c2d44e00de29baa2689ef37a37ade0f8bcb32b2 | 1,821 | py | Python | target/classes/META-INF/resources/scripts/viewer/X/lib/selenium/selenium/webdriver/support/abstract_event_listener.py | chocobearz/xnat-image-viewer-plugin | 99b0aa2fd04e0390a3df920fa1c8b5569cdeb5ec | [
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | target/classes/META-INF/resources/scripts/viewer/X/lib/selenium/selenium/webdriver/support/abstract_event_listener.py | chocobearz/xnat-image-viewer-plugin | 99b0aa2fd04e0390a3df920fa1c8b5569cdeb5ec | [
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | target/classes/META-INF/resources/scripts/viewer/X/lib/selenium/selenium/webdriver/support/abstract_event_listener.py | chocobearz/xnat-image-viewer-plugin | 99b0aa2fd04e0390a3df920fa1c8b5569cdeb5ec | [
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/python
#
# Copyright 2011 Software Freedom Conservancy.
#
# 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 ap... | 30.35 | 74 | 0.686985 |
class AbstractEventListener(object):
def before_navigate_to(self, url, driver): pass
def after_navigate_to(self, url, driver): pass
def before_navigate_back(self, driver): pass
def after_navigate_back(self, driver): pass
def before_navigate_forwa... | true | true |
1c2d4689af2e5bc73f7c8f72466004ca1d1424f4 | 1,781 | py | Python | tests/test_schematics_converters_discriminated_model.py | iterait/apistrap | e83460fa97f13a95a928971b0d2defe0ac611911 | [
"MIT"
] | 6 | 2018-09-06T18:32:48.000Z | 2021-05-28T01:03:32.000Z | tests/test_schematics_converters_discriminated_model.py | iterait/apistrap | e83460fa97f13a95a928971b0d2defe0ac611911 | [
"MIT"
] | 53 | 2018-09-06T16:16:53.000Z | 2021-05-19T14:36:58.000Z | tests/test_schematics_converters_discriminated_model.py | iterait/apistrap | e83460fa97f13a95a928971b0d2defe0ac611911 | [
"MIT"
] | null | null | null | import pytest
from schematics import Model
from schematics.types import FloatType, StringType, UnionType
from apistrap.flask import FlaskApistrap
from apistrap.schematics_converters import schematics_model_to_schema_object
from apistrap.types import DiscriminatedModelType
@pytest.fixture(scope="function")
def apistr... | 31.803571 | 105 | 0.705222 | import pytest
from schematics import Model
from schematics.types import FloatType, StringType, UnionType
from apistrap.flask import FlaskApistrap
from apistrap.schematics_converters import schematics_model_to_schema_object
from apistrap.types import DiscriminatedModelType
@pytest.fixture(scope="function")
def apistr... | true | true |
1c2d46b3128160103dd0892ca055304a1dbd98eb | 11,858 | py | Python | Gui_qt/mainwindow.py | 2rintf/noob-face-comparison | 000413f1a3cd837960196f7069a894bd272aa14b | [
"MIT"
] | null | null | null | Gui_qt/mainwindow.py | 2rintf/noob-face-comparison | 000413f1a3cd837960196f7069a894bd272aa14b | [
"MIT"
] | null | null | null | Gui_qt/mainwindow.py | 2rintf/noob-face-comparison | 000413f1a3cd837960196f7069a894bd272aa14b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created by: PyQt5 UI code generator 5.14.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
Mai... | 51.112069 | 108 | 0.705262 |
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1200, 657)
self.centralWidget = QtWidgets.QWidget(MainWindow)
self.centralWidget.setObjectName("centralWidget")
... | true | true |
1c2d47cf4218a38866687d183e6810ef6e53819e | 14,235 | py | Python | playground/position-sizing/balancer-and-plot/strategies/emacounter/__init__.py | ysdede/jesse_strategies | ade9f4ba42cec11207c766d267b9d8feb8bce648 | [
"CC0-1.0"
] | 38 | 2021-09-18T15:33:28.000Z | 2022-02-21T17:29:08.000Z | playground/position-sizing/balancer-and-plot/strategies/emacounter/__init__.py | ysdede/jesse_strategies | ade9f4ba42cec11207c766d267b9d8feb8bce648 | [
"CC0-1.0"
] | 4 | 2022-01-02T14:46:12.000Z | 2022-02-16T18:39:41.000Z | playground/position-sizing/balancer-and-plot/strategies/emacounter/__init__.py | ysdede/jesse_strategies | ade9f4ba42cec11207c766d267b9d8feb8bce648 | [
"CC0-1.0"
] | 11 | 2021-10-19T06:21:43.000Z | 2022-02-21T17:29:10.000Z | import jesse.helpers as jh
import jesse.indicators as ta
from jesse import utils
from jesse.services.selectors import get_all_trading_routes
from jesse.strategies import Strategy, cached
class emacounter(Strategy):
def __init__(self):
super().__init__()
self.losecount = 0
self.wincount = ... | 41.26087 | 141 | 0.559185 | import jesse.helpers as jh
import jesse.indicators as ta
from jesse import utils
from jesse.services.selectors import get_all_trading_routes
from jesse.strategies import Strategy, cached
class emacounter(Strategy):
def __init__(self):
super().__init__()
self.losecount = 0
self.wincount = ... | true | true |
1c2d482eb71e3a0e323f3d5430c5cd8c7e0544cb | 5,308 | py | Python | doc/scripts/docgen.py | oplatek/Theano | 09605e7cae876e15c5502c4edaba6a9644c50c11 | [
"BSD-3-Clause"
] | null | null | null | doc/scripts/docgen.py | oplatek/Theano | 09605e7cae876e15c5502c4edaba6a9644c50c11 | [
"BSD-3-Clause"
] | null | null | null | doc/scripts/docgen.py | oplatek/Theano | 09605e7cae876e15c5502c4edaba6a9644c50c11 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import sys
import os
import shutil
import inspect
from epydoc import docintrospecter
from epydoc.apidoc import RoutineDoc
def Op_to_RoutineDoc(op, routine_doc, module_name=None):
routine_doc.specialize_to(RoutineDoc)
#NB: this code is lifted from epydoc/docintrospecter... | 32.765432 | 79 | 0.586473 | from __future__ import print_function
import sys
import os
import shutil
import inspect
from epydoc import docintrospecter
from epydoc.apidoc import RoutineDoc
def Op_to_RoutineDoc(op, routine_doc, module_name=None):
routine_doc.specialize_to(RoutineDoc)
assert hasattr(op, 'perform')
r... | true | true |
1c2d491ba44c6f8c9d5e1f7ca72bfa5aabb3751e | 487 | py | Python | kakunin.py | cabbagerice/word-chain | 5d2978df61a7136f502b1b601213e97454103e1e | [
"BSD-2-Clause"
] | null | null | null | kakunin.py | cabbagerice/word-chain | 5d2978df61a7136f502b1b601213e97454103e1e | [
"BSD-2-Clause"
] | 6 | 2019-07-28T20:34:58.000Z | 2021-05-10T06:53:05.000Z | kakunin.py | cabbagerice/word-chain | 5d2978df61a7136f502b1b601213e97454103e1e | [
"BSD-2-Clause"
] | null | null | null | import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
from numpy import random as unko
import math
#認証ファイルPATH
certificate_json_path='secret.json'
#DBとアプリへの認証
if (not len(firebase_admin._apps)):
cred = credentials.Certificate(certificate_json_path)
default_app = firebase_admin.... | 30.4375 | 82 | 0.788501 | import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
from numpy import random as unko
import math
certificate_json_path='secret.json'
if (not len(firebase_admin._apps)):
cred = credentials.Certificate(certificate_json_path)
default_app = firebase_admin.initialize_app(cred, {... | true | true |
1c2d4973b6be2f4d7e183113ece566f002b580c9 | 117,653 | py | Python | zerver/tests/test_message_edit.py | mathewstars/zulip | da269302e2f334a71a4b43f0c9e5e504f856382f | [
"Apache-2.0"
] | 1 | 2022-01-23T14:59:32.000Z | 2022-01-23T14:59:32.000Z | zerver/tests/test_message_edit.py | mathewstars/zulip | da269302e2f334a71a4b43f0c9e5e504f856382f | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_message_edit.py | mathewstars/zulip | da269302e2f334a71a4b43f0c9e5e504f856382f | [
"Apache-2.0"
] | null | null | null | import datetime
from operator import itemgetter
from typing import Any, Dict, List, Optional, Tuple, Union
from unittest import mock
import orjson
from django.db import IntegrityError
from django.http import HttpResponse
from django.utils.timezone import now as timezone_now
from zerver.actions.message_edit import (
... | 40.640069 | 110 | 0.617902 | import datetime
from operator import itemgetter
from typing import Any, Dict, List, Optional, Tuple, Union
from unittest import mock
import orjson
from django.db import IntegrityError
from django.http import HttpResponse
from django.utils.timezone import now as timezone_now
from zerver.actions.message_edit import (
... | true | true |
1c2d4ad2832851c2f372570d135f6d01dac4482d | 285 | py | Python | Zad_ChainOfResponsibility/Application.py | Paarzivall/Wzorce-Projektowe | aa4136f140ad02c0fc0de45709b5a01ca42b417f | [
"MIT"
] | null | null | null | Zad_ChainOfResponsibility/Application.py | Paarzivall/Wzorce-Projektowe | aa4136f140ad02c0fc0de45709b5a01ca42b417f | [
"MIT"
] | null | null | null | Zad_ChainOfResponsibility/Application.py | Paarzivall/Wzorce-Projektowe | aa4136f140ad02c0fc0de45709b5a01ca42b417f | [
"MIT"
] | null | null | null | from Handler import Handler
class Application(Handler):
def __init__(self, successor=None):
self._successor = successor
def HandleHelp(self):
self.ShowHelp()
def ShowHelp(self):
print("anApplication: Potrafie obsluzyc zadanie, wyswietlam pomoc") | 23.75 | 75 | 0.694737 | from Handler import Handler
class Application(Handler):
def __init__(self, successor=None):
self._successor = successor
def HandleHelp(self):
self.ShowHelp()
def ShowHelp(self):
print("anApplication: Potrafie obsluzyc zadanie, wyswietlam pomoc") | true | true |
1c2d4afe34500cdb857f2d349ee215e5b65d61c3 | 1,870 | py | Python | python/src/nnabla/backward_function/global_average_pooling.py | daniel-falk/nnabla | 3fe132ea52dc10521cc029a5d6ba8f565cf65ccf | [
"Apache-2.0"
] | 2,792 | 2017-06-26T13:05:44.000Z | 2022-03-28T07:55:26.000Z | python/src/nnabla/backward_function/global_average_pooling.py | daniel-falk/nnabla | 3fe132ea52dc10521cc029a5d6ba8f565cf65ccf | [
"Apache-2.0"
] | 138 | 2017-06-27T07:04:44.000Z | 2022-02-28T01:37:15.000Z | python/src/nnabla/backward_function/global_average_pooling.py | daniel-falk/nnabla | 3fe132ea52dc10521cc029a5d6ba8f565cf65ccf | [
"Apache-2.0"
] | 380 | 2017-06-26T13:23:52.000Z | 2022-03-25T16:51:30.000Z | # Copyright 2019,2020,2021 Sony Corporation.
#
# 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... | 31.166667 | 86 | 0.730481 |
import nnabla as nn
import nnabla.function as _F
import nnabla.functions as F
from .backward_function import UnaryDataGrad
class GlobalAveragePoolingDataGrad(UnaryDataGrad):
def __init__(self, ctx):
super(GlobalAveragePoolingDataGrad, self).__init__(ctx)
self._func = _F.GlobalAver... | true | true |
1c2d4bb203154168c741a10cbee8e7df483c0846 | 1,315 | py | Python | sdk/python/pulumi_kubernetes/core/v1/PodTemplateList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/core/v1/PodTemplateList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_kubernetes/core/v1/PodTemplateList.py | rosskevin/pulumi-kubernetes | e4fa04b13a20929c879aca1bbe58fb5a95d16f7c | [
"Apache-2.0"
] | null | null | null | import pulumi
import pulumi.runtime
from ... import tables
class PodTemplateList(pulumi.CustomResource):
"""
PodTemplateList is a list of PodTemplates.
"""
def __init__(self, __name__, __opts__=None, items=None, metadata=None):
if not __name__:
raise TypeError('Missing resource nam... | 34.605263 | 89 | 0.656274 | import pulumi
import pulumi.runtime
from ... import tables
class PodTemplateList(pulumi.CustomResource):
def __init__(self, __name__, __opts__=None, items=None, metadata=None):
if not __name__:
raise TypeError('Missing resource name argument (for URN creation)')
if not isinstance(__nam... | true | true |
1c2d4bbb9696658238315a913f60295083292da6 | 2,835 | py | Python | tests/test_serialized_schema.py | TheBigSasha/OpenTimelineIO | 0d857086cbb4fc39c1303947c61318aa6e523ea5 | [
"Apache-2.0"
] | 5 | 2018-07-27T03:52:26.000Z | 2021-04-02T04:10:15.000Z | tests/test_serialized_schema.py | TheBigSasha/OpenTimelineIO | 0d857086cbb4fc39c1303947c61318aa6e523ea5 | [
"Apache-2.0"
] | 1 | 2019-06-20T04:02:54.000Z | 2019-06-20T04:02:54.000Z | tests/test_serialized_schema.py | TheBigSasha/OpenTimelineIO | 0d857086cbb4fc39c1303947c61318aa6e523ea5 | [
"Apache-2.0"
] | 1 | 2019-11-15T21:20:24.000Z | 2019-11-15T21:20:24.000Z | #
# Copyright Contributors to the OpenTimelineIO project
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and rep... | 36.346154 | 81 | 0.687478 |
import unittest
import os
from opentimelineio.console import (
autogen_serialized_datamodel as asd,
autogen_plugin_documentation as apd,
)
class SerializedSchemaTester(unittest.TestCase):
def test_serialized_schema(self):
pt = os.path.dirname(os.path.dirname(__file__))
... | true | true |
1c2d4be972df48e5af1c18035a305472b31301cf | 1,044 | py | Python | kubernetes/test/test_extensions_v1beta1_scale_spec.py | Prahladk09/python-1 | 2dfb3035535e4be52ba549f1ff47acbe573b73f6 | [
"Apache-2.0"
] | 1 | 2020-04-13T09:54:21.000Z | 2020-04-13T09:54:21.000Z | kubernetes/test/test_extensions_v1beta1_scale_spec.py | Prahladk09/python-1 | 2dfb3035535e4be52ba549f1ff47acbe573b73f6 | [
"Apache-2.0"
] | 1 | 2019-08-15T14:27:17.000Z | 2019-08-15T14:28:07.000Z | kubernetes/test/test_extensions_v1beta1_scale_spec.py | Prahladk09/python-1 | 2dfb3035535e4be52ba549f1ff47acbe573b73f6 | [
"Apache-2.0"
] | 2 | 2020-08-05T03:06:48.000Z | 2020-08-05T16:08:21.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.14.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 23.2 | 105 | 0.731801 |
from __future__ import absolute_import
import os
import sys
import unittest
import kubernetes.client
from kubernetes.client.rest import ApiException
from kubernetes.client.models.extensions_v1beta1_scale_spec import ExtensionsV1beta1ScaleSpec
class TestExtensionsV1beta1ScaleSpec(unittest.TestCase):
def set... | true | true |
1c2d4c95596e5691e3248bce1aafe05d87bda59a | 646 | py | Python | integration_tests/emukit/bayesian_optimization/test_single_objective_bayesian_optimization.py | alexgessner/emukit | 355e26bb30edd772a81af2a1267c569d7f446d42 | [
"Apache-2.0"
] | 1 | 2019-07-02T15:37:47.000Z | 2019-07-02T15:37:47.000Z | integration_tests/emukit/bayesian_optimization/test_single_objective_bayesian_optimization.py | Tony-Chiong/emukit | a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a | [
"Apache-2.0"
] | null | null | null | integration_tests/emukit/bayesian_optimization/test_single_objective_bayesian_optimization.py | Tony-Chiong/emukit | a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a | [
"Apache-2.0"
] | 1 | 2020-01-12T19:50:44.000Z | 2020-01-12T19:50:44.000Z | import numpy as np
from emukit.core.continuous_parameter import ContinuousParameter
from emukit.examples.gp_bayesian_optimization.single_objective_bayesian_optimization import GPBayesianOptimization
def f(x):
return x**2
def test_loop():
n_iterations = 5
x_init = np.random.rand(5, 1)
y_init = np.r... | 28.086957 | 114 | 0.733746 | import numpy as np
from emukit.core.continuous_parameter import ContinuousParameter
from emukit.examples.gp_bayesian_optimization.single_objective_bayesian_optimization import GPBayesianOptimization
def f(x):
return x**2
def test_loop():
n_iterations = 5
x_init = np.random.rand(5, 1)
y_init = np.r... | true | true |
1c2d4cdd0cc7aa83fa162d48e7f635a182fda07e | 6,917 | py | Python | yolo2/models/layers.py | weihao94/keras-YOLOv3-model-set | 7b54809d5f5513a41a191289625612d71056e3ec | [
"MIT"
] | null | null | null | yolo2/models/layers.py | weihao94/keras-YOLOv3-model-set | 7b54809d5f5513a41a191289625612d71056e3ec | [
"MIT"
] | null | null | null | yolo2/models/layers.py | weihao94/keras-YOLOv3-model-set | 7b54809d5f5513a41a191289625612d71056e3ec | [
"MIT"
] | 2 | 2020-10-29T19:04:12.000Z | 2021-01-26T10:10:14.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Common layer definition for YOLOv2 models building
"""
from functools import wraps, reduce, partial
import tensorflow.keras.backend as K
from tensorflow.keras.layers import Conv2D, DepthwiseConv2D, MaxPooling2D, Concatenate, Lambda
from tensorflow.keras.layers import ... | 41.668675 | 115 | 0.714038 |
from functools import wraps, reduce, partial
import tensorflow.keras.backend as K
from tensorflow.keras.layers import Conv2D, DepthwiseConv2D, MaxPooling2D, Concatenate, Lambda
from tensorflow.keras.layers import LeakyReLU
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.regularizers impo... | true | true |
1c2d4d55b91d987a3493e6c2b7aeb2884a7eaead | 10,559 | py | Python | scripts/get_assessor_data.py | mxndrwgrdnr/evictions | bf59bfe98903c2aa839daf7597951dc36cdecaad | [
"BSD-2-Clause"
] | null | null | null | scripts/get_assessor_data.py | mxndrwgrdnr/evictions | bf59bfe98903c2aa839daf7597951dc36cdecaad | [
"BSD-2-Clause"
] | null | null | null | scripts/get_assessor_data.py | mxndrwgrdnr/evictions | bf59bfe98903c2aa839daf7597951dc36cdecaad | [
"BSD-2-Clause"
] | 1 | 2022-02-25T04:05:36.000Z | 2022-02-25T04:05:36.000Z | #######################################################
# script to compile and standardize raw assessor data #
#######################################################
import pandas as pd
from tqdm import tqdm
from geopy.geocoders import Nominatim
from geopy.extra.rate_limiter import RateLimiter
import numpy as np
im... | 58.661111 | 139 | 0.604603 | asr['PROPLOC'].str[5:9].str.lstrip('0')
asr['house_1'] = asr['house_1'].str.replace('\D', '')
asr.loc[asr['house_1'] == '', 'house_1'] = -999
asr['house_2'] = asr['house_2'].str.replace('\D', '')
asr = asr[asr['house_2'] != '']
asr = asr[~asr['PROPLOC'].str.contains('SITUS TO BE ASSIGNED')]
asr['street_name'] = asr... | true | true |
1c2d50214ff393c69f09f4c26e3e39a5615ac21d | 4,425 | py | Python | tests/data/parser_data.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 5 | 2020-03-29T01:00:30.000Z | 2022-02-06T20:00:00.000Z | tests/data/parser_data.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 12 | 2020-04-02T15:09:05.000Z | 2021-10-11T00:44:21.000Z | tests/data/parser_data.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 5 | 2020-03-25T08:33:02.000Z | 2021-05-18T08:47:41.000Z | import argparse
from rhasspyhermes.intent import Intent, Slot
from rhasspyhermes.nlu import NluIntent
rhasspy_intent = {
"request_weather_full_day": '{"entities": [{"end": 25, "entity": "when_day", "raw_end": 25, "raw_start": 20, "raw_value": "heute", '
'"start": 20, "value... | 86.764706 | 233 | 0.515254 | import argparse
from rhasspyhermes.intent import Intent, Slot
from rhasspyhermes.nlu import NluIntent
rhasspy_intent = {
"request_weather_full_day": '{"entities": [{"end": 25, "entity": "when_day", "raw_end": 25, "raw_start": 20, "raw_value": "heute", '
'"start": 20, "value... | true | true |
1c2d503b6b0ab6dedf0afdc302bf880aaefa0cf3 | 10,017 | py | Python | tests/test_model.py | nicolasramy/optimove-client | d492ddaa7b20493c1077308a2404994730f8c6cc | [
"MIT"
] | 3 | 2016-08-10T14:14:54.000Z | 2016-09-01T05:48:03.000Z | tests/test_model.py | nicolasramy/optimove-client | d492ddaa7b20493c1077308a2404994730f8c6cc | [
"MIT"
] | 6 | 2016-08-23T13:03:29.000Z | 2018-02-08T17:01:59.000Z | tests/test_model.py | nicolasramy/optimove-client | d492ddaa7b20493c1077308a2404994730f8c6cc | [
"MIT"
] | 3 | 2016-09-01T09:58:26.000Z | 2019-10-16T13:27:58.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import json
import unittest
from six.moves.urllib.parse import parse_qs, urlparse
from optimove.client import Client
from optimove.constants import DEFAULT_URL
import responses
from tests.constants import HEADERS
from tests.helpers impo... | 33.059406 | 108 | 0.578616 |
from __future__ import absolute_import, unicode_literals
import json
import unittest
from six.moves.urllib.parse import parse_qs, urlparse
from optimove.client import Client
from optimove.constants import DEFAULT_URL
import responses
from tests.constants import HEADERS
from tests.helpers import login_callback, toke... | true | true |
1c2d514493460328193b72d99aa045afae9eace2 | 1,192 | py | Python | deploy/probers/postmark_api_probe.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 60 | 2018-03-29T23:33:29.000Z | 2022-03-19T12:10:56.000Z | deploy/probers/postmark_api_probe.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 2,260 | 2018-03-02T23:14:49.000Z | 2022-03-29T20:57:21.000Z | deploy/probers/postmark_api_probe.py | d0sadata/studio | ec3b805c0b546fe8884d446152eead90bea4174d | [
"MIT"
] | 86 | 2018-03-19T21:26:35.000Z | 2022-03-28T10:09:17.000Z | #!/usr/bin/env python
import requests
from base import BaseProbe
POSTMARK_SERVICE_STATUS_URL = "https://status.postmarkapp.com/api/1.0/services"
# (See here for API details: https://status.postmarkapp.com/api)
ALL_POSSIBLE_STATUSES = ['UP', 'MAINTENANCE', 'DELAY', 'DEGRADED', 'DOWN']
PASSING_POSTMARK_STATUSES = {
... | 29.8 | 112 | 0.630872 |
import requests
from base import BaseProbe
POSTMARK_SERVICE_STATUS_URL = "https://status.postmarkapp.com/api/1.0/services"
ALL_POSSIBLE_STATUSES = ['UP', 'MAINTENANCE', 'DELAY', 'DEGRADED', 'DOWN']
PASSING_POSTMARK_STATUSES = {
'/services/smtp': ['UP', 'MAINTENANCE'],
'/services/api': ALL_POSSIBLE_STATUSES... | true | true |
1c2d51e5bab3f453fb62111623bcdc152a930b61 | 4,551 | py | Python | reference plug-in/_rsgTmp069_Form.py | GCaptainNemo/ABAQUS-FML-impact-plugin | 8f18ba231b9f64ee43c0217f1d9e488d0df9963b | [
"MIT"
] | null | null | null | reference plug-in/_rsgTmp069_Form.py | GCaptainNemo/ABAQUS-FML-impact-plugin | 8f18ba231b9f64ee43c0217f1d9e488d0df9963b | [
"MIT"
] | null | null | null | reference plug-in/_rsgTmp069_Form.py | GCaptainNemo/ABAQUS-FML-impact-plugin | 8f18ba231b9f64ee43c0217f1d9e488d0df9963b | [
"MIT"
] | null | null | null | from abaqusGui import *
from abaqusConstants import ALL
import osutils, os
###########################################################################
# Class definition
###########################################################################
class _rsgTmp069_Form(AFXForm):
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | 45.51 | 127 | 0.564052 | from abaqusGui import *
from abaqusConstants import ALL
import osutils, os
| true | true |
1c2d521f423e63631e5d234cf7221103c532ad42 | 111 | py | Python | utilities/generators/null_generator.py | gioele8/AI-soccer-highlights | 756b6b6f332cedbfbc5a3540d0c6d7aa50219e51 | [
"MIT"
] | null | null | null | utilities/generators/null_generator.py | gioele8/AI-soccer-highlights | 756b6b6f332cedbfbc5a3540d0c6d7aa50219e51 | [
"MIT"
] | null | null | null | utilities/generators/null_generator.py | gioele8/AI-soccer-highlights | 756b6b6f332cedbfbc5a3540d0c6d7aa50219e51 | [
"MIT"
] | null | null | null | class NullGenerator:
def __init__(self):
pass
def generate(self, video):
return video
| 15.857143 | 30 | 0.612613 | class NullGenerator:
def __init__(self):
pass
def generate(self, video):
return video
| true | true |
1c2d5252031ca9f832d73527b31abcd0d8f9fda6 | 28,574 | py | Python | src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 33.380841 | 165 | 0.623189 |
from azure.core.exceptions import HttpResponseError
import msrest.serialization
class ControllerDetails(msrest.serialization.Model):
_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
}
def __init__(
self,
**kwargs
):
super(ControllerDetails, self).__init_... | true | true |
1c2d528294ca63b0f78f6e625d55e5b6098b4ec2 | 5,605 | py | Python | support/closure-library/closure/bin/build/depstree.py | joe-greenawalt/skulpt | 1db078e2f6d453403287233254b012bf31960ef4 | [
"MIT"
] | 2 | 2021-01-10T16:19:38.000Z | 2021-06-14T22:09:59.000Z | support/closure-library/closure/bin/build/depstree.py | csev/skulpt | 9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f | [
"MIT"
] | null | null | null | support/closure-library/closure/bin/build/depstree.py | csev/skulpt | 9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f | [
"MIT"
] | 1 | 2015-06-28T18:58:22.000Z | 2015-06-28T18:58:22.000Z | # Copyright 2009 The Closure Library Authors. All Rights Reserved.
"""Class to represent a full Closure Library dependency tree.
Offers a queryable tree of dependencies of a given set of sources. The tree
will also do logical validation to prevent duplicate provides and circular
dependencies.
"""
class DepsTree... | 32.028571 | 80 | 0.710259 |
class DepsTree(object):
def __init__(self, sources):
self._sources = sources
self._provides_map = dict()
for source in sources:
for provide in source.provides:
if provide in self._provides_map:
raise MultipleProvideError(
provide, [self._provides_map[pr... | true | true |
1c2d5367feaf6d35c6324d2dcee1a16f4eb96b0e | 57,762 | py | Python | utils/datasets.py | Royzon/YOLOV4_MCMOT | cd4c8b1b60f9cf809579609caa29d408432845ba | [
"MIT"
] | 94 | 2020-08-10T13:37:23.000Z | 2022-03-03T10:08:53.000Z | utils/datasets.py | Royzon/YOLOV4_MCMOT | cd4c8b1b60f9cf809579609caa29d408432845ba | [
"MIT"
] | 18 | 2020-09-30T09:55:10.000Z | 2021-11-22T19:52:20.000Z | utils/datasets.py | Royzon/YOLOV4_MCMOT | cd4c8b1b60f9cf809579609caa29d408432845ba | [
"MIT"
] | 30 | 2020-09-23T02:39:07.000Z | 2021-12-30T09:58:47.000Z | # encoding=utf-8
import glob
import math
import os
import random
import shutil
import time
from collections import defaultdict
from pathlib import Path
from threading import Thread
import cv2
import numpy as np
import torch
from PIL import Image, ExifTags
from torch.utils.data import Dataset
from tqdm import tqdm
fr... | 40.224234 | 238 | 0.511686 |
import glob
import math
import os
import random
import shutil
import time
from collections import defaultdict
from pathlib import Path
from threading import Thread
import cv2
import numpy as np
import torch
from PIL import Image, ExifTags
from torch.utils.data import Dataset
from tqdm import tqdm
from utils.utils i... | true | true |
1c2d536e0514934471c9643923e3132b4e8f0682 | 1,322 | py | Python | app/core/tests/test_admin.py | muminfarooq190/recipe-api | 270d89df9d39e5903245734b18acaaee505d94d0 | [
"MIT"
] | 1 | 2021-05-17T06:58:33.000Z | 2021-05-17T06:58:33.000Z | app/core/tests/test_admin.py | muminfarooq190/recipe-api | 270d89df9d39e5903245734b18acaaee505d94d0 | [
"MIT"
] | null | null | null | app/core/tests/test_admin.py | muminfarooq190/recipe-api | 270d89df9d39e5903245734b18acaaee505d94d0 | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='muminfarooq586@gmail.com'... | 32.243902 | 70 | 0.641452 | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTests(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='muminfarooq586@gmail.com'... | true | true |
1c2d53f021fcc0f127524587c762f40d3b18bb0c | 336 | py | Python | ABC_D/ABC137_D.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_D/ABC137_D.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | ABC_D/ABC137_D.py | ryosuke0825/atcoder_python | 185cdbe7db44ecca1aaf357858d16d31ce515ddb | [
"MIT"
] | null | null | null | import heapq
N, M = map(int, input().split())
AB = [[] for i in range(10**5+1)]
for i in range(N):
A, B = map(int, input().split())
AB[A].append(-B)
hq = []
heapq.heapify(hq)
ans = 0
for i in range(1, M+1):
for b in AB[i]:
heapq.heappush(hq, b)
if len(hq) > 0:
ans += -heapq.heappop(... | 15.272727 | 36 | 0.529762 | import heapq
N, M = map(int, input().split())
AB = [[] for i in range(10**5+1)]
for i in range(N):
A, B = map(int, input().split())
AB[A].append(-B)
hq = []
heapq.heapify(hq)
ans = 0
for i in range(1, M+1):
for b in AB[i]:
heapq.heappush(hq, b)
if len(hq) > 0:
ans += -heapq.heappop(... | true | true |
1c2d544a237d9edbef6ba35f669d795612a30701 | 6,647 | py | Python | cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 2,338 | 2018-06-19T17:34:51.000Z | 2022-03-31T11:00:37.000Z | cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 3,740 | 2019-01-23T15:36:48.000Z | 2022-03-31T22:01:13.000Z | cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py | mkinsner/llvm | 589d48844edb12cd357b3024248b93d64b6760bf | [
"Apache-2.0"
] | 500 | 2019-01-23T07:49:22.000Z | 2022-03-30T02:59:37.000Z | # DExTer : Debugging Experience Tester
# ~~~~~~ ~ ~~ ~ ~~
#
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
"""DexExpectWatch base class, holds logic... | 35.92973 | 105 | 0.597563 |
import abc
import difflib
import os
from collections import namedtuple
from dex.command.CommandBase import CommandBase, StepExpectInfo
from dex.command.StepValueInfo import StepValueInfo
class DexExpectWatchBase(CommandBase):
def __init__(self, *args, **kwargs):
if len(args) < 2:
rai... | true | true |
1c2d549baa7b01f366b099fa732274bb92dcb368 | 1,265 | py | Python | examples/basic_experiment.py | drammock/expyfun | b92bf5291318ee4cb1692e7bcb9757a422f48304 | [
"BSD-3-Clause"
] | 7 | 2015-09-27T23:54:07.000Z | 2022-01-17T01:12:12.000Z | examples/basic_experiment.py | drammock/expyfun | b92bf5291318ee4cb1692e7bcb9757a422f48304 | [
"BSD-3-Clause"
] | 218 | 2015-02-17T20:29:31.000Z | 2022-02-28T20:55:24.000Z | examples/basic_experiment.py | drammock/expyfun | b92bf5291318ee4cb1692e7bcb9757a422f48304 | [
"BSD-3-Clause"
] | 19 | 2015-02-19T18:43:43.000Z | 2021-11-12T23:13:12.000Z | """
===========================
Run a very basic experiment
===========================
This example demonstrates an (almost) minimum working example of the
ExperimentController class.
"""
# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
import numpy as np
from expyfun import ExperimentCon... | 28.75 | 79 | 0.657708 |
import numpy as np
from expyfun import ExperimentController, analyze, building_doc
from expyfun.visual import FixationDot
print(__doc__)
fs = 24414.
dur = 1.0
tone = np.sin(2 * np.pi * 1000 * np.arange(int(fs * dur)) / float(fs))
tone *= 0.01 * np.sqrt(2)
max_wait = 1. if not building_doc else 0.
with Expe... | true | true |
1c2d5502a9ba19cd4fb107246ec66b3d8905832b | 26,575 | py | Python | pytorch_lightning/trainer/data_loading.py | MaximumEntropy/pytorch-lightning | d8c501b22bc2c02a4bedb8b686daa5f904d6cf23 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/data_loading.py | MaximumEntropy/pytorch-lightning | d8c501b22bc2c02a4bedb8b686daa5f904d6cf23 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/trainer/data_loading.py | MaximumEntropy/pytorch-lightning | d8c501b22bc2c02a4bedb8b686daa5f904d6cf23 | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 49.672897 | 119 | 0.654939 |
import inspect
import multiprocessing
import os
from abc import ABC
from copy import deepcopy
from functools import partial
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from torch.utils.data import BatchSampler, DataLoader, RandomSampler, Sampler, SequentialSampler
from torch.utils... | true | true |
1c2d551991c207d885140cc9edd7b12e8dc576cb | 111 | py | Python | src/init/init.py | zhengruohuang/toddler | 0d7bde9aaf1fab8fed5f37973eeda9eaa100bd7a | [
"BSD-2-Clause"
] | 80 | 2016-03-27T04:26:57.000Z | 2021-12-24T08:27:55.000Z | src/init/init.py | zhengruohuang/toddler | 0d7bde9aaf1fab8fed5f37973eeda9eaa100bd7a | [
"BSD-2-Clause"
] | 1 | 2016-12-08T18:08:20.000Z | 2018-02-23T02:51:35.000Z | src/init/init.py | zhengruohuang/toddler | 0d7bde9aaf1fab8fed5f37973eeda9eaa100bd7a | [
"BSD-2-Clause"
] | 11 | 2017-05-09T01:42:07.000Z | 2020-02-13T13:56:36.000Z | print('hello world line 1')
print('hello world line 2')
print('hello world line 3')
print('hello world line 4') | 27.75 | 27 | 0.720721 | print('hello world line 1')
print('hello world line 2')
print('hello world line 3')
print('hello world line 4') | true | true |
1c2d57ae90b266553dcd84e80e7c0e9c44ac6eb5 | 3,615 | py | Python | selfdrive/controls/lib/lane_planner.py | egreen-park/crwusiz | da528ebea9945f5a2a0a286467bb1c349aa7472f | [
"MIT"
] | null | null | null | selfdrive/controls/lib/lane_planner.py | egreen-park/crwusiz | da528ebea9945f5a2a0a286467bb1c349aa7472f | [
"MIT"
] | null | null | null | selfdrive/controls/lib/lane_planner.py | egreen-park/crwusiz | da528ebea9945f5a2a0a286467bb1c349aa7472f | [
"MIT"
] | null | null | null | from common.numpy_fast import interp
import numpy as np
from selfdrive.hardware import EON, TICI
from cereal import log
TRAJECTORY_SIZE = 33
# camera offset is meters from center car to camera
if EON:
CAMERA_OFFSET = 0.10
PATH_OFFSET = 0.0
elif TICI:
CAMERA_OFFSET = -0.04
PATH_OFFSET = -0.04
else:
CAMERA_OF... | 37.268041 | 109 | 0.684371 | from common.numpy_fast import interp
import numpy as np
from selfdrive.hardware import EON, TICI
from cereal import log
TRAJECTORY_SIZE = 33
if EON:
CAMERA_OFFSET = 0.10
PATH_OFFSET = 0.0
elif TICI:
CAMERA_OFFSET = -0.04
PATH_OFFSET = -0.04
else:
CAMERA_OFFSET = 0.0
PATH_OFFSET = 0.0
class LanePlanner:... | true | true |
1c2d5983cf93611a62edd17dcf520c868260654e | 3,865 | py | Python | tests/model_fields/test_decimalfield.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/model_fields/test_decimalfield.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/model_fields/test_decimalfield.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | import unittest
from decimal import Decimal
from django.core import validators
from django.core.exceptions import ValidationError
from django.db import connection, models
from django.test import TestCase
from .models import BigD, Foo
class DecimalFieldTests(TestCase):
def test_to_python(self):
... | 42.944444 | 110 | 0.662096 | import unittest
from decimal import Decimal
from django.core import validators
from django.core.exceptions import ValidationError
from django.db import connection, models
from django.test import TestCase
from .models import BigD, Foo
class DecimalFieldTests(TestCase):
def test_to_python(self):
... | true | true |
1c2d5c01ca1dab4d07f601f9c346d1cf713a4ed6 | 4,689 | py | Python | yt_dlp/extractor/keezmovies.py | YuanHsing/yt-dlp | 38d86f4d45cf2b764f79141c602356fbb426a4b6 | [
"Unlicense"
] | 1 | 2021-12-13T14:12:47.000Z | 2021-12-13T14:12:47.000Z | yt_dlp/extractor/keezmovies.py | YuanHsing/yt-dlp | 38d86f4d45cf2b764f79141c602356fbb426a4b6 | [
"Unlicense"
] | null | null | null | yt_dlp/extractor/keezmovies.py | YuanHsing/yt-dlp | 38d86f4d45cf2b764f79141c602356fbb426a4b6 | [
"Unlicense"
] | null | null | null | import re
from .common import InfoExtractor
from ..aes import aes_decrypt_text
from ..compat import compat_urllib_parse_unquote
from ..utils import (
determine_ext,
ExtractorError,
format_field,
int_or_none,
str_to_int,
strip_or_none,
url_or_none,
)
class KeezMoviesIE(InfoExtractor):
... | 35.255639 | 121 | 0.538494 | import re
from .common import InfoExtractor
from ..aes import aes_decrypt_text
from ..compat import compat_urllib_parse_unquote
from ..utils import (
determine_ext,
ExtractorError,
format_field,
int_or_none,
str_to_int,
strip_or_none,
url_or_none,
)
class KeezMoviesIE(InfoExtractor):
... | true | true |
1c2d5c38ccc321103a599f13db5a9dd96360f17f | 42,056 | py | Python | mathics/builtin/algebra.py | Carreau/Mathics | 1706e994ae3db29ccbe7fad53d933ea5389c3be5 | [
"Apache-2.0"
] | 1 | 2021-04-11T10:49:46.000Z | 2021-04-11T10:49:46.000Z | mathics/builtin/algebra.py | jhbadger/Mathics | 395f307e758a84247b891f887368d70202b33254 | [
"Apache-2.0"
] | null | null | null | mathics/builtin/algebra.py | jhbadger/Mathics | 395f307e758a84247b891f887368d70202b33254 | [
"Apache-2.0"
] | 1 | 2018-12-21T08:04:18.000Z | 2018-12-21T08:04:18.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
from mathics.builtin.base import Builtin
from mathics.core.expression import Expression, Integer, Symbol, Atom, Number
from mathics.core.convert import from_sympy, sympy_symbol_prefix
import s... | 31.957447 | 249 | 0.510771 |
from __future__ import unicode_literals
from __future__ import absolute_import
from mathics.builtin.base import Builtin
from mathics.core.expression import Expression, Integer, Symbol, Atom, Number
from mathics.core.convert import from_sympy, sympy_symbol_prefix
import sympy
import mpmath
from six.moves import ran... | true | true |
1c2d5c434953c3acf443a11ab1783bd53f70c57f | 8,240 | py | Python | src/api/bkuser_core/tests/profiles/test_utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/profiles/test_utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/profiles/test_utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 34.767932 | 115 | 0.589563 |
from unittest.mock import patch
import pytest
from django.contrib.auth.hashers import check_password
from bkuser_core.audit.utils import create_profile_log
from bkuser_core.categories.models import ProfileCategory
from bkuser_core.profiles.exceptions import CountryISOCodeNotMatch, UsernameWithDomainFormatError
from ... | true | true |
1c2d5c50b871c13ddcd65e2482ce8e7c74851477 | 971 | py | Python | pos_qr_show/__manifest__.py | mosadiqit/pos-addons | 6cac2b7d227bddbec5f9d0c69859e626f2e9dc73 | [
"MIT"
] | null | null | null | pos_qr_show/__manifest__.py | mosadiqit/pos-addons | 6cac2b7d227bddbec5f9d0c69859e626f2e9dc73 | [
"MIT"
] | null | null | null | pos_qr_show/__manifest__.py | mosadiqit/pos-addons | 6cac2b7d227bddbec5f9d0c69859e626f2e9dc73 | [
"MIT"
] | 3 | 2021-06-15T05:45:42.000Z | 2021-07-27T12:28:53.000Z | # Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# License MIT (https://opensource.org/licenses/MIT).
{
"name": """POS QR Showing in POS""",
"summary": """Show QR for qr-based payment systems in POS or Customer Screen""",
"category": "Hidden",
# "live_test_url": "",
"image... | 33.482759 | 84 | 0.601442 |
{
"name": """POS QR Showing in POS""",
"summary": """Show QR for qr-based payment systems in POS or Customer Screen""",
"category": "Hidden",
"images": [],
"version": "12.0.1.0.0",
"application": False,
"author": "IT-Projects LLC, Ivan Yelizariev",
"support": "apps@itpp.dev",
... | true | true |
1c2d5cca901cfaa7506bca632cd6a7ed50bd307d | 807 | py | Python | amino/__init__.py | Alert-Aigul/Amino.py | 34b578e34e8a6ee6e50e3c3b2ad8bcda6b83f266 | [
"MIT"
] | null | null | null | amino/__init__.py | Alert-Aigul/Amino.py | 34b578e34e8a6ee6e50e3c3b2ad8bcda6b83f266 | [
"MIT"
] | null | null | null | amino/__init__.py | Alert-Aigul/Amino.py | 34b578e34e8a6ee6e50e3c3b2ad8bcda6b83f266 | [
"MIT"
] | null | null | null | __title__ = "Amino.py"
__author__ = "Slimakoi"
__license__ = "MIT"
__copyright__ = "Copyright 2020-2022 Slimakoi"
__version__ = "3.0.4"
from .acm import ACM
from .client import Client
from .sub_client import SubClient
from .socket import Callbacks, SocketHandler
from .async_acm import AsyncACM
from .async_client impo... | 31.038462 | 121 | 0.788104 | __title__ = "Amino.py"
__author__ = "Slimakoi"
__license__ = "MIT"
__copyright__ = "Copyright 2020-2022 Slimakoi"
__version__ = "3.0.4"
from .acm import ACM
from .client import Client
from .sub_client import SubClient
from .socket import Callbacks, SocketHandler
from .async_acm import AsyncACM
from .async_client impo... | true | true |
1c2d5cd0da5bfba84bb4e52446a57f4113914fc8 | 1,636 | py | Python | dimod/__init__.py | hsadeghidw/dimod | c6b4adc18c22f39fd5a79e6775bbcab84b1a5489 | [
"Apache-2.0"
] | null | null | null | dimod/__init__.py | hsadeghidw/dimod | c6b4adc18c22f39fd5a79e6775bbcab84b1a5489 | [
"Apache-2.0"
] | null | null | null | dimod/__init__.py | hsadeghidw/dimod | c6b4adc18c22f39fd5a79e6775bbcab84b1a5489 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 D-Wave Systems 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... | 25.169231 | 90 | 0.78423 |
__version__ = '0.10.6'
from dimod.bqm import *
from dimod.constrained import *
import dimod.constrained
from dimod.core import *
import dimod.core
from dimod.reference import *
import dimod.reference
from dimod.roof_duality import fix_variables
from dimod.binary import *
import dimod.binary
from d... | true | true |
1c2d5e9d7c8be473f77b25e53bd2c0cedbdbf59f | 1,490 | py | Python | bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/optim/sgd/benchmark_run.py | papamarkou/bnn_mcmc_examples | 7bb4ecfb33db4c30a8e61e31f528bda0efb24e3d | [
"MIT"
] | 1 | 2021-09-09T15:55:37.000Z | 2021-09-09T15:55:37.000Z | bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/optim/sgd/benchmark_run.py | kushagragpt99/bnn_mcmc_examples | 297cdb1e74335860989bebdb4ff6f6322b6adc06 | [
"MIT"
] | null | null | null | bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/optim/sgd/benchmark_run.py | kushagragpt99/bnn_mcmc_examples | 297cdb1e74335860989bebdb4ff6f6322b6adc06 | [
"MIT"
] | 1 | 2021-10-05T06:38:57.000Z | 2021-10-05T06:38:57.000Z | # %% Import packages
from sklearn.metrics import accuracy_score
from torch.optim import SGD
from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.model import model
from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.optim.constants import (
num_epochs, num_solutions, verbose, verbose_step
)
from bnn_mcmc_exa... | 33.863636 | 116 | 0.797315 |
from sklearn.metrics import accuracy_score
from torch.optim import SGD
from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.model import model
from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.optim.constants import (
num_epochs, num_solutions, verbose, verbose_step
)
from bnn_mcmc_examples.examples.mlp.n... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.