hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f72ee556b494b4e5facd04b0cd2dbe2c186e4740
1,156
py
Python
plugins/math/komand_math/actions/calculate/action.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
46
2019-06-05T20:47:58.000Z
2022-03-29T10:18:01.000Z
plugins/math/komand_math/actions/calculate/action.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
386
2019-06-07T20:20:39.000Z
2022-03-30T17:35:01.000Z
plugins/math/komand_math/actions/calculate/action.py
lukaszlaszuk/insightconnect-plugins
8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892
[ "MIT" ]
43
2019-07-09T14:13:58.000Z
2022-03-28T12:04:46.000Z
import insightconnect_plugin_runtime from .schema import CalculateInput, CalculateOutput, Input, Output, Component from insightconnect_plugin_runtime.exceptions import PluginException from simpleeval import simple_eval class Calculate(insightconnect_plugin_runtime.Action): _result = None def __init__(self): ...
33.028571
115
0.622837
import insightconnect_plugin_runtime from .schema import CalculateInput, CalculateOutput, Input, Output, Component from insightconnect_plugin_runtime.exceptions import PluginException from simpleeval import simple_eval class Calculate(insightconnect_plugin_runtime.Action): _result = None def __init__(self): ...
true
true
f72ee7470b394ffe1d61f50214d906f893d3278c
937
py
Python
server/api/urls.py
di-unipi-socc/MicroAnalyserServer
aa066df5cf329328e82c1d72cf09ddc249887a64
[ "MIT" ]
13
2019-10-01T20:23:38.000Z
2021-11-24T09:14:04.000Z
server/api/urls.py
di-unipi-socc/microFreshener
aa066df5cf329328e82c1d72cf09ddc249887a64
[ "MIT" ]
21
2019-11-04T15:29:23.000Z
2022-02-26T10:41:20.000Z
server/api/urls.py
di-unipi-socc/MicroAnalyserServer
aa066df5cf329328e82c1d72cf09ddc249887a64
[ "MIT" ]
2
2021-10-11T07:48:36.000Z
2021-12-14T21:02:03.000Z
# api/urls.py from django.contrib import admin from django.urls import include, path from rest_framework.urlpatterns import format_suffix_patterns from api import view urlpatterns = [ path('model', view.graph), path('analyse', view.graph_analysis), path('export', view.graph_export), path('import', vie...
34.703704
79
0.721451
from django.contrib import admin from django.urls import include, path from rest_framework.urlpatterns import format_suffix_patterns from api import view urlpatterns = [ path('model', view.graph), path('analyse', view.graph_analysis), path('export', view.graph_export), path('import', view.graph_import...
true
true
f72ee8622daf69c1cb94611e88480ed29b8c08ab
4,390
py
Python
paddlers/models/ppdet/utils/profiler.py
Xiaracto/PaddleRS
6e9b99a79fe740775daff310bd1ca3e6fbc86f80
[ "Apache-2.0" ]
1
2022-03-30T10:59:58.000Z
2022-03-30T10:59:58.000Z
paddlers/models/ppdet/utils/profiler.py
wondering516/PaddleRS
b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f
[ "Apache-2.0" ]
null
null
null
paddlers/models/ppdet/utils/profiler.py
wondering516/PaddleRS
b6f7033f3c0ca7bc6952456c0a0f53eef6c1c07f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2022 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...
39.196429
81
0.628246
import sys import paddle _profiler_step_id = 0 _profiler_options = None class ProfilerOptions(object): def __init__(self, options_str): assert isinstance(options_str, str) self._options = { 'batch_range': [10, 20], 'state': 'All', 'sorted_key': 'total', ...
true
true
f72ee96b3252f32009b52b97e42cb9a9308172b4
2,405
py
Python
tools/train.py
yoxu515/aot-benchmark
5a7665fc8e0f0e64bc8ba6028b15d9ab32f4c56a
[ "BSD-3-Clause" ]
105
2021-11-16T12:43:59.000Z
2022-03-31T08:05:11.000Z
tools/train.py
lingyunwu14/aot-benchmark
99f74f051c91ac221e44f3edab3534ae4dd233f7
[ "BSD-3-Clause" ]
14
2021-11-18T09:52:36.000Z
2022-03-31T16:26:32.000Z
tools/train.py
lingyunwu14/aot-benchmark
99f74f051c91ac221e44f3edab3534ae4dd233f7
[ "BSD-3-Clause" ]
17
2021-11-16T13:28:29.000Z
2022-03-29T02:14:48.000Z
import importlib import random import sys sys.setrecursionlimit(10000) sys.path.append('.') sys.path.append('..') import torch.multiprocessing as mp from networks.managers.trainer import Trainer def main_worker(gpu, cfg, enable_amp=True): # Initiate a training manager trainer = Trainer(rank=gpu, cfg=cfg, e...
30.0625
79
0.675676
import importlib import random import sys sys.setrecursionlimit(10000) sys.path.append('.') sys.path.append('..') import torch.multiprocessing as mp from networks.managers.trainer import Trainer def main_worker(gpu, cfg, enable_amp=True): trainer = Trainer(rank=gpu, cfg=cfg, enable_amp=enable_amp) ...
true
true
f72eea59e503d70ee01dac7d729bac23d7d76c56
1,283
py
Python
alipay/aop/api/response/AlipayInsUnderwriteUserPolicyQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/AlipayInsUnderwriteUserPolicyQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/response/AlipayInsUnderwriteUserPolicyQueryResponse.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.InsPolicy import InsPolicy class AlipayInsUnderwriteUserPolicyQueryResponse(AlipayResponse): def __init__(self): super(AlipayInsUnderwriteU...
29.837209
115
0.646921
import simplejson as json from alipay.aop.api.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.InsPolicy import InsPolicy class AlipayInsUnderwriteUserPolicyQueryResponse(AlipayResponse): def __init__(self): super(AlipayInsUnderwriteUserPolicyQueryResponse, self).__init__() ...
true
true
f72eead581d421c3d44843fa5cbdc580e431a508
9,270
py
Python
Manuscript-figures/xcorr_lag_composite.py
ehultee/helheim-fiesta
ed4e3f4ceac58137c1a4066941783a5c38d29c9b
[ "MIT" ]
null
null
null
Manuscript-figures/xcorr_lag_composite.py
ehultee/helheim-fiesta
ed4e3f4ceac58137c1a4066941783a5c38d29c9b
[ "MIT" ]
null
null
null
Manuscript-figures/xcorr_lag_composite.py
ehultee/helheim-fiesta
ed4e3f4ceac58137c1a4066941783a5c38d29c9b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Six-panel xcorr *and* lag Created on Thu Feb 4 18:21:08 2021 @author: lizz """ div_colors = 'RdBu' # choose divergent colormap for xcorr # lag_colors = 'PiYG' # choose divergent colormap for lag corrnorm_min, corrnorm_max = -0.3, 0.3 # lagnorm_min, lagnorm_max = -36...
58.670886
119
0.66548
div_colors = 'RdBu' corrnorm_min, corrnorm_max = -0.3, 0.3 lag_colors = 'Greens' lagnorm_min, lagnorm_max = 0, 365 SMALL_SIZE = 10 MEDIUM_SIZE = 12 BIGGER_SIZE = 14 plt.rc('font', size=SMALL_SIZE) plt.rc('axes', titlesize=BIGGER_SIZE) plt.rc('axes', labelsize=MEDIUM_SIZE) plt.rc('xtick', labelsize=SM...
true
true
f72eeb8fcef6921a2eaeb55802122ae8eb9fcfcd
159,724
py
Python
tests/test_mishchenko_refllib.py
ghislainp/mishchenko_brf
de7fe70730b53f17fb7e7aa9a45f08bf7d97abd1
[ "MIT" ]
2
2021-12-19T17:43:48.000Z
2022-01-30T21:08:54.000Z
tests/test_mishchenko_refllib.py
ghislainp/mishchenko_brf
de7fe70730b53f17fb7e7aa9a45f08bf7d97abd1
[ "MIT" ]
null
null
null
tests/test_mishchenko_refllib.py
ghislainp/mishchenko_brf
de7fe70730b53f17fb7e7aa9a45f08bf7d97abd1
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Tests for `mishchenko_brf` package.""" import numpy as np from mishchenko_brf.lib.refl import brf def test_brf(): """Sample pytest test function with the pytest fixture as an argument.""" # from bs4 import BeautifulSoup # assert 'GitHub' in BeautifulSoup(response.content).title...
27.33128
77
0.43567
import numpy as np from mishchenko_brf.lib.refl import brf def test_brf(): ssalb, _, legendre = setup() _, spherical_albedo, albedo, _, r = brf(ssalb, len(legendre), legendre) exptected_spherical_albedo, expected_albedo, expected_r1 = results() np.testing.assert_allclose(albedo, expecte...
true
true
f72eebafad7228c74cea213d49c8f2565bcb055c
112,270
py
Python
AI-env/lib/python3.7/site-packages/paramiko/transport.py
parth5795/iOT-benchmarking
6dfc95907d85f50ee2c68592ce78b4212be5f823
[ "MIT" ]
12
2018-07-18T05:45:18.000Z
2020-02-19T21:27:33.000Z
AI-env/lib/python3.7/site-packages/paramiko/transport.py
parth5795/iOT-benchmarking
6dfc95907d85f50ee2c68592ce78b4212be5f823
[ "MIT" ]
12
2021-03-09T03:01:16.000Z
2022-03-11T23:59:36.000Z
AI-env/lib/python3.7/site-packages/paramiko/transport.py
parth5795/iOT-benchmarking
6dfc95907d85f50ee2c68592ce78b4212be5f823
[ "MIT" ]
6
2019-02-20T00:42:29.000Z
2020-08-08T17:01:43.000Z
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Fr...
38.330488
90
0.582854
from __future__ import print_function import os import socket import sys import threading import time import weakref from hashlib import md5, sha1, sha256, sha512 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import algorithms, Cipher, modes import paramiko fro...
true
true
f72eef8c95e4f3ef8a9225bc7ec3eeffb64fa31f
131
py
Python
Gluharniki.py
regostar/competitive_prog_py
56db79c431c5823039e6749063f3b21d5e79ca44
[ "MIT" ]
null
null
null
Gluharniki.py
regostar/competitive_prog_py
56db79c431c5823039e6749063f3b21d5e79ca44
[ "MIT" ]
null
null
null
Gluharniki.py
regostar/competitive_prog_py
56db79c431c5823039e6749063f3b21d5e79ca44
[ "MIT" ]
null
null
null
from math import ceil t = int(input()) for _ in range(t): row, col = map(int,input().split()) print(ceil((row * col) / 2))
21.833333
39
0.587786
from math import ceil t = int(input()) for _ in range(t): row, col = map(int,input().split()) print(ceil((row * col) / 2))
true
true
f72ef03ed69fe6f6031c918f52dc15739624e63f
50,478
py
Python
scipy/sparse/compressed.py
ririw/scipy
680ecf8c52966343827903e6b7983b1ef7323fe2
[ "BSD-3-Clause" ]
null
null
null
scipy/sparse/compressed.py
ririw/scipy
680ecf8c52966343827903e6b7983b1ef7323fe2
[ "BSD-3-Clause" ]
null
null
null
scipy/sparse/compressed.py
ririw/scipy
680ecf8c52966343827903e6b7983b1ef7323fe2
[ "BSD-3-Clause" ]
null
null
null
"""Base class for sparse matrix formats using compressed storage.""" from __future__ import division, print_function, absolute_import __all__ = [] from warnings import warn import operator import numpy as np from scipy._lib._util import _prune_array from .base import spmatrix, isspmatrix, SparseEfficiencyWarning fr...
39.039443
79
0.54398
from __future__ import division, print_function, absolute_import __all__ = [] from warnings import warn import operator import numpy as np from scipy._lib._util import _prune_array from .base import spmatrix, isspmatrix, SparseEfficiencyWarning from .data import _data_matrix, _minmax_mixin from .dia import dia_matr...
true
true
f72ef0d45883357b7389e4970e9395830f94792a
80
py
Python
run.py
5x/ds-ants-geopy-extended
6017b5da444cc33bde47f0c7cf2cf06a640a354c
[ "MIT" ]
null
null
null
run.py
5x/ds-ants-geopy-extended
6017b5da444cc33bde47f0c7cf2cf06a640a354c
[ "MIT" ]
null
null
null
run.py
5x/ds-ants-geopy-extended
6017b5da444cc33bde47f0c7cf2cf06a640a354c
[ "MIT" ]
1
2019-12-06T10:20:08.000Z
2019-12-06T10:20:08.000Z
from ants.ants import demonstrate if __name__ == '__main__': demonstrate()
16
33
0.725
from ants.ants import demonstrate if __name__ == '__main__': demonstrate()
true
true
f72ef1faaa7d4dac60adb50472f713f106ff3158
758
py
Python
venv/Lib/site-packages/pandas/tests/tseries/offsets/common.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
1
2021-02-06T21:00:00.000Z
2021-02-06T21:00:00.000Z
venv/Lib/site-packages/pandas/tests/tseries/offsets/common.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pandas/tests/tseries/offsets/common.py
Jos33y/student-performance-knn
4e965434f52dd6a1380904aa257df1edfaebb3c4
[ "MIT" ]
null
null
null
""" Assertion helpers for offsets tests """ def assert_offset_equal(offset, base, expected): actual = offset + base actual_swapped = base + offset actual_apply = offset.apply(base) try: assert actual == expected assert actual_swapped == expected assert actual_apply ...
28.074074
79
0.60686
def assert_offset_equal(offset, base, expected): actual = offset + base actual_swapped = base + offset actual_apply = offset.apply(base) try: assert actual == expected assert actual_swapped == expected assert actual_apply == expected except AssertionError: ...
true
true
f72ef247c55be69d301aa864fe18c01087abc773
587
py
Python
conftest.py
hackoregon/neighborhoods-2018
2e1bf837365182a212527e1afbedddc759d0ee78
[ "MIT" ]
6
2018-03-16T00:06:31.000Z
2019-06-02T21:27:03.000Z
conftest.py
hackoregon/neighborhoods-2018
2e1bf837365182a212527e1afbedddc759d0ee78
[ "MIT" ]
53
2018-03-16T03:29:04.000Z
2021-06-10T20:17:11.000Z
conftest.py
hackoregon/neighborhoods-2018
2e1bf837365182a212527e1afbedddc759d0ee78
[ "MIT" ]
1
2018-06-20T16:03:40.000Z
2018-06-20T16:03:40.000Z
import pytest import os import neighborhoods_backend @pytest.fixture(scope='session') def django_db_setup(): neighborhoods_backend.settings.DATABASES['default'] = { 'ENGINE': 'django_db_geventpool.backends.postgresql_psycopg2', 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'), 'NAME': os.en...
29.35
70
0.633731
import pytest import os import neighborhoods_backend @pytest.fixture(scope='session') def django_db_setup(): neighborhoods_backend.settings.DATABASES['default'] = { 'ENGINE': 'django_db_geventpool.backends.postgresql_psycopg2', 'PASSWORD': os.environ.get('POSTGRES_PASSWORD'), 'NAME': os.en...
true
true
f72ef2fc7fec4b7efa2f516ad4626de6d8822b3b
1,605
py
Python
filter_from_list.py
skratchdot/media-tools
bca0c683fb637aeefda1c49454a118f809047d97
[ "MIT" ]
13
2019-12-09T07:56:13.000Z
2021-08-03T01:45:53.000Z
filter_from_list.py
skratchdot/media-tools
bca0c683fb637aeefda1c49454a118f809047d97
[ "MIT" ]
1
2020-04-29T00:00:14.000Z
2021-07-09T14:24:19.000Z
filter_from_list.py
skratchdot/media-tools
bca0c683fb637aeefda1c49454a118f809047d97
[ "MIT" ]
3
2020-04-27T15:36:36.000Z
2021-03-29T17:52:35.000Z
# -*- coding: utf-8 -*- import argparse import inspect import math import os from pprint import pprint import sys from lib.collection_utils import * from lib.io_utils import * from lib.math_utils import * # input parser = argparse.ArgumentParser() parser.add_argument('-in', dest="INPUT_FILE", default="tmp/samples.cs...
33.4375
124
0.709034
import argparse import inspect import math import os from pprint import pprint import sys from lib.collection_utils import * from lib.io_utils import * from lib.math_utils import * parser = argparse.ArgumentParser() parser.add_argument('-in', dest="INPUT_FILE", default="tmp/samples.csv", help="Input file") parser.ad...
true
true
f72ef3946956775383152170dd5a17cfd84646d4
5,126
py
Python
src/models.py
athatheo/House-GANs-Reproduction
00cc807f1e74f88eef5ed81615bfd87a39c52f94
[ "MIT" ]
null
null
null
src/models.py
athatheo/House-GANs-Reproduction
00cc807f1e74f88eef5ed81615bfd87a39c52f94
[ "MIT" ]
null
null
null
src/models.py
athatheo/House-GANs-Reproduction
00cc807f1e74f88eef5ed81615bfd87a39c52f94
[ "MIT" ]
null
null
null
import torch from torch import cat from torch.nn import Conv2d from torch.nn import Linear from torch.nn import Module from torch.nn import ConvTranspose2d from torch.nn import LeakyReLU from torch.nn import Tanh from torch.nn import MaxPool2d from torch import zeros_like class ConvMPN(Module): def __init__(self)...
36.35461
110
0.584666
import torch from torch import cat from torch.nn import Conv2d from torch.nn import Linear from torch.nn import Module from torch.nn import ConvTranspose2d from torch.nn import LeakyReLU from torch.nn import Tanh from torch.nn import MaxPool2d from torch import zeros_like class ConvMPN(Module): def __init__(self)...
true
true
f72ef61fc1dcc54611562b5350866141b7262a8c
507
py
Python
build/summit_xl_common/summit_xl_localization/catkin_generated/pkg.develspace.context.pc.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
build/summit_xl_common/summit_xl_localization/catkin_generated/pkg.develspace.context.pc.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
build/summit_xl_common/summit_xl_localization/catkin_generated/pkg.develspace.context.pc.py
Jam-cpu/Masters-Project---Final
0b266b1f117a579b96507249f0a128d0e3cc082a
[ "BSD-3-Clause-Clear" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "robot_localization;roscpp;tf;tf2;tf2_ros;message_filters;std_msgs;std_srvs;geometry_msgs;nav_msgs;sensor_msgs;robotnik_msgs;mavros_msgs".repla...
56.333333
180
0.763314
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "robot_localization;roscpp;tf;tf2;tf2_ros;message_filters;std_msgs;std_srvs;geometry_msgs;nav_msgs;sensor_msgs;robotnik_msgs;mavros_msgs".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(...
true
true
f72ef6e9a81af96f8effa83530a460f9a5ebed9d
38,041
py
Python
pybind/slxos/v16r_1_00b/mpls_state/lsp/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/mpls_state/lsp/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/mpls_state/lsp/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
71.775472
784
0.72761
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
true
true
f72ef7eb0ddb67009fc21687759d869de7d0b79e
456
py
Python
stubs.min/System/Windows/Forms/__init___parts/HScrollProperties.py
ricardyn/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2021-02-02T13:39:16.000Z
2021-02-02T13:39:16.000Z
stubs.min/System/Windows/Forms/__init___parts/HScrollProperties.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Forms/__init___parts/HScrollProperties.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class HScrollProperties(ScrollProperties): """ Provides basic properties for the System.Windows.Forms.HScrollBar HScrollProperties(container: ScrollableControl) """ @staticmethod def __new__(self,container): """ __new__(cls: type,container: ScrollableControl) """ pass ParentControl=property(lam...
26.823529
85
0.72807
class HScrollProperties(ScrollProperties): """ __new__(cls: type,container: ScrollableControl) """ pass """Gets the control to which this scroll information applies.
true
true
f72ef7f4af6964877bdcb43c3b93166aefe758c0
1,273
py
Python
tests/test_bayesian.py
eric-erki/autokeras
d365a04af7f41641c4b0634fc076f6dbe2364d53
[ "MIT" ]
1
2018-08-06T03:57:51.000Z
2018-08-06T03:57:51.000Z
tests/test_bayesian.py
eric-erki/autokeras
d365a04af7f41641c4b0634fc076f6dbe2364d53
[ "MIT" ]
null
null
null
tests/test_bayesian.py
eric-erki/autokeras
d365a04af7f41641c4b0634fc076f6dbe2364d53
[ "MIT" ]
1
2018-10-11T03:43:41.000Z
2018-10-11T03:43:41.000Z
from autokeras.bayesian import * from tests.common import get_add_skip_model, get_concat_skip_model, get_conv_dense_model def test_edit_distance(): descriptor1 = get_add_skip_model().extract_descriptor() descriptor2 = get_concat_skip_model().extract_descriptor() assert edit_distance(descriptor1, descripto...
37.441176
101
0.732914
from autokeras.bayesian import * from tests.common import get_add_skip_model, get_concat_skip_model, get_conv_dense_model def test_edit_distance(): descriptor1 = get_add_skip_model().extract_descriptor() descriptor2 = get_concat_skip_model().extract_descriptor() assert edit_distance(descriptor1, descripto...
true
true
f72ef82aa0bb7f97b0195399046eb262d8c67ee3
17,244
py
Python
pymongo/operations.py
james00209/mongodb-mongo-python-driver
bf6af9fd77bc13c0668018500071992e9e5ba05b
[ "Apache-2.0" ]
1
2020-08-04T08:30:25.000Z
2020-08-04T08:30:25.000Z
pymongo/operations.py
james00209/mongodb-mongo-python-driver
bf6af9fd77bc13c0668018500071992e9e5ba05b
[ "Apache-2.0" ]
null
null
null
pymongo/operations.py
james00209/mongodb-mongo-python-driver
bf6af9fd77bc13c0668018500071992e9e5ba05b
[ "Apache-2.0" ]
null
null
null
# Copyright 2015-present MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
38.577181
100
0.603978
from bson.py3compat import string_type from pymongo import helpers from pymongo.common import validate_boolean, validate_is_mapping, validate_list from pymongo.collation import validate_collation_or_none from pymongo.helpers import _gen_index_name, _index_document, _index_list class InsertOne(object): __slots...
true
true
f72ef8d492f94e15b347ad4d22bde114fd4df114
9,789
py
Python
cartography/classification/glue_utils.py
dyahadila/ood_cartography
ff65bf2b1a170e2913f0019a15af3398a1808f0f
[ "Apache-2.0" ]
null
null
null
cartography/classification/glue_utils.py
dyahadila/ood_cartography
ff65bf2b1a170e2913f0019a15af3398a1808f0f
[ "Apache-2.0" ]
null
null
null
cartography/classification/glue_utils.py
dyahadila/ood_cartography
ff65bf2b1a170e2913f0019a15af3398a1808f0f
[ "Apache-2.0" ]
null
null
null
import logging import os from transformers import glue_compute_metrics from transformers import glue_convert_examples_to_features as convert_examples_to_features from transformers import glue_output_modes from transformers import glue_processors from transformers.data.processors.glue import MnliMismatchedProcessor fr...
41.478814
130
0.647053
import logging import os from transformers import glue_compute_metrics from transformers import glue_convert_examples_to_features as convert_examples_to_features from transformers import glue_output_modes from transformers import glue_processors from transformers.data.processors.glue import MnliMismatchedProcessor fr...
true
true
f72ef9d32075ad3081247fcdbd108c4a87b8024a
446
py
Python
invenio_logging/version.py
kprzerwa/invenio-logging
1eab0074eaf732f8bd303817e931fdf0c0a53b71
[ "MIT" ]
null
null
null
invenio_logging/version.py
kprzerwa/invenio-logging
1eab0074eaf732f8bd303817e931fdf0c0a53b71
[ "MIT" ]
null
null
null
invenio_logging/version.py
kprzerwa/invenio-logging
1eab0074eaf732f8bd303817e931fdf0c0a53b71
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2019 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Version information for Invenio-Logging. This file is imported by ``invenio_loggi...
24.777778
72
0.726457
from __future__ import absolute_import, print_function __version__ = '1.2.0'
true
true
f72ef9eff5cffb76416d59a9c3337dac4842e086
2,066
py
Python
flaskblog/posts/routes.py
amiinegal/Blog
b88b29603832048a1322cfd79b2cef0684282f4b
[ "Unlicense", "MIT" ]
null
null
null
flaskblog/posts/routes.py
amiinegal/Blog
b88b29603832048a1322cfd79b2cef0684282f4b
[ "Unlicense", "MIT" ]
null
null
null
flaskblog/posts/routes.py
amiinegal/Blog
b88b29603832048a1322cfd79b2cef0684282f4b
[ "Unlicense", "MIT" ]
null
null
null
from flask import (render_template, url_for, flash, redirect, request, abort, Blueprint) from flask_login import current_user, login_required from flaskblog import db from flaskblog.models import Post from flaskblog.posts.forms import PostForm posts = Blueprint('posts', __name__) @posts.route("/po...
33.868852
90
0.664085
from flask import (render_template, url_for, flash, redirect, request, abort, Blueprint) from flask_login import current_user, login_required from flaskblog import db from flaskblog.models import Post from flaskblog.posts.forms import PostForm posts = Blueprint('posts', __name__) @posts.route("/po...
true
true
f72ef9fd42c6c5d66574a205a52aee8fc64d8a20
690
py
Python
backend/migrations/versions/ae566f24d973_.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
null
null
null
backend/migrations/versions/ae566f24d973_.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
368
2018-12-18T14:43:20.000Z
2022-03-02T02:54:18.000Z
backend/migrations/versions/ae566f24d973_.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
2
2019-10-02T03:06:06.000Z
2020-10-05T16:53:48.000Z
"""empty message Revision ID: ae566f24d973 Revises: 838f47fa598e Create Date: 2020-02-18 17:02:08.574872 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ae566f24d973' down_revision = '838f47fa598e' branch_labels = None depends_on = None def upgrade(): # ...
23.793103
103
0.705797
from alembic import op import sqlalchemy as sa revision = 'ae566f24d973' down_revision = '838f47fa598e' branch_labels = None depends_on = None def upgrade(): op.add_column('stardrive_user', sa.Column('last_login', sa.DateTime(timezone=True), nullable=True)) def downgrade(): op.drop_column('sta...
true
true
f72efb136a1aa339fcf07bfbcbdf071f1369ec8a
883
py
Python
dynadb/migrations/0075_auto_20170124_1439.py
GPCRmd/GPCRmd
7dc75359ace4a00c1597bdb7a86ebee17d51f09c
[ "Apache-2.0" ]
3
2019-03-06T13:35:38.000Z
2020-08-05T15:31:29.000Z
dynadb/migrations/0075_auto_20170124_1439.py
GPCRmd/GPCRmd
7dc75359ace4a00c1597bdb7a86ebee17d51f09c
[ "Apache-2.0" ]
null
null
null
dynadb/migrations/0075_auto_20170124_1439.py
GPCRmd/GPCRmd
7dc75359ace4a00c1597bdb7a86ebee17d51f09c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-24 13:39 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dynadb', '0074_auto_20170123_1212'), ] operations = [...
32.703704
166
0.642129
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('dynadb', '0074_auto_20170123_1212'), ] operations = [ migrations.AlterField( model_name='dyndbefficacy'...
true
true
f72efbf64861c201c9fde808e528c73dae484dc4
1,157
py
Python
genomepy/plugins/minimap2.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
146
2019-11-19T16:07:46.000Z
2022-03-15T16:10:31.000Z
genomepy/plugins/minimap2.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
125
2019-11-19T18:08:23.000Z
2022-03-30T09:16:46.000Z
genomepy/plugins/minimap2.py
tilschaef/genomepy
4c10e69b6886cf52381caf6498395391834a675b
[ "MIT" ]
18
2019-12-02T15:54:34.000Z
2022-03-04T19:16:31.000Z
import os from genomepy.plugins import Plugin from genomepy.utils import cmd_ok, mkdir_p, rm_rf, run_index_cmd class Minimap2Plugin(Plugin): def after_genome_download(self, genome, threads=1, force=False): if not cmd_ok("minimap2"): return # Create index dir index_dir = genom...
30.447368
78
0.560069
import os from genomepy.plugins import Plugin from genomepy.utils import cmd_ok, mkdir_p, rm_rf, run_index_cmd class Minimap2Plugin(Plugin): def after_genome_download(self, genome, threads=1, force=False): if not cmd_ok("minimap2"): return index_dir = genome.plugin["minimap2"...
true
true
f72efca428a828d722447e9aced971774beef150
4,183
py
Python
python/nano/src/bigdl/nano/automl/tf/objective.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/nano/src/bigdl/nano/automl/tf/objective.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
python/nano/src/bigdl/nano/automl/tf/objective.py
Forest216/BigDL
840da9a2eaf395978dd83730b02aa5e5dfbd7989
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 The BigDL Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
33.464
87
0.638059
from selectors import EpollSelector from tensorflow.keras.backend import clear_session from tensorflow.keras.models import clone_model import tensorflow as tf import inspect import copy from bigdl.nano.automl.hpo.backend import create_tfkeras_pruning_callback from bigdl.nano.utils.log4Error import invalidInputError ...
true
true
f72efd44eb8409c927c2b099abb4c95c6681f60d
2,428
py
Python
examples/python/onnx/mnist_mlp.py
jiazhihao/FlexFlow-1
b9bf0b615d8cf6d22bc38de4755b76ee3f8c4c22
[ "Apache-2.0" ]
1
2021-03-09T05:43:58.000Z
2021-03-09T05:43:58.000Z
examples/python/onnx/mnist_mlp.py
jiazhihao/FlexFlow-1
b9bf0b615d8cf6d22bc38de4755b76ee3f8c4c22
[ "Apache-2.0" ]
null
null
null
examples/python/onnx/mnist_mlp.py
jiazhihao/FlexFlow-1
b9bf0b615d8cf6d22bc38de4755b76ee3f8c4c22
[ "Apache-2.0" ]
null
null
null
from flexflow.core import * import numpy as np from flexflow.keras.datasets import mnist from flexflow.onnx.model import ONNXModel from accuracy import ModelAccuracy def top_level_task(): ffconfig = FFConfig() ffconfig.parse_args() print("Python API batchSize(%d) workersPerNodes(%d) numNodes(%d)" %(ffconfig.get...
34.685714
167
0.76112
from flexflow.core import * import numpy as np from flexflow.keras.datasets import mnist from flexflow.onnx.model import ONNXModel from accuracy import ModelAccuracy def top_level_task(): ffconfig = FFConfig() ffconfig.parse_args() print("Python API batchSize(%d) workersPerNodes(%d) numNodes(%d)" %(ffconfig.get...
true
true
f72efd6fc94e91466ebd1578b756f630faaefffc
1,461
py
Python
spiral.py
vimithamanohar/practice
3e5372aeb29b9db3467c97ef8c4f879fff1ac7b7
[ "MIT" ]
null
null
null
spiral.py
vimithamanohar/practice
3e5372aeb29b9db3467c97ef8c4f879fff1ac7b7
[ "MIT" ]
null
null
null
spiral.py
vimithamanohar/practice
3e5372aeb29b9db3467c97ef8c4f879fff1ac7b7
[ "MIT" ]
null
null
null
import math import unittest def get_line(arr, x, y, ln, dx, dy): ret = [] for i in range(ln): ret.append(arr[x][y]) x = x + dx y = y + dy return ret def get_square(arr, x, y, ln): if ln == 0: return [] if ln == 1: return [arr[x][y]] ret = [] ret....
22.476923
96
0.473648
import math import unittest def get_line(arr, x, y, ln, dx, dy): ret = [] for i in range(ln): ret.append(arr[x][y]) x = x + dx y = y + dy return ret def get_square(arr, x, y, ln): if ln == 0: return [] if ln == 1: return [arr[x][y]] ret = [] ret....
true
true
f72efd91fc83e7a45d20c311f82e965626069a2c
13,324
py
Python
i3pystatus/network.py
MaicoTimmerman/i3pystatus
dbfc94575b287420159434df2bb00fedeebeb2ed
[ "MIT" ]
null
null
null
i3pystatus/network.py
MaicoTimmerman/i3pystatus
dbfc94575b287420159434df2bb00fedeebeb2ed
[ "MIT" ]
null
null
null
i3pystatus/network.py
MaicoTimmerman/i3pystatus
dbfc94575b287420159434df2bb00fedeebeb2ed
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import netifaces from i3pystatus import IntervalModule from i3pystatus.core.color import ColorRangeModule from i3pystatus.core.util import make_graph, round_dict, make_bar def count_bits(integer): bits = 0 while (integer): integer &= integer - 1 bits += 1 return bit...
35.248677
118
0.611828
import netifaces from i3pystatus import IntervalModule from i3pystatus.core.color import ColorRangeModule from i3pystatus.core.util import make_graph, round_dict, make_bar def count_bits(integer): bits = 0 while (integer): integer &= integer - 1 bits += 1 return bits def v6_to_int(v6): ...
true
true
f72efe28d7c827765fc230987e47746d83b1714e
1,500
py
Python
00Python/day11/basic02.py
HaoZhang95/PythonAndMachineLearning
b897224b8a0e6a5734f408df8c24846a98c553bf
[ "MIT" ]
937
2019-05-08T08:46:25.000Z
2022-03-31T12:56:07.000Z
00Python/day11/basic02.py
Sakura-gh/Python24
b97e18867264a0647d5645c7d757a0040e755577
[ "MIT" ]
47
2019-09-17T10:06:02.000Z
2022-03-11T23:46:52.000Z
00Python/day11/basic02.py
Sakura-gh/Python24
b97e18867264a0647d5645c7d757a0040e755577
[ "MIT" ]
354
2019-05-10T02:15:26.000Z
2022-03-30T05:52:57.000Z
""" __new__()方法, 对象创建的过程, 1- new方法返回一个对象 2- init利用new返回的对象进行属性的添加 """ class Person(object): # 监听创建一个实例对象的过程,需要返回一个对象赋值给xiaoming # new中不return的话,那么久不会执行init方法 def __new__(cls, *args, **kwargs): print("new") print((object.__new__(cls))) return object.__new__(cls) # 构造方法...
20.547945
56
0.626
class Person(object): def __new__(cls, *args, **kwargs): print("new") print((object.__new__(cls))) return object.__new__(cls) def __init__(self, name): print("init") self.name = name def __del__(self): print("再见") xiaoming =...
true
true
f72efe3d12d989d9d5fbd596ed2881377aad1ab5
3,542
py
Python
test/functional/wallet_encryption.py
Hary2511/xaya
312ffe32f0bc58d0936f96770c59b57d9862ac35
[ "MIT" ]
2
2018-08-07T17:27:05.000Z
2018-08-07T17:28:18.000Z
test/functional/wallet_encryption.py
Hary2511/xaya
312ffe32f0bc58d0936f96770c59b57d9862ac35
[ "MIT" ]
null
null
null
test/functional/wallet_encryption.py
Hary2511/xaya
312ffe32f0bc58d0936f96770c59b57d9862ac35
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Wallet encryption""" import time from test_framework.test_framework import BitcoinTestFramework ...
43.195122
138
0.705816
import time from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, assert_greater_than, assert_greater_than_or_equal, ) class WalletEncryptionTest(BitcoinTestFramework): def set_test_params(self): self.setup_...
true
true
f72efe4f9f448f396364ed1b99e237c63630816c
2,612
py
Python
tests/providers/amazon/aws/hooks/test_aws_dynamodb_hook.py
wileeam/airflow
f46be8152a4d89c57db4ca46f5b3339e4876b723
[ "Apache-2.0" ]
1
2020-02-17T17:40:14.000Z
2020-02-17T17:40:14.000Z
tests/providers/amazon/aws/hooks/test_aws_dynamodb_hook.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
2
2021-05-12T12:41:51.000Z
2021-09-29T17:47:43.000Z
tests/providers/amazon/aws/hooks/test_aws_dynamodb_hook.py
devlocalca/airflow
58c3542ed25061320ce61dbe0adf451a44c738dd
[ "Apache-2.0" ]
null
null
null
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
32.246914
101
0.64242
import unittest import uuid from airflow.providers.amazon.aws.hooks.aws_dynamodb_hook import AwsDynamoDBHook try: from moto import mock_dynamodb2 except ImportError: mock_dynamodb2 = None class TestDynamoDBHook(unittest.TestCase): @unittest.skipIf(mock_dynamodb2 is None, 'mock_dynamodb2 package not pr...
true
true
f72efe56b3a6ea76c20c2859404736eb8275a81d
12,811
py
Python
install.py
ArgusHomeSecurity/argus_management
d2a6fb0004f23963f1cbc9cd07f40596abaf8b7b
[ "MIT" ]
null
null
null
install.py
ArgusHomeSecurity/argus_management
d2a6fb0004f23963f1cbc9cd07f40596abaf8b7b
[ "MIT" ]
1
2021-02-24T12:04:11.000Z
2021-02-24T12:04:11.000Z
install.py
ArPIHomeSecurity/arpi_management
d2a6fb0004f23963f1cbc9cd07f40596abaf8b7b
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 """ Script for installing the components of the ArPI home security system to a running Raspberry PI Zero Wifi host. It uses the configuration file install.yaml! --- @author: Gábor Kovács @copyright: 2017 arpi-security.info. All rights reserved. @contact: gkovacs81@gm...
31.246341
123
0.609788
import json import logging import subprocess import sys from argparse import ArgumentParser, RawDescriptionHelpFormatter from os import system from os.path import join, exists from socket import gaierror from time import sleep import paramiko import yaml from paramiko.ssh_exception import AuthenticationException, NoVa...
true
true
f72efec7f239fcde6bd467031c71d0a0a0d48054
3,661
py
Python
DNCNN/common.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
DNCNN/common.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
DNCNN/common.py
Khanhnn00/blind_sr_denoise
3153f90d20fd884ab69b47c30c685e0175276055
[ "Apache-2.0" ]
null
null
null
import os import random import numpy as np import scipy.misc as misc import imageio from tqdm import tqdm import cv2 from PIL import Image import torch import torch.nn.functional as F IMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP'] BINARY_EXTENSIONS = ['.npy'] BENCH...
29.055556
130
0.600656
import os import random import numpy as np import scipy.misc as misc import imageio from tqdm import tqdm import cv2 from PIL import Image import torch import torch.nn.functional as F IMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP'] BINARY_EXTENSIONS = ['.npy'] BENCH...
true
true
f72efed312141d7d38b208a997d8ee5a183db48d
1,290
py
Python
app/core/tests/test_models.py
slauzinho/recipe-app-api
c05f2d007dc19bab5792742a1e7959b5cf8e95a4
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
slauzinho/recipe-app-api
c05f2d007dc19bab5792742a1e7959b5cf8e95a4
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
slauzinho/recipe-app-api
c05f2d007dc19bab5792742a1e7959b5cf8e95a4
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): """ Test creating a new user with an email is successful""" email = 'test@example.com' password = 'testpass123' user = get_...
32.25
69
0.651163
from django.test import TestCase from django.contrib.auth import get_user_model class ModelTests(TestCase): def test_create_user_with_email_successful(self): email = 'test@example.com' password = 'testpass123' user = get_user_model().objects.create_user( email=email, ...
true
true
f72efee2c58c739a39aee6ac1603f9a379173f68
960
py
Python
pics/views.py
NinahMo/Pictogram
d7b1ad7af253e6b3a34c2495b370328bbc051059
[ "Unlicense" ]
null
null
null
pics/views.py
NinahMo/Pictogram
d7b1ad7af253e6b3a34c2495b370328bbc051059
[ "Unlicense" ]
null
null
null
pics/views.py
NinahMo/Pictogram
d7b1ad7af253e6b3a34c2495b370328bbc051059
[ "Unlicense" ]
null
null
null
from django.shortcuts import render,redirect from django.http import HttpResponse,Http404 from .models import Pics,categories # Create your views here. def welcome(request): return render(request, 'welcome.html') def pictogram(request): images = Pics.objects.all() return render(request, 'pictogram.html', ...
34.285714
98
0.710417
from django.shortcuts import render,redirect from django.http import HttpResponse,Http404 from .models import Pics,categories def welcome(request): return render(request, 'welcome.html') def pictogram(request): images = Pics.objects.all() return render(request, 'pictogram.html', {'images':images}) def sh...
true
true
f72effa674b9c81ff3e1f7f6616cfc19ae50580c
3,781
py
Python
fast_pixel_cnn_pp/test_end_to_end.py
tinyrobots/Generalized-PixelVAE
8d8c6033e14bf2ce37749bd2604e4a90459ff3d4
[ "MIT" ]
510
2017-02-21T17:18:51.000Z
2022-02-02T17:12:46.000Z
fast_pixel_cnn_pp/test_end_to_end.py
jinxu06/fast-pixel-cnn
ee99634be08c726c3da7e8ba2675c8d1448e15af
[ "MIT" ]
4
2017-08-24T18:20:11.000Z
2021-07-05T06:00:56.000Z
fast_pixel_cnn_pp/test_end_to_end.py
jinxu06/fast-pixel-cnn
ee99634be08c726c3da7e8ba2675c8d1448e15af
[ "MIT" ]
82
2017-02-21T23:16:28.000Z
2021-09-18T13:04:59.000Z
from . import model from . import fast_nn import tensorflow as tf import numpy as np import os import unittest class FastPixelCNNPPEndToEndTest(tf.test.TestCase): def test_end_to_end(self): with self.test_session() as sess: print('Creating model') image_size = (10, 32, 32, 4) ...
39.8
89
0.519968
from . import model from . import fast_nn import tensorflow as tf import numpy as np import os import unittest class FastPixelCNNPPEndToEndTest(tf.test.TestCase): def test_end_to_end(self): with self.test_session() as sess: print('Creating model') image_size = (10, 32, 32, 4) ...
true
true
f72f0248d59c0576c9f63814fa86650afed6d006
9,579
py
Python
dowhy/do_why.py
mrklees/dowhy
a9e950fd0cf180dc4cbbca13332638aab9d00c65
[ "MIT" ]
3
2019-12-21T05:46:21.000Z
2020-05-19T15:35:02.000Z
dowhy/do_why.py
mrklees/dowhy
a9e950fd0cf180dc4cbbca13332638aab9d00c65
[ "MIT" ]
null
null
null
dowhy/do_why.py
mrklees/dowhy
a9e950fd0cf180dc4cbbca13332638aab9d00c65
[ "MIT" ]
3
2019-09-05T10:59:58.000Z
2021-02-04T02:53:59.000Z
""" Module containing the main model class for the dowhy package. """ import logging from sympy import init_printing import dowhy.causal_estimators as causal_estimators import dowhy.causal_refuters as causal_refuters import dowhy.utils.cli_helpers as cli from dowhy.causal_estimator import CausalEstimate from dowhy....
38.939024
130
0.624178
import logging from sympy import init_printing import dowhy.causal_estimators as causal_estimators import dowhy.causal_refuters as causal_refuters import dowhy.utils.cli_helpers as cli from dowhy.causal_estimator import CausalEstimate from dowhy.causal_graph import CausalGraph from dowhy.causal_identifier import Cau...
true
true
f72f03ee4306e4479f46e2f00d5347764d7ca9b6
6,514
py
Python
lib/flows/cron/compactors_test.py
nahidupa/grr
100a9d85ef2abb234e12e3ac2623caffb4116be7
[ "Apache-2.0" ]
3
2016-02-20T13:06:31.000Z
2017-12-15T12:09:01.000Z
lib/flows/cron/compactors_test.py
nahidupa/grr
100a9d85ef2abb234e12e3ac2623caffb4116be7
[ "Apache-2.0" ]
3
2020-09-11T12:54:50.000Z
2020-09-11T12:55:01.000Z
lib/flows/cron/compactors_test.py
nahidupa/grr
100a9d85ef2abb234e12e3ac2623caffb4116be7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Tests for grr.lib.flows.cron.compactors.""" # pylint: disable=unused-import, g-bad-import-order from grr.lib import server_plugins # pylint: enable=unused-import, g-bad-import-order from grr.lib import aff4 from grr.lib import flags from grr.lib import flow from grr.lib import rdfvalue from...
40.7125
78
0.675161
from grr.lib import server_plugins from grr.lib import aff4 from grr.lib import flags from grr.lib import flow from grr.lib import rdfvalue from grr.lib import test_lib from grr.lib import utils class PackedVersionedCollectionCompactorTest(test_lib.FlowTestsBaseclass): def testCompactsSingleCollection(self): ...
true
true
f72f0480cd1832c1a453482d9f0e8bb0cd69f5f7
6,838
py
Python
carla-data-export/dataexport.py
zhangyanyu0722/EC523_Project
72673713bb798023e82ccc257e8c05459c34a4b9
[ "MIT" ]
3
2020-10-06T19:32:02.000Z
2020-10-21T04:16:04.000Z
carla-data-export/dataexport.py
zhangyanyu0722/EC523_Project
72673713bb798023e82ccc257e8c05459c34a4b9
[ "MIT" ]
null
null
null
carla-data-export/dataexport.py
zhangyanyu0722/EC523_Project
72673713bb798023e82ccc257e8c05459c34a4b9
[ "MIT" ]
null
null
null
""" This file contains all the methods responsible for saving the generated data in the correct output format. """ import cv2 import numpy as np import os import logging from utils import degrees_to_radians import json def save_groundplanes(planes_fname, player_measurements, lidar_height): from math import cos, ...
43.278481
135
0.603832
import cv2 import numpy as np import os import logging from utils import degrees_to_radians import json def save_groundplanes(planes_fname, player_measurements, lidar_height): from math import cos, sin rotation = player_measurements.transform.rotation pitch, roll = rotation.pitch, rotation.roll pi...
true
true
f72f0708d59dc5469fe994c4b30668cfc4355f4a
22
py
Python
__init__.py
cosanlab/facesync
bd5922de5729e4e76a6eaae84b45d965660f1545
[ "MIT" ]
9
2018-07-13T14:06:07.000Z
2021-12-24T01:53:20.000Z
__init__.py
cosanlab/facesync
bd5922de5729e4e76a6eaae84b45d965660f1545
[ "MIT" ]
null
null
null
__init__.py
cosanlab/facesync
bd5922de5729e4e76a6eaae84b45d965660f1545
[ "MIT" ]
2
2019-11-24T00:43:39.000Z
2020-10-08T05:06:52.000Z
__all__ = ["facesync"]
22
22
0.681818
__all__ = ["facesync"]
true
true
f72f071336b0f843d1521175037b68c86bc72fb7
467
py
Python
complex/complex/logger.py
jasonamyers/pynash-click
512e9712dc1de80e76a6815e0df04dd46af45641
[ "MIT" ]
null
null
null
complex/complex/logger.py
jasonamyers/pynash-click
512e9712dc1de80e76a6815e0df04dd46af45641
[ "MIT" ]
null
null
null
complex/complex/logger.py
jasonamyers/pynash-click
512e9712dc1de80e76a6815e0df04dd46af45641
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) file_log_handler = logging.FileHandler('combinator-cli.log') logger.addHandler(file_log_handler) stderr_log_handler = logging.StreamHandler() logger.addHandler(stderr_log_handler) format_string = '%(asctime)s - %(name)s - %(levelname...
29.1875
70
0.815846
import logging logger = logging.getLogger(__name__) logger.setLevel(logging.ERROR) file_log_handler = logging.FileHandler('combinator-cli.log') logger.addHandler(file_log_handler) stderr_log_handler = logging.StreamHandler() logger.addHandler(stderr_log_handler) format_string = '%(asctime)s - %(name)s - %(levelname...
true
true
f72f07649189725423a37d1b780363c21568ce47
1,124
py
Python
model-optimizer/extensions/front/mxnet/rnn_param_concat.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
null
null
null
model-optimizer/extensions/front/mxnet/rnn_param_concat.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
19
2021-03-26T08:11:00.000Z
2022-02-21T13:06:26.000Z
model-optimizer/extensions/front/mxnet/rnn_param_concat.py
calvinfeng/openvino
11f591c16852637506b1b40d083b450e56d0c8ac
[ "Apache-2.0" ]
1
2021-07-28T17:30:46.000Z
2021-07-28T17:30:46.000Z
""" Copyright (C) 2018-2021 Intel Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
31.222222
73
0.728648
from mo.front.extractor import FrontExtractorOp from mo.front.mxnet.extractors.utils import get_mxnet_layer_attrs from mo.ops.concat import Concat class RNNParamConcatFrontExtractor(FrontExtractorOp): op = '_rnn_param_concat' enabled = True @classmethod def extract(cls, node): attrs = get_mx...
true
true
f72f0880bd5a9c11966123d872540d2c0220fd79
2,536
py
Python
scanapi/evaluators/string_evaluator.py
dubirajara/scanapi
b0c7b40a48a4d60871c0b3cf9c959d0155985180
[ "MIT" ]
1
2020-06-02T18:08:08.000Z
2020-06-02T18:08:08.000Z
scanapi/evaluators/string_evaluator.py
dubirajara/scanapi
b0c7b40a48a4d60871c0b3cf9c959d0155985180
[ "MIT" ]
null
null
null
scanapi/evaluators/string_evaluator.py
dubirajara/scanapi
b0c7b40a48a4d60871c0b3cf9c959d0155985180
[ "MIT" ]
null
null
null
import logging import os import re import sys from scanapi.errors import BadConfigurationError, InvalidPythonCodeError from scanapi.evaluators.code_evaluator import CodeEvaluator logger = logging.getLogger(__name__) variable_pattern = re.compile( r"(?P<something_before>\w*)(?P<start>\${)(?P<variable>\w*)(?P<end>}...
28.494382
97
0.621451
import logging import os import re import sys from scanapi.errors import BadConfigurationError, InvalidPythonCodeError from scanapi.evaluators.code_evaluator import CodeEvaluator logger = logging.getLogger(__name__) variable_pattern = re.compile( r"(?P<something_before>\w*)(?P<start>\${)(?P<variable>\w*)(?P<end>}...
true
true
f72f0a5368a77bd168688ea65e43ba66486e53c4
902
py
Python
church/migrations/0017_linkedchurch.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
1
2021-01-22T02:52:33.000Z
2021-01-22T02:52:33.000Z
church/migrations/0017_linkedchurch.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
church/migrations/0017_linkedchurch.py
khanhpn/florida
5e83d0561b9f41ff79383a6a2f0a84d6c8459ef0
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-01 06:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('church', '0016_masstime'), ] operations = [ migrations.CreateModel( name='LinkedChurch', fields=[ ('...
32.214286
114
0.559867
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('church', '0016_masstime'), ] operations = [ migrations.CreateModel( name='LinkedChurch', fields=[ ('id', models.AutoField(auto_created=True, primary...
true
true
f72f0bebfae6ba10ce11191ee930be3d4ec64296
4,692
py
Python
app/model/SimpleSimulator.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
app/model/SimpleSimulator.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
6
2021-02-02T22:52:41.000Z
2022-03-12T00:37:30.000Z
app/model/SimpleSimulator.py
OuissalTAIM/jenkins
7ea5bcdeb6c0bb3cc14c2826a68e4f521de163c1
[ "BSD-1-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from app.graph.Graph import * from app.data.Client import Driver from app.config.env import MONIKER_SEPARATOR from app.entity.Transport import Transport from app.samples.graph_sample import SimpleEntity class SimpleSimulator: def __init__(self, graph): """ Constructor ...
34
113
0.547528
from app.graph.Graph import * from app.data.Client import Driver from app.config.env import MONIKER_SEPARATOR from app.entity.Transport import Transport from app.samples.graph_sample import SimpleEntity class SimpleSimulator: def __init__(self, graph): self.graph = graph def build_graph(self): ...
true
true
f72f0bee0a0d6143e7a6c4be603b00b01323a74d
1,459
py
Python
models/vgg16.py
lizhipengTouch/CSA-inpainting
50602607ddc9153af5bfe627e355b0466fc4944f
[ "CC-BY-4.0" ]
null
null
null
models/vgg16.py
lizhipengTouch/CSA-inpainting
50602607ddc9153af5bfe627e355b0466fc4944f
[ "CC-BY-4.0" ]
null
null
null
models/vgg16.py
lizhipengTouch/CSA-inpainting
50602607ddc9153af5bfe627e355b0466fc4944f
[ "CC-BY-4.0" ]
null
null
null
import torch import torchvision from torchvision import models from collections import namedtuple class Vgg16(torch.nn.Module): def __init__(self, requires_grad=False): super(Vgg16, self).__init__() vgg_pretrained_features = models.vgg16(pretrained=True).features # 获取预训练vgg网络层 self.slice1 ...
38.394737
92
0.6244
import torch import torchvision from torchvision import models from collections import namedtuple class Vgg16(torch.nn.Module): def __init__(self, requires_grad=False): super(Vgg16, self).__init__() vgg_pretrained_features = models.vgg16(pretrained=True).features self.slice1 = torch.nn.Seq...
true
true
f72f0db8c63a6241b6bfbba2ee4b1714cbdddaeb
2,061
py
Python
benchmark/startPyquil969.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil969.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startPyquil969.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=43 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(0) # number=3 pr...
25.134146
64
0.550704
import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() prog += H(0) prog += H(1) prog += H(2) prog += H(3) prog += H(4)...
false
true
f72f0df111c27c3d72be292658ad3543f741792e
6,525
py
Python
sdk/python/kulado_azure/network/express_route_circuit_peering.py
kulado/kulado-azure
f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/kulado_azure/network/express_route_circuit_peering.py
kulado/kulado-azure
f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/kulado_azure/network/express_route_circuit_peering.py
kulado/kulado-azure
f3a408fa0405fe6ae93e0049b2ae0f0e266f1cf6
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Kulado Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import json import warnings import kulado import kulado.runtime from .. import utilities, tables class ExpressRouteCircuitPeering(kula...
45.950704
308
0.70636
import json import warnings import kulado import kulado.runtime from .. import utilities, tables class ExpressRouteCircuitPeering(kulado.CustomResource): azure_asn: kulado.Output[float] express_route_circuit_name: kulado.Output[str] microsoft_peering_config: kulado.Output[dict] peer_asn: kulado.Output...
true
true
f72f0e3e3ffbf41a6e99a86e70f0c5f90ed14feb
2,479
py
Python
attachment_large_object/ir_attachment.py
ShaheenHossain/itpp-labs-misc-addons13
bf62dc5bc1abdc18d78e9560a286babbe1d0e082
[ "MIT" ]
null
null
null
attachment_large_object/ir_attachment.py
ShaheenHossain/itpp-labs-misc-addons13
bf62dc5bc1abdc18d78e9560a286babbe1d0e082
[ "MIT" ]
null
null
null
attachment_large_object/ir_attachment.py
ShaheenHossain/itpp-labs-misc-addons13
bf62dc5bc1abdc18d78e9560a286babbe1d0e082
[ "MIT" ]
3
2020-08-25T01:57:59.000Z
2021-09-11T15:38:02.000Z
# -*- coding: utf-8 -*- import logging import psycopg2 from odoo import api, models logger = logging.getLogger(__name__) LARGE_OBJECT_LOCATION = "postgresql:lobject" class IrAttachment(models.Model): """Provide storage as PostgreSQL large objects of attachements with filestore location ``postgresql:lobject``....
31.379747
114
0.624445
import logging import psycopg2 from odoo import api, models logger = logging.getLogger(__name__) LARGE_OBJECT_LOCATION = "postgresql:lobject" class IrAttachment(models.Model): _name = "ir.attachment" _inherit = "ir.attachment" @api.model def lobject(self, cr, *args): return cr._cnx.lobje...
true
true
f72f1077a32379129769997eb35ec1972c898c1c
102
py
Python
dircolors/pyls/__init__.py
mic-e/pydircolors
62096e73ed065d015adde3f9e55c38e10a49dc3c
[ "Apache-2.0" ]
3
2020-02-17T20:02:03.000Z
2020-09-05T02:17:47.000Z
dircolors/pyls/__init__.py
mic-e/pydircolors
62096e73ed065d015adde3f9e55c38e10a49dc3c
[ "Apache-2.0" ]
null
null
null
dircolors/pyls/__init__.py
mic-e/pydircolors
62096e73ed065d015adde3f9e55c38e10a49dc3c
[ "Apache-2.0" ]
2
2020-02-18T01:11:20.000Z
2020-09-05T02:17:51.000Z
# dircolors.pyls package """ pyls - a simple implementation of `ls` used to test python-dircolors """
34
76
0.72549
true
true
f72f11d65f3800ed3177636dba116a8e2edb427c
2,402
py
Python
test/test_tcti.py
fer9898/tpm2-pytss
a2bd7292411511a9c6da3c2553c7af01470e63ef
[ "BSD-2-Clause" ]
null
null
null
test/test_tcti.py
fer9898/tpm2-pytss
a2bd7292411511a9c6da3c2553c7af01470e63ef
[ "BSD-2-Clause" ]
null
null
null
test/test_tcti.py
fer9898/tpm2-pytss
a2bd7292411511a9c6da3c2553c7af01470e63ef
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 -u # SPDX-License-Identifier: BSD-2 import unittest from tpm2_pytss import * from .TSS2_BaseTest import TSS2_EsapiTest class TestTCTI(TSS2_EsapiTest): def test_init(self): self.assertEqual(self.tcti.version, 2) self.assertGreater(self.tcti.magic, 0) v1ctx = ffi.cast("...
30.405063
79
0.628226
import unittest from tpm2_pytss import * from .TSS2_BaseTest import TSS2_EsapiTest class TestTCTI(TSS2_EsapiTest): def test_init(self): self.assertEqual(self.tcti.version, 2) self.assertGreater(self.tcti.magic, 0) v1ctx = ffi.cast("TSS2_TCTI_CONTEXT_COMMON_V1 *", self.tcti._ctx) ...
true
true
f72f13692aafad6149b0efd13c89c38ea0616f87
6,325
py
Python
backend/users/api/views.py
tyrozz/django-next-backend
1e06d8daa079548d0d4c79474f035041d44d5ead
[ "MIT" ]
1
2022-02-24T17:55:35.000Z
2022-02-24T17:55:35.000Z
backend/users/api/views.py
tyrozz/django-next-backend
1e06d8daa079548d0d4c79474f035041d44d5ead
[ "MIT" ]
null
null
null
backend/users/api/views.py
tyrozz/django-next-backend
1e06d8daa079548d0d4c79474f035041d44d5ead
[ "MIT" ]
null
null
null
from allauth.account import app_settings as allauth_settings from allauth.account.models import EmailAddress from allauth.account.utils import complete_signup from allauth.account.views import ConfirmEmailView from django.contrib.auth import get_user_model from django.utils.decorators import method_decorator from djang...
33.115183
88
0.707826
from allauth.account import app_settings as allauth_settings from allauth.account.models import EmailAddress from allauth.account.utils import complete_signup from allauth.account.views import ConfirmEmailView from django.contrib.auth import get_user_model from django.utils.decorators import method_decorator from djang...
true
true
f72f13d49d6c7a860c5b0fe7664a87a652eb88a8
641
py
Python
tests/test_data/test_datasets/test_xml_dataset.py
Brym-Gyimah/mmdetection
d5d749afe57c77e2ec4500395faed3566fdfedae
[ "Apache-2.0" ]
20,190
2018-09-10T01:11:53.000Z
2022-03-31T22:31:33.000Z
tests/test_data/test_datasets/test_xml_dataset.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
6,736
2018-09-17T09:45:51.000Z
2022-03-31T22:54:10.000Z
tests/test_data/test_datasets/test_xml_dataset.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
7,837
2018-09-11T02:58:23.000Z
2022-03-31T22:31:38.000Z
# Copyright (c) OpenMMLab. All rights reserved. import pytest from mmdet.datasets import DATASETS def test_xml_dataset(): dataconfig = { 'ann_file': 'data/VOCdevkit/VOC2007/ImageSets/Main/test.txt', 'img_prefix': 'data/VOCdevkit/VOC2007/', 'pipeline': [{ 'type': 'LoadImageFrom...
26.708333
69
0.666147
import pytest from mmdet.datasets import DATASETS def test_xml_dataset(): dataconfig = { 'ann_file': 'data/VOCdevkit/VOC2007/ImageSets/Main/test.txt', 'img_prefix': 'data/VOCdevkit/VOC2007/', 'pipeline': [{ 'type': 'LoadImageFromFile' }] } XMLDataset = DATASETS...
true
true
f72f1410ab89a22b8401c8e0baede753bd6f5c48
10,693
py
Python
src/python/pants/base/specs.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
1
2021-02-22T18:11:26.000Z
2021-02-22T18:11:26.000Z
src/python/pants/base/specs.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
null
null
null
src/python/pants/base/specs.py
rcuza/pants
0429258b181986eed856ae45af93b776727774a0
[ "Apache-2.0" ]
2
2021-05-11T07:51:26.000Z
2021-05-19T10:14:46.000Z
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations import itertools import os from abc import ABC, ABCMeta, abstractmethod from dataclasses import dataclass from typing import TYPE_CHECKING, Iterable, Ma...
32.901538
100
0.666511
from __future__ import annotations import itertools import os from abc import ABC, ABCMeta, abstractmethod from dataclasses import dataclass from typing import TYPE_CHECKING, Iterable, Mapping, Sequence, Tuple from pants.base.exceptions import ResolveError from pants.build_graph.address import Address from pants.eng...
true
true
f72f15c5de015caaeac2371e1ce51f83332786d4
1,144
py
Python
lib/datasets/synthetic_example.py
liulu112601/AutoDL-Projects
59d07b63420837f56ea45b678784e299612477c3
[ "MIT" ]
null
null
null
lib/datasets/synthetic_example.py
liulu112601/AutoDL-Projects
59d07b63420837f56ea45b678784e299612477c3
[ "MIT" ]
null
null
null
lib/datasets/synthetic_example.py
liulu112601/AutoDL-Projects
59d07b63420837f56ea45b678784e299612477c3
[ "MIT" ]
null
null
null
##################################################### # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2021.04 # ##################################################### import copy from .math_dynamic_funcs import DynamicQuadraticFunc from .math_adv_funcs import ConstantFunc, ComposedSinFunc from .synthetic_env import Synthet...
30.105263
73
0.657343
import copy from .math_dynamic_funcs import DynamicQuadraticFunc from .math_adv_funcs import ConstantFunc, ComposedSinFunc from .synthetic_env import SyntheticDEnv def create_example_v1( timestamp_config=None, num_per_task=5000, ): mean_generator = ComposedSinFunc() std_generator = ComposedSinFunc(mi...
true
true
f72f163111d0ad06a68b563a14a17a629ddccdab
756
py
Python
milarun/lib/monitor.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
7
2020-07-09T18:55:00.000Z
2022-03-31T19:51:29.000Z
milarun/lib/monitor.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
6
2020-07-02T08:58:39.000Z
2021-02-01T20:31:28.000Z
milarun/lib/monitor.py
laceyg/milabench
a314094a406c2e98a932f6d4f3a9588a991148d3
[ "MIT" ]
8
2020-06-19T17:16:19.000Z
2022-03-31T19:34:49.000Z
import GPUtil from threading import Thread import time class GPUMonitor(Thread): def __init__(self, delay): super().__init__() self.stopped = False self.delay = delay self.data = { g.id: dict( load=[], memory=[], temperatu...
24.387097
57
0.492063
import GPUtil from threading import Thread import time class GPUMonitor(Thread): def __init__(self, delay): super().__init__() self.stopped = False self.delay = delay self.data = { g.id: dict( load=[], memory=[], temperatu...
true
true
f72f168e38670fee460a5423e951a0f83d8cd4f5
702
py
Python
matplotlib/matplotlib_test/plot_lib_test.py
alphaciel/Balancing-Robot-Raspberry-Pi-DIY
8a61acf688ea0915017c40eaff3841a9b219f9b7
[ "MIT" ]
null
null
null
matplotlib/matplotlib_test/plot_lib_test.py
alphaciel/Balancing-Robot-Raspberry-Pi-DIY
8a61acf688ea0915017c40eaff3841a9b219f9b7
[ "MIT" ]
null
null
null
matplotlib/matplotlib_test/plot_lib_test.py
alphaciel/Balancing-Robot-Raspberry-Pi-DIY
8a61acf688ea0915017c40eaff3841a9b219f9b7
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Slider, Button, RadioButtons fig = plt.figure() ax = fig.add_subplot(111) fig.subplots_adjust(left=0.25, bottom=0.25) min0 = 0 max0 = 25000 im = max0 * np.random.random((10,10)) im1 = ax.imshow(im) fig.colorbar(im1) axcolor = 'lightgol...
25.071429
63
0.709402
import matplotlib.pyplot as plt import numpy as np from matplotlib.widgets import Slider, Button, RadioButtons fig = plt.figure() ax = fig.add_subplot(111) fig.subplots_adjust(left=0.25, bottom=0.25) min0 = 0 max0 = 25000 im = max0 * np.random.random((10,10)) im1 = ax.imshow(im) fig.colorbar(im1) axcolor = 'lightgol...
true
true
f72f16a11c68a6687ece2fc6cae8e47c19ce6f15
613
py
Python
src/rakali/transforms.py
sthysel/rakali
d641b8f75e7bbbd4ab973060658f5b30d24e99ff
[ "MIT" ]
6
2019-02-17T01:23:39.000Z
2021-01-13T23:01:16.000Z
src/rakali/transforms.py
sthysel/rakali
d641b8f75e7bbbd4ab973060658f5b30d24e99ff
[ "MIT" ]
1
2020-09-09T19:52:17.000Z
2021-09-13T08:25:44.000Z
src/rakali/transforms.py
sthysel/rakali
d641b8f75e7bbbd4ab973060658f5b30d24e99ff
[ "MIT" ]
3
2021-07-21T14:09:43.000Z
2021-08-22T15:03:48.000Z
import cv2 as cv def scale(img, scale): """scale preserving aspect ratio""" return resize(img, x_scale=scale, y_scale=scale) def resize(img, x_scale, y_scale, optimize=True): """resize image by scaling using provided factors""" interpolation = cv.INTER_LINEAR # pick an optimized scaler if asked...
22.703704
56
0.619902
import cv2 as cv def scale(img, scale): return resize(img, x_scale=scale, y_scale=scale) def resize(img, x_scale, y_scale, optimize=True): interpolation = cv.INTER_LINEAR if optimize: if x_scale > 1 and y_scale > 1: interpolation = cv.INTER_CUBIC else: interp...
true
true
f72f17683039c31b552fe4aaaab293ebc4b067b4
1,380
py
Python
load_isbi.py
lone17/deform-conv
3502cedbeae61c961d7e988382c55b9d45fd1873
[ "MIT" ]
null
null
null
load_isbi.py
lone17/deform-conv
3502cedbeae61c961d7e988382c55b9d45fd1873
[ "MIT" ]
null
null
null
load_isbi.py
lone17/deform-conv
3502cedbeae61c961d7e988382c55b9d45fd1873
[ "MIT" ]
null
null
null
from keras.preprocessing.image import ImageDataGenerator data_gen_args = dict(rescale=1./255, rotation_range=0.2, shear_range=0.2, zoom_range=0.2, width_shift_range=0.1, height_shift_range=0.1, ...
41.818182
81
0.588406
from keras.preprocessing.image import ImageDataGenerator data_gen_args = dict(rescale=1./255, rotation_range=0.2, shear_range=0.2, zoom_range=0.2, width_shift_range=0.1, height_shift_range=0.1, ...
true
true
f72f183dad87e98bbd6b38f75d1d545a70ce6384
2,519
py
Python
parser/fase2/team10/sql/Instrucciones/Sql_alter/AlterTableAlterColumn.py
Gabriel-15/tytus
fb00718bf3fcc5211a3604fba1a551f44bdc6deb
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
parser/fase2/team10/sql/Instrucciones/Sql_alter/AlterTableAlterColumn.py
Gabriel-15/tytus
fb00718bf3fcc5211a3604fba1a551f44bdc6deb
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
parser/fase2/team10/sql/Instrucciones/Sql_alter/AlterTableAlterColumn.py
Gabriel-15/tytus
fb00718bf3fcc5211a3604fba1a551f44bdc6deb
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from sql.Instrucciones.TablaSimbolos.Instruccion import Instruccion from sql.Instrucciones.Sql_create.Tipo_Constraint import Tipo_Constraint, Tipo_Dato_Constraint from sql.Instrucciones.Excepcion import Excepcion class AlterTableAlterColumn(Instruccion): def __init__(self, tabla, col, strGram, linea, columna): ...
51.408163
132
0.579595
from sql.Instrucciones.TablaSimbolos.Instruccion import Instruccion from sql.Instrucciones.Sql_create.Tipo_Constraint import Tipo_Constraint, Tipo_Dato_Constraint from sql.Instrucciones.Excepcion import Excepcion class AlterTableAlterColumn(Instruccion): def __init__(self, tabla, col, strGram, linea, columna): ...
true
true
f72f18abb7dcfee0f3b682427c6f42194a6ada0f
6,676
py
Python
KaboomImages.py
Toinas/IntelligentSuit
f3d33b327406d899d18ecf5fd6a100b0c786fdce
[ "MIT" ]
null
null
null
KaboomImages.py
Toinas/IntelligentSuit
f3d33b327406d899d18ecf5fd6a100b0c786fdce
[ "MIT" ]
null
null
null
KaboomImages.py
Toinas/IntelligentSuit
f3d33b327406d899d18ecf5fd6a100b0c786fdce
[ "MIT" ]
null
null
null
Kaboom_0=[ 0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0, 0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,2,1,1,2,1,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,0,3, 0,...
32.407767
44
0.474835
Kaboom_0=[ 0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0, 0,0,0,2,2,2,2,2,2,0,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,2,2,2,2,2,2,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,2,2, 0,0,2,1,2,1,1,2,1,2,0,0,0,0,0,0, 0,0,2,1,1,1,1,1,1,2,0,0,0,0,0,3, 0,...
true
true
f72f190a17b6b82a72841a82dddb9b59a381bfe5
197
py
Python
worldclock/views.py
arminfriedl/netclock
f83f0faa1f2c8f06dc04d2d6de315a7b35f1c361
[ "MIT" ]
null
null
null
worldclock/views.py
arminfriedl/netclock
f83f0faa1f2c8f06dc04d2d6de315a7b35f1c361
[ "MIT" ]
null
null
null
worldclock/views.py
arminfriedl/netclock
f83f0faa1f2c8f06dc04d2d6de315a7b35f1c361
[ "MIT" ]
null
null
null
from flask import render_template, request, flash, redirect, url_for, session from . import app @app.route('', methods=['GET']) def create(): return render_template("worldclock/create.html")
24.625
77
0.736041
from flask import render_template, request, flash, redirect, url_for, session from . import app @app.route('', methods=['GET']) def create(): return render_template("worldclock/create.html")
true
true
f72f1912a1ea4ca3114f0a355e5ee07788eceb1f
1,182
py
Python
pyairwatch/system/users.py
jprichards/PyVMwareAirWatch
ac25185d1f6a001c9670d57d11a3047553f743a1
[ "MIT" ]
17
2018-03-19T05:52:37.000Z
2022-03-09T16:41:03.000Z
pyairwatch/system/users.py
marshall-brown/PyVMwareAirWatch
ac25185d1f6a001c9670d57d11a3047553f743a1
[ "MIT" ]
2
2018-12-06T17:12:54.000Z
2019-08-27T09:57:13.000Z
pyairwatch/system/users.py
marshall-brown/PyVMwareAirWatch
ac25185d1f6a001c9670d57d11a3047553f743a1
[ "MIT" ]
9
2018-04-02T18:42:51.000Z
2020-06-10T02:11:05.000Z
class Users(object): def __init__(self, client): self.client = client #UNTESTED def search(self, **kwargs): """ Returns the Enrollment User's details matching the search parameters /api/system/users/search?{params} PARAMS: username={username} ...
35.818182
130
0.628596
class Users(object): def __init__(self, client): self.client = client def search(self, **kwargs): response = self._get(path='/users/search', params=kwargs) return response def _get(self, module='system', path=None, version=None, params=None, header=None): response = se...
true
true
f72f1930dfc31b7280f1354dfad37771fff132eb
14,948
py
Python
veroviz/getTimeDist3D.py
optimatorlab/veroviz
4b4b7da07abbc764169223cc4cac41e19ff7031d
[ "MIT" ]
16
2019-11-05T06:33:21.000Z
2022-02-09T04:37:03.000Z
veroviz/getTimeDist3D.py
optimatorlab/veroviz
4b4b7da07abbc764169223cc4cac41e19ff7031d
[ "MIT" ]
6
2019-11-22T09:38:01.000Z
2021-06-18T02:08:43.000Z
veroviz/getTimeDist3D.py
optimatorlab/veroviz
4b4b7da07abbc764169223cc4cac41e19ff7031d
[ "MIT" ]
4
2020-09-25T07:48:56.000Z
2022-02-09T04:39:54.000Z
from veroviz._common import * from veroviz._validation import * from veroviz._buildFlightProfile import buildNoLoiteringFlight from veroviz._buildFlightProfile import getTimeDistFromFlight from veroviz._utilities import privConvertDistance from veroviz._utilities import privConvertTime def getTimeDist3D(nodes=None, ...
71.865385
1,154
0.711466
from veroviz._common import * from veroviz._validation import * from veroviz._buildFlightProfile import buildNoLoiteringFlight from veroviz._buildFlightProfile import getTimeDistFromFlight from veroviz._utilities import privConvertDistance from veroviz._utilities import privConvertTime def getTimeDist3D(nodes=None, ...
true
true
f72f19389baf6383e97fcdeeb7e0ff036c8208a5
1,325
py
Python
youtuatools/extractor/unity.py
Pagasis/YouTua
edb44b2065a7224f8b26aaf76166bf7287901567
[ "MIT" ]
47
2021-01-02T07:44:50.000Z
2022-02-28T22:02:13.000Z
nextdl/extractor/unity.py
devenu85/nextdl
0b458f556e2e0be80cb94bd9a9b1405ad2e9182d
[ "MIT" ]
4
2021-02-07T03:35:13.000Z
2021-10-31T19:23:53.000Z
nextdl/extractor/unity.py
devenu85/nextdl
0b458f556e2e0be80cb94bd9a9b1405ad2e9182d
[ "MIT" ]
8
2021-01-03T05:44:39.000Z
2021-11-01T05:46:32.000Z
from __future__ import unicode_literals from .common import InfoExtractor from .youtube import YoutubeIE class UnityIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?unity3d\.com/learn/tutorials/(?:[^/]+/)*(?P<id>[^/?#&]+)" ) _TESTS = [ { "url": "https://unity3d.com/learn...
34.868421
121
0.556226
from __future__ import unicode_literals from .common import InfoExtractor from .youtube import YoutubeIE class UnityIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?unity3d\.com/learn/tutorials/(?:[^/]+/)*(?P<id>[^/?#&]+)" ) _TESTS = [ { "url": "https://unity3d.com/learn...
true
true
f72f19778b0b87aa95ac05b779fa868ad2422b2a
256
py
Python
pybat/__init__.py
mbercx/pybat
e0cf610fd06a97979f5ec70757406de1f9a788ef
[ "MIT" ]
3
2019-04-08T13:10:15.000Z
2021-07-04T07:23:49.000Z
pybat/__init__.py
mbercx/pybat
e0cf610fd06a97979f5ec70757406de1f9a788ef
[ "MIT" ]
1
2019-02-28T12:51:57.000Z
2019-02-28T12:51:57.000Z
pybat/__init__.py
mbercx/pybat
e0cf610fd06a97979f5ec70757406de1f9a788ef
[ "MIT" ]
4
2018-07-30T12:58:35.000Z
2020-03-05T20:09:46.000Z
# These import commands make importing core classes easier, e.g. you can just import # Cathode using: # # from pybat import Cathode # # Instead of: # # from pybat.core import Cathode # from pybat.core import Cathode, LiRichCathode, Dimer, DimerNEBAnalysis
23.272727
84
0.765625
from pybat.core import Cathode, LiRichCathode, Dimer, DimerNEBAnalysis
true
true
f72f19dca994b161669b0dcdd2b3c6e2c7ce4f8d
308
py
Python
src/scripts/chmTools/module.py
Matej-Chmel/approximate-knn
4d29dc285f50fcdce1c3052472959f789c46cc70
[ "MIT" ]
null
null
null
src/scripts/chmTools/module.py
Matej-Chmel/approximate-knn
4d29dc285f50fcdce1c3052472959f789c46cc70
[ "MIT" ]
null
null
null
src/scripts/chmTools/module.py
Matej-Chmel/approximate-knn
4d29dc285f50fcdce1c3052472959f789c46cc70
[ "MIT" ]
null
null
null
from .runner import AppError, checkInsideVenv, insideVenv, wrapMain checkInsideVenv() from .configParam import getConfigPath from .Dataset import Dataset from .export import getExportedData from .jsonTypeCheck import configStr, getDictValue, getRoot from .RecallTable import RecallTable, RecallTableConfig
30.8
67
0.847403
from .runner import AppError, checkInsideVenv, insideVenv, wrapMain checkInsideVenv() from .configParam import getConfigPath from .Dataset import Dataset from .export import getExportedData from .jsonTypeCheck import configStr, getDictValue, getRoot from .RecallTable import RecallTable, RecallTableConfig
true
true
f72f1ae9e9ef3f419c5a8e7fe69af1c394dd4b59
285
py
Python
exercicios/ex020.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
exercicios/ex020.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
exercicios/ex020.py
MaikolSantos/curso-em-video-python3
3a1ab2761b8a0f98e128083a7b0e50b19a75b7bf
[ "MIT" ]
null
null
null
from random import shuffle a1 = input('Digite o nome do Aluno 1: ') a2 = input('Digite o nome do Aluno 2: ') a3 = input('Digite o nome do Aluno 3: ') a4 = input('Digite o nome do Aluno 4: ') deck = [a1, a2, a3, a4] shuffle(deck) print('A ordem de apresentação será: {}'.format(deck))
28.5
54
0.663158
from random import shuffle a1 = input('Digite o nome do Aluno 1: ') a2 = input('Digite o nome do Aluno 2: ') a3 = input('Digite o nome do Aluno 3: ') a4 = input('Digite o nome do Aluno 4: ') deck = [a1, a2, a3, a4] shuffle(deck) print('A ordem de apresentação será: {}'.format(deck))
true
true
f72f1b1556e1450a0a48cf17145914764f019c19
45,265
py
Python
gdal2ISIS3/Astropedia_gdal2ISIS3.py
europlanet-gmap/GDAL_scripts
3352d2ca8580230f2f4ce7712ddd23743ca14d59
[ "Unlicense" ]
55
2015-08-16T02:57:04.000Z
2021-09-09T18:22:45.000Z
gdal2ISIS3/Astropedia_gdal2ISIS3.py
europlanet-gmap/GDAL_scripts
3352d2ca8580230f2f4ce7712ddd23743ca14d59
[ "Unlicense" ]
14
2016-09-12T07:09:59.000Z
2022-02-22T16:43:29.000Z
gdal2ISIS3/Astropedia_gdal2ISIS3.py
europlanet-gmap/GDAL_scripts
3352d2ca8580230f2f4ce7712ddd23743ca14d59
[ "Unlicense" ]
34
2015-01-27T14:28:57.000Z
2022-02-23T13:00:46.000Z
#!/usr/bin/env python #/****************************************************************************** # * $Id$ # * # * Project: GDAL Utilities # * Purpose: Create a ISIS3 compatible (raw w/ ISIS3 label) from a GDAL supported image. # * Author: Trent Hare, <thare@usgs.gov> # * Date: June 05, 2013 # * version: 0.1 #...
43.15062
212
0.448956
import sys import math import datetime import time import os import subprocess try: from osgeo import gdal from osgeo import osr except: import gdal import osr def Usage(theApp): print( '\nUsage: Astropedia_gdal2ISIS3.py in.tif output.cub') print( ' optional: to print out image information ...
false
true
f72f1bae0e6194d644c89e50750e438c176f29ce
1,867
py
Python
service/es_utils.py
LandRegistry/digital-register-elasticsearch-updater
2e7b95d8d5eac70e9bba6612bed09bf58376e781
[ "MIT" ]
null
null
null
service/es_utils.py
LandRegistry/digital-register-elasticsearch-updater
2e7b95d8d5eac70e9bba6612bed09bf58376e781
[ "MIT" ]
12
2015-06-05T15:10:25.000Z
2016-04-21T15:17:19.000Z
service/es_utils.py
LandRegistry/digital-register-elasticsearch-updater
2e7b95d8d5eac70e9bba6612bed09bf58376e781
[ "MIT" ]
1
2021-04-11T06:03:41.000Z
2021-04-11T06:03:41.000Z
from elasticsearch import Elasticsearch # type: ignore from elasticsearch.client import IndicesClient # type: ignore from elasticsearch.helpers import bulk # type: ignore import logging from config import CONFIG_DICT LOGGER = logging.getLogger(__name__) ELASTICSEARCH_NODES = [CONFIG_DICT['ELASTICS...
26.671429
96
0.681843
from elasticsearch import Elasticsearch from elasticsearch.client import IndicesClient from elasticsearch.helpers import bulk import logging from config import CONFIG_DICT LOGGER = logging.getLogger(__name__) ELASTICSEARCH_NODES = [CONFIG_DICT['ELASTICSEARCH_URI']] elasticsearch_client = Elastics...
true
true
f72f1bee9e17f5e0644db620d7e3407dcb35a5dc
716
py
Python
src/pre_R1956001.py
atrettel/sheardata
db09d70ba464e24bdb2fb7729b6f3e905af68d72
[ "MIT" ]
2
2020-04-27T19:56:07.000Z
2022-02-27T22:16:19.000Z
src/pre_R1956001.py
atrettel/sheardata
db09d70ba464e24bdb2fb7729b6f3e905af68d72
[ "MIT" ]
null
null
null
src/pre_R1956001.py
atrettel/sheardata
db09d70ba464e24bdb2fb7729b6f3e905af68d72
[ "MIT" ]
1
2021-11-05T18:39:35.000Z
2021-11-05T18:39:35.000Z
#!/usr/bin/env python3 # Copyright (C) 2020-2021 Andrew Trettel # # SPDX-License-Identifier: MIT import csv import math import sqlite3 import sheardata as sd import sys conn = sqlite3.connect( sys.argv[1] ) cursor = conn.cursor() cursor.execute( "PRAGMA foreign_keys = ON;" ) flow_class = sd.FC_BOUNDARY_DRIVEN_F...
21.058824
86
0.736034
import csv import math import sqlite3 import sheardata as sd import sys conn = sqlite3.connect( sys.argv[1] ) cursor = conn.cursor() cursor.execute( "PRAGMA foreign_keys = ON;" ) flow_class = sd.FC_BOUNDARY_DRIVEN_FLOW year = 1956 study_number = 1 study_id = sd.add_study( cursor, flow_class_id=...
true
true
f72f1c4792e80f4b2c6d910802fa3060425bf488
8,356
py
Python
pythonExamples/fileIngestModule.py
trac3me/autopsy
ff70cdd19bfad1b4966c5e25933035daba132535
[ "Apache-2.0" ]
1
2015-01-31T19:20:43.000Z
2015-01-31T19:20:43.000Z
pythonExamples/fileIngestModule.py
trac3me/autopsy
ff70cdd19bfad1b4966c5e25933035daba132535
[ "Apache-2.0" ]
null
null
null
pythonExamples/fileIngestModule.py
trac3me/autopsy
ff70cdd19bfad1b4966c5e25933035daba132535
[ "Apache-2.0" ]
null
null
null
# Sample module in the public domain. Feel free to use this as a template # for your modules (and you can remove this header and take complete credit # and liability) # # Contact: Brian Carrier [carrier <at> sleuthkit [dot] org] # # This is free and unencumbered software released into the public domain. # # Anyone is f...
49.443787
131
0.732049
import jarray import inspect from java.lang import System from java.util.logging import Level from org.sleuthkit.datamodel import Score from org.sleuthkit.datamodel import SleuthkitCase from org.sleuthkit.datamodel import AbstractFile from org.sleuthkit.datamodel import ReadContentInputStream from org.sleuthkit.datam...
true
true
f72f1c9c7960ef51f7a686696065cb2abe68dd75
144
py
Python
django_async_redis/__init__.py
adamchainz/django-async-redis
e9a54ba885fa76e504ff18726f333264585da34a
[ "Apache-2.0" ]
14
2020-10-06T18:29:07.000Z
2021-10-02T05:11:14.000Z
django_async_redis/__init__.py
adamchainz/django-async-redis
e9a54ba885fa76e504ff18726f333264585da34a
[ "Apache-2.0" ]
4
2020-10-06T18:38:09.000Z
2021-08-24T20:38:54.000Z
django_async_redis/__init__.py
adamchainz/django-async-redis
e9a54ba885fa76e504ff18726f333264585da34a
[ "Apache-2.0" ]
4
2020-10-07T07:13:21.000Z
2022-01-27T21:28:30.000Z
"""Top-level package for Django Async Redis.""" __author__ = """Andrew Chen Wang""" __email__ = "acwangpython@gmail.com" __version__ = "0.1.0"
24
47
0.701389
__author__ = """Andrew Chen Wang""" __email__ = "acwangpython@gmail.com" __version__ = "0.1.0"
true
true
f72f1e1b45423dbc134742585996a8848e0dc037
476
py
Python
Dataset/Leetcode/train/12/549.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/12/549.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
Dataset/Leetcode/train/12/549.py
kkcookies99/UAST
fff81885aa07901786141a71e5600a08d7cb4868
[ "MIT" ]
null
null
null
class Solution: roman_nums = { 1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', 100: 'C', 90: 'XC', 50: 'L', 40: 'XL', 10: 'X', 9: 'IX', 5: 'V', 4: 'IV', 1: 'I' } def XXX(self, num: int) -> str: for (...
19.04
54
0.355042
class Solution: roman_nums = { 1000: 'M', 900: 'CM', 500: 'D', 400: 'CD', 100: 'C', 90: 'XC', 50: 'L', 40: 'XL', 10: 'X', 9: 'IX', 5: 'V', 4: 'IV', 1: 'I' } def XXX(self, num: int) -> str: for (...
false
true
f72f1e8b1425ad70062469566557c13ef9b23423
16,879
py
Python
models/transformer.py
Honghe/AnchorDETR
fc3d45441241cd689b28878d3aa4b0bffb33a8b8
[ "Apache-2.0" ]
null
null
null
models/transformer.py
Honghe/AnchorDETR
fc3d45441241cd689b28878d3aa4b0bffb33a8b8
[ "Apache-2.0" ]
null
null
null
models/transformer.py
Honghe/AnchorDETR
fc3d45441241cd689b28878d3aa4b0bffb33a8b8
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------------ # Copyright (c) 2021 megvii-model. All Rights Reserved. # ------------------------------------------------------------------------ # Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR) # Copyright (c) 2020 SenseT...
39.071759
161
0.598377
import copy from typing import Optional, List import math import torch import torch.nn.functional as F from torch import nn, Tensor from util.misc import inverse_sigmoid from models.row_column_decoupled_attention import MultiheadRCDA class Transformer(nn.Module): def __init__(self, d_model=256, nhead=8, ...
true
true
f72f1e928139d4f1f8e92e1e0291db259b10cc61
8,261
py
Python
src/problem3.py
mcgeeml/06-Exam1Practice
721f95eda65e0f5bd2ae541bc028e1d5dc9e6b47
[ "MIT" ]
null
null
null
src/problem3.py
mcgeeml/06-Exam1Practice
721f95eda65e0f5bd2ae541bc028e1d5dc9e6b47
[ "MIT" ]
null
null
null
src/problem3.py
mcgeeml/06-Exam1Practice
721f95eda65e0f5bd2ae541bc028e1d5dc9e6b47
[ "MIT" ]
null
null
null
""" PRACTICE Exam 1, problem 3. Authors: David Mutchler, Vibha Alangar, Valerie Galluzzi, Mark Hays, Amanda Stouder, their colleagues and Myon McGee. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import rosegraphics as rg ######################################################################## # Students...
37.211712
72
0.507808
import rosegraphics as rg def main(): run_test_problem3a() run_test_problem3b() def run_test_problem3a(): title = 'Problem 3a. Test 1: Start at (30, 30), 6 lines' window1 = rg.RoseWindow(350, 200, title) point = rg.Point(30, 30) expected = 3...
true
true
f72f1fb175ba5701b831b4c399b500717379e533
1,591
py
Python
examples/01_plotting/plot_colormaps.py
SIMEXP/nilearn
4f51aea58f38689ca32c2edd748528d521e6cfb0
[ "BSD-2-Clause" ]
827
2015-01-30T23:11:42.000Z
2022-03-29T21:21:05.000Z
examples/01_plotting/plot_colormaps.py
SIMEXP/nilearn
4f51aea58f38689ca32c2edd748528d521e6cfb0
[ "BSD-2-Clause" ]
2,845
2015-01-04T22:14:41.000Z
2022-03-31T20:28:09.000Z
examples/01_plotting/plot_colormaps.py
SIMEXP/nilearn
4f51aea58f38689ca32c2edd748528d521e6cfb0
[ "BSD-2-Clause" ]
484
2015-02-03T10:58:19.000Z
2022-03-29T21:57:16.000Z
""" Matplotlib colormaps in Nilearn ================================ Visualize HCP connectome workbench color maps shipped with Nilearn which can be used for plotting brain images on surface. See :ref:`surface-plotting` for surface plotting details. """ import numpy as np import matplotlib.pyplot as plt from nilearn...
30.596154
75
0.606537
import numpy as np import matplotlib.pyplot as plt from nilearn.plotting.cm import _cmap_d as nilearn_cmaps from nilearn.plotting import show nmaps = len(nilearn_cmaps) a = np.outer(np.arange(0, 1, 0.01), np.ones(10)) plt.figure(figsize=(10, 4.2)) plt.subplots_adjust(top=0.4, bottom=0.05, left=0.01, right=0.99) fo...
true
true
f72f2071f1e1301bd9f2a6ccbf675cb274979e21
684
py
Python
setup.py
pmartin23/metapub
7dc3f2321720191d461056deeaedf69cd1479157
[ "Apache-2.0" ]
null
null
null
setup.py
pmartin23/metapub
7dc3f2321720191d461056deeaedf69cd1479157
[ "Apache-2.0" ]
3
2019-11-14T23:36:14.000Z
2020-11-05T20:42:50.000Z
setup.py
pmartin23/metapub
7dc3f2321720191d461056deeaedf69cd1479157
[ "Apache-2.0" ]
1
2018-02-08T12:25:12.000Z
2018-02-08T12:25:12.000Z
import glob, os from setuptools import setup, find_packages setup( name = 'metapub', version = '0.4.3.5', description = 'Pubmed / NCBI / eutils interaction library, handling the metadata of pubmed papers.', url = 'https://bitbucket.org/metapub/metapub', author = 'Naomi Most', maintainer = 'Nao...
24.428571
104
0.574561
import glob, os from setuptools import setup, find_packages setup( name = 'metapub', version = '0.4.3.5', description = 'Pubmed / NCBI / eutils interaction library, handling the metadata of pubmed papers.', url = 'https://bitbucket.org/metapub/metapub', author = 'Naomi Most', maintainer = 'Nao...
true
true
f72f20b73a9f992e3e7d7b8d15bee88e20b845b2
13,740
py
Python
rltoolkit/rl.py
raznem/sac_ppo
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
[ "MIT" ]
null
null
null
rltoolkit/rl.py
raznem/sac_ppo
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
[ "MIT" ]
null
null
null
rltoolkit/rl.py
raznem/sac_ppo
c18e9bd32a70fcc4bc413565c6b885d7560b8b5a
[ "MIT" ]
null
null
null
import logging from pathlib import Path from typing import Any, Optional, Tuple, Union import gym import torch import pickle as pkl from rltoolkit import config, utils from rltoolkit.buffer import Memory from rltoolkit.stats_logger import StatsLogger from rltoolkit.tensorboard_logger import TensorboardWriter logger ...
35.412371
88
0.605968
import logging from pathlib import Path from typing import Any, Optional, Tuple, Union import gym import torch import pickle as pkl from rltoolkit import config, utils from rltoolkit.buffer import Memory from rltoolkit.stats_logger import StatsLogger from rltoolkit.tensorboard_logger import TensorboardWriter logger ...
true
true
f72f22453b31c307baa4b3ff658060219127ff43
2,989
py
Python
main_window.py
isu-enterprise/dacha
5f8444e156fbed102fd7e25f9f3766538434659e
[ "Apache-2.0" ]
null
null
null
main_window.py
isu-enterprise/dacha
5f8444e156fbed102fd7e25f9f3766538434659e
[ "Apache-2.0" ]
null
null
null
main_window.py
isu-enterprise/dacha
5f8444e156fbed102fd7e25f9f3766538434659e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/main-window.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): M...
42.7
75
0.71094
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(673, 558) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") M...
true
true
f72f226a2107b3a3b8e9d4e622c36bce5ef81935
13,892
py
Python
rfcs/0010-eaglesong/eaglesong.py
malinoisls01/npx-create-react-app-react-i18n-app-cd-react-i18n-app
ab7d16b9afae8cd9523f0f3afb46dbca83cd42e5
[ "MIT" ]
256
2018-11-28T04:00:20.000Z
2022-03-14T13:46:51.000Z
rfcs/0010-eaglesong/eaglesong.py
malinoisls01/npx-create-react-app-react-i18n-app-cd-react-i18n-app
ab7d16b9afae8cd9523f0f3afb46dbca83cd42e5
[ "MIT" ]
122
2018-11-28T05:20:37.000Z
2022-03-18T02:31:50.000Z
rfcs/0010-eaglesong/eaglesong.py
malinoisls01/npx-create-react-app-react-i18n-app-cd-react-i18n-app
ab7d16b9afae8cd9523f0f3afb46dbca83cd42e5
[ "MIT" ]
155
2018-11-28T04:52:13.000Z
2022-03-28T23:21:12.000Z
def PrintState( state ): s = "" for i in range(0, 16): s += "0x%08x" % state[i] s += " " print(s) def EaglesongPermutation( state ): N = 43 #PrintState(state) for i in range(0, N): state = EaglesongRound(state, i) return state def EaglesongRound( state, index ): ...
75.5
213
0.628707
def PrintState( state ): s = "" for i in range(0, 16): s += "0x%08x" % state[i] s += " " print(s) def EaglesongPermutation( state ): N = 43 for i in range(0, N): state = EaglesongRound(state, i) return state def EaglesongRound( state, index ): bitmatrix = [[...
true
true
f72f22a0fe94fdce3a0eac34cb4c8736d4df683c
19,363
py
Python
pynndescent/utils.py
samggreenberg/pynndescent
f97bc2fe01e4e59c5dad20ed23b9cb47e8182b6c
[ "BSD-2-Clause" ]
null
null
null
pynndescent/utils.py
samggreenberg/pynndescent
f97bc2fe01e4e59c5dad20ed23b9cb47e8182b6c
[ "BSD-2-Clause" ]
null
null
null
pynndescent/utils.py
samggreenberg/pynndescent
f97bc2fe01e4e59c5dad20ed23b9cb47e8182b6c
[ "BSD-2-Clause" ]
null
null
null
# Author: Leland McInnes <leland.mcinnes@gmail.com> # # License: BSD 2 clause import time import numba from numba.core import types import numba.experimental.structref as structref import numpy as np @numba.njit("void(i8[:], i8)", cache=True) def seed(rng_state, seed): """Seed the random number generator with a...
27.157083
97
0.549553
import time import numba from numba.core import types import numba.experimental.structref as structref import numpy as np @numba.njit("void(i8[:], i8)", cache=True) def seed(rng_state, seed): rng_state.fill(seed + 0xFFFF) @numba.njit("i4(i8[:])", cache=True) def tau_rand_int(state): state[0] = (((state[0]...
true
true
f72f232db2207147d84c9324167fdd40d2261e65
548
py
Python
backend/manage.py
Web-Multi-Media/HttpStreamingServer
c062840b1323f6a5b35a1d7d26542a0fd6e77b0e
[ "MIT" ]
5
2019-12-25T16:28:26.000Z
2022-03-22T11:05:16.000Z
backend/manage.py
Web-Multi-Media/HttpStreamingServer
c062840b1323f6a5b35a1d7d26542a0fd6e77b0e
[ "MIT" ]
26
2019-11-14T16:03:26.000Z
2022-02-10T11:56:04.000Z
backend/manage.py
Web-Multi-Media/HttpStreamingServer
c062840b1323f6a5b35a1d7d26542a0fd6e77b0e
[ "MIT" ]
2
2020-09-01T09:25:14.000Z
2020-10-09T12:06:35.000Z
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'StreamingServer.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Dja...
32.235294
79
0.689781
import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'StreamingServer.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...
true
true
f72f24046e5fa65b5ee35e45bd348bb5ccc79c50
861
py
Python
ooobuild/dyn/chart/chart_axis_y_supplier.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/chart/chart_axis_y_supplier.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/dyn/chart/chart_axis_y_supplier.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
33.115385
86
0.763066
from ...lo.chart.chart_axis_y_supplier import ChartAxisYSupplier as ChartAxisYSupplier __all__ = ['ChartAxisYSupplier']
true
true
f72f2566c3018af4ef5d78db70a1751fce0ba12b
4,040
py
Python
fugue_notebook/__init__.py
gityow/fugue
e975625b33766d8b9dc64c6954871569b59367ec
[ "Apache-2.0" ]
null
null
null
fugue_notebook/__init__.py
gityow/fugue
e975625b33766d8b9dc64c6954871569b59367ec
[ "Apache-2.0" ]
null
null
null
fugue_notebook/__init__.py
gityow/fugue
e975625b33766d8b9dc64c6954871569b59367ec
[ "Apache-2.0" ]
null
null
null
# flake8: noqa from typing import Any from fugue_version import __version__ from IPython import get_ipython from IPython.display import Javascript from fugue_notebook.env import NotebookSetup, _setup_fugue_notebook _HIGHLIGHT_JS = r""" require(["codemirror/lib/codemirror"]); function set(str) { var obj = {}, wor...
56.111111
1,543
0.746287
from typing import Any from fugue_version import __version__ from IPython import get_ipython from IPython.display import Javascript from fugue_notebook.env import NotebookSetup, _setup_fugue_notebook _HIGHLIGHT_JS = r""" require(["codemirror/lib/codemirror"]); function set(str) { var obj = {}, words = str.split(...
true
true
f72f25b50dcbfd6ed34ab185f0b12887078ac367
1,814
py
Python
prnet/utils/render_app.py
RonnyLV/PRNet
0c2ded7042ceee2b2f9bba02bc19d91d4c3993c5
[ "MIT" ]
null
null
null
prnet/utils/render_app.py
RonnyLV/PRNet
0c2ded7042ceee2b2f9bba02bc19d91d4c3993c5
[ "MIT" ]
null
null
null
prnet/utils/render_app.py
RonnyLV/PRNet
0c2ded7042ceee2b2f9bba02bc19d91d4c3993c5
[ "MIT" ]
null
null
null
import numpy as np from prnet.utils.render import vis_of_vertices, render_texture from scipy import ndimage def get_visibility(vertices, triangles, h, w): triangles = triangles.T vertices_vis = vis_of_vertices(vertices.T, triangles, h, w) vertices_vis = vertices_vis.astype(bool) for k in range(2): ...
45.35
110
0.691841
import numpy as np from prnet.utils.render import vis_of_vertices, render_texture from scipy import ndimage def get_visibility(vertices, triangles, h, w): triangles = triangles.T vertices_vis = vis_of_vertices(vertices.T, triangles, h, w) vertices_vis = vertices_vis.astype(bool) for k in range(2): ...
true
true
f72f26220b3eace9e7640d67550958c5c1e52ae2
969
py
Python
mysite/urls.py
taylorculver/Django_Project_Improvement
a03eb076eb170c0ec74d9edac515f826cf2ee30e
[ "Unlicense" ]
null
null
null
mysite/urls.py
taylorculver/Django_Project_Improvement
a03eb076eb170c0ec74d9edac515f826cf2ee30e
[ "Unlicense" ]
null
null
null
mysite/urls.py
taylorculver/Django_Project_Improvement
a03eb076eb170c0ec74d9edac515f826cf2ee30e
[ "Unlicense" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
31.258065
77
0.69453
from django.conf.urls import include, url from django.contrib import admin from django.conf import settings urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'', include('menu.urls')), ] if settings.DEBUG: import debug_toolbar urlpatterns = [ url(r'^__debug__/', include(debug_to...
true
true
f72f28a8cc0117ce6a4927c59ca5ac49a7281a79
7,388
py
Python
cyder/base/mixins.py
zeeman/cyder
10d347e77554628e4c7af478d0f57b6c14a608ef
[ "BSD-3-Clause" ]
null
null
null
cyder/base/mixins.py
zeeman/cyder
10d347e77554628e4c7af478d0f57b6c14a608ef
[ "BSD-3-Clause" ]
null
null
null
cyder/base/mixins.py
zeeman/cyder
10d347e77554628e4c7af478d0f57b6c14a608ef
[ "BSD-3-Clause" ]
null
null
null
import os import fcntl from string import Template from django.core.urlresolvers import NoReverseMatch, reverse from django.db.models.loading import get_model from django.forms import ModelChoiceField, HiddenInput from django import forms from cyder.base.utils import filter_by_ctnr class DisplayMixin(object): #...
32.982143
79
0.569031
import os import fcntl from string import Template from django.core.urlresolvers import NoReverseMatch, reverse from django.db.models.loading import get_model from django.forms import ModelChoiceField, HiddenInput from django import forms from cyder.base.utils import filter_by_ctnr class DisplayMixin(object): ...
true
true
f72f2add0eef057060b14524de685d3508075821
23,057
py
Python
trolley.py
jefftriplett/trolley
6e440d491bc11c576b6d1470b439df82f667c19a
[ "BSD-3-Clause" ]
3
2015-05-25T13:20:38.000Z
2019-03-06T18:38:15.000Z
trolley.py
jefftriplett/trolley
6e440d491bc11c576b6d1470b439df82f667c19a
[ "BSD-3-Clause" ]
null
null
null
trolley.py
jefftriplett/trolley
6e440d491bc11c576b6d1470b439df82f667c19a
[ "BSD-3-Clause" ]
3
2016-07-15T07:31:48.000Z
2018-09-29T07:50:34.000Z
#!/usr/bin/env python """ Trolley syncs issues between CSV, Github, and Buffer with Trello. """ import csv import datetime import os import random import click import click_config import github3 from buffpy.api import API as BufferAPI from buffpy.managers.profiles import Profiles from buffpy.managers.updates import...
31.979196
89
0.688424
""" Trolley syncs issues between CSV, Github, and Buffer with Trello. """ import csv import datetime import os import random import click import click_config import github3 from buffpy.api import API as BufferAPI from buffpy.managers.profiles import Profiles from buffpy.managers.updates import Updates from trello i...
false
true
f72f2ae2da1a8824ea37a9d9fc536ef3fce7fc12
1,481
py
Python
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
tests/test.py
icetana-james/python-onvif-zeep
9947a3c203037857fbc04c9fafabc722e3436a13
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*-coding=utf-8 from __future__ import print_function, division import unittest from onvif import ONVIFCamera, ONVIFError CAM_HOST = '10.1.3.10' CAM_PORT = 80 CAM_USER = 'root' CAM_PASS = 'password' DEBUG = False def log(ret): if DEBUG: print(ret) class TestDevice(unittest.TestCas...
26.927273
69
0.627279
from __future__ import print_function, division import unittest from onvif import ONVIFCamera, ONVIFError CAM_HOST = '10.1.3.10' CAM_PORT = 80 CAM_USER = 'root' CAM_PASS = 'password' DEBUG = False def log(ret): if DEBUG: print(ret) class TestDevice(unittest.TestCase): cam = ONVIFCamera(CAM_HO...
true
true
f72f2bb0605f13d7ce68cd600bd8a6628eb6c15d
249
py
Python
scripts/fundamentals/codewars_sum_range_of_numbers.py
duttashi/learnpy
c08b76b173b06d66187e51a6939d55d5dd12cb5a
[ "MIT" ]
null
null
null
scripts/fundamentals/codewars_sum_range_of_numbers.py
duttashi/learnpy
c08b76b173b06d66187e51a6939d55d5dd12cb5a
[ "MIT" ]
77
2019-04-20T06:54:19.000Z
2022-01-16T08:15:20.000Z
scripts/fundamentals/codewars_sum_range_of_numbers.py
duttashi/learnpy
c08b76b173b06d66187e51a6939d55d5dd12cb5a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Sep 8 16:31:07 2020 @author: Ashish """ def get_sum(a,b): numsum=0 for i in range(a,b+1): numsum+=i return numsum print(get_sum(0,1))
12.45
36
0.457831
def get_sum(a,b): numsum=0 for i in range(a,b+1): numsum+=i return numsum print(get_sum(0,1))
true
true
f72f2c05186f829fbd3b433c815fb25ffb7d09a0
231
py
Python
core/templatetags/check_if_favorited_filter.py
jcquinlan/colophon
96f3eec0a524cb1fe3d655f3cc850b125f4aaff4
[ "MIT" ]
null
null
null
core/templatetags/check_if_favorited_filter.py
jcquinlan/colophon
96f3eec0a524cb1fe3d655f3cc850b125f4aaff4
[ "MIT" ]
null
null
null
core/templatetags/check_if_favorited_filter.py
jcquinlan/colophon
96f3eec0a524cb1fe3d655f3cc850b125f4aaff4
[ "MIT" ]
null
null
null
from django import template register = template.Library() @register.filter def check_if_favorited(document, user): """Returns boolean of whether or not a user favorited this document""" return document.is_favorited(user)
25.666667
74
0.770563
from django import template register = template.Library() @register.filter def check_if_favorited(document, user): return document.is_favorited(user)
true
true
f72f2dd7cff77a014d7828254d487da410fcc65b
2,757
py
Python
implementations/guidi2020/benchmark/PyAligner/test/test_matrix_init.py
r-barnes/sw_comparison
1ac2c9cc10a32badd6b8fb1e96516c97f7800176
[ "BSD-Source-Code" ]
null
null
null
implementations/guidi2020/benchmark/PyAligner/test/test_matrix_init.py
r-barnes/sw_comparison
1ac2c9cc10a32badd6b8fb1e96516c97f7800176
[ "BSD-Source-Code" ]
null
null
null
implementations/guidi2020/benchmark/PyAligner/test/test_matrix_init.py
r-barnes/sw_comparison
1ac2c9cc10a32badd6b8fb1e96516c97f7800176
[ "BSD-Source-Code" ]
null
null
null
import unittest from pyaligner import * class TestMatrixInit ( unittest.TestCase ): def test_matrix_init_global ( self ): scorer = Scorer( 5, -1, -3, 7 ) seqh = Sequence( "ACTG" ) seqv = Sequence( "ACAAA" ) matrix = DPMatrix( seqh, seqv, scorer ) self.assertEqual( matrix...
45.196721
73
0.488575
import unittest from pyaligner import * class TestMatrixInit ( unittest.TestCase ): def test_matrix_init_global ( self ): scorer = Scorer( 5, -1, -3, 7 ) seqh = Sequence( "ACTG" ) seqv = Sequence( "ACAAA" ) matrix = DPMatrix( seqh, seqv, scorer ) self.assertEqual( matrix...
true
true
f72f2e9ad66d303ddba9f56bb29c8a001bcf4f92
623
py
Python
visualization/__init__.py
svarthafnyra/CNN_Visualizations
a17615932519e67c7b7ec4ebaf030047dfd6d1e2
[ "MIT" ]
17
2019-08-13T06:07:13.000Z
2021-03-02T22:14:21.000Z
visualization/__init__.py
svarthafnyra/CAMP-Project
a17615932519e67c7b7ec4ebaf030047dfd6d1e2
[ "MIT" ]
null
null
null
visualization/__init__.py
svarthafnyra/CAMP-Project
a17615932519e67c7b7ec4ebaf030047dfd6d1e2
[ "MIT" ]
3
2019-12-16T09:08:10.000Z
2020-02-19T10:43:25.000Z
#from visualization.deep_dream import runDeepDream from visualization.gradcam import runGradCam from visualization.guided_backprop import runGBackProp from visualization.guided_gradcam import runGGradCam from visualization.smooth_grad import runsmoothGrad #from visualization.inverted_representation import runInvRep fr...
51.916667
60
0.900482
from visualization.gradcam import runGradCam from visualization.guided_backprop import runGBackProp from visualization.guided_gradcam import runGGradCam from visualization.smooth_grad import runsmoothGrad from visualization.vanilla_backprop import runVanillaBP from visualization.explain import runExplain from visualiza...
true
true
f72f30a07b60677628393833bb542a0b8f11afc0
22,124
py
Python
src/buildstream/_artifact.py
samkenxstream/buildstream
2164ac3ad2854eea30f85af6af2bc8a0b8754f3f
[ "Apache-2.0" ]
null
null
null
src/buildstream/_artifact.py
samkenxstream/buildstream
2164ac3ad2854eea30f85af6af2bc8a0b8754f3f
[ "Apache-2.0" ]
null
null
null
src/buildstream/_artifact.py
samkenxstream/buildstream
2164ac3ad2854eea30f85af6af2bc8a0b8754f3f
[ "Apache-2.0" ]
null
null
null
# # Copyright (C) 2020 Codethink Limited # Copyright (C) 2019 Bloomberg Finance LP # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
32.631268
117
0.650741
import os from typing import Dict, Tuple from ._protos.buildstream.v2.artifact_pb2 import Artifact as ArtifactProto from . import _yaml from . import utils from .node import Node from .types import _Scope from .storage._casbaseddirectory import CasBasedDirectory from .sandbox._config import SandboxConfig from ._vari...
true
true
f72f3137c35f25ad4295e8ff69e5522c6bc0fa3c
466
py
Python
database.py
Karasiq/flask-apachan
11e1e6009910dfa762c8009e6ce96dc1407160b1
[ "MIT" ]
null
null
null
database.py
Karasiq/flask-apachan
11e1e6009910dfa762c8009e6ce96dc1407160b1
[ "MIT" ]
null
null
null
database.py
Karasiq/flask-apachan
11e1e6009910dfa762c8009e6ce96dc1407160b1
[ "MIT" ]
null
null
null
from flask.ext.sqlalchemy import SQLAlchemy import os, sys sys.path.append(os.getcwd()) sys.path.append(os.path.join(os.getcwd(), '..')) from app import app db = SQLAlchemy(app) db_session = db.session def init_db(): # import all modules here that might define models so that # they will be registered properly ...
33.285714
66
0.736052
from flask.ext.sqlalchemy import SQLAlchemy import os, sys sys.path.append(os.getcwd()) sys.path.append(os.path.join(os.getcwd(), '..')) from app import app db = SQLAlchemy(app) db_session = db.session def init_db(): import models db.Model.metadata.create_all()
true
true
f72f3282c9de4d076ead9963256ae05c8ffa5ed1
14,015
py
Python
main_sweep.py
neonkitchen/disentangling-vae
e33148469fd1da50aef35686f337f2452f08ff6e
[ "MIT" ]
2
2021-01-07T17:43:30.000Z
2021-03-23T18:32:49.000Z
main_sweep.py
neonkitchen/disentangling-vae
e33148469fd1da50aef35686f337f2452f08ff6e
[ "MIT" ]
null
null
null
main_sweep.py
neonkitchen/disentangling-vae
e33148469fd1da50aef35686f337f2452f08ff6e
[ "MIT" ]
null
null
null
import argparse import logging import sys import os import wandb from configparser import ConfigParser from torch import optim from disvae import init_specific_model, Trainer, Evaluator from disvae.utils.modelIO import save_model, load_model, load_metadata from disvae.models.losses import LOSSES, RECON_DIST, get_loss...
42.990798
186
0.57888
import argparse import logging import sys import os import wandb from configparser import ConfigParser from torch import optim from disvae import init_specific_model, Trainer, Evaluator from disvae.utils.modelIO import save_model, load_model, load_metadata from disvae.models.losses import LOSSES, RECON_DIST, get_loss...
false
true
f72f337038924789342a29bdf12f894156a4a5c5
17,605
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
1
2020-05-12T23:29:15.000Z
2020-05-12T23:29:15.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "MIT" ]
226
2019-07-24T07:57:21.000Z
2019-10-15T01:07:24.000Z
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/operations/_virtual_machine_images_operations.py
iscai-msft/azure-sdk-for-python
83715b95c41e519d5be7f1180195e2fba136fc0f
[ "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 ...
46.207349
205
0.663334
import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from .. import models class VirtualMachineImagesOperations(object): models = models def __init__(self, client, config, serializer, deserializer): self._client = client self._seria...
true
true