hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f705ecdb7259ffcb800671f6f82c2aa41da950a6
480
py
Python
10_mobilenetv3/06_mobilenet_v3_large_224_dm07/01_float32/02_weight_quantization.py
khanfarhan10/PINTO_model_zoo
4cad2e506d8c0fb604aa7b5f84115a840ab59ba1
[ "MIT" ]
1,529
2019-12-11T13:36:23.000Z
2022-03-31T18:38:27.000Z
10_mobilenetv3/06_mobilenet_v3_large_224_dm07/01_float32/02_weight_quantization.py
khanfarhan10/PINTO_model_zoo
4cad2e506d8c0fb604aa7b5f84115a840ab59ba1
[ "MIT" ]
200
2020-01-06T09:24:42.000Z
2022-03-31T17:29:08.000Z
10_mobilenetv3/06_mobilenet_v3_large_224_dm07/01_float32/02_weight_quantization.py
khanfarhan10/PINTO_model_zoo
4cad2e506d8c0fb604aa7b5f84115a840ab59ba1
[ "MIT" ]
288
2020-02-21T14:56:02.000Z
2022-03-30T03:00:35.000Z
import tensorflow as tf tf.compat.v1.enable_eager_execution() # Weight Quantization - Input/Output=float32 converter = tf.lite.TFLiteConverter.from_saved_model('./saved_model') converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE] tflite_quant_model = converter.convert() with open('./mobilenet_v3_large_224_d...
36.923077
88
0.816667
import tensorflow as tf tf.compat.v1.enable_eager_execution() converter = tf.lite.TFLiteConverter.from_saved_model('./saved_model') converter.optimizations = [tf.lite.Optimize.OPTIMIZE_FOR_SIZE] tflite_quant_model = converter.convert() with open('./mobilenet_v3_large_224_dm07_weight_quant.tflite', 'wb') as w: w....
true
true
f705f177770c12c0106c8231abaa004e1def0c23
1,728
py
Python
src/simulator/workload/schemes.py
pskopnik/htc-cache-simulator
ee502db3f1c2b99ffe05ee609a18069b583798da
[ "MIT" ]
1
2020-12-15T16:09:31.000Z
2020-12-15T16:09:31.000Z
src/simulator/workload/schemes.py
pskopnik/htc-cache-system-simulator
ee502db3f1c2b99ffe05ee609a18069b583798da
[ "MIT" ]
null
null
null
src/simulator/workload/schemes.py
pskopnik/htc-cache-system-simulator
ee502db3f1c2b99ffe05ee609a18069b583798da
[ "MIT" ]
null
null
null
from typing import List from . import AccessRequest, FileID, PartSpec, PartsGenerator class NonCorrelatedSchemesGenerator(object): def __init__(self, number: int, fraction: float) -> None: self._number: int = number self._fraction: float = fraction self._parts_number: int = 2 ** number @property def number...
30.315789
87
0.712963
from typing import List from . import AccessRequest, FileID, PartSpec, PartsGenerator class NonCorrelatedSchemesGenerator(object): def __init__(self, number: int, fraction: float) -> None: self._number: int = number self._fraction: float = fraction self._parts_number: int = 2 ** number @property def number...
true
true
f705f24007c4d4c5b29712c358e78098ecba7ffc
434
py
Python
src/sentry/api/serializers/models/monitor.py
tomaszek1989/sentry
4486b70326fff96ab5148bb230c4287aa125e8a9
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/serializers/models/monitor.py
tomaszek1989/sentry
4486b70326fff96ab5148bb230c4287aa125e8a9
[ "BSD-3-Clause" ]
null
null
null
src/sentry/api/serializers/models/monitor.py
tomaszek1989/sentry
4486b70326fff96ab5148bb230c4287aa125e8a9
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register from sentry.models import Monitor @register(Monitor) class MonitorSerializer(Serializer): def serialize(self, obj, attrs, user): return { 'id': six.text_type(obj.guid), 'stat...
24.111111
55
0.656682
from __future__ import absolute_import import six from sentry.api.serializers import Serializer, register from sentry.models import Monitor @register(Monitor) class MonitorSerializer(Serializer): def serialize(self, obj, attrs, user): return { 'id': six.text_type(obj.guid), 'stat...
true
true
f705f26c35efa64bd18d29acc429de3a676fe490
236
py
Python
test/fixtures/python/get_with_data.py
dandycheung/curlconverter
5f7fb52258f2fb161dab4e7e6194e76a85d5a9a6
[ "MIT" ]
536
2021-10-06T17:21:25.000Z
2022-03-31T13:05:48.000Z
test/fixtures/python/get_with_data.py
dandycheung/curlconverter
5f7fb52258f2fb161dab4e7e6194e76a85d5a9a6
[ "MIT" ]
74
2021-10-08T13:57:14.000Z
2022-03-31T06:55:39.000Z
test/fixtures/python/get_with_data.py
dandycheung/curlconverter
5f7fb52258f2fb161dab4e7e6194e76a85d5a9a6
[ "MIT" ]
104
2021-10-06T19:36:15.000Z
2022-03-31T07:34:04.000Z
import requests headers = { 'X-Api-Key': '123456789', } params = { 'test': '2', 'limit': '100', 'w': '4', } response = requests.get('http://localhost:28139/synthetics/api/v3/monitors', params=params, headers=headers)
16.857143
108
0.610169
import requests headers = { 'X-Api-Key': '123456789', } params = { 'test': '2', 'limit': '100', 'w': '4', } response = requests.get('http://localhost:28139/synthetics/api/v3/monitors', params=params, headers=headers)
true
true
f705f28a7f85059eb3592621cd35b9680052d1b6
4,839
py
Python
main.py
santomet/OpenSupportTool-daemon
09bfe96925416ccd16b76b8f69acb4b6b030825c
[ "MIT" ]
null
null
null
main.py
santomet/OpenSupportTool-daemon
09bfe96925416ccd16b76b8f69acb4b6b030825c
[ "MIT" ]
null
null
null
main.py
santomet/OpenSupportTool-daemon
09bfe96925416ccd16b76b8f69acb4b6b030825c
[ "MIT" ]
null
null
null
import time from datetime import datetime from requests import Response import json import os import TunnelSSH import Helpers import SettingsStorage import sys def create_tunnel(tun: dict): timeout_time: datetime = datetime.fromisoformat(tun["timeout_time"]) if timeout_time <= datetime.utcnow(): Help...
39.663934
129
0.646001
import time from datetime import datetime from requests import Response import json import os import TunnelSSH import Helpers import SettingsStorage import sys def create_tunnel(tun: dict): timeout_time: datetime = datetime.fromisoformat(tun["timeout_time"]) if timeout_time <= datetime.utcnow(): Help...
true
true
f705f318155534a100cd8e18c7b7f820f08fda0e
132
py
Python
cotede/humanqc/__init__.py
jessicaaustin/CoTeDe
0ca2a1c71de980d91262fd36fd5d8ab8cc09f019
[ "BSD-3-Clause" ]
35
2015-04-20T07:28:18.000Z
2022-02-23T08:26:28.000Z
cotede/humanqc/__init__.py
jessicaaustin/CoTeDe
0ca2a1c71de980d91262fd36fd5d8ab8cc09f019
[ "BSD-3-Clause" ]
55
2015-03-29T06:59:25.000Z
2021-04-20T17:38:09.000Z
cotede/humanqc/__init__.py
jessicaaustin/CoTeDe
0ca2a1c71de980d91262fd36fd5d8ab8cc09f019
[ "BSD-3-Clause" ]
12
2016-03-22T21:14:11.000Z
2022-01-03T04:43:36.000Z
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst from cotede.humanqc.humaneval import HumanQC
26.4
63
0.780303
from cotede.humanqc.humaneval import HumanQC
true
true
f705f3880d6c09e4f9449cdd939c9a729476b1c2
5,493
py
Python
senlin_tempest_plugin/functional/test_scaling_policy.py
tengqm/senlin-tempest-plugin
4c1901c1e78cac057ab73c51b44f046656dc3667
[ "Apache-2.0" ]
null
null
null
senlin_tempest_plugin/functional/test_scaling_policy.py
tengqm/senlin-tempest-plugin
4c1901c1e78cac057ab73c51b44f046656dc3667
[ "Apache-2.0" ]
null
null
null
senlin_tempest_plugin/functional/test_scaling_policy.py
tengqm/senlin-tempest-plugin
4c1901c1e78cac057ab73c51b44f046656dc3667
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
42.253846
76
0.64209
from tempest.lib import decorators from senlin_tempest_plugin.common import constants from senlin_tempest_plugin.common import utils from senlin_tempest_plugin.functional import base class TestScalingPolicy(base.BaseSenlinFunctionalTest): def setUp(self): super(TestScalingPolicy, self).setUp...
true
true
f705f391ab810c9189b100ed39229631d36e2a29
213,437
py
Python
core/domain/exp_domain_test.py
yashdusing/oppia
c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a
[ "Apache-2.0" ]
null
null
null
core/domain/exp_domain_test.py
yashdusing/oppia
c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a
[ "Apache-2.0" ]
null
null
null
core/domain/exp_domain_test.py
yashdusing/oppia
c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
28.745724
135
0.603415
import copy import os import re from core.domain import exp_domain from core.domain import exp_fetchers from core.domain import exp_services from core.domain import html_validation_service from core.domain import param_domain from core.domain import state_domain from core.platform import models from c...
true
true
f705f423ca61244d0ab1343bbd0dea58537140db
2,397
py
Python
src/tempgen/tests/test_tempgen.py
k5md/Templated-Generator
f3cd2bc6c7de6f68fa1e5835471e8eaa9163d530
[ "MIT" ]
null
null
null
src/tempgen/tests/test_tempgen.py
k5md/Templated-Generator
f3cd2bc6c7de6f68fa1e5835471e8eaa9163d530
[ "MIT" ]
null
null
null
src/tempgen/tests/test_tempgen.py
k5md/Templated-Generator
f3cd2bc6c7de6f68fa1e5835471e8eaa9163d530
[ "MIT" ]
null
null
null
import pytest import os import os from collections import defaultdict from syrupy.extensions.single_file import SingleFileSnapshotExtension from tempgen.module import Tempgen from tempgen.parsers import Parsers from tempgen.transforms import Transforms from tempgen.tests.helpers import ext_serializer_map tests_dir = o...
41.327586
98
0.783479
import pytest import os import os from collections import defaultdict from syrupy.extensions.single_file import SingleFileSnapshotExtension from tempgen.module import Tempgen from tempgen.parsers import Parsers from tempgen.transforms import Transforms from tempgen.tests.helpers import ext_serializer_map tests_dir = o...
true
true
f705f497e8cf2e3770451fa8033e79140ae27952
1,635
py
Python
0x06-python-classes/6-square.py
ricardo1470/holbertonschool-higher_level_programming
aab73c8efee665b0215958ee7b338871f13634bc
[ "CNRI-Python" ]
null
null
null
0x06-python-classes/6-square.py
ricardo1470/holbertonschool-higher_level_programming
aab73c8efee665b0215958ee7b338871f13634bc
[ "CNRI-Python" ]
null
null
null
0x06-python-classes/6-square.py
ricardo1470/holbertonschool-higher_level_programming
aab73c8efee665b0215958ee7b338871f13634bc
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/python3 """Create class""" class Square: """Square class""" def __init__(self, size=0, position=(0, 0)): """Initialize Square""" self.__size = size self.position = position """if type(size) is not int: raise TypeError("size must be an integer") if...
26.803279
79
0.511927
class Square: def __init__(self, size=0, position=(0, 0)): self.__size = size self.position = position def area(self, area=0): return(self.__size * self.__size) @property def size(self): return self.__size @size.setter def size(self, value): if type...
true
true
f705f4a2e63a2fa8ac258a2512c5917660abddae
8,792
py
Python
f2_testbench/analyzers_mixin.py
TheSDK-blocks/f2_testbench
6a263dbab6de1da980619c0ecf6d181342c7592b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
f2_testbench/analyzers_mixin.py
TheSDK-blocks/f2_testbench
6a263dbab6de1da980619c0ecf6d181342c7592b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
f2_testbench/analyzers_mixin.py
TheSDK-blocks/f2_testbench
6a263dbab6de1da980619c0ecf6d181342c7592b
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
#This is a mixin class for signal analyzers to be used by f2_system class #Todo: Analyzers should be a independent class #Last modification by Marko Kosunen, marko.kosunen@aalto.fi, 30.07.2018 18:09 import numpy as np import scipy.signal as sig import matplotlib as mpl mpl.use('Agg') #To enble plotting without X impor...
40.330275
135
0.59702
import numpy as np import scipy.signal as sig import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt class analyzers_mixin: def oscilloscope(self,argdict): ymax=argdict['ymax'] ymin=argdict['ymin'] timex=argdict['timex'] sigin=argdict['sigin'] tstr=arg...
true
true
f705f4ae86e20d5a772a5f5decb9d89639e2d559
4,579
py
Python
McsPyDataTools/McsPy/McsCMOS.py
multichannelsystems/McsPyDataTools
45777d5955043cc6849ea2f01ea442aa19141edd
[ "BSD-Source-Code" ]
5
2019-01-02T09:02:07.000Z
2022-02-11T16:49:38.000Z
McsPyDataTools/McsPy/McsCMOS.py
multichannelsystems/McsPyDataTools
45777d5955043cc6849ea2f01ea442aa19141edd
[ "BSD-Source-Code" ]
5
2019-06-25T12:34:59.000Z
2022-02-11T16:22:09.000Z
McsPyDataTools/McsPy/McsCMOS.py
multichannelsystems/McsPyDataTools
45777d5955043cc6849ea2f01ea442aa19141edd
[ "BSD-Source-Code" ]
8
2019-09-27T13:37:02.000Z
2022-03-25T07:37:25.000Z
""" McsCMOS ~~~~~~~ Wrapper and Helper to access MCS CMOS Data within H5 Files :copyright: (c) 2018 by Multi Channel Systems MCS GmbH :license: see LICENSE for more details """ import h5py import numpy as np class CMOSData(h5py.File): """ Wrapper for a HDF5 File conta...
34.689394
110
0.544879
import h5py import numpy as np class CMOSData(h5py.File): def __init__(self, path): super(CMOSData, self).__init__(path, mode='r') self.raw_data= self['/Data/Recording_0/FrameStream/Stream_0/FrameDataEntity_0/FrameData'] self.conv_factors= self['/Data/Recording_0...
true
true
f705f652c38abcd0301c2a6ba9960c81d7a2d03b
502
py
Python
plotly/validators/bar/hoverlabel/_namelengthsrc.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/bar/hoverlabel/_namelengthsrc.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/bar/hoverlabel/_namelengthsrc.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='namelengthsrc', parent_name='bar.hoverlabel', **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name...
26.421053
72
0.615538
import _plotly_utils.basevalidators class NamelengthsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='namelengthsrc', parent_name='bar.hoverlabel', **kwargs ): super(NamelengthsrcValidator, self).__init__( plotly_name...
true
true
f705f70fc4ddea80296fbe30a9b5a4ea75f4a1af
241
py
Python
src/core/utils.py
ghrecommender/ghrecommender-backend
c888bbc2e3369a581e2ae84890cb6d502c837db6
[ "MIT" ]
26
2017-09-26T01:26:30.000Z
2021-09-30T14:38:14.000Z
src/core/utils.py
ghrecommender/ghrecommender-backend
c888bbc2e3369a581e2ae84890cb6d502c837db6
[ "MIT" ]
7
2017-09-29T14:47:42.000Z
2021-06-10T17:26:19.000Z
src/core/utils.py
ghrecommender/ghrecommender-backend
c888bbc2e3369a581e2ae84890cb6d502c837db6
[ "MIT" ]
2
2017-11-15T10:45:11.000Z
2020-02-26T18:03:48.000Z
from rest_framework_extensions.key_constructor.constructors import DefaultKeyConstructor from rest_framework_extensions.key_constructor.constructors import bits class UserKeyConstructor(DefaultKeyConstructor): user = bits.UserKeyBit()
34.428571
88
0.875519
from rest_framework_extensions.key_constructor.constructors import DefaultKeyConstructor from rest_framework_extensions.key_constructor.constructors import bits class UserKeyConstructor(DefaultKeyConstructor): user = bits.UserKeyBit()
true
true
f705f7908cac086343ab21b33ea3c415c5273107
306
py
Python
DRL/log_analysis/numpy2png.py
EXYNOS-999/AWS_JPL_DRL
ea9df7f293058b0ca2dc63753e68182fcc5380f5
[ "Apache-2.0" ]
null
null
null
DRL/log_analysis/numpy2png.py
EXYNOS-999/AWS_JPL_DRL
ea9df7f293058b0ca2dc63753e68182fcc5380f5
[ "Apache-2.0" ]
1
2020-01-08T06:52:03.000Z
2020-01-08T07:05:44.000Z
DRL/log_analysis/numpy2png.py
EXYNOS-999/AWS_JPL_DRL
ea9df7f293058b0ca2dc63753e68182fcc5380f5
[ "Apache-2.0" ]
null
null
null
import numpy as np from PIL import Image import sys def numpy_to_png(source, dest): image = Image.fromarray(np.load(source)) image.save(dest,"PNG") if __name__ == "__main__": source = sys.argv[1] dest = source.split('.npy')[0] + '.png' print(source, " to ", dest) numpy_to_png(source, dest)
20.4
42
0.676471
import numpy as np from PIL import Image import sys def numpy_to_png(source, dest): image = Image.fromarray(np.load(source)) image.save(dest,"PNG") if __name__ == "__main__": source = sys.argv[1] dest = source.split('.npy')[0] + '.png' print(source, " to ", dest) numpy_to_png(source, dest)
true
true
f705f7eac68ee6fa86ef486da4d36936d4a08a45
12,880
py
Python
h/accounts/schemas.py
openstax/hypothesis-server
9610a7cd190cce933d93cdc4bda2dc907a2869e4
[ "MIT" ]
1
2018-03-09T02:15:16.000Z
2018-03-09T02:15:16.000Z
h/accounts/schemas.py
openstax/hypothesis-server
9610a7cd190cce933d93cdc4bda2dc907a2869e4
[ "MIT" ]
16
2018-03-14T21:23:46.000Z
2019-04-29T18:55:28.000Z
h/accounts/schemas.py
openstax/hypothesis-server
9610a7cd190cce933d93cdc4bda2dc907a2869e4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from codecs import open import logging import colander import deform from itsdangerous import BadData, SignatureExpired from h import i18n, models, validators from h.accounts import util from h.services.user import UserNotActivated from h.models.user import ( EMAIL_MAX_LENGTH, USERNAME...
32.941176
103
0.615062
from codecs import open import logging import colander import deform from itsdangerous import BadData, SignatureExpired from h import i18n, models, validators from h.accounts import util from h.services.user import UserNotActivated from h.models.user import ( EMAIL_MAX_LENGTH, USERNAME_MAX_LENGTH, USERNA...
true
true
f705f844ab6c8fc39a4b3639c4a016021d2926c3
16,056
py
Python
Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
primiano/blink-gitcs
0b5424070e3006102e0036deea1e2e263b871eaa
[ "BSD-3-Clause" ]
1
2017-08-25T05:15:52.000Z
2017-08-25T05:15:52.000Z
Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
primiano/blink-gitcs
0b5424070e3006102e0036deea1e2e263b871eaa
[ "BSD-3-Clause" ]
null
null
null
Tools/Scripts/webkitpy/w3c/test_converter_unittest.py
primiano/blink-gitcs
0b5424070e3006102e0036deea1e2e263b871eaa
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above # copyright notice, this list of con...
37.690141
198
0.682237
import os import re import unittest from webkitpy.common.host import Host from webkitpy.common.system.outputcapture import OutputCapture from webkitpy.common.webkit_finder import WebKitFinder from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup from webkitpy.w3c.test_converter import ...
true
true
f705f9212f5668c98d6b0949e6d5a1272d11e8d2
21,361
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_security_rules_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_security_rules_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/operations/_security_rules_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.908879
244
0.671317
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport impor...
true
true
f705f9481fb22578b16c347722b71f3a9d96e730
13,644
py
Python
app.py
okdefinet/oknodes
c74797f7d3b6a9ec690f0129ea5313d1afc2ae66
[ "MIT" ]
null
null
null
app.py
okdefinet/oknodes
c74797f7d3b6a9ec690f0129ea5313d1afc2ae66
[ "MIT" ]
null
null
null
app.py
okdefinet/oknodes
c74797f7d3b6a9ec690f0129ea5313d1afc2ae66
[ "MIT" ]
null
null
null
""" Open Nodes web server Copyright (c) 2018 Opennodes / Blake Bjorn Anderson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, c...
37.483516
239
0.639915
import gzip import json import os import sys from io import BytesIO from flask import Flask, render_template, request, redirect, flash, Response from flask_sqlalchemy import SQLAlchemy from geoip2.errors import AddressNotFoundError from sqlalchemy import and_ from config import load_config, DefaultFlaskConfig from c...
true
true
f705fac03817f888ee9d6bdb2cb40d1264f925df
11,104
py
Python
ec.py
ryancdotorg/undercrypto2014
b8c8f8c0c989889cdef4a2eb5791250533629e3d
[ "BSD-2-Clause" ]
3
2015-04-02T14:16:50.000Z
2022-02-01T03:33:34.000Z
ec.py
ryancdotorg/undercrypto2014
b8c8f8c0c989889cdef4a2eb5791250533629e3d
[ "BSD-2-Clause" ]
null
null
null
ec.py
ryancdotorg/undercrypto2014
b8c8f8c0c989889cdef4a2eb5791250533629e3d
[ "BSD-2-Clause" ]
1
2021-01-02T20:07:38.000Z
2021-01-02T20:07:38.000Z
#!/usr/bin/python import hashlib, re, sys, os, base64, time, random, hmac # stripped down from https://github.com/vbuterin/pybitcointools/blob/master/bitcoin/main.py ### Elliptic curve parameters P = 2**256-2**32-2**9-2**8-2**7-2**6-2**4-1 N = 1157920892373161954235709850086879078528375642790749043826051631415181614...
34.5919
91
0.659492
import hashlib, re, sys, os, base64, time, random, hmac 2089237316195423570985008687907852837564279074904382605163141518161494337 A = 0 B = 7 H = 1 Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240 Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424 G ...
true
true
f705facbfc717526b824ea5eecc1a85c798bafbf
437
py
Python
packaging/setup/plugins/ovirt-engine-setup/vmconsole_proxy_helper/__init__.py
jihwahn1018/ovirt-engine
5c8a3d9a9637eefb28e4accc3cbd2b7f530d5ec9
[ "Apache-2.0" ]
347
2015-01-20T14:13:21.000Z
2022-03-31T17:53:11.000Z
packaging/setup/plugins/ovirt-engine-setup/vmconsole_proxy_helper/__init__.py
jihwahn1018/ovirt-engine
5c8a3d9a9637eefb28e4accc3cbd2b7f530d5ec9
[ "Apache-2.0" ]
128
2015-05-22T19:14:32.000Z
2022-03-31T08:11:18.000Z
packaging/setup/plugins/ovirt-engine-setup/vmconsole_proxy_helper/__init__.py
jihwahn1018/ovirt-engine
5c8a3d9a9637eefb28e4accc3cbd2b7f530d5ec9
[ "Apache-2.0" ]
202
2015-01-04T06:20:49.000Z
2022-03-08T15:30:08.000Z
# # ovirt-engine-setup -- ovirt engine setup # # Copyright oVirt Authors # SPDX-License-Identifier: Apache-2.0 # # """ovirt-host-setup vmconsole_proxy plugin.""" from otopi import util from . import config from . import pki from . import system @util.export def createPlugins(context): config.Plugin(context=c...
15.607143
46
0.732265
from otopi import util from . import config from . import pki from . import system @util.export def createPlugins(context): config.Plugin(context=context) pki.Plugin(context=context) system.Plugin(context=context)
true
true
f705fc436eda67eb2850c5e8b81bdabc6b0593a9
1,227
py
Python
st2client/st2client/models/policy.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
1
2020-11-21T10:11:25.000Z
2020-11-21T10:11:25.000Z
st2client/st2client/models/policy.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
1
2015-06-08T15:27:11.000Z
2015-06-08T15:27:11.000Z
st2client/st2client/models/policy.py
totalkyos/stack-storm
b89bc648d53dae03c7484d22abd771edfe45bbb8
[ "Apache-2.0" ]
13
2017-01-12T11:07:20.000Z
2019-04-19T09:55:49.000Z
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
35.057143
81
0.746536
import logging from st2client.models import core LOG = logging.getLogger(__name__) class PolicyType(core.Resource): _alias = 'Policy-Type' _display_name = 'Policy type' _plural = 'PolicyTypes' _plural_display_name = 'Policy types' _repr_attributes = ['ref', 'enabled', 'descriptio...
true
true
f705fc879c5006503f618f69c586ef4592be2ca0
8,442
py
Python
kivycalendar/calendar_ui.py
yumoqing/kivycalendar
6297e5094d994b8eca49515c0d61328c0545d5ef
[ "MIT" ]
1
2019-12-09T16:49:16.000Z
2019-12-09T16:49:16.000Z
kivycalendar/calendar_ui.py
yumoqing/kivycalendar
6297e5094d994b8eca49515c0d61328c0545d5ef
[ "MIT" ]
null
null
null
kivycalendar/calendar_ui.py
yumoqing/kivycalendar
6297e5094d994b8eca49515c0d61328c0545d5ef
[ "MIT" ]
1
2019-12-09T16:50:03.000Z
2019-12-09T16:50:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- ########################################################### # KivyCalendar (X11/MIT License) # Calendar & Date picker widgets for Kivy (http://kivy.org) # https://bitbucket.org/xxblx/kivycalendar # # Oleg Kozlov (xxblx), 2015 # https://xxblx.bitbucket.org/ ###################...
26.38125
82
0.659086
true
true
f705fe7872d172d8f85abd1a9f7b4972525638ec
498
py
Python
wystia/utils/response.py
rnag/wystia
dfe21764a54d2737814157072c3262aa7b1cec7d
[ "MIT" ]
1
2022-02-02T21:22:20.000Z
2022-02-02T21:22:20.000Z
wystia/utils/response.py
rnag/wystia
dfe21764a54d2737814157072c3262aa7b1cec7d
[ "MIT" ]
9
2021-06-17T15:11:31.000Z
2021-12-01T18:49:13.000Z
wystia/utils/response.py
rnag/wystia
dfe21764a54d2737814157072c3262aa7b1cec7d
[ "MIT" ]
null
null
null
""" Utilities for API Gateway response formatting """ import json def format_response(data, status=200): return { 'body': json.dumps(data), 'headers': { 'Content-Type': 'application/json' }, 'statusCode': int(status) } def format_error(msg, code='BadRequest', stat...
18.444444
53
0.536145
import json def format_response(data, status=200): return { 'body': json.dumps(data), 'headers': { 'Content-Type': 'application/json' }, 'statusCode': int(status) } def format_error(msg, code='BadRequest', status=400): data = { 'success': False, ...
true
true
f705febbae4ab8b3666a1d72a4151694f25b9165
78,540
py
Python
nova/virt/vmwareapi/vmops.py
armstrong-liu/nova
df4a0cb8fadbb9ff4fb96b97c12d7d909e1c7df0
[ "Apache-2.0" ]
null
null
null
nova/virt/vmwareapi/vmops.py
armstrong-liu/nova
df4a0cb8fadbb9ff4fb96b97c12d7d909e1c7df0
[ "Apache-2.0" ]
9
2015-05-20T11:20:17.000Z
2017-07-27T08:21:33.000Z
nova/virt/vmwareapi/vmops.py
armstrong-liu/nova
df4a0cb8fadbb9ff4fb96b97c12d7d909e1c7df0
[ "Apache-2.0" ]
13
2015-05-05T09:34:04.000Z
2017-11-08T02:03:46.000Z
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
46.945607
79
0.58108
import collections import copy import os import time import decorator from oslo.config import cfg from oslo.vmware import exceptions as vexc from nova.api.metadata import base as instance_metadata from nova import compute from nova.compute import power_state from nova.compute import task_states from...
true
true
f705ff18b45378b112b53ebc92088be2ecafca92
318
py
Python
output.py
ton86/worklog
1743972b1d7aceb5960a323516a671c3c444d1bc
[ "MIT" ]
null
null
null
output.py
ton86/worklog
1743972b1d7aceb5960a323516a671c3c444d1bc
[ "MIT" ]
null
null
null
output.py
ton86/worklog
1743972b1d7aceb5960a323516a671c3c444d1bc
[ "MIT" ]
null
null
null
from pathlib import Path import json # Directory dir = Path().resolve() # Configuration with open(dir/'config.json') as config_file: CONFIG = json.load(config_file) def output_dir(config = CONFIG): """ Return string for default output directory path. """ return(config['output_dir']['path'])
17.666667
52
0.685535
from pathlib import Path import json dir = Path().resolve() with open(dir/'config.json') as config_file: CONFIG = json.load(config_file) def output_dir(config = CONFIG): return(config['output_dir']['path'])
true
true
f705ff6551509dfbb0053affdd45604b366b75b9
4,516
py
Python
abel/tools/polar.py
Derollez/PyAbel
c8be4ed7e8e08ee026634b9e856fb473e58d7330
[ "MIT" ]
null
null
null
abel/tools/polar.py
Derollez/PyAbel
c8be4ed7e8e08ee026634b9e856fb473e58d7330
[ "MIT" ]
null
null
null
abel/tools/polar.py
Derollez/PyAbel
c8be4ed7e8e08ee026634b9e856fb473e58d7330
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from scipy.ndimage import map_coordinates from scipy.ndimage.interpolation import shift from scipy.optimize import curve_fit, ...
28.049689
96
0.613153
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from scipy.ndimage import map_coordinates from scipy.ndimage.interpolation import shift from scipy.optimize import curve_fit, minimize def reprojec...
true
true
f705ffdd342fc61517b1e81622606cf4d4b511a4
41,696
py
Python
python/ccxt/async_support/okcoinusd.py
rkingy/ccxt
ba532b36df8aac8c39f638514fb613d077a23b01
[ "MIT" ]
5
2019-04-22T15:03:56.000Z
2019-10-27T13:49:32.000Z
python/ccxt/async_support/okcoinusd.py
rkingy/ccxt
ba532b36df8aac8c39f638514fb613d077a23b01
[ "MIT" ]
5
2019-12-28T05:46:26.000Z
2021-05-08T12:47:41.000Z
python/ccxt/async_support/okcoinusd.py
rkingy/ccxt
ba532b36df8aac8c39f638514fb613d077a23b01
[ "MIT" ]
3
2019-06-15T07:21:58.000Z
2020-06-07T18:24:20.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.async_support.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import A...
45.028078
385
0.514246
rt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationError from ccxt.base.errors import ArgumentsRequired from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import InvalidOrder from ccxt.base.errors import OrderNotFound f...
true
true
f70602a4d6e1c149fd39b8c0015b53b971bd17ca
1,960
py
Python
Top_Interview_Question_Easy/Design/Shuffle an Array/by_random_shuffle.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
32
2020-01-05T13:37:16.000Z
2022-03-26T07:27:09.000Z
Top_Interview_Question_Easy/Design/Shuffle an Array/by_random_shuffle.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
null
null
null
Top_Interview_Question_Easy/Design/Shuffle an Array/by_random_shuffle.py
coderMaruf/leetcode-1
20ffe26e43999e44c8acf9800acb371a49bb5853
[ "MIT" ]
8
2020-06-18T16:17:27.000Z
2022-03-15T23:58:18.000Z
''' Description: Shuffle a set of numbers without duplicates. Example: // Init an array with set 1, 2, and 3. int[] nums = {1,2,3}; Solution solution = new Solution(nums); // Shuffle the array [1,2,3] and return its result. Any permutation of [1,2,3] must equally likely to be returned. solution.shuffle(); // Rese...
20.851064
130
0.627551
from typing import List from random import shuffle class Solution: def __init__(self, nums: List[int]): self.array = [ *nums ] self.origin = nums def reset(self) -> List[int]: self.array = [ *(self.origin) ] return self.array def shuffle(self...
true
true
f706046282c238390879809cfc550ca00aa9d7c5
19,105
py
Python
python/cuml/test/test_umap.py
siddheshmhatre/cuml
ed0e58c6b3ebfc17b944cdad7c04cd4af8860736
[ "Apache-2.0" ]
2,743
2018-10-11T17:28:58.000Z
2022-03-31T19:20:50.000Z
python/cuml/test/test_umap.py
siddheshmhatre/cuml
ed0e58c6b3ebfc17b944cdad7c04cd4af8860736
[ "Apache-2.0" ]
4,280
2018-10-11T22:29:57.000Z
2022-03-31T22:02:44.000Z
python/cuml/test/test_umap.py
siddheshmhatre/cuml
ed0e58c6b3ebfc17b944cdad7c04cd4af8860736
[ "Apache-2.0" ]
454
2018-10-11T17:40:56.000Z
2022-03-25T17:07:09.000Z
# Copyright (c) 2019-2021, NVIDIA 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 agre...
35.844278
79
0.655745
import numpy as np import pytest import umap import copy import cupyx import scipy.sparse from cuml.manifold.umap import UMAP as cuUMAP from cuml.test.utils import array_equal, unit_param, \ quality_param, stress_param from sklearn.neighbors import NearestNeighbors import joblib from cuml.com...
true
true
f70604e996bcced6a875cdc45706aed741786a1e
884
py
Python
python/Depth_of_BinaryTree.py
samael65535/LeetCode_Kata
9f95ef7906dfd0dfbd3d1a9d86713491ca614d73
[ "Beerware" ]
null
null
null
python/Depth_of_BinaryTree.py
samael65535/LeetCode_Kata
9f95ef7906dfd0dfbd3d1a9d86713491ca614d73
[ "Beerware" ]
3
2020-09-06T23:00:37.000Z
2021-05-10T08:40:16.000Z
python/Depth_of_BinaryTree.py
samael65535/LeetCode_Kata
9f95ef7906dfd0dfbd3d1a9d86713491ca614d73
[ "Beerware" ]
null
null
null
# Given a binary tree, find its maximum depth. # The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. # Definition for a binary tree node class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None cla...
27.625
116
0.574661
class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None class Solution: def maxDepth(self, root): if root is None: return 0 L = 0; R = 0; if not (root.left is None): L = self.maxDepth(roo...
true
true
f70605983681cf001e0bd742787b59712a82a096
441
py
Python
duckshell/Python (Alpha)/duckshell.py
notbeandev/duckshell
c9da7b7dbf7e13811f934fd08e009505e47e759c
[ "Apache-2.0" ]
null
null
null
duckshell/Python (Alpha)/duckshell.py
notbeandev/duckshell
c9da7b7dbf7e13811f934fd08e009505e47e759c
[ "Apache-2.0" ]
null
null
null
duckshell/Python (Alpha)/duckshell.py
notbeandev/duckshell
c9da7b7dbf7e13811f934fd08e009505e47e759c
[ "Apache-2.0" ]
null
null
null
import os def shell(): inputuser = input("> ") if (inputuser == "exit"): exit() os.system(inputuser) return shell() print("Welcome to duckshell (python alpha)") print("System info: ") os.system("echo distro: $(uname -o)"); os.system("echo hostname: $(uname -n)"); os.system("echo architecture: ...
25.941176
53
0.630385
import os def shell(): inputuser = input("> ") if (inputuser == "exit"): exit() os.system(inputuser) return shell() print("Welcome to duckshell (python alpha)") print("System info: ") os.system("echo distro: $(uname -o)"); os.system("echo hostname: $(uname -n)"); os.system("echo architecture: ...
true
true
f706078f25935d3f6dc896b8ed8817a6dac40291
658
py
Python
cli/commands/cmd_coverage.py
Pythonian/catwatch
25730faa9d8ec6564b075de78bbbf4ff125ada97
[ "MIT" ]
null
null
null
cli/commands/cmd_coverage.py
Pythonian/catwatch
25730faa9d8ec6564b075de78bbbf4ff125ada97
[ "MIT" ]
null
null
null
cli/commands/cmd_coverage.py
Pythonian/catwatch
25730faa9d8ec6564b075de78bbbf4ff125ada97
[ "MIT" ]
2
2018-08-04T16:46:55.000Z
2019-07-02T19:30:24.000Z
import logging import subprocess import click try: from instance import settings APP_ROOT = settings.APP_ROOT except ImportError: logging.error('Ensure __init__.py and settings.py both exist in instance/') exit(1) except AttributeError: from config import settings APP_ROOT = settings.APP_ROO...
21.225806
79
0.699088
import logging import subprocess import click try: from instance import settings APP_ROOT = settings.APP_ROOT except ImportError: logging.error('Ensure __init__.py and settings.py both exist in instance/') exit(1) except AttributeError: from config import settings APP_ROOT = settings.APP_ROO...
true
true
f70609b6a4e0c7889d505fe6072dfde0383cb4af
4,218
py
Python
src/specific_models/federated/single_machine_simulation_flower/single_machine_simulation.py
kaylani2/machineLearning
692623abf6fe02bde6c7da6c2f8c0ec526a3e8f8
[ "MIT" ]
7
2019-11-06T14:35:37.000Z
2022-03-06T03:55:06.000Z
src/specific_models/federated/single_machine_simulation_flower/single_machine_simulation.py
kaylani2/machineLearning
692623abf6fe02bde6c7da6c2f8c0ec526a3e8f8
[ "MIT" ]
10
2020-05-16T02:38:35.000Z
2021-04-11T23:55:35.000Z
src/specific_models/federated/single_machine_simulation_flower/single_machine_simulation.py
kaylani2/machineLearning
692623abf6fe02bde6c7da6c2f8c0ec526a3e8f8
[ "MIT" ]
2
2020-06-26T21:39:41.000Z
2020-09-15T03:38:32.000Z
import os import time from multiprocessing import Process from typing import Tuple import flwr as fl import numpy as np import tensorflow as tf from flwr.server.strategy import FedAvg import dataset # generate random integer values from random import seed from random import randint # Make TensorFlow log less verbos...
35.745763
147
0.676387
import os import time from multiprocessing import Process from typing import Tuple import flwr as fl import numpy as np import tensorflow as tf from flwr.server.strategy import FedAvg import dataset from random import seed from random import randint os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" os.environ["CUDA_VISI...
true
true
f7060c08bc11ae2c68ff0c0e583ea8e09574f0ef
551
py
Python
lecture06/01_bitsets/bitsets.py
nd-cse-34872-su20/cse-34872-su20-examples
683039c19b2e2bd0c3c28713b73e46a9deaa227c
[ "MIT" ]
2
2020-06-01T16:46:39.000Z
2020-12-01T21:50:12.000Z
lecture06/01_bitsets/bitsets.py
nd-cse-34872-su20/cse-34872-su20-examples
683039c19b2e2bd0c3c28713b73e46a9deaa227c
[ "MIT" ]
null
null
null
lecture06/01_bitsets/bitsets.py
nd-cse-34872-su20/cse-34872-su20-examples
683039c19b2e2bd0c3c28713b73e46a9deaa227c
[ "MIT" ]
6
2020-06-03T23:56:26.000Z
2020-08-26T15:05:17.000Z
#!/usr/bin/env python3 elements = (1, 2, 4) bitset = 0 # 1. Initialize bitset # Add elements to bitset for i in elements: bitset = bitset | 1<<i # 2. Add element to bitset # Print contents of bitset print(bitset) # Test for elements in bitset for i in range(6): if bitset & ...
22.958333
69
0.602541
elements = (1, 2, 4) bitset = 0 for i in elements: bitset = bitset | 1<<i print(bitset) for i in range(6): if bitset & 1<<i: print(i) for i in elements: bitset = bitset & ~(1<<i) print(bitset)
true
true
f7060d6db54a0a075b206cc8b5ec9fc32267fc6b
6,891
py
Python
salt/cli/__init__.py
mitsuhiko/salt
3b211f87e307936f43c937edc62207dd1b887e19
[ "Apache-2.0" ]
4
2015-10-06T22:20:27.000Z
2017-09-04T08:03:44.000Z
salt/cli/__init__.py
mitsuhiko/salt
3b211f87e307936f43c937edc62207dd1b887e19
[ "Apache-2.0" ]
null
null
null
salt/cli/__init__.py
mitsuhiko/salt
3b211f87e307936f43c937edc62207dd1b887e19
[ "Apache-2.0" ]
null
null
null
''' The management of salt command line utilities are stored in here ''' # Import python libs import os import sys # Import salt components import salt.cli.caller import salt.cli.cp import salt.cli.key import salt.cli.batch import salt.client import salt.output import salt.runner import optparse from salt.utils impo...
29.199153
80
0.506748
import os import sys import salt.cli.caller import salt.cli.cp import salt.cli.key import salt.cli.batch import salt.client import salt.output import salt.runner import optparse from salt.utils import parsers from salt.utils.verify import verify_env from salt.version import __version__ as VERSION from salt.excepti...
true
true
f7060f746805a30aa2c550af85590696b9df583c
19,094
py
Python
mango/group.py
liqprotocol/mango-explorer
c2eecdd80f3e57261e209109af39bc05d34cabe9
[ "MIT" ]
null
null
null
mango/group.py
liqprotocol/mango-explorer
c2eecdd80f3e57261e209109af39bc05d34cabe9
[ "MIT" ]
null
null
null
mango/group.py
liqprotocol/mango-explorer
c2eecdd80f3e57261e209109af39bc05d34cabe9
[ "MIT" ]
null
null
null
# # ⚠ Warning # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT # LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN # NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA...
46.120773
320
0.697601
import typing from decimal import Decimal from solana.publickey import PublicKey from .accountinfo import AccountInfo from .addressableaccount import AddressableAccount from .cache import Cache, PerpMarketCache, MarketCache from .constants import SYSTEM_PROGRAM_ADDRESS from .context import Context from .instrumen...
true
true
f7060f8c4698c96e5529ffec9c6be7b4e1582361
114
py
Python
Algorithm/sort/__init__.py
hyhplus/LeetCodeByPython
ebc0a59610e4c8b72660a9c96f408cc3319a7c28
[ "MIT" ]
2
2019-01-03T10:04:50.000Z
2019-10-29T07:46:39.000Z
Algorithm/sort/__init__.py
hyhplus/LeetCodeByPython
ebc0a59610e4c8b72660a9c96f408cc3319a7c28
[ "MIT" ]
null
null
null
Algorithm/sort/__init__.py
hyhplus/LeetCodeByPython
ebc0a59610e4c8b72660a9c96f408cc3319a7c28
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 排序算法: O(n^2) 冒泡排序 插入排序 选择排序 Q(n log n) 分而治之 快速排序 归并排序 """
6.333333
23
0.552632
true
true
f7061066591ffa49a0024bd409f76b17d31c1a6f
10,337
py
Python
lib/galaxy/webapps/galaxy/services/dataset_collections.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
lib/galaxy/webapps/galaxy/services/dataset_collections.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
2
2017-05-18T16:12:55.000Z
2022-03-08T12:08:43.000Z
lib/galaxy/webapps/galaxy/services/dataset_collections.py
beatrizserrano/galaxy
e149d9d32e1bca6c07c38b1a9cdabfee60323610
[ "CC-BY-3.0" ]
null
null
null
from logging import getLogger from typing import ( List, Optional, Set, ) from pydantic import ( BaseModel, Extra, Field, ) from galaxy import exceptions from galaxy.datatypes.registry import Registry from galaxy.managers.collections import DatasetCollectionManager from galaxy.managers.collect...
40.065891
120
0.689659
from logging import getLogger from typing import ( List, Optional, Set, ) from pydantic import ( BaseModel, Extra, Field, ) from galaxy import exceptions from galaxy.datatypes.registry import Registry from galaxy.managers.collections import DatasetCollectionManager from galaxy.managers.collect...
true
true
f7061158552864417effbee3b029c9645befcd05
1,125
py
Python
netbox/dcim/migrations/0102_applicationtype.py
fireman0865/PingBox
0f00eaf88b88e9441fffd5173a1501e56c13db03
[ "Apache-2.0" ]
1
2021-09-23T00:06:51.000Z
2021-09-23T00:06:51.000Z
netbox/dcim/migrations/0102_applicationtype.py
fireman0865/PingBox
0f00eaf88b88e9441fffd5173a1501e56c13db03
[ "Apache-2.0" ]
2
2021-06-08T21:05:10.000Z
2021-09-08T01:46:58.000Z
netbox/dcim/migrations/0102_applicationtype.py
fireman0865/PingBox
0f00eaf88b88e9441fffd5173a1501e56c13db03
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.10 on 2020-03-04 23:25 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dcim', '0101_auto_20200304_1403'), ] operations = [ migrations.CreateModel( name='ApplicationType', fields=[ ...
37.5
98
0.580444
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('dcim', '0101_auto_20200304_1403'), ] operations = [ migrations.CreateModel( name='ApplicationType', fields=[ ('id', models.AutoField(auto_created=T...
true
true
f7061171c0575a50ba7e9049d89c083ce46428d7
956
py
Python
built-in/TensorFlow/Official/cv/image_classification/ResnetVariant_for_TensorFlow/automl/test/core/test_run.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
null
null
null
built-in/TensorFlow/Official/cv/image_classification/ResnetVariant_for_TensorFlow/automl/test/core/test_run.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
3
2021-03-31T20:15:40.000Z
2022-02-09T23:50:46.000Z
built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/test/core/test_run.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- """Test function for vega.run""" import unittest def lazy(func): """lazy function wrapper :param func: function name """ attr_name = "_lazy_" + func.__name__ def lazy_func(*args, **kwargs): """Wrapper of lazy func :param args: any object :param kwa...
21.244444
59
0.593096
import unittest def lazy(func): attr_name = "_lazy_" + func.__name__ def lazy_func(*args, **kwargs): if not hasattr(func, attr_name): setattr(func, attr_name, func(*args, **kwargs)) return getattr(func, attr_name) return lazy_func @lazy def env_args(args): return args ...
true
true
f7061176279a8b38453b28791f0ce65eda3f2bb7
3,308
py
Python
build/fbcode_builder/shell_quoting.py
dgrnbrg-meta/fbzmq
cf292f1042afe5c49dcf5231f16b86e49ddb186e
[ "MIT" ]
3
2022-02-10T10:48:36.000Z
2022-02-21T23:18:10.000Z
build/fbcode_builder/shell_quoting.py
dgrnbrg-meta/fbzmq
cf292f1042afe5c49dcf5231f16b86e49ddb186e
[ "MIT" ]
23
2021-11-11T12:38:17.000Z
2022-01-28T10:59:38.000Z
build/fbcode_builder/shell_quoting.py
dgrnbrg-meta/fbzmq
cf292f1042afe5c49dcf5231f16b86e49ddb186e
[ "MIT" ]
8
2021-11-11T12:26:21.000Z
2022-01-12T08:58:32.000Z
#!/usr/bin/env python # Copyright (c) Facebook, Inc. and its affiliates. """ Almost every FBCodeBuilder string is ultimately passed to a shell. Escaping too little or too much tends to be the most common error. The utilities in this file give a systematic way of avoiding such bugs: - When you write literal strings ...
32.752475
88
0.658102
import os from collections import namedtuple class ShellQuoted(namedtuple("ShellQuoted", ("do_not_use_raw_str",))): def __new__(cls, s): return super(ShellQuoted, cls).__new__( cls, s.do_not_use_raw_str if isinstance(s, ShellQuoted) else s ) def __str__(self): raise ...
true
true
f7061273d3c8137b689febcaac33374fabaa5045
2,250
py
Python
myproj/util/__init__.py
jbarguil/python-rest-server
d050d095555c9bad3e2e94b4e0c51075cc6ad3bc
[ "MIT" ]
null
null
null
myproj/util/__init__.py
jbarguil/python-rest-server
d050d095555c9bad3e2e94b4e0c51075cc6ad3bc
[ "MIT" ]
null
null
null
myproj/util/__init__.py
jbarguil/python-rest-server
d050d095555c9bad3e2e94b4e0c51075cc6ad3bc
[ "MIT" ]
null
null
null
"""Assortment of utilities. """ from datetime import datetime from hashlib import sha256, md5 import random import re import string import unicodedata epoch = datetime.utcfromtimestamp(0) def unix_time(dt=None): """Returns the UNIX time representation for a given date or current UTC.""" dt = dt or datetim...
27.439024
79
0.674667
from datetime import datetime from hashlib import sha256, md5 import random import re import string import unicodedata epoch = datetime.utcfromtimestamp(0) def unix_time(dt=None): dt = dt or datetime.utcnow() return int((dt - epoch).total_seconds()) def unix_time_millis(dt=None): dt = dt or datetime...
true
true
f70612cc26f34cc6ad38194178f11e8869f22713
598
py
Python
src/deep_net/__init__.py
nadundesilva/deep-net
b6599740b8215a1f0b390d5256daa0b93201cc41
[ "Apache-2.0" ]
null
null
null
src/deep_net/__init__.py
nadundesilva/deep-net
b6599740b8215a1f0b390d5256daa0b93201cc41
[ "Apache-2.0" ]
null
null
null
src/deep_net/__init__.py
nadundesilva/deep-net
b6599740b8215a1f0b390d5256daa0b93201cc41
[ "Apache-2.0" ]
null
null
null
"""Copyright (c) 2021, Deep Net. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
35.176471
72
0.777592
EPSILON = 1e-20
true
true
f70614415b76e8bbb1e2d4b32b4408814a297504
22
py
Python
hello_world.py
pherrington/pynet
28871f45088749c59244f7f674493ee6e509e0df
[ "Apache-2.0" ]
null
null
null
hello_world.py
pherrington/pynet
28871f45088749c59244f7f674493ee6e509e0df
[ "Apache-2.0" ]
null
null
null
hello_world.py
pherrington/pynet
28871f45088749c59244f7f674493ee6e509e0df
[ "Apache-2.0" ]
null
null
null
print 'Hello World!'
7.333333
20
0.681818
print 'Hello World!'
false
true
f706144295d2afcac1781e2d5a2e11deb21faf18
18,819
py
Python
log_complete/model_615.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_615.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_complete/model_615.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
# exported from PySB model 'model' from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', '...
91.354369
710
0.806525
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C8A', ['BidU', 'C3pro']) Monomer('SmacM', ['BaxA']) Monomer('BaxM', ['BidM', 'BaxA']) Monomer('Apop', ['C3pro', ...
true
true
f7061506fa2cce695f12947d1688e170169e08f4
8,490
py
Python
src/magql/filter.py
ruoyangW-dev/magql
a7b6a217495a785afcac12c350cb234ff60f265e
[ "BSD-3-Clause" ]
25
2020-02-13T21:25:08.000Z
2021-11-29T07:19:16.000Z
src/magql/filter.py
ruoyangW-dev/magql
a7b6a217495a785afcac12c350cb234ff60f265e
[ "BSD-3-Clause" ]
40
2020-02-14T00:54:06.000Z
2021-07-28T18:45:32.000Z
src/magql/filter.py
ruoyangW-dev/magql
a7b6a217495a785afcac12c350cb234ff60f265e
[ "BSD-3-Clause" ]
2
2021-06-07T21:50:46.000Z
2021-12-21T14:47:31.000Z
from __future__ import annotations import typing as t from functools import singledispatch from inflection import underscore from sqlalchemy import Date from sqlalchemy import DateTime from sqlalchemy import Text from sqlalchemy import Time from sqlalchemy import Unicode from sqlalchemy import UnicodeText from sqlalc...
30.430108
88
0.610718
from __future__ import annotations import typing as t from functools import singledispatch from inflection import underscore from sqlalchemy import Date from sqlalchemy import DateTime from sqlalchemy import Text from sqlalchemy import Time from sqlalchemy import Unicode from sqlalchemy import UnicodeText from sqlalc...
true
true
f70616730f443ffb7030c4b8c2a0120588c0536f
61
py
Python
app/__init__.py
michalvi/heroes3calc
7c55bd13d01b6e3e5ab9f3c236ac4e71ca58f82d
[ "MIT" ]
1
2020-09-04T18:57:52.000Z
2020-09-04T18:57:52.000Z
app/__init__.py
michalvi/heroes3calc
7c55bd13d01b6e3e5ab9f3c236ac4e71ca58f82d
[ "MIT" ]
3
2021-06-08T22:24:03.000Z
2022-03-12T00:47:53.000Z
app/__init__.py
michalvi/heroes3calc
7c55bd13d01b6e3e5ab9f3c236ac4e71ca58f82d
[ "MIT" ]
null
null
null
from .__main__ import create_app application = create_app()
15.25
32
0.803279
from .__main__ import create_app application = create_app()
true
true
f70616ce0a8a228cd073571ebccf6743a53717ef
11,351
py
Python
mindspore/communication/_comm_helper.py
GuoSuiming/mindspore
48afc4cfa53d970c0b20eedfb46e039db2a133d5
[ "Apache-2.0" ]
55
2020-12-17T10:26:06.000Z
2022-03-28T07:18:26.000Z
mindspore/communication/_comm_helper.py
forwhat461/mindspore
59a277756eb4faad9ac9afcc7fd526e8277d4994
[ "Apache-2.0" ]
1
2020-12-29T06:46:38.000Z
2020-12-29T06:46:38.000Z
mindspore/communication/_comm_helper.py
forwhat461/mindspore
59a277756eb4faad9ac9afcc7fd526e8277d4994
[ "Apache-2.0" ]
14
2021-01-29T02:39:47.000Z
2022-03-23T05:00:26.000Z
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
30.761518
111
0.646903
from mindspore.parallel._ps_context import _is_role_pserver, _is_role_sched from ._hccl_management import load_lib as hccl_load_lib _HCCL_AVAILABLE = False _NCCL_AVAILABLE = False try: import mindspore._ms_mpi as mpi _NCCL_AVAILABLE = True except ImportError: _NCCL_AVAILABLE = False try: ...
true
true
f706171537799e2583aed68b68e365bd286ea23b
235
py
Python
tests/test_blackrock_rstart.py
sgowda/brain-python-interface
708e2a5229d0496a8ce9de32bda66f0925d366d9
[ "Apache-2.0" ]
7
2015-08-25T00:28:49.000Z
2020-04-14T22:58:51.000Z
tests/test_blackrock_rstart.py
sgowda/brain-python-interface
708e2a5229d0496a8ce9de32bda66f0925d366d9
[ "Apache-2.0" ]
89
2020-08-03T16:54:08.000Z
2022-03-09T19:56:19.000Z
tests/test_blackrock_rstart.py
sgowda/brain-python-interface
708e2a5229d0496a8ce9de32bda66f0925d366d9
[ "Apache-2.0" ]
4
2016-10-05T17:54:26.000Z
2020-08-06T15:37:09.000Z
from features.arduino_features import BlackrockSerialDIORowByte, SerialDIORowByte from riglib import experiment class par(object): def init(self): pass class F(BlackrockSerialDIORowByte, par): pass f = F() f.init()
16.785714
81
0.744681
from features.arduino_features import BlackrockSerialDIORowByte, SerialDIORowByte from riglib import experiment class par(object): def init(self): pass class F(BlackrockSerialDIORowByte, par): pass f = F() f.init()
true
true
f7061794ddceca6e6d6672e4e6533207f5f3e020
3,985
py
Python
src/snex/core.py
jwbargsten/snex
d922a3f71243d0eb3da6290ead2d3fb1fec18b3d
[ "MIT" ]
null
null
null
src/snex/core.py
jwbargsten/snex
d922a3f71243d0eb3da6290ead2d3fb1fec18b3d
[ "MIT" ]
null
null
null
src/snex/core.py
jwbargsten/snex
d922a3f71243d0eb3da6290ead2d3fb1fec18b3d
[ "MIT" ]
null
null
null
import logging import chevron import re from itertools import dropwhile import snex.util as util logger = logging.getLogger(__name__) DEFAULT = { # :snippet global-default-config lang: python "output_template": "```{{lang}}\n{{{snippet}}}\n```\n", "valid_param_keys": ["name", "lang", "lnum", "fname", "pat...
31.377953
105
0.608783
import logging import chevron import re from itertools import dropwhile import snex.util as util logger = logging.getLogger(__name__) DEFAULT = { "output_template": "```{{lang}}\n{{{snippet}}}\n```\n", "valid_param_keys": ["name", "lang", "lnum", "fname", "path"], "output_path": "snippets", "line...
true
true
f70618c39c020effbe9aad023c7832f65e695fdd
5,470
py
Python
scarletio/utils/type_modulizer.py
HuyaneMatsu/scarletio
49e434a118bbf31586e2bf8631ac8d7c7a2f6ffb
[ "0BSD" ]
3
2021-12-01T07:56:36.000Z
2021-12-05T17:37:41.000Z
scarletio/utils/type_modulizer.py
HuyaneMatsu/scarletio
49e434a118bbf31586e2bf8631ac8d7c7a2f6ffb
[ "0BSD" ]
7
2021-12-04T14:29:27.000Z
2022-03-07T18:32:28.000Z
scarletio/utils/type_modulizer.py
HuyaneMatsu/scarletio
49e434a118bbf31586e2bf8631ac8d7c7a2f6ffb
[ "0BSD" ]
null
null
null
__all__ = ('modulize',) import sys from types import FunctionType, GetSetDescriptorType, MappingProxyType, ModuleType from .docs import has_docs NoneType = type(None) try: from _weakref import ref as WeakrefType except ImportError: from weakref import ref as WeakrefType # This 2 type can be function Wrapp...
31.257143
117
0.652468
__all__ = ('modulize',) import sys from types import FunctionType, GetSetDescriptorType, MappingProxyType, ModuleType from .docs import has_docs NoneType = type(None) try: from _weakref import ref as WeakrefType except ImportError: from weakref import ref as WeakrefType WrapperDescriptorType = type(objec...
true
true
f70618d1936aad1ec8ef3dbc308ea36fef818331
11,554
py
Python
yatube/posts/tests/test_views.py
deadbit-dev/yatube
10be5278cd2bca6f47a7d3295e4cb4142883f48e
[ "MIT" ]
null
null
null
yatube/posts/tests/test_views.py
deadbit-dev/yatube
10be5278cd2bca6f47a7d3295e4cb4142883f48e
[ "MIT" ]
null
null
null
yatube/posts/tests/test_views.py
deadbit-dev/yatube
10be5278cd2bca6f47a7d3295e4cb4142883f48e
[ "MIT" ]
null
null
null
import shutil import tempfile from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.core.cache import cache from django.contrib.auth import get_user_model from django.test import Client, TestCase, override_settings from django.urls import reverse from django import...
33.982353
73
0.571404
import shutil import tempfile from django.conf import settings from django.core.files.uploadedfile import SimpleUploadedFile from django.core.cache import cache from django.contrib.auth import get_user_model from django.test import Client, TestCase, override_settings from django.urls import reverse from django import...
true
true
f7061903a264680f9b39d3a390c04ca8597fdfc7
8,316
py
Python
tests/test_oracle.py
lkpdn/alembic
85cc0fdcf5bf8cf34fcc87362052bcc9fb9d1f2c
[ "MIT" ]
null
null
null
tests/test_oracle.py
lkpdn/alembic
85cc0fdcf5bf8cf34fcc87362052bcc9fb9d1f2c
[ "MIT" ]
null
null
null
tests/test_oracle.py
lkpdn/alembic
85cc0fdcf5bf8cf34fcc87362052bcc9fb9d1f2c
[ "MIT" ]
null
null
null
from sqlalchemy import Column from sqlalchemy import Integer from alembic import command from alembic import op from alembic.testing import config from alembic.testing.env import _no_sql_testing_config from alembic.testing.env import clear_staging_env from alembic.testing.env import staging_env from alembic.testing.en...
36.31441
79
0.637807
from sqlalchemy import Column from sqlalchemy import Integer from alembic import command from alembic import op from alembic.testing import config from alembic.testing.env import _no_sql_testing_config from alembic.testing.env import clear_staging_env from alembic.testing.env import staging_env from alembic.testing.en...
true
true
f7061912c1fad41615b2d215e801104e54d2ac68
3,934
bzl
Python
tests/shell_tests.bzl
laszlocsomor/bazel-skylib
f4a2bae427c4958af834c34624767b0144f7ab12
[ "Apache-2.0" ]
null
null
null
tests/shell_tests.bzl
laszlocsomor/bazel-skylib
f4a2bae427c4958af834c34624767b0144f7ab12
[ "Apache-2.0" ]
null
null
null
tests/shell_tests.bzl
laszlocsomor/bazel-skylib
f4a2bae427c4958af834c34624767b0144f7ab12
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
36.091743
81
0.628876
load("//lib:shell.bzl", "shell") load("//lib:unittest.bzl", "asserts", "unittest") def _shell_array_literal_test(ctx): env = unittest.begin(ctx) asserts.equals(env, "()", shell.array_literal([])) asserts.equals(env, "('1')", shell.array_literal([1])) asserts.equals(env, "('1' '2' '3')",...
true
true
f7061945918a4538a4c2f546ccac1c0c7da56a61
1,284
py
Python
tests/test_contexts.py
jhowl01/WFSim
c96603659111964ea3bf76bbb6681eaed4d62c64
[ "BSD-3-Clause" ]
null
null
null
tests/test_contexts.py
jhowl01/WFSim
c96603659111964ea3bf76bbb6681eaed4d62c64
[ "BSD-3-Clause" ]
19
2021-12-01T11:05:12.000Z
2022-03-01T11:05:28.000Z
tests/test_contexts.py
jhowl01/WFSim
c96603659111964ea3bf76bbb6681eaed4d62c64
[ "BSD-3-Clause" ]
null
null
null
import strax import straxen import wfsim def test_nt_context(register=None, context=None): """ Test a context if it is properly setup. To this end, we perform a simple scan of the field "time" since all plugins should have this field, if there is some option specified badly, we will quickly f...
32.1
108
0.702492
import strax import straxen import wfsim def test_nt_context(register=None, context=None): if not straxen.utilix_is_configured(): return if context is None: context = straxen.contexts.xenonnt_simulation(cmt_run_id_sim='010000', cmt_version='global_ONLINE') assert isinstance(con...
true
true
f706196c0ccb92b556eae5fc3117c3060a88dde4
1,730
py
Python
classify.py
gajen105/video-servillance-analysis-sysytem
c79f9010aa7c2fe00297fb0370b0635603faf135
[ "MIT" ]
null
null
null
classify.py
gajen105/video-servillance-analysis-sysytem
c79f9010aa7c2fe00297fb0370b0635603faf135
[ "MIT" ]
null
null
null
classify.py
gajen105/video-servillance-analysis-sysytem
c79f9010aa7c2fe00297fb0370b0635603faf135
[ "MIT" ]
null
null
null
import glob import datetime import inference import numpy as np flist = [] def run_classifier(): flist = [] list1 = glob.glob("./images/*.jpg") list1.sort() print("Printing the time of Interesting Events.....\n\n") temp = str(inference.run_inference_on_image()) for i in r...
33.921569
111
0.483815
import glob import datetime import inference import numpy as np flist = [] def run_classifier(): flist = [] list1 = glob.glob("./images/*.jpg") list1.sort() print("Printing the time of Interesting Events.....\n\n") temp = str(inference.run_inference_on_image()) for i in r...
true
true
f706196f8938e963ed2643eb371c64c87e808477
9,942
py
Python
bottleCBV.py
deltaflyer/bottleCBV
6628bc31ce472a5e6398fa9dd9b2d3edccb98b84
[ "BSD-2-Clause" ]
null
null
null
bottleCBV.py
deltaflyer/bottleCBV
6628bc31ce472a5e6398fa9dd9b2d3edccb98b84
[ "BSD-2-Clause" ]
null
null
null
bottleCBV.py
deltaflyer/bottleCBV
6628bc31ce472a5e6398fa9dd9b2d3edccb98b84
[ "BSD-2-Clause" ]
null
null
null
import re import sys import inspect _py2 = sys.version_info[0] == 2 _py3 = sys.version_info[0] == 3 # noinspection PyPep8Naming class route(object): def __init__(self, rule, **options): """ Class Initializer - This will only execute if using BottleCBV's original route() style. """ ...
32.070968
117
0.565077
import re import sys import inspect _py2 = sys.version_info[0] == 2 _py3 = sys.version_info[0] == 3 class route(object): def __init__(self, rule, **options): if not options: options = dict(method='ANY') self.rule = rule self.options = options def __call__(self,...
true
true
f7061a8d7e970649e89a45494fde209c8fcc08c6
4,151
py
Python
diffutils/diff.py
restwzeasy/video_organizer_scripts
9f94794a8c625055f9e6f2f0ca030604ccf3f5e4
[ "Apache-2.0" ]
null
null
null
diffutils/diff.py
restwzeasy/video_organizer_scripts
9f94794a8c625055f9e6f2f0ca030604ccf3f5e4
[ "Apache-2.0" ]
null
null
null
diffutils/diff.py
restwzeasy/video_organizer_scripts
9f94794a8c625055f9e6f2f0ca030604ccf3f5e4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Logic for computing missing and duplicate files using Postgresql DB. # import os import fnmatch # from shutil import copy2 # from shutil import copyfile from dbutils import required as db MISSING_FROM_COMP_FOLDER = "missing_from_comp" MISSING_FROM_SRC_FOLDER = "missing_from_source" FILE_NAME_C...
45.615385
194
0.667309
import os import fnmatch from dbutils import required as db MISSING_FROM_COMP_FOLDER = "missing_from_comp" MISSING_FROM_SRC_FOLDER = "missing_from_source" FILE_NAME_COLUMN = "file" FILE_EXTENSIONS_TO_SKIP = ['.ini', '.db', '.info', '.pdfcp '] def handleDuplicates(conn): cur = conn.cursor try: ...
true
true
f7061aa1fbcf5019bdf65a6a62e5ffbf57e52458
1,400
py
Python
vsts/vsts/graph/v4_1/models/paged_graph_users.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/graph/v4_1/models/paged_graph_users.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
vsts/vsts/graph/v4_1/models/paged_graph_users.py
kenkuo/azure-devops-python-api
9e920bd25e938fa89ff7f60153e5b9e113ca839d
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
46.666667
162
0.575
from msrest.serialization import Model class PagedGraphUsers(Model): _attribute_map = { 'continuation_token': {'key': 'continuationToken', 'type': '[str]'}, 'graph_users': {'key': 'graphUsers', 'type': '[GraphUser]'} } def __init__(self, continuation_token=None, graph_users=None)...
true
true
f7061d34912d236341afe1491c4e202361a09c4d
2,409
py
Python
multitask-learning/cityscapestask/decoders.py
oscarkey/multitask-learning
c4503c044ca7a29bebd4e70e9e030524654e5d00
[ "MIT" ]
44
2019-11-25T01:09:49.000Z
2022-03-29T12:04:38.000Z
multitask-learning/cityscapestask/decoders.py
oscarkey/multitask-learning
c4503c044ca7a29bebd4e70e9e030524654e5d00
[ "MIT" ]
2
2020-02-16T17:26:47.000Z
2020-03-13T15:49:47.000Z
multitask-learning/cityscapestask/decoders.py
oscarkey/multitask-learning
c4503c044ca7a29bebd4e70e9e030524654e5d00
[ "MIT" ]
5
2020-03-09T21:11:49.000Z
2021-06-04T05:20:46.000Z
"""Decoder portion of the model.""" import torch import torch.nn.functional as F from torch import nn def _build_base_decoder(): """Builds the base decoder shared by all three decoder types.""" return nn.Sequential(nn.Conv2d(in_channels=1280, out_channels=256, kernel_size=(3, 3), stride=1, padding=1), ...
33.458333
112
0.624325
import torch import torch.nn.functional as F from torch import nn def _build_base_decoder(): return nn.Sequential(nn.Conv2d(in_channels=1280, out_channels=256, kernel_size=(3, 3), stride=1, padding=1), nn.BatchNorm2d(num_features=256), nn.ReLU()) class Decoders(nn.Module): def __i...
true
true
f7061e8e448f19db4b79bc0bbd1919c658ef6b7c
3,072
py
Python
Queue.py
nemesisBR/Multilevel-Queue-Scheduling
c139e4df31f6ea5e41d0a215b1fa6eff90d7daaa
[ "Apache-2.0" ]
null
null
null
Queue.py
nemesisBR/Multilevel-Queue-Scheduling
c139e4df31f6ea5e41d0a215b1fa6eff90d7daaa
[ "Apache-2.0" ]
null
null
null
Queue.py
nemesisBR/Multilevel-Queue-Scheduling
c139e4df31f6ea5e41d0a215b1fa6eff90d7daaa
[ "Apache-2.0" ]
null
null
null
class Queue: """ A class used to represent an Queue for for storing processes ... Attributes ---------- processList : list The list which would store the process currently in line for execution priority : str The type of process (Foreground,Background etc) Sch...
28.981132
98
0.556966
class Queue: def __init__(self,type): self.processList = [] self.priority = type self.SchedulingAlgo = None def size(self): return len(self.processList) def isEmpty(self): return self.size() == 0 def front(self): return se...
true
true
f7061ea583df9c0b9b86e3fa71dddfd466e63ae3
1,691
py
Python
src/decoder/decoder.py
PatrickPrakash/lipreading
6380508ba3ffad64fc01ce10a5f43e4da0f652fd
[ "MIT" ]
6
2020-09-09T23:56:14.000Z
2021-05-17T07:39:38.000Z
src/decoder/decoder.py
PatrickPrakash/lipreading
6380508ba3ffad64fc01ce10a5f43e4da0f652fd
[ "MIT" ]
4
2021-03-03T11:44:46.000Z
2021-08-23T07:40:30.000Z
src/decoder/decoder.py
PatrickPrakash/lipreading
6380508ba3ffad64fc01ce10a5f43e4da0f652fd
[ "MIT" ]
2
2021-04-01T08:18:10.000Z
2021-04-18T11:08:35.000Z
import numpy as np import editdistance class Decoder(): def __init__(self, vocab): self.vocab_list = [char for char in vocab] def predict(self, batch_size, logits, y, lengths, y_lengths, n_show=5): decoded = self.decode(logits, lengths) cursor = 0 gt = [] n = min(n_sh...
31.314815
93
0.579539
import numpy as np import editdistance class Decoder(): def __init__(self, vocab): self.vocab_list = [char for char in vocab] def predict(self, batch_size, logits, y, lengths, y_lengths, n_show=5): decoded = self.decode(logits, lengths) cursor = 0 gt = [] n = min(n_sh...
true
true
f7061f55f4a28a8f0484a0db2f3457b1d288f640
5,120
py
Python
tests/spellbook.py
surfer19/packit
39f4564ca48e39a936d8c890b03ecb922a62a11a
[ "MIT" ]
null
null
null
tests/spellbook.py
surfer19/packit
39f4564ca48e39a936d8c890b03ecb922a62a11a
[ "MIT" ]
null
null
null
tests/spellbook.py
surfer19/packit
39f4564ca48e39a936d8c890b03ecb922a62a11a
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2018-2019 Red Hat, Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, m...
34.594595
96
0.698242
import shutil import subprocess from pathlib import Path from click.testing import CliRunner from packit.cli.packit_base import packit_base from packit.config import Config from packit.utils import cwd, run_command TESTS_DIR = Path(__file__).parent DATA_DIR = TESTS_DIR / "data" UPSTREAM = DATA...
true
true
f70620bb1f5c1fbc24e7c0565115d4e788803b4e
2,709
py
Python
orders/models.py
garcia116/ecommerce-django
6c416b20446f0daba5774040715313ae28501cf9
[ "PostgreSQL" ]
null
null
null
orders/models.py
garcia116/ecommerce-django
6c416b20446f0daba5774040715313ae28501cf9
[ "PostgreSQL" ]
null
null
null
orders/models.py
garcia116/ecommerce-django
6c416b20446f0daba5774040715313ae28501cf9
[ "PostgreSQL" ]
null
null
null
from django.db import models from accounts.models import Account from store.models import Product, Variation # Create your models here. class Payment(models.Model): user = models.ForeignKey(Account, on_delete=models.CASCADE) payment_id = models.CharField(max_length=100) payment_method = models.CharField(m...
38.15493
90
0.727206
from django.db import models from accounts.models import Account from store.models import Product, Variation class Payment(models.Model): user = models.ForeignKey(Account, on_delete=models.CASCADE) payment_id = models.CharField(max_length=100) payment_method = models.CharField(max_length=100) amount_...
true
true
f706212a3c277558269064ef25bec2d7e49ac9ec
573
py
Python
backend/Clout9/celery.py
landdafku11/mobile-backend
3f3328afd81f85f90170a57689af72f8f705b8a3
[ "MIT" ]
null
null
null
backend/Clout9/celery.py
landdafku11/mobile-backend
3f3328afd81f85f90170a57689af72f8f705b8a3
[ "MIT" ]
null
null
null
backend/Clout9/celery.py
landdafku11/mobile-backend
3f3328afd81f85f90170a57689af72f8f705b8a3
[ "MIT" ]
null
null
null
from __future__ import absolute_import import os from celery import Celery from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Clout9.settings.production") app = Celery('Clout9') # Using a string here means the worker wil...
30.157895
77
0.78534
from __future__ import absolute_import import os from celery import Celery from django.conf import settings os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Clout9.settings.production") app = Celery('Clout9') app.config_from_object('django.conf:settings') @app.task(bind=True) def debug_task(self): print('Re...
true
true
f70621467fab8e1d22e5d59550b5a4137d4f315b
876
py
Python
chapter-7/blog/asgi.py
PacktPublishing/Real-time-Django
07480a089fc0880d752d4ee5740ae6587de93aee
[ "MIT" ]
null
null
null
chapter-7/blog/asgi.py
PacktPublishing/Real-time-Django
07480a089fc0880d752d4ee5740ae6587de93aee
[ "MIT" ]
null
null
null
chapter-7/blog/asgi.py
PacktPublishing/Real-time-Django
07480a089fc0880d752d4ee5740ae6587de93aee
[ "MIT" ]
null
null
null
# blog/asgi.py import os import django os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blog.settings") from django.conf import settings django.setup() from django.core.asgi import get_asgi_application from channels.security.websocket import OriginValidator from channels.auth import AuthMiddlewareStack from channels.r...
29.2
73
0.700913
import os import django os.environ.setdefault("DJANGO_SETTINGS_MODULE", "blog.settings") from django.conf import settings django.setup() from django.core.asgi import get_asgi_application from channels.security.websocket import OriginValidator from channels.auth import AuthMiddlewareStack from channels.routing import ...
true
true
f70621a35ffd5247cdc20090ec6e58e9b19c730c
284
py
Python
Ex 85.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
Ex 85.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
Ex 85.py
brunobendel/Exercicios-python-Pycharm
145ded6cb5533aeef1b89f0bce20f0a90e37216c
[ "MIT" ]
null
null
null
valor = 0 num = [[],[]] for c in range (0,7): valor = int(input(f'Digite o {c+1}° valor:')) if valor % 2 == 0: num[0].append(valor) else: num[1].append(valor) print('-='*30) print(f'Os numeros pares foram {num[0]}\nOs numeros ímpares foram {num[1]}.')
18.933333
77
0.545775
valor = 0 num = [[],[]] for c in range (0,7): valor = int(input(f'Digite o {c+1}° valor:')) if valor % 2 == 0: num[0].append(valor) else: num[1].append(valor) print('-='*30) print(f'Os numeros pares foram {num[0]}\nOs numeros ímpares foram {num[1]}.')
true
true
f70622f46e8557156d215966f8f5d50845b2482d
5,316
py
Python
node_modules/@ensdomains/dnsprovejs/docs/conf.py
anantaramdas/ddns-action
6cf4832f441e617908b4ae980ac8da05766e4245
[ "MIT" ]
null
null
null
node_modules/@ensdomains/dnsprovejs/docs/conf.py
anantaramdas/ddns-action
6cf4832f441e617908b4ae980ac8da05766e4245
[ "MIT" ]
null
null
null
node_modules/@ensdomains/dnsprovejs/docs/conf.py
anantaramdas/ddns-action
6cf4832f441e617908b4ae980ac8da05766e4245
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
30.204545
79
0.655192
project = 'dnsprovejs' copyright = '2018, Makoto Inoue' author = 'Makoto Inoue' version = '' release = '' extensions = ['sphinx_js', 'sphinx.ext.autodoc'] root_for_relative_js_paths = '../lib' js_source_path = ['../lib', '../lib/oracle', '../lib/dns'] primary_domain = 'js' templates...
true
true
f70623d04a953f9c608f06a3e97fc29b80626cba
5,650
py
Python
benchmarks/misc/membound.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
15
2020-01-29T19:07:19.000Z
2021-05-12T02:53:22.000Z
benchmarks/misc/membound.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
1
2020-02-08T02:11:58.000Z
2020-02-08T02:11:58.000Z
benchmarks/misc/membound.py
kxxt/taichi
15f39b79c258080f1e34fcbdc29646d9ced0a4fe
[ "MIT" ]
2
2020-01-31T20:10:35.000Z
2021-03-16T07:51:59.000Z
import os import time from membound_cases import memory_bound_cases_list from utils import (arch_name, datatime_with_format, dtype2str, dump2json, geometric_mean, md_table_header, scaled_repeat_times, size2str) import taichi as ti class MemoryBound: suite_name = 'memoryboun...
38.175676
81
0.578938
import os import time from membound_cases import memory_bound_cases_list from utils import (arch_name, datatime_with_format, dtype2str, dump2json, geometric_mean, md_table_header, scaled_repeat_times, size2str) import taichi as ti class MemoryBound: suite_name = 'memoryboun...
true
true
f706245900cc076c316732f0b5d3e8eaea28b692
1,909
py
Python
freenit/api/user.py
Veskor/backend-1
e7063da73fe39ad03dbd63edb512c1a7b5cc3809
[ "BSD-2-Clause" ]
1
2019-12-24T19:41:37.000Z
2019-12-24T19:41:37.000Z
freenit/api/user.py
cbarrettninja/freenit-backend
12d765214c0eb79abacb2cf2a5e5687c1e4365e8
[ "BSD-2-Clause" ]
null
null
null
freenit/api/user.py
cbarrettninja/freenit-backend
12d765214c0eb79abacb2cf2a5e5687c1e4365e8
[ "BSD-2-Clause" ]
null
null
null
from flask_security.utils import hash_password from flask_smorest import Blueprint, abort from ..models.user import User from ..schemas.paging import PageInSchema, paginate from ..schemas.user import UserPageOutSchema, UserSchema from .methodviews import ProtectedMethodView blueprint = Blueprint('users', 'user') @b...
30.301587
60
0.647459
from flask_security.utils import hash_password from flask_smorest import Blueprint, abort from ..models.user import User from ..schemas.paging import PageInSchema, paginate from ..schemas.user import UserPageOutSchema, UserSchema from .methodviews import ProtectedMethodView blueprint = Blueprint('users', 'user') @b...
true
true
f70624a43131fb5c8d69861a9f04112e2b1e1ec5
1,982
py
Python
Selection_sort.py
anantvikram/General_Code
8c5d1e97111be84edc029a77d257f87bdb615ee5
[ "MIT" ]
null
null
null
Selection_sort.py
anantvikram/General_Code
8c5d1e97111be84edc029a77d257f87bdb615ee5
[ "MIT" ]
null
null
null
Selection_sort.py
anantvikram/General_Code
8c5d1e97111be84edc029a77d257f87bdb615ee5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Fri Dec 22 18:44:02 2017 @author: Tirthajyoti Sarkar Simple selection sort with counter for total number of operations (finding minimum and swapping) Accepts user input on minimum and maximum bound of the array and the size of the array. """ import random def find_min(array): ...
34.77193
111
0.644803
import random def find_min(array): n=len(array) r = array[0] count=0 for i in range(1,n): count+=1 if r>array[i]: r=array[i] return(r,count) def selection_sort(array): n=len(array) num_op=0 for i in range(n): m,c_min=find_min(array[i:n...
true
true
f706251629adbf9ea80984700c7870d348561269
1,003
py
Python
xlsxwriter/test/comparison/test_hyperlink23.py
hugovk/XlsxWriter
e97cc66637d9895480ee32cfb5e561d652d3787b
[ "BSD-2-Clause" ]
null
null
null
xlsxwriter/test/comparison/test_hyperlink23.py
hugovk/XlsxWriter
e97cc66637d9895480ee32cfb5e561d652d3787b
[ "BSD-2-Clause" ]
null
null
null
xlsxwriter/test/comparison/test_hyperlink23.py
hugovk/XlsxWriter
e97cc66637d9895480ee32cfb5e561d652d3787b
[ "BSD-2-Clause" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # SPDX-License-Identifier: BSD-2-Clause # Copyright (c), 2013-2022, John McNamara, jmcnamara@cpan.org # from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompar...
26.394737
135
0.645065
true
true
f70625880e8c93bd1889d0674cd79c69a847e672
2,340
py
Python
src/util/match_tags.py
billhuang56/job-miner
472945be442b3ab5080a28bbcdc8e57653cd2af0
[ "MIT" ]
null
null
null
src/util/match_tags.py
billhuang56/job-miner
472945be442b3ab5080a28bbcdc8e57653cd2af0
[ "MIT" ]
null
null
null
src/util/match_tags.py
billhuang56/job-miner
472945be442b3ab5080a28bbcdc8e57653cd2af0
[ "MIT" ]
null
null
null
import boto3 import pickle import logging from datetime import date from pyspark.sql.functions import udf from pyspark.sql.types import ArrayType, StringType from generate_common_words import dump_pickle import config as conf ''' Assign Top 500 Stackoverflow tags to job postings ''' # ===== Logger Configs ===== TS = da...
32.5
99
0.67906
import boto3 import pickle import logging from datetime import date from pyspark.sql.functions import udf from pyspark.sql.types import ArrayType, StringType from generate_common_words import dump_pickle import config as conf TS = date.today().strftime('%y%m%d') logger = logging.getLogger('jd_logger') logger.setLevel(...
true
true
f7062614191aea318baf15492ba8710c185f1d76
398
py
Python
simplerest/wsgi.py
dunnock/simplerest
aecf9ff97a4d5c075f5ce95a2da8900793d73f37
[ "MIT" ]
null
null
null
simplerest/wsgi.py
dunnock/simplerest
aecf9ff97a4d5c075f5ce95a2da8900793d73f37
[ "MIT" ]
null
null
null
simplerest/wsgi.py
dunnock/simplerest
aecf9ff97a4d5c075f5ce95a2da8900793d73f37
[ "MIT" ]
null
null
null
""" WSGI config for simplerest project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
23.411765
78
0.788945
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "simplerest.settings") application = get_wsgi_application()
true
true
f706268a2eb5993c2788bc2e86f7c473ce41d33f
1,852
py
Python
pom_tracker/views/export_poms.py
YorBoyBlue/PomTracker
8de73a21fc910e8796ee2666d2f47a17f8f93def
[ "Apache-2.0" ]
null
null
null
pom_tracker/views/export_poms.py
YorBoyBlue/PomTracker
8de73a21fc910e8796ee2666d2f47a17f8f93def
[ "Apache-2.0" ]
null
null
null
pom_tracker/views/export_poms.py
YorBoyBlue/PomTracker
8de73a21fc910e8796ee2666d2f47a17f8f93def
[ "Apache-2.0" ]
null
null
null
import json import os from mako.template import Template from models.pomodoro_model import PomodoroModel from datetime import datetime class ExportPomsResource: def on_get(self, req, resp): """Handles GET requests""" resp.content_type = 'text/html' dir_path = os.path.dirname(os.path.real...
34.943396
71
0.583153
import json import os from mako.template import Template from models.pomodoro_model import PomodoroModel from datetime import datetime class ExportPomsResource: def on_get(self, req, resp): resp.content_type = 'text/html' dir_path = os.path.dirname(os.path.realpath(__file__)) user_login_...
true
true
f706278d4ad701dd1b2914e8ac7dcf2e2fdf786e
3,634
py
Python
code/convert_game.py
bws0013/retrosheet-to-sql
a6219281f3e5dab9bf9bc9e742ccf133002e758d
[ "Apache-2.0" ]
null
null
null
code/convert_game.py
bws0013/retrosheet-to-sql
a6219281f3e5dab9bf9bc9e742ccf133002e758d
[ "Apache-2.0" ]
null
null
null
code/convert_game.py
bws0013/retrosheet-to-sql
a6219281f3e5dab9bf9bc9e742ccf133002e758d
[ "Apache-2.0" ]
null
null
null
import csv import json def read_data_file(filename): all_records = [] with open(filename, mode='r') as csv_file: csv_reader = csv.reader(csv_file) row_count = 0 for row in csv_reader: all_records.append(row) return all_records def parse_play_fields(play_fields): pla...
25.957143
77
0.548431
import csv import json def read_data_file(filename): all_records = [] with open(filename, mode='r') as csv_file: csv_reader = csv.reader(csv_file) row_count = 0 for row in csv_reader: all_records.append(row) return all_records def parse_play_fields(play_fields): pla...
true
true
f70627ba6ce4ce8b453aaf72d8c2afb1dbfc110d
8,589
py
Python
src/android/toga_android/widgets/detailedlist.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
3
2017-10-05T10:25:51.000Z
2021-07-09T09:34:00.000Z
src/android/toga_android/widgets/detailedlist.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
1
2017-11-18T02:53:35.000Z
2017-11-18T03:38:31.000Z
src/android/toga_android/widgets/detailedlist.py
luizoti/toga
3c49e685f325f1aba2ce048b253402d7e4519f97
[ "BSD-3-Clause" ]
null
null
null
from rubicon.java.android_events import Handler, PythonRunnable from rubicon.java.jni import java from travertino.size import at_least from ..libs.android import R__color from ..libs.android.graphics import BitmapFactory, Rect from ..libs.android.view import Gravity, OnClickListener, View__MeasureSpec from ..libs.andr...
40.323944
117
0.692048
from rubicon.java.android_events import Handler, PythonRunnable from rubicon.java.jni import java from travertino.size import at_least from ..libs.android import R__color from ..libs.android.graphics import BitmapFactory, Rect from ..libs.android.view import Gravity, OnClickListener, View__MeasureSpec from ..libs.andr...
true
true
f706288a231083cbe786ab30ed1d68ce39db9b47
1,830
py
Python
invenio_records_marc21/services/permissions.py
philippgualdi/invenio-records-marc21
6a4d17692649d8256ec8c9671d023e1065ce6063
[ "MIT" ]
1
2022-03-15T13:32:12.000Z
2022-03-15T13:32:12.000Z
invenio_records_marc21/services/permissions.py
philippgualdi/invenio-records-marc21
6a4d17692649d8256ec8c9671d023e1065ce6063
[ "MIT" ]
null
null
null
invenio_records_marc21/services/permissions.py
philippgualdi/invenio-records-marc21
6a4d17692649d8256ec8c9671d023e1065ce6063
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Invenio. # # Copyright (C) 2021 Graz University of Technology. # # Invenio-Records-Marc21 is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see LICENSE file for more # details. """Permissions for Invenio Marc21 Records.""" ...
33.272727
79
0.711475
from invenio_records_permissions.generators import AnyUser, SystemProcess from invenio_records_permissions.policies.records import RecordPermissionPolicy class Marc21RecordPermissionPolicy(RecordPermissionPolicy): can_create = [AnyUser()] can_update_files = [AnyUser()] can_publish = [AnyU...
true
true
f70628a2775d6cde3016b032cd7b3fb1c400265a
810
py
Python
manage.py
raq929/animal-rescue
02709701f911ae2d8863e7f066b8fb437b70bde9
[ "MIT" ]
null
null
null
manage.py
raq929/animal-rescue
02709701f911ae2d8863e7f066b8fb437b70bde9
[ "MIT" ]
null
null
null
manage.py
raq929/animal-rescue
02709701f911ae2d8863e7f066b8fb437b70bde9
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "animalRescue.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that...
35.217391
77
0.644444
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "animalRescue.settings") try: from django.core.management import execute_from_command_line except ImportError: try: import django except ImportErro...
true
true
f7062a5932aada0aad00589401f16991d8909b96
8,731
py
Python
execution_trace/record.py
yoyonel/python-execution-trace
c67d348ce98a85355cc042a213da8ab29e318664
[ "MIT" ]
null
null
null
execution_trace/record.py
yoyonel/python-execution-trace
c67d348ce98a85355cc042a213da8ab29e318664
[ "MIT" ]
null
null
null
execution_trace/record.py
yoyonel/python-execution-trace
c67d348ce98a85355cc042a213da8ab29e318664
[ "MIT" ]
null
null
null
import ast import inspect import json import logging import os import sys import tempfile from functools import wraps from collections import deque from execution_trace.constants import RECORD_FN_NAME, RETVAL_NAME, MANGLED_FN_NAME from execution_trace.utils import strip_indent # Init logging. logging.basicConfig() lo...
32.94717
108
0.641278
import ast import inspect import json import logging import os import sys import tempfile from functools import wraps from collections import deque from execution_trace.constants import RECORD_FN_NAME, RETVAL_NAME, MANGLED_FN_NAME from execution_trace.utils import strip_indent logging.basicConfig() logger = logging....
false
true
f7062aded80a6635855c5cc68eb6f354e08795da
1,361
py
Python
Python/simple-web-server.py
babebeebaboo/Practicum_SmartBedRoom
ee7fc152851b0df7ec491351fcbf4b31e822523e
[ "MIT" ]
null
null
null
Python/simple-web-server.py
babebeebaboo/Practicum_SmartBedRoom
ee7fc152851b0df7ec491351fcbf4b31e822523e
[ "MIT" ]
null
null
null
Python/simple-web-server.py
babebeebaboo/Practicum_SmartBedRoom
ee7fc152851b0df7ec491351fcbf4b31e822523e
[ "MIT" ]
null
null
null
import http.server import threading import testPackage class MyHTTPRequestHandler(http.server.BaseHTTPRequestHandler): def _set_headers(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() def do_GET(self): self._set_headers() ...
31.651163
89
0.671565
import http.server import threading import testPackage class MyHTTPRequestHandler(http.server.BaseHTTPRequestHandler): def _set_headers(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() def do_GET(self): self._set_headers() ...
true
true
f7062bce3b55defc7f8114903eb38c8b40ae863c
380
py
Python
app/__main__.py
vitaliy-ukiru/math-bot
72c116b4f5a4aa6a5f8eaae67ecbbf3df821f9e9
[ "MIT" ]
1
2021-12-11T07:41:38.000Z
2021-12-11T07:41:38.000Z
app/__main__.py
vitaliy-ukiru/math-bot
72c116b4f5a4aa6a5f8eaae67ecbbf3df821f9e9
[ "MIT" ]
8
2021-05-08T21:48:34.000Z
2022-01-20T15:42:00.000Z
app/__main__.py
vitaliy-ukiru/math-bot
72c116b4f5a4aa6a5f8eaae67ecbbf3df821f9e9
[ "MIT" ]
null
null
null
import sys from datetime import datetime from app import filters from app.misc.execute import run def main(args: list[str]): from app.handlers import dp # Сохраняем нынешнее время для подсчёта времени безотказной работы dp.bot['start_time'] = datetime.now() dp['args'] = args run(dp) if __name_...
19
70
0.692105
import sys from datetime import datetime from app import filters from app.misc.execute import run def main(args: list[str]): from app.handlers import dp dp.bot['start_time'] = datetime.now() dp['args'] = args run(dp) if __name__ == '__main__': filters.setup() main(sys.argv[1:])
true
true
f7062bec006652094e432ba541af287898016ea8
2,071
py
Python
camera.py
EliteArrow/Web-Cam-Recorder
ccbf66e8c20c7de042d8e3560b6f70ea038ef5d2
[ "MIT" ]
1
2021-01-07T18:26:43.000Z
2021-01-07T18:26:43.000Z
camera.py
VincentK16/web-camera-recorder
6cc738220b6034774c9e9cca7ab82e3fc8fd0142
[ "MIT" ]
null
null
null
camera.py
VincentK16/web-camera-recorder
6cc738220b6034774c9e9cca7ab82e3fc8fd0142
[ "MIT" ]
null
null
null
import cv2 import threading class RecordingThread (threading.Thread): def __init__(self, name, camera): threading.Thread.__init__(self) self.name = name self.isRunning = True self.cap = camera fourcc = cv2.VideoWriter_fourcc(*'MJPG') self.out = cv2.VideoWriter('./st...
26.21519
94
0.522936
import cv2 import threading class RecordingThread (threading.Thread): def __init__(self, name, camera): threading.Thread.__init__(self) self.name = name self.isRunning = True self.cap = camera fourcc = cv2.VideoWriter_fourcc(*'MJPG') self.out = cv2.VideoWriter('./st...
true
true
f7062bf844f50249bacf44df24849dd3919c8562
10,289
py
Python
lib/requests/packages/urllib3/connection.py
All4Gis/instagram2qgis
cf74a6308db3679e92ebc30c48b434bc276fadb3
[ "FSFAP" ]
19
2016-03-23T21:13:53.000Z
2021-05-28T10:11:54.000Z
lib/requests/packages/urllib3/connection.py
All4Gis/instagram2qgis
cf74a6308db3679e92ebc30c48b434bc276fadb3
[ "FSFAP" ]
2
2016-04-09T19:46:47.000Z
2021-04-19T14:36:23.000Z
lib/requests/packages/urllib3/connection.py
All4Gis/instagram2qgis
cf74a6308db3679e92ebc30c48b434bc276fadb3
[ "FSFAP" ]
2
2018-03-03T12:55:24.000Z
2019-09-15T10:59:41.000Z
from __future__ import absolute_import import datetime import os from socket import error as SocketError, timeout as SocketTimeout import socket import sys import warnings from .exceptions import ( NewConnectionError, ConnectTimeoutError, SubjectAltNameWarning, SystemTimeWarning, ) from .packages impo...
35.236301
99
0.637088
from __future__ import absolute_import import datetime import os from socket import error as SocketError, timeout as SocketTimeout import socket import sys import warnings from .exceptions import ( NewConnectionError, ConnectTimeoutError, SubjectAltNameWarning, SystemTimeWarning, ) from .packages impo...
true
true
f7062c5ad5a28d268213498e9a5e9b653325178f
3,020
py
Python
wigs-validation-linux/pre_wigs_validation/repo_access.py
therin/aws-managed-services
8950d6ed902c1007427a7e5adc0b7b5c89bb2531
[ "Apache-2.0" ]
null
null
null
wigs-validation-linux/pre_wigs_validation/repo_access.py
therin/aws-managed-services
8950d6ed902c1007427a7e5adc0b7b5c89bb2531
[ "Apache-2.0" ]
null
null
null
wigs-validation-linux/pre_wigs_validation/repo_access.py
therin/aws-managed-services
8950d6ed902c1007427a7e5adc0b7b5c89bb2531
[ "Apache-2.0" ]
null
null
null
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import shutil import subprocess from pre_wigs_validation.enums import ValidationEnforcement, ValidationResult from pre_wigs_validation.instance import ValidationInstance from pre_wigs_validation.dataclasses impo...
34.318182
82
0.62649
import shutil import subprocess from pre_wigs_validation.enums import ValidationEnforcement, ValidationResult from pre_wigs_validation.instance import ValidationInstance from pre_wigs_validation.dataclasses import ValidationOutput from pre_wigs_validation.utils import check_validation_config, get_ld_library_orig c...
true
true
f7062ce393fb18fee886c17b11d5eaf870198805
25
py
Python
test/fixtures/a.py
chintown/codeplay
7a1624ba6f8a927fcda2b3165abc51d035045ff8
[ "MIT" ]
null
null
null
test/fixtures/a.py
chintown/codeplay
7a1624ba6f8a927fcda2b3165abc51d035045ff8
[ "MIT" ]
null
null
null
test/fixtures/a.py
chintown/codeplay
7a1624ba6f8a927fcda2b3165abc51d035045ff8
[ "MIT" ]
null
null
null
print 'a.py is executed'
12.5
24
0.72
print 'a.py is executed'
false
true
f7062cf857e35ec488d5c372f50de79c582064b6
4,037
py
Python
pydeeprecsys/rl/agents/rainbow.py
luksfarris/pydeeprecsys
0409ca220a235bb65ccf72d9077aaecf108722bb
[ "MIT" ]
2
2021-06-21T06:38:38.000Z
2021-12-16T10:26:43.000Z
pydeeprecsys/rl/agents/rainbow.py
luksfarris/pydeeprecsys
0409ca220a235bb65ccf72d9077aaecf108722bb
[ "MIT" ]
6
2021-05-10T21:23:12.000Z
2021-06-03T19:46:39.000Z
pydeeprecsys/rl/agents/rainbow.py
luksfarris/pydeeprecsys
0409ca220a235bb65ccf72d9077aaecf108722bb
[ "MIT" ]
1
2021-12-20T16:54:28.000Z
2021-12-20T16:54:28.000Z
from numpy.random import RandomState from typing import Any, Optional, List from numpy import arange from copy import deepcopy from pydeeprecsys.rl.neural_networks.dueling import DuelingDDQN from pydeeprecsys.rl.experience_replay.priority_replay_buffer import ( PrioritizedExperienceReplayBuffer, ) from pydeeprecsys...
39.578431
86
0.672281
from numpy.random import RandomState from typing import Any, Optional, List from numpy import arange from copy import deepcopy from pydeeprecsys.rl.neural_networks.dueling import DuelingDDQN from pydeeprecsys.rl.experience_replay.priority_replay_buffer import ( PrioritizedExperienceReplayBuffer, ) from pydeeprecsys...
true
true
f7062e562abc33c0c952b28947ef3cdfb48e0393
5,940
py
Python
grad-cam_5category.py
MuAuan/cheating_DL
e8c543d83c304ca072b479cf34fe0a07b58ec6e3
[ "MIT" ]
2
2019-07-20T10:50:47.000Z
2020-03-09T08:07:12.000Z
grad-cam_5category.py
MuAuan/cheating_DL
e8c543d83c304ca072b479cf34fe0a07b58ec6e3
[ "MIT" ]
null
null
null
grad-cam_5category.py
MuAuan/cheating_DL
e8c543d83c304ca072b479cf34fe0a07b58ec6e3
[ "MIT" ]
2
2019-07-20T10:59:43.000Z
2020-12-28T05:10:33.000Z
#grad_cam #[keras-grad-cam/grad-cam.py](https://github.com/jacobgil/keras-grad-cam/blob/master/grad-cam.py) from keras.applications.vgg16 import (VGG16, preprocess_input, decode_predictions) from keras.models import Model from keras.preprocessing import image from keras.layers.core import Lambda from keras.models impo...
37.358491
123
0.685522
from keras.applications.vgg16 import (VGG16, preprocess_input, decode_predictions) from keras.models import Model from keras.preprocessing import image from keras.layers.core import Lambda from keras.models import Sequential from tensorflow.python.framework import ops import keras.backend as K import tensorflow as t...
true
true
f7062e97122adf278b2ee489fee616f89c2c3ed3
3,130
py
Python
utils/tex_file_writing.py
xfbs/manim
83d0aa57f994793f6286aec7c8f22adaacc6770f
[ "MIT" ]
null
null
null
utils/tex_file_writing.py
xfbs/manim
83d0aa57f994793f6286aec7c8f22adaacc6770f
[ "MIT" ]
null
null
null
utils/tex_file_writing.py
xfbs/manim
83d0aa57f994793f6286aec7c8f22adaacc6770f
[ "MIT" ]
null
null
null
import os import hashlib from constants import TEX_DIR from constants import TEX_TEXT_TO_REPLACE from constants import TEX_USE_CTEX from constants import TEX_FIX_SVG def tex_hash(expression, template_tex_file_body): id_str = str(expression + template_tex_file_body) hasher = hashlib.sha256() hasher.updat...
27.946429
77
0.556869
import os import hashlib from constants import TEX_DIR from constants import TEX_TEXT_TO_REPLACE from constants import TEX_USE_CTEX from constants import TEX_FIX_SVG def tex_hash(expression, template_tex_file_body): id_str = str(expression + template_tex_file_body) hasher = hashlib.sha256() hasher.updat...
true
true
f7062fe4bf76b1aa71c448dfb0c4e42c9c04222c
3,384
py
Python
hypha/apply/users/tests/test_forms.py
OpenTechFund/opentech.fund
701b17f36ea27f891cd7e8a6743007302a52f34d
[ "BSD-3-Clause" ]
14
2018-10-05T14:34:21.000Z
2020-01-17T17:45:44.000Z
hypha/apply/users/tests/test_forms.py
OpenTechFund/WebApp
d6e2bb21a39d1fa7566cb60fe19f372dabfa5f0f
[ "BSD-3-Clause" ]
1,098
2017-12-15T11:23:03.000Z
2020-01-24T07:58:07.000Z
hypha/apply/users/tests/test_forms.py
OpenTechFund/WebApp
d6e2bb21a39d1fa7566cb60fe19f372dabfa5f0f
[ "BSD-3-Clause" ]
7
2018-01-09T10:13:06.000Z
2019-08-12T16:38:59.000Z
from django.forms.models import model_to_dict from django.test import TestCase from ..forms import EmailChangePasswordForm, ProfileForm from .factories import StaffFactory, UserFactory class BaseTestProfileForm(TestCase): def form_data(self, user, **values): fields = ProfileForm.Meta.fields data ...
31.626168
90
0.681738
from django.forms.models import model_to_dict from django.test import TestCase from ..forms import EmailChangePasswordForm, ProfileForm from .factories import StaffFactory, UserFactory class BaseTestProfileForm(TestCase): def form_data(self, user, **values): fields = ProfileForm.Meta.fields data ...
true
true
f70630c896da4674f42d33645d2791bd38f3c82f
308
py
Python
getRssTickerValues.py
shakedown1979/xbrlparser
9a0cf70b98dbd63f4d5aa81070dc701f9987ad8d
[ "Apache-2.0" ]
1
2020-08-02T13:36:38.000Z
2020-08-02T13:36:38.000Z
getRssTickerValues.py
shakedown1979/xbrlparser
9a0cf70b98dbd63f4d5aa81070dc701f9987ad8d
[ "Apache-2.0" ]
null
null
null
getRssTickerValues.py
shakedown1979/xbrlparser
9a0cf70b98dbd63f4d5aa81070dc701f9987ad8d
[ "Apache-2.0" ]
null
null
null
from daoRefactor2 import DAO from rssTickerInfo import rssTickerInfo import json import boto3 table = 'CompanyRSSFeed' dao = DAO(table) def main(): tickerValues = dao.getRssTickerValues('UNP') print(tickerValues) if __name__ == "__main__": # calling main function main()
18.117647
46
0.691558
from daoRefactor2 import DAO from rssTickerInfo import rssTickerInfo import json import boto3 table = 'CompanyRSSFeed' dao = DAO(table) def main(): tickerValues = dao.getRssTickerValues('UNP') print(tickerValues) if __name__ == "__main__": main()
true
true
f70630cda102862e51f6cc74baafa0df63c24f48
2,556
py
Python
utils/test/testapi/opnfv_testapi/resources/project_models.py
hwoarang/releng
fc8cb9f1bc3a37039d19ae7a5a17699d8a36bfb8
[ "Apache-2.0" ]
null
null
null
utils/test/testapi/opnfv_testapi/resources/project_models.py
hwoarang/releng
fc8cb9f1bc3a37039d19ae7a5a17699d8a36bfb8
[ "Apache-2.0" ]
null
null
null
utils/test/testapi/opnfv_testapi/resources/project_models.py
hwoarang/releng
fc8cb9f1bc3a37039d19ae7a5a17699d8a36bfb8
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright (c) 2015 Orange # guyrodrigue.koffi@orange.com / koffirodrigue@gmail.com # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompani...
26.905263
78
0.563772
true
true
f7063241fceacc3d672b277a8a48dbd07c4d9f3d
10,379
py
Python
python/dgl/sampling/randomwalks.py
marwage/dgl
15e3ff878c3d8927b6f6fac702e4f74eaee7607a
[ "Apache-2.0" ]
null
null
null
python/dgl/sampling/randomwalks.py
marwage/dgl
15e3ff878c3d8927b6f6fac702e4f74eaee7607a
[ "Apache-2.0" ]
null
null
null
python/dgl/sampling/randomwalks.py
marwage/dgl
15e3ff878c3d8927b6f6fac702e4f74eaee7607a
[ "Apache-2.0" ]
null
null
null
"""Random walk routines """ from .._ffi.function import _init_api from .. import backend as F from ..base import DGLError from .. import ndarray as nd from .. import utils __all__ = [ 'random_walk', 'pack_traces'] def random_walk(g, nodes, *, metapath=None, length=None, prob=None, restart_prob=None): """...
39.018797
95
0.582137
from .._ffi.function import _init_api from .. import backend as F from ..base import DGLError from .. import ndarray as nd from .. import utils __all__ = [ 'random_walk', 'pack_traces'] def random_walk(g, nodes, *, metapath=None, length=None, prob=None, restart_prob=None): assert g.device == F.cpu(), "Gr...
true
true
f706325e5c227c033d4565561ec304b5bb74a652
8,144
py
Python
gui/sfbrowser/sfbrowser.py
tjd2002/spikeforest2
2e393564b858b2995aa2ccccd9bd73065681b5de
[ "Apache-2.0" ]
null
null
null
gui/sfbrowser/sfbrowser.py
tjd2002/spikeforest2
2e393564b858b2995aa2ccccd9bd73065681b5de
[ "Apache-2.0" ]
null
null
null
gui/sfbrowser/sfbrowser.py
tjd2002/spikeforest2
2e393564b858b2995aa2ccccd9bd73065681b5de
[ "Apache-2.0" ]
null
null
null
import vdomr as vd import spikeforest as sf from cairio import client as ca import pandas as pd import numpy as np from matplotlib import pyplot as plt class AccuracyPlot(vd.components.Pyplot): def __init__(self, snrs, accuracies): vd.components.Pyplot.__init__(self) self._snrs = snrs self...
33.792531
92
0.55943
import vdomr as vd import spikeforest as sf from cairio import client as ca import pandas as pd import numpy as np from matplotlib import pyplot as plt class AccuracyPlot(vd.components.Pyplot): def __init__(self, snrs, accuracies): vd.components.Pyplot.__init__(self) self._snrs = snrs self...
true
true
f70632d577f832b7d6e2f73ef47712b1f5e53764
10,594
py
Python
tests/test_item.py
HEndo12345/scrapy
647cba0f106211e72a8d3e028b25c2f46859c406
[ "BSD-3-Clause" ]
1
2020-02-25T08:30:13.000Z
2020-02-25T08:30:13.000Z
tests/test_item.py
youyangxyb/scrapy
caa1dea890e9cb2024cf9895efe54b3cf0ac1ae9
[ "BSD-3-Clause" ]
1
2021-07-24T14:26:22.000Z
2021-07-24T14:26:22.000Z
tests/test_item.py
youyangxyb/scrapy
caa1dea890e9cb2024cf9895efe54b3cf0ac1ae9
[ "BSD-3-Clause" ]
1
2021-02-14T06:01:07.000Z
2021-02-14T06:01:07.000Z
import sys import unittest from unittest import mock from warnings import catch_warnings from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.item import ABCMeta, DictItem, Field, Item, ItemMeta PY36_PLUS = (sys.version_info.major >= 3) and (sys.version_info.minor >= 6) class ItemTest(unittest.TestCa...
31.436202
129
0.552105
import sys import unittest from unittest import mock from warnings import catch_warnings from scrapy.exceptions import ScrapyDeprecationWarning from scrapy.item import ABCMeta, DictItem, Field, Item, ItemMeta PY36_PLUS = (sys.version_info.major >= 3) and (sys.version_info.minor >= 6) class ItemTest(unittest.TestCa...
true
true
f70633ae3f7c948aede23363d145fc0d8f98bf9e
12,156
py
Python
src/m3_captial_t_class.py
chenx15rose/10-MoreImplementingClasses
2bce636c73e968111c22bc245d90a596276d4679
[ "MIT" ]
null
null
null
src/m3_captial_t_class.py
chenx15rose/10-MoreImplementingClasses
2bce636c73e968111c22bc245d90a596276d4679
[ "MIT" ]
null
null
null
src/m3_captial_t_class.py
chenx15rose/10-MoreImplementingClasses
2bce636c73e968111c22bc245d90a596276d4679
[ "MIT" ]
null
null
null
""" A CapitalT class and methods that use the Cross class. Authors: David Mutchler, Vibha Alangar, Dave Fisher, Amanda Stouder, their colleagues and Xiaolong Chen (Harry). """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. import rosegraphics as rg import math def main(): """ Calls the test funct...
39.086817
127
0.553472
import rosegraphics as rg import math def main(): print('Un-comment the calls in MAIN one by one') print(' to run the testing code as you complete the TODOs.') run_test_simple_t() run_test_set_colors() run_test_move_by() run_test_clone() def run_test_simple_t(): print() ...
true
true
f7063420859c100142a480d29d870e1138297717
11,650
py
Python
cryptobt/cryptofeed.py
webclinic017/cryptobt
9273f92ae92d7174b09f70a5b318ab5f18674dc1
[ "MIT" ]
null
null
null
cryptobt/cryptofeed.py
webclinic017/cryptobt
9273f92ae92d7174b09f70a5b318ab5f18674dc1
[ "MIT" ]
null
null
null
cryptobt/cryptofeed.py
webclinic017/cryptobt
9273f92ae92d7174b09f70a5b318ab5f18674dc1
[ "MIT" ]
null
null
null
import time from collections import deque from datetime import datetime import backtrader as bt from backtrader.feed import DataBase from backtrader.utils.py3 import with_metaclass from .cryptostore import CryptoStore class MetaCryptoFeed(DataBase.__class__): def __init__(cls, name, bases, dct): '''Clas...
40.451389
118
0.519056
import time from collections import deque from datetime import datetime import backtrader as bt from backtrader.feed import DataBase from backtrader.utils.py3 import with_metaclass from .cryptostore import CryptoStore class MetaCryptoFeed(DataBase.__class__): def __init__(cls, name, bases, dct): ...
true
true
f7063425b4b7aa047a8d686fd6626f3ba6a840ce
7,391
py
Python
code/plots/plots_exploratory.py
mspp-data-studio-2021/aptitude-analysis
90a7fc8655650f8166d530d325b963b93a42f311
[ "MIT" ]
null
null
null
code/plots/plots_exploratory.py
mspp-data-studio-2021/aptitude-analysis
90a7fc8655650f8166d530d325b963b93a42f311
[ "MIT" ]
null
null
null
code/plots/plots_exploratory.py
mspp-data-studio-2021/aptitude-analysis
90a7fc8655650f8166d530d325b963b93a42f311
[ "MIT" ]
null
null
null
"""This script creates some informative graphs on subgroups of income quartile, gender, and race.""" # %% import os import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path # %% # Set up folder path code_folder = Path(os.path.abspath('')) print(code_folder) project_dir = os.path.dirname(code_fol...
26.491039
100
0.648762
import os import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path code_folder = Path(os.path.abspath('')) print(code_folder) project_dir = os.path.dirname(code_folder) os.chdir(project_dir) print(project_dir) from setup_fin_dataset import get_dataset os.chdir(code_folder) print(code_fo...
true
true
f706353cd599188cc790e25133c3ce001da5bb16
1,041
py
Python
tests/test_eventlog.py
blink1073/telemetry
ede6d17312cd57fe1441dc1222280834ca3d6f03
[ "BSD-3-Clause" ]
null
null
null
tests/test_eventlog.py
blink1073/telemetry
ede6d17312cd57fe1441dc1222280834ca3d6f03
[ "BSD-3-Clause" ]
1
2020-08-26T10:56:58.000Z
2020-08-26T11:09:03.000Z
tests/test_eventlog.py
suryag10/telemetry
341f34421d73f11ec5538da8b04a52eb632f7511
[ "BSD-3-Clause" ]
1
2020-08-18T15:02:13.000Z
2020-08-18T15:02:13.000Z
import pytest import logging from traitlets.config.loader import PyFileConfigLoader from traitlets import TraitError from jupyter_telemetry.eventlog import EventLog GOOD_CONFIG = """ import logging c.EventLog.handlers = [ logging.StreamHandler() ] """ BAD_CONFIG = """ import logging c.EventLog.handlers = [ ...
19.641509
57
0.717579
import pytest import logging from traitlets.config.loader import PyFileConfigLoader from traitlets import TraitError from jupyter_telemetry.eventlog import EventLog GOOD_CONFIG = """ import logging c.EventLog.handlers = [ logging.StreamHandler() ] """ BAD_CONFIG = """ import logging c.EventLog.handlers = [ ...
true
true