hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f75c96749158ef4b67444c66c5809c6c1ddfd995
4,733
py
Python
packages/python/yap_kernel/yap_ipython/utils/tests/test_wildcard.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
90
2015-03-09T01:24:15.000Z
2022-02-24T13:56:25.000Z
packages/python/yap_kernel/yap_ipython/utils/tests/test_wildcard.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
52
2016-02-14T08:59:37.000Z
2022-03-14T16:39:35.000Z
packages/python/yap_kernel/yap_ipython/utils/tests/test_wildcard.py
ryandesign/yap
9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214
[ "Artistic-1.0-Perl", "ClArtistic" ]
27
2015-11-19T02:45:49.000Z
2021-11-25T19:47:58.000Z
"""Some tests for the wildcard utilities.""" #----------------------------------------------------------------------------- # Library imports #----------------------------------------------------------------------------- # Stdlib import unittest # Our own from yap_ipython.utils import wildcard #---------------------...
32.868056
81
0.430805
import unittest from yap_ipython.utils import wildcard class obj_t(object): pass root = obj_t() l = ["arna","abel","ABEL","active","bob","bark","abbot"] q = ["kate","loop","arne","vito","lucifer","koppel"] for x in l: o = obj_t() setattr(root,x,o) for y in q: p = obj_t() setattr(o,y...
true
true
f75c97cf5a4c1f72ee1cb4773d15a583ada398e7
53,551
py
Python
ironic/drivers/modules/deploy_utils.py
ljmcgann/ironic
09f79416e2820cf0fcef001c4c956b7732b7e7ca
[ "Apache-2.0" ]
null
null
null
ironic/drivers/modules/deploy_utils.py
ljmcgann/ironic
09f79416e2820cf0fcef001c4c956b7732b7e7ca
[ "Apache-2.0" ]
null
null
null
ironic/drivers/modules/deploy_utils.py
ljmcgann/ironic
09f79416e2820cf0fcef001c4c956b7732b7e7ca
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2012 NTT DOCOMO, INC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
40.476946
79
0.68249
import os import re import time from ironic_lib import metrics_utils from ironic_lib import utils as il_utils from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import fileutils from oslo_utils import strutils from ironic.common import exception from ironic.common import faults from...
true
true
f75c989aae79844546fa5dd0441030960f176288
3,435
py
Python
mmdet/models/detectors/rotated/roi_transformer.py
liuyanyi/mmdetection
d2003536af6f08cb9bd7a75e0444eef03ace4bb3
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/rotated/roi_transformer.py
liuyanyi/mmdetection
d2003536af6f08cb9bd7a75e0444eef03ace4bb3
[ "Apache-2.0" ]
null
null
null
mmdet/models/detectors/rotated/roi_transformer.py
liuyanyi/mmdetection
d2003536af6f08cb9bd7a75e0444eef03ace4bb3
[ "Apache-2.0" ]
null
null
null
from .two_stage import TwoStageDetectorRbbox from ...builder import DETECTORS @DETECTORS.register_module() class RoITransformer(TwoStageDetectorRbbox): def __init__(self, backbone, neck=None, rpn_head=None, roi_head=None, train_...
38.166667
78
0.485298
from .two_stage import TwoStageDetectorRbbox from ...builder import DETECTORS @DETECTORS.register_module() class RoITransformer(TwoStageDetectorRbbox): def __init__(self, backbone, neck=None, rpn_head=None, roi_head=None, train_...
true
true
f75c992a1ac89f2a85b4bf4e736d67c131b0d43f
1,252
py
Python
v2c/dir.py
hidakanoko/vm2container
b6e657a540b20dac85dd79ef44e5d81c857c507e
[ "Apache-2.0" ]
1
2021-11-15T08:43:19.000Z
2021-11-15T08:43:19.000Z
v2c/dir.py
hidakanoko/vm2container
b6e657a540b20dac85dd79ef44e5d81c857c507e
[ "Apache-2.0" ]
5
2019-01-12T04:40:09.000Z
2019-02-09T03:33:00.000Z
v2c/dir.py
hidakanoko/vm2container
b6e657a540b20dac85dd79ef44e5d81c857c507e
[ "Apache-2.0" ]
1
2021-11-24T01:43:13.000Z
2021-11-24T01:43:13.000Z
# -*- coding: utf-8 -*- import os from v2c.message import info def list_files(dirs, print_filelist=False): info('Creating file list in ' + str(len(dirs)) + ' directories...') entries = set() for d in dirs: entries.update(__get_filelist_recursive(d)) entries_sorted = sorted(entries) if pri...
24.076923
76
0.63099
import os from v2c.message import info def list_files(dirs, print_filelist=False): info('Creating file list in ' + str(len(dirs)) + ' directories...') entries = set() for d in dirs: entries.update(__get_filelist_recursive(d)) entries_sorted = sorted(entries) if print_filelist: for...
true
true
f75c9a0ee87fdcb0d356851509d7e7801bd4cbe5
4,130
py
Python
unit-tests/dcf_test_suites/collection_api/perms/post/test_post_perms.py
cozybearca/django_client_framework
5056012714ff461f1f420ce9b7e47b4ee2d5167a
[ "MIT" ]
1
2021-01-13T22:11:29.000Z
2021-01-13T22:11:29.000Z
unit-tests/dcf_test_suites/collection_api/perms/post/test_post_perms.py
cozybearca/django_client_framework
5056012714ff461f1f420ce9b7e47b4ee2d5167a
[ "MIT" ]
1
2021-04-12T02:04:59.000Z
2021-04-12T02:04:59.000Z
unit-tests/dcf_test_suites/collection_api/perms/post/test_post_perms.py
cozybearca/django_client_framework
5056012714ff461f1f420ce9b7e47b4ee2d5167a
[ "MIT" ]
1
2021-05-20T05:25:06.000Z
2021-05-20T05:25:06.000Z
from django.test import TestCase from rest_framework.test import APIClient from dcf_test_app.models import Product from dcf_test_app.models import Brand from django.contrib.auth.models import User from django_client_framework import permissions as p class PostPerms(TestCase): def setUp(self): self.user = ...
42.57732
93
0.647215
from django.test import TestCase from rest_framework.test import APIClient from dcf_test_app.models import Product from dcf_test_app.models import Brand from django.contrib.auth.models import User from django_client_framework import permissions as p class PostPerms(TestCase): def setUp(self): self.user = ...
true
true
f75c9a5522577c6cc74148d90b235b1b22050403
106,271
py
Python
tests/integration/test_s3.py
aazbeltran/localstack
8f9201051275e7894f754c2e70ce7ff6188e733e
[ "Apache-2.0" ]
2
2021-08-21T15:37:56.000Z
2022-02-04T23:18:16.000Z
tests/integration/test_s3.py
chase2981/localstack
b769810a400eb3aab3fcc95f35299bbfd8e09074
[ "Apache-2.0" ]
null
null
null
tests/integration/test_s3.py
chase2981/localstack
b769810a400eb3aab3fcc95f35299bbfd8e09074
[ "Apache-2.0" ]
null
null
null
import datetime import gzip import io import json import os import shutil import ssl import time import unittest import uuid from io import BytesIO from urllib.parse import parse_qs, quote import boto3 import requests from botocore.client import Config from botocore.exceptions import ClientError from pytz import timez...
38.531907
116
0.621091
import datetime import gzip import io import json import os import shutil import ssl import time import unittest import uuid from io import BytesIO from urllib.parse import parse_qs, quote import boto3 import requests from botocore.client import Config from botocore.exceptions import ClientError from pytz import timez...
true
true
f75c9a5da5ac1611339ec5036fd245d2da04bf9d
6,952
py
Python
src/lambda_function.py
Luka-Magic/Asakatsu-Slack
64d04d6ac3ea669a70bdfee1a4f8e1f003d2b9f0
[ "MIT" ]
null
null
null
src/lambda_function.py
Luka-Magic/Asakatsu-Slack
64d04d6ac3ea669a70bdfee1a4f8e1f003d2b9f0
[ "MIT" ]
null
null
null
src/lambda_function.py
Luka-Magic/Asakatsu-Slack
64d04d6ac3ea669a70bdfee1a4f8e1f003d2b9f0
[ "MIT" ]
null
null
null
import requests import os import json import datetime import boto3 import logging import datetime import urllib.request import re logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): logging.info(json.dumps(event)) ## eventが発生したらDBに接続 dynam...
30.625551
85
0.520426
import requests import os import json import datetime import boto3 import logging import datetime import urllib.request import re logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): logging.info(json.dumps(event)) dynamoDB = boto3.resource(...
true
true
f75c9ae682c2c5f3d7a4a604cc324c2a75362bce
666
py
Python
microservice/client.py
dvalentina/2019-2-Track-Backend-V-Danilova
42a05b286aadc5d05160ba91f6760edca3ddcfb9
[ "MIT" ]
null
null
null
microservice/client.py
dvalentina/2019-2-Track-Backend-V-Danilova
42a05b286aadc5d05160ba91f6760edca3ddcfb9
[ "MIT" ]
27
2020-03-11T10:08:08.000Z
2022-03-12T00:13:21.000Z
microservice/client.py
dvalentina/2019-2-Track-Backend-V-Danilova
42a05b286aadc5d05160ba91f6760edca3ddcfb9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import json import socket def parse_url(url): client_socket = socket.socket() client_socket.connect(('localhost', 8090)) url = f'{url}\r\n' client_socket.send(url.encode('utf8')) data = b'' tmp = client_socket.recv(1024) while tmp: print(f'Rec...
23.785714
46
0.606607
import sys import json import socket def parse_url(url): client_socket = socket.socket() client_socket.connect(('localhost', 8090)) url = f'{url}\r\n' client_socket.send(url.encode('utf8')) data = b'' tmp = client_socket.recv(1024) while tmp: print(f'Recieved data is [{tmp}]')...
true
true
f75c9b5b1fd2ff1c2b650a050c23b893ee854a02
709
py
Python
ML-Python/Week1/submissions/A2/A2_Shashank.py
darshanv6/SummerProjects17
573349fb8bd118131b437cff68259a23380c9bb8
[ "MIT" ]
null
null
null
ML-Python/Week1/submissions/A2/A2_Shashank.py
darshanv6/SummerProjects17
573349fb8bd118131b437cff68259a23380c9bb8
[ "MIT" ]
null
null
null
ML-Python/Week1/submissions/A2/A2_Shashank.py
darshanv6/SummerProjects17
573349fb8bd118131b437cff68259a23380c9bb8
[ "MIT" ]
1
2019-10-14T07:09:18.000Z
2019-10-14T07:09:18.000Z
# coding: utf-8 # In[1]: def hist(len): no_intervals = 10 // len if 10 % len != 0: no_intervals += 1 for i in range(0, no_intervals): c = 0 for j in range(len * i + 1, len * i + len + 1): if j > max: break c += count[j] s1 = str(len*...
15.413043
76
0.465444
def hist(len): no_intervals = 10 // len if 10 % len != 0: no_intervals += 1 for i in range(0, no_intervals): c = 0 for j in range(len * i + 1, len * i + len + 1): if j > max: break c += count[j] s1 = str(len*i + 1) + " - " + str(len*...
true
true
f75c9c3dcca09647ffae9b183db02715781af0ae
231
py
Python
pinax/badges/apps.py
Tarteel-io/pinax-badges
794e728f8137f2bb43a0d31a1bc63c2ac29a0e44
[ "MIT" ]
null
null
null
pinax/badges/apps.py
Tarteel-io/pinax-badges
794e728f8137f2bb43a0d31a1bc63c2ac29a0e44
[ "MIT" ]
null
null
null
pinax/badges/apps.py
Tarteel-io/pinax-badges
794e728f8137f2bb43a0d31a1bc63c2ac29a0e44
[ "MIT" ]
null
null
null
from django.apps import AppConfig as BaseAppConfig from django.utils.translation import gettext_lazy as _ class AppConfig(BaseAppConfig): name = "pinax.badges" label = "pinax_badges" verbose_name = _("Pinax Badges")
23.1
54
0.753247
from django.apps import AppConfig as BaseAppConfig from django.utils.translation import gettext_lazy as _ class AppConfig(BaseAppConfig): name = "pinax.badges" label = "pinax_badges" verbose_name = _("Pinax Badges")
true
true
f75c9c77b00b472c4b44734e79be679693f39747
4,054
py
Python
stethoscope/auth.py
HoriaHorvat/stethoscope
b356af5a9a494a3f74c706d500651dccd8c58f25
[ "Apache-2.0" ]
1,865
2017-02-21T17:46:27.000Z
2019-03-24T12:28:36.000Z
stethoscope/auth.py
HoriaHorvat/stethoscope
b356af5a9a494a3f74c706d500651dccd8c58f25
[ "Apache-2.0" ]
45
2017-02-21T18:15:51.000Z
2019-04-02T20:19:59.000Z
stethoscope/auth.py
HoriaHorvat/stethoscope
b356af5a9a494a3f74c706d500651dccd8c58f25
[ "Apache-2.0" ]
138
2017-02-21T18:06:03.000Z
2019-03-15T15:13:47.000Z
# vim: set fileencoding=utf-8 : from __future__ import absolute_import, print_function, unicode_literals import datetime import functools import jwt import logbook import six import werkzeug.exceptions import stethoscope.configurator logger = logbook.Logger(__name__) class AuthProvider(stethoscope.configurator....
34.649573
98
0.670202
from __future__ import absolute_import, print_function, unicode_literals import datetime import functools import jwt import logbook import six import werkzeug.exceptions import stethoscope.configurator logger = logbook.Logger(__name__) class AuthProvider(stethoscope.configurator.Configurator): config_keys = ...
true
true
f75c9dd49fc4ac29c218b1b1c3b9aa54efe8778f
28,727
py
Python
src/sage/combinat/sf/ns_macdonald.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
5
2015-01-04T07:15:06.000Z
2022-03-04T15:15:18.000Z
src/sage/combinat/sf/ns_macdonald.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
null
null
null
src/sage/combinat/sf/ns_macdonald.py
bopopescu/sage-5
9d85b34956ca2edd55af307f99c5d3859acd30bf
[ "BSL-1.0" ]
10
2016-09-28T13:12:40.000Z
2022-02-12T09:28:34.000Z
""" Non-symmetric Macdonald Polynomials """ from sage.combinat.combinat import CombinatorialObject, CombinatorialClass from sage.combinat.words.word import Word from sage.combinat.combination import Combinations from sage.combinat.permutation import Permutation from sage.rings.all import QQ, PolynomialRing, prod from s...
30.495754
227
0.467156
""" Non-symmetric Macdonald Polynomials """ from sage.combinat.combinat import CombinatorialObject, CombinatorialClass from sage.combinat.words.word import Word from sage.combinat.combination import Combinations from sage.combinat.permutation import Permutation from sage.rings.all import QQ, PolynomialRing, prod from s...
false
true
f75c9f07c3a458d5beedaf22f8bb0f670fa63ac0
11,738
py
Python
python/federatedml/ensemble/test/gh_packing_compressing_test.py
eliaskousk/FATE
242e47d6ae439a3b69ecb1610cb370b29b024413
[ "Apache-2.0" ]
1
2022-02-07T06:23:15.000Z
2022-02-07T06:23:15.000Z
python/federatedml/ensemble/test/gh_packing_compressing_test.py
eliaskousk/FATE
242e47d6ae439a3b69ecb1610cb370b29b024413
[ "Apache-2.0" ]
null
null
null
python/federatedml/ensemble/test/gh_packing_compressing_test.py
eliaskousk/FATE
242e47d6ae439a3b69ecb1610cb370b29b024413
[ "Apache-2.0" ]
null
null
null
# # Copyright 2019 The FATE Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
38.86755
133
0.610325
import unittest import functools import math from fate_arch.session import computing_session as session from federatedml.ensemble.basic_algorithms.decision_tree.tree_core.g_h_optim import PackedGHCompressor, GHPacker, fix_point_precision from federatedml.secureprotol.encrypt import PaillierEncrypt, FakeEncrypt from fe...
true
true
f75c9f52e6f9c0aeecca3cbec4ba2cba915b041a
435
py
Python
tests/image/PYPNG_LA_LOAD.py
qbektrix/pyglet
ab3f73dfd37abf75041e86310416b18138c34c33
[ "BSD-3-Clause" ]
21
2015-11-03T03:15:36.000Z
2021-03-15T22:00:47.000Z
tests/image/PYPNG_LA_LOAD.py
seeminglee/pyglet64
3dd167b5b0d3ad132a157e404586e53c2bb21736
[ "BSD-3-Clause" ]
3
2017-09-14T14:08:28.000Z
2019-05-20T04:38:15.000Z
tests/image/PYPNG_LA_LOAD.py
seeminglee/pyglet64
3dd167b5b0d3ad132a157e404586e53c2bb21736
[ "BSD-3-Clause" ]
23
2017-04-15T19:23:08.000Z
2020-09-08T11:55:29.000Z
#!/usr/bin/env python '''Test LA load using PyPNG. You should see the la.png image on a checkboard background. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.png import PNGImageDecoder class TEST_PNG_LA_LOAD(base_load.TestLoad):...
20.714286
66
0.703448
__docformat__ = 'restructuredtext' __version__ = '$Id$' import unittest import base_load from pyglet.image.codecs.png import PNGImageDecoder class TEST_PNG_LA_LOAD(base_load.TestLoad): texture_file = 'la.png' decoder = PNGImageDecoder() if __name__ == '__main__': unittest.main()
true
true
f75ca0079c09c348ebb04de37c190a73b3fabac1
2,286
py
Python
py_abac/policy/policy.py
sarthakgupta072/py-abac
7afcec37adc361a8c177c98044481aa5d2696303
[ "Apache-2.0" ]
47
2019-10-17T03:23:01.000Z
2022-02-26T03:27:03.000Z
py_abac/policy/policy.py
sarthakgupta072/py-abac
7afcec37adc361a8c177c98044481aa5d2696303
[ "Apache-2.0" ]
17
2020-02-24T02:17:34.000Z
2022-02-15T20:11:19.000Z
py_abac/policy/policy.py
sarthakgupta072/py-abac
7afcec37adc361a8c177c98044481aa5d2696303
[ "Apache-2.0" ]
10
2019-12-24T04:13:21.000Z
2021-08-01T08:21:41.000Z
""" Policy class """ from marshmallow import Schema, fields, post_load, ValidationError, validate from .rules import Rules, RulesSchema from .targets import Targets, TargetsSchema from ..context import EvaluationContext from ..exceptions import PolicyCreateError # Access decisions DENY_ACCESS = "deny" ALLOW_ACCE...
26.581395
95
0.609361
from marshmallow import Schema, fields, post_load, ValidationError, validate from .rules import Rules, RulesSchema from .targets import Targets, TargetsSchema from ..context import EvaluationContext from ..exceptions import PolicyCreateError DENY_ACCESS = "deny" ALLOW_ACCESS = "allow" class Policy(object): ...
true
true
f75ca1b54c15bca523732bae4d7515a8f7c39b44
7,020
py
Python
test/record/parser/test_response_whois_centralnic_com_se_com_status_registered.py
huyphan/pyyawhois
77fb2f73a9c67989f1d41d98f37037406a69d136
[ "MIT" ]
null
null
null
test/record/parser/test_response_whois_centralnic_com_se_com_status_registered.py
huyphan/pyyawhois
77fb2f73a9c67989f1d41d98f37037406a69d136
[ "MIT" ]
null
null
null
test/record/parser/test_response_whois_centralnic_com_se_com_status_registered.py
huyphan/pyyawhois
77fb2f73a9c67989f1d41d98f37037406a69d136
[ "MIT" ]
null
null
null
# This file is autogenerated. Do not edit it manually. # If you want change the content of this file, edit # # spec/fixtures/responses/whois.centralnic.com/se.com/status_registered # # and regenerate the tests with the following script # # $ scripts/generate_tests.py # from nose.tools import * from dateutil.parse...
54
676
0.70584
from nose.tools import * from dateutil.parser import parse as time_parse import yawhois class TestWhoisCentralnicComSeComStatusRegistered(object): def setUp(self): fixture_path = "spec/fixtures/responses/whois.centralnic.com/se.com/status_registered.txt" host = "whois.centralnic.com" ...
true
true
f75ca305055f2b0be89a128f41d496ee2b9bd063
5,924
py
Python
ditto/configuration/views.py
Kvoti/ditto
eb4efb241e54bf679222d14afeb71d9d5441c122
[ "BSD-3-Clause" ]
null
null
null
ditto/configuration/views.py
Kvoti/ditto
eb4efb241e54bf679222d14afeb71d9d5441c122
[ "BSD-3-Clause" ]
9
2015-11-10T15:17:22.000Z
2015-11-12T11:07:02.000Z
ditto/configuration/views.py
Kvoti/ditto
eb4efb241e54bf679222d14afeb71d9d5441c122
[ "BSD-3-Clause" ]
null
null
null
from django.contrib.auth.models import Group from django.contrib.auth.decorators import permission_required from django.contrib import messages from django.core.urlresolvers import reverse, reverse_lazy from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.template.resp...
32.021622
87
0.654456
from django.contrib.auth.models import Group from django.contrib.auth.decorators import permission_required from django.contrib import messages from django.core.urlresolvers import reverse, reverse_lazy from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.template.resp...
true
true
f75ca3d077fb37ac95edbdeeab8ce17b6187788d
52
py
Python
andromeda/modules/loans/models/__init__.py
sango09/andromeda_api_rest
b4a3267146f4f9a985fb3f512e652d4ff354bba2
[ "MIT" ]
1
2021-09-08T18:58:16.000Z
2021-09-08T18:58:16.000Z
andromeda/modules/loans/models/__init__.py
sango09/andromeda_api_rest
b4a3267146f4f9a985fb3f512e652d4ff354bba2
[ "MIT" ]
null
null
null
andromeda/modules/loans/models/__init__.py
sango09/andromeda_api_rest
b4a3267146f4f9a985fb3f512e652d4ff354bba2
[ "MIT" ]
null
null
null
from .inventory_loans import * from .loans import *
17.333333
30
0.769231
from .inventory_loans import * from .loans import *
true
true
f75ca4259d2fb009a1649aedba7cd3ce15fde81c
8,600
py
Python
st2common/st2common/content/loader.py
FairwindsOps/st2
2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa
[ "Apache-2.0" ]
1
2021-04-08T03:21:49.000Z
2021-04-08T03:21:49.000Z
st2common/st2common/content/loader.py
FairwindsOps/st2
2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa
[ "Apache-2.0" ]
null
null
null
st2common/st2common/content/loader.py
FairwindsOps/st2
2b76ca740c4af0d6b2c1d1ba5534ce4133fd16fa
[ "Apache-2.0" ]
null
null
null
# 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.53719
98
0.63186
import os import six from yaml.parser import ParserError from st2common import log as logging from st2common.constants.meta import ALLOWED_EXTS from st2common.constants.meta import PARSER_FUNCS from st2common.constants.pack import MANIFEST_FILE_NAME __all__ = [ 'ContentPackLoader', 'MetaLoader' ] LOG = log...
true
true
f75ca63419ee4d14989e4c322f3dade778d41638
6,985
py
Python
log_caspase/model_141.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_caspase/model_141.py
LoLab-VU/Bayesian_Inference_of_Network_Dynamics
54a5ef7e868be34289836bbbb024a2963c0c9c86
[ "MIT" ]
null
null
null
log_caspase/model_141.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('C6A', ['C8pro']) Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C3ub') Monomer('C3A', ['Xiap', 'ParpU', 'C6pro']) Mo...
69.85
296
0.818039
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD Model() Monomer('C6A', ['C8pro']) Monomer('Ligand', ['Receptor']) Monomer('ParpU', ['C3A']) Monomer('C3ub') Monomer('C3A', ['Xiap', 'ParpU', 'C6pro']) Monomer('Xiap', ['C3A']) Monomer('C8A...
true
true
f75ca6369c75ba32baf7419e5e2216df4f577406
9,929
py
Python
docs/conf.py
ChorbaV3/boiworkboi
57f4e765cebdefc2530456f31b9ddf9f8f6de043
[ "MIT" ]
1
2021-05-04T22:51:26.000Z
2021-05-04T22:51:26.000Z
docs/conf.py
ChorbaV3/boiworkboi
57f4e765cebdefc2530456f31b9ddf9f8f6de043
[ "MIT" ]
null
null
null
docs/conf.py
ChorbaV3/boiworkboi
57f4e765cebdefc2530456f31b9ddf9f8f6de043
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # discord.py documentation build configuration file, created by # sphinx-quickstart on Fri Aug 21 05:43:30 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated...
32.34202
100
0.689999
import sys import os import re on_rtd = os.getenv('READTHEDOCS') == 'True' sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.extlinks', ] if on_rtd: extensions.append('sphinxcontrib.napoleon') else: extensions.append('sphinx.ext.napoleon') ...
true
true
f75ca666c451f81672808bfeeaa1302bd53cbd95
1,075
py
Python
extensions/utilities/ping.py
kamfretoz/XJ9
b5daaf297dc538ae250f69ace16a4855c797e4e7
[ "WTFPL" ]
7
2022-01-26T13:31:17.000Z
2022-03-11T16:34:07.000Z
extensions/utilities/ping.py
kamfretoz/XJ9
b5daaf297dc538ae250f69ace16a4855c797e4e7
[ "WTFPL" ]
null
null
null
extensions/utilities/ping.py
kamfretoz/XJ9
b5daaf297dc538ae250f69ace16a4855c797e4e7
[ "WTFPL" ]
2
2022-01-26T06:05:44.000Z
2022-03-07T18:48:32.000Z
import lightbulb import hikari import datetime ping_plugin = lightbulb.Plugin("ping") @ping_plugin.command() @lightbulb.command("ping", "measure the ping of the bot", auto_defer=True, aliases=["pong"]) @lightbulb.implements(lightbulb.PrefixCommand) async def ping(ctx: lightbulb.Context) -> None: heartbeat = ctx.b...
27.564103
92
0.64093
import lightbulb import hikari import datetime ping_plugin = lightbulb.Plugin("ping") @ping_plugin.command() @lightbulb.command("ping", "measure the ping of the bot", auto_defer=True, aliases=["pong"]) @lightbulb.implements(lightbulb.PrefixCommand) async def ping(ctx: lightbulb.Context) -> None: heartbeat = ctx.b...
true
true
f75ca6b00deb5df78baa557ac6cf8eec4d2277cd
837
py
Python
Arrays/Task.py
ayushkr459/Data-Structures-And-Algorithms
050689a5e89a5afb0c907f16601d11706c04b614
[ "MIT" ]
4
2020-12-01T08:52:57.000Z
2021-11-08T11:44:42.000Z
Arrays/Task.py
ayushkr459/Data-Structures-And-Algorithms
050689a5e89a5afb0c907f16601d11706c04b614
[ "MIT" ]
4
2020-09-30T19:54:10.000Z
2020-10-17T05:04:04.000Z
Arrays/Task.py
ayushkr459/Data-Structures-And-Algorithms
050689a5e89a5afb0c907f16601d11706c04b614
[ "MIT" ]
12
2020-09-30T18:30:59.000Z
2020-10-31T15:38:54.000Z
# Monotonic array optimised solution # Time complexity = O(n) | Space Complexity : O(1) # method to check if the direction breaks def directionChanged(direction, previous, current) : difference = current - previous if direction > 0 : return difference < 0 return difference > 0...
23.25
59
0.577061
def directionChanged(direction, previous, current) : difference = current - previous if direction > 0 : return difference < 0 return difference > 0 def isMonotonicArray(arr : list) -> bool : if len(arr) <= 2 : return True direction = arr[1] - arr[0] f...
true
true
f75ca7527bc7aaab85fed4c4829579580e14c8ea
1,257
py
Python
quotes/admin/process.py
itechf-s/quotes
21aa65a5831fb9e8553a2f1ba89745cc19a9c17d
[ "MIT" ]
null
null
null
quotes/admin/process.py
itechf-s/quotes
21aa65a5831fb9e8553a2f1ba89745cc19a9c17d
[ "MIT" ]
2
2021-07-14T11:53:37.000Z
2021-07-20T16:54:34.000Z
quotes/admin/process.py
itechf-s/quotes
21aa65a5831fb9e8553a2f1ba89745cc19a9c17d
[ "MIT" ]
null
null
null
#Import required libraries import textwrap, time from django.utils.text import slugify from quotes.admin.wpmodels import Images from quotes.admin import utils def updateQuotesImage(quotesObj): for obj in quotesObj: if not obj.quotesTxt: obj.quotesTxt = obj.quotes imgText = tex...
36.970588
90
0.606205
import textwrap, time from django.utils.text import slugify from quotes.admin.wpmodels import Images from quotes.admin import utils def updateQuotesImage(quotesObj): for obj in quotesObj: if not obj.quotesTxt: obj.quotesTxt = obj.quotes imgText = textwrap.wrap(obj.quotesTxt, w...
true
true
f75ca76675673e535d648a5d382da0b8c7f71d95
1,696
py
Python
automatedtest_backend/datasourcemanagement/migrations/0001_initial.py
zhousheng0325/AutomationPlatform
e7e41e4a26c63fc8151b191bccb0f4a412a3388d
[ "MIT" ]
null
null
null
automatedtest_backend/datasourcemanagement/migrations/0001_initial.py
zhousheng0325/AutomationPlatform
e7e41e4a26c63fc8151b191bccb0f4a412a3388d
[ "MIT" ]
10
2020-06-06T01:30:29.000Z
2022-03-12T00:16:52.000Z
automatedtest_backend/datasourcemanagement/migrations/0001_initial.py
zhousheng0325/AutomationPlatform
e7e41e4a26c63fc8151b191bccb0f4a412a3388d
[ "MIT" ]
null
null
null
# Generated by Django 2.2.5 on 2020-02-10 04:58 from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): initial = True dependencies = [ ('interfacemanagement', '0001_initial'), ('projectmanagent', ...
44.631579
219
0.602594
from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): initial = True dependencies = [ ('interfacemanagement', '0001_initial'), ('projectmanagent', '0001_initial'), ] operations = [ ...
true
true
f75ca7e4364b24d44d348a42f0952aea6dadb760
136,556
py
Python
FWCore/ParameterSet/python/Config.py
bkilian15/cmssw
ad9b85e79d89f4f6c393c8cc648261366d82adca
[ "Apache-2.0" ]
null
null
null
FWCore/ParameterSet/python/Config.py
bkilian15/cmssw
ad9b85e79d89f4f6c393c8cc648261366d82adca
[ "Apache-2.0" ]
null
null
null
FWCore/ParameterSet/python/Config.py
bkilian15/cmssw
ad9b85e79d89f4f6c393c8cc648261366d82adca
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python ### command line options helper from __future__ import print_function import six from Options import Options options = Options() ## imports import sys from Mixins import PrintOptions,_ParameterTypeBase,_SimpleParameterTypeBase, _Parameterizable, _ConfigureComponent, _TypedParameterizable, _Lab...
42.767303
432
0.590344
from __future__ import print_function import six from Options import Options options = Options() import sys from Mixins import PrintOptions,_ParameterTypeBase,_SimpleParameterTypeBase, _Parameterizable, _ConfigureComponent, _TypedParameterizable, _Labelable, _Unlabelable, _ValidatingListBase, _modifyParametersFro...
true
true
f75caa520876078c57de5bdf0097e2c7210892ce
37,224
py
Python
zmk/nyokaserver/nyokaUtilities.py
center3d/MLW
192cc991df61bd8991a51702a53df6a09448d4f7
[ "Apache-2.0" ]
1
2020-02-29T12:18:39.000Z
2020-02-29T12:18:39.000Z
zmk/nyokaserver/nyokaUtilities.py
MfalhiTechnology/MLW
192cc991df61bd8991a51702a53df6a09448d4f7
[ "Apache-2.0" ]
null
null
null
zmk/nyokaserver/nyokaUtilities.py
MfalhiTechnology/MLW
192cc991df61bd8991a51702a53df6a09448d4f7
[ "Apache-2.0" ]
1
2020-02-29T12:18:28.000Z
2020-02-29T12:18:28.000Z
# nyokaUtilities.py import numpy as np from random import choice from string import ascii_uppercase import copy,json import ast,pathlib import traceback from nyoka import PMML43Ext as ny global MEMORY_DICT_ARCHITECTURE,MEMORY_OF_LAYERS settingFilePath='./settingFiles/' savedModels='./SavedModels/' MEMORY_OF_LAYERS={} ...
46.763819
247
0.570653
import numpy as np from random import choice from string import ascii_uppercase import copy,json import ast,pathlib import traceback from nyoka import PMML43Ext as ny global MEMORY_DICT_ARCHITECTURE,MEMORY_OF_LAYERS settingFilePath='./settingFiles/' savedModels='./SavedModels/' MEMORY_OF_LAYERS={} from trainModel.merg...
true
true
f75caad23190e7e101a583c0753259224042712a
2,070
py
Python
jobs/managers.py
digimatronics/py
8ee737e5d2dbb226c18a7dd46912c7301b37cc0e
[ "Apache-2.0" ]
1
2017-03-12T06:29:04.000Z
2017-03-12T06:29:04.000Z
jobs/managers.py
digimatronics/py
8ee737e5d2dbb226c18a7dd46912c7301b37cc0e
[ "Apache-2.0" ]
4
2021-03-31T20:10:38.000Z
2021-09-08T02:47:18.000Z
jobs/managers.py
digimatronics/py
8ee737e5d2dbb226c18a7dd46912c7301b37cc0e
[ "Apache-2.0" ]
null
null
null
import datetime from django.db.models import Q from django.db.models.query import QuerySet from django.utils import timezone class JobTypeQuerySet(QuerySet): def active(self): """ active Job Types """ return self.filter(active=True) def with_active_jobs(self): """ JobTypes with acti...
26.883117
78
0.643961
import datetime from django.db.models import Q from django.db.models.query import QuerySet from django.utils import timezone class JobTypeQuerySet(QuerySet): def active(self): return self.filter(active=True) def with_active_jobs(self): now = timezone.now() return self.active().filte...
true
true
f75cac8c437aaad7b4318bbb907d4afa76ff973f
3,648
py
Python
atlassian/bitbucket/cloud/repositories/issues.py
amdemas/atlassian-python-api
6f4f70c9eccf25b57912342287d92421f98e1a03
[ "Apache-2.0" ]
null
null
null
atlassian/bitbucket/cloud/repositories/issues.py
amdemas/atlassian-python-api
6f4f70c9eccf25b57912342287d92421f98e1a03
[ "Apache-2.0" ]
null
null
null
atlassian/bitbucket/cloud/repositories/issues.py
amdemas/atlassian-python-api
6f4f70c9eccf25b57912342287d92421f98e1a03
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from ..base import BitbucketCloudBase class Issues(BitbucketCloudBase): def __init__(self, url, *args, **kwargs): super(Issues, self).__init__(url, *args, **kwargs) def __get_object(self, data): if "errors" in data: return return Issue(data, **self._new_ses...
27.223881
118
0.597862
from ..base import BitbucketCloudBase class Issues(BitbucketCloudBase): def __init__(self, url, *args, **kwargs): super(Issues, self).__init__(url, *args, **kwargs) def __get_object(self, data): if "errors" in data: return return Issue(data, **self._new_session_args) ...
true
true
f75cacf3f66ad51031ae181700d4cc752596e677
344
py
Python
ch06/decorators/time.measure.arguments.py
kxen42/Learn-Python-Programming-Third-Edition
851ddc5e6094fadd44f31a9ad1d3876456b04372
[ "MIT" ]
19
2021-11-05T22:54:09.000Z
2022-03-29T15:03:47.000Z
ch06/decorators/time.measure.arguments.py
kxen42/Learn-Python-Programming-Third-Edition
851ddc5e6094fadd44f31a9ad1d3876456b04372
[ "MIT" ]
null
null
null
ch06/decorators/time.measure.arguments.py
kxen42/Learn-Python-Programming-Third-Edition
851ddc5e6094fadd44f31a9ad1d3876456b04372
[ "MIT" ]
26
2021-11-12T17:04:50.000Z
2022-03-29T01:10:35.000Z
# decorators/time.measure.arguments.py from time import sleep, time def f(sleep_time=0.1): sleep(sleep_time) def measure(func, *args, **kwargs): t = time() func(*args, **kwargs) print(func.__name__, 'took:', time() - t) measure(f, sleep_time=0.3) # f took: 0.30056095123291016 measure(f, 0.2) # f t...
22.933333
57
0.668605
from time import sleep, time def f(sleep_time=0.1): sleep(sleep_time) def measure(func, *args, **kwargs): t = time() func(*args, **kwargs) print(func.__name__, 'took:', time() - t) measure(f, sleep_time=0.3) measure(f, 0.2)
true
true
f75cacf650d071f86ff848e68fa022b64f1fbd72
17,807
py
Python
dm_control/suite/quadruped.py
h8907283/dm_control
fe4449606742a7b8bec81930790b98244cddc538
[ "Apache-2.0" ]
2,863
2018-01-03T01:38:52.000Z
2022-03-30T09:49:50.000Z
dm_control/suite/quadruped.py
krakhit/dm_control
4e1a35595124742015ae0c7a829e099a5aa100f5
[ "Apache-2.0" ]
266
2018-01-03T16:00:04.000Z
2022-03-26T15:45:48.000Z
dm_control/suite/quadruped.py
krakhit/dm_control
4e1a35595124742015ae0c7a829e099a5aa100f5
[ "Apache-2.0" ]
580
2018-01-03T03:17:27.000Z
2022-03-31T19:29:32.000Z
# Copyright 2019 The dm_control Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
37.409664
80
0.696468
import collections from dm_control import mujoco from dm_control.mujoco.wrapper import mjbindings from dm_control.rl import control from dm_control.suite import base from dm_control.suite import common from dm_control.utils import containers from dm_control.utils import rewards from dm_control.utils import xml_tools...
true
true
f75cad1ffac2cb49517fea666264c34de164ba59
93
py
Python
Python/mutable_immutable.py
vathe83/tips_n_tricks
99b1af8705f66898503c60448864765f700b62f2
[ "MIT" ]
null
null
null
Python/mutable_immutable.py
vathe83/tips_n_tricks
99b1af8705f66898503c60448864765f700b62f2
[ "MIT" ]
null
null
null
Python/mutable_immutable.py
vathe83/tips_n_tricks
99b1af8705f66898503c60448864765f700b62f2
[ "MIT" ]
null
null
null
# Based on # https://medium.com/datadriveninvestor/mutable-and-immutable-python-2093deeac8d9
46.5
81
0.817204
true
true
f75cad51d9574f19b12aad64356dabe53cfbd670
31,069
py
Python
examples/asyncio/wsgi-server.py
LaudateCorpus1/hyper-h2
7dfab8f8e0e8605c4a2a90706b217d0a0a0c45b7
[ "MIT" ]
2
2020-07-01T20:46:51.000Z
2021-04-28T21:28:48.000Z
examples/asyncio/wsgi-server.py
LaudateCorpus1/hyper-h2
7dfab8f8e0e8605c4a2a90706b217d0a0a0c45b7
[ "MIT" ]
null
null
null
examples/asyncio/wsgi-server.py
LaudateCorpus1/hyper-h2
7dfab8f8e0e8605c4a2a90706b217d0a0a0c45b7
[ "MIT" ]
3
2021-06-03T10:10:16.000Z
2022-03-17T19:57:00.000Z
# -*- coding: utf-8 -*- """ asyncio-server.py ~~~~~~~~~~~~~~~~~ A fully-functional WSGI server, written using hyper-h2. Requires asyncio. To test it, try installing httpin from pip (``pip install httpbin``) and then running the server (``python asyncio-server.py httpbin:app``). This server does not support HTTP/1.1:...
40.988127
79
0.652869
import asyncio import importlib import queue import ssl import sys import threading from h2.connection import H2Connection from h2.events import ( DataReceived, RequestReceived, WindowUpdated, StreamEnded, StreamReset ) END_DATA_SENTINEL = object() APPLICATION = None class H2Protocol(asyncio.Protocol): de...
true
true
f75cad64006aac1406ffdbdd3133e14cd41b3c6a
3,592
py
Python
ichnaea/scripts/tests/test_datamap.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2018-01-18T16:02:43.000Z
2018-01-18T16:02:43.000Z
ichnaea/scripts/tests/test_datamap.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
null
null
null
ichnaea/scripts/tests/test_datamap.py
crankycoder/ichnaea
fb54000e92c605843b7a41521e36fd648c11ae94
[ "Apache-2.0" ]
1
2018-01-19T17:56:48.000Z
2018-01-19T17:56:48.000Z
import os import os.path from unittest.mock import MagicMock, patch from ichnaea.models.content import ( DataMap, ) from ichnaea.scripts import datamap from ichnaea.scripts.datamap import ( encode_file, export_file, main, merge_files, render_tiles, ) from ichnaea import util class TestMap(obj...
33.259259
75
0.513085
import os import os.path from unittest.mock import MagicMock, patch from ichnaea.models.content import ( DataMap, ) from ichnaea.scripts import datamap from ichnaea.scripts.datamap import ( encode_file, export_file, main, merge_files, render_tiles, ) from ichnaea import util class TestMap(obj...
true
true
f75cad68fd1229ff0cfda5eabe3ae80e58b019ab
1,516
py
Python
tests/test_log_entry.py
leupibr/pycolog
c8a19219aa7deeec85ce0934e9987129b1ddea0c
[ "MIT" ]
1
2020-06-19T14:33:56.000Z
2020-06-19T14:33:56.000Z
tests/test_log_entry.py
leupibr/pycolog
c8a19219aa7deeec85ce0934e9987129b1ddea0c
[ "MIT" ]
11
2020-06-19T05:20:26.000Z
2020-07-02T19:05:45.000Z
tests/test_log_entry.py
leupibr/pycolog
c8a19219aa7deeec85ce0934e9987129b1ddea0c
[ "MIT" ]
null
null
null
import pytest import re from pycolog.log_entry import LogEntry @pytest.mark.parametrize('chars,expected', [ (4, 'S...'), (8, 'Short...'), (9, 'ShortLine'), (12, 'ShortLine'), ]) def test_truncate(chars, expected): assert LogEntry('ShortLine').truncate(chars) == expected def test_fields_as_attri...
26.596491
80
0.559367
import pytest import re from pycolog.log_entry import LogEntry @pytest.mark.parametrize('chars,expected', [ (4, 'S...'), (8, 'Short...'), (9, 'ShortLine'), (12, 'ShortLine'), ]) def test_truncate(chars, expected): assert LogEntry('ShortLine').truncate(chars) == expected def test_fields_as_attri...
true
true
f75cae3ef15c74f6137f36f710d86cec18262151
324
py
Python
rgr_user.py
sayanss2/rgr
bee688b4fa9d51af2dada3a3b674f8b25e872e31
[ "Apache-2.0" ]
null
null
null
rgr_user.py
sayanss2/rgr
bee688b4fa9d51af2dada3a3b674f8b25e872e31
[ "Apache-2.0" ]
null
null
null
rgr_user.py
sayanss2/rgr
bee688b4fa9d51af2dada3a3b674f8b25e872e31
[ "Apache-2.0" ]
null
null
null
#! /usr/bin/python3 import socket import getpass user = str(getpass.getuser()) out = 'error' with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock: sock.sendto(user.encode('utf-8'), ('127.0.0.1',40069)) date, addr = sock.recvfrom(1024) if date: out = date.decode('utf-8') print(user + ", Ваш вариант № " + ...
27
62
0.685185
import socket import getpass user = str(getpass.getuser()) out = 'error' with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as sock: sock.sendto(user.encode('utf-8'), ('127.0.0.1',40069)) date, addr = sock.recvfrom(1024) if date: out = date.decode('utf-8') print(user + ", Ваш вариант № " + out)
true
true
f75caf27829c08393292c0f2acd616e4394c0ae8
772
py
Python
scripts/test_connection.py
BillmanH/exoplanets
92656bf8c917c6e07d91f82a7cd0b75679ffa680
[ "MIT" ]
14
2021-03-03T19:27:46.000Z
2022-03-21T16:24:45.000Z
scripts/test_connection.py
BillmanH/exoplanets
92656bf8c917c6e07d91f82a7cd0b75679ffa680
[ "MIT" ]
6
2021-08-14T17:17:58.000Z
2021-09-28T14:34:56.000Z
scripts/test_connection.py
BillmanH/exoplanets
92656bf8c917c6e07d91f82a7cd0b75679ffa680
[ "MIT" ]
null
null
null
import asyncio import time import yaml,sys #%% from gremlin_python.driver import client, serializer, protocol from gremlin_python.driver.protocol import GremlinServerError import sys import traceback #%% #Connection config config = yaml.safe_load(open('configure.yaml')) endpoint = config['endpoint'] username = con...
23.393939
82
0.670984
import asyncio import time import yaml,sys from gremlin_python.driver import client, serializer, protocol from gremlin_python.driver.protocol import GremlinServerError import sys import traceback config = yaml.safe_load(open('configure.yaml')) endpoint = config['endpoint'] username = config['username'] password = c...
true
true
f75caf604fefd51445262473750af423066a2269
16,738
py
Python
scenic/projects/layout_denoise/model.py
techthiyanes/scenic
05585b1189364e29d82413b9d4a50ffa8c246f0c
[ "Apache-2.0" ]
688
2021-07-26T21:45:18.000Z
2022-03-31T11:53:34.000Z
scenic/projects/layout_denoise/model.py
techthiyanes/scenic
05585b1189364e29d82413b9d4a50ffa8c246f0c
[ "Apache-2.0" ]
35
2021-08-03T11:31:10.000Z
2022-03-31T21:58:58.000Z
scenic/projects/layout_denoise/model.py
techthiyanes/scenic
05585b1189364e29d82413b9d4a50ffa8c246f0c
[ "Apache-2.0" ]
88
2021-08-03T13:19:50.000Z
2022-03-31T08:35:22.000Z
"""Implementation of Layout Denoise model.""" # pylint: disable=not-callable from typing import Any, Dict, List, Tuple, Optional import flax.linen as nn import jax.numpy as jnp import ml_collections from scenic.projects.baselines import resnet from scenic.projects.layout_denoise import base_model from scenic.project...
36.786813
80
0.681981
from typing import Any, Dict, List, Tuple, Optional import flax.linen as nn import jax.numpy as jnp import ml_collections from scenic.projects.baselines import resnet from scenic.projects.layout_denoise import base_model from scenic.projects.layout_denoise.layers import common from scenic.projects.layout_denoise.lay...
true
true
f75caf80a1f4fab95ba5bc1638e9f612881c3ec3
499
py
Python
Lists/List_Assignement_And_List_copy.py
obareau/python_travaux_pratiques
2205f4c253e96e409b56f5c23d6e23387ab46524
[ "MIT" ]
1
2021-11-01T12:45:50.000Z
2021-11-01T12:45:50.000Z
Lists/List_Assignement_And_List_copy.py
obareau/python_travaux_pratiques
2205f4c253e96e409b56f5c23d6e23387ab46524
[ "MIT" ]
null
null
null
Lists/List_Assignement_And_List_copy.py
obareau/python_travaux_pratiques
2205f4c253e96e409b56f5c23d6e23387ab46524
[ "MIT" ]
null
null
null
x = ['apple', 'bob', 'cat', 'drone'] y = x x[0] = 'qqrq' print(x) # ['qqrq', 'bob', 'cat', 'drone'] print(y) # ['qqrq', 'bob', 'cat', 'drone'] # • There is one list in the memory and two pointers to it. # • If you really want to make a copy the pythonic way is to use the slice syntax. # • It creates a shallow copy fro...
27.722222
82
0.581162
x = ['apple', 'bob', 'cat', 'drone'] y = x x[0] = 'qqrq' print(x) print(y) from copy import deepcopy x = ['apple', 'bob', 'cat', 'drone'] y = deepcopy(x) x[0] = 'qqrq' print(x) print(y)
true
true
f75cafb853893b5cc71896a82c68be3770da35d7
2,129
py
Python
tests/uploads/test_api.py
ColeVoelpel/virtool
859c8d2516f07343bde47f3bae0247dedd76e6c4
[ "MIT" ]
1
2019-08-23T00:19:00.000Z
2019-08-23T00:19:00.000Z
tests/uploads/test_api.py
ColeVoelpel/virtool
859c8d2516f07343bde47f3bae0247dedd76e6c4
[ "MIT" ]
null
null
null
tests/uploads/test_api.py
ColeVoelpel/virtool
859c8d2516f07343bde47f3bae0247dedd76e6c4
[ "MIT" ]
null
null
null
import os import pytest import sys class TestUpload: @pytest.mark.parametrize("file_type", ["reference", "reads", "hmm", "subtraction"]) async def test(self, file_type, tmpdir, spawn_client, static_time, test_random_alphanumeric): client = await spawn_client(authorize=True, permissions=["upload_file"...
30.855072
107
0.581494
import os import pytest import sys class TestUpload: @pytest.mark.parametrize("file_type", ["reference", "reads", "hmm", "subtraction"]) async def test(self, file_type, tmpdir, spawn_client, static_time, test_random_alphanumeric): client = await spawn_client(authorize=True, permissions=["upload_file"...
true
true
f75cb0dd601278dcecaa10256605c7e949178248
19,894
py
Python
python/proseco/evaluator/head.py
ProSeCo-Planning/ros_proseco_planning
484beedb01e5faafa7e03e95bc88b1e4f969285e
[ "BSD-3-Clause" ]
null
null
null
python/proseco/evaluator/head.py
ProSeCo-Planning/ros_proseco_planning
484beedb01e5faafa7e03e95bc88b1e4f969285e
[ "BSD-3-Clause" ]
null
null
null
python/proseco/evaluator/head.py
ProSeCo-Planning/ros_proseco_planning
484beedb01e5faafa7e03e95bc88b1e4f969285e
[ "BSD-3-Clause" ]
null
null
null
import os import copy import ray import argparse import tqdm import logging import pandas as pd from pathlib import Path from datetime import datetime import shutil import uuid as uu_id from typing import ClassVar, Dict, Generator, Tuple, List, Any from proseco.evaluator.remote import run from proseco.evaluator.progre...
35.398577
187
0.593646
import os import copy import ray import argparse import tqdm import logging import pandas as pd from pathlib import Path from datetime import datetime import shutil import uuid as uu_id from typing import ClassVar, Dict, Generator, Tuple, List, Any from proseco.evaluator.remote import run from proseco.evaluator.progre...
true
true
f75cb14a4770c2022c95e64a80c98a66a003662c
2,003
py
Python
lib/options.py
papa-cmd/Vxscan
86dff6485ca087bc9c2e3ad36262d8e7c62faa3d
[ "Apache-2.0" ]
1
2020-01-01T13:35:19.000Z
2020-01-01T13:35:19.000Z
lib/options.py
firexun/Vxscan
b8a2b685e9837d242be7d9d51e24643c87b854b5
[ "Apache-2.0" ]
null
null
null
lib/options.py
firexun/Vxscan
b8a2b685e9837d242be7d9d51e24643c87b854b5
[ "Apache-2.0" ]
1
2020-05-28T10:03:19.000Z
2020-05-28T10:03:19.000Z
# coding=utf-8 import argparse import ipaddress import time import logging from lib.common import start from lib.cli_output import start_out from plugins.ActiveReconnaissance.active import ActiveCheck from report import gener def read_file(file, dbname): hosts = [] try: with open(file, 'rt') as f: ...
29.455882
92
0.610584
import argparse import ipaddress import time import logging from lib.common import start from lib.cli_output import start_out from plugins.ActiveReconnaissance.active import ActiveCheck from report import gener def read_file(file, dbname): hosts = [] try: with open(file, 'rt') as f: for ip...
true
true
f75cb394409a167b2e43c0b42535ebd818f04900
6,247
py
Python
auto/www/api/case.py
yufuchen/AutoLink
9feeff19294719b6dc8bbe1814c164241ce9480f
[ "ECL-2.0", "Apache-2.0", "MIT" ]
8
2019-04-29T05:41:55.000Z
2021-12-07T07:49:34.000Z
auto/www/api/case.py
yufuchen/AutoLink
9feeff19294719b6dc8bbe1814c164241ce9480f
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
auto/www/api/case.py
yufuchen/AutoLink
9feeff19294719b6dc8bbe1814c164241ce9480f
[ "ECL-2.0", "Apache-2.0", "MIT" ]
3
2019-04-29T05:53:19.000Z
2021-03-18T08:10:29.000Z
# -*- coding: utf-8 -*- __author__ = "苦叶子" """ 公众号: 开源优测 Email: lymking@foxmail.com """ from flask import current_app, session, request, send_file from flask_restful import Resource, reqparse import werkzeug from utils.file import exists_path, rename_file, make_nod, remove_file, write_file, read_file class Cas...
38.801242
117
0.467905
__author__ = "苦叶子" from flask import current_app, session, request, send_file from flask_restful import Resource, reqparse import werkzeug from utils.file import exists_path, rename_file, make_nod, remove_file, write_file, read_file class Case(Resource): def __init__(self): self.parser = reqparse.Requ...
true
true
f75cb3d0316cda86183e6e84fdf3d48ba4e64848
22,649
py
Python
external/AR/pytracking/analysis/plot_results.py
tzhhhh123/Stark
eaf7df3baf27ac064938f831211ae64659bc6808
[ "MIT" ]
376
2021-03-27T12:29:17.000Z
2022-03-29T01:22:15.000Z
external/AR/pytracking/analysis/plot_results.py
wp8733684/Stark
ba59f9596b06bc687d726f991e1e7fce8af6b5a5
[ "MIT" ]
75
2021-03-31T12:44:45.000Z
2022-03-28T09:02:57.000Z
external/AR/pytracking/analysis/plot_results.py
wp8733684/Stark
ba59f9596b06bc687d726f991e1e7fce8af6b5a5
[ "MIT" ]
82
2021-03-26T10:07:57.000Z
2022-03-29T11:08:27.000Z
import tikzplotlib import matplotlib import matplotlib.pyplot as plt import os import torch import pickle import json from pytracking.evaluation.environment import env_settings from pytracking.analysis.extract_results import extract_results def get_plot_draw_styles(): plot_draw_style = [{'color': (1.0, 0.0, 0.0),...
46.795455
131
0.64568
import tikzplotlib import matplotlib import matplotlib.pyplot as plt import os import torch import pickle import json from pytracking.evaluation.environment import env_settings from pytracking.analysis.extract_results import extract_results def get_plot_draw_styles(): plot_draw_style = [{'color': (1.0, 0.0, 0.0),...
true
true
f75cb43246e6883b81f6941f87a20391686fc40e
877
py
Python
ex98.py
FernandaMakiHirose/programas-jupyter
40ebfc820fefceb14293715104641ef184acfff4
[ "MIT" ]
null
null
null
ex98.py
FernandaMakiHirose/programas-jupyter
40ebfc820fefceb14293715104641ef184acfff4
[ "MIT" ]
null
null
null
ex98.py
FernandaMakiHirose/programas-jupyter
40ebfc820fefceb14293715104641ef184acfff4
[ "MIT" ]
1
2021-06-09T22:33:11.000Z
2021-06-09T22:33:11.000Z
# crie um programa que leia nome, ano de nascimento e carteira de trabalho e cadastre-o (com idade) em um dicionário. Se por acaso a CTPS for diferente de ZERO, o dicionário receberá também o ano de contratação e o salário. Calcule e acrescente, além da idade, com quantos anos a pessoa vai se aposentar. from datetime...
48.722222
305
0.653364
from datetime import datetime dados = {} dados['nome'] = str(input('Nome: ')) nasc = int(input('Ano de nascimento: ')) dados['idade'] = datetime.now().year - nasc dados['ctps'] = int(input('Carteira de trabalho (0 não tem): ')) if dados['ctps'] != 0: dados['contratação'] = int(input('Ano de contratação: '...
true
true
f75cb47f465ed07c786356b57ac18e83c011c5ab
3,945
py
Python
citlab_article_separation/io.py
CITlabRostock/article-separation
b210295b19e5af7ce409bf2733ffb54f4f41786e
[ "Apache-2.0" ]
7
2019-10-16T17:33:16.000Z
2020-10-30T05:21:33.000Z
citlab_article_separation/io.py
CITlabRostock/citlab-article-separation
b210295b19e5af7ce409bf2733ffb54f4f41786e
[ "Apache-2.0" ]
null
null
null
citlab_article_separation/io.py
CITlabRostock/citlab-article-separation
b210295b19e5af7ce409bf2733ffb54f4f41786e
[ "Apache-2.0" ]
null
null
null
from citlab_python_util.geometry.polygon import string_to_poly from citlab_python_util.io.file_loader import load_text_file from citlab_python_util.parser.xml.page.page import Page def get_article_polys_from_file(poly_file_name): """ Load polygons from a txt file or a PageXml file `poly_file_name`, split them up ...
40.670103
119
0.597212
from citlab_python_util.geometry.polygon import string_to_poly from citlab_python_util.io.file_loader import load_text_file from citlab_python_util.parser.xml.page.page import Page def get_article_polys_from_file(poly_file_name): if poly_file_name.endswith(".txt"): try: poly_strings = load_tex...
true
true
f75cb8c1331b0acbcfcf3111a3043d54d40fd5ff
812
py
Python
rospackage/tutorial/setup.py
tmtong/roslibdart
b38c834818275b5e2f1dd124e38d087321e559ca
[ "Apache-2.0" ]
null
null
null
rospackage/tutorial/setup.py
tmtong/roslibdart
b38c834818275b5e2f1dd124e38d087321e559ca
[ "Apache-2.0" ]
1
2022-03-03T18:16:26.000Z
2022-03-27T07:36:12.000Z
rospackage/tutorial/setup.py
tmtong/roslibdart
b38c834818275b5e2f1dd124e38d087321e559ca
[ "Apache-2.0" ]
null
null
null
from setuptools import setup package_name = 'tutorial' setup( name=package_name, version='0.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), ], instal...
27.066667
53
0.609606
from setuptools import setup package_name = 'tutorial' setup( name=package_name, version='0.0.0', packages=[package_name], data_files=[ ('share/ament_index/resource_index/packages', ['resource/' + package_name]), ('share/' + package_name, ['package.xml']), ], instal...
true
true
f75cbacb34696af5531fc4f834d1d064c8056fe0
343
py
Python
psi/serialize/int.py
delta-mpc/python-psi
1665de12a713b37abd889268c66de84cddb1bf84
[ "Apache-2.0" ]
35
2021-05-28T10:03:09.000Z
2022-03-24T12:08:19.000Z
psi/serialize/int.py
delta-mpc/python-psi
1665de12a713b37abd889268c66de84cddb1bf84
[ "Apache-2.0" ]
9
2021-07-15T09:16:34.000Z
2022-03-31T03:59:16.000Z
psi/serialize/int.py
delta-mpc/python-psi
1665de12a713b37abd889268c66de84cddb1bf84
[ "Apache-2.0" ]
16
2021-06-18T02:18:56.000Z
2022-03-25T02:43:48.000Z
__all__ = ["int_to_bytes", "bytes_to_int"] def int_to_bytes(value: int): byte_length = (value.bit_length() + 7) // 8 byte_length = (byte_length + 3) // 4 * 4 byte_length = 4 if byte_length == 0 else byte_length return value.to_bytes(byte_length, "big") def bytes_to_int(data: bytes): return int.f...
26.384615
56
0.673469
__all__ = ["int_to_bytes", "bytes_to_int"] def int_to_bytes(value: int): byte_length = (value.bit_length() + 7) // 8 byte_length = (byte_length + 3) // 4 * 4 byte_length = 4 if byte_length == 0 else byte_length return value.to_bytes(byte_length, "big") def bytes_to_int(data: bytes): return int.f...
true
true
f75cbd7f22dcd24dfb92c39eade81686848fc999
31,210
py
Python
vnpy/trader/uiMainWindow.py
DongfengXu/VNPY
a42c6204ee20925ce09289380985a0c58dcd168b
[ "MIT" ]
null
null
null
vnpy/trader/uiMainWindow.py
DongfengXu/VNPY
a42c6204ee20925ce09289380985a0c58dcd168b
[ "MIT" ]
null
null
null
vnpy/trader/uiMainWindow.py
DongfengXu/VNPY
a42c6204ee20925ce09289380985a0c58dcd168b
[ "MIT" ]
null
null
null
# encoding: UTF-8 import psutil import traceback from vnpy.trader.vtFunction import loadIconPath from vnpy.trader.vtGlobal import globalSetting from vnpy.trader.uiBasicWidget import * from .vtEngine import DataEngine from PyQt5 import Qt ######################################################################## class ...
49.072327
143
0.502499
import psutil import traceback from vnpy.trader.vtFunction import loadIconPath from vnpy.trader.vtGlobal import globalSetting from vnpy.trader.uiBasicWidget import * from .vtEngine import DataEngine from PyQt5 import Qt class MainWindow(QtWidgets.QMainWindow): signalStatusBar = QtCore.Signal(type(Event())) ...
true
true
f75cbfd9168a19bbac6e6f82073d67c69ff9a82b
1,245
py
Python
app/login.py
zeciola/Ingresse_API_Test
0f2969105c98bff7f17449327406d14aef62a8d6
[ "MIT" ]
null
null
null
app/login.py
zeciola/Ingresse_API_Test
0f2969105c98bff7f17449327406d14aef62a8d6
[ "MIT" ]
1
2019-04-23T14:04:32.000Z
2019-04-23T16:16:29.000Z
app/login.py
zeciola/Ingresse_API_Test
0f2969105c98bff7f17449327406d14aef62a8d6
[ "MIT" ]
null
null
null
from flask import Blueprint, request, jsonify from flask_jwt_extended import create_access_token, create_refresh_token from .model import User from .serializer import UserSchema from datetime import timedelta blue_print_login = Blueprint("login", __name__) @blue_print_login.route("/login", methods=["POST"]) def logi...
28.295455
82
0.621687
from flask import Blueprint, request, jsonify from flask_jwt_extended import create_access_token, create_refresh_token from .model import User from .serializer import UserSchema from datetime import timedelta blue_print_login = Blueprint("login", __name__) @blue_print_login.route("/login", methods=["POST"]) def logi...
true
true
f75cbff5acd19c6fffa74f5a83c83d65636f6b24
754
py
Python
clients/python/test/test_stage_range_creation.py
tshradheya/lakeFS
1d5bdb52a57a6651b34a26c8468e16b66f7121cf
[ "Apache-2.0" ]
null
null
null
clients/python/test/test_stage_range_creation.py
tshradheya/lakeFS
1d5bdb52a57a6651b34a26c8468e16b66f7121cf
[ "Apache-2.0" ]
null
null
null
clients/python/test/test_stage_range_creation.py
tshradheya/lakeFS
1d5bdb52a57a6651b34a26c8468e16b66f7121cf
[ "Apache-2.0" ]
null
null
null
""" lakeFS API lakeFS HTTP API # noqa: E501 The version of the OpenAPI document: 0.1.0 Contact: services@treeverse.io Generated by: https://openapi-generator.tech """ import sys import unittest import lakefs_client from lakefs_client.model.stage_range_creation import StageRangeCreation class...
20.378378
79
0.687003
import sys import unittest import lakefs_client from lakefs_client.model.stage_range_creation import StageRangeCreation class TestStageRangeCreation(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def testStageRangeCreation(self): pass if ...
true
true
f75cc0bb16086dfb713d260b2f48ff4d83dfc592
36
py
Python
tests/__init__.py
algebra-club/TaguPy
1ff5a792f7c78cfb6741cf27659215fef287a1c1
[ "MIT" ]
1
2021-08-21T07:36:24.000Z
2021-08-21T07:36:24.000Z
tests/__init__.py
algebra-club/TaguPy
1ff5a792f7c78cfb6741cf27659215fef287a1c1
[ "MIT" ]
29
2021-08-15T18:12:58.000Z
2021-09-12T14:48:17.000Z
tests/__init__.py
algebra-club/TaguPy
1ff5a792f7c78cfb6741cf27659215fef287a1c1
[ "MIT" ]
null
null
null
"""Unit test package for tagupy."""
18
35
0.666667
true
true
f75cc164bd00734850e611a292371be765e66398
1,244
py
Python
run.py
maysam-h/pdf-toolz
dc182242b11dd1737ee787f19395569382af510f
[ "BSD-2-Clause" ]
null
null
null
run.py
maysam-h/pdf-toolz
dc182242b11dd1737ee787f19395569382af510f
[ "BSD-2-Clause" ]
null
null
null
run.py
maysam-h/pdf-toolz
dc182242b11dd1737ee787f19395569382af510f
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 """ __reference: """ from tkinter import * import tabs import guideInfoStrings as gis import outputFunctions import menubar def updateVariableText(thisTab, returnString): """ This function updates the label when called """ change = StringVar(thisTab) change.set(returnString) ...
23.037037
135
0.688907
from tkinter import * import tabs import guideInfoStrings as gis import outputFunctions import menubar def updateVariableText(thisTab, returnString): change = StringVar(thisTab) change.set(returnString) return Label(thisTab, textvar=change, fg="black", font="bold").grid(row=0, column=0, sticky=W+E) d...
true
true
f75cc1be858704b10024387f112c526b0c4e47c2
451
py
Python
easytalk/nomenclatur.py
romainledru/Postgres-EasyTalk
eececda16135ba43c8b0fc58dacf187679b87009
[ "MIT" ]
null
null
null
easytalk/nomenclatur.py
romainledru/Postgres-EasyTalk
eececda16135ba43c8b0fc58dacf187679b87009
[ "MIT" ]
null
null
null
easytalk/nomenclatur.py
romainledru/Postgres-EasyTalk
eececda16135ba43c8b0fc58dacf187679b87009
[ "MIT" ]
null
null
null
import datetime ## LOCAL POSTGRESQL DEFINITION pg_items = { 'serial': 'serial', 'text': str, 'integer': int, 'real': float, 'boolean': bool, 'timestamp with time zone': datetime.datetime, } pg_items_str = { 'serial': 'serial', 'text': 'str', 'integer': 'int', 'real': 'float', ...
16.703704
50
0.585366
import datetime pg_items = { 'serial': 'serial', 'text': str, 'integer': int, 'real': float, 'boolean': bool, 'timestamp with time zone': datetime.datetime, } pg_items_str = { 'serial': 'serial', 'text': 'str', 'integer': 'int', 'real': 'float', 'boolean': 'bool', 'tim...
true
true
f75cc27b30f548d8d29a94fcf9ce6195c96f5523
268
py
Python
actions/gigawackelarm.py
Mymineplays/ExtendedKawaii-DiscordBot
4f9304e45414a9cb99492f7aafa31c9bd6730486
[ "MIT" ]
1
2020-04-28T16:17:04.000Z
2020-04-28T16:17:04.000Z
actions/gigawackelarm.py
Mymineplays/ExtendedKawaii-DiscordBot
4f9304e45414a9cb99492f7aafa31c9bd6730486
[ "MIT" ]
2
2020-08-06T05:10:48.000Z
2020-11-29T00:16:18.000Z
actions/gigawackelarm.py
Mymineplays/ExtendedKawaii-DiscordBot
4f9304e45414a9cb99492f7aafa31c9bd6730486
[ "MIT" ]
3
2020-05-20T20:47:58.000Z
2022-03-03T20:27:22.000Z
import discord import random from helpers import get_gif commands = ["gigawackelarm"] requires_mention = False accepts_mention = True description = "*waves fouriouslyer*" async def execute(message): await message.channel.send("<a:wackelarm:721807816221786323>"*9)
20.615385
65
0.791045
import discord import random from helpers import get_gif commands = ["gigawackelarm"] requires_mention = False accepts_mention = True description = "*waves fouriouslyer*" async def execute(message): await message.channel.send("<a:wackelarm:721807816221786323>"*9)
true
true
f75cc59345c2cfa3ed6f2042ef5ca6539f00464b
89,646
py
Python
src/borg/helpers.py
yzr95924/borg
fcf62872fb0028a43d103e9dc322642fe80334e9
[ "BSD-3-Clause" ]
null
null
null
src/borg/helpers.py
yzr95924/borg
fcf62872fb0028a43d103e9dc322642fe80334e9
[ "BSD-3-Clause" ]
null
null
null
src/borg/helpers.py
yzr95924/borg
fcf62872fb0028a43d103e9dc322642fe80334e9
[ "BSD-3-Clause" ]
null
null
null
import argparse import contextlib import collections import enum import errno import grp import hashlib import logging import io import json import os import os.path import platform import pwd import re import shlex import signal import socket import stat import subprocess import sys import textwrap import time import ...
36.367546
130
0.614818
import argparse import contextlib import collections import enum import errno import grp import hashlib import logging import io import json import os import os.path import platform import pwd import re import shlex import signal import socket import stat import subprocess import sys import textwrap import time import ...
true
true
f75cc602c3322976edfd433d90a33f6fa1ccf6d1
4,820
py
Python
sp_api/base/credential_provider.py
Guerri114/python-amazon-sp-api
79a7e0b12052982cc49652c3e5693684ceaaa78b
[ "MIT" ]
1
2021-04-18T08:18:24.000Z
2021-04-18T08:18:24.000Z
sp_api/base/credential_provider.py
Guerri114/python-amazon-sp-api
79a7e0b12052982cc49652c3e5693684ceaaa78b
[ "MIT" ]
null
null
null
sp_api/base/credential_provider.py
Guerri114/python-amazon-sp-api
79a7e0b12052982cc49652c3e5693684ceaaa78b
[ "MIT" ]
null
null
null
import json import os import confuse import boto3 from botocore.exceptions import ClientError from cachetools import Cache class MissingCredentials(Exception): """ Credentials are missing, see the error output to find possible causes """ pass class CredentialProvider: credentials = None cach...
37.952756
109
0.590041
import json import os import confuse import boto3 from botocore.exceptions import ClientError from cachetools import Cache class MissingCredentials(Exception): pass class CredentialProvider: credentials = None cache = Cache(maxsize=10) def __init__(self, account='default', credentials=None): ...
true
true
f75cc629a252ee9d7d93f7e1a976bbd4abc93c52
6,388
py
Python
dl_lib/network/generator/centernet_gt.py
alex9954/CenterNet-better
41f2c402ecb089f563fae7201143227492f64cc6
[ "Apache-2.0" ]
2
2021-02-07T06:16:08.000Z
2021-04-30T02:55:28.000Z
dl_lib/network/generator/centernet_gt.py
alex9954/CenterNet-better
41f2c402ecb089f563fae7201143227492f64cc6
[ "Apache-2.0" ]
null
null
null
dl_lib/network/generator/centernet_gt.py
alex9954/CenterNet-better
41f2c402ecb089f563fae7201143227492f64cc6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # -*- coding:utf-8 -*- # author: wangfeng19950315@163.com import numpy as np import torch class CenterNetGT(object): @staticmethod def generate(config, batched_input): box_scale = 1 / config.MODEL.CENTERNET.DOWN_SCALE num_classes = config.MODEL.CENTERNET.NUM_CLASSES ...
41.212903
109
0.569349
import numpy as np import torch class CenterNetGT(object): @staticmethod def generate(config, batched_input): box_scale = 1 / config.MODEL.CENTERNET.DOWN_SCALE num_classes = config.MODEL.CENTERNET.NUM_CLASSES output_size = config.INPUT.OUTPUT_SIZE min_overlap = config.MODEL.C...
true
true
f75cc64964e66db4c2288a6aa7c53b68912511a4
2,242
py
Python
extensions/ext.py
PyCN/pulsar
fee44e871954aa6ca36d00bb5a3739abfdb89b26
[ "BSD-3-Clause" ]
1,410
2015-01-02T14:55:07.000Z
2022-03-28T17:22:06.000Z
extensions/ext.py
PyCN/pulsar
fee44e871954aa6ca36d00bb5a3739abfdb89b26
[ "BSD-3-Clause" ]
194
2015-01-22T06:18:24.000Z
2020-10-20T21:21:58.000Z
extensions/ext.py
PyCN/pulsar
fee44e871954aa6ca36d00bb5a3739abfdb89b26
[ "BSD-3-Clause" ]
168
2015-01-31T10:29:55.000Z
2022-03-14T10:22:24.000Z
# # Required by Cython to build Hiredis extensions # import os import sys from distutils.extension import Extension from distutils.command.build_ext import build_ext from distutils.errors import (CCompilerError, DistutilsExecError, DistutilsPlatformError) path = os.path.join('extensions',...
29.893333
76
0.601695
import os import sys from distutils.extension import Extension from distutils.command.build_ext import build_ext from distutils.errors import (CCompilerError, DistutilsExecError, DistutilsPlatformError) path = os.path.join('extensions', 'lib') ext_file = os.path.join(path, 'clib.c') ext_e...
true
true
f75cc69d06cfb1f6ba5d4fe85377edbae0e4084a
2,862
py
Python
libraries/colors/favorites.py
est/nodebox-gl
f1909a7a4ebc55c8ba254f92e25acb26e8cf1f1d
[ "BSD-3-Clause" ]
1
2015-09-29T14:22:49.000Z
2015-09-29T14:22:49.000Z
libraries/colors/favorites.py
est/nodebox-gl
f1909a7a4ebc55c8ba254f92e25acb26e8cf1f1d
[ "BSD-3-Clause" ]
1
2015-09-29T14:23:35.000Z
2015-09-30T02:33:13.000Z
libraries/colors/favorites.py
est/nodebox-gl
f1909a7a4ebc55c8ba254f92e25acb26e8cf1f1d
[ "BSD-3-Clause" ]
null
null
null
data = { "superfolia": ("grass weed moss root natural organic deep dark", [(0.57, 0.57, 0.44, 1.00), (0.29, 0.27, 0.08, 1.00), (0.16, 0.16, 0.05, 1.00), (0.00, 0.00, 0.00, 1.00), ]), "evolution": ("sea underwater intelligent subtle soft", ...
27.786408
65
0.400419
data = { "superfolia": ("grass weed moss root natural organic deep dark", [(0.57, 0.57, 0.44, 1.00), (0.29, 0.27, 0.08, 1.00), (0.16, 0.16, 0.05, 1.00), (0.00, 0.00, 0.00, 1.00), ]), "evolution": ("sea underwater intelligent subtle soft", ...
true
true
f75cc69ec7dc308f121674803cdaf343e4e5c769
21,781
py
Python
test/functional/wallet_importmulti.py
rishabhworking/colombo
ce34132a1647677a691ce66110d5208f47d62f18
[ "MIT" ]
1
2019-10-21T16:07:05.000Z
2019-10-21T16:07:05.000Z
test/functional/wallet_importmulti.py
rishabhworking/colombo
ce34132a1647677a691ce66110d5208f47d62f18
[ "MIT" ]
1
2019-11-24T12:14:53.000Z
2019-11-24T12:33:07.000Z
test/functional/wallet_importmulti.py
rishabhworking/colombo
ce34132a1647677a691ce66110d5208f47d62f18
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2018 The Bitcoin Core developers # Copyright (c) 2017 The Raven Core developers # Copyright (c) 2018 The Colombo Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the imp...
48.081678
137
0.63055
from test_framework.test_framework import ColomboTestFramework from test_framework.util import * class ImportMultiTest (ColomboTestFramework): def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True def setup_network(self): self.setup_nodes() def run_test (self...
true
true
f75cc7144c5b329f51ea1cec0b457ea48b3beeb0
12,609
py
Python
tests/stitcher_bidding_test.py
tmetsch/graph_sticher
45b058813f39a5f4c13c01b159197f14e4a45745
[ "MIT" ]
11
2016-04-20T07:11:36.000Z
2022-01-23T16:51:01.000Z
tests/stitcher_bidding_test.py
tmetsch/graph_sticher
45b058813f39a5f4c13c01b159197f14e4a45745
[ "MIT" ]
null
null
null
tests/stitcher_bidding_test.py
tmetsch/graph_sticher
45b058813f39a5f4c13c01b159197f14e4a45745
[ "MIT" ]
3
2016-04-20T07:11:38.000Z
2017-09-14T10:19:23.000Z
""" Unittest for the bidding module. """ import logging import unittest import networkx as nx from stitcher import bidding FORMAT = "%(asctime)s - %(filename)s - %(lineno)s - " \ "%(levelname)s - %(message)s" logging.basicConfig(format=FORMAT, level=logging.DEBUG) class EntityTest(unittest.TestCase): ...
42.742373
78
0.515743
import logging import unittest import networkx as nx from stitcher import bidding FORMAT = "%(asctime)s - %(filename)s - %(lineno)s - " \ "%(levelname)s - %(message)s" logging.basicConfig(format=FORMAT, level=logging.DEBUG) class EntityTest(unittest.TestCase): def setUp(self): self.map = {'t...
true
true
f75cc72590443e2471df61a45f0d3f762f2d266f
185
py
Python
locale/pot/api/core/_autosummary/pyvista-DataSet-array_names-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
4
2020-08-07T08:19:19.000Z
2020-12-04T09:51:11.000Z
locale/pot/api/core/_autosummary/pyvista-UnstructuredGrid-array_names-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
19
2020-08-06T00:24:30.000Z
2022-03-30T19:22:24.000Z
locale/pot/api/core/_autosummary/pyvista-StructuredGrid-array_names-1.py
tkoyama010/pyvista-doc-translations
23bb813387b7f8bfe17e86c2244d5dd2243990db
[ "MIT" ]
1
2021-03-09T07:50:40.000Z
2021-03-09T07:50:40.000Z
# Return the array names for a mesh. # import pyvista mesh = pyvista.Sphere() mesh.point_data['my_array'] = range(mesh.n_points) mesh.array_names # Expected: ## ['my_array', 'Normals']
20.555556
50
0.724324
import pyvista mesh = pyvista.Sphere() mesh.point_data['my_array'] = range(mesh.n_points) mesh.array_names
true
true
f75cc74f2ca5ccc79da8af6cacffc7ebb4bbd8ed
3,972
py
Python
setup.py
vitsyrovat/wfs-sentinelhub
c7b0818cbd2a6c31b97249deef28b79b0ba14c11
[ "MIT" ]
null
null
null
setup.py
vitsyrovat/wfs-sentinelhub
c7b0818cbd2a6c31b97249deef28b79b0ba14c11
[ "MIT" ]
null
null
null
setup.py
vitsyrovat/wfs-sentinelhub
c7b0818cbd2a6c31b97249deef28b79b0ba14c11
[ "MIT" ]
null
null
null
import io import os from setuptools import setup, find_packages def parse_requirements(file): required_packages = [] with open(os.path.join(os.path.dirname(__file__), file)) as req_file: for line in req_file: if '/' not in line: required_packages.append(line.strip()) re...
35.150442
120
0.643505
import io import os from setuptools import setup, find_packages def parse_requirements(file): required_packages = [] with open(os.path.join(os.path.dirname(__file__), file)) as req_file: for line in req_file: if '/' not in line: required_packages.append(line.strip()) re...
true
true
f75cc77a6bad3bb9ed2ef6da238eafe3bfcd958b
10,818
py
Python
openpeerpower/components/netatmo/camera.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/netatmo/camera.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/netatmo/camera.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Support for the Netatmo cameras.""" import logging import aiohttp import pyatmo import voluptuous as vol from openpeerpower.components.camera import SUPPORT_STREAM, Camera from openpeerpower.core import callback from openpeerpower.exceptions import PlatformNotReady from openpeerpower.helpers import config_validati...
32.10089
96
0.610741
import logging import aiohttp import pyatmo import voluptuous as vol from openpeerpower.components.camera import SUPPORT_STREAM, Camera from openpeerpower.core import callback from openpeerpower.exceptions import PlatformNotReady from openpeerpower.helpers import config_validation as cv, entity_platform from openpeer...
true
true
f75cc7d799609cdff21e393d3d0511733af16064
6,111
py
Python
SimpliSafe/packet_decoder.py
iamarkaj/poc
983dcf94577b1a041f304c8e0537b670c0c18655
[ "BSD-3-Clause" ]
1,007
2018-09-17T16:13:26.000Z
2022-03-29T00:19:42.000Z
SimpliSafe/packet_decoder.py
iamarkaj/poc
983dcf94577b1a041f304c8e0537b670c0c18655
[ "BSD-3-Clause" ]
5
2018-11-11T09:54:27.000Z
2020-06-24T22:59:49.000Z
SimpliSafe/packet_decoder.py
iamarkaj/poc
983dcf94577b1a041f304c8e0537b670c0c18655
[ "BSD-3-Clause" ]
325
2018-09-18T04:44:53.000Z
2022-03-30T18:08:13.000Z
import crcmod from Crypto.Cipher import AES import binascii def lsfr(buf, feedback): new_buf = '' buf_len = len(buf) if((ord(buf[buf_len - 1]) & 0x01) == 1): feedback = True for i in range(buf_len - 1, -1, -1): tmp = ord(buf[i]) >> 1 if(i>0): if((ord(buf[i-1]) & 0x01) == 1): tmp = ...
32.333333
112
0.581738
import crcmod from Crypto.Cipher import AES import binascii def lsfr(buf, feedback): new_buf = '' buf_len = len(buf) if((ord(buf[buf_len - 1]) & 0x01) == 1): feedback = True for i in range(buf_len - 1, -1, -1): tmp = ord(buf[i]) >> 1 if(i>0): if((ord(buf[i-1]) & 0x01) == 1): tmp = ...
true
true
f75cc8d5c191b562da4139ca9887ddadd3848365
11,782
py
Python
tests/mysql/test_mysql.py
ToucanToco/toucan-connectors
ca7e551f728bb5350d550eb099cab569c9238550
[ "BSD-3-Clause" ]
15
2018-04-24T08:14:19.000Z
2021-08-01T17:48:56.000Z
tests/mysql/test_mysql.py
ToucanToco/toucan-connectors
ca7e551f728bb5350d550eb099cab569c9238550
[ "BSD-3-Clause" ]
281
2018-03-29T23:11:26.000Z
2022-02-15T17:29:11.000Z
tests/mysql/test_mysql.py
ToucanToco/toucan-connectors
ca7e551f728bb5350d550eb099cab569c9238550
[ "BSD-3-Clause" ]
14
2019-02-07T14:55:22.000Z
2021-11-25T09:12:23.000Z
import collections import numpy as np import pandas as pd import pymysql import pytest from pydantic import ValidationError from pytest_mock import MockerFixture from toucan_connectors.common import ConnectorStatus from toucan_connectors.mysql.mysql_connector import MySQLConnector, MySQLDataSource, handle_date_0 @p...
30.923885
98
0.611781
import collections import numpy as np import pandas as pd import pymysql import pytest from pydantic import ValidationError from pytest_mock import MockerFixture from toucan_connectors.common import ConnectorStatus from toucan_connectors.mysql.mysql_connector import MySQLConnector, MySQLDataSource, handle_date_0 @p...
true
true
f75cc9e89df010613ce5956dddaf9569aae717f8
7,683
py
Python
test/functional/test_framework/test_node.py
terracash/terracash
05359d82950bf8bea6d1cb19b53a9b00e6e59e9f
[ "MIT" ]
null
null
null
test/functional/test_framework/test_node.py
terracash/terracash
05359d82950bf8bea6d1cb19b53a9b00e6e59e9f
[ "MIT" ]
null
null
null
test/functional/test_framework/test_node.py
terracash/terracash
05359d82950bf8bea6d1cb19b53a9b00e6e59e9f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for terracashd node under test""" import decimal import errno import http.client import json import l...
40.225131
248
0.640895
import decimal import errno import http.client import json import logging import os import subprocess import time from .util import ( assert_equal, get_rpc_proxy, rpc_url, wait_until, ) from .authproxy import JSONRPCException BITCOIND_PROC_WAIT_TIMEOUT = 60 class TestNode(): def __init__(self, ...
true
true
f75ccb1c7fa165fcd534bb53002f08053b83f212
9,200
py
Python
ItemList.py
ShadoMagi/OoT-Randomizer
f9abb00a299e2f50f52fee4962047f8ab7f84975
[ "MIT" ]
null
null
null
ItemList.py
ShadoMagi/OoT-Randomizer
f9abb00a299e2f50f52fee4962047f8ab7f84975
[ "MIT" ]
null
null
null
ItemList.py
ShadoMagi/OoT-Randomizer
f9abb00a299e2f50f52fee4962047f8ab7f84975
[ "MIT" ]
null
null
null
from collections import namedtuple import logging import random from Items import ItemFactory from Fill import FillError, fill_restrictive #This file sets the item pools for various modes. Timed modes and triforce hunt are enforced first, and then extra items are specified per mode to fill in the remaining spa...
69.69697
519
0.66
from collections import namedtuple import logging import random from Items import ItemFactory from Fill import FillError, fill_restrictive alwaysitems = (['Kokiri Sword', 'Biggoron Sword', 'Boomerang', 'Lens of Truth', 'Hammer', 'Iron Boots', 'Goron Tunic', 'Zora Tunic', 'Hover Boots', 'Mirror Shield', 'Ston...
true
true
f75ccb63174e31963124eb9ba4ef1016bc816e5f
16,809
py
Python
ssds_train.py
xiaollz/PytorchSSD
8286027b3216a53ae336b0d243d9352572de5350
[ "MIT" ]
null
null
null
ssds_train.py
xiaollz/PytorchSSD
8286027b3216a53ae336b0d243d9352572de5350
[ "MIT" ]
null
null
null
ssds_train.py
xiaollz/PytorchSSD
8286027b3216a53ae336b0d243d9352572de5350
[ "MIT" ]
1
2021-03-05T08:43:47.000Z
2021-03-05T08:43:47.000Z
from __future__ import print_function import numpy as np import os import sys import cv2 import random import pickle import torch import torch.backends.cudnn as cudnn from torch.autograd import Variable import torch.optim as optim from torch.optim import lr_scheduler import torch.utils.data as data import torch.nn.ini...
40.798544
155
0.594027
from __future__ import print_function import numpy as np import os import sys import cv2 import random import pickle import torch import torch.backends.cudnn as cudnn from torch.autograd import Variable import torch.optim as optim from torch.optim import lr_scheduler import torch.utils.data as data import torch.nn.ini...
true
true
f75ccb881fd9c43012991bf797a3c4c689e10fd4
5,093
py
Python
isp_unify_template.py
samye760/GDP-Map
ff9afcfd16927e3752e0441f779878347469d803
[ "MIT" ]
null
null
null
isp_unify_template.py
samye760/GDP-Map
ff9afcfd16927e3752e0441f779878347469d803
[ "MIT" ]
null
null
null
isp_unify_template.py
samye760/GDP-Map
ff9afcfd16927e3752e0441f779878347469d803
[ "MIT" ]
null
null
null
""" Script that creates a visual map in browser based off of world GDP data based on year given by user. """ import csv import math import pygal def read_csv_as_nested_dict(filename, keyfield, separator, quote): """ Inputs: filename - Name of CSV file keyfield - Field to use as key for rows ...
34.883562
90
0.670135
import csv import math import pygal def read_csv_as_nested_dict(filename, keyfield, separator, quote): with open(filename, 'r', newline = '') as csvfile: reader = csv.DictReader(csvfile, delimiter = separator, quotechar = quote) nested_countries = {} for country in reader: nest...
true
true
f75ccc3f865c4154055f332c46045112ac00b7c4
1,477
py
Python
Recorder/AlipayRecorder.py
Sijiu/Xbill
b4f18d3e7db3b17ed4ccddc6a8971c25931428eb
[ "MIT" ]
14
2020-03-15T13:40:02.000Z
2021-06-15T18:04:08.000Z
Recorder/AlipayRecorder.py
Sijiu/Xbill
b4f18d3e7db3b17ed4ccddc6a8971c25931428eb
[ "MIT" ]
1
2020-05-24T13:14:46.000Z
2020-05-24T13:14:46.000Z
Recorder/AlipayRecorder.py
Sijiu/Xbill
b4f18d3e7db3b17ed4ccddc6a8971c25931428eb
[ "MIT" ]
3
2020-05-05T00:23:36.000Z
2021-06-10T01:18:16.000Z
from typing import NoReturn from Recorder.BaseRecorder import BaseRecorder from Config.const import BillStatus from Models.AlipayBill import AlipayBill class AlipayRecorder(BaseRecorder): def __init__(self, rows): super(AlipayRecorder, self).__init__(rows, AlipayBill) @classmethod def update_sa...
41.027778
100
0.567366
from typing import NoReturn from Recorder.BaseRecorder import BaseRecorder from Config.const import BillStatus from Models.AlipayBill import AlipayBill class AlipayRecorder(BaseRecorder): def __init__(self, rows): super(AlipayRecorder, self).__init__(rows, AlipayBill) @classmethod def update_sa...
true
true
f75ccc5c417d65e02d3d0d539b0d005156a00191
6,361
py
Python
env/lib/python3.5/site-packages/gpiozero/exc.py
creekhead/RPI_google_asst
65dc7b08bb8333f8977488f37f7d3ec652489a44
[ "Apache-2.0" ]
1
2020-06-29T18:03:18.000Z
2020-06-29T18:03:18.000Z
env/lib/python3.5/site-packages/gpiozero/exc.py
creekhead/RPI_google_asst
65dc7b08bb8333f8977488f37f7d3ec652489a44
[ "Apache-2.0" ]
null
null
null
env/lib/python3.5/site-packages/gpiozero/exc.py
creekhead/RPI_google_asst
65dc7b08bb8333f8977488f37f7d3ec652489a44
[ "Apache-2.0" ]
1
2020-06-29T18:03:19.000Z
2020-06-29T18:03:19.000Z
from __future__ import ( unicode_literals, print_function, absolute_import, division, ) str = type('') class GPIOZeroError(Exception): "Base class for all exceptions in GPIO Zero" class DeviceClosed(GPIOZeroError): "Error raised when an operation is attempted on a closed device" class BadEve...
37.639053
114
0.789184
from __future__ import ( unicode_literals, print_function, absolute_import, division, ) str = type('') class GPIOZeroError(Exception): class DeviceClosed(GPIOZeroError): class BadEventHandler(GPIOZeroError, ValueError): class BadWaitTime(GPIOZeroError, ValueError): class BadQueueLen(GPIOZeroError,...
true
true
f75ccd7453a1cc620fdfda99d942dc18bf47f1a1
957
py
Python
test/test_cves_api.py
hi-artem/twistlock-py
9888e905f5b9d3cc00f9b84244588c0992f8e4f4
[ "RSA-MD" ]
null
null
null
test/test_cves_api.py
hi-artem/twistlock-py
9888e905f5b9d3cc00f9b84244588c0992f8e4f4
[ "RSA-MD" ]
null
null
null
test/test_cves_api.py
hi-artem/twistlock-py
9888e905f5b9d3cc00f9b84244588c0992f8e4f4
[ "RSA-MD" ]
null
null
null
# coding: utf-8 """ Prisma Cloud Compute API No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: 21.04.439 Generated by: https://openapi-generator.tech """ from __future__ import absolute_impor...
20.804348
124
0.6907
from __future__ import absolute_import import unittest import openapi_client from openapi_client.api.cves_api import CvesApi from openapi_client.rest import ApiException class TestCvesApi(unittest.TestCase): def setUp(self): self.api = openapi_client.api.cves_api.CvesApi() def tearDown(self):...
true
true
f75cce4a8d87a7508a73db221f7deeed02e963be
430
py
Python
lesson 6/question 4.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
2
2021-08-10T18:16:08.000Z
2021-09-26T19:49:26.000Z
lesson 6/question 4.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
lesson 6/question 4.py
Kev-in123/ICS2O7
425c59975d4ce6aa0937fd8715b51d04487e4fa9
[ "MIT" ]
null
null
null
PST = 0.07 GST = 0.06 price = float(input("what is the price of the item: ")) taxable = input("is this item taxable? ") if taxable == "yes": pst = PST * price gst = GST * price print(f"the price is {price}") print(f"the pst of this item is {pst:.2f}") print(f"the gst of this item is {gst:.2f}") ...
25.294118
65
0.6
PST = 0.07 GST = 0.06 price = float(input("what is the price of the item: ")) taxable = input("is this item taxable? ") if taxable == "yes": pst = PST * price gst = GST * price print(f"the price is {price}") print(f"the pst of this item is {pst:.2f}") print(f"the gst of this item is {gst:.2f}") ...
true
true
f75ccfeba35d646ee7f3b35118f6914f2904cf56
103
py
Python
classification/apps.py
andreped/annotationweb
80b0e96a4dbefdc39a83e6cf9ffb0b623cf417ee
[ "MIT" ]
5
2021-01-14T03:34:42.000Z
2022-03-07T15:34:18.000Z
classification/apps.py
andreped/annotationweb
80b0e96a4dbefdc39a83e6cf9ffb0b623cf417ee
[ "MIT" ]
551
2020-10-19T00:02:38.000Z
2022-03-30T02:18:22.000Z
backend/classification/apps.py
linea-it/manga
e3b3a060cad55ca8549b6f874a959aab5096f226
[ "MIT" ]
1
2022-02-23T22:50:37.000Z
2022-02-23T22:50:37.000Z
from django.apps import AppConfig class ClassificationConfig(AppConfig): name = 'classification'
17.166667
38
0.786408
from django.apps import AppConfig class ClassificationConfig(AppConfig): name = 'classification'
true
true
f75cd0aafc4a41e0e2ee8e4f2e6693f60829d0fe
5,284
py
Python
tensorflow_probability/python/distributions/lognormal_test.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
2
2020-02-21T06:30:00.000Z
2021-08-08T19:29:15.000Z
tensorflow_probability/python/distributions/lognormal_test.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/lognormal_test.py
brianwa84/probability
6f8e78d859ac41170be5147c8c7bde54cc5aa83e
[ "Apache-2.0" ]
1
2020-05-31T13:08:33.000Z
2020-05-31T13:08:33.000Z
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
38.289855
79
0.650454
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow.compat.v2 as tf from tensorflow_probability.python import distributions as tfd from tensorflow_probability.python.internal import test_util @test_util.test_all_tf_execut...
true
true
f75cd14da1a84f980f083edd4ee77f5c7c88d296
2,601
py
Python
my_bilibili/my_Bilibili.py
WuJunkai2004/Pynet
83263e65cf7cdc4e75c4335dce1173f844eda04e
[ "CNRI-Python" ]
1
2020-07-08T02:47:41.000Z
2020-07-08T02:47:41.000Z
my_bilibili/my_Bilibili.py
WuJunkai2004/python-objects
83263e65cf7cdc4e75c4335dce1173f844eda04e
[ "CNRI-Python" ]
null
null
null
my_bilibili/my_Bilibili.py
WuJunkai2004/python-objects
83263e65cf7cdc4e75c4335dce1173f844eda04e
[ "CNRI-Python" ]
null
null
null
# !/user/bin/python # coding=utf-8 from __future__ import print_function import urllib import time import os import re try: from my_net import net except ImportError: raise ImportError('Sorry, can not find \'my_net\' .\nPlease view https://github.com/WuJunkai2004/Pyself/blob/master/my_net/my_net.py to downlo...
29.224719
152
0.510188
from __future__ import print_function import urllib import time import os import re try: from my_net import net except ImportError: raise ImportError('Sorry, can not find \'my_net\' .\nPlease view https://github.com/WuJunkai2004/Pyself/blob/master/my_net/my_net.py to download .') __author__ ='Wu Ju...
true
true
f75cd1bdd2ae58ce0a4b698ca6206b976097a8d5
418
py
Python
packages/python/plotly/plotly/validators/scatter3d/projection/y/_show.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/projection/y/_show.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
packages/python/plotly/plotly/validators/scatter3d/projection/y/_show.py
mastermind88/plotly.py
efa70710df1af22958e1be080e105130042f1839
[ "MIT" ]
null
null
null
import _plotly_utils.basevalidators class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="show", parent_name="scatter3d.projection.y", **kwargs ): super(ShowValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
29.857143
80
0.650718
import _plotly_utils.basevalidators class ShowValidator(_plotly_utils.basevalidators.BooleanValidator): def __init__( self, plotly_name="show", parent_name="scatter3d.projection.y", **kwargs ): super(ShowValidator, self).__init__( plotly_name=plotly_name, parent_name=pa...
true
true
f75cd267099b6213a20616533aa17ed94ed263a7
986
py
Python
missing_positive_int.py
codecakes/random_games
1e670021ec97a196726e937e658878dc63ba9d34
[ "MIT" ]
null
null
null
missing_positive_int.py
codecakes/random_games
1e670021ec97a196726e937e658878dc63ba9d34
[ "MIT" ]
null
null
null
missing_positive_int.py
codecakes/random_games
1e670021ec97a196726e937e658878dc63ba9d34
[ "MIT" ]
null
null
null
""" Write a function: def solution(A) that, given a non-empty zero-indexed array A of N integers, returns the minimal positive integer that does not occur in A. For example, given: A[0] = 1 A[1] = 3 A[2] = 6 A[3] = 4 A[4] = 1 A[5] = 2 the function should return 5. Assume that: N is an i...
20.978723
131
0.605477
def solution(A): ln = len(A)+1 has = [0] * ln for num in A: if 1 <= num <= ln: has[num-1] = 1 for index in xrange(ln): if has[index] == 0: return index+1 return 0
true
true
f75cd26fbb3b1682d3bd2a80e4062c5beec2156a
5,701
py
Python
tests/test_feature.py
Patil2099/dffml
9310c1ad55a7339e5d15786d4b9d890283f52ec2
[ "MIT" ]
null
null
null
tests/test_feature.py
Patil2099/dffml
9310c1ad55a7339e5d15786d4b9d890283f52ec2
[ "MIT" ]
1
2019-10-17T17:34:14.000Z
2019-10-17T17:34:14.000Z
tests/test_feature.py
raghav-ys/dffml
2a23f55acaac69c7a1840260b0ede694216c2007
[ "MIT" ]
null
null
null
# SPDX-License-Identifier: MIT # Copyright (c) 2019 Intel Corporation import asyncio import unittest from unittest.mock import patch from dffml.feature import Data, Feature, Features, LoggingDict, DefFeature from dffml.util.asynctestcase import AsyncTestCase class SingleFeature(Feature): def dtype(self): ...
30.650538
78
0.638309
import asyncio import unittest from unittest.mock import patch from dffml.feature import Data, Feature, Features, LoggingDict, DefFeature from dffml.util.asynctestcase import AsyncTestCase class SingleFeature(Feature): def dtype(self): return bool def length(self): return 1 class OneFeat...
true
true
f75cd2e20bc369b0db2b47f89d3c43cc6aeab6bb
33,690
py
Python
topi/tests/python/test_topi_transform.py
ktaebum/npex_tvm
b7c0f12bbc3779f9041ff129019134a055b2dcd4
[ "Apache-2.0" ]
null
null
null
topi/tests/python/test_topi_transform.py
ktaebum/npex_tvm
b7c0f12bbc3779f9041ff129019134a055b2dcd4
[ "Apache-2.0" ]
null
null
null
topi/tests/python/test_topi_transform.py
ktaebum/npex_tvm
b7c0f12bbc3779f9041ff129019134a055b2dcd4
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.858131
105
0.597269
import numpy as np import tvm import topi import topi.testing from common import get_all_backend def verify_feature_flatten(in_shape, KH, KW, S): A = tvm.placeholder(shape=in_shape, name="A") B = topi.nn.feature_flatten(A, KH, KW, S) N, C, H, W = A.shape N = int(N) C = int(C) H = int(H) W ...
true
true
f75cd31df52ef1fea90079aeb5789407c25bfe4c
7,832
py
Python
wntr/scenario/earthquake.py
algchyhao/WNTR
dd4db188a8641a4da16cf80a1557c908fa48c17d
[ "BSD-3-Clause" ]
null
null
null
wntr/scenario/earthquake.py
algchyhao/WNTR
dd4db188a8641a4da16cf80a1557c908fa48c17d
[ "BSD-3-Clause" ]
null
null
null
wntr/scenario/earthquake.py
algchyhao/WNTR
dd4db188a8641a4da16cf80a1557c908fa48c17d
[ "BSD-3-Clause" ]
null
null
null
""" The wntr.scenario.earthquake module includes methods to define an earthquake location, magnitude and depth, and compute PGA, PGV, and repair rate. """ from __future__ import print_function import wntr import numpy as np import pandas as pd from scipy.spatial import distance class Earthquake(object): """ Ea...
33.470085
168
0.554775
from __future__ import print_function import wntr import numpy as np import pandas as pd from scipy.spatial import distance class Earthquake(object): def __init__(self, epicenter, magnitude, depth): self.epicenter = epicenter self.magnitude = magnitude self.depth = depth def distance_...
true
true
f75cd33af61918f4086026a5a6bf1ea4adb7de6d
2,399
py
Python
nels-test-integration/test_move.py
elixir-no-nels/nels-core
b7988f3b85456c7c55064a20ca7d832083a3c51d
[ "Apache-2.0" ]
3
2018-05-16T10:44:38.000Z
2020-12-24T10:53:41.000Z
nels-test-integration/test_move.py
elixir-no-nels/nels-core
b7988f3b85456c7c55064a20ca7d832083a3c51d
[ "Apache-2.0" ]
13
2021-12-10T00:51:17.000Z
2022-02-16T00:55:20.000Z
nels-test-integration/test_move.py
elixir-no-nels/nels-core
b7988f3b85456c7c55064a20ca7d832083a3c51d
[ "Apache-2.0" ]
null
null
null
''' Created on Feb 28, 2017 @author: kidane ''' from os import path from optparse import OptionParser from utils import feed_utils, args_utils,ssh_utils, run_utils from api import storage, job import config def test_move(nels_id): feed_utils.heading("move use case. nels_id: %s" % nels_id) credentail = ...
32.863014
118
0.673614
from os import path from optparse import OptionParser from utils import feed_utils, args_utils,ssh_utils, run_utils from api import storage, job import config def test_move(nels_id): feed_utils.heading("move use case. nels_id: %s" % nels_id) credentail = ssh_utils.get_ssh_credentials(nels_id) if not...
true
true
f75cd35d72afae1461a01fa41d97424b479e7330
2,946
py
Python
infra/bots/recipes/calmbench.py
despairblue/esy-skia
1c81aac298602f8e872c1079db92868199b6394f
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
infra/bots/recipes/calmbench.py
despairblue/esy-skia
1c81aac298602f8e872c1079db92868199b6394f
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
infra/bots/recipes/calmbench.py
despairblue/esy-skia
1c81aac298602f8e872c1079db92868199b6394f
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Recipe module for Skia Swarming calmbench. DEPS = [ 'core', 'flavor', 'recipe_engine/context', 'recipe_engine/file', 'recipe_engine/path', 'r...
31.340426
79
0.588934
DEPS = [ 'core', 'flavor', 'recipe_engine/context', 'recipe_engine/file', 'recipe_engine/path', 'recipe_engine/properties', 'recipe_engine/python', 'recipe_engine/raw_io', 'recipe_engine/step', 'recipe_engine/time', 'run', 'vars', ] def RunSteps(api): api.vars.setup() api.file.ensure_dir...
true
true
f75cd3fc14fa55a6d6ceeb9d1c1fd69a1200eb18
404
py
Python
2019/01/part1.py
keydon/adventOfCode
75aa10535e5ff5a28a7ce2f1b6c1d88bb2cb5647
[ "MIT" ]
null
null
null
2019/01/part1.py
keydon/adventOfCode
75aa10535e5ff5a28a7ce2f1b6c1d88bb2cb5647
[ "MIT" ]
null
null
null
2019/01/part1.py
keydon/adventOfCode
75aa10535e5ff5a28a7ce2f1b6c1d88bb2cb5647
[ "MIT" ]
null
null
null
import itertools fp = open('/code/input01.txt', 'r') content = fp.readlines() lines = [x.strip() for x in content] numbers = [int(x) for x in lines] divided = [int(x/3) for x in numbers] subs = [int(x-2) for x in divided] sum(subs) #part2 def calc_fuel(x): fuel = int(x/3) - 2 if fuel > 0: return fuel + calc_fu...
20.2
40
0.64604
import itertools fp = open('/code/input01.txt', 'r') content = fp.readlines() lines = [x.strip() for x in content] numbers = [int(x) for x in lines] divided = [int(x/3) for x in numbers] subs = [int(x-2) for x in divided] sum(subs) def calc_fuel(x): fuel = int(x/3) - 2 if fuel > 0: return fuel + calc_fuel(fuel...
true
true
f75cd46b305fa428f1c0d05a8105fb7f24f4b296
1,163
py
Python
data/p2DJ/New/program/pyquil/startPyquil160.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/pyquil/startPyquil160.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p2DJ/New/program/pyquil/startPyquil160.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=2 # total number=11 import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() # circuit begin prog += H(0) # number=1 pr...
22.365385
64
0.604471
import pyquil from pyquil.api import local_forest_runtime, QVMConnection from pyquil import Program, get_qc from pyquil.gates import * import numpy as np conn = QVMConnection() def make_circuit()-> Program: prog = Program() prog += H(0) prog += H(1) prog += CZ(0,1) prog += H(1) prog += Y...
true
true
f75cd47b1b73ba6068bb825d0d18d6c5e415ee91
1,635
py
Python
docs/target/sphinx/sphinx/writers/websupport.py
SergeyParamoshkin/sqoop2
504ad690617d570483e5693464e73aa641f61fb0
[ "Apache-2.0" ]
1
2016-02-10T18:22:42.000Z
2016-02-10T18:22:42.000Z
docs/target/sphinx/sphinx/writers/websupport.py
SergeyParamoshkin/sqoop2
504ad690617d570483e5693464e73aa641f61fb0
[ "Apache-2.0" ]
1
2016-04-19T13:03:17.000Z
2016-04-19T13:03:17.000Z
docs/target/sphinx/sphinx/writers/websupport.py
SergeyParamoshkin/sqoop2
504ad690617d570483e5693464e73aa641f61fb0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.writers.websupport ~~~~~~~~~~~~~~~~~~~~~~~~~ sphinx.websupport writer that adds comment-related annotations. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from sphinx.writers.html import HTMLTranslat...
34.787234
70
0.623853
from sphinx.writers.html import HTMLTranslator from sphinx.util.websupport import is_commentable class WebSupportTranslator(HTMLTranslator): def __init__(self, builder, *args, **kwargs): HTMLTranslator.__init__(self, builder, *args, **kwargs) self.comment_class = 'sphinx-has-comment' def di...
true
true
f75cd4bcb812ae1e9dc56a9539ef9a2415a205f7
981
py
Python
Xana/SaxsAna/phicorr.py
reiserm/Xana
056f2bf2da67ba0dade49bb4b56ea2afd42b36bd
[ "MIT" ]
1
2021-01-25T08:57:57.000Z
2021-01-25T08:57:57.000Z
Xana/SaxsAna/phicorr.py
reiserm/Xana
056f2bf2da67ba0dade49bb4b56ea2afd42b36bd
[ "MIT" ]
21
2020-03-23T12:50:32.000Z
2021-05-07T07:54:38.000Z
Xana/SaxsAna/phicorr.py
reiserm/Xana
056f2bf2da67ba0dade49bb4b56ea2afd42b36bd
[ "MIT" ]
2
2020-03-22T10:31:09.000Z
2020-07-01T14:00:28.000Z
import numpy as np import numpy as np from matplotlib import pyplot as plt from scipy import fftpack as fp def cross_correlation(q): ind = np.argmin(np.abs(q - 0.6)) inten = I2d[:, ind] print("Found %d angles" % len(inten)) phi = chi.copy() N = len(inten) lags = np.arange(-N + 1, N) inte...
23.357143
79
0.574924
import numpy as np import numpy as np from matplotlib import pyplot as plt from scipy import fftpack as fp def cross_correlation(q): ind = np.argmin(np.abs(q - 0.6)) inten = I2d[:, ind] print("Found %d angles" % len(inten)) phi = chi.copy() N = len(inten) lags = np.arange(-N + 1, N) inte...
true
true
f75cd4bf4edc3c52f00cf5c362d6bb0cfd7b1a1a
4,758
py
Python
old/MoCap V0.1.0.py
KougatCylinder5/CAPT
3a4ad2ef73529ae0ce85937070aa15ffc9a3ac8a
[ "CC0-1.0" ]
1
2022-01-03T13:57:18.000Z
2022-01-03T13:57:18.000Z
old/MoCap V0.1.0.py
KougatCylinder5/CAPT
3a4ad2ef73529ae0ce85937070aa15ffc9a3ac8a
[ "CC0-1.0" ]
null
null
null
old/MoCap V0.1.0.py
KougatCylinder5/CAPT
3a4ad2ef73529ae0ce85937070aa15ffc9a3ac8a
[ "CC0-1.0" ]
null
null
null
#Cory Mavis import cv2 import numpy import sys import subprocess import os import statistics cv2.namedWindow("LiveFeed") def callback (event,x,y,flags,params): global blueMark #update the position of the blue point global greenMark #update the position of the green point global redMark #update the positio...
29.924528
181
0.573981
import cv2 import numpy import sys import subprocess import os import statistics cv2.namedWindow("LiveFeed") def callback (event,x,y,flags,params): global blueMark global greenMark global redMark global state global maxred global minred global maxblue global minblue global maxgreen...
true
true
f75cd506d0da36f7de6b1055b402276f65a9f74e
1,696
py
Python
arcade/experimental/video_player.py
DragonMoffon/arcade
98fb1809363ccc537d6852be487aeae0b5fb7fb8
[ "MIT" ]
824
2016-01-07T19:27:57.000Z
2020-08-01T03:15:47.000Z
arcade/experimental/video_player.py
DragonMoffon/arcade
98fb1809363ccc537d6852be487aeae0b5fb7fb8
[ "MIT" ]
646
2016-01-08T02:42:31.000Z
2020-08-03T14:13:27.000Z
arcade/experimental/video_player.py
DragonMoffon/arcade
98fb1809363ccc537d6852be487aeae0b5fb7fb8
[ "MIT" ]
221
2016-01-07T22:36:33.000Z
2020-07-24T23:30:08.000Z
""" Experimental video player using pyglet. This requires that you have ffmpeg installed and you might need to tell pyglet where it's located. """ # import sys import pyglet import arcade class VideoPlayer(arcade.Window): def __init__(self) -> None: super().__init__(800, 600, "Video Player", resizable=T...
30.285714
103
0.62559
import pyglet import arcade class VideoPlayer(arcade.Window): def __init__(self) -> None: super().__init__(800, 600, "Video Player", resizable=True) self.player = pyglet.media.Player() self.player.queue(pyglet.media.load("C:/Users/efors/Desktop/BigBuckBunny.mp4")) self.pl...
true
true
f75cd6daee99b54d9bc4b4596cc1f7cdccd5feb9
2,244
py
Python
attacking_anti_tamper/taint_cpp/extern/keystone/suite/regress/x64_lea_label.py
tum-i4/dta-vs-osc
b39f4d4eb6ffea501025fc3e07622251c2118fe0
[ "MIT" ]
15
2021-12-08T09:53:35.000Z
2022-03-07T10:13:37.000Z
attacking_anti_tamper/taint_cpp/extern/keystone/suite/regress/x64_lea_label.py
archercreat/dta-vs-osc
b39f4d4eb6ffea501025fc3e07622251c2118fe0
[ "MIT" ]
null
null
null
attacking_anti_tamper/taint_cpp/extern/keystone/suite/regress/x64_lea_label.py
archercreat/dta-vs-osc
b39f4d4eb6ffea501025fc3e07622251c2118fe0
[ "MIT" ]
1
2021-12-27T18:01:41.000Z
2021-12-27T18:01:41.000Z
#!/usr/bin/python # Ingmar Steen, 2016 # This is to test label addressing on X86_64 # Github issue: #34 # Author: Ingmar Steen from keystone import * import regress class TestX64NasmLabel(regress.RegressTest): def runTest(self): # Initialize Keystone engine ks = Ks(KS_ARCH_X86, KS_MODE_64) ...
35.0625
98
0.659982
from keystone import * import regress class TestX64NasmLabel(regress.RegressTest): def runTest(self): ks = Ks(KS_ARCH_X86, KS_MODE_64) ks.syntax = KS_OPT_SYNTAX_NASM encoding, count = ks.asm(b"lea rax, [__data]\n__data:") self.assertEqual(encoding, [ 0x...
true
true
f75cd7749f084ddbd32b3d6313aaba1f9497ecbb
3,429
py
Python
hdcs_manager/source/hsm/hsm/openstack/common/exception.py
isabella232/HDCS
1a5ae046e3ff947cc7a42219b9b1959766687612
[ "Apache-2.0" ]
null
null
null
hdcs_manager/source/hsm/hsm/openstack/common/exception.py
isabella232/HDCS
1a5ae046e3ff947cc7a42219b9b1959766687612
[ "Apache-2.0" ]
1
2021-02-23T19:10:26.000Z
2021-02-23T19:10:26.000Z
hdcs_manager/source/hsm/hsm/openstack/common/exception.py
isabella232/HDCS
1a5ae046e3ff947cc7a42219b9b1959766687612
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
27.214286
78
0.669291
""" Exceptions common to OpenStack projects """ import logging from hsm.openstack.common.gettextutils import _ _FATAL_EXCEPTION_FORMAT_ERRORS = False class Error(Exception): def __init__(self, message=None): super(Error, self).__init__(message) class ApiError(Error): def __init__(self, message='U...
false
true
f75cd8d4d0666673e058bdb52ec96210973ca64e
30,474
py
Python
saleor/product/models.py
bennetritters/saleor
f4b0beaf586f15f260d838ddaba45bee5f133e0f
[ "CC-BY-4.0" ]
null
null
null
saleor/product/models.py
bennetritters/saleor
f4b0beaf586f15f260d838ddaba45bee5f133e0f
[ "CC-BY-4.0" ]
null
null
null
saleor/product/models.py
bennetritters/saleor
f4b0beaf586f15f260d838ddaba45bee5f133e0f
[ "CC-BY-4.0" ]
null
null
null
import datetime from typing import TYPE_CHECKING, Iterable, Optional, Union from uuid import uuid4 from django.conf import settings from django.contrib.postgres.aggregates import StringAgg from django.db import models from django.db.models import Case, Count, F, FilteredRelation, Q, Sum, Value, When from django.db.mod...
33.232279
88
0.659283
import datetime from typing import TYPE_CHECKING, Iterable, Optional, Union from uuid import uuid4 from django.conf import settings from django.contrib.postgres.aggregates import StringAgg from django.db import models from django.db.models import Case, Count, F, FilteredRelation, Q, Sum, Value, When from django.db.mod...
true
true
f75cd8f5a14a42679ffc89904cfad766c98326e4
1,976
py
Python
pylark/api_service_drive_folder_children_get.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
7
2021-08-18T00:42:05.000Z
2022-03-14T09:49:15.000Z
pylark/api_service_drive_folder_children_get.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
null
null
null
pylark/api_service_drive_folder_children_get.py
chyroc/pylark
a54cce6b814935fd3c72668b262b54c8ee461484
[ "Apache-2.0" ]
1
2022-03-14T09:49:20.000Z
2022-03-14T09:49:20.000Z
# Code generated by lark_sdk_gen. DO NOT EDIT. from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s class GetDriveFolderChildrenReq(object): types: typing.List[str] = attr.ib( factor...
35.285714
118
0.673583
from pylark.lark_request import RawRequestReq, _new_method_option from pylark import lark_type, lark_type_sheet, lark_type_approval import attr import typing import io @attr.s class GetDriveFolderChildrenReq(object): types: typing.List[str] = attr.ib( factory=lambda: [], metadata={"req_type": "query", "k...
true
true
f75cda18bd75b1dda6cd2700e310ab9b49b0f378
15,760
py
Python
python/simplejson/encoder.py
manicmaniac/openradar
1f0401165f4e5b67b9a06bbdbeb2fc612d6b8e8e
[ "Apache-2.0" ]
264
2015-01-07T18:48:55.000Z
2022-02-07T15:09:59.000Z
badge/simplejson/encoder.py
novas0x2a/devhouse
117b6c7b60e59ceb33ec3e23051545c322219f53
[ "MIT" ]
32
2015-01-12T08:39:16.000Z
2022-03-26T10:30:08.000Z
badge/simplejson/encoder.py
novas0x2a/devhouse
117b6c7b60e59ceb33ec3e23051545c322219f53
[ "MIT" ]
28
2015-04-07T05:26:08.000Z
2022-02-22T09:14:54.000Z
"""Implementation of JSONEncoder """ import re try: from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ...
36.313364
136
0.543084
"""Implementation of JSONEncoder """ import re try: from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ...
false
true
f75cdb61d07dcbc325d91f6080e2b843977ebc03
8,686
py
Python
happo/trainer/happo.py
Code-Papers/MAIPO
2e5b911c7009ac9ad09e7129c7ef0992f2690d04
[ "MIT" ]
null
null
null
happo/trainer/happo.py
Code-Papers/MAIPO
2e5b911c7009ac9ad09e7129c7ef0992f2690d04
[ "MIT" ]
null
null
null
happo/trainer/happo.py
Code-Papers/MAIPO
2e5b911c7009ac9ad09e7129c7ef0992f2690d04
[ "MIT" ]
null
null
null
import numpy as np import random from numpy.core.fromnumeric import clip from numpy.lib.shape_base import vsplit import tensorflow as tf from tensorflow.python.ops.gen_linalg_ops import self_adjoint_eig_eager_fallback import common.tf_util as U from common.distributions import make_pdtype import tensorflow.contrib.lay...
42.370732
178
0.630785
import numpy as np import random from numpy.core.fromnumeric import clip from numpy.lib.shape_base import vsplit import tensorflow as tf from tensorflow.python.ops.gen_linalg_ops import self_adjoint_eig_eager_fallback import common.tf_util as U from common.distributions import make_pdtype import tensorflow.contrib.lay...
true
true
f75cdc97c634e49d6a69753be7d1696f9ffdd7c2
18,333
py
Python
datalad/cmdline/main.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
null
null
null
datalad/cmdline/main.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
6
2015-11-20T21:41:13.000Z
2018-06-12T14:27:32.000Z
datalad/cmdline/main.py
yarikoptic/datalad
c0cd538de2ed9a30c0f58256c7afa6e18d325505
[ "MIT" ]
1
2017-03-28T14:44:16.000Z
2017-03-28T14:44:16.000Z
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
45.266667
100
0.628157
__docformat__ = 'restructuredtext' import logging lgr = logging.getLogger('datalad.cmdline') lgr.log(5, "Importing cmdline.main") import argparse import sys import textwrap import shutil from importlib import import_module import os from six import text_type import datalad from datalad.cmdline import helpers fro...
true
true
f75cdcc197a65ac509c7d2369bd0aa2ce52e0fef
10,646
py
Python
src/meltano/core/block/parser.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
src/meltano/core/block/parser.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
src/meltano/core/block/parser.py
Mu-L/meltano
7bf8f370608ee9a8833b33ea94112c6e219c8161
[ "MIT" ]
null
null
null
"""Utilities for turning a string list of plugins into a usable list of BlockSet and PluginCommand objects.""" from typing import Dict, Generator, List, Optional, Tuple, Union import click import structlog from meltano.core.plugin import PluginType from meltano.core.plugin.error import PluginNotFoundError from meltan...
34.01278
132
0.570731
from typing import Dict, Generator, List, Optional, Tuple, Union import click import structlog from meltano.core.plugin import PluginType from meltano.core.plugin.error import PluginNotFoundError from meltano.core.plugin.project_plugin import ProjectPlugin from meltano.core.project_plugins_service import ProjectPlugi...
true
true
f75cdcda3fa627b511a4cf36ad7166f30a30a45b
5,981
py
Python
src/qanta/dataset.py
Cassie94/qanta
b32c084039befed9035e0f680db43308f323b89b
[ "Apache-2.0" ]
null
null
null
src/qanta/dataset.py
Cassie94/qanta
b32c084039befed9035e0f680db43308f323b89b
[ "Apache-2.0" ]
null
null
null
src/qanta/dataset.py
Cassie94/qanta
b32c084039befed9035e0f680db43308f323b89b
[ "Apache-2.0" ]
null
null
null
from typing import List, Dict, Iterable, Optional, Tuple, NamedTuple import os import json from qanta.util import QANTA_MAPPED_DATASET_PATH # from util import QANTA_MAPPED_DATASET_PATH GUESSER_TRAIN_FOLD = 'guesstrain' BUZZER_TRAIN_FOLD = 'buzztrain' TRAIN_FOLDS = {GUESSER_TRAIN_FOLD, BUZZER_TRAIN_FOLD} # Guesser an...
34.773256
120
0.669955
from typing import List, Dict, Iterable, Optional, Tuple, NamedTuple import os import json from qanta.util import QANTA_MAPPED_DATASET_PATH GUESSER_TRAIN_FOLD = 'guesstrain' BUZZER_TRAIN_FOLD = 'buzztrain' TRAIN_FOLDS = {GUESSER_TRAIN_FOLD, BUZZER_TRAIN_FOLD} GUESSER_DEV_FOLD = 'guessdev' BUZZER_DEV_FOLD = 'buzzdev'...
true
true