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
f7723df4a3ba97402b5740754580ca302e17d4de
1,740
py
Python
setup.py
thobiast/fundosbr
997a0fe6439aa89b2d7884f31bed8730f6d1c525
[ "MIT" ]
7
2020-12-23T17:01:14.000Z
2021-05-31T12:20:10.000Z
setup.py
thobiast/fundosbr
997a0fe6439aa89b2d7884f31bed8730f6d1c525
[ "MIT" ]
4
2020-12-18T17:18:08.000Z
2021-05-24T17:36:37.000Z
setup.py
thobiast/fundosbr
997a0fe6439aa89b2d7884f31bed8730f6d1c525
[ "MIT" ]
2
2021-05-31T12:20:11.000Z
2022-02-07T14:38:59.000Z
# -*- coding: utf-8 -*- """setup.py.""" import setuptools def read_file(fname): """Read file and return the its content.""" with open(fname, "r") as f: return f.read() def get_attr(fname, attr): """Read file and return specific "attribute" content.""" lines = read_file(fname) for line ...
28.52459
64
0.622414
import setuptools def read_file(fname): with open(fname, "r") as f: return f.read() def get_attr(fname, attr): lines = read_file(fname) for line in lines.splitlines(): if line.startswith(attr): delim = '"' if '"' in line else "'" return line.split(delim)[1] ...
true
true
f7723e25ef6f35ec1f145b33c938f0287740f3d4
1,193
py
Python
tools/mo/openvino/tools/mo/front/tf/fake_const_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
1
2019-09-22T01:05:07.000Z
2019-09-22T01:05:07.000Z
tools/mo/openvino/tools/mo/front/tf/fake_const_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
58
2020-11-06T12:13:45.000Z
2022-03-28T13:20:11.000Z
tools/mo/openvino/tools/mo/front/tf/fake_const_ext.py
pazamelin/openvino
b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48
[ "Apache-2.0" ]
2
2021-07-14T07:40:50.000Z
2021-07-27T01:40:03.000Z
# Copyright (C) 2018-2021 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import logging as log from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo.front.common.replacement import FrontReplacementOp from openvino.tools.mo.front.tf.extractors.utils import tf_dtype_...
38.483871
96
0.687343
import logging as log from openvino.tools.mo.front.common.partial_infer.utils import int64_array from openvino.tools.mo.front.common.replacement import FrontReplacementOp from openvino.tools.mo.front.tf.extractors.utils import tf_dtype_extractor from openvino.tools.mo.graph.graph import Graph from openvino.tools.mo.o...
true
true
f7723e4c81361af42c458b179a8452ab44acd464
843
py
Python
src/main/python/taf/modeling/web/controls/webtable.py
WesleyPeng/uiXautomation
2d2c4d5a774ffda934d5615036a80c449bac930d
[ "Apache-2.0" ]
6
2017-09-19T15:05:47.000Z
2021-07-16T16:07:46.000Z
src/main/python/taf/modeling/web/controls/webtable.py
WesleyPeng/uiXautomation
2d2c4d5a774ffda934d5615036a80c449bac930d
[ "Apache-2.0" ]
1
2018-06-02T18:45:51.000Z
2018-06-02T18:45:51.000Z
src/main/python/taf/modeling/web/controls/webtable.py
WesleyPeng/uiXautomation
2d2c4d5a774ffda934d5615036a80c449bac930d
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017-2018 {Flair Inc.} WESLEY PENG # # 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...
32.423077
74
0.76038
from taf.foundation import ServiceLocator from taf.foundation.api.ui.controls import Table from taf.foundation.api.ui.web import WebElement class WebTable( ServiceLocator.get_modeled_control( Table ), WebElement, Table ): pass
true
true
f7723e506c68eb0f35b4412d9a4867f4221090c7
838
py
Python
tensorflow_probability/python/experimental/substrates/numpy/math/__init__.py
etarakci-hvl/probability
7a0ce5e5beff91051028258dfbc7bc6cf0c4998d
[ "Apache-2.0" ]
1
2020-11-08T17:03:46.000Z
2020-11-08T17:03:46.000Z
tensorflow_probability/python/experimental/substrates/numpy/math/__init__.py
etarakci-hvl/probability
7a0ce5e5beff91051028258dfbc7bc6cf0c4998d
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/experimental/substrates/numpy/math/__init__.py
etarakci-hvl/probability
7a0ce5e5beff91051028258dfbc7bc6cf0c4998d
[ "Apache-2.0" ]
null
null
null
# 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...
39.904762
90
0.698091
from tensorflow_probability.python.math._numpy import * custom_gradient = None value_and_gradient = None
true
true
f7723e5e4178cc4d00434cf24d1fdeabb33d84ff
6,820
py
Python
api/events/media_events.py
devonbleak/aws-media-services-application-mapper
78a9cdf1562e58ac559045fc940e83ae42a48c68
[ "Apache-2.0" ]
null
null
null
api/events/media_events.py
devonbleak/aws-media-services-application-mapper
78a9cdf1562e58ac559045fc940e83ae42a48c68
[ "Apache-2.0" ]
null
null
null
api/events/media_events.py
devonbleak/aws-media-services-application-mapper
78a9cdf1562e58ac559045fc940e83ae42a48c68
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ This Lambda is responsible for receiving and storing CloudWatch events originating from Media Services. This Lambda must be installed into each region where Media Services are created. """ import datetim...
47.692308
123
0.610411
import datetime import os import json from random import randint from urllib.parse import unquote import boto3 from boto3.dynamodb.conditions import Key, Attr from botocore.exceptions import ClientError from botocore.config import Config from jsonpath_ng import parse STAMP = os.environ["BUILD_STAMP"] MSAM_BOTO3_CONF...
true
true
f7723e6945e2368ac7c46c862b357b503e845afd
66,771
py
Python
pytorch_lightning/core/lightning.py
XDynames/pytorch-lightning
db1a2c1987c78e45a8800a8ab6327c86fc65b71c
[ "Apache-2.0" ]
2
2020-08-28T12:11:59.000Z
2020-09-27T09:44:04.000Z
pytorch_lightning/core/lightning.py
CyberiaoZSys7ems/pytorch-lightning
a5d1176cf6ef9e637144f980da11bbe63290c994
[ "Apache-2.0" ]
8
2021-01-15T13:15:09.000Z
2021-04-04T19:52:25.000Z
pytorch_lightning/core/lightning.py
CyberiaoZSys7ems/pytorch-lightning
a5d1176cf6ef9e637144f980da11bbe63290c994
[ "Apache-2.0" ]
1
2020-10-19T03:52:27.000Z
2020-10-19T03:52:27.000Z
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
37.916525
137
0.579728
import collections import inspect import os import re import tempfile from abc import ABC, abstractmethod from argparse import Namespace from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import torch import torch.distributed as torch_distrib from torch import Tensor from torch.nn import M...
true
true
f7723e9176794fb3794cf18f7ac3afbe1d8064dd
611
py
Python
test/test_install.py
sestrella/asdf-cabal
914c5d0cb4242aa35bb1c8af2636ece2ffdd36d8
[ "MIT" ]
1
2020-09-04T04:06:44.000Z
2020-09-04T04:06:44.000Z
test/test_install.py
sestrella/asdf-cabal
914c5d0cb4242aa35bb1c8af2636ece2ffdd36d8
[ "MIT" ]
null
null
null
test/test_install.py
sestrella/asdf-cabal
914c5d0cb4242aa35bb1c8af2636ece2ffdd36d8
[ "MIT" ]
null
null
null
from lib.install import install import subprocess import tempfile import unittest class TestInstall(unittest.TestCase): def test_install_3x(self): with tempfile.TemporaryDirectory() as install_dir: install(install_dir, '3.2.0.0') output = subprocess.check_output([f'{install_dir}/bin/cabal', '--versi...
32.157895
81
0.708674
from lib.install import install import subprocess import tempfile import unittest class TestInstall(unittest.TestCase): def test_install_3x(self): with tempfile.TemporaryDirectory() as install_dir: install(install_dir, '3.2.0.0') output = subprocess.check_output([f'{install_dir}/bin/cabal', '--versi...
true
true
f7723e96089cc4265ef57be8e74d021fb317b32d
914
py
Python
grafana-email/lib/log.py
ix-ai/grafana-email
52ae2ff1365b1d5511a664f3537149088a786187
[ "MIT" ]
null
null
null
grafana-email/lib/log.py
ix-ai/grafana-email
52ae2ff1365b1d5511a664f3537149088a786187
[ "MIT" ]
1
2021-07-07T11:28:16.000Z
2021-09-23T13:53:46.000Z
grafana-email/lib/log.py
ix-ai/grafana-email
52ae2ff1365b1d5511a664f3537149088a786187
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Global logging configuration """ import logging import pygelf def setup_logger(name=__package__, level='INFO', gelf_host=None, gelf_port=None, **kwargs): """ sets up the logger """ logging.basicConfig(handlers=[logging.NullHandler()]) formatter = logging...
26.882353
91
0.624726
import logging import pygelf def setup_logger(name=__package__, level='INFO', gelf_host=None, gelf_port=None, **kwargs): logging.basicConfig(handlers=[logging.NullHandler()]) formatter = logging.Formatter( fmt='%(asctime)s.%(msecs)03d %(levelname)s [%(module)s.%(funcName)s] %(message)s', date...
true
true
f7723ec10846a2d3e5894244c838584a9e8665e3
31,216
py
Python
salt/daemons/test/plan/actors.py
dlanderson/salt
484266444944cb767535fe3d16d1102e8da855ab
[ "Apache-2.0" ]
1
2017-11-21T16:57:27.000Z
2017-11-21T16:57:27.000Z
salt/salt/daemons/test/plan/actors.py
smallyear/linuxLearn
342e5020bf24b5fac732c4275a512087b47e578d
[ "Apache-2.0" ]
null
null
null
salt/salt/daemons/test/plan/actors.py
smallyear/linuxLearn
342e5020bf24b5fac732c4275a512087b47e578d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Test behaviors used by test plans ''' # pylint: skip-file # pylint: disable=C0103 import os import stat import time from collections import deque # Import ioflo libs import ioflo.base.deeding from ioflo.aid.odicting import odict from ioflo.base.consoling import getConsole console = getCon...
37.700483
87
0.535206
import os import stat import time from collections import deque import ioflo.base.deeding from ioflo.aid.odicting import odict from ioflo.base.consoling import getConsole console = getConsole() from raet import raeting, nacling from raet.lane.stacking import LaneStack from raet.lane.yarding import RemoteYard from r...
true
true
f772405c5e7edc478c073ee0efcae7e089b80682
10,421
py
Python
train_paired.py
uw-loci/demo_wsi_superres
38283031eee4823d332fae1b6b32b5da33fb957f
[ "MIT" ]
10
2020-04-03T14:41:23.000Z
2021-12-15T01:55:35.000Z
train_paired.py
uw-loci/demo_wsi_superres
38283031eee4823d332fae1b6b32b5da33fb957f
[ "MIT" ]
null
null
null
train_paired.py
uw-loci/demo_wsi_superres
38283031eee4823d332fae1b6b32b5da33fb957f
[ "MIT" ]
2
2021-02-08T14:27:30.000Z
2021-04-08T04:53:18.000Z
import os, argparse, sys, shutil, warnings, glob from datetime import datetime import matplotlib.pyplot as plt from math import log2, log10 import pandas as pd import numpy as np from collections import OrderedDict from torchvision import transforms, utils import torchvision import torch.nn.functional as F import torc...
49.861244
160
0.641013
import os, argparse, sys, shutil, warnings, glob from datetime import datetime import matplotlib.pyplot as plt from math import log2, log10 import pandas as pd import numpy as np from collections import OrderedDict from torchvision import transforms, utils import torchvision import torch.nn.functional as F import torc...
true
true
f77240787765a54d9225349bf1aa22771bc8169d
18,968
py
Python
flexget/plugins/output/telegram.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
1
2018-05-02T21:14:50.000Z
2018-05-02T21:14:50.000Z
flexget/plugins/output/telegram.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
null
null
null
flexget/plugins/output/telegram.py
tarzasai/Flexget
e5822874b2ee088b508390ff02c4eda9785596bc
[ "MIT" ]
null
null
null
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin from future.utils import native_str from distutils.version import LooseVersion from sqlalchemy import Column, Integer, String from flexget import db_schema, plugin from flexge...
37.560396
120
0.571542
from __future__ import unicode_literals, division, absolute_import from builtins import * from future.utils import native_str from distutils.version import LooseVersion from sqlalchemy import Column, Integer, String from flexget import db_schema, plugin from flexget.event import event from flexget.terminal import c...
true
true
f7724273cb365674172c8f8ee45651145c96edaa
1,671
py
Python
autoPyTorch/training/mixup.py
thomascherickal/Auto-PyTorch
9e25a3bdef8e836e63979229eef77830cd64bb53
[ "BSD-3-Clause" ]
1
2019-09-02T00:37:52.000Z
2019-09-02T00:37:52.000Z
autoPyTorch/training/mixup.py
thomascherickal/Auto-PyTorch
9e25a3bdef8e836e63979229eef77830cd64bb53
[ "BSD-3-Clause" ]
null
null
null
autoPyTorch/training/mixup.py
thomascherickal/Auto-PyTorch
9e25a3bdef8e836e63979229eef77830cd64bb53
[ "BSD-3-Clause" ]
1
2019-09-02T00:40:30.000Z
2019-09-02T00:40:30.000Z
from autoPyTorch.training.base_training import BaseBatchLossComputationTechnique import numpy as np from torch.autograd import Variable import ConfigSpace import torch class Mixup(BaseBatchLossComputationTechnique): def set_up(self, pipeline_config, hyperparameter_config, logger): super(Mixup, self).set_up...
38.860465
129
0.670856
from autoPyTorch.training.base_training import BaseBatchLossComputationTechnique import numpy as np from torch.autograd import Variable import ConfigSpace import torch class Mixup(BaseBatchLossComputationTechnique): def set_up(self, pipeline_config, hyperparameter_config, logger): super(Mixup, self).set_up...
true
true
f77242d3353aaabc2a71f017bfbcb47845db35f0
2,817
py
Python
test/lint/check-doc.py
arnoldcho/superman
2b581db736c2e5dbc7346b76a42d34ece92416fa
[ "MIT" ]
128
2018-02-06T00:54:33.000Z
2022-03-31T13:58:18.000Z
test/lint/check-doc.py
samettek/bitcoin
94a9cd25fd17e10b5720b5f72908b08c0f1ed16d
[ "MIT" ]
101
2018-02-08T05:30:56.000Z
2022-03-31T23:17:46.000Z
test/lint/check-doc.py
samettek/bitcoin
94a9cd25fd17e10b5720b5f72908b08c0f1ed16d
[ "MIT" ]
93
2018-02-05T23:36:22.000Z
2022-03-17T15:38:08.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' This checks if all command line args are documented. Return value is 0 to indicate no error. Author:...
42.044776
130
0.72311
from subprocess import check_output import re FOLDER_GREP = 'src' FOLDER_TEST = 'src/test/' REGEX_ARG = r'(?:ForceSet|SoftSet|Get|Is)(?:Bool)?Args?(?:Set)?\("(-[^"]+)"' REGEX_DOC = r'AddArg\("(-[^"=]+?)(?:=|")' CMD_ROOT_DIR = '$(git rev-parse --show-toplevel)/{}'.format(FOLDER_GREP) CMD_GREP_ARGS = r"git grep --perl...
true
true
f77242d564d1025aaf2b94602052f6f85f962e48
351
py
Python
Input/Util/generate_random_list.py
miladmolaee/nethub
7ba6bb66ca8c67139cd8c90d73f915ccf0d3e5ea
[ "MIT" ]
2
2021-07-15T08:24:46.000Z
2021-07-15T08:58:50.000Z
Input/Util/generate_random_list.py
miladmolaee/nethub
7ba6bb66ca8c67139cd8c90d73f915ccf0d3e5ea
[ "MIT" ]
null
null
null
Input/Util/generate_random_list.py
miladmolaee/nethub
7ba6bb66ca8c67139cd8c90d73f915ccf0d3e5ea
[ "MIT" ]
null
null
null
from random import randrange def generateList(start, end, number): if number > end - start: print("Error") return "Error" R = list(range(start, end)) l = [] while number > 0: r = randrange(len(R)) l.append(R[r]) del R[r] number -= 1 return l c...
14.04
37
0.535613
from random import randrange def generateList(start, end, number): if number > end - start: print("Error") return "Error" R = list(range(start, end)) l = [] while number > 0: r = randrange(len(R)) l.append(R[r]) del R[r] number -= 1 return l c...
true
true
f7724312af1e88b83a2e2d3a5d023cac10366322
15,917
py
Python
common/fingerprints.py
nunojesus/openpilot
52a45d12dd2f458a573511ffa657ca5695bb0b5c
[ "MIT" ]
1
2018-04-22T07:00:49.000Z
2018-04-22T07:00:49.000Z
common/fingerprints.py
nunojesus/openpilot
52a45d12dd2f458a573511ffa657ca5695bb0b5c
[ "MIT" ]
2
2018-05-01T23:49:07.000Z
2018-12-25T19:42:03.000Z
common/fingerprints.py
klaus385/openpilot
3ece1cd3e07d6a27ac32ce205f55092538108389
[ "MIT" ]
null
null
null
class HONDA: CIVIC = "HONDA CIVIC 2016 TOURING" ACURA_ILX = "ACURA ILX 2016 ACURAWATCH PLUS" CRV = "HONDA CR-V 2016 TOURING" ODYSSEY = "HONDA ODYSSEY 2018 EX-L" ACURA_RDX = "ACURA RDX 2018 ACURAWATCH PLUS" PILOT = "HONDA PILOT 2017 TOURING" RIDGELINE = "HONDA RIDGELINE 2017 BLACK EDITION" class TOYOTA: ...
125.330709
1,208
0.575108
class HONDA: CIVIC = "HONDA CIVIC 2016 TOURING" ACURA_ILX = "ACURA ILX 2016 ACURAWATCH PLUS" CRV = "HONDA CR-V 2016 TOURING" ODYSSEY = "HONDA ODYSSEY 2018 EX-L" ACURA_RDX = "ACURA RDX 2018 ACURAWATCH PLUS" PILOT = "HONDA PILOT 2017 TOURING" RIDGELINE = "HONDA RIDGELINE 2017 BLACK EDITION" class TOYOTA: ...
false
true
f77244667bc9cb61a41d82264c5602eeaf03ec44
395
py
Python
flask_turbo_boost/api_project/application/utils/errors.py
jingz/Flask-Boost
ad5b4bbf52f7c8a72fb1315b4d06a7b3c83b818b
[ "MIT" ]
20
2017-03-11T18:05:20.000Z
2021-10-16T00:36:27.000Z
flask_turbo_boost/api_project/application/utils/errors.py
jingz/Flask-Boost
ad5b4bbf52f7c8a72fb1315b4d06a7b3c83b818b
[ "MIT" ]
null
null
null
flask_turbo_boost/api_project/application/utils/errors.py
jingz/Flask-Boost
ad5b4bbf52f7c8a72fb1315b4d06a7b3c83b818b
[ "MIT" ]
3
2018-05-21T12:06:23.000Z
2020-06-07T07:37:02.000Z
from flask import jsonify def error_response(msg, imsg=None, code=None, more=None, **kwargs): return jsonify(dict( success=False, errors=dict( message=msg, internalMessage=imsg, code=code, ...
30.384615
67
0.458228
from flask import jsonify def error_response(msg, imsg=None, code=None, more=None, **kwargs): return jsonify(dict( success=False, errors=dict( message=msg, internalMessage=imsg, code=code, ...
true
true
f77244a584ed40646735855711930fa9229515da
3,550
py
Python
homeassistant/components/ness_alarm/alarm_control_panel.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
23
2017-11-15T21:03:53.000Z
2021-03-29T21:33:48.000Z
homeassistant/components/ness_alarm/alarm_control_panel.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
9
2022-01-27T06:32:10.000Z
2022-03-31T07:07:51.000Z
homeassistant/components/ness_alarm/alarm_control_panel.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
10
2018-01-01T00:12:51.000Z
2021-12-21T23:08:05.000Z
"""Support for Ness D8X/D16X alarm panel.""" import logging from nessclient import ArmingState import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, SUPPORT_ALARM_TRIGGER, ) from homeas...
30.869565
86
0.68338
import logging from nessclient import ArmingState import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, SUPPORT_ALARM_TRIGGER, ) from homeassistant.const import ( STATE_ALARM_ARMED_...
true
true
f772454580ef6640a83a421dc0bb13db93a467ab
25,359
py
Python
processviirs/downloadData.py
bucricket/projectMASviirs
705abc89505122351f0ef78e0edb950b7e3b7f48
[ "BSD-3-Clause" ]
null
null
null
processviirs/downloadData.py
bucricket/projectMASviirs
705abc89505122351f0ef78e0edb950b7e3b7f48
[ "BSD-3-Clause" ]
null
null
null
processviirs/downloadData.py
bucricket/projectMASviirs
705abc89505122351f0ef78e0edb950b7e3b7f48
[ "BSD-3-Clause" ]
1
2018-12-03T11:35:45.000Z
2018-12-03T11:35:45.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Wed Aug 23 15:15:49 2017 @author: mschull """ import os import subprocess import h5py import numpy as np import csv import pandas as pd import glob import datetime import gzip import shutil from osgeo import gdal,osr import argparse import urllib2, base64 ...
37.020438
183
0.579479
""" Created on Wed Aug 23 15:15:49 2017 @author: mschull """ import os import subprocess import h5py import numpy as np import csv import pandas as pd import glob import datetime import gzip import shutil from osgeo import gdal,osr import argparse import urllib2, base64 from bs4 import BeautifulSoup import requests i...
false
true
f77245e45d38de1f26916cc79ff287d181c1148d
248
py
Python
output/models/nist_data/list_pkg/string/schema_instance/nistschema_sv_iv_list_string_max_length_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/string/schema_instance/nistschema_sv_iv_list_string_max_length_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/string/schema_instance/nistschema_sv_iv_list_string_max_length_2_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.list_pkg.string.schema_instance.nistschema_sv_iv_list_string_max_length_2_xsd.nistschema_sv_iv_list_string_max_length_2 import NistschemaSvIvListStringMaxLength2 __all__ = [ "NistschemaSvIvListStringMaxLength2", ]
41.333333
190
0.891129
from output.models.nist_data.list_pkg.string.schema_instance.nistschema_sv_iv_list_string_max_length_2_xsd.nistschema_sv_iv_list_string_max_length_2 import NistschemaSvIvListStringMaxLength2 __all__ = [ "NistschemaSvIvListStringMaxLength2", ]
true
true
f77245ece74a714aee6be080792bb5bbf8b043f0
4,175
py
Python
setup.py
cisagov/li-pca-app
cedc94e92308564127e1e2068ee4be7b201ad9b0
[ "CC0-1.0" ]
null
null
null
setup.py
cisagov/li-pca-app
cedc94e92308564127e1e2068ee4be7b201ad9b0
[ "CC0-1.0" ]
7
2022-01-25T23:35:10.000Z
2022-03-21T10:27:55.000Z
setup.py
cisagov/li-pca-app
cedc94e92308564127e1e2068ee4be7b201ad9b0
[ "CC0-1.0" ]
null
null
null
""" This is the setup module for the example project. Based on: - https://packaging.python.org/distributing/ - https://github.com/pypa/sampleproject/blob/master/setup.py - https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure """ # Standard Python Libraries import codecs from glob import glob from os.pa...
37.954545
94
0.648383
import codecs from glob import glob from os.path import abspath, basename, dirname, join, splitext from setuptools import find_packages, setup def readme(): with open("README.md", encoding="utf-8") as f: return f.read() def read(rel_path): here = abspath(dirname(__file__)) with codecs.open(joi...
true
true
f77246a1a6f5f6c0642b11d2c7cc76e46817fa24
44,145
py
Python
src/ircdb.py
jrabbit/ubotu-fr
a573abfe165fcebbd5b25fb24e0c888116b46529
[ "BSD-3-Clause" ]
1
2016-08-09T21:33:19.000Z
2016-08-09T21:33:19.000Z
src/ircdb.py
jrabbit/ubotu-fr
a573abfe165fcebbd5b25fb24e0c888116b46529
[ "BSD-3-Clause" ]
null
null
null
src/ircdb.py
jrabbit/ubotu-fr
a573abfe165fcebbd5b25fb24e0c888116b46529
[ "BSD-3-Clause" ]
null
null
null
### # Copyright (c) 2002-2009, Jeremiah Fincher # Copyright (c) 2009, James Vega # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyri...
37.634271
116
0.59667
from __future__ import division import re import os import time import operator import socket import supybot.log as log import supybot.conf as conf import supybot.utils as utils import supybot.world as world import supybot.ircutils as ircutils import supybot.registry as registry import supybot.unpreserve as unpreser...
false
true
f7724737fddee4b85a241a70c24ae8ea494d485e
258
py
Python
cblib/scripts/filters/psdmap.py
HFriberg/cblib-base
164a00eb73ef3ac61f5b54f30492209cc69b854b
[ "Zlib" ]
3
2019-06-13T06:57:31.000Z
2020-06-18T09:58:11.000Z
cblib/scripts/filters/psdmap.py
HFriberg/cblib-base
164a00eb73ef3ac61f5b54f30492209cc69b854b
[ "Zlib" ]
1
2019-04-27T18:28:57.000Z
2019-04-30T17:16:53.000Z
cblib/scripts/filters/psdmap.py
HFriberg/cblib-base
164a00eb73ef3ac61f5b54f30492209cc69b854b
[ "Zlib" ]
3
2019-04-30T11:19:34.000Z
2019-05-31T13:12:17.000Z
import __common__ def keyquery(cdim=None): return( set(['PSDCON']) ) def getval(prob, cdim=None): if prob.psdmapnum == 0: return( 0 ) else: cdim = __common__.parse_cdim(cdim) return( sum([n*(n+1)/2 for n in prob.psdmapdim if cdim(n) ]) )
21.5
66
0.639535
import __common__ def keyquery(cdim=None): return( set(['PSDCON']) ) def getval(prob, cdim=None): if prob.psdmapnum == 0: return( 0 ) else: cdim = __common__.parse_cdim(cdim) return( sum([n*(n+1)/2 for n in prob.psdmapdim if cdim(n) ]) )
true
true
f77248e8e36541b273d88ea0b2397c2ab2df8704
3,306
py
Python
unprocessing/network.py
yick2232/google-research
99021ebda945e232abdcc592f2cea1375b3c84f7
[ "Apache-2.0" ]
11
2020-01-29T07:25:04.000Z
2022-03-05T16:01:21.000Z
unprocessing/network.py
zhangyuezjx/google-research
4a59cab927579ea9722e43252c695de5da4eb5e2
[ "Apache-2.0" ]
13
2020-01-28T22:19:53.000Z
2022-02-10T00:39:26.000Z
unprocessing/network.py
zhangyuezjx/google-research
4a59cab927579ea9722e43252c695de5da4eb5e2
[ "Apache-2.0" ]
2
2020-02-27T11:09:49.000Z
2021-08-25T07:32:15.000Z
# coding=utf-8 # Copyright 2019 The Google Research 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 applicab...
33.393939
76
0.721718
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf def conv(features, num_channels, activation=tf.nn.leaky_relu): return tf.layers.conv2d(features, num_channels, 3, padding='same', activation=activation) ...
true
true
f7724918590c48157c3bcb302499f7555d065fb1
164
py
Python
backend/api/apps.py
Mackrage/worm_rage_bot
7211c0c89ad12714eccdc98c6a84e7309108aabc
[ "MIT" ]
5
2021-12-25T21:03:59.000Z
2022-01-21T20:39:15.000Z
backend/api/apps.py
MaCkRage/worm_rage_bot
7211c0c89ad12714eccdc98c6a84e7309108aabc
[ "MIT" ]
null
null
null
backend/api/apps.py
MaCkRage/worm_rage_bot
7211c0c89ad12714eccdc98c6a84e7309108aabc
[ "MIT" ]
null
null
null
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class ApiConfig(AppConfig): name = 'api' verbose_name = _('Api')
20.5
54
0.743902
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class ApiConfig(AppConfig): name = 'api' verbose_name = _('Api')
true
true
f7724a8ea07af8aa7ff7b650f0a53e1b9850dc48
52,778
py
Python
Keras_tensorflow_nightly/source2.7/tensorflow/contrib/rpc/python/kernel_tests/test_example_pb2.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
1
2019-06-27T12:09:44.000Z
2019-06-27T12:09:44.000Z
Keras_tensorflow_nightly/source2.7/tensorflow/contrib/rpc/python/kernel_tests/test_example_pb2.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
null
null
null
Keras_tensorflow_nightly/source2.7/tensorflow/contrib/rpc/python/kernel_tests/test_example_pb2.py
Con-Mi/lambda-packs
b23a8464abdd88050b83310e1d0e99c54dac28ab
[ "MIT" ]
null
null
null
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: tensorflow/contrib/rpc/python/kernel_tests/test_example.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message ...
47.719711
5,410
0.756925
import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database from google.p...
true
true
f7724a9f43d2c069c11e29bf54b21e48ea8c150b
1,589
py
Python
convert_all_to_fits.py
harshmathur1990/CollegeLevelSpectrograph
01ed1a643c26c9af28a7c0ad59c8f4d35aa6dd3b
[ "MIT" ]
null
null
null
convert_all_to_fits.py
harshmathur1990/CollegeLevelSpectrograph
01ed1a643c26c9af28a7c0ad59c8f4d35aa6dd3b
[ "MIT" ]
3
2021-09-08T01:45:11.000Z
2022-03-12T00:19:13.000Z
convert_all_to_fits.py
harshmathur1990/CollegeLevelSpectrograph
01ed1a643c26c9af28a7c0ad59c8f4d35aa6dd3b
[ "MIT" ]
null
null
null
import os import sys import platform import datetime from pathlib import Path import skimage.color import imageio import sunpy.io.fits BITFACTOR = 255 def get_created_time(path_to_file): if platform.system() == 'Windows': return os.path.getctime(path_to_file) else: stat = os.stat(path_to_fil...
24.446154
72
0.590308
import os import sys import platform import datetime from pathlib import Path import skimage.color import imageio import sunpy.io.fits BITFACTOR = 255 def get_created_time(path_to_file): if platform.system() == 'Windows': return os.path.getctime(path_to_file) else: stat = os.stat(path_to_fil...
true
true
f7724b7874e8581957253197c8bd4367027a62be
2,624
py
Python
fix-labels-frenchcommunes.py
Ash-Crow/scrapers
0d3fcb5390732cbf4d1a3f42e0cdb717d43f90e1
[ "WTFPL" ]
2
2015-06-01T11:50:22.000Z
2022-03-08T13:40:55.000Z
fix-labels-frenchcommunes.py
artem090587/scrapers
0d3fcb5390732cbf4d1a3f42e0cdb717d43f90e1
[ "WTFPL" ]
null
null
null
fix-labels-frenchcommunes.py
artem090587/scrapers
0d3fcb5390732cbf4d1a3f42e0cdb717d43f90e1
[ "WTFPL" ]
1
2019-03-10T20:59:52.000Z
2019-03-10T20:59:52.000Z
from SPARQLWrapper import SPARQLWrapper, JSON import argparse parser = argparse.ArgumentParser( description='Fixes labels for French communes.') parser.add_argument("departement", help="The number of a departement") args = parser.parse_args() if args.departement.isdigit(): dept = '"{}"'.format(args.departemen...
31.238095
79
0.569741
from SPARQLWrapper import SPARQLWrapper, JSON import argparse parser = argparse.ArgumentParser( description='Fixes labels for French communes.') parser.add_argument("departement", help="The number of a departement") args = parser.parse_args() if args.departement.isdigit(): dept = '"{}"'.format(args.departemen...
true
true
f7724cc5c0e92e0fb3854025a9eb37643828135d
1,020
py
Python
pyvisdk/do/sort_spec.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/sort_spec.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
pyvisdk/do/sort_spec.py
Infinidat/pyvisdk
f2f4e5f50da16f659ccc1d84b6a00f397fa997f8
[ "MIT" ]
null
null
null
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def SortSpec(vim, *args, **kwargs): '''Specification of a single sort criterion to be app...
30.909091
124
0.60098
import logging from pyvisdk.exceptions import InvalidArgumentError log = logging.getLogger(__name__) def SortSpec(vim, *args, **kwargs): obj = vim.client.factory.create('{urn:sms}SortSpec') if (len(args) + len(kwargs)) < 2: raise IndexError('Expected at least 3 arguments got: %d' % len(args)) ...
true
true
f7724cfdb3c1b253dd08f71e9ee78b6face5d900
1,681
py
Python
opymize/tools/__init__.py
Room-10/Opymize
8632e5b618f41a65b1a37df099a6da254500e14b
[ "MIT" ]
null
null
null
opymize/tools/__init__.py
Room-10/Opymize
8632e5b618f41a65b1a37df099a6da254500e14b
[ "MIT" ]
null
null
null
opymize/tools/__init__.py
Room-10/Opymize
8632e5b618f41a65b1a37df099a6da254500e14b
[ "MIT" ]
null
null
null
import numpy as np def truncate(x, n): k = -int(np.floor(np.log10(abs(x)))) # Example: x = 0.006142 => k = 3 / x = 2341.2 => k = -3 k += n - 1 if k > 0: x_str = str(abs(x))[:(k+2)] else: x_str = str(abs(x))[:n]+"0"*(-k) return np.sign(x)*float(x_str) def solve_reduced_monic_cu...
28.491525
75
0.53837
import numpy as np def truncate(x, n): k = -int(np.floor(np.log10(abs(x)))) k += n - 1 if k > 0: x_str = str(abs(x))[:(k+2)] else: x_str = str(abs(x))[:n]+"0"*(-k) return np.sign(x)*float(x_str) def solve_reduced_monic_cubic(a, b, soln=0): a, b = np.asarray(a), np.asarray(...
true
true
f7724fbd3936c11598da6501643905a3df6ea929
249
py
Python
examples/python3-example/example/__main__.py
nezdolik/reproto
2d69d8efca518a6ea23a4182b29872fcc62a1a71
[ "Apache-2.0", "MIT" ]
108
2017-07-19T02:07:52.000Z
2022-02-27T04:46:43.000Z
examples/python3-example/example/__main__.py
nezdolik/reproto
2d69d8efca518a6ea23a4182b29872fcc62a1a71
[ "Apache-2.0", "MIT" ]
42
2017-11-21T14:21:40.000Z
2022-02-26T02:40:38.000Z
examples/python3-example/example/__main__.py
nezdolik/reproto
2d69d8efca518a6ea23a4182b29872fcc62a1a71
[ "Apache-2.0", "MIT" ]
9
2017-05-26T00:36:23.000Z
2020-07-26T10:58:20.000Z
import example.gen.github.v3 as v3 if __name__ == "__main__": client = v3.Github_Requests() rate_limit = client.get_rate_limit() print(rate_limit.resources.core) for g in client.get_gists_for_user("udoprog"): print(g.owner)
27.666667
50
0.702811
import example.gen.github.v3 as v3 if __name__ == "__main__": client = v3.Github_Requests() rate_limit = client.get_rate_limit() print(rate_limit.resources.core) for g in client.get_gists_for_user("udoprog"): print(g.owner)
true
true
f7725110cd97cf1b2a02c5b67bc67e9d2f5bfd04
535
py
Python
parsl/tests/workqueue_tests/wqex_local.py
Lnaden/parsl
f6ad3a272fa3d62e72ac3b7c402e25f079d4ab98
[ "Apache-2.0" ]
null
null
null
parsl/tests/workqueue_tests/wqex_local.py
Lnaden/parsl
f6ad3a272fa3d62e72ac3b7c402e25f079d4ab98
[ "Apache-2.0" ]
null
null
null
parsl/tests/workqueue_tests/wqex_local.py
Lnaden/parsl
f6ad3a272fa3d62e72ac3b7c402e25f079d4ab98
[ "Apache-2.0" ]
null
null
null
from parsl.config import Config from parsl.executors import WorkQueueExecutor config = Config( executors=[WorkQueueExecutor(port=50055, project_name="WQexample", see_worker_output=True, source=True, ...
41.153846
118
0.530841
from parsl.config import Config from parsl.executors import WorkQueueExecutor config = Config( executors=[WorkQueueExecutor(port=50055, project_name="WQexample", see_worker_output=True, source=True, ...
true
true
f7725121a571fa44d3da260ab44bcf5ad3a76fad
411
py
Python
learning-python/src/django/regex/entries/models.py
learning-software-development/packt-publishing-tutorials
625618d9eff8d108645e1f4035ef1b00869d12af
[ "Unlicense" ]
null
null
null
learning-python/src/django/regex/entries/models.py
learning-software-development/packt-publishing-tutorials
625618d9eff8d108645e1f4035ef1b00869d12af
[ "Unlicense" ]
null
null
null
learning-python/src/django/regex/entries/models.py
learning-software-development/packt-publishing-tutorials
625618d9eff8d108645e1f4035ef1b00869d12af
[ "Unlicense" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from django.utils import timezone class Entry(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) pattern = models.CharField(max_length=255) test_string = models.CharField(max_length=255) date_added = models.Da...
31.615385
60
0.761557
from django.db import models from django.contrib.auth.models import User from django.utils import timezone class Entry(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) pattern = models.CharField(max_length=255) test_string = models.CharField(max_length=255) date_added = models.Da...
true
true
f7725293f78215f2dffc626f6bba6a2d6015527d
9,088
py
Python
pysnmp-with-texts/ENTERASYS-RTR-ADVERT-NOTIFICATION-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/ENTERASYS-RTR-ADVERT-NOTIFICATION-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/ENTERASYS-RTR-ADVERT-NOTIFICATION-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ENTERASYS-RTR-ADVERT-NOTIFICATION-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENTERASYS-RTR-ADVERT-NOTIFICATION-MIB # Produced by pysmi-0.3.4 at Wed May 1 13:04:34 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 #...
135.641791
1,090
0.800836
OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ConstraintsIntersection = mibBuilder.impo...
true
true
f77253718193678ac1b77885e655294d9a9dc739
1,134
py
Python
machine_translation/fairseq/modules/learned_positional_embedding.py
wangjksjtu/autoassist-exp
7c4599fb250c2041ab007965b083750875dd6ac9
[ "BSD-3-Clause" ]
10
2019-11-19T18:03:59.000Z
2021-01-13T18:18:19.000Z
machine_translation/fairseq/modules/learned_positional_embedding.py
wangjksjtu/autoassist-exp
7c4599fb250c2041ab007965b083750875dd6ac9
[ "BSD-3-Clause" ]
null
null
null
machine_translation/fairseq/modules/learned_positional_embedding.py
wangjksjtu/autoassist-exp
7c4599fb250c2041ab007965b083750875dd6ac9
[ "BSD-3-Clause" ]
2
2019-12-03T16:35:46.000Z
2020-04-10T21:45:20.000Z
import torch.nn as nn from fairseq import utils class LearnedPositionalEmbedding(nn.Embedding): """This module learns positional embeddings up to a fixed maximum size. Padding symbols are ignored, but it is necessary to specify whether padding is added on the left side (left_pad=True) or right side (lef...
39.103448
89
0.694004
import torch.nn as nn from fairseq import utils class LearnedPositionalEmbedding(nn.Embedding): def __init__(self, num_embeddings, embedding_dim, padding_idx, left_pad): super().__init__(num_embeddings, embedding_dim, padding_idx) self.left_pad = left_pad def forward(self, input, incrementa...
true
true
f77255104c2e873ea39bb19e13c0e162738bb866
636
py
Python
nicos_mlz/kws2/setups/peltier.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/kws2/setups/peltier.py
ebadkamil/nicos
0355a970d627aae170c93292f08f95759c97f3b5
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
1
2021-08-18T10:55:42.000Z
2021-08-18T10:55:42.000Z
nicos_mlz/kws2/setups/peltier.py
ISISComputingGroup/nicos
94cb4d172815919481f8c6ee686f21ebb76f2068
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
description = 'Peltier temperature controller TLC40' group = 'optional' includes = ['alias_T'] tango_base = 'tango://phys.kws2.frm2:10000/' devices = dict( T_peltier = device('nicos.devices.tango.TemperatureController', description = 'The regulated temperature', tangodevice = tango_base + 'kws2/...
21.931034
67
0.606918
description = 'Peltier temperature controller TLC40' group = 'optional' includes = ['alias_T'] tango_base = 'tango://phys.kws2.frm2:10000/' devices = dict( T_peltier = device('nicos.devices.tango.TemperatureController', description = 'The regulated temperature', tangodevice = tango_base + 'kws2/...
true
true
f7725593e5703311e7fc57b34adc2cb53ab37954
4,893
py
Python
wemake_python_styleguide/visitors/ast/imports.py
ragohin/wemake-python-styleguide
b5edec86f4a2d68a6975ef3005ec03c398a1b261
[ "MIT" ]
null
null
null
wemake_python_styleguide/visitors/ast/imports.py
ragohin/wemake-python-styleguide
b5edec86f4a2d68a6975ef3005ec03c398a1b261
[ "MIT" ]
null
null
null
wemake_python_styleguide/visitors/ast/imports.py
ragohin/wemake-python-styleguide
b5edec86f4a2d68a6975ef3005ec03c398a1b261
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import ast from itertools import chain from typing import Callable from typing_extensions import final from wemake_python_styleguide import constants from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST from wemake_python_styleguide.logic import imports, nodes from wemake_p...
35.456522
79
0.663192
import ast from itertools import chain from typing import Callable from typing_extensions import final from wemake_python_styleguide import constants from wemake_python_styleguide.constants import FUTURE_IMPORTS_WHITELIST from wemake_python_styleguide.logic import imports, nodes from wemake_python_styleguide.logic.n...
true
true
f77255b1fbd726f26dc4e9b48568312f4a1e240e
3,419
py
Python
contrib/for_review/SkeletonPrimitive_DrD/py_SkeletonPrimitiveIO/skeletonPrimitivesUtilities/skeletonPrimitiveIO.py
bradleyhenke/cortex
f8245cc6c9464b1de9e6c6e57068248198e63de0
[ "BSD-3-Clause" ]
386
2015-01-02T11:10:43.000Z
2022-03-10T15:12:20.000Z
contrib/for_review/SkeletonPrimitive_DrD/py_SkeletonPrimitiveIO/skeletonPrimitivesUtilities/skeletonPrimitiveIO.py
bradleyhenke/cortex
f8245cc6c9464b1de9e6c6e57068248198e63de0
[ "BSD-3-Clause" ]
484
2015-01-09T18:28:06.000Z
2022-03-31T16:02:04.000Z
contrib/for_review/SkeletonPrimitive_DrD/py_SkeletonPrimitiveIO/skeletonPrimitivesUtilities/skeletonPrimitiveIO.py
bradleyhenke/cortex
f8245cc6c9464b1de9e6c6e57068248198e63de0
[ "BSD-3-Clause" ]
99
2015-01-28T23:18:04.000Z
2022-03-27T00:59:39.000Z
import os, sys, math import IECore isRunningInMaya = True try: from maya import cmds, OpenMaya except: isRunningInMaya = False def autoSearchMayaMainJoint(): if not isRunningInMaya: sys.stderr.write('WARNING: the function autoSearchMayaMainJoint cannot be called, because maya is not available in the environment...
35.247423
176
0.757239
import os, sys, math import IECore isRunningInMaya = True try: from maya import cmds, OpenMaya except: isRunningInMaya = False def autoSearchMayaMainJoint(): if not isRunningInMaya: sys.stderr.write('WARNING: the function autoSearchMayaMainJoint cannot be called, because maya is not available in the environment...
false
true
f7725698a22f956fc01da46c6d34cd967e938dfd
6,123
py
Python
app/api/filters.py
lcfyi/ubcgrades
a00ee195eab320a9b976222e9c6d457c81d7872c
[ "MIT" ]
null
null
null
app/api/filters.py
lcfyi/ubcgrades
a00ee195eab320a9b976222e9c6d457c81d7872c
[ "MIT" ]
null
null
null
app/api/filters.py
lcfyi/ubcgrades
a00ee195eab320a9b976222e9c6d457c81d7872c
[ "MIT" ]
null
null
null
from app.api import bp from app.models import TableauDashboardGrade as TDG, PAIRReportsGrade as PRG from app.api.errors import error_response, bad_request from flask import jsonify, g # Filters v2 @bp.route('/v2/sections/<string:campus>/<string:yearsession>/<string:subject>/<string:course>', methods=['GET']) def get_...
46.037594
157
0.673689
from app.api import bp from app.models import TableauDashboardGrade as TDG, PAIRReportsGrade as PRG from app.api.errors import error_response, bad_request from flask import jsonify, g @bp.route('/v2/sections/<string:campus>/<string:yearsession>/<string:subject>/<string:course>', methods=['GET']) def get_sections_v2(c...
true
true
f77256d4e141b2a640bf02dab516132cd3e53d93
1,920
py
Python
administrators/templatetags/administrators_tags.py
asis2016/momo-ristorante-v1
d46c36d1b92212ade34d781c4e2adc91cb52cac7
[ "MIT" ]
null
null
null
administrators/templatetags/administrators_tags.py
asis2016/momo-ristorante-v1
d46c36d1b92212ade34d781c4e2adc91cb52cac7
[ "MIT" ]
null
null
null
administrators/templatetags/administrators_tags.py
asis2016/momo-ristorante-v1
d46c36d1b92212ade34d781c4e2adc91cb52cac7
[ "MIT" ]
null
null
null
from django import template from helper.quick_stat_template import quick_stat_helper_template from helper.icon import Icon register = template.Library() from blogs.models import Blog from bookings.models import Booking from recipes.models import Recipe @register.simple_tag def model_entry_count(): blog_count = ...
25.6
76
0.664063
from django import template from helper.quick_stat_template import quick_stat_helper_template from helper.icon import Icon register = template.Library() from blogs.models import Blog from bookings.models import Booking from recipes.models import Recipe @register.simple_tag def model_entry_count(): blog_count = ...
true
true
f77257cca3dbc285346607c2f720b6f7575111c4
1,336
py
Python
jabberbot/config.py
RealTimeWeb/wikisite
66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5
[ "Apache-2.0" ]
null
null
null
jabberbot/config.py
RealTimeWeb/wikisite
66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5
[ "Apache-2.0" ]
null
null
null
jabberbot/config.py
RealTimeWeb/wikisite
66a22c68c172f0ebb3c88a9885ccd33e2d59c3c5
[ "Apache-2.0" ]
1
2020-01-09T04:53:32.000Z
2020-01-09T04:53:32.000Z
# -*- coding: iso-8859-1 -*- """ MoinMoin - jabber bot configuration file @copyright: 2007 by Karol Nowak <grywacz@gmail.com> @license: GNU GPL, see COPYING for details. """ class BotConfig: # Node name (a valid JID) to be used xmpp_node = u"moinbot@jabber.example2.org/wiki" # Server to be u...
27.265306
71
0.678892
class BotConfig: xmpp_node = u"moinbot@jabber.example2.org/wiki" xmpp_server = u"jabber.example.com" xmpp_port = None xmpp_password = u"" xmpp_status = u"Ready to serve!" verbose = True xmlrpc_host = u"localhost" xmlrpc_port = 8000 wi...
true
true
f77258888c052b009ca348868c60fd2dace88e55
5,329
py
Python
openGaussBase/testcase/SECURITY/MODIFY/Opengauss_Function_Security_RgPrivilege_Case0011.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SECURITY/MODIFY/Opengauss_Function_Security_RgPrivilege_Case0011.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/SECURITY/MODIFY/Opengauss_Function_Security_RgPrivilege_Case0011.py
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
""" Copyright (c) 2022 Huawei Technologies Co.,Ltd. openGauss is licensed under Mulan PSL v2. You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W...
37.006944
84
0.60593
import os import unittest from yat.test import macro from testcase.utils.Constant import Constant from testcase.utils.Common import Common from testcase.utils.CommonSH import CommonSH from testcase.utils.Logger import Logger class ModifyCase(unittest.TestCase): def setUp(self): self.logger = Logger() ...
true
true
f7725a5a405bf4fe9110fa4734debe4869b2105a
1,116
bzl
Python
pyz_image/image.bzl
gflaherty/rules_pyz
900546b12e880f272c82534cdd2423dcb109e795
[ "Apache-2.0" ]
26
2018-01-29T23:28:45.000Z
2020-12-01T21:30:32.000Z
pyz_image/image.bzl
gflaherty/rules_pyz
900546b12e880f272c82534cdd2423dcb109e795
[ "Apache-2.0" ]
28
2018-03-31T19:41:12.000Z
2019-01-30T21:57:43.000Z
pyz_image/image.bzl
gflaherty/rules_pyz
900546b12e880f272c82534cdd2423dcb109e795
[ "Apache-2.0" ]
17
2018-03-08T21:30:22.000Z
2019-11-22T17:16:00.000Z
# Requires io_bazel_rules_docker to exist load( "@io_bazel_rules_docker//container:container.bzl", "container_pull", container_repositories = "repositories" ) # WORKSPACE repository macro to load dependencies to use pyz_image def pyz_image_repositories(): excludes = native.existing_rules().keys() ...
34.875
95
0.687276
load( "@io_bazel_rules_docker//container:container.bzl", "container_pull", container_repositories = "repositories" ) def pyz_image_repositories(): excludes = native.existing_rules().keys() container_repositories() if "pyz2_image_base" not in excludes: container_pull( ...
true
true
f7725a6bf37fcaf15864d5e1afca1267a0b9b2a4
71,023
py
Python
pysnmp/OSPFV3-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/OSPFV3-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/OSPFV3-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module OSPFV3-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/OSPFV3-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:22:23 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:...
131.524074
10,747
0.769286
Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion, SingleValueConstraint = mibBuilder.impo...
true
true
f7725b40d6225397681f6f65d13a55b251b59732
117
py
Python
src/langumo/parsers/__init__.py
fossabot/langumo
2d8b30979878bb27fb07cc31879c13c5c186582c
[ "Apache-2.0" ]
null
null
null
src/langumo/parsers/__init__.py
fossabot/langumo
2d8b30979878bb27fb07cc31879c13c5c186582c
[ "Apache-2.0" ]
null
null
null
src/langumo/parsers/__init__.py
fossabot/langumo
2d8b30979878bb27fb07cc31879c13c5c186582c
[ "Apache-2.0" ]
null
null
null
from langumo.parsers.wikipedia import WikipediaParser from langumo.parsers.jsonstring import EscapedJSONStringParser
39
62
0.897436
from langumo.parsers.wikipedia import WikipediaParser from langumo.parsers.jsonstring import EscapedJSONStringParser
true
true
f7725b56a65dfc3bf4896745b99ce39b74e1ddec
5,601
py
Python
vendor/github.com/elastic/beats/winlogbeat/tests/system/winlogbeat.py
YotpoLtd/kafkabeat
f4c55db8dd700a96a2ce094131a2b238ff193bb7
[ "Apache-2.0" ]
26
2017-11-08T09:13:21.000Z
2020-12-14T06:08:53.000Z
vendor/github.com/elastic/beats/winlogbeat/tests/system/winlogbeat.py
YotpoLtd/kafkabeat
f4c55db8dd700a96a2ce094131a2b238ff193bb7
[ "Apache-2.0" ]
5
2017-09-05T03:49:06.000Z
2020-01-02T13:07:10.000Z
winlogbeat/tests/system/winlogbeat.py
sure0000/beats
1690690b3fcbe4a46aedc1121f9aa128497ed22d
[ "ECL-2.0", "Apache-2.0" ]
12
2018-03-26T07:56:47.000Z
2021-02-06T19:21:24.000Z
import hashlib import os import platform import sys import yaml if sys.platform.startswith("win"): import win32api import win32con import win32evtlog import win32security import win32evtlogutil sys.path.append(os.path.join(os.path.dirname(__file__), '../../../libbeat/tests/system')) from beat.bea...
33.740964
95
0.599357
import hashlib import os import platform import sys import yaml if sys.platform.startswith("win"): import win32api import win32con import win32evtlog import win32security import win32evtlogutil sys.path.append(os.path.join(os.path.dirname(__file__), '../../../libbeat/tests/system')) from beat.bea...
true
true
f7725b80874ae57b25717bec41fc24dd4f8bb410
314
py
Python
backend/coreapp/util.py
ChrisNonyminus/decomp.me
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
[ "MIT" ]
47
2021-11-05T14:20:58.000Z
2022-03-19T18:56:46.000Z
backend/coreapp/util.py
ChrisNonyminus/decomp.me
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
[ "MIT" ]
131
2021-10-20T09:17:16.000Z
2022-03-31T22:22:54.000Z
backend/coreapp/util.py
ChrisNonyminus/decomp.me
b51e8d586ba95bd20f6b2e5881ecc34459e761bc
[ "MIT" ]
20
2021-11-23T18:49:45.000Z
2022-03-29T06:25:10.000Z
import hashlib import logging import time from typing import Tuple logger = logging.getLogger(__name__) _startup_time = int(time.time()) logger.info("Startup time: %s", _startup_time) def gen_hash(key: Tuple[str, ...]) -> str: return hashlib.sha256(str(key + (_startup_time,)).encode("utf-8")).hexdigest()
22.428571
82
0.726115
import hashlib import logging import time from typing import Tuple logger = logging.getLogger(__name__) _startup_time = int(time.time()) logger.info("Startup time: %s", _startup_time) def gen_hash(key: Tuple[str, ...]) -> str: return hashlib.sha256(str(key + (_startup_time,)).encode("utf-8")).hexdigest()
true
true
f7725c5a103aa93508475460ebedeccb2182d2a8
2,049
py
Python
pychron/core/helpers/traitsui_shortcuts.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
31
2016-03-07T02:38:17.000Z
2022-02-14T18:23:43.000Z
pychron/core/helpers/traitsui_shortcuts.py
ASUPychron/pychron
dfe551bdeb4ff8b8ba5cdea0edab336025e8cc76
[ "Apache-2.0" ]
1,626
2015-01-07T04:52:35.000Z
2022-03-25T19:15:59.000Z
pychron/core/helpers/traitsui_shortcuts.py
UIllinoisHALPychron/pychron
f21b79f4592a9fb9dc9a4cb2e4e943a3885ededc
[ "Apache-2.0" ]
26
2015-05-23T00:10:06.000Z
2022-03-07T16:51:57.000Z
# =============================================================================== # Copyright 2012 Jake Ross # # 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/licens...
30.132353
88
0.564666
from os import environ from traitsui.api import Item, ListEditor, InstanceEditor, View, VGroup, VFold as _VFold from traitsui.menu import OKButton if not environ.get("VFOLD_ENABLED", True): VFold = VGroup else: VFold = _VFold def instance_item(name, **kw): return Item(name, style="custom", show_label=...
true
true
f7725c7fe0ea3b18e4c69da235437b17b32229e9
398
py
Python
design_patterns/oop/alien_game/death.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
design_patterns/oop/alien_game/death.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
design_patterns/oop/alien_game/death.py
BrianLusina/PyCharm
144dd4f6b2d254507237f46c8ee175c407fe053d
[ "Apache-2.0", "MIT" ]
null
null
null
from random import randint from ObjectOriented.AlienGame import Scene class Death(Scene): __quips = [ "You died. You kinda suck at this.", "Your mom would be proud...if she were smarter.", "Such a looser.", "I have a small puppy that's better at this.", ] def enter(self)...
23.411765
62
0.60804
from random import randint from ObjectOriented.AlienGame import Scene class Death(Scene): __quips = [ "You died. You kinda suck at this.", "Your mom would be proud...if she were smarter.", "Such a looser.", "I have a small puppy that's better at this.", ] def enter(self)...
true
true
f7725d126fa99d45fdab197f6ffff3eeda66e20d
764
py
Python
wsocket/wsoclient.py
LegallGuillaume/wSocket
937d759be5b4bb181100a967ab7fba2d82cb1853
[ "MIT" ]
null
null
null
wsocket/wsoclient.py
LegallGuillaume/wSocket
937d759be5b4bb181100a967ab7fba2d82cb1853
[ "MIT" ]
null
null
null
wsocket/wsoclient.py
LegallGuillaume/wSocket
937d759be5b4bb181100a967ab7fba2d82cb1853
[ "MIT" ]
null
null
null
import websockets from wsocket.wcthread import WCThread class WSoClient: def __init__(self, **kwargs): self._cli = WCThread(**kwargs) self._flag_running = False def connect(self): self._cli.start() self._flag_running = True def close(self): self._cli.stop_client() ...
24.645161
45
0.608639
import websockets from wsocket.wcthread import WCThread class WSoClient: def __init__(self, **kwargs): self._cli = WCThread(**kwargs) self._flag_running = False def connect(self): self._cli.start() self._flag_running = True def close(self): self._cli.stop_client() ...
true
true
f7725dcc0fb54964d6336c457d610fd59a4f3207
10,934
py
Python
correctiv_eurosfueraerzte/views/base.py
correctiv/correctiv-eurosfueraerzte
291c358d65eccf06034e409d888de56a4545c7b7
[ "MIT" ]
4
2016-09-24T07:27:49.000Z
2021-11-08T12:14:30.000Z
correctiv_eurosfueraerzte/views/base.py
correctiv/correctiv-eurosfueraerzte
291c358d65eccf06034e409d888de56a4545c7b7
[ "MIT" ]
5
2020-06-05T17:33:30.000Z
2022-03-11T23:16:18.000Z
correctiv_eurosfueraerzte/views/base.py
correctiv/correctiv-eurosfueraerzte
291c358d65eccf06034e409d888de56a4545c7b7
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import json from django.views.generic import TemplateView, ListView from django.views.generic.detail import DetailView from django.http import HttpResponse, QueryDict from django.shortcuts import redirect from django.utils import translation from djang...
37.83391
127
0.638467
from __future__ import unicode_literals import json from django.views.generic import TemplateView, ListView from django.views.generic.detail import DetailView from django.http import HttpResponse, QueryDict from django.shortcuts import redirect from django.utils import translation from django.utils.translation import...
true
true
f7725e2940a7c907b91aaffcddbedc5bb9d50614
1,727
py
Python
src/taskgroup.py
kaustubh-karkare/todolist
5830460f83726847f3167260cadb83a2fd6df998
[ "MIT" ]
1
2015-07-23T17:54:31.000Z
2015-07-23T17:54:31.000Z
src/taskgroup.py
kaustubh-karkare/todolist
5830460f83726847f3167260cadb83a2fd6df998
[ "MIT" ]
null
null
null
src/taskgroup.py
kaustubh-karkare/todolist
5830460f83726847f3167260cadb83a2fd6df998
[ "MIT" ]
null
null
null
require task, prettytable class TaskGroup: def __init__(self,tasks,name=""): self.name = name self.__tasks = [] for task in tasks: self.task_add(task) def __repr__(self): return self.__tasks.__repr__() def task_list(self,unhide=False): return [task for task in self.__tasks if unhide or not task.tag_...
29.271186
82
0.669369
require task, prettytable class TaskGroup: def __init__(self,tasks,name=""): self.name = name self.__tasks = [] for task in tasks: self.task_add(task) def __repr__(self): return self.__tasks.__repr__() def task_list(self,unhide=False): return [task for task in self.__tasks if unhide or not task.tag_...
false
true
f7725f9a043df73b14dce623e9a11a0c8af01693
5,762
py
Python
mkdocs/config.py
ranlempow/mkdocs
f0fbaa9d298b67e2c31bf273acd1a01ff141ce94
[ "BSD-2-Clause" ]
null
null
null
mkdocs/config.py
ranlempow/mkdocs
f0fbaa9d298b67e2c31bf273acd1a01ff141ce94
[ "BSD-2-Clause" ]
null
null
null
mkdocs/config.py
ranlempow/mkdocs
f0fbaa9d298b67e2c31bf273acd1a01ff141ce94
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 from mkdocs import utils from mkdocs.compat import urlparse from mkdocs.exceptions import ConfigurationError import os import yaml DEFAULT_CONFIG = { 'site_name': None, 'pages': None, 'site_url': None, 'site_description': None, 'site_author': None, 'site_favicon': None, ...
34.710843
145
0.655675
from mkdocs import utils from mkdocs.compat import urlparse from mkdocs.exceptions import ConfigurationError import os import yaml DEFAULT_CONFIG = { 'site_name': None, 'pages': None, 'site_url': None, 'site_description': None, 'site_author': None, 'site_favicon': None, 'theme': 'mkdocs...
true
true
f7725fd7f39b102e7bdf4dc09e1a1c71fec0dd90
12,624
py
Python
qsdsan/sanunits/_sludge_handling.py
QSD-Group/QSDsan
493e14e1ca4f09cbc34de8d23c2cd634e0c87543
[ "Unlicense" ]
23
2021-01-23T16:45:07.000Z
2022-01-30T18:14:32.000Z
qsdsan/sanunits/_sludge_handling.py
QSD-Group/QSDsan
493e14e1ca4f09cbc34de8d23c2cd634e0c87543
[ "Unlicense" ]
39
2021-01-07T05:57:06.000Z
2022-03-21T20:44:11.000Z
qsdsan/sanunits/_sludge_handling.py
QSD-Group/QSDsan
493e14e1ca4f09cbc34de8d23c2cd634e0c87543
[ "Unlicense" ]
12
2021-03-09T09:06:15.000Z
2022-03-12T15:10:13.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' QSDsan: Quantitative Sustainable Design for sanitation and resource recovery systems This module is developed by: Yalin Li <zoe.yalin.li@gmail.com> This module is under the University of Illinois/NCSA Open Source License. Please refer to https://github.com/QSD-G...
35.661017
186
0.625871
import flexsolve as flx import biosteam as bst from warnings import warn from math import ceil from . import Decay from .. import SanUnit from ..sanunits import Pump from ..utils import ospath, load_data, data_path, dct_from_str __all__ = ( 'SludgeHandling', 'BeltThickener', 'SludgeCentrifuge', 'SludgeSepara...
true
true
f77260249ef0501d09c617b2463e084f0e3c909b
957
py
Python
platzigram/middleware.py
eicarranza/platzigram
be017178e393e610516a79e5d3eff24aedcf6df6
[ "MIT" ]
1
2021-04-27T15:45:17.000Z
2021-04-27T15:45:17.000Z
platzigram/middleware.py
eicarranza/platzigram
be017178e393e610516a79e5d3eff24aedcf6df6
[ "MIT" ]
12
2020-02-12T00:37:53.000Z
2022-03-11T23:50:33.000Z
platzigram/middleware.py
johnnystefan/Platzigram
13e781cd63e241b1c30bd2ef1bed250a6ecc4e8d
[ "MIT" ]
3
2021-04-26T15:59:46.000Z
2021-04-28T15:57:18.000Z
"""Platzigram middleware catalog.""" # Django from django.shortcuts import redirect from django.urls import reverse class ProfileCompletionMiddleware: """Profile completion middleware. Ensure every user that is interacting with the platform have their profile picture and biography. """ def __in...
33
94
0.655172
from django.shortcuts import redirect from django.urls import reverse class ProfileCompletionMiddleware: def __init__(self, get_response): self.get_response = get_response def __call__(self, request): if not request.user.is_anonymous: if not request.user.is_staff: ...
true
true
f772605edd32cd722fea70b3bebcdc1ba4246b78
983
py
Python
Object Detection/iou.py
kaka-lin/ML-Notes
047b88d59346b2ec719b1b3e2fcd605e1ccfaf91
[ "MIT" ]
null
null
null
Object Detection/iou.py
kaka-lin/ML-Notes
047b88d59346b2ec719b1b3e2fcd605e1ccfaf91
[ "MIT" ]
null
null
null
Object Detection/iou.py
kaka-lin/ML-Notes
047b88d59346b2ec719b1b3e2fcd605e1ccfaf91
[ "MIT" ]
null
null
null
import numpy as np def calculate_iou(bbox1, bbox2): """ calculate iou args: - bbox1 [array]: 1x4 single bbox - bbox2 [array]: 1x4 single bbox returns: - iou [float]: iou between 2 bboxes """ xmin = max(bbox1[0], bbox2[0]) # x_left ymin = max(bbox1[1], bbox2[1]) # y_top xmax...
27.305556
68
0.586979
import numpy as np def calculate_iou(bbox1, bbox2): xmin = max(bbox1[0], bbox2[0]) ymin = max(bbox1[1], bbox2[1]) xmax = min(bbox1[2], bbox2[2]) ymax = min(bbox1[3], bbox2[3]) intersection = max(0, xmax - xmin + 1) * max(0, ymax - ymin + 1) bbox1_area = (bbox1[2] - bbox1[0]) * (bbox1[3] - bbo...
true
true
f772613544576c3773b77b2728f488edc255766d
486
py
Python
actions/move_card.py
martezr/stackstorm-trello
40bfb4eefcf90799ce0826cc2ee00355fed5ac77
[ "Apache-2.0" ]
2
2018-07-04T01:52:39.000Z
2019-08-26T02:45:42.000Z
actions/move_card.py
martezr/stackstorm-trello
40bfb4eefcf90799ce0826cc2ee00355fed5ac77
[ "Apache-2.0" ]
3
2017-05-24T09:29:44.000Z
2018-09-20T09:50:28.000Z
actions/move_card.py
martezr/stackstorm-trello
40bfb4eefcf90799ce0826cc2ee00355fed5ac77
[ "Apache-2.0" ]
3
2017-06-20T01:19:00.000Z
2021-01-28T17:47:50.000Z
from lib import action class MoveCardAction(action.BaseAction): def run(self, card_id, target_list_id, target_board_id=None, api_key=None, token=None): if api_key: self._set_creds(api_key=api_key, token=token) card = self._client().get_card(card_id) if not target_board_id: ...
28.588235
91
0.68107
from lib import action class MoveCardAction(action.BaseAction): def run(self, card_id, target_list_id, target_board_id=None, api_key=None, token=None): if api_key: self._set_creds(api_key=api_key, token=token) card = self._client().get_card(card_id) if not target_board_id: ...
true
true
f7726156863f520cb6594f35da314ccf2b41cb8d
1,143
py
Python
example/lanzou_example.py
notechats/notepan
be63bad0cb6b26ec1990862bf4c9e04172bacb31
[ "Apache-2.0" ]
24
2020-02-26T03:56:46.000Z
2022-03-18T07:15:26.000Z
example/lanzou_example.py
notechats/notepan
be63bad0cb6b26ec1990862bf4c9e04172bacb31
[ "Apache-2.0" ]
2
2020-05-02T19:52:20.000Z
2021-07-11T07:19:44.000Z
example/lanzou_example.py
notechats/notepan
be63bad0cb6b26ec1990862bf4c9e04172bacb31
[ "Apache-2.0" ]
5
2020-10-15T11:33:25.000Z
2022-01-25T17:42:21.000Z
from notedrive.lanzou import CodeDetail, LanZouCloud, download downer = LanZouCloud() downer.ignore_limits() downer.login_by_cookie() def example1(): print(downer.login_by_cookie() == CodeDetail.SUCCESS) def example2(): file_path = '/Users/liangtaoniu/workspace/MyDiary/tmp/weights/yolov3.weight' downe...
23.8125
106
0.713911
from notedrive.lanzou import CodeDetail, LanZouCloud, download downer = LanZouCloud() downer.ignore_limits() downer.login_by_cookie() def example1(): print(downer.login_by_cookie() == CodeDetail.SUCCESS) def example2(): file_path = '/Users/liangtaoniu/workspace/MyDiary/tmp/weights/yolov3.weight' downe...
true
true
f77262f78648f5065671fda0b803fd2061d327e1
481
py
Python
model_test.py
noatgnu/colossi
c936bc25b5990f8dfbf4db3ed11ce8a893553668
[ "MIT" ]
null
null
null
model_test.py
noatgnu/colossi
c936bc25b5990f8dfbf4db3ed11ce8a893553668
[ "MIT" ]
null
null
null
model_test.py
noatgnu/colossi
c936bc25b5990f8dfbf4db3ed11ce8a893553668
[ "MIT" ]
null
null
null
import unittest from model import prediction_with_model import pandas as pd import numpy as np class PredictionWithModel(unittest.TestCase): def test_prediction(self): d = pd.read_csv(r"C:\Users\Toan\Documents\GitHub\colossi\static\temp\cc7deed8140745d89f2f42f716f6fd1b\out_imac_atlas_expression_v7.1.tsv", ...
30.0625
151
0.733888
import unittest from model import prediction_with_model import pandas as pd import numpy as np class PredictionWithModel(unittest.TestCase): def test_prediction(self): d = pd.read_csv(r"C:\Users\Toan\Documents\GitHub\colossi\static\temp\cc7deed8140745d89f2f42f716f6fd1b\out_imac_atlas_expression_v7.1.tsv", ...
true
true
f77263795b90abc90d20882f0417bb1f863ba97a
33,066
py
Python
experiment/scheduler.py
sjmluo/myfuzzbench
d953a65feab096aa958a338dadbeb746602684da
[ "Apache-2.0" ]
null
null
null
experiment/scheduler.py
sjmluo/myfuzzbench
d953a65feab096aa958a338dadbeb746602684da
[ "Apache-2.0" ]
null
null
null
experiment/scheduler.py
sjmluo/myfuzzbench
d953a65feab096aa958a338dadbeb746602684da
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
42.610825
98
0.678612
import datetime import math import multiprocessing import os import sys import random import time from typing import List, Dict import jinja2 from common import benchmark_utils from common import experiment_utils from common import gcloud from common import gce from common import logs from common import retry from co...
true
true
f77263c7ac0d6d6ec0a67a04e27f79c79f29e331
8,154
py
Python
geosolver/diagram/select_primitives.py
mhrmm/geosolver
13ae2972c58d5ba4c4878576f9fba8569cc99629
[ "Apache-2.0" ]
83
2015-09-14T13:50:42.000Z
2022-03-12T10:24:38.000Z
geosolver/diagram/select_primitives.py
nehamjadhav/geosolver
13ae2972c58d5ba4c4878576f9fba8569cc99629
[ "Apache-2.0" ]
5
2018-03-21T00:10:50.000Z
2021-04-19T02:59:25.000Z
geosolver/diagram/select_primitives.py
nehamjadhav/geosolver
13ae2972c58d5ba4c4878576f9fba8569cc99629
[ "Apache-2.0" ]
33
2015-06-16T18:52:43.000Z
2021-12-16T08:58:27.000Z
import logging import numpy as np from geosolver.diagram.states import PrimitiveParse from geosolver.diagram.computational_geometry import line_length, circumference, \ distance_between_circle_and_point, midpoint, line_unit_vector, line_normal_vector, \ distance_between_points_squared, distance_between_line_a...
36.895928
127
0.69843
import logging import numpy as np from geosolver.diagram.states import PrimitiveParse from geosolver.diagram.computational_geometry import line_length, circumference, \ distance_between_circle_and_point, midpoint, line_unit_vector, line_normal_vector, \ distance_between_points_squared, distance_between_line_a...
true
true
f77263eccdea4e7a646bf6b633f56a5cefac5699
11,631
py
Python
accounts/test_models.py
cu-library/mellyn
7ac6d45d67c21223da1a6b7902577148721593d1
[ "MIT" ]
null
null
null
accounts/test_models.py
cu-library/mellyn
7ac6d45d67c21223da1a6b7902577148721593d1
[ "MIT" ]
8
2020-06-11T01:35:43.000Z
2021-05-27T18:22:45.000Z
accounts/test_models.py
cu-library/mellyn
7ac6d45d67c21223da1a6b7902577148721593d1
[ "MIT" ]
null
null
null
""" This module defines tests to run against the fields module. https://docs.djangoproject.com/en/3.0/topics/testing/ """ import random import string from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from...
62.197861
118
0.653942
import random import string from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.test import TestCase from guardian.shortcuts import assign_perm...
true
true
f77264a4172b9d4f8a17194740f1f01badfd3a36
560
py
Python
np/reference/ch9code/animation.py
focusunsink/study_python
322326642db54df8725793d70a95d21ac40b6507
[ "MIT" ]
null
null
null
np/reference/ch9code/animation.py
focusunsink/study_python
322326642db54df8725793d70a95d21ac40b6507
[ "MIT" ]
null
null
null
np/reference/ch9code/animation.py
focusunsink/study_python
322326642db54df8725793d70a95d21ac40b6507
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation fig = plt.figure() ax = fig.add_subplot(111) N = 10 x = np.random.rand(N) y = np.random.rand(N) z = np.random.rand(N) circles, triangles, dots = ax.plot(x, 'ro', y, 'g^', z, 'b.') ax.set_ylim(0, 1) plt.axis('off') def update(d...
22.4
67
0.692857
import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation fig = plt.figure() ax = fig.add_subplot(111) N = 10 x = np.random.rand(N) y = np.random.rand(N) z = np.random.rand(N) circles, triangles, dots = ax.plot(x, 'ro', y, 'g^', z, 'b.') ax.set_ylim(0, 1) plt.axis('off') def update(d...
true
true
f772675709be45c2506c58cc98ed1c79f3442572
1,828
py
Python
configs/data_configs.py
yakovdan/encoder4editing
7d1310f82421c5c168f94c404d05ee96087f7bdc
[ "MIT" ]
null
null
null
configs/data_configs.py
yakovdan/encoder4editing
7d1310f82421c5c168f94c404d05ee96087f7bdc
[ "MIT" ]
null
null
null
configs/data_configs.py
yakovdan/encoder4editing
7d1310f82421c5c168f94c404d05ee96087f7bdc
[ "MIT" ]
null
null
null
from configs import transforms_config from configs.paths_config import dataset_paths DATASETS = { 'ffhq_encode': { 'transforms': transforms_config.EncodeTransforms, 'train_source_root': dataset_paths['ffhq'], 'train_target_root': dataset_paths['ffhq'], 'test_source_root': dataset_paths['celeba_test'], 'tes...
36.56
61
0.749453
from configs import transforms_config from configs.paths_config import dataset_paths DATASETS = { 'ffhq_encode': { 'transforms': transforms_config.EncodeTransforms, 'train_source_root': dataset_paths['ffhq'], 'train_target_root': dataset_paths['ffhq'], 'test_source_root': dataset_paths['celeba_test'], 'tes...
true
true
f772696311b3683d2064edb26db810febc2172fb
483
py
Python
spyder_line_profiler/__init__.py
cdfredrick/spyder-line-profiler
06d1af7dbede71919c246b356c981e0b105f9ac6
[ "MIT" ]
null
null
null
spyder_line_profiler/__init__.py
cdfredrick/spyder-line-profiler
06d1af7dbede71919c246b356c981e0b105f9ac6
[ "MIT" ]
null
null
null
spyder_line_profiler/__init__.py
cdfredrick/spyder-line-profiler
06d1af7dbede71919c246b356c981e0b105f9ac6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © 2013 Spyder Project Contributors # Licensed under the terms of the MIT License # (see LICENSE.txt for details) __version__ = '0.2.0.dev0' # ============================================================================= # The following statements are required to register this 3rd...
32.2
79
0.505176
__version__ = '0.2.0.dev0' from .lineprofiler import LineProfiler PLUGIN_CLASS = LineProfiler
true
true
f7726a8cfd2c742140db60d28c27924e21586ffb
826
py
Python
setup.py
rishabkoul/paperwhisperer
1a0d34bfe40b187d74ce5493ffaf7506f877dcb6
[ "MIT" ]
120
2021-05-31T11:44:21.000Z
2022-02-27T14:45:59.000Z
setup.py
rishabkoul/paperwhisperer
1a0d34bfe40b187d74ce5493ffaf7506f877dcb6
[ "MIT" ]
1
2021-12-22T06:25:55.000Z
2021-12-22T06:25:55.000Z
setup.py
rishabkoul/paperwhisperer
1a0d34bfe40b187d74ce5493ffaf7506f877dcb6
[ "MIT" ]
13
2021-05-31T16:20:46.000Z
2022-01-22T04:34:59.000Z
import setuptools with open("requirements.txt", "r") as fp: required = fp.read().splitlines() setuptools.setup( name="paperwhisperer", version="0.1.0", author="Valerio Velardo", author_email="valerio@thesoundofai.com", description="Speech summaries of arxiv papers retrieved via keyword " ...
26.645161
81
0.631961
import setuptools with open("requirements.txt", "r") as fp: required = fp.read().splitlines() setuptools.setup( name="paperwhisperer", version="0.1.0", author="Valerio Velardo", author_email="valerio@thesoundofai.com", description="Speech summaries of arxiv papers retrieved via keyword " ...
true
true
f7726b1517327f4fddc00cc8465adc71d5a6ef13
4,970
py
Python
util/test/send_email.py
briangu/chapel
331c661f8dc2490c22c7e3d5c056e67c364fc17b
[ "ECL-2.0", "Apache-2.0" ]
1
2022-03-30T18:06:47.000Z
2022-03-30T18:06:47.000Z
util/test/send_email.py
briangu/chapel
331c661f8dc2490c22c7e3d5c056e67c364fc17b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
util/test/send_email.py
briangu/chapel
331c661f8dc2490c22c7e3d5c056e67c364fc17b
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Portable email sender. Acts as replacement for mail, Mail, mailx, email (cygwin). Message body is taken from stdin. """ from __future__ import print_function import email.mime.text import getpass import logging import optparse import os import smtplib import socket import sys def main(): ...
29.760479
93
0.652515
from __future__ import print_function import email.mime.text import getpass import logging import optparse import os import smtplib import socket import sys def main(): args = _parse_args() _setup_logging(args.verbose) body = sys.stdin.read() send_email(args.recipients, body, args.subject, arg...
true
true
f7726b65a41a329d914aac74959c655eb195b054
953
py
Python
src/wai/bynning/binners/_TwoPassBinner.py
waikato-datamining/bynning
01b7368d4dc1094651d7cbe067576dfb3756a1d3
[ "MIT" ]
null
null
null
src/wai/bynning/binners/_TwoPassBinner.py
waikato-datamining/bynning
01b7368d4dc1094651d7cbe067576dfb3756a1d3
[ "MIT" ]
null
null
null
src/wai/bynning/binners/_TwoPassBinner.py
waikato-datamining/bynning
01b7368d4dc1094651d7cbe067576dfb3756a1d3
[ "MIT" ]
null
null
null
from abc import ABC, abstractmethod from typing import Iterable, Tuple, Iterator, List from .._typing import KeyType, LabelType, ItemType from ._Binner import Binner class TwoPassBinner(Binner[KeyType, LabelType], ABC): """ Class for binners which require an initial pass over the set of items being binne...
29.78125
92
0.671563
from abc import ABC, abstractmethod from typing import Iterable, Tuple, Iterator, List from .._typing import KeyType, LabelType, ItemType from ._Binner import Binner class TwoPassBinner(Binner[KeyType, LabelType], ABC): def _bin_items(self, items: Iterable[ItemType]) -> Iterator[Tuple[LabelType, ItemType]]: ...
true
true
f7726bb23e624d4bd7f91875ea7c0660f2769c91
907
py
Python
var/spack/repos/builtin/packages/r-getoptlong/package.py
nkianggiss/spack
3477d3375142a30f5714bb5966a6d8bb22c33c06
[ "ECL-2.0", "Apache-2.0", "MIT" ]
3
2019-06-27T13:26:50.000Z
2019-07-01T16:24:54.000Z
var/spack/repos/builtin/packages/r-getoptlong/package.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
75
2016-07-27T11:43:00.000Z
2020-12-08T15:56:53.000Z
var/spack/repos/builtin/packages/r-getoptlong/package.py
openbiox/spack
bb6ec7fb40c14b37e094a860e3625af53f633174
[ "ECL-2.0", "Apache-2.0", "MIT" ]
8
2015-10-16T13:51:49.000Z
2021-10-18T13:58:03.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RGetoptlong(RPackage): """This is yet another command-line argument parser which wraps the...
37.791667
77
0.711136
from spack import * class RGetoptlong(RPackage): homepage = "https://cran.rstudio.com/web/packages/GetoptLong/index.html" url = "https://cran.rstudio.com/src/contrib/GetoptLong_0.1.6.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/GetoptLong" version('0.1.6', 'e4b964d0817cb6...
true
true
f7726ce8b474cb465c55abdc64a6798cabd1d874
617
py
Python
aoc_2020/day1.py
akohen/AdventOfCode
ac4194670d8a2af5357cb1f2e1d3f37df1f0a13e
[ "MIT" ]
null
null
null
aoc_2020/day1.py
akohen/AdventOfCode
ac4194670d8a2af5357cb1f2e1d3f37df1f0a13e
[ "MIT" ]
null
null
null
aoc_2020/day1.py
akohen/AdventOfCode
ac4194670d8a2af5357cb1f2e1d3f37df1f0a13e
[ "MIT" ]
null
null
null
from pathlib import Path import sys TEST_MODE = bool(len(sys.argv) > 1 and sys.argv[1] == "test") def phase1(v): return next(v[i]*v[j] for i in range(len(v)) for j in range(i,len(v)) if v[i]+v[j] == 2020) def phase2(v): return next(v[i]*v[j]*v[k] for i in range(len(v)) for j in range(i,len(v)) for k in range...
34.277778
130
0.614263
from pathlib import Path import sys TEST_MODE = bool(len(sys.argv) > 1 and sys.argv[1] == "test") def phase1(v): return next(v[i]*v[j] for i in range(len(v)) for j in range(i,len(v)) if v[i]+v[j] == 2020) def phase2(v): return next(v[i]*v[j]*v[k] for i in range(len(v)) for j in range(i,len(v)) for k in range...
true
true
f7726dcb573007b757276067b9487a05f1e2169c
3,678
py
Python
main1.py
josecope/E06a-Bullets
6947660ecc1fb21a3a9aac22a008d3d9091eae24
[ "MIT" ]
null
null
null
main1.py
josecope/E06a-Bullets
6947660ecc1fb21a3a9aac22a008d3d9091eae24
[ "MIT" ]
null
null
null
main1.py
josecope/E06a-Bullets
6947660ecc1fb21a3a9aac22a008d3d9091eae24
[ "MIT" ]
null
null
null
import sys, logging, os, random, math, open_color, arcade #check to make sure we are running the right version of Python version = (3,7) assert sys.version_info >= version, "This script requires at least Python {0}.{1}".format(version[0],version[1]) #turn on logging, in case we have to leave ourselves debugging messa...
28.734375
112
0.59081
import sys, logging, os, random, math, open_color, arcade version = (3,7) assert sys.version_info >= version, "This script requires at least Python {0}.{1}".format(version[0],version[1]) logging.basicConfig(format='[%(filename)s:%(lineno)d] %(message)s', level=logging.DEBUG) logger = logging.getLogger(__name__) SCRE...
true
true
f7726ef86c155582e38ed25abb1e8889ee724721
1,035
py
Python
app/plugins/module/local.py
venturiscm/hcp
74ad18180822301274daa9218d7bd9fbdb7807f7
[ "Apache-2.0" ]
1
2020-06-22T21:25:52.000Z
2020-06-22T21:25:52.000Z
app/plugins/module/local.py
venturiscm/hcp
74ad18180822301274daa9218d7bd9fbdb7807f7
[ "Apache-2.0" ]
1
2020-05-21T02:46:24.000Z
2020-05-25T07:19:23.000Z
app/plugins/module/local.py
venturiscm/hcp
74ad18180822301274daa9218d7bd9fbdb7807f7
[ "Apache-2.0" ]
null
null
null
from systems.plugins.index import BaseProvider from utility.filesystem import remove_dir import pathlib import os class Provider(BaseProvider('module', 'local')): def initialize_instance(self, instance, created): instance.remote = None instance.reference = 'development' def store_related(s...
30.441176
94
0.659903
from systems.plugins.index import BaseProvider from utility.filesystem import remove_dir import pathlib import os class Provider(BaseProvider('module', 'local')): def initialize_instance(self, instance, created): instance.remote = None instance.reference = 'development' def store_related(s...
true
true
f7726ffcf13140a8acb4db7e8f5c3108d959432a
362
py
Python
openkongqi/exceptions.py
libokj/openkongqi
788d772daca04816236dcedd542d6a4e57e8f3d1
[ "Apache-2.0" ]
null
null
null
openkongqi/exceptions.py
libokj/openkongqi
788d772daca04816236dcedd542d6a4e57e8f3d1
[ "Apache-2.0" ]
null
null
null
openkongqi/exceptions.py
libokj/openkongqi
788d772daca04816236dcedd542d6a4e57e8f3d1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- class OpenKongqiError(Exception): pass class ConfigError(OpenKongqiError): pass class CacheError(OpenKongqiError): pass class SourceError(OpenKongqiError): pass class FeedError(OpenKongqiError): pass class UUIDNotFoundError(OpenKongqiError): pass class APIKe...
12.066667
43
0.729282
class OpenKongqiError(Exception): pass class ConfigError(OpenKongqiError): pass class CacheError(OpenKongqiError): pass class SourceError(OpenKongqiError): pass class FeedError(OpenKongqiError): pass class UUIDNotFoundError(OpenKongqiError): pass class APIKeyNotFoundError(OpenKongq...
true
true
f7727054e2384476c17c8db75cb76a83547a1dae
9,516
py
Python
models/breast_cycle_gan/data_provider.py
BreastGAN/experiment2
2a1d15c1f479bbd6ca58af4e3b1379bf34b89f51
[ "Apache-2.0" ]
4
2018-12-05T21:40:30.000Z
2022-01-09T11:12:57.000Z
models/breast_cycle_gan/data_provider.py
BreastGAN/experiment2
2a1d15c1f479bbd6ca58af4e3b1379bf34b89f51
[ "Apache-2.0" ]
2
2021-01-31T12:14:14.000Z
2022-02-09T23:29:31.000Z
models/breast_cycle_gan/data_provider.py
BreastGAN/experiment2
2a1d15c1f479bbd6ca58af4e3b1379bf34b89f51
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Lukas Jendele and Ondrej Skopek. # Adapted from The TensorFlow Authors, under the ASL 2.0. # # 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/licen...
41.017241
117
0.663514
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf import resources.synthetic_data as synth_data def normalize_image(image, img_size): image = tf.expand_dims(image, axis=-1) image = tf.image.crop_to_bounding...
true
true
f7727166f5a18896417bc1f298ca59ef0d5a9541
2,235
py
Python
add_dependency_overrides.py
kalluriramkumar/at_server
6c8aedcafb5d9c473307aca387039112870ff9cf
[ "BSD-3-Clause" ]
2
2021-11-20T00:30:39.000Z
2021-11-20T00:41:03.000Z
add_dependency_overrides.py
kalluriramkumar/at_server
6c8aedcafb5d9c473307aca387039112870ff9cf
[ "BSD-3-Clause" ]
null
null
null
add_dependency_overrides.py
kalluriramkumar/at_server
6c8aedcafb5d9c473307aca387039112870ff9cf
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python3 """ Accepts path to dependency-overrides.yaml file in the project as argument. If dependencies are specified in dependency-overrides.yaml, adds the dependencies to dependency_overrides section in pubspec.yaml This is file is used in GITHub actions to resolve dependencies. """ import argparse import r...
36.639344
117
0.732886
import argparse import ruamel.yaml from os import path, stat parser = argparse.ArgumentParser() parser.add_argument("-p", "--path") project_path = parser.parse_args().path if not project_path.endswith('/'): project_path = project_path + '/' def main(): if not path.exists(project_path + 'dependency-overr...
true
true
f77271b1494fcc8d841dc721f3e011cd1c89a101
2,393
py
Python
backend/ddd_29343/urls.py
crowdbotics-apps/ddd-29343
cfa52ecb37296fe92150890ab327ab053b58c961
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/ddd_29343/urls.py
crowdbotics-apps/ddd-29343
cfa52ecb37296fe92150890ab327ab053b58c961
[ "FTL", "AML", "RSA-MD" ]
34
2021-08-08T13:32:43.000Z
2022-03-13T15:33:04.000Z
backend/ddd_29343/urls.py
crowdbotics-apps/ddd-29343
cfa52ecb37296fe92150890ab327ab053b58c961
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""ddd_29343 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-bas...
35.191176
87
0.705809
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from allauth.account.views import confirm_email from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi urlpatterns = [ path("",...
true
true
f77271f4e11871443104d23acb5c099caf3cf740
7,139
py
Python
thyristor/half-wave-converter-RL.py
Leandro-Bertoluzzi/pyspice-power-electronics
960494b23e36c0fac61289744a64c991d62784a2
[ "MIT" ]
null
null
null
thyristor/half-wave-converter-RL.py
Leandro-Bertoluzzi/pyspice-power-electronics
960494b23e36c0fac61289744a64c991d62784a2
[ "MIT" ]
null
null
null
thyristor/half-wave-converter-RL.py
Leandro-Bertoluzzi/pyspice-power-electronics
960494b23e36c0fac61289744a64c991d62784a2
[ "MIT" ]
null
null
null
#r# ============================================ #r# Controlled half-wave rectifier with an SCR #r# ============================================ #r# This example shows the simulation of a controlled half-wave rectifier with an SCR with an RL load ######################################### IMPORT MODULES #############...
34.995098
175
0.514498
import matplotlib.pyplot as plt import numpy from scipy.fft import fft, fftfreq import sys sys.path.insert(1, '../utilities/') from utilities import format_output import PySpice.Logging.Logging as Logging logger = Logging.setup_logging() from PySpice.Probe.Plot import plot from PySpice.Spice.Library import Spi...
true
true
f7727210148c6557e5810acbcfac48a48b261f03
28,100
py
Python
venv/Lib/site-packages/sklearn/inspection/tests/test_partial_dependence.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
7
2021-01-30T17:42:00.000Z
2022-01-09T08:08:48.000Z
venv/Lib/site-packages/sklearn/inspection/tests/test_partial_dependence.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
29
2021-03-04T02:56:48.000Z
2021-04-06T04:06:45.000Z
venv/Lib/site-packages/sklearn/inspection/tests/test_partial_dependence.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
12
2021-02-05T20:33:04.000Z
2022-02-17T04:11:25.000Z
""" Testing for the partial dependence module. """ import numpy as np import pytest import sklearn from sklearn.inspection import partial_dependence from sklearn.inspection._partial_dependence import ( _grid_from_X, _partial_dependence_brute, _partial_dependence_recursion ) from sklearn.ensemble import Gr...
38.973648
79
0.677865
import numpy as np import pytest import sklearn from sklearn.inspection import partial_dependence from sklearn.inspection._partial_dependence import ( _grid_from_X, _partial_dependence_brute, _partial_dependence_recursion ) from sklearn.ensemble import GradientBoostingClassifier from sklearn.ensemble impo...
true
true
f77272c79265aca46551a87f5395b03215e552e8
37,758
py
Python
instances/passenger_demand/pas-20210421-2109-int12e/28.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int12e/28.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
instances/passenger_demand/pas-20210421-2109-int12e/28.py
LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure
bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11
[ "BSD-3-Clause" ]
null
null
null
""" PASSENGERS """ numPassengers = 2878 passenger_arriving = ( (2, 9, 4, 1, 1, 0, 6, 7, 6, 7, 2, 0), # 0 (3, 5, 5, 2, 5, 0, 5, 6, 5, 1, 1, 0), # 1 (2, 11, 10, 3, 3, 0, 6, 3, 1, 4, 0, 0), # 2 (4, 2, 5, 3, 4, 0, 5, 10, 7, 5, 2, 0), # 3 (3, 12, 11, 1, 4, 0, 4, 8, 3, 3, 3, 0), # 4 (0, 12, 6, 3, 3, 0, 4, 3, 3,...
112.710448
213
0.728164
numPassengers = 2878 passenger_arriving = ( (2, 9, 4, 1, 1, 0, 6, 7, 6, 7, 2, 0), (3, 5, 5, 2, 5, 0, 5, 6, 5, 1, 1, 0), (2, 11, 10, 3, 3, 0, 6, 3, 1, 4, 0, 0), (4, 2, 5, 3, 4, 0, 5, 10, 7, 5, 2, 0), (3, 12, 11, 1, 4, 0, 4, 8, 3, 3, 3, 0), (0, 12, 6, 3, 3, 0, 4, 3, 3, 2, 2, 0), (5, 9, 5, 4, 2, 0, 5, 10, 6, 2, ...
true
true
f77276c20794c942deb25a825c69efd6254d17ce
6,377
py
Python
webservices/resources/candidate_aggregates.py
adborden/openFEC
53a0a2b1a56292c5ca8e7a3185832baaed4a63d9
[ "CC0-1.0" ]
null
null
null
webservices/resources/candidate_aggregates.py
adborden/openFEC
53a0a2b1a56292c5ca8e7a3185832baaed4a63d9
[ "CC0-1.0" ]
null
null
null
webservices/resources/candidate_aggregates.py
adborden/openFEC
53a0a2b1a56292c5ca8e7a3185832baaed4a63d9
[ "CC0-1.0" ]
1
2020-03-04T00:21:16.000Z
2020-03-04T00:21:16.000Z
import sqlalchemy as sa from flask_apispec import doc, marshal_with from webservices import args from webservices import utils from webservices import filters from webservices import schemas from webservices.utils import use_kwargs from webservices.common.views import ApiResource from webservices.common import models ...
35.232044
114
0.66536
import sqlalchemy as sa from flask_apispec import doc, marshal_with from webservices import args from webservices import utils from webservices import filters from webservices import schemas from webservices.utils import use_kwargs from webservices.common.views import ApiResource from webservices.common import models ...
true
true
f77276ffe31709b11ff3c0a347c6ee0414b29b5c
1,250
py
Python
alphafold/model/prng_test.py
amorehead/alphafold_multimer_non_docker
32f3b81fc4bbc2d8750da27158b42c2412fdfd3f
[ "Apache-2.0" ]
8,110
2021-07-15T17:54:49.000Z
2022-03-31T20:20:00.000Z
alphafold/model/prng_test.py
amorehead/alphafold_multimer_non_docker
32f3b81fc4bbc2d8750da27158b42c2412fdfd3f
[ "Apache-2.0" ]
404
2021-07-15T18:35:07.000Z
2022-03-31T13:55:41.000Z
alphafold/model/prng_test.py
amorehead/alphafold_multimer_non_docker
32f3b81fc4bbc2d8750da27158b42c2412fdfd3f
[ "Apache-2.0" ]
1,305
2021-07-15T18:18:45.000Z
2022-03-31T04:58:03.000Z
# Copyright 2021 DeepMind Technologies Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
26.595745
74
0.7312
from absl.testing import absltest from alphafold.model import prng import jax class PrngTest(absltest.TestCase): def test_key_reuse(self): init_key = jax.random.PRNGKey(42) safe_key = prng.SafeKey(init_key) _, safe_key = safe_key.split() raw_key = safe_key.get() self.assertNotEqual(raw_key...
true
true
f772772c662bd25c9197819eb6cc041c22cd0346
13,340
py
Python
trac/mimeview/tests/api.py
exocad/exotrac
c8207efff78d4736745e975abaa359e8bb21ffdb
[ "BSD-3-Clause" ]
null
null
null
trac/mimeview/tests/api.py
exocad/exotrac
c8207efff78d4736745e975abaa359e8bb21ffdb
[ "BSD-3-Clause" ]
null
null
null
trac/mimeview/tests/api.py
exocad/exotrac
c8207efff78d4736745e975abaa359e8bb21ffdb
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2013 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consi...
36.648352
79
0.612819
import doctest import unittest from StringIO import StringIO from genshi import Stream, Namespace from genshi.core import Attrs, TEXT, START, END from genshi.input import HTMLParser import trac.tests.compat from trac.core import Component, implements from trac.test import EnvironmentStub from trac.mimeview import ap...
true
true
f772773a7d59c504967e62e98093f1ad92c697f7
679
py
Python
section_2/lesson_2_step_3_drop_list.py
aderny-twc/selenium_and_python
ff18cf38bd7c266adbb37cf894548f54b1bf4633
[ "MIT" ]
null
null
null
section_2/lesson_2_step_3_drop_list.py
aderny-twc/selenium_and_python
ff18cf38bd7c266adbb37cf894548f54b1bf4633
[ "MIT" ]
null
null
null
section_2/lesson_2_step_3_drop_list.py
aderny-twc/selenium_and_python
ff18cf38bd7c266adbb37cf894548f54b1bf4633
[ "MIT" ]
null
null
null
from selenium import webdriver import time import math # LINK = 'https://suninjuly.github.io/selects1.html' LINK = 'https://suninjuly.github.io/selects2.html' def calc_sum(num1, num2): return num1 + num2 try: browser = webdriver.Chrome() browser.get(LINK) num1 = browser.find_element_by_id('num1')....
21.903226
71
0.706922
from selenium import webdriver import time import math LINK = 'https://suninjuly.github.io/selects2.html' def calc_sum(num1, num2): return num1 + num2 try: browser = webdriver.Chrome() browser.get(LINK) num1 = browser.find_element_by_id('num1').text num2 = browser.find_element_by_id('num2').te...
true
true
f772774c3daa9c18a2a8387a7978bbdd97f47254
200
py
Python
venv/Scripts/django-admin.py
CaptainKryuk/django-REST-tasking
0df52aff0b9719c2cb204baa0cdc04a301df6b75
[ "MIT" ]
null
null
null
venv/Scripts/django-admin.py
CaptainKryuk/django-REST-tasking
0df52aff0b9719c2cb204baa0cdc04a301df6b75
[ "MIT" ]
null
null
null
venv/Scripts/django-admin.py
CaptainKryuk/django-REST-tasking
0df52aff0b9719c2cb204baa0cdc04a301df6b75
[ "MIT" ]
null
null
null
#!c:\users\kryukax1\documents\github\react_django\django-rest-tasking\venv\scripts\python.exe from django.core import management if __name__ == "__main__": management.execute_from_command_line()
33.333333
93
0.805
from django.core import management if __name__ == "__main__": management.execute_from_command_line()
true
true
f7727782968ef8e51e0651c798af03ed94d5f249
40,919
py
Python
nmigen/back/rtlil.py
jeanthom/nmigen
e40253fbb86ab60cca1e80523ad29a88ccbd41ad
[ "BSD-2-Clause" ]
null
null
null
nmigen/back/rtlil.py
jeanthom/nmigen
e40253fbb86ab60cca1e80523ad29a88ccbd41ad
[ "BSD-2-Clause" ]
null
null
null
nmigen/back/rtlil.py
jeanthom/nmigen
e40253fbb86ab60cca1e80523ad29a88ccbd41ad
[ "BSD-2-Clause" ]
null
null
null
import io import textwrap from collections import defaultdict, OrderedDict from contextlib import contextmanager from .._utils import bits_for, flatten from ..hdl import ast, rec, ir, mem, xfrm __all__ = ["convert", "convert_fragment"] class ImplementationLimit(Exception): pass _escape_map = str.maketrans({ ...
38.639282
99
0.56128
import io import textwrap from collections import defaultdict, OrderedDict from contextlib import contextmanager from .._utils import bits_for, flatten from ..hdl import ast, rec, ir, mem, xfrm __all__ = ["convert", "convert_fragment"] class ImplementationLimit(Exception): pass _escape_map = str.maketrans({ ...
true
true
f772782cf8f4aea73a661692ec2f9a762308ed9e
7,401
py
Python
custom_utils.py
masc-it/CVLAB
9c6e25a800b532a440c660e10ea001c699da68f1
[ "MIT" ]
null
null
null
custom_utils.py
masc-it/CVLAB
9c6e25a800b532a440c660e10ea001c699da68f1
[ "MIT" ]
null
null
null
custom_utils.py
masc-it/CVLAB
9c6e25a800b532a440c660e10ea001c699da68f1
[ "MIT" ]
null
null
null
from __future__ import annotations import glfw import pygame import OpenGL.GL as gl from PIL import Image import os, json from copy import deepcopy from components.data import BBox, ImageInfo def yolo_to_x0y0(yolo_pred, input_w, input_h): # yolo_x = (x+(w/2))/img_w # x_c = (yolo_x) * img_w - (w/2) # yol...
31.360169
119
0.629645
from __future__ import annotations import glfw import pygame import OpenGL.GL as gl from PIL import Image import os, json from copy import deepcopy from components.data import BBox, ImageInfo def yolo_to_x0y0(yolo_pred, input_w, input_h): bbox_w = yolo_pred[2] * input_w bbox_h = yo...
true
true
f77278af5effaf54dd8ed5808dad576b9bd21d71
55,410
py
Python
base/site-packages/androguard/core/bytecodes/apk.py
edisonlz/fastor
342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3
[ "Apache-2.0" ]
285
2019-12-23T09:50:21.000Z
2021-12-08T09:08:49.000Z
base/site-packages/androguard/core/bytecodes/apk.py
jeckun/fastor
342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3
[ "Apache-2.0" ]
null
null
null
base/site-packages/androguard/core/bytecodes/apk.py
jeckun/fastor
342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3
[ "Apache-2.0" ]
9
2019-12-23T12:59:25.000Z
2022-03-15T05:12:11.000Z
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
32.252619
283
0.545696
from androguard.core import bytecode from androguard.core import androconf from androguard.core.bytecodes.dvm_permissions import DVM_PERMISSIONS import StringIO from struct import pack, unpack from xml.sax.saxutils import escape from zlib import crc32 import re from xml.dom import minidom ZIPMODULE = 1 import sys...
false
true
f77278bf956004fb5322392ec35ee12a9c0afe1e
4,638
py
Python
tools/flags/list_flags.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
tools/flags/list_flags.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
tools/flags/list_flags.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
#!/usr/bin/env python3 # Copyright 2019 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. """Emits a formatted, optionally filtered view of the list of flags. """ from __future__ import print_function import argparse impor...
29.35443
80
0.668176
from __future__ import print_function import argparse import os import re import sys ROOT_PATH = os.path.join(os.path.dirname(__file__), '..', '..') PYJSON5_PATH = os.path.join(ROOT_PATH, 'third_party', 'pyjson5', 'src') DEPOT_TOOLS_PATH = os.path.join(ROOT_PATH, 'third_party', 'depot_tools') sys.path.append(PYJSO...
true
true
f7727bae430a7be7d295af1c019926ea2ffbda8f
1,014
py
Python
redhawk/scripts/listfiles.py
spranesh/Redhawk
e2be5a6553df8449acecee2239b60c7bca0f22bc
[ "BSD-2-Clause-FreeBSD" ]
2
2016-10-04T11:46:32.000Z
2017-07-09T15:23:55.000Z
redhawk/scripts/listfiles.py
spranesh/Redhawk
e2be5a6553df8449acecee2239b60c7bca0f22bc
[ "BSD-2-Clause-FreeBSD" ]
4
2016-03-07T13:16:48.000Z
2018-03-21T00:25:04.000Z
redhawk/scripts/listfiles.py
spranesh/Redhawk
e2be5a6553df8449acecee2239b60c7bca0f22bc
[ "BSD-2-Clause-FreeBSD" ]
3
2016-04-06T08:04:34.000Z
2020-03-17T20:59:47.000Z
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function from . import script_util as S import redhawk import redhawk.utils.key_value_store as KVStore import redhawk.utils.util as U import os import optparse usage = "%prog listfiles" description = S.MakeStringFromTemplate( ""...
27.405405
71
0.760355
from __future__ import absolute_import from __future__ import print_function from . import script_util as S import redhawk import redhawk.utils.key_value_store as KVStore import redhawk.utils.util as U import os import optparse usage = "%prog listfiles" description = S.MakeStringFromTemplate( """List the files in the...
true
true
f7727bbcbca8c71b75da82fd2a345e17e1664ee8
718
py
Python
scripts/df_visualization.py
yienxu/counting-strokes-in-chinese-characters
6b8d532b78ec37842c4cf028a48271c6bb735cbf
[ "MIT" ]
4
2019-03-18T07:36:10.000Z
2020-02-06T02:15:43.000Z
scripts/df_visualization.py
yienxu/counting-strokes-in-chinese-characters
6b8d532b78ec37842c4cf028a48271c6bb735cbf
[ "MIT" ]
null
null
null
scripts/df_visualization.py
yienxu/counting-strokes-in-chinese-characters
6b8d532b78ec37842c4cf028a48271c6bb735cbf
[ "MIT" ]
3
2019-01-17T23:40:56.000Z
2020-12-17T09:12:52.000Z
import numpy as np import pandas as pd from matplotlib import pyplot as plt df = pd.read_csv('data/dataset.csv', encoding='utf-8') def plot_df_counts(df): x_ticks = np.asarray(list(set(df['count']))) xx = np.arange(np.max(x_ticks) + 1) yy = np.bincount(df['count']) for x, y in zip(xx, yy): p...
24.758621
79
0.600279
import numpy as np import pandas as pd from matplotlib import pyplot as plt df = pd.read_csv('data/dataset.csv', encoding='utf-8') def plot_df_counts(df): x_ticks = np.asarray(list(set(df['count']))) xx = np.arange(np.max(x_ticks) + 1) yy = np.bincount(df['count']) for x, y in zip(xx, yy): p...
true
true
f7727d2ecf3a7b22ae3fd68ca5be774a67cf80e2
3,456
py
Python
keystone/tests/unit/credential/test_backend_sql.py
ilay09/keystone
e45049dfd46ab7d3e4c6aa48a3046f622f4a3b1e
[ "Apache-2.0" ]
null
null
null
keystone/tests/unit/credential/test_backend_sql.py
ilay09/keystone
e45049dfd46ab7d3e4c6aa48a3046f622f4a3b1e
[ "Apache-2.0" ]
1
2019-08-18T09:25:49.000Z
2019-08-18T09:25:49.000Z
keystone/tests/unit/credential/test_backend_sql.py
ilay09/keystone
e45049dfd46ab7d3e4c6aa48a3046f622f4a3b1e
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
37.565217
79
0.67853
import uuid from six.moves import range import keystone.conf from keystone.credential.providers import fernet as credential_provider from keystone.tests import unit from keystone.tests.unit import default_fixtures from keystone.tests.unit import ksfixtures from keystone.tests.unit.ksfixtures import database CONF =...
true
true
f7727e3bdaed02e3594ee05aa04924f71861d8b8
19,880
py
Python
bots/smt/kb.py
mhashas/intelligent-systems
a108887fa5b13bbc2343423f21a94ca20093ae5a
[ "MIT" ]
3
2017-01-13T13:09:49.000Z
2018-01-10T01:10:13.000Z
bots/smt/kb.py
mhashas/intelligent-systems
a108887fa5b13bbc2343423f21a94ca20093ae5a
[ "MIT" ]
8
2016-12-27T22:28:54.000Z
2017-02-01T20:28:08.000Z
bots/smt/kb.py
mhashas/intelligent-systems
a108887fa5b13bbc2343423f21a94ca20093ae5a
[ "MIT" ]
16
2016-12-27T21:28:53.000Z
2019-03-18T14:00:12.000Z
import sys import numpy as np import scipy.optimize as opt class Symbol(object): """ A class representing a single unit in the boolean SAT problem. This can either refer to an atomic boolean, or a constraint based on integer variables """ pass class Boolean(Symbol): def __init__(self, name): ...
27.843137
161
0.557294
import sys import numpy as np import scipy.optimize as opt class Symbol(object): pass class Boolean(Symbol): def __init__(self, name): self.__name = name def name(self): return self.__name def __invert__(self): return _NegBoolean(self) def __eq__(self, other): ...
true
true
f7727e7138afbf185cd309d07dfd6715d9920210
3,111
py
Python
src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
2
2021-03-24T21:06:20.000Z
2021-03-24T21:07:58.000Z
src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
3
2020-05-27T20:16:26.000Z
2020-07-23T19:46:49.000Z
src/vmware/azext_vmware/vendored_sdks/avs_client/_configuration.py
Mannan2812/azure-cli-extensions
e2b34efe23795f6db9c59100534a40f0813c3d95
[ "MIT" ]
5
2020-05-09T17:47:09.000Z
2020-10-01T19:52:06.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.0.6320, generator: {generator}) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # ---------------------------------------...
45.086957
129
0.675988
from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: from typing import Any from azure.core.credentials import TokenCredential VERSION = "unknown" class A...
true
true
f7727f411a0ffa83bd8b7bc37bba54cc5701c94a
1,525
py
Python
polymetis/tests/scripts/5_multithreaded.py
colesbury/fairo
9e50a3aa7369c68c80e84d80abd5fcdee8a9277a
[ "MIT" ]
73
2021-09-14T19:24:45.000Z
2022-03-27T06:43:26.000Z
polymetis/tests/scripts/5_multithreaded.py
colesbury/fairo
9e50a3aa7369c68c80e84d80abd5fcdee8a9277a
[ "MIT" ]
268
2021-09-14T22:40:23.000Z
2022-03-31T23:01:54.000Z
polymetis/tests/scripts/5_multithreaded.py
colesbury/fairo
9e50a3aa7369c68c80e84d80abd5fcdee8a9277a
[ "MIT" ]
20
2021-09-14T19:24:47.000Z
2022-03-30T19:03:44.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time import threading import torch from polymetis import RobotInterface from utils import check_episode_log success = [] exceptions ...
26.754386
84
0.664262
import time import threading import torch from polymetis import RobotInterface from utils import check_episode_log success = [] exceptions = [] def connect_and_send_policy(): try: robot = RobotInterface( ip_address="localhost", ) hz = robot.metadata.hz robot...
true
true
f7727f434b9252abcbf6ade9b22c3f2d4f00eb26
2,935
py
Python
onnxconverter_common/pytracing.py
janjagusch/onnxconverter-common
f44c8f57815e7be9c850fe85b8232360643d271a
[ "MIT" ]
1
2021-07-06T15:40:03.000Z
2021-07-06T15:40:03.000Z
onnxconverter_common/pytracing.py
jcwchen/onnxconverter-common
dd5f2590b4f96fa927c4912a8ffd5f8a90e6be16
[ "MIT" ]
null
null
null
onnxconverter_common/pytracing.py
jcwchen/onnxconverter-common
dd5f2590b4f96fa927c4912a8ffd5f8a90e6be16
[ "MIT" ]
1
2021-02-11T15:26:28.000Z
2021-02-11T15:26:28.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. ########################################################################### from collections import OrderedDict import numpy as np def indent(s): return "\n...
32.611111
94
0.570017
from collections import OrderedDict import numpy as np def indent(s): return "\n".join(" " + line for line in s.split("\n")) class NoPyObjException(Exception): def __init__(self): super().__init__("Tracing object has no associated python object") class TracingObject: def __init__(self, tra...
true
true
f772803bfa08b6a7982f5f60c5f68cb355f04ef9
7,606
py
Python
qa/rpc-tests/test_framework/test_framework.py
presidentielcoin/PresidentielCoin
e1daf729aae1bccd17c1c5034fae8567a49accca
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/test_framework.py
presidentielcoin/PresidentielCoin
e1daf729aae1bccd17c1c5034fae8567a49accca
[ "MIT" ]
null
null
null
qa/rpc-tests/test_framework/test_framework.py
presidentielcoin/PresidentielCoin
e1daf729aae1bccd17c1c5034fae8567a49accca
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Presidentielcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Base class for RPC testing import logging import optparse import os import sys import shutil ...
36.392344
139
0.623587
import logging import optparse import os import sys import shutil import tempfile import traceback from .util import ( initialize_chain, start_nodes, connect_nodes_bi, sync_blocks, sync_mempools, stop_nodes, stop_node, enable_coverage, check_json_precision, initialize_chain_cl...
true
true
f77280534b6a2d81e83a6e34a5be10687a2f8ee5
999
py
Python
neotest/logging/__init__.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
1
2020-10-05T11:01:31.000Z
2020-10-05T11:01:31.000Z
neotest/logging/__init__.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
null
null
null
neotest/logging/__init__.py
neotest-io/neotest
1b195c19295a16548fbd0ac912127b401c9baca4
[ "MIT" ]
null
null
null
# This file is part of Neotest # See http://www.neotest.io for more information # This program is published under the MIT license from .wrapper import LogClientBase, LoggerThread, logging __all__ = ["start", "stop", "getLogger", "getQueue", "LogClientBase"] __logth_instance = None def start(level=logging.PRINT): ...
21.717391
69
0.723724
from .wrapper import LogClientBase, LoggerThread, logging __all__ = ["start", "stop", "getLogger", "getQueue", "LogClientBase"] __logth_instance = None def start(level=logging.PRINT): global __logth_instance if __logth_instance is None: __logth_instance = LoggerThread(level) __logth_instan...
true
true
f7728098d6a6f22cdae18b59edfbd47a8b33444b
3,187
py
Python
setup.py
kkraus14/ucx-py
d252eb8ed7460762f7448c17d248fa5b152b4c8c
[ "BSD-3-Clause" ]
null
null
null
setup.py
kkraus14/ucx-py
d252eb8ed7460762f7448c17d248fa5b152b4c8c
[ "BSD-3-Clause" ]
null
null
null
setup.py
kkraus14/ucx-py
d252eb8ed7460762f7448c17d248fa5b152b4c8c
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. # See file LICENSE for terms. # This file is a copy of what is available in a Cython demo + some additions from __future__ import absolute_import, print_function import os from distutils.sysconfig import get_config_var, get_python_inc from setuptools im...
28.711712
80
0.660496
from __future__ import absolute_import, print_function import os from distutils.sysconfig import get_config_var, get_python_inc from setuptools import find_packages, setup from setuptools.extension import Extension import versioneer try: from Cython.Distutils.build_ext import new_build_ext as build_ext except...
true
true
f77283125b2fa6a8605b546fb879286b37e409bc
1,899
py
Python
src/elopackage/preprocess.py
bf108/elo_package
ec87eba14362ff1de1c4830be2761ef23a32c6e4
[ "MIT" ]
null
null
null
src/elopackage/preprocess.py
bf108/elo_package
ec87eba14362ff1de1c4830be2761ef23a32c6e4
[ "MIT" ]
null
null
null
src/elopackage/preprocess.py
bf108/elo_package
ec87eba14362ff1de1c4830be2761ef23a32c6e4
[ "MIT" ]
null
null
null
import numpy as np import pandas as pd from pathlib import Path from ast import literal_eval def convert_scores_literal(score): try: return literal_eval(score) except: return f'Error: {score}' def pts_diff(row): try: winner_pts = sum(row['winning_team_scores_lst']) loser_...
28.343284
104
0.685097
import numpy as np import pandas as pd from pathlib import Path from ast import literal_eval def convert_scores_literal(score): try: return literal_eval(score) except: return f'Error: {score}' def pts_diff(row): try: winner_pts = sum(row['winning_team_scores_lst']) loser_...
true
true
f77284d5fdddb448f7225024a3fe903f3b89aef1
16
py
Python
cached.py
danniejpt/pycrawl
a3bcc79eed4ed8055565bd7d449422e6a54b8f2e
[ "Apache-2.0" ]
null
null
null
cached.py
danniejpt/pycrawl
a3bcc79eed4ed8055565bd7d449422e6a54b8f2e
[ "Apache-2.0" ]
null
null
null
cached.py
danniejpt/pycrawl
a3bcc79eed4ed8055565bd7d449422e6a54b8f2e
[ "Apache-2.0" ]
null
null
null
total_urls = []
8
15
0.625
total_urls = []
true
true
f77284e57311851aead923b94c2113e7a8f38868
83
py
Python
apps/team/apps.py
alexyushkin/invoicely
12bbefe51bf79e387c7b739819070c3539708878
[ "MIT" ]
23
2020-11-19T19:33:34.000Z
2022-03-02T15:43:08.000Z
project/team/apps.py
giannisdaras/tedxntua2019
0f9ebdb2946cc8da8c44562313be740db8a394ea
[ "MIT" ]
16
2018-11-01T21:42:17.000Z
2019-03-10T16:59:25.000Z
project/team/apps.py
giannisdaras/tedxntua2019
0f9ebdb2946cc8da8c44562313be740db8a394ea
[ "MIT" ]
5
2021-03-08T23:29:27.000Z
2021-12-10T11:39:58.000Z
from django.apps import AppConfig class TeamConfig(AppConfig): name = 'team'
13.833333
33
0.73494
from django.apps import AppConfig class TeamConfig(AppConfig): name = 'team'
true
true