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
08f584b1c475fd1df64269c26382e09478c9c162
2,024
py
Python
config/settings/test.py
slybixi/django-quick-start
6d62355234a105b20ab41fea48c1432df9baf000
[ "MIT" ]
22
2019-04-21T10:37:31.000Z
2020-07-06T23:14:28.000Z
config/settings/test.py
slybixi/django-quick-start
6d62355234a105b20ab41fea48c1432df9baf000
[ "MIT" ]
1
2020-02-07T21:07:14.000Z
2020-08-24T19:30:14.000Z
config/settings/test.py
slybixi/django-quick-start
6d62355234a105b20ab41fea48c1432df9baf000
[ "MIT" ]
60
2019-03-11T16:09:34.000Z
2022-03-26T07:37:02.000Z
""" With these settings, tests run faster. """ from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#debug DEBUG = False # https://docs.djangoproject.com/en/dev/ref/settings/#se...
36.142857
113
0.546443
from .base import * from .base import env DEBUG = False SECRET_KEY = env("DJANGO_SECRET_KEY", default="KUSr4C4bYtZcTGMir53rYW8Akd1f6eQB0DSwPGordcsq8HNTdMqK3uXB0lExgqs8") TEST_RUNNER = "django.test.runner.DiscoverRunner" CACHES = { "default": { "BACKEND": "django.core.cache.backends.locmem.LocMemCache", ...
true
true
08f585f32cdd9131c8dc486e49d43b3175a7e904
1,941
py
Python
docs/conf.py
gsy0911/pyargent
af091b51c89e7cc211488069f495cf1298581040
[ "MIT" ]
null
null
null
docs/conf.py
gsy0911/pyargent
af091b51c89e7cc211488069f495cf1298581040
[ "MIT" ]
4
2021-01-18T12:42:58.000Z
2021-12-10T03:15:22.000Z
docs/conf.py
gsy0911/pyargent
af091b51c89e7cc211488069f495cf1298581040
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
35.290909
79
0.664606
project = 'pyargent' copyright = '2021, gsy0911' author = 'gsy0911' extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon'] templates_path = ['_templates'] exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] html_theme = 'default' html_static_path = ['_static'] master_doc = "index"
true
true
08f58789c814b758ff40d06625a8242db0c5bbc7
14,801
py
Python
tests/functional/testplan/testing/multitest/test_parametrization.py
dobragab/testplan
407ac1dfd33d19753e41235a1f576aeb06118840
[ "Apache-2.0" ]
null
null
null
tests/functional/testplan/testing/multitest/test_parametrization.py
dobragab/testplan
407ac1dfd33d19753e41235a1f576aeb06118840
[ "Apache-2.0" ]
64
2019-04-15T20:56:40.000Z
2021-03-23T01:00:30.000Z
tests/functional/testplan/testing/multitest/test_parametrization.py
dobragab/testplan
407ac1dfd33d19753e41235a1f576aeb06118840
[ "Apache-2.0" ]
null
null
null
import logging import pytest from schema import SchemaError from testplan.testing.multitest import MultiTest, testsuite, testcase from testplan.testing.multitest.base import Categories from testplan.testing.multitest.parametrization import ( ParametrizationError, MAX_METHOD_NAME_LENGTH ) from testplan import Tes...
27.769231
82
0.496318
import logging import pytest from schema import SchemaError from testplan.testing.multitest import MultiTest, testsuite, testcase from testplan.testing.multitest.base import Categories from testplan.testing.multitest.parametrization import ( ParametrizationError, MAX_METHOD_NAME_LENGTH ) from testplan import Tes...
true
true
08f5887c8113a8bb9060d8c7e851d26bc7b82fbd
766
py
Python
aura/config.py
barszcz/beets-aura
623804437d684dd76f38fe09e46456815acaf2b6
[ "MIT" ]
2
2017-01-16T16:57:01.000Z
2021-08-20T08:14:03.000Z
aura/config.py
barszcz/beets-aura
623804437d684dd76f38fe09e46456815acaf2b6
[ "MIT" ]
null
null
null
aura/config.py
barszcz/beets-aura
623804437d684dd76f38fe09e46456815acaf2b6
[ "MIT" ]
null
null
null
class Config(object): DEBUG = False TESTING = False import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # Log file (the directory must exist) APPLICATION_LOG = os.path.join(BASE_DIR, 'log', 'application.log') ACCESS_LOG = os.path.join(BASE_DIR, 'log', 'access.log') EXTRA_...
24.709677
78
0.674935
class Config(object): DEBUG = False TESTING = False import os BASE_DIR = os.path.abspath(os.path.dirname(__file__)) APPLICATION_LOG = os.path.join(BASE_DIR, 'log', 'application.log') ACCESS_LOG = os.path.join(BASE_DIR, 'log', 'access.log') EXTRA_MIMETYPES = { 'audio/flac': '....
true
true
08f58a1a86dbf30cf5adc3ab959bc64a6da0321f
284
py
Python
tests/message_processing/load_fixtures.py
aleph-im/py-aleph
a18beb8b4eba36887ca85054ed2471c3680bdfde
[ "MIT" ]
null
null
null
tests/message_processing/load_fixtures.py
aleph-im/py-aleph
a18beb8b4eba36887ca85054ed2471c3680bdfde
[ "MIT" ]
null
null
null
tests/message_processing/load_fixtures.py
aleph-im/py-aleph
a18beb8b4eba36887ca85054ed2471c3680bdfde
[ "MIT" ]
null
null
null
import json import os from typing import Dict, List from pathlib import Path def load_fixture_messages(fixture: str) -> List[Dict]: fixture_path = Path(__file__).parent / "fixtures" / fixture with open(fixture_path) as f: return json.load(f)["content"]["messages"]
23.666667
63
0.714789
import json import os from typing import Dict, List from pathlib import Path def load_fixture_messages(fixture: str) -> List[Dict]: fixture_path = Path(__file__).parent / "fixtures" / fixture with open(fixture_path) as f: return json.load(f)["content"]["messages"]
true
true
08f58a5b708801c68ae1318061d5eb20b5985014
6,530
py
Python
game/content/__init__.py
marblexu/gearhead-caramel
8bf4572aefb5f3a1bafd20ad04dfa0b2f44be8b1
[ "Apache-2.0" ]
null
null
null
game/content/__init__.py
marblexu/gearhead-caramel
8bf4572aefb5f3a1bafd20ad04dfa0b2f44be8b1
[ "Apache-2.0" ]
null
null
null
game/content/__init__.py
marblexu/gearhead-caramel
8bf4572aefb5f3a1bafd20ad04dfa0b2f44be8b1
[ "Apache-2.0" ]
1
2022-02-24T13:23:01.000Z
2022-02-24T13:23:01.000Z
import collections from pbge.plots import PlotError import pbge import gears from .. import exploration import ghterrain import ghwaypoints import ghcutscene import uuid # The list of plots will be stored as a dictionary based on label. PLOT_LIST = collections.defaultdict( list ) UNSORTED_PLOT_LIST = list() CARDS_B...
40.308642
135
0.597397
import collections from pbge.plots import PlotError import pbge import gears from .. import exploration import ghterrain import ghwaypoints import ghcutscene import uuid PLOT_LIST = collections.defaultdict( list ) UNSORTED_PLOT_LIST = list() CARDS_BY_NAME = dict() class GHNarrativeRequest(pbge.plots.NarrativeRequ...
false
true
08f58a5f5b89f92502893e222cbca3bd07b2432b
86,414
py
Python
tensorflow/contrib/tpu/python/tpu/keras_support.py
dkoes/tensorflow
89c0134fd811a12d8100da385cb9a218247f0933
[ "Apache-2.0" ]
1
2019-09-15T09:42:06.000Z
2019-09-15T09:42:06.000Z
tensorflow/contrib/tpu/python/tpu/keras_support.py
dkoes/tensorflow
89c0134fd811a12d8100da385cb9a218247f0933
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/tpu/python/tpu/keras_support.py
dkoes/tensorflow
89c0134fd811a12d8100da385cb9a218247f0933
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
38.508913
112
0.675365
from __future__ import absolute_import from __future__ import division from __future__ import print_function import abc import collections import contextlib import re import sys import time import numpy as np import six from tensorflow.contrib.cluster_resolver.python.training import tpu_cluster_resolver as tpu_clu...
true
true
08f58ccaa304b0a84cfab52c1b4769e7d22fd7d0
2,691
py
Python
manual_tests/manual_test_HDC.py
ahaselsteiner/viroconcom
69b903dabde1de73c85b5648f66523b9c151996e
[ "MIT" ]
14
2021-06-02T17:03:28.000Z
2022-02-23T16:19:53.000Z
manual_tests/manual_test_HDC.py
virocon-organization/viroconcom
186d768a7f39788b827173467febb038044199c7
[ "MIT" ]
65
2018-10-09T16:22:14.000Z
2021-05-21T15:06:26.000Z
manual_tests/manual_test_HDC.py
virocon-organization/viroconcom
186d768a7f39788b827173467febb038044199c7
[ "MIT" ]
7
2018-10-16T19:23:26.000Z
2021-03-16T11:50:22.000Z
import numpy as np import matplotlib.pyplot as plt from virocon import ( WeibullDistribution, LogNormalDistribution, GlobalHierarchicalModel, DependenceFunction, calculate_alpha, HighestDensityContour, ) def _power3(x, a=0.1000, b=1.489, c=0.1901): return a + b * x ** c # A 3-parameter ...
25.875
79
0.719435
import numpy as np import matplotlib.pyplot as plt from virocon import ( WeibullDistribution, LogNormalDistribution, GlobalHierarchicalModel, DependenceFunction, calculate_alpha, HighestDensityContour, ) def _power3(x, a=0.1000, b=1.489, c=0.1901): return a + b * x ** c def _exp3(x, a=0...
true
true
08f58d3ef8fde6e15e6fe22abb9e4bceda907e75
69,453
py
Python
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models.py
YingXue/azure-cli-extensions
30086b7fe22ed591daaae9019920db6c16aef9de
[ "MIT" ]
1
2020-09-16T03:47:44.000Z
2020-09-16T03:47:44.000Z
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models.py
YingXue/azure-cli-extensions
30086b7fe22ed591daaae9019920db6c16aef9de
[ "MIT" ]
null
null
null
src/spring-cloud/azext_spring_cloud/vendored_sdks/appplatform/models/_models.py
YingXue/azure-cli-extensions
30086b7fe22ed591daaae9019920db6c16aef9de
[ "MIT" ]
1
2019-05-02T00:55:30.000Z
2019-05-02T00:55:30.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
36.042034
112
0.644609
from msrest.serialization import Model from msrest.exceptions import HttpOperationError class Resource(Model): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, ...
true
true
08f58d762efec0186a9f33d30033eeea53b15652
4,150
py
Python
Adafruit_BluefruitLE/interfaces/gatt.py
machine-max/Adafruit_Python_BluefruitLE
ee1cd66df43022c831ea48a14a2c45ecdd90191e
[ "MIT" ]
null
null
null
Adafruit_BluefruitLE/interfaces/gatt.py
machine-max/Adafruit_Python_BluefruitLE
ee1cd66df43022c831ea48a14a2c45ecdd90191e
[ "MIT" ]
null
null
null
Adafruit_BluefruitLE/interfaces/gatt.py
machine-max/Adafruit_Python_BluefruitLE
ee1cd66df43022c831ea48a14a2c45ecdd90191e
[ "MIT" ]
null
null
null
# Base classes for BLE GATT services, characteristics, and descriptors. Each # OS supported by the library should inherit from these classes and implement # the abstract methods. # Author: Tony DiCola # # Copyright (c) 2015 Adafruit Industries # # Permission is hereby granted, free of charge, to any person obtaining a...
36.086957
81
0.699518
import abc from builtins import object from future.utils import with_metaclass class GattService(with_metaclass(abc.ABCMeta, object)): @abc.abstractproperty def uuid(self): raise NotImplementedError @abc.abstractmethod def list_characteristics(self): raise NotImplementedError def...
true
true
08f58d99d0088a7f396be90c5e6954b23f67abdb
433
py
Python
module03/ex/ex078.py
LauroHBrant/python-course
2154181ca4b684b0d1fa635706bcb1647a753bc3
[ "MIT" ]
2
2021-01-07T23:59:36.000Z
2021-01-18T00:23:52.000Z
module03/ex/ex078.py
LauroHBrant/python-course
2154181ca4b684b0d1fa635706bcb1647a753bc3
[ "MIT" ]
null
null
null
module03/ex/ex078.py
LauroHBrant/python-course
2154181ca4b684b0d1fa635706bcb1647a753bc3
[ "MIT" ]
null
null
null
numbers = [] posbetter = [] poslower = [] for c in range(0, 5): numbers.append(float(input('Type a number: '))) for pos, value in enumerate(numbers): if value == max(numbers): posbetter.append(pos) if value == min(numbers): poslower.append(pos) print(f'The better number typed was {max(number...
33.307692
80
0.667436
numbers = [] posbetter = [] poslower = [] for c in range(0, 5): numbers.append(float(input('Type a number: '))) for pos, value in enumerate(numbers): if value == max(numbers): posbetter.append(pos) if value == min(numbers): poslower.append(pos) print(f'The better number typed was {max(number...
true
true
08f58da80343e8417f0eed24a1a156d6956ac892
7,975
py
Python
cmdb-api/api/lib/perm/acl/role.py
kdyq007/cmdb
d5d1d1506ab35714ca73b8aed0067232d2266c0c
[ "MIT" ]
null
null
null
cmdb-api/api/lib/perm/acl/role.py
kdyq007/cmdb
d5d1d1506ab35714ca73b8aed0067232d2266c0c
[ "MIT" ]
1
2019-11-19T13:52:16.000Z
2019-11-19T13:52:16.000Z
cmdb-api/api/lib/perm/acl/role.py
kdyq007/cmdb
d5d1d1506ab35714ca73b8aed0067232d2266c0c
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- import six from flask import abort from api.extensions import db from api.lib.perm.acl.cache import RoleCache from api.lib.perm.acl.cache import RoleRelationCache from api.lib.perm.acl.const import ACL_QUEUE from api.models.acl import Resource from api.models.acl import ResourceGroupItems from...
34.825328
119
0.649781
import six from flask import abort from api.extensions import db from api.lib.perm.acl.cache import RoleCache from api.lib.perm.acl.cache import RoleRelationCache from api.lib.perm.acl.const import ACL_QUEUE from api.models.acl import Resource from api.models.acl import ResourceGroupItems from api.models.acl import ...
true
true
08f590d506947184f9d1d49a142f4c30f810fa1f
7,636
py
Python
interfaces/python/bable_interface/flatbuffers_functions.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
13
2018-07-04T16:35:37.000Z
2021-03-03T10:41:07.000Z
interfaces/python/bable_interface/flatbuffers_functions.py
iotile/baBLE
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
11
2018-06-01T20:32:32.000Z
2019-01-21T17:03:47.000Z
interfaces/python/bable_interface/flatbuffers_functions.py
iotile/baBLE-linux
faedca2c70b7fe91ea8ae0c3d8aff6bf843bd9db
[ "MIT" ]
null
null
null
import inspect import logging import flatbuffers from builtins import int # pylint:disable=unused-import from .BaBLE import Packet, Payload, Model, BaBLEError, CancelConnection, Characteristic, Connect, Controller, \ ControllerAdded, ControllerRemoved, Device, DeviceConnected, DeviceDisconnected, DeviceFound, Disc...
35.682243
118
0.630566
import inspect import logging import flatbuffers from builtins import int from .BaBLE import Packet, Payload, Model, BaBLEError, CancelConnection, Characteristic, Connect, Controller, \ ControllerAdded, ControllerRemoved, Device, DeviceConnected, DeviceDisconnected, DeviceFound, Disconnect, \ EmitNotification,...
true
true
08f591503ecf9cbd892119591844d70589feb1af
11,490
py
Python
install.py
roopkeed/oscar
65d4c4bd8816c3b0b19c05eb80d2bbedc73034c9
[ "MIT" ]
1
2020-01-14T15:41:30.000Z
2020-01-14T15:41:30.000Z
install.py
CloCkWeRX/oscar
e0916ebd976d70fbd7bfff7f94f7386019419305
[ "MIT" ]
null
null
null
install.py
CloCkWeRX/oscar
e0916ebd976d70fbd7bfff7f94f7386019419305
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Initial setup script for Oscar. Run it on the device where Oscar will be running. https://github.com/danslimmon/oscar""" import os import sys import subprocess import re def run_command(command): p = subprocess.Popen(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) ...
35.572755
138
0.659008
"""Initial setup script for Oscar. Run it on the device where Oscar will be running. https://github.com/danslimmon/oscar""" import os import sys import subprocess import re def run_command(command): p = subprocess.Popen(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) for line in iter(p.s...
false
true
08f591527dc1da7a3f6e09c220097c151e631f01
2,321
py
Python
tests/unit/test_tap.py
Tingesplatform/tokenomics
b541a54b1709a1282c5133e731b26a6ca05ac901
[ "MIT" ]
2
2021-01-12T04:44:06.000Z
2022-03-15T23:34:41.000Z
tests/unit/test_tap.py
Tingesplatform/tokenomics
b541a54b1709a1282c5133e731b26a6ca05ac901
[ "MIT" ]
5
2019-01-14T07:17:34.000Z
2021-06-01T23:38:58.000Z
tests/unit/test_tap.py
Tingesplatform/tokenomics
b541a54b1709a1282c5133e731b26a6ca05ac901
[ "MIT" ]
2
2019-01-11T17:07:48.000Z
2022-03-03T17:26:41.000Z
from datetime import datetime, timedelta from unittest.mock import Mock import pytest from models.dao import Tap @pytest.fixture def bucket(): return Mock() @pytest.fixture def tap(account, bucket): return Tap( description='Test tap', withdrawer=account, bucket=bucket, rate=...
23.927835
74
0.709177
from datetime import datetime, timedelta from unittest.mock import Mock import pytest from models.dao import Tap @pytest.fixture def bucket(): return Mock() @pytest.fixture def tap(account, bucket): return Tap( description='Test tap', withdrawer=account, bucket=bucket, rate=...
true
true
08f5918f71c36d2c634737a6d719f1411e266272
6,461
py
Python
cspatients/tests/constants.py
praekeltfoundation/Momkhulu
31b397917fb6d135f5c184ef2ab2c15af02dbdb9
[ "BSD-3-Clause" ]
null
null
null
cspatients/tests/constants.py
praekeltfoundation/Momkhulu
31b397917fb6d135f5c184ef2ab2c15af02dbdb9
[ "BSD-3-Clause" ]
90
2018-07-09T12:16:03.000Z
2019-07-22T09:13:17.000Z
cspatients/tests/constants.py
praekeltfoundation/Momkhulu
31b397917fb6d135f5c184ef2ab2c15af02dbdb9
[ "BSD-3-Clause" ]
null
null
null
SAMPLE_RP_POST_DATA = { "results": { "surname": {"category": "All Responses", "value": "Doe", "input": "Doe"}, "decision_time": { "category": "All Responses", "value": "2019-05-12 12:22+02:00", "input": "2019-05-12 12:22+02:00", }, "option": {"cate...
33.304124
88
0.484445
SAMPLE_RP_POST_DATA = { "results": { "surname": {"category": "All Responses", "value": "Doe", "input": "Doe"}, "decision_time": { "category": "All Responses", "value": "2019-05-12 12:22+02:00", "input": "2019-05-12 12:22+02:00", }, "option": {"cate...
true
true
08f5923c17245da5506e874a82b338e1d9eb5d83
19,661
py
Python
Lib/distutils/tests/test_build_ext.py
tizenorg/platform.upstream.python
d4d089c4ff46d38de9986fa59a07ffb5a57db631
[ "PSF-2.0" ]
null
null
null
Lib/distutils/tests/test_build_ext.py
tizenorg/platform.upstream.python
d4d089c4ff46d38de9986fa59a07ffb5a57db631
[ "PSF-2.0" ]
null
null
null
Lib/distutils/tests/test_build_ext.py
tizenorg/platform.upstream.python
d4d089c4ff46d38de9986fa59a07ffb5a57db631
[ "PSF-2.0" ]
null
null
null
import sys import os from StringIO import StringIO import textwrap from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests import support from distutils.errors import (DistutilsSetupError, CompileError, ...
38.475538
83
0.607548
import sys import os from StringIO import StringIO import textwrap from distutils.core import Extension, Distribution from distutils.command.build_ext import build_ext from distutils import sysconfig from distutils.tests import support from distutils.errors import (DistutilsSetupError, CompileError, ...
true
true
08f592b76901f16c4caf356e31e1c14f89eb1c85
11,179
py
Python
Old/main.py
petervanya/DPDsim
ec72d9dfeb0cedb4ff74e76becd1c7fe12dd3bef
[ "MIT" ]
6
2019-03-07T18:47:43.000Z
2021-05-03T17:42:53.000Z
Old/main.py
petervanya/DPDsim
ec72d9dfeb0cedb4ff74e76becd1c7fe12dd3bef
[ "MIT" ]
1
2021-08-22T02:38:59.000Z
2021-09-09T09:40:58.000Z
Old/main.py
petervanya/DPDsim
ec72d9dfeb0cedb4ff74e76becd1c7fe12dd3bef
[ "MIT" ]
3
2019-12-25T15:06:36.000Z
2021-08-02T07:18:31.000Z
#!/usr/bin/env python """ Library to perform DPD simulations pv278@cam.ac.uk, 02/07/15 """ import numpy as np from numpy.linalg import norm from math import sqrt import matplotlib.pyplot as plt ##### global constants kB = 1.0 gamma = 1.0 class Particle: """Contains properties of one particle: position, v...
30.051075
86
0.514357
""" Library to perform DPD simulations pv278@cam.ac.uk, 02/07/15 """ import numpy as np from numpy.linalg import norm from math import sqrt import matplotlib.pyplot as plt kB = 1.0 gamma = 1.0 class Particle: """Contains properties of one particle: position, velocity & type""" def __init__(self, pos=...
false
true
08f593a9f849dfa6837962e6ff8dbb91a9272d8e
17,185
py
Python
villager-bot/cogs/commands/useful.py
Chiruso/Villager-Bot
4801b12241f47a1869a8888a4dd41d7befd8140e
[ "MIT" ]
null
null
null
villager-bot/cogs/commands/useful.py
Chiruso/Villager-Bot
4801b12241f47a1869a8888a4dd41d7befd8140e
[ "MIT" ]
null
null
null
villager-bot/cogs/commands/useful.py
Chiruso/Villager-Bot
4801b12241f47a1869a8888a4dd41d7befd8140e
[ "MIT" ]
null
null
null
from urllib.parse import quote as urlquote from discord.ext import commands, tasks import async_cse import aiohttp import asyncio import discord import psutil import arrow import time from util.ipc import PacketType class BanCacheEntry: __slots__ = ("ban_count", "time") def __init__(self, ban_count: int): ...
38.104213
126
0.597207
from urllib.parse import quote as urlquote from discord.ext import commands, tasks import async_cse import aiohttp import asyncio import discord import psutil import arrow import time from util.ipc import PacketType class BanCacheEntry: __slots__ = ("ban_count", "time") def __init__(self, ban_count: int): ...
true
true
08f593bdb91fca1fb988a4f1966e3a7158fb32cd
1,143
py
Python
userbot/modules/tag_all.py
Necan03/MiamiUserbot
34aa366ce17919a0817937fc96f9b358f69b6f04
[ "Naumen", "Condor-1.1", "MS-PL" ]
2
2021-09-02T00:45:37.000Z
2021-09-02T14:26:14.000Z
userbot/modules/tag_all.py
Necan03/MiamiUserbot
34aa366ce17919a0817937fc96f9b358f69b6f04
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2021-07-07T02:04:58.000Z
2021-07-07T02:04:58.000Z
userbot/modules/tag_all.py
Necan03/MiamiUserbot
34aa366ce17919a0817937fc96f9b358f69b6f04
[ "Naumen", "Condor-1.1", "MS-PL" ]
2
2021-09-02T14:26:17.000Z
2021-10-13T10:10:37.000Z
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """A Plugin to tagall in the chat for @UniBorg and cmd is `.all`""" import re from userbot import CMD_HELP, bot from us...
31.75
82
0.624672
import re from userbot import CMD_HELP, bot from userbot.events import register usernexp = re.compile(r"@(\w{3,32})\[(.+?)\]") nameexp = re.compile(r"\[([\w\S]+)\]\(tg://user\?id=(\d+)\)\[(.+?)\]") @register(outgoing=True, pattern=r"^\.all(?: |$)(.*)", disable_errors=True) async def all(event): if event.fwd_fr...
true
true
08f59472094763c274f7c1101bc43891e7dbab9e
2,628
py
Python
pyvalidator/is_passport_number.py
theteladras/py.validator
624ace7973552c8ac9353f48acbf96ec0ecc24a9
[ "MIT" ]
15
2021-11-01T14:14:56.000Z
2022-03-17T11:52:29.000Z
pyvalidator/is_passport_number.py
theteladras/py.validator
624ace7973552c8ac9353f48acbf96ec0ecc24a9
[ "MIT" ]
1
2022-03-16T13:39:16.000Z
2022-03-17T09:16:00.000Z
pyvalidator/is_passport_number.py
theteladras/py.validator
624ace7973552c8ac9353f48acbf96ec0ecc24a9
[ "MIT" ]
null
null
null
from .utils.Classes.RegEx import RegEx from .utils.assert_string import assert_string passport_regex_by_country_code = { "AM": r"^[A-Z]{2}\d{7}$", # ARMENIA "AR": r"^[A-Z]{3}\d{6}$", # ARGENTINA "AT": r"^[A-Z]\d{7}$", # AUSTRIA "AU": r"^[A-Z]\d{7}$", # AUSTRALIA "BA": r"^[A-Z]\d{7}$", # BOSNIA...
38.086957
69
0.449772
from .utils.Classes.RegEx import RegEx from .utils.assert_string import assert_string passport_regex_by_country_code = { "AM": r"^[A-Z]{2}\d{7}$", "AR": r"^[A-Z]{3}\d{6}$", "AT": r"^[A-Z]\d{7}$", "AU": r"^[A-Z]\d{7}$", "BA": r"^[A-Z]\d{7}$", "BE": r"^[A-Z]{2}\d{6}$", "BG": r"^\d{9}$",...
true
true
08f594d4ca78b61c5d798b503e0c3c94be01cd67
1,922
py
Python
server.py
amirsayonara/SYR-Python-Voice-Talk
c76464050f1302fb39cf7a54afc84b510df0c0b2
[ "MIT" ]
null
null
null
server.py
amirsayonara/SYR-Python-Voice-Talk
c76464050f1302fb39cf7a54afc84b510df0c0b2
[ "MIT" ]
null
null
null
server.py
amirsayonara/SYR-Python-Voice-Talk
c76464050f1302fb39cf7a54afc84b510df0c0b2
[ "MIT" ]
null
null
null
import socket, threading class Server: def __init__(self, port): self.port = port self._terbuka = 0 def buka(self): if self._terbuka: return try: self._s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._s.bind(('0.0.0.0', self.port)) ex...
29.121212
97
0.468783
import socket, threading class Server: def __init__(self, port): self.port = port self._terbuka = 0 def buka(self): if self._terbuka: return try: self._s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._s.bind(('0.0.0.0', self.port)) ex...
true
true
08f599b6b104dad895067e66858afc6b8c30ec8a
3,326
py
Python
src/cryptoadvance/specter/device_manager.py
coretechs/specter-desktop
7f8ef496af8a33554b1b67105ce0d09c5c705e7b
[ "MIT" ]
null
null
null
src/cryptoadvance/specter/device_manager.py
coretechs/specter-desktop
7f8ef496af8a33554b1b67105ce0d09c5c705e7b
[ "MIT" ]
null
null
null
src/cryptoadvance/specter/device_manager.py
coretechs/specter-desktop
7f8ef496af8a33554b1b67105ce0d09c5c705e7b
[ "MIT" ]
null
null
null
import os import json import logging from .helpers import alias, load_jsons, fslock from .rpc import get_default_datadir from .devices import __all__ as device_classes from .devices.generic import GenericDevice # default device type from .persistence import write_device, delete_json_file logger = logging.getLogger(_...
33.938776
88
0.633494
import os import json import logging from .helpers import alias, load_jsons, fslock from .rpc import get_default_datadir from .devices import __all__ as device_classes from .devices.generic import GenericDevice from .persistence import write_device, delete_json_file logger = logging.getLogger(__name__) def get_dev...
true
true
08f59a68ce04af751e1ceb48cd6903e3343ae600
22
py
Python
dirlist/__init__.py
buczaq/python-packages
9a31446d1b8d2f381667f4c922f6748fb80173ee
[ "MIT" ]
null
null
null
dirlist/__init__.py
buczaq/python-packages
9a31446d1b8d2f381667f4c922f6748fb80173ee
[ "MIT" ]
null
null
null
dirlist/__init__.py
buczaq/python-packages
9a31446d1b8d2f381667f4c922f6748fb80173ee
[ "MIT" ]
null
null
null
from . import dirlist
11
21
0.772727
from . import dirlist
true
true
08f59a975e8dffde10cc842935eeb106321f80ae
6,531
py
Python
GUI/tabs/geometry_tabs_/landing_gear/landing_gear_tab.py
StepLogic/Parametric-Drone-Design-Software
be9c537427f85b08c071c2666712fd32643cd439
[ "Unlicense" ]
7
2021-03-17T01:23:28.000Z
2021-05-06T20:41:21.000Z
GUI/tabs/geometry_tabs_/landing_gear/landing_gear_tab.py
StepLogic/Parametric-Drone-Design-Software
be9c537427f85b08c071c2666712fd32643cd439
[ "Unlicense" ]
null
null
null
GUI/tabs/geometry_tabs_/landing_gear/landing_gear_tab.py
StepLogic/Parametric-Drone-Design-Software
be9c537427f85b08c071c2666712fd32643cd439
[ "Unlicense" ]
null
null
null
from PyQt5.QtWidgets import * from Utils.data_objects.landing_gear_key import * from Utils.database import database from Utils.database.geometry.landing_gear_database import read_landing_gear_values class landing_gear_tab(QWidget): def __init__(self): super().__init__() layout = QFormLayout(self)...
52.248
151
0.679682
from PyQt5.QtWidgets import * from Utils.data_objects.landing_gear_key import * from Utils.database import database from Utils.database.geometry.landing_gear_database import read_landing_gear_values class landing_gear_tab(QWidget): def __init__(self): super().__init__() layout = QFormLayout(self)...
true
true
08f59af513f1a0312093421595778b46bb5572e2
15,848
py
Python
odrive/r80_motor_control.py
packbionics/control-examples
708e387a6e12563f06a737211833998f2f1b48a8
[ "MIT" ]
1
2021-08-22T23:21:10.000Z
2021-08-22T23:21:10.000Z
odrive/r80_motor_control.py
packbionics/control-examples
708e387a6e12563f06a737211833998f2f1b48a8
[ "MIT" ]
null
null
null
odrive/r80_motor_control.py
packbionics/control-examples
708e387a6e12563f06a737211833998f2f1b48a8
[ "MIT" ]
null
null
null
""" R80 KV110 Motor Control for ODrive @author: Jason @date: 11/21/2021 """ import sys import time import odrive import math from odrive.enums import * from odrive.utils import start_liveplotter #from odrive.pyfibre.fibre.protocol import ChannelBrokenException class R80MotorControl: """ Class for configuring...
40.3257
114
0.605439
import sys import time import odrive import math from odrive.enums import * from odrive.utils import start_liveplotter class R80MotorControl: R80_KV = 110.0 MIN_PHASE_INDUCTANCE = 0 MAX_PHASE_INDUCTANCE = 87e-6 MIN_PHASE_RESISTANCE = 0 MAX_PHASE_RESISTANCE = 125e-3 ...
true
true
08f59b4639eec3f1e1f44af5c42708ab10f33608
120,058
py
Python
core/lib/payload/copy.py
duruyi/OnlineSchemaChange
5434cfd17a7fc7be85625f87745c8cb9be674167
[ "BSD-3-Clause" ]
949
2017-05-05T17:15:25.000Z
2022-03-30T19:12:19.000Z
core/lib/payload/copy.py
duruyi/OnlineSchemaChange
5434cfd17a7fc7be85625f87745c8cb9be674167
[ "BSD-3-Clause" ]
31
2017-05-05T23:04:19.000Z
2022-03-04T05:17:19.000Z
core/lib/payload/copy.py
duruyi/OnlineSchemaChange
5434cfd17a7fc7be85625f87745c8cb9be674167
[ "BSD-3-Clause" ]
159
2017-05-05T20:22:15.000Z
2022-03-26T05:47:31.000Z
#!/usr/bin/env python3 """ Copyright (c) 2017-present, Facebook, Inc. All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. """ import glob import logging import os import re import time from copy import deepcopy from threadi...
40.139753
96
0.583568
import glob import logging import os import re import time from copy import deepcopy from threading import Timer from typing import List, Optional, Set import MySQLdb from .. import constant, sql, util from ..error import OSCError from ..hook import wrap_hook from ..sqlparse import ( parse_create, ParseError...
true
true
08f59b4aefa6a378acc15555e4c9db4ae67fc70b
27
py
Python
awesomo.py
buurz-forks/awesomo
31b64812df0600df3b4ab73061c1863e118f2496
[ "CC0-1.0" ]
null
null
null
awesomo.py
buurz-forks/awesomo
31b64812df0600df3b4ab73061c1863e118f2496
[ "CC0-1.0" ]
null
null
null
awesomo.py
buurz-forks/awesomo
31b64812df0600df3b4ab73061c1863e118f2496
[ "CC0-1.0" ]
null
null
null
print("Hello, AWESOME-O!")
13.5
26
0.666667
print("Hello, AWESOME-O!")
true
true
08f59b50b828421d8d70cc04250de39a243c6c73
1,442
py
Python
src/ops/email_ops.py
pybokeh/dagster-examples
459cfbe00585f1d123e49058685c74149efb867d
[ "MIT" ]
null
null
null
src/ops/email_ops.py
pybokeh/dagster-examples
459cfbe00585f1d123e49058685c74149efb867d
[ "MIT" ]
null
null
null
src/ops/email_ops.py
pybokeh/dagster-examples
459cfbe00585f1d123e49058685c74149efb867d
[ "MIT" ]
null
null
null
import pandas as pd from dagster import op, Nothing, String from pathlib import Path import win32com.client as win32 @op( name="email_without_attachments", description="Emails using Outlook account", config_schema={ 'email': String, 'subject': String, 'template_file_nam...
30.041667
84
0.660888
import pandas as pd from dagster import op, Nothing, String from pathlib import Path import win32com.client as win32 @op( name="email_without_attachments", description="Emails using Outlook account", config_schema={ 'email': String, 'subject': String, 'template_file_nam...
true
true
08f59c9164f2971a43ff47235bba39026d04bcdc
625
py
Python
RPNyssSMSEdgeSolution/modules/RaspberrySMSModule/src/main.py
nyss-platform-norcross/nyss-gateway
db8370c5e2baff73fec06955f0c2831630c0204b
[ "MIT" ]
null
null
null
RPNyssSMSEdgeSolution/modules/RaspberrySMSModule/src/main.py
nyss-platform-norcross/nyss-gateway
db8370c5e2baff73fec06955f0c2831630c0204b
[ "MIT" ]
7
2019-10-20T12:37:41.000Z
2021-02-18T16:48:59.000Z
RPNyssSMSEdgeSolution/modules/RaspberrySMSModule/src/main.py
nyss-platform-norcross/nyss-gateway
db8370c5e2baff73fec06955f0c2831630c0204b
[ "MIT" ]
2
2019-10-18T12:50:08.000Z
2019-10-19T09:24:41.000Z
import datetime from smshandling.models import SMS from base import Base from time import sleep from gsm import SmsListener def createDatabase(engine): print('creating database tables') Base.metadata.create_all(engine) from alembic.config import Config from alembic import command alembic_cfg = Conf...
26.041667
51
0.7088
import datetime from smshandling.models import SMS from base import Base from time import sleep from gsm import SmsListener def createDatabase(engine): print('creating database tables') Base.metadata.create_all(engine) from alembic.config import Config from alembic import command alembic_cfg = Conf...
true
true
08f59d5c5f24db7989cf341fac36862b49827076
8,119
py
Python
src/compas/files/xml.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
src/compas/files/xml.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
src/compas/files/xml.py
ricardoavelino/compas
e3c7f004b8839f96bf01f9f6b21a75786c3f59fa
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import xml.etree.ElementTree as ET import compas if not compas.IPY: if sys.version_info[0] >= 3 and sys.version_info[1] >= 8: from compas.files._xml import xml_cpython as xml_impl e...
24.677812
93
0.573593
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import xml.etree.ElementTree as ET import compas if not compas.IPY: if sys.version_info[0] >= 3 and sys.version_info[1] >= 8: from compas.files._xml import xml_cpython as xml_impl e...
true
true
08f59e30168c156371649501c72907fa8fdb24c1
883
py
Python
relumip/interfaces/modeling_interface.py
ChemEngAI/ReLU_ANN_MILP
b89f6128a4d80d63fb8f4d68c420c027c02ff4f7
[ "MIT" ]
23
2021-10-29T23:46:01.000Z
2022-03-11T22:04:05.000Z
relumip/interfaces/modeling_interface.py
process-intelligence-research/ReLU_ANN_MILP
b89f6128a4d80d63fb8f4d68c420c027c02ff4f7
[ "MIT" ]
null
null
null
relumip/interfaces/modeling_interface.py
process-intelligence-research/ReLU_ANN_MILP
b89f6128a4d80d63fb8f4d68c420c027c02ff4f7
[ "MIT" ]
1
2022-01-22T13:01:55.000Z
2022-01-22T13:01:55.000Z
from abc import ABCMeta, abstractmethod class ModelingInterface(metaclass=ABCMeta): """Base class for interface to modeling frameworks. Warning: This class should not be used directly. Use derived classes instead. """ def __init__(self, name: str): self._name = name @staticmethod de...
24.527778
115
0.678369
from abc import ABCMeta, abstractmethod class ModelingInterface(metaclass=ABCMeta): def __init__(self, name: str): self._name = name @staticmethod def get_variable_bounds(opt_vars: list): pass @abstractmethod def connect_network_input(self, opt_model, input_vars: list): ...
true
true
08f59e6617eb4bda3b6f095ecadd1b162a9c9586
511
py
Python
leetcode/0237_delete-node-in-a-linked-list.py
heyf/cloaked-octo-adventure
8180684a8a1859efb836edd48556b5f3088be398
[ "MIT" ]
null
null
null
leetcode/0237_delete-node-in-a-linked-list.py
heyf/cloaked-octo-adventure
8180684a8a1859efb836edd48556b5f3088be398
[ "MIT" ]
null
null
null
leetcode/0237_delete-node-in-a-linked-list.py
heyf/cloaked-octo-adventure
8180684a8a1859efb836edd48556b5f3088be398
[ "MIT" ]
null
null
null
# # @lc app=leetcode id=237 lang=python3 # # [237] Delete Node in a Linked List # # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None # @lc code=start class Solution: def deleteNode(self, node): """ :type node: ListNode ...
19.653846
74
0.585127
class ListNode: def __init__(self, x): self.val = x self.next = None class Solution: def deleteNode(self, node): node.val = node.next.val node.next = node.next.next return
true
true
08f59e6bd0dacde1ff825a611f8bb3b857fbd61f
5,996
py
Python
padertorch/testing/test_db.py
thequilo/padertorch
5e7ff6c2570739a0556d7c88bb93cd77017662a2
[ "MIT" ]
null
null
null
padertorch/testing/test_db.py
thequilo/padertorch
5e7ff6c2570739a0556d7c88bb93cd77017662a2
[ "MIT" ]
null
null
null
padertorch/testing/test_db.py
thequilo/padertorch
5e7ff6c2570739a0556d7c88bb93cd77017662a2
[ "MIT" ]
null
null
null
import gzip import struct import tempfile from pathlib import Path try: from urllib.request import urlretrieve except ImportError: from urllib import urlretrieve import cached_property import numpy as np from lazy_dataset.database import Database def load_data(src, num_samples, verbose): # https://not...
33.311111
95
0.594229
import gzip import struct import tempfile from pathlib import Path try: from urllib.request import urlretrieve except ImportError: from urllib import urlretrieve import cached_property import numpy as np from lazy_dataset.database import Database def load_data(src, num_samples, verbose): with temp...
true
true
08f59e7b6d8e18c96234b6ffee8ac5d29e7304d7
2,113
py
Python
wce_triage/setup/copy_nfs_root.py
pfrouleau/wce-triage-v2
25610cda55f5cb2170e13e121ae1cbaa92ef7626
[ "MIT" ]
3
2019-07-25T03:24:23.000Z
2021-06-23T14:01:34.000Z
wce_triage/setup/copy_nfs_root.py
pfrouleau/wce-triage-v2
25610cda55f5cb2170e13e121ae1cbaa92ef7626
[ "MIT" ]
1
2019-12-20T16:04:19.000Z
2019-12-20T16:04:19.000Z
wce_triage/setup/copy_nfs_root.py
pfrouleau/wce-triage-v2
25610cda55f5cb2170e13e121ae1cbaa92ef7626
[ "MIT" ]
2
2019-07-25T03:24:26.000Z
2021-02-14T05:27:11.000Z
#!/usr/bin/python3 import sys, subprocess from wce_triage.components.disk import PartitionLister, DiskPortal from wce_triage.lib.util import is_block_device import uuid # ID the partition def find_disk(portal, device_name): portal.decision(live_system=True) for disk in portal.disks: if disk.device_name == dev...
28.173333
244
0.6938
import sys, subprocess from wce_triage.components.disk import PartitionLister, DiskPortal from wce_triage.lib.util import is_block_device import uuid def find_disk(portal, device_name): portal.decision(live_system=True) for disk in portal.disks: if disk.device_name == device_name: return disk pass ...
true
true
08f59f449027870493d8ad876ced025d95dd843a
875
py
Python
ad2web/updater/forms.py
billfor/alarmdecoder-webapp
43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc
[ "BSD-3-Clause", "MIT" ]
46
2015-06-14T02:19:16.000Z
2022-03-24T03:11:19.000Z
ad2web/updater/forms.py
billfor/alarmdecoder-webapp
43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc
[ "BSD-3-Clause", "MIT" ]
66
2015-03-14T16:30:43.000Z
2021-08-28T22:20:01.000Z
ad2web/updater/forms.py
billfor/alarmdecoder-webapp
43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc
[ "BSD-3-Clause", "MIT" ]
44
2015-02-13T19:23:37.000Z
2021-12-30T04:17:21.000Z
# -*- coding: utf-8 -*- from flask_wtf import FlaskForm as Form from wtforms import (ValidationError, HiddenField, TextField, HiddenField, PasswordField, SubmitField, TextAreaField, IntegerField, RadioField, FileField, DecimalField, BooleanField, SelectField, FormField, FieldList) from wtforms.validato...
38.043478
81
0.741714
from flask_wtf import FlaskForm as Form from wtforms import (ValidationError, HiddenField, TextField, HiddenField, PasswordField, SubmitField, TextAreaField, IntegerField, RadioField, FileField, DecimalField, BooleanField, SelectField, FormField, FieldList) from wtforms.validators import (Required, Len...
true
true
08f59fa72fd0b25aa7e2960eebcf33e50d689359
4,312
py
Python
models.py
z-vasconcelos/udacity_facial_keypoints
96ef3b08714e224a3aed60154b133fdc595ff5ca
[ "MIT" ]
null
null
null
models.py
z-vasconcelos/udacity_facial_keypoints
96ef3b08714e224a3aed60154b133fdc595ff5ca
[ "MIT" ]
null
null
null
models.py
z-vasconcelos/udacity_facial_keypoints
96ef3b08714e224a3aed60154b133fdc595ff5ca
[ "MIT" ]
null
null
null
## TODO: define the convolutional neural network architecture import torch import torch.nn as nn import torch.nn.functional as F # can use the below import should you choose to initialize the weights of your Net import torch.nn.init as I class Net(nn.Module): def __init__(self): super(Net, self).__init_...
38.159292
117
0.554731
import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.init as I class Net(nn.Module): def __init__(self): super(Net, self).__init__() # As an example, you've been given a convolutional...
true
true
08f59fdd2692389e3f4a4355de683fe52274c16c
507
py
Python
example_movie.py
carlson-lab/lpne
b45087506669216d885b82ce11900c2ab006d456
[ "MIT" ]
1
2022-03-30T14:21:50.000Z
2022-03-30T14:21:50.000Z
example_movie.py
carlson-lab/lpne
b45087506669216d885b82ce11900c2ab006d456
[ "MIT" ]
null
null
null
example_movie.py
carlson-lab/lpne
b45087506669216d885b82ce11900c2ab006d456
[ "MIT" ]
null
null
null
""" Make a movie. """ __date__ = "August 2021" import os import lpne FN = os.path.join('test_data', 'data', 'example_LFP.mat') if __name__ == '__main__': # Load LFP data. lfps = lpne.load_lfps(FN) # Get the default channel grouping. channel_map = lpne.get_default_channel_map(list(lfps.keys()))...
15.363636
65
0.658777
__date__ = "August 2021" import os import lpne FN = os.path.join('test_data', 'data', 'example_LFP.mat') if __name__ == '__main__': lfps = lpne.load_lfps(FN) channel_map = lpne.get_default_channel_map(list(lfps.keys())) lfps = lpne.average_channels(lfps, channel_map) lpne.make...
true
true
08f5a1318a97aec9d750c7759d46ffb8f8b0c5ed
10,018
py
Python
002_fabert.py
bigdatamatta/ChaLearn_Automatic_Machine_Learning_Challenge_2015
a9acb6906ff141e7c24cff80f92efef7d7c3ff09
[ "BSD-2-Clause" ]
1
2019-06-12T19:55:35.000Z
2019-06-12T19:55:35.000Z
002_fabert.py
bigdatamatta/ChaLearn_Automatic_Machine_Learning_Challenge_2015
a9acb6906ff141e7c24cff80f92efef7d7c3ff09
[ "BSD-2-Clause" ]
null
null
null
002_fabert.py
bigdatamatta/ChaLearn_Automatic_Machine_Learning_Challenge_2015
a9acb6906ff141e7c24cff80f92efef7d7c3ff09
[ "BSD-2-Clause" ]
null
null
null
import argparse import os import numpy as np from sklearn.cross_validation import StratifiedKFold import autosklearn import autosklearn.data import autosklearn.data.competition_data_manager from autosklearn.evaluation.util import calculate_score from ParamSklearn.classification import ParamSklearnClassifier parser ...
47.933014
82
0.645738
import argparse import os import numpy as np from sklearn.cross_validation import StratifiedKFold import autosklearn import autosklearn.data import autosklearn.data.competition_data_manager from autosklearn.evaluation.util import calculate_score from ParamSklearn.classification import ParamSklearnClassifier parser ...
false
true
08f5a1bd7f952181ebd9d3bcf5d89a4ec94b34cd
955
py
Python
tests/test_materialinfraredtransparent.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
19
2015-12-08T23:33:51.000Z
2022-01-31T04:41:10.000Z
tests/test_materialinfraredtransparent.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
2
2019-10-04T10:57:00.000Z
2021-10-01T06:46:17.000Z
tests/test_materialinfraredtransparent.py
marcelosalles/pyidf
c2f744211572b5e14e29522aac1421ba88addb0e
[ "Apache-2.0" ]
7
2015-11-04T02:25:01.000Z
2021-12-08T03:14:28.000Z
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.surface_construction_elements import MaterialInfraredTransparent log = logging.getLogger(__name__) class TestMaterialInfraredTransparent(unittest.TestCase): def setUp(self)...
25.131579
77
0.678534
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.surface_construction_elements import MaterialInfraredTransparent log = logging.getLogger(__name__) class TestMaterialInfraredTransparent(unittest.TestCase): def setUp(self)...
true
true
08f5a222cddf81ffd843e2244385e77de77c7fef
10,920
py
Python
python/tvm/tools/debug/util/debug_utils.py
dayanandasiet/tvmdbg
5e3266a65422990d385c43424d51a4e5e8dfe6ee
[ "Apache-2.0" ]
null
null
null
python/tvm/tools/debug/util/debug_utils.py
dayanandasiet/tvmdbg
5e3266a65422990d385c43424d51a4e5e8dfe6ee
[ "Apache-2.0" ]
null
null
null
python/tvm/tools/debug/util/debug_utils.py
dayanandasiet/tvmdbg
5e3266a65422990d385c43424d51a4e5e8dfe6ee
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # pylint: disable=invalid-name, too-many-arguments, too-many-locals """TVM Debugger (tfdbg) Utilities.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import re from six.moves import xrange # pylint: disable=redefined-builtin def add_d...
43.855422
82
0.643315
from __future__ import absolute_import from __future__ import division from __future__ import print_function import re from six.moves import xrange def add_debug_tensor_watch(run_options, node_name, output_slot=0, debug_ops="DebugIden...
true
true
08f5a32bc54712c24908ef875ddc99173305566b
11,780
py
Python
precision_search/base/base_trainer.py
EmbeddedML-EDAGroup/Q-PPG
ed42829d0a456db4f0b31d63ba8b22ba483c7b08
[ "Apache-2.0" ]
1
2021-12-18T21:04:29.000Z
2021-12-18T21:04:29.000Z
precision_search/base/base_trainer.py
EmbeddedML-EDAGroup/Q-PPG
ed42829d0a456db4f0b31d63ba8b22ba483c7b08
[ "Apache-2.0" ]
null
null
null
precision_search/base/base_trainer.py
EmbeddedML-EDAGroup/Q-PPG
ed42829d0a456db4f0b31d63ba8b22ba483c7b08
[ "Apache-2.0" ]
null
null
null
#*----------------------------------------------------------------------------* #* Copyright (C) 2021 Politecnico di Torino, Italy * #* SPDX-License-Identifier: Apache-2.0 * #* * ...
47.5
184
0.532003
import torch from abc import abstractmethod from numpy import inf from logger import TensorboardWriter import pdb class BaseTrainer: def __init__(self, model, model_float, criterion, metric_ftns, optimizer, optimizer_float, arch_optimizer, finetuning, config, args_input): self.config = config sel...
true
true
08f5a3ac771a30103aa17bf4da30ab79cdf61682
417
py
Python
oac_search/migrations/0004_auto_20171201_1115.py
vpodpecan/pmcutils
cefbe354589d847a5df084156a4b5dadfa0835de
[ "MIT" ]
null
null
null
oac_search/migrations/0004_auto_20171201_1115.py
vpodpecan/pmcutils
cefbe354589d847a5df084156a4b5dadfa0835de
[ "MIT" ]
5
2020-06-05T17:58:54.000Z
2021-12-13T19:46:49.000Z
oac_search/migrations/0004_auto_20171201_1115.py
vpodpecan/pmcutils
cefbe354589d847a5df084156a4b5dadfa0835de
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-01 11:15 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('oac_search', '0003_auto_20171201_1104'), ] operations = [ migrations.AlterIndexToge...
20.85
50
0.618705
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('oac_search', '0003_auto_20171201_1104'), ] operations = [ migrations.AlterIndexTogether( name='article', index_together=set([('pmcid...
true
true
08f5a539b383c5c54d7623be662b8772030634a4
4,009
py
Python
sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
null
null
null
sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
null
null
null
sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
37.46729
125
0.69793
import os import json from azure.identity import ClientSecretCredential from azure.schemaregistry import SchemaRegistryClient, SchemaFormat TENANT_ID = os.environ['SCHEMA_REGISTRY_AZURE_TENANT_ID'] CLIENT_ID = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_ID'] CLIENT_SECRET = os.environ['SCHEMA_REGISTRY_AZURE_CLIENT_SE...
true
true
08f5a590aa20dfd43b9fa1a01704918137682832
4,303
py
Python
ansible/modules/network/aci/aci_filter.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
1
2022-01-25T22:52:58.000Z
2022-01-25T22:52:58.000Z
ansible/modules/network/aci/aci_filter.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
ansible/modules/network/aci/aci_filter.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
28.124183
146
0.664885
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: aci_filter short_description: Manages top level filter obj...
true
true
08f5a5de3b05d1823bce35aa1a93499a76bba69b
1,285
py
Python
setup.py
scythargon/model_mommy
6903443c8183220f94a3add82439e3f617558c3f
[ "Apache-2.0" ]
null
null
null
setup.py
scythargon/model_mommy
6903443c8183220f94a3add82439e3f617558c3f
[ "Apache-2.0" ]
null
null
null
setup.py
scythargon/model_mommy
6903443c8183220f94a3add82439e3f617558c3f
[ "Apache-2.0" ]
1
2021-03-05T12:50:43.000Z
2021-03-05T12:50:43.000Z
import setuptools from os.path import join, dirname import model_mommy setuptools.setup( name="model_mommy", version=model_mommy.__version__, packages=["model_mommy"], include_package_data=True, # declarations in MANIFEST.in install_requires=open(join(dirname(__file__), 'requirements.txt')).read...
32.125
83
0.639689
import setuptools from os.path import join, dirname import model_mommy setuptools.setup( name="model_mommy", version=model_mommy.__version__, packages=["model_mommy"], include_package_data=True, install_requires=open(join(dirname(__file__), 'requirements.txt')).readlines(), tests_require=[ ...
true
true
08f5a69151aebeaa03b138a21d5dd45dcf85d03c
5,449
py
Python
plugins/modules/account_auth.py
nmarian85/cloudera.cloud
817fc1a5400c1f43614c886bce1770076c1e91d1
[ "Apache-2.0" ]
11
2021-05-05T19:44:14.000Z
2021-08-23T20:22:55.000Z
plugins/modules/account_auth.py
nmarian85/cloudera.cloud
817fc1a5400c1f43614c886bce1770076c1e91d1
[ "Apache-2.0" ]
19
2021-05-18T11:02:05.000Z
2022-03-19T17:25:56.000Z
plugins/modules/account_auth.py
nmarian85/cloudera.cloud
817fc1a5400c1f43614c886bce1770076c1e91d1
[ "Apache-2.0" ]
18
2021-05-05T17:29:49.000Z
2022-02-10T10:46:54.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2021 Cloudera, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LIC...
32.434524
119
0.677188
from ansible.module_utils.basic import AnsibleModule from ansible_collections.cloudera.cloud.plugins.module_utils.cdp_common import CdpModule ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: acc...
true
true
08f5a73de702edbae2bb8ef60876a6f43468639d
211
py
Python
ipbxmanager/ipbxmanager/doctype/sip_user/test_sip_user.py
Nayar/ipbxmanager
84bd2cc8347a55ace400422c39ec3149ed27bfb8
[ "MIT" ]
5
2019-12-05T10:56:47.000Z
2020-09-21T19:20:08.000Z
ipbxmanager/ipbxmanager/doctype/sip_user/test_sip_user.py
Nayar/ipbxmanager
84bd2cc8347a55ace400422c39ec3149ed27bfb8
[ "MIT" ]
1
2020-07-08T06:44:33.000Z
2020-07-08T06:44:33.000Z
ipbxmanager/ipbxmanager/doctype/sip_user/test_sip_user.py
Nayar/ipbxmanager
84bd2cc8347a55ace400422c39ec3149ed27bfb8
[ "MIT" ]
8
2019-09-17T05:48:30.000Z
2020-12-25T15:30:40.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2018, Nayar Joolfoo and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestSIPUser(unittest.TestCase): pass
19.181818
52
0.767773
from __future__ import unicode_literals import frappe import unittest class TestSIPUser(unittest.TestCase): pass
true
true
08f5a7a0978fbca6c8360a106723ac3e49be7cb1
334
py
Python
imperial_calendar/transform/mrsd_to_tert.py
ne-sachirou/martian_imperial_year_table
8bc7c43b5219eb0c3334f1f55aa6528a035bad97
[ "Unlicense" ]
null
null
null
imperial_calendar/transform/mrsd_to_tert.py
ne-sachirou/martian_imperial_year_table
8bc7c43b5219eb0c3334f1f55aa6528a035bad97
[ "Unlicense" ]
334
2019-05-06T07:34:02.000Z
2021-09-20T01:26:27.000Z
imperial_calendar/transform/mrsd_to_tert.py
c4se-jp/martian_imperial_year_table
bb44def3273e65e226354119c837a66e5fa81051
[ "Unlicense" ]
null
null
null
"""MSDから地球時を算出する.""" from imperial_calendar.MarsSolDate import MarsSolDate from imperial_calendar.TerrestrialTime import TerrestrialTime def mrsd_to_tert(mrsd: MarsSolDate) -> TerrestrialTime: """MSDから地球時を算出する.""" return TerrestrialTime( 1.0274912517 * (mrsd.mars_sol_date - 44796 + 0.0009626) + 245154...
30.363636
79
0.742515
from imperial_calendar.MarsSolDate import MarsSolDate from imperial_calendar.TerrestrialTime import TerrestrialTime def mrsd_to_tert(mrsd: MarsSolDate) -> TerrestrialTime: return TerrestrialTime( 1.0274912517 * (mrsd.mars_sol_date - 44796 + 0.0009626) + 2451545 + 4.5 )
true
true
08f5a7a6bb305423b2e8bc65151eed71a4c3d704
2,224
py
Python
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/h5py/tests/old/test_base.py
JustinACoder/H22-GR3-UnrealAI
361eb9ef1147f8a2991e5f98c4118cd823184adf
[ "MIT" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
SLpackage/private/thirdparty/pythonpkgs/h5py/h5py_2.7.0/lib/python2.7/site-packages/h5py/tests/old/test_base.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
null
null
null
SLpackage/private/thirdparty/pythonpkgs/h5py/h5py_2.7.0/lib/python2.7/site-packages/h5py/tests/old/test_base.py
fanglab/6mASCOPE
3f1fdcb7693ff152f17623ce549526ec272698b1
[ "BSD-3-Clause" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
# This file is part of h5py, a Python interface to the HDF5 library. # # http://www.h5py.org # # Copyright 2008-2013 Andrew Collette and contributors # # License: Standard 3-clause BSD; see "license.txt" for full license terms # and contributor agreement. """ Common high-level operations test Tests...
24.173913
77
0.605216
from __future__ import absolute_import import six from h5py import File from .common import ut, TestCase, unicode_filenames import numpy as np import os import tempfile class BaseTest(TestCase): def setUp(self): self.f = File(self.mktemp(), 'w') def tearDown(self): if self.f: ...
true
true
08f5a7ead02a137c5a886d5a5c59f756d56acba1
4,446
py
Python
streaming_side/admin/admin_gui.py
yagorezende/TCC00314-Streaming
e2de185292582253106899f38540f6e523271875
[ "Apache-2.0" ]
null
null
null
streaming_side/admin/admin_gui.py
yagorezende/TCC00314-Streaming
e2de185292582253106899f38540f6e523271875
[ "Apache-2.0" ]
null
null
null
streaming_side/admin/admin_gui.py
yagorezende/TCC00314-Streaming
e2de185292582253106899f38540f6e523271875
[ "Apache-2.0" ]
null
null
null
from fileinput import filename from tkinter import * from tkinter import filedialog from pathlib import Path import numpy as np import tqdm import os from os import listdir from os.path import isfile, join from converter import Converter from sound_handler import AudioHandler import os import glob # from converter imp...
38.66087
144
0.607512
from fileinput import filename from tkinter import * from tkinter import filedialog from pathlib import Path import numpy as np import tqdm import os from os import listdir from os.path import isfile, join from converter import Converter from sound_handler import AudioHandler import os import glob VIDEO_BUFFER_SIZE =...
true
true
08f5a84fbfa17d0c2aeadd212aff44664732d113
8,824
py
Python
eoxserver/resources/coverages/util.py
constantinius/eoxserver_combined
68f261133fed65a4e8a6ddba82b0d2845171e4bf
[ "OML" ]
null
null
null
eoxserver/resources/coverages/util.py
constantinius/eoxserver_combined
68f261133fed65a4e8a6ddba82b0d2845171e4bf
[ "OML" ]
null
null
null
eoxserver/resources/coverages/util.py
constantinius/eoxserver_combined
68f261133fed65a4e8a6ddba82b0d2845171e4bf
[ "OML" ]
null
null
null
#------------------------------------------------------------------------------- # # Project: EOxServer <http://eoxserver.org> # Authors: Fabian Schindler <fabian.schindler@eox.at> # Stephan Meissl <stephan.meissl@eox.at> # Stephan Krause <stephan.krause@eox.at> # #------------------------------------...
36.614108
80
0.645399
import operator from django.db.models import Min, Max from django.contrib.gis.db.models import Union from django.contrib.gis.geos import MultiPolygon, Polygon from django.utils.timezone import is_naive, make_aware, get_current_timezone from django.utils.dateparse import parse_datetime from eoxserver.contrib import ...
true
true
08f5a8ab052bda01bac107ca6aa8efd9bd4486d7
677
py
Python
projects/win_note/tests/test_edit.py
bobjiangps/python3_test_framework
cfcdc10f5bcf96bb31e417b800d829c61fbba07f
[ "MIT" ]
2
2019-06-28T07:33:36.000Z
2020-01-12T12:47:20.000Z
projects/win_note/tests/test_edit.py
bobjiangps/python3_test_framework
cfcdc10f5bcf96bb31e417b800d829c61fbba07f
[ "MIT" ]
null
null
null
projects/win_note/tests/test_edit.py
bobjiangps/python3_test_framework
cfcdc10f5bcf96bb31e417b800d829c61fbba07f
[ "MIT" ]
null
null
null
from .win_test_case import NoteWinTestCase class TestEdit(NoteWinTestCase): def test_save_values(self): """WNote-1: notepad is able to input value and save value""" with self.precondition(): file_name = "save_as.txt" self.edit_page.remove_file_if_exists_in_test_data(file_n...
32.238095
77
0.679468
from .win_test_case import NoteWinTestCase class TestEdit(NoteWinTestCase): def test_save_values(self): with self.precondition(): file_name = "save_as.txt" self.edit_page.remove_file_if_exists_in_test_data(file_name) with self.steps(): texts = "this is a test"...
true
true
08f5a919109199af59d39d66c83538cba308aef2
5,566
py
Python
controlm_py/models/plugin_mng_auth.py
dcompane/controlm_py
c521208be2f00303383bb32ca5eb2b7ff91999d3
[ "MIT" ]
2
2020-03-20T18:24:23.000Z
2021-03-05T22:05:04.000Z
controlm_py/models/plugin_mng_auth.py
dcompane/controlm_py
c521208be2f00303383bb32ca5eb2b7ff91999d3
[ "MIT" ]
null
null
null
controlm_py/models/plugin_mng_auth.py
dcompane/controlm_py
c521208be2f00303383bb32ca5eb2b7ff91999d3
[ "MIT" ]
1
2021-05-27T15:54:37.000Z
2021-05-27T15:54:37.000Z
# coding: utf-8 """ Control-M Services Provides access to BMC Control-M Services # noqa: E501 OpenAPI spec version: 9.20.220 Contact: customer_support@bmc.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class PluginMngA...
28.253807
105
0.577794
import pprint import re import six class PluginMngAuth(object): swagger_types = { 'controlm_server': 'str', 'agent': 'str', 'plugin_type': 'str', 'privilege': 'str' } attribute_map = { 'controlm_server': 'ControlmServer', 'agent': 'Agent', 'plugi...
true
true
08f5aa2c4d3033362d734fe8595845030c0f7281
2,055
py
Python
toad/nn/loss.py
wolaituodiban/toad
eab0b50463b7997a0f4ff6a5ec416cfd3983e3bf
[ "MIT" ]
325
2019-08-22T08:43:43.000Z
2022-03-26T11:52:53.000Z
toad/nn/loss.py
Secbone/toad
9aa755273c8fc055c8a244f244e5437c189aa884
[ "MIT" ]
80
2019-11-08T09:15:50.000Z
2022-03-07T13:49:04.000Z
toad/nn/loss.py
Secbone/toad
9aa755273c8fc055c8a244f244e5437c189aa884
[ "MIT" ]
134
2019-06-10T02:42:42.000Z
2022-03-14T05:49:56.000Z
from typing import Dict, List import torch from torch.nn import Module from .functional import focal_loss class FocalLoss(Module): def __init__(self, alpha = 1., gamma = 2., reduction = 'mean'): super(FocalLoss, self).__init__() self.alpha = alpha self.gamma = gamma self...
30.220588
87
0.581022
from typing import Dict, List import torch from torch.nn import Module from .functional import focal_loss class FocalLoss(Module): def __init__(self, alpha = 1., gamma = 2., reduction = 'mean'): super(FocalLoss, self).__init__() self.alpha = alpha self.gamma = gamma self...
true
true
08f5aa81f9ef113250a034e60b503dab61f39ee6
17,445
py
Python
django/contrib/gis/db/models/fields.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-10-21T02:20:06.000Z
2020-10-21T02:20:06.000Z
django/contrib/gis/db/models/fields.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/contrib/gis/db/models/fields.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-09-16T07:19:02.000Z
2020-09-16T07:19:02.000Z
from django.contrib.gis import forms, gdal from django.contrib.gis.db.models.lookups import ( RasterBandTransform, gis_lookups, ) from django.contrib.gis.db.models.proxy import SpatialProxy from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.geometry.backend import Geometry, GeometryExce...
37.75974
119
0.653826
from django.contrib.gis import forms, gdal from django.contrib.gis.db.models.lookups import ( RasterBandTransform, gis_lookups, ) from django.contrib.gis.db.models.proxy import SpatialProxy from django.contrib.gis.gdal.error import GDALException from django.contrib.gis.geometry.backend import Geometry, GeometryExce...
true
true
08f5aaa788222f333051dfd0e9fca4bac9cca432
1,287
py
Python
src/scripts/update_playlist_based_on_stats.py
okjuan/music-lib-bot
a63ee84b30c4dc40bbf72ebd8a8d1a3736f25432
[ "MIT" ]
1
2021-11-03T22:22:09.000Z
2021-11-03T22:22:09.000Z
src/scripts/update_playlist_based_on_stats.py
okjuan/music-lib-bot
a63ee84b30c4dc40bbf72ebd8a8d1a3736f25432
[ "MIT" ]
45
2021-03-15T06:37:31.000Z
2022-03-03T05:00:05.000Z
src/scripts/update_playlist_based_on_stats.py
okjuan/music-lib-bot
a63ee84b30c4dc40bbf72ebd8a8d1a3736f25432
[ "MIT" ]
null
null
null
# allows me to run: # $ python scripts/dump_playlist_genres.py import sys sys.path.extend(['.', '../']) from app.lib.music_util import MusicUtil from app.lib.my_music_lib import MyMusicLib from app.lib.playlist_updater import PlaylistUpdater from app.lib.playlist_stats import PlaylistStats from app.lib.spotify_client_...
29.930233
80
0.738928
import sys sys.path.extend(['.', '../']) from app.lib.music_util import MusicUtil from app.lib.my_music_lib import MyMusicLib from app.lib.playlist_updater import PlaylistUpdater from app.lib.playlist_stats import PlaylistStats from app.lib.spotify_client_wrapper import SpotifyClientWrapper def main(): spotify_c...
true
true
08f5abcebb09d9b796dc9c266914e0be0221a043
2,189
py
Python
dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py
partizaans/Bombsquad-Ballistica-Modded-Server
2d7f74b167ae3c2f3bf89bba225716c994c662c0
[ "MIT" ]
21
2021-03-29T05:49:35.000Z
2022-03-18T09:02:34.000Z
dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py
partizaans/Bombsquad-Ballistica-Modded-Server
2d7f74b167ae3c2f3bf89bba225716c994c662c0
[ "MIT" ]
15
2021-04-10T11:08:09.000Z
2022-03-22T07:48:58.000Z
dist/ba_root/mods/chatHandle/chatFilter/ChatFilter.py
partizaans/Bombsquad-Ballistica-Modded-Server
2d7f74b167ae3c2f3bf89bba225716c994c662c0
[ "MIT" ]
31
2021-03-29T05:54:57.000Z
2022-03-22T16:58:57.000Z
# Released under the MIT License. See LICENSE for details. import ba, _ba from serverData import serverdata from tools import profanity from tools import servercheck import time import setting from tools import Logger import _thread settings = setting.get_settings_data() def filter(msg,pb_id,client_id): ...
28.064103
100
0.70169
import ba, _ba from serverData import serverdata from tools import profanity from tools import servercheck import time import setting from tools import Logger import _thread settings = setting.get_settings_data() def filter(msg,pb_id,client_id): new_msg=profanity.censor(msg) if new_msg!=msg: addWarn...
true
true
08f5ac619a097ae86160c82cbf88d956c62aa95d
516
py
Python
exercicio38.py
profnssorg/henriqueJoner1
be5ddd3be50716a9d0c99bc74a434b4fc396e0a0
[ "MIT" ]
null
null
null
exercicio38.py
profnssorg/henriqueJoner1
be5ddd3be50716a9d0c99bc74a434b4fc396e0a0
[ "MIT" ]
null
null
null
exercicio38.py
profnssorg/henriqueJoner1
be5ddd3be50716a9d0c99bc74a434b4fc396e0a0
[ "MIT" ]
null
null
null
""" Descrição: Este programa converte metros para milímetros, os valores são inseridos pelo usuário Autor:Henrique Joner Versão:0.0.1 Data:23/11/2018 """ #Inicialização de variáveis m = 0 mm = 0 resultado = 0 #Entrada de dados m = float(input("Qual o valor em metros que você gostaria de converter para milímetros?...
17.2
121
0.72093
m = 0 mm = 0 resultado = 0 m = float(input("Qual o valor em metros que você gostaria de converter para milímetros? ")) mm = float( m * 1000) print("%0.2f metros é equivalente a % 0.1f milímetros, mas é difícil acreditar que você não soubesse disso!!" % (m, mm))
true
true
08f5ae3ded9ba11591ae9d4a25ce5181d1c73b2b
5,990
py
Python
nfsstat/datadog_checks/nfsstat/nfsstat.py
tylerbenson/integrations-core
e1193b8e860a65337c37924e10f07ff2271af058
[ "BSD-3-Clause" ]
null
null
null
nfsstat/datadog_checks/nfsstat/nfsstat.py
tylerbenson/integrations-core
e1193b8e860a65337c37924e10f07ff2271af058
[ "BSD-3-Clause" ]
null
null
null
nfsstat/datadog_checks/nfsstat/nfsstat.py
tylerbenson/integrations-core
e1193b8e860a65337c37924e10f07ff2271af058
[ "BSD-3-Clause" ]
null
null
null
# (C) Datadog, Inc. 2010-2017 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import os from datadog_checks.base import ensure_unicode from datadog_checks.checks import AgentCheck from datadog_checks.utils.subprocess_output import get_subprocess_output EVENT_TYPE = SOURCE_TYPE_NAME = 'nfs...
42.48227
91
0.64591
import os from datadog_checks.base import ensure_unicode from datadog_checks.checks import AgentCheck from datadog_checks.utils.subprocess_output import get_subprocess_output EVENT_TYPE = SOURCE_TYPE_NAME = 'nfsstat' class NfsStatCheck(AgentCheck): metric_prefix = 'system.nfs.' def __init__(self, name, i...
true
true
08f5af4f5235263938a3d85bdb5c4ff145d41dcd
6,665
py
Python
lib/coloraide/__meta__.py
facelessuser/ColorHelper
e3f29016054e13bfab57e890b33e4880983e74fa
[ "MIT" ]
253
2015-03-04T06:48:43.000Z
2022-03-25T14:22:17.000Z
lib/coloraide/__meta__.py
facelessuser/ColorHelper
e3f29016054e13bfab57e890b33e4880983e74fa
[ "MIT" ]
197
2015-03-04T21:40:47.000Z
2022-03-25T17:04:36.000Z
lib/coloraide/__meta__.py
facelessuser/ColorHelper
e3f29016054e13bfab57e890b33e4880983e74fa
[ "MIT" ]
32
2015-03-21T03:28:01.000Z
2021-09-06T07:20:51.000Z
"""Meta related things.""" from collections import namedtuple import re RE_VER = re.compile( r'''(?x) (?P<major>\d+)(?:\.(?P<minor>\d+))?(?:\.(?P<micro>\d+))? (?:(?P<type>a|b|rc)(?P<pre>\d+))? (?:\.post(?P<post>\d+))? (?:\.dev(?P<dev>\d+))? ''' ) REL_MAP = { ".dev": "", ".dev-alpha": "...
34.533679
118
0.578545
from collections import namedtuple import re RE_VER = re.compile( r'''(?x) (?P<major>\d+)(?:\.(?P<minor>\d+))?(?:\.(?P<micro>\d+))? (?:(?P<type>a|b|rc)(?P<pre>\d+))? (?:\.post(?P<post>\d+))? (?:\.dev(?P<dev>\d+))? ''' ) REL_MAP = { ".dev": "", ".dev-alpha": "a", ".dev-beta": "b", ...
true
true
08f5b076f7eab0cfffb5ead248ba70151f9f1087
5,289
py
Python
tests/cli/test_config.py
cyberhck/renku-python
2e52dff9dd627c93764aadb9fd1e91bd190a5de7
[ "Apache-2.0" ]
null
null
null
tests/cli/test_config.py
cyberhck/renku-python
2e52dff9dd627c93764aadb9fd1e91bd190a5de7
[ "Apache-2.0" ]
null
null
null
tests/cli/test_config.py
cyberhck/renku-python
2e52dff9dd627c93764aadb9fd1e91bd190a5de7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright 2017-2019 - Swiss Data Science Center (SDSC) # A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and # Eidgenössische Technische Hochschule Zürich (ETHZ). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in c...
36.986014
79
0.686708
import pytest from renku.cli import cli def test_config_value_locally(client, runner, project, global_config_dir): result = runner.invoke(cli, ['config', 'key', 'local-value']) assert result.exit_code == 0 result = runner.invoke(cli, ['config', 'key']) assert result.exit_code == 0 assert result....
true
true
08f5b086f90d26198ba98b72db7e03f55645b844
8,154
py
Python
contrib/devtools/update-translations.py
Hser2bio/fdr-blockchain
aba6dfc67f70dcd84462e07a8455a315569595f6
[ "MIT" ]
12
2020-04-05T13:32:35.000Z
2022-03-01T09:58:37.000Z
contrib/devtools/update-translations.py
Hser2bio/fdr-blockchain
aba6dfc67f70dcd84462e07a8455a315569595f6
[ "MIT" ]
2
2020-08-05T06:39:42.000Z
2021-04-05T02:47:18.000Z
contrib/devtools/update-translations.py
Hser2bio/fdr-blockchain
aba6dfc67f70dcd84462e07a8455a315569595f6
[ "MIT" ]
5
2020-01-28T17:58:48.000Z
2021-11-28T14:56:06.000Z
#!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
38.64455
124
0.634045
from __future__ import division, print_function import subprocess import re import sys import os import io import xml.etree.ElementTree as ET TX = 'tx' SOURCE_LANG = 'fdreserve_en.ts' LOCALE_DIR = 'src/qt/locale' MIN_NUM_MESSAGES = 10 def check_at_repository_root(): if not os.path.exists('.git'): print('N...
true
true
08f5b0ec47af3435d7ac763b47d0f5a5bdb1f740
16,108
py
Python
tests/commands_test.py
esciara/python-nubia
eae1b64338ee08dbf2a81ec8891777b039ba9085
[ "BSD-3-Clause" ]
1,568
2018-09-05T19:56:31.000Z
2022-03-28T12:42:36.000Z
tests/commands_test.py
JLospinoso/python-nubia
96259c6fb8c92b8955302b3a4bb65a19938ed84e
[ "BSD-3-Clause" ]
85
2018-09-06T14:16:59.000Z
2022-03-06T15:24:24.000Z
tests/commands_test.py
JLospinoso/python-nubia
96259c6fb8c92b8955302b3a4bb65a19938ed84e
[ "BSD-3-Clause" ]
109
2018-09-05T20:12:27.000Z
2022-03-17T03:24:35.000Z
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # import unittest from typing import List, Optional from termcolor import cprint from n...
37.460465
88
0.599702
import unittest from typing import List, Optional from termcolor import cprint from nubia import argument, command, deprecated from tests.util import TestShell class CommandSpecTest(unittest.TestCase): def test_command_name_spec1(self): @command @argument("arg", description="argument help", al...
true
true
08f5b10dc2298fc7b87210462b88bea4d9af172f
9,885
py
Python
electrum_trc/gui/qt/seed_dialog.py
TheSin-/electrum-trc
d2f5b15fd4399a9248cce0d63e20128f3f54e69c
[ "MIT" ]
1
2019-08-20T18:05:32.000Z
2019-08-20T18:05:32.000Z
electrum_trc/gui/qt/seed_dialog.py
TheSin-/electrum-trc
d2f5b15fd4399a9248cce0d63e20128f3f54e69c
[ "MIT" ]
1
2022-03-14T19:45:31.000Z
2022-03-14T19:45:31.000Z
electrum_trc/gui/qt/seed_dialog.py
TheSin-/electrum-trc
d2f5b15fd4399a9248cce0d63e20128f3f54e69c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2013 ecdsa@github # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without li...
41.885593
136
0.621244
from PyQt5.QtCore import Qt from PyQt5.QtGui import QPixmap, QPalette from PyQt5.QtWidgets import (QVBoxLayout, QCheckBox, QHBoxLayout, QLineEdit, QLabel, QCompleter, QDialog, QStyledItemDelegate) from electrum_trc.i18n import _ from electrum_trc.mnemonic import Mnemonic, seed_type import...
true
true
08f5b124270ad0f4aafcda53ecf262f4ae48d8cb
1,453
py
Python
converters/pt2wts.py
vic9527/ViClassifier
fd6c4730e880f35a9429277a6025219315e067cc
[ "MIT" ]
1
2021-11-03T05:05:34.000Z
2021-11-03T05:05:34.000Z
converters/pt2wts.py
vic9527/viclassifier
fd6c4730e880f35a9429277a6025219315e067cc
[ "MIT" ]
null
null
null
converters/pt2wts.py
vic9527/viclassifier
fd6c4730e880f35a9429277a6025219315e067cc
[ "MIT" ]
null
null
null
def convert(pth_path, wts_path, device_type='cuda'): import struct import torch from viclassifier.utils import dev_opt device = dev_opt.usingDevice(device_type) model = torch.load(pth_path, map_location=device) model.to(device) # 测试时不启用 BatchNormalization 和 Dropout model.eval() # p...
30.270833
99
0.577426
def convert(pth_path, wts_path, device_type='cuda'): import struct import torch from viclassifier.utils import dev_opt device = dev_opt.usingDevice(device_type) model = torch.load(pth_path, map_location=device) model.to(device) model.eval() f = open(wt...
true
true
08f5b2315201b55b9a6154814f1b5691f8926dd8
177
py
Python
csm_test_utils/rds_backup/generation/sqla/session.py
opentelekomcloud-infra/csm-test-utils
ec3c4a6bf4d4806e76d0d8dfcfe024c39c9a0e36
[ "Apache-2.0" ]
1
2021-02-08T08:53:01.000Z
2021-02-08T08:53:01.000Z
csm_test_utils/rds_backup/generation/sqla/session.py
opentelekomcloud-infra/csm-test-utils
ec3c4a6bf4d4806e76d0d8dfcfe024c39c9a0e36
[ "Apache-2.0" ]
22
2019-10-21T15:10:14.000Z
2021-04-07T07:27:20.000Z
csm_test_utils/rds_backup/generation/sqla/session.py
opentelekomcloud-infra/csm-test-utils
ec3c4a6bf4d4806e76d0d8dfcfe024c39c9a0e36
[ "Apache-2.0" ]
1
2021-02-08T08:53:07.000Z
2021-02-08T08:53:07.000Z
from sqlalchemy import engine from sqlalchemy.orm import sessionmaker def get_session(db_engine: engine): """Create session object""" return sessionmaker(db_engine)()
22.125
39
0.768362
from sqlalchemy import engine from sqlalchemy.orm import sessionmaker def get_session(db_engine: engine): return sessionmaker(db_engine)()
true
true
08f5b2b43efd5caa8b098f25980a9ed1c4c7a0f2
6,385
py
Python
python-ref-impl/get_params.py
asanso/Bandersnatch
e280929a6ba583f9fd23a4903779956c3e6ebf4d
[ "MIT" ]
3
2021-06-29T13:35:07.000Z
2021-06-30T02:00:03.000Z
python-ref-impl/get_params.py
asanso/Bandersnatch
e280929a6ba583f9fd23a4903779956c3e6ebf4d
[ "MIT" ]
1
2021-07-05T15:26:29.000Z
2021-07-05T15:26:29.000Z
python-ref-impl/get_params.py
asanso/Bandersnatch
e280929a6ba583f9fd23a4903779956c3e6ebf4d
[ "MIT" ]
1
2021-06-29T13:35:00.000Z
2021-06-29T13:35:00.000Z
import os from sage.all import * from sage.schemes.elliptic_curves.cm import hilbert_class_polynomial from sage.schemes.elliptic_curves.constructor import EllipticCurve D = -8 H = hilbert_class_polynomial(D) p = 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001 Fp = GF(p) FpX = Fp['X'] X = FpX.gen() j...
29.155251
115
0.612686
import os from sage.all import * from sage.schemes.elliptic_curves.cm import hilbert_class_polynomial from sage.schemes.elliptic_curves.constructor import EllipticCurve D = -8 H = hilbert_class_polynomial(D) p = 0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001 Fp = GF(p) FpX = Fp['X'] X = FpX.gen() j...
true
true
08f5b2e6aed812d38cd336f2dfb3d8fa69f71677
11,561
py
Python
vcd_cli/vapp_network_firewall.py
vmware/vcd-cli
8823c4a47fac204f43770b6df584573b13cfb1b2
[ "Apache-2.0", "MIT" ]
96
2017-07-26T05:02:07.000Z
2022-03-01T20:32:05.000Z
vcd_cli/vapp_network_firewall.py
vmware/vcd-cli
8823c4a47fac204f43770b6df584573b13cfb1b2
[ "Apache-2.0", "MIT" ]
243
2017-07-22T23:08:28.000Z
2022-03-28T17:28:06.000Z
vcd_cli/vapp_network_firewall.py
vmware/vcd-cli
8823c4a47fac204f43770b6df584573b13cfb1b2
[ "Apache-2.0", "MIT" ]
87
2017-07-26T22:03:25.000Z
2021-12-06T22:38:54.000Z
# VMware vCloud Director Python SDK # Copyright (c) 2014-2019 VMware, Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
38.925926
79
0.627022
import click from pyvcloud.vcd.vapp_firewall import VappFirewall from vcd_cli.utils import restore_session from vcd_cli.utils import stderr from vcd_cli.utils import stdout from vcd_cli.vapp_network import services @services.group('firewall', short_help='manage firewall service of vapp network') @cli...
true
true
08f5b42dc4e34937002b6ace002741bb0557df03
1,544
py
Python
libs/qwidgets.py
zxalif/top-torrent-available
76480d0789e24c6157ca55447c9ee587cca2fc7e
[ "MIT" ]
null
null
null
libs/qwidgets.py
zxalif/top-torrent-available
76480d0789e24c6157ca55447c9ee587cca2fc7e
[ "MIT" ]
null
null
null
libs/qwidgets.py
zxalif/top-torrent-available
76480d0789e24c6157ca55447c9ee587cca2fc7e
[ "MIT" ]
null
null
null
from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore class QMovieLabel(QtWidgets.QLabel): def __init__(self, fileName, parent=None): super(QMovieLabel, self).__init__(parent) m = QtGui.QMovie(fileName) self.setMovie(m) m.start() def setMovie(self, movie...
30.27451
101
0.628886
from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore class QMovieLabel(QtWidgets.QLabel): def __init__(self, fileName, parent=None): super(QMovieLabel, self).__init__(parent) m = QtGui.QMovie(fileName) self.setMovie(m) m.start() def setMovie(self, movie...
true
true
08f5b43dfc8522a27a0ad6b8c5b9644f3c22495e
1,845
py
Python
hc/lib/emails.py
issmirnov/healthchecks
eccc193b8775511d9423a66a3d157d6acdc179d5
[ "BSD-3-Clause" ]
2
2020-07-20T18:27:22.000Z
2020-08-14T01:58:30.000Z
hc/lib/emails.py
issmirnov/healthchecks
eccc193b8775511d9423a66a3d157d6acdc179d5
[ "BSD-3-Clause" ]
5
2021-03-19T11:20:11.000Z
2021-09-22T19:36:18.000Z
hc/lib/emails.py
MaxwellDPS/healthchecks
3730c67c803e707ae51b01bacf2929bd053ee22f
[ "BSD-3-Clause" ]
1
2022-01-28T10:43:26.000Z
2022-01-28T10:43:26.000Z
from threading import Thread from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string as render class EmailThread(Thread): def __init__(self, subject, text, html, to, headers): Thread.__init__(self) self.subject = sub...
23.653846
72
0.633604
from threading import Thread from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string as render class EmailThread(Thread): def __init__(self, subject, text, html, to, headers): Thread.__init__(self) self.subject = sub...
true
true
08f5b4bd16ed9bdba7517031249819b5a91a7e0d
374
py
Python
pyro/contrib/autoname/__init__.py
gavincangan/pyro
d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a
[ "MIT" ]
null
null
null
pyro/contrib/autoname/__init__.py
gavincangan/pyro
d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a
[ "MIT" ]
4
2019-01-31T17:54:03.000Z
2019-02-07T07:09:51.000Z
pyro/contrib/autoname/__init__.py
gavincangan/pyro
d9115a6da7edd7e3fecd6b89a850cc137d7e7e9a
[ "MIT" ]
null
null
null
""" The :mod:`pyro.contrib.autoname` module provides tools for automatically generating unique, semantically meaningful names for sample sites. """ from __future__ import absolute_import, division, print_function from pyro.contrib.autoname import named from pyro.contrib.autoname.scoping import scope, name_count __al...
23.375
72
0.764706
from __future__ import absolute_import, division, print_function from pyro.contrib.autoname import named from pyro.contrib.autoname.scoping import scope, name_count __all__ = [ "named", "scope", "name_count", ]
true
true
08f5b58f6c731f4376cf166ba4be72738ee8fb40
120,000
py
Python
pytorch-frontend/test/distributed/test_distributed.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
40
2021-06-01T07:37:59.000Z
2022-03-25T01:42:09.000Z
pytorch-frontend/test/distributed/test_distributed.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
14
2021-06-01T11:52:46.000Z
2022-03-25T02:13:08.000Z
pytorch-frontend/test/distributed/test_distributed.py
AndreasKaratzas/stonne
2915fcc46cc94196303d81abbd1d79a56d6dd4a9
[ "MIT" ]
7
2021-07-20T19:34:26.000Z
2022-03-13T21:07:36.000Z
from __future__ import absolute_import, division, print_function, unicode_literals import copy import errno import fcntl import itertools import math import os import random import sys import time import tempfile import unittest from contextlib import contextmanager from datetime import timedelta from functools import ...
36.900369
125
0.594575
from __future__ import absolute_import, division, print_function, unicode_literals import copy import errno import fcntl import itertools import math import os import random import sys import time import tempfile import unittest from contextlib import contextmanager from datetime import timedelta from functools import ...
true
true
08f5b63fd689750230212ae684785dd799f197f1
4,145
py
Python
lib/googlecloudsdk/third_party/appengine/tools/dispatch_xml_parser.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/appengine/tools/dispatch_xml_parser.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
lib/googlecloudsdk/third_party/appengine/tools/dispatch_xml_parser.py
bshaffer/google-cloud-sdk
f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
32.382813
107
0.720869
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from xml.etree import ElementTree from googlecloudsdk.third_party.appengine.tools import xml_parser_utils from googlecloudsdk.third_party.appengine.tools.app_engine_config_exception import AppEngineConfigEx...
true
true
08f5b684295f4a4d84c6c0784ab21bb32f4d0bdb
1,753
py
Python
cosypose/config.py
SelvamArul/cosypose
fb5aa1ce0a28d704cbeec53938f8b5d4adde2023
[ "MIT" ]
null
null
null
cosypose/config.py
SelvamArul/cosypose
fb5aa1ce0a28d704cbeec53938f8b5d4adde2023
[ "MIT" ]
null
null
null
cosypose/config.py
SelvamArul/cosypose
fb5aa1ce0a28d704cbeec53938f8b5d4adde2023
[ "MIT" ]
null
null
null
import cosypose import os import yaml from joblib import Memory from pathlib import Path import getpass import socket import torch.multiprocessing torch.multiprocessing.set_sharing_strategy('file_system') hostname = socket.gethostname() username = getpass.getuser() PROJECT_ROOT = Path(cosypose.__file__).parent.parent...
28.737705
87
0.789504
import cosypose import os import yaml from joblib import Memory from pathlib import Path import getpass import socket import torch.multiprocessing torch.multiprocessing.set_sharing_strategy('file_system') hostname = socket.gethostname() username = getpass.getuser() PROJECT_ROOT = Path(cosypose.__file__).parent.parent...
true
true
08f5b6f5c54c39c2ffc9dad847c731cbff1e6981
262
py
Python
app/errors.py
peterhychan/textnetwork
ef91fe9e7bef4ea0d38ea5a992721ad28f551a88
[ "MIT" ]
null
null
null
app/errors.py
peterhychan/textnetwork
ef91fe9e7bef4ea0d38ea5a992721ad28f551a88
[ "MIT" ]
1
2021-06-02T00:34:51.000Z
2021-06-02T00:34:51.000Z
app/errors.py
peterhychan/textnetwork
ef91fe9e7bef4ea0d38ea5a992721ad28f551a88
[ "MIT" ]
null
null
null
from flask import render_template from app import app,db @app.errorhandler(404) def not_found_error(error): return render_template('404.html'),404 @app.errorhandler(500) def internal_error(error): db.session.rollback() return render_template('500.html'),500
23.818182
39
0.793893
from flask import render_template from app import app,db @app.errorhandler(404) def not_found_error(error): return render_template('404.html'),404 @app.errorhandler(500) def internal_error(error): db.session.rollback() return render_template('500.html'),500
true
true
08f5b72842246c3f28d182e7a65249d55642ff66
2,788
py
Python
2021/11.py
elp2/advent_of_code
600e2db9a7d5b576937c9b39c5c6805db406f57b
[ "Apache-2.0" ]
1
2021-12-02T15:19:36.000Z
2021-12-02T15:19:36.000Z
2021/11.py
elp2/advent_of_code
600e2db9a7d5b576937c9b39c5c6805db406f57b
[ "Apache-2.0" ]
null
null
null
2021/11.py
elp2/advent_of_code
600e2db9a7d5b576937c9b39c5c6805db406f57b
[ "Apache-2.0" ]
null
null
null
from collections import defaultdict, deque, Counter from itertools import combinations, combinations_with_replacement, permutations import math # import numpy as np from operator import add, mul, itemgetter, attrgetter import re from typing import DefaultDict CHALLENGE_DAY = "11" REAL = open(CHALLENGE_DAY + ".txt").re...
26.807692
81
0.548063
from collections import defaultdict, deque, Counter from itertools import combinations, combinations_with_replacement, permutations import math from operator import add, mul, itemgetter, attrgetter import re from typing import DefaultDict CHALLENGE_DAY = "11" REAL = open(CHALLENGE_DAY + ".txt").read() SAMPLE_EXPECTED...
true
true
08f5b7b5525d96d2202216878647c15811f96b22
2,300
py
Python
tests/python/gaia-ui-tests/gaiatest/apps/ui_tests/regions/keyboard.py
gregarndt/gaia
acead54e798dcc436433fc359dda3a1409c5a44a
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/apps/ui_tests/regions/keyboard.py
gregarndt/gaia
acead54e798dcc436433fc359dda3a1409c5a44a
[ "Apache-2.0" ]
null
null
null
tests/python/gaia-ui-tests/gaiatest/apps/ui_tests/regions/keyboard.py
gregarndt/gaia
acead54e798dcc436433fc359dda3a1409c5a44a
[ "Apache-2.0" ]
null
null
null
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from marionette.by import By from gaiatest.apps.base import Base class KeyboardPage(Base): _number_input_locator =...
36.507937
95
0.724348
from marionette.by import By from gaiatest.apps.base import Base class KeyboardPage(Base): _number_input_locator = (By.CSS_SELECTOR, 'input[x-inputmode="numeric"]') _text_input_locator = (By.CSS_SELECTOR, 'input[type="text"]') _email_input_locator = (By.CSS_SELECTOR, 'input[type="email"]') _url_input...
true
true
08f5b7dd1869c6f292fb14e97cbf8982c927b0d5
9,562
py
Python
diode_equations.py
mattwachter/extract-diode-parameters
4def6deef7c4937d7e1706809e68d7466ee97d7f
[ "MIT" ]
1
2021-04-23T15:23:36.000Z
2021-04-23T15:23:36.000Z
diode_equations.py
mattwachter/extract-diode-parameters
4def6deef7c4937d7e1706809e68d7466ee97d7f
[ "MIT" ]
null
null
null
diode_equations.py
mattwachter/extract-diode-parameters
4def6deef7c4937d7e1706809e68d7466ee97d7f
[ "MIT" ]
null
null
null
""" Physics equations describing diode behavior """ import numpy as np from scipy.optimize import curve_fit import scipy.constants as const from scipy.special import lambertw from diode_utils import * def ideal_diode_eq(v_ca, i_s, m, T): """Shockley Diode equation Args: v_ca (float): Cathode-Anode v...
34.272401
97
0.606568
import numpy as np from scipy.optimize import curve_fit import scipy.constants as const from scipy.special import lambertw from diode_utils import * def ideal_diode_eq(v_ca, i_s, m, T): i_c = i_s * (np.exp((v_ca * const.e)/(m * const.k * T)) - 1) return i_c def get_ideal_diode_eq_log(T): def ideal_diode...
true
true
08f5b8323fe27e2b456a726dc24e4f56684b0790
134
py
Python
list01/ex07.py
FlavioBrusamolin/py-scripts
d80b9efc7fc1b59a5cf110180efc03cdc839cd23
[ "MIT" ]
null
null
null
list01/ex07.py
FlavioBrusamolin/py-scripts
d80b9efc7fc1b59a5cf110180efc03cdc839cd23
[ "MIT" ]
null
null
null
list01/ex07.py
FlavioBrusamolin/py-scripts
d80b9efc7fc1b59a5cf110180efc03cdc839cd23
[ "MIT" ]
null
null
null
name = input('Enter your name: ') condition = 'Silva' in name print(f"You {'have' if condition else 'dont have'} Silva in your name")
33.5
71
0.69403
name = input('Enter your name: ') condition = 'Silva' in name print(f"You {'have' if condition else 'dont have'} Silva in your name")
true
true
08f5b84edc9d25290f2bf69a669735197b45b38f
727
py
Python
supriya/ugens/Select.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/Select.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
supriya/ugens/Select.py
deeuu/supriya
14fcb5316eccb4dafbe498932ceff56e1abb9d27
[ "MIT" ]
null
null
null
import collections from supriya.enums import CalculationRate from supriya.synthdefs import PureUGen class Select(PureUGen): """ A signal selector. :: >>> sources = supriya.ugens.In.ar(bus=0, channel_count=8) >>> selector = supriya.ugens.Phasor.kr() * 8 >>> select = supriya.ugens...
22.030303
79
0.6011
import collections from supriya.enums import CalculationRate from supriya.synthdefs import PureUGen class Select(PureUGen): _ordered_input_names = collections.OrderedDict( [("selector", None), ("sources", None)] ) _unexpanded_input_names = ("sources",) _valid_calculation_rates = (Calc...
true
true
08f5b8e3993eff61dceb160ff6c48d9bde032558
21,062
py
Python
test/test_day_eighteen.py
federico-paolillo/aoc2021
013222a02b409603ae3bc5a06ee96eea31381863
[ "MIT" ]
null
null
null
test/test_day_eighteen.py
federico-paolillo/aoc2021
013222a02b409603ae3bc5a06ee96eea31381863
[ "MIT" ]
null
null
null
test/test_day_eighteen.py
federico-paolillo/aoc2021
013222a02b409603ae3bc5a06ee96eea31381863
[ "MIT" ]
null
null
null
import unittest from aoc2021.day_eighteen import parse_snailfish_number, SnailfishNumber, RegularNumber, sum_snailfish_numbers, part_one, part_two _PUZZLE_SNAILFISH_NUMBERS = [ "[[[[9,5],[9,4]],[[6,5],[7,0]]],4]", "[[[5,2],[[7,2],1]],[[[7,5],[0,8]],[[6,9],[7,3]]]]", "[[[9,7],[0,1]],9]", "[1,[[7,3],[[3...
41.789683
159
0.568465
import unittest from aoc2021.day_eighteen import parse_snailfish_number, SnailfishNumber, RegularNumber, sum_snailfish_numbers, part_one, part_two _PUZZLE_SNAILFISH_NUMBERS = [ "[[[[9,5],[9,4]],[[6,5],[7,0]]],4]", "[[[5,2],[[7,2],1]],[[[7,5],[0,8]],[[6,9],[7,3]]]]", "[[[9,7],[0,1]],9]", "[1,[[7,3],[[3...
true
true
08f5b9c08a30ed076b2aefa056832b75ffe7d602
27,793
py
Python
teuthology/provision/cloud/test/test_openstack.py
varshar16/teuthology
321319b12ea4ff9b63c7655015a3156de2c3b279
[ "MIT" ]
117
2015-03-24T17:30:44.000Z
2022-03-27T13:29:55.000Z
teuthology/provision/cloud/test/test_openstack.py
varshar16/teuthology
321319b12ea4ff9b63c7655015a3156de2c3b279
[ "MIT" ]
1,014
2015-01-05T21:33:17.000Z
2022-03-31T13:10:09.000Z
teuthology/provision/cloud/test/test_openstack.py
varshar16/teuthology
321319b12ea4ff9b63c7655015a3156de2c3b279
[ "MIT" ]
237
2015-01-04T03:37:42.000Z
2022-03-31T16:53:19.000Z
import socket import yaml import os from teuthology.util.compat import parse_qs from copy import deepcopy from libcloud.compute.providers import get_driver from mock import patch, Mock, DEFAULT from pytest import raises, mark from teuthology.config import config from teuthology.exceptions import MaxWhileTries from t...
35.540921
104
0.557586
import socket import yaml import os from teuthology.util.compat import parse_qs from copy import deepcopy from libcloud.compute.providers import get_driver from mock import patch, Mock, DEFAULT from pytest import raises, mark from teuthology.config import config from teuthology.exceptions import MaxWhileTries from t...
true
true
08f5b9c54cd97f5b0651686d6ea270a9b46965d7
1,118
py
Python
injektor.py
tomochikahara/injektor
a0957b4b6e330d2f92ea5c68a02213fb2a69037e
[ "MIT" ]
null
null
null
injektor.py
tomochikahara/injektor
a0957b4b6e330d2f92ea5c68a02213fb2a69037e
[ "MIT" ]
null
null
null
injektor.py
tomochikahara/injektor
a0957b4b6e330d2f92ea5c68a02213fb2a69037e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Injektor is a simple, lightweight, easy-to-use dependency injection framework. It is distributed as a single file module and has no dependencies other than the Python Standard Library. """ __author__ = 'Tomochika Hara' __version__ = '0.1.0' __license__ = 'MIT' class Bindings(object): "...
27.268293
105
0.650268
__author__ = 'Tomochika Hara' __version__ = '0.1.0' __license__ = 'MIT' class Bindings(object): def __init__(self): self._mappings = {} def register(self, name, binding): assert isinstance(name, str) assert binding is not None self._mappings[name] = binding def lookup(se...
true
true
08f5b9f1affd1f333e60865f53db17f72f2f4a9c
1,981
py
Python
Latest/venv/Lib/site-packages/pyface/wizard/i_wizard_controller.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-01-09T20:04:31.000Z
2022-01-09T20:04:31.000Z
Latest/venv/Lib/site-packages/pyface/wizard/i_wizard_controller.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
1
2022-02-15T12:01:57.000Z
2022-03-24T19:48:47.000Z
Latest/venv/Lib/site-packages/pyface/wizard/i_wizard_controller.py
adamcvj/SatelliteTracker
49a8f26804422fdad6f330a5548e9f283d84a55d
[ "Apache-2.0" ]
null
null
null
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
32.47541
79
0.538112
from traits.api import Bool, Interface, Instance, List from .i_wizard_page import IWizardPage class IWizardController(Interface): pages = List(IWizardPage) current_page = Instance(IWizardPage) complete = Bool(False) def get_first_page(self): def get_next_page(...
true
true
08f5ba591de849ac4ee516489f2a2982c72dc3c6
177
py
Python
api/serializers.py
ES2-UFPI/404-api
dee5f98a8cb7ce1f4ae8aa0577f52b5b92ffc6a4
[ "Apache-2.0" ]
null
null
null
api/serializers.py
ES2-UFPI/404-api
dee5f98a8cb7ce1f4ae8aa0577f52b5b92ffc6a4
[ "Apache-2.0" ]
12
2019-03-28T14:29:16.000Z
2019-05-26T00:56:12.000Z
api/serializers.py
ES2-UFPI/404-api
dee5f98a8cb7ce1f4ae8aa0577f52b5b92ffc6a4
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers from .models import Portal class PortalSerializer(serializers.ModelSerializer): class Meta: model = Portal fields = '__all__'
19.666667
52
0.774011
from rest_framework import serializers from .models import Portal class PortalSerializer(serializers.ModelSerializer): class Meta: model = Portal fields = '__all__'
true
true
08f5ba7d6b36947ff388a68c195e28081aee5b5d
2,404
py
Python
section_2/src/data_prep/SlicesDataset.py
Harshit4199/3D-imaging-Hippocampal-segmentation
3ba8c0cf354395e4514fc84756b824be18e32eed
[ "MIT" ]
null
null
null
section_2/src/data_prep/SlicesDataset.py
Harshit4199/3D-imaging-Hippocampal-segmentation
3ba8c0cf354395e4514fc84756b824be18e32eed
[ "MIT" ]
null
null
null
section_2/src/data_prep/SlicesDataset.py
Harshit4199/3D-imaging-Hippocampal-segmentation
3ba8c0cf354395e4514fc84756b824be18e32eed
[ "MIT" ]
null
null
null
""" Module for Pytorch dataset representations """ import torch from torch.utils.data import Dataset class SlicesDataset(Dataset): """ This class represents an indexable Torch dataset which could be consumed by the PyTorch DataLoader class """ def __init__(self, data): self.data = data ...
39.409836
103
0.627288
import torch from torch.utils.data import Dataset class SlicesDataset(Dataset): def __init__(self, data): self.data = data self.slices = [] for i, d in enumerate(data): for j in range(d["image"].shape[0]): self.slices.append((i, j)) def __getitem__(self, ...
true
true
08f5baba14dba6cec650cab2858e3dfbb503bf06
3,485
py
Python
tests/utils.py
clpo13/microk8s
3479294a9d9085a9c526f890d5aff5dc97b2ded1
[ "Apache-2.0" ]
null
null
null
tests/utils.py
clpo13/microk8s
3479294a9d9085a9c526f890d5aff5dc97b2ded1
[ "Apache-2.0" ]
null
null
null
tests/utils.py
clpo13/microk8s
3479294a9d9085a9c526f890d5aff5dc97b2ded1
[ "Apache-2.0" ]
null
null
null
import datetime import time import yaml from subprocess import check_output, CalledProcessError def run_until_success(cmd, timeout_insec=60): """ Run a command untill it succeeds or times out. Args: cmd: Command to run timeout_insec: Time out in seconds Returns: The string output of t...
24.201389
88
0.582209
import datetime import time import yaml from subprocess import check_output, CalledProcessError def run_until_success(cmd, timeout_insec=60): deadline = datetime.datetime.now() + datetime.timedelta(seconds=timeout_insec) while True: try: output = check_output(cmd.split()).strip().decode('u...
true
true
08f5bb50d7b34a53e570b82eee06732a4240d066
16,092
py
Python
salt/modules/pip.py
mimianddaniel/booksalt
248c2349fd9a6edc30d48d11673ab72bed4583ce
[ "Apache-2.0" ]
1
2022-02-18T05:30:18.000Z
2022-02-18T05:30:18.000Z
salt/modules/pip.py
mimianddaniel/booksalt
248c2349fd9a6edc30d48d11673ab72bed4583ce
[ "Apache-2.0" ]
null
null
null
salt/modules/pip.py
mimianddaniel/booksalt
248c2349fd9a6edc30d48d11673ab72bed4583ce
[ "Apache-2.0" ]
null
null
null
''' Install Python packages with pip to either the system or a virtualenv ''' # Import python libs import os import logging import shutil # Import salt libs import salt.utils from salt._compat import string_types from salt.exceptions import CommandExecutionError, CommandNotFoundError # It would be cool if we could u...
31.491194
147
0.589299
import os import logging import shutil import salt.utils from salt._compat import string_types from salt.exceptions import CommandExecutionError, CommandNotFoundError # definite way to tell if pip is installed on not. logger = logging.getLogger(__name__) def _get_pip_bin(bin_env): if not bin_env: whic...
true
true
08f5bb79d01d4be5cf6097e37e736043a4cae093
2,627
py
Python
csv2ir.py
Spexivus/csv2ir
73b9d472cb1305c079ff4a484eb1201de6d131e5
[ "MIT" ]
1
2022-03-27T02:46:21.000Z
2022-03-27T02:46:21.000Z
csv2ir.py
Spexivus/csv2ir
73b9d472cb1305c079ff4a484eb1201de6d131e5
[ "MIT" ]
null
null
null
csv2ir.py
Spexivus/csv2ir
73b9d472cb1305c079ff4a484eb1201de6d131e5
[ "MIT" ]
null
null
null
import argparse import os import sys import csv def convert(csv_in, ir_out, protocol="NECext"): with open(csv_in, newline="") as csv_file: csv_reader = csv.reader(csv_file, delimiter=",") next(csv_file) with open(ir_out, "w") as ir_file: ir_file.write(f"Filetype: IR signals fil...
37
85
0.545108
import argparse import os import sys import csv def convert(csv_in, ir_out, protocol="NECext"): with open(csv_in, newline="") as csv_file: csv_reader = csv.reader(csv_file, delimiter=",") next(csv_file) with open(ir_out, "w") as ir_file: ir_file.write(f"Filetype: IR signals fil...
true
true
08f5bc24f750d8ae63817fc61771e26604a9f16c
15,457
py
Python
tests/python_test/test_flush.py
wf-yamaday/milvus
220cc30875b8d442b44c0c042101f23970dcc6fc
[ "Apache-2.0" ]
1
2021-05-25T05:39:22.000Z
2021-05-25T05:39:22.000Z
tests/python_test/test_flush.py
wf-yamaday/milvus
220cc30875b8d442b44c0c042101f23970dcc6fc
[ "Apache-2.0" ]
5
2020-08-04T09:02:55.000Z
2021-05-21T02:02:27.000Z
tests/python_test/test_flush.py
jeffoverflow/milvus
95620070e71f40e902cafb28e58b5b2905dc02fe
[ "Apache-2.0" ]
null
null
null
import time import pdb import threading import logging from multiprocessing import Pool, Process import pytest from utils import * from constants import * DELETE_TIMEOUT = 60 default_single_query = { "bool": { "must": [ {"vector": {default_float_vec_field_name: {"topk": 10, "query": gen_vectors...
39.131646
112
0.631559
import time import pdb import threading import logging from multiprocessing import Pool, Process import pytest from utils import * from constants import * DELETE_TIMEOUT = 60 default_single_query = { "bool": { "must": [ {"vector": {default_float_vec_field_name: {"topk": 10, "query": gen_vectors...
true
true
08f5bc2c06a3f2e2752a319beb33d39be1c44790
31,912
py
Python
script.module.uncoded/lib/resources/lib/modules/regex.py
TheWardoctor/wardoctors-repo
893f646d9e27251ffc00ca5f918e4eb859a5c8f0
[ "Apache-2.0" ]
1
2019-03-05T09:38:10.000Z
2019-03-05T09:38:10.000Z
script.module.uncoded/lib/resources/lib/modules/regex.py
TheWardoctor/wardoctors-repo
893f646d9e27251ffc00ca5f918e4eb859a5c8f0
[ "Apache-2.0" ]
null
null
null
script.module.uncoded/lib/resources/lib/modules/regex.py
TheWardoctor/wardoctors-repo
893f646d9e27251ffc00ca5f918e4eb859a5c8f0
[ "Apache-2.0" ]
1
2021-11-05T20:48:09.000Z
2021-11-05T20:48:09.000Z
# -*- coding: utf-8 -*- ''' bennu Add-on Code ported from Shani's LiveStreamsPro Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (a...
40.090452
373
0.501285
import re import os import sys import urllib import urllib2 import xbmc import xbmcaddon import traceback import cookielib import base64 profile = functions_dir = xbmc.translatePath(xbmcaddon.Addon().getAddonInfo('profile').decode('utf-8')) try: from sqlite3 import dbapi2 as database except: from pysqlite2 import ...
true
true
08f5bc9138e48678a7d8939b57a6eae71291b75e
11,190
py
Python
looker_client_30/looker_sdk/credentials_email.py
gustavs408650/looker_sdk_30
8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c
[ "MIT" ]
null
null
null
looker_client_30/looker_sdk/credentials_email.py
gustavs408650/looker_sdk_30
8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c
[ "MIT" ]
null
null
null
looker_client_30/looker_sdk/credentials_email.py
gustavs408650/looker_sdk_30
8b52449f216b2cb3b84f09e2856bcea1ed4a2b0c
[ "MIT" ]
1
2019-11-12T10:05:51.000Z
2019-11-12T10:05:51.000Z
# coding: utf-8 """ Looker API 3.0 Reference ### Authorization The Looker API uses Looker **API3** credentials for authorization and access control. Looker admins can create API3 credentials on Looker's **Admin/Users** page. Pass API3 credentials to the **/login** endpoint to obtain a temporary access_token....
33.00885
1,639
0.616801
import pprint import re import six class CredentialsEmail(object): swagger_types = { 'email': 'str', 'created_at': 'str', 'logged_in_at': 'str', 'is_disabled': 'bool', 'type': 'str', 'password_reset_url': 'str', 'url': 'str', 'user_url': 'str',...
true
true
08f5bd0089fdb3db54e63b1b152a38c29e3dc91a
289
py
Python
apps/core/utils.py
claudioDcv/Vetadmin
2b5cf78bc7ad58000cedaf2474191d921e61745c
[ "MIT" ]
1
2017-03-18T15:07:00.000Z
2017-03-18T15:07:00.000Z
apps/core/utils.py
claudioDcv/Vetadmin
2b5cf78bc7ad58000cedaf2474191d921e61745c
[ "MIT" ]
null
null
null
apps/core/utils.py
claudioDcv/Vetadmin
2b5cf78bc7ad58000cedaf2474191d921e61745c
[ "MIT" ]
null
null
null
from django.core.validators import RegexValidator phone_regex = RegexValidator( regex=r'^\+?1?\d{9,15}$', message='Phone number must be entered in the format: \'+999999999\'. Up to 15 digits allowed.', # noqa ) STYLE_IMG_MIN = 'height: 50px;' STYLE_IMG_NONE = '/media/none.jpg'
26.272727
106
0.702422
from django.core.validators import RegexValidator phone_regex = RegexValidator( regex=r'^\+?1?\d{9,15}$', message='Phone number must be entered in the format: \'+999999999\'. Up to 15 digits allowed.', ) STYLE_IMG_MIN = 'height: 50px;' STYLE_IMG_NONE = '/media/none.jpg'
true
true
08f5bdaa3b6d267a7729c5289307e34bff9a624d
4,869
py
Python
aws_emr_launch/constructs/emr_constructs/emr_code.py
mbadwalgithub/aws-emr-launch
ec1b8979a3e56141d3e5f7ba9193a5661360bc36
[ "Apache-2.0", "MIT-0" ]
46
2020-06-26T17:20:07.000Z
2022-01-22T16:38:36.000Z
aws_emr_launch/constructs/emr_constructs/emr_code.py
mbadwalgithub/aws-emr-launch
ec1b8979a3e56141d3e5f7ba9193a5661360bc36
[ "Apache-2.0", "MIT-0" ]
4
2020-06-26T19:58:03.000Z
2020-11-13T15:50:33.000Z
aws_emr_launch/constructs/emr_constructs/emr_code.py
mbadwalgithub/aws-emr-launch
ec1b8979a3e56141d3e5f7ba9193a5661360bc36
[ "Apache-2.0", "MIT-0" ]
18
2020-07-07T20:40:21.000Z
2022-02-01T17:45:24.000Z
import enum import glob import os from abc import abstractmethod from typing import Any, Dict, List, Optional from aws_cdk import aws_s3 as s3 from aws_cdk import aws_s3_deployment as s3_deployment from aws_cdk import core class StepFailureAction(enum.Enum): TERMINATE_JOB_FLOW = 'TERMINATE_JOB_FLOW' TERMINAT...
32.898649
119
0.636886
import enum import glob import os from abc import abstractmethod from typing import Any, Dict, List, Optional from aws_cdk import aws_s3 as s3 from aws_cdk import aws_s3_deployment as s3_deployment from aws_cdk import core class StepFailureAction(enum.Enum): TERMINATE_JOB_FLOW = 'TERMINATE_JOB_FLOW' TERMINAT...
true
true
08f5bdaf50cca6261fbbb449b2094742aa8f95b4
4,152
py
Python
src/toast/pipeline_tools/__init__.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
1
2020-06-09T15:11:02.000Z
2020-06-09T15:11:02.000Z
src/toast/pipeline_tools/__init__.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
null
null
null
src/toast/pipeline_tools/__init__.py
giuspugl/toast
4ab2873467d9e02b70901f45ac663f89a8bac1b3
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2019-2020 by the parties listed in the AUTHORS file. # All rights reserved. Use of this source code is governed by # a BSD-style license that can be found in the LICENSE file. import numpy as np from ..timing import function_timer, Timer from ..utils import Logger, Environment from .atm import ( ...
31.454545
87
0.676782
import numpy as np from ..timing import function_timer, Timer from ..utils import Logger, Environment from .atm import ( add_atmosphere_args, simulate_atmosphere, scale_atmosphere_by_frequency, update_atmospheric_noise_weights, ) from .binning import add_binner_args, init_binner, apply_binner from .c...
true
true
08f5bddfb97ddbb8cafc4510d07c911d7a15ff5b
2,634
py
Python
cli/partnerscripts/async_performance_check.py
danielrh135568/symphony-1
54c92a0f8775d1a837ab7c7bd6a08ccd906d28a4
[ "BSD-3-Clause" ]
null
null
null
cli/partnerscripts/async_performance_check.py
danielrh135568/symphony-1
54c92a0f8775d1a837ab7c7bd6a08ccd906d28a4
[ "BSD-3-Clause" ]
12
2022-02-14T04:20:30.000Z
2022-03-28T04:20:17.000Z
cli/partnerscripts/async_performance_check.py
danielrh135568/symphony-1
54c92a0f8775d1a837ab7c7bd6a08ccd906d28a4
[ "BSD-3-Clause" ]
1
2022-02-24T21:47:51.000Z
2022-02-24T21:47:51.000Z
#!/usr/bin/env python3 # Copyright (c) 2004-present Facebook All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import argparse import asyncio import sys from asyncio.events import AbstractEventLoop from datetime import datetime from typing import...
30.275862
87
0.709188
import argparse import asyncio import sys from asyncio.events import AbstractEventLoop from datetime import datetime from typing import Sequence, Tuple from psym import PsymClient from psym.common.data_class import Location from .utils import ( Timer, add_base_args, edit_location_with_time, get_build...
true
true
08f5bef2e6d8b04a01b223d204b7f28cef32973f
28,957
py
Python
src/mturk_utils.py
maadolph/P.808
23f222bd8bdb3c704b9496fe0996aeda25227166
[ "MIT" ]
null
null
null
src/mturk_utils.py
maadolph/P.808
23f222bd8bdb3c704b9496fe0996aeda25227166
[ "MIT" ]
null
null
null
src/mturk_utils.py
maadolph/P.808
23f222bd8bdb3c704b9496fe0996aeda25227166
[ "MIT" ]
null
null
null
""" /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *----------------------------------------------------------...
45.458399
138
0.595435
import argparse import boto3 import json import os import configparser as CP import csv import xml.etree.ElementTree as ET import re import random def send_message(client, cfg): worker_ids = cfg['worker_ids'].replace(' ','').split(',') worker_pack_size = 100 chunked_worker_ids = [wor...
true
true
08f5bfb3e72acd923d9b0085ea51d4e9a00f8f6d
109
py
Python
xdl/blueprints/procedure/__init__.py
mcrav/xdl
c120a1cf50a9b668a79b118700930eb3d60a9298
[ "MIT" ]
null
null
null
xdl/blueprints/procedure/__init__.py
mcrav/xdl
c120a1cf50a9b668a79b118700930eb3d60a9298
[ "MIT" ]
null
null
null
xdl/blueprints/procedure/__init__.py
mcrav/xdl
c120a1cf50a9b668a79b118700930eb3d60a9298
[ "MIT" ]
null
null
null
from .procedure_generic import GenericBlueprint from .procedure_cross_coupling import CrossCouplingBlueprint
36.333333
60
0.908257
from .procedure_generic import GenericBlueprint from .procedure_cross_coupling import CrossCouplingBlueprint
true
true
08f5bfede4cdc21053c2fe85a4197ff6b622b1ae
1,590
py
Python
det3d/torchie/trainer/hooks/logger/base.py
PatrickChoDev/CSA-3D
34aa87194d653a93f16834d485738255f55112f0
[ "Apache-2.0" ]
1,318
2019-09-13T06:57:32.000Z
2022-03-31T07:01:21.000Z
det3d/torchie/trainer/hooks/logger/base.py
PatrickChoDev/CSA-3D
34aa87194d653a93f16834d485738255f55112f0
[ "Apache-2.0" ]
290
2020-06-23T01:29:04.000Z
2022-03-29T16:27:32.000Z
det3d/torchie/trainer/hooks/logger/base.py
PatrickChoDev/CSA-3D
34aa87194d653a93f16834d485738255f55112f0
[ "Apache-2.0" ]
326
2020-06-22T01:48:10.000Z
2022-03-31T08:15:08.000Z
from abc import ABCMeta, abstractmethod from ..hook import Hook class LoggerHook(Hook): """Base class for logger hooks Args: interval (int) ignore_last (bool) reset_flag (bool) """ __metaclass__ = ABCMeta def __init__(self, interval=10, ignore_last=True, reset_flag=Fals...
27.413793
72
0.620755
from abc import ABCMeta, abstractmethod from ..hook import Hook class LoggerHook(Hook): __metaclass__ = ABCMeta def __init__(self, interval=10, ignore_last=True, reset_flag=False): self.interval = interval self.ignore_last = ignore_last self.reset_flag = reset_flag @abstractmet...
true
true