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
790997b8b46042a12bd1329e0cad3c963a64e3e7
37,064
py
Python
redis/connection.py
theatlantic/redis-py
767e260169de03f676c9f208eb8583db13c212b3
[ "MIT" ]
null
null
null
redis/connection.py
theatlantic/redis-py
767e260169de03f676c9f208eb8583db13c212b3
[ "MIT" ]
null
null
null
redis/connection.py
theatlantic/redis-py
767e260169de03f676c9f208eb8583db13c212b3
[ "MIT" ]
null
null
null
from __future__ import with_statement from distutils.version import StrictVersion from itertools import chain from select import select import os import socket import sys import threading import warnings try: import ssl ssl_available = True except ImportError: ssl_available = False from redis._compat impo...
35.776062
79
0.594566
from __future__ import with_statement from distutils.version import StrictVersion from itertools import chain from select import select import os import socket import sys import threading import warnings try: import ssl ssl_available = True except ImportError: ssl_available = False from redis._compat impo...
true
true
790999a21693fa502efc7477382ab61aa05579f8
2,676
py
Python
multi_sample_factory/runner/run.py
PG642/multi-sample-factory
2c2bdc698a194a9779161357be40fe9265b55661
[ "MIT" ]
4
2021-12-09T04:16:27.000Z
2021-12-13T08:53:46.000Z
multi_sample_factory/runner/run.py
PG642/multi-sample-factory
2c2bdc698a194a9779161357be40fe9265b55661
[ "MIT" ]
19
2021-06-09T15:38:52.000Z
2022-02-16T11:27:03.000Z
multi_sample_factory/runner/run.py
PG642/multi-sample-factory
2c2bdc698a194a9779161357be40fe9265b55661
[ "MIT" ]
null
null
null
import importlib import sys import argparse from multi_sample_factory.algorithms.utils.algo_utils import ExperimentStatus from multi_sample_factory.runner.run_ngc import add_ngc_args from multi_sample_factory.runner.run_slurm import add_slurm_args from multi_sample_factory.utils.utils import log def runner_argparser...
40.545455
180
0.721226
import importlib import sys import argparse from multi_sample_factory.algorithms.utils.algo_utils import ExperimentStatus from multi_sample_factory.runner.run_ngc import add_ngc_args from multi_sample_factory.runner.run_slurm import add_slurm_args from multi_sample_factory.utils.utils import log def runner_argparser...
true
true
790999c5115fa406e2d012a87ddce0959de6afdd
764
py
Python
examples/sine_tracking.py
ericmux/termux2d
195571c06b6844726e34cbd5d2643a2425c5f403
[ "MIT" ]
null
null
null
examples/sine_tracking.py
ericmux/termux2d
195571c06b6844726e34cbd5d2643a2425c5f403
[ "MIT" ]
null
null
null
examples/sine_tracking.py
ericmux/termux2d
195571c06b6844726e34cbd5d2643a2425c5f403
[ "MIT" ]
null
null
null
from __future__ import print_function import sys import os sys.path.append(os.path.abspath("..")) from termux2d import Canvas, Palette, line, animate, COLOR_RED, COLOR_WHITE import math def __main__(): i = 0 height = 40 while True: frame = [] frame.extend([(coords[0],coords[1],COLOR_WHIT...
23.151515
87
0.53534
from __future__ import print_function import sys import os sys.path.append(os.path.abspath("..")) from termux2d import Canvas, Palette, line, animate, COLOR_RED, COLOR_WHITE import math def __main__(): i = 0 height = 40 while True: frame = [] frame.extend([(coords[0],coords[1],COLOR_WHIT...
true
true
790999d7cfe7e7ecdacf0df07fa17392853db17a
261
py
Python
terrascript/kind/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
507
2017-07-26T02:58:38.000Z
2022-01-21T12:35:13.000Z
terrascript/kind/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
135
2017-07-20T12:01:59.000Z
2021-10-04T22:25:40.000Z
terrascript/kind/r.py
mjuenema/python-terrascript
6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d
[ "BSD-2-Clause" ]
81
2018-02-20T17:55:28.000Z
2022-01-31T07:08:40.000Z
# terrascript/kind/r.py # Automatically generated by tools/makecode.py () import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class kind_cluster(terrascript.Resource): pass
18.642857
79
0.770115
import warnings warnings.warn( "using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2 ) import terrascript class kind_cluster(terrascript.Resource): pass
true
true
79099ada99b8509b8a2afed26438a40e1ad092d0
5,304
py
Python
archdiffer/flask_frontend/request_parser.py
Kratochvilova/archdiffer
06f2ef0bb232b1ffe46e9d50575c4b79b1cff191
[ "MIT" ]
null
null
null
archdiffer/flask_frontend/request_parser.py
Kratochvilova/archdiffer
06f2ef0bb232b1ffe46e9d50575c4b79b1cff191
[ "MIT" ]
null
null
null
archdiffer/flask_frontend/request_parser.py
Kratochvilova/archdiffer
06f2ef0bb232b1ffe46e9d50575c4b79b1cff191
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of Archdiffer and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Created on Sun Mar 4 10:23:41 2018 @author: Pavla Kratochvilova <pavla.kratochvilova@gmail.com> """ import operator import datetime from f...
31.760479
78
0.659879
import operator import datetime from flask import request from .exceptions import BadRequest def make_datetime(time_string, formats=None): if formats is None: formats = [ '%Y-%m-%d %H:%M:%S', '%Y-%m-%d', ] for fmt in formats: try: return dateti...
true
true
79099b1d59797a7de4bf026d2650ab83136c141c
6,683
py
Python
test/conftest.py
gabriel4649/aws-log-parser
d4a8441da0a8d5e6a1d57faded32b66904a7f8a7
[ "Apache-2.0" ]
null
null
null
test/conftest.py
gabriel4649/aws-log-parser
d4a8441da0a8d5e6a1d57faded32b66904a7f8a7
[ "Apache-2.0" ]
null
null
null
test/conftest.py
gabriel4649/aws-log-parser
d4a8441da0a8d5e6a1d57faded32b66904a7f8a7
[ "Apache-2.0" ]
null
null
null
from http import cookies from io import StringIO import pytest def log_entry(entry): return StringIO(entry) @pytest.fixture def cookie_zip_code(): cookie = cookies.SimpleCookie() cookie.load(rawdata='zip=98101') return cookie @pytest.fixture def cookie_empty(): cookie = cookies.SimpleCookie()...
75.943182
569
0.748466
from http import cookies from io import StringIO import pytest def log_entry(entry): return StringIO(entry) @pytest.fixture def cookie_zip_code(): cookie = cookies.SimpleCookie() cookie.load(rawdata='zip=98101') return cookie @pytest.fixture def cookie_empty(): cookie = cookies.SimpleCookie()...
true
true
79099b44cb43defad3753ef17bae0bfde2232fe9
12,957
py
Python
NLP/The_Bottom_up_Evolution_of_Representations_in_the_Transformer/analytics.py
Superhzf/PaperImplementation
a800a9e2fb52fb70766bf91b52871621e0e1dd55
[ "MIT" ]
null
null
null
NLP/The_Bottom_up_Evolution_of_Representations_in_the_Transformer/analytics.py
Superhzf/PaperImplementation
a800a9e2fb52fb70766bf91b52871621e0e1dd55
[ "MIT" ]
null
null
null
NLP/The_Bottom_up_Evolution_of_Representations_in_the_Transformer/analytics.py
Superhzf/PaperImplementation
a800a9e2fb52fb70766bf91b52871621e0e1dd55
[ "MIT" ]
null
null
null
from sklearn.cluster import MiniBatchKMeans import numpy as np import torch from models import TransformerModel, Seq2SeqTransformer, generate_square_subsequent_mask from models import LM_NAME, MLM_NAME, MT_NAME, NLAYERS, NUM2WORD import os from data_preprocessing import DATA_DIR_DEV, SAVE_DATA_MT_TRAIN from data_prepr...
48.347015
154
0.713668
from sklearn.cluster import MiniBatchKMeans import numpy as np import torch from models import TransformerModel, Seq2SeqTransformer, generate_square_subsequent_mask from models import LM_NAME, MLM_NAME, MT_NAME, NLAYERS, NUM2WORD import os from data_preprocessing import DATA_DIR_DEV, SAVE_DATA_MT_TRAIN from data_prepr...
true
true
79099b5d96e04a25696ac170bffa086b2a067be6
9,539
py
Python
conan/tools/system/package_manager.py
sthagen/conan-io-conan
12b4c90d911ef848d8a6d9aeccd551a5441003f3
[ "MIT" ]
null
null
null
conan/tools/system/package_manager.py
sthagen/conan-io-conan
12b4c90d911ef848d8a6d9aeccd551a5441003f3
[ "MIT" ]
null
null
null
conan/tools/system/package_manager.py
sthagen/conan-io-conan
12b4c90d911ef848d8a6d9aeccd551a5441003f3
[ "MIT" ]
null
null
null
import platform from conans.client.graph.graph import CONTEXT_BUILD from conans.errors import ConanException class _SystemPackageManagerTool(object): mode_check = "check" mode_install = "install" tool_name = None install_command = "" update_command = "" check_command = "" def __init__(se...
43.557078
130
0.547437
import platform from conans.client.graph.graph import CONTEXT_BUILD from conans.errors import ConanException class _SystemPackageManagerTool(object): mode_check = "check" mode_install = "install" tool_name = None install_command = "" update_command = "" check_command = "" def __init__(se...
true
true
79099ba4a5b6b0bc5244adcb812757a2da69ab65
9,247
py
Python
database_query_handler.py
jdwinkler/dbpedia_service
da4ffe5c6d271bc55556150b63d894a57e1d1396
[ "MIT" ]
null
null
null
database_query_handler.py
jdwinkler/dbpedia_service
da4ffe5c6d271bc55556150b63d894a57e1d1396
[ "MIT" ]
null
null
null
database_query_handler.py
jdwinkler/dbpedia_service
da4ffe5c6d271bc55556150b63d894a57e1d1396
[ "MIT" ]
null
null
null
import psycopg2 import psycopg2.extras class DBHandler: """ Handles I/O concerning the database to hide its implementation from client services. """ def __init__(self, postgres_username=None, postgres_password=None, db_username='dbpedia_ap...
36.549407
128
0.583324
import psycopg2 import psycopg2.extras class DBHandler: def __init__(self, postgres_username=None, postgres_password=None, db_username='dbpedia_app', db_password='dummy_password'): user_name = db_username ...
true
true
79099c28c046af97d5a67408b24314231e474a1a
2,236
py
Python
nova/tests/functional/db/test_console_auth_token.py
panguan737/nova
0d177185a439baa228b42c948cab4e934d6ac7b8
[ "Apache-2.0" ]
2
2021-10-11T04:56:25.000Z
2022-02-16T08:49:29.000Z
nova/tests/functional/db/test_console_auth_token.py
ljzjohnson/nova
87e1951a1b8c03b9ecdf8f75610d14690b61f272
[ "Apache-2.0" ]
132
2017-03-27T11:31:52.000Z
2022-03-30T08:45:02.000Z
nova/tests/functional/db/test_console_auth_token.py
ljzjohnson/nova
87e1951a1b8c03b9ecdf8f75610d14690b61f272
[ "Apache-2.0" ]
8
2017-03-27T07:50:38.000Z
2020-02-14T16:55:56.000Z
# Copyright 2016 Hewlett Packard Enterprise Development Company LP # # 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 # # Un...
38.551724
78
0.68381
from oslo_versionedobjects import fixture as ovo_fixture from nova import context from nova import exception from nova import objects from nova import test from nova.tests import uuidsentinel class ConsoleAuthTokenTestCase(test.TestCase): def setUp(self): super(ConsoleAuthTokenTestCase, sel...
true
true
79099c3b14fb51637142a501bfbed09936d8b84b
7,228
py
Python
tests/unit/models/test_user.py
duddlf23/amundsendatabuilder
3e281373bfa8989c7a489dcf5b8c67a9f1ac38f1
[ "Apache-2.0" ]
null
null
null
tests/unit/models/test_user.py
duddlf23/amundsendatabuilder
3e281373bfa8989c7a489dcf5b8c67a9f1ac38f1
[ "Apache-2.0" ]
null
null
null
tests/unit/models/test_user.py
duddlf23/amundsendatabuilder
3e281373bfa8989c7a489dcf5b8c67a9f1ac38f1
[ "Apache-2.0" ]
null
null
null
# Copyright Contributors to the Amundsen project. # SPDX-License-Identifier: Apache-2.0 import unittest from unittest.mock import ANY from databuilder.models.graph_serializable import ( RELATION_END_KEY, RELATION_END_LABEL, RELATION_REVERSE_TYPE, RELATION_START_KEY, RELATION_START_LABEL, RELATION_TYPE, ) from...
46.038217
118
0.596292
import unittest from unittest.mock import ANY from databuilder.models.graph_serializable import ( RELATION_END_KEY, RELATION_END_LABEL, RELATION_REVERSE_TYPE, RELATION_START_KEY, RELATION_START_LABEL, RELATION_TYPE, ) from databuilder.models.user import User from databuilder.serializers import neo4_serializ...
true
true
79099c4c1e886fb513bf9a81cebae0993ab8173f
41,077
py
Python
neutron/tests/unit/agent/l3/test_dvr_local_router.py
1pintbeer/neutron
f5a827c2be06f24a1f8025f120f16c12eb1b1f55
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/agent/l3/test_dvr_local_router.py
1pintbeer/neutron
f5a827c2be06f24a1f8025f120f16c12eb1b1f55
[ "Apache-2.0" ]
null
null
null
neutron/tests/unit/agent/l3/test_dvr_local_router.py
1pintbeer/neutron
f5a827c2be06f24a1f8025f120f16c12eb1b1f55
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 OpenStack Foundation # # 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 ...
46.102132
79
0.616817
import mock from neutron_lib.api.definitions import portbindings from neutron_lib import constants as lib_constants from oslo_config import cfg from oslo_log import log from oslo_utils import uuidutils from neutron.agent.l3 import agent as l3_agent from neutron.agent.l3 import dvr_edge_ha_router as dvr_e...
true
true
79099c62b310485ccef413d96604a076dad40b20
358
py
Python
teoria/clase 29-03/algoritmos.py
pgentil/PC
6ee4e79f4594f4c733fb07106ac179575370956d
[ "MIT" ]
null
null
null
teoria/clase 29-03/algoritmos.py
pgentil/PC
6ee4e79f4594f4c733fb07106ac179575370956d
[ "MIT" ]
null
null
null
teoria/clase 29-03/algoritmos.py
pgentil/PC
6ee4e79f4594f4c733fb07106ac179575370956d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Mar 29 11:46:26 2022 @author: Pedro """ def search(lista, target) -> int: for i in range(len(lista)): if lista [i] == target: return i return -1 def search2(lista, target) -> int: for i, element in enumerate(lista): if element == targ...
19.888889
39
0.553073
def search(lista, target) -> int: for i in range(len(lista)): if lista [i] == target: return i return -1 def search2(lista, target) -> int: for i, element in enumerate(lista): if element == target: return i return -1
true
true
79099db8ebbdccce894b07d9478c8ca2c6d71a27
3,723
py
Python
accelbyte_py_sdk/api/iam/models/model_get_users_response_with_pagination_v3.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/models/model_get_users_response_with_pagination_v3.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/iam/models/model_get_users_response_with_pagination_v3.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
# Auto-generated at 2021-09-27T17:12:31.553030+08:00 # from: Justice Iam Service (4.1.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylint: ...
33.540541
123
0.665861
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from ....core import Model from ..models.accountcommon_pagination_v3 import AccountcommonPaginationV3 from ..models.model_user_response_v3 import ModelUserResponseV3 class ModelGetUsersResponseWithPagi...
true
true
79099ddfb307b8b2360a625cf4d8d5e4c7c305fe
10,551
py
Python
main.py
yoonseo0917/PKUAutoSubmit
caf5f3f665c41c64ec24cc14cb8382ee8a6c48a4
[ "Apache-2.0" ]
null
null
null
main.py
yoonseo0917/PKUAutoSubmit
caf5f3f665c41c64ec24cc14cb8382ee8a6c48a4
[ "Apache-2.0" ]
null
null
null
main.py
yoonseo0917/PKUAutoSubmit
caf5f3f665c41c64ec24cc14cb8382ee8a6c48a4
[ "Apache-2.0" ]
null
null
null
from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.ui import Select from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver import Firefox, Chrome, PhantomJS ...
31.58982
99
0.660696
from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support.ui import Select from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.by import By from selenium.webdriver import Firefox, Chrome, PhantomJS ...
true
true
79099e6ddcb0bb37384c99a34d483635c5c5d7c8
8,625
py
Python
zerver/lib/webhooks/git.py
roberthoenig/zulip
5d6724345a8ba4896d21478be2e33e624f8ac8ab
[ "Apache-2.0" ]
null
null
null
zerver/lib/webhooks/git.py
roberthoenig/zulip
5d6724345a8ba4896d21478be2e33e624f8ac8ab
[ "Apache-2.0" ]
null
null
null
zerver/lib/webhooks/git.py
roberthoenig/zulip
5d6724345a8ba4896d21478be2e33e624f8ac8ab
[ "Apache-2.0" ]
null
null
null
from typing import Optional, Any, Dict, List, Text, Tuple from collections import defaultdict SUBJECT_WITH_BRANCH_TEMPLATE = u'{repo} / {branch}' SUBJECT_WITH_PR_OR_ISSUE_INFO_TEMPLATE = u'{repo} / {type} #{id} {title}' EMPTY_SHA = '0000000000000000000000000000000000000000' COMMITS_LIMIT = 20 COMMIT_ROW_TEMPLATE = u'...
39.930556
133
0.704464
from typing import Optional, Any, Dict, List, Text, Tuple from collections import defaultdict SUBJECT_WITH_BRANCH_TEMPLATE = u'{repo} / {branch}' SUBJECT_WITH_PR_OR_ISSUE_INFO_TEMPLATE = u'{repo} / {type} #{id} {title}' EMPTY_SHA = '0000000000000000000000000000000000000000' COMMITS_LIMIT = 20 COMMIT_ROW_TEMPLATE = u'...
true
true
79099f8125584e5a2c15fc98ea5006841518b562
4,026
py
Python
dpipe/batch_iter/utils.py
samokhinv/deep_pipe
9461b02f5f32c3e9f24490619ebccf417979cffc
[ "MIT" ]
38
2017-09-08T04:51:17.000Z
2022-03-29T17:34:22.000Z
dpipe/batch_iter/utils.py
samokhinv/deep_pipe
9461b02f5f32c3e9f24490619ebccf417979cffc
[ "MIT" ]
41
2017-09-29T22:06:21.000Z
2021-12-03T09:31:57.000Z
dpipe/batch_iter/utils.py
samokhinv/deep_pipe
9461b02f5f32c3e9f24490619ebccf417979cffc
[ "MIT" ]
12
2017-09-08T04:40:39.000Z
2021-01-19T19:19:37.000Z
from typing import Callable, Iterable, Sequence import numpy as np from dpipe.im.axes import AxesLike, AxesParams from dpipe.itertools import lmap, squeeze_first from dpipe.im import pad_to_shape def pad_batch_equal(batch, padding_values: AxesParams = 0, ratio: AxesParams = 0.5): """ Pad each element of ``b...
28.757143
115
0.60929
from typing import Callable, Iterable, Sequence import numpy as np from dpipe.im.axes import AxesLike, AxesParams from dpipe.itertools import lmap, squeeze_first from dpipe.im import pad_to_shape def pad_batch_equal(batch, padding_values: AxesParams = 0, ratio: AxesParams = 0.5): max_shapes = np.max(lmap(np.sha...
true
true
7909a11fc479c66853b4ae093eecadc669af2de4
1,429
py
Python
4+Median+of+Two+Sorted+Arrays/alg.py
xiaoh12/leetcode
537e7d2b5b9013ae2e1a9cdda1e1916e77922611
[ "MIT" ]
1
2018-11-21T15:36:12.000Z
2018-11-21T15:36:12.000Z
4+Median+of+Two+Sorted+Arrays/alg.py
xiaoh12/leetcode
537e7d2b5b9013ae2e1a9cdda1e1916e77922611
[ "MIT" ]
null
null
null
4+Median+of+Two+Sorted+Arrays/alg.py
xiaoh12/leetcode
537e7d2b5b9013ae2e1a9cdda1e1916e77922611
[ "MIT" ]
null
null
null
#!/usr/bin/env python #-*- coding: UTF-8 -*- ########################################################################### # # Copyright (c) 2018 www.codingchen.com, Inc. All Rights Reserved # ########################################################################## ''' @brief leetcode algorithm @author chenhui(hui.ch...
29.163265
75
0.46746
true
true
7909a177346599e23a62e0426f9357144afec2af
796
py
Python
desafio/urls.py
NathanMilhomen/vagas
552a1a8fd6d2997b0944774e344df513e99bec2e
[ "MIT" ]
null
null
null
desafio/urls.py
NathanMilhomen/vagas
552a1a8fd6d2997b0944774e344df513e99bec2e
[ "MIT" ]
null
null
null
desafio/urls.py
NathanMilhomen/vagas
552a1a8fd6d2997b0944774e344df513e99bec2e
[ "MIT" ]
null
null
null
"""desafio URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
33.166667
77
0.701005
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), path('', include('vagas.urls')), ]
true
true
7909a17fd3a77c88bc70486bdab1efe7848b5bc8
109
py
Python
nginx-flask/webapp/run.py
simonwuchj/docker-nginx-uwsgi-flask-mysql
cad1c32ff2fd5fbdec498ec7f87244947edeeb33
[ "MIT" ]
1
2021-01-08T12:25:03.000Z
2021-01-08T12:25:03.000Z
nginx-flask/webapp/run.py
simonwuchj/docker-nginx-uwsgi-flask-mysql
cad1c32ff2fd5fbdec498ec7f87244947edeeb33
[ "MIT" ]
null
null
null
nginx-flask/webapp/run.py
simonwuchj/docker-nginx-uwsgi-flask-mysql
cad1c32ff2fd5fbdec498ec7f87244947edeeb33
[ "MIT" ]
null
null
null
from app import create_app app = create_app() if __name__ == '__main__': app.run(debug=True, port=5000)
18.166667
34
0.706422
from app import create_app app = create_app() if __name__ == '__main__': app.run(debug=True, port=5000)
true
true
7909a192ed6b4952cc237a81b3b7ed15f6c0fb61
9,361
py
Python
baselines/a2c/utils.py
zeuseyera/baselines-kr
c9926418d2d8efee21ef20d548366eaaaa193011
[ "MIT" ]
null
null
null
baselines/a2c/utils.py
zeuseyera/baselines-kr
c9926418d2d8efee21ef20d548366eaaaa193011
[ "MIT" ]
null
null
null
baselines/a2c/utils.py
zeuseyera/baselines-kr
c9926418d2d8efee21ef20d548366eaaaa193011
[ "MIT" ]
null
null
null
import os import numpy as np import tensorflow as tf from collections import deque def sample(logits): noise = tf.random_uniform(tf.shape(logits)) return tf.argmax(logits - tf.log(-tf.log(noise)), 1) def cat_entropy(logits): a0 = logits - tf.reduce_max(logits, 1, keepdims=True) ea0 = tf.exp(a0) z...
32.616725
107
0.587651
import os import numpy as np import tensorflow as tf from collections import deque def sample(logits): noise = tf.random_uniform(tf.shape(logits)) return tf.argmax(logits - tf.log(-tf.log(noise)), 1) def cat_entropy(logits): a0 = logits - tf.reduce_max(logits, 1, keepdims=True) ea0 = tf.exp(a0) z...
true
true
7909a42d2071e44e24486848e6edd0deb2ab5d53
4,165
py
Python
jax_cfd/base/time_stepping.py
google/jax-cfd
c28e55eb8f4afcc21a8ab77b7b30b661ad6bba76
[ "Apache-2.0" ]
244
2021-05-18T18:49:14.000Z
2022-03-30T18:27:21.000Z
jax_cfd/base/time_stepping.py
google/jax-cfd
c28e55eb8f4afcc21a8ab77b7b30b661ad6bba76
[ "Apache-2.0" ]
14
2021-06-24T22:15:44.000Z
2022-03-30T06:22:52.000Z
jax_cfd/base/time_stepping.py
google/jax-cfd
c28e55eb8f4afcc21a8ab77b7b30b661ad6bba76
[ "Apache-2.0" ]
36
2021-05-29T09:30:44.000Z
2022-03-28T12:33:40.000Z
# Copyright 2021 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, ...
26.194969
80
0.677791
import dataclasses from typing import Callable, Sequence, TypeVar import jax from jax_cfd.base import tree_math PyTreeState = TypeVar("PyTreeState") TimeStepFn = Callable[[PyTreeState], PyTreeState] class ExplicitNavierStokesODE: def __init__(self, explicit_terms, pressure_projection): self.exp...
true
true
7909a4f4205bf95d34bbc759a08e7b7f13100771
160
py
Python
Mundo 1/Ex04.py
legna7/Python
52e0b642d1b7acc592ec82dd360c5697fb0765db
[ "MIT" ]
null
null
null
Mundo 1/Ex04.py
legna7/Python
52e0b642d1b7acc592ec82dd360c5697fb0765db
[ "MIT" ]
null
null
null
Mundo 1/Ex04.py
legna7/Python
52e0b642d1b7acc592ec82dd360c5697fb0765db
[ "MIT" ]
null
null
null
a = input('Digite algo: ') print(type(a)) print(a.isnumeric()) print(a.capitalize()) print(a.isalnum()) print(a.isdecimal()) print(a.islower()) print(a.upper())
20
26
0.68125
a = input('Digite algo: ') print(type(a)) print(a.isnumeric()) print(a.capitalize()) print(a.isalnum()) print(a.isdecimal()) print(a.islower()) print(a.upper())
true
true
7909a5c38761ef61f6e73713d9934023aa1d6999
104
py
Python
sabueso/protein/show_function.py
dprada/sabueso
14843cf3522b5b89db5b61c1541a7015f114dd53
[ "MIT" ]
null
null
null
sabueso/protein/show_function.py
dprada/sabueso
14843cf3522b5b89db5b61c1541a7015f114dd53
[ "MIT" ]
2
2022-01-31T21:22:17.000Z
2022-02-04T20:20:12.000Z
sabueso/protein/show_function.py
dprada/sabueso
14843cf3522b5b89db5b61c1541a7015f114dd53
[ "MIT" ]
1
2021-07-20T15:01:14.000Z
2021-07-20T15:01:14.000Z
def show_function(protein): from sabueso.entity.protein import get_function_card return card
14.857143
56
0.769231
def show_function(protein): from sabueso.entity.protein import get_function_card return card
true
true
7909a6034f89833d11ab2fff5f398036172680f8
168
py
Python
assignment_3/5.py
gauravjuvekar/ppl
fc5592623fa294c18a6e24444b9e06e2a08b2f6c
[ "WTFPL" ]
null
null
null
assignment_3/5.py
gauravjuvekar/ppl
fc5592623fa294c18a6e24444b9e06e2a08b2f6c
[ "WTFPL" ]
null
null
null
assignment_3/5.py
gauravjuvekar/ppl
fc5592623fa294c18a6e24444b9e06e2a08b2f6c
[ "WTFPL" ]
null
null
null
#!/usr/bin/env python3 # Golfing for the fun of it print('\n'.join(['{:^80}'.format(x)for x in['*']+[' '.join('*'*x)for x in range(3,int(input("Enter depth: "))+2)]]))
42
116
0.577381
print('\n'.join(['{:^80}'.format(x)for x in['*']+[' '.join('*'*x)for x in range(3,int(input("Enter depth: "))+2)]]))
true
true
7909a6a11add20f8ca7192bd012d6cc2891d69f5
2,052
py
Python
resources/tests/test_admin_period_inline.py
HotStew/respa
04f39efb15b4f4206a122e665f8377c7198e1f25
[ "MIT" ]
49
2015-10-21T06:25:31.000Z
2022-03-20T07:24:20.000Z
resources/tests/test_admin_period_inline.py
HotStew/respa
04f39efb15b4f4206a122e665f8377c7198e1f25
[ "MIT" ]
728
2015-06-24T13:26:54.000Z
2022-03-24T12:18:41.000Z
resources/tests/test_admin_period_inline.py
HotStew/respa
04f39efb15b4f4206a122e665f8377c7198e1f25
[ "MIT" ]
46
2015-06-26T10:52:57.000Z
2021-12-17T09:38:25.000Z
# -*- coding: utf-8 -*- from datetime import date, time import pytest from django.contrib.admin import site as admin_site from resources.admin.period_inline import PeriodModelForm, prefix_weekday from resources.models import Period, Resource from resources.models.unit import Unit from resources.tests.utils import ass...
36.642857
104
0.703704
from datetime import date, time import pytest from django.contrib.admin import site as admin_site from resources.admin.period_inline import PeriodModelForm, prefix_weekday from resources.models import Period, Resource from resources.models.unit import Unit from resources.tests.utils import assert_response_contains, ...
true
true
7909a7287c260626bcd39624ff164901fce9b1df
27,184
py
Python
scripts/cinder-consistency.py
DEiselt/openstack-nannies
1349c03ff30ca5abefc46877178bc97d8551ac48
[ "Apache-2.0" ]
null
null
null
scripts/cinder-consistency.py
DEiselt/openstack-nannies
1349c03ff30ca5abefc46877178bc97d8551ac48
[ "Apache-2.0" ]
null
null
null
scripts/cinder-consistency.py
DEiselt/openstack-nannies
1349c03ff30ca5abefc46877178bc97d8551ac48
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2018 SAP SE # 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 # # ...
48.716846
214
0.739038
import argparse import configparser import datetime import logging import os import sys from openstack import connection, exceptions from sqlalchemy import and_, MetaData, select, Table, create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base ...
true
true
7909a789a7ab5367ea1b024bb539ed8e05c99f13
9,981
py
Python
sdk/python/pulumi_azure_nextgen/apimanagement/v20200601preview/api_operation.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/apimanagement/v20200601preview/api_operation.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/apimanagement/v20200601preview/api_operation.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# 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...
47.985577
794
0.660655
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['ApiOperation'] class ApiOperation(pulumi.CustomResource): def __init__(__self__, resourc...
true
true
7909a8382b0dbafadeefa95be20e04969bf424ca
11,198
py
Python
chia/wallet/wallet_puzzle_store.py
santiagoferreira33/mainchia
16917701fd93cebab25bf054cf7c17967052ef2e
[ "Apache-2.0" ]
6
2021-05-21T10:29:32.000Z
2021-07-10T12:51:34.000Z
chia/wallet/wallet_puzzle_store.py
santiagoferreira33/mainchia
16917701fd93cebab25bf054cf7c17967052ef2e
[ "Apache-2.0" ]
28
2021-07-13T21:07:14.000Z
2022-03-29T21:10:38.000Z
chia/wallet/wallet_puzzle_store.py
santiagoferreira33/mainchia
16917701fd93cebab25bf054cf7c17967052ef2e
[ "Apache-2.0" ]
2
2021-05-18T15:33:58.000Z
2021-05-28T21:15:09.000Z
import asyncio import logging from typing import List, Optional, Set, Tuple import aiosqlite from blspy import G1Element from chia.types.blockchain_format.sized_bytes import bytes32 from chia.util.db_wrapper import DBWrapper from chia.util.ints import uint32 from chia.wallet.derivation_record import DerivationRecord ...
32.74269
117
0.59841
import asyncio import logging from typing import List, Optional, Set, Tuple import aiosqlite from blspy import G1Element from chia.types.blockchain_format.sized_bytes import bytes32 from chia.util.db_wrapper import DBWrapper from chia.util.ints import uint32 from chia.wallet.derivation_record import DerivationRecord ...
true
true
7909a898d4e7c6b67303f014f5cd22ed7fddf740
222
py
Python
Hackerrank/Practice/Python/9.erros and exceptions/66.Incorrect Regex.py
kushagra1212/Competitive-Programming
5b68774c617d6abdf1b29893b1b13d47f62161e8
[ "MIT" ]
994
2017-02-28T06:13:47.000Z
2022-03-31T10:49:00.000Z
Hackerrank_python/9.erros and exceptions/66.Incorrect Regex.py
devesh17m/Competitive-Programming
2d459dc8dc5ac628d94700b739988b0ea364cb71
[ "MIT" ]
16
2018-01-01T02:59:55.000Z
2021-11-22T12:49:16.000Z
Hackerrank_python/9.erros and exceptions/66.Incorrect Regex.py
devesh17m/Competitive-Programming
2d459dc8dc5ac628d94700b739988b0ea364cb71
[ "MIT" ]
325
2017-06-15T03:32:43.000Z
2022-03-28T22:43:42.000Z
# Enter your code here. Read input from STDIN. Print output to STOUT import re for _ in range(int(input())): try: re.compile(input()) print (True) except re.error: print (False)
24.666667
69
0.581081
import re for _ in range(int(input())): try: re.compile(input()) print (True) except re.error: print (False)
true
true
7909aa1b8c84fa1900a1c97151d4010a8dc7ab22
2,563
py
Python
main.py
imgVOID/autograding-api
7c2f5491607d5d76880827c73565f9f5be5a33ad
[ "Apache-2.0" ]
5
2021-11-08T18:55:09.000Z
2022-02-27T19:14:35.000Z
main.py
imgVOID/autograde-py
7c2f5491607d5d76880827c73565f9f5be5a33ad
[ "Apache-2.0" ]
null
null
null
main.py
imgVOID/autograde-py
7c2f5491607d5d76880827c73565f9f5be5a33ad
[ "Apache-2.0" ]
2
2021-12-23T05:11:31.000Z
2021-12-26T13:42:21.000Z
from os.path import dirname, abspath from datetime import timedelta from fastapi import FastAPI, Depends, HTTPException, status from fastapi.security import OAuth2PasswordRequestForm from slowapi import _rate_limit_exceeded_handler from slowapi.errors import RateLimitExceeded from routers.tasks import router_tasks fro...
36.098592
84
0.730784
from os.path import dirname, abspath from datetime import timedelta from fastapi import FastAPI, Depends, HTTPException, status from fastapi.security import OAuth2PasswordRequestForm from slowapi import _rate_limit_exceeded_handler from slowapi.errors import RateLimitExceeded from routers.tasks import router_tasks fro...
true
true
7909ab951053c7b14daa53e38a7864549876e9d8
791
py
Python
2020/01/test.py
mr-bigbang/advent-of-code
5fa0f78c70b10c66e516b21c08335e63e71d9e95
[ "MIT" ]
null
null
null
2020/01/test.py
mr-bigbang/advent-of-code
5fa0f78c70b10c66e516b21c08335e63e71d9e95
[ "MIT" ]
2
2020-12-04T00:58:16.000Z
2020-12-05T21:08:59.000Z
2020/01/test.py
mr-bigbang/advent-of-code
5fa0f78c70b10c66e516b21c08335e63e71d9e95
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- import unittest import code class TestDay01(unittest.TestCase): # Part 01 def test_example01(self): expense_report = [1721, 299] expected = 514579 result = code.part01(expense_report) self.assertEqual(result, expected) # Do...
23.264706
44
0.635904
import unittest import code class TestDay01(unittest.TestCase): def test_example01(self): expense_report = [1721, 299] expected = 514579 result = code.part01(expense_report) self.assertEqual(result, expected) def test_duplicate(self): expense_report = [101...
true
true
7909ab9ab3d311bc36162af2d7c7d570e8554468
89
py
Python
ytvideo/apps.py
LSM2016/Bilibili-
21ab048d18c790b531cddb63129ef41a0ffecb4d
[ "MIT" ]
1
2021-03-18T05:55:33.000Z
2021-03-18T05:55:33.000Z
ytvideo/apps.py
LSM2016/Bilibili-
21ab048d18c790b531cddb63129ef41a0ffecb4d
[ "MIT" ]
null
null
null
ytvideo/apps.py
LSM2016/Bilibili-
21ab048d18c790b531cddb63129ef41a0ffecb4d
[ "MIT" ]
null
null
null
from django.apps import AppConfig class YtvideoConfig(AppConfig): name = 'ytvideo'
14.833333
33
0.752809
from django.apps import AppConfig class YtvideoConfig(AppConfig): name = 'ytvideo'
true
true
7909abc5d934bd1954bab11cdca70fa396622b8f
25,852
py
Python
app/modules/users/models.py
karenc/houston
4eaaaf11d61394035e34b55bb847ea7eb4099c61
[ "Apache-2.0" ]
null
null
null
app/modules/users/models.py
karenc/houston
4eaaaf11d61394035e34b55bb847ea7eb4099c61
[ "Apache-2.0" ]
2
2021-03-16T20:28:06.000Z
2021-03-29T15:54:11.000Z
app/modules/users/models.py
karenc/houston
4eaaaf11d61394035e34b55bb847ea7eb4099c61
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ User database models -------------------- """ import enum import logging import uuid from flask import current_app from sqlalchemy_utils import types as column_types from flask_login import current_user # NOQA from app.extensions import db, FeatherModel from app.extensions.auth import sec...
34.561497
112
0.609005
import enum import logging import uuid from flask import current_app from sqlalchemy_utils import types as column_types from flask_login import current_user from app.extensions import db, FeatherModel from app.extensions.auth import security from app.extensions.edm import EDMObjectMixin from app.extensions.api.par...
true
true
7909abdb3aa096b054ad176300e4c289d51afb9c
3,036
py
Python
multitask_benchmark/train/mpnn.py
Michaelvll/pna
45828fb6d7299f212c230b35b00850883c584457
[ "MIT" ]
249
2020-04-14T08:43:58.000Z
2022-03-27T01:14:44.000Z
multitask_benchmark/train/mpnn.py
KonstantinKlepikov/pna
45828fb6d7299f212c230b35b00850883c584457
[ "MIT" ]
12
2020-04-16T10:15:27.000Z
2022-03-22T21:43:04.000Z
multitask_benchmark/train/mpnn.py
KonstantinKlepikov/pna
45828fb6d7299f212c230b35b00850883c584457
[ "MIT" ]
42
2020-04-14T23:10:57.000Z
2022-02-25T09:02:29.000Z
from __future__ import division from __future__ import print_function from models.pytorch.pna.layer import PNALayer from multitask_benchmark.util.train import execute_train, build_arg_parser # Training settings parser = build_arg_parser() parser.add_argument('--self_loop', action='store_true', default=False, help='Wh...
60.72
119
0.452899
from __future__ import division from __future__ import print_function from models.pytorch.pna.layer import PNALayer from multitask_benchmark.util.train import execute_train, build_arg_parser parser = build_arg_parser() parser.add_argument('--self_loop', action='store_true', default=False, help='Whether to add self l...
true
true
7909abdd20008c00b8dd3490e556423a1825818c
265
py
Python
setup.py
hisashim/pyxsltp
647c939921328b5e46c8d1f5262f14c037abf3f4
[ "MIT" ]
null
null
null
setup.py
hisashim/pyxsltp
647c939921328b5e46c8d1f5262f14c037abf3f4
[ "MIT" ]
null
null
null
setup.py
hisashim/pyxsltp
647c939921328b5e46c8d1f5262f14c037abf3f4
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import sys sys.dont_write_bytecode=True from distutils.core import setup from pyxsltp import __version__ setup( name = "pyxsltp", version = __version__, py_modules = ['pyxsltp'], scripts = ['pyxsltp'], )
16.5625
32
0.671698
import sys sys.dont_write_bytecode=True from distutils.core import setup from pyxsltp import __version__ setup( name = "pyxsltp", version = __version__, py_modules = ['pyxsltp'], scripts = ['pyxsltp'], )
true
true
7909ac6ebed762c73ef81e2e2fbf36179641e940
1,142
py
Python
Particle-On-Potential-MC-sampling/Run_MuellerBrownPotential-WithMetaD.py
valsson/MD-MC-Codes-2016
b1e5438313fe6fec7c1bbc8fb8ea979ce964f7dc
[ "MIT" ]
3
2016-09-30T15:27:16.000Z
2020-12-27T02:51:35.000Z
Particle-On-Potential-MC-sampling/Run_MuellerBrownPotential-WithMetaD.py
valsson/MD-MC-Codes-2016
b1e5438313fe6fec7c1bbc8fb8ea979ce964f7dc
[ "MIT" ]
null
null
null
Particle-On-Potential-MC-sampling/Run_MuellerBrownPotential-WithMetaD.py
valsson/MD-MC-Codes-2016
b1e5438313fe6fec7c1bbc8fb8ea979ce964f7dc
[ "MIT" ]
1
2020-12-27T02:51:37.000Z
2020-12-27T02:51:37.000Z
import numpy as np import time import matplotlib.pyplot as plt from MuellerBrownPotential import MuellerBrownPotential from LogExpOfHarmonicWellsPotential import LogExpOfHarmonicWellsPotential from MonteCarloSimulator import MonteCarloSimulator from MetadynamicsBias import MetadynamicsBias T = 1.0 NumMCmoves = 10000 ...
23.791667
73
0.718914
import numpy as np import time import matplotlib.pyplot as plt from MuellerBrownPotential import MuellerBrownPotential from LogExpOfHarmonicWellsPotential import LogExpOfHarmonicWellsPotential from MonteCarloSimulator import MonteCarloSimulator from MetadynamicsBias import MetadynamicsBias T = 1.0 NumMCmoves = 10000 ...
false
true
7909ad6158304323711973e33fe4175537cf42ae
7,969
py
Python
nautobot/core/runner/runner.py
jtschichold/nautobot
71c61cbbd23301111c281ed1d908a026ea2e4e07
[ "Apache-2.0" ]
1
2022-01-11T10:33:50.000Z
2022-01-11T10:33:50.000Z
nautobot/core/runner/runner.py
jtschichold/nautobot
71c61cbbd23301111c281ed1d908a026ea2e4e07
[ "Apache-2.0" ]
null
null
null
nautobot/core/runner/runner.py
jtschichold/nautobot
71c61cbbd23301111c281ed1d908a026ea2e4e07
[ "Apache-2.0" ]
null
null
null
""" logan.runner ~~~~~~~~~~~~ :copyright: (c) 2012 David Cramer. :license: Apache License 2.0, see NOTICE for more details. """ import argparse import os import re import sys from django.core import management from nautobot import __version__ from . import importer from .settings import create_default_settings __...
29.083942
119
0.651148
import argparse import os import re import sys from django.core import management from nautobot import __version__ from . import importer from .settings import create_default_settings __configured = False def sanitize_name(project): project = project.replace(" ", "-") return re.sub("[^A-Z0-9a-z_-]", "-",...
true
true
7909af8d6a7f5a564ddb44af1fea43bf16529228
1,919
py
Python
data_ops.py
samiulshuvo/se_relativisticgan
5501c4d96faa03eb3c1fd776b232b68940183f4d
[ "MIT" ]
55
2019-02-17T11:40:22.000Z
2022-03-30T10:10:00.000Z
data_ops.py
samiulshuvo/se_relativisticgan
5501c4d96faa03eb3c1fd776b232b68940183f4d
[ "MIT" ]
14
2019-02-17T11:47:12.000Z
2021-03-21T11:15:14.000Z
data_ops.py
deepakbaby/se_relativisticgan
5501c4d96faa03eb3c1fd776b232b68940183f4d
[ "MIT" ]
18
2018-11-03T15:05:10.000Z
2022-01-12T03:46:30.000Z
""" Data processing routines Deepak Baby, UGent, June 2018 deepak.baby@ugent.be """ import numpy as np def reconstruct_wav(wavmat, stride_factor=0.5): """ Reconstructs the audiofile from sliced matrix wavmat """ window_length = wavmat.shape[1] window_stride = int(stride_factor * window_length) wav_length ...
29.075758
68
0.642522
import numpy as np def reconstruct_wav(wavmat, stride_factor=0.5): window_length = wavmat.shape[1] window_stride = int(stride_factor * window_length) wav_length = (wavmat.shape[0] -1 ) * window_stride + window_length wav_recon = np.zeros((1,wav_length)) for k in range (wavmat.shape[0]): wav_beg = k *...
true
true
7909b0835b03ed2a02876ab4ba46c2114932bbe2
571
py
Python
src/name_collect.py
StrinTH/DrHelp
76cdcd549f6c8ad6315e5c4557793c622a833c6a
[ "MIT" ]
1
2021-12-02T15:04:08.000Z
2021-12-02T15:04:08.000Z
src/name_collect.py
StrinTH/DrHelp
76cdcd549f6c8ad6315e5c4557793c622a833c6a
[ "MIT" ]
null
null
null
src/name_collect.py
StrinTH/DrHelp
76cdcd549f6c8ad6315e5c4557793c622a833c6a
[ "MIT" ]
1
2021-12-02T15:04:09.000Z
2021-12-02T15:04:09.000Z
from soup import soup_collector def name_collector(spl_id, spl_type): soup = soup_collector(spl_id, spl_type) sample_info_type = soup.findAll('a') #unwanted till now START try: sample_info_name1 = sample_info_type[0].get('name').split('_')[1].strip() sample_info_name2 = sample_info...
33.588235
81
0.677758
from soup import soup_collector def name_collector(spl_id, spl_type): soup = soup_collector(spl_id, spl_type) sample_info_type = soup.findAll('a') try: sample_info_name1 = sample_info_type[0].get('name').split('_')[1].strip() sample_info_name2 = sample_info_type[0].get('name').spl...
true
true
7909b0e5bf3a815a35845be4461c057339225a5f
2,030
py
Python
src/sequencer_osx/sequencer_osx.py
NFJones/python-midi
baf306104e993286cce8cff912736459e9f880ee
[ "MIT" ]
1
2021-09-07T12:34:35.000Z
2021-09-07T12:34:35.000Z
src/sequencer_osx/sequencer_osx.py
NFJones/python-midi
baf306104e993286cce8cff912736459e9f880ee
[ "MIT" ]
null
null
null
src/sequencer_osx/sequencer_osx.py
NFJones/python-midi
baf306104e993286cce8cff912736459e9f880ee
[ "MIT" ]
null
null
null
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.31 # # Don't modify this file, modify the SWIG interface instead. # This file is compatible with both classic and new-style classes. import _sequencer_osx import new new_instancemethod = new.instancemethod try: _swig_property = p...
26.025641
70
0.698522
# This file is compatible with both classic and new-style classes. import _sequencer_osx import new new_instancemethod = new.instancemethod try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self, class_type, name, value, static=1)...
true
true
7909b180475865b79fdf49655ea6e1c4768a2cbd
4,436
py
Python
management_layer/metrics.py
hedleyroos/core-management-layer
2a25bf5fb44fd511b8b2626ec09a4bc05098334c
[ "BSD-3-Clause" ]
null
null
null
management_layer/metrics.py
hedleyroos/core-management-layer
2a25bf5fb44fd511b8b2626ec09a4bc05098334c
[ "BSD-3-Clause" ]
90
2018-01-23T10:30:01.000Z
2019-01-31T10:53:42.000Z
management_layer/metrics.py
hedleyroos/core-management-layer
2a25bf5fb44fd511b8b2626ec09a4bc05098334c
[ "BSD-3-Clause" ]
1
2021-08-17T14:16:23.000Z
2021-08-17T14:16:23.000Z
import asyncio import functools import logging from types import FunctionType, ModuleType from typing import Type from prometheus_client import Histogram, Counter logger = logging.getLogger(__name__) H = Histogram(f"management_layer_call_duration_seconds", "API call duration (s)", ["call"]) def _prom...
38.241379
97
0.656673
import asyncio import functools import logging from types import FunctionType, ModuleType from typing import Type from prometheus_client import Histogram, Counter logger = logging.getLogger(__name__) H = Histogram(f"management_layer_call_duration_seconds", "API call duration (s)", ["call"]) def _prom...
true
true
7909b19a066340a1529eebfe78168bc8bd103b80
2,079
py
Python
pycad/web.py
CaptObvious/PyCAD
faf143798cbf6ffb4d6808681687a587d7b922a7
[ "WTFPL" ]
null
null
null
pycad/web.py
CaptObvious/PyCAD
faf143798cbf6ffb4d6808681687a587d7b922a7
[ "WTFPL" ]
null
null
null
pycad/web.py
CaptObvious/PyCAD
faf143798cbf6ffb4d6808681687a587d7b922a7
[ "WTFPL" ]
null
null
null
import json import re from flask import g, redirect, send_file, session from flask_openid import OpenID from flask_session import Session import pycad.controllers as controllers import pycad.models as models import pycad.schemas as schemas from pycad import app from pycad.config import config STEAM_ID_R...
24.458824
110
0.655604
import json import re from flask import g, redirect, send_file, session from flask_openid import OpenID from flask_session import Session import pycad.controllers as controllers import pycad.models as models import pycad.schemas as schemas from pycad import app from pycad.config import config STEAM_ID_R...
true
true
7909b229c2c15bce6eb24f4deac67c97ce8d66dd
1,861
py
Python
Python/shutdown.py
gwyatt40/Engineering_4_Notebook
9925b8290b61c143918ad1c1a9eeeccc368dd83a
[ "CNRI-Python", "Xnet", "Info-ZIP", "X11" ]
null
null
null
Python/shutdown.py
gwyatt40/Engineering_4_Notebook
9925b8290b61c143918ad1c1a9eeeccc368dd83a
[ "CNRI-Python", "Xnet", "Info-ZIP", "X11" ]
null
null
null
Python/shutdown.py
gwyatt40/Engineering_4_Notebook
9925b8290b61c143918ad1c1a9eeeccc368dd83a
[ "CNRI-Python", "Xnet", "Info-ZIP", "X11" ]
null
null
null
# import time and GPIO import time import RPi.GPIO as GPIO # set pin reset_shutdown_pin = 18 # changed from original pin # suppress warnings GPIO.setwarnings(False) # GPIO Mode for pin numbers GPIO.setmode(GPIO.BCM) # use internal pull up resistor GPIO.setup(reset_shutdown_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) #...
35.113208
82
0.670607
import time import RPi.GPIO as GPIO reset_shutdown_pin = 18 GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) GPIO.setup(reset_shutdown_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) def restart(): print("restarting Pi") command = "/usr/bin/sudo /sbin/shutdown -r now" import subprocess process = subproces...
false
true
7909b25e555d9147a186e2a33ff0ab82fd77802b
951
py
Python
cowait/utils/version.py
ProgHaj/cowait
e95c30faab8caf8b0413de4e1784529a3a06475d
[ "Apache-2.0" ]
2
2021-08-11T08:51:42.000Z
2021-08-11T08:55:19.000Z
cowait/utils/version.py
ProgHaj/cowait
e95c30faab8caf8b0413de4e1784529a3a06475d
[ "Apache-2.0" ]
null
null
null
cowait/utils/version.py
ProgHaj/cowait
e95c30faab8caf8b0413de4e1784529a3a06475d
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import re import pkg_resources VERSION_FORMAT = re.compile('([0-9]+)\\.([0-9]+)\\.([0-9]+)') class Version(object): def __init__(self, major: int, minor: int, revision: int): self.major = major self.minor = minor self.revision = revision def __str__...
26.416667
69
0.624606
from __future__ import annotations import re import pkg_resources VERSION_FORMAT = re.compile('([0-9]+)\\.([0-9]+)\\.([0-9]+)') class Version(object): def __init__(self, major: int, minor: int, revision: int): self.major = major self.minor = minor self.revision = revision def __str__...
true
true
7909b318d3d5b680fe11b41753618c7279e8ab33
21,334
py
Python
src/oci/jms/models/jre_usage.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/jms/models/jre_usage.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/jms/models/jre_usage.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
34.465267
245
0.662089
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class JreUsage(object): SECURITY_STATUS_UNKNOWN = "UNKNOWN" SECURITY_STATUS_UP_TO_DATE = "UP_TO_DATE" ...
true
true
7909b3419825cedff9c3e7e1130631d52fa8e9a6
1,150
py
Python
selection/layers/utils.py
icc2115/dl-selection
e39ef0e73bf631e413bac48db791aed617dd7e32
[ "MIT" ]
8
2021-03-08T08:46:23.000Z
2022-02-28T12:19:50.000Z
selection/layers/utils.py
icc2115/dl-selection
e39ef0e73bf631e413bac48db791aed617dd7e32
[ "MIT" ]
null
null
null
selection/layers/utils.py
icc2115/dl-selection
e39ef0e73bf631e413bac48db791aed617dd7e32
[ "MIT" ]
2
2021-04-18T08:24:16.000Z
2022-02-28T12:19:54.000Z
import torch import torch.nn.functional as F def clamp_probs(probs): eps = torch.finfo(probs.dtype).eps return torch.clamp(probs, min=eps, max=1-eps) def concrete_sample(logits, temperature, shape=torch.Size([])): ''' Sampling for Concrete distribution. See Eq. 10 of Maddison et al., 2017. '...
34.848485
75
0.643478
import torch import torch.nn.functional as F def clamp_probs(probs): eps = torch.finfo(probs.dtype).eps return torch.clamp(probs, min=eps, max=1-eps) def concrete_sample(logits, temperature, shape=torch.Size([])): uniform_shape = torch.Size(shape) + logits.shape u = clamp_probs(torch.rand(uniform_sha...
true
true
7909b601f941d8b4ac0f27ce0115d87f03f7ac93
18
py
Python
tridesclous/version.py
caniko/tridesclous
9f412a42697561e3c7d8e3a35249cd13240239a0
[ "MIT" ]
36
2016-01-27T22:27:12.000Z
2022-01-28T08:49:27.000Z
tridesclous/version.py
caniko/tridesclous
9f412a42697561e3c7d8e3a35249cd13240239a0
[ "MIT" ]
87
2015-12-14T08:16:16.000Z
2022-03-22T14:35:55.000Z
tridesclous/version.py
caniko/tridesclous
9f412a42697561e3c7d8e3a35249cd13240239a0
[ "MIT" ]
31
2015-11-10T14:37:28.000Z
2022-03-30T06:41:19.000Z
version = '1.6.4'
9
17
0.555556
version = '1.6.4'
true
true
7909b6a057cc685593eb5e717d4c920f4ad95040
1,354
py
Python
src/m1r_functions.py
ColinBalitewicz/03-AccumulatorsAndFunctionsWithParameters
fd7be18090b7b472cd181ad855032805da2f9cb7
[ "MIT" ]
null
null
null
src/m1r_functions.py
ColinBalitewicz/03-AccumulatorsAndFunctionsWithParameters
fd7be18090b7b472cd181ad855032805da2f9cb7
[ "MIT" ]
null
null
null
src/m1r_functions.py
ColinBalitewicz/03-AccumulatorsAndFunctionsWithParameters
fd7be18090b7b472cd181ad855032805da2f9cb7
[ "MIT" ]
null
null
null
############################################################################### # # DONE: # # 1. READ the code below. # 2. TRACE (by hand) the execution of the code, # predicting what will get printed. # 3. Run the code and compare your prediction to what actually was printed. # 4. Decide whether you are...
28.808511
79
0.5
true
true
7909b772e038b647505e7007add8a614faaecd7e
14,656
py
Python
tutorials/image/cifar10/cifar10.py
blahster/tf-models
eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c
[ "Apache-2.0" ]
443
2017-11-15T15:26:44.000Z
2019-05-06T11:08:20.000Z
tutorials/image/cifar10/cifar10.py
blahster/tf-models
eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c
[ "Apache-2.0" ]
46
2017-11-22T15:27:58.000Z
2019-04-29T02:53:30.000Z
tutorials/image/cifar10/cifar10.py
blahster/tf-models
eaa4a000ef8e5f094764c42a590bb1c49b7b6f7c
[ "Apache-2.0" ]
177
2017-11-16T10:46:44.000Z
2019-04-22T12:37:37.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
36.64
81
0.683816
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import re import sys import tarfile from six.moves import urllib import tensorflow as tf import cifar10_input FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_integer('batch_size', ...
true
true
7909bb858eccad7af1a2b8501e8ca2b651ca5d17
3,931
py
Python
py/lib/jumpplus_downloader.py
Lutwidse/jumpplus-downloader
e6c466ca90dda41e9e265b41b7e75c545e6ed9c8
[ "MIT" ]
null
null
null
py/lib/jumpplus_downloader.py
Lutwidse/jumpplus-downloader
e6c466ca90dda41e9e265b41b7e75c545e6ed9c8
[ "MIT" ]
null
null
null
py/lib/jumpplus_downloader.py
Lutwidse/jumpplus-downloader
e6c466ca90dda41e9e265b41b7e75c545e6ed9c8
[ "MIT" ]
null
null
null
import requests, json, os, time from PIL import Image from io import BytesIO import img2pdf class jumpplus_downloader: def __init__(self): self.file=0 self.h=1200 self.w=760 def auto_list_download(self, url, next=False, sleeptime=20,pdfConversion=True): self.json_download(url) ...
35.414414
159
0.583821
import requests, json, os, time from PIL import Image from io import BytesIO import img2pdf class jumpplus_downloader: def __init__(self): self.file=0 self.h=1200 self.w=760 def auto_list_download(self, url, next=False, sleeptime=20,pdfConversion=True): self.json_download(url) ...
true
true
7909bc5935c7986764219a514137459e4a7165df
1,094
py
Python
config.py
AnnabelNkir/My_Hello_World
6e37b4a90ce69a589444a66c8db5b261b75a9db1
[ "Unlicense" ]
null
null
null
config.py
AnnabelNkir/My_Hello_World
6e37b4a90ce69a589444a66c8db5b261b75a9db1
[ "Unlicense" ]
null
null
null
config.py
AnnabelNkir/My_Hello_World
6e37b4a90ce69a589444a66c8db5b261b75a9db1
[ "Unlicense" ]
null
null
null
import os class Config: SECRET_KEY = os.environ.get('SECRET_KEY') SQLALCHEMY_TRACK_MODIFICATIONS = False UPLOADED_PHOTOS_DEST = 'app/static/photos' # email configurations MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get("MAIL_USER...
22.791667
100
0.707495
import os class Config: SECRET_KEY = os.environ.get('SECRET_KEY') SQLALCHEMY_TRACK_MODIFICATIONS = False UPLOADED_PHOTOS_DEST = 'app/static/photos' MAIL_SERVER = 'smtp.googlemail.com' MAIL_PORT = 587 MAIL_USE_TLS = True MAIL_USERNAME = os.environ.get("MAIL_USERNAME") MAIL_PASSWOR...
true
true
7909bcb785a9dae468718714a34bf72a9f4ab3ae
92
py
Python
2015/03/quiz-ace/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
14
2015-05-08T13:41:51.000Z
2021-02-24T12:34:55.000Z
2015/03/quiz-ace/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
null
null
null
2015/03/quiz-ace/graphic_config.py
nprapps/graphics-archive
97b0ef326b46a959df930f5522d325e537f7a655
[ "FSFAP" ]
7
2015-04-04T04:45:54.000Z
2021-02-18T11:12:48.000Z
#!/usr/bin/env python COPY_GOOGLE_DOC_KEY = '1mORX04vNiG06X52RdbbdBBZ9RSu4cV3ak9a0jamvjW0'
23
68
0.847826
COPY_GOOGLE_DOC_KEY = '1mORX04vNiG06X52RdbbdBBZ9RSu4cV3ak9a0jamvjW0'
true
true
7909bccdc0b40c2892adeab78b7ea3435524e54d
8,126
py
Python
cotyledon/_service.py
y-gupta/cotyledon
319faa2673a986733d9a7622bee29e187f2e7391
[ "Apache-2.0" ]
71
2016-11-14T15:02:41.000Z
2022-02-20T06:41:59.000Z
cotyledon/_service.py
y-gupta/cotyledon
319faa2673a986733d9a7622bee29e187f2e7391
[ "Apache-2.0" ]
26
2016-07-14T13:42:15.000Z
2022-03-18T07:03:39.000Z
cotyledon/_service.py
y-gupta/cotyledon
319faa2673a986733d9a7622bee29e187f2e7391
[ "Apache-2.0" ]
17
2016-05-02T15:48:42.000Z
2021-11-24T15:26:08.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
33.303279
81
0.629461
import logging import os import random import signal import sys import threading from cotyledon import _utils LOG = logging.getLogger(__name__) class Service(object): name = None graceful_shutdown_timeout = None def __init__(self, worker_id): super(Service, self).__init__() ...
true
true
7909bdef63b6b3ecf9529a20f73e40e5fcec6b6d
2,304
py
Python
h/util/db.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
null
null
null
h/util/db.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
null
null
null
h/util/db.py
tgiardina/rpp-h
fece590f901b052a59c19a24acfeba52cee33c84
[ "BSD-2-Clause" ]
null
null
null
from functools import lru_cache import sqlalchemy class lru_cache_in_transaction: # noqa: N801 """ Decorator to wrap a function with a memoizing callable that saves up to the `maxsize` most recent calls. The underlying cache is automatically cleared at the end of the database transaction. Since...
31.135135
90
0.676215
from functools import lru_cache import sqlalchemy class lru_cache_in_transaction: def __init__(self, session, maxsize=128, typed=False): self._session = session self._maxsize = maxsize self._typed = typed def __call__(self, func): decorator = lru_cache(maxsize=self._maxsiz...
true
true
7909c13ed17cdeeb071b18dbf3357bd20509b0a0
1,158
py
Python
great_international/migrations/0005_internationalukhqpages.py
kaedroho/dit-directory-cms
67c15eeed19e7b3583f1fce1969230ddf83b6813
[ "MIT" ]
6
2018-03-20T11:19:07.000Z
2021-10-05T07:53:11.000Z
great_international/migrations/0005_internationalukhqpages.py
kaedroho/dit-directory-cms
67c15eeed19e7b3583f1fce1969230ddf83b6813
[ "MIT" ]
802
2018-02-05T14:16:13.000Z
2022-02-10T10:59:21.000Z
great_international/migrations/0005_internationalukhqpages.py
kaedroho/dit-directory-cms
67c15eeed19e7b3583f1fce1969230ddf83b6813
[ "MIT" ]
6
2019-01-22T13:19:37.000Z
2019-07-01T10:35:26.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-02-12 11:43 from __future__ import unicode_literals import core.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'),...
38.6
285
0.645941
from __future__ import unicode_literals import core.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0040_page_draft_title'), ('great_international', '0004_merge_20190212_1003'), ] ...
true
true
7909c154f27799067353744113dbc182d0e307d3
12,731
py
Python
conductor/conductor/solver/optimizer/optimizer.py
aalsudais/optf-has
c3e070b6ebc713a571c10d7a5cd87e5053047136
[ "Apache-2.0" ]
null
null
null
conductor/conductor/solver/optimizer/optimizer.py
aalsudais/optf-has
c3e070b6ebc713a571c10d7a5cd87e5053047136
[ "Apache-2.0" ]
null
null
null
conductor/conductor/solver/optimizer/optimizer.py
aalsudais/optf-has
c3e070b6ebc713a571c10d7a5cd87e5053047136
[ "Apache-2.0" ]
null
null
null
# # ------------------------------------------------------------------------- # Copyright (c) 2015-2017 AT&T Intellectual Property # # 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 # # ...
44.513986
120
0.562093
from oslo_config import cfg from oslo_log import log import copy import time from conductor import service from conductor.solver.optimizer import fit_first from conductor.solver.optimizer import random_pick from conductor.solver.request import demand from conductor.solver.triage_tool.triage_data ...
true
true
7909c1b5f43eb4ec1ea4c09b60122f8dce395a43
147
py
Python
hhcms/apps/account/tests.py
youngershen/hhcms
748bfcaaf250584b2b7233f271644ca33f8ff80b
[ "MIT" ]
null
null
null
hhcms/apps/account/tests.py
youngershen/hhcms
748bfcaaf250584b2b7233f271644ca33f8ff80b
[ "MIT" ]
null
null
null
hhcms/apps/account/tests.py
youngershen/hhcms
748bfcaaf250584b2b7233f271644ca33f8ff80b
[ "MIT" ]
1
2018-07-15T05:33:34.000Z
2018-07-15T05:33:34.000Z
from django.test import TestCase # Create your tests here. class Account(TestCase): def test_register(self): self.assertTrue(True)
14.7
32
0.714286
from django.test import TestCase class Account(TestCase): def test_register(self): self.assertTrue(True)
true
true
7909c1f371a4e74a39785fb31956682f9faa2871
16,126
py
Python
mayan/apps/document_states/tests/test_workflow_transition_views.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
2
2021-09-12T19:41:19.000Z
2021-09-12T19:41:20.000Z
mayan/apps/document_states/tests/test_workflow_transition_views.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
37
2021-09-13T01:00:12.000Z
2021-10-02T03:54:30.000Z
mayan/apps/document_states/tests/test_workflow_transition_views.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
1
2021-09-22T13:17:30.000Z
2021-09-22T13:17:30.000Z
from mayan.apps.documents.tests.base import GenericDocumentViewTestCase from mayan.apps.testing.tests.base import GenericViewTestCase from ..events import event_workflow_template_edited from ..models import WorkflowTransition from ..permissions import ( permission_workflow_template_edit, permission_workflow_...
38.21327
105
0.708483
from mayan.apps.documents.tests.base import GenericDocumentViewTestCase from mayan.apps.testing.tests.base import GenericViewTestCase from ..events import event_workflow_template_edited from ..models import WorkflowTransition from ..permissions import ( permission_workflow_template_edit, permission_workflow_...
true
true
7909c29c35d849d451c85ed206bcb40b5bd17018
2,156
py
Python
sdb/commands/zfs/internal/__init__.py
cneira/sdb
3e6c69ab6ab498204aa4a66ea985a61ea1d2f12a
[ "Apache-2.0" ]
47
2019-08-21T23:27:41.000Z
2021-11-21T03:13:27.000Z
sdb/commands/zfs/internal/__init__.py
cneira/sdb
3e6c69ab6ab498204aa4a66ea985a61ea1d2f12a
[ "Apache-2.0" ]
228
2019-08-21T20:13:24.000Z
2022-02-01T04:42:20.000Z
sdb/commands/zfs/internal/__init__.py
cneira/sdb
3e6c69ab6ab498204aa4a66ea985a61ea1d2f12a
[ "Apache-2.0" ]
22
2019-08-23T20:17:53.000Z
2022-02-03T12:44:53.000Z
# # Copyright 2019 Delphix # # 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, so...
29.534247
77
0.674397
import os import drgn import sdb def enum_lookup(enum_type_name: str, value: int) -> str: fields = sdb.get_type(enum_type_name).type.enumerators enum_string: str = fields[value].name prefix = os.path.commonprefix([f[0] for f in fields]) return enum_string[prefix.rfind("_") + 1:] d...
true
true
7909c50b0b308c2834eb338e5909cd9e5b9467d1
5,527
py
Python
07-AdventOfCode2021/18/day-18.py
StrangeGirlMurph/CodingProjects
8400a610c0a54a2721a73824df7aab4e92ec891d
[ "MIT" ]
null
null
null
07-AdventOfCode2021/18/day-18.py
StrangeGirlMurph/CodingProjects
8400a610c0a54a2721a73824df7aab4e92ec891d
[ "MIT" ]
null
null
null
07-AdventOfCode2021/18/day-18.py
StrangeGirlMurph/CodingProjects
8400a610c0a54a2721a73824df7aab4e92ec891d
[ "MIT" ]
null
null
null
import ast import math import copy with open('input.txt', 'r') as f: lines = f.readlines() lines = [line[:-1] for line in lines] lines = [ast.literal_eval(line) for line in lines] def reduce(num): explodeCriteriaMet = True splitCriteriaMet = True while explodeCriteriaMet or splitCriteriaMet: ...
29.089474
123
0.486159
import ast import math import copy with open('input.txt', 'r') as f: lines = f.readlines() lines = [line[:-1] for line in lines] lines = [ast.literal_eval(line) for line in lines] def reduce(num): explodeCriteriaMet = True splitCriteriaMet = True while explodeCriteriaMet or splitCriteriaMet: ...
true
true
7909c52ea6bc126a74a6e80ca330265aae3cdf15
4,281
py
Python
braindecode/samplers/ssl.py
lapaill/braindecode
d5d6e34baef1c8df092e77d1f3e757b53d0e69ea
[ "BSD-3-Clause" ]
301
2020-01-15T16:40:59.000Z
2022-03-31T05:28:00.000Z
braindecode/samplers/ssl.py
Mrswolf/braindecode
d1781c465239c45eccbf5f92e7d7a627ff985e16
[ "BSD-3-Clause" ]
325
2020-01-12T21:36:55.000Z
2022-03-21T11:59:01.000Z
braindecode/samplers/ssl.py
Mrswolf/braindecode
d1781c465239c45eccbf5f92e7d7a627ff985e16
[ "BSD-3-Clause" ]
98
2020-01-12T21:22:42.000Z
2022-03-24T14:36:08.000Z
""" Self-supervised learning samplers. """ # Authors: Hubert Banville <hubert.jbanville@gmail.com> # # License: BSD (3-clause) import numpy as np from . import RecordingSampler class RelativePositioningSampler(RecordingSampler): """Sample examples for the relative positioning task from [Banville2020]_. Sa...
35.97479
79
0.605466
import numpy as np from . import RecordingSampler class RelativePositioningSampler(RecordingSampler): def __init__(self, metadata, tau_pos, tau_neg, n_examples, tau_max=None, same_rec_neg=True, random_state=None): super().__init__(metadata, random_state=random_state) self.t...
true
true
7909c5394eceb5543fd39451738e64db09f1e5a5
6,930
py
Python
data-clean/clean.py
willidert/aux_est_micro
6882794efa609f4171d86a0de1599bb97ac1ff2b
[ "MIT" ]
1
2021-10-02T13:11:01.000Z
2021-10-02T13:11:01.000Z
data-clean/clean.py
willidert/aux_est_micro
6882794efa609f4171d86a0de1599bb97ac1ff2b
[ "MIT" ]
4
2021-06-25T22:31:23.000Z
2021-07-19T03:54:02.000Z
data-clean/clean.py
willidert/auxilio-estudantil-microservice
6882794efa609f4171d86a0de1599bb97ac1ff2b
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np def gloriosafuncao(df): df = pd.DataFrame([df]) numerico = [ 11, "email", 1, 2, 3, 7, 8, 9, 12, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 4, 5, 6 ] df.columns = numerico labels = [ 'email', 'PPI', 'ProgramasSo...
27.72
79
0.553535
import pandas as pd import numpy as np def gloriosafuncao(df): df = pd.DataFrame([df]) numerico = [ 11, "email", 1, 2, 3, 7, 8, 9, 12, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 4, 5, 6 ] df.columns = numerico labels = [ 'email', 'PPI', 'ProgramasSo...
true
true
7909c6ba4b4300f7b64c63e2349a0c4da2c0d76f
4,371
py
Python
cride/users/serializers/users.py
eocode/Rider-App
9629f76f97c605a3f40486a4d93707afbaf22563
[ "MIT" ]
9
2020-05-10T05:56:40.000Z
2022-01-24T08:49:27.000Z
cride/users/serializers/users.py
eocode/Rider-App
9629f76f97c605a3f40486a4d93707afbaf22563
[ "MIT" ]
6
2020-04-10T20:26:38.000Z
2021-06-10T20:02:11.000Z
cride/users/serializers/users.py
eocode/Rider-App
9629f76f97c605a3f40486a4d93707afbaf22563
[ "MIT" ]
5
2020-04-24T11:38:25.000Z
2021-01-02T09:41:04.000Z
"""Users serializers""" # Django from django.conf import settings from django.contrib.auth import password_validation, authenticate from django.core.validators import RegexValidator # Serializers from cride.users.serializers.profiles import ProfileModelSerializer # Django REST Framework from rest_framework import se...
30.566434
98
0.672615
from django.conf import settings from django.contrib.auth import password_validation, authenticate from django.core.validators import RegexValidator from cride.users.serializers.profiles import ProfileModelSerializer from rest_framework import serializers from rest_framework.authtoken.models import Token from res...
true
true
7909c6c2a0341977808eaf310bae19b6dd3dfc34
1,474
py
Python
datasets/grid/testexpt.py
saraswat/TensorLog
c56cebfa33b5123d5340a7b429e333da09d223d8
[ "Apache-2.0" ]
108
2016-05-24T16:49:56.000Z
2022-02-02T19:06:14.000Z
datasets/grid/testexpt.py
saraswat/TensorLog
c56cebfa33b5123d5340a7b429e333da09d223d8
[ "Apache-2.0" ]
12
2016-09-07T18:04:38.000Z
2020-12-07T01:18:08.000Z
datasets/grid/testexpt.py
saraswat/TensorLog
c56cebfa33b5123d5340a7b429e333da09d223d8
[ "Apache-2.0" ]
22
2016-06-17T18:59:18.000Z
2020-05-28T02:13:59.000Z
import unittest import tfexpt import expt from tensorlog import matrixdb from tensorlog import program from tensorlog import dataset class TestNative(unittest.TestCase): def setUp(self): (self.n,self.maxD,self.epochs) = (16,8,20) (self.factFile,trainFile,testFile) = expt.genInputs(self.n) # (self.factF...
33.5
120
0.71981
import unittest import tfexpt import expt from tensorlog import matrixdb from tensorlog import program from tensorlog import dataset class TestNative(unittest.TestCase): def setUp(self): (self.n,self.maxD,self.epochs) = (16,8,20) (self.factFile,trainFile,testFile) = expt.genInputs(self.n) self.db = m...
true
true
7909c844f56cd69e22c2359eca04f9f718929574
59
py
Python
otk/asbt1/__init__.py
draustin/otk
c6e91423ec79b85b380ee9385f6d27c91f92503d
[ "MIT" ]
7
2020-05-17T14:26:42.000Z
2022-02-14T04:52:54.000Z
otk/asbt1/__init__.py
uamhforever/otk
c6e91423ec79b85b380ee9385f6d27c91f92503d
[ "MIT" ]
17
2020-04-10T22:50:00.000Z
2020-06-18T04:54:19.000Z
otk/asbt1/__init__.py
uamhforever/otk
c6e91423ec79b85b380ee9385f6d27c91f92503d
[ "MIT" ]
1
2022-02-14T04:52:45.000Z
2022-02-14T04:52:45.000Z
from ._tracing import Beam from ._sbt import trace_surfaces
29.5
32
0.847458
from ._tracing import Beam from ._sbt import trace_surfaces
true
true
7909ca043608913d17d046dcb573a8db53c1e96f
225
py
Python
response/slack/decorators/__init__.py
qubitdigital/response
9ac9d11f60d108739043697aa19478474cb94a09
[ "MIT" ]
null
null
null
response/slack/decorators/__init__.py
qubitdigital/response
9ac9d11f60d108739043697aa19478474cb94a09
[ "MIT" ]
9
2021-03-19T13:56:39.000Z
2021-06-10T20:48:16.000Z
response/slack/decorators/__init__.py
qubitdigital/response
9ac9d11f60d108739043697aa19478474cb94a09
[ "MIT" ]
null
null
null
from .action_handler import * from .event_handler import * from .headline_post_action import * from .incident_command import * from .keyword_handler import * from .incident_notification import * from .dialog_handler import *
28.125
36
0.813333
from .action_handler import * from .event_handler import * from .headline_post_action import * from .incident_command import * from .keyword_handler import * from .incident_notification import * from .dialog_handler import *
true
true
7909cb31dce0f5d0d244a16c56e9e7a864d3c124
2,372
py
Python
src/gui/SubVision.py
bochkovoi/AHP
b51dc598f8f7a65a2ade039d887dccfa6d070f1e
[ "MIT" ]
null
null
null
src/gui/SubVision.py
bochkovoi/AHP
b51dc598f8f7a65a2ade039d887dccfa6d070f1e
[ "MIT" ]
null
null
null
src/gui/SubVision.py
bochkovoi/AHP
b51dc598f8f7a65a2ade039d887dccfa6d070f1e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from PyQt5 import QtWidgets, QtGui, QtCore import sys, os.path as op path1 = op.join( op.abspath(op.dirname(__file__)), '..', 'Structure') path2 = op.join( op.abspath(op.dirname(__file__)), '..') sys.path.append(path1) sys.path.append(path2) from Structure import * from V...
38.885246
85
0.643339
from PyQt5 import QtWidgets, QtGui, QtCore import sys, os.path as op path1 = op.join( op.abspath(op.dirname(__file__)), '..', 'Structure') path2 = op.join( op.abspath(op.dirname(__file__)), '..') sys.path.append(path1) sys.path.append(path2) from Structure import * from VisObject import * class SubVision( QtWidgets...
true
true
7909cb38f536b0176e1f5661c9e55e2740118f12
3,079
py
Python
huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_configuration_response.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_configuration_response.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-rds/huaweicloudsdkrds/v3/model/create_configuration_response.py
wuchen-huawei/huaweicloud-sdk-python-v3
3683d703f4320edb2b8516f36f16d485cff08fc2
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class CreateConfigurationResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_ma...
28.247706
84
0.583956
import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class CreateConfigurationResponse(SdkResponse): sensitive_list = [] openapi_types = { 'configuration': 'ConfigurationSummaryForCreate' } attribute_map = { 'configuration': 'configuratio...
true
true
7909cb433663fa2d5959177dd2cdcd5af536c083
1,255
py
Python
1_boston.py
ZXTFINAL/deeplearning
52208b43fc8f9a1ea8508b1c07140c70e1529459
[ "Apache-2.0" ]
2
2021-04-26T07:31:57.000Z
2022-01-24T06:38:50.000Z
1_boston.py
ZXTFINAL/deeplearning
52208b43fc8f9a1ea8508b1c07140c70e1529459
[ "Apache-2.0" ]
null
null
null
1_boston.py
ZXTFINAL/deeplearning
52208b43fc8f9a1ea8508b1c07140c70e1529459
[ "Apache-2.0" ]
null
null
null
import numpy as np from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split dataset = load_boston() X = dataset.data y = dataset.target mean = X.mean(axis=0) std = X.std(axis=0) X = (X-mean)/std # print(X) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) n_tr...
21.271186
72
0.636653
import numpy as np from sklearn.datasets import load_boston from sklearn.model_selection import train_test_split dataset = load_boston() X = dataset.data y = dataset.target mean = X.mean(axis=0) std = X.std(axis=0) X = (X-mean)/std X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2) n_train = X_tr...
true
true
7909cbc06e25c672eddf4706f64f472276ea30a7
1,392
py
Python
iot_message/tests/test_plain_cryptor.py
bkosciow/python_iot-1
f3cd2bdbb75cb9afe13fecb603b5b8c026d23500
[ "MIT" ]
null
null
null
iot_message/tests/test_plain_cryptor.py
bkosciow/python_iot-1
f3cd2bdbb75cb9afe13fecb603b5b8c026d23500
[ "MIT" ]
null
null
null
iot_message/tests/test_plain_cryptor.py
bkosciow/python_iot-1
f3cd2bdbb75cb9afe13fecb603b5b8c026d23500
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- #pylint: skip-file from nose.tools import assert_equal from iot_message.cryptor.plain import Cryptor from iot_message.message import Message __author__ = 'Bartosz Kościów' import iot_message.factory as factory class TestCryptorPlain(object): def setUp(self): ...
33.95122
166
0.630747
from nose.tools import assert_equal from iot_message.cryptor.plain import Cryptor from iot_message.message import Message __author__ = 'Bartosz Kościów' import iot_message.factory as factory class TestCryptorPlain(object): def setUp(self): Message.chip_id = 'pc' Message.node_name = 'Turkusi...
true
true
7909cbdda24cae4c4415c0b2b3edc44a297c2cd7
2,742
py
Python
flash/image/embedding/vissl/transforms/utilities.py
Isaac-Flath/lightning-flash
320f87707587d92a13c8831778864b33af4fe421
[ "Apache-2.0" ]
null
null
null
flash/image/embedding/vissl/transforms/utilities.py
Isaac-Flath/lightning-flash
320f87707587d92a13c8831778864b33af4fe421
[ "Apache-2.0" ]
null
null
null
flash/image/embedding/vissl/transforms/utilities.py
Isaac-Flath/lightning-flash
320f87707587d92a13c8831778864b33af4fe421
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
30.131868
95
0.707877
import torch from flash.core.data.data_source import DefaultDataKeys def vissl_collate_helper(samples): result = [] for batch_ele in samples: _batch_ele_dict = {} _batch_ele_dict.update(batch_ele) _batch_ele_dict[DefaultDataKeys.INPUT] = -1 result.append(_batch_...
true
true
7909cd5410e1cf6286cb0446d96f361dd895483b
855
py
Python
TencentYoutuyun/conf.py
walle13/Face_recognition
651bed13971b439bc555b612458709082eb50a49
[ "MIT" ]
28
2017-12-02T05:09:06.000Z
2021-12-23T15:36:27.000Z
TencentYoutuyun/conf.py
walle13/Face_recognition
651bed13971b439bc555b612458709082eb50a49
[ "MIT" ]
null
null
null
TencentYoutuyun/conf.py
walle13/Face_recognition
651bed13971b439bc555b612458709082eb50a49
[ "MIT" ]
6
2017-12-02T05:25:08.000Z
2021-12-23T15:36:28.000Z
# -*- coding: utf-8 -*- import pkg_resources import platform API_YOUTU_END_POINT = 'http://api.youtu.qq.com/' API_TENCENTYUN_END_POINT = 'https://youtu.api.qcloud.com/' API_YOUTU_VIP_END_POINT = 'https://vip-api.youtu.qq.com/' APPID = 'xxx' SECRET_ID = 'xxx' SECRET_KEY = 'xx' USER_ID = 'xx' _config = { 'end_poin...
22.5
91
0.666667
import pkg_resources import platform API_YOUTU_END_POINT = 'http://api.youtu.qq.com/' API_TENCENTYUN_END_POINT = 'https://youtu.api.qcloud.com/' API_YOUTU_VIP_END_POINT = 'https://vip-api.youtu.qq.com/' APPID = 'xxx' SECRET_ID = 'xxx' SECRET_KEY = 'xx' USER_ID = 'xx' _config = { 'end_point':API_YOUTU_END_POINT,...
true
true
7909cd5dbf00a00a8c2f0815dea33ccee71e579d
2,099
py
Python
python/iviz/Util.py
eddy-ilg/iviz
8c392dcc75a6563c5d076bbbd84152273a3c0f71
[ "MIT" ]
null
null
null
python/iviz/Util.py
eddy-ilg/iviz
8c392dcc75a6563c5d076bbbd84152273a3c0f71
[ "MIT" ]
null
null
null
python/iviz/Util.py
eddy-ilg/iviz
8c392dcc75a6563c5d076bbbd84152273a3c0f71
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 #-*- coding: utf-8 -*- from PyQt5.QtGui import QImage, qRgb, QPixmap import numpy as np import numpy as np gray_color_table = [qRgb(i, i, i) for i in range(256)] def toQImage(data, copy=True): if data is None: return QImage() data = data.copy() data[data>255] = 255 da...
35.576271
112
0.618866
from PyQt5.QtGui import QImage, qRgb, QPixmap import numpy as np import numpy as np gray_color_table = [qRgb(i, i, i) for i in range(256)] def toQImage(data, copy=True): if data is None: return QImage() data = data.copy() data[data>255] = 255 data[data<0] = 0 data = data.astype(np.uin...
true
true
7909cde157769993cb1c4d789af67ba4b666042c
3,378
py
Python
tools/train.py
ar90n/ttfnet
99dbfa888f90c8161c2c1666b2d17cdb144dbc30
[ "Apache-2.0" ]
3
2019-12-02T01:13:10.000Z
2021-11-10T04:50:45.000Z
tools/train.py
ar90n/ttfnet
99dbfa888f90c8161c2c1666b2d17cdb144dbc30
[ "Apache-2.0" ]
null
null
null
tools/train.py
ar90n/ttfnet
99dbfa888f90c8161c2c1666b2d17cdb144dbc30
[ "Apache-2.0" ]
3
2020-08-20T03:14:11.000Z
2021-03-01T06:19:10.000Z
from __future__ import division import argparse import os import torch from mmcv import Config from mmdet import __version__ from mmdet.apis import (get_root_logger, init_dist, set_random_seed, train_detector) from mmdet.datasets import build_dataset from mmdet.models import build_detector d...
31.570093
77
0.657194
from __future__ import division import argparse import os import torch from mmcv import Config from mmdet import __version__ from mmdet.apis import (get_root_logger, init_dist, set_random_seed, train_detector) from mmdet.datasets import build_dataset from mmdet.models import build_detector d...
true
true
7909cfcaafa38dfbf9d18b8994f6398dd4eeac4e
12,791
py
Python
model/recommendation_functions.py
dalpengholic/Udacity_Recommendations_with_IBM
8c620b733bf91b7b97b607373d0e6ff86934d03d
[ "MIT" ]
null
null
null
model/recommendation_functions.py
dalpengholic/Udacity_Recommendations_with_IBM
8c620b733bf91b7b97b607373d0e6ff86934d03d
[ "MIT" ]
null
null
null
model/recommendation_functions.py
dalpengholic/Udacity_Recommendations_with_IBM
8c620b733bf91b7b97b607373d0e6ff86934d03d
[ "MIT" ]
null
null
null
import pandas as pd import re import nltk from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from nltk.tokenize import word_tokenize from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from sklearn.metrics.pairwise import line...
37.400585
135
0.642718
import pandas as pd import re import nltk from nltk.corpus import stopwords from nltk.stem.wordnet import WordNetLemmatizer from nltk.tokenize import word_tokenize from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from sklearn.metrics.pairwise import line...
true
true
7909d0092d2c063f7117e359ede7eeb7a11af4a9
2,594
py
Python
openshift/installer/vendored/openshift-ansible-3.5.91/lookup_plugins/oo_option.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
2
2015-02-04T07:24:39.000Z
2015-05-03T10:27:56.000Z
openshift/installer/vendored/openshift-ansible-3.5.91/lookup_plugins/oo_option.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
3
2016-12-01T23:01:36.000Z
2016-12-02T00:16:48.000Z
openshift/installer/vendored/openshift-ansible-3.5.91/lookup_plugins/oo_option.py
fahlmant/openshift-tools
dbb4f16ccde3404c36c23108c45ca7b67138ee12
[ "Apache-2.0" ]
2
2018-10-16T05:11:13.000Z
2018-11-07T01:46:29.000Z
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 ''' oo_option lookup plugin for openshift-ansible Usage: - debug: msg: "{{ lookup('oo_option', '<key>') | default('<default_value>', True) }}" This returns, by order of priority: * if it exists, the `cli_<key>` ansible...
33.688312
143
0.653045
import os try: from ansible.plugins.lookup import LookupBase except ImportError: class LookupBase(object): def __init__(self, basedir=None, runner=None, **kwargs): self.runner = runner self.basedir = self.runner.basedir def get_basedir(self, variabl...
true
true
7909d04ed29d3cb13bb51d7196e34c9b4d97aec3
7,615
py
Python
generated/intermediate/ansible-module-rest/azure_rm_apimanagementapiexport_info.py
audevbot/autorest.devops.debug
a507fb6e2dd7826212537f27d583f203aac1c28f
[ "MIT" ]
null
null
null
generated/intermediate/ansible-module-rest/azure_rm_apimanagementapiexport_info.py
audevbot/autorest.devops.debug
a507fb6e2dd7826212537f27d583f203aac1c28f
[ "MIT" ]
null
null
null
generated/intermediate/ansible-module-rest/azure_rm_apimanagementapiexport_info.py
audevbot/autorest.devops.debug
a507fb6e2dd7826212537f27d583f203aac1c28f
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
29.980315
113
0.548785
from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' --- module: azure_rm_apimanagementapiexport_info vers...
true
true
7909d08b73a5d759fe402b271e78c50a1f845e1f
28,848
py
Python
lib/filemanager.py
jhkennedy/processflow
c404bd3ad043fd6ae18d4f24d735777574faa660
[ "MIT" ]
null
null
null
lib/filemanager.py
jhkennedy/processflow
c404bd3ad043fd6ae18d4f24d735777574faa660
[ "MIT" ]
null
null
null
lib/filemanager.py
jhkennedy/processflow
c404bd3ad043fd6ae18d4f24d735777574faa660
[ "MIT" ]
null
null
null
import os import re import sys import threading import logging import random from time import sleep from peewee import * from enum import IntEnum from threading import Thread from models import DataFile from lib.jobstatus import JobStatus from lib.util import print_debug from lib.util import print_line from lib.util ...
44.313364
149
0.475284
import os import re import sys import threading import logging import random from time import sleep from peewee import * from enum import IntEnum from threading import Thread from models import DataFile from lib.jobstatus import JobStatus from lib.util import print_debug from lib.util import print_line from lib.util ...
false
true
7909d146b3b34368cf10072ffae5d2b5584f814a
3,565
py
Python
bindings/python/ensmallen/datasets/string/streptomycesspnrrlf5008.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-09-10T18:31:58.000Z
2022-03-24T04:28:04.000Z
bindings/python/ensmallen/datasets/string/streptomycesspnrrlf5008.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/streptomycesspnrrlf5008.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Streptomyces sp. NRRLF5008. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--pro...
33.009259
223
0.677419
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def StreptomycesSpNrrlf5008( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/s...
true
true
7909d3751ce9c647e474a5cfae66ed8e2a5ae126
7,217
py
Python
cloudify_cli/tests/commands/test_init.py
TS-at-WS/cloudify-cli
598b54ecd67495a76678177f910cdc5eac6128d0
[ "Apache-2.0" ]
null
null
null
cloudify_cli/tests/commands/test_init.py
TS-at-WS/cloudify-cli
598b54ecd67495a76678177f910cdc5eac6128d0
[ "Apache-2.0" ]
10
2020-08-02T07:45:42.000Z
2021-06-11T01:03:45.000Z
cloudify_cli/tests/commands/test_init.py
TS-at-WS/cloudify-cli
598b54ecd67495a76678177f910cdc5eac6128d0
[ "Apache-2.0" ]
null
null
null
import os import shutil import yaml from mock import patch from dsl_parser.exceptions import DSLParsingLogicException from .. import cfy from ... import env from ...config import config from ...commands import init from .test_base import CliCommandTest from .constants import BLUEPRINTS_DIR, SAMPLE_INPUTS_PATH, \ ...
33.882629
78
0.618678
import os import shutil import yaml from mock import patch from dsl_parser.exceptions import DSLParsingLogicException from .. import cfy from ... import env from ...config import config from ...commands import init from .test_base import CliCommandTest from .constants import BLUEPRINTS_DIR, SAMPLE_INPUTS_PATH, \ ...
true
true
7909d3a36dfa02f2152928b0b9545a1f800d97b5
350
py
Python
socialdistribution/users/urls.py
deasisrj1/CMPUT404-Project-BetterSocial
f5197a757b69f10d0b911a32159f7fc5641fe7bd
[ "Apache-2.0" ]
null
null
null
socialdistribution/users/urls.py
deasisrj1/CMPUT404-Project-BetterSocial
f5197a757b69f10d0b911a32159f7fc5641fe7bd
[ "Apache-2.0" ]
2
2021-10-29T20:18:57.000Z
2021-12-04T14:57:34.000Z
socialdistribution/users/urls.py
CMPUT404-F21T0/CMPUT404-Project-BetterSocial
04a621915108a434d50e900165cefdb0d4cca45c
[ "Apache-2.0" ]
null
null
null
from django.urls import path, include from . import views app_name = 'users' urlpatterns = [ path('login/', views.LoginView.as_view(), name = 'login'), path('logout/', views.LogoutView.as_view(), name = 'logout'), path('register/', views.RegisterView.as_view(), name = 'register'), path('', include('d...
26.923077
71
0.66
from django.urls import path, include from . import views app_name = 'users' urlpatterns = [ path('login/', views.LoginView.as_view(), name = 'login'), path('logout/', views.LogoutView.as_view(), name = 'logout'), path('register/', views.RegisterView.as_view(), name = 'register'), path('', include('d...
true
true
7909d499da32e75252c56242f8dd4fc4938aa132
9,704
py
Python
strategy/alert/alert.py
firebird631/siis
8d64e8fb67619aaa5c0a62fda9de51dedcd47796
[ "PostgreSQL" ]
null
null
null
strategy/alert/alert.py
firebird631/siis
8d64e8fb67619aaa5c0a62fda9de51dedcd47796
[ "PostgreSQL" ]
null
null
null
strategy/alert/alert.py
firebird631/siis
8d64e8fb67619aaa5c0a62fda9de51dedcd47796
[ "PostgreSQL" ]
null
null
null
# @date 2020-02-29 # @author Frederic Scherma, All rights reserved without prejudices. # @license Copyright (c) 2020 Dream Overflow # Strategy alert base model from __future__ import annotations from typing import TYPE_CHECKING, Union if TYPE_CHECKING: from strategy.strategytrader import StrategyTrader from dat...
30.043344
168
0.588108
from __future__ import annotations from typing import TYPE_CHECKING, Union if TYPE_CHECKING: from strategy.strategytrader import StrategyTrader from datetime import datetime from common.utils import timeframe_to_str from instrument.instrument import Instrument import logging logger = logging.getLogger('s...
true
true
7909d53a4c754f960ae092ce1092951259f9e987
247
py
Python
chill/examples/chill/testcases/permute1.script.py
CompOpt4Apps/Artifact-DataDepSimplify
4fa1bf2bda2902fec50a54ee79ae405a554fc9f4
[ "MIT" ]
5
2019-05-20T03:35:41.000Z
2021-09-16T22:22:13.000Z
chill/examples/chill/testcases/permute1.script.py
CompOpt4Apps/Artifact-DataDepSimplify
4fa1bf2bda2902fec50a54ee79ae405a554fc9f4
[ "MIT" ]
null
null
null
chill/examples/chill/testcases/permute1.script.py
CompOpt4Apps/Artifact-DataDepSimplify
4fa1bf2bda2902fec50a54ee79ae405a554fc9f4
[ "MIT" ]
null
null
null
# # example from CHiLL manual page 14 # # permute 3 loops # from chill import * source('permute123456.c') destination('permute1modified.c') procedure('mm') loop(0) known('ambn > 0') known('an > 0') known('bm > 0') permute([3,1,2])
9.88
36
0.631579
from chill import * source('permute123456.c') destination('permute1modified.c') procedure('mm') loop(0) known('ambn > 0') known('an > 0') known('bm > 0') permute([3,1,2])
true
true
7909d53db4adf4b24a7158e34c229a91da9b0369
2,880
py
Python
lib/datasets/factory.py
hinthornw/faster_rcnn_symbols
96b0341363c92631da4f02efcf6c5659d1421535
[ "MIT" ]
null
null
null
lib/datasets/factory.py
hinthornw/faster_rcnn_symbols
96b0341363c92631da4f02efcf6c5659d1421535
[ "MIT" ]
null
null
null
lib/datasets/factory.py
hinthornw/faster_rcnn_symbols
96b0341363c92631da4f02efcf6c5659d1421535
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- # pylint: disable-all # flake8: noqa """Factory method for easily getti...
36
124
0.638889
from __future__ import absolute_import from __future__ import division from __future__ import print_function __sets = {} from datasets.pascal_voc import pascal_voc from datasets.coco import coco from datasets.imagenet import imagenet from datasets.vg import vg from datasets.ads import ads import numpy as np ...
true
true
7909d66efaa04574a0e2a6612298cc287ae163d2
1,356
py
Python
ObjectOrientedProgramming/OOPpart4.py
JeffreyAsuncion/TWT_TheCompletePythonCourse
3d0d7e086f697763bb479e66569c0f2c04762482
[ "MIT" ]
null
null
null
ObjectOrientedProgramming/OOPpart4.py
JeffreyAsuncion/TWT_TheCompletePythonCourse
3d0d7e086f697763bb479e66569c0f2c04762482
[ "MIT" ]
null
null
null
ObjectOrientedProgramming/OOPpart4.py
JeffreyAsuncion/TWT_TheCompletePythonCourse
3d0d7e086f697763bb479e66569c0f2c04762482
[ "MIT" ]
null
null
null
# Overloading Methods class Point(): def __init__(self, x=0, y=0): self.x = x self.y = y self.coords = (self.x, self.y) def move(self, x, y): self.x += x self.y += y # Overload __dunder__ def __add__(self, p): return Point(self.x + p.x, self.y + p.y) ...
21.52381
80
0.539823
class Point(): def __init__(self, x=0, y=0): self.x = x self.y = y self.coords = (self.x, self.y) def move(self, x, y): self.x += x self.y += y def __add__(self, p): return Point(self.x + p.x, self.y + p.y) def __sub__(self, p): return Po...
true
true
7909d68b2a665d8ced8eac8feb3bd4a22b116e3d
9,568
py
Python
vl/model/training.py
hurwitzlab/viral-learning
8d7aebc0d58fa32a429f4a47593452ee2722ba82
[ "MIT" ]
1
2018-02-23T16:49:30.000Z
2018-02-23T16:49:30.000Z
vl/model/training.py
hurwitzlab/viral-learning
8d7aebc0d58fa32a429f4a47593452ee2722ba82
[ "MIT" ]
null
null
null
vl/model/training.py
hurwitzlab/viral-learning
8d7aebc0d58fa32a429f4a47593452ee2722ba82
[ "MIT" ]
null
null
null
""" Training and validation method for arbitrary models. """ import io import os import sys import time from keras import Sequential from keras.layers import Dense, Dropout, BatchNormalization from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import matplotlib.ticker as ticker impo...
42.524444
139
0.650397
import io import os import sys import time from keras import Sequential from keras.layers import Dense, Dropout, BatchNormalization from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import pandas as pd plt.switch_backend('agg'...
true
true
7909d893850400373ab832f8318d8b2680920671
5,419
py
Python
azure-mgmt-network/azure/mgmt/network/models/security_rule.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-network/azure/mgmt/network/models/security_rule.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
azure-mgmt-network/azure/mgmt/network/models/security_rule.py
CharaD7/azure-sdk-for-python
9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c
[ "MIT" ]
null
null
null
# 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 ...
49.263636
245
0.671342
from .sub_resource import SubResource class SecurityRule(SubResource): _validation = { 'protocol': {'required': True}, 'source_address_prefix': {'required': True}, 'destination_address_prefix': {'required': True}, 'access': {'required': True}, 'direction': {'req...
true
true
7909d8e3528fc6544e58911ecb9cf37704d993b8
137
py
Python
clickhouse/datadog_checks/clickhouse/__about__.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
1
2021-01-28T01:45:37.000Z
2021-01-28T01:45:37.000Z
clickhouse/datadog_checks/clickhouse/__about__.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
3
2021-01-27T04:56:40.000Z
2021-02-26T06:29:22.000Z
clickhouse/datadog_checks/clickhouse/__about__.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
1
2021-04-07T16:58:27.000Z
2021-04-07T16:58:27.000Z
# (C) Datadog, Inc. 2019-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) __version__ = '2.3.0'
27.4
59
0.722628
__version__ = '2.3.0'
true
true
7909d8f02396dbf44f9dd65fac201b5674af416c
36,560
py
Python
tests/components/history/test_init.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
5
2020-12-15T04:09:01.000Z
2022-03-11T21:34:24.000Z
tests/components/history/test_init.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
77
2020-07-16T16:43:09.000Z
2022-03-31T06:14:37.000Z
tests/components/history/test_init.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""The tests the History component.""" # pylint: disable=protected-access,invalid-name from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history impo...
34.985646
122
0.666986
from datetime import timedelta import json from unittest.mock import patch, sentinel import pytest from pytest import approx from homeassistant.components import history, recorder from homeassistant.components.recorder.history import get_significant_states from homeassistant.components.recorder.models import process...
true
true
7909da1a5d0f4cf1f5e4ed6e5b1b891963861163
7,707
py
Python
src/core/toga/app.py
UncleGoogle/toga
dc2c150670b692c26184d3267a40624133be4a4e
[ "BSD-3-Clause" ]
null
null
null
src/core/toga/app.py
UncleGoogle/toga
dc2c150670b692c26184d3267a40624133be4a4e
[ "BSD-3-Clause" ]
null
null
null
src/core/toga/app.py
UncleGoogle/toga
dc2c150670b692c26184d3267a40624133be4a4e
[ "BSD-3-Clause" ]
null
null
null
import os import signal import sys from builtins import id as identifier from toga.command import CommandSet from toga.handlers import wrapped_handler from toga.icons import Icon from toga.platform import get_platform_factory from toga.window import Window class MainWindow(Window): _WINDOW_CLASS = 'MainWindow' ...
31.457143
108
0.631374
import os import signal import sys from builtins import id as identifier from toga.command import CommandSet from toga.handlers import wrapped_handler from toga.icons import Icon from toga.platform import get_platform_factory from toga.window import Window class MainWindow(Window): _WINDOW_CLASS = 'MainWindow' ...
true
true
7909da2113e4b7f7be284adf6f8e50e17cb15a0f
12,656
py
Python
a_storage/ingest/in_dbnsfp4.py
ForomePlatform/Anfisa-Annotations
33844f1ee3f56ce7419d5f4b783388a97bf8665a
[ "Apache-2.0" ]
null
null
null
a_storage/ingest/in_dbnsfp4.py
ForomePlatform/Anfisa-Annotations
33844f1ee3f56ce7419d5f4b783388a97bf8665a
[ "Apache-2.0" ]
3
2022-03-28T13:44:24.000Z
2022-03-28T13:53:57.000Z
a_storage/ingest/in_dbnsfp4.py
evgeniyabrosin/Anfisa-Annotations
b111a0d397408cad4a0ee8dd00203ce1e6b2464c
[ "Apache-2.0" ]
3
2019-02-18T17:05:06.000Z
2022-03-22T19:42:38.000Z
import sys, gzip, logging from .in_util import TimeReport, detectFileChrom, extendFileList, dumpReader #======================================== # Schema for AStorage #======================================== _TRASCRIPT_PROPERTIES = [ {"name": "Ensembl_geneid", "tp": "str", "opt": "repeat"}, {"name":...
37.005848
78
0.459387
import sys, gzip, logging from .in_util import TimeReport, detectFileChrom, extendFileList, dumpReader _TRASCRIPT_PROPERTIES = [ {"name": "Ensembl_geneid", "tp": "str", "opt": "repeat"}, {"name": "Ensembl_transcriptid", "tp": "str", "opt": "repeat"}, {"name": "Ensembl_proteinid", "tp"...
true
true
7909da388b05f366cbb53a0299ec4c56b3bbd262
2,182
py
Python
plugins/filter/php_config.py
manala/ansible-roles
30dc7d0bcea10ac4b38c6ad85ad66dbd098131f4
[ "MIT" ]
138
2017-05-18T13:45:45.000Z
2022-03-23T02:33:45.000Z
plugins/filter/php_config.py
manala/ansible-roles
30dc7d0bcea10ac4b38c6ad85ad66dbd098131f4
[ "MIT" ]
159
2017-05-11T09:05:26.000Z
2022-03-04T07:36:59.000Z
plugins/filter/php_config.py
manala/ansible-roles
30dc7d0bcea10ac4b38c6ad85ad66dbd098131f4
[ "MIT" ]
35
2017-06-29T09:01:42.000Z
2021-11-18T11:35:00.000Z
from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.errors import AnsibleFilterError from ansible.module_utils.six import iteritems, string_types from numbers import Number def config(parameters, exclude=None): exclude = exclude or [] if not isinstance(paramete...
33.569231
120
0.660862
from __future__ import absolute_import, division, print_function __metaclass__ = type from ansible.errors import AnsibleFilterError from ansible.module_utils.six import iteritems, string_types from numbers import Number def config(parameters, exclude=None): exclude = exclude or [] if not isinstance(paramete...
true
true
7909daa123662f3a6b92b966f648e29f5deec9b4
2,328
py
Python
docs/conf.py
iancze/bettermoments
d97bd4ae8d11a3670ca4ee97bd658c97455bcc49
[ "MIT" ]
1
2020-04-01T15:31:50.000Z
2020-04-01T15:31:50.000Z
docs/conf.py
iancze/bettermoments
d97bd4ae8d11a3670ca4ee97bd658c97455bcc49
[ "MIT" ]
null
null
null
docs/conf.py
iancze/bettermoments
d97bd4ae8d11a3670ca4ee97bd658c97455bcc49
[ "MIT" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
34.746269
79
0.668814
import os import sys sys.path.insert(0, os.path.abspath('.')) sys.path.append(os.path.join(os.path.dirname(__name__), '..')) project = 'bettermoments' copyright = '2019, Richard Teague' author = 'Richard Teague' extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.coverage', 'sphinx.ext.nap...
true
true
7909daf9cfd323110431936ce508e9cd4abe27e7
775
py
Python
Graphs/graphs creation/directed graph/adjacency matrix/index.py
PawanRamaMali/LeetCode
457700c241a754e53e3d2f1e21c9772ec8019bdc
[ "MIT" ]
null
null
null
Graphs/graphs creation/directed graph/adjacency matrix/index.py
PawanRamaMali/LeetCode
457700c241a754e53e3d2f1e21c9772ec8019bdc
[ "MIT" ]
null
null
null
Graphs/graphs creation/directed graph/adjacency matrix/index.py
PawanRamaMali/LeetCode
457700c241a754e53e3d2f1e21c9772ec8019bdc
[ "MIT" ]
null
null
null
from collections import defaultdict class Graph: def __init__(self, numberOfNodes): self.numberOfNodes = numberOfNodes+1 self.graph = [[0 for x in range(numberOfNodes+1)] for y in range(numberOfNodes+1)] def withInBounds(self, v1, v2): return (v1 >= 0 and v1 <= s...
25
96
0.575484
from collections import defaultdict class Graph: def __init__(self, numberOfNodes): self.numberOfNodes = numberOfNodes+1 self.graph = [[0 for x in range(numberOfNodes+1)] for y in range(numberOfNodes+1)] def withInBounds(self, v1, v2): return (v1 >= 0 and v1 <= s...
true
true
7909db07c36cc57956545fc7274bc3cd67f8e0dd
1,286
py
Python
tests/test_utils.py
duranbe/doccano-transformer
1d19de73bf3b0cebadb31508e3a1864b4e1a6414
[ "MIT" ]
73
2020-03-29T15:39:57.000Z
2022-02-24T08:40:11.000Z
tests/test_utils.py
duranbe/doccano-transformer
1d19de73bf3b0cebadb31508e3a1864b4e1a6414
[ "MIT" ]
18
2020-03-30T10:32:24.000Z
2021-09-02T06:58:22.000Z
tests/test_utils.py
duranbe/doccano-transformer
1d19de73bf3b0cebadb31508e3a1864b4e1a6414
[ "MIT" ]
22
2020-04-03T00:10:48.000Z
2022-03-11T07:14:32.000Z
from unittest import TestCase from doccano_transformer import utils class TestUtils(TestCase): def test_get_offsets(self): text = ' This is Doccano Transformer . ' tokens = text.split() result = utils.get_offsets(text, tokens) expected = [1, 6, 9, 17, 29] self.assertListE...
35.722222
72
0.623639
from unittest import TestCase from doccano_transformer import utils class TestUtils(TestCase): def test_get_offsets(self): text = ' This is Doccano Transformer . ' tokens = text.split() result = utils.get_offsets(text, tokens) expected = [1, 6, 9, 17, 29] self.assertListE...
true
true
7909db7b47824caba868de90babb2a3b2552836c
2,726
py
Python
test/python/transpiler/test_decompose.py
jagunnels/qiskit-sdk-py
153cdde972e65c0f23675bbe17c93e18be27bd51
[ "Apache-2.0" ]
2
2021-09-06T19:25:36.000Z
2021-11-17T10:46:12.000Z
test/python/transpiler/test_decompose.py
jagunnels/qiskit-sdk-py
153cdde972e65c0f23675bbe17c93e18be27bd51
[ "Apache-2.0" ]
null
null
null
test/python/transpiler/test_decompose.py
jagunnels/qiskit-sdk-py
153cdde972e65c0f23675bbe17c93e18be27bd51
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """Test the decompose pass""" from sympy import pi from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit fr...
32.452381
77
0.624725
from sympy import pi from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit from qiskit.transpiler.passes import Decompose from qiskit.converters import circuit_to_dag from qiskit.extensions.standard import HGate from qiskit.extensions.standard import ToffoliGate from qiskit.test import QiskitTe...
true
true
7909db92a59a8f9f8203bc3a73eeba69fadc53c6
51
py
Python
avalara/exceptions.py
SendOutCards/py-avalara
ac13de14a49934ed461baf4620e0c3d856ff12ff
[ "MIT" ]
null
null
null
avalara/exceptions.py
SendOutCards/py-avalara
ac13de14a49934ed461baf4620e0c3d856ff12ff
[ "MIT" ]
null
null
null
avalara/exceptions.py
SendOutCards/py-avalara
ac13de14a49934ed461baf4620e0c3d856ff12ff
[ "MIT" ]
null
null
null
class AvalaraExceptionResponse(Exception): pass
25.5
42
0.823529
class AvalaraExceptionResponse(Exception): pass
true
true
7909dc1b806e2f6d50d9b99b27ec103b33dd3a90
16,074
py
Python
django/middleware/csrf.py
cachitas/django
5b618f239ceb884c9380cf42361c7cc69bf1e208
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
django/middleware/csrf.py
cachitas/django
5b618f239ceb884c9380cf42361c7cc69bf1e208
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
django/middleware/csrf.py
cachitas/django
5b618f239ceb884c9380cf42361c7cc69bf1e208
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
""" Cross Site Request Forgery Middleware. This module provides a middleware that implements protection against request forgeries from other sites. """ import logging import re import string from collections import defaultdict from urllib.parse import urlparse from django.conf import settings from django.core.excepti...
41.321337
102
0.632885
import logging import re import string from collections import defaultdict from urllib.parse import urlparse from django.conf import settings from django.core.exceptions import DisallowedHost, ImproperlyConfigured from django.urls import get_callable from django.utils.cache import patch_vary_headers from django.utils....
true
true
7909dc61c060dc9228c3dde7555aad1a4979f61f
84,712
py
Python
test/test_utils.py
udaykapur/yt-dlp
743f39750cccf53bc320e057a6ed05e301e8ed48
[ "Unlicense" ]
null
null
null
test/test_utils.py
udaykapur/yt-dlp
743f39750cccf53bc320e057a6ed05e301e8ed48
[ "Unlicense" ]
null
null
null
test/test_utils.py
udaykapur/yt-dlp
743f39750cccf53bc320e057a6ed05e301e8ed48
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # Various small unit tests import io import itertools import json import xml.etree.ElementTree from yt_dlp.compat import ( compat_chr, compat_e...
46.417534
382
0.604141
import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import io import itertools import json import xml.etree.ElementTree from yt_dlp.compat import ( compat_chr, compat_etree_fromstring, compat_getenv, compat_HTMLParseError, compa...
true
true