hexsha
stringlengths
40
40
size
int64
4
996k
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
4
996k
avg_line_length
float64
1.33
58.2k
max_line_length
int64
2
323k
alphanum_fraction
float64
0
0.97
content_no_comment
stringlengths
0
946k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
790018f581c8abddfcfdb7302b27ff01e6fbb81c
1,139
py
Python
1573_number_ways_to_split_string.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
1
2020-07-15T14:16:23.000Z
2020-07-15T14:16:23.000Z
1573_number_ways_to_split_string.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
null
null
null
1573_number_ways_to_split_string.py
claytonjwong/leetcode-py
16bbf8ac0ba5c80fe3ef67ade0d61a12991270a7
[ "MIT" ]
null
null
null
# # 1573. Number of Ways to Split a String # # Q: https://leetcode.com/problems/number-of-ways-to-split-a-string/ # A: https://leetcode.com/problems/number-of-ways-to-split-a-string/discuss/830433/Javascript-Python3-C%2B%2B-solutions # class Solution: def numWays(self, S: str, MOD = int(1e9 + 7)) -> int: N...
39.275862
124
0.543459
class Solution: def numWays(self, S: str, MOD = int(1e9 + 7)) -> int: N = len(S) cnt = len([c for c in S if c == '1']) if not cnt: return (N - 2) * (N - 1) // 2 % MOD if cnt % 3: return 0 K = cnt // 3 first = 0...
true
true
790019d09eb81c29d6d6712867240f600e2c9dc0
3,343
py
Python
services/endorser/api/core/config.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
12
2022-01-29T20:30:03.000Z
2022-03-29T11:46:14.000Z
services/endorser/api/core/config.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
38
2021-11-22T17:52:50.000Z
2022-03-31T17:52:00.000Z
services/endorser/api/core/config.py
Open-Earth-Foundation/traction
908b555a7f408a88541b7692d3730e37a297c919
[ "Apache-2.0" ]
9
2021-11-22T18:05:48.000Z
2022-03-29T11:25:08.000Z
import logging import os from enum import Enum from functools import lru_cache from typing import Optional from pydantic import BaseSettings, PostgresDsn logger = logging.getLogger(__name__) class EnvironmentEnum(str, Enum): PRODUCTION = "production" LOCAL = "local" class GlobalConfig(BaseSettings): T...
30.669725
107
0.714029
import logging import os from enum import Enum from functools import lru_cache from typing import Optional from pydantic import BaseSettings, PostgresDsn logger = logging.getLogger(__name__) class EnvironmentEnum(str, Enum): PRODUCTION = "production" LOCAL = "local" class GlobalConfig(BaseSettings): T...
true
true
79001a53ca98fa13b92179f06dcdd4fd9afdf353
416
py
Python
gentelella.py
Pechsopha/KITPoint
076890838ca7f57b76f7c9a9a4101c9e90b13d8b
[ "MIT" ]
566
2017-11-27T15:35:48.000Z
2022-03-25T19:35:25.000Z
gentelella.py
xu1u/flask-gentelella
408fbecdd72548bb88b70e0b08f33ab43fd9fbcf
[ "MIT" ]
21
2018-05-08T11:33:53.000Z
2021-11-12T13:01:01.000Z
gentelella.py
xu1u/flask-gentelella
408fbecdd72548bb88b70e0b08f33ab43fd9fbcf
[ "MIT" ]
235
2017-12-07T13:56:01.000Z
2022-03-11T12:48:02.000Z
from flask_migrate import Migrate from os import environ from sys import exit from config import config_dict from app import create_app, db get_config_mode = environ.get('GENTELELLA_CONFIG_MODE', 'Debug') try: config_mode = config_dict[get_config_mode.capitalize()] except KeyError: exit('Error: Invalid GENTE...
24.470588
77
0.798077
from flask_migrate import Migrate from os import environ from sys import exit from config import config_dict from app import create_app, db get_config_mode = environ.get('GENTELELLA_CONFIG_MODE', 'Debug') try: config_mode = config_dict[get_config_mode.capitalize()] except KeyError: exit('Error: Invalid GENTE...
true
true
79001b68029fdd3de4f8cd7f49170776ecedbfc8
944
py
Python
var/spack/repos/builtin/packages/r-matrixstats/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2018-11-27T03:39:44.000Z
2021-09-06T15:50:35.000Z
var/spack/repos/builtin/packages/r-matrixstats/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2019-01-11T20:11:52.000Z
2019-01-11T20:11:52.000Z
var/spack/repos/builtin/packages/r-matrixstats/package.py
HaochengLIU/spack
26e51ff1705a4d6234e2a0cf734f93f7f95df5cb
[ "ECL-2.0", "Apache-2.0", "MIT" ]
1
2020-10-14T14:20:17.000Z
2020-10-14T14:20:17.000Z
# Copyright 2013-2018 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 import * class RMatrixstats(RPackage): """High-performing functions operating on rows and columns of matr...
42.909091
79
0.720339
from spack import * class RMatrixstats(RPackage): homepage = "https://cran.rstudio.com/web/packages/matrixStats/index.html" url = "https://cran.rstudio.com/src/contrib/matrixStats_0.52.2.tar.gz" list_url = "https://cran.r-project.org/src/contrib/Archive/matrixStats" version('0.52.2', '41b9...
true
true
79001c59d764039891cc5215c23b31bcd7d78c17
1,223
py
Python
var/spack/repos/builtin/packages/sspace-longread/package.py
padamson/spack
d3f67a48552691b4846ccc4a10f76740b154090c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-03-05T10:54:32.000Z
2021-03-05T14:14:52.000Z
var/spack/repos/builtin/packages/sspace-longread/package.py
padamson/spack
d3f67a48552691b4846ccc4a10f76740b154090c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin/packages/sspace-longread/package.py
padamson/spack
d3f67a48552691b4846ccc4a10f76740b154090c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-07-19T20:31:27.000Z
2021-07-19T21:14:14.000Z
# Copyright 2013-2021 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) import os from spack import * class SspaceLongread(Package): """SSPACE-LongRead is a stand-alone program for scaffo...
33.972222
92
0.699918
import os from spack import * class SspaceLongread(Package): homepage = "https://www.baseclear.com/genomics/bioinformatics/basetools/SSPACE-longread" manual_download = True version('1.1', '0bb5d8603d7ead4ff1596135a520cc26') depends_on('perl', type=('build', 'run')) def url_for_version(se...
true
true
79001cf4be9bcb32bc620a7c2a3dbe44d680d36c
637,302
py
Python
pandas/tests/test_frame.py
jaimefrio/pandas
d6a77007b247f3c218ecc38de8130e7d42e1d0e9
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tests/test_frame.py
jaimefrio/pandas
d6a77007b247f3c218ecc38de8130e7d42e1d0e9
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tests/test_frame.py
jaimefrio/pandas
d6a77007b247f3c218ecc38de8130e7d42e1d0e9
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import print_function # pylint: disable-msg=W0612,E1101 from copy import deepcopy from datetime import datetime, timedelta, time, date import sys import operator import re import csv import nose import functools import itertools from itertools import product, permutations from d...
37.840043
155
0.539242
from __future__ import print_function from copy import deepcopy from datetime import datetime, timedelta, time, date import sys import operator import re import csv import nose import functools import itertools from itertools import product, permutations from distutils.version import LooseVersion from pandas.compat...
true
true
79001ee3b002d0859ab2fbc5f5b221a54e51390f
87,210
py
Python
datalad/utils.py
AKSoo/datalad
dbc34478980c808a86b5531316c986abac953e37
[ "MIT" ]
null
null
null
datalad/utils.py
AKSoo/datalad
dbc34478980c808a86b5531316c986abac953e37
[ "MIT" ]
null
null
null
datalad/utils.py
AKSoo/datalad
dbc34478980c808a86b5531316c986abac953e37
[ "MIT" ]
null
null
null
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 et: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ### ...
32.859834
123
0.616432
new_home = str(new_home) out = {'HOME': new_home} if on_windows: out['USERPROFILE'] = new_home out['HOMEDRIVE'], out['HOMEPATH'] = splitdrive(new_home) return {v: val for v, val in out.items() if v in os.environ} def shortened_repr(value, l=30): try: ...
true
true
79001ee9162781fa713e5a90e03281765088a3a3
1,976
py
Python
backend/apps/iamstudent/models_persistent_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
2
2020-03-28T13:56:39.000Z
2020-03-29T10:16:12.000Z
backend/apps/iamstudent/models_persistent_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
76
2020-03-27T21:53:04.000Z
2020-03-30T20:27:43.000Z
backend/apps/iamstudent/models_persistent_filter.py
match4healthcare/match4healthcare
acf69e3b781d715f0a947c2a9df6646e94f1ca6b
[ "MIT" ]
null
null
null
from datetime import datetime import uuid from django.db import models import django.forms as forms import django_filters.fields as filter_fields from apps.ineedstudent.models import Hospital from .filters import StudentJobRequirementsFilter from .models import * # noqa: F401, F403 from .models import COUNTRY_CODE_...
34.666667
93
0.730263
from datetime import datetime import uuid from django.db import models import django.forms as forms import django_filters.fields as filter_fields from apps.ineedstudent.models import Hospital from .filters import StudentJobRequirementsFilter from .models import * from .models import COUNTRY_CODE_CHOICES class Lo...
true
true
79001f0f7183f3342e680bc8f8702a157a912fce
4,512
py
Python
tests/portfolio_projects/forms_test.py
Dafov/portfolio
fb3cb3721b944624c092d6046b0d9b005b7d9019
[ "MIT" ]
null
null
null
tests/portfolio_projects/forms_test.py
Dafov/portfolio
fb3cb3721b944624c092d6046b0d9b005b7d9019
[ "MIT" ]
null
null
null
tests/portfolio_projects/forms_test.py
Dafov/portfolio
fb3cb3721b944624c092d6046b0d9b005b7d9019
[ "MIT" ]
null
null
null
import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'portfolio.settings') django.setup() import base64 import tempfile from django.test import TestCase, override_settings from portfolio.portfolio_projects.forms import CommentForm, ProjectForm from django.core.files.uploadedfile import ...
45.12
76
0.843085
import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'portfolio.settings') django.setup() import base64 import tempfile from django.test import TestCase, override_settings from portfolio.portfolio_projects.forms import CommentForm, ProjectForm from django.core.files.uploadedfile import ...
true
true
79001f43e8974311a07a16a2259f3c36834226bf
1,590
py
Python
mindspore/ops/composite/multitype_ops/logical_and_impl.py
i4oolish/mindspore
dac3be31d0f2c0a3516200f47af30980e566601b
[ "Apache-2.0" ]
2
2020-08-12T16:14:40.000Z
2020-12-04T03:05:57.000Z
mindspore/ops/composite/multitype_ops/logical_and_impl.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
mindspore/ops/composite/multitype_ops/logical_and_impl.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
30
88
0.67673
from mindspore.ops.composite import base from mindspore.ops import functional as F logical_and = base.MultitypeFuncGraph("logical_and") @logical_and.register("Number", "Number") def _logical_and_scala(x, y): return F.bool_and(x.__bool__(), y.__bool__()) @logical_and.register("Tensor", "Tensor"...
true
true
79001f58d9b23dc3df6f1923d4452781045576f8
1,507
py
Python
finance/tutorial/tester.py
leonsariel/python
dd68c21a02417341031b40c945152a61be12e3eb
[ "MIT" ]
1
2018-04-09T14:09:21.000Z
2018-04-09T14:09:21.000Z
finance/tutorial/tester.py
leonsariel/python
dd68c21a02417341031b40c945152a61be12e3eb
[ "MIT" ]
null
null
null
finance/tutorial/tester.py
leonsariel/python
dd68c21a02417341031b40c945152a61be12e3eb
[ "MIT" ]
null
null
null
# _*_ coding: utf-8 _*_ __author__ = 'Di Meng' __date__ = '1/3/2018 10:16 PM' # _*_ coding: utf-8 _*_ __author__ = 'Di Meng' __date__ = '1/3/2018 9:26 PM' from tutorial.feature_functions import * import pandas as pd import plotly as py import json from plotly import tools import plotly.graph_objs as go #loading our...
23.546875
106
0.696085
__author__ = 'Di Meng' __date__ = '1/3/2018 10:16 PM' __author__ = 'Di Meng' __date__ = '1/3/2018 9:26 PM' from tutorial.feature_functions import * import pandas as pd import plotly as py import json from plotly import tools import plotly.graph_objs as go df = pd.read_csv('EURUSD_hours.csv') df.columns = ['date'...
true
true
79001f5f5314c74f84ae6dab8896fab3cf5ff8cc
5,021
py
Python
openstack_dashboard/test/integration_tests/basewebobject.py
jeff-phillips-18/horizon
bb02c0685625eb85bdf116ac118d3aa5b18bc5d0
[ "Apache-2.0" ]
3
2015-04-24T22:39:12.000Z
2021-03-29T15:38:53.000Z
openstack_dashboard/test/integration_tests/basewebobject.py
jeff-phillips-18/horizon
bb02c0685625eb85bdf116ac118d3aa5b18bc5d0
[ "Apache-2.0" ]
1
2021-03-21T11:48:09.000Z
2021-03-21T11:48:09.000Z
openstack_dashboard/test/integration_tests/basewebobject.py
jeff-phillips-18/horizon
bb02c0685625eb85bdf116ac118d3aa5b18bc5d0
[ "Apache-2.0" ]
1
2016-05-20T17:58:21.000Z
2016-05-20T17:58:21.000Z
# 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 # d...
37.192593
78
0.671779
import unittest import selenium.common.exceptions as Exceptions from selenium.webdriver.common import by import selenium.webdriver.support.ui as Support from selenium.webdriver.support import wait class BaseWebObject(unittest.TestCase): _spinner_locator = (by.By.CSS_SELECTOR, '.modal-body > .spinner')...
true
true
79001f7dcfb3d77af87da142647f53e78e22f2ef
1,184
py
Python
app/controllers/web/forgot_password.py
arxcdr/silverback
212139cbc1a648d1f877d60f2d7c4d750eefc3da
[ "BSD-3-Clause" ]
null
null
null
app/controllers/web/forgot_password.py
arxcdr/silverback
212139cbc1a648d1f877d60f2d7c4d750eefc3da
[ "BSD-3-Clause" ]
null
null
null
app/controllers/web/forgot_password.py
arxcdr/silverback
212139cbc1a648d1f877d60f2d7c4d750eefc3da
[ "BSD-3-Clause" ]
null
null
null
""" Forgot Password Web Controller """ # Standard Library import os # Third Party Library from django.views import View from django.shortcuts import render from django.utils.translation import gettext as _ # Local Library from app.modules.core.context import Context from app.modules.entity.option_entity import Optio...
28.878049
121
0.734797
import os from django.views import View from django.shortcuts import render from django.utils.translation import gettext as _ from app.modules.core.context import Context from app.modules.entity.option_entity import OptionEntity from app.modules.core.decorators import redirect_if_authenticated from app.modules.co...
true
true
7900204d85c3f10b0d2af408f72500bec2531473
526
py
Python
openslides_backend/presenter/initial_data.py
ThomasJunk/openslides-backend
798ed65d1490bf93ed3bd870cfc6f2a8c6f47986
[ "MIT" ]
null
null
null
openslides_backend/presenter/initial_data.py
ThomasJunk/openslides-backend
798ed65d1490bf93ed3bd870cfc6f2a8c6f47986
[ "MIT" ]
null
null
null
openslides_backend/presenter/initial_data.py
ThomasJunk/openslides-backend
798ed65d1490bf93ed3bd870cfc6f2a8c6f47986
[ "MIT" ]
null
null
null
from typing import Any, Dict from .base import Presenter from .presenter import register_presenter @register_presenter("initial-data") class InitialData(Presenter): """ Initial data for setup """ @property def data(self) -> Dict[Any, Any]: return { "privacy_policy": "The PP",...
22.869565
42
0.587452
from typing import Any, Dict from .base import Presenter from .presenter import register_presenter @register_presenter("initial-data") class InitialData(Presenter): @property def data(self) -> Dict[Any, Any]: return { "privacy_policy": "The PP", "legal_notice": "The LN", ...
true
true
790020a6fea96543b32a88bfb06cd00b72445702
3,264
py
Python
djangocms_googlemap/migrations/0001_initial.py
yakky/djangocms-googlemap
4f5f00fafc5d530e0a2854e20dc4a372006cab38
[ "BSD-3-Clause" ]
null
null
null
djangocms_googlemap/migrations/0001_initial.py
yakky/djangocms-googlemap
4f5f00fafc5d530e0a2854e20dc4a372006cab38
[ "BSD-3-Clause" ]
null
null
null
djangocms_googlemap/migrations/0001_initial.py
yakky/djangocms-googlemap
4f5f00fafc5d530e0a2854e20dc4a372006cab38
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '__first__'), ] operations = [ migrations.CreateModel( name='GoogleMap', fields=[ ...
72.533333
352
0.61826
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('cms', '__first__'), ] operations = [ migrations.CreateModel( name='GoogleMap', fields=[ ('cmsplugin_ptr', m...
true
true
790020ebff21a4ba915a47c2c6964eea09063b89
1,447
py
Python
ansible/environments/stage/dynamic_inventory.py
Otus-DevOps-2020-08/ValeriyTyutyunnik_infra
3ac66b3945ff477c6616c085d993bb3641a2bb91
[ "MIT" ]
null
null
null
ansible/environments/stage/dynamic_inventory.py
Otus-DevOps-2020-08/ValeriyTyutyunnik_infra
3ac66b3945ff477c6616c085d993bb3641a2bb91
[ "MIT" ]
null
null
null
ansible/environments/stage/dynamic_inventory.py
Otus-DevOps-2020-08/ValeriyTyutyunnik_infra
3ac66b3945ff477c6616c085d993bb3641a2bb91
[ "MIT" ]
1
2020-10-06T12:58:58.000Z
2020-10-06T12:58:58.000Z
#!/usr/bin/python import argparse import subprocess import json parser = argparse.ArgumentParser() parser.add_argument("--list", action="store_true") args = parser.parse_args() result = {"_meta": {"hostvars": {}}} if args.list: output = subprocess.check_output([ "cd ../terraform/stage; terraform show -jso...
28.94
79
0.520387
import argparse import subprocess import json parser = argparse.ArgumentParser() parser.add_argument("--list", action="store_true") args = parser.parse_args() result = {"_meta": {"hostvars": {}}} if args.list: output = subprocess.check_output([ "cd ../terraform/stage; terraform show -json" ], shell=T...
true
true
790022389c29b0dee0eef5e56249aaeb3e94eb3e
268
py
Python
2017.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
6
2021-04-13T00:33:43.000Z
2022-02-10T10:23:59.000Z
2017.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
null
null
null
2017.py
heltonricardo/URI
160cca22d94aa667177c9ebf2a1c9864c5e55b41
[ "MIT" ]
3
2021-03-23T18:42:24.000Z
2022-02-10T10:24:07.000Z
def dif(x, y): q = 0 for i in range(len(x)): if x[i] != y[i]: q += 1 return q e = str(input()) n = int(input()) v = [] for i in range(5): v.append(dif(e, str(input()))) if min(v) > n: print(-1) else: print(v.index(min(v))+1) print(min(v))
17.866667
49
0.492537
def dif(x, y): q = 0 for i in range(len(x)): if x[i] != y[i]: q += 1 return q e = str(input()) n = int(input()) v = [] for i in range(5): v.append(dif(e, str(input()))) if min(v) > n: print(-1) else: print(v.index(min(v))+1) print(min(v))
true
true
7900228e863e3c503aef331b7855c37ee856cb02
10,416
py
Python
tests/test_admin.py
minervaproject/django-gdpr-assist
2c498c1faee5f57a7e493aa912c33466184bb6cf
[ "BSD-3-Clause" ]
null
null
null
tests/test_admin.py
minervaproject/django-gdpr-assist
2c498c1faee5f57a7e493aa912c33466184bb6cf
[ "BSD-3-Clause" ]
3
2020-07-15T11:45:35.000Z
2020-09-22T16:05:39.000Z
tests/test_admin.py
minervaproject/django-gdpr-assist
2c498c1faee5f57a7e493aa912c33466184bb6cf
[ "BSD-3-Clause" ]
2
2020-03-04T13:07:54.000Z
2020-09-07T13:04:02.000Z
""" Test admin tools """ from io import BytesIO, TextIOWrapper import csv import six import zipfile import django from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.test import Client, TestCase import gdpr_assist from .gdpr_assist_tests_app.factories...
33.171975
96
0.569796
from io import BytesIO, TextIOWrapper import csv import six import zipfile import django from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.test import Client, TestCase import gdpr_assist from .gdpr_assist_tests_app.factories import ( ModelWithPr...
true
true
790022f8c4afd1beee5f9f1b313044b0686cf160
60
py
Python
experiments/circularImportB.py
Daniel-Chin/mini-Python
b122450a075adc4315cc13c29502f2029584e4bc
[ "MIT" ]
1
2021-12-02T21:13:04.000Z
2021-12-02T21:13:04.000Z
experiments/circularImportB.py
Daniel-Chin/mini-Python
b122450a075adc4315cc13c29502f2029584e4bc
[ "MIT" ]
null
null
null
experiments/circularImportB.py
Daniel-Chin/mini-Python
b122450a075adc4315cc13c29502f2029584e4bc
[ "MIT" ]
null
null
null
from circularImportA import a def f(): print(a) b = 2
8.571429
29
0.633333
from circularImportA import a def f(): print(a) b = 2
true
true
79002466907fabae889126e29c221cca4cada6e2
1,128
py
Python
week1/w1e6.py
melphick/pynet
047fbcf4eb0798379c48d0281ace74a6d126f119
[ "Apache-2.0" ]
null
null
null
week1/w1e6.py
melphick/pynet
047fbcf4eb0798379c48d0281ace74a6d126f119
[ "Apache-2.0" ]
null
null
null
week1/w1e6.py
melphick/pynet
047fbcf4eb0798379c48d0281ace74a6d126f119
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python """ A Python program that creates a list. One of the elements of the list should be a dictionary with at least two keys. Write this list out to a file using both YAML and JSON formats. The YAML file should be in the expanded form. """ import yaml import json a = { 'name': 'router1', 'ip_addr': '1.2.3...
25.066667
79
0.617908
""" A Python program that creates a list. One of the elements of the list should be a dictionary with at least two keys. Write this list out to a file using both YAML and JSON formats. The YAML file should be in the expanded form. """ import yaml import json a = { 'name': 'router1', 'ip_addr': '1.2.3.4', 'serial_numb...
false
true
790024a9fc6b0b7133377ca1c6234ecab0a2801e
4,429
py
Python
use_it_or_lose_it.py
jschmidtnj/CS115
fa2374f1ae9c9b63e572850a97af6086112d7a36
[ "MIT" ]
null
null
null
use_it_or_lose_it.py
jschmidtnj/CS115
fa2374f1ae9c9b63e572850a97af6086112d7a36
[ "MIT" ]
null
null
null
use_it_or_lose_it.py
jschmidtnj/CS115
fa2374f1ae9c9b63e572850a97af6086112d7a36
[ "MIT" ]
1
2022-01-03T01:44:39.000Z
2022-01-03T01:44:39.000Z
''' Created on Sep 18, 2017 @author: jschm ''' from cs115 import map def powerset(lst): """returns the power set of the list - the set of all subsets of the list""" if lst == []: return [[]] #power set is a list of lists #this way is more efficent for getting the combinations of the characters ...
31.635714
131
0.604651
from cs115 import map def powerset(lst): if lst == []: return [[]] lose_it = powerset(lst[1:]) use_it = map(lambda subset: [lst[0]] + subset, lose_it) return lose_it + use_it print(powerset(['a', 'b', 'c'])) def subset(target, lst): if target == 0: return True if...
true
true
790025ba42a649dac0d6f5e2049338b0ebff12fe
9,333
py
Python
test/functional/feature_block_reward_reallocation.py
mytitanium/Titanium-Core-1.0
470e6a0a23de1ea867d693e362d1a0f6ccc12aa7
[ "MIT" ]
2
2020-12-01T17:15:50.000Z
2020-12-11T13:29:54.000Z
test/functional/feature_block_reward_reallocation.py
mytitanium/Titanium-Core-1.0
470e6a0a23de1ea867d693e362d1a0f6ccc12aa7
[ "MIT" ]
1
2020-07-27T10:54:07.000Z
2020-08-28T05:37:26.000Z
test/functional/feature_block_reward_reallocation.py
mytitanium/Titanium-Core-1.0
470e6a0a23de1ea867d693e362d1a0f6ccc12aa7
[ "MIT" ]
2
2020-11-09T16:38:04.000Z
2021-04-02T05:27:36.000Z
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Ttm Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.blocktools import create_block, create_coinbase, get_masternode_payment from test_framewor...
45.975369
124
0.645773
from test_framework.blocktools import create_block, create_coinbase, get_masternode_payment from test_framework.mininode import P2PDataStore, network_thread_start from test_framework.messages import CTxOut, FromHex, CCbTx, CTransaction, ToHex from test_framework.script import CScript from test_framework.test_framew...
true
true
790026b50ae10f4540afcac11522fd528abc603f
2,789
py
Python
monitor_temp.py
KevinLee3627/pi-temp-monitor
0ab519f19693a201fa5a49e58cfa7e73becd7206
[ "MIT" ]
null
null
null
monitor_temp.py
KevinLee3627/pi-temp-monitor
0ab519f19693a201fa5a49e58cfa7e73becd7206
[ "MIT" ]
null
null
null
monitor_temp.py
KevinLee3627/pi-temp-monitor
0ab519f19693a201fa5a49e58cfa7e73becd7206
[ "MIT" ]
null
null
null
from gpiozero import CPUTemperature from tabulate import tabulate from math import floor import numpy as np import termplotlib as tpl import time import shutil def roundNum(num, digits): return floor(num * 10 ** digits) / (10 ** digits) def CtoF(temp): fahrenheit = (temp + 1.8) + 32 rounded = roundNum(fah...
30.988889
170
0.608103
from gpiozero import CPUTemperature from tabulate import tabulate from math import floor import numpy as np import termplotlib as tpl import time import shutil def roundNum(num, digits): return floor(num * 10 ** digits) / (10 ** digits) def CtoF(temp): fahrenheit = (temp + 1.8) + 32 rounded = roundNum(fah...
true
true
79002735558a463640ebfdcb3865832eb37a941a
5,017
py
Python
sim/main.py
dnbh/kpg
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
69
2018-01-08T19:56:55.000Z
2022-03-05T17:14:05.000Z
sim/main.py
dnbaker/emp
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
6
2018-04-14T21:09:51.000Z
2021-07-17T21:08:54.000Z
sim/main.py
dnbaker/emp
c9e79b8092434919e9ac90dc199f49845403c2ba
[ "MIT" ]
11
2018-03-21T19:28:35.000Z
2021-06-29T17:33:34.000Z
from __future__ import division import fa import sys import os from fa import chunker if __name__ == "__main__": from sys import stderr import argparse parser = argparse.ArgumentParser(description=( "Create a set of synthetic genomes consisting " "of subgroups per tax level. Some kmers are ...
43.626087
77
0.568069
from __future__ import division import fa import sys import os from fa import chunker if __name__ == "__main__": from sys import stderr import argparse parser = argparse.ArgumentParser(description=( "Create a set of synthetic genomes consisting " "of subgroups per tax level. Some kmers are ...
true
true
790027e1f01a39fdaddef1520846338aff1fd1da
16,602
py
Python
plaso/parsers/sqlite_plugins/skype.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
2
2016-02-18T12:46:29.000Z
2022-03-13T03:04:59.000Z
plaso/parsers/sqlite_plugins/skype.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
null
null
null
plaso/parsers/sqlite_plugins/skype.py
Defense-Cyber-Crime-Center/plaso
4f3a85fbea10637c1cdbf0cde9fc539fdcea9c47
[ "Apache-2.0" ]
6
2016-12-18T08:05:36.000Z
2021-04-06T14:19:11.000Z
# -*- coding: utf-8 -*- """This file contains a basic Skype SQLite parser.""" import logging from plaso.events import time_events from plaso.parsers import sqlite from plaso.parsers.sqlite_plugins import interface __author__ = 'Joaquin Moreno Garijo (bastionado@gmail.com)' class SkypeChatEvent(time_events.PosixTi...
36.893333
80
0.665161
import logging from plaso.events import time_events from plaso.parsers import sqlite from plaso.parsers.sqlite_plugins import interface __author__ = 'Joaquin Moreno Garijo (bastionado@gmail.com)' class SkypeChatEvent(time_events.PosixTimeEvent): DATA_TYPE = u'skype:event:chat' def __init__(self, row, to_ac...
true
true
79002937f63cc83abc4079baace1cf6ec297c5e3
6,525
py
Python
tradingview_ta/technicals.py
Chizkiyahu/python-tradingview-ta
84777c72a3b6ef8706fc01434ce2daf1628e3027
[ "MIT" ]
null
null
null
tradingview_ta/technicals.py
Chizkiyahu/python-tradingview-ta
84777c72a3b6ef8706fc01434ce2daf1628e3027
[ "MIT" ]
null
null
null
tradingview_ta/technicals.py
Chizkiyahu/python-tradingview-ta
84777c72a3b6ef8706fc01434ce2daf1628e3027
[ "MIT" ]
1
2021-11-03T15:20:48.000Z
2021-11-03T15:20:48.000Z
# Tradingview Technical Analysis (tradingview-ta) # Author: deathlyface (https://github.com/deathlyface) # Rewritten from https://www.tradingview.com/static/bundles/technicals.f2e6e6a51aebb6cd46f8.js # License: MIT class Recommendation: buy = "BUY" strong_buy = "STRONG_BUY" sell = "SELL" strong_sell = ...
27.1875
94
0.517241
class Recommendation: buy = "BUY" strong_buy = "STRONG_BUY" sell = "SELL" strong_sell = "STRONG_SELL" neutral = "NEUTRAL" error = "ERROR" class Compute: def MA(ma, close): if (ma < close): return Recommendation.buy elif (ma > close): return Recom...
true
true
790029c8788cdbba6b33babc7a30f43fce87fd0f
1,460
py
Python
examples/select.py
fossabot/questionary
de6354aeaf23d3ed65bbcb9e60aeb27305257672
[ "MIT" ]
null
null
null
examples/select.py
fossabot/questionary
de6354aeaf23d3ed65bbcb9e60aeb27305257672
[ "MIT" ]
null
null
null
examples/select.py
fossabot/questionary
de6354aeaf23d3ed65bbcb9e60aeb27305257672
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Example for a list question type. Run example by typing `python -m examples.list` in your console.""" from pprint import pprint import questionary from examples import custom_style_dope from questionary import Separator, Choice, prompt def ask_pystyle(**kwargs): # create the question ...
26.071429
75
0.534247
from pprint import pprint import questionary from examples import custom_style_dope from questionary import Separator, Choice, prompt def ask_pystyle(**kwargs): question = questionary.select( 'What do you want to do?', qmark='😃', choices=[ 'Order a pizza', '...
true
true
79002b18909275880ef250dcf32f1a84abde2b13
212
py
Python
stripe/stripe/doctype/stripe_setting/test_stripe_setting.py
Hitesh1595/stripe
251b89a44843d833c13500e339dda64d5bbd225d
[ "MIT" ]
null
null
null
stripe/stripe/doctype/stripe_setting/test_stripe_setting.py
Hitesh1595/stripe
251b89a44843d833c13500e339dda64d5bbd225d
[ "MIT" ]
null
null
null
stripe/stripe/doctype/stripe_setting/test_stripe_setting.py
Hitesh1595/stripe
251b89a44843d833c13500e339dda64d5bbd225d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, stripe and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestStripeSetting(unittest.TestCase): pass
19.272727
45
0.764151
from __future__ import unicode_literals import unittest class TestStripeSetting(unittest.TestCase): pass
true
true
79002c3109af890db2914a8213ecc4ee565ad635
14,446
py
Python
data/data_loader.py
ShuanDeMorian/deepspeech.pytorch
58d7a693447ead632ef9b625681790ee8b5f6b82
[ "MIT" ]
null
null
null
data/data_loader.py
ShuanDeMorian/deepspeech.pytorch
58d7a693447ead632ef9b625681790ee8b5f6b82
[ "MIT" ]
null
null
null
data/data_loader.py
ShuanDeMorian/deepspeech.pytorch
58d7a693447ead632ef9b625681790ee8b5f6b82
[ "MIT" ]
null
null
null
import os import subprocess from tempfile import NamedTemporaryFile from torch.distributed import get_rank from torch.distributed import get_world_size from torch.utils.data.sampler import Sampler import librosa import numpy as np import scipy.signal import torch from scipy.io.wavfile import read import math from tor...
39.149051
127
0.631524
import os import subprocess from tempfile import NamedTemporaryFile from torch.distributed import get_rank from torch.distributed import get_world_size from torch.utils.data.sampler import Sampler import librosa import numpy as np import scipy.signal import torch from scipy.io.wavfile import read import math from tor...
true
true
79002c38c89823a9661816a747317c552a3c7324
9,868
py
Python
solcast/nodes.py
danhper/py-solc-ast
6aace525d23be835c62e36410e17a657d1b4dde2
[ "MIT" ]
null
null
null
solcast/nodes.py
danhper/py-solc-ast
6aace525d23be835c62e36410e17a657d1b4dde2
[ "MIT" ]
null
null
null
solcast/nodes.py
danhper/py-solc-ast
6aace525d23be835c62e36410e17a657d1b4dde2
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import functools from copy import deepcopy from .grammar import BASE_NODE_TYPES class NodeBase: """Represents a node within the solidity AST. Attributes: depth: Number of nodes between this node and the SourceUnit offset: Absolute source offsets as a (start, stop) tuple ...
35.496403
97
0.588164
import functools from copy import deepcopy from .grammar import BASE_NODE_TYPES class NodeBase: def __init__(self, ast, parent): self.depth = parent.depth + 1 if parent is not None else 0 self._parent = parent self._children = set() src = [int(i) for i in ast["src"].split(":")]...
true
true
79002cbf125f8a2ca0c43c5f81dc3b744e72c14d
4,034
py
Python
ms/storage/backends/google_appengine.py
jcnelson/syndicate
4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b
[ "Apache-2.0" ]
16
2015-01-02T15:39:04.000Z
2016-03-17T06:38:46.000Z
ms/storage/backends/google_appengine.py
jcnelson/syndicate
4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b
[ "Apache-2.0" ]
37
2015-01-28T20:58:05.000Z
2016-03-22T04:01:32.000Z
ms/storage/backends/google_appengine.py
jcnelson/syndicate
4837265be3e0aa18cdf4ee50316dbfc2d1f06e5b
[ "Apache-2.0" ]
8
2015-04-08T02:26:03.000Z
2016-03-04T05:56:24.000Z
""" Copyright 2013 The Trustees of Princeton University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applica...
25.694268
96
0.715419
import google from google.appengine.ext import ndb import google.appengine.api.memcache as google_memcache import google.appengine.ext.deferred as google_deferred from google.appengine.datastore.datastore_query import Cursor as GoogleCursor def raise_(ex): raise ex class FutureWrapper( ndb.Future ): state...
true
true
79002cd5a4e3ac20272d3ce8d02f9c6329a8853a
150
py
Python
pysecm/ric/__init__.py
bostonrwalker/pysecm
76fa1d537c6f222214d7582d723ea9b9b67c87b9
[ "MIT" ]
null
null
null
pysecm/ric/__init__.py
bostonrwalker/pysecm
76fa1d537c6f222214d7582d723ea9b9b67c87b9
[ "MIT" ]
null
null
null
pysecm/ric/__init__.py
bostonrwalker/pysecm
76fa1d537c6f222214d7582d723ea9b9b67c87b9
[ "MIT" ]
null
null
null
from .ric import RIC import pysecm.ric.commodity import pysecm.ric.equity import pysecm.ric.fixed_income import pysecm.ric.fx import pysecm.ric.index
21.428571
30
0.833333
from .ric import RIC import pysecm.ric.commodity import pysecm.ric.equity import pysecm.ric.fixed_income import pysecm.ric.fx import pysecm.ric.index
true
true
79002dabc6886764e0fc25e29a3878f17d75ef03
35,617
py
Python
ironic/tests/unit/db/test_nodes.py
Rachit7194/ironic
a17b20d12554133931f44c78c415f2ea0f61ac74
[ "Apache-2.0" ]
null
null
null
ironic/tests/unit/db/test_nodes.py
Rachit7194/ironic
a17b20d12554133931f44c78c415f2ea0f61ac74
[ "Apache-2.0" ]
null
null
null
ironic/tests/unit/db/test_nodes.py
Rachit7194/ironic
a17b20d12554133931f44c78c415f2ea0f61ac74
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
41.608645
79
0.610411
import datetime import mock from oslo_utils import timeutils from oslo_utils import uuidutils import six from ironic.common import exception from ironic.common import states from ironic.tests.unit.db import base from ironic.tests.unit.db import utils class DbNodeTestCase(base.DbTestCase): def t...
true
true
79002f415063a696a36d82b0c3b625aaecab009c
10,937
py
Python
gs-scheduler/global_scheduler2/policy_dockerfile/lowlatency/GE_GSCH_low_latency.py
gedge-platform/GEdge-Platform
b5cbe63089cf3d3263683cbcd5ec3d10ad85779b
[ "Apache-2.0" ]
13
2020-10-14T07:45:08.000Z
2021-10-01T08:19:56.000Z
gs-scheduler/global_scheduler2/policy_dockerfile/lowlatency/GE_GSCH_low_latency.py
gedge-platform/GEdge-Platform
b5cbe63089cf3d3263683cbcd5ec3d10ad85779b
[ "Apache-2.0" ]
null
null
null
gs-scheduler/global_scheduler2/policy_dockerfile/lowlatency/GE_GSCH_low_latency.py
gedge-platform/GEdge-Platform
b5cbe63089cf3d3263683cbcd5ec3d10ad85779b
[ "Apache-2.0" ]
17
2020-11-09T05:16:42.000Z
2021-12-28T08:04:33.000Z
from kafka import KafkaProducer from kafka import KafkaConsumer from kafka import KafkaAdminClient import json from json import dumps from json import loads import time import os import requests import sys import GE_GSCH_low_define as lowDefine ''' {'requestID': 'req-f6720a0e-e3df-455a-825d-f8c80cedc2d9', 'date': '...
40.507407
161
0.540642
from kafka import KafkaProducer from kafka import KafkaConsumer from kafka import KafkaAdminClient import json from json import dumps from json import loads import time import os import requests import sys import GE_GSCH_low_define as lowDefine class GLowLatencyPriority_Job: def __init__(self,request_data_dic): ...
true
true
79002f43bf6e70842ea37699f5200d88ba408601
7,762
py
Python
sdk/python/pulumi_azure_native/netapp/v20200901/account.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/netapp/v20200901/account.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/netapp/v20200901/account.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "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...
51.065789
2,057
0.675213
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__ = ['Account'] class Account(pulumi.CustomResource): def __init__(__self__, resource_name: st...
true
true
79002f5baaebe85ae8242a63f88448cdbd57bc0a
533
py
Python
datadog_checks_dev/datadog_checks/dev/tooling/commands/__init__.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
663
2016-08-23T05:23:45.000Z
2022-03-29T00:37:23.000Z
datadog_checks_dev/datadog_checks/dev/tooling/commands/__init__.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
6,642
2016-06-09T16:29:20.000Z
2022-03-31T22:24:09.000Z
datadog_checks_dev/datadog_checks/dev/tooling/commands/__init__.py
mchelen-gov/integrations-core
81281600b3cc7025a7a32148c59620c9592a564f
[ "BSD-3-Clause" ]
1,222
2017-01-27T15:51:38.000Z
2022-03-31T18:17:51.000Z
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .agent import agent from .ci import ci from .clean import clean from .config import config from .create import create from .dep import dep from .docs import docs from .env import env from .meta import...
28.052632
101
0.763602
from .agent import agent from .ci import ci from .clean import clean from .config import config from .create import create from .dep import dep from .docs import docs from .env import env from .meta import meta from .release import release from .run import run from .test import test from .validate import validate A...
true
true
79002fc8e9f765eae20f2d0e5638eed8ec574acd
2,701
py
Python
tests/basics/LateClosureAssignment.py
Mortal/Nuitka
5150eeff7ff845ed4993c773449cd81b7f127c6b
[ "Apache-2.0" ]
null
null
null
tests/basics/LateClosureAssignment.py
Mortal/Nuitka
5150eeff7ff845ed4993c773449cd81b7f127c6b
[ "Apache-2.0" ]
null
null
null
tests/basics/LateClosureAssignment.py
Mortal/Nuitka
5150eeff7ff845ed4993c773449cd81b7f127c6b
[ "Apache-2.0" ]
1
2018-12-16T23:51:18.000Z
2018-12-16T23:51:18.000Z
# Copyright 2018, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
23.902655
102
0.675676
from __future__ import print_function def closureTest1(): d = 1 def subby(): return d d = 22222*2222 return subby() def closureTest2(): def subby(): return d d = 2222*2222 return subby() def closureTest3(): def subby(): ...
true
true
79003124fbb1cb58aae990f0214882ce3dfac658
5,878
py
Python
mdrsl/rule_models/mids/objective_function/mids_objective_function_statistics.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
3
2020-08-03T19:25:44.000Z
2021-06-27T22:25:55.000Z
mdrsl/rule_models/mids/objective_function/mids_objective_function_statistics.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
null
null
null
mdrsl/rule_models/mids/objective_function/mids_objective_function_statistics.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
2
2020-08-07T22:54:28.000Z
2021-02-18T06:11:01.000Z
from typing import Optional, Dict from tabulate import tabulate import pandas as pd from mdrsl.utils.value_collection import ValueCollector class MIDSObjectiveFunctionStatistics: def __init__(self): self.last_f0: Optional[int] = None self.last_f1: Optional[int] = None self.last_f2: Opti...
35.409639
81
0.525859
from typing import Optional, Dict from tabulate import tabulate import pandas as pd from mdrsl.utils.value_collection import ValueCollector class MIDSObjectiveFunctionStatistics: def __init__(self): self.last_f0: Optional[int] = None self.last_f1: Optional[int] = None self.last_f2: Opti...
true
true
79003367c52efec90642fcb48d84092c47890a17
2,002
py
Python
script/StockScraper-master/update_market_cap_yahoo.py
pettersoderlund/fondout
99b14eaa8c6eb56fd862ab9bdf6acc8d537d4a31
[ "BSD-3-Clause" ]
null
null
null
script/StockScraper-master/update_market_cap_yahoo.py
pettersoderlund/fondout
99b14eaa8c6eb56fd862ab9bdf6acc8d537d4a31
[ "BSD-3-Clause" ]
4
2016-10-18T18:30:08.000Z
2016-11-05T09:22:29.000Z
script/StockScraper-master/update_market_cap_yahoo.py
pettersoderlund/fondout
99b14eaa8c6eb56fd862ab9bdf6acc8d537d4a31
[ "BSD-3-Clause" ]
null
null
null
""" YQL out mkt cap and currency to fill out yahoo table """ """ TODO: retreive lists of 100 symbols from database and update""" """ Results are intented to use while matching yahoo tickers, which one has mkt cap? which ones has sector? """ import mysql.connector import stockretriever import sys import time from rand...
27.805556
111
0.618881
""" YQL out mkt cap and currency to fill out yahoo table """ """ TODO: retreive lists of 100 symbols from database and update""" """ Results are intented to use while matching yahoo tickers, which one has mkt cap? which ones has sector? """ import mysql.connector import stockretriever import sys import time from rand...
false
true
790033685ccacb6d853dabbe6f28c62b0cb1fbbf
930
py
Python
Reduce_hessian/tests/B1.py
kuanhanl/k_aug
5ceaccbf9e699a9dffe284de686f1b623cafbec5
[ "BSD-3-Clause" ]
null
null
null
Reduce_hessian/tests/B1.py
kuanhanl/k_aug
5ceaccbf9e699a9dffe284de686f1b623cafbec5
[ "BSD-3-Clause" ]
null
null
null
Reduce_hessian/tests/B1.py
kuanhanl/k_aug
5ceaccbf9e699a9dffe284de686f1b623cafbec5
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue May 12 14:25:43 2020 @author: greg6 """ import numpy as np t = [i for i in range(3)] lam = [100+i*10 for i in range(2)] com = ["A","B","C"] S = dict() for l in lam: for u,c in enumerate(com): S[(l,c)] = l+0.1*u C = dict() for i in t: for u,c in enumerate(c...
20.666667
45
0.476344
import numpy as np t = [i for i in range(3)] lam = [100+i*10 for i in range(2)] com = ["A","B","C"] S = dict() for l in lam: for u,c in enumerate(com): S[(l,c)] = l+0.1*u C = dict() for i in t: for u,c in enumerate(com): C[(i,c)] = (i+0.1*u) nt = len(t) nw = len(lam) nc = len(com) nparams ...
true
true
790033a5fdaa75c3d3375d2484b4f4254fdf6bff
41,874
py
Python
mne/io/kit/kit.py
vpeterson/mne-python
a6e2222a7e76f5b13a371697b1b61d22ac5bf67d
[ "BSD-3-Clause" ]
3
2021-01-04T08:45:56.000Z
2021-05-19T12:25:59.000Z
mne/io/kit/kit.py
vpeterson/mne-python
a6e2222a7e76f5b13a371697b1b61d22ac5bf67d
[ "BSD-3-Clause" ]
null
null
null
mne/io/kit/kit.py
vpeterson/mne-python
a6e2222a7e76f5b13a371697b1b61d22ac5bf67d
[ "BSD-3-Clause" ]
2
2021-04-28T11:52:52.000Z
2021-05-05T02:36:32.000Z
"""Conversion tool from SQD to FIF. RawKIT class is adapted from Denis Engemann et al.'s mne_bti2fiff.py. """ # Authors: Teon Brooks <teon.brooks@gmail.com> # Joan Massich <mailsik@gmail.com> # Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) from collections import defaul...
43.437759
79
0.58676
from collections import defaultdict, OrderedDict from math import sin, cos from os import SEEK_CUR, path as op from struct import unpack import numpy as np from scipy import linalg from ..pick import pick_types from ...utils import (verbose, logger, warn, fill_doc, _check_option, _stamp_t...
true
true
7900344115555e3f7c00990bba7697ab8d2f9bac
599
py
Python
wireframe.py
fwidmaier/mesh_handler
bba4144f5d525feef955369ed4fd446324024e6a
[ "MIT" ]
null
null
null
wireframe.py
fwidmaier/mesh_handler
bba4144f5d525feef955369ed4fd446324024e6a
[ "MIT" ]
null
null
null
wireframe.py
fwidmaier/mesh_handler
bba4144f5d525feef955369ed4fd446324024e6a
[ "MIT" ]
null
null
null
""" Script to show the wireframe of a given mesh (read from a file) in an interactive Viewer. """ from viewer import * from mesh.obj import OBJFile import sys if __name__ == "__main__": app = Viewer() if len(sys.argv) > 1: try: obj = OBJFile.read(sys.argv[1]) app.scene.addObje...
23.038462
81
0.592654
from viewer import * from mesh.obj import OBJFile import sys if __name__ == "__main__": app = Viewer() if len(sys.argv) > 1: try: obj = OBJFile.read(sys.argv[1]) app.scene.addObject(obj) app.title(sys.argv[1]) app.scene.setTarget(obj.centroid) e...
true
true
79003460bc2034505a75076d7dacde6c8f02aca5
6,146
py
Python
lib/services/vautoscaling/ncloud_vautoscaling/model/resume_processes_response.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
12
2018-11-20T04:30:49.000Z
2021-11-09T12:34:26.000Z
lib/services/vautoscaling/ncloud_vautoscaling/model/resume_processes_response.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
1
2019-01-24T15:56:15.000Z
2019-05-31T07:56:55.000Z
lib/services/vautoscaling/ncloud_vautoscaling/model/resume_processes_response.py
NaverCloudPlatform/ncloud-sdk-python
5976dfabd205c615fcf57ac2f0ab67313ee6953c
[ "MIT" ]
6
2018-06-29T03:45:50.000Z
2022-03-18T01:51:45.000Z
# coding: utf-8 """ vautoscaling Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from ncloud_vautoscaling.model.process import Process # noqa: F401,E501 class ResumeProcessesResponse(object): """NOTE: This class is auto gene...
28.453704
129
0.607062
import pprint import re import six from ncloud_vautoscaling.model.process import Process class ResumeProcessesResponse(object): swagger_types = { 'request_id': 'str', 'return_code': 'str', 'return_message': 'str', 'total_rows': 'int', 'process_list': 'list[Proces...
true
true
7900355bbe26186ac5dbd81b76fbdbe822cdd10a
105,956
py
Python
models/transformer.py
NCTUMLlab/Adversarial-Masking-Transformers-for-Language-Understanding
b43fb91cf99ee3ffaf137cd0be87b67448995c9b
[ "MIT" ]
null
null
null
models/transformer.py
NCTUMLlab/Adversarial-Masking-Transformers-for-Language-Understanding
b43fb91cf99ee3ffaf137cd0be87b67448995c9b
[ "MIT" ]
null
null
null
models/transformer.py
NCTUMLlab/Adversarial-Masking-Transformers-for-Language-Understanding
b43fb91cf99ee3ffaf137cd0be87b67448995c9b
[ "MIT" ]
1
2021-06-01T17:58:43.000Z
2021-06-01T17:58:43.000Z
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import numpy...
45.987847
169
0.625363
import math import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from numpy.random import uniform from fairseq import options, utils from fairseq.models import ( FairseqEncoder, FairseqIncrementalDecoder, FairseqEncoderDecoderModel, register_model, ...
true
true
79003634dbd6d860663da73bfd650b2a6c30b93e
3,447
py
Python
impression/tests/test_distribution.py
gregschmit/django-impression
b4d624802830d00a136c2bf40b6a8911c1269095
[ "MIT" ]
3
2019-12-11T10:04:55.000Z
2019-12-20T22:15:52.000Z
impression/tests/test_distribution.py
gregschmit/django-impression
b4d624802830d00a136c2bf40b6a8911c1269095
[ "MIT" ]
null
null
null
impression/tests/test_distribution.py
gregschmit/django-impression
b4d624802830d00a136c2bf40b6a8911c1269095
[ "MIT" ]
null
null
null
""" This module is for testing the distributions. Tests should focus on ensuring we can expand distributions without missing emails or getting too many or running into infinite loops. """ from django.test import TestCase from ..models import EmailAddress, Distribution class DistributionTestCase(TestCase): def s...
42.036585
88
0.707572
from django.test import TestCase from ..models import EmailAddress, Distribution class DistributionTestCase(TestCase): def setUp(self): self.test1 = EmailAddress.objects.create(email_address="test1@example.org") self.test2 = EmailAddress.objects.create(email_address="test2@example.org") ...
true
true
79003746d2d5deb52b2d7752d9c7346c0c83fe2d
4,505
py
Python
tools/make_ctocpp_header.py
toryant/cef
c80264ab117bd3f1a60dd3267ee247bd9f15c425
[ "BSD-3-Clause" ]
4
2019-10-30T10:11:34.000Z
2021-08-24T23:04:30.000Z
tools/make_ctocpp_header.py
toryant/cef
c80264ab117bd3f1a60dd3267ee247bd9f15c425
[ "BSD-3-Clause" ]
null
null
null
tools/make_ctocpp_header.py
toryant/cef
c80264ab117bd3f1a60dd3267ee247bd9f15c425
[ "BSD-3-Clause" ]
5
2018-10-16T09:50:06.000Z
2020-12-07T20:12:13.000Z
# Copyright (c) 2011 The Chromium Embedded Framework Authors. All rights # reserved. Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file. from cef_parser import * def make_function_body_block(cls): impl = ' // ' + cls.get_name() + ' methods.\n' funcs = cls.get_vir...
29.444444
104
0.666149
from cef_parser import * def make_function_body_block(cls): impl = ' // ' + cls.get_name() + ' methods.\n' funcs = cls.get_virtual_funcs() for func in funcs: impl += ' ' + func.get_cpp_proto() if cls.is_client_side(): impl += ' override;\n' else: impl += ' OVERRIDE;\n' return i...
true
true
7900375d4e43f7ab0e86d95065991384240948da
668
py
Python
var/spack/repos/builtin/packages/py-stevedore/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-03-05T10:54:32.000Z
2021-03-05T14:14:52.000Z
var/spack/repos/builtin/packages/py-stevedore/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-12-15T17:29:20.000Z
2022-03-21T15:08:31.000Z
var/spack/repos/builtin/packages/py-stevedore/package.py
kkauder/spack
6ae8d5c380c1f42094b05d38be26b03650aafb39
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
7
2018-09-13T18:04:56.000Z
2020-03-18T20:52:06.000Z
# Copyright 2013-2021 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 import * class PyStevedore(PythonPackage): """Manage Dynamic Plugins for Python Applications.""" hom...
31.809524
96
0.714072
from spack import * class PyStevedore(PythonPackage): homepage = "https://docs.openstack.org/stevedore/latest/" pypi = "stevedore/stevedore-1.28.0.tar.gz" version('1.28.0', sha256='f1c7518e7b160336040fee272174f1f7b29a46febb3632502a8f2055f973d60b') depends_on('python@2.6:') depends_on('py-...
true
true
7900399dc72f4b5bb49e6f62341fbf29453d52e2
16,076
py
Python
tensorflow_probability/python/distributions/zipf_test.py
OrenBochman/probability
eb4cff2c441e52f0604236b30d422577e498349c
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/zipf_test.py
OrenBochman/probability
eb4cff2c441e52f0604236b30d422577e498349c
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/distributions/zipf_test.py
OrenBochman/probability
eb4cff2c441e52f0604236b30d422577e498349c
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
37.299304
79
0.669818
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from scipy import stats import tensorflow.compat.v2 as tf import tensorflow_probability as tfp from tensorflow_probability.python.internal import test_util tfd = tfp.distribu...
true
true
79003a3a22fab3e829b2128c7adc350ce31a8348
1,439
py
Python
tests/test_plots.py
rochamatcomp/python-rocha
bbf8b559f8052f8c081be29ef21d3e1f697477c3
[ "MIT" ]
1
2021-02-27T14:35:22.000Z
2021-02-27T14:35:22.000Z
tests/test_plots.py
rochamatcomp/python-rocha
bbf8b559f8052f8c081be29ef21d3e1f697477c3
[ "MIT" ]
null
null
null
tests/test_plots.py
rochamatcomp/python-rocha
bbf8b559f8052f8c081be29ef21d3e1f697477c3
[ "MIT" ]
1
2021-02-27T15:27:53.000Z
2021-02-27T15:27:53.000Z
# -*- coding: utf-8 -*- """ :mod:`plots` -- Tests data plots ================================ .. module:: plots :platform: Unix, Windows :synopsis: Tests of the raster plots and processed data plots. .. moduleauthor:: Andre Rocha <rocha.matcomp@gmail.com> """ import matplotlib.pyplot as plt from matplotlib.te...
31.977778
86
0.599027
import matplotlib.pyplot as plt from matplotlib.testing.decorators import image_comparison from src.rocha import plots @image_comparison(baseline_images=['test_plot'], extensions=['png']) def test_plot(): rasters = ['data/relatives/forest_111.tif', 'data/relatives/forest_112.tif...
true
true
79003c18e239271e0bc613ca9e261504d189d850
4,341
py
Python
main.py
Troublor/ulauncher-numconverter
98d5e01d82671eedc98c000053980ae7ceb4ea28
[ "Apache-2.0" ]
1
2021-08-31T12:51:45.000Z
2021-08-31T12:51:45.000Z
main.py
Troublor/ulauncher-numconverter
98d5e01d82671eedc98c000053980ae7ceb4ea28
[ "Apache-2.0" ]
null
null
null
main.py
Troublor/ulauncher-numconverter
98d5e01d82671eedc98c000053980ae7ceb4ea28
[ "Apache-2.0" ]
null
null
null
from __future__ import annotations import re from abc import abstractmethod, ABC from enum import Enum from typing import List, Optional, Literal, Tuple, Union from ulauncher.api.client.Extension import Extension from ulauncher.api.client.EventListener import EventListener import ulauncher.api.shared.event as events f...
28.188312
91
0.619443
from __future__ import annotations import re from abc import abstractmethod, ABC from enum import Enum from typing import List, Optional, Literal, Tuple, Union from ulauncher.api.client.Extension import Extension from ulauncher.api.client.EventListener import EventListener import ulauncher.api.shared.event as events f...
true
true
79003c56855aa81110d70841ff657542bea8dc30
3,095
py
Python
madbg/communication.py
kmaork/madbg
9f6097d510897ddf56eb9d87d3ac82b3a177344a
[ "MIT" ]
48
2019-07-05T23:16:42.000Z
2022-03-17T09:18:13.000Z
madbg/communication.py
kmaork/madbg
9f6097d510897ddf56eb9d87d3ac82b3a177344a
[ "MIT" ]
30
2020-07-07T13:48:00.000Z
2022-03-24T09:19:39.000Z
madbg/communication.py
kmaork/madbg
9f6097d510897ddf56eb9d87d3ac82b3a177344a
[ "MIT" ]
2
2021-08-16T16:30:27.000Z
2022-01-27T11:32:20.000Z
import pickle import fcntl import os import struct from collections import defaultdict from functools import partial from asyncio import new_event_loop from io import BytesIO from .utils import opposite_dict MESSAGE_LENGTH_FMT = 'I' def set_nonblocking(fd): flags = fcntl.fcntl(fd, fcntl.F_GETFL) ...
32.239583
114
0.636187
import pickle import fcntl import os import struct from collections import defaultdict from functools import partial from asyncio import new_event_loop from io import BytesIO from .utils import opposite_dict MESSAGE_LENGTH_FMT = 'I' def set_nonblocking(fd): flags = fcntl.fcntl(fd, fcntl.F_GETFL) ...
true
true
79003c9e0a4b7a3d993d44eeb52364d2e0bb6459
5,112
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_service_association_links_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_service_association_links_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/operations/_service_association_links_operations.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.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.899083
223
0.689358
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.m...
true
true
79003cce3b2b638be71f36428fd99325eafccaf1
2,387
py
Python
aiocypher/aioneo4j/graph.py
bbc/rd-cloudfit-python-aiocypher
eb6ce85ee1045ed715bbc4f2b5e033688f7fb5f2
[ "ECL-2.0", "Apache-2.0" ]
2
2021-11-09T20:48:18.000Z
2021-11-12T07:45:39.000Z
aiocypher/aioneo4j/graph.py
bbc/rd-cloudfit-python-aiocypher
eb6ce85ee1045ed715bbc4f2b5e033688f7fb5f2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
aiocypher/aioneo4j/graph.py
bbc/rd-cloudfit-python-aiocypher
eb6ce85ee1045ed715bbc4f2b5e033688f7fb5f2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# # # Copyright 2020-21 British Broadcasting Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
36.723077
108
0.713448
from ..interface.graph import Graph as AbstractGraph from typing import TypeVar, Callable, Awaitable, Set import neo4j R = TypeVar('R') class Graph (AbstractGraph[neo4j.graph.Graph]): def __init__( self, execute: Callable[[Callable[[neo4j.Transaction], neo4j.graph.Graph]], Awa...
true
true
79003d95109ca39991a0d00374edc5456102de45
2,304
py
Python
bin/demo_get_PubMedArticle_by_pmid.py
cariaso/metapub
bfa361dd6e5de8ee0859e596d490fb478f7dcfba
[ "Apache-2.0" ]
28
2019-09-09T08:12:31.000Z
2021-12-17T00:09:14.000Z
bin/demo_get_PubMedArticle_by_pmid.py
cariaso/metapub
bfa361dd6e5de8ee0859e596d490fb478f7dcfba
[ "Apache-2.0" ]
33
2019-11-07T05:36:04.000Z
2022-01-29T01:14:57.000Z
bin/demo_get_PubMedArticle_by_pmid.py
cariaso/metapub
bfa361dd6e5de8ee0859e596d490fb478f7dcfba
[ "Apache-2.0" ]
10
2019-09-09T10:04:05.000Z
2021-06-08T16:00:14.000Z
from __future__ import print_function import sys from metapub import PubMedFetcher from metapub import FindIt # examples of different formats: # 18612690: PubMedArticle with multiple AbstractText sections # 1234567: PubMedArticle with no abstract whatsoever # 20301546: PubMedBookArticle from GeneReviews #### impor...
27.428571
98
0.707031
from __future__ import print_function import sys from metapub import PubMedFetcher from metapub import FindIt t logging logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("eutils").setLevel(logging.WARNING) ch = logging.StreamHandler() logging.getLogger("metapub").setLevel(logging.INFO) ...
true
true
79003e1445380720ad3a6144288375f59533a79b
13,825
py
Python
third_party/augment_ops.py
harshita1000/crest
122a40518ba8c4ecf27e7460104c176e01e960d3
[ "Apache-2.0" ]
50
2021-06-10T21:25:16.000Z
2022-03-30T03:37:53.000Z
third_party/augment_ops.py
kihyuks/crest
64918b85d31e7939fce874431b6059c0c9cca7b7
[ "Apache-2.0" ]
5
2021-07-22T13:01:32.000Z
2021-11-29T13:30:20.000Z
third_party/augment_ops.py
kihyuks/crest
64918b85d31e7939fce874431b6059c0c9cca7b7
[ "Apache-2.0" ]
9
2021-06-10T22:44:39.000Z
2022-03-22T14:55:33.000Z
# Copyright 2019 Google LLC # # 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 writing, ...
33.474576
151
0.670524
import math import tensorflow as tf from tensorflow_addons import image as tfa_image REPLACE_VALUE = 128 def blend(image1, image2, factor): image1 = tf.cast(image1, tf.float32) image2 = tf.cast(image2, tf.float32) return tf.saturate_cast(image1 + factor * (image2 - image1), tf.uint8) def wrap...
true
true
79003f65149f9cd97988838b7910e8a70bf1d084
42,076
py
Python
Apps/phgsgmail/gsgmail_process_email.py
chunmanjimmyf/phantom-apps
204d77ac1c6917ad7b363f5e8930e60e8e9aa8d2
[ "Apache-2.0" ]
null
null
null
Apps/phgsgmail/gsgmail_process_email.py
chunmanjimmyf/phantom-apps
204d77ac1c6917ad7b363f5e8930e60e8e9aa8d2
[ "Apache-2.0" ]
null
null
null
Apps/phgsgmail/gsgmail_process_email.py
chunmanjimmyf/phantom-apps
204d77ac1c6917ad7b363f5e8930e60e8e9aa8d2
[ "Apache-2.0" ]
null
null
null
# File: gsgmail_process_email.py # Copyright (c) 2017-2021 Splunk Inc. # # Licensed under Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) import email import tempfile from collections import OrderedDict import os import re from bs4 import BeautifulSoup, UnicodeDammit import phantom.app as phantom import p...
38.744015
168
0.621304
import email import tempfile from collections import OrderedDict import os import re from bs4 import BeautifulSoup, UnicodeDammit import phantom.app as phantom import phantom.utils as ph_utils import mimetypes import socket from email.header import decode_header, make_header import shutil import hashlib import jso...
true
true
7900402e9d7be3a9e325300c7d54ac92b6f11496
1,002
py
Python
kubernetes/test/test_v1alpha1_priority_class.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1alpha1_priority_class.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1alpha1_priority_class.py
iguazio/python
c2684bb479d44a49a2010ec4ede5ffa7b17349dd
[ "Apache-2.0" ]
1
2019-01-10T11:13:52.000Z
2019-01-10T11:13:52.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
22.266667
105
0.720559
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1alpha1_priority_class import V1alpha1PriorityClass class TestV1alpha1PriorityClass(unittest.TestCase): def setUp(self): ...
true
true
7900411b618eb5dd888ef069e7cb4648e3c76211
818
py
Python
var/spack/repos/builtin/packages/py-datalad-webapp/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
var/spack/repos/builtin/packages/py-datalad-webapp/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
var/spack/repos/builtin/packages/py-datalad-webapp/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.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 import * class PyDataladWebapp(PythonPackage): """DataLad extension for exposing commands via a web reque...
37.181818
93
0.709046
from spack import * class PyDataladWebapp(PythonPackage): homepage = "https://github.com/datalad/datalad-webapp" pypi = "datalad_webapp/datalad_webapp-0.3.tar.gz" version('0.3', sha256='7bbb2ce58a7e0e6d1a7a2f33d7e50fe7e73cd764380e70fdc2d9f651c3d0e312') depends_on('py-setuptools', type='bui...
true
true
790041379749cc18b5becf495d594fcbd07f17ff
5,794
py
Python
bin/p3motioncor2.py
emkailu/PAT3DEM
74e7a0f30179e49ea5c7da1bea893e21a3ed601a
[ "MIT" ]
null
null
null
bin/p3motioncor2.py
emkailu/PAT3DEM
74e7a0f30179e49ea5c7da1bea893e21a3ed601a
[ "MIT" ]
null
null
null
bin/p3motioncor2.py
emkailu/PAT3DEM
74e7a0f30179e49ea5c7da1bea893e21a3ed601a
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys import argparse import subprocess import glob import math from EMAN2 import * def file_base(movie): # return the filename and basename, exclude '.p3' return movie, os.path.basename(os.path.splitext(movie)[0]).replace('.p3', '') def check(log,c_p): with open(log) as log_r...
41.092199
214
0.654298
import os import sys import argparse import subprocess import glob import math from EMAN2 import * def file_base(movie): return movie, os.path.basename(os.path.splitext(movie)[0]).replace('.p3', '') def check(log,c_p): with open(log) as log_r: lines = [line for line in log_r] x0 = 0 y0 = 0 f = c_p['throw']...
false
true
790042be3e2c9b1e54c4488b33629bd6ccfbd3da
2,974
py
Python
tests/moduletool/test_python_dependencies.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
6
2021-03-09T10:24:02.000Z
2022-01-16T03:52:11.000Z
tests/moduletool/test_python_dependencies.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
1,319
2020-12-18T08:52:29.000Z
2022-03-31T18:17:32.000Z
tests/moduletool/test_python_dependencies.py
inmanta/inmanta-core
ae2153d57f124d00ad1b58e6d4bc6818364be4a8
[ "Apache-2.0" ]
4
2021-03-03T15:36:50.000Z
2022-03-11T11:41:51.000Z
""" Copyright 2020 Inmanta 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 ...
34.988235
118
0.697377
import os import common from inmanta.loader import SourceInfo from inmanta.module import Project def test_collect_python_requirements(tmpdir): common.makeproject(tmpdir, "test-project", deps=[("mod1", ""), ("mod2", "")], imports=["mod1", "mod2"]) project_dir = os.path.join(tmpdir, "test-project") li...
true
true
790042efbcdec0a389e086edaa634f05971d0edf
173
py
Python
Mundo 1/Ex003 - soma.py
FelipeDreissig/Prog-em-Py---CursoEmVideo
59a85e228b4c7bc0738d1a213e71b0f7fb07d03a
[ "MIT" ]
null
null
null
Mundo 1/Ex003 - soma.py
FelipeDreissig/Prog-em-Py---CursoEmVideo
59a85e228b4c7bc0738d1a213e71b0f7fb07d03a
[ "MIT" ]
null
null
null
Mundo 1/Ex003 - soma.py
FelipeDreissig/Prog-em-Py---CursoEmVideo
59a85e228b4c7bc0738d1a213e71b0f7fb07d03a
[ "MIT" ]
null
null
null
# Exercício número 3 da lista n1 = int(input('DIgite um valor:')) n2 = int(input('Digite outro valor:')) soma = n1+n2 print('A soma entre {} e {} é {}'.format(n1, n2, soma))
34.6
55
0.641618
n1 = int(input('DIgite um valor:')) n2 = int(input('Digite outro valor:')) soma = n1+n2 print('A soma entre {} e {} é {}'.format(n1, n2, soma))
true
true
79004322e1e6138ed1b408bce60ad1b602813964
16,753
py
Python
python/pyspark/pandas/data_type_ops/base.py
satya323/spark
4f825aad65f2650343e7cfbef39465ebb4e403b6
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-12-11T08:54:45.000Z
2021-12-11T08:54:45.000Z
python/pyspark/pandas/data_type_ops/base.py
satya323/spark
4f825aad65f2650343e7cfbef39465ebb4e403b6
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2020-11-15T04:24:15.000Z
2020-11-15T04:31:22.000Z
python/pyspark/pandas/data_type_ops/base.py
satya323/spark
4f825aad65f2650343e7cfbef39465ebb4e403b6
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2021-12-11T06:25:34.000Z
2022-01-06T07:22:30.000Z
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
40.271635
100
0.685429
import numbers from abc import ABCMeta from itertools import chain from typing import Any, Optional, Union import numpy as np import pandas as pd from pandas.api.types import CategoricalDtype from pyspark.sql import functions as F, Column from pyspark.sql.types import ( ArrayType, BinaryType,...
true
true
790043b9b1a0c584ef9b0ee96ef901ad6a6ac26b
707
py
Python
user/migrations/0018_loginrequest.py
EncryptEx/myhackupc
3b7c8bce8528e61aab65c976a3c9b4a700210c09
[ "MIT" ]
8
2017-11-20T09:11:37.000Z
2020-01-26T19:23:33.000Z
user/migrations/0018_loginrequest.py
EncryptEx/myhackupc
3b7c8bce8528e61aab65c976a3c9b4a700210c09
[ "MIT" ]
38
2018-07-11T08:03:43.000Z
2019-10-22T09:26:36.000Z
user/migrations/0018_loginrequest.py
EncryptEx/myhackupc
3b7c8bce8528e61aab65c976a3c9b4a700210c09
[ "MIT" ]
6
2019-01-21T18:19:17.000Z
2020-03-09T17:42:36.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.28 on 2021-10-02 20:31 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0017_user_email_subscribed'), ] operations = [ migrations.CreateMo...
28.28
114
0.591231
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('user', '0017_user_email_subscribed'), ] operations = [ migrations.CreateModel( name='LoginRequest', fields=[ ...
true
true
790044a8f078462e7191d4ab97ec292a566ea10a
1,058
py
Python
nnunet/utilities/file_endings.py
anxingle/nnUNet_simple
9c69bc5a005d5305b27d6d214dc16ac25c4ead76
[ "Apache-2.0" ]
null
null
null
nnunet/utilities/file_endings.py
anxingle/nnUNet_simple
9c69bc5a005d5305b27d6d214dc16ac25c4ead76
[ "Apache-2.0" ]
null
null
null
nnunet/utilities/file_endings.py
anxingle/nnUNet_simple
9c69bc5a005d5305b27d6d214dc16ac25c4ead76
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Division of Medical Image Computing, German Cancer Research Center (DKFZ), Heidelberg, Germany # # 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/lice...
34.129032
111
0.757089
from batchgenerators.utilities.file_and_folder_operations import * def remove_trailing_slash(filename: str): while filename.endswith('/'): filename = filename[:-1] return filename def maybe_add_0000_to_all_niigz(folder): nii_gz = subfiles(folder, suffix='.nii.gz') for n in nii_gz: n = remove_...
true
true
790044a9bd42f2aa1aad794030f8540d3b92b393
5,737
py
Python
settings/production.py
CoronaCircle/coronacircles
66963d178fe5ebd400e5f9403730ae0f8be4fb4d
[ "MIT" ]
null
null
null
settings/production.py
CoronaCircle/coronacircles
66963d178fe5ebd400e5f9403730ae0f8be4fb4d
[ "MIT" ]
null
null
null
settings/production.py
CoronaCircle/coronacircles
66963d178fe5ebd400e5f9403730ae0f8be4fb4d
[ "MIT" ]
null
null
null
from .base import * # noqa pylint: disable=wildcard-import, unused-wildcard-import from .base import env # GENERAL # ------------------------------------------------------------------------------ SECRET_KEY = env("DJANGO_SECRET_KEY") ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["coronacircles.de"]) # DA...
37.496732
87
0.569984
from .base import * from .base import env SECRET_KEY = env("DJANGO_SECRET_KEY") ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS", default=["coronacircles.de"]) DATABASES["default"] = env.db("DATABASE_URL") DATABASES["default"]["ATOMIC_REQUESTS"] = True DATABASES["default"]["CONN_MAX_AGE"] = env.int("CONN_MAX...
true
true
790044ba1e8e05bb8ad573572e1ca05fdf6a418b
24,067
py
Python
graphene_django/tests/test_views.py
joerhodes3/graphene-django
99892eba853bf060d25a4314c9db3ad28949c824
[ "MIT" ]
null
null
null
graphene_django/tests/test_views.py
joerhodes3/graphene-django
99892eba853bf060d25a4314c9db3ad28949c824
[ "MIT" ]
null
null
null
graphene_django/tests/test_views.py
joerhodes3/graphene-django
99892eba853bf060d25a4314c9db3ad28949c824
[ "MIT" ]
null
null
null
import json import pytest try: from urllib import urlencode except ImportError: from urllib.parse import urlencode def url_string(string="/graphql", **url_params): if url_params: string += "?" + urlencode(url_params) return string def batch_url_string(**url_params): return url_string("...
32.788828
95
0.640711
import json import pytest try: from urllib import urlencode except ImportError: from urllib.parse import urlencode def url_string(string="/graphql", **url_params): if url_params: string += "?" + urlencode(url_params) return string def batch_url_string(**url_params): return url_string("...
true
true
790044f9018ccdaa1b1f66221dd74eee86b09efc
1,480
py
Python
elabjournal/elabjournal/SampleSerie.py
matthijsbrouwer/elabjournal-python
4063b01993f0bf17ea2857009c1bedc5ace8b87b
[ "Apache-2.0" ]
2
2021-06-29T11:17:27.000Z
2022-01-11T18:41:49.000Z
elabjournal/elabjournal/SampleSerie.py
matthijsbrouwer/elabjournal-python
4063b01993f0bf17ea2857009c1bedc5ace8b87b
[ "Apache-2.0" ]
null
null
null
elabjournal/elabjournal/SampleSerie.py
matthijsbrouwer/elabjournal-python
4063b01993f0bf17ea2857009c1bedc5ace8b87b
[ "Apache-2.0" ]
1
2019-06-06T13:23:11.000Z
2019-06-06T13:23:11.000Z
from .eLABJournalObject import * import json import pandas as pd import numbers class SampleSerie(eLABJournalObject): def __init__(self, api, data): """ Internal use only: initialize sample serie """ if ((data is not None) & (type(data) == dict) & ("name" in ...
32.888889
94
0.538514
from .eLABJournalObject import * import json import pandas as pd import numbers class SampleSerie(eLABJournalObject): def __init__(self, api, data): if ((data is not None) & (type(data) == dict) & ("name" in data.keys()) ): super().__init__(api, data, "seriesI...
true
true
790045b9940a233b7fe5b3ea902b024bfb745fc8
18
py
Python
lemons/__init__.py
jakebrehm/ezpz
42d539bc37aa0c3789030ab4a1cae960d56bd5ac
[ "MIT" ]
null
null
null
lemons/__init__.py
jakebrehm/ezpz
42d539bc37aa0c3789030ab4a1cae960d56bd5ac
[ "MIT" ]
null
null
null
lemons/__init__.py
jakebrehm/ezpz
42d539bc37aa0c3789030ab4a1cae960d56bd5ac
[ "MIT" ]
null
null
null
from .gui import *
18
18
0.722222
from .gui import *
true
true
790045f361b08ad1c9412cfcf108d5f4078232bd
461
py
Python
vaas-app/src/vaas/manager/migrations/0002_auto_20210225_1216.py
allegro/vaas
3d2d1f1a9dae6ac69a13563a37f9bfdf4f986ae2
[ "Apache-2.0" ]
251
2015-09-02T10:50:51.000Z
2022-03-16T08:00:35.000Z
vaas-app/src/vaas/manager/migrations/0002_auto_20210225_1216.py
allegro/vaas
3d2d1f1a9dae6ac69a13563a37f9bfdf4f986ae2
[ "Apache-2.0" ]
154
2015-09-02T14:54:08.000Z
2022-03-16T08:34:17.000Z
vaas-app/src/vaas/manager/migrations/0002_auto_20210225_1216.py
allegro/vaas
3d2d1f1a9dae6ac69a13563a37f9bfdf4f986ae2
[ "Apache-2.0" ]
31
2015-09-03T07:51:05.000Z
2020-09-24T09:02:40.000Z
# Generated by Django 3.1.5 on 2021-02-25 11:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cluster', '0001_initial'), ('manager', '0001_initial'), ] operations = [ migrations.AlterField( model_name='director', ...
23.05
96
0.607375
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cluster', '0001_initial'), ('manager', '0001_initial'), ] operations = [ migrations.AlterField( model_name='director', name='cluster', field=mo...
true
true
790046b2f5d43a3787516621c1fece4ec644016f
3,009
py
Python
tests/test_base.py
AverkinSergei/pyexcel-io
a611a69cf7c2fa75f226b7879aba61bcfdaceda1
[ "BSD-3-Clause" ]
null
null
null
tests/test_base.py
AverkinSergei/pyexcel-io
a611a69cf7c2fa75f226b7879aba61bcfdaceda1
[ "BSD-3-Clause" ]
null
null
null
tests/test_base.py
AverkinSergei/pyexcel-io
a611a69cf7c2fa75f226b7879aba61bcfdaceda1
[ "BSD-3-Clause" ]
1
2019-04-27T04:40:14.000Z
2019-04-27T04:40:14.000Z
from pyexcel_io.sheet import ( SheetReader, SheetWriter, NamedContent ) from pyexcel_io.book import BookWriter from pyexcel_io.utils import is_empty_array from nose.tools import raises @raises(NotImplementedError) def test_book_writer(): book = BookWriter() book.create_sheet("test") def test_is_empty_ar...
25.075
56
0.606846
from pyexcel_io.sheet import ( SheetReader, SheetWriter, NamedContent ) from pyexcel_io.book import BookWriter from pyexcel_io.utils import is_empty_array from nose.tools import raises @raises(NotImplementedError) def test_book_writer(): book = BookWriter() book.create_sheet("test") def test_is_empty_ar...
true
true
790047388c9263b78ed04749687d2019273e54ec
4,090
py
Python
tensorflow/contrib/eager/python/examples/linear_regression/linear_regression_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/eager/python/examples/linear_regression/linear_regression_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
tensorflow/contrib/eager/python/examples/linear_regression/linear_regression_test.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
33.52459
89
0.666504
from __future__ import absolute_import from __future__ import division from __future__ import print_function import glob import os import shutil import tempfile import time import tensorflow as tf import tensorflow.contrib.eager as tfe from tensorflow.contrib.eager.python.examples.linear...
true
true
790047895f82a32d171d681dabea6e5076b7abeb
259
py
Python
Classroom 4/Buzzer_PWM.py
lakshanthad/Wio_Terminal_Classroom_Ardupy
d97ecb3dad7160ed6df14002b7c1b71a0e111383
[ "MIT" ]
3
2020-11-01T07:06:41.000Z
2021-11-04T05:50:31.000Z
Classroom 4/Buzzer_PWM.py
lakshanthad/Wio_Terminal_Classroom_Ardupy
d97ecb3dad7160ed6df14002b7c1b71a0e111383
[ "MIT" ]
3
2020-10-29T17:13:10.000Z
2021-02-02T20:11:02.000Z
Classroom 4/Buzzer_PWM.py
lakshanthad/Wio_Terminal_Classroom_Ardupy
d97ecb3dad7160ed6df14002b7c1b71a0e111383
[ "MIT" ]
null
null
null
from machine import Pin, Map, PWM # include Pin, Map and PWM functions from machine module import time # include time module # create PWM on WIO BUZZER with 2000Hz frequency and 250 duty cycle BUZZER = PWM(Pin(Map.WIO_BUZZER), freq=1000, duty=250)
37
92
0.741313
from machine import Pin, Map, PWM import time BUZZER = PWM(Pin(Map.WIO_BUZZER), freq=1000, duty=250)
true
true
7900493737e89ea4e37b3f31f90bdb4a41be0315
1,211
py
Python
src/pkgcore/resolver/util.py
thesamesam/pkgcore
be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf
[ "BSD-3-Clause" ]
null
null
null
src/pkgcore/resolver/util.py
thesamesam/pkgcore
be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf
[ "BSD-3-Clause" ]
null
null
null
src/pkgcore/resolver/util.py
thesamesam/pkgcore
be2d9264a3fe61a323f0075cbc4838ed6ec5ffcf
[ "BSD-3-Clause" ]
null
null
null
__all__ = ("group_attempts", "fails_filter", "reduce_to_failures",) def group_attempts(sequence, filter_func=None): if filter_func is None: filter_func = lambda x:True last, l = None, [] for x in sequence: if isinstance(x, tuple) and x[0] == 'inspecting': if l: ...
28.162791
67
0.521883
__all__ = ("group_attempts", "fails_filter", "reduce_to_failures",) def group_attempts(sequence, filter_func=None): if filter_func is None: filter_func = lambda x:True last, l = None, [] for x in sequence: if isinstance(x, tuple) and x[0] == 'inspecting': if l: ...
true
true
790049b345b5410136760d5ba8f60212769eb68c
3,737
py
Python
Code/tests/python_tests/nebulae_live.py
DaveSeidel/QB_Nebulae_V2
4a0218bb6a05e835e74b126729a1c3cd221fc9b5
[ "MIT" ]
40
2019-12-30T03:44:36.000Z
2022-02-07T23:09:42.000Z
Code/tests/python_tests/nebulae_live.py
alex-thibodeau/QB_Nebulae_V2
34bcf341ea8eddaa9f9ce2e7c2d2438e00e50f54
[ "MIT" ]
11
2020-03-08T10:22:57.000Z
2022-03-22T21:18:32.000Z
Code/tests/python_tests/nebulae_live.py
alex-thibodeau/QB_Nebulae_V2
34bcf341ea8eddaa9f9ce2e7c2d2438e00e50f54
[ "MIT" ]
23
2020-01-20T11:12:20.000Z
2022-03-02T20:39:09.000Z
import csnd6 # Import SPI library (for hardware SPI) and MCP3008 library. import Adafruit_GPIO.SPI as SPI import Adafruit_MCP3008 from random import randint, random import time # For Directory Searching import glob # Hardware SPI configuration: SPI_PORT = 0 SPI_DEVICE = 0 class RandomLine(object): ...
26.692857
104
0.628579
import csnd6 import Adafruit_GPIO.SPI as SPI import Adafruit_MCP3008 from random import randint, random import time import glob SPI_PORT = 0 SPI_DEVICE = 0 class RandomLine(object): def __init__(self, base, range): self.curVal = 0.0 self.reset() self.base = base ...
false
true
790049e0bc9201565c25d7b7c3d13b97466874c5
1,513
py
Python
doc/argparse2rst.py
Hertin/espnet
a0f2175df08b4750a9f0305c20b8c11f6e941867
[ "Apache-2.0" ]
5,053
2017-12-13T06:21:41.000Z
2022-03-31T13:38:29.000Z
doc/argparse2rst.py
Hertin/espnet
a0f2175df08b4750a9f0305c20b8c11f6e941867
[ "Apache-2.0" ]
3,666
2017-12-14T05:58:50.000Z
2022-03-31T22:11:49.000Z
doc/argparse2rst.py
Hertin/espnet
a0f2175df08b4750a9f0305c20b8c11f6e941867
[ "Apache-2.0" ]
1,709
2017-12-13T01:02:42.000Z
2022-03-31T11:57:45.000Z
#!/usr/bin/env python3 import importlib.machinery as imm import logging import pathlib import re import configargparse class ModuleInfo: def __init__(self, path): self.path = pathlib.Path(path) name = str(self.path.parent / self.path.stem) name = name.replace("/", ".") self.name =...
21.927536
82
0.637145
import importlib.machinery as imm import logging import pathlib import re import configargparse class ModuleInfo: def __init__(self, path): self.path = pathlib.Path(path) name = str(self.path.parent / self.path.stem) name = name.replace("/", ".") self.name = re.sub(r"^[\.]+", "",...
true
true
79004a2650724995b9107f426de6b76162790a79
564
py
Python
q2_emperor/tests/test_plugin_setup.py
mortonjt/q2-emperor
1e2f680349eebe077246fa083103a7764670c4e4
[ "BSD-3-Clause" ]
null
null
null
q2_emperor/tests/test_plugin_setup.py
mortonjt/q2-emperor
1e2f680349eebe077246fa083103a7764670c4e4
[ "BSD-3-Clause" ]
null
null
null
q2_emperor/tests/test_plugin_setup.py
mortonjt/q2-emperor
1e2f680349eebe077246fa083103a7764670c4e4
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2018, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
31.333333
78
0.556738
import unittest from q2_emperor.plugin_setup import plugin as emperor_plugin class PluginSetupTests(unittest.TestCase): def test_plugin_setup(self): self.assertEqual(emperor_plugin.name, 'emperor')
true
true
79004aa8b9d1be7d81c86db27d1b604a16e536ad
17,283
py
Python
tests/syndication/tests.py
adambrenecki/django
28a571348bca9c5a3c137e495e7d3c9349a5bd56
[ "BSD-3-Clause" ]
null
null
null
tests/syndication/tests.py
adambrenecki/django
28a571348bca9c5a3c137e495e7d3c9349a5bd56
[ "BSD-3-Clause" ]
null
null
null
tests/syndication/tests.py
adambrenecki/django
28a571348bca9c5a3c137e495e7d3c9349a5bd56
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from xml.dom import minidom from django.contrib.syndication import views from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.utils import tzinfo from django.utils.feedgenerator import rfc2822_date, rfc3339_date from .models impo...
40.006944
151
0.602847
from __future__ import unicode_literals from xml.dom import minidom from django.contrib.syndication import views from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.utils import tzinfo from django.utils.feedgenerator import rfc2822_date, rfc3339_date from .models impo...
true
true
79004abbe41e5a7062a04a2280bfef598d81361d
3,325
py
Python
homeassistant/components/airly/const.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
1
2022-01-05T16:48:58.000Z
2022-01-05T16:48:58.000Z
homeassistant/components/airly/const.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
69
2020-08-04T09:03:43.000Z
2022-03-31T06:13:01.000Z
homeassistant/components/airly/const.py
basicpail/core
5cc54618c5af3f75c08314bf2375cc7ac40d2b7e
[ "Apache-2.0" ]
1
2020-12-13T08:27:33.000Z
2020-12-13T08:27:33.000Z
"""Constants for Airly integration.""" from __future__ import annotations from typing import Final from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT from homeassistant.const import ( CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, DEVICE_CLASS_AQI, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_PM1, ...
31.666667
76
0.73985
from __future__ import annotations from typing import Final from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT from homeassistant.const import ( CONCENTRATION_MICROGRAMS_PER_CUBIC_METER, DEVICE_CLASS_AQI, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_PM1, DEVICE_CLASS_PM10, DEVICE_CLASS...
true
true
79004b19d0761374b84fa505adfa67cc3d731b38
6,753
py
Python
python/BayesianBlocks_python.py
fermi-lat/BayesianBlocks
83580da7938cfb7646d659974f727cc001e550cb
[ "BSD-3-Clause" ]
2
2019-11-24T13:07:40.000Z
2021-05-17T13:25:16.000Z
python/BayesianBlocks_python.py
fermi-lat/BayesianBlocks
83580da7938cfb7646d659974f727cc001e550cb
[ "BSD-3-Clause" ]
null
null
null
python/BayesianBlocks_python.py
fermi-lat/BayesianBlocks
83580da7938cfb7646d659974f727cc001e550cb
[ "BSD-3-Clause" ]
2
2019-11-24T13:05:46.000Z
2022-03-06T03:54:20.000Z
""" @brief Pure python implementation of the Bayesian Blocks algorithm described by Jackson, Scargle et al. 2005, IEEE Signal Processing Letters, 12, 105. (http://arxiv.org/abs/math/0309285) @author J. Chiang <jchiang@slac.stanford.edu> """ # # $Id: BayesianBlocks_python.py,v 1.1.1.1 2011/09/03 00:55:59 jchiang Exp $ ...
35.171875
77
0.554568
import copy import numpy as num def gammln(xx): cof = [76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5] y = xx x = xx tmp = x + 5.5 tmp -= (x + 0.5)*num.log(tmp) ser = 1.000000000190015 for j i...
true
true
79004c005dbef1968cc4f7951bd7124b35fed207
8,025
py
Python
examples/symbolic/test_symbolic_8.py
slamavl/quantarhei
d822bc2db86152c418e330a9152e7866869776f7
[ "MIT" ]
14
2016-10-16T13:26:05.000Z
2021-11-09T11:40:52.000Z
examples/symbolic/test_symbolic_8.py
slamavl/quantarhei
d822bc2db86152c418e330a9152e7866869776f7
[ "MIT" ]
61
2016-09-19T10:45:56.000Z
2021-11-10T13:53:06.000Z
examples/symbolic/test_symbolic_8.py
slamavl/quantarhei
d822bc2db86152c418e330a9152e7866869776f7
[ "MIT" ]
21
2016-08-30T09:09:28.000Z
2022-03-30T03:16:35.000Z
# -*- coding: utf-8 -*- """ Calculation of cumulant expressions for non-linear response functions of the third order for a multilevel three band system. """ from quantarhei.symbolic.cumulant import Ugde, Uedg, Uged, Uegd #, ExpdV from quantarhei.symbolic.cumulant import gg #, g1, g2 from quantarhei.symbolic.cumulan...
24.616564
146
0.52947
from quantarhei.symbolic.cumulant import Ugde, Uedg, Uged, Uegd from quantarhei.symbolic.cumulant import gg from quantarhei.symbolic.cumulant import CumulantExpr from quantarhei.symbolic.abc import a, b, f, tau, tau1, tau2, tau3, c, d from quantarhei.symbolic.abc import t1, t2, t3 from quantarhei.symbolic.lang imp...
true
true
79004d113eb31b70f4067b50139981c6b9e139c0
1,163
py
Python
fairgraph/openminds/sands/miscellaneous/coordinate_point.py
HumanBrainProject/fairgraph
6cc43ad7a6e0f8f5c533c9c8def9274ce7dc0810
[ "Apache-2.0" ]
8
2019-10-16T13:27:10.000Z
2022-03-12T12:03:02.000Z
fairgraph/openminds/sands/miscellaneous/coordinate_point.py
HumanBrainProject/fairgraph
6cc43ad7a6e0f8f5c533c9c8def9274ce7dc0810
[ "Apache-2.0" ]
26
2019-06-12T13:56:26.000Z
2021-11-24T08:48:47.000Z
fairgraph/openminds/sands/miscellaneous/coordinate_point.py
HumanBrainProject/fairgraph
6cc43ad7a6e0f8f5c533c9c8def9274ce7dc0810
[ "Apache-2.0" ]
8
2019-06-26T07:10:44.000Z
2021-02-04T15:13:16.000Z
""" Structured information on a coordinate point. """ # this file was auto-generated from datetime import date, datetime from fairgraph.base_v3 import EmbeddedMetadata, IRI from fairgraph.fields import Field class CoordinatePoint(EmbeddedMetadata): """ Structured information on a coordinate point. """...
34.205882
173
0.675838
from datetime import date, datetime from fairgraph.base_v3 import EmbeddedMetadata, IRI from fairgraph.fields import Field class CoordinatePoint(EmbeddedMetadata): type = ["https://openminds.ebrains.eu/sands/CoordinatePoint"] context = { "schema": "http://schema.org/", "kg": "https://kg.e...
true
true
79004d1c2a3386e1ca2a5d90181729809dbd2cd0
35,078
py
Python
rplugin/python3/denite/ui/default.py
supermomonga/denite.nvim
c55e99ec45d16fb5cce33bf78d6ddbeb8dd73176
[ "MIT" ]
null
null
null
rplugin/python3/denite/ui/default.py
supermomonga/denite.nvim
c55e99ec45d16fb5cce33bf78d6ddbeb8dd73176
[ "MIT" ]
null
null
null
rplugin/python3/denite/ui/default.py
supermomonga/denite.nvim
c55e99ec45d16fb5cce33bf78d6ddbeb8dd73176
[ "MIT" ]
null
null
null
# ============================================================================ # FILE: default.py # AUTHOR: Shougo Matsushita <Shougo.Matsu at gmail.com> # License: MIT license # ============================================================================ import re import typing from denite.util import echo, error, c...
38.211329
79
0.54852
import re import typing from denite.util import echo, error, clearmatch, regex_convert_py_vim from denite.util import Nvim, UserContext, Candidates, Candidate from denite.parent import SyncParent class Default(object): @property def is_async(self) -> bool: return self._is_async def __init_...
true
true
79004d2a591ae728927e1e5bedd665bdda378dfe
3,023
py
Python
test/programytest/sentiment/test_extension.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
null
null
null
test/programytest/sentiment/test_extension.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
null
null
null
test/programytest/sentiment/test_extension.py
motazsaad/fit-bot-fb-clt
580477aa1ec91855b621d9ae276f2705962f6a87
[ "MIT" ]
4
2019-04-01T15:42:23.000Z
2020-11-05T08:14:27.000Z
import unittest from programy.bot import Bot from programy.config.bot.bot import BotConfiguration from programy.sentiment.extension import SentimentExtension from programytest.client import TestClient class SentimentExtensionTests(unittest.TestCase): def setUp(self): self._client = TestClient() ...
39.25974
112
0.726431
import unittest from programy.bot import Bot from programy.config.bot.bot import BotConfiguration from programy.sentiment.extension import SentimentExtension from programytest.client import TestClient class SentimentExtensionTests(unittest.TestCase): def setUp(self): self._client = TestClient() ...
true
true
79004e190316c02e9268a486cbbdd2f2f3c2737a
1,140
py
Python
apps/currency/serializers.py
ecoo-app/ecoo-backend
ffe54abcd2e8c1a18ef2fa992c45a10f8232a4a0
[ "MIT" ]
1
2021-03-31T18:25:44.000Z
2021-03-31T18:25:44.000Z
apps/currency/serializers.py
ecoo-app/ecoo-backend
ffe54abcd2e8c1a18ef2fa992c45a10f8232a4a0
[ "MIT" ]
null
null
null
apps/currency/serializers.py
ecoo-app/ecoo-backend
ffe54abcd2e8c1a18ef2fa992c45a10f8232a4a0
[ "MIT" ]
1
2021-01-14T09:27:42.000Z
2021-01-14T09:27:42.000Z
from rest_framework import serializers from apps.currency.models import Currency class CurrencyWalletSerializer(serializers.ModelSerializer): actual_nonce = serializers.SerializerMethodField("get_nonce") def get_nonce(self, wallet): return wallet.nonce class Meta: from apps.wallet.model...
27.142857
81
0.620175
from rest_framework import serializers from apps.currency.models import Currency class CurrencyWalletSerializer(serializers.ModelSerializer): actual_nonce = serializers.SerializerMethodField("get_nonce") def get_nonce(self, wallet): return wallet.nonce class Meta: from apps.wallet.model...
true
true
79004e283baa674ec188339eb670cdd150291ba9
5,814
py
Python
scripts/proteinInteractionEBI/parse_ebi_test.py
pradh/data
de42fe45a169ccfb1decce53c20f2e9f32ed71e1
[ "Apache-2.0" ]
null
null
null
scripts/proteinInteractionEBI/parse_ebi_test.py
pradh/data
de42fe45a169ccfb1decce53c20f2e9f32ed71e1
[ "Apache-2.0" ]
null
null
null
scripts/proteinInteractionEBI/parse_ebi_test.py
pradh/data
de42fe45a169ccfb1decce53c20f2e9f32ed71e1
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Google LLC # # 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 writing,...
41.528571
98
0.71259
import copy import unittest import parse_ebi CONST_TEST_TEXT = '''[Term] id: MI:0001 name: interaction detection method def: "Method to determine the interaction." [PMID:14755292] [Term] id: MI:0045 name: experimental interaction detection def: "Methods based" [PMID:14755292] is_a: MI:0001 ! interactio...
true
true
79004f3fd5dd4da3a9d00eb59d8536856754ca47
52
py
Python
uniplot/__init__.py
Sean1708/uniplot
c4a35b8f5cdbf6d9ecd5ace6a23c17ca76d876d5
[ "MIT" ]
null
null
null
uniplot/__init__.py
Sean1708/uniplot
c4a35b8f5cdbf6d9ecd5ace6a23c17ca76d876d5
[ "MIT" ]
4
2016-03-11T10:57:48.000Z
2016-04-02T12:34:37.000Z
uniplot/__init__.py
Sean1708/uniplot
c4a35b8f5cdbf6d9ecd5ace6a23c17ca76d876d5
[ "MIT" ]
2
2018-09-24T15:14:39.000Z
2019-08-20T14:20:38.000Z
"""Plot graphs from human-readable file formats."""
26
51
0.730769
true
true
79004f575a433f46a6d9eec69c73cfe2b93d5a23
3,989
py
Python
Codes/xiaohong2019/leetcode/4_median_of_two_sorted_arrays.py
liuxiaohui1221/algorithm
d80e64185ceb4798ac5389bfbd226dc1d406f6b5
[ "Apache-2.0" ]
256
2017-10-25T13:02:15.000Z
2022-02-25T13:47:59.000Z
Codes/xiaohong2019/leetcode/4_median_of_two_sorted_arrays.py
liuxiaohui1221/algorithm
d80e64185ceb4798ac5389bfbd226dc1d406f6b5
[ "Apache-2.0" ]
56
2017-10-27T01:34:20.000Z
2022-03-01T00:20:55.000Z
Codes/xiaohong2019/leetcode/4_median_of_two_sorted_arrays.py
liuxiaohui1221/algorithm
d80e64185ceb4798ac5389bfbd226dc1d406f6b5
[ "Apache-2.0" ]
83
2017-10-25T12:51:53.000Z
2022-02-15T08:27:03.000Z
# -*- coding: utf-8 -*- # URL : https://leetcode-cn.com/problems/median-of-two-sorted-arrays/ """""" """ problem: 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2。 请你找出这两个有序数组的中位数,并且要求算法的时间复杂度为 O(log(m + n))。 你可以假设 nums1 和 nums2 不会同时为空。 示例 1: nums1 = [1, 3] nums2 = [2] 则中位数是 2.0 示例 2: nums1 = [1, 2] nums2 = [3, 4] 则中位数是 (2 +...
30.450382
91
0.57107
class Solution(object): def findMedianSortedArrays(self, nums1, nums2): m = len(nums1) n = len(nums2) def find_kth(nums1, nums2, index1, index2, k): if index1 >= len(nums1): return nums2[index2 + k - 1] if index2 >= len(nums2): ...
true
true
7900500e6c1b27381a31bdc7c2718dc80a3dca00
662
py
Python
manage.py
aidswidjaja/PotatoBoard
e4fbd09c9d086509433b519db3e38b69dccac81e
[ "MIT" ]
null
null
null
manage.py
aidswidjaja/PotatoBoard
e4fbd09c9d086509433b519db3e38b69dccac81e
[ "MIT" ]
13
2021-01-04T06:53:11.000Z
2021-07-01T00:40:00.000Z
manage.py
aidswidjaja/PotatoBoard
e4fbd09c9d086509433b519db3e38b69dccac81e
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'potato.settings') try: from django.core.management import execute_from_command_line except Impor...
28.782609
73
0.678248
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'potato.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
7900507d0a8fa8a1002ea9d0903685236f062905
32,054
py
Python
scripts/gen_kobject_list.py
shijunjing/zephyr
b0d509bc0dd2104cd69250b5798b833e9104f919
[ "Apache-2.0" ]
null
null
null
scripts/gen_kobject_list.py
shijunjing/zephyr
b0d509bc0dd2104cd69250b5798b833e9104f919
[ "Apache-2.0" ]
null
null
null
scripts/gen_kobject_list.py
shijunjing/zephyr
b0d509bc0dd2104cd69250b5798b833e9104f919
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 """ Script to generate gperf tables of kernel object metadata User mode threads making system calls reference kernel objects by memory address, as the kernel/driver APIs in Zephyr are the same for both user and supe...
31.736634
116
0.613621
import sys import argparse import math import os import struct import json from distutils.version import LooseVersion import elftools from elftools.elf.elffile import ELFFile from elftools.elf.sections import SymbolTableSection if LooseVersion(elftools.__version__) < LooseVersion('0.24'): sys.exit("pyelftoo...
true
true
79005094b5d9f0d86599dc6eea29e4b5f8533ad4
7,204
py
Python
bcpandas/utils.py
alon-r/bcpandas
73ee5a2228024ec1894e8c87986360a7eea3cc14
[ "MIT" ]
null
null
null
bcpandas/utils.py
alon-r/bcpandas
73ee5a2228024ec1894e8c87986360a7eea3cc14
[ "MIT" ]
null
null
null
bcpandas/utils.py
alon-r/bcpandas
73ee5a2228024ec1894e8c87986360a7eea3cc14
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Aug 3 23:07:15 2019 @author: ydima """ import logging import os from pathlib import Path import random import shlex import string from subprocess import PIPE, Popen import tempfile from typing import Dict, List, Optional, Union import pandas as pd from .constants import (...
29.048387
119
0.600222
import logging import os from pathlib import Path import random import shlex import string from subprocess import PIPE, Popen import tempfile from typing import Dict, List, Optional, Union import pandas as pd from .constants import ( DIRECTIONS, IN, IS_WIN32, NEWLINE, OUT, QUERY, QUERYOU...
true
true
790050f22facf78354c0fc3e85f0e3ce9c8ea649
4,366
py
Python
ansys_corba/omniORB/COS/CosObjectIdentity_idl.py
pyansys/ansys_corba
91e4e66a48143c827f56cf1113145bb48d5f4d6a
[ "MIT" ]
6
2021-04-26T09:25:48.000Z
2022-03-26T05:09:38.000Z
ansys_corba/omniORB/COS/CosObjectIdentity_idl.py
pyansys/ansys_corba
91e4e66a48143c827f56cf1113145bb48d5f4d6a
[ "MIT" ]
3
2022-03-14T08:17:21.000Z
2022-03-17T20:07:23.000Z
ansys_corba/omniORB/COS/CosObjectIdentity_idl.py
pyansys/pymapdl-corba
91e4e66a48143c827f56cf1113145bb48d5f4d6a
[ "MIT" ]
1
2020-11-11T11:10:19.000Z
2020-11-11T11:10:19.000Z
# Python stubs generated by omniidl from /tmp/corba/omni/share/idl/omniORB/COS/CosObjectIdentity.idl # DO NOT EDIT THIS FILE! import omniORB, _omnipy from omniORB import CORBA, PortableServer _0_CORBA = CORBA _omnipy.checkVersion(4,2, __file__, 1) try: property except NameError: def property(*args): ...
43.227723
185
0.830508
import omniORB, _omnipy from omniORB import CORBA, PortableServer _0_CORBA = CORBA _omnipy.checkVersion(4,2, __file__, 1) try: property except NameError: def property(*args): return None __name__ = "CosObjectIdentity" _0_CosObjectIdentity = omniORB.openModule("CosObjectIdentity", r"/tmp/corba...
true
true
7900515320c3b3319c03f61841dc3f24a082e7f3
12,476
py
Python
src/lpb.py
RobbinBouwmeester/LIT
0516a69fbf1b8e9976524e0c243f82de041df544
[ "Apache-2.0" ]
null
null
null
src/lpb.py
RobbinBouwmeester/LIT
0516a69fbf1b8e9976524e0c243f82de041df544
[ "Apache-2.0" ]
null
null
null
src/lpb.py
RobbinBouwmeester/LIT
0516a69fbf1b8e9976524e0c243f82de041df544
[ "Apache-2.0" ]
null
null
null
""" Copyright (c) 2017 Robbin Bouwmeester 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, di...
36.162319
303
0.655579
__author__ = "Robbin Bouwmeester" __copyright__ = "Copyright 2017" __credits__ = ["Robbin Bouwmeester"] __license__ = "MIT" __version__ = "0.1" __maintainer__ = "Robbin Bouwmeester" __email__ = "Robbin.bouwmeester@ugent.be" __status__ = "nightly funzies" import pandas as pd from itertools import groupby import loggin...
true
true
790051dad9636751beaebf2f7a3af72b9f9dd2cb
2,275
py
Python
homeassistant/components/blockchain/sensor.py
CantankerousBullMoose/core
2178e27fb4c62271d4872e16838331defed82226
[ "Apache-2.0" ]
1
2021-03-12T20:46:40.000Z
2021-03-12T20:46:40.000Z
homeassistant/components/blockchain/sensor.py
CantankerousBullMoose/core
2178e27fb4c62271d4872e16838331defed82226
[ "Apache-2.0" ]
51
2020-08-03T07:30:44.000Z
2022-03-22T06:02:42.000Z
homeassistant/components/blockchain/sensor.py
CantankerousBullMoose/core
2178e27fb4c62271d4872e16838331defed82226
[ "Apache-2.0" ]
2
2021-03-22T21:42:48.000Z
2021-04-12T12:26:39.000Z
"""Support for Blockchain.com sensors.""" from datetime import timedelta import logging from pyblockchain import get_balance, validate_address import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME import homeassistant.helpers.c...
26.453488
77
0.688791
from datetime import timedelta import logging from pyblockchain import get_balance, validate_address import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant....
true
true
7900542b19f99c7d0c7def2a8f3eee27dffd51c7
2,047
py
Python
python/tests/test_print.py
borglab/GTDynamics
ffdb0c5c3bc2d9b13555caee075b1b4304e1e3f1
[ "BSD-2-Clause" ]
6
2021-08-09T23:43:52.000Z
2021-11-11T16:16:37.000Z
python/tests/test_print.py
borglab/GTDynamics
ffdb0c5c3bc2d9b13555caee075b1b4304e1e3f1
[ "BSD-2-Clause" ]
104
2021-08-03T14:15:28.000Z
2022-03-26T08:18:09.000Z
python/tests/test_print.py
borglab/GTDynamics
ffdb0c5c3bc2d9b13555caee075b1b4304e1e3f1
[ "BSD-2-Clause" ]
4
2021-08-02T17:42:28.000Z
2021-12-24T00:43:17.000Z
""" * GTDynamics Copyright 2021, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * See LICENSE for the license information * * @file test_print.py * @brief Test printing with DynamicsSymbol. * @author Gerry Chen """ import unittest from io import StringIO from unittest.m...
34.694915
93
0.633122
import unittest from io import StringIO from unittest.mock import patch import gtdynamics as gtd import gtsam class TestPrint(unittest.TestCase): def test_values(self): v = gtd.Values() gtd.InsertJointAngle(v, 0, 1, 2) self.assertTrue('q(0)1' in v.__repr__()) def test_nonlinear_fact...
true
true
79005453d0fe8a9fdd2a776edc602dc232c208ca
3,791
py
Python
drfs/filesystems/util.py
datarevenue-berlin/drfs
d44274b0ae6e1b802b7763b5088825a83cc12fa6
[ "MIT" ]
2
2021-07-29T10:38:30.000Z
2021-09-08T11:48:39.000Z
drfs/filesystems/util.py
datarevenue-berlin/drfs
d44274b0ae6e1b802b7763b5088825a83cc12fa6
[ "MIT" ]
2
2020-10-07T07:47:31.000Z
2021-11-15T17:52:33.000Z
drfs/filesystems/util.py
datarevenue-berlin/drfs
d44274b0ae6e1b802b7763b5088825a83cc12fa6
[ "MIT" ]
null
null
null
import urllib.parse from functools import partial, wraps from pathlib import Path from drfs import config from drfs.util import prepend_scheme, remove_scheme def get_fs(path, opts=None, rtype="instance"): """Helper to infer filesystem correctly. Gets filesystem options from settings and updates them with gi...
26.697183
87
0.619889
import urllib.parse from functools import partial, wraps from pathlib import Path from drfs import config from drfs.util import prepend_scheme, remove_scheme def get_fs(path, opts=None, rtype="instance"): from drfs.filesystems import FILESYSTEMS try: protocol = path.scheme except AttributeError:...
true
true
7900545c0d4817fb80a8a0b55d46ac0ebdf60db0
3,216
py
Python
tools/analyze_model.py
gasvn/Res2Net-detectron2
3677895d5d23635b67837e64a79370b9ee117c27
[ "Apache-2.0" ]
29
2020-05-11T07:22:46.000Z
2021-09-20T12:21:26.000Z
tools/analyze_model.py
gasvn/Res2Net-detectron2
3677895d5d23635b67837e64a79370b9ee117c27
[ "Apache-2.0" ]
4
2021-06-08T21:22:09.000Z
2022-03-12T00:25:40.000Z
tools/analyze_model.py
gasvn/Res2Net-detectron2
3677895d5d23635b67837e64a79370b9ee117c27
[ "Apache-2.0" ]
10
2020-05-11T08:28:20.000Z
2021-08-25T08:17:41.000Z
# -*- coding: utf-8 -*- # noqa: B950 import logging from collections import Counter import tqdm from detectron2.checkpoint import DetectionCheckpointer from detectron2.config import get_cfg from detectron2.data import build_detection_test_loader from detectron2.engine import default_argument_parser from detectron2.mo...
27.965217
97
0.679415
import logging from collections import Counter import tqdm from detectron2.checkpoint import DetectionCheckpointer from detectron2.config import get_cfg from detectron2.data import build_detection_test_loader from detectron2.engine import default_argument_parser from detectron2.modeling import build_model from dete...
true
true
790054f824f61a92d991eef2aa187ebe7e531824
292
py
Python
src/CodeLearn/plaintextCode/BloomTech/BTU5W1/U5W1P2_Task6_w1.py
MingjunGeng/Code-Knowledge
5b376f6b3ff9e7fa0ab41c7b57e3a80313fa0daa
[ "MIT" ]
null
null
null
src/CodeLearn/plaintextCode/BloomTech/BTU5W1/U5W1P2_Task6_w1.py
MingjunGeng/Code-Knowledge
5b376f6b3ff9e7fa0ab41c7b57e3a80313fa0daa
[ "MIT" ]
null
null
null
src/CodeLearn/plaintextCode/BloomTech/BTU5W1/U5W1P2_Task6_w1.py
MingjunGeng/Code-Knowledge
5b376f6b3ff9e7fa0ab41c7b57e3a80313fa0daa
[ "MIT" ]
1
2022-03-18T04:52:10.000Z
2022-03-18T04:52:10.000Z
#!/usr/bin/python3 # --- 001 > U5W2P1_Task6_w1 def solution( n ): if(n > 2 and n < 7 ): return True; else: return False; if __name__ == "__main__": print('----------start------------') n = 10 print(solution( n )) print('------------end------------')
19.466667
40
0.445205
def solution( n ): if(n > 2 and n < 7 ): return True; else: return False; if __name__ == "__main__": print('----------start------------') n = 10 print(solution( n )) print('------------end------------')
true
true
7900558fda7459a70dea4a5e3d196f7c1eebd412
7,993
py
Python
test/test_init.py
matthiasdiener/mirgecom
4fb879023ec124047be9f3001485c69a8f4660c6
[ "MIT" ]
null
null
null
test/test_init.py
matthiasdiener/mirgecom
4fb879023ec124047be9f3001485c69a8f4660c6
[ "MIT" ]
null
null
null
test/test_init.py
matthiasdiener/mirgecom
4fb879023ec124047be9f3001485c69a8f4660c6
[ "MIT" ]
null
null
null
__copyright__ = """ Copyright (C) 2020 University of Illinois Board of Trustees """ __license__ = """ 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 limitat...
29.278388
79
0.671337
__copyright__ = """ Copyright (C) 2020 University of Illinois Board of Trustees """ __license__ = """ 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 limitat...
true
true
790056483285f244869c93d2abc1dc3c276c4eff
816
py
Python
emonitor/modules/locations/__init__.py
Durburz/eMonitor
56f3b1fe39b9da3a12b49bdd60d0cfca51c23351
[ "BSD-3-Clause" ]
21
2015-03-04T11:36:47.000Z
2021-04-20T07:51:53.000Z
emonitor/modules/locations/__init__.py
Durburz/eMonitor
56f3b1fe39b9da3a12b49bdd60d0cfca51c23351
[ "BSD-3-Clause" ]
79
2015-01-04T21:35:49.000Z
2020-03-05T07:22:10.000Z
emonitor/modules/locations/__init__.py
Durburz/eMonitor
56f3b1fe39b9da3a12b49bdd60d0cfca51c23351
[ "BSD-3-Clause" ]
27
2015-03-04T11:36:48.000Z
2021-09-20T08:15:17.000Z
from emonitor.utils import Module from emonitor.extensions import babel from .content_frontend import getFrontendContent, getFrontendData class LocationsModule(Module): info = dict(area=['frontend'], name='locations', path='locations', icon='fa-code-fork', version='0.1') def __repr__(self): return "l...
29.142857
118
0.693627
from emonitor.utils import Module from emonitor.extensions import babel from .content_frontend import getFrontendContent, getFrontendData class LocationsModule(Module): info = dict(area=['frontend'], name='locations', path='locations', icon='fa-code-fork', version='0.1') def __repr__(self): return "l...
true
true
790056b7d6b9304321397dda60c9623d08f6fd60
17,213
py
Python
src/transformers/adas.py
MathieuTuli/transformers
da3db8ba7a18deed492808b0d6c5d29669241fa0
[ "Apache-2.0" ]
null
null
null
src/transformers/adas.py
MathieuTuli/transformers
da3db8ba7a18deed492808b0d6c5d29669241fa0
[ "Apache-2.0" ]
null
null
null
src/transformers/adas.py
MathieuTuli/transformers
da3db8ba7a18deed492808b0d6c5d29669241fa0
[ "Apache-2.0" ]
null
null
null
""" """ from __future__ import division from torch.optim.optimizer import Optimizer, required import numpy as np import torch from typing import NamedTuple, List from dataclasses import dataclass from enum import Enum from typing import Union, Tuple # from scipy.sparse.linalg import svds from scipy.optimize import mi...
36.314346
111
0.521815
from __future__ import division from torch.optim.optimizer import Optimizer, required import numpy as np import torch from typing import NamedTuple, List from dataclasses import dataclass from enum import Enum from typing import Union, Tuple from scipy.optimize import minimize_scalar class LayerType(Enum): CON...
true
true