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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08fce75d71189287f57d48b0a15e1c719b3b3c8b | 3,078 | py | Python | test/workflows/test_workflow.py | SvenMarcus/hpc-rocket | b28917e7afe6e2e839d1ae58f2e21fba6e3eb61c | [
"MIT"
] | 7 | 2022-01-03T13:52:40.000Z | 2022-03-10T16:26:04.000Z | test/workflows/test_workflow.py | SvenMarcus/hpc-rocket | b28917e7afe6e2e839d1ae58f2e21fba6e3eb61c | [
"MIT"
] | 6 | 2021-12-20T17:07:56.000Z | 2022-03-29T11:22:50.000Z | test/workflows/test_workflow.py | SvenMarcus/hpc-rocket | b28917e7afe6e2e839d1ae58f2e21fba6e3eb61c | [
"MIT"
] | null | null | null | from typing import Callable, List, Optional
from unittest.mock import Mock
import pytest
from hpcrocket.core.workflows.workflow import Stage, Workflow, WorkflowNotStartedError
from hpcrocket.ui import UI
class StageSpy:
def __init__(self) -> None:
self.was_run = False
self.was_canceled = False
... | 24.624 | 123 | 0.706628 | from typing import Callable, List, Optional
from unittest.mock import Mock
import pytest
from hpcrocket.core.workflows.workflow import Stage, Workflow, WorkflowNotStartedError
from hpcrocket.ui import UI
class StageSpy:
def __init__(self) -> None:
self.was_run = False
self.was_canceled = False
... | true | true |
08fce866734e5547446ad481b5ff376de4cf9f7c | 2,938 | py | Python | tensorflow_probability/python/bijectors/scale.py | holli/probability | 3e84aa840b624f4184819f1e6ce9180c7997aad9 | [
"Apache-2.0"
] | 1 | 2020-11-08T17:03:46.000Z | 2020-11-08T17:03:46.000Z | tensorflow_probability/python/bijectors/scale.py | etarakci-hvl/probability | 7a0ce5e5beff91051028258dfbc7bc6cf0c4998d | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/bijectors/scale.py | etarakci-hvl/probability | 7a0ce5e5beff91051028258dfbc7bc6cf0c4998d | [
"Apache-2.0"
] | 1 | 2020-05-27T19:42:06.000Z | 2020-05-27T19:42:06.000Z | # Copyright 2019 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 27.980952 | 78 | 0.656909 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow.compat.v2 as tf
from tensorflow_probability.python.bijectors import bijector
from tensorflow_probability.python.internal import assert_util
from tensorflow_probability.python.internal import... | true | true |
08fce9e51d0ee8162ace9291a0f3d53a93c48806 | 1,292 | py | Python | gravity_well/parse.py | BrandonNX01/gravity_well | 0c7fe0c0e39191b3ea2a9603b6731e0b23c311da | [
"MIT"
] | null | null | null | gravity_well/parse.py | BrandonNX01/gravity_well | 0c7fe0c0e39191b3ea2a9603b6731e0b23c311da | [
"MIT"
] | null | null | null | gravity_well/parse.py | BrandonNX01/gravity_well | 0c7fe0c0e39191b3ea2a9603b6731e0b23c311da | [
"MIT"
] | null | null | null | '''
parse out all the domains from various txt based sink lists
'''
from typing import List
import validators
class GeneralParser:
def __init__(self, response_list: List, debug: bool=None):
self.response_list = response_list
self.sink_list = []
self.debug = debug
def parse(self) -> Lis... | 30.761905 | 82 | 0.485294 | from typing import List
import validators
class GeneralParser:
def __init__(self, response_list: List, debug: bool=None):
self.response_list = response_list
self.sink_list = []
self.debug = debug
def parse(self) -> List:
for resp in self.response_list:
status = resp... | true | true |
08fcea33a6488a1b303f7e142718c69a9472cf09 | 1,953 | py | Python | zhaquirks/xiaomi/aqara/motion_aq2b.py | grea09/zha-device-handlers | 6b06af789bd8a97c42a24bd05c370ecfadd6f363 | [
"Apache-2.0"
] | null | null | null | zhaquirks/xiaomi/aqara/motion_aq2b.py | grea09/zha-device-handlers | 6b06af789bd8a97c42a24bd05c370ecfadd6f363 | [
"Apache-2.0"
] | null | null | null | zhaquirks/xiaomi/aqara/motion_aq2b.py | grea09/zha-device-handlers | 6b06af789bd8a97c42a24bd05c370ecfadd6f363 | [
"Apache-2.0"
] | null | null | null | """Xiaomi aqara body sensor."""
from zigpy.profiles import zha
from zigpy.zcl.clusters.general import Basic, Ota
from zigpy.zcl.clusters.measurement import OccupancySensing
from . import IlluminanceMeasurementCluster
from .. import LUMI, BasicCluster, MotionCluster, OccupancyCluster, XiaomiCustomDevice
from ... impor... | 28.720588 | 86 | 0.570917 |
from zigpy.profiles import zha
from zigpy.zcl.clusters.general import Basic, Ota
from zigpy.zcl.clusters.measurement import OccupancySensing
from . import IlluminanceMeasurementCluster
from .. import LUMI, BasicCluster, MotionCluster, OccupancyCluster, XiaomiCustomDevice
from ... import Bus
from ...const import (
... | true | true |
08fcead2cba1ed6410b67471c7104334f2284a7d | 63 | py | Python | trython/__init__.py | dermasmid/python-function-error-handling | 14b9ee03d34f4b892535729eb2640c813da83d73 | [
"MIT"
] | 1 | 2021-11-08T16:40:18.000Z | 2021-11-08T16:40:18.000Z | trython/__init__.py | dermasmid/trython | 14b9ee03d34f4b892535729eb2640c813da83d73 | [
"MIT"
] | null | null | null | trython/__init__.py | dermasmid/trython | 14b9ee03d34f4b892535729eb2640c813da83d73 | [
"MIT"
] | 1 | 2021-06-06T17:11:50.000Z | 2021-06-06T17:11:50.000Z | from .trython import wrap, context_wrap
__version__ = "3.3.1"
| 15.75 | 39 | 0.746032 | from .trython import wrap, context_wrap
__version__ = "3.3.1"
| true | true |
08fceb23180337d7845db05ee20ad928d86c202b | 3,628 | py | Python | tests/rplibs/test_rpCompound.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | null | null | null | tests/rplibs/test_rpCompound.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | null | null | null | tests/rplibs/test_rpCompound.py | niraito/rptools | 5c631c6cc4cd8cb497ccf573891235b36dfde65f | [
"MIT"
] | null | null | null | """
Created on July 22 2021
@author: Joan Hérisson
"""
from unittest import TestCase
from copy import deepcopy
from chemlite import Compound
from rptools.rplibs.rpCompound import rpCompound
class Test_rpCompound(TestCase):
__id = 'test'
__dict = {
'id': __id,
'name': '',
'smiles': '... | 28.566929 | 94 | 0.550717 |
from unittest import TestCase
from copy import deepcopy
from chemlite import Compound
from rptools.rplibs.rpCompound import rpCompound
class Test_rpCompound(TestCase):
__id = 'test'
__dict = {
'id': __id,
'name': '',
'smiles': '',
'inchi': '',
'inchikey': '',
... | true | true |
08fceb23c32d886e5de501b8ca5001703b22deb3 | 2,879 | py | Python | cloud_snitch/tests/models/test_versioned_property.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 1 | 2018-07-11T20:20:21.000Z | 2018-07-11T20:20:21.000Z | cloud_snitch/tests/models/test_versioned_property.py | bunchc/FleetDeploymentReporting | a93af06573f2715e14b4d18b7a394c26fc19a32d | [
"Apache-2.0"
] | 46 | 2018-08-08T19:46:15.000Z | 2019-02-22T20:33:49.000Z | cloud_snitch/tests/models/test_versioned_property.py | dani4571/FleetDeploymentReporting | 8b132a20fa3e9c4e4215feade79f689be6e4b364 | [
"Apache-2.0"
] | 7 | 2018-06-26T15:27:55.000Z | 2018-12-05T19:41:25.000Z | import unittest
from cloud_snitch.models.base import VersionedProperty
class TestVersionedProperty(unittest.TestCase):
def test_default(self):
"""Test default values with no kwargs."""
prop = VersionedProperty()
self.assertTrue(prop.type is str)
self.assertTrue(prop.concat_proper... | 35.9875 | 66 | 0.66794 | import unittest
from cloud_snitch.models.base import VersionedProperty
class TestVersionedProperty(unittest.TestCase):
def test_default(self):
prop = VersionedProperty()
self.assertTrue(prop.type is str)
self.assertTrue(prop.concat_properties is None)
self.assertFalse(prop.is_con... | true | true |
08fcebb728b3b0ee1bb4eefb1043c82f39e860b4 | 2,759 | py | Python | action-how-are-you.py | Shanka123/snips_assistant | 22603853f217008a7ebe68dd74c1f0651e3b7472 | [
"MIT"
] | null | null | null | action-how-are-you.py | Shanka123/snips_assistant | 22603853f217008a7ebe68dd74c1f0651e3b7472 | [
"MIT"
] | null | null | null | action-how-are-you.py | Shanka123/snips_assistant | 22603853f217008a7ebe68dd74c1f0651e3b7472 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import ConfigParser
from hermes_python.hermes import Hermes
import pyowm
import io
CONFIGURATION_ENCODING_FORMAT = "utf-8"
CONFIG_INI = "config.ini"
INTENT_HOW_ARE_YOU = "shanka1997:how_are_you"
INTENT_GOOD = "shanka1997:feeling_good"
INTENT_BAD = "shanka1997:feeling_ba... | 32.458824 | 127 | 0.72635 | import ConfigParser
from hermes_python.hermes import Hermes
import pyowm
import io
CONFIGURATION_ENCODING_FORMAT = "utf-8"
CONFIG_INI = "config.ini"
INTENT_HOW_ARE_YOU = "shanka1997:how_are_you"
INTENT_GOOD = "shanka1997:feeling_good"
INTENT_BAD = "shanka1997:feeling_bad"
INTENT_ALRIGHT = "shanka1997:feeling_alright... | true | true |
08fcec08c26167e2018913a304e3f05e3dc57fb0 | 662 | py | Python | curso_em_video-en/exercices/ex053_palindromo.py | brunocampos01/becoming-a-expert-python | 32b12ca80ad25cc25831f383e83eb199bfe0ad7e | [
"MIT"
] | 56 | 2019-05-18T20:04:40.000Z | 2021-12-12T02:28:24.000Z | curso_em_video-en/exercices/ex053_palindromo.py | brunocampos01/becoming-a-expert-python | 32b12ca80ad25cc25831f383e83eb199bfe0ad7e | [
"MIT"
] | 18 | 2019-11-11T11:00:51.000Z | 2021-12-30T01:52:41.000Z | curso_em_video-en/exercices/ex053_palindromo.py | brunocampos01/becoming-a-expert-python | 32b12ca80ad25cc25831f383e83eb199bfe0ad7e | [
"MIT"
] | 10 | 2019-11-10T21:22:55.000Z | 2021-12-30T11:40:17.000Z | """
Exercise Python 053:
Crie um programa que leia uma frase qualquer
e diga se ela é um palíndromo, desconsiderando os espaços.
"""
inversePhrase = ''
words = phrase.split()
print(words)
joinWords = ''.join(words)
print(joinWords)
numberLetter = len(joinWords)
print('The number letters this phrase is: {}'.format(numb... | 24.518519 | 67 | 0.743202 | inversePhrase = ''
words = phrase.split()
print(words)
joinWords = ''.join(words)
print(joinWords)
numberLetter = len(joinWords)
print('The number letters this phrase is: {}'.format(numberLetter))
for numberLetter in range(numberLetter - 1, -1, -1):
inversePhrase = inversePhrase + joinWords[numberLetter]
if inver... | true | true |
08fcec6912143b0b580c8b1670ccaa1201b73740 | 360 | py | Python | inconnu/misc/percentile.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 4 | 2021-09-06T20:18:13.000Z | 2022-02-05T17:08:44.000Z | inconnu/misc/percentile.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 7 | 2021-09-13T00:46:57.000Z | 2022-01-11T06:38:50.000Z | inconnu/misc/percentile.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 2 | 2021-11-27T22:24:53.000Z | 2022-03-16T21:05:00.000Z | """misc/percentile.py - Roll a percentaile."""
import random
async def percentile(ctx, ceiling: int):
"""Roll between 1 and the ceiling."""
if ceiling < 1:
await ctx.respond("The ceiling must be greater than 0!", hidden=True)
return
result = random.randint(1, ceiling)
await ctx.respon... | 27.692308 | 77 | 0.647222 |
import random
async def percentile(ctx, ceiling: int):
if ceiling < 1:
await ctx.respond("The ceiling must be greater than 0!", hidden=True)
return
result = random.randint(1, ceiling)
await ctx.respond(f"Rolling 1-{ceiling}: **{result}**")
| true | true |
08fceccefbd14b9ddbfbed5e4720b91e6a3a38d2 | 7,586 | py | Python | sdk/python/pulumi_azure_native/network/get_virtual_router.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/get_virtual_router.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/get_virtual_router.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from... | 35.448598 | 226 | 0.644872 |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
__all__ = [
'GetVirtualRouterResult',
'AwaitableGetVirtualRouterResult',
'get_virtual_router',
]
@pulumi.output_type
class GetVirtualRou... | true | true |
08fcedbdacfeef07518aa9f8740eb1f7863fb61c | 7,396 | py | Python | server_app.py | PiZep/timelapse_control | 1e1d33cad02251b92df094e062a9cc8edb6ffade | [
"MIT"
] | null | null | null | server_app.py | PiZep/timelapse_control | 1e1d33cad02251b92df094e062a9cc8edb6ffade | [
"MIT"
] | null | null | null | server_app.py | PiZep/timelapse_control | 1e1d33cad02251b92df094e062a9cc8edb6ffade | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Main app"""
import threading
import locale
import logging
from importlib import import_module
import os
from flask import (Flask,
render_template,
Response,
request,
send_file,
url_for,
... | 33.618182 | 78 | 0.58437 | import threading
import locale
import logging
from importlib import import_module
import os
from flask import (Flask,
render_template,
Response,
request,
send_file,
url_for,
redirect)
from webforms import T... | true | true |
08fcee27c8f27f70dfe825ac937d651623eede86 | 8,327 | py | Python | docassemble_pattern/text/xx/__init__.py | jhpyle/pattern | 37a2c57c28ba260def6892659ca69a36d2f091f3 | [
"BSD-3-Clause"
] | null | null | null | docassemble_pattern/text/xx/__init__.py | jhpyle/pattern | 37a2c57c28ba260def6892659ca69a36d2f091f3 | [
"BSD-3-Clause"
] | null | null | null | docassemble_pattern/text/xx/__init__.py | jhpyle/pattern | 37a2c57c28ba260def6892659ca69a36d2f091f3 | [
"BSD-3-Clause"
] | null | null | null | #### PATTERN | XX ##################################################################################
# -*- coding: utf-8 -*-
# Copyright (c) year, institute, country
# Author: Name (e-mail)
# License: BSD (see LICENSE.txt for details).
# http://www.clips.ua.ac.be/pages/pattern
#########################################... | 34.26749 | 108 | 0.652096 |
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from builtins import str, bytes, dict, int
from builtins import map, zip, filter
from builtins import object, range
import os
import sys
try:
MODULE = os.path.dirname(os.path.realpath(__file__))
exce... | true | true |
08fcee978863c7096955ae73c1e416d63d93ca23 | 7,641 | py | Python | meta_test.py | rtaiello/learning-to-learn | 2f6f420f05f9be97671a7c8811db64de9383a6eb | [
"Apache-2.0"
] | 4,429 | 2016-12-06T17:13:28.000Z | 2022-03-24T03:29:06.000Z | meta_test.py | xahidbuffon/learning-to-learn | f3c1a8d176b8ea7cc60478bfcfdd10a7a52fd296 | [
"Apache-2.0"
] | 36 | 2016-12-08T20:26:07.000Z | 2021-06-29T09:57:22.000Z | meta_test.py | xahidbuffon/learning-to-learn | f3c1a8d176b8ea7cc60478bfcfdd10a7a52fd296 | [
"Apache-2.0"
] | 702 | 2016-12-07T00:35:26.000Z | 2022-03-24T17:50:14.000Z | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 31.705394 | 80 | 0.594163 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tempfile
from nose_parameterized import parameterized
import numpy as np
from six.moves import xrange
import sonnet as snt
import tensorflow as tf
import meta
import problems
def train(ses... | true | true |
08fcef27aba388149b65644e69d8325d39c89da4 | 11,418 | py | Python | bionetgen/modelapi/bngparser.py | cjarmstrong97/PyBioNetGen | 5febfbba0da20b61771474e0de6c0a5988d6467e | [
"MIT"
] | 4 | 2021-02-25T20:26:08.000Z | 2022-01-24T17:40:37.000Z | bionetgen/modelapi/bngparser.py | cjarmstrong97/PyBioNetGen | 5febfbba0da20b61771474e0de6c0a5988d6467e | [
"MIT"
] | 30 | 2021-06-07T22:41:40.000Z | 2022-03-28T19:50:25.000Z | bionetgen/modelapi/bngparser.py | cjarmstrong97/PyBioNetGen | 5febfbba0da20b61771474e0de6c0a5988d6467e | [
"MIT"
] | 1 | 2021-07-16T17:07:12.000Z | 2021-07-16T17:07:12.000Z | import xmltodict, re
from bionetgen.main import BioNetGen
from tempfile import TemporaryFile
from .bngfile import BNGFile
from .xmlparsers import ParameterBlockXML, CompartmentBlockXML, ObservableBlockXML
from .xmlparsers import SpeciesBlockXML, MoleculeTypeBlockXML, FunctionBlockXML
from .xmlparsers import RuleBlock... | 47.377593 | 132 | 0.483535 | import xmltodict, re
from bionetgen.main import BioNetGen
from tempfile import TemporaryFile
from .bngfile import BNGFile
from .xmlparsers import ParameterBlockXML, CompartmentBlockXML, ObservableBlockXML
from .xmlparsers import SpeciesBlockXML, MoleculeTypeBlockXML, FunctionBlockXML
from .xmlparsers import RuleBlock... | true | true |
08fcef92b5e7ff391020a04a2c6a1d64615e1cd6 | 1,822 | py | Python | utils/swift_build_support/swift_build_support/products/__init__.py | keakalamudo/swift | 74f287899c69027307e63733f043c648dc629cd0 | [
"Apache-2.0"
] | 1 | 2020-09-14T21:37:20.000Z | 2020-09-14T21:37:20.000Z | utils/swift_build_support/swift_build_support/products/__init__.py | keakalamudo/swift | 74f287899c69027307e63733f043c648dc629cd0 | [
"Apache-2.0"
] | null | null | null | utils/swift_build_support/swift_build_support/products/__init__.py | keakalamudo/swift | 74f287899c69027307e63733f043c648dc629cd0 | [
"Apache-2.0"
] | null | null | null | # swift_build_support/products/__init__.py ----------------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.tx... | 27.19403 | 78 | 0.704171 |
from .benchmarks import Benchmarks
from .cmark import CMark
from .foundation import Foundation
from .indexstoredb import IndexStoreDB
from .libcxx import LibCXX
from .libdispatch import LibDispatch
from .libicu import LibICU
from .llbuild import LLBuild
from .lldb import LLDB
from .llvm import LLVM
from .ninja import ... | true | true |
08fcefca246ebdcc2f50460cb14232e7eebf0a7e | 11,617 | py | Python | tageditor/src/plugin.py | builder08/enigma2-plugins_2 | f8f08b947e23c1c86b011492a7323125774c3482 | [
"OLDAP-2.3"
] | null | null | null | tageditor/src/plugin.py | builder08/enigma2-plugins_2 | f8f08b947e23c1c86b011492a7323125774c3482 | [
"OLDAP-2.3"
] | null | null | null | tageditor/src/plugin.py | builder08/enigma2-plugins_2 | f8f08b947e23c1c86b011492a7323125774c3482 | [
"OLDAP-2.3"
] | null | null | null | # for localized messages
from . import _
from Plugins.Plugin import PluginDescriptor
from Screens.Screen import Screen
from Screens.InputBox import InputBox
from Screens.ChoiceBox import ChoiceBox
from Screens.MessageBox import MessageBox
from Components.config import config
from Components.ActionMap import ActionMap
... | 33.770349 | 223 | 0.695705 | from . import _
from Plugins.Plugin import PluginDescriptor
from Screens.Screen import Screen
from Screens.InputBox import InputBox
from Screens.ChoiceBox import ChoiceBox
from Screens.MessageBox import MessageBox
from Components.config import config
from Components.ActionMap import ActionMap
from Components.Sources.S... | true | true |
08fcefff60eb20fd8350074e7c7549b7e524650f | 6,319 | py | Python | code/language_model.py | nlp-textplay/textplay | 6e305f5474b3574b26ac417c522aaaf9bd6ca997 | [
"Apache-2.0"
] | null | null | null | code/language_model.py | nlp-textplay/textplay | 6e305f5474b3574b26ac417c522aaaf9bd6ca997 | [
"Apache-2.0"
] | null | null | null | code/language_model.py | nlp-textplay/textplay | 6e305f5474b3574b26ac417c522aaaf9bd6ca997 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import time
import ipdb
import random
import numpy as np
import tensorflow as tf
from vocab import Vocabulary, build_vocab
from options import load_arguments
from file_io import load_sent
from utils import *
from nn import *
class Model(object):
def __init__(self, args, vocab):
dim_e... | 34.71978 | 85 | 0.542174 | import os
import sys
import time
import ipdb
import random
import numpy as np
import tensorflow as tf
from vocab import Vocabulary, build_vocab
from options import load_arguments
from file_io import load_sent
from utils import *
from nn import *
class Model(object):
def __init__(self, args, vocab):
dim_e... | false | true |
08fcf0fef4f9e7ca5428b3442f7dbfebd6ef228c | 1,223 | py | Python | modules/runnable/script10.py | Asichurter/Few-Shot-Project | 865cd6aa7b996c518dfa48dcc9ffad90445f9efe | [
"MIT"
] | null | null | null | modules/runnable/script10.py | Asichurter/Few-Shot-Project | 865cd6aa7b996c518dfa48dcc9ffad90445f9efe | [
"MIT"
] | null | null | null | modules/runnable/script10.py | Asichurter/Few-Shot-Project | 865cd6aa7b996c518dfa48dcc9ffad90445f9efe | [
"MIT"
] | null | null | null | import csv
import os
import random as rd
from time import time
import shutil
from modules.utils.imageUtils import convert
label_path = 'H:/MicrosoftDataset/MalwareCla/trainLabels.csv'
src_path = 'H:/MicrosoftDataset/MalwareCla/microsoftPE/train/'
dst_path = 'H:/MicrosoftDataset/MalwareCla/microsoft/train/'
label_fil... | 29.119048 | 74 | 0.648406 | import csv
import os
import random as rd
from time import time
import shutil
from modules.utils.imageUtils import convert
label_path = 'H:/MicrosoftDataset/MalwareCla/trainLabels.csv'
src_path = 'H:/MicrosoftDataset/MalwareCla/microsoftPE/train/'
dst_path = 'H:/MicrosoftDataset/MalwareCla/microsoft/train/'
label_fil... | true | true |
08fcf1f6013320f9b19dfd8dacd7035fa7c9b878 | 148 | py | Python | Script/export_doxygen_core.py | GCLemon/Altseed | b525740d64001aaed673552eb4ba3e98a321fcdf | [
"FTL"
] | 37 | 2015-07-12T14:21:03.000Z | 2020-10-17T03:08:17.000Z | Script/export_doxygen_core.py | GCLemon/Altseed | b525740d64001aaed673552eb4ba3e98a321fcdf | [
"FTL"
] | 91 | 2015-06-14T10:47:22.000Z | 2020-06-29T18:05:21.000Z | Script/export_doxygen_core.py | GCLemon/Altseed | b525740d64001aaed673552eb4ba3e98a321fcdf | [
"FTL"
] | 14 | 2015-07-13T04:15:20.000Z | 2021-09-30T01:34:51.000Z | import aceutils
aceutils.cdToScript()
aceutils.mkdir('../Doxygen')
aceutils.cd(r'../Doxygen/')
aceutils.call(r'doxygen ../Script/Doxyfile_cpp_XML') | 24.666667 | 52 | 0.756757 | import aceutils
aceutils.cdToScript()
aceutils.mkdir('../Doxygen')
aceutils.cd(r'../Doxygen/')
aceutils.call(r'doxygen ../Script/Doxyfile_cpp_XML') | true | true |
08fcf25036f02a8bb879be41bed1d3ba2a69f77b | 3,310 | py | Python | AppcestryCore/merge_markup.py | jason-chao/appcestry | c3858e51ac27466cb008722453a3cc9882b2e6a1 | [
"MIT"
] | 3 | 2019-04-04T02:49:40.000Z | 2021-08-31T03:19:47.000Z | AppcestryCore/merge_markup.py | jason-chao/appcestry | c3858e51ac27466cb008722453a3cc9882b2e6a1 | [
"MIT"
] | null | null | null | AppcestryCore/merge_markup.py | jason-chao/appcestry | c3858e51ac27466cb008722453a3cc9882b2e6a1 | [
"MIT"
] | 2 | 2019-04-05T15:06:54.000Z | 2019-08-04T12:21:55.000Z | #!/usr/bin/env python3
# This script extracts the attribute names and values from markup (XML) files and merges them into a single file.
import argparse
import os
import logging
import json
from xml.etree import ElementTree as ET
import gc
def getAllFilesOfExtension(rootDir, extension):
"""Traverse a directory ... | 33.77551 | 114 | 0.619033 |
import argparse
import os
import logging
import json
from xml.etree import ElementTree as ET
import gc
def getAllFilesOfExtension(rootDir, extension):
fileList = []
for (dirPath, dirNames, fileNames) in os.walk(rootDir):
for filename in fileNames:
if filename.endswith(extension):
... | true | true |
08fcf30d42f5670d6de48caa3e55d1b44d7bd12b | 8,163 | py | Python | tests/pytests/test_issues.py | OfirMos/RediSearch | f67e29cba4829390213d011b4b5dd9c75d26a069 | [
"Apache-2.0",
"Ruby",
"BSD-3-Clause",
"MIT"
] | null | null | null | tests/pytests/test_issues.py | OfirMos/RediSearch | f67e29cba4829390213d011b4b5dd9c75d26a069 | [
"Apache-2.0",
"Ruby",
"BSD-3-Clause",
"MIT"
] | null | null | null | tests/pytests/test_issues.py | OfirMos/RediSearch | f67e29cba4829390213d011b4b5dd9c75d26a069 | [
"Apache-2.0",
"Ruby",
"BSD-3-Clause",
"MIT"
] | null | null | null | from common import getConnectionByEnv, waitForIndex, sortedResults, toSortedFlatList
def test_1282(env):
env.expect('FT.CREATE idx ON HASH SCHEMA txt1 TEXT').equal('OK')
env.expect('FT.ADD idx doc1 1.0 FIELDS txt1 foo').equal('OK')
# optional search for new word would crash server
env.expect('FT.SEARCH idx', ... | 47.459302 | 130 | 0.631141 | from common import getConnectionByEnv, waitForIndex, sortedResults, toSortedFlatList
def test_1282(env):
env.expect('FT.CREATE idx ON HASH SCHEMA txt1 TEXT').equal('OK')
env.expect('FT.ADD idx doc1 1.0 FIELDS txt1 foo').equal('OK')
env.expect('FT.SEARCH idx', '~foo').equal([1L, 'doc1', ['txt1', 'foo']])
env... | false | true |
08fcf41851b4a037651285b73365e171188b8753 | 4,719 | py | Python | src/margin/marginStats.py | UCSC-nanopore-cgl/marginAlign | 538d4bf9e95ab56e23f518a3e3ed30013f738c8b | [
"MIT"
] | 36 | 2015-02-16T17:42:08.000Z | 2021-12-31T10:00:34.000Z | src/margin/marginStats.py | UCSC-nanopore-cgl/marginAlign | 538d4bf9e95ab56e23f518a3e3ed30013f738c8b | [
"MIT"
] | 49 | 2015-01-06T18:13:47.000Z | 2020-09-25T01:37:43.000Z | src/margin/marginStats.py | UCSC-nanopore-cgl/marginAlign | 538d4bf9e95ab56e23f518a3e3ed30013f738c8b | [
"MIT"
] | 16 | 2015-05-05T07:05:23.000Z | 2020-05-27T17:19:44.000Z | import os
import sys
from optparse import OptionParser
from jobTree.src.bioio import logger, setLoggingFromOptions, addLoggingOptions
from margin.utils import ReadAlignmentStats
import numpy
"""Simple script to calculate alignment statistics from a SAM file.
"""
def main():
#Parse the inputs args/options
... | 42.133929 | 112 | 0.635728 | import os
import sys
from optparse import OptionParser
from jobTree.src.bioio import logger, setLoggingFromOptions, addLoggingOptions
from margin.utils import ReadAlignmentStats
import numpy
"""Simple script to calculate alignment statistics from a SAM file.
"""
def main():
parser = OptionParser(usage="us... | false | true |
08fcf46ffdf18144b02a454be55c49e5aae83229 | 958 | py | Python | Python/d014_stopwatch/d014_stopwatch.py | yashaslokesh/100-Days-Of-Code | a5aadfb41675224828c6fce22abc5ab0263141c8 | [
"MIT"
] | 7 | 2018-07-03T15:52:34.000Z | 2022-01-20T19:26:32.000Z | Python/d014_stopwatch/d014_stopwatch.py | yashaslokesh/100-Days-Of-Code | a5aadfb41675224828c6fce22abc5ab0263141c8 | [
"MIT"
] | null | null | null | Python/d014_stopwatch/d014_stopwatch.py | yashaslokesh/100-Days-Of-Code | a5aadfb41675224828c6fce22abc5ab0263141c8 | [
"MIT"
] | 1 | 2018-07-31T06:37:41.000Z | 2018-07-31T06:37:41.000Z | import time
print("Press S to start stopwatch, and press Enter to lap... Press Ctrl+C to quit")
start = input()
if start.strip().lower() == "s":
start_time = time.time()
most_recent_time = time.time() # Initialize to be the starting time
laps = 1
try:
while True:
lap_key = input(... | 36.846154 | 107 | 0.590814 | import time
print("Press S to start stopwatch, and press Enter to lap... Press Ctrl+C to quit")
start = input()
if start.strip().lower() == "s":
start_time = time.time()
most_recent_time = time.time()
laps = 1
try:
while True:
lap_key = input()
if lap_key.strip().lowe... | true | true |
08fcf6bc549e866ec49b6bbfef766d02d766c76e | 874 | py | Python | modules/helpers/logHelper.py | Kolyamba-mamba/technology-partner-search-module | a1b5c86cb44e84fb712f8b0df42c93866fe919f9 | [
"MIT"
] | 2 | 2021-02-23T17:43:36.000Z | 2021-02-24T19:31:42.000Z | modules/helpers/logHelper.py | Kolyamba-mamba/technology-partner-search-module | a1b5c86cb44e84fb712f8b0df42c93866fe919f9 | [
"MIT"
] | null | null | null | modules/helpers/logHelper.py | Kolyamba-mamba/technology-partner-search-module | a1b5c86cb44e84fb712f8b0df42c93866fe919f9 | [
"MIT"
] | null | null | null | from typing import List
import os
import sys
from modules.models.sao import Sao
def record_sao_log(patent_number: str, description_text: str, sentences: List[str], saos: List[Sao], filePath: str):
try:
with open(filePath, 'a', encoding="utf-8") as file:
file.write(patent_number + '\n')
... | 38 | 116 | 0.572082 | from typing import List
import os
import sys
from modules.models.sao import Sao
def record_sao_log(patent_number: str, description_text: str, sentences: List[str], saos: List[Sao], filePath: str):
try:
with open(filePath, 'a', encoding="utf-8") as file:
file.write(patent_number + '\n')
... | true | true |
08fcf742d22ec58427db269ec12f3762d82917c3 | 674 | py | Python | flask/setup_py3.py | MalcolmEvershed/FrameworkBenchmarks | d3c2bb527a2fc79bb6ccd47df6729a1361c63140 | [
"BSD-3-Clause"
] | 1 | 2015-09-10T12:51:51.000Z | 2015-09-10T12:51:51.000Z | flask/setup_py3.py | MalcolmEvershed/FrameworkBenchmarks | d3c2bb527a2fc79bb6ccd47df6729a1361c63140 | [
"BSD-3-Clause"
] | null | null | null | flask/setup_py3.py | MalcolmEvershed/FrameworkBenchmarks | d3c2bb527a2fc79bb6ccd47df6729a1361c63140 | [
"BSD-3-Clause"
] | null | null | null | import subprocess
import setup_util
import multiprocessing
import os
bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py3/bin')
NCPU = multiprocessing.cpu_count()
proc = None
def start(args):
global proc
setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
proc = subproc... | 21.0625 | 77 | 0.621662 | import subprocess
import setup_util
import multiprocessing
import os
bin_dir = os.path.expanduser('~/FrameworkBenchmarks/installs/py3/bin')
NCPU = multiprocessing.cpu_count()
proc = None
def start(args):
global proc
setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host)
proc = subproc... | true | true |
08fcf7bc831e35f348bac58a7a6bfc914d784223 | 8,085 | py | Python | dcos/jsonitem.py | ConnectionMaster/dcos-cli | 38b3f9b39d38a8f6339400de4688bccca9c23278 | [
"Apache-2.0"
] | 1 | 2016-01-29T02:03:26.000Z | 2016-01-29T02:03:26.000Z | dcos/jsonitem.py | ConnectionMaster/dcos-cli | 38b3f9b39d38a8f6339400de4688bccca9c23278 | [
"Apache-2.0"
] | null | null | null | dcos/jsonitem.py | ConnectionMaster/dcos-cli | 38b3f9b39d38a8f6339400de4688bccca9c23278 | [
"Apache-2.0"
] | 1 | 2021-01-15T23:51:26.000Z | 2021-01-15T23:51:26.000Z | import collections
import json
import re
from dcos import util
from dcos.errors import DCOSException
logger = util.get_logger(__name__)
def parse_json_item(json_item, schema):
"""Parse the json item (optionally based on a schema).
:param json_item: A JSON item in the form 'key=value'
:type json_item: s... | 27.593857 | 79 | 0.589363 | import collections
import json
import re
from dcos import util
from dcos.errors import DCOSException
logger = util.get_logger(__name__)
def parse_json_item(json_item, schema):
terms = json_item.split('=', 1)
if len(terms) != 2:
raise DCOSException('{!r} is not a valid json-item'.format(json_item))
... | true | true |
08fcf86da129f3e9dcf59fe4833ac1886baf7926 | 39,188 | py | Python | functions/source/create-resources.py | aws-quickstart/quickstart-snowflake-autopilot-integration | b29d80a16c66c75099ce7f144c631554c7eb217e | [
"Apache-2.0"
] | null | null | null | functions/source/create-resources.py | aws-quickstart/quickstart-snowflake-autopilot-integration | b29d80a16c66c75099ce7f144c631554c7eb217e | [
"Apache-2.0"
] | 2 | 2022-03-11T22:33:30.000Z | 2022-03-15T18:20:38.000Z | functions/source/create-resources.py | aws-quickstart/quickstart-snowflake-autopilot-integration | b29d80a16c66c75099ce7f144c631554c7eb217e | [
"Apache-2.0"
] | 1 | 2022-03-15T22:58:49.000Z | 2022-03-15T22:58:49.000Z | import json
import boto3
import os
import logging
from botocore.exceptions import ClientError
import requests
import snowflake.connector
SUCCESS = 'SUCCESS'
FAILED = 'FAILED'
EMPTY_RESPONSE_DATA = {}
EXTERNAL_ID = "external_id"
SERVICE = "service"
USER_ARN = "user_arn"
logger = logging.getLogger(__name__)
logger.se... | 47.558252 | 349 | 0.688706 | import json
import boto3
import os
import logging
from botocore.exceptions import ClientError
import requests
import snowflake.connector
SUCCESS = 'SUCCESS'
FAILED = 'FAILED'
EMPTY_RESPONSE_DATA = {}
EXTERNAL_ID = "external_id"
SERVICE = "service"
USER_ARN = "user_arn"
logger = logging.getLogger(__name__)
logger.se... | true | true |
08fcf9b6768aa57c7d9ce5d80f35e1a2bc3a8b69 | 53 | py | Python | W7/D1/friends.py | Nasfame/Assignments-Masai | 0dc95c3fb58849637a7aad4914b92970c9196eca | [
"MIT"
] | 1 | 2020-05-29T09:00:44.000Z | 2020-05-29T09:00:44.000Z | W7/D1/friends.py | Nasfame/Assignments-Masai | 0dc95c3fb58849637a7aad4914b92970c9196eca | [
"MIT"
] | null | null | null | W7/D1/friends.py | Nasfame/Assignments-Masai | 0dc95c3fb58849637a7aad4914b92970c9196eca | [
"MIT"
] | null | null | null | friends={'friends':['Physics','Chemistry','Biology']} | 53 | 53 | 0.698113 | friends={'friends':['Physics','Chemistry','Biology']} | true | true |
08fcf9ec692def2de8ee3fb923df2291c6a2a1f6 | 285 | py | Python | daraz/daraz/items.py | nOOBIE-nOOBIE/Web-scraper-for-ecommerce-website-daraz.com.np- | 1d478038f516fe590177e345cf117431d79ac009 | [
"MIT"
] | 1 | 2020-09-18T10:01:25.000Z | 2020-09-18T10:01:25.000Z | daraz/daraz/items.py | nOOBIE-nOOBIE/Web-scraper-for-ecommerce-website-daraz.com.np- | 1d478038f516fe590177e345cf117431d79ac009 | [
"MIT"
] | null | null | null | daraz/daraz/items.py | nOOBIE-nOOBIE/Web-scraper-for-ecommerce-website-daraz.com.np- | 1d478038f516fe590177e345cf117431d79ac009 | [
"MIT"
] | 3 | 2020-09-08T06:26:54.000Z | 2022-03-04T19:32:14.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class DarazItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
| 19 | 52 | 0.684211 |
import scrapy
class DarazItem(scrapy.Item):
pass
| true | true |
08fcf9f522606a670d1495b03079abb64ed0a669 | 4,214 | py | Python | docs/_ext/lv_example.py | nickzhuang0613/lvgl | b7e6f6763d6fa967bacaca5a60ee33321f73c8a5 | [
"MIT"
] | 5,238 | 2020-05-18T13:08:59.000Z | 2022-03-31T21:38:16.000Z | docs/_ext/lv_example.py | imliubo/lvgl | 93c1303ee7989d25216262e1d0ea244b59b975f6 | [
"MIT"
] | 1,590 | 2020-05-18T09:47:07.000Z | 2022-03-31T23:26:41.000Z | docs/_ext/lv_example.py | imliubo/lvgl | 93c1303ee7989d25216262e1d0ea244b59b975f6 | [
"MIT"
] | 1,214 | 2020-05-19T00:45:08.000Z | 2022-03-31T06:41:13.000Z | import os
from docutils import nodes
from docutils.parsers.rst import Directive, directives
from docutils.parsers.rst.directives.images import Image
from sphinx.directives.code import LiteralInclude
def excluded_list(argument):
return argument.split(',')
class LvExample(Directive):
required_arguments = 1... | 42.565657 | 357 | 0.652824 | import os
from docutils import nodes
from docutils.parsers.rst import Directive, directives
from docutils.parsers.rst.directives.images import Image
from sphinx.directives.code import LiteralInclude
def excluded_list(argument):
return argument.split(',')
class LvExample(Directive):
required_arguments = 1... | true | true |
08fcfc619c78d83b3385b6c49a1e17c66f693275 | 1,159 | py | Python | data/atmosphere_biogeochemistry/IFASTAT_nitrogen_production/viz/generate.py | ilopezgp/human_impacts | b2758245edac0946080a647f1dbfd1098c0f0b27 | [
"MIT"
] | 4 | 2020-08-25T00:52:01.000Z | 2020-11-16T16:57:46.000Z | data/atmosphere_biogeochemistry/IFASTAT_nitrogen_production/viz/generate.py | ilopezgp/human_impacts | b2758245edac0946080a647f1dbfd1098c0f0b27 | [
"MIT"
] | 5 | 2020-10-30T21:22:55.000Z | 2021-12-30T02:07:02.000Z | data/atmosphere_biogeochemistry/IFASTAT_nitrogen_production/viz/generate.py | ilopezgp/human_impacts | b2758245edac0946080a647f1dbfd1098c0f0b27 | [
"MIT"
] | 2 | 2020-08-28T10:11:28.000Z | 2020-11-11T07:58:46.000Z | #%%
import numpy as np
import pandas as pd
import altair as alt
import anthro.io
# Load the IFASTAT nitrogen data.
data = pd.read_csv('../processed/IFA_ammonia_production_2008-2019.csv')
proc_data = pd.DataFrame()
proc_data['year'] = pd.to_datetime(data['year'], format='%Y')
proc_data['production (kg)'] = data['value'... | 42.925926 | 174 | 0.682485 | import numpy as np
import pandas as pd
import altair as alt
import anthro.io
data = pd.read_csv('../processed/IFA_ammonia_production_2008-2019.csv')
proc_data = pd.DataFrame()
proc_data['year'] = pd.to_datetime(data['year'], format='%Y')
proc_data['production (kg)'] = data['value']
proc_data['label'] = anthro.io.numer... | true | true |
08fcfc73c46e717a811b7ef43b60f1702b69f2d8 | 873 | py | Python | bike_app/migrations/0001_initial.py | Himanshu372/Bike-pool-app | 937936e9a09a71224f74bfd25dd52a98df35f267 | [
"MIT"
] | 3 | 2021-02-18T17:06:09.000Z | 2021-09-17T07:52:58.000Z | bike_app/migrations/0001_initial.py | Himanshu372/Bike_pool_app | 937936e9a09a71224f74bfd25dd52a98df35f267 | [
"MIT"
] | 10 | 2020-07-30T17:37:29.000Z | 2021-06-09T18:21:09.000Z | bike_app/migrations/0001_initial.py | Himanshu372/Bike-pool-app | 937936e9a09a71224f74bfd25dd52a98df35f267 | [
"MIT"
] | 1 | 2020-05-03T13:00:01.000Z | 2020-05-03T13:00:01.000Z | # Generated by Django 2.2.5 on 2019-09-09 14:21
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='rideData',
fields=[
('id', models.AutoField... | 31.178571 | 114 | 0.571592 |
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='rideData',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=... | true | true |
08fcfd690deb90d465600fd9656effe1be1fa925 | 361 | py | Python | micro_shop/showcase/migrations/0004_auto_20191214_2054.py | SlavaSkvortsov/micro-shop | fd8ac23550da9be277a9234464fdab1213356f3d | [
"MIT"
] | 1 | 2021-06-17T15:11:03.000Z | 2021-06-17T15:11:03.000Z | micro_shop/showcase/migrations/0004_auto_20191214_2054.py | SlavaSkvortsov/micro-shop | fd8ac23550da9be277a9234464fdab1213356f3d | [
"MIT"
] | 7 | 2020-06-30T11:25:28.000Z | 2021-06-09T18:51:55.000Z | micro_shop/showcase/migrations/0004_auto_20191214_2054.py | SlavaSkvortsov/micro-shop | fd8ac23550da9be277a9234464fdab1213356f3d | [
"MIT"
] | 5 | 2020-10-02T20:01:43.000Z | 2021-06-21T08:57:29.000Z | # Generated by Django 3.0 on 2019-12-14 20:54
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('showcase', '0003_auto_20191214_2024'),
]
operations = [
migrations.RenameField(
model_name='item',
old_name='title',
... | 19 | 48 | 0.584488 |
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('showcase', '0003_auto_20191214_2024'),
]
operations = [
migrations.RenameField(
model_name='item',
old_name='title',
new_name='название',
),
]
| true | true |
08fcfe7764362ac97cb311089206ea322e50e2fe | 12,754 | py | Python | src/bot/cocoa/src/model/graph_embedder.py | s-akanksha/DialoGraph_ICLR21 | d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc | [
"Apache-2.0"
] | 12 | 2021-03-17T05:15:33.000Z | 2022-01-19T06:09:21.000Z | src/bot/cocoa/src/model/graph_embedder.py | s-akanksha/DialoGraph_ICLR21 | d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc | [
"Apache-2.0"
] | 2 | 2021-05-25T07:28:46.000Z | 2022-02-11T01:54:43.000Z | src/bot/cocoa/src/model/graph_embedder.py | s-akanksha/DialoGraph_ICLR21 | d5bbc10b2623c9f84d21a99a5e54e7dcfdfb1bcc | [
"Apache-2.0"
] | 4 | 2021-10-11T03:39:38.000Z | 2022-02-01T23:58:50.000Z | import tensorflow as tf
from tensorflow.python.ops.math_ops import tanh
#from tensorflow.python.ops.rnn_cell_impl import _linear as linear
from tensorflow.contrib.rnn.python.ops.core_rnn_cell import _Linear as linear
# from tensorflow.python.ops.rnn_cell import _linear as linear
from src.model.util import batch_embedd... | 55.694323 | 203 | 0.648189 | import tensorflow as tf
from tensorflow.python.ops.math_ops import tanh
from tensorflow.contrib.rnn.python.ops.core_rnn_cell import _Linear as linear
from src.model.util import batch_embedding_lookup, batch_linear, EPS
def add_graph_embed_arguments(parser):
parser.add_argument('--node-embed-size', type=int, defau... | true | true |
08fcfead5e55fd7198760f8c301248b038fb4767 | 3,371 | py | Python | horizon/openstack_dashboard/dashboards/network/vpn/urls.py | yianjiajia/openstack_horizon | 9e36a4c3648ef29d0df6912d990465f51d6124a6 | [
"Apache-2.0"
] | null | null | null | horizon/openstack_dashboard/dashboards/network/vpn/urls.py | yianjiajia/openstack_horizon | 9e36a4c3648ef29d0df6912d990465f51d6124a6 | [
"Apache-2.0"
] | null | null | null | horizon/openstack_dashboard/dashboards/network/vpn/urls.py | yianjiajia/openstack_horizon | 9e36a4c3648ef29d0df6912d990465f51d6124a6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013, Mirantis Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 51.861538 | 101 | 0.695343 |
from django.conf.urls import patterns
from django.conf.urls import url
from openstack_dashboard.dashboards.network.vpn import views
urlpatterns = patterns(
'openstack_dashboard.dashboards.network.vpn.views',
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^addsslvpnconnection$',
views.... | true | true |
08fcff76e3f4ef2e27e7eb3c90c797bee59812de | 8,203 | py | Python | spyder/widgets/onecolumntree.py | aglotero/spyder | 075d32fa359b728416de36cb0e744715fa5e3943 | [
"MIT"
] | 1 | 2022-01-19T05:57:29.000Z | 2022-01-19T05:57:29.000Z | spyder/widgets/onecolumntree.py | ShenggaoZhu/spyder | 3556172888d8bb5dcc5f735676868a0d78d7d604 | [
"MIT"
] | 1 | 2020-10-29T19:53:11.000Z | 2020-10-29T19:53:11.000Z | spyder/widgets/onecolumntree.py | ShenggaoZhu/spyder | 3556172888d8bb5dcc5f735676868a0d78d7d604 | [
"MIT"
] | 1 | 2019-01-16T06:51:50.000Z | 2019-01-16T06:51:50.000Z | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
# Third party imports
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QTreeWidget, QMenu
# Local imports
from spyder.config.base import _
from sp... | 38.511737 | 81 | 0.563574 |
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QTreeWidget, QMenu
from spyder.config.base import _
from spyder.utils import icon_manager as ima
from spyder.utils.qthelpers import (add_actions, create_action,
get_item_user_text)
class OneColumnTree(QTreeWidget):... | true | true |
08fd00890a5bd9abcccae676b9151dfa02e2df97 | 589 | py | Python | supreme/lib/pywt/demo/swt2.py | KirillDZR/supreme | c296722599363bd0cbcce6877bd9de9b066cb74b | [
"BSD-3-Clause"
] | 95 | 2015-01-17T09:48:20.000Z | 2021-11-07T16:02:38.000Z | supreme/lib/pywt/demo/swt2.py | KirillDZR/supreme | c296722599363bd0cbcce6877bd9de9b066cb74b | [
"BSD-3-Clause"
] | 4 | 2015-10-23T15:13:34.000Z | 2019-09-23T22:47:10.000Z | supreme/lib/pywt/demo/swt2.py | KirillDZR/supreme | c296722599363bd0cbcce6877bd9de9b066cb74b | [
"BSD-3-Clause"
] | 34 | 2015-02-22T20:54:40.000Z | 2022-02-27T13:39:32.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pylab
import numpy
import Image # PIL
from supreme.lib import pywt
im = Image.open("data/aero.png").convert('L')
arr = numpy.fromstring(im.tostring(), numpy.uint8)
arr.shape = (im.size[1], im.size[0])
pylab.imshow(arr, interpolation="nearest", cmap=pylab.cm.gray)
... | 26.772727 | 84 | 0.662139 |
import pylab
import numpy
import Image from supreme.lib import pywt
im = Image.open("data/aero.png").convert('L')
arr = numpy.fromstring(im.tostring(), numpy.uint8)
arr.shape = (im.size[1], im.size[0])
pylab.imshow(arr, interpolation="nearest", cmap=pylab.cm.gray)
for LL, (LH, HL, HH) in pywt.swt2(arr, 'bior1.3', l... | true | true |
08fd01563ab0d1ca84e9040082718a7ab8d78b7c | 63 | py | Python | BoxEngine/ROIPooling/__init__.py | apulis/RFCN-tensorflow | 948f5fc79cfcb542ada593bb2ea4b86bb08d5e5c | [
"Apache-2.0"
] | 333 | 2017-03-01T05:40:49.000Z | 2020-08-08T22:31:48.000Z | BoxEngine/ROIPooling/__init__.py | breakend2010/RFCN-tensorflow | 948f5fc79cfcb542ada593bb2ea4b86bb08d5e5c | [
"Apache-2.0"
] | 49 | 2017-02-28T23:06:08.000Z | 2020-08-20T12:20:07.000Z | BoxEngine/ROIPooling/__init__.py | breakend2010/RFCN-tensorflow | 948f5fc79cfcb542ada593bb2ea4b86bb08d5e5c | [
"Apache-2.0"
] | 154 | 2017-02-27T12:42:42.000Z | 2020-08-08T22:31:49.000Z | __author__ = 'Robert Csordas'
from .ROIPoolingWrapper import *
| 21 | 32 | 0.793651 | __author__ = 'Robert Csordas'
from .ROIPoolingWrapper import *
| true | true |
08fd019b4289ea40ff6c4dfc76b423a6019ddefc | 5,519 | py | Python | pybind/slxos/v17r_2_00/routing_system/router/pim/rpf/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17r_2_00/routing_system/router/pim/rpf/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v17r_2_00/routing_system/router/pim/rpf/__init__.py | extremenetworks/pybind | 44c467e71b2b425be63867aba6e6fa28b2cfe7fb | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 44.508065 | 423 | 0.703207 |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | true | true |
08fd01e967e47b367c175c09c78d6d482d273085 | 13,529 | py | Python | ENIAC/api/loop_statistics/loop_indicators/boll_indicator.py | Ahrli/fast_tools | 144d764e4f169d3ab3753dcc6a79db9f9449de59 | [
"Apache-2.0"
] | 1 | 2021-12-11T16:33:47.000Z | 2021-12-11T16:33:47.000Z | ENIAC/api/loop_statistics/loop_indicators/boll_indicator.py | webclinic017/fast_tools | 144d764e4f169d3ab3753dcc6a79db9f9449de59 | [
"Apache-2.0"
] | null | null | null | ENIAC/api/loop_statistics/loop_indicators/boll_indicator.py | webclinic017/fast_tools | 144d764e4f169d3ab3753dcc6a79db9f9449de59 | [
"Apache-2.0"
] | 3 | 2021-11-22T09:46:43.000Z | 2022-01-28T22:33:07.000Z | import backtrader.indicators as btind
from . import compare_price as compare
from .base_indicator import iBaseIndicator
class iBollPercentb(iBaseIndicator):
'''
因子:%b指标:(收盘价-布林线下轨价格)/(布林线上轨价格-布林线下轨价格)
传入参数:
rule = {"args": [20, 2.0], #boll周期, 几倍的标准差,默认为2
"logic":{"compare": "gt","byVal... | 31.983452 | 116 | 0.55636 | import backtrader.indicators as btind
from . import compare_price as compare
from .base_indicator import iBaseIndicator
class iBollPercentb(iBaseIndicator):
lines = ('percentb',)
params = dict(rule=list())
def __init__(self):
super(iBollPercentb, self).__init__()
self.boll = btind.BBands(s... | true | true |
08fd02a7a7f013ad6a56e6c45ac840580c412e3c | 182 | py | Python | tests/test_data/bp/ನನ್ನ_ಸ್ಕ್ರಿಪ್ಟ್.py | microsoft/debugpy | ddb083cc25fbe5c7aa5d504130a451e907e777b1 | [
"MIT"
] | 695 | 2020-01-30T14:34:51.000Z | 2022-03-31T09:31:57.000Z | tests/test_data/bp/ನನ್ನ_ಸ್ಕ್ರಿಪ್ಟ್.py | microsoft/debugpy | ddb083cc25fbe5c7aa5d504130a451e907e777b1 | [
"MIT"
] | 845 | 2020-01-29T23:53:36.000Z | 2022-03-31T19:45:04.000Z | tests/test_data/bp/ನನ್ನ_ಸ್ಕ್ರಿಪ್ಟ್.py | microsoft/debugpy | ddb083cc25fbe5c7aa5d504130a451e907e777b1 | [
"MIT"
] | 66 | 2020-01-30T13:10:38.000Z | 2022-03-29T07:11:17.000Z | # -*- coding: utf-8 -*-
import sys
import debuggee
def ಏನಾದರೂ_ಮಾಡು():
print("ಏನೋ ಮಾಡಿದೆ".encode(sys.stdout.encoding, errors="replace")) # @bp
debuggee.setup()
ಏನಾದರೂ_ಮಾಡು()
| 15.166667 | 76 | 0.60989 | import sys
import debuggee
def ಏನಾದರೂ_ಮಾಡು():
print("ಏನೋ ಮಾಡಿದೆ".encode(sys.stdout.encoding, errors="replace"))
debuggee.setup()
ಏನಾದರೂ_ಮಾಡು()
| true | true |
08fd02f48621fb65e1f2db3e76a06a52dd6a8582 | 304 | py | Python | Genetic/node.py | matinaghaei/Genetic-and-Simulated-Annealing-Algorithms | e11e5773dddf514750d2d159db9becd97737348f | [
"MIT"
] | 1 | 2021-11-02T16:34:09.000Z | 2021-11-02T16:34:09.000Z | Simulated Annealing/node.py | matinaghaei/Genetic-and-Simulated-Annealing-Algorithms | e11e5773dddf514750d2d159db9becd97737348f | [
"MIT"
] | null | null | null | Simulated Annealing/node.py | matinaghaei/Genetic-and-Simulated-Annealing-Algorithms | e11e5773dddf514750d2d159db9becd97737348f | [
"MIT"
] | null | null | null | import random
class Node:
colors = []
@classmethod
def set_number_of_colors(cls, number_of_colors):
cls.colors = range(number_of_colors)
def __init__(self):
self.color = random.choice(self.colors)
def mutate(self):
self.color = random.choice(self.colors)
| 19 | 52 | 0.657895 | import random
class Node:
colors = []
@classmethod
def set_number_of_colors(cls, number_of_colors):
cls.colors = range(number_of_colors)
def __init__(self):
self.color = random.choice(self.colors)
def mutate(self):
self.color = random.choice(self.colors)
| true | true |
08fd044f63f395024689a964ddbb4a68181b28fc | 16,279 | py | Python | userbot/modules/pmpermit.py | DitttExplain/Ayiin-Userbot | ddf1512cfdc2994f294f8bf31850c161f4dd9dfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/pmpermit.py | DitttExplain/Ayiin-Userbot | ddf1512cfdc2994f294f8bf31850c161f4dd9dfa | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/pmpermit.py | DitttExplain/Ayiin-Userbot | ddf1512cfdc2994f294f8bf31850c161f4dd9dfa | [
"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.
#
# Recode by @mrismanaziz
# @SharingUserbot
""" Userbot module for keeping control who PM you. """
from sqlalchemy.exc ... | 37.770302 | 164 | 0.59973 |
from sqlalchemy.exc import IntegrityError
from telethon.tl.functions.contacts import BlockRequest, UnblockRequest
from telethon.tl.functions.messages import ReportSpamRequest
from telethon.tl.types import User
from userbot import BOTLOG_CHATID
from userbot import CMD_HANDLER as cmd
from userbot import CMD_HELP, COUNT... | true | true |
08fd04b571b5b22772e8fe00e95983965df5834e | 10,567 | py | Python | pages/single_ticker.py | avanoene/risk_dash | 0459c8d04e9586022799585a86f79cc51c390b93 | [
"MIT"
] | null | null | null | pages/single_ticker.py | avanoene/risk_dash | 0459c8d04e9586022799585a86f79cc51c390b93 | [
"MIT"
] | 3 | 2021-04-21T04:37:37.000Z | 2021-04-21T04:37:38.000Z | pages/single_ticker.py | avanoene/risk_dash | 0459c8d04e9586022799585a86f79cc51c390b93 | [
"MIT"
] | 1 | 2019-06-26T09:23:24.000Z | 2019-06-26T09:23:24.000Z | import json
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
import numpy as np
import pandas as pd
from pandas.tseries.offsets import BDay
import plotly.graph_objs as go
from dash.dependencies import Input, Output, State
from app import app
from risk_dash... | 31.828313 | 125 | 0.452352 | import json
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
import numpy as np
import pandas as pd
from pandas.tseries.offsets import BDay
import plotly.graph_objs as go
from dash.dependencies import Input, Output, State
from app import app
from risk_dash... | true | true |
08fd04c9a312f2f3c237147d63573a3997954583 | 1,739 | py | Python | djangobmf/contrib/team/migrations/0003_teammember_to_bmfmodel.py | caputomarcos/django-bmf | 0d07a7d3f6a3ecfaca6c9376e764add1715cfd33 | [
"BSD-3-Clause"
] | null | null | null | djangobmf/contrib/team/migrations/0003_teammember_to_bmfmodel.py | caputomarcos/django-bmf | 0d07a7d3f6a3ecfaca6c9376e764add1715cfd33 | [
"BSD-3-Clause"
] | null | null | null | djangobmf/contrib/team/migrations/0003_teammember_to_bmfmodel.py | caputomarcos/django-bmf | 0d07a7d3f6a3ecfaca6c9376e764add1715cfd33 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('djangobm... | 36.229167 | 168 | 0.633698 | from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('djangobmf_team', '0002_version_0... | true | true |
08fd0640ce5b80c39e7c50b5a0b2eb8f0b3d034f | 14,480 | py | Python | dftimewolf/cli/dftimewolf_recipes.py | jleaniz/dftimewolf | 9f4f2f3914f713e237974ce7efcb169885e5a4e6 | [
"Apache-2.0"
] | null | null | null | dftimewolf/cli/dftimewolf_recipes.py | jleaniz/dftimewolf | 9f4f2f3914f713e237974ce7efcb169885e5a4e6 | [
"Apache-2.0"
] | null | null | null | dftimewolf/cli/dftimewolf_recipes.py | jleaniz/dftimewolf | 9f4f2f3914f713e237974ce7efcb169885e5a4e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""dftimewolf main entrypoint."""
import argparse
import logging
import os
import signal
import sys
from typing import TYPE_CHECKING, List, Optional, Dict, Any, cast
# pylint: disable=wrong-import-position
from dftimewolf.lib import logging_utils
from dftimewolf import co... | 36.290727 | 84 | 0.72797 |
import argparse
import logging
import os
import signal
import sys
from typing import TYPE_CHECKING, List, Optional, Dict, Any, cast
from dftimewolf.lib import logging_utils
from dftimewolf import config
from dftimewolf.lib import errors
from dftimewolf.lib import utils
if TYPE_CHECKING:
from dftimewolf.lib import... | true | true |
08fd07fd3ef2fc0a949c7c3e38fd6e43a44a8a38 | 1,734 | py | Python | app3/migrations/0011_demographicsmodel.py | wtianzi/SARWeb | e89d91deec19c2e3ef2ba65edb28b30c3e531f5a | [
"MIT"
] | null | null | null | app3/migrations/0011_demographicsmodel.py | wtianzi/SARWeb | e89d91deec19c2e3ef2ba65edb28b30c3e531f5a | [
"MIT"
] | 9 | 2020-02-11T23:43:52.000Z | 2022-02-10T07:31:33.000Z | app3/migrations/0011_demographicsmodel.py | wtianzi/SARWeb | e89d91deec19c2e3ef2ba65edb28b30c3e531f5a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-18 03:36
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app3', '0010_auto_20201016_1813'),
]
operations = [
migrations.CreateModel(
name='DemographicsModel',
fields=[
... | 45.631579 | 91 | 0.569204 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app3', '0010_auto_20201016_1813'),
]
operations = [
migrations.CreateModel(
name='DemographicsModel',
fields=[
('id', models.AutoField(primary_key=T... | true | true |
08fd0809c29f751ca51be5284810d6c456fe7ef5 | 41,411 | py | Python | electrum/commands.py | noirofficial/electrum | 54610de21c4df712f7571b3aaa14101ffc0ec651 | [
"MIT"
] | null | null | null | electrum/commands.py | noirofficial/electrum | 54610de21c4df712f7571b3aaa14101ffc0ec651 | [
"MIT"
] | 2 | 2021-06-01T23:17:06.000Z | 2021-11-15T17:48:20.000Z | electrum/commands.py | noirofficial/electrum | 54610de21c4df712f7571b3aaa14101ffc0ec651 | [
"MIT"
] | 4 | 2019-01-20T21:56:43.000Z | 2019-09-21T08:01:31.000Z | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 thomasv@gitorious
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including witho... | 41.493988 | 173 | 0.627949 |
import sys
import datetime
import copy
import argparse
import json
import ast
import base64
from functools import wraps
from decimal import Decimal
from typing import Optional, TYPE_CHECKING
from .import util, ecc
from .util import bfh, bh2u, format_satoshis, json_decode, json_encode, is_hash256_str, is_hex_str, to_b... | true | true |
08fd0833ffe4bef81185237ed65bcae8caa1ed32 | 6,580 | py | Python | src/clims/models/file.py | commonlims/commonlims | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | [
"BSD-3-Clause"
] | 4 | 2019-05-27T13:55:07.000Z | 2021-03-30T07:05:09.000Z | src/clims/models/file.py | commonlims/commonlims | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | [
"BSD-3-Clause"
] | 99 | 2019-05-20T14:16:33.000Z | 2021-01-19T09:25:15.000Z | src/clims/models/file.py | commonlims/commonlims | 36a02ed244c7b59ee1f2523e64e4749e404ab0f7 | [
"BSD-3-Clause"
] | 1 | 2020-08-10T07:55:40.000Z | 2020-08-10T07:55:40.000Z | from __future__ import absolute_import
import os
from abc import abstractmethod
from django.db import models
from tempfile import NamedTemporaryFile
from sentry.db.models import FlexibleForeignKey, Model, sane_repr
from openpyxl import load_workbook
from six import text_type
from six import string_types
class FileCon... | 28.859649 | 95 | 0.658815 | from __future__ import absolute_import
import os
from abc import abstractmethod
from django.db import models
from tempfile import NamedTemporaryFile
from sentry.db.models import FlexibleForeignKey, Model, sane_repr
from openpyxl import load_workbook
from six import text_type
from six import string_types
class FileCon... | true | true |
08fd083c1cff5b436a32669353d40450745de584 | 122 | py | Python | src/pytest_alembic/__init__.py | ZipFile/pytest-alembic | f0f761e6ae2cd7764582f8c6e4c15f3623512de9 | [
"MIT"
] | 47 | 2020-04-16T20:03:04.000Z | 2022-03-23T09:51:01.000Z | src/pytest_alembic/__init__.py | ZipFile/pytest-alembic | f0f761e6ae2cd7764582f8c6e4c15f3623512de9 | [
"MIT"
] | 30 | 2020-06-26T15:46:45.000Z | 2022-03-12T17:29:38.000Z | src/pytest_alembic/__init__.py | ZipFile/pytest-alembic | f0f761e6ae2cd7764582f8c6e4c15f3623512de9 | [
"MIT"
] | 8 | 2021-03-04T16:44:22.000Z | 2022-01-21T19:16:33.000Z | # flake8: noqa
from pytest_alembic.plugin.fixtures import create_alembic_fixture
from pytest_alembic.runner import runner
| 30.5 | 65 | 0.868852 | from pytest_alembic.plugin.fixtures import create_alembic_fixture
from pytest_alembic.runner import runner
| true | true |
08fd08c302003617d61ad733972a2a7ea151e882 | 15,633 | py | Python | lightseq/training/ops/pytorch/transformer_decoder_layer.py | hutao965/lightseq | 0e3050c4f872ce3581b663a055be032c72102196 | [
"Apache-2.0"
] | 1 | 2022-03-27T17:16:16.000Z | 2022-03-27T17:16:16.000Z | lightseq/training/ops/pytorch/transformer_decoder_layer.py | iRmantou/lightseq | 9a617306fa711a3d6a25ef3eab9bfbe408692189 | [
"Apache-2.0"
] | null | null | null | lightseq/training/ops/pytorch/transformer_decoder_layer.py | iRmantou/lightseq | 9a617306fa711a3d6a25ef3eab9bfbe408692189 | [
"Apache-2.0"
] | null | null | null | import math
from dataclasses import dataclass
import torch
from torch import nn
from torch.autograd import Function
from lightseq.training.ops.pytorch import transformer_cuda_module
from lightseq.training.ops.pytorch.builder import TransformerBuilder
from lightseq.training.ops.pytorch.util import (
copy_para,
... | 36.697183 | 122 | 0.592401 | import math
from dataclasses import dataclass
import torch
from torch import nn
from torch.autograd import Function
from lightseq.training.ops.pytorch import transformer_cuda_module
from lightseq.training.ops.pytorch.builder import TransformerBuilder
from lightseq.training.ops.pytorch.util import (
copy_para,
... | true | true |
08fd0a656afdf975775dfb655bf205e82865a0e0 | 3,227 | py | Python | cli/jobs/single-step/pytorch/word-language-model/src/generate.py | 0mza987/azureml-examples | 2abb872f1278d4b4e65587e033f38a058512b2e3 | [
"MIT"
] | 331 | 2020-08-26T15:54:23.000Z | 2022-03-31T17:10:58.000Z | cli/jobs/single-step/pytorch/word-language-model/src/generate.py | 0mza987/azureml-examples | 2abb872f1278d4b4e65587e033f38a058512b2e3 | [
"MIT"
] | 262 | 2020-08-25T23:17:17.000Z | 2022-03-31T00:25:32.000Z | cli/jobs/single-step/pytorch/word-language-model/src/generate.py | 0mza987/azureml-examples | 2abb872f1278d4b4e65587e033f38a058512b2e3 | [
"MIT"
] | 307 | 2020-09-04T01:02:11.000Z | 2022-03-31T16:46:48.000Z | # Copyright (c) 2017 Facebook, Inc. All rights reserved.
# BSD 3-Clause License
#
# Example adapted from: https://github.com/pytorch/examples/tree/master/word_language_model
# ==============================================================================
################################################################... | 35.076087 | 91 | 0.614813 |
import argparse
import torch
import data
parser = argparse.ArgumentParser(description="PyTorch Wikitext-2 Language Model")
parser.add_argument(
"--data", type=str, default="./data/wikitext-2", help="location of the data corpus"
)
parser.add_argument(
"--checkpoint", type=str, default="./model.pt", help="m... | true | true |
08fd0a80878bdc77a054fb75bc122c846264a1e6 | 10,339 | py | Python | src/tmp_task_exec/launcher/apbs_runner.py | Eo300/react_flask_pdb2pqr | 2df89d1df8e8d5b14e4364b10e1b63cb654d7653 | [
"CC0-1.0"
] | 3 | 2019-08-09T20:30:19.000Z | 2020-06-11T20:55:26.000Z | src/tmp_task_exec/launcher/apbs_runner.py | Eo300/react_flask_pdb2pqr | 2df89d1df8e8d5b14e4364b10e1b63cb654d7653 | [
"CC0-1.0"
] | 38 | 2019-11-20T01:33:45.000Z | 2021-11-30T19:40:56.000Z | src/tmp_task_exec/launcher/apbs_runner.py | Eo300/react_flask_pdb2pqr | 2df89d1df8e8d5b14e4364b10e1b63cb654d7653 | [
"CC0-1.0"
] | 7 | 2019-10-22T18:51:37.000Z | 2021-04-13T03:17:10.000Z | import string, sys, os, time, errno, shutil, tempfile, urllib, copy, pickle, glob
import subprocess
from multiprocessing import Process
from requests import get
from json import loads
from tmp_task_exec import executor_utils
from tmp_task_exec.legacy.apbs_old_utils import fieldStorageToDict, pqrFileCreator, redirecto... | 37.190647 | 134 | 0.544153 | import string, sys, os, time, errno, shutil, tempfile, urllib, copy, pickle, glob
import subprocess
from multiprocessing import Process
from requests import get
from json import loads
from tmp_task_exec import executor_utils
from tmp_task_exec.legacy.apbs_old_utils import fieldStorageToDict, pqrFileCreator, redirecto... | true | true |
08fd0a87c81b3e24cba3cec4686244ca698aa81e | 637 | py | Python | frontend.py | LuizFelipeAG/clothing_detect | 596a6b4c100dba2f0ecb7ac240749dfeb8b25216 | [
"MIT"
] | null | null | null | frontend.py | LuizFelipeAG/clothing_detect | 596a6b4c100dba2f0ecb7ac240749dfeb8b25216 | [
"MIT"
] | null | null | null | frontend.py | LuizFelipeAG/clothing_detect | 596a6b4c100dba2f0ecb7ac240749dfeb8b25216 | [
"MIT"
] | null | null | null | from utils.model_utils import predict
import streamlit as st
import requests
from utils.io_utils import load_config
config = load_config()
st.title("Clothing Classifier")
url = st.text_input("Image url")
if url:
response = requests.get(config["api"]["prediction_url"], params={"url": url})
# st.wri... | 33.526316 | 82 | 0.681319 | from utils.model_utils import predict
import streamlit as st
import requests
from utils.io_utils import load_config
config = load_config()
st.title("Clothing Classifier")
url = st.text_input("Image url")
if url:
response = requests.get(config["api"]["prediction_url"], params={"url": url})
imageur... | true | true |
08fd0c1f24fe0774873ca0832366ee68179e4dd0 | 2,567 | py | Python | modules/data.py | Wolfgang9999/image-super-resolution | 6e22da94711e9fc95d012cf84b0944a1000faebf | [
"MIT"
] | null | null | null | modules/data.py | Wolfgang9999/image-super-resolution | 6e22da94711e9fc95d012cf84b0944a1000faebf | [
"MIT"
] | null | null | null | modules/data.py | Wolfgang9999/image-super-resolution | 6e22da94711e9fc95d012cf84b0944a1000faebf | [
"MIT"
] | null | null | null | import os
import random
import tensorflow as tf
import numpy as np
# DATA_PATH = "/media/shareef/MLDev/Datasets/DIV2K/DIV2K_train_HR"
DATA_PATH="data/DIV2K_valid_HR/SampleDataISR"
def scale_input_image(img):
#img/ 255.
return tf.image.convert_image_dtype(img, dtype=tf.float32)
def unscale_outpu... | 31.691358 | 107 | 0.647838 | import os
import random
import tensorflow as tf
import numpy as np
DATA_PATH="data/DIV2K_valid_HR/SampleDataISR"
def scale_input_image(img):
return tf.image.convert_image_dtype(img, dtype=tf.float32)
def unscale_output_image(img):
return tf.image.convert_image_dtype(img, dtype=tf.uint8, ... | true | true |
08fd0c4fafb53a7cd7d991df7c27c0134e6b23db | 2,044 | py | Python | covsirphy/05_estimate/estimate.py | sunao11/eGov_hourei | 0731cfa43ac701ca17bec178f00f68f393efe7c8 | [
"Apache-2.0"
] | 2 | 2021-05-28T10:02:10.000Z | 2021-06-10T09:02:08.000Z | covsirphy/05_estimate/estimate.py | sunao11/eGov_hourei | 0731cfa43ac701ca17bec178f00f68f393efe7c8 | [
"Apache-2.0"
] | 1 | 2020-09-20T06:12:06.000Z | 2020-09-20T06:12:06.000Z | covsirphy/05_estimate/estimate.py | sunao11/eGov_hourei | 0731cfa43ac701ca17bec178f00f68f393efe7c8 | [
"Apache-2.0"
] | 2 | 2021-06-12T08:54:49.000Z | 2022-01-06T23:28:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import covsirphy as cs
def main():
print(cs.__version__)
# Data loading
data_loader = cs.DataLoader("input")
jhu_data = data_loader.jhu(verbose=True)
population_data = data_loader.population(verbose=True)
# For Japan
japan_data = data_loader.j... | 35.859649 | 70 | 0.639432 |
import covsirphy as cs
def main():
print(cs.__version__)
data_loader = cs.DataLoader("input")
jhu_data = data_loader.jhu(verbose=True)
population_data = data_loader.population(verbose=True)
japan_data = data_loader.japan()
jhu_data.replace(japan_data)
print(japan_data.citation)
... | true | true |
08fd0d12181c13ab1c8427f0f52dc2b9f7c49f87 | 7,754 | py | Python | debian/python-nova/usr/lib/python2.7/dist-packages/nova/volume/iscsi.py | bopopescu/stacklab-nova | 4ab1698659b663ef222255610d1a5c042706dd65 | [
"Apache-2.0"
] | null | null | null | debian/python-nova/usr/lib/python2.7/dist-packages/nova/volume/iscsi.py | bopopescu/stacklab-nova | 4ab1698659b663ef222255610d1a5c042706dd65 | [
"Apache-2.0"
] | null | null | null | debian/python-nova/usr/lib/python2.7/dist-packages/nova/volume/iscsi.py | bopopescu/stacklab-nova | 4ab1698659b663ef222255610d1a5c042706dd65 | [
"Apache-2.0"
] | 1 | 2020-07-24T08:31:57.000Z | 2020-07-24T08:31:57.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | 33.136752 | 78 | 0.575832 |
"""
Helper code for the iSCSI volume driver.
"""
import os
from nova import exception
from nova import flags
from nova.openstack.common import cfg
from nova.openstack.common import log as logging
from nova import utils
LOG = logging.getLogger(__name__)
iscsi_helper_opt = [
cfg.StrOpt('iscsi_helper',
... | false | true |
08fd0d161e42822d84f1c402e3ad071ca24b95d6 | 7,399 | py | Python | hyppo/tools/tests/test_common.py | zdbzdb1212/hyppo | 5092beedec0a0c13ffa69f7a77f4ee30f3294256 | [
"MIT"
] | 1 | 2021-11-15T22:18:55.000Z | 2021-11-15T22:18:55.000Z | hyppo/tools/tests/test_common.py | zdbzdb1212/hyppo | 5092beedec0a0c13ffa69f7a77f4ee30f3294256 | [
"MIT"
] | null | null | null | hyppo/tools/tests/test_common.py | zdbzdb1212/hyppo | 5092beedec0a0c13ffa69f7a77f4ee30f3294256 | [
"MIT"
] | 2 | 2021-11-03T19:34:39.000Z | 2021-11-30T19:28:40.000Z | import numpy as np
import pytest
from numpy.testing import (
assert_allclose,
assert_almost_equal,
assert_array_equal,
assert_array_less,
assert_equal,
assert_raises,
assert_warns,
)
from sklearn.metrics import pairwise_distances
from sklearn.metrics.pairwise import pairwise_kernels
from ..... | 32.169565 | 85 | 0.59873 | import numpy as np
import pytest
from numpy.testing import (
assert_allclose,
assert_almost_equal,
assert_array_equal,
assert_array_less,
assert_equal,
assert_raises,
assert_warns,
)
from sklearn.metrics import pairwise_distances
from sklearn.metrics.pairwise import pairwise_kernels
from ..... | true | true |
08fd0e07b59dcefd3a297fcebb6f36d690131fb3 | 1,679 | py | Python | cooperative_action_control/Multi-agents_cooperation/main.py | gingkg/man-machine_counteraction | ca61aeee046c1fcf11adba4f7c782a5f71d7de2e | [
"MIT"
] | null | null | null | cooperative_action_control/Multi-agents_cooperation/main.py | gingkg/man-machine_counteraction | ca61aeee046c1fcf11adba4f7c782a5f71d7de2e | [
"MIT"
] | null | null | null | cooperative_action_control/Multi-agents_cooperation/main.py | gingkg/man-machine_counteraction | ca61aeee046c1fcf11adba4f7c782a5f71d7de2e | [
"MIT"
] | null | null | null | from runner import Runner
from smac.env import StarCraft2Env
from common.arguments import get_common_args, get_coma_args, get_mixer_args, get_centralv_args, get_reinforce_args, \
get_commnet_args, get_g2anet_args
import os
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
def main():
for i in range(3):
arg... | 31.679245 | 117 | 0.581298 | from runner import Runner
from smac.env import StarCraft2Env
from common.arguments import get_common_args, get_coma_args, get_mixer_args, get_centralv_args, get_reinforce_args, \
get_commnet_args, get_g2anet_args
import os
os.environ["KMP_DUPLICATE_LIB_OK"] = "TRUE"
def main():
for i in range(3):
arg... | true | true |
08fd0e582dcc8e62cfc208f45a29beecf2136b07 | 436 | py | Python | T2/custo_reglin_regularizada.py | andersonmanhaes/ml_mestrado | d737d80e07d9392895e4455e49a33b8700080cf1 | [
"MIT"
] | null | null | null | T2/custo_reglin_regularizada.py | andersonmanhaes/ml_mestrado | d737d80e07d9392895e4455e49a33b8700080cf1 | [
"MIT"
] | null | null | null | T2/custo_reglin_regularizada.py | andersonmanhaes/ml_mestrado | d737d80e07d9392895e4455e49a33b8700080cf1 | [
"MIT"
] | null | null | null | import numpy as np
def custo_reglin_regularizada(theta, X, y, _lambda):
# Quantidade de exemplos
m = len(X)
theta = np.matrix(theta)
# não considera theta0 para o cálculo
theta_j = theta[:,1:]
regularizacao = (_lambda /(2 * m)) * np.sum(theta_j.dot(theta_j.T))
erro = X.dot(theta.T) - ... | 25.647059 | 75 | 0.607798 | import numpy as np
def custo_reglin_regularizada(theta, X, y, _lambda):
m = len(X)
theta = np.matrix(theta)
theta_j = theta[:,1:]
regularizacao = (_lambda /(2 * m)) * np.sum(theta_j.dot(theta_j.T))
erro = X.dot(theta.T) - y
J = (np.sum(np.power(erro, 2)))/ (2 * m)
r... | true | true |
08fd0e67803d062288d93da0a8184525653cc122 | 18,085 | py | Python | videocnn/TSD/mmdet/models/detectors/two_stage.py | sega-hsj/Video_Feature | 4cb6d9a91504df9877c73d3fa73ee1a5adce14c0 | [
"Apache-2.0"
] | null | null | null | videocnn/TSD/mmdet/models/detectors/two_stage.py | sega-hsj/Video_Feature | 4cb6d9a91504df9877c73d3fa73ee1a5adce14c0 | [
"Apache-2.0"
] | null | null | null | videocnn/TSD/mmdet/models/detectors/two_stage.py | sega-hsj/Video_Feature | 4cb6d9a91504df9877c73d3fa73ee1a5adce14c0 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
from mmdet.core import (
bbox2result,
bbox2roi,
bbox_mapping,
build_assigner,
build_sampler,
merge_aug_bboxes,
multiclass_nms,
)
from .. import builder
from ..registry import DETECTORS
from .base import BaseDetector
from .test_mixins import BBoxTestMixin, ... | 36.98364 | 102 | 0.565828 | import torch
import torch.nn as nn
from mmdet.core import (
bbox2result,
bbox2roi,
bbox_mapping,
build_assigner,
build_sampler,
merge_aug_bboxes,
multiclass_nms,
)
from .. import builder
from ..registry import DETECTORS
from .base import BaseDetector
from .test_mixins import BBoxTestMixin, ... | true | true |
08fd0e964b328f6a9638ed67c71b237f87dde4e6 | 1,699 | py | Python | setup.py | hhtong/dwave-hybrid | 70b864613ca238191dfc0bea30e298825862d449 | [
"Apache-2.0"
] | null | null | null | setup.py | hhtong/dwave-hybrid | 70b864613ca238191dfc0bea30e298825862d449 | [
"Apache-2.0"
] | null | null | null | setup.py | hhtong/dwave-hybrid | 70b864613ca238191dfc0bea30e298825862d449 | [
"Apache-2.0"
] | null | null | null | import os
from io import open
from setuptools import setup, find_packages
# Load package info, without importing the package
basedir = os.path.dirname(os.path.abspath(__file__))
package_info_path = os.path.join(basedir, "hybrid", "package_info.py")
package_info = {}
with open(package_info_path, encoding='utf-8') as f... | 32.056604 | 84 | 0.677457 | import os
from io import open
from setuptools import setup, find_packages
basedir = os.path.dirname(os.path.abspath(__file__))
package_info_path = os.path.join(basedir, "hybrid", "package_info.py")
package_info = {}
with open(package_info_path, encoding='utf-8') as f:
exec(f.read(), package_info)
install_requir... | true | true |
08fd0fdac736c3d54c767c33fb379530421ef10b | 6,498 | py | Python | venv/Lib/site-packages/django_extensions/admin/__init__.py | Kiiwi/Syssel | 83705e3fd0edf40f09df950d5ce91c95586573f5 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/django_extensions/admin/__init__.py | Kiiwi/Syssel | 83705e3fd0edf40f09df950d5ce91c95586573f5 | [
"BSD-3-Clause"
] | null | null | null | venv/Lib/site-packages/django_extensions/admin/__init__.py | Kiiwi/Syssel | 83705e3fd0edf40f09df950d5ce91c95586573f5 | [
"BSD-3-Clause"
] | null | null | null | #
# Autocomplete feature for admin panel
#
import six
import operator
from six.moves import reduce
import django
from django.http import HttpResponse, HttpResponseNotFound
from django.conf import settings
from django.db import models
from django.db.models.query import QuerySet
from django.utils.encoding import smart_s... | 42.470588 | 147 | 0.644198 | import six
import operator
from six.moves import reduce
import django
from django.http import HttpResponse, HttpResponseNotFound
from django.conf import settings
from django.db import models
from django.db.models.query import QuerySet
from django.utils.encoding import smart_str
from django.utils.translation import uge... | true | true |
08fd108f1d06d4b17bfeead210cd31eba9532ce2 | 1,559 | py | Python | 06-spider-items/item_fybeca/item_fybeca/spiders/arania_fybeca.py | 2020-A-Python-GR1/py-sanango-simbana-edison-ubaldo | 5ca5a6a8c8596cc76b0d09f3bb700f0c6c1780e8 | [
"MIT"
] | null | null | null | 06-spider-items/item_fybeca/item_fybeca/spiders/arania_fybeca.py | 2020-A-Python-GR1/py-sanango-simbana-edison-ubaldo | 5ca5a6a8c8596cc76b0d09f3bb700f0c6c1780e8 | [
"MIT"
] | null | null | null | 06-spider-items/item_fybeca/item_fybeca/spiders/arania_fybeca.py | 2020-A-Python-GR1/py-sanango-simbana-edison-ubaldo | 5ca5a6a8c8596cc76b0d09f3bb700f0c6c1780e8 | [
"MIT"
] | null | null | null | import scrapy
from item_fybeca.items import ProductoFybeca
from scrapy.loader import ItemLoader
from scrapy.loader.processors import TakeFirst
class AraniaFybeca(scrapy.Spider):
name = 'fybeca'
urls = [
'https://www.fybeca.com/FybecaWeb/pages/search-results.jsf?cat=238&s=150Ypp=25'
]
def star... | 38.02439 | 140 | 0.595253 | import scrapy
from item_fybeca.items import ProductoFybeca
from scrapy.loader import ItemLoader
from scrapy.loader.processors import TakeFirst
class AraniaFybeca(scrapy.Spider):
name = 'fybeca'
urls = [
'https://www.fybeca.com/FybecaWeb/pages/search-results.jsf?cat=238&s=150Ypp=25'
]
def star... | true | true |
08fd125682ac0cfccf3ef9f4e99cd56bddf09017 | 3,741 | py | Python | Text Classification_RedBlue_02 May 2016.py | pplatzman/RedBlue-Classifier | 647a386ddb168ddbe14e9d23490915644acdca9a | [
"MIT"
] | null | null | null | Text Classification_RedBlue_02 May 2016.py | pplatzman/RedBlue-Classifier | 647a386ddb168ddbe14e9d23490915644acdca9a | [
"MIT"
] | null | null | null | Text Classification_RedBlue_02 May 2016.py | pplatzman/RedBlue-Classifier | 647a386ddb168ddbe14e9d23490915644acdca9a | [
"MIT"
] | null | null | null | import os
import time
from bs4 import BeautifulSoup
from sklearn.datasets.base import Bunch
from sklearn import metrics
from sklearn.metrics import classification_report
from sklearn import cross_validation as cv
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.tex... | 33.106195 | 201 | 0.718524 | import os
import time
from bs4 import BeautifulSoup
from sklearn.datasets.base import Bunch
from sklearn import metrics
from sklearn.metrics import classification_report
from sklearn import cross_validation as cv
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.tex... | false | true |
08fd1310d5005641b026435d31a7def9f7854137 | 1,417 | py | Python | venv/Lib/site-packages/_TFL/_SDG/_C/Expression.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 6 | 2016-12-10T17:51:10.000Z | 2021-10-11T07:51:48.000Z | venv/Lib/site-packages/_TFL/_SDG/_C/Expression.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/_TFL/_SDG/_C/Expression.py | nasir733/airbnb-clone | 9ac746b6f3f3c8fc45f97773266e6f5f182d14b9 | [
"MIT"
] | 3 | 2020-03-29T07:37:03.000Z | 2021-01-21T16:08:40.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2004-2020 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
# ****************************************************************************
#
# This module is licensed under the terms of the BSD 3-Clause License
# <http://www.... | 28.34 | 78 | 0.539167 | # work in header files)
# 20-Oct-2004 (CT) `H` removed from scope (not all expressions should
# appear in headerfile by default)
# 23-Jul-2007 (CED) Activated absolute_import
# 06-Aug-2007 (CED) Future import removed again
# 26-Feb-2012 (MG) `__future__` imports added... | true | true |
08fd1346d7002eaa8e3e4a99ba4673e257dc45fd | 10,165 | py | Python | qtcalendar/models.py | asmateus/PyQtCalendar | b8e5e468082f08159744f692e8edaf2ad52fccbb | [
"MIT"
] | 7 | 2018-01-30T19:23:18.000Z | 2022-02-04T13:07:57.000Z | qtcalendar/models.py | asmateus/PyQtCalendar | b8e5e468082f08159744f692e8edaf2ad52fccbb | [
"MIT"
] | 1 | 2020-11-13T14:58:41.000Z | 2021-04-27T16:58:46.000Z | qtcalendar/models.py | asmateus/PyQtCalendar | b8e5e468082f08159744f692e8edaf2ad52fccbb | [
"MIT"
] | 3 | 2020-05-20T04:40:35.000Z | 2021-02-24T08:58:40.000Z | '''
Models for QtWidgets
'''
from collections import deque
from math import ceil
import datetime as dt
import calendar
class EventInCalendar__Model:
class Text:
@staticmethod
def getDefault():
return EventInCalendar__Model.Text()
def __init__(self, event=None, overflow=Fal... | 30.61747 | 92 | 0.59331 | from collections import deque
from math import ceil
import datetime as dt
import calendar
class EventInCalendar__Model:
class Text:
@staticmethod
def getDefault():
return EventInCalendar__Model.Text()
def __init__(self, event=None, overflow=False):
if event is None... | true | true |
08fd137f8a68066e86a1589f80c0504549f6d9a9 | 4,880 | py | Python | scenes/character_creation.py | botamochi0x12/Python-Roguelike-Framework | 230101fb076e3d2a8009ce3320d25cf197192328 | [
"MIT"
] | 25 | 2016-12-08T14:31:16.000Z | 2021-12-16T11:04:57.000Z | scenes/character_creation.py | botamochi0x12/Python-Roguelike-Framework | 230101fb076e3d2a8009ce3320d25cf197192328 | [
"MIT"
] | 4 | 2015-01-10T23:37:02.000Z | 2016-08-07T16:23:39.000Z | scenes/character_creation.py | botamochi0x12/Python-Roguelike-Framework | 230101fb076e3d2a8009ce3320d25cf197192328 | [
"MIT"
] | 11 | 2016-10-01T20:09:24.000Z | 2021-08-15T20:46:14.000Z | import tdl
from base.scene import BaseScene
from components.stats import make_character_stats
from data.python_templates.classes import character_class_templates
from data.python_templates.races import race_templates
from data.python_templates.outfits import starter_warrior, starter_thief
from stats.enums import Stat... | 40.666667 | 104 | 0.586885 | import tdl
from base.scene import BaseScene
from components.stats import make_character_stats
from data.python_templates.classes import character_class_templates
from data.python_templates.races import race_templates
from data.python_templates.outfits import starter_warrior, starter_thief
from stats.enums import Stat... | true | true |
08fd1457ad7a84ffccd0e4f567edb9c3ca3580e7 | 3,412 | py | Python | split_wav_in_new_idea.py | 1161678627/bird_sound_recognition | ebf6ee3a2c76f5f4048f56e99fd2eec0d2685541 | [
"MIT"
] | null | null | null | split_wav_in_new_idea.py | 1161678627/bird_sound_recognition | ebf6ee3a2c76f5f4048f56e99fd2eec0d2685541 | [
"MIT"
] | null | null | null | split_wav_in_new_idea.py | 1161678627/bird_sound_recognition | ebf6ee3a2c76f5f4048f56e99fd2eec0d2685541 | [
"MIT"
] | 1 | 2021-08-28T10:04:43.000Z | 2021-08-28T10:04:43.000Z | # 将训练集中的wav文件 以15s 为单位进行子wav文件的切分,每次递进5s
from pydub import AudioSegment
import os
from tqdm import tqdm
# 将当前文件夹解析为配套的dict地址-cat 键值对
def convert_flord_to_pathdict(train_data_path, train_voice_path_dict):
cat_list = os.listdir(train_data_path)
# 一共有 100 个类别文件夹
# print(cat_list)
for cat_dir in cat_list:
... | 38.772727 | 121 | 0.691676 | from pydub import AudioSegment
import os
from tqdm import tqdm
def convert_flord_to_pathdict(train_data_path, train_voice_path_dict):
cat_list = os.listdir(train_data_path)
for cat_dir in cat_list:
cat_fload_path = os.path.join(train_data_path, cat_dir)
sound_name_list = os.listdir(cat_... | true | true |
08fd14a34942a1981c8452e75e53905c08520d9e | 8,033 | py | Python | venv/lib/python3.7/site-packages/nltk/test/unit/test_wordnet.py | VighneshHarihar/Newsify | 321f5f65bb6983c0ca5a3864900b27ce36a32717 | [
"MIT"
] | 10 | 2021-05-31T07:18:08.000Z | 2022-03-19T09:20:11.000Z | venv/lib/python3.7/site-packages/nltk/test/unit/test_wordnet.py | VighneshHarihar/Newsify | 321f5f65bb6983c0ca5a3864900b27ce36a32717 | [
"MIT"
] | 37 | 2020-10-20T08:30:53.000Z | 2020-12-22T13:15:45.000Z | venv/lib/python3.7/site-packages/nltk/test/unit/test_wordnet.py | VighneshHarihar/Newsify | 321f5f65bb6983c0ca5a3864900b27ce36a32717 | [
"MIT"
] | 7 | 2015-09-30T03:00:44.000Z | 2021-06-04T05:34:39.000Z | # -*- coding: utf-8 -*-
"""
Unit tests for nltk.corpus.wordnet
See also nltk/test/wordnet.doctest
"""
import collections
import os
import unittest
from nose import SkipTest
from nltk.corpus.reader.wordnet import WordNetCorpusReader
from nltk.corpus import wordnet as wn
from nltk.corpus import wordnet_ic as wnic
fro... | 36.348416 | 88 | 0.565044 |
import collections
import os
import unittest
from nose import SkipTest
from nltk.corpus.reader.wordnet import WordNetCorpusReader
from nltk.corpus import wordnet as wn
from nltk.corpus import wordnet_ic as wnic
from nltk.data import find as find_data
wn.ensure_loaded()
S = wn.synset
L = wn.lemma
class WordnNetD... | true | true |
08fd153a54c693c328f9b5eee644e8a4bc4642db | 376 | py | Python | ege_theme/__init__.py | suap-ead/lib_theme | 3a07c96226dfc0dfbb2e7d9bf09c45f0ea77b6ed | [
"MIT"
] | null | null | null | ege_theme/__init__.py | suap-ead/lib_theme | 3a07c96226dfc0dfbb2e7d9bf09c45f0ea77b6ed | [
"MIT"
] | null | null | null | ege_theme/__init__.py | suap-ead/lib_theme | 3a07c96226dfc0dfbb2e7d9bf09c45f0ea77b6ed | [
"MIT"
] | 1 | 2018-09-12T12:46:27.000Z | 2018-09-12T12:46:27.000Z | name = "ege"
skins = [
("avadefault", 'AVA padrão'),
("avaalternative", 'AVA alternativo'),
("egedefault", 'EGE padrão'),
("egealternative", 'EGE alternativo'),
("highcontrast", 'Alto contraste'),
("dark", 'Dark'),
("contrast", 'Contraste'),
("golden", 'Dourado'),
("purple", 'Púrpur... | 23.5 | 42 | 0.539894 | name = "ege"
skins = [
("avadefault", 'AVA padrão'),
("avaalternative", 'AVA alternativo'),
("egedefault", 'EGE padrão'),
("egealternative", 'EGE alternativo'),
("highcontrast", 'Alto contraste'),
("dark", 'Dark'),
("contrast", 'Contraste'),
("golden", 'Dourado'),
("purple", 'Púrpur... | true | true |
08fd165ef92b7d00fd6dda071ccf03aff4853707 | 1,776 | py | Python | tutorials/compress/classification/cal_sensitivities_file.py | joey12300/PaddleX | e39c9a95dabc0f951a1de050bc6121bc7a211e0a | [
"Apache-2.0"
] | 2 | 2020-08-26T04:23:29.000Z | 2020-08-26T04:23:36.000Z | tutorials/compress/classification/cal_sensitivities_file.py | mamingjie-China/PaddleX | c65aa8690d3b04746514f13056f010ab6e82774f | [
"Apache-2.0"
] | null | null | null | tutorials/compress/classification/cal_sensitivities_file.py | mamingjie-China/PaddleX | c65aa8690d3b04746514f13056f010ab6e82774f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 appli... | 30.62069 | 74 | 0.692005 |
import argparse
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import paddlex as pdx
def cal_sensitivies_file(model_dir, dataset, save_file):
model = pdx.load_model(model_dir)
eval_dataset = pdx.datasets.ImageNet(
data_dir=dataset,
file_list=os.path.join(dataset, 'val_list.txt')... | true | true |
08fd173b88a3d5ee77d23f7c82df59b91fde1697 | 9,482 | py | Python | MLTL_Compiler/parsetab.py | zpcore/Web_MLTL_Compiler | c1747e800fd7777cb0862cbe0d516e6067d630ba | [
"MIT"
] | null | null | null | MLTL_Compiler/parsetab.py | zpcore/Web_MLTL_Compiler | c1747e800fd7777cb0862cbe0d516e6067d630ba | [
"MIT"
] | null | null | null | MLTL_Compiler/parsetab.py | zpcore/Web_MLTL_Compiler | c1747e800fd7777cb0862cbe0d516e6067d630ba | [
"MIT"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
# pylint: disable=W,C,R
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftSEMIleftCOMMAleftANDORIMPLYEQleftGLOBALFUTUREUNTILRELEASEleftNEGYESTERDAYSINCEleftLPARENRPARENATOMICLBRACKRBRACKAND ATOMIC COMMA EQ FALSE FUTURE GLOBAL HISTORICALLY... | 158.033333 | 3,793 | 0.645961 |
_tabversion = '3.10'
_lr_method = 'LALR'
_lr_signature = 'leftSEMIleftCOMMAleftANDORIMPLYEQleftGLOBALFUTUREUNTILRELEASEleftNEGYESTERDAYSINCEleftLPARENRPARENATOMICLBRACKRBRACKAND ATOMIC COMMA EQ FALSE FUTURE GLOBAL HISTORICALLY IMPLY LBRACK LPAREN NEG NUMBER ONCE OR RBRACK RELEASE RPAREN SEMI SINCE TRUE UNTIL YESTERD... | true | true |
08fd1780641b91c9797867263d07865bc9dd8373 | 289 | py | Python | src/common/math.py | gmum/lcw-generator | fde1128505194bd04f04bbddcbe7fcec453b0052 | [
"MIT"
] | 4 | 2020-09-17T22:16:48.000Z | 2022-02-21T19:07:48.000Z | src/common/math.py | gmum/lcw-generator | fde1128505194bd04f04bbddcbe7fcec453b0052 | [
"MIT"
] | null | null | null | src/common/math.py | gmum/lcw-generator | fde1128505194bd04f04bbddcbe7fcec453b0052 | [
"MIT"
] | null | null | null | import torch
def pairwise_distances(x: torch.Tensor, y: torch.Tensor = None) -> torch.Tensor:
if y is None:
y = x
return torch.cdist(x, y)**2
def euclidean_norm_squared(X: torch.Tensor, axis: int) -> torch.Tensor:
return torch.linalg.norm(X, 2, axis)**2
| 24.083333 | 81 | 0.636678 | import torch
def pairwise_distances(x: torch.Tensor, y: torch.Tensor = None) -> torch.Tensor:
if y is None:
y = x
return torch.cdist(x, y)**2
def euclidean_norm_squared(X: torch.Tensor, axis: int) -> torch.Tensor:
return torch.linalg.norm(X, 2, axis)**2
| true | true |
08fd17816ecd973380b43f54305daace7950441f | 1,787 | py | Python | test/travis_test_lightsensors.py | Riputhio/pimouse_ros | 4f0decc31025435215a82ec3f11fbdaf570a3586 | [
"BSD-3-Clause"
] | null | null | null | test/travis_test_lightsensors.py | Riputhio/pimouse_ros | 4f0decc31025435215a82ec3f11fbdaf570a3586 | [
"BSD-3-Clause"
] | null | null | null | test/travis_test_lightsensors.py | Riputhio/pimouse_ros | 4f0decc31025435215a82ec3f11fbdaf570a3586 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
#encoding: utf8
import unittest, rostest
import rosnode, rospy
import time
from pimouse_ros.msg import LightSensorValues
class LightsensorTest(unittest.TestCase):
def setUp(self):
self.count = 0
rospy.Subscriber('/lightsensors', LightSensorValues, self.callback)
self.values = Ligh... | 32.490909 | 77 | 0.713486 | import unittest, rostest
import rosnode, rospy
import time
from pimouse_ros.msg import LightSensorValues
class LightsensorTest(unittest.TestCase):
def setUp(self):
self.count = 0
rospy.Subscriber('/lightsensors', LightSensorValues, self.callback)
self.values = LightSensorValues()
def callback(self,da... | false | true |
08fd183c415a2b1ab52bb001b4943d3a39205fb4 | 5,211 | py | Python | circus/controller.py | ajah/circus | 4ae397e0f46686edf1013000234b92698231bf40 | [
"Apache-2.0"
] | null | null | null | circus/controller.py | ajah/circus | 4ae397e0f46686edf1013000234b92698231bf40 | [
"Apache-2.0"
] | null | null | null | circus/controller.py | ajah/circus | 4ae397e0f46686edf1013000234b92698231bf40 | [
"Apache-2.0"
] | null | null | null | import sys
import traceback
try:
from queue import Queue, Empty # NOQA
except ImportError:
from Queue import Queue, Empty # NOQA
from circus import zmq
from zmq.eventloop import ioloop, zmqstream
from zmq.utils.jsonapi import jsonmod as json
from circus.commands import get_commands, ok, error, errors
from ... | 31.391566 | 79 | 0.563232 | import sys
import traceback
try:
from queue import Queue, Empty except ImportError:
from Queue import Queue, Empty
from circus import zmq
from zmq.eventloop import ioloop, zmqstream
from zmq.utils.jsonapi import jsonmod as json
from circus.commands import get_commands, ok, error, errors
from circus import ... | true | true |
08fd191092e30d5edf720aadf20d28af1feef528 | 840 | py | Python | pirates/leveleditor/worldData/CubaWorld.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 81 | 2018-04-08T18:14:24.000Z | 2022-01-11T07:22:15.000Z | pirates/leveleditor/worldData/CubaWorld.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 4 | 2018-09-13T20:41:22.000Z | 2022-01-08T06:57:00.000Z | pirates/leveleditor/worldData/CubaWorld.py | Willy5s/Pirates-Online-Rewritten | 7434cf98d9b7c837d57c181e5dabd02ddf98acb7 | [
"BSD-3-Clause"
] | 26 | 2018-05-26T12:49:27.000Z | 2021-09-11T09:11:59.000Z | from pandac.PandaModules import Point3, VBase3
objectStruct = {'Objects': {'1160614503.81sdnaik': {'Type': 'Region','Name': 'default','Objects': {'1160614528.73sdnaik': {'Type': 'Island','File': 'CubaIsland','Hpr': Point3(0.0, 0.0, 0.0),'Objects': {'1163130882.92sdnaik': {'Type': 'LOD Sphere','Hpr': Point3(0.0, 0.0, 0.... | 420 | 793 | 0.665476 | from pandac.PandaModules import Point3, VBase3
objectStruct = {'Objects': {'1160614503.81sdnaik': {'Type': 'Region','Name': 'default','Objects': {'1160614528.73sdnaik': {'Type': 'Island','File': 'CubaIsland','Hpr': Point3(0.0, 0.0, 0.0),'Objects': {'1163130882.92sdnaik': {'Type': 'LOD Sphere','Hpr': Point3(0.0, 0.0, 0.... | true | true |
08fd197eddd47553a431636dfe02f90598a12ef0 | 448 | py | Python | recipes/Python/302743_range_as_iterator_obsolete/recipe-302743.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/302743_range_as_iterator_obsolete/recipe-302743.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/302743_range_as_iterator_obsolete/recipe-302743.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | def irange(start, stop=None, step=None):
'''Return a range - as iterator.'''
if stop == None:
start, stop = 0, start
if stop > start:
_comp = lambda x, y: x <= y
step = step or 1
else:
_comp = lambda x, y: x >= y
step = step or -1
if _comp(step, 0): # Safeguar... | 28 | 60 | 0.533482 | def irange(start, stop=None, step=None):
if stop == None:
start, stop = 0, start
if stop > start:
_comp = lambda x, y: x <= y
step = step or 1
else:
_comp = lambda x, y: x >= y
step = step or -1
if _comp(step, 0): raise StopIteration
while _comp(start,... | true | true |
08fd19a5993a80248da7325d52a999e465238379 | 687 | py | Python | tests/test_version_branch.py | fkantelberg/oca-github-bot | 633c1e3fbb63b05ebff1ff9b08d4949ca1e07491 | [
"MIT"
] | null | null | null | tests/test_version_branch.py | fkantelberg/oca-github-bot | 633c1e3fbb63b05ebff1ff9b08d4949ca1e07491 | [
"MIT"
] | null | null | null | tests/test_version_branch.py | fkantelberg/oca-github-bot | 633c1e3fbb63b05ebff1ff9b08d4949ca1e07491 | [
"MIT"
] | null | null | null | # Copyright (c) ACSONE SA/NV 2018
# Distributed under the MIT License (http://opensource.org/licenses/MIT).
from oca_github_bot.version_branch import is_main_branch_bot_branch, is_protected_branch
def test_is_main_branch_bot_branch():
assert not is_main_branch_bot_branch("6.1")
assert not is_main_branch_bot_... | 34.35 | 88 | 0.777293 |
from oca_github_bot.version_branch import is_main_branch_bot_branch, is_protected_branch
def test_is_main_branch_bot_branch():
assert not is_main_branch_bot_branch("6.1")
assert not is_main_branch_bot_branch("7.0")
assert is_main_branch_bot_branch("8.0")
assert is_main_branch_bot_branch("12.0")
a... | true | true |
08fd1b1d835fce151824e6b63a7e9af5e793c448 | 5,301 | py | Python | deepposekit/io/video.py | Enteee/DeepPoseKit | 7533569481be03fec6cfedd50a0fbfbcdcae4c54 | [
"Apache-2.0"
] | null | null | null | deepposekit/io/video.py | Enteee/DeepPoseKit | 7533569481be03fec6cfedd50a0fbfbcdcae4c54 | [
"Apache-2.0"
] | null | null | null | deepposekit/io/video.py | Enteee/DeepPoseKit | 7533569481be03fec6cfedd50a0fbfbcdcae4c54 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Jacob M. Graving <jgraving@gmail.com>
#
# 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 ... | 27.609375 | 77 | 0.587814 |
from tensorflow.python.keras.utils import Sequence
import cv2
import numpy as np
import os
__all__ = ["VideoReader", "VideoWriter"]
class VideoReader(cv2.VideoCapture, Sequence):
def __init__(self, videopath, batch_size=1, gray=False):
if isinstance(videopath, str):
if os.path.exists(vi... | true | true |
08fd1b4c8f88df8e2490fdcbc6d8f78e01638cfd | 133,308 | py | Python | test_init_final.py | jeeeeh/mimobot | edae1d55056e60706c200a35b0e040995bd616a5 | [
"Apache-2.0"
] | null | null | null | test_init_final.py | jeeeeh/mimobot | edae1d55056e60706c200a35b0e040995bd616a5 | [
"Apache-2.0"
] | null | null | null | test_init_final.py | jeeeeh/mimobot | edae1d55056e60706c200a35b0e040995bd616a5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
################ Server Ver. 22 (2020. 9. 29.) #####################
import sys, os
import asyncio, discord, aiohttp
import random, re, datetime, time, logging
from discord.ext import tasks, commands
from discord.ext.commands import CommandNotFound, MissingRequiredArgument
from gtts ... | 38.066248 | 332 | 0.604892 |
import sys, os
import asyncio, discord, aiohttp
import random, re, datetime, time, logging
from discord.ext import tasks, commands
from discord.ext.commands import CommandNotFound, MissingRequiredArgument
from gtts import gTTS
from github import Github
import base64
import gspread, boto3
from oauth2client.... | true | true |
08fd1ba41c787ab5a82432c6ec5ed0e7c34f20ec | 122 | py | Python | pyQuick/printing.py | crsmi/google-python-exercises | 1be53d2ed05d89152e4b75ba69b4069ae4ecf4f2 | [
"Apache-2.0"
] | null | null | null | pyQuick/printing.py | crsmi/google-python-exercises | 1be53d2ed05d89152e4b75ba69b4069ae4ecf4f2 | [
"Apache-2.0"
] | null | null | null | pyQuick/printing.py | crsmi/google-python-exercises | 1be53d2ed05d89152e4b75ba69b4069ae4ecf4f2 | [
"Apache-2.0"
] | null | null | null | i = 999
p = "PyQuick"
print(i)
print(p)
print("Hello World !!!")
print("Hello !!!")
print("Hello Python")
print("Welcome") | 15.25 | 24 | 0.631148 | i = 999
p = "PyQuick"
print(i)
print(p)
print("Hello World !!!")
print("Hello !!!")
print("Hello Python")
print("Welcome") | true | true |
08fd1c577231f7c15eb230022482722cb95c07c7 | 684 | py | Python | src/data/1094.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/1094.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/1094.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | from collections import deque
n, q = map(int, input().split())
graph = [[] for _ in range(n)]
for i in range(n - 1):
a, b = map(int, input().split())
a -= 1
b -= 1
graph[a].append(b)
graph[b].append(a)
def bfs(s):
cost = [float("inf")] * n
cost[s] = 0
q = deque([s])
while q:
... | 18.486486 | 37 | 0.453216 | from collections import deque
n, q = map(int, input().split())
graph = [[] for _ in range(n)]
for i in range(n - 1):
a, b = map(int, input().split())
a -= 1
b -= 1
graph[a].append(b)
graph[b].append(a)
def bfs(s):
cost = [float("inf")] * n
cost[s] = 0
q = deque([s])
while q:
... | true | true |
08fd1c9778a538b961d7dee75053b9e7ace745d4 | 2,269 | py | Python | aiida/transport/plugins/test_ssh.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | 1 | 2019-04-29T12:39:31.000Z | 2019-04-29T12:39:31.000Z | aiida/transport/plugins/test_ssh.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | aiida/transport/plugins/test_ssh.py | tomzhang/aiida_core | 949810e9f3daff0f748c5c9aa1dde4f5222bb49b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 35.453125 | 120 | 0.617893 | from __future__ import absolute_import
import unittest
import logging
import aiida.transport
import aiida.transport.transport
import paramiko
from aiida.transport.plugins.ssh import SshTransport
plugin_transport = SshTransport(machine='localhost', timeout=30, load_system_host_keys=True, key_policy='AutoAddPolicy')
... | true | true |
08fd1d39ed8737cedfc49a5df1e31abccc4e85fc | 1,216 | py | Python | quantarhei/builders/molecule_test.py | slamavl/quantarhei | d822bc2db86152c418e330a9152e7866869776f7 | [
"MIT"
] | 14 | 2016-10-16T13:26:05.000Z | 2021-11-09T11:40:52.000Z | quantarhei/builders/molecule_test.py | slamavl/quantarhei | d822bc2db86152c418e330a9152e7866869776f7 | [
"MIT"
] | 61 | 2016-09-19T10:45:56.000Z | 2021-11-10T13:53:06.000Z | quantarhei/builders/molecule_test.py | slamavl/quantarhei | d822bc2db86152c418e330a9152e7866869776f7 | [
"MIT"
] | 21 | 2016-08-30T09:09:28.000Z | 2022-03-30T03:16:35.000Z | # -*- coding: utf-8 -*-
"""
Class to support tests on the Molecule class
Class Details
-------------
"""
from .molecules import Molecule
from .modes import Mode
class TestMolecule(Molecule):
"""Class to support tests on the Molecule class
Parameters
----------
name :... | 19.612903 | 72 | 0.537007 | from .molecules import Molecule
from .modes import Mode
class TestMolecule(Molecule):
def __init__(self, name=None):
if name is None:
raise Exception("TestMolecule name not specified")
if name == "two-levels-1-mode":
super().__init__([0.0, 1.0], nam... | true | true |
08fd1dd056333bf941a16fa0a35579a259f22ff6 | 1,317 | py | Python | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py | google-ar/chromium | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/safebrowsing.py | harrymarkovskiy/WebARonARCore | 2441c86a5fd975f09a6c30cddb57dfb7fc239699 | [
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState
from telemetry.core import exceptions
from telemetry.page import ... | 30.627907 | 77 | 0.753227 | import logging
from common.chrome_proxy_shared_page_state import ChromeProxySharedPageState
from telemetry.core import exceptions
from telemetry.page import page as page_module
from telemetry import story
class SafebrowsingPage(page_module.Page):
def __init__(self, url, page_set, expect_timeout):
super(Safeb... | true | true |
08fd1e45d52a4c7dbb3eaffc4947d7d3363b9277 | 426 | py | Python | pyfair/__init__.py | andysvints/pyfair | 737388a4ef341e9b6698871138926199285d359c | [
"MIT"
] | 37 | 2019-06-29T13:31:39.000Z | 2022-02-26T02:56:37.000Z | pyfair/__init__.py | andysvints/pyfair | 737388a4ef341e9b6698871138926199285d359c | [
"MIT"
] | 41 | 2019-07-21T17:46:14.000Z | 2021-10-15T01:55:34.000Z | pyfair/__init__.py | andysvints/pyfair | 737388a4ef341e9b6698871138926199285d359c | [
"MIT"
] | 24 | 2019-06-29T13:26:50.000Z | 2022-03-15T18:40:59.000Z | """PyFair is an open source implementation of the FAIR methodology."""
VERSION = '0.1-alpha.12'
from . import model
from . import report
from . import utility
from .model.model import FairModel
from .model.meta_model import FairMetaModel
from .report.simple_report import FairSimpleReport
from .utility.beta_pert imp... | 26.625 | 70 | 0.809859 |
VERSION = '0.1-alpha.12'
from . import model
from . import report
from . import utility
from .model.model import FairModel
from .model.meta_model import FairMetaModel
from .report.simple_report import FairSimpleReport
from .utility.beta_pert import FairBetaPert
from .utility.database import FairDatabase
from .utili... | true | true |
08fd1ff41562de45a9ad2550dff64ca41175f0b2 | 685 | py | Python | anomalib/models/ganomaly/__init__.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 689 | 2021-12-10T07:09:35.000Z | 2022-03-31T13:46:21.000Z | anomalib/models/ganomaly/__init__.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 95 | 2021-12-10T08:10:58.000Z | 2022-03-31T22:09:35.000Z | anomalib/models/ganomaly/__init__.py | alexriedel1/anomalib | 10db405a8f570dbf7b0f337baa6970a150323d8a | [
"Apache-2.0"
] | 73 | 2021-12-20T15:35:07.000Z | 2022-03-30T06:53:41.000Z | """GANomaly Model."""
# Copyright (C) 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 34.25 | 76 | 0.766423 |
from .lightning_model import GanomalyLightning
__all__ = ["GanomalyLightning"]
| true | true |
08fd207f6e5d549f57de75bef5a77e9f728212de | 1,887 | py | Python | Topic2/4_UNet.py | Rabbit1010/TensorFlow2.0-Tutorial-2019 | def2ec0a93d73d81b9d95e60639ebe6bed383579 | [
"MIT"
] | 5 | 2019-12-12T07:14:08.000Z | 2020-09-09T06:07:38.000Z | Topic2/4_UNet.py | Rabbit1010/TensorFlow2.0-Tutorial-2019 | def2ec0a93d73d81b9d95e60639ebe6bed383579 | [
"MIT"
] | null | null | null | Topic2/4_UNet.py | Rabbit1010/TensorFlow2.0-Tutorial-2019 | def2ec0a93d73d81b9d95e60639ebe6bed383579 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Dec 8 20:13:52 2019
@author: Wei-Hsiang, Shen
"""
import tensorflow as tf
from tensorflow.keras import layers
def downsample(filters, size, apply_batchnorm=True):
result = tf.keras.Sequential()
result.add(layers.Conv2D(filters, size, strides=2, padding='same', use... | 24.828947 | 96 | 0.644939 |
import tensorflow as tf
from tensorflow.keras import layers
def downsample(filters, size, apply_batchnorm=True):
result = tf.keras.Sequential()
result.add(layers.Conv2D(filters, size, strides=2, padding='same', use_bias=False))
if apply_batchnorm:
result.add(layers.BatchNormalization())
res... | true | true |
08fd2157dcf21dd0fbb160be2af3875b9d3c4dbd | 9,693 | py | Python | src/mender/statemachine/statemachine.py | merlin-northern/mender-python-client | 1b16b5742a9554c0ee3b5bc5706808bb2ea51944 | [
"Apache-2.0"
] | null | null | null | src/mender/statemachine/statemachine.py | merlin-northern/mender-python-client | 1b16b5742a9554c0ee3b5bc5706808bb2ea51944 | [
"Apache-2.0"
] | null | null | null | src/mender/statemachine/statemachine.py | merlin-northern/mender-python-client | 1b16b5742a9554c0ee3b5bc5706808bb2ea51944 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Northern.tech AS
#
# 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 ag... | 30.290625 | 95 | 0.639843 | import logging as log
import os.path
import time
import mender.bootstrap.bootstrap as bootstrap
from mender.client import HTTPUnathorized
import mender.client.authorize as authorize
import mender.client.deployments as deployments
import mender.client.inventory as client_inventory
import mender.config.config as config
... | true | true |
08fd226f48dc31fb03423c2107a933437caf7c85 | 1,926 | py | Python | tests/shells/test_zsh.py | samzhang111/oops | 5823623f94f7c4cdeccea4938c1a0efd4280184e | [
"MIT"
] | null | null | null | tests/shells/test_zsh.py | samzhang111/oops | 5823623f94f7c4cdeccea4938c1a0efd4280184e | [
"MIT"
] | null | null | null | tests/shells/test_zsh.py | samzhang111/oops | 5823623f94f7c4cdeccea4938c1a0efd4280184e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import pytest
from theoops.shells.zsh import Zsh
@pytest.mark.usefixtures('isfile', 'no_memoize', 'no_cache')
class TestZsh(object):
@pytest.fixture
def shell(self):
return Zsh()
@pytest.fixture(autouse=True)
def shell_aliases(self):
os.environ['TF_S... | 33.206897 | 65 | 0.576843 |
import os
import pytest
from theoops.shells.zsh import Zsh
@pytest.mark.usefixtures('isfile', 'no_memoize', 'no_cache')
class TestZsh(object):
@pytest.fixture
def shell(self):
return Zsh()
@pytest.fixture(autouse=True)
def shell_aliases(self):
os.environ['TF_SHELL_ALIASES'] = (
... | true | true |
08fd22f34ee6d16fe4d29c3d1a2165051708e776 | 12,908 | py | Python | main/main1.py | mathbird7283/rpigpsthingy | 8a4687472f5d9330791f21c51aedb1a08f1b126e | [
"MIT"
] | null | null | null | main/main1.py | mathbird7283/rpigpsthingy | 8a4687472f5d9330791f21c51aedb1a08f1b126e | [
"MIT"
] | null | null | null | main/main1.py | mathbird7283/rpigpsthingy | 8a4687472f5d9330791f21c51aedb1a08f1b126e | [
"MIT"
] | null | null | null | # Python RPI GPS Main Code
# Requires a test file input
filename=raw_input("Type the name of the test file you would like to use here ==> ")
f=open('C:\\Users\\goffo\\Code\\rpigpsthingy\\tests\\'+filename,"r") # thanks to electrometro for giving me this answer.
debug=eval(f.readline().capitalize())
walkingspeed=int(f... | 30.229508 | 176 | 0.538038 | filename=raw_input("Type the name of the test file you would like to use here ==> ")
f=open('C:\\Users\\goffo\\Code\\rpigpsthingy\\tests\\'+filename,"r") debug=eval(f.readline().capitalize())
walkingspeed=int(f.readline())
(u,v)=eval("("+f.readline().replace("\n",")"))
(w,x)=eval("("+f.readline().replace("\n",")"))
d... | false | true |
08fd23faccac3bf1bbfbd420493721d2c6ef3d71 | 1,543 | py | Python | athena/data/__init__.py | leixiaoning/Athena-Giga | d599cee4027126fc4efd27cefd69ce89b77530e0 | [
"Apache-2.0"
] | null | null | null | athena/data/__init__.py | leixiaoning/Athena-Giga | d599cee4027126fc4efd27cefd69ce89b77530e0 | [
"Apache-2.0"
] | null | null | null | athena/data/__init__.py | leixiaoning/Athena-Giga | d599cee4027126fc4efd27cefd69ce89b77530e0 | [
"Apache-2.0"
] | 1 | 2021-03-15T08:04:15.000Z | 2021-03-15T08:04:15.000Z | # coding=utf-8
# Copyright (C) ATHENA 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 re... | 51.433333 | 88 | 0.780298 | from .datasets.speech_recognition import SpeechRecognitionDatasetBuilder
from .datasets.speech_recognition_kaldiio import SpeechRecognitionDatasetKaldiIOBuilder
from .datasets.speech_synthesis import SpeechSynthesisDatasetBuilder
from .datasets.speech_set import SpeechDatasetBuilder
from .datasets.speech_set_kaldii... | true | true |
08fd25461a59c93faa564bfc07505395a2198d81 | 2,771 | py | Python | ucscsdk/mometa/lsboot/LsbootEmbeddedLocalLunImage.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | null | null | null | ucscsdk/mometa/lsboot/LsbootEmbeddedLocalLunImage.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | null | null | null | ucscsdk/mometa/lsboot/LsbootEmbeddedLocalLunImage.py | parag-may4/ucscsdk | 2ea762fa070330e3a4e2c21b46b157469555405b | [
"Apache-2.0"
] | null | null | null | """This module contains the general information for LsbootEmbeddedLocalLunImage ManagedObject."""
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class LsbootEmbeddedLocalLunImageConsts():
TYPE_EMBEDDED_LOCAL_JBOD = "embedded... | 51.314815 | 342 | 0.669433 |
from ...ucscmo import ManagedObject
from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta
from ...ucscmeta import VersionMeta
class LsbootEmbeddedLocalLunImageConsts():
TYPE_EMBEDDED_LOCAL_JBOD = "embedded-local-jbod"
TYPE_EMBEDDED_LOCAL_LUN = "embedded-local-lun"
TYPE_LOCAL_ANY = "local-any"
... | true | true |
08fd254bfc707b0aecd9e501b0fb38c5bc66c833 | 5,995 | py | Python | rest_auth/views.py | egregors/django-rest-auth | 05f5e7a337b6826820616d9bdbb158c98419239c | [
"MIT"
] | null | null | null | rest_auth/views.py | egregors/django-rest-auth | 05f5e7a337b6826820616d9bdbb158c98419239c | [
"MIT"
] | null | null | null | rest_auth/views.py | egregors/django-rest-auth | 05f5e7a337b6826820616d9bdbb158c98419239c | [
"MIT"
] | null | null | null | from django.contrib.auth import (
login as django_login,
logout as django_logout
)
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.views import APIView
from rest_... | 30.74359 | 97 | 0.691076 | from django.contrib.auth import (
login as django_login,
logout as django_logout
)
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext_lazy as _
from rest_framework import status
from rest_framework.views import APIView
from rest_... | true | true |
08fd257d12249d8fe7b0437cfa4ab8e338b1a854 | 4,323 | py | Python | evm_gm_tool/tool/controllers/ajax_controller.py | manhnd1112/GR | 2ee9da122afeb33b3ee589a7f64d3f74d2654a1a | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | evm_gm_tool/tool/controllers/ajax_controller.py | manhnd1112/GR | 2ee9da122afeb33b3ee589a7f64d3f74d2654a1a | [
"PSF-2.0",
"BSD-3-Clause"
] | 11 | 2020-03-24T15:46:05.000Z | 2022-03-11T23:20:58.000Z | evm_gm_tool/tool/controllers/ajax_controller.py | manhnd1112/GR | 2ee9da122afeb33b3ee589a7f64d3f74d2654a1a | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render, redirect
from django.urls import reverse
from django.contrib.auth.admin import User
from tool.models import Project as ProjectModel, ProjectMember, GroupAccess, Utils
from tool.forms import UserCreateForm, UserEditForm, ProjectCreationForm, ProjectEditForm
from tool.utilies import *... | 49.689655 | 108 | 0.620402 | from django.shortcuts import render, redirect
from django.urls import reverse
from django.contrib.auth.admin import User
from tool.models import Project as ProjectModel, ProjectMember, GroupAccess, Utils
from tool.forms import UserCreateForm, UserEditForm, ProjectCreationForm, ProjectEditForm
from tool.utilies import *... | true | true |
08fd25fa660f88e5c58cd3f4f1faac65aadcf759 | 8,136 | py | Python | test/functional/p2p-leaktests.py | harzcoin/harzcoin | fb2c9d0e079fc4b55b3eb8cc0bfcb873ed1155d9 | [
"MIT"
] | null | null | null | test/functional/p2p-leaktests.py | harzcoin/harzcoin | fb2c9d0e079fc4b55b3eb8cc0bfcb873ed1155d9 | [
"MIT"
] | null | null | null | test/functional/p2p-leaktests.py | harzcoin/harzcoin | fb2c9d0e079fc4b55b3eb8cc0bfcb873ed1155d9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Harzcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test message sending before handshake completion.
A node should never send anything other than VERSION/VER... | 47.858824 | 162 | 0.733284 |
from test_framework.mininode import *
from test_framework.test_framework import HarzcoinTestFramework
from test_framework.util import *
banscore = 10
class CLazyNode(NodeConnCB):
def __init__(self):
super().__init__()
self.unexpected_msg = False
self.ever_connected = False
def bad_me... | true | true |
08fd2608976c8325408ebcdf2fc3b89a51ef87c6 | 1,972 | py | Python | chialite/server/start_harvester.py | Storch-Network/chialite | 587fc53e8ef452e07c6f3f266f58962d065feb5c | [
"Apache-2.0"
] | 2 | 2021-06-29T14:05:41.000Z | 2021-07-15T19:28:26.000Z | chialite/server/start_harvester.py | Storch-Network/chialite | 587fc53e8ef452e07c6f3f266f58962d065feb5c | [
"Apache-2.0"
] | 31 | 2021-06-26T23:11:46.000Z | 2022-03-29T00:12:30.000Z | chialite/server/start_harvester.py | Storch-Network/chialite | 587fc53e8ef452e07c6f3f266f58962d065feb5c | [
"Apache-2.0"
] | null | null | null | import pathlib
from typing import Dict
from chialite.consensus.constants import ConsensusConstants
from chialite.consensus.default_constants import DEFAULT_CONSTANTS
from chialite.harvester.harvester import Harvester
from chialite.harvester.harvester_api import HarvesterAPI
from chialite.rpc.harvester_rpc_api import H... | 34 | 92 | 0.756592 | import pathlib
from typing import Dict
from chialite.consensus.constants import ConsensusConstants
from chialite.consensus.default_constants import DEFAULT_CONSTANTS
from chialite.harvester.harvester import Harvester
from chialite.harvester.harvester_api import HarvesterAPI
from chialite.rpc.harvester_rpc_api import H... | true | true |
08fd2622b9996ab5d4c888607219f73069436e83 | 27,875 | py | Python | webserver/app/main/controller/document_controller.py | pansila/Auto-Test-System | bfe51a277466939a32daa08f27a89cf3c1900def | [
"MIT"
] | 14 | 2019-02-19T01:31:08.000Z | 2021-12-12T12:56:08.000Z | webserver/app/main/controller/document_controller.py | pansila/Auto-Test-System | bfe51a277466939a32daa08f27a89cf3c1900def | [
"MIT"
] | 2 | 2020-03-10T12:12:10.000Z | 2020-03-10T12:12:10.000Z | webserver/app/main/controller/document_controller.py | pansila/Auto-Test-System | bfe51a277466939a32daa08f27a89cf3c1900def | [
"MIT"
] | 4 | 2019-07-09T02:00:13.000Z | 2020-08-18T14:04:24.000Z | import aiofiles
import asyncio
import base64
import json
import datetime
import subprocess
import os
import shutil
from pathlib import Path
from sanic_openapi import doc
from sanic.response import json, file
from sanic import Blueprint
from sanic.views import HTTPMethodView
from async_files.utils import async_wraps
f... | 40.634111 | 177 | 0.63548 | import aiofiles
import asyncio
import base64
import json
import datetime
import subprocess
import os
import shutil
from pathlib import Path
from sanic_openapi import doc
from sanic.response import json, file
from sanic import Blueprint
from sanic.views import HTTPMethodView
from async_files.utils import async_wraps
f... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.