hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7f23bdb20754a464e4e503f005161be4a936b44
1,431
py
Python
tests/test_basicfit.py
FaustinCarter/lmfit-py
7fbb75b2fd3f383e78692fd85c9a646793d4b071
[ "BSD-3-Clause" ]
null
null
null
tests/test_basicfit.py
FaustinCarter/lmfit-py
7fbb75b2fd3f383e78692fd85c9a646793d4b071
[ "BSD-3-Clause" ]
null
null
null
tests/test_basicfit.py
FaustinCarter/lmfit-py
7fbb75b2fd3f383e78692fd85c9a646793d4b071
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from lmfit import minimize, Parameters, Parameter, report_fit from lmfit_testutils import assert_paramval, assert_paramattr def test_basic(): # create data to be fitted x = np.linspace(0, 15, 301) data = (5. * np.sin(2 * x - 0.1) * np.exp(-x*x*0.025) + np.random.normal(size=...
29.8125
68
0.61775
import numpy as np from lmfit import minimize, Parameters, Parameter, report_fit from lmfit_testutils import assert_paramval, assert_paramattr def test_basic(): x = np.linspace(0, 15, 301) data = (5. * np.sin(2 * x - 0.1) * np.exp(-x*x*0.025) + np.random.normal(size=len(x), scale=0.2) ) ...
true
true
f7f23be0328782031ec2f4cad70681a82e68a8d8
1,963
py
Python
tests/test_PrettyDuration.py
ryanharvey1/nelpy
403759eb4e43e5e6eb9f77d6904c72cf28c9e550
[ "MIT" ]
30
2017-11-09T14:58:11.000Z
2022-02-27T14:35:47.000Z
tests/test_PrettyDuration.py
ryanharvey1/nelpy
403759eb4e43e5e6eb9f77d6904c72cf28c9e550
[ "MIT" ]
112
2017-08-13T20:05:15.000Z
2020-02-02T21:00:03.000Z
tests/test_PrettyDuration.py
ryanharvey1/nelpy
403759eb4e43e5e6eb9f77d6904c72cf28c9e550
[ "MIT" ]
20
2017-08-12T20:26:32.000Z
2021-12-10T13:50:42.000Z
from nelpy.utils import PrettyDuration class TestPrettyDuration: def test_1(self): t = PrettyDuration(180) assert str(t) == '3:00 minutes' def test_2(self): t = PrettyDuration(179.999999) assert str(t) == '3:00 minutes' def test_3(self): t = PrettyDur...
32.180328
66
0.606215
from nelpy.utils import PrettyDuration class TestPrettyDuration: def test_1(self): t = PrettyDuration(180) assert str(t) == '3:00 minutes' def test_2(self): t = PrettyDuration(179.999999) assert str(t) == '3:00 minutes' def test_3(self): t = PrettyDur...
true
true
f7f23cb9c23c2ac6d49f446b2e0b09006550a74d
8,294
py
Python
run.py
kflu/benchmark
4bf35cf7034a5319d402fa046558cb1a8c6d1a11
[ "BSD-3-Clause" ]
null
null
null
run.py
kflu/benchmark
4bf35cf7034a5319d402fa046558cb1a8c6d1a11
[ "BSD-3-Clause" ]
null
null
null
run.py
kflu/benchmark
4bf35cf7034a5319d402fa046558cb1a8c6d1a11
[ "BSD-3-Clause" ]
null
null
null
""" A lightweight runner that just sets up a model and runs one of its functions in a particular configuration. Intended for debugging/exploration/profiling use cases, where the test/measurement harness is overhead. DANGER: make sure to `python install.py` first or otherwise make sure the benchmark you are going to r...
43.197917
118
0.652158
import argparse import time import numpy as np import torch.profiler as profiler from torchbenchmark import load_model_by_name import torch WARMUP_ROUNDS = 3 def run_one_step_with_cudastreams(func, streamcount): print("Running Utilization Scaling Using Cuda Streams") streamlist = [] for i in range(1, s...
true
true
f7f23ce45472e6bafb587feea606a8faa304f63c
2,299
py
Python
wolfbot.py
brrr2/lykos
40f9d9c04a4e7ae46236a0334bc4a3169c66961d
[ "BSD-2-Clause" ]
null
null
null
wolfbot.py
brrr2/lykos
40f9d9c04a4e7ae46236a0334bc4a3169c66961d
[ "BSD-2-Clause" ]
null
null
null
wolfbot.py
brrr2/lykos
40f9d9c04a4e7ae46236a0334bc4a3169c66961d
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2011 Jimmy Cao # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, mer...
39.637931
96
0.662462
import sys if sys.version_info < (3, 2): print('Python 3.2 or newer is required to run the bot.') sys.exit(1) from oyoyo.client import IRCClient import botconfig import time import traceback import modules.common import tools def main(): cli = IRCClient( {"privmsg...
true
true
f7f23dca501f902672d8fe401d1a90139b2b6279
56,982
py
Python
cinder/volume/drivers/hitachi/vsp_horcm.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/hitachi/vsp_horcm.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
cinder/volume/drivers/hitachi/vsp_horcm.py
mail2nsrajesh/cinder
a688b872bec6d1abd4dcd852bdb8e8a921369d2e
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2016, Hitachi, Ltd. # # 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...
39.653445
79
0.585957
import functools import math import os import re from oslo_config import cfg from oslo_config import types from oslo_log import log as logging from oslo_service import loopingcall from oslo_utils import excutils from oslo_utils import timeutils from oslo_utils import units import six from six.moves impo...
true
true
f7f23e08baeb1b6df2f645d23d7639a4ef3b319a
6,961
py
Python
tools/make_test_data.py
shahbazn/ceilometer
6308a46f14b21fb39c0e728c150ab4efde5b532a
[ "Apache-2.0" ]
null
null
null
tools/make_test_data.py
shahbazn/ceilometer
6308a46f14b21fb39c0e728c150ab4efde5b532a
[ "Apache-2.0" ]
null
null
null
tools/make_test_data.py
shahbazn/ceilometer
6308a46f14b21fb39c0e728c150ab4efde5b532a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2012 New Dream Network, LLC (DreamHost) # # 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 requ...
29.621277
79
0.604367
import argparse import datetime import logging import random import sys import uuid from oslo_config import cfg from oslo_utils import timeutils from ceilometer.publisher import utils from ceilometer import sample from ceilometer import storage def make_test_data(name, meter_type, unit, volume, rand...
true
true
f7f23ea7e5d6e6ecd8c99aa2105e4565c869fcdd
583
py
Python
python/underscore.py
mythnc/lab
9f69482a063e3cfce2ce8832c2ef1425658c31b9
[ "MIT" ]
null
null
null
python/underscore.py
mythnc/lab
9f69482a063e3cfce2ce8832c2ef1425658c31b9
[ "MIT" ]
null
null
null
python/underscore.py
mythnc/lab
9f69482a063e3cfce2ce8832c2ef1425658c31b9
[ "MIT" ]
null
null
null
class Test: def __init__(self): self.foo = 11 self._bar = 23 self.__baz = 42 def get_gg(self): return __gg class ExtendedTest(Test): def __init__(self): super().__init__() self.foo = 'overridden foo' self._bar = 'overridden _bar' self.__baz ...
18.806452
39
0.576329
class Test: def __init__(self): self.foo = 11 self._bar = 23 self.__baz = 42 def get_gg(self): return __gg class ExtendedTest(Test): def __init__(self): super().__init__() self.foo = 'overridden foo' self._bar = 'overridden _bar' self.__baz ...
true
true
f7f23ec1d5ab54c48d9f1fcf05a1540569f0d9d6
116
py
Python
next_burger_house/__init__.py
ayushsubedi/next_burger_house
269064a01b621e91807043c64927f0398a099002
[ "MIT" ]
null
null
null
next_burger_house/__init__.py
ayushsubedi/next_burger_house
269064a01b621e91807043c64927f0398a099002
[ "MIT" ]
7
2022-01-07T01:20:10.000Z
2022-01-09T08:07:49.000Z
next_burger_house/__init__.py
ayushsubedi/next_burger_house
269064a01b621e91807043c64927f0398a099002
[ "MIT" ]
2
2022-01-07T20:07:01.000Z
2022-01-09T08:21:21.000Z
from flask import Flask from os import environ application = Flask(__name__) from next_burger_house import routes
16.571429
36
0.827586
from flask import Flask from os import environ application = Flask(__name__) from next_burger_house import routes
true
true
f7f23f7f6980b2d4cde6d92c1dd66c86ffebccd0
1,917
py
Python
Miscellaneous/findbookleave.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
2
2018-01-18T11:01:36.000Z
2021-12-20T18:14:48.000Z
Miscellaneous/findbookleave.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
null
null
null
Miscellaneous/findbookleave.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
null
null
null
class Solution: def __init__(self, N): self.n = N # Auxilary DS to store left/right occupied room for a given occupied room # Useful in updating heap when book() or leave() is called self.left_occupied = {} self.right_occupied = {} # root element stores longest fre...
31.42623
81
0.548774
class Solution: def __init__(self, N): self.n = N self.left_occupied = {} self.right_occupied = {} self._heap = [] def find_place(self): optimal_slot = self._heap.top() l, r = optimal_slot.left_occupied, optimal...
true
true
f7f23ff7fd8b83e4f5de53a156a46493c8be3216
4,973
py
Python
DataStructures-Algorithms/Udacity-Python-DSA/Projects/Project1-Data-Structures/problem-1-lru-cache.py
shoaibur/SWE
1e114a2750f2df5d6c50b48c8e439224894d65da
[ "MIT" ]
1
2020-11-14T18:28:13.000Z
2020-11-14T18:28:13.000Z
DataStructures-Algorithms/Udacity-Python-DSA/Projects/Project1-Data-Structures/problem-1-lru-cache.py
shoaibur/SWE
1e114a2750f2df5d6c50b48c8e439224894d65da
[ "MIT" ]
null
null
null
DataStructures-Algorithms/Udacity-Python-DSA/Projects/Project1-Data-Structures/problem-1-lru-cache.py
shoaibur/SWE
1e114a2750f2df5d6c50b48c8e439224894d65da
[ "MIT" ]
null
null
null
class LRUcache: def __init__(self, capacity=5): self.cache_size = capacity self.cache_maps = {} # Idea for get/put operations: keys of the python dict are # stored in the order at which they were added, e.g. first # added key is dict.keys()[0], and so on. def get(self, ...
42.144068
66
0.617736
class LRUcache: def __init__(self, capacity=5): self.cache_size = capacity self.cache_maps = {} def get(self, key): if key in self.cache_maps: value = self.cache_maps[key] self.cache_maps.pop(key) ...
true
true
f7f23ffe95a824cee3976ffc90b61775b525c44a
2,657
py
Python
binding_operations.py
tommccoy1/tpdn
a4ea54030056a49e5fd00a700eb71790157bc697
[ "MIT" ]
18
2018-12-25T21:03:02.000Z
2022-01-07T17:56:20.000Z
binding_operations.py
tommccoy1/tpdn
a4ea54030056a49e5fd00a700eb71790157bc697
[ "MIT" ]
null
null
null
binding_operations.py
tommccoy1/tpdn
a4ea54030056a49e5fd00a700eb71790157bc697
[ "MIT" ]
3
2019-02-15T17:55:30.000Z
2022-01-31T19:10:06.000Z
import torch import torch.nn as nn from torch.autograd import Variable from torch import optim import torch.nn.functional as F import numpy as np import pickle # Defines various functions for binding fillers and roles # Defines the tensor product, used in tensor product representations class SumFlattenedOuterProduct...
27.677083
93
0.640196
import torch import torch.nn as nn from torch.autograd import Variable from torch import optim import torch.nn.functional as F import numpy as np import pickle class SumFlattenedOuterProduct(nn.Module): def __init__(self): super(SumFlattenedOuterProduct, self).__init__() def forward(sel...
true
true
f7f2400e2e5bba9f91e67397c371b842b5d9093c
23,515
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_network_profiles_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_network_profiles_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/operations/_network_profiles_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
47.892057
190
0.66043
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f7f2403f7c14bbff69a3358808010d60ecbedfe0
90,218
py
Python
openmdao/core/tests/test_approx_derivs.py
naylor-b/blue
d7d7e8d63212c047a7a9b0625da98aa29ddc39b4
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_approx_derivs.py
naylor-b/blue
d7d7e8d63212c047a7a9b0625da98aa29ddc39b4
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_approx_derivs.py
naylor-b/blue
d7d7e8d63212c047a7a9b0625da98aa29ddc39b4
[ "Apache-2.0" ]
null
null
null
""" Testing for group finite differencing.""" import itertools import unittest from six import iterkeys from six.moves import range try: from parameterized import parameterized except ImportError: from openmdao.utils.assert_utils import SkipParameterized as parameterized import numpy as np import openmdao.ap...
39.259356
110
0.556829
import itertools import unittest from six import iterkeys from six.moves import range try: from parameterized import parameterized except ImportError: from openmdao.utils.assert_utils import SkipParameterized as parameterized import numpy as np import openmdao.api as om from openmdao.test_suite.components.im...
true
true
f7f240a1b71d81d7d59b7e5389bce15e1c151430
1,097
py
Python
exeteraeval/execute_hdf_pandas_t_to_p_join_scenario.py
KCL-BMEIS/ExeTeraEval
c6ef1485aff08fba17cd328a76fcc398c757255d
[ "Apache-2.0" ]
null
null
null
exeteraeval/execute_hdf_pandas_t_to_p_join_scenario.py
KCL-BMEIS/ExeTeraEval
c6ef1485aff08fba17cd328a76fcc398c757255d
[ "Apache-2.0" ]
null
null
null
exeteraeval/execute_hdf_pandas_t_to_p_join_scenario.py
KCL-BMEIS/ExeTeraEval
c6ef1485aff08fba17cd328a76fcc398c757255d
[ "Apache-2.0" ]
null
null
null
import resource import sys import time import numpy as np import pandas as pd def go(l_filename, r_filename): t0 = time.time() l_df = pd.read_hdf(l_filename) left_read = time.time() - t0 print("left dataframe read in {}".format(left_read)) t0 = time.time() r_df = pd.read_hdf(r_filename) right_read = t...
26.756098
78
0.669098
import resource import sys import time import numpy as np import pandas as pd def go(l_filename, r_filename): t0 = time.time() l_df = pd.read_hdf(l_filename) left_read = time.time() - t0 print("left dataframe read in {}".format(left_read)) t0 = time.time() r_df = pd.read_hdf(r_filename) right_read = t...
true
true
f7f240a45ff750fd9e9ebe2c3f538c32d8d1bfc7
1,483
py
Python
tests/nemo_text_processing/vi/test_money.py
hamjam/NeMo
b3484d32e1317666151f931bfa39867d88ed8658
[ "Apache-2.0" ]
4,145
2019-09-13T08:29:43.000Z
2022-03-31T18:31:44.000Z
tests/nemo_text_processing/vi/test_money.py
hamjam/NeMo
b3484d32e1317666151f931bfa39867d88ed8658
[ "Apache-2.0" ]
2,031
2019-09-17T16:51:39.000Z
2022-03-31T23:52:41.000Z
tests/nemo_text_processing/vi/test_money.py
hamjam/NeMo
b3484d32e1317666151f931bfa39867d88ed8658
[ "Apache-2.0" ]
1,041
2019-09-13T10:08:21.000Z
2022-03-30T06:37:38.000Z
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. 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 requ...
40.081081
111
0.769386
import pytest from nemo_text_processing.inverse_text_normalization.inverse_normalize import InverseNormalizer from parameterized import parameterized from ..utils import CACHE_DIR, PYNINI_AVAILABLE, parse_test_case_file class TestMoney: inverse_normalizer = ( InverseNormalizer(lang='vi', c...
true
true
f7f2414ce470b4aab74e32d6123d3fb03da763a4
572
py
Python
CommonTools/ParticleFlow/python/pfJets_cff.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
CommonTools/ParticleFlow/python/pfJets_cff.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
CommonTools/ParticleFlow/python/pfJets_cff.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms from CommonTools.ParticleFlow.ParticleSelectors.ptMinPFJetSelector_cfi import ptMinPFJets as pfJets from CommonTools.ParticleFlow.Tools.jetTools import jetAlgo #allPfJets = RecoJets.JetProducers.ic5PFJets_cfi.iterativeCone5PFJets.clone() pfJets = jetAlgo('AK4') pfJetsPtrs = ...
26
99
0.706294
import FWCore.ParameterSet.Config as cms from CommonTools.ParticleFlow.ParticleSelectors.ptMinPFJetSelector_cfi import ptMinPFJets as pfJets from CommonTools.ParticleFlow.Tools.jetTools import jetAlgo pfJets = jetAlgo('AK4') pfJetsPtrs = cms.EDProducer("PFJetFwdPtrProducer", src=cms.Inp...
true
true
f7f241b2e2c82afe730693a925b15982e7324e40
4,380
py
Python
cap2/extensions/experimental/covid/align_to_covid_genome.py
jsam356/CAP2
a76661b089de96b86511d1b0bd86e17680a4db20
[ "MIT" ]
9
2020-07-10T15:45:12.000Z
2022-01-19T10:44:13.000Z
cap2/extensions/experimental/covid/align_to_covid_genome.py
jsam356/CAP2
a76661b089de96b86511d1b0bd86e17680a4db20
[ "MIT" ]
14
2020-06-15T16:04:54.000Z
2022-03-12T01:05:47.000Z
cap2/extensions/experimental/covid/align_to_covid_genome.py
jsam356/CAP2
a76661b089de96b86511d1b0bd86e17680a4db20
[ "MIT" ]
5
2021-01-05T01:26:48.000Z
2022-01-23T11:20:49.000Z
import luigi import logging import subprocess import logging from os.path import join, dirname, basename from .covid_genome_db import CovidGenomeDb from ....pipeline.utils.cap_task import CapTask from ....pipeline.config import PipelineConfig from ....pipeline.utils.conda import CondaPackage from ....pipeline.prepro...
28.441558
90
0.563699
import luigi import logging import subprocess import logging from os.path import join, dirname, basename from .covid_genome_db import CovidGenomeDb from ....pipeline.utils.cap_task import CapTask from ....pipeline.config import PipelineConfig from ....pipeline.utils.conda import CondaPackage from ....pipeline.prepro...
true
true
f7f241c462f4c50f742ad6928be08cb003594561
1,148
py
Python
leetcode/85.Maximal-Rectangle.py
sogapalag/problems
0ea7d65448e1177f8b3f81124a82d187980d659c
[ "MIT" ]
1
2020-04-04T14:56:12.000Z
2020-04-04T14:56:12.000Z
leetcode/85.Maximal-Rectangle.py
sogapalag/problems
0ea7d65448e1177f8b3f81124a82d187980d659c
[ "MIT" ]
null
null
null
leetcode/85.Maximal-Rectangle.py
sogapalag/problems
0ea7d65448e1177f8b3f81124a82d187980d659c
[ "MIT" ]
null
null
null
class Solution(object): def maximalRectangle(self, matrix): """ :type matrix: List[List[str]] :rtype: int """ # related to 84.py if not matrix: return 0 m, n = len(matrix), len(matrix[0]) max_area = 0 for i in range(m): ...
33.764706
59
0.398084
class Solution(object): def maximalRectangle(self, matrix): if not matrix: return 0 m, n = len(matrix), len(matrix[0]) max_area = 0 for i in range(m): stack = [(0, 0)] res = 0 for j in range(n): ...
true
true
f7f241e298822475e8fab99ac95f631377b3423c
1,467
py
Python
peek/es_api_spec/spec_json.py
ywangd/peek
25d196b614acaf9c2f9fe4b8fea36a06554950cd
[ "MIT" ]
16
2020-08-31T02:06:23.000Z
2022-01-31T23:56:44.000Z
peek/es_api_spec/spec_json.py
ywangd/peek
25d196b614acaf9c2f9fe4b8fea36a06554950cd
[ "MIT" ]
97
2020-08-27T14:51:32.000Z
2021-10-21T00:19:31.000Z
peek/es_api_spec/spec_json.py
ywangd/peek
25d196b614acaf9c2f9fe4b8fea36a06554950cd
[ "MIT" ]
1
2021-02-07T13:10:38.000Z
2021-02-07T13:10:38.000Z
import json import logging import os _logger = logging.getLogger(__name__) def load_json_specs(kibana_dir): oss_path = os.path.join( kibana_dir, 'src', 'plugins', 'console', 'server', 'lib', 'spec_definitions') xpack_path = os.path.join( kibana_dir, 'x-pack', 'plugins', 'console_extensions', ...
34.116279
99
0.534424
import json import logging import os _logger = logging.getLogger(__name__) def load_json_specs(kibana_dir): oss_path = os.path.join( kibana_dir, 'src', 'plugins', 'console', 'server', 'lib', 'spec_definitions') xpack_path = os.path.join( kibana_dir, 'x-pack', 'plugins', 'console_extensions', ...
true
true
f7f242f0149fa5808354cc9208e1c86808418e15
1,731
py
Python
Classification/attack_algo.py
VITA-Group/CV_A-FAN
d5cc54bfea4636868b192ac2a628ac74446db88f
[ "MIT" ]
13
2021-03-24T02:13:39.000Z
2022-02-07T11:08:43.000Z
Classification/attack_algo.py
VITA-Group/CV_A-FAN
d5cc54bfea4636868b192ac2a628ac74446db88f
[ "MIT" ]
1
2022-01-10T22:08:49.000Z
2022-01-10T22:08:49.000Z
Classification/attack_algo.py
VITA-Group/CV_A-FAN
d5cc54bfea4636868b192ac2a628ac74446db88f
[ "MIT" ]
1
2021-06-21T17:18:06.000Z
2021-06-21T17:18:06.000Z
import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import pdb import numpy as np def tensor_clamp(t, min, max, in_place=True): if not in_place: res = t.clone() else: res = t idx = res.data < min res.data[idx] = min[idx] ...
29.338983
133
0.614096
import torch import torch.nn as nn from torch.autograd import Variable import torch.nn.functional as F import pdb import numpy as np def tensor_clamp(t, min, max, in_place=True): if not in_place: res = t.clone() else: res = t idx = res.data < min res.data[idx] = min[idx] ...
true
true
f7f243b4aad7ee0dd1c2d586c81aa4edc8a2ce1e
99,669
py
Python
custom/ckan/ckan/logic/action/get.py
lynxlab/ckanext-lait
baee73a89ca587c391befaf9a95f070ff77f49ec
[ "Apache-2.0" ]
null
null
null
custom/ckan/ckan/logic/action/get.py
lynxlab/ckanext-lait
baee73a89ca587c391befaf9a95f070ff77f49ec
[ "Apache-2.0" ]
null
null
null
custom/ckan/ckan/logic/action/get.py
lynxlab/ckanext-lait
baee73a89ca587c391befaf9a95f070ff77f49ec
[ "Apache-2.0" ]
null
null
null
'''API functions for searching for and getting data from CKAN.''' import uuid import logging import json import datetime import socket from pylons import config import sqlalchemy import ckan.lib.dictization import ckan.logic as logic import ckan.logic.action import ckan.logic.schema import ckan.lib.dictization.model...
33.660588
95
0.659583
import uuid import logging import json import datetime import socket from pylons import config import sqlalchemy import ckan.lib.dictization import ckan.logic as logic import ckan.logic.action import ckan.logic.schema import ckan.lib.dictization.model_dictize as model_dictize import ckan.lib.navl.dictization_functio...
true
true
f7f243d30ae5741f7a3087f6b4ed4aea4312a32c
1,980
py
Python
bot.py
Vaughan-Esports/MovieTime
00979f0a629e9b0f358115b9a2e22e93b186f1d1
[ "MIT" ]
null
null
null
bot.py
Vaughan-Esports/MovieTime
00979f0a629e9b0f358115b9a2e22e93b186f1d1
[ "MIT" ]
2
2022-01-13T03:42:41.000Z
2022-03-12T00:57:15.000Z
bot.py
Vaughan-Esports/MovieTime
00979f0a629e9b0f358115b9a2e22e93b186f1d1
[ "MIT" ]
null
null
null
import asyncio import os from os.path import join, dirname import discord from discord.ext import commands from dotenv import load_dotenv from movietime import tiktok_blur from imgur import upload from settings import * # discord gateway intents intents = discord.Intents.default() allowed_mentions = discord.Allowed...
29.552239
81
0.629293
import asyncio import os from os.path import join, dirname import discord from discord.ext import commands from dotenv import load_dotenv from movietime import tiktok_blur from imgur import upload from settings import * intents = discord.Intents.default() allowed_mentions = discord.AllowedMentions(everyone=False, ...
true
true
f7f2447383b6d5424b406f256b73745ed1124af7
1,426
py
Python
api/lcp/hash.py
tdilauro/simplified-circulation
f52d333616f63e2bff0cf1de98ef301bf152fba1
[ "Apache-2.0" ]
null
null
null
api/lcp/hash.py
tdilauro/simplified-circulation
f52d333616f63e2bff0cf1de98ef301bf152fba1
[ "Apache-2.0" ]
null
null
null
api/lcp/hash.py
tdilauro/simplified-circulation
f52d333616f63e2bff0cf1de98ef301bf152fba1
[ "Apache-2.0" ]
null
null
null
import hashlib from abc import ABCMeta, abstractmethod from enum import Enum from core.exceptions import BaseError class HashingAlgorithm(Enum): SHA256 = 'http://www.w3.org/2001/04/xmlenc#sha256' SHA512 = 'http://www.w3.org/2001/04/xmlenc#sha512' class HashingError(BaseError): """Raised in the case of...
29.102041
97
0.715989
import hashlib from abc import ABCMeta, abstractmethod from enum import Enum from core.exceptions import BaseError class HashingAlgorithm(Enum): SHA256 = 'http://www.w3.org/2001/04/xmlenc#sha256' SHA512 = 'http://www.w3.org/2001/04/xmlenc#sha512' class HashingError(BaseError): class Hasher(object): ...
true
true
f7f2453dabdf230e3a6155d11ae3f271523c4ede
1,506
py
Python
users/factories.py
mitodl/mitxonline
adf6084b1f4addd57473153ed6bd08ea09bc4685
[ "BSD-3-Clause" ]
null
null
null
users/factories.py
mitodl/mitxonline
adf6084b1f4addd57473153ed6bd08ea09bc4685
[ "BSD-3-Clause" ]
420
2021-07-13T14:58:52.000Z
2022-03-31T20:50:10.000Z
users/factories.py
mitodl/mitx-online
adf6084b1f4addd57473153ed6bd08ea09bc4685
[ "BSD-3-Clause" ]
1
2021-07-25T21:28:32.000Z
2021-07-25T21:28:32.000Z
"""Factory for Users""" from factory import ( Faker, RelatedFactory, SubFactory, Trait, fuzzy, ) from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyText from social_django.models import UserSocialAuth from users.models import GENDER_CHOICES, LegalAddress, Profile, User c...
22.818182
81
0.699867
from factory import ( Faker, RelatedFactory, SubFactory, Trait, fuzzy, ) from factory.django import DjangoModelFactory from factory.fuzzy import FuzzyText from social_django.models import UserSocialAuth from users.models import GENDER_CHOICES, LegalAddress, Profile, User class UserFactory(DjangoM...
true
true
f7f2453e3fd0cb0d8b70c8946adcafea187684b7
5,651
py
Python
hider/timegan/modules/model_utils.py
mcps5601/TimeGAN-tensorflow2
6f68f9ae9d9eb6f7f9e0992a5dde75c697fc0655
[ "MIT" ]
1
2021-04-16T07:20:05.000Z
2021-04-16T07:20:05.000Z
hider/timegan/modules/model_utils.py
mcps5601/TimeGAN-tensorflow2
6f68f9ae9d9eb6f7f9e0992a5dde75c697fc0655
[ "MIT" ]
1
2021-08-09T10:52:25.000Z
2021-08-09T10:52:25.000Z
hider/timegan/modules/model_utils.py
mcps5601/TimeGAN-tensorflow2
6f68f9ae9d9eb6f7f9e0992a5dde75c697fc0655
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np from .layer_norm_module import LSTMLNCell, LSTMLN import json def train_test_divide(data_x, data_x_hat, data_t, data_t_hat, train_rate = 0.8): """Divide train and test data for both original and synthetic data. Args: data_x: original_data data_x_hat: ...
30.711957
98
0.61989
import tensorflow as tf import numpy as np from .layer_norm_module import LSTMLNCell, LSTMLN import json def train_test_divide(data_x, data_x_hat, data_t, data_t_hat, train_rate = 0.8): total_num = len(data) idx = np.random.permutation(total_num) train_idx = idx[:int(total_num * train_rate)] test...
true
true
f7f245d9d8f587ad190758590eff1aa48eff5d94
64,027
py
Python
tests/test_activate.py
areading314/conda
c9aa50360af308048f57bc2d1c9ae5707e057e3b
[ "BSD-3-Clause" ]
null
null
null
tests/test_activate.py
areading314/conda
c9aa50360af308048f57bc2d1c9ae5707e057e3b
[ "BSD-3-Clause" ]
null
null
null
tests/test_activate.py
areading314/conda
c9aa50360af308048f57bc2d1c9ae5707e057e3b
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from datetime import datetime from logging import getLogger import os from os.path import dirname, isdir, join import sys from tempfile import gettempdir from unittest import TestCase from uuid import uuid4 from...
41.929928
176
0.573102
from __future__ import absolute_import, division, print_function, unicode_literals from datetime import datetime from logging import getLogger import os from os.path import dirname, isdir, join import sys from tempfile import gettempdir from unittest import TestCase from uuid import uuid4 from conda import CONDA_PAC...
false
true
f7f247fd37ffe50adacab011773fea744f484d95
284,947
py
Python
tests/admin_views/tests.py
mackong/django
40ff93310f03dc89a6281a846b1a1ec4cb672bd0
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/admin_views/tests.py
mackong/django
40ff93310f03dc89a6281a846b1a1ec4cb672bd0
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/admin_views/tests.py
mackong/django
40ff93310f03dc89a6281a846b1a1ec4cb672bd0
[ "PSF-2.0", "BSD-3-Clause" ]
1
2018-05-22T10:10:35.000Z
2018-05-22T10:10:35.000Z
import datetime import os import re import unittest from urllib.parse import parse_qsl, urljoin, urlparse import pytz from django.contrib.admin import AdminSite, ModelAdmin from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.models import ADDITION, DELETION, LogEntry from django.co...
46.92803
119
0.651739
import datetime import os import re import unittest from urllib.parse import parse_qsl, urljoin, urlparse import pytz from django.contrib.admin import AdminSite, ModelAdmin from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.models import ADDITION, DELETION, LogEntry from django.co...
true
true
f7f24888cbf5774159dca6b716915c6b0a40f292
15,922
py
Python
hessen/trainingdb/views_show.py
shagun30/djambala-2
06f14e3dd237d7ebf535c62172cfe238c3934f4d
[ "BSD-3-Clause" ]
null
null
null
hessen/trainingdb/views_show.py
shagun30/djambala-2
06f14e3dd237d7ebf535c62172cfe238c3934f4d
[ "BSD-3-Clause" ]
null
null
null
hessen/trainingdb/views_show.py
shagun30/djambala-2
06f14e3dd237d7ebf535c62172cfe238c3934f4d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ /dms/hessen/trainingdb/views_show.py .. zeigt die Inhalte der Fortbildungsdatenbank an Django content Management System Hans Rauch hans.rauch@gmx.net Die Programme des dms-Systems koennen frei genutzt und den spezifischen Beduerfnissen entsprechend angepasst werden. 0.01 18.02....
46.967552
106
0.656199
from django.template.loader import get_template from django.template import Context from django import newforms as forms from django.shortcuts import render_to_response from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from dms.utils_form import g...
true
true
f7f24955f40ac5563db1a93ea62b63e7c2029d1a
66,793
py
Python
robot/Cumulus/resources/NPSP.py
jtconrad/NPSP
a91e66e6bfdf55ce0e3d3dedbe770ec3483dee3f
[ "BSD-3-Clause" ]
null
null
null
robot/Cumulus/resources/NPSP.py
jtconrad/NPSP
a91e66e6bfdf55ce0e3d3dedbe770ec3483dee3f
[ "BSD-3-Clause" ]
null
null
null
robot/Cumulus/resources/NPSP.py
jtconrad/NPSP
a91e66e6bfdf55ce0e3d3dedbe770ec3483dee3f
[ "BSD-3-Clause" ]
null
null
null
import logging import warnings import time import random import string from datetime import datetime from robot.libraries.BuiltIn import RobotNotRunningError from selenium.common.exceptions import ElementNotInteractableException from selenium.common.exceptions import StaleElementReferenceException from selenium.commo...
46.77381
145
0.626907
import logging import warnings import time import random import string from datetime import datetime from robot.libraries.BuiltIn import RobotNotRunningError from selenium.common.exceptions import ElementNotInteractableException from selenium.common.exceptions import StaleElementReferenceException from selenium.commo...
true
true
f7f2495c72f7c5580b91bfdafaa18b25dca9e5e8
2,590
py
Python
recognize_faces_image.py
Selva-Subramanian/FaceRecognition-FaceDetection
6c6439cf080ac254e1dbf4f1ad034696fca6dad8
[ "MIT" ]
null
null
null
recognize_faces_image.py
Selva-Subramanian/FaceRecognition-FaceDetection
6c6439cf080ac254e1dbf4f1ad034696fca6dad8
[ "MIT" ]
null
null
null
recognize_faces_image.py
Selva-Subramanian/FaceRecognition-FaceDetection
6c6439cf080ac254e1dbf4f1ad034696fca6dad8
[ "MIT" ]
null
null
null
# import the necessary packages import face_recognition import argparse import pickle import cv2 # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-e", "--encodings", required=True, help="path to serialized db of facial encodings") ap.add_argument("-i", "-...
35.972222
70
0.702703
import face_recognition import argparse import pickle import cv2 ap = argparse.ArgumentParser() ap.add_argument("-e", "--encodings", required=True, help="path to serialized db of facial encodings") ap.add_argument("-i", "--image", required=True, help="path to input image") ap.add_argument("-d", "--detectio...
true
true
f7f249d4c1d9c2ac480da1f39e73b4abb2ea30f9
5,996
py
Python
continuity/cli/utils.py
jzempel/continuity
a42a78c3961d8a0e51a2ff7ddffcc10c958c2923
[ "BSD-3-Clause" ]
13
2015-02-25T18:03:09.000Z
2019-10-23T09:01:53.000Z
continuity/cli/utils.py
jzempel/continuity
a42a78c3961d8a0e51a2ff7ddffcc10c958c2923
[ "BSD-3-Clause" ]
15
2015-01-21T17:22:30.000Z
2017-12-16T01:42:17.000Z
continuity/cli/utils.py
jzempel/continuity
a42a78c3961d8a0e51a2ff7ddffcc10c958c2923
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ continuity.cli.utils ~~~~~~~~~~~~~~~~~~~~ Continuity command line utilities. :copyright: 2015 by Jonathan Zempel. :license: BSD, see LICENSE for more details. """ from clint.textui import puts as _puts from curses.ascii import ctrl, CR, EOT, ETX, isctrl, LF from getch....
29.24878
79
0.59473
""" continuity.cli.utils ~~~~~~~~~~~~~~~~~~~~ Continuity command line utilities. :copyright: 2015 by Jonathan Zempel. :license: BSD, see LICENSE for more details. """ from clint.textui import puts as _puts from curses.ascii import ctrl, CR, EOT, ETX, isctrl, LF from getch.getch import getch from...
false
true
f7f24a57d706bf636f7a9a7cb21bd926c665729d
7,130
py
Python
fastreid/solver/optim/ranger.py
SZLSP/reid2020NAIC
d0eaee768e0be606417a27ce5ea2b3071b5a9bc2
[ "Apache-2.0" ]
2
2021-05-12T13:36:46.000Z
2021-08-15T10:35:08.000Z
fastreid/solver/optim/ranger.py
SZLSP/reid2020NAIC
d0eaee768e0be606417a27ce5ea2b3071b5a9bc2
[ "Apache-2.0" ]
1
2021-12-28T12:49:49.000Z
2021-12-28T12:49:49.000Z
fastreid/solver/optim/ranger.py
SZLSP/reid2020NAIC
d0eaee768e0be606417a27ce5ea2b3071b5a9bc2
[ "Apache-2.0" ]
null
null
null
# Ranger deep learning optimizer - RAdam + Lookahead combined. # https://github.com/lessw2020/Ranger-Deep-Learning-Optimizer # Ranger has now been used to capture 12 records on the FastAI leaderboard. # This version = 9.3.19 # Credits: # RAdam --> https://github.com/LiyuanLucasLiu/RAdam # Lookahead --> rewritten by...
42.694611
132
0.566059
import math import torch from torch.optim.optimizer import Optimizer class Ranger(Optimizer): def __init__(self, params, lr=1e-3, alpha=0.5, k=6, N_sma_threshhold=5, betas=(.95, 0.999), eps=1e-5, weight_decay=0): if not 0.0 <= alpha <= 1.0: raise V...
true
true
f7f24bbc044d0bb485d699842b427231f9ec1c3e
4,475
py
Python
python/v3_0/dfareporting_utils.py
Ankan1991/googleads-dfa-reporting-samples
73ba89f329012d4792b7592d8d964cb3a6f76801
[ "Apache-2.0" ]
1
2019-04-18T13:52:22.000Z
2019-04-18T13:52:22.000Z
python/v3_0/dfareporting_utils.py
Ankan1991/googleads-dfa-reporting-samples
73ba89f329012d4792b7592d8d964cb3a6f76801
[ "Apache-2.0" ]
null
null
null
python/v3_0/dfareporting_utils.py
Ankan1991/googleads-dfa-reporting-samples
73ba89f329012d4792b7592d8d964cb3a6f76801
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2015 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 b...
33.646617
80
0.750615
import argparse import os from googleapiclient import discovery import httplib2 from oauth2client import client from oauth2client import file as oauthFile from oauth2client import tools API_NAME = 'dfareporting' API_VERSION = 'v3.0' API_SCOPES = ['https://www.googleapis.com/auth/dfareporting', ...
true
true
f7f24c2a0a105b99f5907716e0fd64cc995ce904
3,245
py
Python
pyserve/big_server.py
ShenDezhou/CASE
346b38bd8a7b8003953640df86d74da4294b4e4f
[ "Apache-2.0" ]
null
null
null
pyserve/big_server.py
ShenDezhou/CASE
346b38bd8a7b8003953640df86d74da4294b4e4f
[ "Apache-2.0" ]
null
null
null
pyserve/big_server.py
ShenDezhou/CASE
346b38bd8a7b8003953640df86d74da4294b4e4f
[ "Apache-2.0" ]
null
null
null
import codecs import logging import os import falcon from falcon_cors import CORS import json import waitress logging.basicConfig(level=logging.INFO, format='%(asctime)-18s %(message)s') l = logging.getLogger() cors_allow_all = CORS(allow_all_origins=True, allow_origins_list=['http://localhost:...
37.732558
83
0.579661
import codecs import logging import os import falcon from falcon_cors import CORS import json import waitress logging.basicConfig(level=logging.INFO, format='%(asctime)-18s %(message)s') l = logging.getLogger() cors_allow_all = CORS(allow_all_origins=True, allow_origins_list=['http://localhost:...
true
true
f7f24da8ba4029a6d3c34b8b09c8a94b84ec02bc
960
py
Python
setup.py
willandskill/bacman
c80470f6f25de66033618bb345377834de1b97f1
[ "BSD-3-Clause" ]
1
2020-09-01T15:00:20.000Z
2020-09-01T15:00:20.000Z
setup.py
willandskill/bacman
c80470f6f25de66033618bb345377834de1b97f1
[ "BSD-3-Clause" ]
null
null
null
setup.py
willandskill/bacman
c80470f6f25de66033618bb345377834de1b97f1
[ "BSD-3-Clause" ]
1
2020-09-01T15:00:23.000Z
2020-09-01T15:00:23.000Z
# -*- coding: utf-8 -*- from distutils.core import setup from setuptools import find_packages # Read the contents of your README file from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() set...
32
94
0.692708
from distutils.core import setup from setuptools import find_packages from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='bacman', version='0.3', author=u'Will & ...
true
true
f7f24dc7a02b155817445b42c4aa3f4ecb2a48cf
3,185
py
Python
accounts/models.py
Manasranjanpati/Jobpost
e5654129538e70cedf8aafc65c1b0289a01535e5
[ "MIT" ]
20
2018-05-04T18:42:35.000Z
2021-03-18T07:15:12.000Z
src/accounts/models.py
fleepgeek/django-jobsite
d9547c4ee85751677ba6458380b609973c3b4a8d
[ "MIT" ]
5
2020-02-11T22:22:33.000Z
2021-06-10T20:18:05.000Z
accounts/models.py
Manasranjanpati/Jobpost
e5654129538e70cedf8aafc65c1b0289a01535e5
[ "MIT" ]
8
2018-05-04T19:03:23.000Z
2020-09-23T00:24:46.000Z
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.utils.translation import gettext_lazy as _ from django.template.defaultfilters import slugify from .managers import UserManager class User(AbstractBaseUser, PermissionsMixin): full_name ...
35
121
0.661852
from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.utils.translation import gettext_lazy as _ from django.template.defaultfilters import slugify from .managers import UserManager class User(AbstractBaseUser, PermissionsMixin): full_name ...
true
true
f7f25070887e008421d350614d56e80e42dd6456
11,872
py
Python
core/dbt/task/runnable.py
tjengel/dbt
f985902a002fba36f6f709c6aacf9ae20778e58c
[ "Apache-2.0" ]
null
null
null
core/dbt/task/runnable.py
tjengel/dbt
f985902a002fba36f6f709c6aacf9ae20778e58c
[ "Apache-2.0" ]
null
null
null
core/dbt/task/runnable.py
tjengel/dbt
f985902a002fba36f6f709c6aacf9ae20778e58c
[ "Apache-2.0" ]
null
null
null
import os import time from datetime import datetime from multiprocessing.dummy import Pool as ThreadPool from dbt.task.base import ConfiguredTask from dbt.adapters.factory import get_adapter from dbt.logger import ( GLOBAL_LOGGER as logger, DbtProcessState, TextOnly, UniqueID, TimestampNamed, D...
33.162011
79
0.620199
import os import time from datetime import datetime from multiprocessing.dummy import Pool as ThreadPool from dbt.task.base import ConfiguredTask from dbt.adapters.factory import get_adapter from dbt.logger import ( GLOBAL_LOGGER as logger, DbtProcessState, TextOnly, UniqueID, TimestampNamed, D...
true
true
f7f25077e4a9f1055f30e6e528e28c9a98cbffc6
18,586
py
Python
tests/base/managers/entity.py
Br3nda/pontoon
f8749dcb25c75954761e67344a21d19f70900e70
[ "BSD-3-Clause" ]
null
null
null
tests/base/managers/entity.py
Br3nda/pontoon
f8749dcb25c75954761e67344a21d19f70900e70
[ "BSD-3-Clause" ]
null
null
null
tests/base/managers/entity.py
Br3nda/pontoon
f8749dcb25c75954761e67344a21d19f70900e70
[ "BSD-3-Clause" ]
1
2019-07-17T21:21:41.000Z
2019-07-17T21:21:41.000Z
# -*- coding: utf-8 -*- import pytest from pontoon.base.models import Entity, Translation @pytest.mark.django_db def test_mgr_entity_filter_translated(resource0, locale0): entities = [ Entity.objects.create( resource=resource0, string="testentity%s" % i) for i in range(0,...
28.246201
83
0.592812
import pytest from pontoon.base.models import Entity, Translation @pytest.mark.django_db def test_mgr_entity_filter_translated(resource0, locale0): entities = [ Entity.objects.create( resource=resource0, string="testentity%s" % i) for i in range(0, 3)] Translation.ob...
true
true
f7f251b7a487a7170ef149046966129f085d25ed
4,971
py
Python
env/lib/python3.8/site-packages/plotly/validators/heatmap/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2
2021-07-07T20:16:23.000Z
2021-07-14T14:03:09.000Z
env/lib/python3.8/site-packages/plotly/validators/heatmap/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
5
2020-06-05T20:56:21.000Z
2021-09-22T19:12:42.000Z
env/lib/python3.8/site-packages/plotly/validators/heatmap/__init__.py
acrucetta/Chicago_COVI_WebApp
a37c9f492a20dcd625f8647067394617988de913
[ "MIT", "Unlicense" ]
2
2020-07-05T12:57:14.000Z
2020-07-05T12:58:00.000Z
import sys if sys.version_info < (3, 7): from ._zsrc import ZsrcValidator from ._zsmooth import ZsmoothValidator from ._zmin import ZminValidator from ._zmid import ZmidValidator from ._zmax import ZmaxValidator from ._zhoverformat import ZhoverformatValidator from ._zauto import ZautoValid...
39.768
60
0.678133
import sys if sys.version_info < (3, 7): from ._zsrc import ZsrcValidator from ._zsmooth import ZsmoothValidator from ._zmin import ZminValidator from ._zmid import ZmidValidator from ._zmax import ZmaxValidator from ._zhoverformat import ZhoverformatValidator from ._zauto import ZautoValid...
true
true
f7f2520005caea91a1eb3d8572acf05754741856
8,540
py
Python
payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/domain/KoubeiMarketingCampaignMemberTemplateCreateModel.py
cuhk-mobitec/S3KVetter
9ae79a242afbe6edae27c17065a88feca2896cf6
[ "Apache-2.0" ]
null
null
null
payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/domain/KoubeiMarketingCampaignMemberTemplateCreateModel.py
cuhk-mobitec/S3KVetter
9ae79a242afbe6edae27c17065a88feca2896cf6
[ "Apache-2.0" ]
null
null
null
payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/domain/KoubeiMarketingCampaignMemberTemplateCreateModel.py
cuhk-mobitec/S3KVetter
9ae79a242afbe6edae27c17065a88feca2896cf6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.MemberActionModel import MemberActionModel from alipay.aop.api.domain.MemberAssetModel import MemberAssetModel from alipay.aop.api.domain.MemberBenefitModel import MemberBenefitMode...
37.45614
88
0.601522
import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.MemberActionModel import MemberActionModel from alipay.aop.api.domain.MemberAssetModel import MemberAssetModel from alipay.aop.api.domain.MemberBenefitModel import MemberBenefitModel from alipay.aop.api.domain.MemberLevelMode...
true
true
f7f25205a41e4e77c95260258ee5ad3e737f2e23
3,928
py
Python
src/pymgrit/heat/vector_heat_1d_2pts.py
jbschroder/pymgrit
5c866c633dea3ebccf812550e0303f47771c4faf
[ "MIT" ]
null
null
null
src/pymgrit/heat/vector_heat_1d_2pts.py
jbschroder/pymgrit
5c866c633dea3ebccf812550e0303f47771c4faf
[ "MIT" ]
null
null
null
src/pymgrit/heat/vector_heat_1d_2pts.py
jbschroder/pymgrit
5c866c633dea3ebccf812550e0303f47771c4faf
[ "MIT" ]
null
null
null
""" Vector class for 1D heat problem Note: values at two consecutive time points are grouped as pairs """ import numpy as np from pymgrit.core.vector import Vector class VectorHeat1D2Pts(Vector): """ Vector class for grouping values at two consecutive time points """ def __init__(self, size, dtau)...
30.449612
111
0.640784
import numpy as np from pymgrit.core.vector import Vector class VectorHeat1D2Pts(Vector): def __init__(self, size, dtau): super().__init__() self.size = size self.dtau = dtau self.values_first_time_point = np.zeros(size) self.values_second_time_point = np.zeros(size) ...
true
true
f7f25321c7fb98483ef64fc3682ca2fa6ba71acc
627
py
Python
rconweb/manage.py
mkuehn87/hll_rcon_tool
c380b21bbbd5645fd04637b992f1ffb2556ce6fc
[ "MIT" ]
49
2020-03-07T13:09:21.000Z
2022-03-19T14:24:13.000Z
rconweb/manage.py
mkuehn87/hll_rcon_tool
c380b21bbbd5645fd04637b992f1ffb2556ce6fc
[ "MIT" ]
48
2020-03-26T22:19:40.000Z
2021-12-12T17:31:06.000Z
rconweb/manage.py
mkuehn87/hll_rcon_tool
c380b21bbbd5645fd04637b992f1ffb2556ce6fc
[ "MIT" ]
48
2020-03-03T09:44:36.000Z
2022-03-18T07:33:39.000Z
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rconweb.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Import...
28.5
73
0.682616
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'rconweb.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f7f25341e310536f58e543a46b93d71ad0d1503a
2,429
py
Python
huaweicloud-sdk-cpts/huaweicloudsdkcpts/v1/model/delete_project_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-cpts/huaweicloudsdkcpts/v1/model/delete_project_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-cpts/huaweicloudsdkcpts/v1/model/delete_project_response.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8 import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class DeleteProjectResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name ...
28.244186
79
0.550021
import re import six from huaweicloudsdkcore.sdk_response import SdkResponse from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class DeleteProjectResponse(SdkResponse): sensitive_list = [] openapi_types = { } attribute_map = { } def __init__(self): ...
true
true
f7f254c364ccc23525182eb749aecda2c2112992
23,197
py
Python
nova/api/ec2/__init__.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
null
null
null
nova/api/ec2/__init__.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
null
null
null
nova/api/ec2/__init__.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
39.316949
79
0.5965
from eventlet.green import httplib from oslo.config import cfg from oslo.utils import importutils from oslo.utils import timeutils import six import six.moves.urllib.parse as urlparse import webob import webob.dec import webob.exc from nova.api.ec2 import apirequest from nova.api.ec2 import ec2utils fr...
true
true
f7f25571a52fe73b3147ab2d87628a8ff80ddb94
12,981
py
Python
train/jfda/detector.py
jasongwq/MTCNN
168d346461fd7e7c59e4f911296cfa6133dc2ea5
[ "MIT" ]
431
2017-09-27T07:46:23.000Z
2022-03-31T14:01:51.000Z
train/jfda/detector.py
jasongwq/MTCNN
168d346461fd7e7c59e4f911296cfa6133dc2ea5
[ "MIT" ]
18
2017-10-08T16:46:40.000Z
2022-01-24T12:38:08.000Z
train/jfda/detector.py
jasongwq/MTCNN
168d346461fd7e7c59e4f911296cfa6133dc2ea5
[ "MIT" ]
131
2017-10-11T06:57:30.000Z
2022-03-13T06:47:17.000Z
# pylint: disable=bad-indentation, no-member, invalid-name, line-too-long import math import cv2 import caffe import numpy as np from utils import crop_face, Timer class JfdaDetector: '''JfdaDetector ''' def __init__(self, nets): assert len(nets) in [2, 4, 6, 8], 'wrong number of nets' self.pnet, self....
33.030534
111
0.582082
import math import cv2 import caffe import numpy as np from utils import crop_face, Timer class JfdaDetector: def __init__(self, nets): assert len(nets) in [2, 4, 6, 8], 'wrong number of nets' self.pnet, self.rnet, self.onet, self.lnet = None, None, None, None if len(nets) >= 2: self.pnet = caff...
true
true
f7f25661f221f5e969c6b585f193a907fcba86f9
8,296
py
Python
examples/fitspec.py
dmargala/qusp
3b08e8bea321f7083f00756f558c1d0af0eddd07
[ "MIT" ]
null
null
null
examples/fitspec.py
dmargala/qusp
3b08e8bea321f7083f00756f558c1d0af0eddd07
[ "MIT" ]
null
null
null
examples/fitspec.py
dmargala/qusp
3b08e8bea321f7083f00756f558c1d0af0eddd07
[ "MIT" ]
null
null
null
#!/usr/bin/env python import argparse import random import numpy as np import h5py import qusp import bossdata.path import bossdata.remote from astropy.io import fits def main(): # parse command-line arguments parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter)...
37.035714
122
0.636331
import argparse import random import numpy as np import h5py import qusp import bossdata.path import bossdata.remote from astropy.io import fits def main(): parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument("--verbose", action="store...
false
true
f7f256ce9fa9d92bc65eacff9916a1dcbfcbeb1c
761
py
Python
minicom.py
mtibbett67/pymodules
9a7dcd16fb2107029edaabde766c1dbdb769713c
[ "MIT" ]
null
null
null
minicom.py
mtibbett67/pymodules
9a7dcd16fb2107029edaabde766c1dbdb769713c
[ "MIT" ]
null
null
null
minicom.py
mtibbett67/pymodules
9a7dcd16fb2107029edaabde766c1dbdb769713c
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ NAME: minicom.py DESCRIPTION: Use MiniComm to connect to a USB to Serial adapter CREATED: Tue Mar 17 21:51:42 2015 VERSION: 0.1 AUTHOR: Mark Tibbett AUTHOR_EMAIL: mtibbett67@gmail.com URL: N/A DOWNLOAD_URL: N/A INSTALL_REQUIRES: [nose] PACKAGES: [NAME] SCRIPT...
11.358209
59
0.695138
""" NAME: minicom.py DESCRIPTION: Use MiniComm to connect to a USB to Serial adapter CREATED: Tue Mar 17 21:51:42 2015 VERSION: 0.1 AUTHOR: Mark Tibbett AUTHOR_EMAIL: mtibbett67@gmail.com URL: N/A DOWNLOAD_URL: N/A INSTALL_REQUIRES: [nose] PACKAGES: [NAME] SCRIPTS: [] """ import os import subprocess ...
false
true
f7f256e878da0fbe90addce1fbba95b296292863
1,987
py
Python
alipay/aop/api/domain/AlipayOpenMiniAmpeMiniappUnbindModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayOpenMiniAmpeMiniappUnbindModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayOpenMiniAmpeMiniappUnbindModel.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenMiniAmpeMiniappUnbindModel(object): def __init__(self): self._mini_app_id = None self._mobile_app_id = None self._scene_code = None @property def mini_a...
27.985915
77
0.608455
import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenMiniAmpeMiniappUnbindModel(object): def __init__(self): self._mini_app_id = None self._mobile_app_id = None self._scene_code = None @property def mini_app_id(self): return self._mini_app_i...
true
true
f7f257077da7f852e45ce6539b0706c50cafbb11
12,820
bzl
Python
apple/internal/resource_actions/plist.bzl
c-parsons/rules_apple
f75c4b1be219cb32704d900bd1a42ab200eab445
[ "Apache-2.0" ]
1
2021-06-06T11:34:58.000Z
2021-06-06T11:34:58.000Z
apple/internal/resource_actions/plist.bzl
c-parsons/rules_apple
f75c4b1be219cb32704d900bd1a42ab200eab445
[ "Apache-2.0" ]
null
null
null
apple/internal/resource_actions/plist.bzl
c-parsons/rules_apple
f75c4b1be219cb32704d900bd1a42ab200eab445
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Bazel 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 la...
36.214689
81
0.679329
load( "@bazel_skylib//lib:paths.bzl", "paths", ) load( "@build_bazel_rules_apple//apple:utils.bzl", "apple_action", ) load( "@build_bazel_rules_apple//apple:providers.bzl", "AppleBundleVersionInfo", ) load( "@build_bazel_rules_apple//common:attrs.bzl", "attrs", ) load( ...
true
true
f7f257ae3acd8d625da30f603975ead28a62348e
4,620
py
Python
sg_jira/handlers/enable_syncing_handler.py
studiowildcard/sg-jira-bridge
8f06f7b6b7786e7d840f3d50d18db394c0021d4d
[ "MIT" ]
14
2019-05-18T15:58:40.000Z
2021-11-27T05:45:10.000Z
sg_jira/handlers/enable_syncing_handler.py
studiowildcard/sg-jira-bridge
8f06f7b6b7786e7d840f3d50d18db394c0021d4d
[ "MIT" ]
19
2019-09-02T03:01:33.000Z
2022-03-04T21:32:20.000Z
sg_jira/handlers/enable_syncing_handler.py
studiowildcard/sg-jira-bridge
8f06f7b6b7786e7d840f3d50d18db394c0021d4d
[ "MIT" ]
18
2019-05-24T17:19:08.000Z
2021-11-09T20:49:49.000Z
# Copyright 2018 Autodesk, Inc. All rights reserved. # # Use of this software is subject to the terms of the Autodesk license agreement # provided at the time of installation or download, or which otherwise accompanies # this software in either electronic or hard copy form. # from ..constants import SHOTGUN_SYNC_IN_J...
38.181818
84
0.658442
from ..constants import SHOTGUN_SYNC_IN_JIRA_FIELD from .sync_handler import SyncHandler class EnableSyncingHandler(SyncHandler): def __init__(self, syncer, handlers): super(EnableSyncingHandler, self).__init__(syncer) if not handlers: raise ValueError("At least one handler nee...
true
true
f7f257f3115bad5ac482d7053894afd5d5533bdb
4,903
py
Python
examples/tutorial/allpairs_example.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
examples/tutorial/allpairs_example.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
examples/tutorial/allpairs_example.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
#!/usr/bin/env python __author__ = "Ioannis Paraskevakos <i.parask@rutgers.edu>" __copyright__ = "Copyright 2014, http://radical.rutgers.edu" __license__ = "MIT" __example_name__ = "All Pairs Example (generic)" import math import sys import os import json from radical.ensemblemd import Kernel from radi...
38.007752
118
0.611666
__author__ = "Ioannis Paraskevakos <i.parask@rutgers.edu>" __copyright__ = "Copyright 2014, http://radical.rutgers.edu" __license__ = "MIT" __example_name__ = "All Pairs Example (generic)" import math import sys import os import json from radical.ensemblemd import Kernel from radical.ensemblemd import...
false
true
f7f258df8c86452e678adb98b216f44bb8750e25
2,088
py
Python
get_Call_instr_neighbor.py
yangshouguo/Graph-based_Bug_Search
41f1e14f49e9f107508eb98c89d2333fb14630e4
[ "MIT" ]
9
2017-09-12T09:16:50.000Z
2021-11-10T14:46:08.000Z
get_Call_instr_neighbor.py
yangshouguo/Graph-based_Bug_Search
41f1e14f49e9f107508eb98c89d2333fb14630e4
[ "MIT" ]
null
null
null
get_Call_instr_neighbor.py
yangshouguo/Graph-based_Bug_Search
41f1e14f49e9f107508eb98c89d2333fb14630e4
[ "MIT" ]
8
2017-08-21T15:46:30.000Z
2020-02-23T03:20:25.000Z
#get the instructions nearby call from idautils import * from idc import * from idaapi import * #get all functions of their address # return generator def get_funcs(): return Functions() #get the address of the instructions which call the functions def get_call_instr(addr): return [addr for addr in list(CodeRefsT...
24
99
0.716475
from idautils import * from idc import * from idaapi import * def get_funcs(): return Functions() def get_call_instr(addr): return [addr for addr in list(CodeRefsTo(addr, 0)) if is_call_insn(addr)] def get_bb_to_ea(inst_ea): ea = inst_ea func = get_func(inst_ea) if not func: print 'get wrong address '...
false
true
f7f25990f8a31ff6476fc74a21adfd7b3f57a3c9
52,254
py
Python
tensorflow/python/framework/test_util.py
leon1330/Tensorflow
b9f548d041ba8d66102c6d195e645051f1bee52f
[ "Apache-2.0" ]
2
2022-01-11T19:16:02.000Z
2022-01-11T19:47:35.000Z
tensorflow/python/framework/test_util.py
leon1330/Tensorflow
b9f548d041ba8d66102c6d195e645051f1bee52f
[ "Apache-2.0" ]
null
null
null
tensorflow/python/framework/test_util.py
leon1330/Tensorflow
b9f548d041ba8d66102c6d195e645051f1bee52f
[ "Apache-2.0" ]
2
2019-09-05T06:43:24.000Z
2019-09-07T07:58:34.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...
35.643929
83
0.667451
from __future__ import absolute_import from __future__ import division from __future__ import print_function import contextlib import gc import math import random import re import tempfile import threading import numpy as np import six _portpicker_import_error = None try: import portpicker except...
true
true
f7f25a773667abf8eabd1605b3325a84114a0d8b
423
py
Python
django_project/app/forms.py
ryoma-jp/AI_DashBoard
ee7eb2f4a52f4909a80df8553a53fdcb494af8d4
[ "MIT" ]
null
null
null
django_project/app/forms.py
ryoma-jp/AI_DashBoard
ee7eb2f4a52f4909a80df8553a53fdcb494af8d4
[ "MIT" ]
null
null
null
django_project/app/forms.py
ryoma-jp/AI_DashBoard
ee7eb2f4a52f4909a80df8553a53fdcb494af8d4
[ "MIT" ]
null
null
null
from django import forms from app.models import DatasetFile, DatasetSelection class DatasetFileForm(forms.ModelForm): class Meta: model = DatasetFile fields = ('train_zip', 'train_csv', 'valid_zip', 'valid_csv', 'test_zip', 'test_csv', ) class DatasetSelectionFo...
28.2
52
0.63357
from django import forms from app.models import DatasetFile, DatasetSelection class DatasetFileForm(forms.ModelForm): class Meta: model = DatasetFile fields = ('train_zip', 'train_csv', 'valid_zip', 'valid_csv', 'test_zip', 'test_csv', ) class DatasetSelectionFo...
true
true
f7f25a9119ea4b7cf13895104f5608f7b73361f5
3,648
gyp
Python
gin/gin.gyp
Acidburn0zzz/chromium-1
4c08f442d2588a2c7cfaa117a55bd87d2ac32f9a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
gin/gin.gyp
Acidburn0zzz/chromium-1
4c08f442d2588a2c7cfaa117a55bd87d2ac32f9a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
gin/gin.gyp
Acidburn0zzz/chromium-1
4c08f442d2588a2c7cfaa117a55bd87d2ac32f9a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
# Copyright 2013 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. { 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'gin', 'type': '<(component)', 'dependencies': [ ...
26.057143
94
0.5233
{ 'variables': { 'chromium_code': 1, }, 'targets': [ { 'target_name': 'gin', 'type': '<(component)', 'dependencies': [ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../v8/tools/gyp/v8.gyp:v8', ...
true
true
f7f25b5f24524f90a7bf05b1d7587ac7bd2be722
2,296
py
Python
spikeinterface/sortingcomponents/motion_correction.py
lkeegan/spikeinterface
237cc6f6119a5365be1d9e1c235d8410ceb482d3
[ "MIT" ]
null
null
null
spikeinterface/sortingcomponents/motion_correction.py
lkeegan/spikeinterface
237cc6f6119a5365be1d9e1c235d8410ceb482d3
[ "MIT" ]
null
null
null
spikeinterface/sortingcomponents/motion_correction.py
lkeegan/spikeinterface
237cc6f6119a5365be1d9e1c235d8410ceb482d3
[ "MIT" ]
null
null
null
import numpy as np import scipy.interpolate from tqdm import tqdm def correct_motion_on_peaks(peaks, peak_locations, times, motion, temporal_bins, spatial_bins, direction='y', progress_bar=False): """ Given the output of estimate_motion() apply inverse motion on peak location. Parameters...
33.275362
111
0.658972
import numpy as np import scipy.interpolate from tqdm import tqdm def correct_motion_on_peaks(peaks, peak_locations, times, motion, temporal_bins, spatial_bins, direction='y', progress_bar=False): corrected_peak_locations = peak_locations.copy() if spatial_bins is None: cent...
true
true
f7f25ca808642c4a8543bdd464b4748c421653e8
5,692
py
Python
core/metrics/precision_recall.py
overlordmax/PaddleRec
ddf6ec25b228ffde83e6592163d88c3ace9069f0
[ "Apache-2.0" ]
1
2020-09-29T01:14:22.000Z
2020-09-29T01:14:22.000Z
core/metrics/precision_recall.py
Qdriving/PaddleRec
b4d6ac77450d98a935c6a5d0eba6abbb21b9d06a
[ "Apache-2.0" ]
null
null
null
core/metrics/precision_recall.py
Qdriving/PaddleRec
b4d6ac77450d98a935c6a5d0eba6abbb21b9d06a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
36.254777
79
0.605938
import math import numpy as np import paddle.fluid as fluid from paddlerec.core.metric import Metric from paddle.fluid.initializer import Constant from paddle.fluid.layer_helper import LayerHelper from paddle.fluid.layers.tensor import Variable class PrecisionRecall(Metric): def __init__(self, in...
true
true
f7f25d648ca07590b904edef105f5e4041a4b929
4,837
py
Python
test/functional/mempool_reorg.py
cryptonecoin/cryptonecoin
c80c35ebce9d253541c7cbe7383b775ccfaa62bb
[ "MIT" ]
null
null
null
test/functional/mempool_reorg.py
cryptonecoin/cryptonecoin
c80c35ebce9d253541c7cbe7383b775ccfaa62bb
[ "MIT" ]
null
null
null
test/functional/mempool_reorg.py
cryptonecoin/cryptonecoin
c80c35ebce9d253541c7cbe7383b775ccfaa62bb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Cryptonecoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test mempool re-org scenarios. Test re-org scenarios with a mempool that contains transactions th...
47.891089
122
0.704155
from test_framework.blocktools import create_raw_transaction from test_framework.test_framework import CryptonecoinTestFramework from test_framework.util import assert_equal, assert_raises_rpc_error class MempoolCoinbaseTest(CryptonecoinTestFramework): def set_test_params(self): self.num_nodes = 2 ...
true
true
f7f25dd95af95e2e287b3a1e74ae0e0152ada043
28,954
py
Python
venv/lib/python3.6/site-packages/numpy/core/numerictypes.py
Seifar/ChitAnalysis
0580802c78b11766ba21e3929b8fa96f8f6a17f0
[ "MIT" ]
69
2020-03-31T06:40:17.000Z
2022-02-25T11:48:18.000Z
venv/lib/python3.7/site-packages/numpy/core/numerictypes.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
12
2018-12-06T22:06:49.000Z
2022-02-25T17:40:44.000Z
venv/lib/python3.7/site-packages/numpy/core/numerictypes.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
28
2019-03-22T01:07:13.000Z
2022-02-21T16:38:27.000Z
""" numerictypes: Define the numeric type objects This module is designed so "from numerictypes import \\*" is safe. Exported symbols include: Dictionary with all registered number types (including aliases): typeDict Type objects (not all will be available, depends on platform): see variable sctypes fo...
28.30303
88
0.572909
from __future__ import division, absolute_import, print_function import types as _types import sys import numbers import warnings from numpy.compat import bytes, long from numpy.core.multiarray import ( typeinfo, ndarray, array, empty, dtype, datetime_data, datetime_as_string, busday_offset, busday_co...
true
true
f7f25f0f43277a856d8023f3a1ecfd516a2e0fde
2,879
py
Python
app/users/migrations/0001_initial.py
esdevop/mymodb
392f1024d32cb1e19f39841a7811a4b990813909
[ "MIT" ]
null
null
null
app/users/migrations/0001_initial.py
esdevop/mymodb
392f1024d32cb1e19f39841a7811a4b990813909
[ "MIT" ]
3
2021-08-13T10:10:21.000Z
2021-08-16T10:10:04.000Z
app/users/migrations/0001_initial.py
esdevop/mymodb
392f1024d32cb1e19f39841a7811a4b990813909
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-13 14:38 import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_m...
63.977778
329
0.664467
import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ ...
true
true
f7f25f4ca0025b833aab63153c2ef6c067d3fef8
7,456
py
Python
python/lib/cloudutils/utilities.py
redbridge/cloudstack
2218053fb11d501950e4beb80e9bee4ae472b5b4
[ "ECL-2.0", "Apache-2.0" ]
2
2015-05-19T05:04:30.000Z
2016-09-07T00:33:17.000Z
python/lib/cloudutils/utilities.py
redbridge/cloudstack
2218053fb11d501950e4beb80e9bee4ae472b5b4
[ "ECL-2.0", "Apache-2.0" ]
6
2020-11-16T20:46:14.000Z
2022-02-01T01:06:16.000Z
python/lib/cloudutils/utilities.py
redbridge/cloudstack
2218053fb11d501950e4beb80e9bee4ae472b5b4
[ "ECL-2.0", "Apache-2.0" ]
4
2015-05-25T15:53:52.000Z
2018-05-23T14:08:07.000Z
# 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 u...
35.004695
222
0.603407
from cloudException import CloudRuntimeException, formatExceptionInfo import logging from subprocess import PIPE, Popen from signal import alarm, signal, SIGALRM, SIGKILL import sys import os class bash: def __init__(self, args, timeout=600): self.args = args logging.debug("execute:%...
true
true
f7f25fe19190169e2c45d1f6dc2f332cdfe35441
6,176
py
Python
CorpusUtil.py
SfS-unsupervisedCL/project-translation_meaning_clustering
a3b4d194daecb88edc9f3dd4a81333e2661eec30
[ "MIT" ]
null
null
null
CorpusUtil.py
SfS-unsupervisedCL/project-translation_meaning_clustering
a3b4d194daecb88edc9f3dd4a81333e2661eec30
[ "MIT" ]
1
2018-02-02T13:14:17.000Z
2018-02-02T13:14:17.000Z
CorpusUtil.py
SfS-unsupervisedCL/project-translation_meaning_clustering
a3b4d194daecb88edc9f3dd4a81333e2661eec30
[ "MIT" ]
null
null
null
from collections import Counter import nltk from nltk import * import numpy as np import xml.etree.ElementTree as ET import tmx trigram_measures = nltk.collocations.TrigramAssocMeasures() bigram_measures = nltk.collocations.BigramAssocMeasures() class CorpusUtil(object): __slots__ = 'tokenFrequencies', 'nGr...
34.502793
116
0.555538
from collections import Counter import nltk from nltk import * import numpy as np import xml.etree.ElementTree as ET import tmx trigram_measures = nltk.collocations.TrigramAssocMeasures() bigram_measures = nltk.collocations.BigramAssocMeasures() class CorpusUtil(object): __slots__ = 'tokenFrequencies', 'nGr...
true
true
f7f260e9d517c5ebcaa04cf6f7b06ec0942c2dc2
3,985
py
Python
src/model_autoencoders_chromagram.py
JDonini/Stacking-Audio-Tagging
a827a803dc140138d7a24ffc6fc8eda21672703e
[ "MIT" ]
1
2018-12-14T18:16:24.000Z
2018-12-14T18:16:24.000Z
src/model_autoencoders_chromagram.py
JDonini/Stacking-Audio-Tagging
a827a803dc140138d7a24ffc6fc8eda21672703e
[ "MIT" ]
4
2019-01-21T02:00:09.000Z
2019-01-21T13:12:31.000Z
src/model_autoencoders_chromagram.py
JDonini/Stacking-Audio-Tagging
a827a803dc140138d7a24ffc6fc8eda21672703e
[ "MIT" ]
null
null
null
import sys import os import pandas as pd import tensorflow as tf import numpy as np from keras.utils import multi_gpu_model from keras.models import Model from keras.layers import Input, Activation from keras.layers.convolutional import Conv2D, MaxPooling2D, UpSampling2D from keras.layers.normalization import BatchNorm...
32.398374
110
0.727478
import sys import os import pandas as pd import tensorflow as tf import numpy as np from keras.utils import multi_gpu_model from keras.models import Model from keras.layers import Input, Activation from keras.layers.convolutional import Conv2D, MaxPooling2D, UpSampling2D from keras.layers.normalization import BatchNorm...
true
true
f7f26231177c4d336e1ef074189402d665576b1d
825
py
Python
babyrobot/emorec/client.py
babyrobot-eu/core-modules
7e8c006c40153fb649208c9a78fc71aa70243f69
[ "MIT" ]
1
2019-02-07T15:32:06.000Z
2019-02-07T15:32:06.000Z
babyrobot/emorec/client.py
babyrobot-eu/core-modules
7e8c006c40153fb649208c9a78fc71aa70243f69
[ "MIT" ]
9
2020-01-28T22:09:41.000Z
2022-03-11T23:39:17.000Z
babyrobot/emorec/client.py
babyrobot-eu/core-modules
7e8c006c40153fb649208c9a78fc71aa70243f69
[ "MIT" ]
null
null
null
import uuid import rospy from babyrobot.emorec import config as emorec_config from babyrobot_msgs.msg import AudioSegment from babyrobot_msgs.srv import SpeechEmotionRecognition def emorec(clip): try: rospy.wait_for_service(emorec_config.ROS_CONFIG.SERVICE_NAME) emo_recognition = rospy.ServicePro...
34.375
69
0.72
import uuid import rospy from babyrobot.emorec import config as emorec_config from babyrobot_msgs.msg import AudioSegment from babyrobot_msgs.srv import SpeechEmotionRecognition def emorec(clip): try: rospy.wait_for_service(emorec_config.ROS_CONFIG.SERVICE_NAME) emo_recognition = rospy.ServicePro...
false
true
f7f2625c17e8c53e3ec817918cc8096bb2e830fd
2,495
py
Python
src/amuse/rfi/tools/create_python_worker.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
1
2019-04-09T09:06:08.000Z
2019-04-09T09:06:08.000Z
src/amuse/rfi/tools/create_python_worker.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
null
null
null
src/amuse/rfi/tools/create_python_worker.py
joshuawall/amuse
c2034074ee76c08057c4faa96c32044ab40952e9
[ "Apache-2.0" ]
2
2021-11-19T04:41:37.000Z
2021-11-20T02:11:17.000Z
from amuse.support.core import late, print_out from amuse.support.options import option from amuse.support.options import OptionalAttributes import os import inspect import sys class CreateAPythonWorker(OptionalAttributes): @option(sections=['data']) def amuse_root_dir(self): if 'AMUSE...
28.678161
85
0.602806
from amuse.support.core import late, print_out from amuse.support.options import option from amuse.support.options import OptionalAttributes import os import inspect import sys class CreateAPythonWorker(OptionalAttributes): @option(sections=['data']) def amuse_root_dir(self): if 'AMUSE...
false
true
f7f262fb5ae4a0f2374587382f3255f6da7cf9aa
3,288
py
Python
settings/custom_settings.py
shubhMaheshwari/NeuralTracking
c47c2e0b0f1a654e3e53fabaa898b3b8a2649381
[ "MIT" ]
1
2022-02-18T07:11:18.000Z
2022-02-18T07:11:18.000Z
settings/custom_settings.py
shubhMaheshwari/NeuralTracking
c47c2e0b0f1a654e3e53fabaa898b3b8a2649381
[ "MIT" ]
5
2022-03-08T07:00:12.000Z
2022-03-08T07:07:29.000Z
settings/custom_settings.py
shubhMaheshwari/NeuralTracking
c47c2e0b0f1a654e3e53fabaa898b3b8a2649381
[ "MIT" ]
null
null
null
##################################################################################################################### # GENERAL OPTIONS ##################################################################################################################### # Do validation? do_validation = True # Freeze parts of the model...
37.793103
119
0.501825
true
true
f7f2631280862571dd98fee32f5ace5c04abd6ea
2,256
py
Python
deepclaw/sim2real/simulation/tasks/BlueArm_simulation/ktest.py
bionicdl-sustech/DeepClaw
5cc61289e6088adc03d502f07ec970d221e05857
[ "MIT" ]
5
2020-06-24T03:47:00.000Z
2021-10-13T03:35:38.000Z
deepclaw/sim2real/simulation/tasks/BlueArm_simulation/ktest.py
bionicdl-sustech/DeepClaw
5cc61289e6088adc03d502f07ec970d221e05857
[ "MIT" ]
null
null
null
deepclaw/sim2real/simulation/tasks/BlueArm_simulation/ktest.py
bionicdl-sustech/DeepClaw
5cc61289e6088adc03d502f07ec970d221e05857
[ "MIT" ]
3
2020-06-18T09:25:39.000Z
2021-04-18T03:51:08.000Z
from os.path import dirname, abspath from os import system, environ sim_path = dirname(dirname(dirname(dirname(abspath(__file__))))) scene_path = sim_path + '/simulation/scene/' import sys sys.path.append(sim_path) from simulation.src.camera import Camera from simulation.src.env import Env from pyrep.robots.arms.arm im...
33.671642
145
0.643617
from os.path import dirname, abspath from os import system, environ sim_path = dirname(dirname(dirname(dirname(abspath(__file__))))) scene_path = sim_path + '/simulation/scene/' import sys sys.path.append(sim_path) from simulation.src.camera import Camera from simulation.src.env import Env from pyrep.robots.arms.arm im...
true
true
f7f2667846553c585c0cac5a0bd777268aa0944e
2,772
py
Python
src/server/master/web_ui/application/web_ui/main/views/dashboard_billing.py
dpaola2/djangy
4b10e681cb49e5c16aba4429dfbfadfd9b512463
[ "NCSA" ]
15
2015-02-14T02:39:04.000Z
2021-12-13T14:17:15.000Z
src/server/master/web_ui/application/web_ui/main/views/dashboard_billing.py
ojengwa/djangy
4b10e681cb49e5c16aba4429dfbfadfd9b512463
[ "NCSA" ]
null
null
null
src/server/master/web_ui/application/web_ui/main/views/dashboard_billing.py
ojengwa/djangy
4b10e681cb49e5c16aba4429dfbfadfd9b512463
[ "NCSA" ]
11
2015-08-07T11:47:02.000Z
2021-04-29T08:08:24.000Z
from shared import * from master_api import update_billing_info as do_update_billing_info # XXX - CSRF @http_methods('GET', 'POST') @auth_required def update_billing_info(request): email = request.session.get('email') user = User.get_by_email(email) REQUIRED_KEYS = [ 'first_name', 'last_nam...
33
90
0.522006
from shared import * from master_api import update_billing_info as do_update_billing_info @http_methods('GET', 'POST') @auth_required def update_billing_info(request): email = request.session.get('email') user = User.get_by_email(email) REQUIRED_KEYS = [ 'first_name', 'last_name', ...
true
true
f7f266babc88b95c763764202b2947e8a015abfb
724
py
Python
tests/test_future/test_future_result/test_future_result_decorator.py
ftruzzi/returns
42fbb70ffe68e01a848908021cf8ed1a6704b13d
[ "BSD-2-Clause" ]
1
2020-12-19T07:34:19.000Z
2020-12-19T07:34:19.000Z
tests/test_future/test_future_result/test_future_result_decorator.py
ftruzzi/returns
42fbb70ffe68e01a848908021cf8ed1a6704b13d
[ "BSD-2-Clause" ]
1
2020-07-13T23:12:58.000Z
2020-07-13T23:12:58.000Z
tests/test_future/test_future_result/test_future_result_decorator.py
ftruzzi/returns
42fbb70ffe68e01a848908021cf8ed1a6704b13d
[ "BSD-2-Clause" ]
null
null
null
import pytest from returns.future import FutureResult, future_safe from returns.io import IOResult, IOSuccess @future_safe async def _coro(arg: int) -> float: return 1 / arg @pytest.mark.anyio async def test_future_safe_decorator(): """Ensure that coroutine marked with ``@future_safe``.""" future_insta...
25.857143
67
0.754144
import pytest from returns.future import FutureResult, future_safe from returns.io import IOResult, IOSuccess @future_safe async def _coro(arg: int) -> float: return 1 / arg @pytest.mark.anyio async def test_future_safe_decorator(): future_instance = _coro(2) assert isinstance(future_instance, FutureR...
true
true
f7f2691b105d323b0a252c9056f82a11cf06b4d3
19,319
py
Python
je_web_runner/selenium_wrapper/webdriver_wrapper.py
JE-Chen/SeleniumWrapper_JE
192c457ad5b3b7e1e8aa0316a461f4dd532f5ffd
[ "MIT" ]
null
null
null
je_web_runner/selenium_wrapper/webdriver_wrapper.py
JE-Chen/SeleniumWrapper_JE
192c457ad5b3b7e1e8aa0316a461f4dd532f5ffd
[ "MIT" ]
null
null
null
je_web_runner/selenium_wrapper/webdriver_wrapper.py
JE-Chen/SeleniumWrapper_JE
192c457ad5b3b7e1e8aa0316a461f4dd532f5ffd
[ "MIT" ]
null
null
null
from typing import List from selenium.common.exceptions import NoAlertPresentException from selenium.webdriver import ActionChains from selenium.webdriver.remote.webdriver import WebDriver from selenium import webdriver from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support.wait im...
44.616628
120
0.737771
from typing import List from selenium.common.exceptions import NoAlertPresentException from selenium.webdriver import ActionChains from selenium.webdriver.remote.webdriver import WebDriver from selenium import webdriver from selenium.webdriver.remote.webelement import WebElement from selenium.webdriver.support.wait im...
true
true
f7f269cba9071e419c997107e0b8da43d0259c2a
961
py
Python
tests/callbacks/test_grad_cam.py
tongni1975/tf-explain
1d13fbac19389630f4d25473fda10687635dcd6a
[ "MIT" ]
null
null
null
tests/callbacks/test_grad_cam.py
tongni1975/tf-explain
1d13fbac19389630f4d25473fda10687635dcd6a
[ "MIT" ]
3
2021-01-05T21:57:08.000Z
2021-06-25T15:36:38.000Z
tests/callbacks/test_grad_cam.py
tongni1975/tf-explain
1d13fbac19389630f4d25473fda10687635dcd6a
[ "MIT" ]
null
null
null
import numpy as np from tf_explain.callbacks.grad_cam import GradCAMCallback def test_should_call_grad_cam_callback( random_data, convolutional_model, output_dir, mocker ): mock_explainer = mocker.MagicMock(explain=mocker.MagicMock(return_value=0)) mocker.patch("tf_explain.callbacks.grad_cam.GradCAM", ret...
33.137931
88
0.728408
import numpy as np from tf_explain.callbacks.grad_cam import GradCAMCallback def test_should_call_grad_cam_callback( random_data, convolutional_model, output_dir, mocker ): mock_explainer = mocker.MagicMock(explain=mocker.MagicMock(return_value=0)) mocker.patch("tf_explain.callbacks.grad_cam.GradCAM", ret...
true
true
f7f26a4ae92f9f0fecfee2bad53dca2b1edbb476
2,210
py
Python
model/unet.py
wgcban/spin_roadmapper
2c1c8f22073d989753dc6f95d1f547198a76414b
[ "Apache-2.0" ]
24
2021-09-15T00:20:52.000Z
2022-03-27T05:01:23.000Z
model/unet.py
wgcban/spin_roadmapper
2c1c8f22073d989753dc6f95d1f547198a76414b
[ "Apache-2.0" ]
2
2021-12-27T13:45:02.000Z
2022-03-25T13:33:20.000Z
model/unet.py
wgcban/spin_roadmapper
2c1c8f22073d989753dc6f95d1f547198a76414b
[ "Apache-2.0" ]
3
2021-12-27T03:11:56.000Z
2022-03-10T10:24:42.000Z
import torch import torchvision from torch import nn from torchvision.utils import save_image import torch.nn.functional as F class unet(nn.Module): def __init__(self, in_channels=3, num_classes=2): super(unet, self).__init__() self.encoder1 = nn.Conv2d(in_channels, 32, 3, stride=1, paddin...
42.5
91
0.589593
import torch import torchvision from torch import nn from torchvision.utils import save_image import torch.nn.functional as F class unet(nn.Module): def __init__(self, in_channels=3, num_classes=2): super(unet, self).__init__() self.encoder1 = nn.Conv2d(in_channels, 32, 3, stride=1, paddin...
true
true
f7f26aa13a7462aba520d3375305cbbd91a915df
1,320
py
Python
examples/grid_example.py
Daiver/np_draw_tools
091f09aba090263aee29b941b91bb7c96600018f
[ "MIT" ]
null
null
null
examples/grid_example.py
Daiver/np_draw_tools
091f09aba090263aee29b941b91bb7c96600018f
[ "MIT" ]
null
null
null
examples/grid_example.py
Daiver/np_draw_tools
091f09aba090263aee29b941b91bb7c96600018f
[ "MIT" ]
null
null
null
import numpy as np import cv2 import np_draw_tools def main(): img1 = np.zeros((256, 128, 3), dtype=np.uint8) img2 = np.zeros((256, 128, 3), dtype=np.uint8) img3 = np.zeros((256, 128, 3), dtype=np.uint8) cv2.circle(img1, (64, 40), radius=10, color=(0, 255, 0), thickness=-1) img2[:] = 255 cv2...
27.5
116
0.609091
import numpy as np import cv2 import np_draw_tools def main(): img1 = np.zeros((256, 128, 3), dtype=np.uint8) img2 = np.zeros((256, 128, 3), dtype=np.uint8) img3 = np.zeros((256, 128, 3), dtype=np.uint8) cv2.circle(img1, (64, 40), radius=10, color=(0, 255, 0), thickness=-1) img2[:] = 255 cv2...
true
true
f7f26bd6a6e2f76d3445ff269279783fdc8db490
2,407
py
Python
phillydata/arcgisrest/reader.py
ebrelsford/django-phillydata
444a3ff9d436cd276530534642dd092402278ba5
[ "BSD-3-Clause" ]
null
null
null
phillydata/arcgisrest/reader.py
ebrelsford/django-phillydata
444a3ff9d436cd276530534642dd092402278ba5
[ "BSD-3-Clause" ]
null
null
null
phillydata/arcgisrest/reader.py
ebrelsford/django-phillydata
444a3ff9d436cd276530534642dd092402278ba5
[ "BSD-3-Clause" ]
1
2020-01-23T04:59:36.000Z
2020-01-23T04:59:36.000Z
import json import logging from urllib import urlencode from urllib2 import urlopen, URLError logger = logging.getLogger(__name__) class ArcGISRestServerReader(object): """ A simple class for iterating over objects stored in an ArcGIS server. """ default_params = { 'f': 'json', } i...
26.744444
89
0.559618
import json import logging from urllib import urlencode from urllib2 import urlopen, URLError logger = logging.getLogger(__name__) class ArcGISRestServerReader(object): default_params = { 'f': 'json', } ids_params = { 'returnIdsOnly': 'true' } objects_params = { 'outFie...
true
true
f7f26c9fa653cb1d326e7346ca2e5ff9de7eec62
1,037
py
Python
tests/test_gpu_mpdist.py
SaVoAMP/stumpy
d63963caaf6a8b64448953f638c1d3345e05a36a
[ "BSD-3-Clause" ]
null
null
null
tests/test_gpu_mpdist.py
SaVoAMP/stumpy
d63963caaf6a8b64448953f638c1d3345e05a36a
[ "BSD-3-Clause" ]
null
null
null
tests/test_gpu_mpdist.py
SaVoAMP/stumpy
d63963caaf6a8b64448953f638c1d3345e05a36a
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import numpy.testing as npt from stumpy import gpu_mpdist, config from numba import cuda try: from numba.errors import NumbaPerformanceWarning except ModuleNotFoundError: from numba.core.errors import NumbaPerformanceWarning import pytest import naive config.THREADS_PER_BLOCK = 10 if not c...
26.589744
76
0.701061
import numpy as np import numpy.testing as npt from stumpy import gpu_mpdist, config from numba import cuda try: from numba.errors import NumbaPerformanceWarning except ModuleNotFoundError: from numba.core.errors import NumbaPerformanceWarning import pytest import naive config.THREADS_PER_BLOCK = 10 if not c...
true
true
f7f26cc2d25f3d4da8df0267bf7220d2a68f24f3
2,209
py
Python
FusionIIIT/applications/academic_procedures/urls.py
ssaksham9/Fusion
f1e405b457dba399411a2ddb79a9068746c05057
[ "bzip2-1.0.6" ]
2
2020-01-24T16:34:54.000Z
2020-08-01T05:09:24.000Z
FusionIIIT/applications/academic_procedures/urls.py
ssaksham9/Fusion
f1e405b457dba399411a2ddb79a9068746c05057
[ "bzip2-1.0.6" ]
null
null
null
FusionIIIT/applications/academic_procedures/urls.py
ssaksham9/Fusion
f1e405b457dba399411a2ddb79a9068746c05057
[ "bzip2-1.0.6" ]
5
2020-01-21T11:27:06.000Z
2020-02-07T13:53:49.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.academic_procedures_redirect, name='redirect'), url(r'^main/', views.academic_procedures, name='procedures'), url(r'^register/', views.register, name='register'), url(r'^pre_registration/', views.pre_registration, na...
53.878049
94
0.725215
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.academic_procedures_redirect, name='redirect'), url(r'^main/', views.academic_procedures, name='procedures'), url(r'^register/', views.register, name='register'), url(r'^pre_registration/', views.pre_registration, na...
true
true
f7f26d04ebf0c4d001e1082cd615baec439617d1
2,361
py
Python
lib/galaxy/tools/linters/stdio.py
emily101-gif/immport-galaxy
8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c
[ "CC-BY-3.0" ]
4
2018-10-29T18:34:38.000Z
2021-09-29T23:30:42.000Z
lib/galaxy/tools/linters/stdio.py
emily101-gif/immport-galaxy
8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c
[ "CC-BY-3.0" ]
30
2016-10-20T15:35:12.000Z
2018-10-02T15:59:54.000Z
lib/galaxy/tools/linters/stdio.py
emily101-gif/immport-galaxy
8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c
[ "CC-BY-3.0" ]
7
2016-11-03T19:11:01.000Z
2020-05-11T14:23:52.000Z
"""This module contains a linting functions for tool error detection.""" from .command import get_command def lint_stdio(tool_source, lint_ctx): tool_xml = getattr(tool_source, "xml_tree", None) stdios = tool_xml.findall("./stdio") if tool_xml else [] if not stdios: command = get_command(tool_xml...
35.772727
122
0.600169
from .command import get_command def lint_stdio(tool_source, lint_ctx): tool_xml = getattr(tool_source, "xml_tree", None) stdios = tool_xml.findall("./stdio") if tool_xml else [] if not stdios: command = get_command(tool_xml) if tool_xml else None if command is None or not command.get("de...
true
true
f7f26d485d1fa9d51ce376dad5f61fcf0a7778af
1,397
py
Python
interviews/is_palindrome/linked_list.py
zarkle/data-structures-and-algorithms
0485b95f5aabc0ee255cd7e50b48a6ccec851e00
[ "MIT" ]
1
2021-01-28T07:32:17.000Z
2021-01-28T07:32:17.000Z
interviews/is_palindrome/linked_list.py
zarkle/data-structures-and-algorithms
0485b95f5aabc0ee255cd7e50b48a6ccec851e00
[ "MIT" ]
null
null
null
interviews/is_palindrome/linked_list.py
zarkle/data-structures-and-algorithms
0485b95f5aabc0ee255cd7e50b48a6ccec851e00
[ "MIT" ]
1
2020-04-10T08:01:50.000Z
2020-04-10T08:01:50.000Z
from .node import Node class LinkedList: """ create a linked list """ def __init__(self, iterable=[]): """Constructor for the LinkedList object""" self.head = None self._size = 0 if type(iterable) is not list: raise TypeError('Invalid iterable') for...
25.4
58
0.519685
from .node import Node class LinkedList: def __init__(self, iterable=[]): self.head = None self._size = 0 if type(iterable) is not list: raise TypeError('Invalid iterable') for item in iterable: self.insert(item) def __repr__(self): return ...
true
true
f7f26e57008918cc19a21d89ec5f7142d075b28e
1,350
py
Python
garda_stations.py
VoyTechnology/safer-place
10276d4859d8b2aeae68ada554f98619345e6474
[ "MIT" ]
3
2017-02-11T09:03:15.000Z
2017-03-21T02:33:24.000Z
garda_stations.py
VoyTechnology/safer-place
10276d4859d8b2aeae68ada554f98619345e6474
[ "MIT" ]
24
2017-03-18T18:18:52.000Z
2018-02-14T19:37:08.000Z
garda_stations.py
SaferPlace/original
c34165420624e1073ec0c583c775a53efe817c39
[ "MIT" ]
4
2017-02-11T20:06:16.000Z
2020-06-06T23:41:37.000Z
import math class Station: def __init__(self, csv_line_tup, lat=0, lng=0): self.station_name = csv_line_tup[1] self.division = csv_line_tup[2] if 'D.M.R' not in csv_line_tup[2] else 'Dublin' self.x = csv_line_tup[3] self.y = csv_line_tup[4] self.murders = list(map(int, csv_l...
33.75
87
0.599259
import math class Station: def __init__(self, csv_line_tup, lat=0, lng=0): self.station_name = csv_line_tup[1] self.division = csv_line_tup[2] if 'D.M.R' not in csv_line_tup[2] else 'Dublin' self.x = csv_line_tup[3] self.y = csv_line_tup[4] self.murders = list(map(int, csv_l...
true
true
f7f26ec1b00927bd84149194a46fd7020d3bfca7
83,212
py
Python
bindings/python/cntk/tests/onnx_op_test.py
ashiqimran/CNTK
22c7c3cbf95f5bcb239d3d956f08efdf43253ab2
[ "MIT" ]
null
null
null
bindings/python/cntk/tests/onnx_op_test.py
ashiqimran/CNTK
22c7c3cbf95f5bcb239d3d956f08efdf43253ab2
[ "MIT" ]
null
null
null
bindings/python/cntk/tests/onnx_op_test.py
ashiqimran/CNTK
22c7c3cbf95f5bcb239d3d956f08efdf43253ab2
[ "MIT" ]
1
2018-12-29T20:52:30.000Z
2018-12-29T20:52:30.000Z
# Copyright (c) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.md file in the project root # for full license information. # ============================================================================== import os import numpy as np import cntk as C import pytest onnx = pytest.importorsk...
40.991133
247
0.643922
import os import numpy as np import cntk as C import pytest onnx = pytest.importorskip("onnx") from copy import deepcopy from cntk.ops.tests.ops_test_utils import cntk_device from itertools import product from .onnx_test_helper import transpose_dynamic_axis, create_and_populate_onnx_test_case_with_model_conversion...
true
true
f7f270661758e1fbbefe5c9a7e621eca88fa3db8
305
py
Python
data/multilingual/Latn.PAM/Serif_12/pdf_to_json_test_Latn.PAM_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
1
2021-09-19T19:47:35.000Z
2021-09-19T19:47:35.000Z
data/multilingual/Latn.PAM/Serif_12/pdf_to_json_test_Latn.PAM_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
data/multilingual/Latn.PAM/Serif_12/pdf_to_json_test_Latn.PAM_Serif_12.py
antoinecarme/pdf_to_json_tests
d57a024fde862e698d916a1178f285883d7a3b2f
[ "BSD-3-Clause" ]
null
null
null
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.PAM/Serif_12/udhr_Latn.PAM_Serif_12.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
30.5
75
0.813115
import pdf_to_json as p2j import json url = "file:data/multilingual/Latn.PAM/Serif_12/udhr_Latn.PAM_Serif_12.pdf" lConverter = p2j.pdf_to_json.pdf_to_json_converter() lConverter.mImageHashOnly = True lDict = lConverter.convert(url) print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
true
true
f7f2716f26f601cb707ba4502be685122850d164
6,087
py
Python
suites/DatabaseApi/Globals/GetConfig.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
suites/DatabaseApi/Globals/GetConfig.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
suites/DatabaseApi/Globals/GetConfig.py
dbulka/pytests
d2658cff3832293cb1b8abcd970f7df83a2b5035
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import lemoncheesecake.api as lcc from lemoncheesecake.matching import check_that_in, check_that, has_length, has_entry, is_str from common.base_test import BaseTest from project import BASE_ASSET_SYMBOL SUITE = { "description": "Method 'get_config'" } @lcc.prop("main", "type") @lcc.prop...
55.336364
119
0.662395
import lemoncheesecake.api as lcc from lemoncheesecake.matching import check_that_in, check_that, has_length, has_entry, is_str from common.base_test import BaseTest from project import BASE_ASSET_SYMBOL SUITE = { "description": "Method 'get_config'" } @lcc.prop("main", "type") @lcc.prop("negative", "type") @l...
true
true
f7f2728883cd3773c84e6cfc688efec8db35a59b
323
py
Python
backend/food/admin.py
kimsunghyun1995/-
fda7e1e0744a0518433ef8414510329895b19eda
[ "MIT" ]
2
2020-12-31T05:23:12.000Z
2020-12-31T05:44:47.000Z
backend/food/admin.py
kimsunghyun1995/-
fda7e1e0744a0518433ef8414510329895b19eda
[ "MIT" ]
null
null
null
backend/food/admin.py
kimsunghyun1995/-
fda7e1e0744a0518433ef8414510329895b19eda
[ "MIT" ]
1
2020-12-31T05:23:13.000Z
2020-12-31T05:23:13.000Z
from django.contrib import admin from .models import Food # Register your models here. class FoodAdmin(admin.ModelAdmin): #식품이름, 총내용량, 열량, 탄수화물, 단백질, 지방 list_display = ('DESC_KOR', 'SERVING_SIZE', 'NUTR_CONT1', 'NUTR_CONT2', 'NUTR_CONT3', 'NUTR_CONT4') admin.site.register(Food, FoodAdmi...
23.071429
61
0.681115
from django.contrib import admin from .models import Food class FoodAdmin(admin.ModelAdmin): list_display = ('DESC_KOR', 'SERVING_SIZE', 'NUTR_CONT1', 'NUTR_CONT2', 'NUTR_CONT3', 'NUTR_CONT4') admin.site.register(Food, FoodAdmin)
true
true
f7f27421d4cf1c31ef114331b864ce3038948c80
4,998
py
Python
AutotestWebD/apps/myadmin/views/moduleManage.py
yangjourney/sosotest
2e88099a829749910ca325253c9b1a2e368d21a0
[ "MIT" ]
422
2019-08-18T05:04:20.000Z
2022-03-31T06:49:19.000Z
AutotestWebD/apps/myadmin/views/moduleManage.py
LinSongJian1985/sosotest
091863dee531b5726650bb63efd6f169267cbeb4
[ "MIT" ]
10
2019-10-24T09:55:38.000Z
2021-09-29T17:28:43.000Z
AutotestWebD/apps/myadmin/views/moduleManage.py
LinSongJian1985/sosotest
091863dee531b5726650bb63efd6f169267cbeb4
[ "MIT" ]
202
2019-08-18T05:04:27.000Z
2022-03-30T05:57:18.000Z
from urllib import parse # Create your views here. from all_models.models import * from apps.common.config import commonWebConfig from apps.common.func.WebFunc import * # from apps.myadmin.service.InterfaceModuleService import InterfaceModuleService from apps.myadmin.service.InterfacePermissionService import Interface...
39.984
112
0.686074
from urllib import parse from all_models.models import * from apps.common.config import commonWebConfig from apps.common.func.WebFunc import * from apps.myadmin.service.InterfacePermissionService import InterfacePermissionService from apps.myadmin.service.ModuleService import ModuleService from apps.myadmin.service....
true
true
f7f274ce7d2ff2ea783e6f4e98a2435bdbeac04c
3,406
py
Python
photo_album_server/user/views.py
Pu-Yongjun/photo-album
6ba662c243802e53b5df5548a36c27cc31c5cede
[ "Apache-2.0" ]
1
2020-12-11T05:46:37.000Z
2020-12-11T05:46:37.000Z
photo_album_server/user/views.py
Pu-Yongjun/photo-album
6ba662c243802e53b5df5548a36c27cc31c5cede
[ "Apache-2.0" ]
19
2020-06-05T19:51:11.000Z
2022-03-11T23:44:47.000Z
photo_album_server/user/views.py
parker-pu/photo-album
6ba662c243802e53b5df5548a36c27cc31c5cede
[ "Apache-2.0" ]
null
null
null
# Create your views here. import datetime from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from rest_framework import viewsets, status from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.response import Response from rest_framework.authtoken.mo...
34.06
89
0.633294
import datetime from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from rest_framework import viewsets, status from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.response import Response from rest_framework.authtoken.models import Token from cu...
true
true
f7f27746e77464615b26f4232488e3f4caf2d687
3,782
py
Python
strikethrough_identification/src/utils.py
RaphaelaHeil/strikethrough-removal-cyclegans
91555b22cac6b6a379597aa94c23bdf02c9970a7
[ "MIT" ]
3
2021-08-30T12:37:14.000Z
2022-02-09T16:07:14.000Z
strikethrough_identification/src/utils.py
RaphaelaHeil/strikethrough-removal-cyclegans
91555b22cac6b6a379597aa94c23bdf02c9970a7
[ "MIT" ]
null
null
null
strikethrough_identification/src/utils.py
RaphaelaHeil/strikethrough-removal-cyclegans
91555b22cac6b6a379597aa94c23bdf02c9970a7
[ "MIT" ]
1
2021-08-30T12:17:31.000Z
2021-08-30T12:17:31.000Z
""" Utility module. """ from math import ceil import torch from PIL import Image, ImageOps from torchvision import models from torchvision.transforms import Resize, Grayscale, ToTensor, Compose from .configuration import Configuration, ModelName class PadToSize: """ Custom transformation that maintains the ...
37.445545
119
0.636171
from math import ceil import torch from PIL import Image, ImageOps from torchvision import models from torchvision.transforms import Resize, Grayscale, ToTensor, Compose from .configuration import Configuration, ModelName class PadToSize: def __init__(self, height: int, width: int, padWith: int = 1): s...
true
true
f7f27791b4271c7c2f63eccc709c82638bec71dc
5,013
py
Python
rich/logging.py
cnheider/rich
579a29c82081aa74437d9e2483ac9862c048415d
[ "MIT" ]
null
null
null
rich/logging.py
cnheider/rich
579a29c82081aa74437d9e2483ac9862c048415d
[ "MIT" ]
1
2022-03-30T12:38:51.000Z
2022-03-30T12:38:51.000Z
rich/logging.py
cnheider/rich
579a29c82081aa74437d9e2483ac9862c048415d
[ "MIT" ]
null
null
null
import logging from datetime import datetime from logging import Handler, LogRecord from pathlib import Path from typing import ClassVar, List, Optional, Type from rich._log_render import LogRender from rich.console import Console from rich.highlighter import Highlighter, ReprHighlighter from rich.text import Text fr...
35.055944
129
0.621384
import logging from datetime import datetime from logging import Handler, LogRecord from pathlib import Path from typing import ClassVar, List, Optional, Type from rich._log_render import LogRender from rich.console import Console from rich.highlighter import Highlighter, ReprHighlighter from rich.text import Text fr...
true
true
f7f277c54cccdecfd593bae20f0540a1d2d1c87b
780
py
Python
TexSoup/tex.py
bpiwowar/TexSoup
e0a659251c5a81b29352a29985d5af8cc28422ad
[ "BSD-2-Clause" ]
190
2016-09-26T08:38:31.000Z
2022-02-10T23:18:00.000Z
TexSoup/tex.py
bpiwowar/TexSoup
e0a659251c5a81b29352a29985d5af8cc28422ad
[ "BSD-2-Clause" ]
127
2016-05-20T07:31:06.000Z
2022-02-16T14:48:09.000Z
TexSoup/tex.py
bpiwowar/TexSoup
e0a659251c5a81b29352a29985d5af8cc28422ad
[ "BSD-2-Clause" ]
44
2017-07-23T19:58:00.000Z
2021-12-03T12:57:48.000Z
from TexSoup.reader import read_expr, read_tex from TexSoup.data import * from TexSoup.utils import * from TexSoup.tokens import tokenize from TexSoup.category import categorize import itertools def read(tex, skip_envs=(), tolerance=0): """Read and parse all LaTeX source. :param Union[str,iterable] tex: LaTe...
33.913043
70
0.710256
from TexSoup.reader import read_expr, read_tex from TexSoup.data import * from TexSoup.utils import * from TexSoup.tokens import tokenize from TexSoup.category import categorize import itertools def read(tex, skip_envs=(), tolerance=0): if not isinstance(tex, str): tex = ''.join(itertools.chain(*tex)) ...
true
true
f7f278ac2aa851adf19f760c8e867588b2593fa5
668
py
Python
server/manage.py
katergin/agfzb-CloudAppDevelopment_Capstone
e30e0ded61bf838c44650fbdef39d77b6c765344
[ "Apache-2.0" ]
null
null
null
server/manage.py
katergin/agfzb-CloudAppDevelopment_Capstone
e30e0ded61bf838c44650fbdef39d77b6c765344
[ "Apache-2.0" ]
null
null
null
server/manage.py
katergin/agfzb-CloudAppDevelopment_Capstone
e30e0ded61bf838c44650fbdef39d77b6c765344
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangobackend.settings') try: from django.core.management import execute_from_command_line excep...
30.363636
77
0.682635
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djangobackend.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and "...
true
true
f7f2790c5ab380528253e7975d061500522323f1
397
py
Python
imagewrite/asgi.py
elyak123/imagewrite
973c6e5c940cffcc7f906f7c1dea32166fc51be0
[ "MIT" ]
null
null
null
imagewrite/asgi.py
elyak123/imagewrite
973c6e5c940cffcc7f906f7c1dea32166fc51be0
[ "MIT" ]
null
null
null
imagewrite/asgi.py
elyak123/imagewrite
973c6e5c940cffcc7f906f7c1dea32166fc51be0
[ "MIT" ]
null
null
null
""" ASGI config for imagewrite project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'imagewrite.settings') application = get_asgi_application()
true
true
f7f2795083e70ecbfa8ca1e2c02bf2a4160c502d
400
py
Python
food_manage/wsgi.py
gordy2015/food_manage
730fc88f97925bd250c0450df2da3e61e31e2530
[ "FSFAP" ]
null
null
null
food_manage/wsgi.py
gordy2015/food_manage
730fc88f97925bd250c0450df2da3e61e31e2530
[ "FSFAP" ]
null
null
null
food_manage/wsgi.py
gordy2015/food_manage
730fc88f97925bd250c0450df2da3e61e31e2530
[ "FSFAP" ]
null
null
null
""" WSGI config for food_manage project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_...
23.529412
78
0.79
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "food_manage.settings") application = get_wsgi_application()
true
true
f7f279df33f74849d366ccd4acb09c4c8ae065aa
9,780
py
Python
tfmiss/text/unicode_transform.py
shkarupa-alex/tfmiss
4fe1bb3a47327c07711f910ee53319167032b6af
[ "MIT" ]
1
2019-06-25T15:58:20.000Z
2019-06-25T15:58:20.000Z
tfmiss/text/unicode_transform.py
shkarupa-alex/tfmiss
4fe1bb3a47327c07711f910ee53319167032b6af
[ "MIT" ]
1
2021-11-11T12:56:51.000Z
2021-11-11T12:56:51.000Z
tfmiss/text/unicode_transform.py
shkarupa-alex/tfmiss
4fe1bb3a47327c07711f910ee53319167032b6af
[ "MIT" ]
2
2020-02-11T15:46:58.000Z
2021-11-21T02:47:36.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.ops.ragged import ragged_tensor from tfmiss.ops import tfmiss_ops def char_category(source, first=True, skip=None, name=None): """Get first/last character ca...
35.306859
108
0.6409
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.ops.ragged import ragged_tensor from tfmiss.ops import tfmiss_ops def char_category(source, first=True, skip=None, name=None): with tf.name_scope(name or 'ch...
true
true
f7f27a353faf5bd5604b7e7e532bffaa371e701e
17,822
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_peerings_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_peerings_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_peerings_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.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 ...
47.780161
195
0.676467
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class ExpressRouteCircuitPeeringsOperations(object): models = mode...
true
true
f7f27a4456f17023f481f09eaf68cf69a116aa6e
8,974
py
Python
code/dgrechka/train_mobileNetV2_bottleneck.py
dgrechka/bengaliai-cv19
9ef15c5b140628337ae6efe0d76e7ec5d291dc17
[ "MIT" ]
null
null
null
code/dgrechka/train_mobileNetV2_bottleneck.py
dgrechka/bengaliai-cv19
9ef15c5b140628337ae6efe0d76e7ec5d291dc17
[ "MIT" ]
null
null
null
code/dgrechka/train_mobileNetV2_bottleneck.py
dgrechka/bengaliai-cv19
9ef15c5b140628337ae6efe0d76e7ec5d291dc17
[ "MIT" ]
null
null
null
import tensorflow as tf import sys import os sys.path.append(os.path.join(__file__,'..','..')) from tfDataIngest import tfDataSetParquet as tfDsParquet from tfDataIngest import tfDataSetParquetAnnotateTrain as tfDsParquetAnnotation import os import pandas as pd from tqdm import tqdm from glob import glob from models....
39.359649
130
0.642077
import tensorflow as tf import sys import os sys.path.append(os.path.join(__file__,'..','..')) from tfDataIngest import tfDataSetParquet as tfDsParquet from tfDataIngest import tfDataSetParquetAnnotateTrain as tfDsParquetAnnotation import os import pandas as pd from tqdm import tqdm from glob import glob from models....
true
true
f7f27cbb2a2fa17f5784febd2cb69d1587ce3d8e
2,919
py
Python
Toolkits/VCS/repology__repology-api/repology/fetcher/git.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
Toolkits/VCS/repology__repology-api/repology/fetcher/git.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
Toolkits/VCS/repology__repology-api/repology/fetcher/git.py
roscopecoltran/SniperKit-Core
4600dffe1cddff438b948b6c22f586d052971e04
[ "MIT" ]
null
null
null
# Copyright (C) 2016-2017 Dmitry Marakasov <amdmi3@amdmi3.ru> # # This file is part of repology # # repology 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 your optio...
48.65
135
0.673518
import os from repology.logger import NoopLogger from repology.subprocess import RunSubprocess class GitFetcher(): def __init__(self, url, branch='master', sparse_checkout=None): self.url = url self.branch = branch self.sparse_checkout = sparse_checkout def __SetupSp...
true
true
f7f27cc7d9f95c75d79b112559f1be5f9fc2094b
57,035
py
Python
Python27/Lib/test/test_codecs.py
xuyue1998/Json2Lua_Tools
539c4e52cb8ac1257f660bf902d964e1a476257c
[ "MIT" ]
66
2015-01-17T23:13:44.000Z
2018-04-20T21:44:35.000Z
Python27/Lib/test/test_codecs.py
xuyue1998/Json2Lua_Tools
539c4e52cb8ac1257f660bf902d964e1a476257c
[ "MIT" ]
20
2015-04-20T12:09:12.000Z
2022-03-12T01:25:04.000Z
Python27/Lib/test/test_codecs.py
xuyue1998/Json2Lua_Tools
539c4e52cb8ac1257f660bf902d964e1a476257c
[ "MIT" ]
24
2015-07-22T08:08:54.000Z
2021-12-28T06:56:09.000Z
from test import test_support import unittest import codecs import sys, StringIO, _testcapi class Queue(object): """ queue: write bytes at one end, read bytes from the other end """ def __init__(self): self._buffer = "" def write(self, chars): self._buffer += chars def read(se...
35.315789
115
0.554396
from test import test_support import unittest import codecs import sys, StringIO, _testcapi class Queue(object): """ queue: write bytes at one end, read bytes from the other end """ def __init__(self): self._buffer = "" def write(self, chars): self._buffer += chars def read(se...
false
true
f7f27d0911af6911935ffc658b9dc43919c7d924
244
py
Python
tests/apps/app1/models/__init__.py
coboyoshi/uvicore
9cfdeeac83000b156fe48f068b4658edaf51c8de
[ "MIT" ]
11
2021-03-22T22:07:49.000Z
2022-03-08T16:18:33.000Z
tests/apps/app1/models/__init__.py
coboyoshi/uvicore
9cfdeeac83000b156fe48f068b4658edaf51c8de
[ "MIT" ]
12
2021-03-04T05:51:24.000Z
2021-09-22T05:16:18.000Z
tests/apps/app1/models/__init__.py
coboyoshi/uvicore
9cfdeeac83000b156fe48f068b4658edaf51c8de
[ "MIT" ]
2
2021-03-25T14:49:56.000Z
2021-11-17T23:20:29.000Z
from .attribute import Attribute from .comment import Comment from .contact import Contact from .hashtag import Hashtag from .image import Image from .post import Post from .tag import Tag from .user_info import UserInfo from .user import User
24.4
32
0.815574
from .attribute import Attribute from .comment import Comment from .contact import Contact from .hashtag import Hashtag from .image import Image from .post import Post from .tag import Tag from .user_info import UserInfo from .user import User
true
true
f7f280483ffaf8a232b1b13cefd82bf0fba202a9
8,717
py
Python
httpresplog/httpresplog.py
beebyte/httpresplog
f71b84308bf23390ffc8b481fe5aaa73dc5299f4
[ "MIT" ]
null
null
null
httpresplog/httpresplog.py
beebyte/httpresplog
f71b84308bf23390ffc8b481fe5aaa73dc5299f4
[ "MIT" ]
null
null
null
httpresplog/httpresplog.py
beebyte/httpresplog
f71b84308bf23390ffc8b481fe5aaa73dc5299f4
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """httpresplog - HTTP response time logging. Similar to https://github.com/sii/httpresptime except it logs to a database, and a lot of options have been stripped out. THIS IS THE WORK OF JUST A FEW HOURS, it needs a lot of polishing and cleaning, but it works. The goal was speed of development ...
29.449324
127
0.636572
import time import argparse import pymysql import pymysql.cursors import datetime import requests from urllib.parse import urlparse import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) CHROME_USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome...
true
true
f7f28076cb9b777dffa2614d60f1e3cbb9bfb55c
258
py
Python
nezzle/widgets/dockwidget.py
dwgoon/nezzle
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
[ "MIT" ]
2
2021-10-06T08:54:02.000Z
2021-10-06T16:17:18.000Z
nezzle/widgets/dockwidget.py
dwgoon/nezzle
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
[ "MIT" ]
null
null
null
nezzle/widgets/dockwidget.py
dwgoon/nezzle
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
[ "MIT" ]
null
null
null
from qtpy.QtCore import Signal from qtpy.QtWidgets import QDockWidget class DockWidget(QDockWidget): closeEventOccured = Signal(bool) def closeEvent(self, event): self.closeEventOccured.emit(False) return super().closeEvent(event)
23.454545
42
0.74031
from qtpy.QtCore import Signal from qtpy.QtWidgets import QDockWidget class DockWidget(QDockWidget): closeEventOccured = Signal(bool) def closeEvent(self, event): self.closeEventOccured.emit(False) return super().closeEvent(event)
true
true
f7f28081d44188bdf0e1b8a3901d340031293b27
4,267
py
Python
tests/test_app.py
uSpike/raspberry-api
5f855463b2ff0dca13188ddcc0dab9440bbac484
[ "MIT" ]
2
2016-04-05T04:17:44.000Z
2019-03-21T07:52:04.000Z
tests/test_app.py
uSpike/raspberry-api-server
5f855463b2ff0dca13188ddcc0dab9440bbac484
[ "MIT" ]
null
null
null
tests/test_app.py
uSpike/raspberry-api-server
5f855463b2ff0dca13188ddcc0dab9440bbac484
[ "MIT" ]
null
null
null
from contextlib import contextmanager import tempfile from flask_testing import TestCase from raspberry_api.server.app import app # monkey patch from raspberry_api.server.spi import _flashrom from raspberry_api.server.gpio import GPIO class Base(TestCase): def create_app(self): app.config['TESTING'] = ...
28.831081
81
0.547692
from contextlib import contextmanager import tempfile from flask_testing import TestCase from raspberry_api.server.app import app from raspberry_api.server.spi import _flashrom from raspberry_api.server.gpio import GPIO class Base(TestCase): def create_app(self): app.config['TESTING'] = True r...
true
true