hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 245 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 245 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.02M | avg_line_length float64 1 958k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 2
classes | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c11754df400e99bb0b39fbc452edce553ea4118 | 948 | py | Python | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_app_insight/api/views.py | kaka-lin/azure-intelligent-edge-patterns | 766833c7c25d2458cec697937be288202d1763bc | [
"MIT"
] | 176 | 2019-07-03T00:20:15.000Z | 2022-03-14T07:51:22.000Z | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_app_insight/api/views.py | kaka-lin/azure-intelligent-edge-patterns | 766833c7c25d2458cec697937be288202d1763bc | [
"MIT"
] | 121 | 2019-06-24T20:47:27.000Z | 2022-03-28T02:16:18.000Z | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_app_insight/api/views.py | kaka-lin/azure-intelligent-edge-patterns | 766833c7c25d2458cec697937be288202d1763bc | [
"MIT"
] | 144 | 2019-06-18T18:48:43.000Z | 2022-03-31T12:14:46.000Z | """App API views.
"""
from drf_yasg2.utils import swagger_auto_schema
from rest_framework.decorators import api_view
from rest_framework.response import Response
from configs.app_insight import APP_INSIGHT_INST_KEY
from ...general.api.serializers import MSStyleErrorResponseSerializer
from .serializers import Instrum... | 26.333333 | 69 | 0.746835 |
from drf_yasg2.utils import swagger_auto_schema
from rest_framework.decorators import api_view
from rest_framework.response import Response
from configs.app_insight import APP_INSIGHT_INST_KEY
from ...general.api.serializers import MSStyleErrorResponseSerializer
from .serializers import InstrumentKeyResponseSerializ... | true | true |
1c117558ca4529ac897937509b49dc08e9d40f18 | 3,095 | py | Python | st2api/st2api/controllers/v1/rule_enforcements.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | null | null | null | st2api/st2api/controllers/v1/rule_enforcements.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 15 | 2021-02-11T22:58:54.000Z | 2021-08-06T18:03:47.000Z | st2api/st2api/controllers/v1/rule_enforcements.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 1 | 2021-07-10T15:02:29.000Z | 2021-07-10T15:02:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme 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 ... | 34.775281 | 97 | 0.659451 |
import six
from st2common import log as logging
from st2common.models.api.rule_enforcement import RuleEnforcementAPI
from st2common.persistence.rule_enforcement import RuleEnforcement
from st2common.util import isotime
from st2common.rbac.types import PermissionType
from st2api.controllers.resource import ResourceCo... | true | true |
1c1175d7a5229e7fe1aeb5a2f544ec40d4a23645 | 239 | py | Python | HLTrigger/Configuration/python/HLT_75e33/modules/hltAK8PFPuppiJetCorrectorL2_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:24:46.000Z | 2021-11-30T16:24:46.000Z | HLTrigger/Configuration/python/HLT_75e33/modules/hltAK8PFPuppiJetCorrectorL2_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 4 | 2021-11-29T13:57:56.000Z | 2022-03-29T06:28:36.000Z | HLTrigger/Configuration/python/HLT_75e33/modules/hltAK8PFPuppiJetCorrectorL2_cfi.py | PKUfudawei/cmssw | 8fbb5ce74398269c8a32956d7c7943766770c093 | [
"Apache-2.0"
] | 1 | 2021-11-30T16:16:05.000Z | 2021-11-30T16:16:05.000Z | import FWCore.ParameterSet.Config as cms
hltAK8PFPuppiJetCorrectorL2 = cms.EDProducer("LXXXCorrectorProducer",
#algorithm = cms.string('AK8PFPuppiHLT'),
algorithm = cms.string('AK8PFPuppi'),
level = cms.string('L2Relative')
)
| 29.875 | 69 | 0.748954 | import FWCore.ParameterSet.Config as cms
hltAK8PFPuppiJetCorrectorL2 = cms.EDProducer("LXXXCorrectorProducer",
algorithm = cms.string('AK8PFPuppi'),
level = cms.string('L2Relative')
)
| true | true |
1c1177ecadeeef5c7385948c02639ec0ea9b8ef0 | 6,038 | py | Python | eth2/beacon/state_machines/forks/serenity/epoch_processing.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | eth2/beacon/state_machines/forks/serenity/epoch_processing.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | eth2/beacon/state_machines/forks/serenity/epoch_processing.py | nrryuya/trinity | 7436d9c3fdef5fbeef5d7a1123c8ed2ecd16e033 | [
"MIT"
] | null | null | null | from typing import (
Tuple,
)
from eth2._utils.numeric import (
is_power_of_two,
)
from eth2._utils.tuple import (
update_tuple_item,
)
from eth2.beacon._utils.hash import (
hash_eth2,
)
from eth2.beacon import helpers
from eth2.beacon.helpers import (
get_active_validator_indices,
get_current_... | 32.637838 | 97 | 0.666611 | from typing import (
Tuple,
)
from eth2._utils.numeric import (
is_power_of_two,
)
from eth2._utils.tuple import (
update_tuple_item,
)
from eth2.beacon._utils.hash import (
hash_eth2,
)
from eth2.beacon import helpers
from eth2.beacon.helpers import (
get_active_validator_indices,
get_current_... | true | true |
1c1177f4afb7d5efe3d1e293209948f9659f800d | 3,787 | py | Python | datadog_checks_base/tests/test_pdhbasecheck.py | glasser/integrations-core | 1dd515d49b1690a1369ee5195713605b1b072b1f | [
"BSD-3-Clause"
] | 2 | 2019-05-28T03:48:29.000Z | 2019-07-05T07:05:58.000Z | datadog_checks_base/tests/test_pdhbasecheck.py | glasser/integrations-core | 1dd515d49b1690a1369ee5195713605b1b072b1f | [
"BSD-3-Clause"
] | 4 | 2019-07-03T02:53:19.000Z | 2019-07-10T14:52:14.000Z | datadog_checks_base/tests/test_pdhbasecheck.py | glasser/integrations-core | 1dd515d49b1690a1369ee5195713605b1b072b1f | [
"BSD-3-Clause"
] | 1 | 2019-12-23T13:35:17.000Z | 2019-12-23T13:35:17.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
from .utils import requires_windows
try:
from datadog_checks.checks.win.winpdh_base import PDHBaseCheck
from datadog_test_libs.win.pdh_mocks import initialize_pdh_tests, pdh_mocks_fixture ... | 41.615385 | 112 | 0.730658 |
import pytest
from .utils import requires_windows
try:
from datadog_checks.checks.win.winpdh_base import PDHBaseCheck
from datadog_test_libs.win.pdh_mocks import initialize_pdh_tests, pdh_mocks_fixture except ImportError:
pass
DEFAULT_INSTANCE = {'host': '.'}
SINGLE_INSTANCE_COUNTER = [["Memory", Non... | true | true |
1c1178d91ac9b7687de0be688c3506f4333cfd6f | 850 | py | Python | grades/management/commands/generate_program_certificates.py | Wassaf-Shahzad/micromasters | b1340a8c233499b1d8d22872a6bc1fe7f49fd323 | [
"BSD-3-Clause"
] | 32 | 2016-03-25T01:03:13.000Z | 2022-01-15T19:35:42.000Z | grades/management/commands/generate_program_certificates.py | Wassaf-Shahzad/micromasters | b1340a8c233499b1d8d22872a6bc1fe7f49fd323 | [
"BSD-3-Clause"
] | 4,858 | 2016-03-03T13:48:30.000Z | 2022-03-29T22:09:51.000Z | grades/management/commands/generate_program_certificates.py | umarmughal824/micromasters | ea92d3bcea9be4601150fc497302ddacc1161622 | [
"BSD-3-Clause"
] | 20 | 2016-08-18T22:07:44.000Z | 2021-11-15T13:35:35.000Z | """
Find all users that completed the program and create certificates
"""
from django.core.management import BaseCommand
from courses.models import Program
from dashboard.models import ProgramEnrollment
from grades.api import generate_program_certificate
class Command(BaseCommand):
"""
Finds all completed FA... | 35.416667 | 85 | 0.722353 | from django.core.management import BaseCommand
from courses.models import Program
from dashboard.models import ProgramEnrollment
from grades.api import generate_program_certificate
class Command(BaseCommand):
help = "Finds all users that completed the program"
def handle(self, *args, **kwargs): pro... | true | true |
1c11791b9377f4f64e055be7abebcd98035d16bf | 403 | py | Python | yunionclient/api/edgewires.py | tb365/mcclient_python | 06647e7496b9e2c3aeb5ade1276c81871063159b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:34:08.000Z | 2022-03-13T04:55:17.000Z | yunionclient/api/edgewires.py | xhw20190116/python_yunionsdk | eb7c8c08300d38dac204ec4980a775abc9c7083a | [
"Apache-2.0"
] | 13 | 2019-06-06T08:25:41.000Z | 2021-07-16T07:26:10.000Z | yunionclient/api/edgewires.py | xhw20190116/python_yunionsdk | eb7c8c08300d38dac204ec4980a775abc9c7083a | [
"Apache-2.0"
] | 7 | 2019-03-31T05:43:36.000Z | 2021-03-04T09:59:05.000Z | import yunionclient
from yunionclient.common import base
class EdgewireManager(base.JointManager):
keyword = 'edgewire'
keyword_plural = 'edgewires'
_columns = ['Edge_ID', 'Wire_ID', 'Edge', 'Wire']
@classmethod
def master_class(cls):
return yunionclient.api.edges.EdgeManager
@class... | 22.388889 | 53 | 0.707196 | import yunionclient
from yunionclient.common import base
class EdgewireManager(base.JointManager):
keyword = 'edgewire'
keyword_plural = 'edgewires'
_columns = ['Edge_ID', 'Wire_ID', 'Edge', 'Wire']
@classmethod
def master_class(cls):
return yunionclient.api.edges.EdgeManager
@class... | true | true |
1c11793c54aa24e6f2b7a01224f859c6c466bb2a | 1,017 | py | Python | Data/pfm_helper.py | SimonTheVillain/ActiveStereoNet | 708bddce844998b366be1a1ec8a72a31ccd26f8c | [
"MIT"
] | 17 | 2019-08-23T04:00:32.000Z | 2022-02-06T13:37:02.000Z | Data/pfm_helper.py | SimonTheVillain/ActiveStereoNet | 708bddce844998b366be1a1ec8a72a31ccd26f8c | [
"MIT"
] | null | null | null | Data/pfm_helper.py | SimonTheVillain/ActiveStereoNet | 708bddce844998b366be1a1ec8a72a31ccd26f8c | [
"MIT"
] | 7 | 2019-12-20T07:46:41.000Z | 2021-11-01T04:18:19.000Z | import re
import numpy as np
import pdb
def read_pfm(file):
file = open(file, 'rb')
color = None
width = None
height = None
scale = None
endian = None
header = file.readline().rstrip()
header = str(header, 'utf-8')
if header == 'PF':
color = True
elif heade... | 21.1875 | 76 | 0.551622 | import re
import numpy as np
import pdb
def read_pfm(file):
file = open(file, 'rb')
color = None
width = None
height = None
scale = None
endian = None
header = file.readline().rstrip()
header = str(header, 'utf-8')
if header == 'PF':
color = True
elif heade... | true | true |
1c1179c79939090d7638af7491c3dd46a99cd95d | 1,353 | py | Python | src/ambianic/__main__.py | ivelin/ambianic-edge | a0cbb2a2369024735ea896b15b93d3d50d58cac1 | [
"Apache-2.0"
] | 95 | 2019-12-12T02:20:40.000Z | 2022-03-30T18:23:52.000Z | src/ambianic/__main__.py | ambianic/ambianic | cad14a3ae8a2149c9e17e1bd41ee7d1b75568271 | [
"Apache-2.0"
] | 313 | 2019-11-04T21:31:26.000Z | 2022-01-01T11:00:38.000Z | src/ambianic/__main__.py | ambianic/ambianic | cad14a3ae8a2149c9e17e1bd41ee7d1b75568271 | [
"Apache-2.0"
] | 49 | 2020-02-28T22:09:36.000Z | 2022-03-23T03:26:33.000Z | """Main Ambianic OS executable."""
import os
import signal
import ambianic.server
from ambianic import configuration
def start():
"""Start the main app executable in the hosting OS environment."""
configuration.init_config()
env_work_dir = configuration.get_work_dir()
ambianic.server_instance = ambia... | 29.413043 | 88 | 0.730229 | import os
import signal
import ambianic.server
from ambianic import configuration
def start():
configuration.init_config()
env_work_dir = configuration.get_work_dir()
ambianic.server_instance = ambianic.server.AmbianicServer(work_dir=env_work_dir)
os.nice(1)
ambianic.server_instan... | true | true |
1c1179d7a19230a1dcfc0133f6e3779f04ab4112 | 26,727 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/aio/operations/_route_filter_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/aio/operations/_route_filter_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/aio/operations/_route_filter_rules_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # 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 ... | 49.402957 | 221 | 0.671755 | from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union
import warnings
from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.pi... | true | true |
1c117b59fb61a50420e14d475ea9268c6c46f89f | 5,035 | py | Python | MayaTools/General/Scripts/Modules/ART_Spine.py | alexwidener/ArtToolsOSX_UnrealEngine | bb9971098576af937542ffbc841f37017df63391 | [
"Xnet",
"X11"
] | null | null | null | MayaTools/General/Scripts/Modules/ART_Spine.py | alexwidener/ArtToolsOSX_UnrealEngine | bb9971098576af937542ffbc841f37017df63391 | [
"Xnet",
"X11"
] | null | null | null | MayaTools/General/Scripts/Modules/ART_Spine.py | alexwidener/ArtToolsOSX_UnrealEngine | bb9971098576af937542ffbc841f37017df63391 | [
"Xnet",
"X11"
] | null | null | null | import maya.cmds as cmds
import maya.mel as mel
import os
import ART_rigUtils as utils
reload(utils)
class Spine():
#pass in items we need to know about (do we build a clavicle? What is the root name of the module?(If set to None, just use upperarm, lowerarm, etc),
def __init__(self, includeClavic... | 5,035 | 5,035 | 0.421847 | import maya.cmds as cmds
import maya.mel as mel
import os
import ART_rigUtils as utils
reload(utils)
class Spine():
| false | true |
1c117baad678e0af8b24508c35d69af1f2fb9270 | 1,889 | py | Python | tests/util.py | CJWorkbench/arrow-tools | 1944e40853d82d7dad3d47a72958326cefff367a | [
"MIT"
] | 1 | 2021-11-23T03:57:03.000Z | 2021-11-23T03:57:03.000Z | tests/util.py | CJWorkbench/arrow-tools | 1944e40853d82d7dad3d47a72958326cefff367a | [
"MIT"
] | null | null | null | tests/util.py | CJWorkbench/arrow-tools | 1944e40853d82d7dad3d47a72958326cefff367a | [
"MIT"
] | 1 | 2021-11-23T03:57:06.000Z | 2021-11-23T03:57:06.000Z | from contextlib import contextmanager, suppress
import pathlib
import os
import tempfile
from typing import ContextManager
import unittest
from pandas.testing import assert_series_equal
import pyarrow
def assert_table_equals(actual: pyarrow.Table, expected: pyarrow.Table) -> None:
assertEqual = unittest.TestCase(... | 29.515625 | 80 | 0.660138 | from contextlib import contextmanager, suppress
import pathlib
import os
import tempfile
from typing import ContextManager
import unittest
from pandas.testing import assert_series_equal
import pyarrow
def assert_table_equals(actual: pyarrow.Table, expected: pyarrow.Table) -> None:
assertEqual = unittest.TestCase(... | true | true |
1c117c270067ce4c6ee4d22655cf4bca1199f5c9 | 2,302 | py | Python | setup.py | lauercris/pycodestyle | 6a56d22bfa7502ea1b391a6266cbd8d2963a3a1e | [
"MIT"
] | 463 | 2015-01-15T08:17:42.000Z | 2022-03-28T15:10:20.000Z | setup.py | lauercris/pycodestyle | 6a56d22bfa7502ea1b391a6266cbd8d2963a3a1e | [
"MIT"
] | 52 | 2015-01-06T02:43:59.000Z | 2022-03-14T11:15:21.000Z | setup.py | lauercris/pycodestyle | 6a56d22bfa7502ea1b391a6266cbd8d2963a3a1e | [
"MIT"
] | 249 | 2015-01-07T22:49:49.000Z | 2022-03-18T02:32:06.000Z | # -*- coding: utf-8 -*-
from __future__ import with_statement
from setuptools import setup
def get_version():
with open('pycodestyle.py') as f:
for line in f:
if line.startswith('__version__'):
return eval(line.split('=')[-1])
def get_long_description():
descr = []
fo... | 32.422535 | 73 | 0.597307 | from __future__ import with_statement
from setuptools import setup
def get_version():
with open('pycodestyle.py') as f:
for line in f:
if line.startswith('__version__'):
return eval(line.split('=')[-1])
def get_long_description():
descr = []
for fname in 'README.rst',... | true | true |
1c117c73df9e3a3a86154b1a92b3856e51cc35d1 | 54,141 | py | Python | .jupyter/jupyter_notebook_config.py | danielgolf/dotfiles-linux | ebabfaf9d40fb4b73711a86c033c4cfd7a194c66 | [
"MIT"
] | 5 | 2019-12-29T05:58:19.000Z | 2020-01-07T10:25:49.000Z | .jupyter/jupyter_notebook_config.py | danielgolf/dotfiles-linux | ebabfaf9d40fb4b73711a86c033c4cfd7a194c66 | [
"MIT"
] | null | null | null | .jupyter/jupyter_notebook_config.py | danielgolf/dotfiles-linux | ebabfaf9d40fb4b73711a86c033c4cfd7a194c66 | [
"MIT"
] | null | null | null | # Configuration file for jupyter-notebook.
#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.
## The date format used by logging fo... | 39.175832 | 144 | 0.686264 |
c.JupyterApp.answer_yes = True
#
# By default, requests get a 403 forbidden response if the 'Host' header
# shows that the browser thinks it's on a non-local domain.
# Require authentication to access prometheus metrics.
# Default: True
# c.NotebookApp.authenticate_pr... | true | true |
1c117ca3dcd3e6b45b16844ce4c1e6358e6e0069 | 7,261 | py | Python | tests/unit/flow/test_flow_example_face.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 2 | 2021-06-30T06:56:30.000Z | 2022-03-11T01:27:19.000Z | tests/unit/flow/test_flow_example_face.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | null | null | null | tests/unit/flow/test_flow_example_face.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | null | null | null | import os
from jina.enums import SocketType
from jina import Flow
cur_dir = os.path.dirname(os.path.abspath(__file__))
def test_index():
f = Flow.load_config(os.path.join(cur_dir, '../yaml/examples/faces/flow-index.yml'))
with f:
node = f._pod_nodes['gateway']
assert node.head_args.socket_in... | 50.776224 | 88 | 0.701832 | import os
from jina.enums import SocketType
from jina import Flow
cur_dir = os.path.dirname(os.path.abspath(__file__))
def test_index():
f = Flow.load_config(os.path.join(cur_dir, '../yaml/examples/faces/flow-index.yml'))
with f:
node = f._pod_nodes['gateway']
assert node.head_args.socket_in... | true | true |
1c11801288e5e6403ef69bcc690afcd522c6af46 | 6,666 | py | Python | airflow/operators/gcs_to_s3.py | InigoSJ/airflow | 8b97a387dc30d8c88390d500ec99333798c20f1c | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2020-10-12T05:21:27.000Z | 2021-07-07T09:23:47.000Z | airflow/operators/gcs_to_s3.py | InigoSJ/airflow | 8b97a387dc30d8c88390d500ec99333798c20f1c | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2021-03-11T06:46:16.000Z | 2021-09-29T17:48:20.000Z | airflow/operators/gcs_to_s3.py | InigoSJ/airflow | 8b97a387dc30d8c88390d500ec99333798c20f1c | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2019-08-21T10:13:08.000Z | 2019-08-21T10:13:08.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 42.730769 | 104 | 0.656466 | import warnings
from airflow.contrib.hooks.gcs_hook import GoogleCloudStorageHook
from airflow.contrib.operators.gcs_list_operator import GoogleCloudStorageListOperator
from airflow.utils.decorators import apply_defaults
from airflow.hooks.S3_hook import S3Hook
class GoogleCloudStorageToS3Operator(GoogleCloudStorage... | true | true |
1c1180ed52982dedf5d6ad6101dbf30925196688 | 45 | py | Python | gluoncv/auto/__init__.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 5,447 | 2018-04-25T18:02:51.000Z | 2022-03-31T00:59:49.000Z | gluoncv/auto/__init__.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 1,566 | 2018-04-25T21:14:04.000Z | 2022-03-31T06:42:42.000Z | gluoncv/auto/__init__.py | Kh4L/gluon-cv | 849411ed56632cd854850b07142087d599f97dcb | [
"Apache-2.0"
] | 1,345 | 2018-04-25T18:44:13.000Z | 2022-03-30T19:32:53.000Z | """GluonCV auto"""
from .estimators import *
| 15 | 25 | 0.688889 | from .estimators import *
| true | true |
1c118136ed795d4dd1c84b476ef24188a3f86785 | 3,058 | py | Python | core/controllers/concept_card_viewer_test.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | null | null | null | core/controllers/concept_card_viewer_test.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | 5 | 2018-06-09T02:05:45.000Z | 2018-09-20T13:53:42.000Z | core/controllers/concept_card_viewer_test.py | steve7158/oppia | e2cae72fa5d3503c64d195f09d3460507697730c | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 40.773333 | 79 | 0.640615 |
from constants import constants
from core.domain import skill_domain
from core.domain import skill_services
from core.domain import state_domain
from core.domain import user_services
from core.tests import test_utils
import feconf
class ConceptCardDataHandlerTest(test_utils.GenericTestBase):
def setUp(self):
... | true | true |
1c1181372a452ed33807de8bb9069dc99cf9739f | 235 | py | Python | np/reference/ch6code/fourier.py | focusunsink/study_python | 322326642db54df8725793d70a95d21ac40b6507 | [
"MIT"
] | null | null | null | np/reference/ch6code/fourier.py | focusunsink/study_python | 322326642db54df8725793d70a95d21ac40b6507 | [
"MIT"
] | null | null | null | np/reference/ch6code/fourier.py | focusunsink/study_python | 322326642db54df8725793d70a95d21ac40b6507 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib.pyplot import plot, show
x = np.linspace(0, 2 * np.pi, 30)
wave = np.cos(x)
transformed = np.fft.fft(wave)
print np.all(np.abs(np.fft.ifft(transformed) - wave) < 10 ** -9)
plot(transformed)
show()
| 21.363636 | 64 | 0.689362 | import numpy as np
from matplotlib.pyplot import plot, show
x = np.linspace(0, 2 * np.pi, 30)
wave = np.cos(x)
transformed = np.fft.fft(wave)
print np.all(np.abs(np.fft.ifft(transformed) - wave) < 10 ** -9)
plot(transformed)
show()
| false | true |
1c1182adcc1f98fca37a18c551feca18cac665b7 | 2,807 | py | Python | freezegame/broad_phase_collision.py | mattfister/pybacon | c864e5f5c872f92b3c694f0ef83feb0f20f93193 | [
"MIT"
] | 2 | 2017-02-06T14:49:48.000Z | 2021-03-20T08:19:01.000Z | freezegame/broad_phase_collision.py | mattfister/pybacon | c864e5f5c872f92b3c694f0ef83feb0f20f93193 | [
"MIT"
] | null | null | null | freezegame/broad_phase_collision.py | mattfister/pybacon | c864e5f5c872f92b3c694f0ef83feb0f20f93193 | [
"MIT"
] | 2 | 2017-11-04T10:13:59.000Z | 2020-04-24T05:15:33.000Z | # This is adapted from http://lab.polygonal.de/2006/11/13/collision-detection-with-recursive-dimensional-clustering/
#
# Copyright (c) 2006 Michael Baczynski http://www.polygonal.de
#
# Permission to use, copy, modify, distribute and sell this software
# and its documentation for any purpose is hereby granted without f... | 34.654321 | 116 | 0.552191 |
SUBDIVISION_THRESHOLD = 10
CONTACT_THRESHOLD = .001
class Boundary:
def __init__(self, boundary_type, position, sprite):
self.boundary_type = boundary_type
self.position = position
self.sprite = sprite
class RDC:
def __init__(self):
self.colliding_groups = []
def recu... | true | true |
1c1182c54b368d0b88d2b2f9717bd6226156e49d | 1,851 | py | Python | x_tef/flux_lowpass_s.py | parkermac/LiveOcean | bef3e1e729ada1069853dd4f57f79f452b54f4fa | [
"MIT"
] | 4 | 2015-06-09T18:53:11.000Z | 2021-08-19T01:39:38.000Z | x_tef/flux_lowpass_s.py | parkermac/LiveOcean | bef3e1e729ada1069853dd4f57f79f452b54f4fa | [
"MIT"
] | null | null | null | x_tef/flux_lowpass_s.py | parkermac/LiveOcean | bef3e1e729ada1069853dd4f57f79f452b54f4fa | [
"MIT"
] | 1 | 2017-03-07T01:28:49.000Z | 2017-03-07T01:28:49.000Z | """
Make low-passed version of the hourly extraction made by
flux_get_s.py.
"""
# imports
import pandas as pd
import os; import sys
sys.path.append(os.path.abspath('../alpha'))
import Lfun
import zfun
Ldir = Lfun.Lstart('cas6', 'v3')
indir0 = Ldir['LOo'] + 'tef/'
for year in [2018, 2019]:
print('Working on ' +... | 32.473684 | 96 | 0.646677 |
import pandas as pd
import os; import sys
sys.path.append(os.path.abspath('../alpha'))
import Lfun
import zfun
Ldir = Lfun.Lstart('cas6', 'v3')
indir0 = Ldir['LOo'] + 'tef/'
for year in [2018, 2019]:
print('Working on ' + str(year))
outname = 'cas6_v3_lo8b_' + str(year) + '.01.01_' + str(year) + '.12.3... | true | true |
1c1183e9351d1e0eb056ae4596f24a24789aca23 | 9,108 | py | Python | deuceclient/tests/test_client_deuce_file_blocks_get.py | BenjamenMeyer/deuce-client | 9f0b8d138656eda6007376cdbd9a6fda83147efe | [
"Apache-2.0"
] | null | null | null | deuceclient/tests/test_client_deuce_file_blocks_get.py | BenjamenMeyer/deuce-client | 9f0b8d138656eda6007376cdbd9a6fda83147efe | [
"Apache-2.0"
] | 16 | 2015-01-02T19:46:21.000Z | 2016-09-07T04:57:40.000Z | deuceclient/tests/test_client_deuce_file_blocks_get.py | BenjamenMeyer/deuce-client | 9f0b8d138656eda6007376cdbd9a6fda83147efe | [
"Apache-2.0"
] | null | null | null | """
Tests - Deuce Client - Client - Deuce - File - Blocks - Get
"""
import json
import urllib.parse
import httpretty
import deuceclient.api as api
import deuceclient.client.deuce
from deuceclient.tests import *
class ClientDeuceFileGetBlocksTests(ClientTestBase):
def setUp(self):
super(ClientDeuceFileG... | 40.660714 | 78 | 0.497914 | import json
import urllib.parse
import httpretty
import deuceclient.api as api
import deuceclient.client.deuce
from deuceclient.tests import *
class ClientDeuceFileGetBlocksTests(ClientTestBase):
def setUp(self):
super(ClientDeuceFileGetBlocksTests, self).setUp()
self.client = deuceclient.clie... | true | true |
1c1184428ac21561f83a7f6742c33a3365651b73 | 1,852 | py | Python | internal/notes/builtin-SAVE/packages/r-xts/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/r-xts/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/r-xts/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 45.170732 | 79 | 0.685745 | from spack import *
class RXts(RPackage):
homepage = "http://r-forge.r-project.org/projects/xts/"
url = "https://cran.r-project.org/src/contrib/xts_0.9-7.tar.gz"
list_url = "https://cran.r-project.org/src/contrib/Archive/xts"
version('0.9-7', 'a232e94aebfa654653a7d88a0503537b')
depends_on(... | true | true |
1c1184898e12751bc14286602caf6d2ba255426c | 22,404 | py | Python | pycroft/model/user.py | agdsn/pycroft | ea771141d59c88fdb8a782eafbe106240550a33a | [
"Apache-2.0"
] | 18 | 2016-04-20T19:00:56.000Z | 2021-12-19T16:43:57.000Z | pycroft/model/user.py | agdsn/pycroft | ea771141d59c88fdb8a782eafbe106240550a33a | [
"Apache-2.0"
] | 461 | 2016-07-20T00:42:59.000Z | 2022-03-25T17:03:07.000Z | pycroft/model/user.py | agdsn/pycroft | ea771141d59c88fdb8a782eafbe106240550a33a | [
"Apache-2.0"
] | 15 | 2016-07-15T18:46:43.000Z | 2021-03-17T20:08:39.000Z | # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
"""
pycroft.model.user
~~~~~~~~~~~~~~
This module contains the class User.
:copyright: (c) 201... | 37.844595 | 105 | 0.620693 | from __future__ import annotations
import re
from datetime import timedelta, date, datetime
from flask_login import UserMixin
from sqlalchemy import (
Boolean, Column, ForeignKey, Integer,
String, and_, exists, join, null, select, Sequence,
Date, func, UniqueConstraint, Index, text, event)
from sqlalchemy... | true | true |
1c118494ed19af6298c4c8109c73e3add6faf9f2 | 1,756 | py | Python | tests/test_datetime_fields.py | Chocorean/infi.clickhouse_orm | a765b5fe5fc5a7c9a6e41f369162b13731cc3226 | [
"BSD-3-Clause"
] | null | null | null | tests/test_datetime_fields.py | Chocorean/infi.clickhouse_orm | a765b5fe5fc5a7c9a6e41f369162b13731cc3226 | [
"BSD-3-Clause"
] | null | null | null | tests/test_datetime_fields.py | Chocorean/infi.clickhouse_orm | a765b5fe5fc5a7c9a6e41f369162b13731cc3226 | [
"BSD-3-Clause"
] | 1 | 2019-06-26T09:29:02.000Z | 2019-06-26T09:29:02.000Z | from __future__ import unicode_literals
import unittest
from infi.clickhouse_orm.database import Database
from infi.clickhouse_orm.models import Model
from infi.clickhouse_orm.fields import *
from infi.clickhouse_orm.engines import *
class DateFieldsTest(unittest.TestCase):
def setUp(self):
self.databas... | 40.837209 | 114 | 0.701595 | from __future__ import unicode_literals
import unittest
from infi.clickhouse_orm.database import Database
from infi.clickhouse_orm.models import Model
from infi.clickhouse_orm.fields import *
from infi.clickhouse_orm.engines import *
class DateFieldsTest(unittest.TestCase):
def setUp(self):
self.databas... | true | true |
1c118623336481332f38a74e1c1c179223f88e63 | 292 | py | Python | cleanup-issue.py | inductor/kwebsite-tools | 13af306d7f3fee16167a287481b3eb890a0bd41b | [
"MIT"
] | null | null | null | cleanup-issue.py | inductor/kwebsite-tools | 13af306d7f3fee16167a287481b3eb890a0bd41b | [
"MIT"
] | null | null | null | cleanup-issue.py | inductor/kwebsite-tools | 13af306d7f3fee16167a287481b3eb890a0bd41b | [
"MIT"
] | 1 | 2020-11-03T15:52:40.000Z | 2020-11-03T15:52:40.000Z | import os
import re
import argparse
from git import Repo
from github import Github
from jinja2 import Template
TEST_REPO = 'cstoku/kwebsite'
token = os.getenv('GITHUB_API_TOKEN')
g = Github(token)
repo = g.get_repo(TEST_REPO)
for issue in repo.get_issues():
issue.edit(state='closed')
| 18.25 | 37 | 0.763699 | import os
import re
import argparse
from git import Repo
from github import Github
from jinja2 import Template
TEST_REPO = 'cstoku/kwebsite'
token = os.getenv('GITHUB_API_TOKEN')
g = Github(token)
repo = g.get_repo(TEST_REPO)
for issue in repo.get_issues():
issue.edit(state='closed')
| true | true |
1c11871c885abe96dde1dccd20f68072697e49db | 491 | py | Python | Video2Frame2Video/PSNR&SSIM.py | tiandaodiaoyadetiangou/Learning | 6cd4b565eb9bea7475f2e39a51c6cf5ae339a380 | [
"Apache-2.0"
] | 1 | 2022-01-15T04:51:28.000Z | 2022-01-15T04:51:28.000Z | Video2Frame2Video/PSNR&SSIM.py | tiandaodiaoyadetiangou/Learning | 6cd4b565eb9bea7475f2e39a51c6cf5ae339a380 | [
"Apache-2.0"
] | null | null | null | Video2Frame2Video/PSNR&SSIM.py | tiandaodiaoyadetiangou/Learning | 6cd4b565eb9bea7475f2e39a51c6cf5ae339a380 | [
"Apache-2.0"
] | null | null | null | import cv2
from skimage.metrics import peak_signal_noise_ratio as compare_psnr
from skimage.metrics import structural_similarity as compare_ssim
img1 = cv2.imread(r'./pic/hr_pic/ 100.jpg')
img2 = cv2.imread(r'./pic/lr_pic/ 100.jpg')
def PSNR_SSIM(hr, pre):
psnr = compare_psnr(hr, pre)
ssim = co... | 30.6875 | 96 | 0.718941 | import cv2
from skimage.metrics import peak_signal_noise_ratio as compare_psnr
from skimage.metrics import structural_similarity as compare_ssim
img1 = cv2.imread(r'./pic/hr_pic/ 100.jpg')
img2 = cv2.imread(r'./pic/lr_pic/ 100.jpg')
def PSNR_SSIM(hr, pre):
psnr = compare_psnr(hr, pre)
ssim = co... | true | true |
1c11876bf8080ff33dabe6602cd130e9c54a8b94 | 468 | py | Python | pool/util.py | xdustinface/pool-reference | f8d628d2d5c7f1e93f86a5c03b8e020efe2924c6 | [
"Apache-2.0"
] | 1 | 2021-05-29T23:57:22.000Z | 2021-05-29T23:57:22.000Z | pool/util.py | xdustinface/pool-reference | f8d628d2d5c7f1e93f86a5c03b8e020efe2924c6 | [
"Apache-2.0"
] | 1 | 2021-07-01T21:56:42.000Z | 2021-07-01T21:56:42.000Z | pool/util.py | xdustinface/pool-reference | f8d628d2d5c7f1e93f86a5c03b8e020efe2924c6 | [
"Apache-2.0"
] | 1 | 2021-10-09T04:39:07.000Z | 2021-10-09T04:39:07.000Z | from chia.protocols.pool_protocol import PoolErrorCode, ErrorResponse
from chia.util.ints import uint16
from chia.util.json_util import obj_to_response
def error_response(code: PoolErrorCode, message: str):
error: ErrorResponse = ErrorResponse(uint16(code.value), message)
return obj_to_response(error)
def e... | 33.428571 | 69 | 0.792735 | from chia.protocols.pool_protocol import PoolErrorCode, ErrorResponse
from chia.util.ints import uint16
from chia.util.json_util import obj_to_response
def error_response(code: PoolErrorCode, message: str):
error: ErrorResponse = ErrorResponse(uint16(code.value), message)
return obj_to_response(error)
def e... | true | true |
1c11876e756653bd87a1a536e7be293565db6e3e | 4,036 | py | Python | Tests/Simulation/test_LSRPM_simulation.py | Eomys/Pyleecan | 4d7f0cbabf0311006963e7a2f435db2ecd901118 | [
"Apache-2.0"
] | 4 | 2017-11-27T10:14:34.000Z | 2018-09-20T11:30:32.000Z | Tests/Simulation/test_LSRPM_simulation.py | Eomys/Pyleecan | 4d7f0cbabf0311006963e7a2f435db2ecd901118 | [
"Apache-2.0"
] | null | null | null | Tests/Simulation/test_LSRPM_simulation.py | Eomys/Pyleecan | 4d7f0cbabf0311006963e7a2f435db2ecd901118 | [
"Apache-2.0"
] | null | null | null | # Load the machine
from os.path import join
from pyleecan.Classes.OPdq import OPdq
from pyleecan.Functions.load import load
from pyleecan.definitions import DATA_DIR
import matplotlib.pyplot as plt
import pytest
from os.path import join
from numpy import ones, pi, array, linspace, cos, sqrt, zeros
from pyleecan.Class... | 33.355372 | 88 | 0.658573 | from os.path import join
from pyleecan.Classes.OPdq import OPdq
from pyleecan.Functions.load import load
from pyleecan.definitions import DATA_DIR
import matplotlib.pyplot as plt
import pytest
from os.path import join
from numpy import ones, pi, array, linspace, cos, sqrt, zeros
from pyleecan.Classes.Simu1 import Sim... | true | true |
1c11878ad49aa343f67a3e6a04d0e999486f1bbb | 10 | py | Python | pmakeup/models/commons_types.py | Koldar/pmake | 85aca559b23cabc77dd657c5b645e26472b9e900 | [
"Apache-2.0"
] | null | null | null | pmakeup/models/commons_types.py | Koldar/pmake | 85aca559b23cabc77dd657c5b645e26472b9e900 | [
"Apache-2.0"
] | null | null | null | pmakeup/models/commons_types.py | Koldar/pmake | 85aca559b23cabc77dd657c5b645e26472b9e900 | [
"Apache-2.0"
] | null | null | null | path = str | 10 | 10 | 0.7 | path = str | true | true |
1c118801ae7e9d718820c2596cf9c17b32cce7e2 | 556 | py | Python | benchmarks/benchmark_rank.py | smheidrich/scikit-image | e9cf8b850c4c2800cc221be6f1dfff6a2a32a4eb | [
"BSD-3-Clause"
] | 2 | 2018-12-20T21:22:43.000Z | 2020-04-07T20:51:09.000Z | benchmarks/benchmark_rank.py | smheidrich/scikit-image | e9cf8b850c4c2800cc221be6f1dfff6a2a32a4eb | [
"BSD-3-Clause"
] | 1 | 2019-02-12T23:58:34.000Z | 2019-02-13T04:13:30.000Z | benchmarks/benchmark_rank.py | smheidrich/scikit-image | e9cf8b850c4c2800cc221be6f1dfff6a2a32a4eb | [
"BSD-3-Clause"
] | 3 | 2018-08-30T14:26:58.000Z | 2020-11-08T01:39:07.000Z | import numpy as np
from skimage import img_as_ubyte
from skimage.filters import rank
from skimage.filters.rank import __all__ as all_rank_filters
from skimage.morphology import grey, disk
class RankSuite(object):
param_names = ["filter", "shape"]
params = [sorted(all_rank_filters), [(32, 32), (256, 256)]]
... | 29.263158 | 74 | 0.701439 | import numpy as np
from skimage import img_as_ubyte
from skimage.filters import rank
from skimage.filters.rank import __all__ as all_rank_filters
from skimage.morphology import grey, disk
class RankSuite(object):
param_names = ["filter", "shape"]
params = [sorted(all_rank_filters), [(32, 32), (256, 256)]]
... | true | true |
1c118845170d529156b09f15f8fe630007033dc2 | 2,120 | py | Python | experiments/a2c_2way-single-intersection.py | hunsooni/sumo-rl | 92fb5716c22bf71e6fcf976c5e65c9e47f44a2fc | [
"MIT"
] | null | null | null | experiments/a2c_2way-single-intersection.py | hunsooni/sumo-rl | 92fb5716c22bf71e6fcf976c5e65c9e47f44a2fc | [
"MIT"
] | null | null | null | experiments/a2c_2way-single-intersection.py | hunsooni/sumo-rl | 92fb5716c22bf71e6fcf976c5e65c9e47f44a2fc | [
"MIT"
] | null | null | null |
####
#### ModuleNotFoundError: No module named 'stable_baselines'
#### pip install stable_baselines stable_baselines3
####
####
import os
import sys
import stable_baselines3.a2c.policies
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)
else:
sys... | 35.333333 | 118 | 0.658491 |
import os
import sys
import stable_baselines3.a2c.policies
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)
else:
sys.exit("Please declare the environment variable 'SUMO_HOME'")
from sumo_rl import SumoEnvironment
from sumo_rl.util.gen_route imp... | true | true |
1c11886508236dbc448bd44db4ca65a2e6c3f3fe | 13,113 | py | Python | CorrectOCR/tokens/list/_db.py | CopenhagenCityArchives/CorrectOCR | 1305fc82f82258dceae648b860bb9bb7315cddcc | [
"CC-BY-4.0"
] | 9 | 2019-06-02T14:29:54.000Z | 2022-03-31T15:12:12.000Z | CorrectOCR/tokens/list/_db.py | CopenhagenCityArchives/CorrectOCR | 1305fc82f82258dceae648b860bb9bb7315cddcc | [
"CC-BY-4.0"
] | 8 | 2020-01-13T03:37:39.000Z | 2020-11-25T12:26:18.000Z | CorrectOCR/tokens/list/_db.py | CopenhagenCityArchives/CorrectOCR | 1305fc82f82258dceae648b860bb9bb7315cddcc | [
"CC-BY-4.0"
] | 1 | 2020-01-09T08:59:42.000Z | 2020-01-09T08:59:42.000Z | from __future__ import annotations
import collections
import json
import logging
import traceback
import weakref
import pyodbc
import progressbar
import random
from ._super import TokenList
def close_connection(connection):
logging.getLogger(f'{__name__}.close_connection').debug(f'Closing connection... | 29.533784 | 183 | 0.635705 | from __future__ import annotations
import collections
import json
import logging
import traceback
import weakref
import pyodbc
import progressbar
import random
from ._super import TokenList
def close_connection(connection):
logging.getLogger(f'{__name__}.close_connection').debug(f'Closing connection... | true | true |
1c118964a55c4ef20be17a3ea7cf7c23168e5118 | 640 | gyp | Python | src/freertos/cm4.gyp | dartino/fletch | aa7aba8473f405dd49b9c81b0faeeebfa6e94fc8 | [
"BSD-3-Clause"
] | 144 | 2016-01-29T00:14:04.000Z | 2021-02-20T09:36:11.000Z | src/freertos/cm4.gyp | akashfoss/sdk | aa7aba8473f405dd49b9c81b0faeeebfa6e94fc8 | [
"BSD-3-Clause"
] | 241 | 2016-01-27T15:37:56.000Z | 2016-09-09T07:34:07.000Z | src/freertos/cm4.gyp | akashfoss/sdk | aa7aba8473f405dd49b9c81b0faeeebfa6e94fc8 | [
"BSD-3-Clause"
] | 30 | 2016-02-23T18:14:54.000Z | 2020-10-18T13:49:34.000Z | # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE.md file.
{
'targets': [
{
'target_name': 'demos',
'type': 'none',
'dependencies': ... | 26.666667 | 78 | 0.623438 |
{
'targets': [
{
'target_name': 'demos',
'type': 'none',
'dependencies': [
'stm32_cube_f4_demos.gyp:stm32f4_discovery_demonstrations',
'stm32_cube_f4_demos.gyp:stm32f411re_nucleo_demonstrations',
],
},
{
'target_name': 'nucleo_dartino',
'type': 'n... | true | true |
1c118a3554d1a4ed954ebfdac72e923a30fee8eb | 1,700 | py | Python | Python3/493.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 854 | 2018-11-09T08:06:16.000Z | 2022-03-31T06:05:53.000Z | Python3/493.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 29 | 2019-06-02T05:02:25.000Z | 2021-11-15T04:09:37.000Z | Python3/493.py | rakhi2001/ecom7 | 73790d44605fbd51e8f7e804b9808e364fcfc680 | [
"MIT"
] | 347 | 2018-12-23T01:57:37.000Z | 2022-03-12T14:51:21.000Z | __________________________________________________________________________________________________
sample 1396 ms submission
from bisect import bisect_right, insort_right
class Solution:
def reversePairs(self, nums):
if not nums: return 0
seen = []
res = 0
for x in nums:
... | 30.909091 | 98 | 0.549412 | __________________________________________________________________________________________________
sample 1396 ms submission
from bisect import bisect_right, insort_right
class Solution:
def reversePairs(self, nums):
if not nums: return 0
seen = []
res = 0
for x in nums:
... | false | true |
1c118a5eb279c6f3dd9d31a24130f2e5e1e86dce | 22,317 | py | Python | ingestion/src/metadata/ingestion/source/sample_data.py | allenhaozi/OpenMetadata | 8e82709a4832d08fea8c1130ef3d3c6ae183c02e | [
"Apache-2.0"
] | 1 | 2022-03-17T08:55:30.000Z | 2022-03-17T08:55:30.000Z | ingestion/src/metadata/ingestion/source/sample_data.py | allenhaozi/OpenMetadata | 8e82709a4832d08fea8c1130ef3d3c6ae183c02e | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/sample_data.py | allenhaozi/OpenMetadata | 8e82709a4832d08fea8c1130ef3d3c6ae183c02e | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software... | 40.502722 | 88 | 0.624815 |
import csv
import json
import logging
import os
import random
import uuid
from collections import namedtuple
from dataclasses import dataclass, field
from typing import Any, Dict, Iterable, List, Union
from pydantic import ValidationError
from metadata.config.common import ConfigModel
from metadata.generated.schema.... | true | true |
1c118aa18bd54ebce611e60911dd8148ea4a52b0 | 172 | py | Python | Overriding.py | juhyun0/python_class_Inheritance | 86fecde7ae87a9d8777c6c89e669c25b978e678c | [
"Unlicense"
] | null | null | null | Overriding.py | juhyun0/python_class_Inheritance | 86fecde7ae87a9d8777c6c89e669c25b978e678c | [
"Unlicense"
] | null | null | null | Overriding.py | juhyun0/python_class_Inheritance | 86fecde7ae87a9d8777c6c89e669c25b978e678c | [
"Unlicense"
] | null | null | null | class Car:
def ride(self):
print("Run")
class FlyingCar(Car):
def ride(self):
super().ride()
print("Fly")
my_car=FlyingCar()
my_car.ride() | 15.636364 | 22 | 0.563953 | class Car:
def ride(self):
print("Run")
class FlyingCar(Car):
def ride(self):
super().ride()
print("Fly")
my_car=FlyingCar()
my_car.ride() | true | true |
1c118d775506995c60dc0edca2f02c6e685c87ce | 4,181 | py | Python | model/sparse_switchable_norm.py | ZAKAUDD/-GEU-Net | 5251d329afb80c74328e72fd2fc21ff691ef3353 | [
"MIT"
] | 8 | 2021-05-17T05:30:51.000Z | 2021-12-21T01:08:09.000Z | model/sparse_switchable_norm.py | ZAKAUDD/-GEU-Net | 5251d329afb80c74328e72fd2fc21ff691ef3353 | [
"MIT"
] | 2 | 2021-05-17T07:25:20.000Z | 2021-09-29T12:42:00.000Z | model/sparse_switchable_norm.py | ZAKAUDD/-GEU-Net | 5251d329afb80c74328e72fd2fc21ff691ef3353 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from utils.ssn_utils import sparsestmax
class SSN2d(nn.Module):
def __init__(self, num_features, eps=1e-5, momentum=0.997, using_moving_average=True, last_gamma=False):
super(SSN2d, self).__init__()
self.eps = eps
self.momentum = momentum
... | 39.443396 | 112 | 0.58718 | import torch
import torch.nn as nn
from utils.ssn_utils import sparsestmax
class SSN2d(nn.Module):
def __init__(self, num_features, eps=1e-5, momentum=0.997, using_moving_average=True, last_gamma=False):
super(SSN2d, self).__init__()
self.eps = eps
self.momentum = momentum
... | true | true |
1c118eb81c80a26030f9eacfc022edf65033beac | 9,952 | py | Python | flaskr/myfiles.py | kshitijsingla11/apnadrive | 2d3ffee596bc4ad070f122ec37a280581159cdcd | [
"MIT"
] | null | null | null | flaskr/myfiles.py | kshitijsingla11/apnadrive | 2d3ffee596bc4ad070f122ec37a280581159cdcd | [
"MIT"
] | null | null | null | flaskr/myfiles.py | kshitijsingla11/apnadrive | 2d3ffee596bc4ad070f122ec37a280581159cdcd | [
"MIT"
] | null | null | null | from flask import (
Blueprint, current_app, flash, g, redirect, render_template, request, url_for, send_from_directory
)
import os
import io
import webbrowser
import shutil
from werkzeug.exceptions import abort
from werkzeug.utils import secure_filename
from flaskr.auth import login_required
from flaskr.db import g... | 34.675958 | 151 | 0.592946 | from flask import (
Blueprint, current_app, flash, g, redirect, render_template, request, url_for, send_from_directory
)
import os
import io
import webbrowser
import shutil
from werkzeug.exceptions import abort
from werkzeug.utils import secure_filename
from flaskr.auth import login_required
from flaskr.db import g... | true | true |
1c118fcd1b6a77dc4653df1da5d7930e56ba7b6c | 319 | py | Python | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial2_Solution_1227c45a.py | eduardojdiniz/CompNeuro | 20269e66540dc4e802273735c97323020ee37406 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 2,294 | 2020-05-11T12:05:35.000Z | 2022-03-28T21:23:34.000Z | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial2_Solution_1227c45a.py | pellet/course-content | bb383857992469e0e7a9c36639ac0d05e842d9bd | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 629 | 2020-05-11T15:42:26.000Z | 2022-03-29T12:23:35.000Z | tutorials/W1D5_DimensionalityReduction/solutions/W1D5_Tutorial2_Solution_1227c45a.py | pellet/course-content | bb383857992469e0e7a9c36639ac0d05e842d9bd | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 917 | 2020-05-11T12:47:53.000Z | 2022-03-31T12:14:41.000Z |
"""
1) As the absolute value of the correlation coefficient decreases, the two eigenvalues
become more similar (closer in value)
2) The two eigenvalues are extremely similar (basically equal) with a correlation coefficient of 0.
3) A correlation coefficient of 1 or -1 results in only one non-zero eigenvalues.
""" | 29 | 99 | 0.774295 | true | true | |
1c118fd73e3c922f62245b9788c19daa4fbbe253 | 145 | py | Python | tests.py | alphakilo7/shell.chat | 27a93c1121bc957d300cac7266327024a66f2640 | [
"MIT"
] | null | null | null | tests.py | alphakilo7/shell.chat | 27a93c1121bc957d300cac7266327024a66f2640 | [
"MIT"
] | null | null | null | tests.py | alphakilo7/shell.chat | 27a93c1121bc957d300cac7266327024a66f2640 | [
"MIT"
] | null | null | null | import socket
from INIParser import *
def run():
inir = INIParser("shellchat.ini")
print(inir.get_all())
if __name__ == "__main__":
run()
| 12.083333 | 34 | 0.682759 | import socket
from INIParser import *
def run():
inir = INIParser("shellchat.ini")
print(inir.get_all())
if __name__ == "__main__":
run()
| true | true |
1c1191ed45602b24fd64428b28d6c8c155b51e9b | 7,658 | py | Python | userbot/modules/anti_spambot.py | Gabuters-Dev/OUBnew | 73629488a0234736c49e8152ee46ad7c05d1cffa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/anti_spambot.py | Gabuters-Dev/OUBnew | 73629488a0234736c49e8152ee46ad7c05d1cffa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/anti_spambot.py | Gabuters-Dev/OUBnew | 73629488a0234736c49e8152ee46ad7c05d1cffa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # Copyright (C) 2019 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.c (the "License");
# you may not use this file except in compliance with the License.
#
""" A module for helping ban group join spammers. """
from asyncio import sleep
from requests import get
from teletho... | 37.539216 | 112 | 0.428441 |
from asyncio import sleep
from requests import get
from telethon.events import ChatAction
from telethon.tl.types import ChannelParticipantsAdmins, Message
from userbot import (
BOTLOG,
BOTLOG_CHATID,
CMD_HELP,
ANTI_SPAMBOT,
ANTI_SPAMBOT_SHOUT,
bot,
)
@bot.on(ChatAction)
async def ANTI_SPAMB... | true | true |
1c119234ca1066cf186e8e91fad1851035bce5cc | 9,541 | py | Python | Model/problem_formulation_2.py | ioannispapadogeo/flood_protection | c834b41569733ef30c944953004d4b62df31c767 | [
"MIT"
] | null | null | null | Model/problem_formulation_2.py | ioannispapadogeo/flood_protection | c834b41569733ef30c944953004d4b62df31c767 | [
"MIT"
] | null | null | null | Model/problem_formulation_2.py | ioannispapadogeo/flood_protection | c834b41569733ef30c944953004d4b62df31c767 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Mar 21 17:34:11 2018
@author: ciullo
"""
from __future__ import (unicode_literals, print_function, absolute_import,
division)
from ema_workbench import (Model, CategoricalParameter,
ScalarOutcome, IntegerParameter, RealPara... | 43.56621 | 127 | 0.554344 |
from __future__ import (unicode_literals, print_function, absolute_import,
division)
from ema_workbench import (Model, CategoricalParameter,
ScalarOutcome, IntegerParameter, RealParameter)
from dike_model_function import DikeNetwork
def sum_over(*args):
return... | true | true |
1c11927b2c137f71e637d5c58fbda60c01994c31 | 4,364 | py | Python | data_preprocessing/ml_data_preprocessing/utils.py | Byung-June/oil_future_forecasting | c94368e93cb6df52d53bdb3feb32265b922a0cd7 | [
"MIT"
] | null | null | null | data_preprocessing/ml_data_preprocessing/utils.py | Byung-June/oil_future_forecasting | c94368e93cb6df52d53bdb3feb32265b922a0cd7 | [
"MIT"
] | null | null | null | data_preprocessing/ml_data_preprocessing/utils.py | Byung-June/oil_future_forecasting | c94368e93cb6df52d53bdb3feb32265b922a0cd7 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.utils import shuffle
def add_name(list_, name):
list_ = list(list_)
for i, elt in enumerate(list_):
list_[i] = elt + name
return list_
def make_lag(df, num_lags=10, fillna=True):
concat = []
if fillna:
df = df.fillna(method='ffi... | 28.522876 | 68 | 0.628781 | import numpy as np
import pandas as pd
from sklearn.utils import shuffle
def add_name(list_, name):
list_ = list(list_)
for i, elt in enumerate(list_):
list_[i] = elt + name
return list_
def make_lag(df, num_lags=10, fillna=True):
concat = []
if fillna:
df = df.fillna(method='ffi... | true | true |
1c1193bff5aacd7c145bc051f5f42b63feb24813 | 382 | py | Python | app/config.py | Zehubiel/whitening | 093b53993d41c4c4f2fc591a7edd071a52bfd2b1 | [
"MIT"
] | null | null | null | app/config.py | Zehubiel/whitening | 093b53993d41c4c4f2fc591a7edd071a52bfd2b1 | [
"MIT"
] | null | null | null | app/config.py | Zehubiel/whitening | 093b53993d41c4c4f2fc591a7edd071a52bfd2b1 | [
"MIT"
] | null | null | null | from envparse import env
env.read_envfile()
API_ID = env.int('API_ID')
API_HASH = env.str('API_HASH')
USER_PHONE = env.str('USER_PHONE')
GITHUB_LINK = 'https://github.com/WhiteMemory99/telecharm-userbot'
GUIDE_LINK_RU = 'https://telegra.ph/Telecharm-prodvinutye-komandy-08-19'
GUIDE_LINK_EN = 'https://telegra.ph/Te... | 23.875 | 72 | 0.759162 | from envparse import env
env.read_envfile()
API_ID = env.int('API_ID')
API_HASH = env.str('API_HASH')
USER_PHONE = env.str('USER_PHONE')
GITHUB_LINK = 'https://github.com/WhiteMemory99/telecharm-userbot'
GUIDE_LINK_RU = 'https://telegra.ph/Telecharm-prodvinutye-komandy-08-19'
GUIDE_LINK_EN = 'https://telegra.ph/Te... | true | true |
1c119462f0dac03f93c9c73ad2041a1aabfc058c | 525 | py | Python | test/test_calc.py | arturogonzalezp/elections2018 | 4fae9b14881678fe62102d0582b90334606dde4d | [
"MIT"
] | null | null | null | test/test_calc.py | arturogonzalezp/elections2018 | 4fae9b14881678fe62102d0582b90334606dde4d | [
"MIT"
] | 13 | 2018-01-12T17:15:37.000Z | 2018-02-13T17:37:50.000Z | test/test_calc.py | arturogonzalezp/elections2018 | 4fae9b14881678fe62102d0582b90334606dde4d | [
"MIT"
] | 1 | 2018-01-24T12:52:39.000Z | 2018-01-24T12:52:39.000Z | import unittest
import calc
class TestCalc(unittest.TestCase):
def test_add(self):
result = calc.add(10, 5)
self.assertEqual(result, 15)
def test_substract(self):
result = calc.substract(10, 5)
self.assertEqual(result, 5)
def test_multiply(self):
result = calc... | 21 | 38 | 0.619048 | import unittest
import calc
class TestCalc(unittest.TestCase):
def test_add(self):
result = calc.add(10, 5)
self.assertEqual(result, 15)
def test_substract(self):
result = calc.substract(10, 5)
self.assertEqual(result, 5)
def test_multiply(self):
result = calc... | true | true |
1c11948f93aa0e19ae5a711b5a5ee5f5d6386eaf | 317 | py | Python | sysdfiles/target_file.py | ghuband/sysdfiles | eb13167b07b27351c3962a42b30dcd50ce551d71 | [
"MIT"
] | null | null | null | sysdfiles/target_file.py | ghuband/sysdfiles | eb13167b07b27351c3962a42b30dcd50ce551d71 | [
"MIT"
] | 1 | 2020-06-05T20:58:05.000Z | 2020-06-05T20:58:05.000Z | sysdfiles/target_file.py | ghuband/sysdfiles | eb13167b07b27351c3962a42b30dcd50ce551d71 | [
"MIT"
] | 1 | 2020-06-09T02:35:35.000Z | 2020-06-09T02:35:35.000Z | from .unit_file import UnitFile
# =============================================================================
# TargetFile
# =============================================================================
class TargetFile(UnitFile):
def __init__(self, file_name=''):
UnitFile.__init__(self, file_name)
| 28.818182 | 79 | 0.356467 | from .unit_file import UnitFile
class TargetFile(UnitFile):
def __init__(self, file_name=''):
UnitFile.__init__(self, file_name)
| true | true |
1c119579a46480a019a7ff4b8800bc2b2e66d979 | 939 | py | Python | caddy-gen/src/repos_test.py | ElectronicElephant/mirror-docker-unified | d8d006fd19a7d7ef497bc025665fc7ff6fec53f9 | [
"Apache-2.0"
] | 16 | 2020-11-03T03:14:02.000Z | 2021-02-06T11:21:41.000Z | caddy-gen/src/repos_test.py | ElectronicElephant/mirror-docker-unified | d8d006fd19a7d7ef497bc025665fc7ff6fec53f9 | [
"Apache-2.0"
] | 34 | 2020-11-02T15:57:46.000Z | 2021-02-11T03:11:32.000Z | caddy-gen/src/repos_test.py | ElectronicElephant/mirror-docker-unified | d8d006fd19a7d7ef497bc025665fc7ff6fec53f9 | [
"Apache-2.0"
] | 4 | 2021-03-30T06:54:37.000Z | 2022-01-09T10:17:57.000Z | from repos import *
from build_blocks import *
def test_file_server_repo():
repo = FileServerRepo("centos", "/srv/disk1/centos")
node = Node('file_server /centos/* browse', [
Node('root /srv/disk1', []),
Node('hide .*', [])
])
assert str(Node("", repo.as_repo())) == str(Node("", [node])... | 34.777778 | 102 | 0.556976 | from repos import *
from build_blocks import *
def test_file_server_repo():
repo = FileServerRepo("centos", "/srv/disk1/centos")
node = Node('file_server /centos/* browse', [
Node('root /srv/disk1', []),
Node('hide .*', [])
])
assert str(Node("", repo.as_repo())) == str(Node("", [node])... | true | true |
1c1195d740c673c4fbbe9bca08ba0a97d7c2e035 | 17,646 | py | Python | backend/tests/test_study.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | null | null | null | backend/tests/test_study.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | 368 | 2018-12-18T14:43:20.000Z | 2022-03-02T02:54:18.000Z | backend/tests/test_study.py | sartography/star-drive | c0f33378d42913c3e677e07f74eb46d7b2b82a0a | [
"MIT"
] | 2 | 2019-10-02T03:06:06.000Z | 2020-10-05T16:53:48.000Z | import unittest
from flask import json
from tests.base_test import BaseTest
from app import db
from app.email_service import TEST_MESSAGES
from app.model.email_log import EmailLog
from app.model.investigator import Investigator
from app.model.participant import Relationship
from app.model.questionnaires.identification_... | 44.225564 | 151 | 0.629208 | import unittest
from flask import json
from tests.base_test import BaseTest
from app import db
from app.email_service import TEST_MESSAGES
from app.model.email_log import EmailLog
from app.model.investigator import Investigator
from app.model.participant import Relationship
from app.model.questionnaires.identification_... | true | true |
1c11964c3272ad5da4738917ed7c121dd167da0d | 3,074 | py | Python | pages/predictions1.py | malexmad/League-Of-Legend-App | 94b6957d462ee29f5536112af39c04093faa92b7 | [
"MIT"
] | 1 | 2019-07-29T21:44:53.000Z | 2019-07-29T21:44:53.000Z | pages/predictions1.py | MAL3X-01/League-Of-Legend-App | 94b6957d462ee29f5536112af39c04093faa92b7 | [
"MIT"
] | 4 | 2020-03-24T17:24:49.000Z | 2021-08-23T20:09:44.000Z | pages/predictions1.py | malexmad/League-Of-Legend-App | 94b6957d462ee29f5536112af39c04093faa92b7 | [
"MIT"
] | null | null | null | import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from joblib import load
pipe3 = load('assets/pipe3.joblib')
from app import app
CHANGE_COLOR = {'color': 'black',}
column1 = dbc.Col(
[
dc... | 29.84466 | 97 | 0.490241 | import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output
from joblib import load
pipe3 = load('assets/pipe3.joblib')
from app import app
CHANGE_COLOR = {'color': 'black',}
column1 = dbc.Col(
[
dc... | true | true |
1c11968c162aa7e5df261aee356ecb7ab9b5f400 | 1,265 | py | Python | great_expectations/expectations/metrics/multicolumn_map_metrics/compound_columns_unique.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | 1 | 2021-10-02T06:59:48.000Z | 2021-10-02T06:59:48.000Z | great_expectations/expectations/metrics/multicolumn_map_metrics/compound_columns_unique.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | null | null | null | great_expectations/expectations/metrics/multicolumn_map_metrics/compound_columns_unique.py | victorcouste/great_expectations | 9ee46d83feb87e13c769e2ae35b899b3f18d73a4 | [
"Apache-2.0"
] | null | null | null | from great_expectations.execution_engine import (
PandasExecutionEngine,
SparkDFExecutionEngine,
SqlAlchemyExecutionEngine,
)
from great_expectations.expectations.metrics.import_manager import F, Window, sa
from great_expectations.expectations.metrics.map_metric_provider import (
MulticolumnMapMetricPro... | 34.189189 | 107 | 0.72332 | from great_expectations.execution_engine import (
PandasExecutionEngine,
SparkDFExecutionEngine,
SqlAlchemyExecutionEngine,
)
from great_expectations.expectations.metrics.import_manager import F, Window, sa
from great_expectations.expectations.metrics.map_metric_provider import (
MulticolumnMapMetricPro... | true | true |
1c1196d6f83510044c6acb93d042016699dc1d84 | 18,507 | py | Python | src/orion/algo/zero_order_momentum/_version.py | bouthilx/orion.algo.zero_order_momentum | e74c62f9905f723b28c9d15261516e21739fd773 | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/zero_order_momentum/_version.py | bouthilx/orion.algo.zero_order_momentum | e74c62f9905f723b28c9d15261516e21739fd773 | [
"BSD-3-Clause"
] | null | null | null | src/orion/algo/zero_order_momentum/_version.py | bouthilx/orion.algo.zero_order_momentum | e74c62f9905f723b28c9d15261516e21739fd773 | [
"BSD-3-Clause"
] | null | null | null |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.522073 | 79 | 0.585454 |
import errno
import os
import re
import subprocess
import sys
def get_keywords():
git_refnames = "$Format:%d$"
git_full = "$Format:%H$"
git_date = "$Format:%ci$"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
class VersioneerConfig:
... | true | true |
1c1196f12596b3af8f0b4f602fb38d5bf6dae045 | 130 | py | Python | configs/classification/imagenet/van/van_base_8xb128_fp16_ep300.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 10 | 2021-12-30T10:22:27.000Z | 2022-03-30T02:31:38.000Z | configs/classification/imagenet/van/van_base_8xb128_fp16_ep300.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | 3 | 2022-01-20T21:02:48.000Z | 2022-03-19T13:49:45.000Z | configs/classification/imagenet/van/van_base_8xb128_fp16_ep300.py | Westlake-AI/openmixup | ea81250819e740dd823e30cb7ce382d14a3c1b91 | [
"Apache-2.0"
] | null | null | null | _base_ = './van_small_8xb128_fp16_ep300.py'
# model settings
model = dict(
backbone=dict(arch='base', drop_path_rate=0.1),
)
| 18.571429 | 51 | 0.715385 | _base_ = './van_small_8xb128_fp16_ep300.py'
model = dict(
backbone=dict(arch='base', drop_path_rate=0.1),
)
| true | true |
1c1197047014caa2852ac52d7782868ada7fe276 | 1,656 | py | Python | pdfrw/pdfcompress.py | kulbirsaini/pdfrw-fork | 002d1849b65ca06bb0b7118cc5efb8745e542f3e | [
"MIT"
] | null | null | null | pdfrw/pdfcompress.py | kulbirsaini/pdfrw-fork | 002d1849b65ca06bb0b7118cc5efb8745e542f3e | [
"MIT"
] | null | null | null | pdfrw/pdfcompress.py | kulbirsaini/pdfrw-fork | 002d1849b65ca06bb0b7118cc5efb8745e542f3e | [
"MIT"
] | null | null | null | # A part of pdfrw (pdfrw.googlecode.com)
# Copyright (C) 2006-2009 Patrick Maupin, Austin, Texas
# MIT license -- See LICENSE.txt for details
'''
Currently, this sad little file only knows how to decompress
using the flate (zlib) algorithm. Maybe more later, but it's
not a priority for me...
'''
from __future__ impo... | 28.551724 | 107 | 0.61413 |
'''
Currently, this sad little file only knows how to decompress
using the flate (zlib) algorithm. Maybe more later, but it's
not a priority for me...
'''
from __future__ import generators
try:
set
except NameError:
from sets import Set as set
import zlib
from pdfobjects import PdfDict, PdfName
def strea... | false | true |
1c1197150e3b8300423e5c7c8da483c44b63659f | 18,496 | py | Python | google/cloud/dataproc_v1/services/job_controller/transports/grpc.py | medb/python-dataproc | 6a2a9afb3d0fc81b9abffa70c31746f6ca428aba | [
"Apache-2.0"
] | 34 | 2020-06-12T05:25:02.000Z | 2022-03-13T22:14:12.000Z | google/cloud/dataproc_v1/services/job_controller/transports/grpc.py | medb/python-dataproc | 6a2a9afb3d0fc81b9abffa70c31746f6ca428aba | [
"Apache-2.0"
] | 104 | 2020-02-05T12:35:54.000Z | 2022-03-30T23:17:03.000Z | google/cloud/dataproc_v1/services/job_controller/transports/grpc.py | medb/python-dataproc | 6a2a9afb3d0fc81b9abffa70c31746f6ca428aba | [
"Apache-2.0"
] | 23 | 2020-02-05T23:13:14.000Z | 2022-03-29T22:56:44.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.316159 | 124 | 0.629542 | import warnings
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
from google.api_core import grpc_helpers
from google.api_core import operations_v1
from google.api_core import gapic_v1
import google.auth from google.auth import credentials as ga_credentials from google.auth.transport.grpc import S... | true | true |
1c1197f2164d2f235ebe962eaf0c134bf53b6c7e | 1,504 | py | Python | torchbenchmark/models/resnext50_32x4d/__init__.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | null | null | null | torchbenchmark/models/resnext50_32x4d/__init__.py | puririshi98/benchmark | 79f554f1e1cf36f62994c78e0e6e5b360f554022 | [
"BSD-3-Clause"
] | 1 | 2021-04-17T11:24:26.000Z | 2021-04-17T11:28:49.000Z | torchbenchmark/models/resnext50_32x4d/__init__.py | isabella232/benchmark-3 | 9d75577382089b742a972800c7c892f831910d91 | [
"BSD-3-Clause"
] | null | null | null |
# Generated by gen_torchvision_benchmark.py
import torch
import torch.optim as optim
import torchvision.models as models
from ...util.model import BenchmarkModel
from torchbenchmark.tasks import COMPUTER_VISION
class Model(BenchmarkModel):
task = COMPUTER_VISION.CLASSIFICATION
def __init__(self, device=None, ... | 32.695652 | 103 | 0.648936 |
import torch
import torch.optim as optim
import torchvision.models as models
from ...util.model import BenchmarkModel
from torchbenchmark.tasks import COMPUTER_VISION
class Model(BenchmarkModel):
task = COMPUTER_VISION.CLASSIFICATION
def __init__(self, device=None, jit=False):
super().__init__()
... | true | true |
1c11994ea45238743fab24899bbf05f8943e4369 | 4,828 | py | Python | isi_sdk_8_2_1/isi_sdk_8_2_1/models/healthcheck_parameter_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/healthcheck_parameter_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/healthcheck_parameter_create_params.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_1.models.healthc... | 27.588571 | 94 | 0.574565 |
import pprint
import re
import six
from isi_sdk_8_2_1.models.healthcheck_parameter import HealthcheckParameter
class HealthcheckParameterCreateParams(object):
swagger_types = {
'id': 'str',
'name': 'str',
'value': 'str'
}
attribute_map = {
'id': 'id',
'name... | true | true |
1c119a220b9c19a398dab11c232f5c8d2024d1d0 | 1,048 | py | Python | src/unigo/tests.py | MMSB-MOBI/unigo | c82a92799a2d6347fe87c01bb135c7bde89d816c | [
"MIT"
] | null | null | null | src/unigo/tests.py | MMSB-MOBI/unigo | c82a92799a2d6347fe87c01bb135c7bde89d816c | [
"MIT"
] | 2 | 2021-03-22T17:08:24.000Z | 2021-03-23T13:50:39.000Z | src/unigo/tests.py | MMSB-MOBI/unigo | c82a92799a2d6347fe87c01bb135c7bde89d816c | [
"MIT"
] | null | null | null | from .utils import loadUniprotCollection
from . import Unigo as createGOTreeTest
DEFAULT_PROTEOME=f"{os.path.dirname(os.path.abspath(__file__))}/data/uniprot-proteome_UP000000807.xml.gz"
def run(nDummy=50, nTop=10, target='fisher'):
print(f"Testing local implementation of {target}")
print(f"Loading test p... | 41.92 | 105 | 0.651718 | from .utils import loadUniprotCollection
from . import Unigo as createGOTreeTest
DEFAULT_PROTEOME=f"{os.path.dirname(os.path.abspath(__file__))}/data/uniprot-proteome_UP000000807.xml.gz"
def run(nDummy=50, nTop=10, target='fisher'):
print(f"Testing local implementation of {target}")
print(f"Loading test p... | true | true |
1c119a44e7c2bfa47ef82ce3702b6c6fd1184a06 | 1,638 | py | Python | xv_leak_tools/test_components/route/linux/linux_route.py | UAEKondaya1/expressvpn_leak_testing | 9e4cee899ac04f7820ac351fa55efdc0c01370ba | [
"MIT"
] | 219 | 2017-12-12T09:42:46.000Z | 2022-03-13T08:25:13.000Z | xv_leak_tools/test_components/route/linux/linux_route.py | UAEKondaya1/expressvpn_leak_testing | 9e4cee899ac04f7820ac351fa55efdc0c01370ba | [
"MIT"
] | 11 | 2017-12-14T08:14:51.000Z | 2021-08-09T18:37:45.000Z | xv_leak_tools/test_components/route/linux/linux_route.py | UAEKondaya1/expressvpn_leak_testing | 9e4cee899ac04f7820ac351fa55efdc0c01370ba | [
"MIT"
] | 45 | 2017-12-14T07:26:36.000Z | 2022-03-11T09:36:56.000Z | import netaddr
import re
from xv_leak_tools.exception import XVEx
from xv_leak_tools.test_components.route.route import Route, RouteEntry
from xv_leak_tools.test_device.connector_helper import ConnectorHelper
class LinuxRoute(Route):
PROG_ROW = re.compile(
r"^([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+(... | 38.093023 | 102 | 0.542125 | import netaddr
import re
from xv_leak_tools.exception import XVEx
from xv_leak_tools.test_components.route.route import Route, RouteEntry
from xv_leak_tools.test_device.connector_helper import ConnectorHelper
class LinuxRoute(Route):
PROG_ROW = re.compile(
r"^([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+([^\s]+)\s+(... | true | true |
1c119a4574a2b5303349fa49ac0587ecffe1dff4 | 14,027 | py | Python | openid/fetchers.py | Multiposting/python-openid | 87f2860b77ff4c346d6fbfdb386dc09d05cf481d | [
"Apache-2.0"
] | 39 | 2015-06-10T23:18:07.000Z | 2021-10-21T04:29:06.000Z | openid/fetchers.py | Multiposting/python-openid | 87f2860b77ff4c346d6fbfdb386dc09d05cf481d | [
"Apache-2.0"
] | 37 | 2015-01-28T20:58:05.000Z | 2016-03-22T04:01:32.000Z | openid/fetchers.py | Multiposting/python-openid | 87f2860b77ff4c346d6fbfdb386dc09d05cf481d | [
"Apache-2.0"
] | 26 | 2015-06-10T22:09:15.000Z | 2021-06-27T15:45:15.000Z | # -*- test-case-name: openid.test.test_fetchers -*-
"""
This module contains the HTTP fetcher interface and several implementations.
"""
__all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse',
'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError',
'HTTPError']
import urll... | 32.545244 | 79 | 0.609111 | """
This module contains the HTTP fetcher interface and several implementations.
"""
__all__ = ['fetch', 'getDefaultFetcher', 'setDefaultFetcher', 'HTTPResponse',
'HTTPFetcher', 'createHTTPFetcher', 'HTTPFetchingError',
'HTTPError']
import urllib2
import time
import cStringIO
import sys
import ... | false | true |
1c119a84c294dd6de967b3fd81b9deb77c4d7aac | 1,812 | py | Python | kitsune/users/tests/test_utils.py | theresnotime/kitsune | 0757b267b0d332264167d31ce84e342263e1c635 | [
"BSD-3-Clause"
] | null | null | null | kitsune/users/tests/test_utils.py | theresnotime/kitsune | 0757b267b0d332264167d31ce84e342263e1c635 | [
"BSD-3-Clause"
] | null | null | null | kitsune/users/tests/test_utils.py | theresnotime/kitsune | 0757b267b0d332264167d31ce84e342263e1c635 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib.auth.models import User
from kitsune.sumo.tests import TestCase
from kitsune.users.utils import suggest_username
class UtilsTestCase(TestCase):
def test_suggest_username(self):
self.assertEqual("someuser", suggest_username("someuser@test.com"))
User.objects.create(username="s... | 37.75 | 75 | 0.68819 | from django.contrib.auth.models import User
from kitsune.sumo.tests import TestCase
from kitsune.users.utils import suggest_username
class UtilsTestCase(TestCase):
def test_suggest_username(self):
self.assertEqual("someuser", suggest_username("someuser@test.com"))
User.objects.create(username="s... | true | true |
1c119aa36bf52eeadc977e506d0063877bc13404 | 167 | py | Python | tests/launchagents/examples/write.py | looking-for-a-job/launchagents.py | 38b0f1d109b67d5828a8441acdb56b4fffc43aa2 | [
"Unlicense"
] | 2 | 2020-07-30T19:19:52.000Z | 2020-11-22T01:42:23.000Z | tests/launchagents/examples/write.py | andrewp-as-is/launchagents.py | 38b0f1d109b67d5828a8441acdb56b4fffc43aa2 | [
"Unlicense"
] | 1 | 2019-03-12T05:14:01.000Z | 2019-03-13T07:45:47.000Z | tests/launchagents/examples/write.py | andrewp-as-is/launchagents.py | 38b0f1d109b67d5828a8441acdb56b4fffc43aa2 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import launchagents
path = "/tmp/write.plist"
data = {"Label": "Example"}
launchagents.write(path, data)
assert data == launchagents.read(path)
| 20.875 | 38 | 0.724551 | import launchagents
path = "/tmp/write.plist"
data = {"Label": "Example"}
launchagents.write(path, data)
assert data == launchagents.read(path)
| true | true |
1c119b9c0a3ac790c4f9e83967be08d4fc2afee8 | 4,738 | py | Python | main.py | sohaibrahman64/grocery-scraper | bc0bed4716aa55a28b8861c2cb8dfdab52e008a0 | [
"Apache-2.0"
] | 1 | 2022-03-03T07:44:12.000Z | 2022-03-03T07:44:12.000Z | main.py | sohaibrahman64/grocery-scraper | bc0bed4716aa55a28b8861c2cb8dfdab52e008a0 | [
"Apache-2.0"
] | null | null | null | main.py | sohaibrahman64/grocery-scraper | bc0bed4716aa55a28b8861c2cb8dfdab52e008a0 | [
"Apache-2.0"
] | null | null | null | from categories_scraper.categories_scraper import CategoriesScraper
from home_scraper import HomeScraper
from categories_menu_scraper import CategoriesMenuScraper
from single_product_scraper import SingleProductScraper
from categories_scraper.single_product_category_scraper import SingleProductCategoryScraper
fr... | 34.583942 | 99 | 0.708738 | from categories_scraper.categories_scraper import CategoriesScraper
from home_scraper import HomeScraper
from categories_menu_scraper import CategoriesMenuScraper
from single_product_scraper import SingleProductScraper
from categories_scraper.single_product_category_scraper import SingleProductCategoryScraper
fr... | true | true |
1c119cd4f6ceeca5aa324cb22fc3ad8657651718 | 386 | py | Python | dwitter/migrations/0009_auto_20160816_1952.py | moonrisewarrior/dwitter | b2a3b7690f345d3741fa939185028ff01ab51680 | [
"Apache-2.0"
] | 714 | 2015-12-30T01:20:54.000Z | 2022-03-29T17:20:10.000Z | dwitter/migrations/0009_auto_20160816_1952.py | moonrisewarrior/dwitter | b2a3b7690f345d3741fa939185028ff01ab51680 | [
"Apache-2.0"
] | 341 | 2015-12-30T00:30:17.000Z | 2022-02-17T06:34:13.000Z | dwitter/migrations/0009_auto_20160816_1952.py | moonrisewarrior/dwitter | b2a3b7690f345d3741fa939185028ff01ab51680 | [
"Apache-2.0"
] | 95 | 2016-01-26T17:15:42.000Z | 2021-11-23T13:09:10.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dwitter', '0008_auto_20160520_0437'),
]
operations = [
migrations.AlterField(
model_name='dweet',
na... | 19.3 | 47 | 0.590674 | from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dwitter', '0008_auto_20160520_0437'),
]
operations = [
migrations.AlterField(
model_name='dweet',
name='code',
f... | true | true |
1c119d2f7cb7ddc9774999c688b538173358b02a | 10,366 | py | Python | acq4/util/igorpro.py | campagnola/acq4 | 09699c07d8949950f6df149cf17892aaa3a37402 | [
"MIT"
] | 47 | 2015-01-05T16:18:10.000Z | 2022-03-16T13:09:30.000Z | acq4/util/igorpro.py | acq4/acq4 | c77636a76d68ffa1bc7dbd41edc522e523b909b8 | [
"MIT"
] | 48 | 2015-04-19T16:51:41.000Z | 2022-03-31T14:48:16.000Z | acq4/util/igorpro.py | acq4/acq4 | c77636a76d68ffa1bc7dbd41edc522e523b909b8 | [
"MIT"
] | 32 | 2015-01-15T14:11:49.000Z | 2021-07-15T13:44:52.000Z | from __future__ import print_function
import sys
import win32com.client
import pywintypes
import pythoncom
import numpy as np
import subprocess as sp
import concurrent.futures
import atexit
import json
import zmq
import os
from six.moves import range
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')... | 30.85119 | 110 | 0.57679 | from __future__ import print_function
import sys
import win32com.client
import pywintypes
import pythoncom
import numpy as np
import subprocess as sp
import concurrent.futures
import atexit
import json
import zmq
import os
from six.moves import range
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')... | true | true |
1c119d6282e07a22b49176d0f6616aca7099e5dc | 3,159 | py | Python | options/base_option.py | lime-j/YTMT-Strategy-1 | aacc38c4e61b91e187cac81aa95500e0422d4d0f | [
"Apache-2.0"
] | 26 | 2021-11-08T07:49:34.000Z | 2022-03-28T14:09:27.000Z | options/base_option.py | lime-j/YTMT-Strategy-1 | aacc38c4e61b91e187cac81aa95500e0422d4d0f | [
"Apache-2.0"
] | 2 | 2021-10-22T02:53:10.000Z | 2021-12-29T12:35:13.000Z | options/base_option.py | lime-j/YTMT-Strategy-1 | aacc38c4e61b91e187cac81aa95500e0422d4d0f | [
"Apache-2.0"
] | 1 | 2021-10-18T08:00:22.000Z | 2021-10-18T08:00:22.000Z | import argparse
import models
model_names = sorted(name for name in models.__dict__
if name.islower() and not name.startswith("__")
and callable(models.__dict__[name]))
class BaseOptions():
def __init__(self):
self.parser = argparse.ArgumentParser(formatter_class... | 65.8125 | 174 | 0.652738 | import argparse
import models
model_names = sorted(name for name in models.__dict__
if name.islower() and not name.startswith("__")
and callable(models.__dict__[name]))
class BaseOptions():
def __init__(self):
self.parser = argparse.ArgumentParser(formatter_class... | true | true |
1c11a09e91a9f24c73ca32bb8e2bc358e52c7c63 | 2,277 | py | Python | bookstore/__init__.py | JanhaviSoni/Book-Recommendation-Analysis | d2697e1f2eb9b9b4e0bafc0dd43d486ceb3d1707 | [
"MIT"
] | 23 | 2021-01-15T15:46:45.000Z | 2021-11-16T12:26:58.000Z | bookstore/__init__.py | JanhaviSoni/Book-Recommendation-Analysis | d2697e1f2eb9b9b4e0bafc0dd43d486ceb3d1707 | [
"MIT"
] | 108 | 2021-01-13T11:02:31.000Z | 2022-03-21T17:47:24.000Z | bookstore/__init__.py | JanhaviSoni/Book-Recommendation-Analysis | d2697e1f2eb9b9b4e0bafc0dd43d486ceb3d1707 | [
"MIT"
] | 46 | 2021-01-14T17:27:28.000Z | 2022-03-20T10:12:24.000Z |
from flask import Flask, Response
from flask_basicauth import BasicAuth
from flask_cors import CORS, cross_origin
import os
#from flask_admin import Admin,AdminIndexView
#from flask_admin.contrib.sqla import ModelView
from flask_sqlalchemy import SQLAlchemy as _BaseSQLAlchemy
from flask_migrate import Migrate, Migr... | 25.021978 | 104 | 0.798858 |
from flask import Flask, Response
from flask_basicauth import BasicAuth
from flask_cors import CORS, cross_origin
import os
from flask_sqlalchemy import SQLAlchemy as _BaseSQLAlchemy
from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager
from werkzeug.exceptions import HTTPException
from... | true | true |
1c11a0b60467f8d5a92607dd4be45e5dd6a96745 | 2,207 | py | Python | server.py | nahidsaikat/Socket-Programming | 689c495439795c25f22d3bb296335b492d11d16d | [
"MIT"
] | null | null | null | server.py | nahidsaikat/Socket-Programming | 689c495439795c25f22d3bb296335b492d11d16d | [
"MIT"
] | null | null | null | server.py | nahidsaikat/Socket-Programming | 689c495439795c25f22d3bb296335b492d11d16d | [
"MIT"
] | null | null | null | import socket
import select
import sys
from thread import *
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
IP_address = '127.0.0.1'
Port = 65432
server.bind((IP_address, Port))
server.listen(100)
list_of_clients = []
dict_of_clients... | 25.662791 | 87 | 0.545084 | import socket
import select
import sys
from thread import *
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
IP_address = '127.0.0.1'
Port = 65432
server.bind((IP_address, Port))
server.listen(100)
list_of_clients = []
dict_of_clients... | false | true |
1c11a0daaa775c0c1c7b933b4fa87b867a60ae52 | 14,294 | py | Python | sktime/classification/compose/_pipeline.py | tarpas/sktime | a46596f6e7756d3ca5c0e617c0b61f561eacf280 | [
"BSD-3-Clause"
] | null | null | null | sktime/classification/compose/_pipeline.py | tarpas/sktime | a46596f6e7756d3ca5c0e617c0b61f561eacf280 | [
"BSD-3-Clause"
] | null | null | null | sktime/classification/compose/_pipeline.py | tarpas/sktime | a46596f6e7756d3ca5c0e617c0b61f561eacf280 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Pipeline with a classifier."""
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
import numpy as np
from sklearn.base import clone
from sktime.base import _HeterogenousMetaEstimator
from sktime.classification.base import BaseClassifier
from sktime.transformations.base i... | 41.312139 | 88 | 0.651462 | import numpy as np
from sklearn.base import clone
from sktime.base import _HeterogenousMetaEstimator
from sktime.classification.base import BaseClassifier
from sktime.transformations.base import BaseTransformer
from sktime.transformations.compose import TransformerPipeline
__author__ = ["fkiraly"]
__all__ = ["Classif... | true | true |
1c11a0fc6f1c4ea8a384f5ac4bec101119e19a4a | 1,858 | py | Python | pajbot/managers/bottoken.py | KasperHelsted/pajbot | c366dcfc5e6076f9adcfce24c7a666653068b031 | [
"MIT"
] | null | null | null | pajbot/managers/bottoken.py | KasperHelsted/pajbot | c366dcfc5e6076f9adcfce24c7a666653068b031 | [
"MIT"
] | null | null | null | pajbot/managers/bottoken.py | KasperHelsted/pajbot | c366dcfc5e6076f9adcfce24c7a666653068b031 | [
"MIT"
] | 1 | 2020-03-11T19:37:10.000Z | 2020-03-11T19:37:10.000Z | import datetime
import json
import logging
import requests
from pajbot import utils
from pajbot.managers.redis import RedisManager
log = logging.getLogger(__name__)
class BotToken:
def __init__(self, config):
self.nickname = config["main"]["nickname"]
self.client_id = config["webtwitchapi"]["cl... | 34.407407 | 111 | 0.603875 | import datetime
import json
import logging
import requests
from pajbot import utils
from pajbot.managers.redis import RedisManager
log = logging.getLogger(__name__)
class BotToken:
def __init__(self, config):
self.nickname = config["main"]["nickname"]
self.client_id = config["webtwitchapi"]["cl... | true | true |
1c11a2d2066550221eaa9f2ed4b8e40a4e080d61 | 4,374 | py | Python | tests/h/services/document_test.py | julien-cheng/h | 36c8ec044725720cf36f0986cdf025395aca8929 | [
"BSD-2-Clause"
] | 2 | 2019-08-04T07:22:11.000Z | 2020-07-17T05:01:41.000Z | tests/h/services/document_test.py | fuelpress/i.fuel.press | af7b25895d813af0fef656dcf483afe852a99d76 | [
"BSD-2-Clause"
] | null | null | null | tests/h/services/document_test.py | fuelpress/i.fuel.press | af7b25895d813af0fef656dcf483afe852a99d76 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
from h.services.document import DocumentService
class TestFetchByGroupid(object):
def test_it_returns_documents_annotated_within_group(
self, svc, groups, annotations, matchers
):
docs = svc.fetch_by_groupid(group... | 34.440945 | 86 | 0.691815 |
from __future__ import unicode_literals
import pytest
from h.services.document import DocumentService
class TestFetchByGroupid(object):
def test_it_returns_documents_annotated_within_group(
self, svc, groups, annotations, matchers
):
docs = svc.fetch_by_groupid(groupid=groups["target_group"... | true | true |
1c11a34d5091c3888b352fb7cca0190114c2cba7 | 4,882 | py | Python | doc/source/conf.py | nofriiza/octavia-dashboard | 866151ea184e2504227fd1eb7fcff09d8fa7eeff | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | nofriiza/octavia-dashboard | 866151ea184e2504227fd1eb7fcff09d8fa7eeff | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | nofriiza/octavia-dashboard | 866151ea184e2504227fd1eb7fcff09d8fa7eeff | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software... | 28.717647 | 79 | 0.707702 |
import datetime
import logging
import os
import sys
import django
sys.path.insert(0, os.path.abspath('../..'))
sys.path.insert(0, os.path.abspath('.'))
logging.getLogger('openstack_dashboard.settings').setLevel(logging.ERROR)
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openstack_dashboard.settings')
django.s... | true | true |
1c11a53dcb236a5ed2f11ee3f68b4f18065d8266 | 7,223 | py | Python | huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/model/list_function_trigger_result.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/model/list_function_trigger_result.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-functiongraph/huaweicloudsdkfunctiongraph/v2/model/list_function_trigger_result.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class ListFunctionTriggerResult:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and th... | 30.095833 | 233 | 0.609719 |
import pprint
import re
import six
class ListFunctionTriggerResult:
sensitive_list = []
openapi_types = {
'trigger_id': 'str',
'trigger_type_code': 'str',
'trigger_status': 'str',
'event_data': 'object',
'last_updated_time': 'datetime',
'created_time': ... | true | true |
1c11a69a3a5a37d466d40ea2f294d095f167cdff | 3,076 | py | Python | test/lib/usd/translators/testUsdExportMultiMaterial.py | mattyjams/maya-usd | d847d136374e792e7482a93b41445f6d4688bc55 | [
"Apache-2.0"
] | 1 | 2020-05-30T13:37:34.000Z | 2020-05-30T13:37:34.000Z | test/lib/usd/translators/testUsdExportMultiMaterial.py | dgovil/maya-usd | 04f2c94ccd5bf13286d690633d07c095024109e3 | [
"Apache-2.0"
] | null | null | null | test/lib/usd/translators/testUsdExportMultiMaterial.py | dgovil/maya-usd | 04f2c94ccd5bf13286d690633d07c095024109e3 | [
"Apache-2.0"
] | 2 | 2020-10-24T00:41:18.000Z | 2021-02-24T07:05:47.000Z | #!/usr/bin/env mayapy
#
# Copyright 2021 Autodesk
#
# 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 a... | 34.177778 | 89 | 0.675878 |
from pxr import Usd
from pxr import UsdShade
from maya import cmds
from maya import standalone
import mayaUsd.lib as mayaUsdLib
import os
import unittest
import fixturesUtils
class testUsdExportMaterialX(unittest.TestCase):
@classmethod
def setUpClass(cls):
inputPath = fixturesUtils.setUpClass(_... | true | true |
1c11a6b9e8f7644f37ae9bb6508ff3e4fadbeeee | 479 | py | Python | tests/test_get_history.py | andreasg123/portfolio-tracker | 2089d1c1295ed965ca0abce0ee3aceff963dee88 | [
"BSD-2-Clause"
] | null | null | null | tests/test_get_history.py | andreasg123/portfolio-tracker | 2089d1c1295ed965ca0abce0ee3aceff963dee88 | [
"BSD-2-Clause"
] | null | null | null | tests/test_get_history.py | andreasg123/portfolio-tracker | 2089d1c1295ed965ca0abce0ee3aceff963dee88 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import json
import os
def test_get_history(client):
response = client.get('/clear-history?account=account2')
assert response.data == b'ok\n'
response = client.get('/get-history?account=account2&end=2020-06-29&positions=true')
with open(os.path.join(os.path.dirname(__file__),
... | 29.9375 | 88 | 0.649269 |
import json
import os
def test_get_history(client):
response = client.get('/clear-history?account=account2')
assert response.data == b'ok\n'
response = client.get('/get-history?account=account2&end=2020-06-29&positions=true')
with open(os.path.join(os.path.dirname(__file__),
... | true | true |
1c11a6c7b5cc34ef18a84fa1a047e9d95664c661 | 14,458 | py | Python | python/tvm/driver/build_module.py | mwillsey/incubator-tvm | e02dc69fef294eb73dd65d18949ed9e108f60cda | [
"Apache-2.0"
] | 2 | 2020-04-17T02:25:16.000Z | 2020-11-25T11:39:43.000Z | python/tvm/driver/build_module.py | mwillsey/incubator-tvm | e02dc69fef294eb73dd65d18949ed9e108f60cda | [
"Apache-2.0"
] | 3 | 2020-04-20T15:37:55.000Z | 2020-05-13T05:34:28.000Z | python/tvm/driver/build_module.py | mwillsey/incubator-tvm | e02dc69fef294eb73dd65d18949ed9e108f60cda | [
"Apache-2.0"
] | 1 | 2020-04-08T07:08:04.000Z | 2020-04-08T07:08:04.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 34.179669 | 97 | 0.646839 |
import warnings
import tvm.tir
from tvm.runtime import ndarray
from tvm.ir import container
from tvm.ir import CallingConv
from tvm.ir.transform import PassContext
from tvm.target import codegen
from tvm.te import tensor
from tvm.te import schedule
from tvm.target import Target
def get_binds(args, compact=False, b... | true | true |
1c11a6ec798fe12de80d8f76d07092c212d592cc | 23 | py | Python | dislash/__init__.py | Duysha0001/dislash.py | 842b64accf3b65345691dcf61e4230c052674f2e | [
"MIT"
] | 9 | 2020-08-05T11:58:27.000Z | 2022-02-16T13:38:15.000Z | dislash/__init__.py | Duysha0001/dislash.py | 842b64accf3b65345691dcf61e4230c052674f2e | [
"MIT"
] | 2 | 2020-08-05T11:58:29.000Z | 2021-10-15T08:47:19.000Z | dislash/__init__.py | Duysha0001/dislash.py | 842b64accf3b65345691dcf61e4230c052674f2e | [
"MIT"
] | 4 | 2020-09-21T09:12:18.000Z | 2021-09-15T14:51:01.000Z | __version__ = "1.0.0"
| 11.5 | 22 | 0.608696 | __version__ = "1.0.0"
| true | true |
1c11a74c7ae146a16e1344176dbb3522ab6bc8b0 | 9,311 | py | Python | tokenizer/FunctionTokenizer.py | SachithS/UnitGener | 165912afd050e6bc20ac988291c3311e4d351c8f | [
"MIT"
] | null | null | null | tokenizer/FunctionTokenizer.py | SachithS/UnitGener | 165912afd050e6bc20ac988291c3311e4d351c8f | [
"MIT"
] | null | null | null | tokenizer/FunctionTokenizer.py | SachithS/UnitGener | 165912afd050e6bc20ac988291c3311e4d351c8f | [
"MIT"
] | null | null | null | """
FunctionToken.py - UnitGener Lexer
This class is responsible to manipulate the training data for the CRFModel.
It will process the data from reading file to creating features for the CRF model.
Will act as a Javascript lexer to the UnitGener system.
@author Sachith Senarathne
@v... | 38.159836 | 95 | 0.531307 | """
FunctionToken.py - UnitGener Lexer
This class is responsible to manipulate the training data for the CRFModel.
It will process the data from reading file to creating features for the CRF model.
Will act as a Javascript lexer to the UnitGener system.
@author Sachith Senarathne
@v... | false | true |
1c11a77447f955bd7bbe222245ac7d29679069b6 | 38,484 | py | Python | tests/test_streams.py | hackrush01/aiohttp | c085ad6c32dfeca3805759d82cc84eb63e9a40e7 | [
"Apache-2.0"
] | 1 | 2019-04-14T20:16:54.000Z | 2019-04-14T20:16:54.000Z | tests/test_streams.py | hackrush01/aiohttp | c085ad6c32dfeca3805759d82cc84eb63e9a40e7 | [
"Apache-2.0"
] | null | null | null | tests/test_streams.py | hackrush01/aiohttp | c085ad6c32dfeca3805759d82cc84eb63e9a40e7 | [
"Apache-2.0"
] | null | null | null | """Tests for streams.py"""
import asyncio
import re
from unittest import mock
import pytest
from aiohttp import streams
DATA = b'line1\nline2\nline3\n'
def chunkify(seq, n):
for i in range(0, len(seq), n):
yield seq[i:i+n]
async def create_stream():
loop = asyncio.get_event_loop()
protocol =... | 29.422018 | 78 | 0.625247 |
import asyncio
import re
from unittest import mock
import pytest
from aiohttp import streams
DATA = b'line1\nline2\nline3\n'
def chunkify(seq, n):
for i in range(0, len(seq), n):
yield seq[i:i+n]
async def create_stream():
loop = asyncio.get_event_loop()
protocol = mock.Mock(_reading_paused=... | true | true |
1c11a8a00f105cd97c95f5bdc51858a66eefbed8 | 16,453 | py | Python | nsfw/nsfw.py | Kami-DiscordBot/predacogs | 1ae8622823c8f13e76c8029d77926a255f75b494 | [
"MIT"
] | null | null | null | nsfw/nsfw.py | Kami-DiscordBot/predacogs | 1ae8622823c8f13e76c8029d77926a255f75b494 | [
"MIT"
] | null | null | null | nsfw/nsfw.py | Kami-DiscordBot/predacogs | 1ae8622823c8f13e76c8029d77926a255f75b494 | [
"MIT"
] | null | null | null | import contextlib
import discord
from redbot.core import checks, commands
from redbot.core.i18n import Translator, cog_i18n
from . import constants as sub
from .core import Core
_ = Translator("Nsfw", __file__)
@cog_i18n(_)
class Nsfw(Core):
"""
Send random NSFW images from random subreddits... | 39.455635 | 91 | 0.659029 | import contextlib
import discord
from redbot.core import checks, commands
from redbot.core.i18n import Translator, cog_i18n
from . import constants as sub
from .core import Core
_ = Translator("Nsfw", __file__)
@cog_i18n(_)
class Nsfw(Core):
@commands.command()
async def nsfwversion(self, ... | true | true |
1c11a8bf8a176b6364039f201e6bbc61281cfcb0 | 939 | py | Python | daemon/handlers.py | illi4/Crypto_trading_robot | 14d3021909232765ebb8c4d16d3ba0064c6bd93d | [
"MIT"
] | 19 | 2017-12-08T01:36:29.000Z | 2021-12-06T06:59:54.000Z | daemon/handlers.py | illi4/Crypto_trading_robot | 14d3021909232765ebb8c4d16d3ba0064c6bd93d | [
"MIT"
] | null | null | null | daemon/handlers.py | illi4/Crypto_trading_robot | 14d3021909232765ebb8c4d16d3ba0064c6bd93d | [
"MIT"
] | 10 | 2017-12-02T08:14:40.000Z | 2021-11-04T16:29:19.000Z | import signal
from abc import abstractmethod
from utils import Loggable
class SigInt(Loggable):
@property
def signal(self):
return signal.SIGINT
def on_start(self, app):
pass
def on_signal(self, app):
self.log.info("Received SIGINT, stopping...")
self.on_exit()
... | 19.5625 | 87 | 0.600639 | import signal
from abc import abstractmethod
from utils import Loggable
class SigInt(Loggable):
@property
def signal(self):
return signal.SIGINT
def on_start(self, app):
pass
def on_signal(self, app):
self.log.info("Received SIGINT, stopping...")
self.on_exit()
... | true | true |
1c11a910b524b85df4339d6a4db3291bd01b9dc7 | 3,986 | py | Python | Univ_individual_files/40_uni_sydney.py | srsarangi/univscanner | 8735628690f7f50662ee5abf14ac1d27a657b613 | [
"Apache-2.0"
] | null | null | null | Univ_individual_files/40_uni_sydney.py | srsarangi/univscanner | 8735628690f7f50662ee5abf14ac1d27a657b613 | [
"Apache-2.0"
] | null | null | null | Univ_individual_files/40_uni_sydney.py | srsarangi/univscanner | 8735628690f7f50662ee5abf14ac1d27a657b613 | [
"Apache-2.0"
] | 2 | 2021-05-18T07:50:15.000Z | 2021-05-18T11:16:04.000Z | import requests
import urllib.request
import time
import urllib
import re
import csv
import sys
from bs4 import BeautifulSoup
def uni_sydney():
url = "https://www.sydney.edu.au/engineering/schools/school-of-computer-science/school-staff.html"
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Int... | 34.362069 | 214 | 0.553688 | import requests
import urllib.request
import time
import urllib
import re
import csv
import sys
from bs4 import BeautifulSoup
def uni_sydney():
url = "https://www.sydney.edu.au/engineering/schools/school-of-computer-science/school-staff.html"
headers = {'User-Agent': 'Mozilla/5.0 (Macintosh; Int... | true | true |
1c11a930aa1b1406e392805b9d2fa378e95c4fd8 | 23,161 | py | Python | mars/services/storage/handler.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | 1 | 2021-09-03T18:52:06.000Z | 2021-09-03T18:52:06.000Z | mars/services/storage/handler.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | null | null | null | mars/services/storage/handler.py | chaokunyang/mars | f8d06b833603525133a62f099af159cec3ff5570 | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2021 Alibaba Group Holding 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 a... | 43.782609 | 96 | 0.59829 |
import asyncio
import logging
from collections import defaultdict
from typing import Any, Dict, List, Union
from ... import oscar as mo
from ...storage import StorageLevel, get_storage_backend
from ...storage.core import StorageFileObject
from ...typing import BandType
from ...utils import calc_data_size, lazy_import... | true | true |
1c11a97960c2588b6b1c51dc346089c0a66de523 | 2,226 | py | Python | SimpleQmap/unittest/test_state.py | tnakaicode/SimpleQmap-Win | b533bef650f8f1388f2cbb99aef3d5e8f8aa2860 | [
"MIT"
] | 3 | 2017-01-08T12:58:14.000Z | 2019-01-09T03:30:36.000Z | SimpleQmap/unittest/test_state.py | tnakaicode/SimpleQmap-Win | b533bef650f8f1388f2cbb99aef3d5e8f8aa2860 | [
"MIT"
] | null | null | null | SimpleQmap/unittest/test_state.py | tnakaicode/SimpleQmap-Win | b533bef650f8f1388f2cbb99aef3d5e8f8aa2860 | [
"MIT"
] | 1 | 2021-04-15T21:12:43.000Z | 2021-04-15T21:12:43.000Z | import unittest
import numpy as np
import SimpleQmap as S
class TestState(unittest.TestCase):
def setUp(self):
self.dim = int(np.random.randint(1,100)*2)
xmax = np.random.random()
xmin = -xmax
ymax = np.random.random()
ymin = -ymax
self.domain = [[xmin, xmax], [ymin... | 34.246154 | 76 | 0.5885 | import unittest
import numpy as np
import SimpleQmap as S
class TestState(unittest.TestCase):
def setUp(self):
self.dim = int(np.random.randint(1,100)*2)
xmax = np.random.random()
xmin = -xmax
ymax = np.random.random()
ymin = -ymax
self.domain = [[xmin, xmax], [ymin... | true | true |
1c11ab3e14869e9324521793c09e6128dad44484 | 3,997 | py | Python | Incident-Response/Tools/cyphon/cyphon/watchdogs/tests/test_signals.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 1 | 2021-07-24T17:22:50.000Z | 2021-07-24T17:22:50.000Z | Incident-Response/Tools/cyphon/cyphon/watchdogs/tests/test_signals.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-28T03:40:31.000Z | 2022-02-28T03:40:52.000Z | Incident-Response/Tools/cyphon/cyphon/watchdogs/tests/test_signals.py | sn0b4ll/Incident-Playbook | cf519f58fcd4255674662b3620ea97c1091c1efb | [
"MIT"
] | 2 | 2022-02-25T08:34:51.000Z | 2022-03-16T17:29:44.000Z | # -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Cyphon En... | 34.162393 | 96 | 0.713535 |
import logging
try:
from unittest.mock import Mock
except ImportError:
from mock import Mock
from django.test import TransactionTestCase
from alerts.models import Alert
from distilleries.models import Distillery
from tests.fixture_manager import get_fixtures
from tests.mock import patch_find_by_id
from watch... | true | true |
1c11ac4805157e0d7be9cd7d3c0df0d5022ef5a3 | 6,425 | py | Python | models/baseline_model.py | AKI-maggie/adapted_deep_embeddings | 7f58900cf31398f7bb23295c1d4854f1ae941bcd | [
"MIT"
] | 24 | 2018-10-19T07:48:16.000Z | 2021-06-29T08:44:16.000Z | models/baseline_model.py | AKI-maggie/adapted_deep_embeddings | 7f58900cf31398f7bb23295c1d4854f1ae941bcd | [
"MIT"
] | 8 | 2019-01-12T02:55:13.000Z | 2022-03-11T23:32:01.000Z | models/baseline_model.py | garyCC227/thesis | a93c5061c09fa1a42d54053cd82e71cef447e4b8 | [
"MIT"
] | 10 | 2018-12-04T11:39:01.000Z | 2020-11-10T06:57:35.000Z | '''
Adapted from https://danijar.com/structuring-your-tensorflow-models/
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from functools import partial
import os
import sys
import tensorflow as tf
from .model import Model
from .utils import assign_to_de... | 39.417178 | 139 | 0.626615 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from functools import partial
import os
import sys
import tensorflow as tf
from .model import Model
from .utils import assign_to_device, _conv, define_scope, _fully_connected, get_available_gpus, _max_pooling... | true | true |
1c11ae4d3b75d031e24701dbdaa83c14017b4ae0 | 2,229 | py | Python | python/npcomp/compiler/target.py | marbre/mlir-npcomp | 30adf9e6b0c1e94db38050a9e143f20a5a461d17 | [
"Apache-2.0"
] | 11 | 2020-03-30T23:31:03.000Z | 2021-06-16T01:17:58.000Z | python/npcomp/compiler/target.py | marbre/mlir-npcomp | 30adf9e6b0c1e94db38050a9e143f20a5a461d17 | [
"Apache-2.0"
] | 6 | 2020-10-21T18:18:10.000Z | 2021-04-02T20:38:28.000Z | python/npcomp/compiler/target.py | marbre/mlir-npcomp | 30adf9e6b0c1e94db38050a9e143f20a5a461d17 | [
"Apache-2.0"
] | null | null | null | # 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
from typing import *
from _npcomp.mlir import ir
__all__ = [
"GenericTarget32",
"GenericTarget64",
"Targe... | 24.766667 | 80 | 0.700314 |
from typing import *
from _npcomp.mlir import ir
__all__ = [
"GenericTarget32",
"GenericTarget64",
"Target",
"TargetFactory",
]
class Target:
__slots__ = [
"_mlir_helper",
]
def __init__(self, mlir_helper: ir.DialectHelper):
super().__init__()
self._mlir_helper = mlir_helper
... | true | true |
1c11aedded02f790bd6be98e21ed0e05b55f10b7 | 6,564 | py | Python | furnace/engine/evaluator.py | CoolPhilChen/cil-road-segmentation-2019 | 0becfe97d77012b3abbaa181a5c52e6edd1a39f1 | [
"MIT"
] | null | null | null | furnace/engine/evaluator.py | CoolPhilChen/cil-road-segmentation-2019 | 0becfe97d77012b3abbaa181a5c52e6edd1a39f1 | [
"MIT"
] | null | null | null | furnace/engine/evaluator.py | CoolPhilChen/cil-road-segmentation-2019 | 0becfe97d77012b3abbaa181a5c52e6edd1a39f1 | [
"MIT"
] | null | null | null | import os
import os.path as osp
import cv2
import numpy as np
import time
from tqdm import tqdm
import torch
import torch.nn.functional as F
import torch.multiprocessing as mp
from engine.logger import get_logger
from utils.pyt_utils import load_model, link_file, ensure_dir
from utils.img_utils import pad_image_to_sh... | 33.661538 | 77 | 0.584552 | import os
import os.path as osp
import cv2
import numpy as np
import time
from tqdm import tqdm
import torch
import torch.nn.functional as F
import torch.multiprocessing as mp
from engine.logger import get_logger
from utils.pyt_utils import load_model, link_file, ensure_dir
from utils.img_utils import pad_image_to_sh... | true | true |
1c11af569405816e07b11a6d1b415e6ef2db9b6a | 1,186 | py | Python | setup.py | tworide/django_dbdev | 9313e3ce39c64634577f4a63f11028cd01bb7b10 | [
"BSD-3-Clause"
] | null | null | null | setup.py | tworide/django_dbdev | 9313e3ce39c64634577f4a63f11028cd01bb7b10 | [
"BSD-3-Clause"
] | 4 | 2015-04-28T07:14:18.000Z | 2018-02-28T18:53:25.000Z | setup.py | tworide/django_dbdev | 9313e3ce39c64634577f4a63f11028cd01bb7b10 | [
"BSD-3-Clause"
] | 4 | 2015-01-05T18:58:30.000Z | 2019-04-08T11:06:44.000Z | import sys
from setuptools import setup, find_packages
if sys.version_info[0] == 2:
execfile('django_dbdev/version.py')
else:
exec(open('django_dbdev/version.py', 'r').read())
long_description = """
Do you want to make it easy to create and setup isolated
Postgres or MySQL database servers during developmen... | 26.355556 | 85 | 0.664418 | import sys
from setuptools import setup, find_packages
if sys.version_info[0] == 2:
execfile('django_dbdev/version.py')
else:
exec(open('django_dbdev/version.py', 'r').read())
long_description = """
Do you want to make it easy to create and setup isolated
Postgres or MySQL database servers during developmen... | true | true |
1c11afa0b141b6dbaf27046aabb04cc7540092c5 | 7,289 | py | Python | ci/configs.py | mikkowus/BESSPIN-Tool-Suite | e87e9abb1156a8627aacc3272f1925b034129146 | [
"Apache-2.0"
] | null | null | null | ci/configs.py | mikkowus/BESSPIN-Tool-Suite | e87e9abb1156a8627aacc3272f1925b034129146 | [
"Apache-2.0"
] | null | null | null | ci/configs.py | mikkowus/BESSPIN-Tool-Suite | e87e9abb1156a8627aacc3272f1925b034129146 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python3
"""
--- besspin-ci.py is the CI entry to the BESSPIN program.
--- This file provide the combinations of CI files generated.
--- Every combination is represented as a set of tuples.
Each tuple represents one setting and its possible values.
Each "values" should be a tuple. Please note t... | 33.74537 | 137 | 0.612841 | backupBesspinAMI = { 'ImageId' : 'ami-067bd21562d1f150e',
'CreationDate' : '2021-05-19T20:09:51.000Z',
'OwnerId' : '363527286999'}
ciAWSqueue = 'https://sqs.us-west-2.amazonaws.com/845509001885/ssith-fett-target-ci-develop-pipeline-PipelineSQSQueue-1IOF3D3BU1MEP.fifo'
ciAWSbucket = 's... | true | true |
1c11afdb46b9e747c9d7d934fe94826ef221726b | 5,806 | py | Python | homeassistant/helpers/reload.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 6 | 2016-11-25T06:36:27.000Z | 2021-11-16T11:20:23.000Z | homeassistant/helpers/reload.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 52 | 2020-07-14T14:12:26.000Z | 2022-03-31T06:24:02.000Z | homeassistant/helpers/reload.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 2 | 2021-03-17T11:01:07.000Z | 2021-08-19T15:21:32.000Z | """Class to reload platforms."""
import asyncio
import logging
from typing import Any, Dict, Iterable, List, Optional
from homeassistant import config as conf_util
from homeassistant.const import SERVICE_RELOAD
from homeassistant.core import Event, callback
from homeassistant.exceptions import HomeAssistantError
from... | 32.255556 | 93 | 0.732863 |
import asyncio
import logging
from typing import Any, Dict, Iterable, List, Optional
from homeassistant import config as conf_util
from homeassistant.const import SERVICE_RELOAD
from homeassistant.core import Event, callback
from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers import con... | true | true |
1c11b045e7199fde7a94699bd52f76b087ae0ba0 | 3,301 | py | Python | tensorflow/python/saved_model/save_context_test.py | kalosisz/tensorflow | b7ecd75b24f577b73500024fe91d2ea0c806d05a | [
"Apache-2.0"
] | 4 | 2015-11-12T20:37:23.000Z | 2021-05-25T20:06:32.000Z | tensorflow/python/saved_model/save_context_test.py | kalosisz/tensorflow | b7ecd75b24f577b73500024fe91d2ea0c806d05a | [
"Apache-2.0"
] | 17 | 2021-08-12T19:38:42.000Z | 2022-01-27T14:39:35.000Z | tensorflow/python/saved_model/save_context_test.py | kalosisz/tensorflow | b7ecd75b24f577b73500024fe91d2ea0c806d05a | [
"Apache-2.0"
] | 4 | 2022-01-13T11:23:44.000Z | 2022-03-02T11:11:42.000Z | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 37.511364 | 80 | 0.727052 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import threading
from tensorflow.python.eager import test
from tensorflow.python.saved_model import save_context
from tensorflow.python.saved_model import save_options
class SaveContextTest(test.TestCase):
... | true | true |
1c11b18e7d06a94e6563e30df6c6f8729e3b6767 | 12,820 | py | Python | extra/DiscordUtils/Music.py | HedTB/OutDashRewrite | ec05fa4c8be93dd57bb94023f103d28ae9285f54 | [
"MIT"
] | 1 | 2022-03-12T07:20:55.000Z | 2022-03-12T07:20:55.000Z | extra/DiscordUtils/Music.py | HedTB/OutDashRewrite | ec05fa4c8be93dd57bb94023f103d28ae9285f54 | [
"MIT"
] | 2 | 2022-03-25T08:24:18.000Z | 2022-03-25T08:28:58.000Z | extra/DiscordUtils/Music.py | HedTB/OutDashRewrite | ec05fa4c8be93dd57bb94023f103d28ae9285f54 | [
"MIT"
] | null | null | null | import asyncio
import aiohttp
import re
try:
import youtube_dl
import disnake
has_voice = True
except ImportError:
has_voice = False
if has_voice:
youtube_dl.utils.bug_reports_message = lambda: ''
ydl = youtube_dl.YoutubeDL({"format": "bestaudio/best", "restrictfilenames": True, "noplaylist": T... | 42.310231 | 279 | 0.615211 | import asyncio
import aiohttp
import re
try:
import youtube_dl
import disnake
has_voice = True
except ImportError:
has_voice = False
if has_voice:
youtube_dl.utils.bug_reports_message = lambda: ''
ydl = youtube_dl.YoutubeDL({"format": "bestaudio/best", "restrictfilenames": True, "noplaylist": T... | true | true |
1c11b26576dcaff2cba19f94ca715ec652d520b0 | 5,256 | py | Python | scripts/train_dna2vec.py | shifaoh/dna2vec | 9ad055d8c772187261dad17d44ceee465c636ba9 | [
"MIT"
] | null | null | null | scripts/train_dna2vec.py | shifaoh/dna2vec | 9ad055d8c772187261dad17d44ceee465c636ba9 | [
"MIT"
] | null | null | null | scripts/train_dna2vec.py | shifaoh/dna2vec | 9ad055d8c772187261dad17d44ceee465c636ba9 | [
"MIT"
] | 1 | 2021-04-08T18:31:58.000Z | 2021-04-08T18:31:58.000Z | #!/usr/bin/env python3
import sys
sys.path.extend(['.', '..'])
import glob
import logbook
from logbook.compat import redirect_logging
import configargparse
import numpy as np
from Bio import SeqIO
from attic_util.time_benchmark import Benchmark
from attic_util import util
from attic_util.tee import Tee
from dna2vec.h... | 36.755245 | 122 | 0.673326 |
import sys
sys.path.extend(['.', '..'])
import glob
import logbook
from logbook.compat import redirect_logging
import configargparse
import numpy as np
from Bio import SeqIO
from attic_util.time_benchmark import Benchmark
from attic_util import util
from attic_util.tee import Tee
from dna2vec.histogram import Histogr... | true | true |
1c11b3606b60e0d508816bb3083765de3bf25052 | 707 | py | Python | profiles_api/serializers.py | Mallaiya/Django-RESTAPI-Profile | 383df5c1c831c09857275a082ed4c7a143fd6aef | [
"MIT"
] | null | null | null | profiles_api/serializers.py | Mallaiya/Django-RESTAPI-Profile | 383df5c1c831c09857275a082ed4c7a143fd6aef | [
"MIT"
] | null | null | null | profiles_api/serializers.py | Mallaiya/Django-RESTAPI-Profile | 383df5c1c831c09857275a082ed4c7a143fd6aef | [
"MIT"
] | null | null | null | from rest_framework import serializers
from profiles_api import models
class TestSerializer(serializers.Serializer):
name = serializers.CharField(max_length=10)
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = models.User
fields = ['id', 'email', 'name', 'dob', 'password'... | 32.136364 | 94 | 0.647808 | from rest_framework import serializers
from profiles_api import models
class TestSerializer(serializers.Serializer):
name = serializers.CharField(max_length=10)
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = models.User
fields = ['id', 'email', 'name', 'dob', 'password'... | true | true |
1c11b3d76f4d85fb3a23b3b654b4214132a70a96 | 22,561 | py | Python | mutes_dump.py | hidet/mutes2019 | 54d7cce9782731528c4632df53ec2536d0e0fe5a | [
"MIT"
] | null | null | null | mutes_dump.py | hidet/mutes2019 | 54d7cce9782731528c4632df53ec2536d0e0fe5a | [
"MIT"
] | null | null | null | mutes_dump.py | hidet/mutes2019 | 54d7cce9782731528c4632df53ec2536d0e0fe5a | [
"MIT"
] | null | null | null | """ mutes_dump.py is a function package to dumping into a ROOT file for MUTES E62
History:
2018-08-16 ; ver 1.0; branched from mutes_ana.py, T.H.
2019-02-19 ; ver 1.1; HT
2019-02-22 ; ver 1.2; HT modified names of numpy arrays and Fill command
"""
__version__ = '1.2'
import time
import mass
import mutes_ext as ex... | 50.135556 | 112 | 0.571517 | """ mutes_dump.py is a function package to dumping into a ROOT file for MUTES E62
History:
2018-08-16 ; ver 1.0; branched from mutes_ana.py, T.H.
2019-02-19 ; ver 1.1; HT
2019-02-22 ; ver 1.2; HT modified names of numpy arrays and Fill command
"""
__version__ = '1.2'
import time
import mass
import mutes_ext as ex... | false | true |
1c11b6b0187f3039793d086c6d52a15cbfc03b8e | 1,502 | py | Python | python/methylnet/torque_job_runner_bak.py | hossein20s/dnaMethylation | eb2c4e14a6d32f6582f54fe39c62e83205f18665 | [
"MIT"
] | 26 | 2019-07-11T04:58:24.000Z | 2022-02-15T19:31:48.000Z | python/methylnet/torque_job_runner_bak.py | hossein20s/dnaMethylation | eb2c4e14a6d32f6582f54fe39c62e83205f18665 | [
"MIT"
] | 5 | 2020-04-30T13:02:13.000Z | 2022-03-02T16:41:47.000Z | python/methylnet/torque_job_runner_bak.py | hossein20s/dnaMethylation | eb2c4e14a6d32f6582f54fe39c62e83205f18665 | [
"MIT"
] | 8 | 2019-10-08T07:16:09.000Z | 2022-03-11T23:17:27.000Z | import click, os
from submit_hpc.job_generator import *
CONTEXT_SETTINGS = dict(help_option_names=['-h','--help'], max_content_width=90)
@click.group(context_settings= CONTEXT_SETTINGS)
@click.version_option(version='0.1')
def torque():
pass
@torque.command()
@click.option('-c', '--command', default='', help='Co... | 50.066667 | 141 | 0.719707 | import click, os
from submit_hpc.job_generator import *
CONTEXT_SETTINGS = dict(help_option_names=['-h','--help'], max_content_width=90)
@click.group(context_settings= CONTEXT_SETTINGS)
@click.version_option(version='0.1')
def torque():
pass
@torque.command()
@click.option('-c', '--command', default='', help='Co... | true | true |
1c11b6ce4172beccf9a95256d9b9e99c29317c9c | 348 | py | Python | cssi/__init__.py | fossabot/cssi-core | 32933a62788db535bef207a28643ce4b3e64346a | [
"MIT"
] | 2 | 2019-07-04T16:56:58.000Z | 2019-07-09T16:21:04.000Z | cssi/__init__.py | fossabot/cssi-core | 32933a62788db535bef207a28643ce4b3e64346a | [
"MIT"
] | null | null | null | cssi/__init__.py | fossabot/cssi-core | 32933a62788db535bef207a28643ce4b3e64346a | [
"MIT"
] | 3 | 2019-05-31T06:05:33.000Z | 2019-06-04T11:26:13.000Z | import logging
from logging import NullHandler
# Add NullHandler to avoid errors if the host application
# doesn't have logging configured.
default_logger = logging.getLogger("cssi.core")
default_logger.addHandler(NullHandler())
# Set the default level to WARN
if default_logger.level == logging.NOTSET:
default_lo... | 29 | 57 | 0.801724 | import logging
from logging import NullHandler
default_logger = logging.getLogger("cssi.core")
default_logger.addHandler(NullHandler())
# Set the default level to WARN
if default_logger.level == logging.NOTSET:
default_logger.setLevel(logging.WARN)
| true | true |
1c11b708c6fea0de7f96e2deb483af07fe6316b1 | 9,395 | py | Python | open_spiel/python/algorithms/response_graph_ucb_utils.py | ajain-23/open_spiel | a6a0f0129571bb6f0e6832e870e299663fb7cdd5 | [
"Apache-2.0"
] | 3,167 | 2019-08-27T06:50:30.000Z | 2022-03-31T22:33:48.000Z | open_spiel/python/algorithms/response_graph_ucb_utils.py | AliBeikmohammadi/open_spiel | 38941dee3beb52ffdb134b66f420a758634d9a20 | [
"Apache-2.0"
] | 650 | 2019-08-27T16:24:09.000Z | 2022-03-30T19:41:09.000Z | open_spiel/python/algorithms/response_graph_ucb_utils.py | AliBeikmohammadi/open_spiel | 38941dee3beb52ffdb134b66f420a758634d9a20 | [
"Apache-2.0"
] | 774 | 2019-08-27T10:36:04.000Z | 2022-03-29T15:44:42.000Z | # Copyright 2019 DeepMind Technologies Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 35.319549 | 86 | 0.689941 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import itertools
import matplotlib.pyplot as plt
import numpy as np
import scipy.stats
from open_spiel.python.algorithms import fictitious_play
from open_spiel.python.egt import utils as egt_utils
import py... | true | true |
1c11b81c3e3d5696405b0ce53f2331cb4ba2f4b6 | 67 | py | Python | aiowinreg/__init__.py | skelsec/aiowinreg | fdffebefb355fb773a0c3f30b2439774db930ba1 | [
"MIT"
] | 6 | 2019-08-20T21:40:28.000Z | 2021-05-22T18:45:41.000Z | aiowinreg/__init__.py | skelsec/aiowinreg | fdffebefb355fb773a0c3f30b2439774db930ba1 | [
"MIT"
] | 3 | 2020-01-15T17:32:23.000Z | 2021-05-22T04:07:42.000Z | aiowinreg/__init__.py | skelsec/aiowinreg | fdffebefb355fb773a0c3f30b2439774db930ba1 | [
"MIT"
] | 5 | 2019-08-09T04:03:57.000Z | 2020-03-19T10:22:56.000Z | name = "aiowinreg"
import logging
logger = logging.getLogger(name) | 16.75 | 32 | 0.776119 | name = "aiowinreg"
import logging
logger = logging.getLogger(name) | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.