hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c3a0489faa5738e1ae8fa620e28a30b3b94d720
2,746
py
Python
src/lib/mqtt/sensor.py
l-maia/viseron
d762be93db74f780db13ac332bf8673c41592aa9
[ "MIT" ]
null
null
null
src/lib/mqtt/sensor.py
l-maia/viseron
d762be93db74f780db13ac332bf8673c41592aa9
[ "MIT" ]
null
null
null
src/lib/mqtt/sensor.py
l-maia/viseron
d762be93db74f780db13ac332bf8673c41592aa9
[ "MIT" ]
null
null
null
import json from lib.helpers import slugify class MQTTSensor: def __init__(self, config, mqtt_queue, name): self._config = config self._mqtt_queue = mqtt_queue self._name = f"{config.mqtt.client_id} {config.camera.name} {name}" self._device_name = f"{config.mqtt.client_id} {config....
29.212766
84
0.600874
import json from lib.helpers import slugify class MQTTSensor: def __init__(self, config, mqtt_queue, name): self._config = config self._mqtt_queue = mqtt_queue self._name = f"{config.mqtt.client_id} {config.camera.name} {name}" self._device_name = f"{config.mqtt.client_id} {config....
true
true
1c3a05c7780dc4b89e6509fe42e1252e48bf8c32
1,256
py
Python
sequentialAI.py
gauderkd/minesweeper
2d514a18eb1828dfa577e6eb80ede36198e798f9
[ "MIT" ]
null
null
null
sequentialAI.py
gauderkd/minesweeper
2d514a18eb1828dfa577e6eb80ede36198e798f9
[ "MIT" ]
1
2018-05-07T22:44:33.000Z
2018-05-07T22:48:08.000Z
sequentialAI.py
gauderkd/minesweeper
2d514a18eb1828dfa577e6eb80ede36198e798f9
[ "MIT" ]
null
null
null
import minesweeper as ms import random class SeqAI(ms.GameAI): def __init__(self): self.width = 0 self.height = 0 self.exposed_squares = set() def init(self, config): self.width = config.width self.height = config.height self.x = self.width self.y = sel...
27.304348
121
0.56449
import minesweeper as ms import random class SeqAI(ms.GameAI): def __init__(self): self.width = 0 self.height = 0 self.exposed_squares = set() def init(self, config): self.width = config.width self.height = config.height self.x = self.width self.y = sel...
true
true
1c3a06a9617799adff0fc38ffb2f2c20583fe833
11,265
py
Python
dregcli/tests/tests_unit/test_client.py
jssuzanne/dregcli
328e8aacf4e46f538e2b62c8c3cceba002feb367
[ "MIT" ]
null
null
null
dregcli/tests/tests_unit/test_client.py
jssuzanne/dregcli
328e8aacf4e46f538e2b62c8c3cceba002feb367
[ "MIT" ]
1
2019-04-12T13:46:52.000Z
2019-04-15T15:26:47.000Z
dregcli/tests/tests_unit/test_client.py
jssuzanne/dregcli
328e8aacf4e46f538e2b62c8c3cceba002feb367
[ "MIT" ]
1
2019-04-12T13:44:53.000Z
2019-04-12T13:44:53.000Z
import os import requests import sys from unittest import mock import pytest sys.path.append( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir) ) import tools from fixtures import ( fixture_registry_url, fixture_repositories_url, fixture_repository, fixture_repositories, fixt...
35.990415
78
0.631425
import os import requests import sys from unittest import mock import pytest sys.path.append( os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir) ) import tools from fixtures import ( fixture_registry_url, fixture_repositories_url, fixture_repository, fixture_repositories, fixt...
true
true
1c3a072c9257cb35a4b114517b2326d9431865e8
1,040
py
Python
vkwave/bots/core/tokens/storage.py
tdakkota/vkwave
8d8f55a541f51ee76be398e0a646131697d3ba17
[ "MIT" ]
null
null
null
vkwave/bots/core/tokens/storage.py
tdakkota/vkwave
8d8f55a541f51ee76be398e0a646131697d3ba17
[ "MIT" ]
null
null
null
vkwave/bots/core/tokens/storage.py
tdakkota/vkwave
8d8f55a541f51ee76be398e0a646131697d3ba17
[ "MIT" ]
null
null
null
from typing import Dict, Generic, Optional, TypeVar from vkwave.api.token.token import AnyABCToken from .strategy import ABCGetTokenStrategy, NotImplementedGetTokenStrategy from .types import GroupId, UserId T = TypeVar("T", GroupId, UserId) class TokenStorage(Generic[T]): def __init__( self, av...
33.548387
73
0.698077
from typing import Dict, Generic, Optional, TypeVar from vkwave.api.token.token import AnyABCToken from .strategy import ABCGetTokenStrategy, NotImplementedGetTokenStrategy from .types import GroupId, UserId T = TypeVar("T", GroupId, UserId) class TokenStorage(Generic[T]): def __init__( self, av...
true
true
1c3a095fee2d73da2808d86e12fb875b52531c08
663
py
Python
manage.py
julesc00/bizland
ca5a6ddf71f9e7fc2162e71f8abb9dbe8e9a2b15
[ "MIT" ]
null
null
null
manage.py
julesc00/bizland
ca5a6ddf71f9e7fc2162e71f8abb9dbe8e9a2b15
[ "MIT" ]
null
null
null
manage.py
julesc00/bizland
ca5a6ddf71f9e7fc2162e71f8abb9dbe8e9a2b15
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bizland.settings') try: from django.core.management import execute_from_command_line except Impo...
28.826087
73
0.678733
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bizland.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
1c3a097c66087f9cfbdc47a2c177917a90eb2c6e
6,555
py
Python
goblet/tests/test_pubsub.py
Aaron-Gill/goblet
30c0dd73b2f39e443adb2ccda6f9009e980c53ee
[ "Apache-2.0" ]
null
null
null
goblet/tests/test_pubsub.py
Aaron-Gill/goblet
30c0dd73b2f39e443adb2ccda6f9009e980c53ee
[ "Apache-2.0" ]
null
null
null
goblet/tests/test_pubsub.py
Aaron-Gill/goblet
30c0dd73b2f39e443adb2ccda6f9009e980c53ee
[ "Apache-2.0" ]
null
null
null
from goblet import Goblet from goblet.deploy import Deployer from goblet.resources.pubsub import PubSub from goblet.test_utils import get_responses, dummy_function from unittest.mock import Mock import base64 import pytest class TestPubSub: def test_add_topic(self): app = Goblet(function_name="goblet_exa...
36.416667
87
0.62868
from goblet import Goblet from goblet.deploy import Deployer from goblet.resources.pubsub import PubSub from goblet.test_utils import get_responses, dummy_function from unittest.mock import Mock import base64 import pytest class TestPubSub: def test_add_topic(self): app = Goblet(function_name="goblet_exa...
true
true
1c3a098bce7e34736029624bf9e5635352dd5aae
2,008
py
Python
librerias/redNeuronal.py
Hengstenberg11/RedesNeuronales
62bda5c8a6fc7f0e4207f7b6eb47617800bb3ebf
[ "MIT" ]
null
null
null
librerias/redNeuronal.py
Hengstenberg11/RedesNeuronales
62bda5c8a6fc7f0e4207f7b6eb47617800bb3ebf
[ "MIT" ]
null
null
null
librerias/redNeuronal.py
Hengstenberg11/RedesNeuronales
62bda5c8a6fc7f0e4207f7b6eb47617800bb3ebf
[ "MIT" ]
null
null
null
#Neural network utils #This code was not implemented by me import numpy as np from functools import reduce flatten_list_of_arrays = lambda list_of_arrays: reduce( lambda acc, v: np.array([*acc.flatten(), *v.flatten()]), list_of_arrays ) def inflate_matrixes(flat_thetas, shapes): layers = len(shapes) + 1 ...
26.077922
86
0.516932
import numpy as np from functools import reduce flatten_list_of_arrays = lambda list_of_arrays: reduce( lambda acc, v: np.array([*acc.flatten(), *v.flatten()]), list_of_arrays ) def inflate_matrixes(flat_thetas, shapes): layers = len(shapes) + 1 sizes = [shape[0] * shape[1] for shape in shapes] s...
true
true
1c3a0a13bcb236054b96031d2aecd04c21aae446
2,683
py
Python
paypal/standard/ipn/views.py
diegoguimaraes/django-paypal
a075698cfa7cded3a9fef9d7ec33f75c35abcd4a
[ "MIT" ]
1
2015-06-16T12:37:48.000Z
2015-06-16T12:37:48.000Z
paypal/standard/ipn/views.py
diegoguimaraes/django-paypal
a075698cfa7cded3a9fef9d7ec33f75c35abcd4a
[ "MIT" ]
null
null
null
paypal/standard/ipn/views.py
diegoguimaraes/django-paypal
a075698cfa7cded3a9fef9d7ec33f75c35abcd4a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.http import HttpResponse, QueryDict from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from paypal.standard.ipn.forms import PayPalIPNForm from paypal.standard.ipn.models import PayPalIPN @require_POST @c...
33.962025
83
0.637719
from django.http import HttpResponse, QueryDict from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from paypal.standard.ipn.forms import PayPalIPNForm from paypal.standard.ipn.models import PayPalIPN @require_POST @csrf_exempt def ipn(request, item_check_callabl...
true
true
1c3a0d6055b42ec0cbbe6d0de3b308f9cfea0620
46,749
bzl
Python
aspect/intellij_info_impl.bzl
Canva/bazelbuild-intellij
a878bf6d430bf4bdf0eacf1a2208a6bcc43beaab
[ "Apache-2.0" ]
10
2020-10-27T12:31:11.000Z
2021-12-12T05:37:55.000Z
aspect/intellij_info_impl.bzl
Canva/bazelbuild-intellij
a878bf6d430bf4bdf0eacf1a2208a6bcc43beaab
[ "Apache-2.0" ]
4
2020-08-04T02:05:42.000Z
2020-12-16T02:34:15.000Z
aspect/intellij_info_impl.bzl
Canva/bazelbuild-intellij
a878bf6d430bf4bdf0eacf1a2208a6bcc43beaab
[ "Apache-2.0" ]
2
2020-08-29T03:23:32.000Z
2021-09-30T12:10:12.000Z
"""Implementation of IntelliJ-specific information collecting aspect.""" load( ":artifacts.bzl", "artifact_location", "artifacts_from_target_list_attr", "is_external_artifact", "sources_from_target", "struct_omit_none", "to_artifact_location", ) load( ":make_variables.bzl", "expand_...
39.752551
182
0.692229
load( ":artifacts.bzl", "artifact_location", "artifacts_from_target_list_attr", "is_external_artifact", "sources_from_target", "struct_omit_none", "to_artifact_location", ) load( ":make_variables.bzl", "expand_make_variables", ) UNSUPPORTED_FEATURES = [ "thin_lto", "module_...
true
true
1c3a0ef8833d5f5f7f870585249aa59d0099ab33
1,446
py
Python
src/dms-preview/setup.py
michimune/azure-cli-extensions
697e2c674e5c0825d44c72d714542fe01331e107
[ "MIT" ]
1
2022-03-22T15:02:32.000Z
2022-03-22T15:02:32.000Z
src/dms-preview/setup.py
michimune/azure-cli-extensions
697e2c674e5c0825d44c72d714542fe01331e107
[ "MIT" ]
1
2018-11-19T05:12:58.000Z
2018-11-19T05:12:58.000Z
src/dms-preview/setup.py
michimune/azure-cli-extensions
697e2c674e5c0825d44c72d714542fe01331e107
[ "MIT" ]
1
2021-06-03T19:31:10.000Z
2021-06-03T19:31:10.000Z
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
34.428571
94
0.598893
from codecs import open from setuptools import setup, find_packages VERSION = "0.10.0" CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 2', '...
true
true
1c3a0f511fdff5f80c0a5f8c3f07040f6c7436aa
99,991
py
Python
env/Lib/site-packages/plotly/graph_objs/_streamtube.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
7
2022-01-16T12:28:16.000Z
2022-03-04T15:31:45.000Z
env/Lib/site-packages/plotly/graph_objs/_streamtube.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
14
2021-10-20T23:33:47.000Z
2021-12-21T04:50:37.000Z
env/Lib/site-packages/plotly/graph_objs/_streamtube.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Streamtube(_BaseTraceType): # class properties # -------------------- _parent_path_str = "" _path_str = "streamtube" _valid_props = { "autocolorscale", "cauto", "cmax", "cmi...
36.333939
126
0.55325
from plotly.basedatatypes import BaseTraceType as _BaseTraceType import copy as _copy class Streamtube(_BaseTraceType): _parent_path_str = "" _path_str = "streamtube" _valid_props = { "autocolorscale", "cauto", "cmax", "cmid", "cmin", "coloraxis", ...
true
true
1c3a0f86367d0b2648d0535180f1f5ee0e6746ce
6,571
py
Python
tests/ipfwd/test_dip_sip.py
shikenghua/sonic-mgmt
86dc68795794730dc25c91eb66b9fe3ae47538d8
[ "Apache-2.0" ]
null
null
null
tests/ipfwd/test_dip_sip.py
shikenghua/sonic-mgmt
86dc68795794730dc25c91eb66b9fe3ae47538d8
[ "Apache-2.0" ]
null
null
null
tests/ipfwd/test_dip_sip.py
shikenghua/sonic-mgmt
86dc68795794730dc25c91eb66b9fe3ae47538d8
[ "Apache-2.0" ]
null
null
null
import pytest import ptf.testutils as testutils from ipaddress import ip_address import logging TOPO_LIST = {'t0', 't1', 't1-lag'} PORTS_TOPO = {'t1'} LAG_TOPO = {'t0', 't1-lag'} DEFAULT_HLIM_TTL = 64 WAIT_EXPECTED_PACKET_TIMEOUT = 5 logger = logging.getLogger(__name__) @pytest.fixture(scope='function', autouse=Tru...
39.347305
123
0.697459
import pytest import ptf.testutils as testutils from ipaddress import ip_address import logging TOPO_LIST = {'t0', 't1', 't1-lag'} PORTS_TOPO = {'t1'} LAG_TOPO = {'t0', 't1-lag'} DEFAULT_HLIM_TTL = 64 WAIT_EXPECTED_PACKET_TIMEOUT = 5 logger = logging.getLogger(__name__) @pytest.fixture(scope='function', autouse=Tru...
true
true
1c3a0fc8179469d205422ebdf25455570f2a5fae
18,384
py
Python
Coloring/mayuyu.py
MuAuan/llightning-pytorch
38dc9ed75dd8e6f4a2a05e5a10072a549dcbf4d6
[ "MIT" ]
null
null
null
Coloring/mayuyu.py
MuAuan/llightning-pytorch
38dc9ed75dd8e6f4a2a05e5a10072a549dcbf4d6
[ "MIT" ]
null
null
null
Coloring/mayuyu.py
MuAuan/llightning-pytorch
38dc9ed75dd8e6f4a2a05e5a10072a549dcbf4d6
[ "MIT" ]
null
null
null
import numpy as np import torch import torchvision from torch.utils.data import DataLoader, random_split from torchvision import transforms import cv2 import matplotlib.pyplot as plt import glob import os from PIL import Image ts = transforms.ToPILImage() ts2 = transforms.ToTensor() ts3 = transforms.Grayscale() mean...
27.812405
179
0.652034
import numpy as np import torch import torchvision from torch.utils.data import DataLoader, random_split from torchvision import transforms import cv2 import matplotlib.pyplot as plt import glob import os from PIL import Image ts = transforms.ToPILImage() ts2 = transforms.ToTensor() ts3 = transforms.Grayscale() mean...
true
true
1c3a114f979fba909242856047e6d418f7d92ff4
4,052
py
Python
LC36 - Sudoku Validator.py
karthyvenky/LeetCode-Challenges
7015c741db3d84917915d6989669f9ffcaad9bd2
[ "CC0-1.0" ]
null
null
null
LC36 - Sudoku Validator.py
karthyvenky/LeetCode-Challenges
7015c741db3d84917915d6989669f9ffcaad9bd2
[ "CC0-1.0" ]
null
null
null
LC36 - Sudoku Validator.py
karthyvenky/LeetCode-Challenges
7015c741db3d84917915d6989669f9ffcaad9bd2
[ "CC0-1.0" ]
null
null
null
#%% nboard = \ [[".",".",".",".","5",".",".","1","."],\ [".","4",".","3",".",".",".",".","."],\ [".",".",".",".",".","3",".",".","1"],\ ["8",".",".",".",".",".",".","2","."],\ [".",".","2",".","7",".",".",".","."],\ [".","1","5",".",".",".",".",".","."],\ [".",".",".",".",".","2","."...
31.905512
89
0.291461
nboard = \ [[".",".",".",".","5",".",".","1","."],\ [".","4",".","3",".",".",".",".","."],\ [".",".",".",".",".","3",".",".","1"],\ ["8",".",".",".",".",".",".","2","."],\ [".",".","2",".","7",".",".",".","."],\ [".","1","5",".",".",".",".",".","."],\ [".",".",".",".",".","2",".",".",...
true
true
1c3a129bbe9c3af1209933456706d1c2ec1f684a
248
py
Python
dms/v2/packages.py
moreal/DMS-api
9624e28764ec4535002677671e10a09d762d19a8
[ "MIT" ]
null
null
null
dms/v2/packages.py
moreal/DMS-api
9624e28764ec4535002677671e10a09d762d19a8
[ "MIT" ]
null
null
null
dms/v2/packages.py
moreal/DMS-api
9624e28764ec4535002677671e10a09d762d19a8
[ "MIT" ]
1
2018-09-29T14:35:20.000Z
2018-09-29T14:35:20.000Z
import sys for package in ('requests'): locals()[package] = __import__(package) for mod in list(sys.modules): if mod == package or mod.startswith(package + '.'): sys.modules['dms.v2.packages.' + mod] = sys.modules[mod]
31
68
0.620968
import sys for package in ('requests'): locals()[package] = __import__(package) for mod in list(sys.modules): if mod == package or mod.startswith(package + '.'): sys.modules['dms.v2.packages.' + mod] = sys.modules[mod]
true
true
1c3a12ef1cd4e0f581ffdaad005538696947690e
1,922
py
Python
tests/cli/helpers/temporary_directory.py
pyllyukko/plaso
7533db2d1035ca71d264d6281ebd5db2d073c587
[ "Apache-2.0" ]
2
2019-10-23T03:37:59.000Z
2020-08-14T17:09:26.000Z
tests/cli/helpers/temporary_directory.py
pyllyukko/plaso
7533db2d1035ca71d264d6281ebd5db2d073c587
[ "Apache-2.0" ]
null
null
null
tests/cli/helpers/temporary_directory.py
pyllyukko/plaso
7533db2d1035ca71d264d6281ebd5db2d073c587
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the temporary directory CLI arguments helper.""" import argparse import unittest from plaso.cli import tools from plaso.cli.helpers import temporary_directory from plaso.lib import errors from tests.cli import test_lib as cli_test_lib class TemporaryDirec...
30.507937
74
0.745057
import argparse import unittest from plaso.cli import tools from plaso.cli.helpers import temporary_directory from plaso.lib import errors from tests.cli import test_lib as cli_test_lib class TemporaryDirectoryArgumentsHelperTest(cli_test_lib.CLIToolTestCase): _EXPECTED_OUTPUT = """\ usage: cli_helper.py [--...
true
true
1c3a149ad74473bd5f42e191543cf2c08692361f
1,224
py
Python
sphinx/testing/restructuredtext.py
rhssk/sphinx
3ce40c819eef50cc317e815b909747c3853b1c53
[ "BSD-2-Clause" ]
3
2020-01-04T16:46:59.000Z
2020-10-09T03:04:31.000Z
sphinx/testing/restructuredtext.py
rhssk/sphinx
3ce40c819eef50cc317e815b909747c3853b1c53
[ "BSD-2-Clause" ]
10
2021-06-16T20:48:32.000Z
2021-10-04T18:22:02.000Z
sphinx/testing/restructuredtext.py
rhssk/sphinx
3ce40c819eef50cc317e815b909747c3853b1c53
[ "BSD-2-Clause" ]
1
2019-11-05T15:21:55.000Z
2019-11-05T15:21:55.000Z
""" sphinx.testing.restructuredtext ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from os import path from docutils import nodes from docutils.core import publish_doctree from sphinx.application import Sph...
34
81
0.597222
from os import path from docutils import nodes from docutils.core import publish_doctree from sphinx.application import Sphinx from sphinx.io import SphinxStandaloneReader from sphinx.parsers import RSTParser from sphinx.util.docutils import sphinx_domains def parse(app: Sphinx, text: str, docname: str = 'index') ...
true
true
1c3a14e1e652ffa1a3d7f993ee01c34bfefbcfdb
17,195
py
Python
frigate/object_processing.py
vinodsr/frigate
3b04169c8b53b5653ad9b26d5bbe6313cbeff08d
[ "MIT" ]
1
2020-10-10T12:14:53.000Z
2020-10-10T12:14:53.000Z
frigate/object_processing.py
vinodsr/frigate
3b04169c8b53b5653ad9b26d5bbe6313cbeff08d
[ "MIT" ]
null
null
null
frigate/object_processing.py
vinodsr/frigate
3b04169c8b53b5653ad9b26d5bbe6313cbeff08d
[ "MIT" ]
null
null
null
import json import hashlib import datetime import time import copy import cv2 import threading import queue import copy import numpy as np from collections import Counter, defaultdict import itertools import pyarrow.plasma as plasma import matplotlib.pyplot as plt from frigate.util import draw_box_with_label, PlasmaFra...
45.731383
183
0.591335
import json import hashlib import datetime import time import copy import cv2 import threading import queue import copy import numpy as np from collections import Counter, defaultdict import itertools import pyarrow.plasma as plasma import matplotlib.pyplot as plt from frigate.util import draw_box_with_label, PlasmaFra...
true
true
1c3a14f6373f5e746766bdb8b5b9833d0933dd39
3,840
bzl
Python
repositories.bzl
halfbaked/gapic-generator-java
542ede4f7e0a55165daf243ec45d79fcfa2d2e20
[ "Apache-2.0" ]
null
null
null
repositories.bzl
halfbaked/gapic-generator-java
542ede4f7e0a55165daf243ec45d79fcfa2d2e20
[ "Apache-2.0" ]
null
null
null
repositories.bzl
halfbaked/gapic-generator-java
542ede4f7e0a55165daf243ec45d79fcfa2d2e20
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
39.587629
127
0.682031
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_jar") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external") load("//:PROPERTIES.bzl", "PROPERTIES") def gapic_generator_java_repositories(): for name, arti...
true
true
1c3a17637ec9bb74600d9835d12ef7486281ba2a
9,274
py
Python
sdk/python/pulumi_azure_nextgen/network/v20150501preview/get_security_rule.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20150501preview/get_security_rule.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20150501preview/get_security_rule.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __a...
43.952607
293
0.681583
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ 'GetSecurityRuleResult', 'AwaitableGetSecurityRuleResult', 'get_security_rule', ] @pulumi.output_type class GetSecurityRuleResult: def __init_...
true
true
1c3a18b7e75cb6b3381baffca895ca2eb64b4af6
1,152
py
Python
models/model_factory.py
qiaozhijian/PLReg3D
35e7df28eb64abf6f6dc9f31c77e8042123242f3
[ "MIT" ]
1
2022-03-23T09:21:20.000Z
2022-03-23T09:21:20.000Z
models/model_factory.py
qiaozhijian/PLReg3D
35e7df28eb64abf6f6dc9f31c77e8042123242f3
[ "MIT" ]
null
null
null
models/model_factory.py
qiaozhijian/PLReg3D
35e7df28eb64abf6f6dc9f31c77e8042123242f3
[ "MIT" ]
1
2021-12-28T13:53:14.000Z
2021-12-28T13:53:14.000Z
# Author: Jacek Komorowski # Warsaw University of Technology import torch import models.minkloc as minkloc def model_factory(params): in_channels = 32 if params.use_unet else 1 if 'MinkFPN' in params.model_params.model: model = minkloc.MinkLoc(params.model_params.model, in_channels=in_channels, ...
39.724138
154
0.684028
import torch import models.minkloc as minkloc def model_factory(params): in_channels = 32 if params.use_unet else 1 if 'MinkFPN' in params.model_params.model: model = minkloc.MinkLoc(params.model_params.model, in_channels=in_channels, feature_size=params.model_params.f...
true
true
1c3a18c0791b43869415881c48904a49e629fe38
2,983
py
Python
examples/context_free_grammar_simple_parser.py
TuringApproved/Turing_Neural_Networks
50101d20c8dc7cfa37db46e0f29bd6d79f66eaad
[ "MIT" ]
3
2016-04-13T20:36:25.000Z
2018-11-14T11:12:51.000Z
examples/context_free_grammar_simple_parser.py
TuringMachinegun/Turing_Neural_Networks
50101d20c8dc7cfa37db46e0f29bd6d79f66eaad
[ "MIT" ]
null
null
null
examples/context_free_grammar_simple_parser.py
TuringMachinegun/Turing_Neural_Networks
50101d20c8dc7cfa37db46e0f29bd6d79f66eaad
[ "MIT" ]
null
null
null
__author__ = "Giovanni Sirio Carmantini" """In this file we reproduce the simple parser from beim Graben, P., & Potthast, R. (2014). Universal neural field computation. In Neural Fields (pp. 299-318). First, the Context Free Grammar is used to create a Generalized Shift, an NDA simulating the GS is then created, th...
27.62037
113
0.670801
__author__ = "Giovanni Sirio Carmantini" import matplotlib.pyplot as plt import numpy as np from matplotlib.patches import Rectangle from tnnpy import GodelEncoder, SimpleCFGeneralizedShift, NonlinearDynamicalAutomaton, NeuralTM, plot_symbologram input_symbols = ["NP", "V"] stack_symbols = ["NP", "V", "VP", "S"] par...
true
true
1c3a19fb4b785cfafab9f8007b5cbd7a1eafe293
1,267
py
Python
experiments/experiment_9.py
arijitnoobstar/OnitamaDeepRL
e561b22fe7728f51c1f1a078dfb19aa008bf010e
[ "Apache-2.0" ]
3
2021-05-16T08:43:09.000Z
2021-05-31T16:23:43.000Z
experiments/experiment_9.py
mion666459/OnitamaAI
e561b22fe7728f51c1f1a078dfb19aa008bf010e
[ "Apache-2.0" ]
null
null
null
experiments/experiment_9.py
mion666459/OnitamaAI
e561b22fe7728f51c1f1a078dfb19aa008bf010e
[ "Apache-2.0" ]
1
2021-05-28T10:07:50.000Z
2021-05-28T10:07:50.000Z
# access Train.py in parent folder and set relative folder to parent folder for data saving import os import sys os.chdir("..") sys.path.insert(1, os.path.join(sys.path[0], '..')) from Train import * """ The purpose of this experiment is to test and evaluate how the AI performs if we forgo validity completely and onl...
45.25
142
0.718232
import os import sys os.chdir("..") sys.path.insert(1, os.path.join(sys.path[0], '..')) from Train import * ep_num = 20000 plot_every = 4000 moving_average = 50 minimax_boost = 0 onitama_deeprl_train("train", "DDPG", ep_num, "testing_actions_only", "minimax", 1, discount_rate = 0.99, lr_actor = 0.001, l...
true
true
1c3a1c2475b27f14649ff6985fd19df30171ea47
1,710
py
Python
botnet_detection.py
ahv15/Mininet
b5cdc5282a0b4324b6ece5f4a1756fc0232af8dd
[ "Apache-2.0" ]
null
null
null
botnet_detection.py
ahv15/Mininet
b5cdc5282a0b4324b6ece5f4a1756fc0232af8dd
[ "Apache-2.0" ]
null
null
null
botnet_detection.py
ahv15/Mininet
b5cdc5282a0b4324b6ece5f4a1756fc0232af8dd
[ "Apache-2.0" ]
null
null
null
import numpy as np from netml.ndm.iforest import IF from netml.pparser.parser import PCAP from sklearn.model_selection import train_test_split from netml.ndm.model import MODEL from netml.utils.tool import dump_data, load_data pcap = PCAP( "D:\\BotnetDetection\\isot_app_and_botnet_dataset\\application_data...
38.863636
156
0.754386
import numpy as np from netml.ndm.iforest import IF from netml.pparser.parser import PCAP from sklearn.model_selection import train_test_split from netml.ndm.model import MODEL from netml.utils.tool import dump_data, load_data pcap = PCAP( "D:\\BotnetDetection\\isot_app_and_botnet_dataset\\application_data...
true
true
1c3a1c6e8ad20e4a46fd96aa5054665866ea0ed0
443
py
Python
cookiecutter_toot/cli.py
gnargnor/cookiecutter-toot
1b695ca882908ef3b529fd3d0189129733d0443d
[ "MIT" ]
null
null
null
cookiecutter_toot/cli.py
gnargnor/cookiecutter-toot
1b695ca882908ef3b529fd3d0189129733d0443d
[ "MIT" ]
320
2018-07-05T03:20:13.000Z
2022-03-31T18:20:22.000Z
cookiecutter_toot/cli.py
gnargnor/cookiecutter-toot
1b695ca882908ef3b529fd3d0189129733d0443d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Console script for cookiecutter_toot.""" import sys import click @click.command() def main(args=None): """Console script for cookiecutter_toot.""" click.echo("Replace this message by putting your code into " "cookiecutter_toot.cli.main") click.echo("See click doc...
23.315789
68
0.6614
import sys import click @click.command() def main(args=None): click.echo("Replace this message by putting your code into " "cookiecutter_toot.cli.main") click.echo("See click documentation at http://click.pocoo.org/") return 0 if __name__ == "__main__": sys.exit(main())
true
true
1c3a2050f888beac1d4939c8590d07745cf44b78
5,232
py
Python
capablerobot_usbhub/config.py
nzsmith1/CapableRobot_USBHub_Driver
1ec323c485be25f122ace7be20fccba39cdec517
[ "MIT" ]
16
2019-07-01T23:47:22.000Z
2022-02-14T21:16:33.000Z
capablerobot_usbhub/config.py
METHLAB-LTD/CapableRobot_USBHub_Driver
c43d709c776b208b2726df73d6f1dee926723623
[ "MIT" ]
2
2020-01-08T08:30:39.000Z
2022-02-23T00:49:09.000Z
capablerobot_usbhub/config.py
METHLAB-LTD/CapableRobot_USBHub_Driver
c43d709c776b208b2726df73d6f1dee926723623
[ "MIT" ]
6
2020-01-07T15:37:23.000Z
2022-02-07T08:25:36.000Z
# The MIT License (MIT) # # Copyright (c) 2019 Chris Osterwood for Capable Robot Components # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation...
27.108808
111
0.605313
import logging import time import usb.core import usb.util from .util import * _MEM_WRITE = 0x0914 _MEM_READ = 0x0924 _CRC8_POLYNOMIAL = 0x31 _CRC8_INIT = 0xFF _CMD_NOOP = 0b000 _CMD_GET = 0b001 _CMD_SET = 0b010 _CMD_SAVE = 0b100 _CMD_RESET = 0b111 _WAIT = 0.1 _NAME_RO = [ "firmware_version", ...
true
true
1c3a207df261959e3dec0c81294682086ee3f0cb
432
py
Python
gokart/zip_client_util.py
davegrays/gokart
64999e5441217eafa5f0a6f3d2ee9aea04df740e
[ "MIT" ]
255
2019-01-02T01:31:37.000Z
2022-03-29T13:35:18.000Z
gokart/zip_client_util.py
davegrays/gokart
64999e5441217eafa5f0a6f3d2ee9aea04df740e
[ "MIT" ]
208
2018-12-25T04:32:24.000Z
2022-03-28T07:28:59.000Z
gokart/zip_client_util.py
davegrays/gokart
64999e5441217eafa5f0a6f3d2ee9aea04df740e
[ "MIT" ]
48
2019-01-11T06:22:05.000Z
2022-02-11T07:38:42.000Z
from gokart.object_storage import ObjectStorage from gokart.zip_client import LocalZipClient, ZipClient def make_zip_client(file_path: str, temporary_directory: str) -> ZipClient: if ObjectStorage.if_object_storage_path(file_path): return ObjectStorage.get_zip_client(file_path=file_path, temporary_directo...
48
105
0.842593
from gokart.object_storage import ObjectStorage from gokart.zip_client import LocalZipClient, ZipClient def make_zip_client(file_path: str, temporary_directory: str) -> ZipClient: if ObjectStorage.if_object_storage_path(file_path): return ObjectStorage.get_zip_client(file_path=file_path, temporary_directo...
true
true
1c3a21d3744a60da31d15ea3e386c9b75fda40e7
52,048
py
Python
tests/modeladmin/tests.py
xavfernandez/django
daaeb8415823444a9020460cf825efc3fae866a2
[ "BSD-3-Clause" ]
2
2016-07-23T18:08:37.000Z
2016-07-24T09:54:34.000Z
tests/modeladmin/tests.py
xavfernandez/django
daaeb8415823444a9020460cf825efc3fae866a2
[ "BSD-3-Clause" ]
null
null
null
tests/modeladmin/tests.py
xavfernandez/django
daaeb8415823444a9020460cf825efc3fae866a2
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from datetime import date import warnings from django import forms from django.contrib.admin.options import (ModelAdmin, TabularInline, HORIZONTAL, VERTICAL) from django.contrib.admin.sites import AdminSite from django.contrib.admin.widgets import AdminDateWidget, AdminRad...
34.219592
136
0.625231
from __future__ import unicode_literals from datetime import date import warnings from django import forms from django.contrib.admin.options import (ModelAdmin, TabularInline, HORIZONTAL, VERTICAL) from django.contrib.admin.sites import AdminSite from django.contrib.admin.widgets import AdminDateWidget, AdminRad...
true
true
1c3a220f387499a22b6713a0120726e781bf0a21
175
py
Python
amazonadapi/__init__.py
barce/amazonadapi
76558774f26a6d1e2b496b9cbc0be1c603c85346
[ "MIT" ]
3
2018-10-17T19:06:17.000Z
2021-04-04T13:52:39.000Z
amazonadapi/__init__.py
barce/amazonadapi
76558774f26a6d1e2b496b9cbc0be1c603c85346
[ "MIT" ]
5
2018-09-12T20:07:40.000Z
2018-10-15T16:34:52.000Z
amazonadapi/__init__.py
barce/amazonadapi
76558774f26a6d1e2b496b9cbc0be1c603c85346
[ "MIT" ]
3
2018-02-05T21:04:28.000Z
2018-10-27T09:45:56.000Z
#!/usr/bin/env python from amazonadapi.amazonclient import AmazonClient from amazonadapi.amazonclient import AmazonOrder from amazonadapi.amazonclient import AmazonLineItem
25
51
0.862857
from amazonadapi.amazonclient import AmazonClient from amazonadapi.amazonclient import AmazonOrder from amazonadapi.amazonclient import AmazonLineItem
true
true
1c3a228c6060b6238d4744b433965ca2a515f4e6
801
py
Python
code/dataset_AFLW2000.py
Icegreenlhd/Hopenet
4766da32cebe0ba15efda3ad2e38067b34b6c729
[ "Apache-2.0" ]
4
2021-06-11T07:09:42.000Z
2022-02-22T07:29:08.000Z
code/dataset_AFLW2000.py
Icegreenlhd/Hopenet
4766da32cebe0ba15efda3ad2e38067b34b6c729
[ "Apache-2.0" ]
1
2021-09-15T10:08:26.000Z
2021-09-15T10:08:26.000Z
code/dataset_AFLW2000.py
Icegreenlhd/Hopenet
4766da32cebe0ba15efda3ad2e38067b34b6c729
[ "Apache-2.0" ]
null
null
null
import os def image_path_txt(image_dir, img_ext='.jpg', annot_ex='.mat'): """catch file name to gen :return: """ filename_path = os.path.join(image_dir, "image.txt") with open(filename_path, "w") as writer: for root, dirs, files in os.walk(image_dir): for name in sorted(files):...
32.04
105
0.543071
import os def image_path_txt(image_dir, img_ext='.jpg', annot_ex='.mat'): filename_path = os.path.join(image_dir, "image.txt") with open(filename_path, "w") as writer: for root, dirs, files in os.walk(image_dir): for name in sorted(files): if img_ext in name: ...
true
true
1c3a24d447b9af95d82323e75ad9f548e32f7c7b
2,317
py
Python
loveletter/card.py
ErikGartner/love-letter
36995788292ea6fdfc72a8b09adad01ba6683c26
[ "MIT" ]
null
null
null
loveletter/card.py
ErikGartner/love-letter
36995788292ea6fdfc72a8b09adad01ba6683c26
[ "MIT" ]
null
null
null
loveletter/card.py
ErikGartner/love-letter
36995788292ea6fdfc72a8b09adad01ba6683c26
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Love Letter Card tools Functions and constants to facilitate working with cards, which are represented as integers. """ import numpy as np class Card(): """Static Card class""" noCard = 0 guard = 1 priest = 2 baron = 3 handmaid = 4 prince = 5 king = 6 c...
32.633803
94
0.476478
import numpy as np class Card(): noCard = 0 guard = 1 priest = 2 baron = 3 handmaid = 4 prince = 5 king = 6 countess = 7 princess = 8 names = ['', 'Guard', 'Priest', 'Baron', 'Handmaid', 'Prince', 'King', 'Countess', 'Princess'] symbols =...
true
true
1c3a24ea31886df637421a85673891e6cd786437
36,727
py
Python
cinder/volume/drivers/emc/emc_vmax_fast.py
overcastcloud/cinder
ad977d456c5d50e992eee95ea40f4e3dd21981dc
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/emc/emc_vmax_fast.py
overcastcloud/cinder
ad977d456c5d50e992eee95ea40f4e3dd21981dc
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/emc/emc_vmax_fast.py
overcastcloud/cinder
ad977d456c5d50e992eee95ea40f4e3dd21981dc
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 - 2015 EMC Corporation. # 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 # # Unle...
44.843712
79
0.645465
from oslo_log import log as logging from cinder import exception from cinder.i18n import _, _LE, _LI, _LW from cinder.volume.drivers.emc import emc_vmax_provision from cinder.volume.drivers.emc import emc_vmax_utils LOG = logging.getLogger(__name__) DEFAULT_SG_PREFIX = 'OS_default_' DEFAULT_SG_POSTFIX = '_SG' cla...
true
true
1c3a257bfa779bfdb0aedb8cfceff9115e22bf0a
218
py
Python
one_fm/one_fm/doctype/employee_license/test_employee_license.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
16
2021-06-14T23:56:47.000Z
2022-03-22T12:05:06.000Z
one_fm/one_fm/doctype/employee_license/test_employee_license.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
119
2020-08-17T16:27:45.000Z
2022-03-28T12:42:56.000Z
one_fm/one_fm/doctype/employee_license/test_employee_license.py
askmetoo/One-FM
c93ed63695a3e62ee8129bd9adf563116b749030
[ "MIT" ]
12
2021-05-16T13:35:40.000Z
2022-02-21T12:41:04.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2021, omar jaber and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestEmployeeLicense(unittest.TestCase): pass
19.818182
49
0.766055
from __future__ import unicode_literals import unittest class TestEmployeeLicense(unittest.TestCase): pass
true
true
1c3a25c9df466732e5a9fae72274fdf7c2679c58
271
py
Python
app/http/routes/blog_routes.py
doseextra/site
40e1e5684a8f562bdad74b33cfa71f6304c88054
[ "MIT" ]
null
null
null
app/http/routes/blog_routes.py
doseextra/site
40e1e5684a8f562bdad74b33cfa71f6304c88054
[ "MIT" ]
null
null
null
app/http/routes/blog_routes.py
doseextra/site
40e1e5684a8f562bdad74b33cfa71f6304c88054
[ "MIT" ]
null
null
null
from app.http.controllers import blog_controller from flask import Blueprint blog = Blueprint("blog", __name__, url_prefix="/blog") @blog.route("/", methods=["GET"]) def index(): return blog_controller.index() def init_app(app): app.register_blueprint(blog)
19.357143
54
0.730627
from app.http.controllers import blog_controller from flask import Blueprint blog = Blueprint("blog", __name__, url_prefix="/blog") @blog.route("/", methods=["GET"]) def index(): return blog_controller.index() def init_app(app): app.register_blueprint(blog)
true
true
1c3a28f92384c0424932cd1830d82b370022b30a
33,531
py
Python
salt/modules/network.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
2
2015-08-04T21:54:38.000Z
2019-04-25T21:47:08.000Z
salt/modules/network.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
null
null
null
salt/modules/network.py
rfairburn/salt
7e44444e873e1cb1d2fe13e39b0edea3779a2b5e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Module for gathering and managing network information ''' # Import python libs from __future__ import absolute_import import datetime import hashlib import logging import re import os import socket # Import salt libs import salt.utils import salt.utils.decorators as decorators import salt....
28.082915
126
0.550028
from __future__ import absolute_import import datetime import hashlib import logging import re import os import socket import salt.utils import salt.utils.decorators as decorators import salt.utils.network import salt.utils.validate.net from salt.exceptions import CommandExecutionError import salt.ext.six as six fro...
true
true
1c3a2afe28932838d844c89054819b938961e376
8,326
py
Python
bibs/catalog.py
MrJeremyHobbs/Alma-Helper
a47dc0be14b2357d2e3560bcbb728010398b7fe2
[ "MIT" ]
null
null
null
bibs/catalog.py
MrJeremyHobbs/Alma-Helper
a47dc0be14b2357d2e3560bcbb728010398b7fe2
[ "MIT" ]
null
null
null
bibs/catalog.py
MrJeremyHobbs/Alma-Helper
a47dc0be14b2357d2e3560bcbb728010398b7fe2
[ "MIT" ]
null
null
null
#!/usr/bin/python3 from alma import http from alma import errors from lxml import objectify import xml.etree.ElementTree as ET import requests import xmltodict import sys class RetrieveItemRecord(): def __init__(self, barcode="", apikey=""): self.RetrieveItemRecord = RetrieveItemRecord self.r = re...
57.027397
140
0.609777
from alma import http from alma import errors from lxml import objectify import xml.etree.ElementTree as ET import requests import xmltodict import sys class RetrieveItemRecord(): def __init__(self, barcode="", apikey=""): self.RetrieveItemRecord = RetrieveItemRecord self.r = requests.get("https:/...
true
true
1c3a2b253b6647b12620ff2d71d3ebcbbfe65ea6
11,014
py
Python
grid_search_mem_scale/ESNtrainCV.py
malfarasplux/pnet2019
ae34d5c84fb4d3985634b237a14dfb69e98b8339
[ "BSD-3-Clause" ]
1
2020-11-29T12:42:30.000Z
2020-11-29T12:42:30.000Z
grid_search_mem_scale/ESNtrainCV.py
malfarasplux/pnet2019
ae34d5c84fb4d3985634b237a14dfb69e98b8339
[ "BSD-3-Clause" ]
null
null
null
grid_search_mem_scale/ESNtrainCV.py
malfarasplux/pnet2019
ae34d5c84fb4d3985634b237a14dfb69e98b8339
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ## Config dataset = "training" path = "../" + dataset +"/" kfold_split = 10 nan_to_neg = True biased_regress = True normal_equations = True mm = True std = False numpy_load = True ## ESN parameters N_def = 200 # Neurons scale_def = 1.0 # scaling mem_def = 1...
28.75718
102
0.632105
dataset = "training" path = "../" + dataset +"/" kfold_split = 10 nan_to_neg = True biased_regress = True normal_equations = True mm = True std = False numpy_load = True N_def = 200 scale_def = 1.0 mem_def = 1.0 exponent_def = 0.5 script_name = 'ESNtrainCV' name_struct_meta = "_N_scale_mem" ...
true
true
1c3a2b81959f133dfff5312a94df6cada8578895
31,987
py
Python
src/_pytest/capture.py
gatesn/pytest
e986d84466dfa98dbbc55cc1bf5fcb99075f4ac3
[ "MIT" ]
1
2020-11-27T12:58:44.000Z
2020-11-27T12:58:44.000Z
src/_pytest/capture.py
gatesn/pytest
e986d84466dfa98dbbc55cc1bf5fcb99075f4ac3
[ "MIT" ]
53
2020-12-14T03:17:37.000Z
2022-03-28T03:03:01.000Z
src/_pytest/capture.py
gatesn/pytest
e986d84466dfa98dbbc55cc1bf5fcb99075f4ac3
[ "MIT" ]
null
null
null
"""Per-test stdout/stderr capturing mechanism.""" import contextlib import functools import io import os import sys from io import UnsupportedOperation from tempfile import TemporaryFile from typing import Any from typing import AnyStr from typing import Generator from typing import Generic from typing import Iterator ...
33.181535
99
0.6296
import contextlib import functools import io import os import sys from io import UnsupportedOperation from tempfile import TemporaryFile from typing import Any from typing import AnyStr from typing import Generator from typing import Generic from typing import Iterator from typing import Optional from typing import Tex...
true
true
1c3a2bb10a2470d29ac195d54eb6498645943436
7,155
py
Python
accelbyte_py_sdk/api/lobby/models/model_template_localization_response.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/lobby/models/model_template_localization_response.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
1
2021-10-13T03:46:58.000Z
2021-10-13T03:46:58.000Z
accelbyte_py_sdk/api/lobby/models/model_template_localization_response.py
AccelByte/accelbyte-python-sdk
dcd311fad111c59da828278975340fb92e0f26f7
[ "MIT" ]
null
null
null
# Copyright (c) 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # # Code generated. DO NOT EDIT! # template file: justice_py_sdk_codegen/__main__.py # justice-lobby-server (staging) # pylint: disable=d...
36.319797
220
0.617191
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from ....core import Model from ..models.model_template_localization import ModelTemplateLocalization class ModelTemplateLocalizationResponse(Model): first: str ...
true
true
1c3a2c3a3cc7215da9bb26e28bef8018942407fa
2,007
py
Python
filer/contrib/django_cms/cms_toolbars.py
ammohq/django-filer
c5a7bb45806d3aeea4a042f5bd8f7d161cad5298
[ "BSD-3-Clause" ]
null
null
null
filer/contrib/django_cms/cms_toolbars.py
ammohq/django-filer
c5a7bb45806d3aeea4a042f5bd8f7d161cad5298
[ "BSD-3-Clause" ]
null
null
null
filer/contrib/django_cms/cms_toolbars.py
ammohq/django-filer
c5a7bb45806d3aeea4a042f5bd8f7d161cad5298
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.urls import reverse from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ from cms.cms_toolbars import ADMIN_MENU_IDENTIFIER, ADMINISTRATION_BREAK from cms.toolbar.items import Break from cms.to...
36.490909
81
0.687095
from __future__ import unicode_literals from django.urls import reverse from django.utils.encoding import force_text from django.utils.translation import ugettext_lazy as _ from cms.cms_toolbars import ADMIN_MENU_IDENTIFIER, ADMINISTRATION_BREAK from cms.toolbar.items import Break from cms.toolbar_base import CMSToo...
true
true
1c3a2ca4d06d973f3820acc8436890e936c508d5
831
py
Python
servicer/builtin/ci_adapters/base_ci_adapter.py
RyanTimoney/servicer
94b7fd0b1d4369952bf64d13e7fecb886611961c
[ "BSD-3-Clause" ]
null
null
null
servicer/builtin/ci_adapters/base_ci_adapter.py
RyanTimoney/servicer
94b7fd0b1d4369952bf64d13e7fecb886611961c
[ "BSD-3-Clause" ]
null
null
null
servicer/builtin/ci_adapters/base_ci_adapter.py
RyanTimoney/servicer
94b7fd0b1d4369952bf64d13e7fecb886611961c
[ "BSD-3-Clause" ]
null
null
null
import os class BaseCIAdapter(): def __init__(self, logger=None): self.logger = logger self.env_map = {} def convert_environment_variables(self): for key, value in os.environ.items(): if key in self.env_map and not self.env_map[key] in os.environ: os.enviro...
28.655172
75
0.528279
import os class BaseCIAdapter(): def __init__(self, logger=None): self.logger = logger self.env_map = {} def convert_environment_variables(self): for key, value in os.environ.items(): if key in self.env_map and not self.env_map[key] in os.environ: os.enviro...
true
true
1c3a2cfa0525f6bcf48fe1017a4a5e775f3aea88
2,729
py
Python
examples/chart_data_table.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
1
2019-07-12T02:58:59.000Z
2019-07-12T02:58:59.000Z
examples/chart_data_table.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
examples/chart_data_table.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
####################################################################### # # An example of creating Excel Column charts with data tables using # Python and XlsxWriter. # # Copyright 2013-2019, John McNamara, jmcnamara@cpan.org # import xlsxwriter workbook = xlsxwriter.Workbook('chart_data_table.xlsx') worksheet = workb...
29.031915
75
0.603518
import xlsxwriter workbook = xlsxwriter.Workbook('chart_data_table.xlsx') worksheet = workbook.add_worksheet() bold = workbook.add_format({'bold': 1}) headings = ['Number', 'Batch 1', 'Batch 2'] data = [ [2, 3, 4, 5, 6, 7], [10, 40, 50, 20, 10, 50], [30, 60, 70, 50, 40, 30], ] worksheet.write_row('A1', h...
true
true
1c3a2d8a5e0a620d32a3d85b36cf70e1127fa5e0
28,229
py
Python
tests/storage/test_docker_storage.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
2
2021-10-07T19:58:34.000Z
2021-11-09T10:46:58.000Z
tests/storage/test_docker_storage.py
concreted/prefect
dd732f5990ee2b0f3d816adb285168fd63b239e4
[ "Apache-2.0" ]
15
2021-12-18T09:11:34.000Z
2022-03-31T03:37:15.000Z
tests/storage/test_docker_storage.py
ngriffiths13/prefect
7f5613abcb182494b7dc12159277c3bc5f3c9898
[ "Apache-2.0" ]
1
2021-11-30T05:49:13.000Z
2021-11-30T05:49:13.000Z
import os import sys import json import tempfile import textwrap from unittest.mock import MagicMock from collections import OrderedDict import cloudpickle import pendulum import pytest import prefect from prefect import Flow from prefect.storage import Docker @pytest.fixture def no_docker_host_var(monkeypatch): ...
31.717978
174
0.648163
import os import sys import json import tempfile import textwrap from unittest.mock import MagicMock from collections import OrderedDict import cloudpickle import pendulum import pytest import prefect from prefect import Flow from prefect.storage import Docker @pytest.fixture def no_docker_host_var(monkeypatch): ...
true
true
1c3a2d8dade27e761f16dd9ed7ea185868ff30b3
5,625
py
Python
cmsplugin_filer_image/models.py
zbohm/cmsplugin-filer
3b9720e4ad6584734f3aee9bac50ddddc130911e
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_filer_image/models.py
zbohm/cmsplugin-filer
3b9720e4ad6584734f3aee9bac50ddddc130911e
[ "BSD-3-Clause" ]
null
null
null
cmsplugin_filer_image/models.py
zbohm/cmsplugin-filer
3b9720e4ad6584734f3aee9bac50ddddc130911e
[ "BSD-3-Clause" ]
2
2020-06-23T13:39:30.000Z
2020-07-06T12:10:19.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from filer.fields.file import FilerFileField from filer.fields.image import FilerImageField from filer.models import ThumbnailOption # NOQA from filer.utils.compatibili...
40.76087
118
0.652444
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext_lazy as _ from filer.fields.file import FilerFileField from filer.fields.image import FilerImageField from filer.models import ThumbnailOption from filer.utils.compatibility import python_2_unicode_comp...
true
true
1c3a2d9240678247975c3b613e9656d9e6e0cfd5
446
py
Python
code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/__init__.py
jhkuang11/UniTrade
5f68b853926e167936b58c8543b8f95ebd6f5211
[ "MIT" ]
null
null
null
code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/__init__.py
jhkuang11/UniTrade
5f68b853926e167936b58c8543b8f95ebd6f5211
[ "MIT" ]
10
2020-06-05T19:42:26.000Z
2022-03-11T23:38:35.000Z
code/venv/lib/python3.6/site-packages/pgadmin4/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/__init__.py
jhkuang11/UniTrade
5f68b853926e167936b58c8543b8f95ebd6f5211
[ "MIT" ]
null
null
null
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2017, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## from pgadmin.util...
26.235294
74
0.502242
from pgadmin.utils.route import BaseTestGenerator class ViewsTestGenerator(BaseTestGenerator): def generate_tests(self): return
true
true
1c3a3179775a86b09d29a353514b6a40d48579b6
57,440
py
Python
demos/kitchen_sink/screens.py
brentpicasso/KivyMD
9a018f54f6aa73c6d388ab111d8b913984377e52
[ "MIT" ]
null
null
null
demos/kitchen_sink/screens.py
brentpicasso/KivyMD
9a018f54f6aa73c6d388ab111d8b913984377e52
[ "MIT" ]
null
null
null
demos/kitchen_sink/screens.py
brentpicasso/KivyMD
9a018f54f6aa73c6d388ab111d8b913984377e52
[ "MIT" ]
1
2020-01-23T20:01:16.000Z
2020-01-23T20:01:16.000Z
# -*- coding: utf-8 -*- """ Copyright (c) 2019 Ivanov Yuri For suggestions and questions: <kivydevelopment@gmail.com> This file is distributed under the terms of the same license, as the Kivy framework. """ import os from kivy.factory import Factory from kivy.lang import Builder from kivy.core.window import Windo...
29.186992
107
0.559593
import os from kivy.factory import Factory from kivy.lang import Builder from kivy.core.window import Window from kivy.metrics import dp from kivymd.utils.cropimage import crop_image bottom_app_bar = ''' #:import MDRaisedButton kivymd.button.MDRaisedButton <BottomAppBar@Screen> name: 'bottom app bar' MD...
true
true
1c3a31952cc8585ec814b199d27d13eef56bbe9b
2,964
py
Python
osspeak/recognition/actions/library/stdlib.py
OSSpeak/OSSpeak
327c38a37684165f87bf8d76ab2ca135b43b8ab7
[ "MIT" ]
1
2020-03-17T10:24:41.000Z
2020-03-17T10:24:41.000Z
osspeak/recognition/actions/library/stdlib.py
OSSpeak/OSSpeak
327c38a37684165f87bf8d76ab2ca135b43b8ab7
[ "MIT" ]
12
2016-09-28T05:16:00.000Z
2020-11-27T22:32:40.000Z
osspeak/recognition/actions/library/stdlib.py
OSSpeak/OSSpeak
327c38a37684165f87bf8d76ab2ca135b43b8ab7
[ "MIT" ]
null
null
null
from recognition.actions.library import (window, thread, engine, extensions, general, text, clipboard, macro, osspeak, conditionals, fsystem, math, directinput, flow, process) from recognition.actions.library import _mouse as mouse from recognition.actions.library import _keyboard as keyboard from recognition.actions.l...
26
85
0.654858
from recognition.actions.library import (window, thread, engine, extensions, general, text, clipboard, macro, osspeak, conditionals, fsystem, math, directinput, flow, process) from recognition.actions.library import _mouse as mouse from recognition.actions.library import _keyboard as keyboard from recognition.actions.l...
true
true
1c3a3363b22b8a6ed344c7c1101395d35779dcdf
1,268
py
Python
src/OTLMOW/OEFModel/ModelGrabber.py
davidvlaminck/OTLClassPython
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
2
2022-02-01T08:58:11.000Z
2022-02-08T13:35:17.000Z
src/OTLMOW/OEFModel/ModelGrabber.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
src/OTLMOW/OEFModel/ModelGrabber.py
davidvlaminck/OTLMOW
71330afeb37c3ea6d9981f521ff8f4a3f8b946fc
[ "MIT" ]
null
null
null
import json import requests class ModelGrabber: def __init__(self): self.cert_path = 'C:\\resources\\datamanager_eminfra_prd.awv.vlaanderen.be.crt' self.key_path = 'C:\\resources\\datamanager_eminfra_prd.awv.vlaanderen.be.key' def grab_models_as_json(self, save_legacy_to: str = 'oef.legacy.j...
38.424242
126
0.636435
import json import requests class ModelGrabber: def __init__(self): self.cert_path = 'C:\\resources\\datamanager_eminfra_prd.awv.vlaanderen.be.crt' self.key_path = 'C:\\resources\\datamanager_eminfra_prd.awv.vlaanderen.be.key' def grab_models_as_json(self, save_legacy_to: str = 'oef.legacy.j...
true
true
1c3a33b85993b16250efc482283f53782043466f
7,743
py
Python
envs.py
smearle/pytorch-a2c-ppo-acktr-micropolis
699a6f6e65e8bab5533074945cc9aa7827919a59
[ "MIT" ]
3
2020-07-13T08:44:36.000Z
2022-03-18T01:17:59.000Z
envs.py
smearle/pytorch-baselines-micropolis
699a6f6e65e8bab5533074945cc9aa7827919a59
[ "MIT" ]
null
null
null
envs.py
smearle/pytorch-baselines-micropolis
699a6f6e65e8bab5533074945cc9aa7827919a59
[ "MIT" ]
null
null
null
import os import sys import gym import numpy as np import torch from gym.spaces.box import Box from baselines import bench #from baselines.common.atari_wrappers import make_atari, wrap_deepmind from baselines.common.vec_env import VecEnvWrapper from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv from b...
32.948936
190
0.630763
import os import sys import gym import numpy as np import torch from gym.spaces.box import Box from baselines import bench from baselines.common.vec_env import VecEnvWrapper from baselines.common.vec_env.subproc_vec_env import SubprocVecEnv from baselines.common.vec_env.dummy_vec_env import DummyVecEnv from baselines...
true
true
1c3a35056514d326dce8b415d64f4c30fccadd20
213
py
Python
StatisticsFunctions/quartiles.py
mkm99/TeamProject_StatsCalculator
81085c1af47f38d3e49b43d667e312016c44ad10
[ "MIT" ]
null
null
null
StatisticsFunctions/quartiles.py
mkm99/TeamProject_StatsCalculator
81085c1af47f38d3e49b43d667e312016c44ad10
[ "MIT" ]
7
2020-03-03T21:37:57.000Z
2020-03-06T04:11:42.000Z
StatisticsFunctions/quartiles.py
mkm99/TeamProject_StatsCalculator
81085c1af47f38d3e49b43d667e312016c44ad10
[ "MIT" ]
null
null
null
import numpy as np class Quartile(): @staticmethod def quartile(data): q1 = np.quantile(data, .25) q2 = np.quantile(data, .50) q3 = np.quantile(data, .75) return q1, q2, q3
23.666667
35
0.568075
import numpy as np class Quartile(): @staticmethod def quartile(data): q1 = np.quantile(data, .25) q2 = np.quantile(data, .50) q3 = np.quantile(data, .75) return q1, q2, q3
true
true
1c3a3670ec98f68725f97accc6fc0b4dbf3714eb
181
py
Python
Null_Check.py
GodingWal/lambdata_Tools
33f34cc6f641103f55348761def8397cbda8cf16
[ "MIT" ]
null
null
null
Null_Check.py
GodingWal/lambdata_Tools
33f34cc6f641103f55348761def8397cbda8cf16
[ "MIT" ]
null
null
null
Null_Check.py
GodingWal/lambdata_Tools
33f34cc6f641103f55348761def8397cbda8cf16
[ "MIT" ]
null
null
null
# Function to to check null in dataset def null_check(df): for _ in df: if None in df.isnull(): print("No Error") else: print("Error")
18.1
38
0.524862
def null_check(df): for _ in df: if None in df.isnull(): print("No Error") else: print("Error")
true
true
1c3a37be6cab32536f7fee6c5a99bfedc7d2e6f0
962
py
Python
algorithms/Python/implementation/acm icpc team.py
Kumbong/hackerrank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
8
2019-09-19T19:38:09.000Z
2022-02-14T13:59:37.000Z
algorithms/Python/implementation/acm icpc team.py
Kumbong/hacker-rank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
null
null
null
algorithms/Python/implementation/acm icpc team.py
Kumbong/hacker-rank
36125f3a17c3e0f1fa889495e8ad33b0aa424552
[ "MIT" ]
7
2019-09-23T13:17:27.000Z
2022-01-27T18:02:16.000Z
#!/bin/python3 import math import os import random import re import sys # Complete the acmTeam function below. def compare(a,b): c=0 for i in range(len(a)): if a[i]=='1' or b[i]=='1': c+=1 return c def acmTeam(topic): max_topics=-1 permutations=0 for i in range(len(...
16.877193
47
0.537422
import math import os import random import re import sys def compare(a,b): c=0 for i in range(len(a)): if a[i]=='1' or b[i]=='1': c+=1 return c def acmTeam(topic): max_topics=-1 permutations=0 for i in range(len(topic)): for j in range(i+1,len(topic)): ...
true
true
1c3a3824b479de346a942d6a6f24969552ae9f59
9,012
py
Python
dispike/helper/components.py
mrshmllow/dispike
6e73f4414e2025c1ce48db2c9aa08de4eba3bfec
[ "MIT" ]
null
null
null
dispike/helper/components.py
mrshmllow/dispike
6e73f4414e2025c1ce48db2c9aa08de4eba3bfec
[ "MIT" ]
null
null
null
dispike/helper/components.py
mrshmllow/dispike
6e73f4414e2025c1ce48db2c9aa08de4eba3bfec
[ "MIT" ]
null
null
null
import typing from enum import Enum from dispike.errors.components import InvalidComponentError, ComponentCombinationError, SelectMenuOptionError class ComponentTypes(int, Enum): """Easy access to component types. Attributes: ACTION_ROW (int): Represents Type 1 BUTTON (int): Represents Type...
30.445946
159
0.570462
import typing from enum import Enum from dispike.errors.components import InvalidComponentError, ComponentCombinationError, SelectMenuOptionError class ComponentTypes(int, Enum): ACTION_ROW = 1 BUTTON = 2 SELECT_MENU = 3 class ButtonStyles(int, Enum): PRIMARY = 1 SECONDARY = 2 SUCCESS =...
true
true
1c3a391afd05988b0c260ecf40004b4f45f0eea2
3,450
py
Python
bot/injector.py
Scottdecat/HiveMind
cbd9de0645d756a63d65918f6c971753e1178652
[ "MIT" ]
null
null
null
bot/injector.py
Scottdecat/HiveMind
cbd9de0645d756a63d65918f6c971753e1178652
[ "MIT" ]
null
null
null
bot/injector.py
Scottdecat/HiveMind
cbd9de0645d756a63d65918f6c971753e1178652
[ "MIT" ]
null
null
null
from sc2 import BotAI from .configuration.configuration_interface import ConfigurationInterface from .configuration.basic_configuration import BasicConfiguration from .services.chat_service import ChatService from .services.state_service import StateService from .services.action_service import ActionService from .ser...
52.272727
104
0.788116
from sc2 import BotAI from .configuration.configuration_interface import ConfigurationInterface from .configuration.basic_configuration import BasicConfiguration from .services.chat_service import ChatService from .services.state_service import StateService from .services.action_service import ActionService from .ser...
true
true
1c3a397be768f86c51b28be17345f9f7c1b28b17
3,685
py
Python
examples/unpolished/ode/case_6_hgp_model.py
KennedyPutraKusumo/py-DED
c5742c29cae66542960060f19d65b446d532b477
[ "MIT" ]
2
2020-05-19T14:06:41.000Z
2021-09-09T16:11:53.000Z
examples/unpolished/ode/case_6_hgp_model.py
KennedyPutraKusumo/py-DED
c5742c29cae66542960060f19d65b446d532b477
[ "MIT" ]
2
2020-04-28T02:36:36.000Z
2021-08-23T09:36:13.000Z
examples/unpolished/ode/case_6_hgp_model.py
KennedyPutraKusumo/py-DED
c5742c29cae66542960060f19d65b446d532b477
[ "MIT" ]
2
2020-10-10T18:43:27.000Z
2020-11-22T19:41:05.000Z
from pyomo import environ as po from pyomo import dae as pod from matplotlib import pyplot as plt import numpy as np def create_model_hgp(spt): m = po.ConcreteModel() tau = max(spt) norm_spt = spt / tau m.t = pod.ContinuousSet(bounds=(0, 1), initialize=norm_spt) # normalized time variable (unitles...
37.602041
159
0.543012
from pyomo import environ as po from pyomo import dae as pod from matplotlib import pyplot as plt import numpy as np def create_model_hgp(spt): m = po.ConcreteModel() tau = max(spt) norm_spt = spt / tau m.t = pod.ContinuousSet(bounds=(0, 1), initialize=norm_spt) m.tau = po.Var(bounds=(0, None)...
true
true
1c3a3a63e028be1bb363ca349f0612c29c99f769
2,603
py
Python
Packs/GitLab/Integrations/GitLabEventCollector/GitLabEventCollector_test.py
wiz-sec/content
344291cfb87c23a5f13b2d827949bfa8425ef88c
[ "MIT" ]
null
null
null
Packs/GitLab/Integrations/GitLabEventCollector/GitLabEventCollector_test.py
wiz-sec/content
344291cfb87c23a5f13b2d827949bfa8425ef88c
[ "MIT" ]
null
null
null
Packs/GitLab/Integrations/GitLabEventCollector/GitLabEventCollector_test.py
wiz-sec/content
344291cfb87c23a5f13b2d827949bfa8425ef88c
[ "MIT" ]
null
null
null
from GitLabEventCollector import GetEvents, Client, reformat_details from SiemApiModule import * # noqa # pylint: disable=unused-wildcard-import events = [{'created_at': '2022-04-17T12:31:36.667Z', 'details': {'add': 'aaa'}, 'entity_type': 'Group', 'id': '1'}, {'created_at': '2022-05-17T12:31:36.667Z', 'det...
50.057692
120
0.58932
from GitLabEventCollector import GetEvents, Client, reformat_details from SiemApiModule import * events = [{'created_at': '2022-04-17T12:31:36.667Z', 'details': {'add': 'aaa'}, 'entity_type': 'Group', 'id': '1'}, {'created_at': '2022-05-17T12:31:36.667Z', 'details': {'add': 'bbb'}, 'entity_type': 'Group', '...
true
true
1c3a3ade7f616f684d9cc2d807ed6f4495b5ba04
4,775
py
Python
server/online/views.py
MahjongRepository/mahjong-leaderboard
77dfd26cb812c12fa7c2b11e862bb80a9135ccb0
[ "MIT" ]
2
2017-12-18T18:43:03.000Z
2017-12-21T05:57:44.000Z
server/online/views.py
MahjongRepository/mahjong-leaderboard
77dfd26cb812c12fa7c2b11e862bb80a9135ccb0
[ "MIT" ]
11
2017-12-18T14:13:32.000Z
2017-12-29T03:09:44.000Z
server/online/views.py
MahjongRepository/mahjong-leaderboard
77dfd26cb812c12fa7c2b11e862bb80a9135ccb0
[ "MIT" ]
null
null
null
import requests from django.conf import settings from django.contrib.auth.decorators import login_required, user_passes_test from django.http import HttpResponse, JsonResponse from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST...
34.107143
118
0.711204
import requests from django.conf import settings from django.contrib.auth.decorators import login_required, user_passes_test from django.http import HttpResponse, JsonResponse from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST...
true
true
1c3a3bbe316cf268b71726bc53f47b1543c3363d
71,375
py
Python
codes/run.py
ling-cai/Time2Box
7c6f7467a0341f7c979103121d54e2f911806a6d
[ "MIT" ]
5
2021-11-15T15:02:50.000Z
2022-03-24T05:09:32.000Z
codes/run.py
ling-cai/Time2Box
7c6f7467a0341f7c979103121d54e2f911806a6d
[ "MIT" ]
1
2021-12-13T11:53:35.000Z
2022-03-27T11:57:52.000Z
codes/run.py
ling-cai/Time2Box
7c6f7467a0341f7c979103121d54e2f911806a6d
[ "MIT" ]
1
2021-12-26T02:24:28.000Z
2021-12-26T02:24:28.000Z
#!/usr/bin/python3 from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import json import logging import os import random import numpy as np import torch from torch.utils.data import DataLoader from model import Query2box from dataloader impo...
49.531575
409
0.625639
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import json import logging import os import random import numpy as np import torch from torch.utils.data import DataLoader from model import Query2box from dataloader import * from tensorboa...
true
true
1c3a3bf0550e4e6d66a767186111e150c8e5f4f1
313
py
Python
ghiblimovies/utils.py
mastizada/ghiblimovies
578c007c6cf7c69efe817140abbc20172babcc07
[ "MIT" ]
1
2020-12-07T06:44:53.000Z
2020-12-07T06:44:53.000Z
ghiblimovies/utils.py
mastizada/ghiblimovies
578c007c6cf7c69efe817140abbc20172babcc07
[ "MIT" ]
null
null
null
ghiblimovies/utils.py
mastizada/ghiblimovies
578c007c6cf7c69efe817140abbc20172babcc07
[ "MIT" ]
null
null
null
"""Settings related utilities.""" import logging class ErrorOnlyLogFilter(logging.Filter): """Log only error and critical messages.""" def filter(self, record) -> int: if record.levelno == logging.ERROR or record.levelno == logging.CRITICAL: return 1 return 0 # do not log
26.083333
81
0.654952
import logging class ErrorOnlyLogFilter(logging.Filter): def filter(self, record) -> int: if record.levelno == logging.ERROR or record.levelno == logging.CRITICAL: return 1 return 0
true
true
1c3a3cb7e26b41972db9522157f8dce6ce0fe887
12,593
py
Python
0000_examples/hayakawa/research_posemake_many.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
null
null
null
0000_examples/hayakawa/research_posemake_many.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
null
null
null
0000_examples/hayakawa/research_posemake_many.py
takuya-ki/wrs
f6e1009b94332504042fbde9b39323410394ecde
[ "MIT" ]
null
null
null
#### Program for my research #### generate many pose of graspping in both hands(for pulling rope) and pushing in left hand(for pushing object) import visualization.panda.world as wd import robot_sim.end_effectors.gripper.robotiq85.robotiq85 as rtq85 import robot_sim.robots.ur3_dual.ur3_dual as rbts import modeling.geom...
60.543269
131
0.516636
import visualization.panda.world as wd import robot_sim.end_effectors.gripper.robotiq85.robotiq85 as rtq85 import robot_sim.robots.ur3_dual.ur3_dual as rbts import modeling.geometric_model as gm import basis.robot_math as rm import math import numpy as np from pyquaternion import Quaternion import copy class PoseMake...
true
true
1c3a3d18ef39765ccdf48c27ecefef9d665a9b9e
2,846
py
Python
tests/test_tokenization_barthez.py
syskn/transformers
fafbd2574cb12b987099f69b3821814042d8f4ce
[ "Apache-2.0" ]
39
2021-04-30T06:06:30.000Z
2022-03-12T11:56:06.000Z
tests/test_tokenization_barthez.py
slavetothebiologicalforce/transformers
6f90c29eaaba898919b7689ab7e2cfce1604cdb8
[ "Apache-2.0" ]
3
2021-07-22T15:49:44.000Z
2022-03-19T08:46:27.000Z
tests/test_tokenization_barthez.py
slavetothebiologicalforce/transformers
6f90c29eaaba898919b7689ab7e2cfce1604cdb8
[ "Apache-2.0" ]
30
2021-04-30T07:11:22.000Z
2022-03-15T19:34:58.000Z
# coding=utf-8 # Copyright 2020 Ecole Polytechnique and HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
36.487179
109
0.732607
import unittest from transformers import BarthezTokenizer, BarthezTokenizerFast, BatchEncoding from transformers.testing_utils import require_sentencepiece, require_tokenizers, require_torch, slow from .test_tokenization_common import TokenizerTesterMixin @require_tokenizers @require_sentencepiece @slow class Bar...
true
true
1c3a3d38084a2b91b56a632ea7a831e5bae3c2b6
3,569
py
Python
bindings/python/ensmallen/datasets/string/alligatormississippiensis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/alligatormississippiensis.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/alligatormississippiensis.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Alligator mississippiensis. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--pro...
33.046296
223
0.679462
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def AlligatorMississippiensis( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/...
true
true
1c3a3d74f72923d9565f38cb6c8d05cb17dc3bb1
2,911
py
Python
olo/sql_ast_translators/sql_ast_translator.py
Watch-Later/olo
c8bbdfffb64a9766df51a462a119a879c9030a4a
[ "Apache-2.0" ]
81
2018-03-08T11:07:33.000Z
2022-01-18T10:19:46.000Z
olo/sql_ast_translators/sql_ast_translator.py
Watch-Later/olo
c8bbdfffb64a9766df51a462a119a879c9030a4a
[ "Apache-2.0" ]
40
2018-07-04T09:22:34.000Z
2021-09-03T09:30:02.000Z
olo/sql_ast_translators/sql_ast_translator.py
Watch-Later/olo
c8bbdfffb64a9766df51a462a119a879c9030a4a
[ "Apache-2.0" ]
13
2018-03-19T10:34:24.000Z
2022-01-18T10:19:49.000Z
from typing import List, Dict, Tuple, Iterable, Optional from olo.compat import iteritems from olo.context import context, table_alias_mapping_context, in_sql_translation_context from olo.errors import ORMError from olo.utils import car, cdr, is_sql_ast, friendly_repr AST = List MODIFY_OPERATES = frozenset({'INSERT...
34.247059
111
0.642734
from typing import List, Dict, Tuple, Iterable, Optional from olo.compat import iteritems from olo.context import context, table_alias_mapping_context, in_sql_translation_context from olo.errors import ORMError from olo.utils import car, cdr, is_sql_ast, friendly_repr AST = List MODIFY_OPERATES = frozenset({'INSERT...
true
true
1c3a3dc8941b85ed1f41493eeb9f2e2873e45e04
598
py
Python
DelibeRating/DelibeRating/deliberating-env/Lib/site-packages/etc/tests/testapp/admin.py
Severose/DelibeRating
5d227f35c071477ce3fd6fbf3ab13a44d13f6e08
[ "MIT" ]
25
2015-02-07T15:42:06.000Z
2022-03-26T02:28:06.000Z
DelibeRating/DelibeRating/deliberating-env/Lib/site-packages/etc/tests/testapp/admin.py
Severose/DelibeRating
5d227f35c071477ce3fd6fbf3ab13a44d13f6e08
[ "MIT" ]
3
2017-01-06T20:34:13.000Z
2021-05-11T02:24:22.000Z
DelibeRating/DelibeRating/deliberating-env/Lib/site-packages/etc/tests/testapp/admin.py
Severose/DelibeRating
5d227f35c071477ce3fd6fbf3ab13a44d13f6e08
[ "MIT" ]
2
2016-07-28T01:54:13.000Z
2017-02-13T20:55:19.000Z
from django.db import models from etc.admin import CustomModelPage class MyPage1(CustomModelPage): title = 'Test page 1' my_field = models.CharField('some title', max_length=10) def save(self): self.bound_admin.message_warning(self.bound_request, f'test1:{self.my_field}') super().save()...
22.148148
92
0.714047
from django.db import models from etc.admin import CustomModelPage class MyPage1(CustomModelPage): title = 'Test page 1' my_field = models.CharField('some title', max_length=10) def save(self): self.bound_admin.message_warning(self.bound_request, f'test1:{self.my_field}') super().save()...
true
true
1c3a4095740a592fece27812a684d2535bae4edc
3,227
py
Python
rl_algorithms/common/abstract/her.py
mshukor/DSACfD
b7c4d7f4b586721b4d0409de11e46f308bcd9edc
[ "MIT" ]
466
2019-02-14T15:06:01.000Z
2022-03-28T03:08:10.000Z
rl_algorithms/common/abstract/her.py
SongsLearning/rl_algorithms
65e4e73257d2295e7df2044332d8c75aa7b51e5d
[ "MIT" ]
138
2019-02-15T05:44:17.000Z
2021-12-15T06:00:55.000Z
rl_algorithms/common/abstract/her.py
SongsLearning/rl_algorithms
65e4e73257d2295e7df2044332d8c75aa7b51e5d
[ "MIT" ]
86
2019-02-25T15:52:29.000Z
2022-03-08T06:30:36.000Z
# -*- coding: utf-8 -*- """Abstract class used for Hindsight Experience Replay. - Author: Kyunghwan Kim - Contact: kh.kim@medipixel.io - Paper: https://arxiv.org/pdf/1707.01495.pdf """ from abc import ABC, abstractmethod from typing import Callable, Tuple import numpy as np class HER(ABC): """Abstract class fo...
32.27
86
0.662845
from abc import ABC, abstractmethod from typing import Callable, Tuple import numpy as np class HER(ABC): def __init__(self, reward_fn: Callable[[tuple, np.ndarray], np.float64]): self.reward_fn = reward_fn @abstractmethod def fetch_desired_states_from_demo(self, demo: list): pass ...
true
true
1c3a40be637f81ad610efb0815da940337be35e6
781
py
Python
test/test_del_project.py
avshliakhau/Selenium_python_mantis
46f31b906b33d01cade3c90a0c226af90733010b
[ "Apache-2.0" ]
1
2020-05-15T13:11:50.000Z
2020-05-15T13:11:50.000Z
test/test_del_project.py
avshliakhau/Selenium_python_mantis
46f31b906b33d01cade3c90a0c226af90733010b
[ "Apache-2.0" ]
null
null
null
test/test_del_project.py
avshliakhau/Selenium_python_mantis
46f31b906b33d01cade3c90a0c226af90733010b
[ "Apache-2.0" ]
null
null
null
import random def test_delete_project(app): app.session.login('administrator', 'root') app.project.manage_project_page() old_project_list = app.project.get_projects_list() if len(old_project_list) == 0: app.project.create_project('first_project_for_del') old_project_list = app.project.get_...
41.105263
63
0.741357
import random def test_delete_project(app): app.session.login('administrator', 'root') app.project.manage_project_page() old_project_list = app.project.get_projects_list() if len(old_project_list) == 0: app.project.create_project('first_project_for_del') old_project_list = app.project.get_...
true
true
1c3a417820e4d995e1d0553f35095c4694858147
2,824
py
Python
route/main_sys_update.py
k0000k/openNAMU
b5862a7e5a1f1a2a6bee5eec5b3d9784528f42e8
[ "BSD-3-Clause" ]
3
2018-10-06T09:02:34.000Z
2018-10-20T02:42:31.000Z
route/main_sys_update.py
k0000k/openNAMU
b5862a7e5a1f1a2a6bee5eec5b3d9784528f42e8
[ "BSD-3-Clause" ]
42
2018-09-16T16:30:54.000Z
2018-11-24T17:45:08.000Z
route/main_sys_update.py
k0000k/openNAMU
b5862a7e5a1f1a2a6bee5eec5b3d9784528f42e8
[ "BSD-3-Clause" ]
6
2018-09-23T12:29:19.000Z
2018-11-24T17:31:35.000Z
from .tool.func import * def main_sys_update(): with get_db_connect() as conn: curs = conn.cursor() if admin_check() != 1: return re_error('/error/3') if flask.request.method == 'POST': admin_check(None, 'update') curs.execute(db_change('select data fr...
44.125
149
0.465652
from .tool.func import * def main_sys_update(): with get_db_connect() as conn: curs = conn.cursor() if admin_check() != 1: return re_error('/error/3') if flask.request.method == 'POST': admin_check(None, 'update') curs.execute(db_change('select data fr...
true
true
1c3a419999da0291bb997fb3bd1ed2459b4b34e0
2,913
py
Python
tests/contrib/djangorestframework/app/settings.py
thehesiod/dd-trace-py
5af9b51b7a063e25937532d95d79d046dd65d313
[ "BSD-3-Clause" ]
null
null
null
tests/contrib/djangorestframework/app/settings.py
thehesiod/dd-trace-py
5af9b51b7a063e25937532d95d79d046dd65d313
[ "BSD-3-Clause" ]
null
null
null
tests/contrib/djangorestframework/app/settings.py
thehesiod/dd-trace-py
5af9b51b7a063e25937532d95d79d046dd65d313
[ "BSD-3-Clause" ]
null
null
null
""" Settings configuration for the Django web framework. Update this configuration if you need to change the default behavior of Django during tests """ import os import django BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DATABASES = { 'default': { 'ENGINE': 'django.db.backends....
28.558824
73
0.683831
import os import django BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:' } } SITE_ID = 1 SECRET_KEY = 'not_very_secret_in_tests' USE_I18N = True USE_L10N = True STATIC_URL = '/static/'...
true
true
1c3a423eddbce0a305e4169514c9b92f0faf8860
87
py
Python
tcn/__init__.py
evanharwin/keras-tcn
81706eaabc069ad27a1786625bbf731b247bf2f0
[ "MIT" ]
1,473
2018-03-22T11:57:25.000Z
2022-03-31T02:49:58.000Z
tcn/__init__.py
gf9619/keras-tcn
078901b98e8538b85b5d40953ca8fc52ad9274e0
[ "MIT" ]
177
2018-04-05T04:28:55.000Z
2022-03-19T13:26:57.000Z
tcn/__init__.py
gf9619/keras-tcn
078901b98e8538b85b5d40953ca8fc52ad9274e0
[ "MIT" ]
414
2018-03-23T06:36:44.000Z
2022-03-29T11:07:00.000Z
from tcn.tcn import TCN, compiled_tcn, tcn_full_summary # noqa __version__ = '3.4.0'
21.75
63
0.747126
from tcn.tcn import TCN, compiled_tcn, tcn_full_summary __version__ = '3.4.0'
true
true
1c3a43b4ffbf86a61135f36ca6445d9dd3b83602
490
py
Python
api_tests/test_rigid.py
AmirAlavi/scipr
5807b8648526e41c2db413783c76fa33331cc710
[ "BSD-3-Clause" ]
3
2020-05-14T15:54:38.000Z
2020-09-08T05:52:50.000Z
api_tests/test_rigid.py
AmirAlavi/scipr
5807b8648526e41c2db413783c76fa33331cc710
[ "BSD-3-Clause" ]
4
2020-05-14T18:52:53.000Z
2021-11-25T03:56:08.000Z
api_tests/test_rigid.py
AmirAlavi/scipr
5807b8648526e41c2db413783c76fa33331cc710
[ "BSD-3-Clause" ]
1
2020-05-21T21:42:55.000Z
2020-05-21T21:42:55.000Z
import numpy as np import scipr from scipr.matching import Closest, Hungarian, Greedy, MNN from scipr.transform import Affine, Rigid, StackedAutoEncoder np.random.seed(1817) A = np.random.random((10, 100)) B = np.random.random((20, 100)) matchers = [Closest(), Greedy(), Hungarian(), MNN()] for match in matchers: ...
23.333333
61
0.697959
import numpy as np import scipr from scipr.matching import Closest, Hungarian, Greedy, MNN from scipr.transform import Affine, Rigid, StackedAutoEncoder np.random.seed(1817) A = np.random.random((10, 100)) B = np.random.random((20, 100)) matchers = [Closest(), Greedy(), Hungarian(), MNN()] for match in matchers: ...
true
true
1c3a445ce197f1245eff9b6909c263aa0524f7e5
3,566
py
Python
labelbox2coco.py
telecombcn-dl/2018-dlcv-team5
b863497b157a8981774053be2d1c4581537eeb39
[ "MIT" ]
1
2019-11-25T14:51:37.000Z
2019-11-25T14:51:37.000Z
labelbox2coco.py
telecombcn-dl/2018-dlcv-team5
b863497b157a8981774053be2d1c4581537eeb39
[ "MIT" ]
null
null
null
labelbox2coco.py
telecombcn-dl/2018-dlcv-team5
b863497b157a8981774053be2d1c4581537eeb39
[ "MIT" ]
null
null
null
import json import datetime as dt import logging from shapely import wkt import requests from PIL import Image import argparse def from_json(labeled_data, coco_output): # read labelbox JSON output with open(labeled_data, 'r') as f: lines = f.readlines() label_data = json.loads(lines[0]) #...
31.557522
70
0.509534
import json import datetime as dt import logging from shapely import wkt import requests from PIL import Image import argparse def from_json(labeled_data, coco_output): with open(labeled_data, 'r') as f: lines = f.readlines() label_data = json.loads(lines[0]) coco = { 'info': ...
true
true
1c3a44999283116102c52580b1cac353698c5e09
17,160
py
Python
openstack_dashboard/dashboards/project/images/images/forms.py
vanduc95/Horizon
90d7a3f79fe3e585bdf36cef660d092797ae5e1f
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/images/images/forms.py
vanduc95/Horizon
90d7a3f79fe3e585bdf36cef660d092797ae5e1f
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/images/images/forms.py
vanduc95/Horizon
90d7a3f79fe3e585bdf36cef660d092797ae5e1f
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
41.853659
79
0.574184
from django.conf import settings from django.core import validators from django.forms import ValidationError from django.forms.widgets import HiddenInput from django.template import defaultfilters from django.utils.translation import ugettext_lazy as _ import six from horizon import exceptions from horizon import ...
true
true
1c3a44e442b479f968e651f2621f7c4f3e9a013d
3,041
py
Python
dmripreproc/workflows/dwi/outputs.py
slimnsour/dmripreproc
a1e4482baf1c9c7dfb3593126ffa448f075dc26c
[ "BSD-3-Clause" ]
1
2019-07-31T15:32:27.000Z
2019-07-31T15:32:27.000Z
dmripreproc/workflows/dwi/outputs.py
slimnsour/dmripreproc
a1e4482baf1c9c7dfb3593126ffa448f075dc26c
[ "BSD-3-Clause" ]
5
2019-07-29T14:25:18.000Z
2019-07-29T15:51:12.000Z
dmripreproc/workflows/dwi/outputs.py
slimnsour/dmripreproc
a1e4482baf1c9c7dfb3593126ffa448f075dc26c
[ "BSD-3-Clause" ]
2
2019-07-25T20:52:36.000Z
2020-01-09T20:58:41.000Z
#!/usr/bin/env python import os from nipype.pipeline import engine as pe from nipype.interfaces import io as nio, utility as niu def init_output_wf(subject_id, session_id, output_folder): op_wf = pe.Workflow(name="output_wf") inputnode = pe.Node( niu.IdentityInterface( fields=[ ...
29.813725
70
0.430779
import os from nipype.pipeline import engine as pe from nipype.interfaces import io as nio, utility as niu def init_output_wf(subject_id, session_id, output_folder): op_wf = pe.Workflow(name="output_wf") inputnode = pe.Node( niu.IdentityInterface( fields=[ "subject_id",...
true
true
1c3a450d5e61cb10eebdcd014cc1a9857f4dbaed
1,169
py
Python
T08/ex06.py
mariogarcc/comphy
3ab05a07dfa2eb8a1165fca1bdfd9bda6c8e27d3
[ "CC0-1.0" ]
null
null
null
T08/ex06.py
mariogarcc/comphy
3ab05a07dfa2eb8a1165fca1bdfd9bda6c8e27d3
[ "CC0-1.0" ]
null
null
null
T08/ex06.py
mariogarcc/comphy
3ab05a07dfa2eb8a1165fca1bdfd9bda6c8e27d3
[ "CC0-1.0" ]
null
null
null
from package import redact_ex from package import solve_implicit_ode import numpy as np EXERCISE_6 = """\ Make a program that is able to graphically solve the previous equation using the Crank-Nicolson scheme.\ """ redact_ex(EXERCISE_6, 6) slices = 20 itern = 1000 plot_frequency = 0.05 deltat = 1e-3 deltax = 1e...
19.813559
75
0.619333
from package import redact_ex from package import solve_implicit_ode import numpy as np EXERCISE_6 = """\ Make a program that is able to graphically solve the previous equation using the Crank-Nicolson scheme.\ """ redact_ex(EXERCISE_6, 6) slices = 20 itern = 1000 plot_frequency = 0.05 deltat = 1e-3 deltax = 1e...
true
true
1c3a457ace03d74282abb93f03643ca8e19a8731
3,196
py
Python
databinding/databinding/settings.py
fp4code/channels-examples
1a7ed1c5b652e6db07206b1f27d7fef249433f2e
[ "BSD-3-Clause" ]
2
2016-10-20T10:15:24.000Z
2017-07-13T08:14:37.000Z
databinding/databinding/settings.py
fp4code/channels-examples
1a7ed1c5b652e6db07206b1f27d7fef249433f2e
[ "BSD-3-Clause" ]
null
null
null
databinding/databinding/settings.py
fp4code/channels-examples
1a7ed1c5b652e6db07206b1f27d7fef249433f2e
[ "BSD-3-Clause" ]
2
2017-02-18T16:55:19.000Z
2019-11-08T00:49:22.000Z
""" Django settings for databinding project. Generated by 'django-admin startproject' using Django 1.10.dev20151126161447. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settin...
27.551724
106
0.691489
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'imasecret' DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.c...
true
true
1c3a45d7bc09c18f7e86ab78c998cc3994f08e87
1,460
py
Python
fastapi/app/api/routes/auth/jwt.py
ais-one/favv
a73016dd9f44d7df59a33721ba961d2c66781ac6
[ "MIT" ]
19
2021-03-10T09:19:22.000Z
2022-03-17T08:52:06.000Z
fastapi/app/api/routes/auth/jwt.py
ais-one/favv
a73016dd9f44d7df59a33721ba961d2c66781ac6
[ "MIT" ]
null
null
null
fastapi/app/api/routes/auth/jwt.py
ais-one/favv
a73016dd9f44d7df59a33721ba961d2c66781ac6
[ "MIT" ]
5
2021-06-13T19:28:18.000Z
2022-01-20T03:30:13.000Z
from jose import jwt from fastapi import APIRouter, HTTPException, Depends from fastapi.responses import JSONResponse from config import get_settings from services.auth import auth_user, create_token router = APIRouter( prefix="/jwt-test", tags=["api_jwt-test"], # dependencies=[Depends(get_token_header)], res...
33.953488
95
0.723288
from jose import jwt from fastapi import APIRouter, HTTPException, Depends from fastapi.responses import JSONResponse from config import get_settings from services.auth import auth_user, create_token router = APIRouter( prefix="/jwt-test", tags=["api_jwt-test"], responses={404: {"description": "Not found"}}, ...
true
true
1c3a4602fdc92cb51e6fef5cd663c0d8996dccd1
419
py
Python
ruptures/__init__.py
sharkls/ruptures
0e94e5770a54bb840461d1834fb49858576cf38d
[ "BSD-2-Clause" ]
1
2021-01-08T02:20:13.000Z
2021-01-08T02:20:13.000Z
ruptures/__init__.py
sharkls/ruptures
0e94e5770a54bb840461d1834fb49858576cf38d
[ "BSD-2-Clause" ]
null
null
null
ruptures/__init__.py
sharkls/ruptures
0e94e5770a54bb840461d1834fb49858576cf38d
[ "BSD-2-Clause" ]
null
null
null
""" Offline change point detection for Python ==================================================================================================== """ from .exceptions import NotEnoughPoints from .datasets import pw_constant, pw_normal, pw_linear, pw_wavy from .detection import ( Binseg, BottomUp, Dynp, ...
20.95
100
0.52506
from .exceptions import NotEnoughPoints from .datasets import pw_constant, pw_normal, pw_linear, pw_wavy from .detection import ( Binseg, BottomUp, Dynp, Omp, OmpK, Pelt, Window, GreedyAR, GreedyLinear, ) from .show import display
true
true
1c3a46f7cd0cf3a423d92a2f22012e957a90a672
373
py
Python
tests/base_integration_test.py
CGJackson/Compi
9fe2a316e9dbe54b01ee274417a07a13f4f990b0
[ "MIT" ]
null
null
null
tests/base_integration_test.py
CGJackson/Compi
9fe2a316e9dbe54b01ee274417a07a13f4f990b0
[ "MIT" ]
null
null
null
tests/base_integration_test.py
CGJackson/Compi
9fe2a316e9dbe54b01ee274417a07a13f4f990b0
[ "MIT" ]
null
null
null
import abc import unittest class IntegrationRoutineTestsBase(abc.ABC, unittest.TestCase): @abc.abstractclassmethod def routine_to_test(self,f,*args,**kwargs): pass @abc.abstractclassmethod def func(self,x): pass def setUp(self): self.default_range = () self.positio...
23.3125
62
0.662198
import abc import unittest class IntegrationRoutineTestsBase(abc.ABC, unittest.TestCase): @abc.abstractclassmethod def routine_to_test(self,f,*args,**kwargs): pass @abc.abstractclassmethod def func(self,x): pass def setUp(self): self.default_range = () self.positio...
true
true
1c3a4851e27f6d4a60b97e3240ae8d2cc68b4522
8,398
py
Python
lib/iugu/merchant.py
wesleywillians/iugu-python
06b86c3ed655e3474d675b2d6abcee4d31c0bcf4
[ "Apache-2.0" ]
null
null
null
lib/iugu/merchant.py
wesleywillians/iugu-python
06b86c3ed655e3474d675b2d6abcee4d31c0bcf4
[ "Apache-2.0" ]
null
null
null
lib/iugu/merchant.py
wesleywillians/iugu-python
06b86c3ed655e3474d675b2d6abcee4d31c0bcf4
[ "Apache-2.0" ]
1
2019-12-07T09:25:13.000Z
2019-12-07T09:25:13.000Z
# coding: utf-8 import httplib import json from urllib import urlencode from urllib2 import urlopen, Request # python-iugu package modules import base, config class IuguMerchant(base.IuguApi): def __init__(self, **kwargs): super(IuguMerchant, self).__init__(**kwargs) self.__conn = base.IuguRequ...
29.992857
96
0.590855
import httplib import json from urllib import urlencode from urllib2 import urlopen, Request import base, config class IuguMerchant(base.IuguApi): def __init__(self, **kwargs): super(IuguMerchant, self).__init__(**kwargs) self.__conn = base.IuguRequests() def create_payment_token(self, car...
true
true
1c3a485eb10e14f69469cc20da1392cebdc72b1f
705
py
Python
src/tp_part_1.0/sawtooth_part/exceptions.py
jlee7x2/SParts
fd39e491d0433a7429c5fdb037d5826d7f34b291
[ "Apache-2.0" ]
12
2018-08-29T23:19:48.000Z
2021-11-18T19:09:21.000Z
src/tp_part_1.0/sawtooth_part/exceptions.py
jlee7x2/SParts
fd39e491d0433a7429c5fdb037d5826d7f34b291
[ "Apache-2.0" ]
18
2018-07-13T22:37:44.000Z
2020-02-20T19:22:14.000Z
src/tp_part_1.0/sawtooth_part/exceptions.py
jlee7x2/SParts
fd39e491d0433a7429c5fdb037d5826d7f34b291
[ "Apache-2.0" ]
16
2018-03-12T21:52:02.000Z
2021-07-13T20:46:10.000Z
# Copyright 2016 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
37.105263
80
0.675177
class PartException(Exception): pass
true
true
1c3a4983f62f57fe9d222b4090dfe1beb3839a73
26,395
py
Python
tests/unit/modules/postgres_test.py
topochan/salt
87d1a7327aee0388e2a5ff3555d8113d974ed11f
[ "Apache-2.0" ]
1
2018-02-03T17:30:56.000Z
2018-02-03T17:30:56.000Z
tests/unit/modules/postgres_test.py
topochan/salt
87d1a7327aee0388e2a5ff3555d8113d974ed11f
[ "Apache-2.0" ]
null
null
null
tests/unit/modules/postgres_test.py
topochan/salt
87d1a7327aee0388e2a5ff3555d8113d974ed11f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Import python libs from __future__ import print_function # Import Salt Testing libs from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, Mock, patch import re ensure_in_syspath('../../') # Import sa...
39.513473
81
0.55018
from __future__ import print_function from salttesting import skipIf, TestCase from salttesting.helpers import ensure_in_syspath from salttesting.mock import NO_MOCK, NO_MOCK_REASON, Mock, patch import re ensure_in_syspath('../../') from salt.modules import postgres postgres.__grains__ = None postgres.__salt__ = ...
true
true
1c3a4a557a20261febd8cee212907d3137fcfe6a
25,108
py
Python
salt/states/lxc.py
Rafflecopter/salt
08bbfcd4d9b93351d7d5d25b097e892026b6f1cd
[ "Apache-2.0" ]
null
null
null
salt/states/lxc.py
Rafflecopter/salt
08bbfcd4d9b93351d7d5d25b097e892026b6f1cd
[ "Apache-2.0" ]
null
null
null
salt/states/lxc.py
Rafflecopter/salt
08bbfcd4d9b93351d7d5d25b097e892026b6f1cd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Manage Linux Containers ======================= ''' from __future__ import absolute_import __docformat__ = 'restructuredtext en' # Import salt libs import salt.utils from salt.exceptions import CommandExecutionError, SaltInvocationError # Container existence/non-existence def present(nam...
32.692708
79
0.516329
from __future__ import absolute_import __docformat__ = 'restructuredtext en' import salt.utils from salt.exceptions import CommandExecutionError, SaltInvocationError def present(name, running=None, clone_from=None, snapshot=False, profile=None, network_pro...
true
true
1c3a4a9ecf45957ca1fd0bd81838024cb663b852
760
py
Python
env/lib/python3.8/site-packages/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
76
2020-07-06T14:44:05.000Z
2022-02-14T15:30:21.000Z
env/lib/python3.8/site-packages/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-08-09T02:30:14.000Z
2022-03-12T00:50:14.000Z
env/lib/python3.8/site-packages/plotly/validators/bar/marker/colorbar/tickformatstop/_dtickrange.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
11
2020-07-12T16:18:07.000Z
2022-02-05T16:48:35.000Z
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="bar.marker.colorbar.tickformatstop", **kwargs ): super(DtickrangeValidator, self).__init__( ...
30.4
75
0.528947
import _plotly_utils.basevalidators class DtickrangeValidator(_plotly_utils.basevalidators.InfoArrayValidator): def __init__( self, plotly_name="dtickrange", parent_name="bar.marker.colorbar.tickformatstop", **kwargs ): super(DtickrangeValidator, self).__init__( ...
true
true
1c3a4bc9c155c07eb7becf3416087da757885227
773,430
py
Python
ncs/db.py
5monkeys/python-ncs
545bae118c5c69ed3ac4c59e6dcc0a6fca1c4571
[ "MIT" ]
3
2019-04-08T05:52:51.000Z
2021-11-19T08:44:30.000Z
ncs/db.py
5monkeys/python-ncs
545bae118c5c69ed3ac4c59e6dcc0a6fca1c4571
[ "MIT" ]
3
2016-09-02T07:30:45.000Z
2021-11-15T17:47:10.000Z
ncs/db.py
5monkeys/python-ncs
545bae118c5c69ed3ac4c59e6dcc0a6fca1c4571
[ "MIT" ]
null
null
null
# encoding: utf-8 # Auto-generated, do not edit colors = [ (u'IRIS 8', 'D1DEDD'), (u'MAROC 17C', 'F2E1CC'), (u'APRIKOSE 12C', 'EA9243'), (u'200 80 20', '94D0CF'), (u'S 4550-G60Y', '746B1A'), (u'TÅRN', '758080'), (u'G8.30.70', 'C7BE6F'), (u'PUTS GUL 5', 'C89460'), (u'HOLMESTRAND', 'ED...
28.690185
42
0.470476
colors = [ (u'IRIS 8', 'D1DEDD'), (u'MAROC 17C', 'F2E1CC'), (u'APRIKOSE 12C', 'EA9243'), (u'200 80 20', '94D0CF'), (u'S 4550-G60Y', '746B1A'), (u'TÅRN', '758080'), (u'G8.30.70', 'C7BE6F'), (u'PUTS GUL 5', 'C89460'), (u'HOLMESTRAND', 'EDECD9'), (u'WN.00.63', 'ABAAAA'), (u'C7.7...
true
true
1c3a4d0cf8187cd80fc3242ca06913159fef2118
467
py
Python
src/teams/migrations/0006_auto_20200712_1641.py
sfernandezf/analytics-yahoofantasy
6242599b903e4b8a7f9c56892ba26591a441b8fb
[ "Apache-2.0" ]
null
null
null
src/teams/migrations/0006_auto_20200712_1641.py
sfernandezf/analytics-yahoofantasy
6242599b903e4b8a7f9c56892ba26591a441b8fb
[ "Apache-2.0" ]
6
2020-03-15T03:32:06.000Z
2022-01-13T03:46:05.000Z
src/teams/migrations/0006_auto_20200712_1641.py
sfernandezf/analytics-yahoofantasy
6242599b903e4b8a7f9c56892ba26591a441b8fb
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.3 on 2020-07-12 16:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('teams', '0005_auto_20200712_1553'), ] operations = [ migrations.AlterField( model_name='yahoomultileagueteam', name=...
24.578947
120
0.640257
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('teams', '0005_auto_20200712_1553'), ] operations = [ migrations.AlterField( model_name='yahoomultileagueteam', name='teams', field=models.ManyToManyFiel...
true
true
1c3a4d3e4f12d05c6794562eefe79d3649fef507
5,869
py
Python
src/corpus/reader.py
amillert/pic2story
efa0c7c966392b4efb88ae370d8eb78cd2ab062b
[ "MIT" ]
3
2020-09-27T21:25:01.000Z
2021-02-14T14:12:04.000Z
src/corpus/reader.py
amillert/pic2story
efa0c7c966392b4efb88ae370d8eb78cd2ab062b
[ "MIT" ]
15
2020-09-26T10:52:56.000Z
2020-11-15T08:19:12.000Z
src/corpus/reader.py
amillert/pic2story
efa0c7c966392b4efb88ae370d8eb78cd2ab062b
[ "MIT" ]
null
null
null
""" Module implementing the Reader class """ from collections import Counter import os import pickle import re from src.corpus.preprocess.corpus_data import CorpusData from src.helper import paths_generator as pgen END_OF_GUTEN = "\n*End of Project Gutenberg(.|\n)*" FROM_TABLE_OF_CONTENTS = "(^.{0,4}[0-9].*\n*)+(.|\...
34.321637
93
0.54183
from collections import Counter import os import pickle import re from src.corpus.preprocess.corpus_data import CorpusData from src.helper import paths_generator as pgen END_OF_GUTEN = "\n*End of Project Gutenberg(.|\n)*" FROM_TABLE_OF_CONTENTS = "(^.{0,4}[0-9].*\n*)+(.|\n)*" AFTER_THE_END = "((THE END)|(The end)|(T...
true
true
1c3a4ebbe7d60505293978f1a5255c7a7e2147e9
1,043
py
Python
src/UQpy/__init__.py
marrov/UQpy
b04a267b3080e3d4d38e876547ba0d3b979734f3
[ "MIT" ]
132
2018-03-13T13:56:33.000Z
2022-03-21T13:59:17.000Z
src/UQpy/__init__.py
marrov/UQpy
b04a267b3080e3d4d38e876547ba0d3b979734f3
[ "MIT" ]
140
2018-05-21T13:40:01.000Z
2022-03-29T14:18:01.000Z
src/UQpy/__init__.py
marrov/UQpy
b04a267b3080e3d4d38e876547ba0d3b979734f3
[ "MIT" ]
61
2018-05-02T13:40:05.000Z
2022-03-06T11:31:21.000Z
""" Uncertainty Quantification with Python ======================================== """ import pkg_resources import UQpy.Distributions import UQpy.SampleMethods import UQpy.DimensionReduction import UQpy.Inference import UQpy.Reliability import UQpy.RunModel import UQpy.SampleMethods import UQpy.StochasticProcess imp...
24.833333
64
0.790988
import pkg_resources import UQpy.Distributions import UQpy.SampleMethods import UQpy.DimensionReduction import UQpy.Inference import UQpy.Reliability import UQpy.RunModel import UQpy.SampleMethods import UQpy.StochasticProcess import UQpy.Surrogates import UQpy.Sensitivity import UQpy.Transformations import UQpy.Util...
true
true
1c3a5319a9e2f955caf7dd2d1ca5fa42ac6dd3c8
2,226
py
Python
Main App/app/main.py
Rathore25/Sapiens-QA
0bf794784c3a3b26b541dbc2fa894756c979e5c4
[ "MIT" ]
null
null
null
Main App/app/main.py
Rathore25/Sapiens-QA
0bf794784c3a3b26b541dbc2fa894756c979e5c4
[ "MIT" ]
null
null
null
Main App/app/main.py
Rathore25/Sapiens-QA
0bf794784c3a3b26b541dbc2fa894756c979e5c4
[ "MIT" ]
null
null
null
from flask import Flask, request, jsonify from flask_cors import CORS import os import pandas as pd import requests import wget import json import wget from cdqa.pipeline import QAPipeline app = Flask(__name__) CORS(app) print("Started main.py !!!") response = requests.get('https://docs.google.com/uc?export=downlo...
30.916667
122
0.754717
from flask import Flask, request, jsonify from flask_cors import CORS import os import pandas as pd import requests import wget import json import wget from cdqa.pipeline import QAPipeline app = Flask(__name__) CORS(app) print("Started main.py !!!") response = requests.get('https://docs.google.com/uc?export=downlo...
true
true
1c3a534c5fb481b4cca1e2855ebe3259df4b0b1e
1,423
py
Python
docs/update_command_help.py
thombashi/sqlitebiter
fbed3e367b4f0f55edcd4d818c73abae55c34614
[ "MIT" ]
728
2016-05-05T05:07:28.000Z
2022-03-28T17:54:20.000Z
docs/update_command_help.py
thombashi/sqlitebiter
fbed3e367b4f0f55edcd4d818c73abae55c34614
[ "MIT" ]
55
2016-06-14T04:00:49.000Z
2022-03-27T15:07:40.000Z
docs/update_command_help.py
thombashi/sqlitebiter
fbed3e367b4f0f55edcd4d818c73abae55c34614
[ "MIT" ]
59
2016-05-05T13:23:23.000Z
2022-03-15T10:23:10.000Z
#!/usr/bin/env python3 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import os import sys from textwrap import dedent, indent from subprocrunner import SubprocessRunner def main() -> int: env = dict(os.environ, LC_ALL="C.UTF-8") proc = SubprocessRunner("sqlitebiter -h") proc....
21.892308
65
0.477864
import os import sys from textwrap import dedent, indent from subprocrunner import SubprocessRunner def main() -> int: env = dict(os.environ, LC_ALL="C.UTF-8") proc = SubprocessRunner("sqlitebiter -h") proc.run(env=env, check=True) assert proc.stdout help_file_path = "pages/usage/help.txt" ...
true
true
1c3a53ee161769f466fd591578a828636ec7e696
165
py
Python
algo_probs/newcoder/classic/nc103.py
Jackthebighead/recruiment-2022
a81007908e3c2f65a6be3ff2d62dfb92d0753b0d
[ "MIT" ]
null
null
null
algo_probs/newcoder/classic/nc103.py
Jackthebighead/recruiment-2022
a81007908e3c2f65a6be3ff2d62dfb92d0753b0d
[ "MIT" ]
null
null
null
algo_probs/newcoder/classic/nc103.py
Jackthebighead/recruiment-2022
a81007908e3c2f65a6be3ff2d62dfb92d0753b0d
[ "MIT" ]
null
null
null
# # 反转字符串 # @param str string字符串 # @return string字符串 # class Solution: def solve(self , str ): # write code here return ''.join(list(str)[::-1])
18.333333
39
0.581818
class Solution: def solve(self , str ): return ''.join(list(str)[::-1])
true
true
1c3a55ad542a990e9bd796ec0db840230da9586e
2,220
py
Python
picprocessing.py
iGEMDarmstadt/HoloPyGuy
160bcf551efcc152d9b74cc38726647c0a7c1d2e
[ "MIT" ]
3
2019-04-02T09:59:34.000Z
2022-03-03T23:43:12.000Z
picprocessing.py
iGEMDarmstadt/HoloPyGuy
160bcf551efcc152d9b74cc38726647c0a7c1d2e
[ "MIT" ]
null
null
null
picprocessing.py
iGEMDarmstadt/HoloPyGuy
160bcf551efcc152d9b74cc38726647c0a7c1d2e
[ "MIT" ]
3
2018-03-24T06:40:04.000Z
2020-08-07T11:22:40.000Z
import os from PIL import Image import numpy as np #Takes all pics in "raw pics" directory, convert to grey scale, #cutting into square images, and same to "ready pics" directory def create_temp_pictures(filenames): filelist = [] cnt = 0 for filename in filenames: im = Image.open(filename) ...
28.831169
107
0.568919
import os from PIL import Image import numpy as np def create_temp_pictures(filenames): filelist = [] cnt = 0 for filename in filenames: im = Image.open(filename) half_the_width = im.size[0] / 2 half_the_height = im.size[1] / 2 cut = np.minimum(half_the_height, half_the_...
true
true
1c3a55b15396eb415d49f53fd1b78d92ba51bbeb
562
py
Python
test_curator/integration/test_space_based.py
brookerj11211/curator
2f141e168a3eea9d2f31aa4054c63646968e7dc6
[ "Apache-2.0" ]
null
null
null
test_curator/integration/test_space_based.py
brookerj11211/curator
2f141e168a3eea9d2f31aa4054c63646968e7dc6
[ "Apache-2.0" ]
null
null
null
test_curator/integration/test_space_based.py
brookerj11211/curator
2f141e168a3eea9d2f31aa4054c63646968e7dc6
[ "Apache-2.0" ]
null
null
null
from datetime import datetime, timedelta import curator from . import CuratorTestCase class TestSpaceBasedDeletion(CuratorTestCase): # Testing https://github.com/elasticsearch/curator/issues/254 def test_curator_will_not_match_all_when_no_indices_match(self): self.create_indices(10) curator.d...
37.466667
95
0.727758
from datetime import datetime, timedelta import curator from . import CuratorTestCase class TestSpaceBasedDeletion(CuratorTestCase): def test_curator_will_not_match_all_when_no_indices_match(self): self.create_indices(10) curator.delete(self.client, disk_space=0.0000001, prefix='foo-', timest...
true
true
1c3a58f67aa962ae142a83070e718928c13fc40f
1,943
py
Python
spymaster/collectors/pinger.py
spotify/spymaster
d57fab9fa5bd7d796c9274ff13e418bf5f12e8d0
[ "Apache-2.0" ]
1
2016-02-29T02:02:37.000Z
2016-02-29T02:02:37.000Z
spymaster/collectors/pinger.py
spotify/spymaster
d57fab9fa5bd7d796c9274ff13e418bf5f12e8d0
[ "Apache-2.0" ]
null
null
null
spymaster/collectors/pinger.py
spotify/spymaster
d57fab9fa5bd7d796c9274ff13e418bf5f12e8d0
[ "Apache-2.0" ]
2
2018-11-08T19:33:48.000Z
2022-03-19T15:43:39.000Z
import urllib2 from collections import namedtuple from urlparse import urlparse from spymaster.common import Collector _Target = namedtuple('_Target', ['service', 'hostname', 'url', 'expected_status', 'timeout']) class Pinger(Collector): def __in...
39.653061
88
0.486876
import urllib2 from collections import namedtuple from urlparse import urlparse from spymaster.common import Collector _Target = namedtuple('_Target', ['service', 'hostname', 'url', 'expected_status', 'timeout']) class Pinger(Collector): def __in...
true
true
1c3a593e81ce1a638da1118b4818b74281d0c226
677
py
Python
project/bin/rst2s5.py
edsml-7f4a1762/flood_risk
7ea85d12e9255fdda8a764a3c669a79d3b71b967
[ "MIT" ]
null
null
null
project/bin/rst2s5.py
edsml-7f4a1762/flood_risk
7ea85d12e9255fdda8a764a3c669a79d3b71b967
[ "MIT" ]
null
null
null
project/bin/rst2s5.py
edsml-7f4a1762/flood_risk
7ea85d12e9255fdda8a764a3c669a79d3b71b967
[ "MIT" ]
null
null
null
#!/Users/lc2216/Desktop/ads-deluge-wye/project/bin/python3 # $Id: rst2s5.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Chris Liechti <cliechti@gmx.net> # Copyright: This module has been placed in the public domain. """ A minimal front end to the Docutils Publisher, producing HTML slides using the S5 template syste...
27.08
74
0.744461
try: import locale locale.setlocale(locale.LC_ALL, '') except: pass from docutils.core import publish_cmdline, default_description description = ('Generates S5 (X)HTML slideshow documents from standalone ' 'reStructuredText sources. ' + default_description) publish_cmdline(writer_name...
true
true
1c3a5d55b0db0836e6cb67b8a33f09d4c149f190
747
py
Python
replace.py
mstiehr-dev/modify-setters-py
b619c7b75de6fe6698662e68b9ac0a7c14edb5fd
[ "Apache-2.0" ]
null
null
null
replace.py
mstiehr-dev/modify-setters-py
b619c7b75de6fe6698662e68b9ac0a7c14edb5fd
[ "Apache-2.0" ]
null
null
null
replace.py
mstiehr-dev/modify-setters-py
b619c7b75de6fe6698662e68b9ac0a7c14edb5fd
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import re import sys #find . -type f -name TG*Form.java | xargs python3 /cygdrive/c/Temp/regex/regex.py def replace(filename): print("start processing " + filename) f = open(filename, "r") text = f.read() f.close() pattern = re.compile(r"(?P<indent>\s*)(?P<signature>(\w|\s|\d|[\(\)])*{...
25.758621
157
0.617135
import re import sys def replace(filename): print("start processing " + filename) f = open(filename, "r") text = f.read() f.close() pattern = re.compile(r"(?P<indent>\s*)(?P<signature>(\w|\s|\d|[\(\)])*{\s*)(?P<assignment>this(.)(\w|\d)* = )StringUtils.trimToNull\((?P<arg2>(\w|\s)*)\);") hits = len(re.finda...
true
true
1c3a5e42ec526350ed098aa1efd92fcb74e3584e
3,457
py
Python
catalyst/contrib/optimizers/radam.py
andrey-avdeev/catalyst
fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3
[ "Apache-2.0" ]
1
2019-11-26T06:41:33.000Z
2019-11-26T06:41:33.000Z
catalyst/contrib/optimizers/radam.py
andrey-avdeev/catalyst
fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3
[ "Apache-2.0" ]
null
null
null
catalyst/contrib/optimizers/radam.py
andrey-avdeev/catalyst
fd17aaba7775c99b7e2b1ce86e60aa8f2379acc3
[ "Apache-2.0" ]
1
2020-04-16T10:20:00.000Z
2020-04-16T10:20:00.000Z
import math import torch from torch.optim.optimizer import Optimizer class RAdam(Optimizer): def __init__( self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0 ): """ Taken from https://github.com/LiyuanLucasLiu/RAdam """ ...
35.27551
79
0.460515
import math import torch from torch.optim.optimizer import Optimizer class RAdam(Optimizer): def __init__( self, params, lr=1e-3, betas=(0.9, 0.999), eps=1e-8, weight_decay=0 ): defaults = dict(lr=lr, betas=betas, eps=eps, weight_decay=weight_decay) ...
true
true
1c3a6030de899d59cc2c0d433041be9a2c1f1fab
2,946
py
Python
python/cuml/test/test_lasso.py
ksangeek/cuml
1f508d989c1d7974c475f115f6ea063aea8aab39
[ "Apache-2.0" ]
null
null
null
python/cuml/test/test_lasso.py
ksangeek/cuml
1f508d989c1d7974c475f115f6ea063aea8aab39
[ "Apache-2.0" ]
null
null
null
python/cuml/test/test_lasso.py
ksangeek/cuml
1f508d989c1d7974c475f115f6ea063aea8aab39
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
39.28
75
0.643245
import cudf import pytest import numpy as np import pandas as pd from cuml.linear_model import Lasso as cuLasso from sklearn.linear_model import Lasso from sklearn.datasets import make_regression from sklearn.metrics import mean_squared_error from cuml.test.utils import array_equal @pytest.mark.parametrize('input_ty...
true
true
1c3a606d0e82c38b08cca99789d44c599c1ff347
144
py
Python
search/apps.py
techonerd/BankSearch
5a53fa6a3c3d14d33a31195640318b25683b0df0
[ "Apache-2.0" ]
null
null
null
search/apps.py
techonerd/BankSearch
5a53fa6a3c3d14d33a31195640318b25683b0df0
[ "Apache-2.0" ]
2
2022-01-11T22:39:52.000Z
2022-01-11T22:46:37.000Z
search/apps.py
techonerd/BankSearch
5a53fa6a3c3d14d33a31195640318b25683b0df0
[ "Apache-2.0" ]
null
null
null
from django.apps import AppConfig class SearchConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "search"
20.571429
56
0.756944
from django.apps import AppConfig class SearchConfig(AppConfig): default_auto_field = "django.db.models.BigAutoField" name = "search"
true
true
1c3a65b0a8168376455fc36b3936331f5b116418
940
py
Python
calculator.py
avinashangular/python
3b19a8975aa201478a7ef0f12fa1745c1fabef7b
[ "MIT" ]
1
2021-02-11T03:48:45.000Z
2021-02-11T03:48:45.000Z
calculator.py
avinashangular/python
3b19a8975aa201478a7ef0f12fa1745c1fabef7b
[ "MIT" ]
null
null
null
calculator.py
avinashangular/python
3b19a8975aa201478a7ef0f12fa1745c1fabef7b
[ "MIT" ]
null
null
null
# Function to add two numbers def add(num1, num2): return num1 + num2 # Function to substract two numbers def substract(num1, num2): return num1 - num2; # Function to multiply two numbers def multiply(num1, num2): return num1 * num2 # Function to divide two numbers def divide(num1, num2): return...
20.888889
58
0.601064
def add(num1, num2): return num1 + num2 def substract(num1, num2): return num1 - num2; def multiply(num1, num2): return num1 * num2 def divide(num1, num2): return num1 / num2 print("Please select opeation - \n" \ "1. Add\n" \ "2. Substract\n" \ "3. Multiply\n" \ "4. Divide\n") ...
true
true
1c3a65e0bc5bf81be1df726e163d85941efc563f
209
py
Python
PycharmProjects/pythonProject/venv/ex011.py
Caiocolas/-Exercicios-Python-
7c4fa922f3ec89f1d5a5ccd928651722b932793c
[ "MIT" ]
null
null
null
PycharmProjects/pythonProject/venv/ex011.py
Caiocolas/-Exercicios-Python-
7c4fa922f3ec89f1d5a5ccd928651722b932793c
[ "MIT" ]
null
null
null
PycharmProjects/pythonProject/venv/ex011.py
Caiocolas/-Exercicios-Python-
7c4fa922f3ec89f1d5a5ccd928651722b932793c
[ "MIT" ]
null
null
null
altura = float(input('Altura da parede:')) largura = float(input('Largura da parede:')) area = (altura * largura) print('A área da parede é {} e vc precisara de {} litros de tinta para pintar a parede toda''')
52.25
95
0.698565
altura = float(input('Altura da parede:')) largura = float(input('Largura da parede:')) area = (altura * largura) print('A área da parede é {} e vc precisara de {} litros de tinta para pintar a parede toda''')
true
true