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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
1c47041f9ee93610c39d81b27b322f0c72c5c342
1,919
py
Python
tests/metarl/torch/algos/test_maml_vpg.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
2
2020-03-15T14:35:15.000Z
2021-02-15T16:38:00.000Z
tests/metarl/torch/algos/test_maml_vpg.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
null
null
null
tests/metarl/torch/algos/test_maml_vpg.py
icml2020submission6857/metarl
9b66cefa2b6bcb6a38096d629ce8853b47c7171d
[ "MIT" ]
1
2020-02-24T03:04:23.000Z
2020-02-24T03:04:23.000Z
"""This script is a test that fails when MAML-VPG performance is too low.""" import torch from metarl.envs import HalfCheetahDirEnv, normalize from metarl.envs.base import MetaRLEnv from metarl.experiment import deterministic, LocalRunner from metarl.np.baselines import LinearFeatureBaseline from metarl.torch.algos im...
34.267857
76
0.610214
import torch from metarl.envs import HalfCheetahDirEnv, normalize from metarl.envs.base import MetaRLEnv from metarl.experiment import deterministic, LocalRunner from metarl.np.baselines import LinearFeatureBaseline from metarl.torch.algos import MAMLVPG from metarl.torch.policies import GaussianMLPPolicy from tests.f...
true
true
1c470467bb157c6b60fde6c16bf077f9e16b1e83
1,063
py
Python
python/neuroglancer/default_credentials_manager.py
ilastik/neuroglancer
c8dc0982e3e235866a6144d467022e22af1300e0
[ "Apache-2.0" ]
20
2017-03-05T19:35:02.000Z
2021-07-05T09:32:27.000Z
python/neuroglancer/default_credentials_manager.py
ilastik/neuroglancer
c8dc0982e3e235866a6144d467022e22af1300e0
[ "Apache-2.0" ]
410
2017-02-06T16:58:55.000Z
2022-03-24T08:29:56.000Z
python/neuroglancer/default_credentials_manager.py
ilastik/neuroglancer
c8dc0982e3e235866a6144d467022e22af1300e0
[ "Apache-2.0" ]
13
2017-04-13T13:36:42.000Z
2021-09-14T17:15:23.000Z
# @license # Copyright 2017 Google Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
42.52
94
0.777046
from . import credentials_provider, google_credentials default_credentials_manager = credentials_provider.CredentialsManager() default_credentials_manager.register( u'google-brainmaps', lambda _parameters: google_credentials.GoogleCredentialsProvider( client_id=u'639403125587-ue3c18dalqidqehs1n1p5rjvg...
true
true
1c4704a0a504b68ddee07f8b85b5a5909cee1a87
1,698
py
Python
sevdesk/client/models/invoice_change_status_json_body.py
HpLightcorner/SevDesk-Python-Client
303ca8dddd78da4291e7d23692ccfb147c7ba31a
[ "MIT" ]
null
null
null
sevdesk/client/models/invoice_change_status_json_body.py
HpLightcorner/SevDesk-Python-Client
303ca8dddd78da4291e7d23692ccfb147c7ba31a
[ "MIT" ]
null
null
null
sevdesk/client/models/invoice_change_status_json_body.py
HpLightcorner/SevDesk-Python-Client
303ca8dddd78da4291e7d23692ccfb147c7ba31a
[ "MIT" ]
null
null
null
from typing import Any, Dict, List, Type, TypeVar import attr from ..models.invoice_change_status_json_body_value import ( InvoiceChangeStatusJsonBodyValue, ) T = TypeVar("T", bound="InvoiceChangeStatusJsonBody") @attr.s(auto_attribs=True) class InvoiceChangeStatusJsonBody: """ Attributes: valu...
27.387097
94
0.660188
from typing import Any, Dict, List, Type, TypeVar import attr from ..models.invoice_change_status_json_body_value import ( InvoiceChangeStatusJsonBodyValue, ) T = TypeVar("T", bound="InvoiceChangeStatusJsonBody") @attr.s(auto_attribs=True) class InvoiceChangeStatusJsonBody: value: InvoiceChangeStatusJsonB...
true
true
1c47055e964491c450560bbb9bf677126d271f38
346
py
Python
flanker/mime/message/utils.py
meta-x/flanker
1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad
[ "Apache-2.0" ]
1
2015-11-08T12:57:12.000Z
2015-11-08T12:57:12.000Z
flanker/mime/message/utils.py
meta-x/flanker
1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad
[ "Apache-2.0" ]
null
null
null
flanker/mime/message/utils.py
meta-x/flanker
1e37baa1db2ecee238ac3de1e36a2948e0a6d3ad
[ "Apache-2.0" ]
1
2020-12-18T08:33:56.000Z
2020-12-18T08:33:56.000Z
from cStringIO import StringIO from contextlib import closing from email.generator import Generator def python_message_to_string(msg): """Converts python message to string in a proper way""" with closing(StringIO()) as fp: g = Generator(fp, mangle_from_=False) g.flatten(msg, unixfrom=False) ...
31.454545
59
0.722543
from cStringIO import StringIO from contextlib import closing from email.generator import Generator def python_message_to_string(msg): with closing(StringIO()) as fp: g = Generator(fp, mangle_from_=False) g.flatten(msg, unixfrom=False) return fp.getvalue()
true
true
1c470582964b938e3223bcd1617f3e7be1a1716e
18,456
py
Python
excellent/_version.py
arokem/excellent-science
e25e62ba766bd7292240cf8bd8596f926d59baf9
[ "BSD-3-Clause" ]
null
null
null
excellent/_version.py
arokem/excellent-science
e25e62ba766bd7292240cf8bd8596f926d59baf9
[ "BSD-3-Clause" ]
1
2018-07-31T21:27:27.000Z
2018-07-31T21:27:27.000Z
excellent/_version.py
arokem/excellent-science
e25e62ba766bd7292240cf8bd8596f926d59baf9
[ "BSD-3-Clause" ]
null
null
null
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
35.424184
79
0.584634
import errno import os import re import subprocess import sys def get_keywords(): git_refnames = "$Format:%d$" git_full = "$Format:%H$" git_date = "$Format:%ci$" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords class VersioneerConfig: ...
true
true
1c4705b0614ddedee8f02cb903791afebf6e7a81
72,735
py
Python
src/sage/combinat/words/word_generators.py
bopopescu/sagemath
39f452b2691c5ac86654fea22414fa5851893b48
[ "BSL-1.0" ]
3
2018-09-11T11:16:26.000Z
2019-09-10T15:26:37.000Z
src/sage/combinat/words/word_generators.py
bopopescu/sagemath
39f452b2691c5ac86654fea22414fa5851893b48
[ "BSL-1.0" ]
2
2018-10-30T13:40:20.000Z
2020-07-23T12:13:30.000Z
src/sage/combinat/words/word_generators.py
bopopescu/sagemath
39f452b2691c5ac86654fea22414fa5851893b48
[ "BSL-1.0" ]
1
2020-07-23T10:29:58.000Z
2020-07-23T10:29:58.000Z
# -*- coding: utf-8 -*- r""" Common words AUTHORS: - Franco Saliola (2008-12-17): merged into sage - Sebastien Labbe (2008-12-17): merged into sage - Arnaud Bergeron (2008-12-17): merged into sage - Amy Glen (2008-12-17): merged into sage - Sebastien Labbe (2009-12-19): Added S-adic words (:trac:`7543`) USE: To see...
35.376946
232
0.56017
from __future__ import print_function from six.moves import range from itertools import cycle, count from random import randint from sage.misc.cachefunc import cached_method from sage.rings.all import ZZ, RR from sage.rings.infinity import Infinity from sage.combinat.words.abstract_word import Word_class from sage.co...
true
true
1c4705d90e26f7a3b0aec0c56259738df2567122
584
py
Python
hail/python/hailtop/hailctl/dataproc/gcloud.py
sigmarkarl/hail
11b7c22342a945c61b24c5f8babf4ab411d3d2f1
[ "MIT" ]
2
2020-12-15T21:20:24.000Z
2020-12-21T19:46:26.000Z
hail/python/hailtop/hailctl/dataproc/gcloud.py
Dania-Abuhijleh/hail
a187dc0867801ca1eee774588fe58604a133a0d9
[ "MIT" ]
2
2016-11-17T03:06:10.000Z
2017-12-05T19:00:24.000Z
hail/python/hailtop/hailctl/dataproc/gcloud.py
Dania-Abuhijleh/hail
a187dc0867801ca1eee774588fe58604a133a0d9
[ "MIT" ]
2
2020-07-28T18:55:19.000Z
2020-10-19T16:43:03.000Z
import subprocess import sys import typing def run(command: typing.List[str]): """Run a gcloud command.""" return subprocess.check_call(["gcloud"] + command) def get_config(setting: str) -> typing.Optional[str]: """Get a gcloud configuration value.""" try: return subprocess.check_output(["gc...
32.444444
126
0.690068
import subprocess import sys import typing def run(command: typing.List[str]): return subprocess.check_call(["gcloud"] + command) def get_config(setting: str) -> typing.Optional[str]: try: return subprocess.check_output(["gcloud", "config", "get-value", setting], stderr=subprocess.DEVNULL).decode()....
true
true
1c47072151d6e3a3679673ef4f334e87c2edc417
10,991
py
Python
sdk/python/pulumi_azure_nextgen/network/v20190701/virtual_hub.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190701/virtual_hub.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20190701/virtual_hub.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
48.20614
1,370
0.670731
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['VirtualHub'] class VirtualHub(pulumi.CustomResource): def __init__(__self__, resource_name:...
true
true
1c47074abf2983d50cd994c75924c03df0a98653
2,586
py
Python
tally_ho/apps/tally/tests/views/reports/test_overall_votes.py
onaio/tally-ho
f7a81909755924370653051bfc8315588dc75356
[ "Apache-2.0" ]
12
2015-09-07T17:12:42.000Z
2021-12-29T07:51:18.000Z
tally_ho/apps/tally/tests/views/reports/test_overall_votes.py
onaio/tally-ho
f7a81909755924370653051bfc8315588dc75356
[ "Apache-2.0" ]
122
2018-09-18T04:05:39.000Z
2022-01-17T10:12:48.000Z
tally_ho/apps/tally/tests/views/reports/test_overall_votes.py
onaio/tally-ho
f7a81909755924370653051bfc8315588dc75356
[ "Apache-2.0" ]
13
2015-06-06T17:32:34.000Z
2020-09-10T12:58:07.000Z
from django.test import RequestFactory from tally_ho.libs.permissions import groups from tally_ho.apps.tally.views.reports import overall_votes from tally_ho.libs.models.enums.entry_version import EntryVersion from tally_ho.libs.tests.test_base import create_result_form, create_ballot,\ create_candidates, create_r...
40.40625
77
0.667827
from django.test import RequestFactory from tally_ho.libs.permissions import groups from tally_ho.apps.tally.views.reports import overall_votes from tally_ho.libs.models.enums.entry_version import EntryVersion from tally_ho.libs.tests.test_base import create_result_form, create_ballot,\ create_candidates, create_r...
true
true
1c4707f0fd319f5925e77eba1ff52dbd5d26aa43
23,378
py
Python
PixivImageHandler.py
YukihoAA/PixivUtil2
bd2dd3ca34b1277042ee5f3d74a80800985aa4cc
[ "BSD-2-Clause" ]
1,872
2015-01-02T06:59:58.000Z
2022-03-29T14:43:58.000Z
PixivImageHandler.py
YukihoAA/PixivUtil2
bd2dd3ca34b1277042ee5f3d74a80800985aa4cc
[ "BSD-2-Clause" ]
959
2015-01-02T05:42:57.000Z
2022-03-28T10:00:56.000Z
PixivImageHandler.py
nao20010128nao/PU2-patched
3a4dd523247727a510c0b75373ae79db754a34f7
[ "BSD-2-Clause" ]
310
2015-01-02T16:45:33.000Z
2022-03-25T19:42:39.000Z
# -*- coding: utf-8 -*- import datetime import gc import os import re import sys import traceback import urllib from colorama import Fore, Style import datetime_z import PixivBrowserFactory import PixivConstant import PixivDownloadHandler import PixivHelper from PixivException import PixivException __re_manga_page =...
53.496568
155
0.529387
import datetime import gc import os import re import sys import traceback import urllib from colorama import Fore, Style import datetime_z import PixivBrowserFactory import PixivConstant import PixivDownloadHandler import PixivHelper from PixivException import PixivException __re_manga_page = re.compile(r'(\d+(_big)...
true
true
1c470806e2e0c073cf45685cb91f84d5d2ad841e
725
py
Python
jinjamator/plugins/content/timestamp/__init__.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
7
2020-05-06T07:48:14.000Z
2021-12-11T15:57:26.000Z
jinjamator/plugins/content/timestamp/__init__.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
1
2020-04-11T15:13:07.000Z
2020-04-27T20:01:34.000Z
jinjamator/plugins/content/timestamp/__init__.py
jinjamator/jinjamator
6c48a6eedea9b9f461c66b5dddd609fa39610f0d
[ "Apache-2.0" ]
1
2020-05-29T08:53:08.000Z
2020-05-29T08:53:08.000Z
# Copyright 2020 Wilhelm Putz # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
30.208333
74
0.742069
import time import datetime def today(): return time.mktime(datetime.date.today().timetuple())
true
true
1c4708bae8c58607204d0b5e3851cd19bbe5f2b7
532
py
Python
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/waaafaa-33427
111391747de3d04519e8c83f809e510ba5f53267
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/waaafaa-33427
111391747de3d04519e8c83f809e510ba5f53267
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/home/migrations/0001_load_initial_data.py
crowdbotics-apps/waaafaa-33427
111391747de3d04519e8c83f809e510ba5f53267
[ "FTL", "AML", "RSA-MD" ]
null
null
null
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "waaafaa-33427.botics.co" site_params = { "name": "waaafaa", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(d...
20.461538
61
0.654135
from django.db import migrations def create_site(apps, schema_editor): Site = apps.get_model("sites", "Site") custom_domain = "waaafaa-33427.botics.co" site_params = { "name": "waaafaa", } if custom_domain: site_params["domain"] = custom_domain Site.objects.update_or_create(d...
true
true
1c4709825b92854677eea70e53d6029daae416e6
157
py
Python
lib/python/logan/__init__.py
melver/logan
e90da84388b1e966cf24f778cbabfee62d324c7d
[ "BSD-3-Clause" ]
null
null
null
lib/python/logan/__init__.py
melver/logan
e90da84388b1e966cf24f778cbabfee62d324c7d
[ "BSD-3-Clause" ]
null
null
null
lib/python/logan/__init__.py
melver/logan
e90da84388b1e966cf24f778cbabfee62d324c7d
[ "BSD-3-Clause" ]
null
null
null
""" Log Analyser """ import os BASEPATH = os.path.abspath(os.path.join( __file__, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir))
15.7
61
0.675159
import os BASEPATH = os.path.abspath(os.path.join( __file__, os.path.pardir, os.path.pardir, os.path.pardir, os.path.pardir))
true
true
1c4709bd604c2f039002201b03f0a84178da694d
7,125
py
Python
utils/py27/Lib/test/test_glob.py
xahmol/8bit-Unity
b4f3bee00e012ca1755afba550a5270dce0a1054
[ "BSD-2-Clause" ]
42
2018-12-12T01:00:59.000Z
2022-03-27T07:32:29.000Z
utils/py27/Lib/test/test_glob.py
xahmol/8bit-Unity
b4f3bee00e012ca1755afba550a5270dce0a1054
[ "BSD-2-Clause" ]
13
2020-11-06T13:50:45.000Z
2022-01-25T07:17:37.000Z
utils/py27/Lib/test/test_glob.py
xahmol/8bit-Unity
b4f3bee00e012ca1755afba550a5270dce0a1054
[ "BSD-2-Clause" ]
8
2020-11-14T04:30:26.000Z
2021-01-16T17:55:19.000Z
import glob import os import shutil import sys import unittest from test.test_support import run_unittest, TESTFN def fsdecode(s): return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): def norm(self, *parts): return os.path.normpath(os.path.join(self.te...
39.148352
80
0.520982
import glob import os import shutil import sys import unittest from test.test_support import run_unittest, TESTFN def fsdecode(s): return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): def norm(self, *parts): return os.path.normpath(os.path.join(self.te...
true
true
1c470a2db8942a6dac55dd86e4e59735900d2028
17,980
py
Python
bamnostic/bai.py
pleongpt/bamnostic
c1d0b9035c9d3c3172fc276d26999884d6c4fa38
[ "BSD-3-Clause" ]
null
null
null
bamnostic/bai.py
pleongpt/bamnostic
c1d0b9035c9d3c3172fc276d26999884d6c4fa38
[ "BSD-3-Clause" ]
null
null
null
bamnostic/bai.py
pleongpt/bamnostic
c1d0b9035c9d3c3172fc276d26999884d6c4fa38
[ "BSD-3-Clause" ]
1
2019-11-09T06:03:16.000Z
2019-11-09T06:03:16.000Z
#!/user/bin/env python # -*- coding: utf-8 -*- """BAI file parser .. include:: <isonum.txt> Copyright |copy| 2018, Marcus D. Sherman This code is part of the bamnostic distribution and governed by its license. Please see the LICENSE file that should have been included as part of this package. The Binary Alignment ...
39.172113
113
0.643826
from __future__ import print_function from __future__ import absolute_import from __future__ import division import struct import os import sys import warnings from array import array from collections import namedtuple _PY_VERSION = sys.version_info if _PY_VERSION[0] == 2: from io import open else: from fun...
true
true
1c470a49de9d387d8b037e3f4380dafd7305f1b0
97
py
Python
applications/gestiune/controllers/loguri.py
Vlad-Iliescu/gest
32fbd3a859316727cd8564029d51b8d3c94cc0a0
[ "BSD-3-Clause" ]
null
null
null
applications/gestiune/controllers/loguri.py
Vlad-Iliescu/gest
32fbd3a859316727cd8564029d51b8d3c94cc0a0
[ "BSD-3-Clause" ]
null
null
null
applications/gestiune/controllers/loguri.py
Vlad-Iliescu/gest
32fbd3a859316727cd8564029d51b8d3c94cc0a0
[ "BSD-3-Clause" ]
null
null
null
# coding: utf8 # try something like def index(): return dict(message="hello from loguri.py")
19.4
47
0.701031
def index(): return dict(message="hello from loguri.py")
true
true
1c470b3dfa53ba320b1d4c3bc685983b1ace1149
2,253
py
Python
tests/test_agent/test_http_api_config.py
guidow/pyfarm-agent
bb5d464f9f6549a3db3529a93e3d9f388b365586
[ "Apache-2.0" ]
null
null
null
tests/test_agent/test_http_api_config.py
guidow/pyfarm-agent
bb5d464f9f6549a3db3529a93e3d9f388b365586
[ "Apache-2.0" ]
null
null
null
tests/test_agent/test_http_api_config.py
guidow/pyfarm-agent
bb5d464f9f6549a3db3529a93e3d9f388b365586
[ "Apache-2.0" ]
null
null
null
# No shebang line, this module is meant to be imported # # Copyright 2014 Oliver Palmer # # 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 # # Unle...
33.132353
74
0.678207
from json import loads from datetime import datetime from uuid import UUID try: from httplib import OK except ImportError: from http.client import OK from twisted.web.server import NOT_DONE_YET from pyfarm.agent.config import config from pyfarm.agent.testutil import BaseAPITestCase from pyfarm.agent.http.a...
true
true
1c470c59b3b5466b5590486c24d50559f9296408
4,658
py
Python
mpi/mpi4py/simple.py
timkphd/examples
04c162ec890a1c9ba83498b275fbdc81a4704062
[ "Unlicense" ]
5
2020-11-01T00:29:22.000Z
2022-01-24T19:09:47.000Z
mpi/mpi4py/simple.py
timkphd/examples
04c162ec890a1c9ba83498b275fbdc81a4704062
[ "Unlicense" ]
1
2022-02-09T01:59:47.000Z
2022-02-09T01:59:47.000Z
mpi/mpi4py/simple.py
timkphd/examples
04c162ec890a1c9ba83498b275fbdc81a4704062
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 from mpi4py import MPI import numpy global numnodes,myid,mpi_err global mpi_root import sys mpi_root=0 # This is a bag-of-tasks program. We define a manager task # that distributes work to workers. Actually, the workers # request input data. The manager sits in a loop calling # Iprobe waiting ...
30.847682
91
0.709747
from mpi4py import MPI import numpy global numnodes,myid,mpi_err global mpi_root import sys mpi_root=0 def worker(THE_COMM_WORLD,managerid): import mkview x=0 comm=MPI.COMM_WORLD send_msg = numpy.arange(1, dtype='i') recv_msg = numpy.zeros_like(send_msg) ic=0 while(True) : send_msg[0]=x comm.Send([send...
true
true
1c470e24690527959feddd87aeb9fdc0e3b2b36e
152
py
Python
rtc_app/rtc/doctype/bus_location/test_bus_location.py
VishDroid-dev/rtc
0feb16165ed06b5ea6aeec181c36253fcc5ad5aa
[ "MIT" ]
null
null
null
rtc_app/rtc/doctype/bus_location/test_bus_location.py
VishDroid-dev/rtc
0feb16165ed06b5ea6aeec181c36253fcc5ad5aa
[ "MIT" ]
null
null
null
rtc_app/rtc/doctype/bus_location/test_bus_location.py
VishDroid-dev/rtc
0feb16165ed06b5ea6aeec181c36253fcc5ad5aa
[ "MIT" ]
1
2022-01-19T15:31:21.000Z
2022-01-19T15:31:21.000Z
# Copyright (c) 2021, Foo Fighters and Contributors # See license.txt # import frappe import unittest class TestBusLocation(unittest.TestCase): pass
16.888889
51
0.782895
import unittest class TestBusLocation(unittest.TestCase): pass
true
true
1c470e3760f76e19d9ac14656848fcf3703b18d2
6,396
py
Python
flash/image/embedding/model.py
dmarx/lightning-flash
4cda031c1f9c8d8754fd36b5720d2a5a7d866765
[ "Apache-2.0" ]
null
null
null
flash/image/embedding/model.py
dmarx/lightning-flash
4cda031c1f9c8d8754fd36b5720d2a5a7d866765
[ "Apache-2.0" ]
null
null
null
flash/image/embedding/model.py
dmarx/lightning-flash
4cda031c1f9c8d8754fd36b5720d2a5a7d866765
[ "Apache-2.0" ]
1
2022-02-28T15:59:39.000Z
2022-02-28T15:59:39.000Z
# Copyright The PyTorch Lightning team. # # 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...
40.738854
114
0.706848
import warnings from typing import Any, Dict, List, Optional from flash.core.adapter import AdapterTask from flash.core.data.io.input import DataKeys from flash.core.data.states import ( CollateFn, PerBatchTransform, PerBatchTransformOnDevice, PerSampleTransformOnDevice, PostTensorTransform, Pr...
true
true
1c470f3b148dd13ad815f7979d810003cd90888e
1,031
py
Python
tests/datastructures/test_shuffle.py
TristenSeth/campy
9e726c342d682239e1c19e6f5645c0b2167d7fab
[ "MIT" ]
5
2018-12-03T19:18:50.000Z
2021-05-31T07:17:06.000Z
tests/datastructures/test_shuffle.py
TristenSeth/campy
9e726c342d682239e1c19e6f5645c0b2167d7fab
[ "MIT" ]
1
2017-06-07T04:33:46.000Z
2017-06-07T04:33:46.000Z
tests/datastructures/test_shuffle.py
TristenSeth/campy
9e726c342d682239e1c19e6f5645c0b2167d7fab
[ "MIT" ]
1
2017-06-06T07:29:07.000Z
2017-06-06T07:29:07.000Z
"""Tests for the :mod:`campy.datastructures.shuffle` module.""" # These reference shuffled values are being generated by Python running # 3.7.2 (default, Dec 27 2018, 07:35:06) \n[Clang 10.0.0 (clang-1000.11.45.5)] # on macOS 10.14.2 from campy.datastructures.shuffle import shuffle import random def test_shuffle_li...
22.413043
84
0.681862
from campy.datastructures.shuffle import shuffle import random def test_shuffle_list(): random.seed(41) assert shuffle([3, 1, 4, 1, 5, 9]) == [5, 9, 3, 1, 4, 1] def test_shuffle_tuple(): random.seed(41) assert shuffle((3, 1, 4, 1, 5, 9)) == (5, 9, 3, 1, 4, 1) def test_shuffle_string(): rando...
true
true
1c470fa24ed63d9d3230ed00e5a2d1c9f01fe440
140
py
Python
demos/examples/python_functions.py
pyxll/pylondon-2019
c00c5ba52807c8d47ad84ffd4c64e1937fe69e98
[ "MIT" ]
8
2019-04-28T08:48:30.000Z
2020-06-30T09:32:47.000Z
demos/examples/python_functions.py
pyxll/pylondon-2019
c00c5ba52807c8d47ad84ffd4c64e1937fe69e98
[ "MIT" ]
null
null
null
demos/examples/python_functions.py
pyxll/pylondon-2019
c00c5ba52807c8d47ad84ffd4c64e1937fe69e98
[ "MIT" ]
1
2019-05-30T08:26:52.000Z
2019-05-30T08:26:52.000Z
""" Example code showing how to declare a Python function. """ from pyxll import xl_func @xl_func def simple_test(a, b): return a + b
14
54
0.7
from pyxll import xl_func @xl_func def simple_test(a, b): return a + b
true
true
1c470fc85b3e9b810c05e6e2be1bdbafde9adc7a
7,050
py
Python
qiskit/pulse/cmd_def.py
chowington/qiskit-terra
a782c64c736fedd6a541bb45dbf89737a52b7c39
[ "Apache-2.0" ]
null
null
null
qiskit/pulse/cmd_def.py
chowington/qiskit-terra
a782c64c736fedd6a541bb45dbf89737a52b7c39
[ "Apache-2.0" ]
null
null
null
qiskit/pulse/cmd_def.py
chowington/qiskit-terra
a782c64c736fedd6a541bb45dbf89737a52b7c39
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
34.558824
93
0.623546
from typing import List, Tuple, Iterable, Union, Dict from qiskit.qobj import PulseQobjInstruction from qiskit.qobj.converters import QobjToInstructionConverter from .commands import SamplePulse from .exceptions import PulseError from .schedule import Schedule, ParameterizedSchedule def _to_qubit_tuple(qubit_tu...
true
true
1c4710485744a43033c4782f403ded172a09f64c
5,256
py
Python
pysnmp/EPON-EOC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/EPON-EOC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/EPON-EOC-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module EPON-EOC-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/EPON-EOC-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:50:46 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019,...
90.62069
867
0.737823
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, ValueSizeConstraint, SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint = mibBuilder.impo...
true
true
1c4710f85890e97c5496e0643181003b678c7b0b
1,085
py
Python
longitude/samples/config.py
Rovaro/Longitude
b17b40a7b19edb10c62238ea20d136a3a8147f13
[ "MIT" ]
1
2020-11-06T11:12:42.000Z
2020-11-06T11:12:42.000Z
longitude/samples/config.py
Rovaro/Longitude
b17b40a7b19edb10c62238ea20d136a3a8147f13
[ "MIT" ]
22
2017-11-20T21:18:55.000Z
2021-07-06T10:22:14.000Z
longitude/samples/config.py
Rovaro/Longitude
b17b40a7b19edb10c62238ea20d136a3a8147f13
[ "MIT" ]
4
2018-03-22T08:38:03.000Z
2020-06-14T04:29:15.000Z
"""It's a good practice to put all config loading in the same file. The `environs` library does a good job getting environment variables, and it's quite straight forward: @see https://pypi.org/project/environs/ However, if you ever need to change the environment vars by let's say, a .conf file, or a database-sto...
29.324324
75
0.677419
from environs import Env env = Env() config = { 'carto_user': env('CARTO_USER'), 'carto_api_key': env('CARTO_API_KEY'), 'pg_user': env('PG_USER'), 'pg_password': env('PG_PASSWORD'), 'debug': env.bool('DEBUG', False), 'oauth': { 'client_id': env('OAUTH_CLIENT_ID'), 'client_secr...
true
true
1c4711edcf7819cbbbc6c78acdca81a52af4983c
1,393
py
Python
common/xrd-ui-tests-python/tests/xroad_cs_user_logging/XroadCsUserLogging.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
1
2019-02-09T00:16:54.000Z
2019-02-09T00:16:54.000Z
common/xrd-ui-tests-python/tests/xroad_cs_user_logging/XroadCsUserLogging.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
1
2018-06-06T08:33:32.000Z
2018-06-06T08:33:32.000Z
common/xrd-ui-tests-python/tests/xroad_cs_user_logging/XroadCsUserLogging.py
nordic-institute/X-Road-tests
e030661a0ad8ceab74dd8122b751e88025a3474a
[ "MIT" ]
3
2018-07-09T08:51:00.000Z
2020-07-23T18:40:24.000Z
import unittest from helpers import ssh_client from main.maincontroller import MainController from tests.xroad_cs_user_logging.cs_user_logging import check_logout, check_login class XroadCsUserLogging(unittest.TestCase): """ CS_01 Log In to the Graphical User Interface CS_02 Log Out of the Graphical User...
34.825
81
0.674803
import unittest from helpers import ssh_client from main.maincontroller import MainController from tests.xroad_cs_user_logging.cs_user_logging import check_logout, check_login class XroadCsUserLogging(unittest.TestCase): def __init__(self, methodName='test_cs_user_logging'): unittest.TestCase.__init__(se...
true
true
1c47124f0e6a2497f3ddc075da4e798d843d5388
1,143
py
Python
src/wrapper/python/wolfssl/src/wolfssl/_memory.py
djp952/prebuilt-wolfssl
b3df82d34af6c71eef47bbd22931b049e13beac4
[ "AML" ]
1
2022-03-17T13:34:08.000Z
2022-03-17T13:34:08.000Z
src/wrapper/python/wolfssl/src/wolfssl/_memory.py
djp952/prebuilt-wolfssl
b3df82d34af6c71eef47bbd22931b049e13beac4
[ "AML" ]
null
null
null
src/wrapper/python/wolfssl/src/wolfssl/_memory.py
djp952/prebuilt-wolfssl
b3df82d34af6c71eef47bbd22931b049e13beac4
[ "AML" ]
null
null
null
# -*- coding: utf-8 -*- # # _memory.py # # Copyright (C) 2006-2021 wolfSSL Inc. # # This file is part of wolfSSL. # # wolfSSL is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the L...
30.891892
80
0.725284
try: from wolfssl._ffi import ffi as _ffi from wolfssl._ffi import lib as _lib except ImportError: pass _DYNAMIC_TYPE_METHOD = 11 def _native_free(native_object, dynamic_type): _lib.wolfSSL_Free(native_object, _ffi.NULL, dynamic_type)
true
true
1c47126541db2ea65702874849c90340f8a0942e
34,556
py
Python
scripts/competitiond.py
Levilian/codalab-worksheets
f01c72d1e78ef728859b57603eec59e3008a7205
[ "Apache-2.0" ]
null
null
null
scripts/competitiond.py
Levilian/codalab-worksheets
f01c72d1e78ef728859b57603eec59e3008a7205
[ "Apache-2.0" ]
null
null
null
scripts/competitiond.py
Levilian/codalab-worksheets
f01c72d1e78ef728859b57603eec59e3008a7205
[ "Apache-2.0" ]
null
null
null
#!./venv/bin/python """ Competition leaderboard evaluation daemon. 1. Find bundles tagged with {submission_tag} and filter them. 2. Run the {predict} command with the submitted bundle to generate predictions on the test set. 3. Tag the resulting test run bundle with {predict.tag}, untagging a...
40.943128
108
0.60059
import argparse import getpass import json import logging import random import re import signal import sys import time import traceback from collections import defaultdict, namedtuple from marshmallow import Schema, fields, ValidationError, missing import yaml sys.path.append('.') from codalab.bundles import RunBundl...
true
true
1c471283593726a928d0d7ec9a44612cdf93d9bf
12,006
py
Python
saleor/graphql/payment/mutations.py
frediian/test-saleor
6bc7d153bbedb2b6cfe9b125325c785a08ac32bd
[ "CC-BY-4.0" ]
null
null
null
saleor/graphql/payment/mutations.py
frediian/test-saleor
6bc7d153bbedb2b6cfe9b125325c785a08ac32bd
[ "CC-BY-4.0" ]
22
2021-08-02T04:47:57.000Z
2022-03-28T04:41:58.000Z
saleor/graphql/payment/mutations.py
frediian/test-saleor
6bc7d153bbedb2b6cfe9b125325c785a08ac32bd
[ "CC-BY-4.0" ]
null
null
null
import graphene from django.core.exceptions import ValidationError from ...channel.models import Channel from ...checkout.calculations import calculate_checkout_total_with_gift_cards from ...checkout.checkout_cleaner import clean_billing_address, clean_checkout_shipping from ...checkout.fetch import fetch_checkout_inf...
36.381818
88
0.623938
import graphene from django.core.exceptions import ValidationError from ...channel.models import Channel from ...checkout.calculations import calculate_checkout_total_with_gift_cards from ...checkout.checkout_cleaner import clean_billing_address, clean_checkout_shipping from ...checkout.fetch import fetch_checkout_inf...
true
true
1c4712b10065ae738ea39947160be15df662fbae
4,778
py
Python
cinder/api/contrib/extended_snapshot_attributes.py
cloudbau/cinder
3179f2f42ae940a08b910e326a809556689864d8
[ "Apache-2.0" ]
null
null
null
cinder/api/contrib/extended_snapshot_attributes.py
cloudbau/cinder
3179f2f42ae940a08b910e326a809556689864d8
[ "Apache-2.0" ]
null
null
null
cinder/api/contrib/extended_snapshot_attributes.py
cloudbau/cinder
3179f2f42ae940a08b910e326a809556689864d8
[ "Apache-2.0" ]
null
null
null
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
38.224
78
0.670783
from webob import exc from cinder.api import extensions from cinder.api.openstack import wsgi from cinder.api import xmlutil from cinder import exception from cinder.openstack.common import log as logging from cinder import volume LOG = logging.getLogger(__name__) authorize = extensions.soft_extension_authorizer(...
true
true
1c47132929ce011d4b8ad6a8bcdf763d68fc9700
7,415
py
Python
yapftests/split_penalty_test.py
hugovk/yapf
831fb3d38d19f2bd1518426af68f22f21f5400b0
[ "Apache-2.0" ]
null
null
null
yapftests/split_penalty_test.py
hugovk/yapf
831fb3d38d19f2bd1518426af68f22f21f5400b0
[ "Apache-2.0" ]
null
null
null
yapftests/split_penalty_test.py
hugovk/yapf
831fb3d38d19f2bd1518426af68f22f21f5400b0
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
27.771536
79
0.578692
import sys import textwrap import unittest from lib2to3 import pytree from yapf.pytree import pytree_utils from yapf.pytree import pytree_visitor from yapf.yapflib import split_penalty from yapf.yapflib import style from yapftests import yapf_test_helper UNBREAKABLE = split_penalty.UNBREAKABLE VERY_STRONGLY_CONNEC...
true
true
1c4714491879cc91b48a7f0c09b4c8ab6d87e93d
3,659
py
Python
evaluate.py
Prettyfinger/Twostream_reID
8e340e0c03bd248b04ff1b48398ca99b6aeaa508
[ "MIT" ]
6
2019-05-17T03:40:59.000Z
2021-04-09T11:01:54.000Z
evaluate.py
Prettyfinger/Twostream_reID
8e340e0c03bd248b04ff1b48398ca99b6aeaa508
[ "MIT" ]
null
null
null
evaluate.py
Prettyfinger/Twostream_reID
8e340e0c03bd248b04ff1b48398ca99b6aeaa508
[ "MIT" ]
2
2019-09-12T06:19:05.000Z
2020-06-12T11:34:12.000Z
import scipy.io import torch import numpy as np #import time import os ####################################################################### # Evaluate def evaluate(qf,ql,qc,gf,gl,gc): query = qf score = np.dot(gf,query) # predict index index = np.argsort(score) #from small to large index = inde...
33.87963
120
0.636239
import scipy.io import torch import numpy as np import os def evaluate(qf,ql,qc,gf,gl,gc): query = qf score = np.dot(gf,query) index = np.argsort(score) index = index[::-1] query_index = np.argwhere(gl==ql) camera_index = np.argwhere(gc==qc) good_index = np.setdiff1d(query_i...
true
true
1c4714b6c1ba2640b2df051cf15a452b139f7891
1,251
py
Python
extra/unused/kml_wesn_filter.py
whyjz/CARST
875c915e835b0e09a7eccb58833719bbfc85b635
[ "MIT" ]
10
2018-01-02T18:03:07.000Z
2022-01-25T05:36:21.000Z
extra/unused/kml_wesn_filter.py
whyjz/CARST
875c915e835b0e09a7eccb58833719bbfc85b635
[ "MIT" ]
1
2020-04-14T16:57:15.000Z
2020-05-15T16:10:17.000Z
extra/unused/kml_wesn_filter.py
whyjz/CARST
875c915e835b0e09a7eccb58833719bbfc85b635
[ "MIT" ]
4
2016-08-12T15:06:48.000Z
2019-11-27T05:33:50.000Z
#!/usr/bin/python import re; import sys; name=sys.argv[1]; w=sys.argv[2]; e=sys.argv[3]; s=sys.argv[4]; n=sys.argv[5]; coords_str=""; kml=""; temp=""; coords=""; outside=False; infile=open(name,"r"); while 1: line=infile.readline(); if not line: break; if line.find("<Placemark") < 0: kml=kml+line; else: ...
18.397059
94
0.581135
import re; import sys; name=sys.argv[1]; w=sys.argv[2]; e=sys.argv[3]; s=sys.argv[4]; n=sys.argv[5]; coords_str=""; kml=""; temp=""; coords=""; outside=False; infile=open(name,"r"); while 1: line=infile.readline(); if not line: break; if line.find("<Placemark") < 0: kml=kml+line; else: temp=temp+line; ...
true
true
1c471503d318cedfa20271abbfe08577cd1b9640
15,148
py
Python
onnx2caffe/_operators.py
troyliu0105/onnx2caffe
d369e774ed216f1c9cbc2f3610c8c1b9c3364f97
[ "MIT" ]
null
null
null
onnx2caffe/_operators.py
troyliu0105/onnx2caffe
d369e774ed216f1c9cbc2f3610c8c1b9c3364f97
[ "MIT" ]
null
null
null
onnx2caffe/_operators.py
troyliu0105/onnx2caffe
d369e774ed216f1c9cbc2f3610c8c1b9c3364f97
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import math from caffe import params as P from MyCaffe import Function as myf def _compare(a, b, encoding="utf8"): # type: (Text, Text, Text) -> bool if isinstan...
35.392523
120
0.616319
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import math from caffe import params as P from MyCaffe import Function as myf def _compare(a, b, encoding="utf8"): if isinstance(a, bytes): a = a.decode(...
true
true
1c471581b148d8da944b7d385ff56958dcd3c839
80
py
Python
satori.core/satori/core/sec/__init__.py
Cloud11665/satori-git
ea1855a920c98b480423bf247bce6e5626985c4a
[ "MIT" ]
4
2021-01-05T01:35:36.000Z
2021-12-13T00:05:14.000Z
satori.core/satori/core/sec/__init__.py
Cloud11665/satori-git
ea1855a920c98b480423bf247bce6e5626985c4a
[ "MIT" ]
2
2020-06-06T01:12:07.000Z
2020-06-06T01:16:01.000Z
satori.core/satori/core/sec/__init__.py
Cloud11665/satori-git
ea1855a920c98b480423bf247bce6e5626985c4a
[ "MIT" ]
2
2021-01-05T01:33:30.000Z
2021-03-06T13:48:21.000Z
# vim:ts=4:sts=4:sw=4:expandtab """ Security and authorization procedures. """
13.333333
38
0.7
true
true
1c47178b6382cec7eefc639b882b988952869b5a
717
py
Python
setup.py
andrey-avdeev/telemetry
0c70b410079616634ff1895b360d8d9b8a65f046
[ "Apache-2.0" ]
13
2019-12-01T08:05:25.000Z
2020-05-19T10:43:49.000Z
setup.py
andrey-avdeev/telemetry
0c70b410079616634ff1895b360d8d9b8a65f046
[ "Apache-2.0" ]
6
2019-12-02T07:43:49.000Z
2019-12-02T07:52:15.000Z
setup.py
andrey-avdeev/telemetry
0c70b410079616634ff1895b360d8d9b8a65f046
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import io from setuptools import setup with io.open("README.md", "r", encoding="utf-8") as f: readme = f.read() setup( name="telemetry", version="0.0.1", description="Profiling in production", long_description=readme, long_description_content_type="text/markdown", ...
27.576923
84
0.666667
import io from setuptools import setup with io.open("README.md", "r", encoding="utf-8") as f: readme = f.read() setup( name="telemetry", version="0.0.1", description="Profiling in production", long_description=readme, long_description_content_type="text/markdown", author="Andrey Avdeev", ...
true
true
1c4717eb7bcd8e66085457e0e315a1117fae6d1b
487
py
Python
students/K33421/practical_works/Dzhapua_Esnat/django_project_dzhapua/project_first_app/migrations/0005_auto_20210112_1735.py
esnogram/ITMO_ICT_WebDevelopment_2020-2021
22a3d776463d50431a5745facaf7b4d55dd73b55
[ "MIT" ]
null
null
null
students/K33421/practical_works/Dzhapua_Esnat/django_project_dzhapua/project_first_app/migrations/0005_auto_20210112_1735.py
esnogram/ITMO_ICT_WebDevelopment_2020-2021
22a3d776463d50431a5745facaf7b4d55dd73b55
[ "MIT" ]
null
null
null
students/K33421/practical_works/Dzhapua_Esnat/django_project_dzhapua/project_first_app/migrations/0005_auto_20210112_1735.py
esnogram/ITMO_ICT_WebDevelopment_2020-2021
22a3d776463d50431a5745facaf7b4d55dd73b55
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2021-01-12 14:35 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_first_app', '0004_auto_20210112_1725'), ] operations = [ migrations.AlterField( model_name='license', name='...
25.631579
142
0.583162
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('project_first_app', '0004_auto_20210112_1725'), ] operations = [ migrations.AlterField( model_name='license', name='type', field=models.CharField(choice...
true
true
1c47192561935cacdc804480f0ef012db41123f8
645
py
Python
Graphy/tests/utils/test_files.py
andrepbento/OpenTracingProcessor
9e4b01cb59cecbfa04af8d5d93e3b7deb76d9ee6
[ "MIT" ]
4
2021-03-06T13:50:58.000Z
2022-03-28T15:17:07.000Z
Graphy/tests/utils/test_files.py
andrepbento/OpenTracingProcessor
9e4b01cb59cecbfa04af8d5d93e3b7deb76d9ee6
[ "MIT" ]
null
null
null
Graphy/tests/utils/test_files.py
andrepbento/OpenTracingProcessor
9e4b01cb59cecbfa04af8d5d93e3b7deb76d9ee6
[ "MIT" ]
null
null
null
""" Author: André Bento Date last modified: 26-02-2019 """ import os from unittest import TestCase from graphy.utils import files as my_files class TestFiles(TestCase): def setUp(self) -> None: super().setUp() self.__file_path = os.path.realpath(__file__) def test_get_absolute_path(...
25.8
66
0.671318
import os from unittest import TestCase from graphy.utils import files as my_files class TestFiles(TestCase): def setUp(self) -> None: super().setUp() self.__file_path = os.path.realpath(__file__) def test_get_absolute_path(self) -> None: with self.assertRaises(FileNotFoundError): ...
true
true
1c471a5a4d3049b0f68e2c3cdd6645cca95fe30f
14,320
py
Python
transitions/extensions/nesting.py
timokoola/timoechobot
c6e18aa29b538b73dcef1898f1d45bb3bf6d0d55
[ "Apache-2.0" ]
null
null
null
transitions/extensions/nesting.py
timokoola/timoechobot
c6e18aa29b538b73dcef1898f1d45bb3bf6d0d55
[ "Apache-2.0" ]
null
null
null
transitions/extensions/nesting.py
timokoola/timoechobot
c6e18aa29b538b73dcef1898f1d45bb3bf6d0d55
[ "Apache-2.0" ]
null
null
null
from ..core import Machine, Transition, State, Event, listify, MachineError, EventData from six import string_types import copy from functools import partial import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class FunctionWrapper(object): def __init__(self, func, path)...
44.890282
122
0.5625
from ..core import Machine, Transition, State, Event, listify, MachineError, EventData from six import string_types import copy from functools import partial import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class FunctionWrapper(object): def __init__(self, func, path)...
true
true
1c471d10ce8e04eeb505e3f4ed1e1419f490f38a
3,731
py
Python
homeassistant/components/simplisafe/binary_sensor.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
5
2019-02-24T11:46:18.000Z
2019-05-28T17:37:21.000Z
homeassistant/components/simplisafe/binary_sensor.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
77
2020-07-16T16:43:09.000Z
2022-03-31T06:14:37.000Z
homeassistant/components/simplisafe/binary_sensor.py
Vaarlion/core
f3de8b9f28de01abf72c0f5bb0b457eb1841f201
[ "Apache-2.0" ]
11
2020-12-16T13:48:14.000Z
2022-02-01T00:28:05.000Z
"""Support for SimpliSafe binary sensors.""" from __future__ import annotations from simplipy.entity import Entity as SimplipyEntity, EntityTypes from simplipy.system.v2 import SystemV2 from simplipy.system.v3 import SystemV3 from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CL...
31.618644
84
0.693916
from __future__ import annotations from simplipy.entity import Entity as SimplipyEntity, EntityTypes from simplipy.system.v2 import SystemV2 from simplipy.system.v3 import SystemV3 from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_DOOR, DEVICE_CLASS_GAS, DEVICE_CL...
true
true
1c471d26f4e0f5fcaf6255a003f2d7ce2936056e
19,223
py
Python
spectrochempy/core/analysis/simplisma.py
spectrochempy/spectrochempy
829b290f465e630078785e303dbab197cd78b815
[ "Apache-2.0", "CECILL-B", "BSD-3-Clause" ]
44
2020-05-14T01:56:40.000Z
2022-03-23T11:16:30.000Z
spectrochempy/core/analysis/simplisma.py
spectrochempy/spectrochempy
829b290f465e630078785e303dbab197cd78b815
[ "Apache-2.0", "CECILL-B", "BSD-3-Clause" ]
210
2020-05-22T17:33:22.000Z
2022-03-20T16:50:30.000Z
spectrochempy/core/analysis/simplisma.py
spectrochempy/spectrochempy
829b290f465e630078785e303dbab197cd78b815
[ "Apache-2.0", "CECILL-B", "BSD-3-Clause" ]
9
2020-05-16T15:36:02.000Z
2022-03-23T11:16:56.000Z
# -*- coding: utf-8 -*- # # ============================================================================= # Copyright (©) 2015-2022 LCS # Laboratoire Catalyse et Spectrochimie, Caen, France. # CeCILL-B FREE SOFTWARE LICENSE AGREEMENT # See full LICENSE agreement in the root directory # ================================...
36.967308
114
0.427509
__all__ = ["SIMPLISMA"] __dataset_methods__ = [] import numpy as np import warnings from traitlets import HasTraits, Instance, Unicode from spectrochempy.core.dataset.nddataset import NDDataset from spectrochempy.core.dataset.npy import dot from spectrochempy.core import info_, set_loglevel, INFO class SIMPLI...
true
true
1c471da88d59c2507feef993fda3aee7a9be0942
743
py
Python
oscar/utils/argparse.py
IntelLabs/OSCAR
25d1dea35727379117e11b7238b5a0d1ed19acad
[ "BSD-3-Clause" ]
13
2021-02-12T18:41:53.000Z
2022-01-14T07:17:15.000Z
oscar/utils/argparse.py
IntelLabs/OSCAR
25d1dea35727379117e11b7238b5a0d1ed19acad
[ "BSD-3-Clause" ]
null
null
null
oscar/utils/argparse.py
IntelLabs/OSCAR
25d1dea35727379117e11b7238b5a0d1ed19acad
[ "BSD-3-Clause" ]
2
2021-03-05T18:27:23.000Z
2021-03-05T23:16:09.000Z
# # Copyright (C) 2020 Georgia Institute of Technology. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # from argparse import ArgumentParser, Action, Namespace from typing import List class NegateAction(Action): # adapted from https://stackoverflow.com/a/34736291 def __call__( self, ...
24.766667
85
0.643338
from argparse import ArgumentParser, Action, Namespace from typing import List class NegateAction(Action): def __call__( self, parser: ArgumentParser, namespace: Namespace, values: List[str], option: str, ): setattr(namespace, self.dest, option[2:4] != "no...
true
true
1c471eec2870d4cfe9b1cd1a30eaad7b3ab34d2a
14,023
py
Python
experiment.py
pawni/sgld_online_approximation
1edae8a669fdeef4e5501bcb07d6b809fc4cccd9
[ "MIT" ]
7
2017-04-25T08:49:22.000Z
2018-05-14T08:42:34.000Z
experiment.py
pawni/sgld_online_approximation
1edae8a669fdeef4e5501bcb07d6b809fc4cccd9
[ "MIT" ]
null
null
null
experiment.py
pawni/sgld_online_approximation
1edae8a669fdeef4e5501bcb07d6b809fc4cccd9
[ "MIT" ]
5
2017-05-27T07:00:07.000Z
2020-03-09T04:04:58.000Z
import tensorflow as tf import numpy as np import os from tensorflow.examples.tutorials.mnist import input_data import edward as ed from edward.models import Normal, Categorical, Multinomial, Empirical, PointMass from tensorflow.python.training import moving_averages # setup function to handle session configuration an...
52.718045
121
0.617343
import tensorflow as tf import numpy as np import os from tensorflow.examples.tutorials.mnist import input_data import edward as ed from edward.models import Normal, Categorical, Multinomial, Empirical, PointMass from tensorflow.python.training import moving_averages def setup(): tf.reset_default_graph() os.en...
true
true
1c472050daedf1a77010a344d73d87639472c613
7,577
py
Python
src/opnsense/scripts/netflow/lib/flowparser.py
ppmathis/opnsense-core
ffd506037a66804755cc3a7b3536a0a9450c10aa
[ "BSD-2-Clause" ]
null
null
null
src/opnsense/scripts/netflow/lib/flowparser.py
ppmathis/opnsense-core
ffd506037a66804755cc3a7b3536a0a9450c10aa
[ "BSD-2-Clause" ]
null
null
null
src/opnsense/scripts/netflow/lib/flowparser.py
ppmathis/opnsense-core
ffd506037a66804755cc3a7b3536a0a9450c10aa
[ "BSD-2-Clause" ]
null
null
null
""" Copyright (c) 2019 Ad Schellevis <ad@opnsense.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, ...
41.631868
116
0.551538
import struct from socket import inet_ntop, AF_INET, AF_INET6, ntohl class FlowParser: field_definition_order = [ 'tag', 'recv_time', 'proto_flags_tos', 'agent_addr4', 'agent_addr6', 'src_addr4', 'src_addr6', 'dst_addr4', 'dst_addr6', ...
true
true
1c472076ed04a3d5c186ecdaba2d82b57688477b
55,537
py
Python
methylcheck/qc_plot.py
LifeEGX/methQC
2b4f960e7e5c7baca9dc778ca05ee332e2f27653
[ "MIT" ]
2
2019-10-13T21:42:14.000Z
2019-10-16T19:08:49.000Z
methylcheck/qc_plot.py
LifeEGX/methQC
2b4f960e7e5c7baca9dc778ca05ee332e2f27653
[ "MIT" ]
9
2019-07-15T18:56:51.000Z
2019-07-23T17:25:53.000Z
methylcheck/qc_plot.py
LifeEGX/methQC
2b4f960e7e5c7baca9dc778ca05ee332e2f27653
[ "MIT" ]
1
2020-01-09T14:26:02.000Z
2020-01-09T14:26:02.000Z
import warnings from pathlib import Path import logging import pandas as pd import numpy as np import seaborn as sb import matplotlib.pyplot as plt #app import methylcheck from .progress_bar import * LOGGER = logging.getLogger(__name__) __all__ = ['run_qc', 'plot_beta_by_type', 'qc_signal_intensity', 'plot_M_vs_U', ...
55.426148
209
0.648775
import warnings from pathlib import Path import logging import pandas as pd import numpy as np import seaborn as sb import matplotlib.pyplot as plt import methylcheck from .progress_bar import * LOGGER = logging.getLogger(__name__) __all__ = ['run_qc', 'plot_beta_by_type', 'qc_signal_intensity', 'plot_M_vs_U', 'plot...
true
true
1c4722894dd64b399061cba6ce7c56519333d6f2
3,378
py
Python
simscale_sdk/models/symmetry_vbc.py
slainesimscale/simscale-python-sdk
db483eeabe558e55d020f5f829a3bf13c9c287a7
[ "MIT" ]
8
2021-01-22T13:41:03.000Z
2022-01-03T09:00:10.000Z
simscale_sdk/models/symmetry_vbc.py
slainesimscale/simscale-python-sdk
db483eeabe558e55d020f5f829a3bf13c9c287a7
[ "MIT" ]
null
null
null
simscale_sdk/models/symmetry_vbc.py
slainesimscale/simscale-python-sdk
db483eeabe558e55d020f5f829a3bf13c9c287a7
[ "MIT" ]
3
2021-03-18T15:52:52.000Z
2022-01-03T08:59:30.000Z
# coding: utf-8 """ SimScale API The version of the OpenAPI document: 0.0.0 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from simscale_sdk.configuration import Configuration class SymmetryVBC(object): """NOTE: This class is auto generated by O...
27.688525
95
0.5672
import pprint import re import six from simscale_sdk.configuration import Configuration class SymmetryVBC(object): openapi_types = { 'type': 'str' } attribute_map = { 'type': 'type' } def __init__(self, type='SYMMETRY', local_vars_configuration=None): if local_var...
true
true
1c47230e511165113e34bda546e7409a06011882
382
py
Python
mtp_api/apps/disbursement/migrations/0012_index_prisoner_number.py
ministryofjustice/mtp-api
b1c34c29e4aa9f48598cb060abe1368ae7686e0b
[ "MIT" ]
5
2016-01-05T12:21:35.000Z
2020-10-28T17:06:02.000Z
mtp_api/apps/disbursement/migrations/0012_index_prisoner_number.py
ministryofjustice/mtp-api
b1c34c29e4aa9f48598cb060abe1368ae7686e0b
[ "MIT" ]
209
2015-06-12T09:39:41.000Z
2022-03-21T16:01:19.000Z
mtp_api/apps/disbursement/migrations/0012_index_prisoner_number.py
ministryofjustice/mtp-api
b1c34c29e4aa9f48598cb060abe1368ae7686e0b
[ "MIT" ]
1
2021-04-11T06:19:23.000Z
2021-04-11T06:19:23.000Z
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('disbursement', '0011_disbursement_natural_ordering'), ] operations = [ migrations.AlterField( model_name='disbursement', name='prisoner_number', field=mode...
25.466667
66
0.63089
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('disbursement', '0011_disbursement_natural_ordering'), ] operations = [ migrations.AlterField( model_name='disbursement', name='prisoner_number', field=mode...
true
true
1c4723608719c6c2a1db977050fea496f0778717
348
py
Python
xradar/__init__.py
mgrover1/pyart-xarray-sandbox
89e5cc8079a0f7d1ed62be882710e907009d2523
[ "Apache-2.0" ]
1
2022-03-30T07:54:21.000Z
2022-03-30T07:54:21.000Z
xradar/__init__.py
mgrover1/pyart-xarray-sandbox
89e5cc8079a0f7d1ed62be882710e907009d2523
[ "Apache-2.0" ]
null
null
null
xradar/__init__.py
mgrover1/pyart-xarray-sandbox
89e5cc8079a0f7d1ed62be882710e907009d2523
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # flake8: noqa """ Top-level module. """ from pkg_resources import DistributionNotFound, get_distribution from .main import create_dataset_from_sweep, convert_to_xradar try: __version__ = get_distribution(__name__).version except DistributionNotFound: # pragma: no cover __version__ = '...
31.636364
64
0.775862
from pkg_resources import DistributionNotFound, get_distribution from .main import create_dataset_from_sweep, convert_to_xradar try: __version__ = get_distribution(__name__).version except DistributionNotFound: __version__ = 'unknown'
true
true
1c4723879bb3f58b9c0ed9d4c2431b19c7c7ae96
5,977
py
Python
src/main/python/smv/smvschema.py
ninjapapa/SMV2
42cf9f176c3ec0bed61f66fbf859c18d97027dd6
[ "Apache-2.0" ]
null
null
null
src/main/python/smv/smvschema.py
ninjapapa/SMV2
42cf9f176c3ec0bed61f66fbf859c18d97027dd6
[ "Apache-2.0" ]
34
2022-02-26T04:27:34.000Z
2022-03-29T23:05:47.000Z
src/main/python/smv/smvschema.py
ninjapapa/SMV2
42cf9f176c3ec0bed61f66fbf859c18d97027dd6
[ "Apache-2.0" ]
null
null
null
# # This file is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distr...
36.224242
134
0.552953
import re import json import pyspark.sql.types as T from smv.error import SmvRuntimeError from smv.utils import is_string from smv.csv_attributes import CsvAttributes class SmvSchema(object): def __init__(self, _schema): if is_string(_schema): (s, a) = self._fullStrToSchema(_schema) el...
true
true
1c47246c602d65778a1c94df5d2b5e2fea0f4544
2,314
py
Python
tests/test_return_values.py
Plan9-Archive/limbo-qt-bridge
8c1cc4ee3a4d10c3a129a9ea103ef318c533e4fe
[ "MIT" ]
null
null
null
tests/test_return_values.py
Plan9-Archive/limbo-qt-bridge
8c1cc4ee3a4d10c3a129a9ea103ef318c533e4fe
[ "MIT" ]
null
null
null
tests/test_return_values.py
Plan9-Archive/limbo-qt-bridge
8c1cc4ee3a4d10c3a129a9ea103ef318c533e4fe
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys, time def send(message): sys.stdout.write("%i %s" % (len(message), message)) sys.stdout.flush() def enc(value, type_): s = str(value) return "%s%i %s" % (type_, len(s), s) def create(id_, name, class_): send("%s %s %s %s\n" % (enc("create", "s"), enc(id_, "i"), ...
24.104167
97
0.491357
import sys, time def send(message): sys.stdout.write("%i %s" % (len(message), message)) sys.stdout.flush() def enc(value, type_): s = str(value) return "%s%i %s" % (type_, len(s), s) def create(id_, name, class_): send("%s %s %s %s\n" % (enc("create", "s"), enc(id_, "i"), enc(name, "s"), enc(cla...
true
true
1c47251f1d885a2899627ad8fe90b650f45dcd7a
420
py
Python
ex058.py
dsjocimar/python
5716f46a9fa7f64aa78a39df9c262c5392571340
[ "MIT" ]
null
null
null
ex058.py
dsjocimar/python
5716f46a9fa7f64aa78a39df9c262c5392571340
[ "MIT" ]
null
null
null
ex058.py
dsjocimar/python
5716f46a9fa7f64aa78a39df9c262c5392571340
[ "MIT" ]
null
null
null
# Exercício 058 from random import randint tentativas = 0 computador = randint(0, 10) jogador = int(input('TENTE ADIVINHAR QUAL NÚMERO EU ESTOU PENSANDO, DE 0 A 10...')) print('PROCESSANDO...') while jogador != computador: jogador = int(input('VOCÊ ERROU! TENTE NOVAMENTE!:\n')) tentativas += 1 if tentativas ==...
30
83
0.707143
from random import randint tentativas = 0 computador = randint(0, 10) jogador = int(input('TENTE ADIVINHAR QUAL NÚMERO EU ESTOU PENSANDO, DE 0 A 10...')) print('PROCESSANDO...') while jogador != computador: jogador = int(input('VOCÊ ERROU! TENTE NOVAMENTE!:\n')) tentativas += 1 if tentativas == 0: tentativ...
true
true
1c4727047e4e277527b4df35a4017b33843a4678
613
py
Python
runpandas/_testing.py
pnposch/runpandas
25388c18b52dfcc168e81922b8ba20ca93adad20
[ "MIT" ]
11
2020-12-04T20:43:23.000Z
2022-03-16T19:19:12.000Z
runpandas/_testing.py
pnposch/runpandas
25388c18b52dfcc168e81922b8ba20ca93adad20
[ "MIT" ]
45
2020-06-23T02:50:31.000Z
2022-02-15T16:56:00.000Z
runpandas/_testing.py
pnposch/runpandas
25388c18b52dfcc168e81922b8ba20ca93adad20
[ "MIT" ]
4
2021-11-11T15:23:04.000Z
2022-02-02T13:02:12.000Z
""" Utilities for testing purposes. """ import wrapt def skip_on_exception(exp): """ Skip a test if a specific Exception is raised. This is because the Exception is raised for reasons beyond our control (e.g. flakey 3rd-party API). a signature-preserving decorator Parameters ---------- ...
21.137931
66
0.62969
import wrapt def skip_on_exception(exp): from pytest import skip @wrapt.decorator def wrapper(wrapped, instance, args, kwargs): try: return wrapped(*args, **kwargs) except exp as e: skip(str(e)) return wrapper
true
true
1c472708a7a3874db4d2144abf7360285dc39c2d
1,385
py
Python
Lib/xml/dom/html/HTMLHtmlElement.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
3
2019-07-09T20:02:48.000Z
2021-11-21T20:00:37.000Z
Lib/xml/dom/html/HTMLHtmlElement.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
null
null
null
Lib/xml/dom/html/HTMLHtmlElement.py
M-Spencer-94/configNOW
56828587253202089e77cfdfcf5329f2a7f09b3f
[ "PSF-2.0", "Apache-2.0", "MIT" ]
null
null
null
######################################################################## # # File Name: HTMLHtmlElement # # Documentation: http://docs.4suite.com/4DOM/HTMLHtmlElement.html # ### This file is automatically generated by GenerateHtml.py. ### DO NOT EDIT! """ WWW: http://4suite.com/4DOM e-mail: ...
28.265306
77
0.65343
import string from xml.dom import Node from xml.dom.html.HTMLElement import HTMLElement class HTMLHtmlElement(HTMLElement): def __init__(self, ownerDocument, nodeName="HTML"): HTMLElement.__init__(self, ownerDocument, nodeName) def _get_version(self): return self.getAttribute("VERSION...
true
true
1c472740677dec56b7aeda2e3690aaa75e2d07c1
35,268
py
Python
sdk/python/feast/registry.py
danilopeixoto/feast
57d134355364654a2275b477b3b82b149f0779ca
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/registry.py
danilopeixoto/feast
57d134355364654a2275b477b3b82b149f0779ca
[ "Apache-2.0" ]
null
null
null
sdk/python/feast/registry.py
danilopeixoto/feast
57d134355364654a2275b477b3b82b149f0779ca
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Feast 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
38.671053
118
0.651043
import json import logging from collections import defaultdict from datetime import datetime, timedelta from enum import Enum from pathlib import Path from threading import Lock from typing import Any, Dict, List, Optional, Set from urllib.parse import urlparse from google.protobuf.internal.containers import RepeatedC...
true
true
1c47274e5d7cddc1fe325007a2b3162d454f0df8
11,308
py
Python
edgeconnecttest/models.py
co-develop-drv/FGVC
60d91f85ee48d757dd070e66984ea57d7e60f668
[ "MIT" ]
1,463
2020-09-13T22:55:35.000Z
2022-03-30T20:34:32.000Z
edgeconnect/models.py
scqilin/FGVC
9820d3c1a33ba402009ecb1d25e897cbcddc74d5
[ "MIT" ]
62
2020-09-24T02:57:06.000Z
2022-03-01T01:48:39.000Z
edgeconnect/models.py
scqilin/FGVC
9820d3c1a33ba402009ecb1d25e897cbcddc74d5
[ "MIT" ]
232
2020-09-21T02:13:54.000Z
2022-03-16T22:11:28.000Z
import os import torch import torch.nn as nn import torch.optim as optim from .networks import InpaintGenerator, EdgeGenerator, Discriminator from .loss import AdversarialLoss, PerceptualLoss, StyleLoss, TotalVariationalLoss class BaseModel(nn.Module): def __init__(self, name, config): super(BaseModel, se...
35.671924
116
0.595242
import os import torch import torch.nn as nn import torch.optim as optim from .networks import InpaintGenerator, EdgeGenerator, Discriminator from .loss import AdversarialLoss, PerceptualLoss, StyleLoss, TotalVariationalLoss class BaseModel(nn.Module): def __init__(self, name, config): super(BaseModel, se...
true
true
1c472771d828e97cb35a1c49f80939e70dcd8102
6,888
py
Python
samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py
gasugesu/openapi-generator
e1c43f135639b9f300350f788fec98bbc375c932
[ "Apache-2.0" ]
3
2021-05-19T03:12:48.000Z
2022-01-28T19:15:42.000Z
samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py
gasugesu/openapi-generator
e1c43f135639b9f300350f788fec98bbc375c932
[ "Apache-2.0" ]
3
2021-05-11T23:55:26.000Z
2022-02-27T11:17:21.000Z
samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py
gasugesu/openapi-generator
e1c43f135639b9f300350f788fec98bbc375c932
[ "Apache-2.0" ]
1
2020-10-05T11:13:04.000Z
2020-10-05T11:13:04.000Z
""" OpenAPI Petstore This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501 The version of the OpenAPI document: 1.0.0 Generated by: https://openapi-generator.tech """ import re # noq...
37.232432
174
0.571138
import re import sys import nulltype from petstore_api.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_compose...
true
true
1c4727c1218907e3faea73ec7e26cd2e8292e3d2
1,709
py
Python
libs/elfutils/elfutils.py
KDE/craft-blueprints-kde
14932d4b95ce0070ab8ae5669411c62ffa304c9b
[ "BSD-2-Clause" ]
14
2017-09-04T09:01:03.000Z
2022-01-04T20:09:00.000Z
libs/elfutils/elfutils.py
KDE/craft-blueprints-kde
14932d4b95ce0070ab8ae5669411c62ffa304c9b
[ "BSD-2-Clause" ]
14
2017-12-15T08:11:22.000Z
2020-12-29T19:11:13.000Z
libs/elfutils/elfutils.py
KDE/craft-blueprints-kde
14932d4b95ce0070ab8ae5669411c62ffa304c9b
[ "BSD-2-Clause" ]
19
2017-09-05T19:16:21.000Z
2020-10-18T12:46:06.000Z
# -*- coding: utf-8 -*- import info from Package.AutoToolsPackageBase import AutoToolsPackageBase from Package.CMakePackageBase import * class subinfo(info.infoclass): def setTargets(self): for ver in ['0.181', '0.185']: self.targets[ver] = 'https://sourceware.org/elfutils/ftp/%s/elfutils-%s.t...
51.787879
240
0.725571
import info from Package.AutoToolsPackageBase import AutoToolsPackageBase from Package.CMakePackageBase import * class subinfo(info.infoclass): def setTargets(self): for ver in ['0.181', '0.185']: self.targets[ver] = 'https://sourceware.org/elfutils/ftp/%s/elfutils-%s.tar.bz2' % (ver, ver) ...
true
true
1c472884e3e30c55677ee3830a3d39ebae658645
14,991
py
Python
beartype_test/a00_unit/a90_decor/code/pep/test_pepscope.py
posita/beartype
e56399686e1f2ffd5128a4030b19314504e32450
[ "MIT" ]
null
null
null
beartype_test/a00_unit/a90_decor/code/pep/test_pepscope.py
posita/beartype
e56399686e1f2ffd5128a4030b19314504e32450
[ "MIT" ]
null
null
null
beartype_test/a00_unit/a90_decor/code/pep/test_pepscope.py
posita/beartype
e56399686e1f2ffd5128a4030b19314504e32450
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # --------------------( LICENSE )-------------------- # Copyright (c) 2014-2021 Beartype authors. # See "LICENSE" for further details. ''' **Beartype decorator PEP-compliant code wrapper scope utility unit tests.** This submodule unit tests the public API of the privat...
42.954155
83
0.686745
def test_add_func_scope_type_pass() -> None: from beartype.roar._roarexc import _BeartypeDecorBeartypistryException from beartype._cave._cavefast import NoneType, RegexCompiledType from beartype._decor._code._pep._pepscope import add_func_scope_type from beartype._util.utilobject import get_obje...
true
true
1c47294261aa77c72a9bf2fb138f12409b92d6be
440,048
py
Python
ns-allinone-3.22/ns-3.22/src/dsdv/bindings/modulegen__gcc_LP64.py
gustavo978/helpful
59e3fd062cff4451c9bf8268df78a24f93ff67b7
[ "Unlicense" ]
null
null
null
ns-allinone-3.22/ns-3.22/src/dsdv/bindings/modulegen__gcc_LP64.py
gustavo978/helpful
59e3fd062cff4451c9bf8268df78a24f93ff67b7
[ "Unlicense" ]
null
null
null
ns-allinone-3.22/ns-3.22/src/dsdv/bindings/modulegen__gcc_LP64.py
gustavo978/helpful
59e3fd062cff4451c9bf8268df78a24f93ff67b7
[ "Unlicense" ]
2
2018-06-06T14:10:23.000Z
2020-04-07T17:20:55.000Z
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
63.645936
934
0.618019
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
true
true
1c4729d25dbb86b38c2d886e908b0f130e069aaf
325
py
Python
prev_exams_and_ans/2018ccc/q3_are_we_there_yet/are_we_there_yet.py
Yueleng/ccc_cco_material
e064a76a8bdc07cbfdba3ec8f6849cc1b90317e0
[ "MIT" ]
null
null
null
prev_exams_and_ans/2018ccc/q3_are_we_there_yet/are_we_there_yet.py
Yueleng/ccc_cco_material
e064a76a8bdc07cbfdba3ec8f6849cc1b90317e0
[ "MIT" ]
null
null
null
prev_exams_and_ans/2018ccc/q3_are_we_there_yet/are_we_there_yet.py
Yueleng/ccc_cco_material
e064a76a8bdc07cbfdba3ec8f6849cc1b90317e0
[ "MIT" ]
null
null
null
import sys input = sys.stdin.readline distance = [int(s) for s in input().split()] for i in range(0, len(distance) + 1): for j in range(0, len(distance) + 1): # note that sum([]) = 0 which satifies our expectation. print(sum(distance[i:j]) if i < j else sum(distance[j:i]), " ", end='') print()...
29.545455
79
0.590769
import sys input = sys.stdin.readline distance = [int(s) for s in input().split()] for i in range(0, len(distance) + 1): for j in range(0, len(distance) + 1): print(sum(distance[i:j]) if i < j else sum(distance[j:i]), " ", end='') print()
true
true
1c4729da299e51dced35f7771e1d6476c0413115
2,072
py
Python
src/opnsense/scripts/systemhealth/fetchData.py
Kipjr/core
37a1b761d7ee8b0f02fc1daa02dc913e96e04737
[ "BSD-2-Clause" ]
2,109
2015-01-02T15:42:12.000Z
2022-03-31T20:16:10.000Z
src/opnsense/scripts/systemhealth/fetchData.py
Kipjr/core
37a1b761d7ee8b0f02fc1daa02dc913e96e04737
[ "BSD-2-Clause" ]
5,452
2015-01-03T10:30:09.000Z
2022-03-31T19:58:33.000Z
src/opnsense/scripts/systemhealth/fetchData.py
Kipjr/core
37a1b761d7ee8b0f02fc1daa02dc913e96e04737
[ "BSD-2-Clause" ]
834
2015-01-04T05:29:59.000Z
2022-03-30T00:45:49.000Z
#!/usr/local/bin/python3 """ Copyright (c) 2015-2019 Ad Schellevis <ad@opnsense.org> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain th...
41.44
95
0.693533
import sys import glob import tempfile import subprocess import os.path rrd_reports_dir = '/var/db/rrd' if len(sys.argv) > 1: filename = sys.argv[1] if filename.split('.')[-1] != 'rrd': filename += '.rrd' for rrdFilename in glob.glob('%s/*.rrd' % rrd_reports_dir): if os.path.basen...
true
true
1c4729ed525f7921854f955b75cff5d38378f20c
747
py
Python
1_languages/python/src/misc/spiral.py
praisetompane/3_programming
dd3e2e89a36a613d895fdbdd9c03845cb648fddf
[ "MIT" ]
null
null
null
1_languages/python/src/misc/spiral.py
praisetompane/3_programming
dd3e2e89a36a613d895fdbdd9c03845cb648fddf
[ "MIT" ]
null
null
null
1_languages/python/src/misc/spiral.py
praisetompane/3_programming
dd3e2e89a36a613d895fdbdd9c03845cb648fddf
[ "MIT" ]
null
null
null
import turtle #note: the horizontal and vertical distance between the sides is constant #hence (distance + 2) def spiral(turtle, counter, sides, distance, angle): if counter == sides: return else: turtle.forward(distance) turtle.right(angle) spiral(turtle, counter + 1, sides, distance...
22.636364
74
0.626506
import turtle def spiral(turtle, counter, sides, distance, angle): if counter == sides: return else: turtle.forward(distance) turtle.right(angle) spiral(turtle, counter + 1, sides, distance + 2 , angle) def main(): wn = turtle.Screen() tess = turtle.Turtle() tess.color('b...
true
true
1c472a0eb3fa196b00b8c513884f73e6218c1cd3
545
py
Python
var/spack/repos/builtin/packages/py-pydot2/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-pydot2/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/py-pydot2/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class PyPydot2(PythonPackage): """Python interface to Graphviz's Dot""" pypi = "pyd...
30.277778
96
0.73578
from spack.package import * class PyPydot2(PythonPackage): pypi = "pydot2/pydot2-1.0.33.tar.gz" version('1.0.33', sha256='02c0e681a1c437077e2bb2522fb81fa322e53ba7002cfda8b894db0392a1bc9b') depends_on('py-setuptools', type='build') depends_on('py-pyparsing', type=('build', 'run'))
true
true
1c472b7b277dd66b68dcd06802f358e5dac36e8a
166
py
Python
randconv/image/test/testpalindrome.py
jm-begon/randconv
cb7438f5876c18192e8caaf3cafd88e839c26048
[ "BSD-3-Clause" ]
1
2016-08-01T08:09:28.000Z
2016-08-01T08:09:28.000Z
randconv/image/test/testpalindrome.py
jm-begon/randconv
cb7438f5876c18192e8caaf3cafd88e839c26048
[ "BSD-3-Clause" ]
null
null
null
randconv/image/test/testpalindrome.py
jm-begon/randconv
cb7438f5876c18192e8caaf3cafd88e839c26048
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ test """ __author__ = "Begon Jean-Michel <jm.begon@gmail.com>" __copyright__ = "3-clause BSD License" __version__ = 'dev' import nose
12.769231
53
0.650602
__author__ = "Begon Jean-Michel <jm.begon@gmail.com>" __copyright__ = "3-clause BSD License" __version__ = 'dev' import nose
true
true
1c472b91e69c4fdfd62585e15e4bdb9819785323
5,705
py
Python
tests/support/cptestcase.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
19
2016-01-29T14:37:52.000Z
2022-03-30T18:08:01.000Z
tests/support/cptestcase.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
223
2016-03-02T16:39:41.000Z
2022-03-03T12:26:35.000Z
tests/support/cptestcase.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
64
2016-02-04T19:45:26.000Z
2021-12-15T02:02:31.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2011-2012, Sylvain Hellegouarch # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright noti...
39.895105
132
0.684663
from __future__ import absolute_import, print_function, unicode_literals import cherrypy import salt.utils.stringutils from salt.ext import six from salt.ext.six import BytesIO from tests.support.case import TestCase cherrypy.config.update({"environment": "test_suite"}) # if you need to actually start (why w...
true
true
1c472bcd2028610b858c56c919d0ed52ec7eb5d7
4,370
py
Python
Element3/read_and_run.py
AuckeBos/MLiPPaA
4b6c563f93e1eb7fc90f66a9a6ada16c07664d71
[ "MIT" ]
1
2021-06-03T13:23:39.000Z
2021-06-03T13:23:39.000Z
Element3/read_and_run.py
AuckeBos/MLiPPaA
4b6c563f93e1eb7fc90f66a9a6ada16c07664d71
[ "MIT" ]
null
null
null
Element3/read_and_run.py
AuckeBos/MLiPPaA
4b6c563f93e1eb7fc90f66a9a6ada16c07664d71
[ "MIT" ]
null
null
null
import argparse import csv import numpy as np import pandas as pd from tensorflow.keras.models import load_model import Element2.Evaluator from Element2.BaseClassification import BaseClassifier # As computed by the training data distribution (RebalanceTrainVal=False) multi_train_prior = np.array([.5, .125, .125, .12...
50.813953
195
0.701373
import argparse import csv import numpy as np import pandas as pd from tensorflow.keras.models import load_model import Element2.Evaluator from Element2.BaseClassification import BaseClassifier multi_train_prior = np.array([.5, .125, .125, .125, .125]) binary_train_prior = np.array([.5, .5]) multi_test_prior = np.a...
true
true
1c472de12a097cc05b9c30c9abaaff2a7aa12279
376
py
Python
product/urls.py
benilyxdd/shop-web-django
93a9549faad2703118eb2b34be3053408e7297fa
[ "MIT" ]
null
null
null
product/urls.py
benilyxdd/shop-web-django
93a9549faad2703118eb2b34be3053408e7297fa
[ "MIT" ]
null
null
null
product/urls.py
benilyxdd/shop-web-django
93a9549faad2703118eb2b34be3053408e7297fa
[ "MIT" ]
null
null
null
from django.urls import path from .views import api_products, modify_products_gui, create_product, change_product, delete_product urlpatterns = [ path('api/', api_products), path('create/', create_product.as_view()), path('modify/<int:id>', change_product.as_view()), path('delete/<int:id>', delete_prod...
34.181818
100
0.720745
from django.urls import path from .views import api_products, modify_products_gui, create_product, change_product, delete_product urlpatterns = [ path('api/', api_products), path('create/', create_product.as_view()), path('modify/<int:id>', change_product.as_view()), path('delete/<int:id>', delete_prod...
true
true
1c472e6ac9ef7ae408c43df4b67c727e1444cf81
2,158
py
Python
swap_user/otp/sites.py
artinnok/django-swap-user
f2c02b9fc5829651a6dab9c6d053dfe2425e2266
[ "MIT" ]
null
null
null
swap_user/otp/sites.py
artinnok/django-swap-user
f2c02b9fc5829651a6dab9c6d053dfe2425e2266
[ "MIT" ]
null
null
null
swap_user/otp/sites.py
artinnok/django-swap-user
f2c02b9fc5829651a6dab9c6d053dfe2425e2266
[ "MIT" ]
null
null
null
from typing import Optional from django.contrib import admin from django.http import HttpRequest from django.urls import path from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_protect from django.views.decorators.deb...
29.561644
84
0.663114
from typing import Optional from django.contrib import admin from django.http import HttpRequest from django.urls import path from django.utils.decorators import method_decorator from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf_protect from django.views.decorators.deb...
true
true
1c472f3dda2439d6bf85f18ef27843b91bd17e74
3,914
py
Python
manager/master/msgCell.py
Tootooroo/VerManager
65a37ed4f864c8d6adeade52582315aeff901fbe
[ "MIT" ]
2
2020-03-20T20:04:54.000Z
2021-03-18T12:03:54.000Z
manager/master/msgCell.py
Tootooroo/VerManager
65a37ed4f864c8d6adeade52582315aeff901fbe
[ "MIT" ]
null
null
null
manager/master/msgCell.py
Tootooroo/VerManager
65a37ed4f864c8d6adeade52582315aeff901fbe
[ "MIT" ]
null
null
null
# MIT License # # Copyright (c) 2020 Gcom # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish...
31.312
83
0.653807
import abc import asyncio import typing as T from client.messages import Message from manager.master.exceptions import UNABLE_SEND_MSG_TO_PROXY, \ MSG_WRAPPER_CFG_NOT_EXISTS import manager.master.proxy_configs as ProxyCfg class MsgWrapper: ON = 'ON' OFF = 'OFF' def __init__(self, msg: Message) -> N...
true
true
1c473066912309ccccaf9739adb7a434c66c2b09
5,228
py
Python
tests/unittests/test_rpc_messages.py
gohar94/azure-functions-python-worker
4322e53ddbcc1eea40c1b061b42653336d9003f6
[ "MIT" ]
null
null
null
tests/unittests/test_rpc_messages.py
gohar94/azure-functions-python-worker
4322e53ddbcc1eea40c1b061b42653336d9003f6
[ "MIT" ]
null
null
null
tests/unittests/test_rpc_messages.py
gohar94/azure-functions-python-worker
4322e53ddbcc1eea40c1b061b42653336d9003f6
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import os import subprocess import sys import tempfile import typing import unittest from azure_functions_worker import protos from azure_functions_worker import testutils class TestGRPC(testutils.AsyncTestCase): pre_te...
39.014925
79
0.624713
import os import subprocess import sys import tempfile import typing import unittest from azure_functions_worker import protos from azure_functions_worker import testutils class TestGRPC(testutils.AsyncTestCase): pre_test_env = os.environ.copy() pre_test_cwd = os.getcwd() def _reset_environ(self): ...
true
true
1c47307f5960a397db57f17a221cc66eb469d0a0
9,974
py
Python
tests/test_commands.py
LevitatingBusinessMan/mopidy-mpd
a8c4debc139020fbb17066b66a746644a915296c
[ "Apache-2.0" ]
68
2019-12-24T22:09:05.000Z
2022-03-06T03:56:39.000Z
tests/test_commands.py
LevitatingBusinessMan/mopidy-mpd
a8c4debc139020fbb17066b66a746644a915296c
[ "Apache-2.0" ]
53
2019-12-20T23:11:11.000Z
2022-01-30T11:20:41.000Z
tests/test_commands.py
LevitatingBusinessMan/mopidy-mpd
a8c4debc139020fbb17066b66a746644a915296c
[ "Apache-2.0" ]
21
2019-12-20T23:06:20.000Z
2022-01-20T05:43:35.000Z
import unittest from mopidy_mpd import exceptions, protocol class TestConverts(unittest.TestCase): def test_integer(self): assert 123 == protocol.INT("123") assert (-123) == protocol.INT("-123") assert 123 == protocol.INT("+123") self.assertRaises(ValueError, protocol.INT, "3.14")...
36.534799
78
0.641267
import unittest from mopidy_mpd import exceptions, protocol class TestConverts(unittest.TestCase): def test_integer(self): assert 123 == protocol.INT("123") assert (-123) == protocol.INT("-123") assert 123 == protocol.INT("+123") self.assertRaises(ValueError, protocol.INT, "3.14")...
true
true
1c4730ff99573a9d528ea79ff21a35220231baae
1,563
py
Python
tests/test_healpix_binning.py
erykoff/skyproj
f00af06df032c6956e9ce191b55b173eb5415b3a
[ "BSD-3-Clause" ]
6
2022-02-22T15:44:35.000Z
2022-03-31T17:14:18.000Z
tests/test_healpix_binning.py
erykoff/skyproj
f00af06df032c6956e9ce191b55b173eb5415b3a
[ "BSD-3-Clause" ]
15
2022-01-11T22:06:16.000Z
2022-03-07T21:49:48.000Z
tests/test_healpix_binning.py
LSSTDESC/skyproj
c1e3365e958b2bd99e72e4e053da6b0ddaceb2b2
[ "BSD-3-Clause" ]
null
null
null
import os import numpy as np import healpy as hp import matplotlib matplotlib.use("Agg") from matplotlib.testing.compare import compare_images, ImageComparisonFailure # noqa: E402 import matplotlib.pyplot as plt # noqa: E402 import skyproj # noqa: E402 ROOT = os.path.abspath(os.path.dirname(__file__)) def te...
28.944444
91
0.684581
import os import numpy as np import healpy as hp import matplotlib matplotlib.use("Agg") from matplotlib.testing.compare import compare_images, ImageComparisonFailure import matplotlib.pyplot as plt import skyproj ROOT = os.path.abspath(os.path.dirname(__file__)) def test_healpix_binning(tmp_path): plt.r...
true
true
1c47316fc571cbecdc8de42cb48fe3b2c354deab
278
py
Python
cap2/pangea/constants.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
9
2020-07-10T15:45:12.000Z
2022-01-19T10:44:13.000Z
cap2/pangea/constants.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
14
2020-06-15T16:04:54.000Z
2022-03-12T01:05:47.000Z
cap2/pangea/constants.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
5
2021-01-05T01:26:48.000Z
2022-01-23T11:20:49.000Z
CAP_WORK_ORDER_PROTO_NAME = 'cap' WORK_ORDER_PROTOS = { 'metasub_cap_qc': ('fast', '435ffcd4-a582-47d8-97b6-bf4f3a42aec5'), # TODO no harcoded UUIDs 'pre': ('pre', '62a7b78f-cb95-42d6-b956-68b45abe47f5'), 'reads': ('reads', 'f6949311-f60b-44b9-8fe4-22df2060a379'), }
34.75
94
0.697842
CAP_WORK_ORDER_PROTO_NAME = 'cap' WORK_ORDER_PROTOS = { 'metasub_cap_qc': ('fast', '435ffcd4-a582-47d8-97b6-bf4f3a42aec5'), 'pre': ('pre', '62a7b78f-cb95-42d6-b956-68b45abe47f5'), 'reads': ('reads', 'f6949311-f60b-44b9-8fe4-22df2060a379'), }
true
true
1c4731b7d21eb89aaf132cf4faedc6cb3e060ee6
11,999
py
Python
ament_cpplint/ament_cpplint/main.py
mjbogusz/ament_lint
1f5c6bba4c5180aa8d2b593c6f3aa8ee1309d36a
[ "Apache-2.0" ]
23
2015-07-08T05:42:24.000Z
2022-03-14T02:13:01.000Z
ament_cpplint/ament_cpplint/main.py
mjbogusz/ament_lint
1f5c6bba4c5180aa8d2b593c6f3aa8ee1309d36a
[ "Apache-2.0" ]
292
2015-03-06T20:11:45.000Z
2022-03-31T22:30:41.000Z
ament_cpplint/ament_cpplint/main.py
mjbogusz/ament_lint
1f5c6bba4c5180aa8d2b593c6f3aa8ee1309d36a
[ "Apache-2.0" ]
71
2016-05-24T01:24:54.000Z
2022-03-23T07:42:41.000Z
#!/usr/bin/env python3 # Copyright 2014-2015 Open Source Robotics Foundation, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
34.479885
84
0.5958
import argparse import glob import os import re import sys import time from xml.sax.saxutils import escape from xml.sax.saxutils import quoteattr from ament_cpplint import cpplint from ament_cpplint.cpplint import _cpplint_state from ament_cpplint.cpplint import ParseArguments from ament_cpplint.cpplint import Proce...
true
true
1c4731f7bfa323ac3060b8de0e3d2a54c42b64d4
91
py
Python
docs/tests/E0101.py
mrfyda/codacy-pylint-python3
e360f6c0407edebe274835d3a881d67e96adf8ba
[ "Apache-2.0" ]
17
2016-01-26T13:30:04.000Z
2022-03-06T21:11:42.000Z
docs/tests/E0101.py
mrfyda/codacy-pylint-python3
e360f6c0407edebe274835d3a881d67e96adf8ba
[ "Apache-2.0" ]
50
2019-08-14T16:14:45.000Z
2022-03-31T11:00:50.000Z
docs/tests/E0101.py
mrfyda/codacy-pylint-python3
e360f6c0407edebe274835d3a881d67e96adf8ba
[ "Apache-2.0" ]
15
2015-11-18T12:18:50.000Z
2021-01-17T22:21:41.000Z
##Patterns: E0101 class Test(): ##Err: E0101 def __init__(self): return 1
13
23
0.571429
class Test(): def __init__(self): return 1
true
true
1c47321c926529faca5535e6541d02617674a33d
4,340
py
Python
lg_media/scripts/browser_launcher.py
FuriousJulius/lg_ros_nodes
15a84c5022ab2f5b038d11a5589cd4a34010b1d6
[ "Apache-2.0" ]
16
2015-10-10T11:55:37.000Z
2022-02-24T22:47:48.000Z
lg_media/scripts/browser_launcher.py
FuriousJulius/lg_ros_nodes
15a84c5022ab2f5b038d11a5589cd4a34010b1d6
[ "Apache-2.0" ]
292
2015-09-29T21:59:53.000Z
2022-03-31T15:59:31.000Z
lg_media/scripts/browser_launcher.py
constantegonzalez/lg_ros_nodes
1c7b08c42e90205922602c86805285508d1b7971
[ "Apache-2.0" ]
5
2017-05-03T06:22:43.000Z
2021-08-19T16:54:14.000Z
#!/usr/bin/env python3 import rospy from lg_msg_defs.msg import AdhocBrowsers, AdhocBrowser from lg_common import AdhocBrowserPool from lg_msg_defs.msg import AdhocMedias from lg_common.helpers import add_url_params, make_soft_relaunch_callback from urllib.request import url2pathname from lg_common.helpers import run_...
40.560748
96
0.647696
import rospy from lg_msg_defs.msg import AdhocBrowsers, AdhocBrowser from lg_common import AdhocBrowserPool from lg_msg_defs.msg import AdhocMedias from lg_common.helpers import add_url_params, make_soft_relaunch_callback from urllib.request import url2pathname from lg_common.helpers import run_with_influx_exception_h...
true
true
1c4732f965a4bbbf1360a297ce9591045ac03ef5
3,902
py
Python
chesstab/gui/cqlrow.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
chesstab/gui/cqlrow.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
chesstab/gui/cqlrow.py
RogerMarsh/chesstab
01d375dc6bf025b621612a84513e55c4640a78ad
[ "BSD-3-Clause" ]
null
null
null
# cqlrow.py # Copyright 2016 Roger Marsh # Licence: See LICENCE (BSD licence) """Create widgets to display Chess Query Language (ChessQL) statement records. """ import tkinter from solentware_grid.gui.datarow import ( GRID_COLUMNCONFIGURE, GRID_CONFIGURE, WIDGET_CONFIGURE, WIDGET, ROW, ) from .d...
28.275362
78
0.6143
import tkinter from solentware_grid.gui.datarow import ( GRID_COLUMNCONFIGURE, GRID_CONFIGURE, WIDGET_CONFIGURE, WIDGET, ROW, ) from .datarow import DataRow from ..core.chessrecord import ChessDBrecordPartial from .cqldbedit import CQLDbEdit from .cqldbdelete import CQLDbDelete from .cqldbshow i...
true
true
1c4733f6e497d4ac869d53a3d5bd699077b4b8f3
1,267
py
Python
wav2rec/_utils/printing.py
TariqAHassan/wav2rec
8d3f33291f246d80a4935cf7aa2cc75f110d9c15
[ "MIT" ]
10
2021-11-12T03:58:05.000Z
2022-02-19T08:13:30.000Z
wav2rec/_utils/printing.py
TariqAHassan/wav2rec
8d3f33291f246d80a4935cf7aa2cc75f110d9c15
[ "MIT" ]
null
null
null
wav2rec/_utils/printing.py
TariqAHassan/wav2rec
8d3f33291f246d80a4935cf7aa2cc75f110d9c15
[ "MIT" ]
1
2021-11-12T03:58:05.000Z
2021-11-12T03:58:05.000Z
""" Printing Utils References: * https://github.com/TariqAHassan/alsek/blob/master/tests/_utils/test_printing.py """ from datetime import datetime from typing import Any, Dict, Optional def _format_value(value: Any) -> Any: if isinstance(value, (str, datetime)): return f"'{value}'" ...
28.795455
89
0.631413
from datetime import datetime from typing import Any, Dict, Optional def _format_value(value: Any) -> Any: if isinstance(value, (str, datetime)): return f"'{value}'" else: return value def _format_params(params: Dict[str, Any], join_on: str) -> str: return join_on.join((f"{k}={_format_va...
true
true
1c4734480bf8310ef21253d0538b10a554dce1b8
1,105
py
Python
phabricator/komand_phabricator/actions/status/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
phabricator/komand_phabricator/actions/status/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
phabricator/komand_phabricator/actions/status/schema.py
xhennessy-r7/insightconnect-plugins
59268051313d67735b5dd3a30222eccb92aca8e9
[ "MIT" ]
null
null
null
# GENERATED BY KOMAND SDK - DO NOT EDIT import komand import json class Input: ID = "id" STATUS = "status" class Output: MESSAGE = "message" class StatusInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "id": { "type":...
17.539683
73
0.538462
import komand import json class Input: ID = "id" STATUS = "status" class Output: MESSAGE = "message" class StatusInput(komand.Input): schema = json.loads(""" { "type": "object", "title": "Variables", "properties": { "id": { "type": "string", "title": "ID", "d...
true
true
1c47366623f38c145fc92b7022d4d60a8eea6ccf
248
py
Python
dslrpp/analysis/__init__.py
s-jevtic/DSLR-photometry-pipeline
d239b48ab13c3c95ff8da363ea90ac6dbde1efe5
[ "MIT" ]
null
null
null
dslrpp/analysis/__init__.py
s-jevtic/DSLR-photometry-pipeline
d239b48ab13c3c95ff8da363ea90ac6dbde1efe5
[ "MIT" ]
null
null
null
dslrpp/analysis/__init__.py
s-jevtic/DSLR-photometry-pipeline
d239b48ab13c3c95ff8da363ea90ac6dbde1efe5
[ "MIT" ]
null
null
null
""" """ from .photometry import SNR, instrumental_flux, lightcurve, save_lcData from .period import periodogram, est_period __all__ = [ "SNR", "instrumental_flux", "lightcurve", "save_lcData", "periodogram", "est_period", ]
27.555556
71
0.673387
from .photometry import SNR, instrumental_flux, lightcurve, save_lcData from .period import periodogram, est_period __all__ = [ "SNR", "instrumental_flux", "lightcurve", "save_lcData", "periodogram", "est_period", ]
true
true
1c473726b38cc42504f78969a255f497d6a4c91b
7,808
py
Python
ropper/loaders/loader.py
cbayet/Ropper
66adeb0a1d4322ced69643c3be2552c057d116d2
[ "BSD-3-Clause" ]
1,502
2015-01-07T09:11:08.000Z
2022-03-29T10:08:26.000Z
ropper/loaders/loader.py
cbayet/Ropper
66adeb0a1d4322ced69643c3be2552c057d116d2
[ "BSD-3-Clause" ]
126
2015-03-10T15:32:26.000Z
2022-03-03T08:30:10.000Z
ropper/loaders/loader.py
cbayet/Ropper
66adeb0a1d4322ced69643c3be2552c057d116d2
[ "BSD-3-Clause" ]
214
2015-03-10T00:17:16.000Z
2022-03-19T07:04:08.000Z
# coding=utf-8 # Copyright 2018 Sascha Schirra # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following di...
28.49635
105
0.632813
from ropper.common.abstract import * from ctypes import * from ropper.common.enum import Enum from struct import pack_into from ropper.common.error import * from ropper.arch import * from hashlib import sha256 import re class Type(Enum): _enum_ = 'ELF PE MACH_O RAW NONE' class DataContainer(object): def __i...
true
true
1c4737df2efb759c6d135e0d72ca30a3e78a147a
4,871
py
Python
_unittests/ut_notebook/test_dynamic_cs.py
sdpython/csharpyml
f814af89c5b988924a7f31fe71ec6eb515292070
[ "MIT" ]
4
2018-06-07T06:34:32.000Z
2020-02-12T17:39:58.000Z
_unittests/ut_notebook/test_dynamic_cs.py
sdpython/csharpyml
f814af89c5b988924a7f31fe71ec6eb515292070
[ "MIT" ]
13
2018-05-21T23:06:58.000Z
2018-12-30T17:57:11.000Z
_unittests/ut_notebook/test_dynamic_cs.py
sdpython/csharpyml
f814af89c5b988924a7f31fe71ec6eb515292070
[ "MIT" ]
null
null
null
""" @brief test log(time=2s) """ import sys import os import unittest from sklearn import datasets import pandas from pyquickhelper.pycode import ExtTestCase, get_temp_folder try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os....
30.829114
112
0.485116
import sys import os import unittest from sklearn import datasets import pandas from pyquickhelper.pycode import ExtTestCase, get_temp_folder try: import src except ImportError: path = os.path.normpath( os.path.abspath( os.path.join( os.path.split(__file__)[0], ...
true
true
1c47385da5e1df91f69b6c3c9a480257a81f7483
705
py
Python
repos/system_upgrade/el7toel8/actors/opensshprotocolcheck/actor.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
21
2018-11-20T15:58:39.000Z
2022-03-15T19:57:24.000Z
repos/system_upgrade/el7toel8/actors/opensshprotocolcheck/actor.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
732
2018-11-21T18:33:26.000Z
2022-03-31T16:16:24.000Z
repos/system_upgrade/el7toel8/actors/opensshprotocolcheck/actor.py
sm00th/leapp-repository
1c171ec3a5f9260a3c6f84a9b15cad78a875ac61
[ "Apache-2.0" ]
85
2018-11-20T17:55:00.000Z
2022-03-29T09:40:31.000Z
from leapp.actors import Actor from leapp.libraries.actor import opensshprotocolcheck from leapp.models import Report, OpenSshConfig from leapp.tags import ChecksPhaseTag, IPUWorkflowTag class OpenSshProtocolCheck(Actor): """ Protocol configuration option was removed. Check the value of Protocol in OpenS...
30.652174
72
0.741844
from leapp.actors import Actor from leapp.libraries.actor import opensshprotocolcheck from leapp.models import Report, OpenSshConfig from leapp.tags import ChecksPhaseTag, IPUWorkflowTag class OpenSshProtocolCheck(Actor): name = 'open_ssh_protocol' consumes = (OpenSshConfig, ) produces = (Report, ) t...
true
true
1c473885e4c622750632dab97a746f613fabe1e6
4,575
py
Python
CIM16/IEC61970/Informative/InfGMLSupport/GmlSymbol.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM16/IEC61970/Informative/InfGMLSupport/GmlSymbol.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
null
null
null
CIM16/IEC61970/Informative/InfGMLSupport/GmlSymbol.py
MaximeBaudette/PyCIM
d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14
[ "MIT" ]
1
2021-04-02T18:04:49.000Z
2021-04-02T18:04:49.000Z
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
44.417476
353
0.695738
from CIM16.IEC61970.Core.IdentifiedObject import IdentifiedObject class GmlSymbol(IdentifiedObject): def __init__(self, version='', level='', type='', GmlFeatureStyles=None, GmlBaseSymbol=None, *args, **kw_args): self.version = version self.level = level self.typ...
true
true
1c4739397755e22e44590763ca56a2172d9a5609
1,896
py
Python
jina/executors/crafters/__init__.py
robertjrodger/jina
3bf8c1578f4f1a39b1c154705a535c52e1490141
[ "Apache-2.0" ]
null
null
null
jina/executors/crafters/__init__.py
robertjrodger/jina
3bf8c1578f4f1a39b1c154705a535c52e1490141
[ "Apache-2.0" ]
2
2021-02-15T01:40:38.000Z
2021-02-15T02:00:21.000Z
jina/executors/crafters/__init__.py
robertjrodger/jina
3bf8c1578f4f1a39b1c154705a535c52e1490141
[ "Apache-2.0" ]
null
null
null
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import inspect from typing import Dict from .. import BaseExecutor from ...helper import typename class BaseCrafter(BaseExecutor): """ A :class:`BaseCrafter` transforms the content of `Document`. It can...
37.92
123
0.6577
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved." __license__ = "Apache-2.0" import inspect from typing import Dict from .. import BaseExecutor from ...helper import typename class BaseCrafter(BaseExecutor): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)...
true
true
1c473c05bff8aec499bf1749a85df208a69118a7
11,036
py
Python
detect_board.py
yashpatel5400/ARia
1f9ad25f943f5b8859a80470715be8698863b2f8
[ "MIT" ]
null
null
null
detect_board.py
yashpatel5400/ARia
1f9ad25f943f5b8859a80470715be8698863b2f8
[ "MIT" ]
null
null
null
detect_board.py
yashpatel5400/ARia
1f9ad25f943f5b8859a80470715be8698863b2f8
[ "MIT" ]
null
null
null
import numpy as np import cv2 def rectify(h): if h.shape[0] * h.shape[1] != 8: return None h = h.reshape((4,2)) hnew = np.zeros((4,2)) add = h.sum(1) hnew[0] = h[np.argmin(add)] hnew[2] = h[np.argmax(add)] diff = np.diff(h,axis=1) hnew[1] = h[np.argmin(diff)] hnew[3] = h[...
41.961977
233
0.631026
import numpy as np import cv2 def rectify(h): if h.shape[0] * h.shape[1] != 8: return None h = h.reshape((4,2)) hnew = np.zeros((4,2)) add = h.sum(1) hnew[0] = h[np.argmin(add)] hnew[2] = h[np.argmax(add)] diff = np.diff(h,axis=1) hnew[1] = h[np.argmin(diff)] hnew[3] = h[...
true
true
1c473c12193e06e2a39525eaa752bdd46ae838b4
4,930
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations_async/_express_route_service_providers_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2019-05-17T21:24:53.000Z
2020-02-12T11:13:42.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations_async/_express_route_service_providers_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
15
2019-07-12T18:18:04.000Z
2019-07-25T20:55:51.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations_async/_express_route_service_providers_operations_async.py
LianwMS/azure-sdk-for-python
612d7bca9de86ee1bd1fa59291d7bf897ba9213f
[ "MIT" ]
2
2020-05-21T22:51:22.000Z
2020-05-26T20:53:01.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
46.509434
135
0.669777
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse fro...
true
true
1c473d201736fc5a4253bb86984a126ba886d2b1
463
py
Python
services/core-api/tests/parties/party_appt/resources/test_mine_party_appt_type_resource.py
bcgov/mds
6c427a66a5edb4196222607291adef8fd6677038
[ "Apache-2.0" ]
25
2018-07-09T19:04:37.000Z
2022-03-15T17:27:10.000Z
services/core-api/tests/parties/party_appt/resources/test_mine_party_appt_type_resource.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
983
2018-04-25T20:08:07.000Z
2022-03-31T21:45:20.000Z
services/core-api/tests/parties/party_appt/resources/test_mine_party_appt_type_resource.py
areyeslo/mds
e8c38e593e09b78e2a57009c0d003d6c4bfa32e6
[ "Apache-2.0" ]
58
2018-05-15T22:35:50.000Z
2021-11-29T19:40:52.000Z
import json from app.api.parties.party_appt.models.mine_party_appt_type import MinePartyAppointmentType # GET def test_get_mine_party_appt_type(test_client, db_session, auth_headers): get_resp = test_client.get( '/parties/mines/relationship-types', headers=auth_headers['full_auth_header']) get_data =...
35.615385
91
0.779698
import json from app.api.parties.party_appt.models.mine_party_appt_type import MinePartyAppointmentType def test_get_mine_party_appt_type(test_client, db_session, auth_headers): get_resp = test_client.get( '/parties/mines/relationship-types', headers=auth_headers['full_auth_header']) get_data = json....
true
true
1c473d39b2de3a119d3f5e5e4c9bb77889b782d6
923
py
Python
setup.py
nolimitcarter/stock-mirror
8bbc483af01f2d05d6f929d861a023e250500c8e
[ "RSA-MD" ]
1
2021-02-27T18:59:42.000Z
2021-02-27T18:59:42.000Z
setup.py
nolimitcarter/stock-mirror
8bbc483af01f2d05d6f929d861a023e250500c8e
[ "RSA-MD" ]
null
null
null
setup.py
nolimitcarter/stock-mirror
8bbc483af01f2d05d6f929d861a023e250500c8e
[ "RSA-MD" ]
1
2021-02-21T04:21:40.000Z
2021-02-21T04:21:40.000Z
#!/usr/bin/python import os import sys from setuptools import setup, find_packages # Must be ran as root or as sudo if os.getuid() != 0: print('ERROR: Need to run as root') sys.exit(1) # Install the requirements if the system does not have it installed print('INFO: Checking and installing requirements') os.s...
27.969697
80
0.712893
import os import sys from setuptools import setup, find_packages if os.getuid() != 0: print('ERROR: Need to run as root') sys.exit(1) print('INFO: Checking and installing requirements') os.system('! dpkg -S python-imaging-tk && apt-get -y install python-imaging-tk') print('INFO: Generating the requirements ...
true
true
1c473d5db17232127b3c528ae791a934a3665187
6,500
py
Python
scripts/export_seqqa.py
philiptzou/hiv-variation
7ba3ffb1510b5d2b72387a0dead94d81095a1cbc
[ "MIT" ]
null
null
null
scripts/export_seqqa.py
philiptzou/hiv-variation
7ba3ffb1510b5d2b72387a0dead94d81095a1cbc
[ "MIT" ]
2
2020-02-19T21:49:11.000Z
2021-04-27T16:48:30.000Z
scripts/export_seqqa.py
hivdb/hiv-variation
7ba3ffb1510b5d2b72387a0dead94d81095a1cbc
[ "MIT" ]
null
null
null
#! /usr/bin/env python import csv import json from collections import defaultdict import click from hivdbql import app db = app.db models = app.models Isolate = models.Isolate Host = models.Host Species = models.Species ClinicalIsolate = models.ClinicalIsolate Subtype = models.Subtype Sequence = models.Sequence Refe...
31.553398
78
0.580308
import csv import json from collections import defaultdict import click from hivdbql import app db = app.db models = app.models Isolate = models.Isolate Host = models.Host Species = models.Species ClinicalIsolate = models.ClinicalIsolate Subtype = models.Subtype Sequence = models.Sequence Reference = models.Referenc...
true
true
1c473df0f9c48b185376676de8e91c7a3df4ab2e
7,762
py
Python
raspberry_eye/pan_tilt/pan_tilt.py
GalBrandwine/Raspberry_Eye
dbfe2fd4f9a695dc9017007e88fa8a2a13dfbcaa
[ "Apache-2.0" ]
1
2021-07-01T20:57:32.000Z
2021-07-01T20:57:32.000Z
pan_tilt_tracking/pan_tilt/pan_tilt.py
GalBrandwine/Gimbal_Pi
e2fa465f17474c31c2cbe4be1959924224472e7e
[ "MIT" ]
null
null
null
pan_tilt_tracking/pan_tilt/pan_tilt.py
GalBrandwine/Gimbal_Pi
e2fa465f17474c31c2cbe4be1959924224472e7e
[ "MIT" ]
3
2018-11-22T14:45:08.000Z
2018-11-26T12:16:02.000Z
#!/usr/bin/env python """ ================================================ ABElectronics Servo Pi pwm controller | PWM servo controller demo run with: python demo_servomove.py ================================================ This demo shows how to set the limits of movement on a servo and then move between those positi...
32.751055
93
0.546251
import time try: from driver.ServoPi import Servo except ImportError: print("Failed to import ServoPi from python system path") print("Importing from parent folder instead") try: import sys sys.path.append("..") from ServoPi import Servo except ImportError: raise I...
true
true
1c473df1c5ab7f1a3f2a1362c0a5f273fa3b6093
1,252
py
Python
pwd_python/int_search.py
miccaldas/pwd_python
434a9453e554e1a0195fc78e43b0a2f9b0f7822f
[ "MIT" ]
null
null
null
pwd_python/int_search.py
miccaldas/pwd_python
434a9453e554e1a0195fc78e43b0a2f9b0f7822f
[ "MIT" ]
null
null
null
pwd_python/int_search.py
miccaldas/pwd_python
434a9453e554e1a0195fc78e43b0a2f9b0f7822f
[ "MIT" ]
null
null
null
from mysql.connector import connect, Error from colr import color import fire def search_int(): try: busca = input(color(" What is the id? ", fore="#fe7243")) conn = connect(host="localhost", user="mic", password="xxxx", database="pwd") cur = conn.cursor() query = " SELECT pwdid, s...
39.125
102
0.557508
from mysql.connector import connect, Error from colr import color import fire def search_int(): try: busca = input(color(" What is the id? ", fore="#fe7243")) conn = connect(host="localhost", user="mic", password="xxxx", database="pwd") cur = conn.cursor() query = " SELECT pwdid, s...
true
true
1c473f9ba97beb6712e1c41d567868d7db8681e0
7,444
py
Python
sp_experiment/tests/test_utils.py
sappelhoff/sp_psychopy
79cae80eb920b35fb27a52acfde0eda38b9124b1
[ "BSD-3-Clause" ]
1
2022-03-11T14:05:31.000Z
2022-03-11T14:05:31.000Z
sp_experiment/tests/test_utils.py
sappelhoff/sp_psychopy
79cae80eb920b35fb27a52acfde0eda38b9124b1
[ "BSD-3-Clause" ]
8
2019-02-12T07:47:47.000Z
2021-01-25T14:05:05.000Z
sp_experiment/tests/test_utils.py
sappelhoff/sp_psychopy
79cae80eb920b35fb27a52acfde0eda38b9124b1
[ "BSD-3-Clause" ]
2
2019-02-19T17:10:43.000Z
2022-03-11T14:05:32.000Z
"""Testing the utility functions.""" import time import os import os.path as op from tempfile import gettempdir from shutil import rmtree, copyfile from collections import OrderedDict import pytest import numpy as np import pandas as pd import sp_experiment from sp_experiment.define_settings import (EXPECTED_FPS, ...
34.623256
103
0.637157
import time import os import os.path as op from tempfile import gettempdir from shutil import rmtree, copyfile from collections import OrderedDict import pytest import numpy as np import pandas as pd import sp_experiment from sp_experiment.define_settings import (EXPECTED_FPS, ...
true
true
1c473f9c6965b22315dbb289eff8247c71bdc790
15,497
py
Python
ldm/data/imagenet.py
samedii/latent-diffusion
f13bf9bf463d95b5a16aeadd2b02abde31f769f8
[ "MIT" ]
563
2021-12-21T02:26:38.000Z
2022-03-31T05:54:51.000Z
ldm/data/imagenet.py
samedii/latent-diffusion
f13bf9bf463d95b5a16aeadd2b02abde31f769f8
[ "MIT" ]
23
2021-12-22T10:00:00.000Z
2022-03-24T20:43:49.000Z
ldm/data/imagenet.py
samedii/latent-diffusion
f13bf9bf463d95b5a16aeadd2b02abde31f769f8
[ "MIT" ]
51
2021-12-21T02:27:04.000Z
2022-03-23T12:30:31.000Z
import os, yaml, pickle, shutil, tarfile, glob import cv2 import albumentations import PIL import numpy as np import torchvision.transforms.functional as TF from omegaconf import OmegaConf from functools import partial from PIL import Image from tqdm import tqdm from torch.utils.data import Dataset, Subset import tami...
39.232911
115
0.600245
import os, yaml, pickle, shutil, tarfile, glob import cv2 import albumentations import PIL import numpy as np import torchvision.transforms.functional as TF from omegaconf import OmegaConf from functools import partial from PIL import Image from tqdm import tqdm from torch.utils.data import Dataset, Subset import tami...
true
true
1c47411f4cf5b0336d56840ed649c1d4c06df542
3,892
py
Python
Inference/src/exit_placement/modules/waspVideo.py
ZSL98/ETBA
618317698adb9e372fb11dc0c3a01f856e0759b0
[ "MIT" ]
1
2021-12-01T15:22:44.000Z
2021-12-01T15:22:44.000Z
Inference/src/run_engine/modules/waspVideo.py
ZSL98/ETBA
618317698adb9e372fb11dc0c3a01f856e0759b0
[ "MIT" ]
null
null
null
Inference/src/run_engine/modules/waspVideo.py
ZSL98/ETBA
618317698adb9e372fb11dc0c3a01f856e0759b0
[ "MIT" ]
null
null
null
import math import torch import torch.nn as nn import torch.nn.functional as F class _AtrousModule(nn.Module): def __init__(self, inplanes, planes, kernel_size, padding, dilation, BatchNorm): super(_AtrousModule, self).__init__() self.atrous_conv = nn.Conv2d(inplanes, planes, kernel_size=kernel_siz...
35.706422
113
0.548304
import math import torch import torch.nn as nn import torch.nn.functional as F class _AtrousModule(nn.Module): def __init__(self, inplanes, planes, kernel_size, padding, dilation, BatchNorm): super(_AtrousModule, self).__init__() self.atrous_conv = nn.Conv2d(inplanes, planes, kernel_size=kernel_siz...
true
true
1c4741d36aea8c54d0b8b5af19f5e4e2cb552b0c
2,840
py
Python
perfkitbenchmarker/linux_packages/mysql80.py
dongbinghua/PerfKitBenchmarker
d3424af4b4d60b4a5c19009b8aee29ceab7132d4
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_packages/mysql80.py
dongbinghua/PerfKitBenchmarker
d3424af4b4d60b4a5c19009b8aee29ceab7132d4
[ "Apache-2.0" ]
null
null
null
perfkitbenchmarker/linux_packages/mysql80.py
dongbinghua/PerfKitBenchmarker
d3424af4b4d60b4a5c19009b8aee29ceab7132d4
[ "Apache-2.0" ]
1
2022-02-20T14:46:56.000Z
2022-02-20T14:46:56.000Z
# Copyright 2020 PerfKitBenchmarker 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...
33.809524
80
0.689085
import re MYSQL_PSWD = 'perfkitbenchmarker' PACKAGE_NAME = 'mysql' def YumInstall(vm): raise NotImplementedError def AptInstall(vm): vm.RemoteCommand('wget -c ' 'https://repo.mysql.com//mysql-apt-config_0.8.17-1_all.deb') vm.RemoteCommand('echo mysql-apt-config mysql-apt-config/select-s...
true
true
1c47428ab6ac6df0584b28628f8c4a0146a8c436
750
py
Python
setup.py
lmkoch/logistic-normal
b270811b42adc7037e342c8b039a759460322de3
[ "MIT" ]
2
2017-10-13T01:03:51.000Z
2019-05-24T09:46:55.000Z
setup.py
lmkoch/logistic-normal
b270811b42adc7037e342c8b039a759460322de3
[ "MIT" ]
null
null
null
setup.py
lmkoch/logistic-normal
b270811b42adc7037e342c8b039a759460322de3
[ "MIT" ]
null
null
null
__author__ = 'lkoch' from setuptools import setup, find_packages setup( # Application name: name='logisticnormal', description='Logistic-normal distribution: provides probability density function and parameter estimation', # Version number (initial): version="0.1.0", # Application author d...
21.428571
111
0.652
__author__ = 'lkoch' from setuptools import setup, find_packages setup( name='logisticnormal', description='Logistic-normal distribution: provides probability density function and parameter estimation', version="0.1.0", author='Lisa Koch', author_email='l.koch@imperial.ac.uk', ...
true
true
1c47429858f6c243073d4748b736054174321ec4
3,595
py
Python
uhd_restpy/testplatform/sessions/ixnetwork/topology/dhcp6relaytlvprofile_26571057903c7fcd2a20eb10f55be22f.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
uhd_restpy/testplatform/sessions/ixnetwork/topology/dhcp6relaytlvprofile_26571057903c7fcd2a20eb10f55be22f.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
uhd_restpy/testplatform/sessions/ixnetwork/topology/dhcp6relaytlvprofile_26571057903c7fcd2a20eb10f55be22f.py
Vibaswan/ixnetwork_restpy
239fedc7050890746cbabd71ea1e91c68d9e5cad
[ "MIT" ]
null
null
null
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, copy, modify,...
36.683673
169
0.685953
from uhd_restpy.base import Base from uhd_restpy.files import Files class Dhcp6RelayTlvProfile(Base): __slots__ = () _SDM_NAME = 'dhcp6RelayTlvProfile' _SDM_ATT_MAP = { 'Count': 'count', 'DescriptiveName': 'descriptiveName', 'Name': 'name', } def __init__(self, parent): ...
true
true
1c4743783996b7abc30c57bd8fb42268e001125c
437
py
Python
commerce/auctions/migrations/0007_comment_commenttitle.py
degerahmet/Auctions-Django-Project
d87ac8b730b9d7ab3d4892494be6ca5fd4fe11cb
[ "Apache-2.0" ]
null
null
null
commerce/auctions/migrations/0007_comment_commenttitle.py
degerahmet/Auctions-Django-Project
d87ac8b730b9d7ab3d4892494be6ca5fd4fe11cb
[ "Apache-2.0" ]
null
null
null
commerce/auctions/migrations/0007_comment_commenttitle.py
degerahmet/Auctions-Django-Project
d87ac8b730b9d7ab3d4892494be6ca5fd4fe11cb
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.1 on 2020-08-21 15:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auctions', '0006_auto_20200821_1746'), ] operations = [ migrations.AddField( model_name='comment', name='commentTitle'...
21.85
61
0.606407
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auctions', '0006_auto_20200821_1746'), ] operations = [ migrations.AddField( model_name='comment', name='commentTitle', field=models.CharField(default=1...
true
true
1c47458e561dbae5189c7cf50343fbf91ad93c07
132
py
Python
web/views/auth/__init__.py
arrow2625/atxserver2
39280d0a2ec7d84c32005da919941935fd0632db
[ "MIT" ]
null
null
null
web/views/auth/__init__.py
arrow2625/atxserver2
39280d0a2ec7d84c32005da919941935fd0632db
[ "MIT" ]
null
null
null
web/views/auth/__init__.py
arrow2625/atxserver2
39280d0a2ec7d84c32005da919941935fd0632db
[ "MIT" ]
null
null
null
# coding: utf-8 # from .openid import OpenIdMixin, AuthError from .github import GithubOAuth2Mixin from .google import GoogleMixin
18.857143
42
0.80303
from .openid import OpenIdMixin, AuthError from .github import GithubOAuth2Mixin from .google import GoogleMixin
true
true