hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 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
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72b7f5a198735854caf644778be99b784ac4157
19,981
py
Python
Lib/distutils/sysconfig.py
zgrge/cpython
0e59d247457dde747d84c899e96423647b3da149
[ "PSF-2.0" ]
null
null
null
Lib/distutils/sysconfig.py
zgrge/cpython
0e59d247457dde747d84c899e96423647b3da149
[ "PSF-2.0" ]
null
null
null
Lib/distutils/sysconfig.py
zgrge/cpython
0e59d247457dde747d84c899e96423647b3da149
[ "PSF-2.0" ]
1
2021-09-04T13:33:46.000Z
2021-09-04T13:33:46.000Z
"""Provide access to Python's configuration information. The specific configuration variables available depend heavily on the platform and configuration. The values may be retrieved using get_config_var(name), and the list of variables is available via get_config_vars().keys(). Additional convenience functions are a...
37.629002
94
0.598619
import _imp import os import re import sys from .errors import DistutilsPlatformError PREFIX = os.path.normpath(sys.prefix) EXEC_PREFIX = os.path.normpath(sys.exec_prefix) BASE_PREFIX = os.path.normpath(sys.base_prefix) BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) if "_PYTHON_PROJECT_BASE" in os.en...
true
true
f72b80495eb53cc9c695a5f53c6e25c1d550506d
2,820
py
Python
tack/commands/Command.py
moxie0/TACKpy
5cd8ee33b4a6eba4ae9fed3582682e2658e4fee2
[ "Unlicense" ]
15
2015-04-11T03:51:16.000Z
2022-02-01T10:37:47.000Z
tack/commands/Command.py
moxie0/TACKpy
5cd8ee33b4a6eba4ae9fed3582682e2658e4fee2
[ "Unlicense" ]
null
null
null
tack/commands/Command.py
moxie0/TACKpy
5cd8ee33b4a6eba4ae9fed3582682e2658e4fee2
[ "Unlicense" ]
5
2016-09-26T17:50:35.000Z
2022-02-01T10:37:48.000Z
import getopt import getpass import sys import time from tack.structures.TackKeyFile import TackKeyFile from tack.util.Time import Time from tack.version import __version__ from tack.InvalidPasswordException import InvalidPasswordException class Command: def __init__(self, argv, options, flags): try: ...
30
88
0.569858
import getopt import getpass import sys import time from tack.structures.TackKeyFile import TackKeyFile from tack.util.Time import Time from tack.version import __version__ from tack.InvalidPasswordException import InvalidPasswordException class Command: def __init__(self, argv, options, flags): try: ...
false
true
f72b8091065be3b6530f5a20ec604f2dd1b4fe73
5,012
py
Python
core/routine.py
cybert79/Osmedeus
684d853144e2f85343c3367440120142455f296b
[ "MIT" ]
1
2019-07-14T20:48:19.000Z
2019-07-14T20:48:19.000Z
core/routine.py
KbaHaxor/Osmedeus
0894d52ad5949e9151b0fd05d9746ecafc8057b5
[ "MIT" ]
null
null
null
core/routine.py
KbaHaxor/Osmedeus
0894d52ad5949e9151b0fd05d9746ecafc8057b5
[ "MIT" ]
null
null
null
import sys, time from core import utils from pprint import pprint from modules import initials from modules import subdomain from modules import recon from modules import assetfinding from modules import takeover from modules import screenshot from modules import portscan from modules import gitscan from modules impo...
25.441624
115
0.70012
import sys, time from core import utils from pprint import pprint from modules import initials from modules import subdomain from modules import recon from modules import assetfinding from modules import takeover from modules import screenshot from modules import portscan from modules import gitscan from modules impo...
true
true
f72b81d4193fded68a3f2f0d2fc449f357b11230
108,819
py
Python
synapse/handlers/federation.py
V02460/synapse
782dd72037cf71fb3f9e4922b07c56df2f59de75
[ "Apache-2.0" ]
null
null
null
synapse/handlers/federation.py
V02460/synapse
782dd72037cf71fb3f9e4922b07c56df2f59de75
[ "Apache-2.0" ]
null
null
null
synapse/handlers/federation.py
V02460/synapse
782dd72037cf71fb3f9e4922b07c56df2f59de75
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # Copyright 2017-2018 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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 Licens...
38.411225
99
0.5732
import itertools import logging import six from six import iteritems, itervalues from six.moves import http_client, zip from signedjson.key import decode_verify_key_bytes from signedjson.sign import verify_signed_json from unpaddedbase64 import decode_base64 from twisted.internet import defer from...
true
true
f72b820782f5de6dce810345423aa0c625f54b34
53,798
py
Python
mysql-utilities-1.6.0/mysql/utilities/common/rpl_sync.py
bopopescu/mysql-dbcompare
1e912fd87282be3b3bed48487e6beb0ecb1de339
[ "Apache-2.0" ]
2
2018-03-20T07:42:58.000Z
2018-03-20T07:43:49.000Z
mysql-utilities-1.6.0/mysql/utilities/common/rpl_sync.py
bopopescu/mysql-dbcompare
1e912fd87282be3b3bed48487e6beb0ecb1de339
[ "Apache-2.0" ]
null
null
null
mysql-utilities-1.6.0/mysql/utilities/common/rpl_sync.py
bopopescu/mysql-dbcompare
1e912fd87282be3b3bed48487e6beb0ecb1de339
[ "Apache-2.0" ]
1
2020-07-23T23:07:08.000Z
2020-07-23T23:07:08.000Z
# # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hope...
48.379496
79
0.549686
import re import sys from multiprocessing.pool import ThreadPool from mysql.utilities.command.dbcompare import diff_objects, get_common_objects from mysql.utilities.common.database import Database from mysql.utilities.common.messages import ERROR_USER_WITHOUT_PRIVILEGES from mysql.utilities.common.pa...
true
true
f72b84523234516e230f5570be8f20af24029148
29,913
py
Python
rbc/remotejit.py
guilhermeleobas/rbc
4b568b91c6ce3ef7727fee001169302c3803c4fd
[ "BSD-3-Clause" ]
null
null
null
rbc/remotejit.py
guilhermeleobas/rbc
4b568b91c6ce3ef7727fee001169302c3803c4fd
[ "BSD-3-Clause" ]
null
null
null
rbc/remotejit.py
guilhermeleobas/rbc
4b568b91c6ce3ef7727fee001169302c3803c4fd
[ "BSD-3-Clause" ]
null
null
null
"""RemoteJIT client/server config functions """ __all__ = ['RemoteJIT', 'Signature', 'Caller'] import os import inspect import warnings import ctypes from contextlib import nullcontext from . import irtools from .typesystem import Type, get_signature from .thrift import Server, Dispatcher, dispatchermethod, Data, Cli...
34.2254
93
0.585063
__all__ = ['RemoteJIT', 'Signature', 'Caller'] import os import inspect import warnings import ctypes from contextlib import nullcontext from . import irtools from .typesystem import Type, get_signature from .thrift import Server, Dispatcher, dispatchermethod, Data, Client from .utils import get_local_ip from .target...
true
true
f72b8471d48e46d56ffa1ffa9f9a1797ba37c49a
521
py
Python
objectivec/test/testdata/single_add_gen.py
kimjungwow/onnxruntime-riscv
3c21abef03190648fe68a6633ac026725e6dfc58
[ "MIT" ]
18
2020-05-19T12:48:07.000Z
2021-04-28T06:41:57.000Z
objectivec/test/testdata/single_add_gen.py
kimjungwow/onnxruntime-riscv
3c21abef03190648fe68a6633ac026725e6dfc58
[ "MIT" ]
61
2021-05-31T05:15:41.000Z
2022-03-29T22:34:33.000Z
objectivec/test/testdata/single_add_gen.py
ekmixon/onnxruntime
1ab8a95eb6675afb6d0ad9d93600ef0022e2ddb5
[ "MIT" ]
9
2021-05-14T20:17:26.000Z
2022-03-20T11:44:29.000Z
import onnx from onnx import helper from onnx import TensorProto graph = helper.make_graph( [ # nodes helper.make_node("Add", ["A", "B"], ["C"], "Add"), ], "SingleAdd", # name [ # inputs helper.make_tensor_value_info('A', TensorProto.FLOAT, [1]), helper.make_tensor_value_info...
26.05
67
0.619962
import onnx from onnx import helper from onnx import TensorProto graph = helper.make_graph( [ helper.make_node("Add", ["A", "B"], ["C"], "Add"), ], "SingleAdd", [ helper.make_tensor_value_info('A', TensorProto.FLOAT, [1]), helper.make_tensor_value_info('B', TensorProto.FLO...
true
true
f72b855250840e726278906521e0e8944c433f43
426
py
Python
src/ploomber/sources/__init__.py
MarcoJHB/ploomber
4849ef6915572f7934392443b4faf138172b9596
[ "Apache-2.0" ]
2,141
2020-02-14T02:34:34.000Z
2022-03-31T22:43:20.000Z
src/ploomber/sources/__init__.py
MarcoJHB/ploomber
4849ef6915572f7934392443b4faf138172b9596
[ "Apache-2.0" ]
660
2020-02-06T16:15:57.000Z
2022-03-31T22:55:01.000Z
src/ploomber/sources/__init__.py
MarcoJHB/ploomber
4849ef6915572f7934392443b4faf138172b9596
[ "Apache-2.0" ]
122
2020-02-14T18:53:05.000Z
2022-03-27T22:33:24.000Z
from ploomber.sources.sources import (SQLScriptSource, SQLQuerySource, GenericSource, FileSource, EmptySource) from ploomber.sources.notebooksource import NotebookSource from ploomber.sources.pythoncallablesource import PythonCallableSource __all__ = [ 'PythonCallableSource', ...
42.6
77
0.744131
from ploomber.sources.sources import (SQLScriptSource, SQLQuerySource, GenericSource, FileSource, EmptySource) from ploomber.sources.notebooksource import NotebookSource from ploomber.sources.pythoncallablesource import PythonCallableSource __all__ = [ 'PythonCallableSource', ...
true
true
f72b86570c3337610eec48f13a1fb108a1bdff30
21,794
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_vpn_connections_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-03-24T06:26:11.000Z
2021-04-18T15:55:59.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_vpn_connections_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/operations/_vpn_connections_operations.py
beltr0n/azure-sdk-for-python
2f7fb8bee881b0fc0386a0ad5385755ceedd0453
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.307692
220
0.663944
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f72b87aee4ad934ef97feead34023c03afde9798
1,084
py
Python
cloudfunc/client.py
jadbin/cloudfunc
6d54bd993a784d20baba34e8ff897401efb12a22
[ "MIT" ]
2
2020-08-03T11:39:29.000Z
2020-08-05T07:09:17.000Z
cloudfunc/client.py
jadbin/cloudfunc
6d54bd993a784d20baba34e8ff897401efb12a22
[ "MIT" ]
null
null
null
cloudfunc/client.py
jadbin/cloudfunc
6d54bd993a784d20baba34e8ff897401efb12a22
[ "MIT" ]
null
null
null
# coding=utf-8 import os import pickle import requests from .errors import CloudFuncError class CloudFuncClient: def __init__(self, serve_address: str = None): if serve_address is None: serve_address = os.environ['CLOUDFUNC_SERVE_ADDRESS'] assert serve_address is not None, 'cloudfun...
30.111111
80
0.595941
import os import pickle import requests from .errors import CloudFuncError class CloudFuncClient: def __init__(self, serve_address: str = None): if serve_address is None: serve_address = os.environ['CLOUDFUNC_SERVE_ADDRESS'] assert serve_address is not None, 'cloudfunc-serve addres...
true
true
f72b87c6dad7aa35765c68a88cffd6f561ea82e6
3,138
py
Python
tests/beta_tests/test_shorted_ipv6_address.py
the-zebulan/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
40
2016-03-09T12:26:20.000Z
2022-03-23T08:44:51.000Z
tests/beta_tests/test_shorted_ipv6_address.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
null
null
null
tests/beta_tests/test_shorted_ipv6_address.py
akalynych/CodeWars
1eafd1247d60955a5dfb63e4882e8ce86019f43a
[ "MIT" ]
36
2016-11-07T19:59:58.000Z
2022-03-31T11:18:27.000Z
import unittest from katas.beta.shorten_ipv6_address import shorten class ShortenIPv6TestCase(unittest.TestCase): def test_equal_1(self): self.assertEqual(shorten('2642:0006:0006:0000:0000:0000:0000:9147'), '2642:6:6::9147') def test_equal_2(self): self.assertEqual(s...
38.268293
76
0.581899
import unittest from katas.beta.shorten_ipv6_address import shorten class ShortenIPv6TestCase(unittest.TestCase): def test_equal_1(self): self.assertEqual(shorten('2642:0006:0006:0000:0000:0000:0000:9147'), '2642:6:6::9147') def test_equal_2(self): self.assertEqual(s...
true
true
f72b8813889944a82a8a131828595a1454d68cd2
116,092
py
Python
electrum/lnworker.py
vhn0912/electrum
a65b97d25c3e37c0e77484f1846e537f9d5be274
[ "MIT" ]
1
2022-02-24T14:05:49.000Z
2022-02-24T14:05:49.000Z
electrum/lnworker.py
vhn0912/electrum
a65b97d25c3e37c0e77484f1846e537f9d5be274
[ "MIT" ]
null
null
null
electrum/lnworker.py
vhn0912/electrum
a65b97d25c3e37c0e77484f1846e537f9d5be274
[ "MIT" ]
null
null
null
# Copyright (C) 2018 The Electrum developers # Distributed under the MIT software license, see the accompanying # file LICENCE or http://www.opensource.org/licenses/mit-license.php import asyncio import os from decimal import Decimal import random import time from typing import (Optional, Sequence, Tuple, List, Set, D...
49.358844
201
0.631671
import asyncio import os from decimal import Decimal import random import time from typing import (Optional, Sequence, Tuple, List, Set, Dict, TYPE_CHECKING, NamedTuple, Union, Mapping, Any, Iterable, AsyncGenerator, DefaultDict) import threading import socket import aiohttp import json from dat...
true
true
f72b88a082eaa6db2a20df009f1b14a4cabb69cb
355
py
Python
unified_api/utils/utils.py
campos537/deep-fashion-system
1de31dd6260cc967e1832cff63ae7e537a3a4e9d
[ "Unlicense" ]
1
2021-04-06T00:43:26.000Z
2021-04-06T00:43:26.000Z
unified_api/utils/utils.py
campos537/deep-fashion-system
1de31dd6260cc967e1832cff63ae7e537a3a4e9d
[ "Unlicense" ]
null
null
null
unified_api/utils/utils.py
campos537/deep-fashion-system
1de31dd6260cc967e1832cff63ae7e537a3a4e9d
[ "Unlicense" ]
null
null
null
def valid_pubsub(config): if (config.get("topic_id") is not None and config.get("project_id") is not None and config.get("subscription_id") is not None): return True return False def valid_kafka(config): if config.get("bootstrap_server") is not None and config.get("port") is not None: ...
35.5
85
0.673239
def valid_pubsub(config): if (config.get("topic_id") is not None and config.get("project_id") is not None and config.get("subscription_id") is not None): return True return False def valid_kafka(config): if config.get("bootstrap_server") is not None and config.get("port") is not None: ...
true
true
f72b8a6bcb330314847fdb6f9ab7b88b743e3aa1
3,094
py
Python
sdk/python/kfp/cli/diagnose_me/kubernetes_cluster_test.py
ConverJens/pipelines
a1d453af214ec9eebad73fb05845dd3499d60d00
[ "Apache-2.0" ]
6
2020-05-19T02:35:11.000Z
2020-05-29T17:58:42.000Z
sdk/python/kfp/cli/diagnose_me/kubernetes_cluster_test.py
ConverJens/pipelines
a1d453af214ec9eebad73fb05845dd3499d60d00
[ "Apache-2.0" ]
1,932
2021-01-25T11:23:37.000Z
2022-03-31T17:10:18.000Z
sdk/python/kfp/cli/diagnose_me/kubernetes_cluster_test.py
ConverJens/pipelines
a1d453af214ec9eebad73fb05845dd3499d60d00
[ "Apache-2.0" ]
11
2020-05-19T22:26:41.000Z
2021-01-25T09:56:21.000Z
# Lint as: python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License,Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
40.181818
76
0.724952
from typing import Text import unittest from unittest import mock from . import kubernetes_cluster as dkc from . import utility class KubernetesClusterTest(unittest.TestCase): @mock.patch.object(dkc, 'execute_kubectl_command', autospec=True) def test_project_configuration_gcloud(self, mock_execute...
true
true
f72b8a7bda68abbe8202a4c1804acb456c64dc74
1,096
py
Python
synth.py
athakor/java-monitoring
6c013839c5b349e4402a3fa87245930d8d1cc20b
[ "Apache-2.0" ]
null
null
null
synth.py
athakor/java-monitoring
6c013839c5b349e4402a3fa87245930d8d1cc20b
[ "Apache-2.0" ]
null
null
null
synth.py
athakor/java-monitoring
6c013839c5b349e4402a3fa87245930d8d1cc20b
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
29.621622
74
0.756387
import synthtool as s import synthtool.gcp as gcp import synthtool.languages.java as java gapic = gcp.GAPICGenerator() service = 'monitoring' versions = ['v3'] config_pattern = '/google/monitoring/artman_monitoring.yaml' for version in versions: java.gapic_library( service=service, version=v...
true
true
f72b8af740fb1cc78203d79551f725c340162fdf
49
py
Python
typings/bl_rna_utils/__init__.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
2
2021-12-12T18:51:52.000Z
2022-02-23T09:49:16.000Z
typings/bl_rna_utils/__init__.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
2
2021-11-08T12:09:02.000Z
2021-12-12T23:01:12.000Z
typings/bl_rna_utils/__init__.py
Argmaster/PyR3
6786bcb6a101fe4bd4cc50fe43767b8178504b15
[ "MIT" ]
null
null
null
import sys import typing from . import data_path
12.25
23
0.816327
import sys import typing from . import data_path
true
true
f72b8b472726026675a7b89a1c670dce52cfa9b7
2,274
py
Python
tests/model/model_discovery_test.py
nickgaya/bravado-core
16e752963bfceb4adfa43724085bc4127eefcd59
[ "BSD-3-Clause" ]
122
2015-04-22T17:31:18.000Z
2021-11-08T10:29:57.000Z
tests/model/model_discovery_test.py
nickgaya/bravado-core
16e752963bfceb4adfa43724085bc4127eefcd59
[ "BSD-3-Clause" ]
364
2015-04-10T22:19:23.000Z
2022-02-25T08:55:10.000Z
tests/model/model_discovery_test.py
nickgaya/bravado-core
16e752963bfceb4adfa43724085bc4127eefcd59
[ "BSD-3-Clause" ]
118
2015-04-20T15:11:53.000Z
2021-12-09T10:03:34.000Z
# -*- coding: utf-8 -*- import mock import pytest from bravado_core.model import _run_post_processing from bravado_core.model import model_discovery from bravado_core.spec import Spec @pytest.fixture def wrap__run_post_processing(): with mock.patch( 'bravado_core.model._run_post_processing', wrap...
33.940299
195
0.690413
import mock import pytest from bravado_core.model import _run_post_processing from bravado_core.model import model_discovery from bravado_core.spec import Spec @pytest.fixture def wrap__run_post_processing(): with mock.patch( 'bravado_core.model._run_post_processing', wraps=_run_post_processing,...
true
true
f72b8df9aa69d2cc28657e451f4a61aca75b3217
2,091
py
Python
toys/sqlalchemy_bakery.py
mikegreen7892003/PythonToy
e9218cdee4a38835fdbebad0e429ddf52bb444b4
[ "MIT" ]
null
null
null
toys/sqlalchemy_bakery.py
mikegreen7892003/PythonToy
e9218cdee4a38835fdbebad0e429ddf52bb444b4
[ "MIT" ]
null
null
null
toys/sqlalchemy_bakery.py
mikegreen7892003/PythonToy
e9218cdee4a38835fdbebad0e429ddf52bb444b4
[ "MIT" ]
null
null
null
""" Just for Python 3 """ import logging import pprint import tornado.web import tornado.httpserver from tornado.options import define, options, parse_command_line from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext import baked fro...
23.761364
105
0.659971
import logging import pprint import tornado.web import tornado.httpserver from tornado.options import define, options, parse_command_line from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext import baked from sqlalchemy.orm import Se...
true
true
f72b8dfa12eefecf24dc259425f0b7961d8f210a
28,498
py
Python
tests/gce_virtual_machine_test.py
mikeweng/PerfKitBenchmarker
e929a69f04e2f91a0fed7da8db8a321edf58f403
[ "Apache-2.0" ]
null
null
null
tests/gce_virtual_machine_test.py
mikeweng/PerfKitBenchmarker
e929a69f04e2f91a0fed7da8db8a321edf58f403
[ "Apache-2.0" ]
null
null
null
tests/gce_virtual_machine_test.py
mikeweng/PerfKitBenchmarker
e929a69f04e2f91a0fed7da8db8a321edf58f403
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
40.422695
80
0.65573
import contextlib import copy import json import re import unittest from absl import flags import builtins import mock from perfkitbenchmarker import benchmark_spec from perfkitbenchmarker import context from perfkitbenchmarker import errors from perfkitbenchmarker import os_types from perfkitbenchmark...
true
true
f72b8e84fb1e9a3b3bd3404c7c3d64a53cc6b63f
4,233
py
Python
Chapter 05/enc_dec/model.py
bpbpublications/Time-Series-Forecasting-using-Deep-Learning
fd84553d33e912edb4a1400af0f9374e72747457
[ "MIT" ]
7
2021-12-13T20:00:05.000Z
2022-03-11T08:44:43.000Z
Chapter 05/enc_dec/model.py
bpbpublications/Time-Series-Forecasting-using-Deep-Learning
fd84553d33e912edb4a1400af0f9374e72747457
[ "MIT" ]
1
2022-02-22T10:39:12.000Z
2022-02-22T10:39:12.000Z
Chapter 05/enc_dec/model.py
bpbpublications/Time-Series-Forecasting-using-Deep-Learning
fd84553d33e912edb4a1400af0f9374e72747457
[ "MIT" ]
null
null
null
import numpy as np import random import torch import torch.nn as nn from torch import optim class Encoder(nn.Module): def __init__(self, input_size, hidden_size, num_layers = 1): super(Encoder, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.num_l...
33.070313
109
0.541932
import numpy as np import random import torch import torch.nn as nn from torch import optim class Encoder(nn.Module): def __init__(self, input_size, hidden_size, num_layers = 1): super(Encoder, self).__init__() self.input_size = input_size self.hidden_size = hidden_size self.num_l...
true
true
f72b917ba1bfdb505c6c57281ee679daa562ced3
4,564
py
Python
galaxy/tools/deps/__init__.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
null
null
null
galaxy/tools/deps/__init__.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
1
2015-02-21T18:48:19.000Z
2015-02-27T15:50:32.000Z
galaxy/tools/deps/__init__.py
jmchilton/pulsar
783b90cf0bce893a11c347fcaf6778b98e0bb062
[ "Apache-2.0" ]
3
2015-02-22T13:34:16.000Z
2020-10-01T01:28:04.000Z
""" Dependency management for tools. """ import os.path import logging log = logging.getLogger( __name__ ) from .resolvers import INDETERMINATE_DEPENDENCY from .resolvers.galaxy_packages import GalaxyPackageDependencyResolver from .resolvers.tool_shed_packages import ToolShedPackageDependencyResolver from galaxy.uti...
40.035088
116
0.675066
import os.path import logging log = logging.getLogger( __name__ ) from .resolvers import INDETERMINATE_DEPENDENCY from .resolvers.galaxy_packages import GalaxyPackageDependencyResolver from .resolvers.tool_shed_packages import ToolShedPackageDependencyResolver from galaxy.util import plugin_config def build_depend...
true
true
f72b91de3aa8e38ef7f1435603855433b8cce9c5
6,254
py
Python
python/fate_arch/protobuf/python/model_service_pb2_grpc.py
hubert-he/FATE
6758e150bd7ca7d6f788f9a7a8c8aea7e6500363
[ "Apache-2.0" ]
3,787
2019-08-30T04:55:10.000Z
2022-03-31T23:30:07.000Z
python/fate_arch/protobuf/python/model_service_pb2_grpc.py
JavaGreenHands/FATE
ea1e94b6be50c70c354d1861093187e523af32f2
[ "Apache-2.0" ]
1,439
2019-08-29T16:35:52.000Z
2022-03-31T11:55:31.000Z
python/fate_arch/protobuf/python/model_service_pb2_grpc.py
JavaGreenHands/FATE
ea1e94b6be50c70c354d1861093187e523af32f2
[ "Apache-2.0" ]
1,179
2019-08-29T16:18:32.000Z
2022-03-31T12:55:38.000Z
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
42.544218
87
0.756316
import grpc import model_service_pb2 as model__service__pb2 class ModelServiceStub(object): pass def __init__(self, channel): self.publishLoad = channel.unary_unary( '/com.webank.ai.fate.api.mlmodel.manager.ModelService/publishLoad', request_serializer=model__service__pb2....
true
true
f72b929b8804ad874d618eb5b43b2fb64fdfe7ad
123
py
Python
app/api/__init__.py
oyasr/mudawen
6f0161ab783536d7c5d695225ef28ce4947a46e3
[ "MIT" ]
null
null
null
app/api/__init__.py
oyasr/mudawen
6f0161ab783536d7c5d695225ef28ce4947a46e3
[ "MIT" ]
null
null
null
app/api/__init__.py
oyasr/mudawen
6f0161ab783536d7c5d695225ef28ce4947a46e3
[ "MIT" ]
null
null
null
from flask import Blueprint api = Blueprint('api', __name__) from . import authentication, comments, errors, posts, users
24.6
60
0.772358
from flask import Blueprint api = Blueprint('api', __name__) from . import authentication, comments, errors, posts, users
true
true
f72b92ac89e1858b89e04e9891a5197b9c3b4cbe
112,673
py
Python
youtube_dl/YoutubeDL.py
hylinktree/youtube-dl
e4cc49f0c0cd9939c4d7992ba54ab0737fdaa9b0
[ "Unlicense" ]
null
null
null
youtube_dl/YoutubeDL.py
hylinktree/youtube-dl
e4cc49f0c0cd9939c4d7992ba54ab0737fdaa9b0
[ "Unlicense" ]
null
null
null
youtube_dl/YoutubeDL.py
hylinktree/youtube-dl
e4cc49f0c0cd9939c4d7992ba54ab0737fdaa9b0
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 from __future__ import absolute_import, unicode_literals import collections import contextlib import copy import datetime import errno import fileinput import io import itertools import json import locale import operator import os import platform import re import shutil import su...
45.727679
194
0.557267
from __future__ import absolute_import, unicode_literals import collections import contextlib import copy import datetime import errno import fileinput import io import itertools import json import locale import operator import os import platform import re import shutil import subprocess import socket import sys im...
true
true
f72b941393c5f93b8853905303a2c759da17e1f7
9,291
py
Python
invenio_app_ils/circulation/api.py
topless/invenio-app-ils
38f5a6b61cdeaf5fa5776613073fa46af28737a9
[ "MIT" ]
null
null
null
invenio_app_ils/circulation/api.py
topless/invenio-app-ils
38f5a6b61cdeaf5fa5776613073fa46af28737a9
[ "MIT" ]
21
2018-11-02T14:19:53.000Z
2021-06-25T15:16:42.000Z
invenio_app_ils/circulation/api.py
topless/invenio-app-ils
38f5a6b61cdeaf5fa5776613073fa46af28737a9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2018-2020 CERN. # # invenio-app-ils is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Invenio App ILS Circulation APIs.""" import uuid from copy import copy, deepcopy from datetime import dat...
34.66791
113
0.708966
import uuid from copy import copy, deepcopy from datetime import date, timedelta from functools import partial from elasticsearch import VERSION as ES_VERSION from flask import current_app from flask_login import current_user from invenio_circulation.api import Loan from invenio_circulation.config import (CIRC...
true
true
f72b9483d7b40b72fb27e1e57c80b24dc691d800
6,368
py
Python
tests/functional/testplan/testing/test_tagging.py
raoyitao/testplan
aae3e9cee597ca3d01b6d64eed2642c421c56cbb
[ "Apache-2.0" ]
96
2018-03-14T13:14:50.000Z
2021-01-14T08:26:08.000Z
tests/functional/testplan/testing/test_tagging.py
raoyitao/testplan
aae3e9cee597ca3d01b6d64eed2642c421c56cbb
[ "Apache-2.0" ]
135
2018-06-28T02:41:05.000Z
2021-01-19T02:16:58.000Z
tests/functional/testplan/testing/test_tagging.py
raoyitao/testplan
aae3e9cee597ca3d01b6d64eed2642c421c56cbb
[ "Apache-2.0" ]
53
2018-03-17T14:39:15.000Z
2021-01-21T10:54:13.000Z
import pytest from testplan.common.utils.testing import check_report from testplan.report import TestReport, TestGroupReport, TestCaseReport from testplan.testing.multitest import MultiTest, testsuite, testcase @testsuite(tags={"color": ["red", "blue"]}) class AlphaSuite(object): @testcase def test_method_0...
30.4689
79
0.468907
import pytest from testplan.common.utils.testing import check_report from testplan.report import TestReport, TestGroupReport, TestCaseReport from testplan.testing.multitest import MultiTest, testsuite, testcase @testsuite(tags={"color": ["red", "blue"]}) class AlphaSuite(object): @testcase def test_method_0...
true
true
f72b94a2fc75245f4a10ca168ed20ceaddbee478
12,107
py
Python
test/functional/mining_basic.py
onixcoin-io/onix
37c158a6229fa98c1a86f8b65e91226e36355fd6
[ "MIT" ]
6
2021-10-31T04:53:09.000Z
2021-12-16T08:27:06.000Z
test/functional/mining_basic.py
onixcoin-io/onix
37c158a6229fa98c1a86f8b65e91226e36355fd6
[ "MIT" ]
1
2021-11-29T08:45:38.000Z
2021-11-29T08:45:38.000Z
test/functional/mining_basic.py
onixcoin-io/onix
37c158a6229fa98c1a86f8b65e91226e36355fd6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mining RPCs - getmininginfo - getblocktemplate proposal mode - submitblock""" import copy from d...
48.043651
163
0.690262
import copy from decimal import Decimal from test_framework.blocktools import ( create_coinbase, TIME_GENESIS_BLOCK, ) from test_framework.messages import ( CBlock, CBlockHeader ) from test_framework.mininode import ( P2PDataStore, ) from test_framework.test_framework import BitcoinTestFramewo...
true
true
f72b9664774aac869ec7bb4e09b59f25f377508a
3,245
py
Python
twikoto3/mainwindow.py
azyobuzin/twikoto3
8a4efc4ff7280a559f448234cbc3a0bc740e8388
[ "Apache-2.0" ]
1
2017-12-27T09:50:47.000Z
2017-12-27T09:50:47.000Z
twikoto3/mainwindow.py
azyobuzin/twikoto3
8a4efc4ff7280a559f448234cbc3a0bc740e8388
[ "Apache-2.0" ]
null
null
null
twikoto3/mainwindow.py
azyobuzin/twikoto3
8a4efc4ff7280a559f448234cbc3a0bc740e8388
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ twikoto3 - Twitter Client Copyright (C) 2012 azyobuzin This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at you...
35.659341
131
0.693991
from PyQt4 import QtCore, QtGui import twikoto3 from twikoto3.extension import * from twikoto3.twittertext import validator class TweetTextEdit(QtGui.QTextEdit): def __init__(self, parent = None): super(TweetTextEdit, self).__init__(parent) self.tweetaction = None def keyPressEvent(self, e)...
true
true
f72b96bf64c72a7aab50945832a74f43bbe2503a
517
py
Python
conclusions/1-intro/Basics.py
balajisomasale/Udacity_Data-Structures-and-algorithms
aa9a58e62c488e32920308ae14faad84e735a0dd
[ "MIT" ]
null
null
null
conclusions/1-intro/Basics.py
balajisomasale/Udacity_Data-Structures-and-algorithms
aa9a58e62c488e32920308ae14faad84e735a0dd
[ "MIT" ]
null
null
null
conclusions/1-intro/Basics.py
balajisomasale/Udacity_Data-Structures-and-algorithms
aa9a58e62c488e32920308ae14faad84e735a0dd
[ "MIT" ]
null
null
null
# Write a function called "show_excitement" where the string # "I am super excited for this course!" is returned exactly # 5 times, where each sentence is separated by a single space. # Return the string with "return". # You can only have the string once in your code. # Don't just copy/paste it 5 times into a single va...
34.466667
62
0.700193
def show_excitement(): # Your code goes here! here = '' for i in range(5): here += "I am super excited for this course! " return here[:-1] print show_excitement()s
false
true
f72b96fd84fbba9e15af0f1cd90ccc4befda2a17
519
py
Python
dataset/processes/make_center_points.py
Challenging6/YoloDB
bdc1c4239ec112c21a65df64b9f4dc8447b739fa
[ "MIT" ]
null
null
null
dataset/processes/make_center_points.py
Challenging6/YoloDB
bdc1c4239ec112c21a65df64b9f4dc8447b739fa
[ "MIT" ]
null
null
null
dataset/processes/make_center_points.py
Challenging6/YoloDB
bdc1c4239ec112c21a65df64b9f4dc8447b739fa
[ "MIT" ]
null
null
null
import numpy as np #from concern.config import State from .data_process import DataProcess class MakeCenterPoints(DataProcess): box_key = 'charboxes' size = 32 def process(self, data): shape = data['image'].shape[:2] points = np.zeros((self.size, 2), dtype=np.float32) boxes = np....
25.95
66
0.626204
import numpy as np from .data_process import DataProcess class MakeCenterPoints(DataProcess): box_key = 'charboxes' size = 32 def process(self, data): shape = data['image'].shape[:2] points = np.zeros((self.size, 2), dtype=np.float32) boxes = np.array(data[self.box_key])[:self.s...
true
true
f72b995a0c976a846d2650b3d530e5ff685e31e0
1,456
py
Python
setup.py
ammurdoch/graphql-core
03c2b06e4636ed8a89c7a4c7e56d244fd9d00bde
[ "MIT" ]
1
2021-07-27T20:47:34.000Z
2021-07-27T20:47:34.000Z
setup.py
vpetrovykh/graphql-core
7af97e22afb27861fc1b7d7ca0292095f8427ecb
[ "MIT" ]
null
null
null
setup.py
vpetrovykh/graphql-core
7af97e22afb27861fc1b7d7ca0292095f8427ecb
[ "MIT" ]
null
null
null
from re import search from setuptools import setup, find_packages with open("src/graphql/version.py") as version_file: version = search('version = "(.*)"', version_file.read()).group(1) with open("README.md") as readme_file: readme = readme_file.read() setup( name="graphql-core", version=version, ...
34.666667
74
0.651099
from re import search from setuptools import setup, find_packages with open("src/graphql/version.py") as version_file: version = search('version = "(.*)"', version_file.read()).group(1) with open("README.md") as readme_file: readme = readme_file.read() setup( name="graphql-core", version=version, ...
true
true
f72b99ae1a3457bb9180b67219d05ac2ccfc50cd
1,200
py
Python
Noise Elimination/mean_elimination_script.py
BAD-Classifier/Signal-Processing
8163657fb8b8e1ec32ea299a5b4cda9473b91fd0
[ "MIT" ]
null
null
null
Noise Elimination/mean_elimination_script.py
BAD-Classifier/Signal-Processing
8163657fb8b8e1ec32ea299a5b4cda9473b91fd0
[ "MIT" ]
null
null
null
Noise Elimination/mean_elimination_script.py
BAD-Classifier/Signal-Processing
8163657fb8b8e1ec32ea299a5b4cda9473b91fd0
[ "MIT" ]
null
null
null
import numpy import librosa import glob import os import shutil full_clips = glob.glob("Full_Clips/*.mp3") print("Number of full clips: " + str(len(full_clips))) for clip in full_clips: clip_name = clip[11:] print("Current clip: " + clip_name) signal, fs = librosa.load(clip) signal_abs = numpy.absolut...
30.769231
66
0.643333
import numpy import librosa import glob import os import shutil full_clips = glob.glob("Full_Clips/*.mp3") print("Number of full clips: " + str(len(full_clips))) for clip in full_clips: clip_name = clip[11:] print("Current clip: " + clip_name) signal, fs = librosa.load(clip) signal_abs = numpy.absolut...
true
true
f72b9a83a149804ec5bf2fd5f521cbb2d63c0d98
1,384
py
Python
tests/parser/syntax/test_functions_call.py
Solexplorer/vyper
135edd6a91d47c72de105066d6e6c1bdfe9ea66e
[ "MIT" ]
1
2021-04-23T21:48:20.000Z
2021-04-23T21:48:20.000Z
tests/parser/syntax/test_functions_call.py
Solexplorer/vyper
135edd6a91d47c72de105066d6e6c1bdfe9ea66e
[ "MIT" ]
null
null
null
tests/parser/syntax/test_functions_call.py
Solexplorer/vyper
135edd6a91d47c72de105066d6e6c1bdfe9ea66e
[ "MIT" ]
1
2020-01-27T05:21:46.000Z
2020-01-27T05:21:46.000Z
import pytest from pytest import ( raises, ) from vyper import ( compiler, ) from vyper.exceptions import ( ParserException, StructureException, ) fail_list = [ """ @public def foo() -> uint256: doesnotexist(2, uint256) return convert(2, uint256) """, """ @public def foo() -> uint2...
17.74359
61
0.664017
import pytest from pytest import ( raises, ) from vyper import ( compiler, ) from vyper.exceptions import ( ParserException, StructureException, ) fail_list = [ """ @public def foo() -> uint256: doesnotexist(2, uint256) return convert(2, uint256) """, """ @public def foo() -> uint2...
true
true
f72b9b0270340672ef3e38e9ca7507f43250ba2a
222
py
Python
aws_test/testapp/views.py
shivavh123/django
1f94b50d0f5cf5b0b90dcf86afbc267500a3732b
[ "MIT" ]
null
null
null
aws_test/testapp/views.py
shivavh123/django
1f94b50d0f5cf5b0b90dcf86afbc267500a3732b
[ "MIT" ]
null
null
null
aws_test/testapp/views.py
shivavh123/django
1f94b50d0f5cf5b0b90dcf86afbc267500a3732b
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import * # Create your views here. def test_view(request,name): data = "Hi, Welcome {}, this is first view in AWS....".format(name) return HttpResponse(data)
22.2
71
0.711712
from django.shortcuts import render from django.http import * def test_view(request,name): data = "Hi, Welcome {}, this is first view in AWS....".format(name) return HttpResponse(data)
true
true
f72b9b18157277dd97c650ac9b1513b389eba29b
1,411
py
Python
channels_graphql_ws/__init__.py
hozblok/DjangoChannelsGraphqlWs
77b406fb19053fcb9220a5bb23e1349fde4fbda3
[ "MIT" ]
null
null
null
channels_graphql_ws/__init__.py
hozblok/DjangoChannelsGraphqlWs
77b406fb19053fcb9220a5bb23e1349fde4fbda3
[ "MIT" ]
null
null
null
channels_graphql_ws/__init__.py
hozblok/DjangoChannelsGraphqlWs
77b406fb19053fcb9220a5bb23e1349fde4fbda3
[ "MIT" ]
null
null
null
# # coding: utf-8 # Copyright (c) 2019 DATADVANCE # # 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 the rights to use, copy, modify, merge,...
41.5
72
0.79022
from .client import GraphqlWsClient, GraphqlWsResponseError from .graphql_ws import GraphqlWsConsumer, Subscription from .transport import GraphqlWsTransportAiohttp
true
true
f72b9b237c832c25f3a47690b75b5f4398085165
4,558
py
Python
alphazero/mcts.py
bartekx43/AlphaTTT
a01c38833a7f841483146bebeef73323d527d812
[ "MIT" ]
null
null
null
alphazero/mcts.py
bartekx43/AlphaTTT
a01c38833a7f841483146bebeef73323d527d812
[ "MIT" ]
null
null
null
alphazero/mcts.py
bartekx43/AlphaTTT
a01c38833a7f841483146bebeef73323d527d812
[ "MIT" ]
null
null
null
import os import sys import math import random import numpy as np from copy import deepcopy sys.path.append(os.path.join(os.environ["HOME"], "AlphaTTT")) from environment import Environment from alphazero.database import prepare_state np.random.seed(80085) random.seed(80085) def PUCT_score(child_value, child_prior...
31.006803
111
0.623958
import os import sys import math import random import numpy as np from copy import deepcopy sys.path.append(os.path.join(os.environ["HOME"], "AlphaTTT")) from environment import Environment from alphazero.database import prepare_state np.random.seed(80085) random.seed(80085) def PUCT_score(child_value, child_prior...
true
true
f72b9b71cfe4c76f04ff852319ec57e7120fbde7
70
py
Python
tests/test_graph_container.py
harangju/wikinet
903cf94e30f6dae3de3a3615ce6cd67091f512dc
[ "MIT" ]
9
2020-10-19T12:36:49.000Z
2021-09-07T02:31:52.000Z
tests/test_graph_container.py
harangju/wikinet
903cf94e30f6dae3de3a3615ce6cd67091f512dc
[ "MIT" ]
1
2022-03-30T09:34:56.000Z
2022-03-30T14:08:48.000Z
tests/test_graph_container.py
harangju/wikinet
903cf94e30f6dae3de3a3615ce6cd67091f512dc
[ "MIT" ]
5
2020-10-20T01:39:14.000Z
2022-03-30T17:12:30.000Z
import wikinet print('hello world') print(wikinet.GraphContainer())
11.666667
31
0.771429
import wikinet print('hello world') print(wikinet.GraphContainer())
true
true
f72b9c283b7d0547ed71c29c45e273ec49018748
876
py
Python
paneldata_dash/resources/category.py
clarencejlee/jdp
d3d31db0138ff06f2f5ec592d85317941af4f280
[ "MIT" ]
null
null
null
paneldata_dash/resources/category.py
clarencejlee/jdp
d3d31db0138ff06f2f5ec592d85317941af4f280
[ "MIT" ]
null
null
null
paneldata_dash/resources/category.py
clarencejlee/jdp
d3d31db0138ff06f2f5ec592d85317941af4f280
[ "MIT" ]
null
null
null
from flask import request from flask_restful import Resource from models.category import CategoryModel from schemas.category import CategorySchema category_schema = CategorySchema() category_list_schema = CategorySchema(many=True) class Category(Resource): @classmethod def get(cls, name: str): cate...
30.206897
89
0.692922
from flask import request from flask_restful import Resource from models.category import CategoryModel from schemas.category import CategorySchema category_schema = CategorySchema() category_list_schema = CategorySchema(many=True) class Category(Resource): @classmethod def get(cls, name: str): cate...
true
true
f72b9e6674fbda39b41025e89556f609b84326ea
2,699
py
Python
masonite/drivers/UploadS3Driver.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
masonite/drivers/UploadS3Driver.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
masonite/drivers/UploadS3Driver.py
w3x10e8/core
d8f0ca29c2bd5e86d199391fa916ce2f5c9b0f49
[ "MIT" ]
null
null
null
""" Upload S3 Driver """ from masonite.contracts import UploadContract from masonite.drivers import BaseUploadDriver from masonite.exceptions import DriverLibraryNotFound from masonite.managers import UploadManager from masonite.app import App class UploadS3Driver(BaseUploadDriver, UploadContract): """ Amazo...
31.022989
117
0.632086
from masonite.contracts import UploadContract from masonite.drivers import BaseUploadDriver from masonite.exceptions import DriverLibraryNotFound from masonite.managers import UploadManager from masonite.app import App class UploadS3Driver(BaseUploadDriver, UploadContract): def __init__(self, upload: UploadMana...
true
true
f72b9ebf1fe11a999e122be4418851c61b594f29
9,487
py
Python
ensemble/control/operational/TestOperationalLayerEnsembleVissim.py
licit-lab/ensemble
7a78ef0d69610d4fcfc5e008f931ade15e35acbf
[ "Linux-OpenIB" ]
null
null
null
ensemble/control/operational/TestOperationalLayerEnsembleVissim.py
licit-lab/ensemble
7a78ef0d69610d4fcfc5e008f931ade15e35acbf
[ "Linux-OpenIB" ]
null
null
null
ensemble/control/operational/TestOperationalLayerEnsembleVissim.py
licit-lab/ensemble
7a78ef0d69610d4fcfc5e008f931ade15e35acbf
[ "Linux-OpenIB" ]
null
null
null
import os import sys import ctypes import platform import os import numpy as np from random import gauss import win32com.client as com def get_acceleration(lead_veh_acceleration,lead_veh_id,lead_veh_rel_velocity,lead_veh_type,timestep, veh_id,veh_setspeed,veh_type,veh_used_distance_headway,veh_used...
47.673367
197
0.733214
import os import sys import ctypes import platform import os import numpy as np from random import gauss import win32com.client as com def get_acceleration(lead_veh_acceleration,lead_veh_id,lead_veh_rel_velocity,lead_veh_type,timestep, veh_id,veh_setspeed,veh_type,veh_used_distance_headway,veh_used...
true
true
f72b9f3d90e40913efdff7e7d1f1b70359588488
15,361
py
Python
main.py
SultanAbuGhazal/3detr
f9725ae655c6ced290c3ec2c53c07566350270f4
[ "Apache-2.0" ]
null
null
null
main.py
SultanAbuGhazal/3detr
f9725ae655c6ced290c3ec2c53c07566350270f4
[ "Apache-2.0" ]
null
null
null
main.py
SultanAbuGhazal/3detr
f9725ae655c6ced290c3ec2c53c07566350270f4
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import os import sys import pickle import numpy as np import torch from torch.multiprocessing import set_start_method from torch.utils.data import DataLoader, DistributedSampler # 3DETR codebase specific imports from datasets import build_dataset fro...
35.312644
134
0.621639
import argparse import os import sys import pickle import numpy as np import torch from torch.multiprocessing import set_start_method from torch.utils.data import DataLoader, DistributedSampler from datasets import build_dataset from engine import evaluate, train_one_epoch from models import build_model from optim...
true
true
f72ba096355b4c9e07406e66b05f1d1a8c1dce09
9,312
py
Python
metadata-ingestion/src/datahub/ingestion/source/ldap.py
zhongjinhan/datahub
3bf5ffab5db02bed21d9b04fd65860927fce8088
[ "Apache-2.0" ]
null
null
null
metadata-ingestion/src/datahub/ingestion/source/ldap.py
zhongjinhan/datahub
3bf5ffab5db02bed21d9b04fd65860927fce8088
[ "Apache-2.0" ]
1
2021-03-09T19:40:53.000Z
2021-03-15T17:36:26.000Z
metadata-ingestion/src/datahub/ingestion/source/ldap.py
zhongjinhan/datahub
3bf5ffab5db02bed21d9b04fd65860927fce8088
[ "Apache-2.0" ]
null
null
null
"""LDAP Source""" from dataclasses import dataclass from typing import Any, Dict, Iterable, List, Optional import ldap from ldap.controls import SimplePagedResultsControl from datahub.configuration.common import ConfigModel, ConfigurationError from datahub.ingestion.api.common import PipelineContext from datahub.inge...
33.376344
90
0.575387
from dataclasses import dataclass from typing import Any, Dict, Iterable, List, Optional import ldap from ldap.controls import SimplePagedResultsControl from datahub.configuration.common import ConfigModel, ConfigurationError from datahub.ingestion.api.common import PipelineContext from datahub.ingestion.api.source i...
true
true
f72ba1d7778091106a4581741203288c6ae24e0e
1,378
py
Python
tests/benchmarks/constructs/LocalVariableAssign.py
Mortal/Nuitka
5150eeff7ff845ed4993c773449cd81b7f127c6b
[ "Apache-2.0" ]
null
null
null
tests/benchmarks/constructs/LocalVariableAssign.py
Mortal/Nuitka
5150eeff7ff845ed4993c773449cd81b7f127c6b
[ "Apache-2.0" ]
null
null
null
tests/benchmarks/constructs/LocalVariableAssign.py
Mortal/Nuitka
5150eeff7ff845ed4993c773449cd81b7f127c6b
[ "Apache-2.0" ]
1
2018-12-16T23:51:18.000Z
2018-12-16T23:51:18.000Z
# Copyright 2018, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicated. # # L...
30.622222
78
0.722787
# indicated. # # 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...
true
true
f72ba2b63d4ac4e8dc4c0d2dd40a513c05d534df
3,551
py
Python
tests/test_graph.py
arky/followthemoney
e6e4f5749aadc51893d131aac9744e1184d12f92
[ "MIT" ]
137
2017-10-20T09:36:32.000Z
2022-03-24T18:49:16.000Z
tests/test_graph.py
arky/followthemoney
e6e4f5749aadc51893d131aac9744e1184d12f92
[ "MIT" ]
505
2017-10-24T13:14:06.000Z
2022-03-28T20:21:45.000Z
tests/test_graph.py
malteos/followthemoney
7fde00488b4f2bf6acc69d922bd0ca9d2defbe0f
[ "MIT" ]
32
2017-12-19T15:22:07.000Z
2022-02-18T11:01:28.000Z
from unittest import TestCase from followthemoney import model from followthemoney.types import registry from followthemoney.graph import Graph, Node ENTITY = { "id": "ralph", "schema": "Person", "properties": { "name": ["Ralph Tester"], "birthDate": ["1972-05-01"], "idNumber": ["...
33.819048
74
0.599549
from unittest import TestCase from followthemoney import model from followthemoney.types import registry from followthemoney.graph import Graph, Node ENTITY = { "id": "ralph", "schema": "Person", "properties": { "name": ["Ralph Tester"], "birthDate": ["1972-05-01"], "idNumber": ["...
true
true
f72ba3d5f708cc3f9400d201f0cc2f6315f72c8b
832
py
Python
tests_no_pytest/test_write.py
jzuhone/xija
1e423d0c48056cc4ea9e4993d28e34794c1420fa
[ "BSD-3-Clause" ]
2
2016-01-05T19:20:43.000Z
2021-06-04T08:23:08.000Z
tests_no_pytest/test_write.py
jzuhone/xija
1e423d0c48056cc4ea9e4993d28e34794c1420fa
[ "BSD-3-Clause" ]
61
2015-02-24T02:27:11.000Z
2022-03-23T13:52:15.000Z
tests_no_pytest/test_write.py
jzuhone/xija
1e423d0c48056cc4ea9e4993d28e34794c1420fa
[ "BSD-3-Clause" ]
1
2016-01-04T21:08:17.000Z
2016-01-04T21:08:17.000Z
# Licensed under a 3-clause BSD style license - see LICENSE.rst import os import json import numpy as np import xija mdl = xija.ThermalModel(start='2010:001', stop='2010:004') tephin = mdl.add(xija.Node, 'tephin') tcylaft6 = mdl.add(xija.Node, 'tcylaft6', predict=False) coup_tephin_tcylaft6 = mdl.add(xija.Coupling, t...
30.814815
82
0.68149
import os import json import numpy as np import xija mdl = xija.ThermalModel(start='2010:001', stop='2010:004') tephin = mdl.add(xija.Node, 'tephin') tcylaft6 = mdl.add(xija.Node, 'tcylaft6', predict=False) coup_tephin_tcylaft6 = mdl.add(xija.Coupling, tephin, tcylaft6, tau=20) aosares1 = mdl.add(xija.TelemData, 'ao...
true
true
f72ba4bad6d7541d57491bf18fb1649b5f900db5
17,871
py
Python
src/tests/test_api_functions.py
ArieLevs/NalkinsCloud-Django
3fab970e4545db2e0b3e63a4bc8a5a1488a4a2bf
[ "Apache-2.0" ]
6
2019-01-07T15:34:27.000Z
2020-05-16T14:40:38.000Z
src/tests/test_api_functions.py
ArieLevs/NalkinsCloud-Django
3fab970e4545db2e0b3e63a4bc8a5a1488a4a2bf
[ "Apache-2.0" ]
9
2019-12-28T12:08:36.000Z
2021-09-22T17:44:41.000Z
src/tests/test_api_functions.py
ArieLevs/NalkinsCloud-Django-Backend
3fab970e4545db2e0b3e63a4bc8a5a1488a4a2bf
[ "Apache-2.0" ]
null
null
null
from django.utils.crypto import get_random_string from django.urls import reverse from django.utils import timezone from rest_framework.test import APITestCase from oauth2_provider.models import AccessToken from oauth2_provider.models import Application from nalkinscloud_mosquitto.models import Device, DeviceType, D...
43.587805
117
0.650607
from django.utils.crypto import get_random_string from django.urls import reverse from django.utils import timezone from rest_framework.test import APITestCase from oauth2_provider.models import AccessToken from oauth2_provider.models import Application from nalkinscloud_mosquitto.models import Device, DeviceType, D...
true
true
f72ba7d3fb86b7009f80264071c2ffe104766198
4,051
py
Python
events/desucon2018/migrations/0001_initial.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
13
2015-11-29T12:19:12.000Z
2021-02-21T15:42:11.000Z
events/desucon2018/migrations/0001_initial.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
23
2015-04-29T19:43:34.000Z
2021-02-10T05:50:17.000Z
events/desucon2018/migrations/0001_initial.py
darkismus/kompassi
35dea2c7af2857a69cae5c5982b48f01ba56da1f
[ "CC-BY-3.0" ]
11
2015-09-20T18:59:00.000Z
2020-02-07T08:47:34.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-01-28 15:36 from django.db import migrations, models import django.db.models.deletion import labour.models.signup_extras class Migration(migrations.Migration): initial = True dependencies = [ ('core', '0029_auto_20170827_1818'), ] ...
81.02
736
0.671933
from django.db import migrations, models import django.db.models.deletion import labour.models.signup_extras class Migration(migrations.Migration): initial = True dependencies = [ ('core', '0029_auto_20170827_1818'), ] operations = [ migrations.CreateModel( name='Signu...
true
true
f72ba8a9a4446d79a62e8b823b38942abbb5f5f3
232
py
Python
my_awesome_project/users/serializers.py
mikejuliano/drf-react-native
71d40dd168407096e213157c0141588d474ae3d0
[ "MIT" ]
null
null
null
my_awesome_project/users/serializers.py
mikejuliano/drf-react-native
71d40dd168407096e213157c0141588d474ae3d0
[ "MIT" ]
null
null
null
my_awesome_project/users/serializers.py
mikejuliano/drf-react-native
71d40dd168407096e213157c0141588d474ae3d0
[ "MIT" ]
null
null
null
from rest_framework import serializers # from django.contrib.auth.models import User from .models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('username',)
21.090909
50
0.728448
from rest_framework import serializers from .models import User class UserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('username',)
true
true
f72ba8c520fc112f474edccb7228fd1f7e57e095
5,326
py
Python
PythonAPI/carissma_project/lib/python3.5/site-packages/matplotlib/tri/tripcolor.py
AbdulHoffmann/carla_carissma
8d382769ffa02a6c61a22c57160285505f5ff0a4
[ "MIT" ]
445
2019-01-26T13:50:26.000Z
2022-03-18T05:17:38.000Z
venv/lib/python3.7/site-packages/matplotlib/tri/tripcolor.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
242
2019-01-29T15:48:27.000Z
2022-03-31T22:09:21.000Z
venv/lib/python3.7/site-packages/matplotlib/tri/tripcolor.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
64
2018-04-25T08:51:57.000Z
2022-01-29T14:13:57.000Z
import numpy as np from matplotlib.collections import PolyCollection, TriMesh from matplotlib.colors import Normalize from matplotlib.tri.triangulation import Triangulation def tripcolor(ax, *args, alpha=1.0, norm=None, cmap=None, vmin=None, vmax=None, shading='flat', facecolors=None, **kwargs): ""...
38.042857
79
0.639504
import numpy as np from matplotlib.collections import PolyCollection, TriMesh from matplotlib.colors import Normalize from matplotlib.tri.triangulation import Triangulation def tripcolor(ax, *args, alpha=1.0, norm=None, cmap=None, vmin=None, vmax=None, shading='flat', facecolors=None, **kwargs): if...
true
true
f72ba8feede17a2888058de31640869ebe5db2d9
1,794
py
Python
app/features/steps/value_propagation_test.py
muglyon/https-github.com-muglyon-DCOP-Decentralised-Control-of-Intelligent-Devices
68cb868a0875f5e119ac0dbea024c17d241347ac
[ "MIT" ]
3
2020-04-10T09:13:17.000Z
2021-04-08T07:14:03.000Z
app/features/steps/value_propagation_test.py
muglyon/https-github.com-muglyon-DCOP-Decentralised-Control-of-Intelligent-Devices
68cb868a0875f5e119ac0dbea024c17d241347ac
[ "MIT" ]
8
2020-09-26T00:55:30.000Z
2022-01-13T02:32:04.000Z
app/features/steps/value_propagation_test.py
muglyon/https-github.com-muglyon-DCOP-Decentralised-Control-of-Intelligent-Devices
68cb868a0875f5e119ac0dbea024c17d241347ac
[ "MIT" ]
2
2020-04-12T10:08:15.000Z
2022-01-20T09:34:50.000Z
#! python3 # value_propagation_test.py - Test the VALUE Propagation behavior from behave import * from hamcrest import * import numpy @when('get VALUE from parent after UTIL propagation') def step_impl(context): set_up(context) context.dpop_to_test.util_manager.JOIN = context.util_matrix @then('should sel...
26.382353
88
0.731884
from behave import * from hamcrest import * import numpy @when('get VALUE from parent after UTIL propagation') def step_impl(context): set_up(context) context.dpop_to_test.util_manager.JOIN = context.util_matrix @then('should select the optimal assignment') def step_impl(context): index = context.dp...
true
true
f72baab36e3a21c7ba43e643724c016ec8ee0837
8,858
py
Python
cinder/openstack/common/config/generator.py
sombrafam/cinder
60ffb0eedf41b56f3c6af5b301400ced95762194
[ "Apache-2.0" ]
null
null
null
cinder/openstack/common/config/generator.py
sombrafam/cinder
60ffb0eedf41b56f3c6af5b301400ced95762194
[ "Apache-2.0" ]
null
null
null
cinder/openstack/common/config/generator.py
sombrafam/cinder
60ffb0eedf41b56f3c6af5b301400ced95762194
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 SINA 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 # # Unless required...
32.929368
79
0.593362
from __future__ import print_function import imp import os import re import socket import sys import textwrap from oslo.config import cfg import six from cinder.openstack.common import gettextutils from cinder.openstack.common import importutils gettextutils.install('cinder') STROPT = "StrOpt" BOO...
true
true
f72bab7ab1bca3789121e05f9da664664eeab617
3,732
py
Python
GitHubUploader.py
ytyaru/GitHub.Uploader.AddFunction.Contributions.201705141424
06e44308b0eb132f0ce1e547cedc6b0f6e566c93
[ "CC0-1.0" ]
null
null
null
GitHubUploader.py
ytyaru/GitHub.Uploader.AddFunction.Contributions.201705141424
06e44308b0eb132f0ce1e547cedc6b0f6e566c93
[ "CC0-1.0" ]
null
null
null
GitHubUploader.py
ytyaru/GitHub.Uploader.AddFunction.Contributions.201705141424
06e44308b0eb132f0ce1e547cedc6b0f6e566c93
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/python3 #!python3 #encoding:utf-8 import sys import os.path import subprocess import configparser import argparse import web.service.github.api.v3.AuthenticationsCreator import web.service.github.api.v3.AuthenticationData #import web.service.github.api.v3.CurrentUser import web.service.github.api.v3.CurrentR...
42.409091
159
0.665327
import sys import os.path import subprocess import configparser import argparse import web.service.github.api.v3.AuthenticationsCreator import web.service.github.api.v3.AuthenticationData import web.service.github.api.v3.CurrentRepository import web.service.github.api.v3.Client import database.src.Database import c...
true
true
f72bac46a7bf89e92fd86af932bfe8a7135e61d2
13,197
py
Python
src/sardana/util/funcgenerator.py
schooft/sardana
76287b416650f40da79871ee3849340d0ff31f1d
[ "CC-BY-3.0" ]
null
null
null
src/sardana/util/funcgenerator.py
schooft/sardana
76287b416650f40da79871ee3849340d0ff31f1d
[ "CC-BY-3.0" ]
null
null
null
src/sardana/util/funcgenerator.py
schooft/sardana
76287b416650f40da79871ee3849340d0ff31f1d
[ "CC-BY-3.0" ]
null
null
null
############################################################################## ## # This file is part of Sardana ## # http://www.sardana-controls.org/ ## # Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain ## # Sardana is free software: you can redistribute it and/or modify # it under the terms of the GNU Less...
35.286096
79
0.608169
elf._position_event.wait(self.MAX_NAP_TIME) def fire_active(self): i = 0 while i < len(self.active_events) - 1: candidate = self.active_events[i + 1] if self.initial_domain_in_use is SynchDomain.Time: candidate += self._start_time now...
true
true
f72bac8581667e7935b4584979b404c4fdca5866
468
py
Python
examples/trap.py
fthyssen/aiosnmp
667a166214e2e70c333510a6d24208dd772a1f26
[ "MIT" ]
null
null
null
examples/trap.py
fthyssen/aiosnmp
667a166214e2e70c333510a6d24208dd772a1f26
[ "MIT" ]
null
null
null
examples/trap.py
fthyssen/aiosnmp
667a166214e2e70c333510a6d24208dd772a1f26
[ "MIT" ]
null
null
null
import asyncio import aiosnmp async def handler(host: str, port: int, message: aiosnmp.SnmpV2TrapMessage) -> None: print(f"got packet from {host}:{port}") for d in message.data.varbinds: print(f"oid: {d.oid}, value: {d.value}") async def main(): p = aiosnmp.SnmpV2TrapServer( host="127.0...
22.285714
84
0.662393
import asyncio import aiosnmp async def handler(host: str, port: int, message: aiosnmp.SnmpV2TrapMessage) -> None: print(f"got packet from {host}:{port}") for d in message.data.varbinds: print(f"oid: {d.oid}, value: {d.value}") async def main(): p = aiosnmp.SnmpV2TrapServer( host="127.0...
true
true
f72bacd78c4c106ed1626a1724d718b3f8d317dc
481
py
Python
_unittests/ut_plotting/test_dummy.py
sdpython/manyapi
dc2aadc58a5d72904f95424dbe57bb832d3ccd73
[ "MIT" ]
1
2020-08-08T13:38:45.000Z
2020-08-08T13:38:45.000Z
_unittests/ut_plotting/test_dummy.py
sdpython/manyapi
dc2aadc58a5d72904f95424dbe57bb832d3ccd73
[ "MIT" ]
8
2018-05-05T10:03:04.000Z
2019-06-08T10:21:30.000Z
_unittests/ut_plotting/test_dummy.py
sdpython/manyapi
dc2aadc58a5d72904f95424dbe57bb832d3ccd73
[ "MIT" ]
null
null
null
""" @brief test log(time=13s) """ import unittest from pyquickhelper.pycode import ExtTestCase from manydataapi.plotting import plot_aggregated_ts, daily_timeseries class TestDummm(ExtTestCase): def test_agg_raise(self): df = daily_timeseries() from matplotlib import pyplot as plt _...
21.863636
69
0.675676
import unittest from pyquickhelper.pycode import ExtTestCase from manydataapi.plotting import plot_aggregated_ts, daily_timeseries class TestDummm(ExtTestCase): def test_agg_raise(self): df = daily_timeseries() from matplotlib import pyplot as plt _, ax = plt.subplots(1, 1) plot_...
true
true
f72bacee48dd612bab37d2f97351e60521569498
6,673
py
Python
tests/test_lammps_cycle.py
irisTa56/ease4lmp
0ad69632fbe0d8c2a55e58af13efd7be1d566394
[ "MIT" ]
null
null
null
tests/test_lammps_cycle.py
irisTa56/ease4lmp
0ad69632fbe0d8c2a55e58af13efd7be1d566394
[ "MIT" ]
2
2019-03-06T04:33:27.000Z
2019-07-27T08:30:28.000Z
tests/test_lammps_cycle.py
irisTa56/ease4lmp
0ad69632fbe0d8c2a55e58af13efd7be1d566394
[ "MIT" ]
null
null
null
import unittest from ease4lmp import ( BondedAtoms, LammpsWriter, create_atoms_from_data, create_atoms_from_molecule) from ase.build import bulk, molecule import numpy as np import os import itertools def write_files(atoms): writer = LammpsWriter(atoms, atom_style="molecular") writer.set_atom_data(mol=[0...
30.47032
76
0.683051
import unittest from ease4lmp import ( BondedAtoms, LammpsWriter, create_atoms_from_data, create_atoms_from_molecule) from ase.build import bulk, molecule import numpy as np import os import itertools def write_files(atoms): writer = LammpsWriter(atoms, atom_style="molecular") writer.set_atom_data(mol=[0...
true
true
f72bacff2befd45529dc6156485e5eaa617d18a2
611
py
Python
api/models/post_rank/migrations/0001_initial.py
eggmoid/GalleryManage-FastAPI
fa50cef623a03aed2d7b4ac9c76d74cfb9d898eb
[ "MIT" ]
null
null
null
api/models/post_rank/migrations/0001_initial.py
eggmoid/GalleryManage-FastAPI
fa50cef623a03aed2d7b4ac9c76d74cfb9d898eb
[ "MIT" ]
6
2021-08-06T16:30:03.000Z
2021-12-11T05:30:02.000Z
api/models/post_rank/migrations/0001_initial.py
eggmoid/GalleryManage-FastAPI
fa50cef623a03aed2d7b4ac9c76d74cfb9d898eb
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-25 04:03 from django.db import migrations class Migration(migrations.Migration): initial = True dependencies = [ ('post', '0005_alter_post_options'), ] operations = [ migrations.CreateModel( name='PostRank', fields=[ ...
21.068966
49
0.464812
from django.db import migrations class Migration(migrations.Migration): initial = True dependencies = [ ('post', '0005_alter_post_options'), ] operations = [ migrations.CreateModel( name='PostRank', fields=[ ], options={ ...
true
true
f72bad3d0b4002ad1cb2fcc9489978b3fa4f88bf
3,577
py
Python
checkers/utils.py
gbravoi/monte-carlo-tree-search
578df8df925e5f569e7354daff6642e1781389b6
[ "MIT" ]
null
null
null
checkers/utils.py
gbravoi/monte-carlo-tree-search
578df8df925e5f569e7354daff6642e1781389b6
[ "MIT" ]
null
null
null
checkers/utils.py
gbravoi/monte-carlo-tree-search
578df8df925e5f569e7354daff6642e1781389b6
[ "MIT" ]
null
null
null
""" Martin Kersner, m.kersner@gmail.com seoulai.com 2018 Adapted by Gabriela B. to work with python 2.7 and ROS """ import random import numpy as np from base import Constants from rules import Rules class BoardEncoding(object): def __init__(self): self._constants = Constants() self._encoding ...
26.496296
100
0.632933
import random import numpy as np from base import Constants from rules import Rules class BoardEncoding(object): def __init__(self): self._constants = Constants() self._encoding = {} self.empty = 0 self.dark = 20 self.dark_king = 21 self.light = 10 self....
true
true
f72bad4faefc64d772b991b54a1874f2f71d5c3b
1,267
py
Python
modules/AppTheme.py
Fa1c0n35/RootTheBoxs
4f2a9886c8eedca3039604b93929c8c09866115e
[ "Apache-2.0" ]
1
2019-06-29T08:40:54.000Z
2019-06-29T08:40:54.000Z
modules/AppTheme.py
Fa1c0n35/RootTheBoxs
4f2a9886c8eedca3039604b93929c8c09866115e
[ "Apache-2.0" ]
null
null
null
modules/AppTheme.py
Fa1c0n35/RootTheBoxs
4f2a9886c8eedca3039604b93929c8c09866115e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mar 14, 2012 @author: moloch Copyright 2012 Root the Box Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licen...
30.902439
85
0.697711
from tornado.web import UIModule from tornado.options import options from models.Theme import Theme class AppTheme(UIModule): theme = Theme.by_name(options.default_theme) def render(self, *args, **kwargs): if options.allow_user_to_change_theme and (self.handler.session is not None): ...
true
true
f72bad64f0a9f77a3272ef388210f662dc6820c7
749
py
Python
smbl/prog/plugins/picard.py
karel-brinda/snakemake-lib
5922fa2fc4060d86172e991361a1cceb0af51af8
[ "MIT" ]
26
2015-03-16T03:37:02.000Z
2021-01-18T17:34:16.000Z
smbl/prog/plugins/picard.py
karel-brinda/smbl
5922fa2fc4060d86172e991361a1cceb0af51af8
[ "MIT" ]
12
2015-02-05T10:57:16.000Z
2016-06-07T18:09:57.000Z
smbl/prog/plugins/picard.py
karel-brinda/snakemake-lib
5922fa2fc4060d86172e991361a1cceb0af51af8
[ "MIT" ]
6
2015-06-03T20:06:49.000Z
2020-12-13T09:48:03.000Z
import smbl import snakemake import os from ._program import * PICARD = get_bin_file_path("picard.jar") ########################################## ########################################## class Picard(Program): @classmethod def get_installation_files(cls): return [ PICARD, ] @cl...
23.40625
143
0.599466
import smbl import snakemake import os from ._program import * PICARD = get_bin_file_path("picard.jar")
true
true
f72badcfec08b1a7904807f002fbd7e59e89878d
2,519
py
Python
ckan/tests/cli/test_config_tool.py
jbrown-xentity/ckan
ecd9ac6bc6cfb5bb4fcbec82c431f4564ef649ed
[ "BSD-3-Clause" ]
2,805
2015-01-02T18:13:15.000Z
2022-03-31T03:35:01.000Z
ckan/tests/cli/test_config_tool.py
jbrown-xentity/ckan
ecd9ac6bc6cfb5bb4fcbec82c431f4564ef649ed
[ "BSD-3-Clause" ]
3,801
2015-01-02T11:05:36.000Z
2022-03-31T19:24:37.000Z
ckan/tests/cli/test_config_tool.py
jbrown-xentity/ckan
ecd9ac6bc6cfb5bb4fcbec82c431f4564ef649ed
[ "BSD-3-Clause" ]
1,689
2015-01-02T19:46:43.000Z
2022-03-28T14:59:43.000Z
# -*- coding: utf-8 -*- import os import pytest from ckan.cli.cli import ckan from configparser import ConfigParser, NoOptionError @pytest.fixture def config_file(tmp_path): dest = tmp_path / u'config.ini' tpl = os.path.join( os.path.dirname(__file__), u'templates/config_tool.ini.tpl') wi...
29.988095
76
0.653831
import os import pytest from ckan.cli.cli import ckan from configparser import ConfigParser, NoOptionError @pytest.fixture def config_file(tmp_path): dest = tmp_path / u'config.ini' tpl = os.path.join( os.path.dirname(__file__), u'templates/config_tool.ini.tpl') with open(tpl, u'rb') as ...
true
true
f72badfdcc7c9b8294a786b553d4648ee517ad6c
12,634
py
Python
tests/python/pants_test/util/test_contextutil.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/util/test_contextutil.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/util/test_contextutil.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import pstats import shutil import signal import sys import unittest import uui...
37.93994
100
0.679516
from __future__ import absolute_import, division, print_function, unicode_literals import os import pstats import shutil import signal import sys import unittest import uuid import zipfile from builtins import next, object, range, str from contextlib import contextmanager import mock from pants.util.contextutil ...
true
true
f72bae6a1e0213eb229c54b75687299a18759829
1,090
py
Python
IntroProPython/aula10-poo/ex10_9.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/aula10-poo/ex10_9.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/aula10-poo/ex10_9.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
#Nilo soluction class Estado: def __init__(self, nome, sigla): self.nome = nome self.sigla = sigla self.cidades = [] def adiciona_cidades(self, cidade): cidade.estado = self self.cidades.append(cidade) def populacao(self): return sum([c.populacao for c in s...
28.684211
72
0.655963
class Estado: def __init__(self, nome, sigla): self.nome = nome self.sigla = sigla self.cidades = [] def adiciona_cidades(self, cidade): cidade.estado = self self.cidades.append(cidade) def populacao(self): return sum([c.populacao for c in self.cidades]) ...
true
true
f72baec4eeaab524e7f16dca567ab548d635f3bb
3,949
py
Python
samples/basic/crud/models/cisco-ios-xr/Cisco-IOS-XR-shellutil-oper/nc-read-xr-shellutil-oper-20-ydk.py
maccioni/ydk-py-samples
d1758694bef97327c5477e65649326c7595ce499
[ "Apache-2.0" ]
104
2016-03-15T17:04:01.000Z
2021-12-31T06:09:35.000Z
samples/basic/crud/models/cisco-ios-xr/Cisco-IOS-XR-shellutil-oper/nc-read-xr-shellutil-oper-20-ydk.py
https-maxus-github-com/ydk-py-samples
1ad6cc2b798f358ff835df93d12924df308b85fc
[ "Apache-2.0" ]
15
2016-03-15T23:09:47.000Z
2020-08-13T12:13:18.000Z
samples/basic/crud/models/cisco-ios-xr/Cisco-IOS-XR-shellutil-oper/nc-read-xr-shellutil-oper-20-ydk.py
https-maxus-github-com/ydk-py-samples
1ad6cc2b798f358ff835df93d12924df308b85fc
[ "Apache-2.0" ]
87
2016-04-15T16:59:23.000Z
2021-09-18T18:05:47.000Z
#!/usr/bin/env python # # Copyright 2016 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
34.946903
78
0.622436
from argparse import ArgumentParser from urlparse import urlparse from ydk.services import CRUDService from ydk.providers import NetconfServiceProvider from ydk.models.cisco_ios_xr import Cisco_IOS_XR_shellutil_oper \ as xr_shellutil_oper import datetime import textwrap import logging def proce...
true
true
f72baf0f5132719036a4523e688ff00bace31589
6,130
py
Python
scrape_mars.py
darrenluc93/web-scraping-challenge
50a9a21161ab0920038c8e0d6a9390bb8e35c5f5
[ "ADSL" ]
null
null
null
scrape_mars.py
darrenluc93/web-scraping-challenge
50a9a21161ab0920038c8e0d6a9390bb8e35c5f5
[ "ADSL" ]
null
null
null
scrape_mars.py
darrenluc93/web-scraping-challenge
50a9a21161ab0920038c8e0d6a9390bb8e35c5f5
[ "ADSL" ]
null
null
null
#Import Libraries #Web Scraping tools from bs4 import BeautifulSoup as bs from selenium import webdriver #from splinter import Browser #DataFrame tools import pandas as pd #Misc tools for web scraping import time import requests #Function to initianilze browser. def init_browser(): #Settings for headless mode....
29.471154
194
0.556444
from bs4 import BeautifulSoup as bs from selenium import webdriver import pandas as pd import time import requests def init_browser(): options = webdriver.ChromeOptions() options.add_argument('headless') browser = webdriver.Chrome("/usr/local/bin/chromedriver",chrome_options = options) ...
true
true
f72bb0dfab67291261f8d64decce38b078e31dc2
1,812
py
Python
API/client/python-client-generated/test/test_model_flow_chart_node_component_api.py
zhuofusong/machine-fault-diagnosis
4c35885e3fbb3c552f526019313a8eae9df28905
[ "MIT" ]
2
2020-04-30T01:06:55.000Z
2020-06-08T04:11:28.000Z
API/client/python-client-generated/test/test_model_flow_chart_node_component_api.py
zhuofusong/machine-fault-diagnosis
4c35885e3fbb3c552f526019313a8eae9df28905
[ "MIT" ]
5
2020-04-13T14:13:53.000Z
2021-08-24T17:16:30.000Z
API/client/python-client-generated/test/test_model_flow_chart_node_component_api.py
zhuofusong/machine-fault-diagnosis
4c35885e3fbb3c552f526019313a8eae9df28905
[ "MIT" ]
null
null
null
# coding: utf-8 """ Machine fault diagnosis List of top level server APIs # noqa: E501 OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import swagger_client from api.model_flow_chart_node_...
29.225806
105
0.734547
from __future__ import absolute_import import unittest import swagger_client from api.model_flow_chart_node_component_api import ModelFlowChartNodeComponentApi from swagger_client.rest import ApiException class TestModelFlowChartNodeComponentApi(unittest.TestCase): def setUp(self): self.api = api....
true
true
f72bb188e19f59d4f42c726c98471832b4cf7c08
62
py
Python
run_ai_api.py
datesann0109/D_2117
07a94c65c622cf2aa9f2a852f1f28e647a5823bd
[ "MIT" ]
1
2021-10-19T02:43:30.000Z
2021-10-19T02:43:30.000Z
run_ai_api.py
datesann0109/D_2117
07a94c65c622cf2aa9f2a852f1f28e647a5823bd
[ "MIT" ]
1
2021-10-30T04:46:00.000Z
2021-10-30T04:46:00.000Z
run_ai_api.py
datesann0109/D_2117
07a94c65c622cf2aa9f2a852f1f28e647a5823bd
[ "MIT" ]
2
2021-10-30T22:58:39.000Z
2021-11-01T10:19:45.000Z
from ai.api import main if __name__ == "__main__": main()
15.5
26
0.66129
from ai.api import main if __name__ == "__main__": main()
true
true
f72bb1d1d668b0faf7a48161762de174a03e8bff
154
py
Python
Cours-3/Programmes-Python/M3-2.py
Naereen/Introduction-au-Numerique-avec-Python-dpt-DEM-2020
ee935f67970acbb3c8ba0373f57c21826340c3aa
[ "MIT" ]
1
2020-10-07T19:44:29.000Z
2020-10-07T19:44:29.000Z
Cours-3/Programmes-Python/M3-2.py
Naereen/Introduction-au-Num-rique-avec-Python-dpt-DEM-2020
ee935f67970acbb3c8ba0373f57c21826340c3aa
[ "MIT" ]
null
null
null
Cours-3/Programmes-Python/M3-2.py
Naereen/Introduction-au-Num-rique-avec-Python-dpt-DEM-2020
ee935f67970acbb3c8ba0373f57c21826340c3aa
[ "MIT" ]
null
null
null
somme = 0 n = 5 # valeur quelconque i = 1 while i <= n: somme = somme + i i = i + 1 print("La somme des", n, "premiers entiers est :", somme)
19.25
57
0.558442
somme = 0 n = 5 i = 1 while i <= n: somme = somme + i i = i + 1 print("La somme des", n, "premiers entiers est :", somme)
true
true
f72bb320c80fb2f7343a4f0f36be5c6b322a7a94
107,134
py
Python
bigquery/google/cloud/bigquery/job.py
erikwebb/google-cloud-python
288a878e9a07239015c78a193eca1cc15e926127
[ "Apache-2.0" ]
1
2019-01-23T21:54:51.000Z
2019-01-23T21:54:51.000Z
bigquery/google/cloud/bigquery/job.py
erikwebb/google-cloud-python
288a878e9a07239015c78a193eca1cc15e926127
[ "Apache-2.0" ]
null
null
null
bigquery/google/cloud/bigquery/job.py
erikwebb/google-cloud-python
288a878e9a07239015c78a193eca1cc15e926127
[ "Apache-2.0" ]
1
2020-11-15T11:44:36.000Z
2020-11-15T11:44:36.000Z
# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
34
128
0.647908
import copy import threading from six.moves import http_client import google.api_core.future.polling from google.cloud import exceptions from google.cloud.exceptions import NotFound from google.cloud.bigquery.dataset import DatasetReference from google.cloud.bigquery.external_config import ExternalConf...
true
true
f72bb4debf4ce516c6fa1d5f7294e9cce53c4b79
4,826
py
Python
cccp/__init__.py
sloev/cccp
829c359a8607d3f3fb2e1e82f2114bb1c8404ce3
[ "MIT" ]
1
2020-03-14T11:56:09.000Z
2020-03-14T11:56:09.000Z
cccp/__init__.py
sloev/cccp
829c359a8607d3f3fb2e1e82f2114bb1c8404ce3
[ "MIT" ]
null
null
null
cccp/__init__.py
sloev/cccp
829c359a8607d3f3fb2e1e82f2114bb1c8404ce3
[ "MIT" ]
3
2020-03-08T13:23:37.000Z
2021-12-06T19:46:27.000Z
from string import Template from dominate.tags import script, link, style from dominate.util import raw import json REQUIRED = [ script( src="https://unpkg.com/axios@0.19.0/dist/axios.min.js", crossorigin="anonymous" ), script( src="https://code.jquery.com/jquery-3.3.1.slim.min.js", ...
26.371585
122
0.623291
from string import Template from dominate.tags import script, link, style from dominate.util import raw import json REQUIRED = [ script( src="https://unpkg.com/axios@0.19.0/dist/axios.min.js", crossorigin="anonymous" ), script( src="https://code.jquery.com/jquery-3.3.1.slim.min.js", ...
true
true
f72bb5154ac3efc57f3e05c96a98460ac4436137
4,661
py
Python
lbrynet/core/PaymentRateManager.py
anon4040/lbry
1f1b34863805f4954fbef3f163ef65268a66771a
[ "MIT" ]
1
2018-12-08T04:42:11.000Z
2018-12-08T04:42:11.000Z
lbrynet/core/PaymentRateManager.py
mrlucky9/lbry
bf6bc02828ed55e98a3002f487041acbd7841883
[ "MIT" ]
null
null
null
lbrynet/core/PaymentRateManager.py
mrlucky9/lbry
bf6bc02828ed55e98a3002f487041acbd7841883
[ "MIT" ]
1
2018-05-01T09:28:52.000Z
2018-05-01T09:28:52.000Z
from lbrynet.core.Strategy import get_default_strategy, OnlyFreeStrategy from lbrynet import conf from decimal import Decimal class BasePaymentRateManager(object): def __init__(self, rate=None, info_rate=None): self.min_blob_data_payment_rate = rate if rate is not None else conf.settings['data_rate'] ...
36.414063
98
0.679897
from lbrynet.core.Strategy import get_default_strategy, OnlyFreeStrategy from lbrynet import conf from decimal import Decimal class BasePaymentRateManager(object): def __init__(self, rate=None, info_rate=None): self.min_blob_data_payment_rate = rate if rate is not None else conf.settings['data_rate'] ...
true
true
f72bb56ed6f1866f992171ab177c9a2074f78328
1,005
py
Python
cea/examples/extract_reference_case.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
null
null
null
cea/examples/extract_reference_case.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
null
null
null
cea/examples/extract_reference_case.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
null
null
null
""" Extract the reference case (``cea/examples/reference-case-open.zip``). """ from __future__ import division import os import zipfile import cea.examples import cea.config import cea.inputlocator # list the sections in the configuration file that are used by this script # this value is used to generate the help men...
31.40625
99
0.758209
from __future__ import division import os import zipfile import cea.examples import cea.config import cea.inputlocator CEA_CONFIG_SECTIONS = ['extract-reference-case'] def main(config): reference_case = 'reference-case-{case}.zip'.format(case=config.extract_reference_case.case) archive = zipfile.ZipFile(o...
true
true
f72bb6f0058e6022c5654db644c4f3a8d1350c2a
18,976
py
Python
ssd/modeling/backbone/basic.py
Sethan/deeplearning-graphics
ce164847a323d3f07cfe241f4bbed6029777c58d
[ "MIT" ]
null
null
null
ssd/modeling/backbone/basic.py
Sethan/deeplearning-graphics
ce164847a323d3f07cfe241f4bbed6029777c58d
[ "MIT" ]
null
null
null
ssd/modeling/backbone/basic.py
Sethan/deeplearning-graphics
ce164847a323d3f07cfe241f4bbed6029777c58d
[ "MIT" ]
null
null
null
import torch class BasicModel(torch.nn.Module): """ This is a basic backbone for SSD. The feature extractor outputs a list of 6 feature maps, with the sizes: [shape(-1, output_channels[0], 38, 38), shape(-1, output_channels[1], 19, 19), shape(-1, output_channels[2], 10, 10), shape(-1, o...
32.108291
98
0.539155
import torch class BasicModel(torch.nn.Module): def __init__(self, cfg): super().__init__() image_size = cfg.INPUT.IMAGE_SIZE output_channels = cfg.MODEL.BACKBONE.OUT_CHANNELS self.output_channels = output_channels image_channels = cfg.MODEL.BACKBONE.INPUT_CHANNELS ...
true
true
f72bb74728607daee649873c96466e293323f858
400
py
Python
packages/pytea/pytest/unit_tests/passes/pass_argmax_dim01.py
lego0901/pytea
8ede650def2e68f4610ba816451d8b9e28f09f76
[ "MIT" ]
null
null
null
packages/pytea/pytest/unit_tests/passes/pass_argmax_dim01.py
lego0901/pytea
8ede650def2e68f4610ba816451d8b9e28f09f76
[ "MIT" ]
null
null
null
packages/pytea/pytest/unit_tests/passes/pass_argmax_dim01.py
lego0901/pytea
8ede650def2e68f4610ba816451d8b9e28f09f76
[ "MIT" ]
null
null
null
''' pass_argmax_dim01.py Copyright (c) Seoul National University Licensed under the MIT license. Author: Woo Sung Song torch.Tensor.argmax with dim parameter. ! This is not available since maximum stack size exceeding error has been occured ''' import torch import torch.nn as nn import torch.nn.functional as F a = t...
21.052632
81
0.75
import torch import torch.nn as nn import torch.nn.functional as F a = torch.rand(2, 3)
true
true
f72bb761694ffb3a80f6774d7de879a210505611
5,192
py
Python
backend/game.py
KatrichKostiantin/CheckersGame
3a552335d3ce344b203129a230d64db303491bb2
[ "MIT" ]
null
null
null
backend/game.py
KatrichKostiantin/CheckersGame
3a552335d3ce344b203129a230d64db303491bb2
[ "MIT" ]
null
null
null
backend/game.py
KatrichKostiantin/CheckersGame
3a552335d3ce344b203129a230d64db303491bb2
[ "MIT" ]
null
null
null
import asyncio import datetime import logging import secrets from main import game class GameError(Exception): pass class ForbiddenMoveError(GameError): pass class MoveIsNotPossible(GameError): pass class Game: def __init__(self): self._game = game self._is_started = False ...
30.011561
117
0.55624
import asyncio import datetime import logging import secrets from main import game class GameError(Exception): pass class ForbiddenMoveError(GameError): pass class MoveIsNotPossible(GameError): pass class Game: def __init__(self): self._game = game self._is_started = False ...
true
true
f72bb7c009ac666bf6b4d3d4ca6e8865981ed9cf
3,079
py
Python
model/app/LearnTfidfCNB.py
jgharris7/DocClass
9ef62e655272cca8374187040eb3dd73f3f82b72
[ "MIT" ]
null
null
null
model/app/LearnTfidfCNB.py
jgharris7/DocClass
9ef62e655272cca8374187040eb3dd73f3f82b72
[ "MIT" ]
null
null
null
model/app/LearnTfidfCNB.py
jgharris7/DocClass
9ef62e655272cca8374187040eb3dd73f3f82b72
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Mar 22 22:43:22 2021 @author: jgharris """ # -*- coding: utf-8 -*- """ Created on Mon Mar 22 21:09:34 2021 @author: jgharris """ root='C:/Users/jgharris/DocClass/' dataFile='/data/shuffled-full-set-hashed.csv' import statistics as stat import panda...
27.008772
88
0.642416
root='C:/Users/jgharris/DocClass/' dataFile='/data/shuffled-full-set-hashed.csv' import statistics as stat import pandas as pd from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score import matplotlib import matplotlib.pyplot as plt import numpy as ...
true
true
f72bb7e51487a16740709aa74b453a9e4b4dfec5
1,107
py
Python
sortByWeather.py
LeahGabrielle/Clothes
72a829358ad6a60aef26b7fce80d854451124a32
[ "Apache-2.0" ]
null
null
null
sortByWeather.py
LeahGabrielle/Clothes
72a829358ad6a60aef26b7fce80d854451124a32
[ "Apache-2.0" ]
null
null
null
sortByWeather.py
LeahGabrielle/Clothes
72a829358ad6a60aef26b7fce80d854451124a32
[ "Apache-2.0" ]
null
null
null
#clothes by weather import random def pickTop(clothesList): return random.choice(clothesList[0]) def pickBottoms(clothesList): return random.choice(clothesList[1]) #sorts clothes into weather type and returns a list of clothes of the correct weather def sortWeather(clothesList, weather): #eventually com...
27
85
0.65673
import random def pickTop(clothesList): return random.choice(clothesList[0]) def pickBottoms(clothesList): return random.choice(clothesList[1]) def sortWeather(clothesList, weather): i=0 for top in clothesList[0]: if top[2] != weather: clothesList[0].pop(i) ...
true
true
f72bb87a2474ba7c90c9d75c1d943aae0014a860
403
py
Python
core/mixon_core.py
onuratakan/MIXON
74d8b1fc7ec2e84dbe4e29f411ae09d701838579
[ "MIT" ]
14
2021-01-22T20:39:43.000Z
2022-02-20T00:30:41.000Z
core/mixon_core.py
onuratakan/MIXON
74d8b1fc7ec2e84dbe4e29f411ae09d701838579
[ "MIT" ]
null
null
null
core/mixon_core.py
onuratakan/MIXON
74d8b1fc7ec2e84dbe4e29f411ae09d701838579
[ "MIT" ]
3
2021-03-20T00:02:24.000Z
2021-03-22T07:36:49.000Z
import sys import os def start_tojas(): os.system("cd tojas && python3 tojas.py -nb && cd ..") def start_tojas_gui(): os.system("python3 lib/tojas_gui.py -nb") def start_scanizen(): os.system("cd scanizen && python3 scanizen.py -nb && cd ..") def start_doser(): os.system("cd doser && python3 doser.py -n...
16.791667
62
0.667494
import sys import os def start_tojas(): os.system("cd tojas && python3 tojas.py -nb && cd ..") def start_tojas_gui(): os.system("python3 lib/tojas_gui.py -nb") def start_scanizen(): os.system("cd scanizen && python3 scanizen.py -nb && cd ..") def start_doser(): os.system("cd doser && python3 doser.py -n...
true
true
f72bb9cc461f8b012834228510d2ae37ee6fc7a0
2,184
py
Python
p130_surrounded_regions.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
p130_surrounded_regions.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
p130_surrounded_regions.py
feigaochn/leetcode
abf0877fae02aa9c2549051f0b68df0ace952512
[ "MIT" ]
null
null
null
# Surrounded Regions # Total Accepted: 7716 Total Submissions: 56446 My Submissions # # Given a 2D board containing 'X' and 'O', capture all regions surrounded by # 'X'. A region is captured by flipping all 'O's into 'X's in that surrounded # region. # # For example, # X X X X # X O O X # X X O X # X O X X # # After ru...
28.736842
77
0.422619
class Solution: def solve(self, board): if len(board) is 0: return q = [] for j in range(len(board[0])): if board[0][j] is 'O': q.append((0, j)) board[0][j] = 'o' for j in ra...
true
true
f72bb9ed94ed86bf9e276452065cfabb93084887
647
py
Python
4.py
Michanix/Math-Stat-Homework
18f4f915ea0f2dd7fa14ebaeb0d357510aef4808
[ "MIT" ]
null
null
null
4.py
Michanix/Math-Stat-Homework
18f4f915ea0f2dd7fa14ebaeb0d357510aef4808
[ "MIT" ]
null
null
null
4.py
Michanix/Math-Stat-Homework
18f4f915ea0f2dd7fa14ebaeb0d357510aef4808
[ "MIT" ]
null
null
null
from math import sqrt from random import randrange arr1 = [i for i in range(1, 11)] arr2 = [i for i in range(1, 11)] arr3 = [randrange(i) for i in range(1, 11)] arr4 = [randrange(i) for i in range(1, 11)] def avg(data): return sum(data) / len(data) def std(data): mu = avg(data) std = (sum([(i - mu)**2 f...
22.310345
61
0.591963
from math import sqrt from random import randrange arr1 = [i for i in range(1, 11)] arr2 = [i for i in range(1, 11)] arr3 = [randrange(i) for i in range(1, 11)] arr4 = [randrange(i) for i in range(1, 11)] def avg(data): return sum(data) / len(data) def std(data): mu = avg(data) std = (sum([(i - mu)**2 f...
true
true
f72bba260dbdc0d48d601f070334e34f0095da0b
6,016
py
Python
scripts/gdc_req_legacy.py
dampierch/herv
9f1ce0e676977b6c8d25fdf446c0807826b80bea
[ "MIT" ]
null
null
null
scripts/gdc_req_legacy.py
dampierch/herv
9f1ce0e676977b6c8d25fdf446c0807826b80bea
[ "MIT" ]
null
null
null
scripts/gdc_req_legacy.py
dampierch/herv
9f1ce0e676977b6c8d25fdf446c0807826b80bea
[ "MIT" ]
null
null
null
''' this script queries the gdc legacy archive via the search and retrieve api and returns msi_status object (from files endpoint on legacy) -- get uuids of xml files with the msi annotations from legacy server -- download each xml file -- parse xml files to extract msi annotations for each subject script should be ca...
27.723502
79
0.562001
import io import json import os import pandas as pd import requests import re import subprocess import glob import xml.etree.ElementTree as ET modname = 'gdc_req_legacy' def set_filters(): filters = { 'op':'and', 'content':[ {'op':'or', 'content':[ {'op'...
true
true
f72bba363e60dcda05c1e3254d05eaf5e83fbdac
10,188
py
Python
esse3api/esse3api.py
hpsc-smartlab/esse3api
416c52149f28c886cab72671b20b209b40857edf
[ "MIT" ]
2
2018-04-04T15:56:40.000Z
2018-05-23T11:46:06.000Z
esse3api/esse3api.py
hpsc-smartlab/esse3api
416c52149f28c886cab72671b20b209b40857edf
[ "MIT" ]
null
null
null
esse3api/esse3api.py
hpsc-smartlab/esse3api
416c52149f28c886cab72671b20b209b40857edf
[ "MIT" ]
null
null
null
import json, sys, re, urllib, urllib2, socket, json, pydoc, cgi, os, time, inspect from hashlib import md5 from datetime import datetime import time import csv from scraper import Scraper from flask import Flask from flask import Response from flask import request from flask import jsonify from flask import current_a...
31.060976
116
0.575775
import json, sys, re, urllib, urllib2, socket, json, pydoc, cgi, os, time, inspect from hashlib import md5 from datetime import datetime import time import csv from scraper import Scraper from flask import Flask from flask import Response from flask import request from flask import jsonify from flask import current_a...
true
true
f72bba8e3526c1ea6ffcb838cd2c3598c2a72e30
3,094
py
Python
app/forms.py
credwood/bitplayers
4ca6b6c6a21bb21d7cd963c64028415559c3dcc4
[ "MIT" ]
1
2020-06-26T21:49:14.000Z
2020-06-26T21:49:14.000Z
app/forms.py
credwood/bitplayers
4ca6b6c6a21bb21d7cd963c64028415559c3dcc4
[ "MIT" ]
2
2020-03-31T11:11:04.000Z
2021-12-13T20:38:48.000Z
app/forms.py
credwood/bitplayers
4ca6b6c6a21bb21d7cd963c64028415559c3dcc4
[ "MIT" ]
null
null
null
from flask_wtf import FlaskForm, RecaptchaField from wtforms import BooleanField, TextAreaField from wtforms import PasswordField from wtforms import StringField from wtforms import SubmitField, TextField from wtforms import Form, BooleanField, validators from wtforms.validators import DataRequired, InputRequired, Equa...
44.84058
145
0.72075
from flask_wtf import FlaskForm, RecaptchaField from wtforms import BooleanField, TextAreaField from wtforms import PasswordField from wtforms import StringField from wtforms import SubmitField, TextField from wtforms import Form, BooleanField, validators from wtforms.validators import DataRequired, InputRequired, Equa...
true
true
f72bba9d57d9b9c86ad129995eaf5cd82c8bbdc8
5,764
py
Python
test/integration/ggrc/proposal/test_proposal_email.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
1
2019-01-12T23:46:00.000Z
2019-01-12T23:46:00.000Z
test/integration/ggrc/proposal/test_proposal_email.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/integration/ggrc/proposal/test_proposal_email.py
MikalaiMikalalai/ggrc-core
f0f83b3638574bb64de474f3b70ed27436ca812a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (C) 2020 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """This module contains test about sending emails for proposals.""" import ddt import mock from ggrc.notifications import fast_digest from integration.ggrc import TestCase from integration.ggrc.api_helper im...
39.479452
79
0.653539
import ddt import mock from ggrc.notifications import fast_digest from integration.ggrc import TestCase from integration.ggrc.api_helper import Api from integration.ggrc.models import factories @ddt.ddt class TestProposalEmail(TestCase): def setUp(self): super(TestProposalEmail, self).setUp() self.api =...
true
true
f72bbb6109eb7cd126564a721c3685fff15dd47b
1,919
py
Python
pyretrommo/gen/player_stats.py
snwhd/pyretrommo
fabb523d9b4385ed8a1ff0b2ac787cc5d88a23b7
[ "blessing" ]
1
2021-11-25T09:33:30.000Z
2021-11-25T09:33:30.000Z
pyretrommo/gen/player_stats.py
snwhd/pyretrommo
fabb523d9b4385ed8a1ff0b2ac787cc5d88a23b7
[ "blessing" ]
null
null
null
pyretrommo/gen/player_stats.py
snwhd/pyretrommo
fabb523d9b4385ed8a1ff0b2ac787cc5d88a23b7
[ "blessing" ]
null
null
null
#!/usr/bin/env python3 # this file is auto-generated by gen_from_wiki.py from __future__ import annotations from .player_class import PlayerClass from ..stats import Stats STATS_BY_PLAYER_CLASS = { PlayerClass.Cleric: [ Stats(*(0, 0, 0, 0, 0, 0, 0, 0)), Stats(*(17, 11, 8, 9, 12, 12, 10, 11)), ...
39.163265
49
0.454924
from __future__ import annotations from .player_class import PlayerClass from ..stats import Stats STATS_BY_PLAYER_CLASS = { PlayerClass.Cleric: [ Stats(*(0, 0, 0, 0, 0, 0, 0, 0)), Stats(*(17, 11, 8, 9, 12, 12, 10, 11)), Stats(*(23, 15, 9, 11, 15, 14, 12, 13)), Stats(*(29, 19, 11...
true
true
f72bbba8b340d6dadd4bd602a0a79cc67d8d633b
236
py
Python
src/silicium/scene.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
2
2021-12-12T12:06:46.000Z
2021-12-12T12:21:18.000Z
src/silicium/scene.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
1
2021-12-12T12:21:43.000Z
2021-12-12T22:49:46.000Z
src/silicium/scene.py
PH-KDX/silicium
813e8719a4ba381691d3d1b11ea5738bb2ee2d36
[ "MIT" ]
2
2021-12-12T15:13:54.000Z
2021-12-21T09:08:42.000Z
from dataclasses import dataclass from abc import ABC, abstractmethod from .builder import AbstractBuilder @dataclass class AbstractScene(ABC): builder: AbstractBuilder @abstractmethod def run(self) -> None: ...
16.857143
36
0.728814
from dataclasses import dataclass from abc import ABC, abstractmethod from .builder import AbstractBuilder @dataclass class AbstractScene(ABC): builder: AbstractBuilder @abstractmethod def run(self) -> None: ...
true
true
f72bbc0a917dfbe976b673ecf7b7fb9a01ec6ce3
1,391
py
Python
app/user/serializers.py
faridos/my_delivery_app_django
87b487a064b190bfb8e71ba40e6edb9ebc9bd817
[ "MIT" ]
null
null
null
app/user/serializers.py
faridos/my_delivery_app_django
87b487a064b190bfb8e71ba40e6edb9ebc9bd817
[ "MIT" ]
null
null
null
app/user/serializers.py
faridos/my_delivery_app_django
87b487a064b190bfb8e71ba40e6edb9ebc9bd817
[ "MIT" ]
null
null
null
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): """Serializer for the users object""" class Meta: model = get_user_model() fields = ('...
33.119048
74
0.65133
from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): class Meta: model = get_user_model() fields = ('email', 'password', 'name') extra_...
true
true
f72bbc4cec7a7d7ee13488d5aad10549c5740f87
171
py
Python
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingAverage_Seasonal_MonthOfYear_ARX.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingAverage_Seasonal_MonthOfYear_ARX.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Anscombe/model_control_one_enabled_Anscombe_MovingAverage_Seasonal_MonthOfYear_ARX.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingAverage'] , ['Seasonal_MonthOfYear'] , ['ARX'] );
42.75
93
0.766082
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Anscombe'] , ['MovingAverage'] , ['Seasonal_MonthOfYear'] , ['ARX'] );
true
true
f72bbca3b2e8a2f4ec524e851e80d4cf38f9ab9d
4,759
py
Python
David and Pooja/++Validating Linked Mods/Python-3.0/Lib/lib2to3/pgen2/driver.py
LinkedModernismProject/web_code
4cf6bf53d5c3249e52a75f0a3f57d106e31daf9e
[ "Apache-2.0" ]
1
2015-05-21T23:47:54.000Z
2015-05-21T23:47:54.000Z
front-end/testsuite-python-lib/Python-3.0/Lib/lib2to3/pgen2/driver.py
MalloyPower/parsing-python
b2bca5eed07ea2af7a2001cd4f63becdfb0570be
[ "MIT" ]
1
2015-10-29T20:51:31.000Z
2015-10-29T20:51:31.000Z
front-end/testsuite-python-lib/Python-3.0/Lib/lib2to3/pgen2/driver.py
MalloyPower/parsing-python
b2bca5eed07ea2af7a2001cd4f63becdfb0570be
[ "MIT" ]
1
2019-04-11T11:27:01.000Z
2019-04-11T11:27:01.000Z
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser driver. This provides a high-level interface to parse a file into a synta...
32.59589
76
0.562093
__author__ = "Guido van Rossum <guido@python.org>" __all__ = ["Driver", "load_grammar"] import os import logging import sys from . import grammar, parse, token, tokenize, pgen class Driver(object): def __init__(self, grammar, convert=None, logger=None): self.grammar = grammar if logg...
true
true
f72bbd8a0db5fae809ca9c1b2443d5383f6ae83e
5,635
py
Python
sdk/python/pulumi_azure_native/devtestlab/v20180915/list_service_fabric_applicable_schedules.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/devtestlab/v20180915/list_service_fabric_applicable_schedules.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/devtestlab/v20180915/list_service_fabric_applicable_schedules.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "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 from...
37.317881
184
0.644898
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'ListServiceFabricApplicableSchedulesResult', 'AwaitableListServiceFabricApplicableSchedulesResult', 'list_service_fabric_...
true
true
f72bbedeed16b94339a910792bc18059766dde94
5,337
py
Python
alacrity/core.py
OLeoghain/alacrity
d49453f5f998dbaf36006fe7ec6c6753cd5ef4c1
[ "MIT" ]
null
null
null
alacrity/core.py
OLeoghain/alacrity
d49453f5f998dbaf36006fe7ec6c6753cd5ef4c1
[ "MIT" ]
null
null
null
alacrity/core.py
OLeoghain/alacrity
d49453f5f998dbaf36006fe7ec6c6753cd5ef4c1
[ "MIT" ]
null
null
null
#!/bin/python import importlib import logging import os import sys import argparse import shutil from clint.textui import colored try: from alacrity import lib except ImportError: lib = importlib.import_module('lib', '../alacrity') def main(): """ Entry point for the package, alacrity.exe in win and...
36.554795
79
0.564737
import importlib import logging import os import sys import argparse import shutil from clint.textui import colored try: from alacrity import lib except ImportError: lib = importlib.import_module('lib', '../alacrity') def main(): try: from alacrity import version except ImportError: ...
true
true
f72bbf8d0fa245c9c5a1214dc4f10dd0bf1f40bc
56,360
py
Python
release/stubs.min/System/Windows/Forms/__init___parts/NumericUpDown.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
182
2017-06-27T02:26:15.000Z
2022-03-30T18:53:43.000Z
release/stubs.min/System/Windows/Forms/__init___parts/NumericUpDown.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
28
2017-06-27T13:38:23.000Z
2022-03-15T11:19:44.000Z
release/stubs.min/System/Windows/Forms/__init___parts/NumericUpDown.py
htlcnn/ironpython-stubs
780d829e2104b2789d5f4d6f32b0ec9f2930ca03
[ "MIT" ]
67
2017-06-28T09:43:59.000Z
2022-03-20T21:17:10.000Z
class NumericUpDown(UpDownBase,IComponent,IDisposable,IOleControl,IOleObject,IOleInPlaceObject,IOleInPlaceActiveObject,IOleWindow,IViewObject,IViewObject2,IPersist,IPersistStreamInit,IPersistPropertyBag,IPersistStorage,IQuickActivate,ISupportOleDropSource,IDropTarget,ISynchronizeInvoke,IWin32Window,IArrangedElement,IBi...
24.261731
375
0.700053
class NumericUpDown(UpDownBase,IComponent,IDisposable,IOleControl,IOleObject,IOleInPlaceObject,IOleInPlaceActiveObject,IOleWindow,IViewObject,IViewObject2,IPersist,IPersistStreamInit,IPersistPropertyBag,IPersistStorage,IQuickActivate,ISupportOleDropSource,IDropTarget,ISynchronizeInvoke,IWin32Window,IArrangedElement,IBi...
true
true
f72bc0bbb4aca05776043b6a2bbf09555f2323ed
498
py
Python
barberShopControl/core/migrations/0017_reserva_res_servicos.py
YohaneSilva/Barbearia-Amizades
8550cc5de7a0055be78f9e539de9e5c72a8c3a61
[ "Apache-2.0" ]
1
2020-03-19T21:09:24.000Z
2020-03-19T21:09:24.000Z
barberShopControl/core/migrations/0017_reserva_res_servicos.py
YohaneSilva/Barbearia-Amizades
8550cc5de7a0055be78f9e539de9e5c72a8c3a61
[ "Apache-2.0" ]
null
null
null
barberShopControl/core/migrations/0017_reserva_res_servicos.py
YohaneSilva/Barbearia-Amizades
8550cc5de7a0055be78f9e539de9e5c72a8c3a61
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.0.5 on 2020-05-18 04:14 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('core', '0016_auto_20200516_0338'), ] operations = [ migrations.AddField( model_name='reserva', ...
23.714286
95
0.634538
from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('core', '0016_auto_20200516_0338'), ] operations = [ migrations.AddField( model_name='reserva', name='res_servicos', field=...
true
true
f72bc16d4a055439bb4d5c75416bba366abd7fa1
21,675
py
Python
generated/nidcpower/nidcpower/_converters.py
AlexHearnNI/nimi-python
39d7c4d9aa66d826c60a5d700982eff173e051e5
[ "MIT" ]
null
null
null
generated/nidcpower/nidcpower/_converters.py
AlexHearnNI/nimi-python
39d7c4d9aa66d826c60a5d700982eff173e051e5
[ "MIT" ]
null
null
null
generated/nidcpower/nidcpower/_converters.py
AlexHearnNI/nimi-python
39d7c4d9aa66d826c60a5d700982eff173e051e5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This file was generated import nidcpower._visatype as _visatype import nidcpower.errors as errors import array import datetime import numbers from functools import singledispatch @singledispatch def _convert_repeated_capabilities(arg, prefix): # noqa: F811 '''Base version that should ...
44.875776
289
0.705421
import nidcpower._visatype as _visatype import nidcpower.errors as errors import array import datetime import numbers from functools import singledispatch @singledispatch def _convert_repeated_capabilities(arg, prefix): raise errors.InvalidRepeatedCapabilityError('Invalid type', type(arg)) @_convert_repea...
true
true
f72bc1b96d03b897b764119148a72447728fb58c
3,110
py
Python
DQMServices/Components/python/test/create_filePB_ref_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
DQMServices/Components/python/test/create_filePB_ref_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
DQMServices/Components/python/test/create_filePB_ref_cfg.py
nistefan/cmssw
ea13af97f7f2117a4f590a5e654e06ecd9825a5b
[ "Apache-2.0" ]
null
null
null
import FWCore.ParameterSet.Config as cms import DQMServices.Components.test.checkBooking as booking import DQMServices.Components.test.createElements as c import sys process = cms.Process("TEST") # load DQM process.load("DQMServices.Core.DQM_cfg") process.load("DQMServices.Components.DQMEnvironment_cfi") b = bookin...
39.367089
196
0.586174
import FWCore.ParameterSet.Config as cms import DQMServices.Components.test.checkBooking as booking import DQMServices.Components.test.createElements as c import sys process = cms.Process("TEST") process.load("DQMServices.Core.DQM_cfg") process.load("DQMServices.Components.DQMEnvironment_cfi") b = booking.BookingP...
false
true
f72bc1d5aefbd73272c909b63fc43b86465f5c78
29,314
py
Python
tensor2tensor/layers/discretization.py
spacegoing/t2t_caps
ded708b738fa8966eb7544708c4a785479da4c3c
[ "Apache-2.0" ]
null
null
null
tensor2tensor/layers/discretization.py
spacegoing/t2t_caps
ded708b738fa8966eb7544708c4a785479da4c3c
[ "Apache-2.0" ]
null
null
null
tensor2tensor/layers/discretization.py
spacegoing/t2t_caps
ded708b738fa8966eb7544708c4a785479da4c3c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
38.877984
80
0.651395
from __future__ import absolute_import from __future__ import division from __future__ import print_function from functools import partial from tensor2tensor.layers import common_layers import tensorflow as tf from tensorflow.python.training import moving_averages def project_hidden(x, projection_tens...
true
true
f72bc2026dd2bf64e09da4b3d2a51aebf0adea83
5,122
py
Python
perfect_information_game/tablebases/symmetry_transform.py
amaarquadri/perfect-information-game
6755f9633935be762d039ece9c0b646c64de6ab8
[ "MIT" ]
null
null
null
perfect_information_game/tablebases/symmetry_transform.py
amaarquadri/perfect-information-game
6755f9633935be762d039ece9c0b646c64de6ab8
[ "MIT" ]
null
null
null
perfect_information_game/tablebases/symmetry_transform.py
amaarquadri/perfect-information-game
6755f9633935be762d039ece9c0b646c64de6ab8
[ "MIT" ]
null
null
null
import numpy as np from perfect_information_game.games import Chess from perfect_information_game.utils import iter_product from perfect_information_game.tablebases import get_verified_chess_subclass class SymmetryTransform: # noinspection PyChainedComparisons PAWNLESS_UNIQUE_SQUARE_INDICES = [(i, j) for i, j...
40.650794
105
0.625927
import numpy as np from perfect_information_game.games import Chess from perfect_information_game.utils import iter_product from perfect_information_game.tablebases import get_verified_chess_subclass class SymmetryTransform: PAWNLESS_UNIQUE_SQUARE_INDICES = [(i, j) for i, j in iter_product(Chess.BOARD_SHAPE)...
true
true
f72bc25c098c14f516c7757477bbf04b559e5b10
8,291
py
Python
custom_components/dahua/config_flow.py
ikke-zelf/dahua
9fca03b3d0caf5661efee7d71668a838b0478587
[ "MIT" ]
null
null
null
custom_components/dahua/config_flow.py
ikke-zelf/dahua
9fca03b3d0caf5661efee7d71668a838b0478587
[ "MIT" ]
null
null
null
custom_components/dahua/config_flow.py
ikke-zelf/dahua
9fca03b3d0caf5661efee7d71668a838b0478587
[ "MIT" ]
null
null
null
"""Adds config flow (UI flow) for Dahua IP cameras.""" import logging import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_create_clientsession from homeassistant.helpers import config_validation as cv from .c...
34.983122
103
0.592329
import logging import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback from homeassistant.helpers.aiohttp_client import async_create_clientsession from homeassistant.helpers import config_validation as cv from .client import DahuaClient from .const import ( CONF_...
true
true
f72bc3b606d3adbd104ee19fb8f0f98ea61cc6ed
36,568
py
Python
python/avi/migrationtools/ace_converter/ace_parser.py
Crypto89/sdk
56c48329b7ced2c56b7c92aa40bb52efb5f2e6c0
[ "Apache-2.0" ]
4
2017-06-16T18:51:52.000Z
2020-02-11T15:22:42.000Z
vendor/github.com/avinetworks/sdk/python/avi/migrationtools/ace_converter/ace_parser.py
sudswasavi/servicemesh
4f07c228e9b62c9b621cb0bfc464c75e85351f7f
[ "Apache-2.0" ]
17
2019-01-11T05:57:35.000Z
2019-08-29T05:33:38.000Z
vendor/github.com/avinetworks/sdk/python/avi/migrationtools/ace_converter/ace_parser.py
sudswasavi/servicemesh
4f07c228e9b62c9b621cb0bfc464c75e85351f7f
[ "Apache-2.0" ]
8
2017-06-26T18:15:58.000Z
2021-04-12T08:09:03.000Z
import os import sys import logging from pyparsing import Keyword, Word, OneOrMore, printables, Group, nums,\ alphas, ZeroOrMore, Optional, Combine, QuotedString, restOfLine from itertools import cycle from avi.migrationtools.ace_converter.ace_utils import printProgressBar,\ set_excel_dict LOG = logging.getLogg...
39.834423
127
0.52751
import os import sys import logging from pyparsing import Keyword, Word, OneOrMore, printables, Group, nums,\ alphas, ZeroOrMore, Optional, Combine, QuotedString, restOfLine from itertools import cycle from avi.migrationtools.ace_converter.ace_utils import printProgressBar,\ set_excel_dict LOG = logging.getLogg...
false
true
f72bc3e123cf5d71ec9dfa9b87624f01ea910d05
7,358
py
Python
src/ptb/ptb_enas_controller.py
tremblerz/enas
329ee3f8beb5e715bf2dad1182cfb5120b3485f9
[ "Apache-2.0" ]
null
null
null
src/ptb/ptb_enas_controller.py
tremblerz/enas
329ee3f8beb5e715bf2dad1182cfb5120b3485f9
[ "Apache-2.0" ]
null
null
null
src/ptb/ptb_enas_controller.py
tremblerz/enas
329ee3f8beb5e715bf2dad1182cfb5120b3485f9
[ "Apache-2.0" ]
null
null
null
import sys import os import time import numpy as np import tensorflow as tf from src.utils import get_train_ops from src.common_ops import stack_lstm from tensorflow.python.training import moving_averages class PTBEnasController(object): def __init__(self, rhn_depth=5, lstm_size=...
33.907834
80
0.651536
import sys import os import time import numpy as np import tensorflow as tf from src.utils import get_train_ops from src.common_ops import stack_lstm from tensorflow.python.training import moving_averages class PTBEnasController(object): def __init__(self, rhn_depth=5, lstm_size=...
true
true