hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7603cc2c55d8c9e988ea6a9664e8090f45e753f
957
py
Python
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/imaplib/imaplib_append.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/imaplib/imaplib_append.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
WEEKS/CD_Sata-Structures/_MISC/misc-examples/python3-book-examples/imaplib/imaplib_append.py
webdevhub42/Lambda
b04b84fb5b82fe7c8b12680149e25ae0d27a0960
[ "MIT" ]
null
null
null
# """ """ # end_pymotw_header import imaplib import time import email.message import imaplib_connect new_message = email.message.Message() new_message.set_unixfrom("pymotw") new_message["Subject"] = "subject goes here" new_message["From"] = "pymotw@example.com" new_message["To"] = "example@example.com" new_message.se...
25.864865
61
0.648903
import imaplib import time import email.message import imaplib_connect new_message = email.message.Message() new_message.set_unixfrom("pymotw") new_message["Subject"] = "subject goes here" new_message["From"] = "pymotw@example.com" new_message["To"] = "example@example.com" new_message.set_payload("This is the body of...
true
true
f7603d2ba84b4c50e0f824eb52f3f87d5ffc70d1
3,514
py
Python
PythonVirtEnv/Lib/site-packages/streamlit/elements/checkbox.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
5
2022-01-20T22:59:04.000Z
2022-02-06T06:11:35.000Z
PythonVirtEnv/Lib/site-packages/streamlit/elements/checkbox.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
1
2021-09-23T18:06:06.000Z
2021-09-24T09:34:21.000Z
PythonVirtEnv/Lib/site-packages/streamlit/elements/checkbox.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
null
null
null
# Copyright 2018-2021 Streamlit Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
32.537037
76
0.631474
from typing import cast import streamlit from streamlit.proto.Checkbox_pb2 import Checkbox as CheckboxProto from streamlit.state.widgets import WidgetProto, register_widget from .form import current_form_id from .utils import check_callback_rules, check_session_state_rules class CheckboxMixin: def checkbox( ...
true
true
f7603e4331d1716298e561b1b61cbb30899ce7b7
35,061
py
Python
qiskit/compiler/transpiler.py
SooluThomas/qiskit-terra
25b47af83f14afb3441d7b2c1bd31bda93e3549d
[ "Apache-2.0" ]
null
null
null
qiskit/compiler/transpiler.py
SooluThomas/qiskit-terra
25b47af83f14afb3441d7b2c1bd31bda93e3549d
[ "Apache-2.0" ]
null
null
null
qiskit/compiler/transpiler.py
SooluThomas/qiskit-terra
25b47af83f14afb3441d7b2c1bd31bda93e3549d
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
47.315789
100
0.637945
import logging import warnings from time import time from typing import List, Union, Dict, Callable, Any, Optional, Tuple from qiskit import user_config from qiskit.circuit import Delay from qiskit.circuit.quantumcircuit import QuantumCircuit from qiskit.circuit.quantumregister import Qubit from qiskit.converters imp...
true
true
f7603e5fda9288997b6506c2f3e5d9e13869c117
4,843
py
Python
hmc/applications/cox_poisson/prior.py
JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo
7ee1b530db0eb536666dbc872fbf8200e53dd49b
[ "MIT" ]
1
2021-11-23T15:40:07.000Z
2021-11-23T15:40:07.000Z
hmc/applications/cox_poisson/prior.py
JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo
7ee1b530db0eb536666dbc872fbf8200e53dd49b
[ "MIT" ]
null
null
null
hmc/applications/cox_poisson/prior.py
JamesBrofos/Thresholds-in-Hamiltonian-Monte-Carlo
7ee1b530db0eb536666dbc872fbf8200e53dd49b
[ "MIT" ]
null
null
null
from typing import Tuple import numpy as np def gamma_logpdf(x: float, k: float, theta: float) -> float: """Log-density of the Gamma distribution up to a constant factor. Args: x: Positive number at which to evaluate the Gamma distribution. k: Shape parameter of the Gamma distribution. ...
33.171233
118
0.655379
from typing import Tuple import numpy as np def gamma_logpdf(x: float, k: float, theta: float) -> float: return (k - 1.0)*np.log(x) - x / theta def grad_gamma_logpdf(x: float, k: float, theta: float) -> float: return (k - 1.0) / x - np.reciprocal(theta) def hess_gamma_logpdf(x: float, k: float, theta: floa...
true
true
f7603e6db8b91bc4fca00f20d483672f0a73b9da
4,446
py
Python
number_recognization/num_clf_cnn.py
zyf668/ml_code
fdd2d6c48550860fd481f7d128d41d95d946539b
[ "Apache-2.0" ]
98
2017-12-29T13:14:29.000Z
2021-12-19T06:00:11.000Z
number_recognization/num_clf_cnn.py
zyf668/ml_code
fdd2d6c48550860fd481f7d128d41d95d946539b
[ "Apache-2.0" ]
2
2017-12-06T06:20:35.000Z
2021-09-29T09:03:49.000Z
number_recognization/num_clf_cnn.py
zyf668/ml_code
fdd2d6c48550860fd481f7d128d41d95d946539b
[ "Apache-2.0" ]
55
2018-01-08T04:00:18.000Z
2022-03-25T02:45:56.000Z
# -*- coding: utf-8 -*- import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import numpy as np ### hyper parameters ### IMG_X = 28 IMG_Y = 28 INPUT_DIM = IMG_X * IMG_Y OUTPUT_DIM = 10 LR = 1e-4 MAX_LOOP = 10000 BATCH_SIZE = 50 KEEP_PROB = 0.5 ### hyper parameters ### ...
34.734375
113
0.650247
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import numpy as np IMG_X = 28 IMG_Y = 28 INPUT_DIM = IMG_X * IMG_Y OUTPUT_DIM = 10 LR = 1e-4 MAX_LOOP = 10000 BATCH_SIZE = 50 KEEP_PROB = 0.5 mnist = input_data.read_data_sets('data/MNIST_data', one_hot=True) X_train ...
true
true
f7603efdb3fe6b96f2e80c8801bfbb4190439307
1,446
py
Python
tempest_zigzag/cli.py
rcbops/tempest-zigzag
12f4bc528c9b88263f04394e5f31755519aa02e8
[ "Apache-2.0" ]
null
null
null
tempest_zigzag/cli.py
rcbops/tempest-zigzag
12f4bc528c9b88263f04394e5f31755519aa02e8
[ "Apache-2.0" ]
2
2019-01-14T22:48:35.000Z
2019-02-25T20:06:06.000Z
tempest_zigzag/cli.py
rcbops/tempest-zigzag
12f4bc528c9b88263f04394e5f31755519aa02e8
[ "Apache-2.0" ]
2
2019-01-08T20:19:16.000Z
2019-01-10T22:12:30.000Z
# -*- coding: utf-8 -*- """Console script for tempest-zigzag.""" # ====================================================================================================================== # Imports # ====================================================================================================================== fr...
42.529412
120
0.488935
from __future__ import absolute_import import click import sys from tempest_zigzag.tempest_zigzag import TempestZigZag from tempest_zigzag.tempest_testcase_xml import TempestXMLAccessError @click.command() @click.argument('junit_input_file', type=click.Path(exists=True)) @click.argument('test_list', type=click.Path(...
true
true
f7603f441a26bf537ae9a2afe6a9530b53947214
6,400
py
Python
docs/developer/release/release_vars.py
al3xliu/checker-framework
af0de8c8df094239f8d807c58cc6f3ea5e99167d
[ "MIT" ]
1
2019-02-28T13:59:38.000Z
2019-02-28T13:59:38.000Z
docs/developer/release/release_vars.py
al3xliu/checker-framework
af0de8c8df094239f8d807c58cc6f3ea5e99167d
[ "MIT" ]
94
2018-08-13T13:15:05.000Z
2022-03-28T20:09:53.000Z
docs/developer/release/release_vars.py
al3xliu/checker-framework
af0de8c8df094239f8d807c58cc6f3ea5e99167d
[ "MIT" ]
9
2016-11-11T02:16:06.000Z
2022-02-17T00:32:13.000Z
#!/usr/bin/env python3 # encoding: utf-8 """ release_vars.py Created by Jonathan Burke on 2013-02-05. Copyright (c) 2014 University of Washington. All rights reserved. """ # See release_development.html for an explanation of how the release process works # it will be invaluable when trying to understand the scripts ...
37.647059
95
0.716406
import os import pwd import subprocess import shlex def getAndAppend(name, append): if name in os.environ: return os.environ[name] + append else: return "" def execute(command_args, halt_if_fail=True, capture_output=False, working_dir=None): if working_dir is not None: prin...
true
true
f7603f635ef71a58ec96df5c660befa6e1506d2c
5,988
py
Python
tests/opentracing_instrumentation/test_celery.py
rsinner99/opentracing-python-instrumentation
5eedaf52052d9878b7f258cbafaae8410d948ba9
[ "MIT" ]
176
2016-03-18T00:47:07.000Z
2022-03-03T09:16:04.000Z
tests/opentracing_instrumentation/test_celery.py
rsinner99/opentracing-python-instrumentation
5eedaf52052d9878b7f258cbafaae8410d948ba9
[ "MIT" ]
108
2016-02-04T15:37:24.000Z
2022-02-07T17:42:49.000Z
tests/opentracing_instrumentation/test_celery.py
rsinner99/opentracing-python-instrumentation
5eedaf52052d9878b7f258cbafaae8410d948ba9
[ "MIT" ]
63
2016-01-20T20:17:31.000Z
2022-02-23T06:43:00.000Z
import celery as celery_module import mock import pytest from celery import Celery from celery.signals import ( before_task_publish, after_task_publish, task_postrun ) from celery.states import SUCCESS, FAILURE from celery.worker import state as celery_worker_state from kombu import Connection from opentracing.ext...
31.350785
78
0.672345
import celery as celery_module import mock import pytest from celery import Celery from celery.signals import ( before_task_publish, after_task_publish, task_postrun ) from celery.states import SUCCESS, FAILURE from celery.worker import state as celery_worker_state from kombu import Connection from opentracing.ext...
true
true
f76040434f1ff07608c83202f779dfacfe91c323
1,053
py
Python
configs/detectors/detectors_cascade_rcnn_r50_1x_coco.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
20,190
2018-09-10T01:11:53.000Z
2022-03-31T22:31:33.000Z
configs/detectors/detectors_cascade_rcnn_r50_1x_coco.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
6,736
2018-09-17T09:45:51.000Z
2022-03-31T22:54:10.000Z
configs/detectors/detectors_cascade_rcnn_r50_1x_coco.py
evgps/mmdetection_trashcan
aaf4237c2c0d473425cdc7b741d3009177b79751
[ "Apache-2.0" ]
7,837
2018-09-11T02:58:23.000Z
2022-03-31T22:31:38.000Z
_base_ = [ '../_base_/models/cascade_rcnn_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( backbone=dict( type='DetectoRS_ResNet', conv_cfg=dict(type='ConvAWS'), sac=dict(type='SAC', use_def...
31.909091
72
0.559354
_base_ = [ '../_base_/models/cascade_rcnn_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] model = dict( backbone=dict( type='DetectoRS_ResNet', conv_cfg=dict(type='ConvAWS'), sac=dict(type='SAC', use_def...
true
true
f76040921393fd5e16e0833d809cf35779e8f31a
4,942
py
Python
asv_bench/benchmarks/index_object.py
Sanjay8874/pandas
353a0f9ebfbd87642d1dd7154f25be0286cdaf93
[ "BSD-3-Clause" ]
4
2021-03-02T19:57:18.000Z
2021-06-20T19:23:57.000Z
asv_bench/benchmarks/index_object.py
16umm001/pandas
a2e599499667b256bc5b8b13a75f0601eccfd432
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
1
2016-08-15T12:35:16.000Z
2016-08-15T12:35:16.000Z
asv_bench/benchmarks/index_object.py
16umm001/pandas
a2e599499667b256bc5b8b13a75f0601eccfd432
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
2
2017-05-27T03:25:12.000Z
2021-09-21T21:51:12.000Z
import numpy as np import pandas.util.testing as tm from pandas import (Series, date_range, DatetimeIndex, Index, RangeIndex, Float64Index) class SetOperations(object): params = (['datetime', 'date_string', 'int', 'strings'], ['intersection', 'union', 'symmetric_difference']) ...
26.858696
78
0.599352
import numpy as np import pandas.util.testing as tm from pandas import (Series, date_range, DatetimeIndex, Index, RangeIndex, Float64Index) class SetOperations(object): params = (['datetime', 'date_string', 'int', 'strings'], ['intersection', 'union', 'symmetric_difference']) ...
true
true
f76040999ff3288fdad1d29df57038d9494eb336
3,192
py
Python
components/studio/datasets/models.py
cawik/stackn
45641c8ed56dfce22f1cd5fc0bafa3b3d9f326d2
[ "Apache-2.0" ]
null
null
null
components/studio/datasets/models.py
cawik/stackn
45641c8ed56dfce22f1cd5fc0bafa3b3d9f326d2
[ "Apache-2.0" ]
null
null
null
components/studio/datasets/models.py
cawik/stackn
45641c8ed56dfce22f1cd5fc0bafa3b3d9f326d2
[ "Apache-2.0" ]
null
null
null
from django.db import models from models.models import compare_version from django.dispatch import receiver from django.db.models.signals import pre_delete, pre_save from django.utils.module_loading import import_string from django.conf import settings from functools import cmp_to_key class ModelManager(models.Manager...
40.923077
147
0.692669
from django.db import models from models.models import compare_version from django.dispatch import receiver from django.db.models.signals import pre_delete, pre_save from django.utils.module_loading import import_string from django.conf import settings from functools import cmp_to_key class ModelManager(models.Manager...
true
true
f76041ea85d0eafa159afa922f38dc8356fc1de6
7,764
py
Python
dp_driver.py
mayank0926/pidnn-double-pendulum
e6f77ffc22ca4ff31dfd6a327e5fec0b61df17a0
[ "MIT" ]
1
2021-11-24T01:51:57.000Z
2021-11-24T01:51:57.000Z
dp_driver.py
mayank0926/pidnn-double-pendulum
e6f77ffc22ca4ff31dfd6a327e5fec0b61df17a0
[ "MIT" ]
null
null
null
dp_driver.py
mayank0926/pidnn-double-pendulum
e6f77ffc22ca4ff31dfd6a327e5fec0b61df17a0
[ "MIT" ]
null
null
null
import torch import yaml import numpy as np import pandas as pd import os import sys from dp_datagen import double_pendulum_data from dp_pidnn import pidnn_driver from dp_dataloader import testloader from dp_ff import ff_driver if len(sys.argv) > 2: config_filename = sys.argv[2] else: config_filename = "dp_con...
46.771084
206
0.60304
import torch import yaml import numpy as np import pandas as pd import os import sys from dp_datagen import double_pendulum_data from dp_pidnn import pidnn_driver from dp_dataloader import testloader from dp_ff import ff_driver if len(sys.argv) > 2: config_filename = sys.argv[2] else: config_filename = "dp_con...
true
true
f76042008e248ed96d8ae59ff873a247adf74fa1
2,000
py
Python
Django/Spring2018Pythonzoo-master/pythonzoo/zoo/models.py
bill-neely/ITSE1311-1302-Spring2018
db8cddb66d921a378bcbbd0423e9036ffc3b7a8a
[ "MIT" ]
null
null
null
Django/Spring2018Pythonzoo-master/pythonzoo/zoo/models.py
bill-neely/ITSE1311-1302-Spring2018
db8cddb66d921a378bcbbd0423e9036ffc3b7a8a
[ "MIT" ]
null
null
null
Django/Spring2018Pythonzoo-master/pythonzoo/zoo/models.py
bill-neely/ITSE1311-1302-Spring2018
db8cddb66d921a378bcbbd0423e9036ffc3b7a8a
[ "MIT" ]
null
null
null
from django.db import models from django.urls import reverse # Create your models here. class Zoo(models.Model): name = models.CharField(max_length=200, help_text="Enter Zoo Name") logoFileName = models.CharField(max_length=200, help_text="Enter logo file name", null=True) def __str__ (self): return self.name ...
35.087719
113
0.739
from django.db import models from django.urls import reverse class Zoo(models.Model): name = models.CharField(max_length=200, help_text="Enter Zoo Name") logoFileName = models.CharField(max_length=200, help_text="Enter logo file name", null=True) def __str__ (self): return self.name def get_absolute_url(self)...
true
true
f7604203cffef29f3dd74cbcb83c723b4d5a4536
6,407
py
Python
test/server/test_rename.py
BoniLindsley/pymap
b3190d20799a6d342888e51bfc55cdfcbfe3ed26
[ "MIT" ]
18
2015-06-04T21:09:37.000Z
2022-03-04T08:14:31.000Z
test/server/test_rename.py
BoniLindsley/pymap
b3190d20799a6d342888e51bfc55cdfcbfe3ed26
[ "MIT" ]
114
2018-10-17T23:11:00.000Z
2022-03-19T16:59:16.000Z
test/server/test_rename.py
BoniLindsley/pymap
b3190d20799a6d342888e51bfc55cdfcbfe3ed26
[ "MIT" ]
8
2015-02-03T19:30:52.000Z
2021-11-20T12:47:03.000Z
import pytest from .base import TestBase pytestmark = pytest.mark.asyncio class TestMailbox(TestBase): async def test_rename(self, imap_server): transport = self.new_transport(imap_server) transport.push_login() transport.push_readline( b'status1 STATUS Sent (MESSAGES UIDNE...
40.550633
78
0.597628
import pytest from .base import TestBase pytestmark = pytest.mark.asyncio class TestMailbox(TestBase): async def test_rename(self, imap_server): transport = self.new_transport(imap_server) transport.push_login() transport.push_readline( b'status1 STATUS Sent (MESSAGES UIDNE...
true
true
f760424cf3c70bcd6b44835d6d7b33b8fec3459a
999
py
Python
solutions/447.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
2
2022-01-18T08:57:13.000Z
2022-01-18T15:49:06.000Z
solutions/447.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
solutions/447.py
pacokwon/leetcode
37c943d371c106d1e6f24e065700e5edd1c3f9f9
[ "MIT" ]
null
null
null
# Number Of Boomerangs from collections import defaultdict class Solution: def choose(self, n, r): res = 1 for ri in range(r): res = res * (n - ri) // (ri + 1) return res def numberOfBoomerangs(self, points): if len(points) <= 2: return 0 dists...
24.365854
58
0.454454
from collections import defaultdict class Solution: def choose(self, n, r): res = 1 for ri in range(r): res = res * (n - ri) // (ri + 1) return res def numberOfBoomerangs(self, points): if len(points) <= 2: return 0 dists = [defaultdict(int) fo...
true
true
f7604308729a4a8b0860b28ad794e8617ed6dbd1
10,186
py
Python
corona cases forecasting/main.py
ShubhamGupta577/Amazing-Python-Scripts
deeb542a77b96fdcfbe21440eee4c620fa06daa9
[ "MIT" ]
null
null
null
corona cases forecasting/main.py
ShubhamGupta577/Amazing-Python-Scripts
deeb542a77b96fdcfbe21440eee4c620fa06daa9
[ "MIT" ]
null
null
null
corona cases forecasting/main.py
ShubhamGupta577/Amazing-Python-Scripts
deeb542a77b96fdcfbe21440eee4c620fa06daa9
[ "MIT" ]
null
null
null
# importing libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt from statsmodels.tsa.arima_model import ARIMA import datetime from datetime import date import warnings warnings.filterwarnings('ignore') plt.style.use('fivethirtyeight') from pmdarima import auto_arima confirmed_c...
42.26556
184
0.677106
import numpy as np import pandas as pd import matplotlib.pyplot as plt from statsmodels.tsa.arima_model import ARIMA import datetime from datetime import date import warnings warnings.filterwarnings('ignore') plt.style.use('fivethirtyeight') from pmdarima import auto_arima confirmed_cases = pd.read_csv('htt...
true
true
f76044deceff97108170eafd7a34e803bdfd73b6
1,182
py
Python
tests/tensors/backend_test.py
richarajpal/deep_qa
d918335a1bed71b9cfccf1d5743321cee9c61952
[ "Apache-2.0" ]
459
2017-02-08T13:40:17.000Z
2021-12-12T12:57:48.000Z
tests/tensors/backend_test.py
richarajpal/deep_qa
d918335a1bed71b9cfccf1d5743321cee9c61952
[ "Apache-2.0" ]
176
2017-01-26T01:19:41.000Z
2018-04-22T19:16:01.000Z
tests/tensors/backend_test.py
richarajpal/deep_qa
d918335a1bed71b9cfccf1d5743321cee9c61952
[ "Apache-2.0" ]
154
2017-01-26T01:00:30.000Z
2021-02-05T10:44:42.000Z
# pylint: disable=no-self-use,invalid-name import numpy from deep_qa.tensors.backend import hardmax from deep_qa.testing.test_case import DeepQaTestCase from keras import backend as K class TestBackendTensorFunctions(DeepQaTestCase): def test_hardmax(self): batch_size = 3 knowledge_length = 5 ...
47.28
95
0.687817
import numpy from deep_qa.tensors.backend import hardmax from deep_qa.testing.test_case import DeepQaTestCase from keras import backend as K class TestBackendTensorFunctions(DeepQaTestCase): def test_hardmax(self): batch_size = 3 knowledge_length = 5 unnormalized_attention = K.variable(num...
true
true
f7604539d4599e85e2558ae150e5b93e78513d40
478
py
Python
data/scripts/templates/object/tangible/dungeon/shared_cave_stalagmite_ice_style_01.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/tangible/dungeon/shared_cave_stalagmite_ice_style_01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/tangible/dungeon/shared_cave_stalagmite_ice_style_01.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/dungeon/shared_cave_stalagmite_ice_style_01.iff" result.attribute_t...
28.117647
84
0.74477
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/dungeon/shared_cave_stalagmite_ice_style_01.iff" result.attribute_template_id = -1 result.stfName("terminal_name","nightsister_trap_crystal") return result
true
true
f760455de47a266591810f2d4e05b851ae6bff18
225
py
Python
application.py
leigeng2014/sango2
aa0a3ed1a316d8afc9482f072f2aa57cffe9a10f
[ "Apache-2.0" ]
null
null
null
application.py
leigeng2014/sango2
aa0a3ed1a316d8afc9482f072f2aa57cffe9a10f
[ "Apache-2.0" ]
null
null
null
application.py
leigeng2014/sango2
aa0a3ed1a316d8afc9482f072f2aa57cffe9a10f
[ "Apache-2.0" ]
null
null
null
import sys import os import django.core.handlers.wsgi sys.path.append(os.path.abspath(os.path.dirname(__file__))) os.environ['DJANGO_SETTINGS_MODULE'] = 'apps.settings' application = django.core.handlers.wsgi.WSGIHandler()
25
59
0.795556
import sys import os import django.core.handlers.wsgi sys.path.append(os.path.abspath(os.path.dirname(__file__))) os.environ['DJANGO_SETTINGS_MODULE'] = 'apps.settings' application = django.core.handlers.wsgi.WSGIHandler()
true
true
f76046385f25c616dd78da1b282bcd04b4050b98
1,549
py
Python
config.py
pastgift/web-app-template-py
3556db189a6bbd3cb04993e4780aef08276861b6
[ "MIT" ]
null
null
null
config.py
pastgift/web-app-template-py
3556db189a6bbd3cb04993e4780aef08276861b6
[ "MIT" ]
5
2021-03-18T20:21:29.000Z
2022-03-11T23:15:33.000Z
config.py
pastgift/web-app-template-py
3556db189a6bbd3cb04993e4780aef08276861b6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import yaml basedir = os.path.abspath(os.path.dirname(__file__)) # Load ACL Action file _ACL_ACTIONS = None with open(basedir + '/acl-actions.yaml') as _f: _ACL_ACTIONS = yaml.load(_f.read()) class Config(object): ADMIN_USERNAME = os.environ.get('ADMIN_USERNA...
32.270833
87
0.657844
import os import yaml basedir = os.path.abspath(os.path.dirname(__file__)) _ACL_ACTIONS = None with open(basedir + '/acl-actions.yaml') as _f: _ACL_ACTIONS = yaml.load(_f.read()) class Config(object): ADMIN_USERNAME = os.environ.get('ADMIN_USERNAME') SECRET_KEY = os.en...
true
true
f76046649700d853f811fdcc66b599cc658a92e8
8,064
py
Python
tests/test_client/views.py
tomleo/django
ebfb71c64a786620947c9d598fd1ebae2958acff
[ "BSD-3-Clause" ]
1
2017-12-01T06:26:57.000Z
2017-12-01T06:26:57.000Z
tests/test_client/views.py
liuliang2015/django
86d3079d5797811c1e118cfd600a913685212165
[ "BSD-3-Clause" ]
null
null
null
tests/test_client/views.py
liuliang2015/django
86d3079d5797811c1e118cfd600a913685212165
[ "BSD-3-Clause" ]
1
2020-04-12T19:00:12.000Z
2020-04-12T19:00:12.000Z
try: from urllib.parse import urlencode except ImportError: # Python 2 from urllib import urlencode from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.forms import fields from django.forms.forms imp...
36.821918
133
0.663938
try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.forms import fields from django.forms.forms import Form fr...
true
true
f760474b1f206e1482c23289fc6959de3cfb50c0
3,788
py
Python
registry/batch/utils.py
screamy159/donors_registry
4c0d0b60edee4bdbb837d1c65487de6d90e6673d
[ "MIT" ]
3
2020-08-03T15:00:02.000Z
2021-05-26T13:54:08.000Z
registry/batch/utils.py
screamy159/donors_registry
4c0d0b60edee4bdbb837d1c65487de6d90e6673d
[ "MIT" ]
128
2020-08-29T07:30:53.000Z
2022-01-24T07:04:13.000Z
registry/batch/utils.py
screamy159/donors_registry
4c0d0b60edee4bdbb837d1c65487de6d90e6673d
[ "MIT" ]
9
2020-07-18T16:53:24.000Z
2021-05-20T08:27:19.000Z
def get_part_of_line(line, delimiter=";"): try: del_index = line.index(delimiter) return line[:del_index], line[del_index + 1 :] except ValueError: return line, "" def is_line_valid(line): parts = line.split(";") if not parts[-1] or parts[-1] == "0": # If the last part ...
30.304
78
0.625396
def get_part_of_line(line, delimiter=";"): try: del_index = line.index(delimiter) return line[:del_index], line[del_index + 1 :] except ValueError: return line, "" def is_line_valid(line): parts = line.split(";") if not parts[-1] or parts[-1] == "0": ...
true
true
f760478860b3868b28d5db97d0bb34b39f354013
1,602
py
Python
scripts/process_image_with_parameters.py
zbsjila/CarND-Advanced-Lane-Lines
07f93a4926741a12fdb873e6f6b0fb77550cf492
[ "MIT" ]
null
null
null
scripts/process_image_with_parameters.py
zbsjila/CarND-Advanced-Lane-Lines
07f93a4926741a12fdb873e6f6b0fb77550cf492
[ "MIT" ]
null
null
null
scripts/process_image_with_parameters.py
zbsjila/CarND-Advanced-Lane-Lines
07f93a4926741a12fdb873e6f6b0fb77550cf492
[ "MIT" ]
null
null
null
#!/usr/bin/env python ## import import sys import lanefindlib import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg import cv2 import pickle import os ## argin if len(sys.argv) < 4 or len(sys.argv) > 5: print("Syntax error! Usage: "); print(sys.argv[0], "../test_images/test1.jpg ....
31.411765
212
0.762172
import sys import lanefindlib import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg import cv2 import pickle import os if len(sys.argv) < 4 or len(sys.argv) > 5: print("Syntax error! Usage: "); print(sys.argv[0], "../test_images/test1.jpg ../output_images/test1 camera_data.p [show...
true
true
f760486ff828c3355e94552ef6849ee4df4b7f0d
384
py
Python
app/assets.py
willypuzzle/flask-foundation
3d4a09470d8303905969f19a990baa0945fdf1d0
[ "BSD-2-Clause" ]
901
2015-01-05T16:55:24.000Z
2022-02-10T20:59:18.000Z
app/assets.py
willypuzzle/flask-foundation
3d4a09470d8303905969f19a990baa0945fdf1d0
[ "BSD-2-Clause" ]
11
2015-07-14T19:26:20.000Z
2022-01-24T09:26:41.000Z
app/assets.py
willypuzzle/flask-foundation
3d4a09470d8303905969f19a990baa0945fdf1d0
[ "BSD-2-Clause" ]
153
2015-01-05T22:04:33.000Z
2022-01-19T07:09:48.000Z
from flask_assets import Bundle common_css = Bundle( 'css/vendor/bootstrap.min.css', 'css/vendor/helper.css', 'css/main.css', filters='cssmin', output='public/css/common.css' ) common_js = Bundle( 'js/vendor/jquery.min.js', 'js/vendor/bootstrap.min.js', Bundle( 'js/main.js', ...
19.2
35
0.617188
from flask_assets import Bundle common_css = Bundle( 'css/vendor/bootstrap.min.css', 'css/vendor/helper.css', 'css/main.css', filters='cssmin', output='public/css/common.css' ) common_js = Bundle( 'js/vendor/jquery.min.js', 'js/vendor/bootstrap.min.js', Bundle( 'js/main.js', ...
true
true
f76049f96ed9708c459bcec38a4048e6a98ba460
1,052
py
Python
checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py
pmalkki/checkov
b6cdf386dd976fe27c16fed6d550756a678a5d7b
[ "Apache-2.0" ]
1
2021-02-13T15:24:42.000Z
2021-02-13T15:24:42.000Z
checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py
pmalkki/checkov
b6cdf386dd976fe27c16fed6d550756a678a5d7b
[ "Apache-2.0" ]
7
2021-04-12T06:54:07.000Z
2022-03-21T14:04:14.000Z
checkov/kubernetes/checks/resource/k8s/NginxIngressCVE202125742Alias.py
pmalkki/checkov
b6cdf386dd976fe27c16fed6d550756a678a5d7b
[ "Apache-2.0" ]
1
2021-12-16T03:09:55.000Z
2021-12-16T03:09:55.000Z
from checkov.common.models.enums import CheckCategories, CheckResult from checkov.kubernetes.checks.resource.base_spec_check import BaseK8Check from checkov.common.util.type_forcers import force_list class NginxIngressCVE202125742Alias(BaseK8Check): def __init__(self): name = "Prevent NGINX Ingress annot...
40.461538
108
0.681559
from checkov.common.models.enums import CheckCategories, CheckResult from checkov.kubernetes.checks.resource.base_spec_check import BaseK8Check from checkov.common.util.type_forcers import force_list class NginxIngressCVE202125742Alias(BaseK8Check): def __init__(self): name = "Prevent NGINX Ingress annot...
true
true
f7604a319f77a7873026c8084f9b55974a9baaec
16,938
py
Python
server/TenantManagementService/tenant-management.py
snetty/aws-saas-factory-ref-solution-serverless-saas
34403ac7ad74847106cc7318d54afb51932d3711
[ "Apache-2.0", "MIT-0" ]
1
2021-07-10T22:07:16.000Z
2021-07-10T22:07:16.000Z
server/TenantManagementService/tenant-management.py
snetty/aws-saas-factory-ref-solution-serverless-saas
34403ac7ad74847106cc7318d54afb51932d3711
[ "Apache-2.0", "MIT-0" ]
null
null
null
server/TenantManagementService/tenant-management.py
snetty/aws-saas-factory-ref-solution-serverless-saas
34403ac7ad74847106cc7318d54afb51932d3711
[ "Apache-2.0", "MIT-0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: MIT-0 import os import json import boto3 from boto3.dynamodb.conditions import Key import urllib.parse import utils from botocore.exceptions import ClientError import logger import metrics_manager import auth_manager import...
43.880829
188
0.66277
import os import json import boto3 from boto3.dynamodb.conditions import Key import urllib.parse import utils from botocore.exceptions import ClientError import logger import metrics_manager import auth_manager import requests from aws_requests_auth.aws_auth import AWSRequestsAuth from aws_lambda_powertools import Tr...
true
true
f7604b7d490d06f0df5fb5cbf0af766fa1db792a
1,915
py
Python
oneflow/python/test/ops/test_gelu.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
2
2021-09-10T00:19:49.000Z
2021-11-16T11:27:20.000Z
oneflow/python/test/ops/test_gelu.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
1
2021-06-16T08:37:50.000Z
2021-06-16T08:37:50.000Z
oneflow/python/test/ops/test_gelu.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
1
2021-11-10T07:57:01.000Z
2021-11-10T07:57:01.000Z
""" Copyright 2020 The OneFlow 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 applicable law or agr...
30.887097
80
0.677807
import unittest import math import os from collections import OrderedDict import numpy as np import oneflow as flow import tensorflow as tf from test_util import GenArgDict, RunOneflowOp gpus = tf.config.experimental.list_physical_devices("GPU") for gpu in gpus: tf.config.experimental.set_memory_growth(gpu, True)...
true
true
f7604bd6c6fab5b6837eb47f0506f5b2de9a42d0
2,244
py
Python
demo/showcase/windows.py
UltraStudioLTD/pyTermTk
a1e96b0e7f43906b9fda0b16f19f427919a055c2
[ "MIT" ]
1
2022-02-28T16:33:25.000Z
2022-02-28T16:33:25.000Z
demo/showcase/windows.py
UltraStudioLTD/pyTermTk
a1e96b0e7f43906b9fda0b16f19f427919a055c2
[ "MIT" ]
null
null
null
demo/showcase/windows.py
UltraStudioLTD/pyTermTk
a1e96b0e7f43906b9fda0b16f19f427919a055c2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # MIT License # # Copyright (c) 2021 Eugenio Parodi <ceccopierangiolieugenio AT googlemail DOT com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restricti...
32.521739
86
0.702317
import sys, os sys.path.append(os.path.join(sys.path[0], "../../tmp")) sys.path.append(os.path.join(sys.path[0], "../..")) import TermTk as ttk def demoWindows(root=None): frame = ttk.TTkFrame(parent=root, border=False) win2_1 = ttk.TTkWindow( parent=frame, pos=(0, 0), size=(50, 25), title="Test W...
true
true
f7604c90c42bb8f9ec5c3122051842cc3a4918aa
2,187
py
Python
data/cirq_new/cirq_program/startCirq_noisy623.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy623.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_noisy623.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=19 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Ci...
32.161765
77
0.685871
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(cirq.H.on(input_qubit[2])) c.append(c...
true
true
f7604c923d0c2ae3a6b3a929c6e56546acad8f2c
2,490
py
Python
flybrainlab/utilities/neurowatch.py
FlyBrainLab/FBLClient
c85de23d428a38fe13491b2f5eb30b690610108e
[ "BSD-3-Clause" ]
3
2020-07-23T05:51:22.000Z
2021-12-24T11:40:30.000Z
flybrainlab/utilities/neurowatch.py
FlyBrainLab/FBLClient
c85de23d428a38fe13491b2f5eb30b690610108e
[ "BSD-3-Clause" ]
3
2020-07-31T05:08:35.000Z
2021-01-08T17:55:16.000Z
flybrainlab/utilities/neurowatch.py
FlyBrainLab/FBLClient
c85de23d428a38fe13491b2f5eb30b690610108e
[ "BSD-3-Clause" ]
1
2019-02-03T02:03:00.000Z
2019-02-03T02:03:00.000Z
""" This file contains some utilities from Neurowatch for visualizing local files of neurons and meshes in FlyBrainLab. """ import json import pandas as pd def loadJSON(client, file_name, uname=None, mesh_class = 'Neuropil'): """Loads a mesh stored in the .json format. # Arguments client (FlyBrainLab ...
40.16129
115
0.571084
import json import pandas as pd def loadJSON(client, file_name, uname=None, mesh_class = 'Neuropil'): with open(file_name) as f: data = json.load(f) if uname == None: uname = file_name.split('.')[0] rid = '#'+uname mesh_data = {'data': {'data': {rid: {'name': uname, ...
true
true
f7604cdfe2402d485763724d0a066e78fed65cda
524
py
Python
code/python/python_study/eleven/redis_learn.py
menhuan/notes
aaebe6a37b272d6b1110c7d23724aab079468628
[ "Apache-2.0" ]
37
2019-01-30T09:06:11.000Z
2021-11-07T20:25:33.000Z
code/python/python_study/eleven/redis_learn.py
menhuan/notes
aaebe6a37b272d6b1110c7d23724aab079468628
[ "Apache-2.0" ]
null
null
null
code/python/python_study/eleven/redis_learn.py
menhuan/notes
aaebe6a37b272d6b1110c7d23724aab079468628
[ "Apache-2.0" ]
13
2019-02-22T15:24:50.000Z
2020-05-10T14:51:18.000Z
import redis host = "188.131.139.100" port = 6379 redis_conn = redis.Redis(host=host, port=port, db=0) redis_pool = redis.ConnectionPool(host=host, port=port, db=0) redis_conn = redis.Redis(connection_pool=redis_pool) redis_conn.set(name="student_key", value="student1", ex=100) value = redis_conn.get(name="student_...
21.833333
61
0.732824
import redis host = "188.131.139.100" port = 6379 redis_conn = redis.Redis(host=host, port=port, db=0) redis_pool = redis.ConnectionPool(host=host, port=port, db=0) redis_conn = redis.Redis(connection_pool=redis_pool) redis_conn.set(name="student_key", value="student1", ex=100) value = redis_conn.get(name="student_...
true
true
f7604d1ea01107180da7db82889f140e698dc581
637
py
Python
createPersonInPersonGroup.py
vikrantkakad/AzureCognitiveAPI
c170e4fe0860157d81163840798cb4d4931a05b1
[ "Apache-2.0" ]
2
2017-05-24T10:44:17.000Z
2022-02-19T09:41:15.000Z
createPersonInPersonGroup.py
vikrantkakad/AzureCognitiveAPI
c170e4fe0860157d81163840798cb4d4931a05b1
[ "Apache-2.0" ]
null
null
null
createPersonInPersonGroup.py
vikrantkakad/AzureCognitiveAPI
c170e4fe0860157d81163840798cb4d4931a05b1
[ "Apache-2.0" ]
null
null
null
import httplib, urllib, base64 import sys pName = sys.argv[1] personGroup = sys.argv[2] KEY = sys.argv[3] headers = { # Request headers 'Content-Type': 'application/json', 'Ocp-Apim-Subscription-Key': KEY, } params = urllib.urlencode({ }) try: conn = httplib.HTTPSConnection('westus.api.cognitive.mic...
23.592593
128
0.646782
import httplib, urllib, base64 import sys pName = sys.argv[1] personGroup = sys.argv[2] KEY = sys.argv[3] headers = { 'Content-Type': 'application/json', 'Ocp-Apim-Subscription-Key': KEY, } params = urllib.urlencode({ }) try: conn = httplib.HTTPSConnection('westus.api.cognitive.microsoft.com') c...
true
true
f7604e03f5067ba4816b1e256cf2cdc59fc9024f
588
py
Python
tests/conftest.py
simonwiles/xmltotabular
13c8b60e383aa16db662c744e57578f2b7e2ed57
[ "MIT" ]
2
2020-09-26T23:57:00.000Z
2021-06-16T23:59:46.000Z
tests/conftest.py
simonwiles/xmltotabular
13c8b60e383aa16db662c744e57578f2b7e2ed57
[ "MIT" ]
23
2020-11-09T05:43:50.000Z
2021-10-21T19:29:47.000Z
tests/conftest.py
simonwiles/xmltotabular
13c8b60e383aa16db662c744e57578f2b7e2ed57
[ "MIT" ]
null
null
null
import logging import pytest import yaml from xmltotabular.sqlite_db import SqliteDB @pytest.fixture def empty_db(): return SqliteDB(":memory:") @pytest.fixture def simple_config(): config = """ album: <entity>: album <fields>: name: name artist: artist released: re...
16.8
46
0.653061
import logging import pytest import yaml from xmltotabular.sqlite_db import SqliteDB @pytest.fixture def empty_db(): return SqliteDB(":memory:") @pytest.fixture def simple_config(): config = """ album: <entity>: album <fields>: name: name artist: artist released: re...
true
true
f7604f7a735a22a9f56ed552760155f84915c093
697
py
Python
pi-stat/measurement.py
RoyAtanu/pi-stat
df0d91998d895d7ab48d3c2b17376ae5e3b343b9
[ "MIT" ]
null
null
null
pi-stat/measurement.py
RoyAtanu/pi-stat
df0d91998d895d7ab48d3c2b17376ae5e3b343b9
[ "MIT" ]
null
null
null
pi-stat/measurement.py
RoyAtanu/pi-stat
df0d91998d895d7ab48d3c2b17376ae5e3b343b9
[ "MIT" ]
null
null
null
import json import util def get_temperature(): fields = {} fields['cputemp'] = util.check_CPU_temp() fields['gputemp'] = util.check_GPU_temp() return fields def get_cpu(): fields = {} cpused = util.check_CPU_used() core = 1 for utilization in cpused: fields['cpu ' + str(core)] ...
22.483871
52
0.638451
import json import util def get_temperature(): fields = {} fields['cputemp'] = util.check_CPU_temp() fields['gputemp'] = util.check_GPU_temp() return fields def get_cpu(): fields = {} cpused = util.check_CPU_used() core = 1 for utilization in cpused: fields['cpu ' + str(core)] ...
true
true
f760502bc8977f5e979275e4977ee3ae91f79322
168
py
Python
lib/solutions/HLO/hello_solution.py
DPNT-Sourcecode/CHK-vtqj01
4c02d7cb1c6ea7efde1bfc79ccc61c454dc6f826
[ "Apache-2.0" ]
null
null
null
lib/solutions/HLO/hello_solution.py
DPNT-Sourcecode/CHK-vtqj01
4c02d7cb1c6ea7efde1bfc79ccc61c454dc6f826
[ "Apache-2.0" ]
null
null
null
lib/solutions/HLO/hello_solution.py
DPNT-Sourcecode/CHK-vtqj01
4c02d7cb1c6ea7efde1bfc79ccc61c454dc6f826
[ "Apache-2.0" ]
null
null
null
# noinspection PyUnusedLocal # friend_name = unicode string def hello(friend_name): # return "Hello, World!" return "Hello, {name}!".format(name=friend_name)
21
52
0.714286
def hello(friend_name): return "Hello, {name}!".format(name=friend_name)
true
true
f76050d374d47d9d4a62fd3d96e7bc3474124055
1,405
py
Python
python/session_query_all.py
chandra-25/hello-world
f3522a3b6e981bf0697cbf033ab02bec120de987
[ "Apache-2.0" ]
47
2018-01-27T02:02:58.000Z
2021-08-11T20:56:22.000Z
python/session_query_all.py
chandra-25/hello-world
f3522a3b6e981bf0697cbf033ab02bec120de987
[ "Apache-2.0" ]
7
2017-08-18T18:33:37.000Z
2021-11-13T12:23:05.000Z
python/session_query_all.py
chandra-25/hello-world
f3522a3b6e981bf0697cbf033ab02bec120de987
[ "Apache-2.0" ]
17
2017-06-22T22:04:51.000Z
2021-11-27T12:24:08.000Z
from pxgrid import PxgridControl from config import Config import urllib.request import base64 import time def query(config, secret, url, payload): print('query url=' + url) print(' request=' + payload) handler = urllib.request.HTTPSHandler(context=config.get_ssl_context()) opener = urllib.request.bu...
36.025641
85
0.706762
from pxgrid import PxgridControl from config import Config import urllib.request import base64 import time def query(config, secret, url, payload): print('query url=' + url) print(' request=' + payload) handler = urllib.request.HTTPSHandler(context=config.get_ssl_context()) opener = urllib.request.bu...
true
true
f760516f955294ea692edda7254e00e2031b6128
4,868
py
Python
airflow/macros/hive.py
PoojaChandak/airflow
688b07682442dfa24b7b6a8ae8a388e01b5872ab
[ "Apache-2.0" ]
1
2020-08-20T16:22:03.000Z
2020-08-20T16:22:03.000Z
airflow/macros/hive.py
PoojaChandak/airflow
688b07682442dfa24b7b6a8ae8a388e01b5872ab
[ "Apache-2.0" ]
5
2021-09-01T00:38:27.000Z
2022-03-29T22:29:04.000Z
airflow/macros/hive.py
PoojaChandak/airflow
688b07682442dfa24b7b6a8ae8a388e01b5872ab
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
39.901639
86
0.690016
import datetime def max_partition( table, schema="default", field=None, filter_map=None, metastore_conn_id='metastore_default'): from airflow.providers.apache.hive.hooks.hive import HiveMetastoreHook if '.' in table: schema, table = table.split('.') hh = HiveMetastoreHook(metastor...
true
true
f760521346efd98c9707d7de46c4cc4f12152738
683
py
Python
venv/lib/python3.8/site-packages/vsts/models/vss_json_collection_wrapper_base.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/models/vss_json_collection_wrapper_base.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/models/vss_json_collection_wrapper_base.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Generated file, DO NOT EDIT # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from msrest.serialization i...
27.32
77
0.494876
from msrest.serialization import Model class VssJsonCollectionWrapperBase(Model): _attribute_map = { 'count': {'key': 'count', 'type': 'int'} } def __init__(self, count=None): super(VssJsonCollectionWrapperBase, self).__init__() self.count = count
true
true
f760531cccc2a0de1d9730821f1ddd3a5d312cfd
4,134
py
Python
cli/src/rnpfind/user_input.py
mnahinkhan/RNPFind
8b561e087f943421c847dcb708ee386ee6439fa5
[ "MIT" ]
1
2020-03-07T18:58:06.000Z
2020-03-07T18:58:06.000Z
cli/src/rnpfind/user_input.py
mnahinkhan/RNPFind
8b561e087f943421c847dcb708ee386ee6439fa5
[ "MIT" ]
null
null
null
cli/src/rnpfind/user_input.py
mnahinkhan/RNPFind
8b561e087f943421c847dcb708ee386ee6439fa5
[ "MIT" ]
null
null
null
""" Defines functions that are involved in getting some data from the user. Used for the command line interface variant of RNPFind. """ import sys from hgfind import WrongGeneName, hgfind from .config import GENOME_VERSION from .gene_coordinates import Chromosome def parse_genome_coord(transcript: str) -> dict: ...
30.622222
79
0.6403
import sys from hgfind import WrongGeneName, hgfind from .config import GENOME_VERSION from .gene_coordinates import Chromosome def parse_genome_coord(transcript: str) -> dict: fail_output = {"success": False} if len([c for c in transcript if c == ":"]) != 1: return fail_output i...
true
true
f760537f41345563e9b0c7e24d37285a709f2db1
524
py
Python
tests/test_parallel.py
benvial/gyptis
3f197fe33d0a0bac72be05a474baff4e450af0ab
[ "MIT" ]
null
null
null
tests/test_parallel.py
benvial/gyptis
3f197fe33d0a0bac72be05a474baff4e450af0ab
[ "MIT" ]
null
null
null
tests/test_parallel.py
benvial/gyptis
3f197fe33d0a0bac72be05a474baff4e450af0ab
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Benjamin Vial # License: MIT import pytest from gyptis.utils.parallel import * def f(x, y, a=1, b="b"): print(f"f called with {x} {y} {a} {b}") y = x ** 2 print(f"output y = {x}^2 = {y}") return y @parloop(n_jobs=4) def fpar(x, *args, **kwar...
15.878788
43
0.545802
import pytest from gyptis.utils.parallel import * def f(x, y, a=1, b="b"): print(f"f called with {x} {y} {a} {b}") y = x ** 2 print(f"output y = {x}^2 = {y}") return y @parloop(n_jobs=4) def fpar(x, *args, **kwargs): return f(x, *args, **kwargs) def test_para(): x = [1, 2, 3, 4] y =...
true
true
f7605380ebccb500db3455dd1640ccee3d05726e
909
py
Python
scripts/build.py
brunobord/stones
f473d5537213885d822063133c108dd47ef34569
[ "CC-BY-4.0" ]
2
2020-02-08T19:11:30.000Z
2021-07-29T02:39:49.000Z
scripts/build.py
brunobord/stones
f473d5537213885d822063133c108dd47ef34569
[ "CC-BY-4.0" ]
null
null
null
scripts/build.py
brunobord/stones
f473d5537213885d822063133c108dd47ef34569
[ "CC-BY-4.0" ]
null
null
null
#!/usr/bin/env python from string import Template from os.path import dirname, abspath, join from codecs import open import markdown root = abspath(dirname(__file__)) template_dir = join(root, '..', 'templates') target_dir = join(root, '..', 'docs') if __name__ == '__main__': with open(join(template_dir, 'base.ht...
30.3
66
0.613861
from string import Template from os.path import dirname, abspath, join from codecs import open import markdown root = abspath(dirname(__file__)) template_dir = join(root, '..', 'templates') target_dir = join(root, '..', 'docs') if __name__ == '__main__': with open(join(template_dir, 'base.html')) as fd: t...
true
true
f76053a44cbd69c28c8658426f3ac52932847265
10,395
py
Python
cpgames/modules/core/twentyfourpoint/twentyfourpoint.py
Wasabii88/Games
33262ca1958207a24e57e3532feded7e275b1dd1
[ "MIT" ]
1
2022-02-27T10:33:41.000Z
2022-02-27T10:33:41.000Z
cpgames/modules/core/twentyfourpoint/twentyfourpoint.py
beiwei365/Games
f6499f378802d3212a08aeca761191b58714b7f0
[ "MIT" ]
null
null
null
cpgames/modules/core/twentyfourpoint/twentyfourpoint.py
beiwei365/Games
f6499f378802d3212a08aeca761191b58714b7f0
[ "MIT" ]
null
null
null
''' Function: 24点小游戏 Author: Charles 微信公众号: Charles的皮卡丘 ''' import os import pygame from ...utils import QuitGame from fractions import Fraction from ..base import PygameBaseGame from .modules import Card, Button, game24Generator '''配置类''' class Config(): # 根目录 rootdir = os.path.split(os.path.absp...
44.04661
215
0.583357
import os import pygame from ...utils import QuitGame from fractions import Fraction from ..base import PygameBaseGame from .modules import Card, Button, game24Generator class Config(): rootdir = os.path.split(os.path.abspath(__file__))[0] FPS = 30 TITLE = '24点小游戏 —— Charles的皮卡丘' RED =...
true
true
f76053a893ac4821d3756c0df9a541bf7ed46fb0
369
py
Python
tuw_rqt_ordermanager/setup.py
sgermanserrano/tuw_multi_robot
97fba5f6d896f20d95445dfa719b4512296dffc0
[ "BSD-3-Clause" ]
146
2018-07-21T09:50:13.000Z
2022-03-31T22:49:01.000Z
tuw_rqt_ordermanager/setup.py
sgermanserrano/tuw_multi_robot
97fba5f6d896f20d95445dfa719b4512296dffc0
[ "BSD-3-Clause" ]
34
2018-09-28T09:54:23.000Z
2022-03-10T08:05:01.000Z
tuw_rqt_ordermanager/setup.py
sgermanserrano/tuw_multi_robot
97fba5f6d896f20d95445dfa719b4512296dffc0
[ "BSD-3-Clause" ]
79
2018-01-27T23:25:26.000Z
2022-03-31T22:51:36.000Z
# # ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup # fetch values from package.xml setup_args = generate_distutils_setup( packages=['tuw_rqt_ordermanager'], package_dir={'': 'src'}, requires=['nav_msg...
26.357143
62
0.747967
from distutils.core import setup from catkin_pkg.python_setup import generate_distutils_setup setup_args = generate_distutils_setup( packages=['tuw_rqt_ordermanager'], package_dir={'': 'src'}, requires=['nav_msgs', 'std_msgs', 'roscpp'] ) setup(**setup_args)
true
true
f76054600e57c51e72f6518cca028b063c2d04a3
559
py
Python
experimental/torchhub/setup.py
askintution/rikai
53a72a19beafc4097a816efb9cddd063e107e67a
[ "Apache-2.0" ]
1
2022-02-18T07:53:29.000Z
2022-02-18T07:53:29.000Z
experimental/torchhub/setup.py
askintution/rikai
53a72a19beafc4097a816efb9cddd063e107e67a
[ "Apache-2.0" ]
null
null
null
experimental/torchhub/setup.py
askintution/rikai
53a72a19beafc4097a816efb9cddd063e107e67a
[ "Apache-2.0" ]
null
null
null
from setuptools import find_namespace_packages, setup setup( name="rikai-torchhub", version="0.1.0", license="Apache License, Version 2.0", author="Rikai authors", author_email="rikai-dev@eto.ai", url="https://github.com/eto-ai/rikai", python_requires=">=3.7", install_requires=["rikai>=...
25.409091
62
0.576029
from setuptools import find_namespace_packages, setup setup( name="rikai-torchhub", version="0.1.0", license="Apache License, Version 2.0", author="Rikai authors", author_email="rikai-dev@eto.ai", url="https://github.com/eto-ai/rikai", python_requires=">=3.7", install_requires=["rikai>=...
true
true
f76054785aba8eeac09f4273125001656b7f59a9
14,175
py
Python
lg_utils.py
zhouliupku/LGtagging_LSTM
d66cbcac545d1dac59ae00c66f3f297d35db011e
[ "MIT" ]
3
2019-12-19T18:41:53.000Z
2021-04-15T21:49:27.000Z
lg_utils.py
cbdb-project/LGtagging_LSTM
4db0d34f7544913b75e66253ef63a08fb74cc993
[ "MIT" ]
null
null
null
lg_utils.py
cbdb-project/LGtagging_LSTM
4db0d34f7544913b75e66253ef63a08fb74cc993
[ "MIT" ]
2
2021-12-07T02:19:17.000Z
2022-03-20T20:37:05.000Z
# -*- coding: utf-8 -*- """ Created on Mon Oct 21 00:11:24 2019 @author: Zhou """ import os import re import pickle import numpy as np import pandas as pd import itertools import config def convert_to_orig(s): """ Convert string from database to corresponding original text """ return s.replace(' ', ...
38.104839
116
0.631887
import os import re import pickle import numpy as np import pandas as pd import itertools import config def convert_to_orig(s): return s.replace(' ', config.PADDING_CHAR) def concat_lists(ls): return list(itertools.chain.from_iterable(ls)) def random_separate(xs, percs): ns = list(map(int, [p * len(x...
true
true
f760554434622b69d34d97dc3719522820d08ec0
2,242
py
Python
script.mrknow.urlresolver/lib/urlresolver9/plugins/novamov.py
mrknow/filmkodi
0162cde9ae25ddbf4a69330948714833ff2f78c9
[ "Apache-2.0" ]
105
2015-11-28T00:03:11.000Z
2021-05-05T20:47:42.000Z
script.mrknow.urlresolver/lib/urlresolver9/plugins/novamov.py
rrosajp/filmkodi
0162cde9ae25ddbf4a69330948714833ff2f78c9
[ "Apache-2.0" ]
918
2015-11-28T14:12:40.000Z
2022-03-23T20:24:49.000Z
script.mrknow.urlresolver/lib/urlresolver9/plugins/novamov.py
rrosajp/filmkodi
0162cde9ae25ddbf4a69330948714833ff2f78c9
[ "Apache-2.0" ]
111
2015-12-01T14:06:10.000Z
2020-08-01T10:44:39.000Z
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 Updated by alifrezser (c) 2016 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at ...
35.03125
106
0.632471
import re from lib import helpers from urlresolver9 import common from urlresolver9.resolver import UrlResolver, ResolverError class NovamovResolver(UrlResolver): name = "novamov" domains = ['novamov.com', 'auroravid.to'] pattern = '(?://|\.)(novamov.com|auroravid.to)/(?:video/|embed/\?v=|embed\.php\?v=)(...
true
true
f7605575c90b58116a1d26e5cae928e7f86353f5
3,458
py
Python
class5/eapi_vlan.py
ktbyers/python_course
db288d2978b3d244a0d7d51a79dfbb5afc5dcbe8
[ "Apache-2.0" ]
24
2018-03-16T19:24:16.000Z
2022-01-05T09:18:07.000Z
class5/eapi_vlan.py
ktbyers/python_course
db288d2978b3d244a0d7d51a79dfbb5afc5dcbe8
[ "Apache-2.0" ]
null
null
null
class5/eapi_vlan.py
ktbyers/python_course
db288d2978b3d244a0d7d51a79dfbb5afc5dcbe8
[ "Apache-2.0" ]
29
2018-03-16T15:49:36.000Z
2022-03-16T14:44:32.000Z
#!/usr/bin/env python """ Using Arista's pyeapi, create a script that allows you to add a VLAN (both the VLAN ID and the VLAN name). Your script should first check that the VLAN ID is available and only add the VLAN if it doesn't already exist. Use VLAN IDs between 100 and 999. You should be able to call the script ...
31.436364
100
0.664546
from __future__ import unicode_literals, print_function import pyeapi import argparse import six def pyeapi_result(output): return output[0]['result'] def check_vlan_exists(eapi_conn, vlan_id): vlan_id = six.text_type(vlan_id) cmd = 'show vlan id {}'.format(vlan_id) try: response = eapi_conn...
true
true
f76056953874479e0ba60bcda629c823da2d11fd
2,138
py
Python
ebp/ebp/common/plot_utils/plot_2d.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
ebp/ebp/common/plot_utils/plot_2d.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
ebp/ebp/common/plot_utils/plot_2d.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
29.287671
74
0.677268
from __future__ import print_function from __future__ import division from __future__ import absolute_import import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np def plot_heatmap(pdf_func, out_name, size=3): w = 100 x = np.linspace(-size, size, w) y = np.linspace(-size, s...
true
true
f76056db61dd1ef8630041028f69847ce27a1d4b
1,219
py
Python
myCommands.py
CardiShire/PopulationInformativeMarkers
f251ede27b0e05b6d517f6881832f87fdf7a460d
[ "MIT" ]
null
null
null
myCommands.py
CardiShire/PopulationInformativeMarkers
f251ede27b0e05b6d517f6881832f87fdf7a460d
[ "MIT" ]
null
null
null
myCommands.py
CardiShire/PopulationInformativeMarkers
f251ede27b0e05b6d517f6881832f87fdf7a460d
[ "MIT" ]
null
null
null
"""This file can take all files in a directory. Input list of filenames. Output is a txt file of all possible combinations of unordered pairs of file input in the form of a unix command line to analyze with samtools mpileup and output an Fst file in .gz.""" import sys import itertools import os import datetime def s...
27.088889
82
0.701395
import sys import itertools import os import datetime def simplifyFilename(filename): whatevs = os.path.basename(filename) i = whatevs.find(".") if i < 0: return whatevs return whatevs [:i] arguments = sys.argv[1:] d = datetime.datetime.today() for combo in itertools.combinations(arguments, 2): f1 = sim...
true
true
f760583a0ebebc2461b85079ccbe7f4b379c4f02
2,003
py
Python
runtimes/python/bucket-cors-put.py
eweiter/package-cloud-object-storage
0b44cc60ce961c947618968bd4039c1609a232dd
[ "Apache-2.0" ]
null
null
null
runtimes/python/bucket-cors-put.py
eweiter/package-cloud-object-storage
0b44cc60ce961c947618968bd4039c1609a232dd
[ "Apache-2.0" ]
null
null
null
runtimes/python/bucket-cors-put.py
eweiter/package-cloud-object-storage
0b44cc60ce961c947618968bd4039c1609a232dd
[ "Apache-2.0" ]
null
null
null
# This action will put CORS Configuration information for a Cloud Object Storage bucket. # If the Cloud Object Storage service is not bound to this action or to the package # containing this action, then you must provide the service information as argument # input to this function. # Cloud Functions actions accept a si...
33.949153
179
0.689466
import sys import json import ibm_boto3 from ibm_botocore.client import Config def main(args): resultsGetParams = getParamsCOS(args) cos = resultsGetParams['cos'] params = resultsGetParams['params'] bucket = params['bucket'] corsConfig = params['corsConfig'] try: object = cos.put_bucket_cors( Buck...
true
true
f760583ece5807e4a028e2fb675ec70d4f9836db
50,863
py
Python
sdks/python/.tox/docs/lib/python2.7/site-packages/sphinx/environment/__init__.py
YYTVicky/kafka
b0f3eb276fa034b215570cd4f837851d9fb9166a
[ "Apache-2.0" ]
35
2016-09-22T22:53:14.000Z
2020-02-13T15:12:21.000Z
sdks/python/.tox/docs/lib/python2.7/site-packages/sphinx/environment/__init__.py
axbaretto/presto
f137d2709db42b5c3e4d43a631832a8f74853065
[ "Apache-2.0" ]
28
2020-03-04T22:01:48.000Z
2022-03-12T00:59:47.000Z
sdks/python/.tox/docs/lib/python2.7/site-packages/sphinx/environment/__init__.py
axbaretto/presto
f137d2709db42b5c3e4d43a631832a8f74853065
[ "Apache-2.0" ]
88
2016-11-27T02:16:11.000Z
2020-02-28T05:10:26.000Z
# -*- coding: utf-8 -*- """ sphinx.environment ~~~~~~~~~~~~~~~~~~ Global creation environment. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import os import sys import time import types import codecs import fnmatch from os ...
42.035537
93
0.582014
import re import os import sys import time import types import codecs import fnmatch from os import path from glob import glob from six import iteritems, itervalues, class_types, next from six.moves import cPickle as pickle from docutils import nodes from docutils.io import NullOutput from docutils.core import Publis...
true
true
f760584559f6422a545c7f70a850e0d37cd15b7f
7,497
py
Python
lib/rpn/proposal_target_layer.py
BryantLJ/py-faster-rcnn-pedestrian
fa9cdd9a2c075ab5f507fce4356a2ec3abc78331
[ "BSD-2-Clause" ]
4
2017-08-05T07:02:35.000Z
2018-04-15T12:47:02.000Z
lib/rpn/proposal_target_layer.py
BryantLJ/py-faster-rcnn-pedestrian
fa9cdd9a2c075ab5f507fce4356a2ec3abc78331
[ "BSD-2-Clause" ]
null
null
null
lib/rpn/proposal_target_layer.py
BryantLJ/py-faster-rcnn-pedestrian
fa9cdd9a2c075ab5f507fce4356a2ec3abc78331
[ "BSD-2-Clause" ]
null
null
null
# -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Sean Bell # -------------------------------------------------------- import caffe import yaml import numpy as np import nump...
38.25
85
0.651727
import caffe import yaml import numpy as np import numpy.random as npr from fast_rcnn.config import cfg from fast_rcnn.bbox_transform import bbox_transform from utils.cython_bbox import bbox_overlaps DEBUG = False class ProposalTargetLayer(caffe.Layer): """ Assign object detection proposals to ground-truth t...
false
true
f76058badb02dc68b9582a7d3c4748896f70e1c5
1,563
py
Python
coding_test_with_python/simulation_implement/a_46_1.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
coding_test_with_python/simulation_implement/a_46_1.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
coding_test_with_python/simulation_implement/a_46_1.py
mrbartrns/swacademy_structure
778f0546030385237c383d81ec37d5bd9ed1272d
[ "MIT" ]
null
null
null
# BOJ 16236 (아기상어) import heapq import sys from collections import deque sys.stdin = open('../input.txt', 'r') si = sys.stdin.readline dy = [-1, 1, 0, 0] dx = [0, 0, -1, 1] def bfs(y, x, size): que = deque() q = [] visited = [[False for _ in range(n)] for _ in range(n)] visited[y][x] = True que....
22.328571
72
0.488164
import heapq import sys from collections import deque sys.stdin = open('../input.txt', 'r') si = sys.stdin.readline dy = [-1, 1, 0, 0] dx = [0, 0, -1, 1] def bfs(y, x, size): que = deque() q = [] visited = [[False for _ in range(n)] for _ in range(n)] visited[y][x] = True que.append((y, x, 0)) ...
true
true
f760599568f1b7ff6f59f6d66477a9af03e43414
2,991
py
Python
csg_fileutil_libs/pydicom/benchmarks/bench_encaps.py
lrq3000/csg_datafusion
075279929a1025fc9333a34ffc33873ea7e8f3df
[ "MIT" ]
null
null
null
csg_fileutil_libs/pydicom/benchmarks/bench_encaps.py
lrq3000/csg_datafusion
075279929a1025fc9333a34ffc33873ea7e8f3df
[ "MIT" ]
null
null
null
csg_fileutil_libs/pydicom/benchmarks/bench_encaps.py
lrq3000/csg_datafusion
075279929a1025fc9333a34ffc33873ea7e8f3df
[ "MIT" ]
2
2018-12-10T15:15:51.000Z
2020-11-14T04:29:10.000Z
# Copyright 2008-2018 pydicom authors. See LICENSE file for details. """Benchmarks for the encaps module.""" from pydicom import dcmread from pydicom.data import get_testdata_files from pydicom.encaps import ( fragment_frame, itemise_frame, encapsulate, decode_data_sequence ) JP2K_10FRAME = get_testd...
33.606742
71
0.649281
from pydicom import dcmread from pydicom.data import get_testdata_files from pydicom.encaps import ( fragment_frame, itemise_frame, encapsulate, decode_data_sequence ) JP2K_10FRAME = get_testdata_files('emri_small_jpeg_2k_lossless.dcm')[0] class TimeFragmentFrame(object): def setup(self): ...
true
true
f76059bf1ea3a79865a9289a36cffee5c3af96cf
9,178
py
Python
tests/test_cookiecutter_generation.py
ilikerobots/cookiecutter-vue-django
1f364fa712be92c130a9ac69d1cc9d204a1e236f
[ "BSD-3-Clause" ]
112
2020-07-17T03:57:37.000Z
2022-03-27T04:06:36.000Z
tests/test_cookiecutter_generation.py
ilikerobots/cookiecutter-vue-django
1f364fa712be92c130a9ac69d1cc9d204a1e236f
[ "BSD-3-Clause" ]
49
2020-09-08T20:33:53.000Z
2022-03-24T05:04:03.000Z
tests/test_cookiecutter_generation.py
ilikerobots/cookiecutter-vue-django
1f364fa712be92c130a9ac69d1cc9d204a1e236f
[ "BSD-3-Clause" ]
20
2020-07-19T14:32:50.000Z
2022-01-09T02:42:47.000Z
import os import re import pytest from cookiecutter.exceptions import FailedHookException import sh import yaml from binaryornot.check import is_binary PATTERN = r"{{(\s?cookiecutter)[.](.*?)}}" RE_OBJ = re.compile(PATTERN) @pytest.fixture def context(): return { "project_name": "My Test Project", ...
36.420635
86
0.64197
import os import re import pytest from cookiecutter.exceptions import FailedHookException import sh import yaml from binaryornot.check import is_binary PATTERN = r"{{(\s?cookiecutter)[.](.*?)}}" RE_OBJ = re.compile(PATTERN) @pytest.fixture def context(): return { "project_name": "My Test Project", ...
true
true
f7605abd84821b28839b220601af30bd011e099b
2,136
py
Python
awanitron/log4s3/myhandler.py
awanitron/log4s3-
27e88f06bc2192a646dab6fd0a2bd9743e0d65fe
[ "CC0-1.0" ]
null
null
null
awanitron/log4s3/myhandler.py
awanitron/log4s3-
27e88f06bc2192a646dab6fd0a2bd9743e0d65fe
[ "CC0-1.0" ]
null
null
null
awanitron/log4s3/myhandler.py
awanitron/log4s3-
27e88f06bc2192a646dab6fd0a2bd9743e0d65fe
[ "CC0-1.0" ]
null
null
null
import requests import pdb from awsauth import S3Auth import logging import os from logging.handlers import RotatingFileHandler class FooBar(RotatingFileHandler) : def __init__(self, filename, mode='a', maxBytes=0,backupCount=0, encoding=None, delay=0) : RotatingFileHandler.__init__(self, filename, mode...
36.827586
98
0.570225
import requests import pdb from awsauth import S3Auth import logging import os from logging.handlers import RotatingFileHandler class FooBar(RotatingFileHandler) : def __init__(self, filename, mode='a', maxBytes=0,backupCount=0, encoding=None, delay=0) : RotatingFileHandler.__init__(self, filename, mode...
true
true
f7605bd814030bb4738d17f4dbf5be2610d80f80
18,072
py
Python
ibex/vendor/lowrisc_ip/util/dvsim/Scheduler.py
naomimotwani98/opentitan_soc
f0b696be328b9818ed04ebe4937d5d20794be7c0
[ "Apache-2.0" ]
3
2021-04-26T18:42:40.000Z
2021-06-10T19:07:29.000Z
ibex/vendor/lowrisc_ip/util/dvsim/Scheduler.py
naomimotwani98/opentitan_soc
f0b696be328b9818ed04ebe4937d5d20794be7c0
[ "Apache-2.0" ]
1
2021-05-10T04:44:37.000Z
2021-05-10T05:09:37.000Z
ibex/vendor/lowrisc_ip/util/dvsim/Scheduler.py
naomimotwani98/opentitan_soc
f0b696be328b9818ed04ebe4937d5d20794be7c0
[ "Apache-2.0" ]
2
2021-04-29T10:29:38.000Z
2021-06-05T15:03:36.000Z
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import logging as log import threading from signal import SIGINT, signal from Launcher import LauncherError from StatusPrinter import get_status_printer from Timer import ...
36.957055
83
0.562749
import logging as log import threading from signal import SIGINT, signal from Launcher import LauncherError from StatusPrinter import get_status_printer from Timer import Timer from utils import VERBOSE def sum_dict_lists(d): return sum([len(d[k]) for k in d]) class Scheduler: max_parallel = 16 ...
true
true
f7605bf82c8d35d5b82f8b7e21816596b9fb6430
4,722
py
Python
tests/conftest.py
4ndr3aR/depthai-python
b4fe1211d19280b2f2be8a43912ea818f6f4b5b3
[ "MIT" ]
182
2020-06-25T00:27:12.000Z
2022-03-31T05:06:04.000Z
tests/conftest.py
4ndr3aR/depthai-python
b4fe1211d19280b2f2be8a43912ea818f6f4b5b3
[ "MIT" ]
206
2020-07-28T22:32:14.000Z
2022-03-31T13:57:59.000Z
tests/conftest.py
4ndr3aR/depthai-python
b4fe1211d19280b2f2be8a43912ea818f6f4b5b3
[ "MIT" ]
102
2020-08-06T23:02:35.000Z
2022-03-24T19:43:30.000Z
# -*- coding: utf-8 -*- """pytest configuration Extends output capture as needed by pybind11: ignore constructors, optional unordered lines. Adds docstring and exceptions message sanitizers: ignore Python 2 vs 3 differences. """ import contextlib import difflib import gc import re import textwrap import pytest # Ea...
23.492537
92
0.626853
import contextlib import difflib import gc import re import textwrap import pytest import depthai_pybind11_tests _unicode_marker = re.compile(r"u(\'[^\']*\')") _long_marker = re.compile(r"([0-9])L") _hexadecimal = re.compile(r"0x[0-9a-fA-F]+") def _strip_and_dedent(s): return textwrap.dedent(s.lstrip("\n").rs...
true
true
f7605ccc85d106d06a0bf781c87c1e594f594d45
1,864
py
Python
test/MathAlgorithmTest.py
ryhoh/PrimesServer
1085ab7fb416f380f12f5af060a6f374e868a567
[ "MIT" ]
null
null
null
test/MathAlgorithmTest.py
ryhoh/PrimesServer
1085ab7fb416f380f12f5af060a6f374e868a567
[ "MIT" ]
null
null
null
test/MathAlgorithmTest.py
ryhoh/PrimesServer
1085ab7fb416f380f12f5af060a6f374e868a567
[ "MIT" ]
null
null
null
import unittest import sys sys.path.append('../src') from MathAlgorithm import * class MathAlgorithmTest(unittest.TestCase): """ eratosthenes(end: int) [2, end) の区間内の素数をリストに詰める 2以下の入力に対し空リストを返す """ def test_eratosthenes(self): self.assertEqual([], eratosthenes(-1)) ...
38.833333
66
0.5853
import unittest import sys sys.path.append('../src') from MathAlgorithm import * class MathAlgorithmTest(unittest.TestCase): def test_eratosthenes(self): self.assertEqual([], eratosthenes(-1)) self.assertEqual([], eratosthenes(0)) self.assertEqual([], ...
true
true
f7605ed29cc491760e8e8e62748a0e07af91f101
4,359
py
Python
2-qubit/generate_data.py
ewellchen/Entanglement_detection
6622ffbdfb09c12389af79e35a98b65b367f15f7
[ "MIT" ]
5
2020-09-16T08:12:43.000Z
2021-12-04T12:57:54.000Z
2-qubit/generate_data.py
ewellchen/Entanglement_detection
6622ffbdfb09c12389af79e35a98b65b367f15f7
[ "MIT" ]
null
null
null
2-qubit/generate_data.py
ewellchen/Entanglement_detection
6622ffbdfb09c12389af79e35a98b65b367f15f7
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import numpy as np from tools import mkdir # 1. Create a random Complex matrix H. # 2. Make it positive, and normalize to unity. class Generate_separable_state(object): def __init__(self, name='sep_train_set', size=10000, sub_dim=2, space_number=2, mix_num...
40.738318
121
0.542556
import numpy as np from tools import mkdir class Generate_separable_state(object): def __init__(self, name='sep_train_set', size=10000, sub_dim=2, space_number=2, mix_number=10): self.name = name self.size = size self.sub_dim = sub_dim self.space_number = space_number ...
true
true
f7605f40b5c4ec864a1bae68649f282268260528
5,011
py
Python
src/main/python/apache/aurora/client/api/command_runner.py
wickman/incubator-aurora
9906d217093568ed4c9cfe620862818f15ce4150
[ "Apache-2.0" ]
1
2016-05-01T20:17:24.000Z
2016-05-01T20:17:24.000Z
src/main/python/apache/aurora/client/api/command_runner.py
wickman/incubator-aurora
9906d217093568ed4c9cfe620862818f15ce4150
[ "Apache-2.0" ]
null
null
null
src/main/python/apache/aurora/client/api/command_runner.py
wickman/incubator-aurora
9906d217093568ed4c9cfe620862818f15ce4150
[ "Apache-2.0" ]
null
null
null
# # Copyright 2013 Apache Software 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 law or agree...
36.845588
97
0.724007
from multiprocessing.pool import ThreadPool import posixpath import subprocess from apache.aurora.client.api import AuroraClientAPI from apache.aurora.config.schema.base import MesosContext from apache.aurora.common.cluster import Cluster from apache.thermos.config.schema import ThermosContext from gen.apache.aurora...
false
true
f7605fd150d21f49288d2eb7dc4eeb4609f61239
489
py
Python
env/Lib/site-packages/plotly/validators/layout/yaxis/_rangemode.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
env/Lib/site-packages/plotly/validators/layout/yaxis/_rangemode.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
env/Lib/site-packages/plotly/validators/layout/yaxis/_rangemode.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="rangemode", parent_name="layout.yaxis", **kwargs): super(RangemodeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
37.615385
86
0.664622
import _plotly_utils.basevalidators class RangemodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="rangemode", parent_name="layout.yaxis", **kwargs): super(RangemodeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
true
true
f7605fef26604626f3c10b4c0b06967260a1ad73
71,219
py
Python
corehq/apps/domain/views/accounting.py
orangejenny-test/commcare-hq
4939322bb2941bea0fc75ec1e88585e478c16abf
[ "BSD-3-Clause" ]
null
null
null
corehq/apps/domain/views/accounting.py
orangejenny-test/commcare-hq
4939322bb2941bea0fc75ec1e88585e478c16abf
[ "BSD-3-Clause" ]
1
2021-06-02T04:45:16.000Z
2021-06-02T04:45:16.000Z
corehq/apps/domain/views/accounting.py
orangejenny-test/commcare-hq
4939322bb2941bea0fc75ec1e88585e478c16abf
[ "BSD-3-Clause" ]
null
null
null
import datetime import json from collections import namedtuple from decimal import Decimal from django.conf import settings from django.contrib import messages from django.core.exceptions import ValidationError from django.core.paginator import Paginator from django.core.validators import validate_email from django.db...
38.98139
115
0.624454
import datetime import json from collections import namedtuple from decimal import Decimal from django.conf import settings from django.contrib import messages from django.core.exceptions import ValidationError from django.core.paginator import Paginator from django.core.validators import validate_email from django.db...
true
true
f760604953989f838b099bb5a6dbce408d02e976
3,182
py
Python
utilities/tokenizer_from_wds_or_text.py
robvanvolt/DALLE-datasets
527e54aeac879bc4da669fa5c5b64c9354890728
[ "MIT" ]
60
2021-05-09T02:51:10.000Z
2022-03-27T06:36:04.000Z
utilities/tokenizer_from_wds_or_text.py
rom1504/DALLE-datasets
f0b039feb37abec68a81b9425fb71f94a713d9cf
[ "MIT" ]
4
2021-07-07T21:24:33.000Z
2021-11-17T21:54:17.000Z
utilities/tokenizer_from_wds_or_text.py
robvanvolt/DALLE-datasets
527e54aeac879bc4da669fa5c5b64c9354890728
[ "MIT" ]
9
2021-05-20T14:38:59.000Z
2022-02-18T11:51:20.000Z
import youtokentome as yttm import webdataset as wds from pathlib import Path import argparse import shutil import html import os parser = argparse.ArgumentParser("""Generate a custom tokenizer for your WebDataset files.""") parser.add_argument( "--source", type=str, default="./shards", help="Specif...
33.145833
101
0.578253
import youtokentome as yttm import webdataset as wds from pathlib import Path import argparse import shutil import html import os parser = argparse.ArgumentParser("""Generate a custom tokenizer for your WebDataset files.""") parser.add_argument( "--source", type=str, default="./shards", help="Specif...
true
true
f76060f9495aaeaee6efc248ad0c59f112ca3565
81,541
py
Python
sympy/functions/elementary/tests/test_trigonometric.py
lcontento/sympy
31d469a5335c81ec4a437e36a861945a6b43d916
[ "BSD-3-Clause" ]
null
null
null
sympy/functions/elementary/tests/test_trigonometric.py
lcontento/sympy
31d469a5335c81ec4a437e36a861945a6b43d916
[ "BSD-3-Clause" ]
null
null
null
sympy/functions/elementary/tests/test_trigonometric.py
lcontento/sympy
31d469a5335c81ec4a437e36a861945a6b43d916
[ "BSD-3-Clause" ]
null
null
null
from sympy import (symbols, Symbol, nan, oo, zoo, I, sinh, sin, pi, atan, acos, Rational, sqrt, asin, acot, coth, E, S, tan, tanh, cos, cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im, Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg, conjugate, series...
41.12002
151
0.54808
from sympy import (symbols, Symbol, nan, oo, zoo, I, sinh, sin, pi, atan, acos, Rational, sqrt, asin, acot, coth, E, S, tan, tanh, cos, cosh, atan2, exp, log, asinh, acoth, atanh, O, cancel, Matrix, re, im, Float, Pow, gcd, sec, csc, cot, diff, simplify, Heaviside, arg, conjugate, series...
true
true
f76061216e5014f6b9e264f607cbb18a19bb309a
7,199
py
Python
tests/test_advisory.py
spelletie/openVulnQuery
9b1d2d51f7d5290bc9e58c9ac435e5804d11fa08
[ "MIT" ]
17
2020-12-01T20:14:15.000Z
2022-02-06T02:47:06.000Z
tests/test_advisory.py
spelletie/openVulnQuery
9b1d2d51f7d5290bc9e58c9ac435e5804d11fa08
[ "MIT" ]
7
2020-12-13T17:56:18.000Z
2022-01-11T19:29:52.000Z
tests/test_advisory.py
spelletie/openVulnQuery
9b1d2d51f7d5290bc9e58c9ac435e5804d11fa08
[ "MIT" ]
5
2020-11-17T16:25:09.000Z
2021-11-05T11:41:23.000Z
import unittest from openVulnQuery import advisory from openVulnQuery import constants NA = constants.NA_INDICATOR IPS_SIG = constants.IPS_SIGNATURE_LABEL mock_advisory_title = "Mock Advisory Title" adv_cfg = { 'advisory_id': "Cisco-SA-20111107-CVE-2011-0941", 'sir': "Medium", 'first_published': "2011-11-0...
40.217877
78
0.655091
import unittest from openVulnQuery import advisory from openVulnQuery import constants NA = constants.NA_INDICATOR IPS_SIG = constants.IPS_SIGNATURE_LABEL mock_advisory_title = "Mock Advisory Title" adv_cfg = { 'advisory_id': "Cisco-SA-20111107-CVE-2011-0941", 'sir': "Medium", 'first_published': "2011-11-0...
true
true
f76062035d2fc747aaa6810ba34442a53ed19965
23,254
py
Python
homeassistant/components/netatmo/sensor.py
m2hofi94/home-assistant
288ae8b1e7cdbbdcb6d055eaea09445cc3dc4064
[ "Apache-2.0" ]
3
2020-05-18T10:18:16.000Z
2020-12-08T11:27:55.000Z
homeassistant/components/netatmo/sensor.py
m2hofi94/home-assistant
288ae8b1e7cdbbdcb6d055eaea09445cc3dc4064
[ "Apache-2.0" ]
1
2020-02-20T02:36:40.000Z
2020-02-21T19:15:48.000Z
homeassistant/components/netatmo/sensor.py
m2hofi94/home-assistant
288ae8b1e7cdbbdcb6d055eaea09445cc3dc4064
[ "Apache-2.0" ]
6
2020-04-10T06:21:11.000Z
2021-07-01T08:53:38.000Z
"""Support for the Netatmo Weather Service.""" import logging import threading from datetime import timedelta from time import time import pyatmo import requests import urllib3 import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA fro...
37.996732
88
0.541971
import logging import threading from datetime import timedelta from time import time import pyatmo import requests import urllib3 import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_NAME, ...
true
true
f760620faea8a121fd8acd8b3cb27e0f7c593896
10,756
py
Python
sdk/python/pulumi_azure_nextgen/network/v20160901/get_express_route_circuit.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20160901/get_express_route_circuit.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20160901/get_express_route_circuit.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
41.210728
371
0.682968
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetExpressRouteCircuitResult', 'AwaitableGetExpressRouteCircuitResult', 'get_express_route_circuit', ] @pulumi.output_type ...
true
true
f7606224d3b13ba9da8e682ba0f15539291695be
200
py
Python
cupyx/scipy/linalg/__init__.py
Dahlia-Chehata/cupy
1005f55075f89aa17e60074aaa6494ff8d033251
[ "MIT" ]
null
null
null
cupyx/scipy/linalg/__init__.py
Dahlia-Chehata/cupy
1005f55075f89aa17e60074aaa6494ff8d033251
[ "MIT" ]
4
2020-09-15T01:49:38.000Z
2020-12-11T03:52:35.000Z
cupyx/scipy/linalg/__init__.py
Dahlia-Chehata/cupy
1005f55075f89aa17e60074aaa6494ff8d033251
[ "MIT" ]
2
2018-07-21T13:44:26.000Z
2019-03-25T11:30:16.000Z
from cupyx.scipy.linalg.special_matrices import * # NOQA from cupyx.scipy.linalg.solve_triangular import solve_triangular # NOQA from cupyx.scipy.linalg.decomp_lu import lu_factor, lu_solve # NOQA
50
72
0.82
from cupyx.scipy.linalg.special_matrices import * from cupyx.scipy.linalg.solve_triangular import solve_triangular from cupyx.scipy.linalg.decomp_lu import lu_factor, lu_solve
true
true
f760628704f16f2939900aa0b9471852809c004e
3,938
py
Python
tatsu/parser_semantics.py
bookofproofs/TatSu
501875416c8c802bb518f35f1ae08d9ebf437af2
[ "BSD-2-Clause" ]
259
2017-05-22T04:33:21.000Z
2022-03-29T00:20:35.000Z
tatsu/parser_semantics.py
bookofproofs/TatSu
501875416c8c802bb518f35f1ae08d9ebf437af2
[ "BSD-2-Clause" ]
160
2017-05-30T01:28:58.000Z
2022-03-31T02:45:52.000Z
tatsu/parser_semantics.py
bookofproofs/TatSu
501875416c8c802bb518f35f1ae08d9ebf437af2
[ "BSD-2-Clause" ]
53
2017-05-22T05:00:58.000Z
2022-01-04T16:06:17.000Z
from __future__ import annotations from collections.abc import Sequence from . import grammars from .exceptions import FailedSemantics from .semantics import ModelBuilderSemantics from .util import eval_escapes, re, warning, flatten class EBNFGrammarSemantics(ModelBuilderSemantics): def __init__(self, grammar_n...
29.38806
105
0.592433
from __future__ import annotations from collections.abc import Sequence from . import grammars from .exceptions import FailedSemantics from .semantics import ModelBuilderSemantics from .util import eval_escapes, re, warning, flatten class EBNFGrammarSemantics(ModelBuilderSemantics): def __init__(self, grammar_n...
true
true
f76062f693cd4a790ee5d196b9ed1d40322c10db
253
py
Python
graphkke/graph/setup.py
KaterynaMelnyk/GraphKKE
4651f1a5e75e23ad0b84403151f7000ab8f292eb
[ "MIT" ]
1
2021-07-23T08:47:05.000Z
2021-07-23T08:47:05.000Z
graphkke/graph/setup.py
k-melnyk/graphKKE
4651f1a5e75e23ad0b84403151f7000ab8f292eb
[ "MIT" ]
null
null
null
graphkke/graph/setup.py
k-melnyk/graphKKE
4651f1a5e75e23ad0b84403151f7000ab8f292eb
[ "MIT" ]
null
null
null
from setuptools import setup, Extension GraphLib_c_ext = Extension('_GraphLib_c', sources = ['GraphLib_c.i'], swig_opts = ['-c++'], extra_compile_args = ['-std=c++11', '-O2'] ) setup(name='GraphLib_c', ext_modules=[GraphLib_c_ext])
23
46
0.656126
from setuptools import setup, Extension GraphLib_c_ext = Extension('_GraphLib_c', sources = ['GraphLib_c.i'], swig_opts = ['-c++'], extra_compile_args = ['-std=c++11', '-O2'] ) setup(name='GraphLib_c', ext_modules=[GraphLib_c_ext])
true
true
f76063f31376d823274c3c9995b471a8a4043063
11,428
py
Python
neural_structured_learning/examples/graph_keras_mlp_cora.py
srihari-humbarwadi/neural-structured-learning
345b8d644dd7745179263bf6dc9aeb8a921528f4
[ "Apache-2.0" ]
1
2021-01-13T03:41:12.000Z
2021-01-13T03:41:12.000Z
neural_structured_learning/examples/graph_keras_mlp_cora.py
srihari-humbarwadi/neural-structured-learning
345b8d644dd7745179263bf6dc9aeb8a921528f4
[ "Apache-2.0" ]
2
2021-08-25T15:11:38.000Z
2022-02-09T23:54:03.000Z
neural_structured_learning/examples/graph_keras_mlp_cora.py
srihari-humbarwadi/neural-structured-learning
345b8d644dd7745179263bf6dc9aeb8a921528f4
[ "Apache-2.0" ]
1
2020-08-03T20:51:51.000Z
2020-08-03T20:51:51.000Z
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.511182
80
0.69846
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl import app from absl import flags from absl import logging import attr import neural_structured_learning as nsl import tensorflow as tf FLAGS = flags.FLAGS FLAGS.showprefixforinfo = False flags.D...
true
true
f760651c500afb49a671ff2abdadcb37768902fa
2,114
py
Python
pettycash/management/commands/pettycash-recache.py
iBurnette/makerspaceleiden-crm
491f08688731016e69fed5444ff6d55edc69a438
[ "Apache-2.0" ]
null
null
null
pettycash/management/commands/pettycash-recache.py
iBurnette/makerspaceleiden-crm
491f08688731016e69fed5444ff6d55edc69a438
[ "Apache-2.0" ]
null
null
null
pettycash/management/commands/pettycash-recache.py
iBurnette/makerspaceleiden-crm
491f08688731016e69fed5444ff6d55edc69a438
[ "Apache-2.0" ]
null
null
null
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.core.mail import EmailMessage from django.db.models import Q from django.core.exceptions import ObjectDoesNotExist from pettycash.models import PettycashBalanceCache, PettycashTransaction from members.models...
32.030303
90
0.56386
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.core.mail import EmailMessage from django.db.models import Q from django.core.exceptions import ObjectDoesNotExist from pettycash.models import PettycashBalanceCache, PettycashTransaction from members.models...
true
true
f760653a83af1418c5e1724b2f2490007d9b6fc4
61,728
py
Python
dashboard/dashboard/add_histograms_test.py
chandakumari/catapult
7ae76b98cd134229b4008596d48d31f986cd0641
[ "BSD-3-Clause" ]
null
null
null
dashboard/dashboard/add_histograms_test.py
chandakumari/catapult
7ae76b98cd134229b4008596d48d31f986cd0641
[ "BSD-3-Clause" ]
5
2020-09-07T12:36:46.000Z
2022-03-02T05:49:30.000Z
dashboard/dashboard/add_histograms_test.py
chandakumari/catapult
7ae76b98cd134229b4008596d48d31f986cd0641
[ "BSD-3-Clause" ]
1
2020-07-25T00:02:48.000Z
2020-07-25T00:02:48.000Z
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import base64 import itertools import json impo...
37.916462
80
0.6418
from __future__ import print_function from __future__ import division from __future__ import absolute_import import base64 import itertools import json import mock import random import string import sys import webapp2 import webtest import zlib from google.appengine.ext import ndb from dashboard import add_histogra...
true
true
f760659e9fac8663b2372517bcd75a9e0fce2a40
1,241
py
Python
learning.py/try_except.py
jusdepatate/pieces-of-code
7728ca3e0576f9724359071688fad89d02aadf36
[ "Unlicense" ]
1
2020-03-21T13:10:52.000Z
2020-03-21T13:10:52.000Z
learning.py/try_except.py
jusdepatate/pieces-of-code
7728ca3e0576f9724359071688fad89d02aadf36
[ "Unlicense" ]
null
null
null
learning.py/try_except.py
jusdepatate/pieces-of-code
7728ca3e0576f9724359071688fad89d02aadf36
[ "Unlicense" ]
1
2020-04-18T18:00:51.000Z
2020-04-18T18:00:51.000Z
numerator = input("Enter the numerator: ") denominator = input("Enter the denominator: ") try: # try = try then catch the error, if something fail during execution of the code indented with try, it executes the code indented with except. numerator = int(numerator) denominator = int(denominator) except: ...
33.540541
146
0.705882
numerator = input("Enter the numerator: ") denominator = input("Enter the denominator: ") try: numerator = int(numerator) denominator = int(denominator) except: print("Error while converting values.") try: print(numerator / denominator) except NameError: print("One or more variable is not ...
true
true
f760665ae349c91189f0038d75b7bbf84c183370
1,657
py
Python
setup.py
tradewind886/lnd-grpc-client
397fece67a086275392fc878e946a1fcef292d20
[ "MIT" ]
39
2018-03-21T06:28:13.000Z
2022-01-28T09:31:07.000Z
setup.py
22388o/lnd-grpc-client
23893f601743b58ac65951c249fee58f3be486b5
[ "MIT" ]
25
2018-04-12T02:03:04.000Z
2022-01-26T17:28:07.000Z
setup.py
22388o/lnd-grpc-client
23893f601743b58ac65951c249fee58f3be486b5
[ "MIT" ]
15
2018-11-09T08:09:10.000Z
2022-01-28T09:31:28.000Z
import sys from codecs import open from os import path from setuptools import setup, find_packages install_requires = [ 'grpcio', 'grpcio-tools', 'googleapis-common-protos' ] exclude_packages = ['tests'] MAJOR = sys.version_info[0] MINOR = sys.version_info[1] # only include the async grpc client for pyth...
31.264151
87
0.658419
import sys from codecs import open from os import path from setuptools import setup, find_packages install_requires = [ 'grpcio', 'grpcio-tools', 'googleapis-common-protos' ] exclude_packages = ['tests'] MAJOR = sys.version_info[0] MINOR = sys.version_info[1] if MAJOR == 3 and MINOR >= 6: install_req...
true
true
f7606698bf99183dd06a136de3d499406f152a31
9,413
py
Python
venv/Lib/site-packages/pygame/tests/test_utils/async_sub.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
3
2021-07-09T17:12:01.000Z
2022-03-01T22:08:52.000Z
venv/Lib/site-packages/pygame/tests/test_utils/async_sub.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
7
2021-06-18T00:10:09.000Z
2022-03-28T21:10:20.000Z
venv/Lib/site-packages/pygame/tests/test_utils/async_sub.py
unbun/snake.ai
0c017357608dc7c06af0ca3ca57d870641461207
[ "MIT" ]
4
2021-03-24T07:28:37.000Z
2021-10-03T14:30:46.000Z
################################################################################ """ Modification of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440554 """ #################################### IMPORTS ################################### import os import platform import subprocess import errno import tim...
29.977707
100
0.491767
import os import platform import subprocess import errno import time import sys import unittest import tempfile def geterror(): return sys.exc_info()[1] if sys.version_info >= (3,): null_byte = "\x00".encode("ascii") else: null_byte = "\x00" if platform.system() == "Windows": if sys.version_info ...
true
true
f760673be678c2a3b6a91da08a66e6f20ec42448
4,457
py
Python
asposeslidescloud/models/sections.py
rizwanniazigroupdocs/aspose-slides-cloud-python
f692a7082387350f80f0b389c1914e33b800a76f
[ "MIT" ]
null
null
null
asposeslidescloud/models/sections.py
rizwanniazigroupdocs/aspose-slides-cloud-python
f692a7082387350f80f0b389c1914e33b800a76f
[ "MIT" ]
null
null
null
asposeslidescloud/models/sections.py
rizwanniazigroupdocs/aspose-slides-cloud-python
f692a7082387350f80f0b389c1914e33b800a76f
[ "MIT" ]
1
2020-12-25T16:28:49.000Z
2020-12-25T16:28:49.000Z
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose"> # Copyright (c) 2018 Aspose.Slides for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associa...
33.511278
93
0.597038
import pprint import re import six from asposeslidescloud.models.resource_base import ResourceBase class Sections(ResourceBase): swagger_types = { 'self_uri': 'ResourceUri', 'alternate_links': 'list[ResourceUri]', 'section_list': 'list[Section]' } attribute_map = { '...
true
true
f76067ce0ad9ad3e62af6706d2ced987b1d5b749
6,160
py
Python
tests/presentation/test_base.py
wyom1ng/atpbar
af3d398501206f1906cba984aeef1aacd2ce3222
[ "BSD-3-Clause" ]
72
2019-02-24T15:49:57.000Z
2022-03-27T19:38:38.000Z
tests/presentation/test_base.py
wyom1ng/atpbar
af3d398501206f1906cba984aeef1aacd2ce3222
[ "BSD-3-Clause" ]
24
2019-02-18T12:39:04.000Z
2022-01-19T02:14:56.000Z
tests/presentation/test_base.py
wyom1ng/atpbar
af3d398501206f1906cba984aeef1aacd2ce3222
[ "BSD-3-Clause" ]
10
2019-04-19T15:39:32.000Z
2022-01-08T16:57:42.000Z
# Tai Sakuma <tai.sakuma@gmail.com> import sys import pytest import unittest.mock as mock from atpbar.presentation.base import Presentation ##__________________________________________________________________|| class MockProgressBar(Presentation): def _present(self): pass ##_____________________________...
29.056604
70
0.628247
import sys import pytest import unittest.mock as mock from atpbar.presentation.base import Presentation class MockProgressBar(Presentation): def _present(self): pass @pytest.fixture() def mock_time(monkeypatch): ret = mock.Mock() module = sys.modules['atpbar.presentation.base'] monkeypatch.s...
true
true
f7606830ca6c82474d973395beffb0d9e09b57f6
20,167
py
Python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-02-01T18:50:12.000Z
2022-02-01T18:50:12.000Z
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/links/v2016_09_01/aio/operations/_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # 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) AutoRe...
43
287
0.651014
from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse f...
true
true
f76069221076d488a60e0d04fc56fff07cc68616
1,287
py
Python
azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-07-23T08:59:24.000Z
2018-07-23T08:59:24.000Z
azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-11-29T14:46:42.000Z
2018-11-29T14:46:42.000Z
azure-eventgrid/azure/eventgrid/models/event_grid_client_enums.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2018-08-28T14:36:47.000Z
2018-08-28T14:36:47.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
53.625
156
0.641026
from enum import Enum class JobState(str, Enum): canceled = "Canceled" canceling = "Canceling" error = "Error" finished = "Finished" processing = "Processing" queued = "Queued" scheduled = "Scheduled"
true
true
f76069839686d706236516e78d7423dd89235c31
811
py
Python
controllers/helpers/followers_helper.py
pattpattpatt/twitter_siphon
9affa8b9cd72521a255532ad344bc25ab8c5edc0
[ "MIT" ]
null
null
null
controllers/helpers/followers_helper.py
pattpattpatt/twitter_siphon
9affa8b9cd72521a255532ad344bc25ab8c5edc0
[ "MIT" ]
null
null
null
controllers/helpers/followers_helper.py
pattpattpatt/twitter_siphon
9affa8b9cd72521a255532ad344bc25ab8c5edc0
[ "MIT" ]
null
null
null
""" WORK IN PROGRESS """ # Imports from data.db_interface.read import ReadFromDatabase from data.db_interface.write import WriteToDatabase # Syncs the new followers with the DB follower list class FollowersHelper: def __init__(self, screen_name, new_followers): self.new_followers = new_followers ...
30.037037
74
0.709001
from data.db_interface.read import ReadFromDatabase from data.db_interface.write import WriteToDatabase class FollowersHelper: def __init__(self, screen_name, new_followers): self.new_followers = new_followers self.screen_name = screen_name self.reader = ReadFromDatabase('twitter_siphon',...
true
true
f7606a085784475a6d063f8746356c0ab39f4d38
44
py
Python
vega/algorithms/data_augmentation/cyclesr/__init__.py
qixiuai/vega
3e6588ea4aedb03e3594a549a97ffdb86adb88d1
[ "MIT" ]
null
null
null
vega/algorithms/data_augmentation/cyclesr/__init__.py
qixiuai/vega
3e6588ea4aedb03e3594a549a97ffdb86adb88d1
[ "MIT" ]
null
null
null
vega/algorithms/data_augmentation/cyclesr/__init__.py
qixiuai/vega
3e6588ea4aedb03e3594a549a97ffdb86adb88d1
[ "MIT" ]
null
null
null
from .cyclesr_trainer import CyclesrTrainer
22
43
0.886364
from .cyclesr_trainer import CyclesrTrainer
true
true
f7606a2af4b6abc290c97302e3514e549fad61c7
2,454
py
Python
sleuth_backend/views/error.py
ubclaunchpad/sleuth
7b7be0b7097a26169e17037f4220fd0ce039bde1
[ "MIT" ]
12
2017-09-17T02:14:35.000Z
2022-01-09T10:14:59.000Z
sleuth_backend/views/error.py
ubclaunchpad/sleuth
7b7be0b7097a26169e17037f4220fd0ce039bde1
[ "MIT" ]
92
2017-09-16T23:50:45.000Z
2018-01-02T01:56:33.000Z
sleuth_backend/views/error.py
ubclaunchpad/sleuth
7b7be0b7097a26169e17037f4220fd0ce039bde1
[ "MIT" ]
5
2017-12-26T01:47:36.000Z
2021-12-31T11:15:07.000Z
import json from enum import Enum class ErrorTypes(Enum): ''' Defines errors that can occur when making calls to the Sleuth API. This makes it easier for the front-end to handle errors appropriately. ''' # Occurs when an unexpected error occurs duing the handling of a request UNEXPECTED_SERVER_...
38.34375
82
0.648329
import json from enum import Enum class ErrorTypes(Enum): UNEXPECTED_SERVER_ERROR = 0 SOLR_CONNECTION_ERROR = 1 SOLR_SEARCH_ERROR = 2 INVALID_SEARCH_REQUEST = 3 INVALID_GETDOCUMENT_REQUEST = 4 class SleuthError(Exception): def __init__(self, error_type, message=None): ...
true
true
f7606b1fa1fc07afda26d772f008e9501dafff68
1,284
py
Python
eclipse/gephi_analysis/script.py
imlegend19/MDSN-DevRank
bb1b71f72d2fb97044a62e8e0152dadb88de6411
[ "MIT" ]
null
null
null
eclipse/gephi_analysis/script.py
imlegend19/MDSN-DevRank
bb1b71f72d2fb97044a62e8e0152dadb88de6411
[ "MIT" ]
null
null
null
eclipse/gephi_analysis/script.py
imlegend19/MDSN-DevRank
bb1b71f72d2fb97044a62e8e0152dadb88de6411
[ "MIT" ]
null
null
null
import pickle import openpyxl wb_obj = openpyxl.load_workbook("layer1.xlsx") sheet_obj = wb_obj.active layer = 1 degree = {} ec = {} close = {} harm_close = {} bet = {} pg = {} for i in range(2, sheet_obj.max_row+1): degree[sheet_obj.cell(i, 1).value] = sheet_obj.cell(i, 2).value close[sheet_obj.cell(i, 1)....
29.181818
92
0.665888
import pickle import openpyxl wb_obj = openpyxl.load_workbook("layer1.xlsx") sheet_obj = wb_obj.active layer = 1 degree = {} ec = {} close = {} harm_close = {} bet = {} pg = {} for i in range(2, sheet_obj.max_row+1): degree[sheet_obj.cell(i, 1).value] = sheet_obj.cell(i, 2).value close[sheet_obj.cell(i, 1)....
true
true
f7606b657f5e7bc8159e0c342d32f9337bb54078
2,354
py
Python
tensorflow/python/keras/datasets/cifar10.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
848
2019-12-03T00:16:17.000Z
2022-03-31T22:53:17.000Z
tensorflow/python/keras/datasets/cifar10.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
656
2019-12-03T00:48:46.000Z
2022-03-31T18:41:54.000Z
tensorflow/python/keras/datasets/cifar10.py
abhaikollara/tensorflow
4f96df3659696990cb34d0ad07dc67843c4225a9
[ "Apache-2.0" ]
506
2019-12-03T00:46:26.000Z
2022-03-30T10:34:56.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...
33.15493
80
0.697111
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np from tensorflow.python.keras import backend as K from tensorflow.python.keras.datasets.cifar import load_batch from tensorflow.python.keras.utils.data_utils import get_file from t...
true
true
f7606ba6c12542abfcc930ae426a61d755a75602
4,584
py
Python
logging/cloud-client/export.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
3
2021-01-24T23:42:57.000Z
2021-02-17T12:02:12.000Z
logging/cloud-client/export.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
320
2020-11-08T21:02:43.000Z
2022-02-10T10:43:29.000Z
logging/cloud-client/export.py
yshalabi/python-docs-samples
591787c01d94102ba9205f998d95a05b39ccad2f
[ "Apache-2.0" ]
3
2019-02-11T16:16:11.000Z
2019-04-19T21:34:37.000Z
#!/usr/bin/env python # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
31.39726
79
0.695462
import argparse from google.cloud import logging def list_sinks(): logging_client = logging.Client() sinks = list(logging_client.list_sinks()) if not sinks: print('No sinks.') for sink in sinks: print('{}: {} -> {}'.format(sink.name, sink.filter_, sink.destination)) def create_...
true
true
f7606ce47c987a837175a227085c03bea92f2035
21,636
py
Python
research/syntaxnet/dragnn/python/wrapped_units.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
research/syntaxnet/dragnn/python/wrapped_units.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
research/syntaxnet/dragnn/python/wrapped_units.py
Dzinushi/models_1_4
d7e72793a68c1667d403b1542c205d1cd9b1d17c
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
42.843564
90
0.647439
import abc import tensorflow as tf from dragnn.python import network_units as dragnn from syntaxnet.util import check def capture_variables(function, scope_name): created_vars = {} def _custom_getter(getter, *args, **kwargs): real_variable = getter(*args, **kwargs) created_vars[real_v...
true
true
f7606dd8fcde43f6bb03f3692327bb2e576d3c14
194
py
Python
tests/tck/steps/test_tck.py
wenhaocs/nebula
326b856cdf44fcaf67d3883073dc9412a9e3eebd
[ "Apache-2.0" ]
8,586
2019-05-15T07:25:51.000Z
2022-03-31T13:49:27.000Z
tests/tck/steps/test_tck.py
wenhaocs/nebula
326b856cdf44fcaf67d3883073dc9412a9e3eebd
[ "Apache-2.0" ]
3,078
2019-05-15T08:14:02.000Z
2022-03-31T11:39:51.000Z
tests/tck/steps/test_tck.py
wenhaocs/nebula
326b856cdf44fcaf67d3883073dc9412a9e3eebd
[ "Apache-2.0" ]
880
2019-05-15T07:36:10.000Z
2022-03-31T03:43:02.000Z
# Copyright (c) 2020 vesoft inc. All rights reserved. # # This source code is licensed under Apache 2.0 License. from pytest_bdd import scenarios scenarios('features', 'openCypher/features')
21.555556
56
0.762887
from pytest_bdd import scenarios scenarios('features', 'openCypher/features')
true
true
f7606e842379826ba07e9f98eb1f63d67c15ab70
5,969
py
Python
serial_scripts/floatingip/test_mx.py
atsgen/tf-test
2748fcd81491450c75dadc71849d2a1c11061029
[ "Apache-2.0" ]
5
2020-09-29T00:36:57.000Z
2022-02-16T06:51:32.000Z
serial_scripts/floatingip/test_mx.py
atsgen/tf-test
2748fcd81491450c75dadc71849d2a1c11061029
[ "Apache-2.0" ]
27
2019-11-02T02:18:34.000Z
2022-02-24T18:49:08.000Z
serial_scripts/floatingip/test_mx.py
atsgen/tf-test
2748fcd81491450c75dadc71849d2a1c11061029
[ "Apache-2.0" ]
20
2019-11-28T16:02:25.000Z
2022-01-06T05:56:58.000Z
from __future__ import absolute_import # Need to import path to test/fixtures and test/scripts/ # Ex : export PYTHONPATH='$PATH:/root/test/fixtures/:/root/test/scripts/' # # To run tests, you can do 'python -m testtools.run mx_tests'. To run specific tests, # You can do 'python -m testtools.run -l mx_test' # Set the en...
39.793333
108
0.692578
from __future__ import absolute_import from . import base import os from common.openstack_libs import nova_client as mynovaclient from common.openstack_libs import nova_exception as novaException import unittest import fixtures import testtools import socket import test from common.contrail_test_init import ContrailTes...
true
true
f7606f034cb1730ea7cfc0acb693759870c141ac
1,403
py
Python
video/cloud-client/analyze/analyze_test.py
spitfire55/python-docs-samples
b8fe0d1c5c9f7f5d27965fa3367117af7b1f0aed
[ "Apache-2.0" ]
1
2019-11-17T08:59:14.000Z
2019-11-17T08:59:14.000Z
video/cloud-client/analyze/analyze_test.py
spitfire55/python-docs-samples
b8fe0d1c5c9f7f5d27965fa3367117af7b1f0aed
[ "Apache-2.0" ]
16
2019-06-15T00:02:56.000Z
2021-03-25T23:22:38.000Z
video/cloud-client/analyze/analyze_test.py
spitfire55/python-docs-samples
b8fe0d1c5c9f7f5d27965fa3367117af7b1f0aed
[ "Apache-2.0" ]
3
2019-02-11T16:16:11.000Z
2019-04-19T21:34:37.000Z
#!/usr/bin/env python # Copyright 2017 Google, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
28.632653
74
0.739843
import pytest import analyze @pytest.mark.slow def test_analyze_shots(capsys): analyze.analyze_shots('gs://demomaker/gbikes_dinosaur.mp4') out, _ = capsys.readouterr() assert 'Shot 1:' in out @pytest.mark.slow def test_analyze_labels(capsys): analyze.analyze_labels('gs://demomaker/cat.mp4') o...
true
true
f76070855ae66adc403dbf3fe737bc5fd24a6549
3,777
py
Python
sitebase/service/search.py
jianingy/sitebase
7afe00b7e2c642461207786e9ab851e1d3b59015
[ "BSD-3-Clause" ]
1
2021-02-19T06:31:43.000Z
2021-02-19T06:31:43.000Z
sitebase/service/search.py
jianingy/sitebase
7afe00b7e2c642461207786e9ab851e1d3b59015
[ "BSD-3-Clause" ]
null
null
null
sitebase/service/search.py
jianingy/sitebase
7afe00b7e2c642461207786e9ab851e1d3b59015
[ "BSD-3-Clause" ]
2
2015-09-18T02:21:32.000Z
2021-02-19T06:31:47.000Z
from ujson import decode as json_decode, encode as json_encode from twisted.web.resource import Resource from twisted.web.server import NOT_DONE_YET from twisted.internet import defer from twisted.python import log from twisted.python.failure import Failure from sitebase.backend.postgres import dbBackend from sitebase...
37.029412
77
0.599682
from ujson import decode as json_decode, encode as json_encode from twisted.web.resource import Resource from twisted.web.server import NOT_DONE_YET from twisted.internet import defer from twisted.python import log from twisted.python.failure import Failure from sitebase.backend.postgres import dbBackend from sitebase...
true
true
f76070a8b8eebdac557e450689ef2f8715175d5f
1,284
py
Python
tests/chemistry/test_morgan_fingerprint.py
vishalbelsare/pyjanitor
9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb
[ "MIT" ]
674
2018-03-04T22:59:51.000Z
2021-03-22T10:08:58.000Z
tests/chemistry/test_morgan_fingerprint.py
vishalbelsare/pyjanitor
9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb
[ "MIT" ]
737
2018-03-05T01:03:15.000Z
2021-03-22T23:55:27.000Z
tests/chemistry/test_morgan_fingerprint.py
vishalbelsare/pyjanitor
9c5ff2c4ad5969ee4bc683ba82010b55b55fd2bb
[ "MIT" ]
176
2018-03-14T23:00:56.000Z
2021-03-24T19:32:34.000Z
import importlib import pytest from helpers import running_on_ci import janitor.chemistry # noqa: disable=unused-import # Skip all tests if rdkit not installed pytestmark = pytest.mark.skipif( (importlib.util.find_spec("rdkit") is None) & ~running_on_ci(), reason="rdkit tests only required for CI", ) @pyt...
30.571429
72
0.69704
import importlib import pytest from helpers import running_on_ci import janitor.chemistry pytestmark = pytest.mark.skipif( (importlib.util.find_spec("rdkit") is None) & ~running_on_ci(), reason="rdkit tests only required for CI", ) @pytest.mark.chemistry def test_morgan_fingerprint_counts(chemdf): mor...
true
true
f7607128a24fd8ddcc591a9103941c4c849bbafa
2,002
py
Python
challenge5/data/image_folder.py
derInformatiker/AIcrowd-AIBlitz8-Solution
7733acd2f412403139b77b866062c2b870f8f76f
[ "Apache-2.0" ]
2
2021-05-28T14:23:18.000Z
2021-06-02T04:48:01.000Z
challenge5/data/image_folder.py
derInformatiker/AIcrowd-AIBlitz8-Solution
7733acd2f412403139b77b866062c2b870f8f76f
[ "Apache-2.0" ]
null
null
null
challenge5/data/image_folder.py
derInformatiker/AIcrowd-AIBlitz8-Solution
7733acd2f412403139b77b866062c2b870f8f76f
[ "Apache-2.0" ]
null
null
null
############################################################################### # Code from # https://github.com/pytorch/vision/blob/master/torchvision/datasets/folder.py # Modified the original code so that it also loads images from the current # directory as well as the subdirectories ###########################...
30.333333
80
0.53047
import torch.utils.data as data from PIL import Image import os IMG_EXTENSIONS = [ '.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP', '.tiff' ] def is_image_file(filename): return any(filename.endswith(extension) for extension in IMG_EXTENSIONS) def make_dat...
true
true
f760714e81bb6df7e745de98bcf67e00f14f608f
584
py
Python
mysite/polls/admin.py
3ng7n33r/DjangoTutorial
0885d3d9468292c0bf81f5a5fd508fae2c1a482c
[ "MIT" ]
1
2021-04-12T06:18:30.000Z
2021-04-12T06:18:30.000Z
mysite/polls/admin.py
3ng7n33r/DjangoTutorial
0885d3d9468292c0bf81f5a5fd508fae2c1a482c
[ "MIT" ]
8
2021-03-30T12:26:39.000Z
2021-09-22T18:31:51.000Z
mysite/polls/admin.py
3ng7n33r/DjangoTutorial
0885d3d9468292c0bf81f5a5fd508fae2c1a482c
[ "MIT" ]
15
2021-01-23T16:09:27.000Z
2021-02-07T18:07:45.000Z
from django.contrib import admin from .models import Choice, Question class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': [ 'p...
24.333333
74
0.643836
from django.contrib import admin from .models import Choice, Question class ChoiceInline(admin.TabularInline): model = Choice extra = 3 class QuestionAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question_text']}), ('Date information', {'fields': [ 'p...
true
true
f7607164f4850a885909c968202e3678cc8f8b42
432
py
Python
Algo and DSA/LeetCode-Solutions-master/Python/maximum-depth-of-binary-tree.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
3,269
2018-10-12T01:29:40.000Z
2022-03-31T17:58:41.000Z
Algo and DSA/LeetCode-Solutions-master/Python/maximum-depth-of-binary-tree.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
53
2018-12-16T22:54:20.000Z
2022-02-25T08:31:20.000Z
Algo and DSA/LeetCode-Solutions-master/Python/maximum-depth-of-binary-tree.py
Sourav692/FAANG-Interview-Preparation
f523e5c94d582328b3edc449ea16ac6ab28cdc81
[ "Unlicense" ]
1,236
2018-10-12T02:51:40.000Z
2022-03-30T13:30:37.000Z
# Time: O(n) # Space: O(h), h is height of binary tree class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): # @param root, a tree node # @return an integer def maxDepth(self, root): if root is None: ...
22.736842
79
0.571759
class TreeNode(object): def __init__(self, x): self.val = x self.left = None self.right = None class Solution(object): def maxDepth(self, root): if root is None: return 0 else: return max(self.maxDepth(root.left), self.maxDepth(root.right...
true
true
f7607199703efa0e95036f5871044282b899a6c0
10,841
py
Python
rtsp_to_webrtc/web_client.py
allenporter/rtsp-to-webrtc-client
9466432f8e1ac21740c46c6b0536e57f379b402f
[ "Apache-2.0" ]
2
2022-01-04T21:17:30.000Z
2022-03-02T10:19:32.000Z
rtsp_to_webrtc/web_client.py
allenporter/rtsp-to-webrtc-client
9466432f8e1ac21740c46c6b0536e57f379b402f
[ "Apache-2.0" ]
57
2021-11-22T05:09:59.000Z
2022-03-29T22:34:54.000Z
rtsp_to_webrtc/web_client.py
allenporter/rtsp-to-webrtc-client
9466432f8e1ac21740c46c6b0536e57f379b402f
[ "Apache-2.0" ]
null
null
null
"""Client library for RTSPtoWebserver.""" from __future__ import annotations import base64 import enum import hashlib import logging from typing import Any, Dict, List, Mapping, Optional, cast from urllib.parse import urljoin import aiohttp from .diagnostics import WEB_DIAGNOSTICS as DIAGNOSTICS from .exceptions im...
36.625
90
0.611844
from __future__ import annotations import base64 import enum import hashlib import logging from typing import Any, Dict, List, Mapping, Optional, cast from urllib.parse import urljoin import aiohttp from .diagnostics import WEB_DIAGNOSTICS as DIAGNOSTICS from .exceptions import ClientError, ResponseError from .inte...
true
true
f76072a7aa64b686c338792e5bcc288692556f24
2,607
py
Python
Pre_Processing/Skewness/src/correctSkewnessBatch.py
evamok/knowledge-extraction-recipes-forms
d42dc5a728d72fabc6a0c568834ef6786deb9116
[ "MIT" ]
93
2020-08-03T10:23:43.000Z
2022-03-23T15:41:22.000Z
Pre_Processing/Skewness/src/correctSkewnessBatch.py
ciph3rwoman/knowledge-extraction-recipes-forms
ce1adbb0515d1b598ba89a4a06dd3cf554230565
[ "MIT" ]
11
2020-08-05T06:49:21.000Z
2022-02-01T10:00:25.000Z
Pre_Processing/Skewness/src/correctSkewnessBatch.py
ciph3rwoman/knowledge-extraction-recipes-forms
ce1adbb0515d1b598ba89a4a06dd3cf554230565
[ "MIT" ]
39
2020-08-05T14:48:43.000Z
2022-02-12T05:12:11.000Z
#!/usr/bin/python # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json import logging import os from flask_restful.reqparse import RequestParser from flask_restful_swagger_2 import swagger, Resource import common.request_processor as request_processor from doten...
31.792683
155
0.619102
import json import logging import os from flask_restful.reqparse import RequestParser from flask_restful_swagger_2 import swagger, Resource import common.request_processor as request_processor from dotenv import load_dotenv load_dotenv() STORAGE_NAME = os.environ['STORAGE_NAME'] STORAGE_KEY = os.environ['STORAGE...
true
true
f76072f1ec83ebb78d3af88da3d782e1d1b81523
467
py
Python
Python/pybenchmark.py
magnopaz/benchmarks
47e55538be286e988b3edb3237ec24da25d95db1
[ "MIT" ]
null
null
null
Python/pybenchmark.py
magnopaz/benchmarks
47e55538be286e988b3edb3237ec24da25d95db1
[ "MIT" ]
null
null
null
Python/pybenchmark.py
magnopaz/benchmarks
47e55538be286e988b3edb3237ec24da25d95db1
[ "MIT" ]
null
null
null
import math from time import perf_counter def is_prime(num): if num == 2: return True if num <= 1 or not num % 2: return False for div in range(3,int(math.sqrt(num)+1),2): if not num % div: return False return True def benchtest(): ...
21.227273
52
0.541756
import math from time import perf_counter def is_prime(num): if num == 2: return True if num <= 1 or not num % 2: return False for div in range(3,int(math.sqrt(num)+1),2): if not num % div: return False return True def benchtest(): ...
true
true
f760744516d70dd894cfe729ac1d9010691bb3a3
8,363
py
Python
python_modules/libraries/dagster-aws/dagster_aws_tests/ecs_tests/launcher_tests/conftest.py
silentsokolov/dagster
510bf07bf6906294d5a239d60079c88211002ebf
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-aws/dagster_aws_tests/ecs_tests/launcher_tests/conftest.py
silentsokolov/dagster
510bf07bf6906294d5a239d60079c88211002ebf
[ "Apache-2.0" ]
null
null
null
python_modules/libraries/dagster-aws/dagster_aws_tests/ecs_tests/launcher_tests/conftest.py
silentsokolov/dagster
510bf07bf6906294d5a239d60079c88211002ebf
[ "Apache-2.0" ]
null
null
null
# pylint: disable=redefined-outer-name, unused-argument import json import warnings from collections import namedtuple from contextlib import contextmanager import boto3 import pytest from dagster import ExperimentalWarning from dagster.core.test_utils import in_process_test_workspace, instance_for_test from dagster....
26.298742
100
0.636016
import json import warnings from collections import namedtuple from contextlib import contextmanager import boto3 import pytest from dagster import ExperimentalWarning from dagster.core.test_utils import in_process_test_workspace, instance_for_test from dagster.core.types.loadable_target_origin import LoadableTargetO...
true
true