hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f7134d2b0a1ccd745737a5779a20f8c80997bbc2
1,942
py
Python
src/dashify/visualization/controllers/cell_data_types.py
SofiaTraba/dashifyML
4a70e469d4316e406f88f86fe77f7f2866c318ab
[ "MIT" ]
4
2020-02-26T13:26:09.000Z
2020-10-26T18:36:53.000Z
src/dashify/visualization/controllers/cell_data_types.py
SofiaTraba/dashifyML
4a70e469d4316e406f88f86fe77f7f2866c318ab
[ "MIT" ]
10
2020-02-09T23:59:39.000Z
2020-08-05T16:24:30.000Z
src/dashify/visualization/controllers/cell_data_types.py
SofiaTraba/dashifyML
4a70e469d4316e406f88f86fe77f7f2866c318ab
[ "MIT" ]
2
2021-02-11T02:41:24.000Z
2022-01-06T12:48:44.000Z
from enum import Enum import pandas as pd from typing import Dict import json class SupportedDataTypes(Enum): number_type = 1 string_type = 2 list_type = 3 bool_type = 4 def is_bool(value) -> bool: return str(value).lower() in ["true", "false"] def is_number(value) -> bool: try: fl...
25.893333
84
0.674562
from enum import Enum import pandas as pd from typing import Dict import json class SupportedDataTypes(Enum): number_type = 1 string_type = 2 list_type = 3 bool_type = 4 def is_bool(value) -> bool: return str(value).lower() in ["true", "false"] def is_number(value) -> bool: try: fl...
true
true
f7134da2b040dac9af18bee385823a8ba7bac14c
708
py
Python
doozerlib/constants.py
vfreex/doozer
8ad0a1234120cdc30890afbbdda1bc40e4a4fc76
[ "Apache-2.0" ]
1
2020-09-21T06:48:40.000Z
2020-09-21T06:48:40.000Z
doozerlib/constants.py
vfreex/doozer
8ad0a1234120cdc30890afbbdda1bc40e4a4fc76
[ "Apache-2.0" ]
null
null
null
doozerlib/constants.py
vfreex/doozer
8ad0a1234120cdc30890afbbdda1bc40e4a4fc76
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, print_function, unicode_literals # Environment variables to disable Git stdin prompts for username, password, etc GIT_NO_PROMPTS = { "GIT_SSH_COMMAND": "ssh -oBatchMode=yes", "GIT_TERMINAL_PROMPT": "0", } BREWWEB_URL = "https://brewweb.engineering.redhat.com/brew" # En...
28.32
115
0.759887
from __future__ import absolute_import, print_function, unicode_literals GIT_NO_PROMPTS = { "GIT_SSH_COMMAND": "ssh -oBatchMode=yes", "GIT_TERMINAL_PROMPT": "0", } BREWWEB_URL = "https://brewweb.engineering.redhat.com/brew" DB_HOST = "DOOZER_DB_HOST" DB_PORT = "DOOZER_DB_PORT" DB_USER = "DOOZER_DB_USER" DB_P...
true
true
f7134da319b6193de718240f422ffa79fb8b92f7
1,338
py
Python
docs/source/conf.py
timgates42/pyramid-excel
19f8d4144ef76a4dc89ded2f0d664fd796f1d37a
[ "BSD-3-Clause" ]
3
2017-12-13T11:45:34.000Z
2020-05-23T16:23:49.000Z
docs/source/conf.py
timgates42/pyramid-excel
19f8d4144ef76a4dc89ded2f0d664fd796f1d37a
[ "BSD-3-Clause" ]
1
2020-04-01T12:43:40.000Z
2020-04-01T12:43:40.000Z
docs/source/conf.py
timgates42/pyramid-excel
19f8d4144ef76a4dc89ded2f0d664fd796f1d37a
[ "BSD-3-Clause" ]
1
2020-03-31T12:18:35.000Z
2020-03-31T12:18:35.000Z
# -*- coding: utf-8 -*- DESCRIPTION = ( 'A pyramid extension that provides one application programming interfac' + 'e to read and write data in different excel file formats' + '' ) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', ] ...
26.235294
78
0.674888
DESCRIPTION = ( 'A pyramid extension that provides one application programming interfac' + 'e to read and write data in different excel file formats' + '' ) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode', ] intersphinx_mapping = { ...
true
true
f7134e028d1ca11deafbcacd06fab39c16a1190c
3,486
py
Python
bootstrapvz/plugins/ec2_launch/tasks.py
qqshfox/bootstrap-vz
38fc7c52407d015d3c75867bfea266d0aec6d7e2
[ "Apache-2.0" ]
1
2019-06-11T17:36:37.000Z
2019-06-11T17:36:37.000Z
bootstrapvz/plugins/ec2_launch/tasks.py
qqshfox/bootstrap-vz
38fc7c52407d015d3c75867bfea266d0aec6d7e2
[ "Apache-2.0" ]
null
null
null
bootstrapvz/plugins/ec2_launch/tasks.py
qqshfox/bootstrap-vz
38fc7c52407d015d3c75867bfea266d0aec6d7e2
[ "Apache-2.0" ]
14
2016-12-15T09:29:10.000Z
2021-01-28T13:06:14.000Z
import logging from bootstrapvz.base import Task from bootstrapvz.common import phases from bootstrapvz.providers.ec2.tasks import ami # TODO: Merge with the method available in wip-integration-tests branch def waituntil(predicate, timeout=5, interval=0.05): import time threshhold = time.time() + timeout ...
38.733333
145
0.591509
import logging from bootstrapvz.base import Task from bootstrapvz.common import phases from bootstrapvz.providers.ec2.tasks import ami def waituntil(predicate, timeout=5, interval=0.05): import time threshhold = time.time() + timeout while time.time() < threshhold: if predicate(): retu...
true
true
f7134e82ef2ba64434c6071bd963684d781e2dea
25
py
Python
script_ck/__init__.py
ShowControl/ScriptCK
8d9dab5726d260999d59aaa1fc32fbbd65494df3
[ "Apache-2.0" ]
null
null
null
script_ck/__init__.py
ShowControl/ScriptCK
8d9dab5726d260999d59aaa1fc32fbbd65494df3
[ "Apache-2.0" ]
null
null
null
script_ck/__init__.py
ShowControl/ScriptCK
8d9dab5726d260999d59aaa1fc32fbbd65494df3
[ "Apache-2.0" ]
null
null
null
from .script_ck import *
12.5
24
0.76
from .script_ck import *
true
true
f7134eb0150972ac913605e2f558d7bec19ddefc
4,546
py
Python
pygs/graphserver/compiler/compile_graph.py
abyrd/graphserver
42edcad2618635310c57fa6ab4a13974025248ba
[ "BSD-3-Clause-Clear" ]
2
2015-02-25T21:46:02.000Z
2019-04-27T20:22:33.000Z
pygs/graphserver/compiler/compile_graph.py
jeriksson/graphserver
b853f3cecc8af00e02a04fd4e489c27527688284
[ "BSD-3-Clause-Clear" ]
null
null
null
pygs/graphserver/compiler/compile_graph.py
jeriksson/graphserver
b853f3cecc8af00e02a04fd4e489c27527688284
[ "BSD-3-Clause-Clear" ]
null
null
null
from graphserver.graphdb import GraphDatabase from graphserver.ext.gtfs.gtfsdb import GTFSDatabase from graphserver.ext.osm.osmdb import OSMDB from graphserver.ext.osm.profiledb import ProfileDB from graphserver import compiler from graphserver.core import Graph import sys from sys import argv def process_street_g...
41.327273
155
0.649582
from graphserver.graphdb import GraphDatabase from graphserver.ext.gtfs.gtfsdb import GTFSDatabase from graphserver.ext.osm.osmdb import OSMDB from graphserver.ext.osm.profiledb import ProfileDB from graphserver import compiler from graphserver.core import Graph import sys from sys import argv def process_street_g...
false
true
f7134f2749eab1ec15dd4c49f41156380c733c83
5,767
py
Python
var/spack/repos/builtin/packages/gaudi/package.py
liphardt/spack
8584006008a8c9eaa1bc6b67617ab7d1acda24ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2021-02-08T15:05:27.000Z
2021-02-08T15:05:27.000Z
var/spack/repos/builtin/packages/gaudi/package.py
gmt3141/spack
e05ac5c944e086ab558ad53ca929c29b1770a818
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/gaudi/package.py
gmt3141/spack
e05ac5c944e086ab558ad53ca929c29b1770a818
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2022-01-18T23:39:24.000Z
2022-01-18T23:39:24.000Z
# Copyright 2013-2020 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 Gaudi(CMakePackage): """An experiment-independent HEP event data processing framework""" ...
47.270492
112
0.664123
from spack import * class Gaudi(CMakePackage): homepage = "http://gaudi.web.cern.ch/gaudi/" git = "https://gitlab.cern.ch/gaudi/Gaudi.git" url = "https://gitlab.cern.ch/gaudi/Gaudi/-/archive/v33r1/Gaudi-v33r1.tar.gz" tags = ['hep'] version('master', branch='master') version('35.0...
true
true
f71350f6e1b01861e48e8d0a7760645851403be3
5,011
py
Python
sdk/python/pulumi_azure_native/devices/v20180401/get_iot_hub_resource.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/devices/v20180401/get_iot_hub_resource.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/devices/v20180401/get_iot_hub_resource.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...
31.71519
150
0.616643
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetIotHubResourceResult', 'AwaitableGetIotHubResourceResult', 'get_iot_hub_resource', ] @pulumi.output_type class GetIotHub...
true
true
f71351dfbfd73962c7c6bbd5906cd4525277e11c
5,742
py
Python
tests/python/pants_test/backend/jvm/subsystems/test_incomplete_custom_scala.py
mabdi3/pants
570fab8d3896619b3005c542ee7e61afbd412e67
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/jvm/subsystems/test_incomplete_custom_scala.py
mabdi3/pants
570fab8d3896619b3005c542ee7e61afbd412e67
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/jvm/subsystems/test_incomplete_custom_scala.py
mabdi3/pants
570fab8d3896619b3005c542ee7e61afbd412e67
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import contextlib import os import re import shutil from textwrap import dedent from pants.base.build_environment import get_buildroot from pants.util.contextutil import temporary_dir fro...
39.061224
97
0.71247
import contextlib import os import re import shutil from textwrap import dedent from pants.base.build_environment import get_buildroot from pants.util.contextutil import temporary_dir from pants.util.dirutil import safe_file_dump from pants_test.pants_run_integration_test import PantsRunIntegrationTest class Incomp...
true
true
f713528e2659d882c9f7d1012f8f9860c32dd567
1,779
py
Python
gui/kivy/uix/dialogs/wallets.py
glemercier/electrum-smart
884bb3eecbba593144b0c77192f2eb7211f97e38
[ "MIT" ]
10
2018-01-05T16:05:21.000Z
2020-09-16T15:19:29.000Z
gui/kivy/uix/dialogs/wallets.py
glemercier/electrum-smart
884bb3eecbba593144b0c77192f2eb7211f97e38
[ "MIT" ]
37
2018-06-05T17:01:53.000Z
2022-02-11T10:15:00.000Z
gui/kivy/uix/dialogs/wallets.py
glemercier/electrum-smart
884bb3eecbba593144b0c77192f2eb7211f97e38
[ "MIT" ]
9
2018-05-24T05:47:02.000Z
2021-09-13T11:17:08.000Z
import os from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from electrum_smart.util import base_units from ...i18n import _ from .label_dialog import LabelDialog Builder.load_string(''' #:import os os <WalletDialog@Popup>: title: ...
26.954545
70
0.54244
import os from kivy.app import App from kivy.factory import Factory from kivy.properties import ObjectProperty from kivy.lang import Builder from electrum_smart.util import base_units from ...i18n import _ from .label_dialog import LabelDialog Builder.load_string(''' #:import os os <WalletDialog@Popup>: title: ...
true
true
f71352bbf70fad07865a371ecbfd9b946541bb40
1,063
py
Python
e/mail-relay/web/apps/mail/migrations/0043_auto_20160308_0950.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
null
null
null
e/mail-relay/web/apps/mail/migrations/0043_auto_20160308_0950.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
18
2020-06-05T18:17:40.000Z
2022-03-11T23:25:21.000Z
e/mail-relay/web/apps/mail/migrations/0043_auto_20160308_0950.py
zhouli121018/nodejsgm
0ccbc8acf61badc812f684dd39253d55c99f08eb
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mail', '0042_noticesettings_review_count'), ] operations = [ migrations.AddField( model_name='noticesettings', ...
42.52
298
0.693321
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mail', '0042_noticesettings_review_count'), ] operations = [ migrations.AddField( model_name='noticesettings', name='bulk_co...
true
true
f71355b04b5c28104e33e6efddccf612a934813e
1,028
py
Python
health_inspector/macos/src/py/scythe/health_inspector/health_inspector.py
scythe-io/community-modules
bc0d16e30a928f3ba11aecfa6cbac760b1de529b
[ "MIT" ]
2
2022-03-14T18:48:04.000Z
2022-03-25T14:37:23.000Z
health_inspector/macos/src/py/scythe/health_inspector/health_inspector.py
scythe-io/community-modules
bc0d16e30a928f3ba11aecfa6cbac760b1de529b
[ "MIT" ]
null
null
null
health_inspector/macos/src/py/scythe/health_inspector/health_inspector.py
scythe-io/community-modules
bc0d16e30a928f3ba11aecfa6cbac760b1de529b
[ "MIT" ]
null
null
null
import uuid import json import health_inspector g_client = None CATEGORY_WORKER = 4 HEALTH_INSPECTOR_MODULE_ID = uuid.UUID('4e5f74d0-4705-11ec-abd0-e12370ec4fc6') def init(client, **kwargs): """ :param client: :param kwargs: :return: """ global g_client g_client = client return True ...
18.035088
110
0.61284
import uuid import json import health_inspector g_client = None CATEGORY_WORKER = 4 HEALTH_INSPECTOR_MODULE_ID = uuid.UUID('4e5f74d0-4705-11ec-abd0-e12370ec4fc6') def init(client, **kwargs): global g_client g_client = client return True def run(message, **kwargs): result = health_inspector.ma...
true
true
f71355c2d85b2482f37e57666e3393f24769539c
797
py
Python
examples/external_models/turicreate/run_turicreate.py
rpalovics/Alpenglow
63472ce667d517d6c7f47c9d0559861392fca3f9
[ "Apache-2.0" ]
28
2017-07-23T22:47:44.000Z
2022-03-12T15:11:13.000Z
examples/external_models/turicreate/run_turicreate.py
proto-n/Alpenglow
7a15d5c57b511787379f095e7310e67423159fa0
[ "Apache-2.0" ]
4
2017-05-10T10:23:17.000Z
2019-05-23T14:07:09.000Z
examples/external_models/turicreate/run_turicreate.py
proto-n/Alpenglow
7a15d5c57b511787379f095e7310e67423159fa0
[ "Apache-2.0" ]
9
2017-05-04T09:20:58.000Z
2021-12-14T08:19:01.000Z
import os os.environ["OMP_NUM_THREADS"] = "10" import sys import pandas as pd import numpy as np import turicreate as tc for i in range(1, 14): print("running batch %d" % i) batch = pd.read_csv("batches/batch_%d_train.dat" % i) test_users = pd.read_csv("batches/batch_%d_test.dat" % i) model = tc.rank...
31.88
135
0.662484
import os os.environ["OMP_NUM_THREADS"] = "10" import sys import pandas as pd import numpy as np import turicreate as tc for i in range(1, 14): print("running batch %d" % i) batch = pd.read_csv("batches/batch_%d_train.dat" % i) test_users = pd.read_csv("batches/batch_%d_test.dat" % i) model = tc.rank...
true
true
f713561f8e6a8562a86cae18787ca2251e28f50f
136
py
Python
apps/users/apps.py
Palameng/test_mxOnline
1be8f9caff5166dfdc49c1facd95af4445d30f9c
[ "Apache-2.0" ]
1
2017-08-07T07:28:23.000Z
2017-08-07T07:28:23.000Z
apps/users/apps.py
Palameng/test_mxOnline
1be8f9caff5166dfdc49c1facd95af4445d30f9c
[ "Apache-2.0" ]
null
null
null
apps/users/apps.py
Palameng/test_mxOnline
1be8f9caff5166dfdc49c1facd95af4445d30f9c
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' verbose_name = u'用户信息'
17
33
0.661765
from django.apps import AppConfig class UsersConfig(AppConfig): name = 'users' verbose_name = u'用户信息'
true
true
f713563e00ab0378ef3e2503b97049c066968364
10,516
py
Python
python/ray/ray_constants.py
patrickstuedi/ray
e7ede45e37a1b5be1dc7001fc53ca0f9cd8f8e44
[ "Apache-2.0" ]
39
2021-02-02T23:09:31.000Z
2022-03-28T16:39:12.000Z
python/ray/ray_constants.py
patrickstuedi/ray
e7ede45e37a1b5be1dc7001fc53ca0f9cd8f8e44
[ "Apache-2.0" ]
65
2021-02-04T08:23:41.000Z
2022-03-16T19:16:20.000Z
python/ray/ray_constants.py
spear-ai/ray-neural-mmo
8bccacc4c5f502287e8b48ca0d5f12305113cfee
[ "Apache-2.0" ]
20
2021-02-05T05:51:39.000Z
2022-03-04T21:13:24.000Z
"""Ray constants used in the Python code.""" import logging import math import os logger = logging.getLogger(__name__) def env_integer(key, default): if key in os.environ: value = os.environ[key] if value.isdigit(): return int(os.environ[key]) logger.debug(f"Found {key} in e...
39.683019
79
0.783378
import logging import math import os logger = logging.getLogger(__name__) def env_integer(key, default): if key in os.environ: value = os.environ[key] if value.isdigit(): return int(os.environ[key]) logger.debug(f"Found {key} in environment, but value must " ...
true
true
f7135799a306e7fde98092ec7d55b005d2bcb9ef
1,566
py
Python
xapp-image-base/swagger/test/test_temperature_stream.py
martinsallandm/hw-xapp-python-lenovo
2123289d3a5ea7122607dea8e8f0d03a348d131b
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
xapp-image-base/swagger/test/test_temperature_stream.py
martinsallandm/hw-xapp-python-lenovo
2123289d3a5ea7122607dea8e8f0d03a348d131b
[ "Apache-2.0", "CC-BY-4.0" ]
1
2021-09-09T14:04:55.000Z
2021-09-10T17:58:37.000Z
custom-swagger/python/test/test_temperature_stream.py
Zepp333333/HARDIO
9a36e8fd9c9478f98dbe929e5a31e4e87fdc1932
[ "MIT" ]
null
null
null
# coding: utf-8 """ Strava API v3 The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with differe...
38.195122
726
0.749681
from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.temperature_stream import TemperatureStream from swagger_client.rest import ApiException class TestTemperatureStream(unittest.TestCase): def setUp(self): pass def tearDown(self): pas...
true
true
f7135806589d0c1076d6e28256a88b5306cc2b5d
31,697
py
Python
metasmoke.py
mehrdad-shokri/SmokeDetector
683d4b3f2d5a4c80fd2831bc64f2fe37836eb879
[ "Apache-2.0", "MIT" ]
null
null
null
metasmoke.py
mehrdad-shokri/SmokeDetector
683d4b3f2d5a4c80fd2831bc64f2fe37836eb879
[ "Apache-2.0", "MIT" ]
null
null
null
metasmoke.py
mehrdad-shokri/SmokeDetector
683d4b3f2d5a4c80fd2831bc64f2fe37836eb879
[ "Apache-2.0", "MIT" ]
null
null
null
# coding=utf-8 import json import requests import importlib # for .reload() from globalvars import GlobalVars import threading # noinspection PyPackageRequirements import websocket try: from collections.abc import Iterable except ImportError: from collections import Iterable from datetime import datetime, time...
46.004354
120
0.571884
import json import requests import importlib from globalvars import GlobalVars import threading import websocket try: from collections.abc import Iterable except ImportError: from collections import Iterable from datetime import datetime, timedelta from glob import glob from regex import sub import sys import ...
true
true
f713581c9c1bd2636d6a37b696cabacf9b938f7f
1,557
py
Python
gbdxtools/images/dem_image.py
mail4y/gbdxtools
62111e1db65a35e39c8bbda040cd63272aac714f
[ "MIT" ]
null
null
null
gbdxtools/images/dem_image.py
mail4y/gbdxtools
62111e1db65a35e39c8bbda040cd63272aac714f
[ "MIT" ]
null
null
null
gbdxtools/images/dem_image.py
mail4y/gbdxtools
62111e1db65a35e39c8bbda040cd63272aac714f
[ "MIT" ]
null
null
null
from gbdxtools.images.base import RDABaseImage from gbdxtools.images.drivers import RDADaskImageDriver from gbdxtools.rda.util import reproject_params from gbdxtools.rda.interface import RDA rda = RDA() from shapely.geometry import box class DemDriver(RDADaskImageDriver): image_option_support = ["proj", "bbox"] ...
37.071429
167
0.674374
from gbdxtools.images.base import RDABaseImage from gbdxtools.images.drivers import RDADaskImageDriver from gbdxtools.rda.util import reproject_params from gbdxtools.rda.interface import RDA rda = RDA() from shapely.geometry import box class DemDriver(RDADaskImageDriver): image_option_support = ["proj", "bbox"] ...
true
true
f7135845eae99a991a5c9495ba7a1ee36382feef
3,219
py
Python
accelbyte_py_sdk/api/lobby/models/model_create_topic_request.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/lobby/models/model_create_topic_request.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
accelbyte_py_sdk/api/lobby/models/model_create_topic_request.py
encyphered/accelbyte-python-sdk
09c1e989d7251de308150fdcd3119d662ca2d205
[ "MIT" ]
null
null
null
# Auto-generated at 2021-09-27T17:12:33.419763+08:00 # from: Justice Lobby Service (1.33.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # pylin...
29.805556
109
0.617272
from __future__ import annotations from typing import Any, Dict, List, Optional, Tuple, Union from ....core import Model class ModelCreateTopicRequest(Model): description: str topic: str ...
true
true
f71358df074d5103676d37572a4ddb4db93aa59a
2,659
py
Python
compare.py
smarsu/facenet
a0fa3ffe32e295b4cc980a4a178593cc7f1bad12
[ "MIT" ]
null
null
null
compare.py
smarsu/facenet
a0fa3ffe32e295b4cc980a4a178593cc7f1bad12
[ "MIT" ]
null
null
null
compare.py
smarsu/facenet
a0fa3ffe32e295b4cc980a4a178593cc7f1bad12
[ "MIT" ]
null
null
null
# -------------------------------------------------------- # SMNet FaceNet # Licensed under The MIT License [see LICENSE for details] # Copyright 2019 smarsu. All Rights Reserved. # -------------------------------------------------------- import os.path as osp import numpy as np from sklearn import metrics import matp...
25.084906
76
0.563746
import os.path as osp import numpy as np from sklearn import metrics import matplotlib.pyplot as plt from euclidean import euclidean_distance EPS = 1e-12 def load_feature_map_from_txt(path_txt): with open(path_txt, 'r') as fb: lines = fb.readlines() feature_map = {} for line in lines: ...
true
true
f7135937417269430f1b42738050726405fe330a
21,924
py
Python
python35/Lib/site-packages/sklearn/linear_model/base.py
Ombarus/python_env
4615976a51aa4f02206f5e03fc091b088d3273fc
[ "Apache-2.0" ]
null
null
null
python35/Lib/site-packages/sklearn/linear_model/base.py
Ombarus/python_env
4615976a51aa4f02206f5e03fc091b088d3273fc
[ "Apache-2.0" ]
null
null
null
python35/Lib/site-packages/sklearn/linear_model/base.py
Ombarus/python_env
4615976a51aa4f02206f5e03fc091b088d3273fc
[ "Apache-2.0" ]
1
2020-08-08T12:44:48.000Z
2020-08-08T12:44:48.000Z
""" Generalized Linear models. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Vincent Michel <vincent.michel@inria.fr> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Mathieu Blond...
36.601002
80
0.616721
from __future__ import division from abc import ABCMeta, abstractmethod import numbers import warnings import numpy as np import scipy.sparse as sp from scipy import linalg from scipy import sparse from ..externals import six from ..externals.joblib import Parallel, delayed from ..base import BaseEstimator, Classif...
true
true
f71359ee2b05ef67367758b809320b3f7167d7e2
2,776
py
Python
Data_Loader.py
StephenLouis/ISIC_2019
340ece42915c770e68bc13da64698a7a8987420e
[ "Apache-2.0" ]
2
2020-04-24T06:11:39.000Z
2020-04-24T06:13:38.000Z
Data_Loader.py
StephenLouis/ISIC_2019
340ece42915c770e68bc13da64698a7a8987420e
[ "Apache-2.0" ]
null
null
null
Data_Loader.py
StephenLouis/ISIC_2019
340ece42915c770e68bc13da64698a7a8987420e
[ "Apache-2.0" ]
null
null
null
import os import torch import csv import numpy as np from torch.utils.data import Dataset from PIL import Image def split_csv(file): data = [] a_train_file = r'/home/huangyinyue/ISIC_2019/train.csv' a_test_file = r'/home/huangyinyue/ISIC_2019/test.csv' seed = 3 np.random.seed(seed) train_indic...
33.445783
107
0.622118
import os import torch import csv import numpy as np from torch.utils.data import Dataset from PIL import Image def split_csv(file): data = [] a_train_file = r'/home/huangyinyue/ISIC_2019/train.csv' a_test_file = r'/home/huangyinyue/ISIC_2019/test.csv' seed = 3 np.random.seed(seed) train_indic...
true
true
f7135bd8e64dff9c17d511834a28f2d313ce5dfc
52
py
Python
ox_mon/misc/__init__.py
emin63/ox_mon
965a36c430950c47d3cce79486c1ab2cc5ee89a4
[ "MIT" ]
null
null
null
ox_mon/misc/__init__.py
emin63/ox_mon
965a36c430950c47d3cce79486c1ab2cc5ee89a4
[ "MIT" ]
null
null
null
ox_mon/misc/__init__.py
emin63/ox_mon
965a36c430950c47d3cce79486c1ab2cc5ee89a4
[ "MIT" ]
null
null
null
"""Package for useful ox_mon commands and tasks """
17.333333
47
0.730769
true
true
f7135c08808687352a851c163a3b0dd12fad5af9
608
py
Python
Python-Basics/12. While Exercise/05.Vending machine.py
Xamaneone/SoftUni-Intro
985fe3249cd2adf021c2003372e840219811d989
[ "MIT" ]
null
null
null
Python-Basics/12. While Exercise/05.Vending machine.py
Xamaneone/SoftUni-Intro
985fe3249cd2adf021c2003372e840219811d989
[ "MIT" ]
null
null
null
Python-Basics/12. While Exercise/05.Vending machine.py
Xamaneone/SoftUni-Intro
985fe3249cd2adf021c2003372e840219811d989
[ "MIT" ]
null
null
null
coins = 0 price = round(float(input()), 2) while price != 0: if price >= 2: price -= 2 coins += 1 elif price >= 1: price -= 1 coins += 1 elif price >= 0.50: price -= 0.50 coins += 1 elif price >= 0.20: price -= 0.20 coins += 1 elif pric...
20.965517
32
0.430921
coins = 0 price = round(float(input()), 2) while price != 0: if price >= 2: price -= 2 coins += 1 elif price >= 1: price -= 1 coins += 1 elif price >= 0.50: price -= 0.50 coins += 1 elif price >= 0.20: price -= 0.20 coins += 1 elif pric...
true
true
f7135c1083d5fe7e7d0e6035ed7772e899993282
2,640
py
Python
data preprocessing/MTCNN2.py
daniyaljamal/Personality-prediction-based-on-video-using-CNN
0f1052d09fe14c73e38ac529ad35e4e98a8d859e
[ "MIT" ]
null
null
null
data preprocessing/MTCNN2.py
daniyaljamal/Personality-prediction-based-on-video-using-CNN
0f1052d09fe14c73e38ac529ad35e4e98a8d859e
[ "MIT" ]
null
null
null
data preprocessing/MTCNN2.py
daniyaljamal/Personality-prediction-based-on-video-using-CNN
0f1052d09fe14c73e38ac529ad35e4e98a8d859e
[ "MIT" ]
null
null
null
# extract and plot each detected face in a photograph from facenet_pytorch import MTCNN from cv2 import cv2 from PIL import Image import numpy as np from matplotlib import pyplot as plt from tqdm.notebook import tqdm import os import tensorflow as tf from torchvision import models import torch from torchvision import t...
36.666667
152
0.685227
from facenet_pytorch import MTCNN from cv2 import cv2 from PIL import Image import numpy as np from matplotlib import pyplot as plt from tqdm.notebook import tqdm import os import tensorflow as tf from torchvision import models import torch from torchvision import transforms from pathlib import Path def getface_from_v...
true
true
f7135c821e3e46703d7054e31dfbf06db7506a95
1,281
py
Python
spire/runtime/daemon.py
siq/spire
6365590277e9a6bfb6e4e0df5b2b47dba0f71711
[ "Linux-OpenIB" ]
null
null
null
spire/runtime/daemon.py
siq/spire
6365590277e9a6bfb6e4e0df5b2b47dba0f71711
[ "Linux-OpenIB" ]
1
2016-09-15T16:19:27.000Z
2016-09-15T16:20:06.000Z
spire/runtime/daemon.py
siq/spire
6365590277e9a6bfb6e4e0df5b2b47dba0f71711
[ "Linux-OpenIB" ]
null
null
null
from scheme import * from scheme.supplemental import ObjectReference from spire.runtime.runtime import Runtime from spire.support.daemon import * SCHEMA = Structure({ 'detached': Boolean(default=True), 'gid': Text(nonnull=True), 'pidfile': Text(nonnull=True), 'uid': Text(nonnull=True), }) class Runti...
29.790698
71
0.638564
from scheme import * from scheme.supplemental import ObjectReference from spire.runtime.runtime import Runtime from spire.support.daemon import * SCHEMA = Structure({ 'detached': Boolean(default=True), 'gid': Text(nonnull=True), 'pidfile': Text(nonnull=True), 'uid': Text(nonnull=True), }) class Runti...
true
true
f7135ec9ab5137fd6e0ce8310a95924f23443122
1,146
py
Python
wavelet_compress.py
Igor-ID/Image-Compression
e54881b62f258260baa7036cdd3b264b0d8adf05
[ "MIT" ]
null
null
null
wavelet_compress.py
Igor-ID/Image-Compression
e54881b62f258260baa7036cdd3b264b0d8adf05
[ "MIT" ]
null
null
null
wavelet_compress.py
Igor-ID/Image-Compression
e54881b62f258260baa7036cdd3b264b0d8adf05
[ "MIT" ]
null
null
null
import pywt import matplotlib.pyplot as plt from matplotlib.image import imread import numpy as np """Image compression using discrete Wavelet transform.""" plt.rcParams['figure.figsize'] = [8, 8] plt.rcParams.update({'font.size': 18}) im = imread('data/dog.jpg') im_gray = np.mean(im, -1) # convert RGB to gray scal...
30.157895
102
0.702443
import pywt import matplotlib.pyplot as plt from matplotlib.image import imread import numpy as np plt.rcParams['figure.figsize'] = [8, 8] plt.rcParams.update({'font.size': 18}) im = imread('data/dog.jpg') im_gray = np.mean(im, -1) n = 4 w = 'db1' coeffs = pywt.wavedec2(im_gray, wavelet=w, level=n) coeff_arr, coef...
true
true
f7135fe25e44d7942b0a84914465cbd8f57575a7
786
py
Python
keepr/tests/test_cli.py
Geek-ubaid/ShopKeepr
09c7e9b0a232e3c0e52869a76e48ce2f153bb6d5
[ "MIT" ]
10
2019-10-25T18:48:13.000Z
2019-12-24T12:41:54.000Z
keepr/tests/test_cli.py
Geek-ubaid/ShopKeepr
09c7e9b0a232e3c0e52869a76e48ce2f153bb6d5
[ "MIT" ]
12
2019-10-25T17:26:56.000Z
2020-05-28T17:17:07.000Z
keepr/tests/test_cli.py
Geek-ubaid/ShopKeepr
09c7e9b0a232e3c0e52869a76e48ce2f153bb6d5
[ "MIT" ]
1
2020-05-19T23:19:50.000Z
2020-05-19T23:19:50.000Z
from keepr.__main__ import run_application from click.testing import CliRunner import sys sys.path.append('..') def test_install_package(): runner = CliRunner() result = runner.invoke(run_application, ['install', 'click']) assert result.exit_code == 0 def test_install_package_req(): runner = CliRun...
24.5625
71
0.680662
from keepr.__main__ import run_application from click.testing import CliRunner import sys sys.path.append('..') def test_install_package(): runner = CliRunner() result = runner.invoke(run_application, ['install', 'click']) assert result.exit_code == 0 def test_install_package_req(): runner = CliRun...
true
true
f71361d02421cf51f190bfe7f9563b3fbcb8760a
335
py
Python
cci.py
oren0e/check-crypto-investments
19cb05d76452d5ce5439e8b2ef3655e50c27ec94
[ "MIT" ]
1
2021-03-28T13:21:02.000Z
2021-03-28T13:21:02.000Z
cci.py
oren0e/check-crypto-investments
19cb05d76452d5ce5439e8b2ef3655e50c27ec94
[ "MIT" ]
null
null
null
cci.py
oren0e/check-crypto-investments
19cb05d76452d5ce5439e8b2ef3655e50c27ec94
[ "MIT" ]
null
null
null
import click from backend.bots import CCIBot, CGroupBot @click.command() @click.argument("bot_name", nargs=1) def cci(bot_name): if bot_name == "cci_bot": CCIBot().run() elif bot_name == "cgroup_bot": CGroupBot().run() else: click.echo("No such bot yet...") if __name__ == '__main...
18.611111
42
0.614925
import click from backend.bots import CCIBot, CGroupBot @click.command() @click.argument("bot_name", nargs=1) def cci(bot_name): if bot_name == "cci_bot": CCIBot().run() elif bot_name == "cgroup_bot": CGroupBot().run() else: click.echo("No such bot yet...") if __name__ == '__main...
true
true
f71361fcf73b8b6a9b8d5f7a349d6cfe6f0d0144
1,139
py
Python
tests/__init__.py
GregShiner/aiobungie
c938f2570718d35525b57e68ef4fe81d7495e117
[ "MIT" ]
36
2021-07-09T19:26:18.000Z
2022-03-26T09:12:43.000Z
tests/__init__.py
GregShiner/aiobungie
c938f2570718d35525b57e68ef4fe81d7495e117
[ "MIT" ]
149
2021-07-13T21:46:21.000Z
2022-03-29T12:21:38.000Z
tests/__init__.py
GregShiner/aiobungie
c938f2570718d35525b57e68ef4fe81d7495e117
[ "MIT" ]
4
2021-07-21T05:33:11.000Z
2022-02-19T11:15:31.000Z
# MIT License # # Copyright (c) 2020 - Present nxtlo # # 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, mer...
47.458333
80
0.772608
true
true
f71362440659e8e224c53e9f126cbeed6adf1674
1,970
py
Python
examples/Python/Utility/file.py
martinruenz/Open3D
30983e89956dcd233531870ca20e87e6769ba903
[ "MIT" ]
3
2018-04-24T21:17:24.000Z
2018-06-02T12:44:06.000Z
examples/Python/Utility/file.py
martinruenz/Open3D
30983e89956dcd233531870ca20e87e6769ba903
[ "MIT" ]
null
null
null
examples/Python/Utility/file.py
martinruenz/Open3D
30983e89956dcd233531870ca20e87e6769ba903
[ "MIT" ]
1
2020-03-31T14:30:40.000Z
2020-03-31T14:30:40.000Z
# Open3D: www.open3d.org # The MIT License (MIT) # See license file or visit www.open3d.org for details # examples/Python/Utility/file.py from os import listdir, makedirs from os.path import exists, isfile, join, splitext import shutil import re def sorted_alphanum(file_list_ordered): convert = lambda text: int...
30.78125
78
0.694924
from os import listdir, makedirs from os.path import exists, isfile, join, splitext import shutil import re def sorted_alphanum(file_list_ordered): convert = lambda text: int(text) if text.isdigit() else text alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key)] return sorted(file_l...
true
true
f71362b0a4e90908b800515208bd4b73487ecd9e
1,823
py
Python
RiotGames/API/Match.py
Timohiho/RiotGames
f75256cca1b5c224393dca99296a6163b70b335f
[ "MIT" ]
2
2021-05-05T12:33:51.000Z
2021-12-15T13:08:44.000Z
RiotGames/API/Match.py
Timohiho/RiotGames
f75256cca1b5c224393dca99296a6163b70b335f
[ "MIT" ]
null
null
null
RiotGames/API/Match.py
Timohiho/RiotGames
f75256cca1b5c224393dca99296a6163b70b335f
[ "MIT" ]
null
null
null
# Copyright (c) 2021. # The copyright lies with Timo Hirsch-Hoffmann, the further use is only permitted with reference to source import urllib.request from RiotGames.API.RiotApi import RiotApi class Match(RiotApi): __timeline_by_match_id_url: str = "https://{}.api.riotgames.com/lol/match/v4/timelines/by-matc...
28.936508
114
0.580362
import urllib.request from RiotGames.API.RiotApi import RiotApi class Match(RiotApi): __timeline_by_match_id_url: str = "https://{}.api.riotgames.com/lol/match/v4/timelines/by-match/{}?api_key={}" def __init__(self, apikey: str): super().__init__(apikey) self.__super = super() def by_...
true
true
f71364a4d58f9ac4ab6679957580fe8d4a36271d
506
py
Python
modules/ai-codes/modules/knn/src/iris-v1.py
drigols/Studies
9c293156935b491ded24be6b511daac67fd43538
[ "MIT" ]
1
2020-09-06T22:17:19.000Z
2020-09-06T22:17:19.000Z
modules/ai-codes/modules/knn/src/iris-v1.py
drigols/Studies
9c293156935b491ded24be6b511daac67fd43538
[ "MIT" ]
null
null
null
modules/ai-codes/modules/knn/src/iris-v1.py
drigols/Studies
9c293156935b491ded24be6b511daac67fd43538
[ "MIT" ]
null
null
null
######################################################## # Rodrigo Leite - drigols # # Last update: 31/10/2021 # ######################################################## from sklearn.datasets import load_iris import pandas as pd iris = load_iris() x = pd.Data...
29.764706
58
0.478261
from sklearn.datasets import load_iris import pandas as pd iris = load_iris() x = pd.DataFrame(iris.data, columns=[iris.feature_names]) y = pd.Series(iris.target) print("Load Iris dataset dimensions: {0}".format(x.shape)) print("Load Iris dataset features:\n", x.head(10))
true
true
f71364d313a7e53a9208f401358f30cc8bff56e4
312
py
Python
abesit/urls.py
ravigoel08/tetrahedron18
06da927732a3c15e174acb1b4832f984dad6260e
[ "MIT" ]
null
null
null
abesit/urls.py
ravigoel08/tetrahedron18
06da927732a3c15e174acb1b4832f984dad6260e
[ "MIT" ]
4
2020-02-11T23:20:04.000Z
2021-06-10T23:44:02.000Z
abesit/urls.py
ravigoel08/tetrahedron18
06da927732a3c15e174acb1b4832f984dad6260e
[ "MIT" ]
1
2018-10-19T11:35:23.000Z
2018-10-19T11:35:23.000Z
from . import views from django.urls import path urlpatterns = [ path('',views.Home,name="Home"), path('index/',views.index,name="index"), path('registered/',views.registered,name="registered"), path('exportmeout/',views.export,name="export"), # path('',views.Registered,name="registered") ]
28.363636
59
0.676282
from . import views from django.urls import path urlpatterns = [ path('',views.Home,name="Home"), path('index/',views.index,name="index"), path('registered/',views.registered,name="registered"), path('exportmeout/',views.export,name="export"), ]
true
true
f71364fa0d5b808b314ebc8bbb334f13964857db
12,817
py
Python
flask/camera.py
tableClothed/face-filters
8b236643b4e22a925df6a1c299f3887fdedb3e8e
[ "MIT" ]
1
2021-09-08T07:11:36.000Z
2021-09-08T07:11:36.000Z
flask/camera.py
tableClothed/face-filters
8b236643b4e22a925df6a1c299f3887fdedb3e8e
[ "MIT" ]
null
null
null
flask/camera.py
tableClothed/face-filters
8b236643b4e22a925df6a1c299f3887fdedb3e8e
[ "MIT" ]
1
2020-07-24T01:18:37.000Z
2020-07-24T01:18:37.000Z
import cv2 import numpy as np import dlib from imutils import face_utils, translate class Camera(object): def __init__(self): self.camera = cv2.VideoCapture(0) p = "../data/shape_predictor_68_face_landmarks.dat" self.detector = dlib.get_frontal_face_detector() self.predictor = dlib.shape_predictor(p) self....
26.983158
102
0.640556
import cv2 import numpy as np import dlib from imutils import face_utils, translate class Camera(object): def __init__(self): self.camera = cv2.VideoCapture(0) p = "../data/shape_predictor_68_face_landmarks.dat" self.detector = dlib.get_frontal_face_detector() self.predictor = dlib.shape_predictor(p) self....
true
true
f7136501de57c4039a29d7b880a710979c3ee30a
3,125
py
Python
api_reface.py
andrewBatutin/emotional-ui-bot
efd429ac31ea707df0296648a82838568a938f46
[ "MIT" ]
null
null
null
api_reface.py
andrewBatutin/emotional-ui-bot
efd429ac31ea707df0296648a82838568a938f46
[ "MIT" ]
null
null
null
api_reface.py
andrewBatutin/emotional-ui-bot
efd429ac31ea707df0296648a82838568a938f46
[ "MIT" ]
null
null
null
import requests url = 'https://api.wildwildhack.ai/api/signedurl?extension=jpg' headers = {"Authorization": "Bearer 211acc3c360b4dccaffefbab0b14d0c4"} auth_token = '211acc3c360b4dccaffefbab0b14d0c4' json_headers = { 'authorization': f'Bearer {auth_token}', 'content-type': 'application/json', } signed_url_firs...
38.580247
580
0.7568
import requests url = 'https://api.wildwildhack.ai/api/signedurl?extension=jpg' headers = {"Authorization": "Bearer 211acc3c360b4dccaffefbab0b14d0c4"} auth_token = '211acc3c360b4dccaffefbab0b14d0c4' json_headers = { 'authorization': f'Bearer {auth_token}', 'content-type': 'application/json', } signed_url_firs...
true
true
f713651c03224ed89fcb1b8c38fddd4caabb17ed
507
py
Python
solutions/solution121.py
Satily/leetcode_python_solution
3f05fff7758d650469862bc28df9e4aa7b1d3203
[ "MIT" ]
3
2018-11-22T10:31:09.000Z
2019-05-05T15:53:48.000Z
solutions/solution121.py
Satily/leetcode_python_solution
3f05fff7758d650469862bc28df9e4aa7b1d3203
[ "MIT" ]
null
null
null
solutions/solution121.py
Satily/leetcode_python_solution
3f05fff7758d650469862bc28df9e4aa7b1d3203
[ "MIT" ]
null
null
null
class Solution: def maxProfit(self, prices): """ :type prices: List[int] :rtype: int """ if len(prices) == 0: return 0 min_price = prices[0] result = 0 for price in prices[1:]: result = max(price - min_price, result) ...
25.35
51
0.510848
class Solution: def maxProfit(self, prices): if len(prices) == 0: return 0 min_price = prices[0] result = 0 for price in prices[1:]: result = max(price - min_price, result) min_price = min(price, min_price) return result if __name__ == "_...
true
true
f713659e60c2fed0cbbd86a1377c4de7d0d73233
9,413
py
Python
src/pyquickhelper/sphinxext/revealjs/directives.py
janjagusch/pyquickhelper
d42e1579ea20f5add9a9cd2b6d2d0a3533aee40b
[ "MIT" ]
18
2015-11-10T08:09:23.000Z
2022-02-16T11:46:45.000Z
src/pyquickhelper/sphinxext/revealjs/directives.py
janjagusch/pyquickhelper
d42e1579ea20f5add9a9cd2b6d2d0a3533aee40b
[ "MIT" ]
321
2015-06-14T21:34:28.000Z
2021-11-28T17:10:03.000Z
src/pyquickhelper/sphinxext/revealjs/directives.py
janjagusch/pyquickhelper
d42e1579ea20f5add9a9cd2b6d2d0a3533aee40b
[ "MIT" ]
10
2015-06-20T01:35:00.000Z
2022-01-19T15:54:32.000Z
# -*- coding: utf-8 -*- """ sphinxjp.themes.revealjs.directives ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :author: tell-k <ffk2005@gmail.com> :copyright: tell-k. All Rights Reserved. """ from docutils import nodes from docutils.parsers.rst import directives from docutils.parsers.rst.roles import se...
29.052469
76
0.605014
from docutils import nodes from docutils.parsers.rst import directives from docutils.parsers.rst.roles import set_classes from docutils.parsers.rst import Directive from . import compat __docformat__ = 'reStructuredText' class revealjs(nodes.General, nodes.Element): class rv_code(nodes.General, nodes.Element): c...
true
true
f713678e890e9c07893c1fa2762e7b73dc4d8fbd
1,323
py
Python
src/rollit/runtime/base.py
russells-crockpot/roll-with-it
09b386553a151e19194f48b9384f97953a90953a
[ "MIT" ]
2
2020-08-28T13:27:37.000Z
2020-09-28T03:36:44.000Z
src/rollit/runtime/base.py
russells-crockpot/rollit
09b386553a151e19194f48b9384f97953a90953a
[ "MIT" ]
null
null
null
src/rollit/runtime/base.py
russells-crockpot/rollit
09b386553a151e19194f48b9384f97953a90953a
[ "MIT" ]
null
null
null
""" """ import contextvars from ..langref import ATOM_TYPES __all__ = ['is_atom', 'context'] _CURRENT_CONTEXT = contextvars.ContextVar('current-runtime-context', default=None) def is_atom(value): """ """ return isinstance(value, ATOM_TYPES) class _CurrentContextProxy: __slots__ = () __getattr...
32.268293
82
0.708239
import contextvars from ..langref import ATOM_TYPES __all__ = ['is_atom', 'context'] _CURRENT_CONTEXT = contextvars.ContextVar('current-runtime-context', default=None) def is_atom(value): return isinstance(value, ATOM_TYPES) class _CurrentContextProxy: __slots__ = () __getattr__ = lambda s, n: getatt...
true
true
f713684d37c44543e335be7022c376236a889bc2
23,150
py
Python
mindhome_alpha/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:55:29.000Z
2021-04-29T14:55:29.000Z
mindhome_alpha/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
null
null
null
mindhome_alpha/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_mws_api.py
Mindhome/field_service
3aea428815147903eb9af1d0c1b4b9fc7faed057
[ "MIT" ]
1
2021-04-29T14:39:01.000Z
2021-04-29T14:39:01.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Basic interface to Amazon MWS # Based on http://code.google.com/p/amazon-mws-python # Extended to include finances object from __future__ import unicode_literals import urllib import hashlib import hmac import base64 import six from erpnext.erpnext_integrations.doctype...
35.451761
123
0.742073
from __future__ import unicode_literals import urllib import hashlib import hmac import base64 import six from erpnext.erpnext_integrations.doctype.amazon_mws_settings import xml_utils import re try: from xml.etree.ElementTree import ParseError as XMLError except ImportError: from xml.parsers.expat import ExpatError...
true
true
f713697ec665439fe91bca9ca26c5120fda30287
13,019
py
Python
dali/test/python/test_operator_gaussian_blur.py
RudyVenguswamy/DALI
1456689cbb06a6d6f2c46c3fd231d1c296808e00
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
dali/test/python/test_operator_gaussian_blur.py
RudyVenguswamy/DALI
1456689cbb06a6d6f2c46c3fd231d1c296808e00
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
dali/test/python/test_operator_gaussian_blur.py
RudyVenguswamy/DALI
1456689cbb06a6d6f2c46c3fd231d1c296808e00
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. 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 applic...
42.132686
135
0.637837
from nvidia.dali.pipeline import Pipeline import nvidia.dali.types as types import nvidia.dali.fn as fn import numpy as np import cv2 from scipy.ndimage import convolve1d import os from nose.tools import raises from nose.plugins.attrib import attr from test_utils import get_dali_extra_path, check_batch, compare_pipe...
true
true
f71369f35fdbde0279d19ddb91e01971bbafc6cb
73,791
py
Python
python/pyarrow/tests/test_convert_pandas.py
stephenpascoe/arrow
3efd08f0cbaa40d0d3a329b8613fb80ac022b985
[ "Apache-2.0" ]
null
null
null
python/pyarrow/tests/test_convert_pandas.py
stephenpascoe/arrow
3efd08f0cbaa40d0d3a329b8613fb80ac022b985
[ "Apache-2.0" ]
null
null
null
python/pyarrow/tests/test_convert_pandas.py
stephenpascoe/arrow
3efd08f0cbaa40d0d3a329b8613fb80ac022b985
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # 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 # "...
35.459395
79
0.562467
import decimal import json from collections import OrderedDict from datetime import date, datetime, time, timedelta import numpy as np import numpy.testing as npt import pandas as pd import pandas.util.testing as tm import pytest import pyarrow as pa import pyarrow.types as patypes from pyarrow.compat import PY2 fro...
true
true
f7136a2f149441e3ee72a2d51d0cc65681f3bad7
119
py
Python
tests/integration/ui_write/__init__.py
VBaratham/pynwb
a9429c93f29763b9ebe9022b099afcffbc6be493
[ "BSD-3-Clause-LBNL" ]
1
2021-04-13T20:47:36.000Z
2021-04-13T20:47:36.000Z
tests/integration/ui_write/__init__.py
VBaratham/pynwb
a9429c93f29763b9ebe9022b099afcffbc6be493
[ "BSD-3-Clause-LBNL" ]
1
2021-06-01T22:25:36.000Z
2021-06-01T22:25:36.000Z
tests/integration/ui_write/__init__.py
VBaratham/pynwb
a9429c93f29763b9ebe9022b099afcffbc6be493
[ "BSD-3-Clause-LBNL" ]
null
null
null
# flake8: noqa: F401 from . import base from . import test_base from . import test_ecephys from . import test_nwbfile
17
26
0.764706
from . import base from . import test_base from . import test_ecephys from . import test_nwbfile
true
true
f7136a2f16131f008e9144f7ec2886f64d0e53f6
5,882
py
Python
Model/EngHindiDataPreprocess/eng_hin_vocab_creator.py
porcelainruler/Language-Translation
31b5a0489aa243cf4608d7bcf795f136ab97021b
[ "Apache-2.0" ]
null
null
null
Model/EngHindiDataPreprocess/eng_hin_vocab_creator.py
porcelainruler/Language-Translation
31b5a0489aa243cf4608d7bcf795f136ab97021b
[ "Apache-2.0" ]
null
null
null
Model/EngHindiDataPreprocess/eng_hin_vocab_creator.py
porcelainruler/Language-Translation
31b5a0489aa243cf4608d7bcf795f136ab97021b
[ "Apache-2.0" ]
1
2021-02-09T08:04:51.000Z
2021-02-09T08:04:51.000Z
import codecs import math from Model.EngHindiDataPreprocess import config, EnglishTokenizer as ENG_Tok, HindiTokenizer as HIN_TOK, \ IndicTokenizer as IND_TOK from nltk import word_tokenize from Model.EngHindiDataPreprocess import config def load_data_sp(path): with codecs.open(path, encoding='utf-8') as f: ...
29.118812
111
0.690581
import codecs import math from Model.EngHindiDataPreprocess import config, EnglishTokenizer as ENG_Tok, HindiTokenizer as HIN_TOK, \ IndicTokenizer as IND_TOK from nltk import word_tokenize from Model.EngHindiDataPreprocess import config def load_data_sp(path): with codecs.open(path, encoding='utf-8') as f: ...
true
true
f7136b3e36d166ad59bd5c55e8375b6b714e178f
3,050
py
Python
src/transformers/tokenization_distilbert.py
suliuzh/transformers
f34372a9ff99f6bc8619ac83dc07f7afe6b92141
[ "Apache-2.0" ]
12
2021-06-05T03:51:23.000Z
2022-03-05T05:09:41.000Z
src/transformers/tokenization_distilbert.py
suliuzh/transformers
f34372a9ff99f6bc8619ac83dc07f7afe6b92141
[ "Apache-2.0" ]
1
2021-10-20T02:25:36.000Z
2021-10-20T02:25:36.000Z
src/transformers/tokenization_distilbert.py
suliuzh/transformers
f34372a9ff99f6bc8619ac83dc07f7afe6b92141
[ "Apache-2.0" ]
2
2021-05-25T19:59:13.000Z
2022-02-28T18:11:12.000Z
# coding=utf-8 # Copyright 2018 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
42.361111
139
0.74918
from .tokenization_bert import BertTokenizer from .utils import logging logger = logging.get_logger(__name__) VOCAB_FILES_NAMES = {"vocab_file": "vocab.txt"} PRETRAINED_VOCAB_FILES_MAP = { "vocab_file": { "distilbert-base-uncased": "https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-...
true
true
f7136c1fb25ded35764b40b0c6d8e28b5747f6c4
436
py
Python
source/RPCConstants.py
oleguldberg/nvda
05f55ff146ef8ba481a2de4f1bcf187200474cea
[ "bzip2-1.0.6" ]
2
2022-03-26T13:52:41.000Z
2022-03-26T14:28:46.000Z
source/RPCConstants.py
oleguldberg/nvda
05f55ff146ef8ba481a2de4f1bcf187200474cea
[ "bzip2-1.0.6" ]
1
2022-02-17T20:51:08.000Z
2022-02-17T20:51:08.000Z
source/RPCConstants.py
oleguldberg/nvda
05f55ff146ef8ba481a2de4f1bcf187200474cea
[ "bzip2-1.0.6" ]
1
2017-08-04T09:00:01.000Z
2017-08-04T09:00:01.000Z
# A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2009-2021 NV Access Limited # This file may be used under the terms of the GNU General Public License, version 2 or later. # For more details see: https://www.gnu.org/licenses/gpl-2.0.html import enum class RPC(enum.IntEnum): E_CALL_CANCELED = -2147418110 ...
29.066667
94
0.768349
import enum class RPC(enum.IntEnum): E_CALL_CANCELED = -2147418110 S_SERVER_UNAVAILABLE = 1722 S_CALL_FAILED_DNE = 1727 E_CALL_REJECTED = -2147418111 E_DISCONNECTED = -2147417848
true
true
f7136d35230742783dd27c357ea221db59c64d84
6,386
py
Python
src/lambda_timestream_backup.py
oimoralest/timestream_plugin
0e3a6dca50d7157faef4f28cce1c087fca30a08f
[ "MIT" ]
null
null
null
src/lambda_timestream_backup.py
oimoralest/timestream_plugin
0e3a6dca50d7157faef4f28cce1c087fca30a08f
[ "MIT" ]
null
null
null
src/lambda_timestream_backup.py
oimoralest/timestream_plugin
0e3a6dca50d7157faef4f28cce1c087fca30a08f
[ "MIT" ]
null
null
null
import boto3 from zipfile import ZipFile import json import csv from retention_times import memory_retention, magnetic_retention, table_name from math import ceil def read_s3(Session, event): """This method gets an object from an AWS S3 bucket (Backup previously made by the plugin AWS S3) and prepares the dat...
35.876404
82
0.572346
import boto3 from zipfile import ZipFile import json import csv from retention_times import memory_retention, magnetic_retention, table_name from math import ceil def read_s3(Session, event): print('Reading s3') s3 = Session.client('s3') s3_bucket_object = event.get('Records')[0].get('s3').get('ob...
true
true
f7136d71f63998085416b4234c539ab036fae904
92
py
Python
poets/__main__.py
EgorZhuk/poets
62d5dd789ede4116990495b4a326eb5ea2123ea6
[ "MIT" ]
null
null
null
poets/__main__.py
EgorZhuk/poets
62d5dd789ede4116990495b4a326eb5ea2123ea6
[ "MIT" ]
null
null
null
poets/__main__.py
EgorZhuk/poets
62d5dd789ede4116990495b4a326eb5ea2123ea6
[ "MIT" ]
null
null
null
import poets def main(): print(poets.poets()) if __name__ == '__main__': main()
9.2
26
0.597826
import poets def main(): print(poets.poets()) if __name__ == '__main__': main()
true
true
f7136d775fc20c3ff728133ec84f1a91b737ce08
2,382
py
Python
Core/Logic/routers/issues_routes.py
dikshita-mehta/Sahaay
368826cb0b9f7085f901895a29b1df0895f90f5b
[ "MIT" ]
4
2021-09-29T13:53:10.000Z
2021-11-08T09:35:22.000Z
Core/Logic/routers/issues_routes.py
dikshita-mehta/Sahaay
368826cb0b9f7085f901895a29b1df0895f90f5b
[ "MIT" ]
23
2021-08-23T04:39:20.000Z
2022-01-13T06:57:14.000Z
Core/Logic/routers/issues_routes.py
dikshita-mehta/Sahaay
368826cb0b9f7085f901895a29b1df0895f90f5b
[ "MIT" ]
6
2021-08-18T08:24:34.000Z
2021-11-23T05:40:41.000Z
from typing import List from starlette.status import HTTP_200_OK, HTTP_202_ACCEPTED, HTTP_404_NOT_FOUND from fastapi import Request, APIRouter, File from fastapi.datastructures import UploadFile from pydantic import BaseModel from .abstraction import create_linked_issue, create_new_issue class IssueTable(BaseMo...
28.357143
80
0.696474
from typing import List from starlette.status import HTTP_200_OK, HTTP_202_ACCEPTED, HTTP_404_NOT_FOUND from fastapi import Request, APIRouter, File from fastapi.datastructures import UploadFile from pydantic import BaseModel from .abstraction import create_linked_issue, create_new_issue class IssueTable(BaseMo...
true
true
f7136e27bba530f985381d41a682d8ddeab860f2
1,851
py
Python
package/spack-py-quantities/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-py-quantities/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-py-quantities/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
44.071429
86
0.672609
from spack import * class PyQuantities(PythonPackage): homepage = "http://python-quantities.readthedocs.org" url = "https://pypi.io/packages/source/q/quantities/quantities-0.12.1.tar.gz" version('0.12.1', '9c9ecda15e905cccfc420e5341199512') version('0.11.1', 'f4c6287bfd2e93322b25a7c1311a0243', ...
true
true
f7136efbc9729168e3afeff8a58d80d8289cc150
1,421
py
Python
python_demo_v2/zhihu_data.py
renhongl/python_demo
039d0e046885dd3890526ae91efa2d601f6f9b73
[ "MIT" ]
1
2019-11-29T02:47:19.000Z
2019-11-29T02:47:19.000Z
python_demo_v2/zhihu_data.py
renhongl/python_demo
039d0e046885dd3890526ae91efa2d601f6f9b73
[ "MIT" ]
null
null
null
python_demo_v2/zhihu_data.py
renhongl/python_demo
039d0e046885dd3890526ae91efa2d601f6f9b73
[ "MIT" ]
null
null
null
import requests from pyquery import PyQuery as pq import json def get_one_page(url): headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36' } res = requests.get(url, headers=headers) text = res.te...
28.42
145
0.582688
import requests from pyquery import PyQuery as pq import json def get_one_page(url): headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36' } res = requests.get(url, headers=headers) text = res.te...
true
true
f7136f491edca08617ce711f647f8a42bbbe8aed
100
py
Python
automaton/__init__.py
PaulRaUnite/dsl_lab1
49368922902eadea53771278eb3a0c559cb7fb35
[ "MIT" ]
null
null
null
automaton/__init__.py
PaulRaUnite/dsl_lab1
49368922902eadea53771278eb3a0c559cb7fb35
[ "MIT" ]
null
null
null
automaton/__init__.py
PaulRaUnite/dsl_lab1
49368922902eadea53771278eb3a0c559cb7fb35
[ "MIT" ]
null
null
null
from .ndfa import * from .dfa import * __all__ = [] __all__ += ndfa.__all__ __all__ += dfa.__all__
14.285714
23
0.69
from .ndfa import * from .dfa import * __all__ = [] __all__ += ndfa.__all__ __all__ += dfa.__all__
true
true
f7136f6c0be19743771c16fbece82ec79c8ede9d
2,355
py
Python
api/tacticalrmm/agents/utils.py
v2cloud/tacticalrmm
12f599f9749985f66ff9b559c5e5abd36064b182
[ "MIT" ]
null
null
null
api/tacticalrmm/agents/utils.py
v2cloud/tacticalrmm
12f599f9749985f66ff9b559c5e5abd36064b182
[ "MIT" ]
null
null
null
api/tacticalrmm/agents/utils.py
v2cloud/tacticalrmm
12f599f9749985f66ff9b559c5e5abd36064b182
[ "MIT" ]
null
null
null
import asyncio import tempfile import urllib.parse from django.conf import settings from django.http import FileResponse from core.models import CodeSignToken from core.utils import get_core_settings, get_mesh_device_id, get_mesh_ws_url from tacticalrmm.constants import MeshAgentIdent def get_agent_url(arch: str, p...
25.322581
88
0.609766
import asyncio import tempfile import urllib.parse from django.conf import settings from django.http import FileResponse from core.models import CodeSignToken from core.utils import get_core_settings, get_mesh_device_id, get_mesh_ws_url from tacticalrmm.constants import MeshAgentIdent def get_agent_url(arch: str, p...
true
true
f7136fa5e6598f9ae88b101d1322debe9c2f4d03
6,468
py
Python
old build/trackbot.py
matieo33/RF-Activity-Count
9fa3e122ff01ffc082b7d21b527c5b139967ac95
[ "MIT" ]
1
2022-02-11T02:59:44.000Z
2022-02-11T02:59:44.000Z
old build/trackbot.py
matieo33/robloxforum-activity-count
9fa3e122ff01ffc082b7d21b527c5b139967ac95
[ "MIT" ]
null
null
null
old build/trackbot.py
matieo33/robloxforum-activity-count
9fa3e122ff01ffc082b7d21b527c5b139967ac95
[ "MIT" ]
null
null
null
try: import logo as logo_print except ModuleNotFoundError: missingfile = str(input("The program is missing a file. Continue anyways? ")) if missingfile.lower() == "yes" or "y" or "yea": pass else: os.exit(0) try: from bs4 import BeautifulSoup import requests, time, re, os, rando...
39.439024
165
0.495671
try: import logo as logo_print except ModuleNotFoundError: missingfile = str(input("The program is missing a file. Continue anyways? ")) if missingfile.lower() == "yes" or "y" or "yea": pass else: os.exit(0) try: from bs4 import BeautifulSoup import requests, time, re, os, rando...
true
true
f7137068828350e4b2a3991c7da868c21d1ebab6
1,915
py
Python
lib/spack/spack/build_systems/r.py
m-shunji/spack
ee1b0b9fb980d16c80a5f43d9f93f54424995268
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2020-10-08T06:16:50.000Z
2020-10-08T06:16:50.000Z
lib/spack/spack/build_systems/r.py
m-shunji/spack
ee1b0b9fb980d16c80a5f43d9f93f54424995268
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
12
2021-05-12T05:54:41.000Z
2022-03-30T11:09:24.000Z
lib/spack/spack/build_systems/r.py
ellio167/spack
45040589c8458ccd435f10be7123875181be76ff
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2021-04-07T18:27:09.000Z
2022-03-31T22:52:38.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 inspect from spack.directives import extends from spack.package import PackageBase, run_after class RPackage(Pa...
27.357143
77
0.641775
import inspect from spack.directives import extends from spack.package import PackageBase, run_after class RPackage(PackageBase): phases = ['install'] maintainers = ['glennpj'] build_system_class = 'RPackage' extends('r') def configure_args(self): return [] def configur...
true
true
f71370c31e6eba026c91492eb11fa410622b006c
327
py
Python
2016-12-01/nolock.py
awesome-archive/mp
e904c7c858fe5df5859f6282e5d4906a96abd6e5
[ "Apache-2.0" ]
90
2016-11-29T07:21:58.000Z
2022-03-29T06:41:01.000Z
2016-12-01/nolock.py
awesome-archive/mp
e904c7c858fe5df5859f6282e5d4906a96abd6e5
[ "Apache-2.0" ]
1
2020-01-19T10:03:12.000Z
2020-01-19T10:03:12.000Z
2016-12-01/nolock.py
awesome-archive/mp
e904c7c858fe5df5859f6282e5d4906a96abd6e5
[ "Apache-2.0" ]
34
2016-12-07T09:26:34.000Z
2020-09-14T01:57:11.000Z
# coding:utf-8 import time from threading import Thread value = 0 def getlock(): global value new = value + 1 time.sleep(0.001) # 使用sleep让线程有机会切换 value = new threads = [] for i in range(100): t = Thread(target=getlock) t.start() threads.append(t) for t in threads: t.join() print...
12.576923
40
0.629969
import time from threading import Thread value = 0 def getlock(): global value new = value + 1 time.sleep(0.001) value = new threads = [] for i in range(100): t = Thread(target=getlock) t.start() threads.append(t) for t in threads: t.join() print value
false
true
f71370c5ef66e0710af22b26b806b032387c0cc4
4,722
py
Python
tests/configs/memtest-ruby.py
LingxiaoJIA/gem5
708d23fc73f30be2726530bbc82702d0d84e0f4a
[ "BSD-3-Clause" ]
31
2015-12-15T19:14:10.000Z
2021-12-31T17:40:21.000Z
tests/configs/memtest-ruby.py
LingxiaoJIA/gem5
708d23fc73f30be2726530bbc82702d0d84e0f4a
[ "BSD-3-Clause" ]
5
2015-12-04T08:06:47.000Z
2020-08-09T21:49:46.000Z
tests/configs/memtest-ruby.py
LingxiaoJIA/gem5
708d23fc73f30be2726530bbc82702d0d84e0f4a
[ "BSD-3-Clause" ]
21
2015-11-05T08:25:45.000Z
2021-06-19T02:24:50.000Z
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2010 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source co...
35.238806
79
0.741423
import m5 from m5.objects import * from m5.defines import buildEnv from m5.util import addToPath import os, optparse, sys config_path = os.path.dirname(os.path.abspath(__file__)) config_root = os.path.dirname(config_path) m5_root = os.path.dirname(config_root) addToPath(config_root+'/configs/common') addToPath(config...
true
true
f713710e3441b1a7648d0165d70d8f7e5e989657
3,130
py
Python
iceisland/config.py
WeitBelou/IceIsland
17bd202759d6af350fa315f891ec726e7fdadd7f
[ "MIT" ]
null
null
null
iceisland/config.py
WeitBelou/IceIsland
17bd202759d6af350fa315f891ec726e7fdadd7f
[ "MIT" ]
null
null
null
iceisland/config.py
WeitBelou/IceIsland
17bd202759d6af350fa315f891ec726e7fdadd7f
[ "MIT" ]
2
2017-11-29T14:51:28.000Z
2018-08-31T18:03:06.000Z
import operator as op import os from typing import Dict, Callable from dolfin import Expression, Mesh from dolfin.cpp.mesh import MeshFunctionSizet class Material: def __init__(self, rho: float, young_modulus: float, shear_modulus: float): self._rho = rho self._young_modulus = young_modulus ...
29.252336
119
0.661981
import operator as op import os from typing import Dict, Callable from dolfin import Expression, Mesh from dolfin.cpp.mesh import MeshFunctionSizet class Material: def __init__(self, rho: float, young_modulus: float, shear_modulus: float): self._rho = rho self._young_modulus = young_modulus ...
true
true
f71371685e17f803653a289a21c29aad24b12eac
473
py
Python
JB/7.py
boostjanbjorge/adventofcode
5cdd540a553550b1000496dfa39cbf7cf431a85f
[ "MIT" ]
null
null
null
JB/7.py
boostjanbjorge/adventofcode
5cdd540a553550b1000496dfa39cbf7cf431a85f
[ "MIT" ]
null
null
null
JB/7.py
boostjanbjorge/adventofcode
5cdd540a553550b1000496dfa39cbf7cf431a85f
[ "MIT" ]
null
null
null
def load(): with open("inputs/7.txt") as f: yield from map(int, f.readline().split(",")) def solve(cost): positions = tuple(load()) min_position, max_position = min(positions), max(positions) return min( sum(cost(suggestion, crab) for crab in positions) for suggestion in range(...
27.823529
68
0.598309
def load(): with open("inputs/7.txt") as f: yield from map(int, f.readline().split(",")) def solve(cost): positions = tuple(load()) min_position, max_position = min(positions), max(positions) return min( sum(cost(suggestion, crab) for crab in positions) for suggestion in range(...
true
true
f71371bc08f3756dcf85d1c11b5f3d2763745556
18,363
py
Python
biggan/BigGAN-paddle/layers.py
zzz2010/Contrib
d351d83da718145cef9f6c98598f7fedc027efe5
[ "Apache-2.0" ]
20
2020-03-13T13:40:32.000Z
2022-03-10T07:31:48.000Z
biggan/BigGAN-paddle/layers.py
zzz2010/Contrib
d351d83da718145cef9f6c98598f7fedc027efe5
[ "Apache-2.0" ]
34
2020-02-20T11:04:58.000Z
2022-03-12T00:54:26.000Z
biggan/BigGAN-paddle/layers.py
zzz2010/Contrib
d351d83da718145cef9f6c98598f7fedc027efe5
[ "Apache-2.0" ]
41
2020-02-14T09:34:39.000Z
2022-03-10T07:31:42.000Z
''' Layers This file contains various layers for the BigGAN models. ''' import numpy as np import paddorch as torch import paddorch.nn as nn from paddorch.nn import init import paddorch.optim as optim import paddorch.nn.functional as F from paddorch.nn import Parameter as P # Projection of x onto y def proj(x, ...
36.652695
117
0.650711
import numpy as np import paddorch as torch import paddorch.nn as nn from paddorch.nn import init import paddorch.optim as optim import paddorch.nn.functional as F from paddorch.nn import Parameter as P def proj(x, y): return torch.mm(y, x.t()) * y / torch.mm(y, y.t()) def gram_schmidt(x, ys): for y in ys: ...
true
true
f71371d098e9f5376f73de0b5044accfe1bd489e
1,664
py
Python
barbican-8.0.0/barbican/objects/secret_stores.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
barbican-8.0.0/barbican/objects/secret_stores.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
barbican-8.0.0/barbican/objects/secret_stores.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2018 Fujitsu. # # 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...
39.619048
79
0.72476
from oslo_versionedobjects import base as object_base from barbican.model import models from barbican.model import repositories as repos from barbican.objects import base from barbican.objects import fields @object_base.VersionedObjectRegistry.register class SecretStores(base.BarbicanObject, base.BarbicanPersistentO...
true
true
f713726fcee2e8beb0a47237e029791db921f487
8,823
py
Python
graphene/types/tests/test_typemap.py
EquityZen/graphene
1a29006312ad5cd68343511860d6041d16e700c6
[ "MIT" ]
2
2021-06-14T20:01:22.000Z
2022-01-07T12:56:53.000Z
graphene/types/tests/test_typemap.py
EquityZen/graphene
1a29006312ad5cd68343511860d6041d16e700c6
[ "MIT" ]
13
2020-03-24T17:53:51.000Z
2022-02-10T20:01:14.000Z
graphene/types/tests/test_typemap.py
EquityZen/graphene
1a29006312ad5cd68343511860d6041d16e700c6
[ "MIT" ]
2
2021-04-12T18:16:00.000Z
2021-06-26T05:01:18.000Z
import pytest from graphql.type import ( GraphQLArgument, GraphQLEnumType, GraphQLEnumValue, GraphQLField, GraphQLInputObjectField, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLString, ) from ..dynamic import Dynamic from ..enum import Enum from ..field im...
30.74216
88
0.657146
import pytest from graphql.type import ( GraphQLArgument, GraphQLEnumType, GraphQLEnumValue, GraphQLField, GraphQLInputObjectField, GraphQLInputObjectType, GraphQLInterfaceType, GraphQLObjectType, GraphQLString, ) from ..dynamic import Dynamic from ..enum import Enum from ..field im...
true
true
f713734d192bdf00dea92d3bc6a7b7a86f5a0fbf
316
py
Python
tests/pyre/ipc/selector.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
tests/pyre/ipc/selector.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
tests/pyre/ipc/selector.py
BryanRiel/pyre
179359634a7091979cced427b6133dd0ec4726ea
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # michael a.g. aïvázis # orthologue # (c) 1998-2018 all rights reserved # """ Sanity check: verify that the selector factory is accessible """ def test(): from pyre.ipc import selector return # main if __name__ == "__main__": test() # end of file
12.153846
60
0.639241
def test(): from pyre.ipc import selector return if __name__ == "__main__": test()
true
true
f71373e8f7e5bc825e55b12e30ae3f7b39684ab4
2,586
py
Python
subscription_manager/events/topic_handlers.py
eurocontrol-swim/subscription-manager
95700334cb5d58957043c6c487b56b1dd6641ec0
[ "BSD-3-Clause" ]
null
null
null
subscription_manager/events/topic_handlers.py
eurocontrol-swim/subscription-manager
95700334cb5d58957043c6c487b56b1dd6641ec0
[ "BSD-3-Clause" ]
null
null
null
subscription_manager/events/topic_handlers.py
eurocontrol-swim/subscription-manager
95700334cb5d58957043c6c487b56b1dd6641ec0
[ "BSD-3-Clause" ]
null
null
null
""" Copyright 2019 EUROCONTROL ========================================== Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions an...
47.018182
121
0.776875
from subscription_manager.db import topics as db from subscription_manager.events.subscription_handlers import delete_subscription_handler __author__ = "EUROCONTROL (SWIM)" def create_topic_handler(topic): db.create_topic(topic) def delete_topic_handler(topic): db.delete_topic(topic) def delete_topic_s...
true
true
f713746c22ae04a75c5324a1fe9635ad84995264
7,648
py
Python
qa/rpc-tests/abandonconflict.py
infertux/bitcoinclassic
e744f27b6c6375749ce81aa395fb82445b40af49
[ "MIT" ]
null
null
null
qa/rpc-tests/abandonconflict.py
infertux/bitcoinclassic
e744f27b6c6375749ce81aa395fb82445b40af49
[ "MIT" ]
null
null
null
qa/rpc-tests/abandonconflict.py
infertux/bitcoinclassic
e744f27b6c6375749ce81aa395fb82445b40af49
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Bitcoin 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.test_framework import BitcoinTestFramework from test_framework.util import * try: ...
47.8
137
0.650366
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * try: import urllib.parse as urlparse except ImportError: import urlparse class AbandonConflictTest(BitcoinTestFramework): def setup_network(self): self.nodes = [] self.nodes.append(start_node...
false
true
f71374fb414fca995be9a3b2c9b33160564881bd
606
py
Python
order/soq.py
ipudu/order
156525d25847a7940c5e64b7dd98bf193fb4cc9e
[ "MIT" ]
6
2017-07-13T00:32:12.000Z
2019-08-19T16:01:12.000Z
order/soq.py
ipudu/order
156525d25847a7940c5e64b7dd98bf193fb4cc9e
[ "MIT" ]
5
2017-07-19T19:00:14.000Z
2021-03-09T13:52:29.000Z
order/soq.py
ipudu/order
156525d25847a7940c5e64b7dd98bf193fb4cc9e
[ "MIT" ]
6
2017-07-13T19:46:28.000Z
2022-03-23T05:01:10.000Z
############################################################################### # -*- coding: utf-8 -*- # Order: A tool to characterize the local structure of liquid water # by geometric order parameters # # Authors: Pu Du # # Released under the MIT License ####################################################...
24.24
79
0.536304
from __future__ import print_function, division import os import six from six.moves import range import numpy as np from progress.bar import ChargingBar from .util import pbc from . import oto class StructureFactor(): pass
true
true
f71376995ab6d6fafa06699fc9b6e0627798befe
1,375
py
Python
setup.py
lebedov/idisplay
26651a144ee4f648d7e9251ac06acd8b48e837ad
[ "BSD-3-Clause" ]
3
2016-02-28T06:20:51.000Z
2018-06-12T08:04:32.000Z
setup.py
lebedov/idisplay
26651a144ee4f648d7e9251ac06acd8b48e837ad
[ "BSD-3-Clause" ]
null
null
null
setup.py
lebedov/idisplay
26651a144ee4f648d7e9251ac06acd8b48e837ad
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python import os import re from setuptools import find_packages from setuptools import setup NAME = 'idisplay' VERSION = '0.1.2' AUTHOR = 'Lev Givon' AUTHOR_EMAIL = 'lev@columbia.edu' URL = 'https://github.com/lebedov/idisplay/' DESCRIPTION = ...
29.891304
109
0.611636
import os import re from setuptools import find_packages from setuptools import setup NAME = 'idisplay' VERSION = '0.1.2' AUTHOR = 'Lev Givon' AUTHOR_EMAIL = 'lev@columbia.edu' URL = 'https://github.com/lebedov/idisplay/' DESCRIPTION = 'IPython rich di...
true
true
f71376ea631ab445975f601545e423a8d49ab6e7
264
py
Python
tests/document/__init__.py
orsinium-forks/mongoengine
abf530a506c815d77ac1a294e10c20e5e9a01733
[ "MIT" ]
1
2018-03-18T05:38:14.000Z
2018-03-18T05:38:14.000Z
tests/document/__init__.py
orsinium-forks/mongoengine
abf530a506c815d77ac1a294e10c20e5e9a01733
[ "MIT" ]
null
null
null
tests/document/__init__.py
orsinium-forks/mongoengine
abf530a506c815d77ac1a294e10c20e5e9a01733
[ "MIT" ]
1
2021-12-29T15:12:39.000Z
2021-12-29T15:12:39.000Z
import unittest from class_methods import * from delta import * from dynamic import * from indexes import * from inheritance import * from instance import * from json_serialisation import * from validation import * if __name__ == '__main__': unittest.main()
18.857143
32
0.768939
import unittest from class_methods import * from delta import * from dynamic import * from indexes import * from inheritance import * from instance import * from json_serialisation import * from validation import * if __name__ == '__main__': unittest.main()
true
true
f71377f611c9ce644e4ac20c79d79c7493d43929
3,333
py
Python
transitions/extensions/states.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
transitions/extensions/states.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
transitions/extensions/states.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
from threading import Timer from ..core import MachineError, listify import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class Tags(object): def __init__(self, *args, **kwargs): self.tags = kwargs.pop('tags', []) super(Tags, self).__init__(*args, **kwargs...
30.3
101
0.623762
from threading import Timer from ..core import MachineError, listify import logging logger = logging.getLogger(__name__) logger.addHandler(logging.NullHandler()) class Tags(object): def __init__(self, *args, **kwargs): self.tags = kwargs.pop('tags', []) super(Tags, self).__init__(*args, **kwargs...
true
true
f71378ceaaa8d777931ed7a7ad29b3a4672e1b0b
1,381
py
Python
h/views/errors.py
y3g0r/h
a057144956fe25e669aeba5d0f0eb38f9dc09566
[ "BSD-2-Clause" ]
null
null
null
h/views/errors.py
y3g0r/h
a057144956fe25e669aeba5d0f0eb38f9dc09566
[ "BSD-2-Clause" ]
null
null
null
h/views/errors.py
y3g0r/h
a057144956fe25e669aeba5d0f0eb38f9dc09566
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Application exception views. Views rendered by the web application in response to exceptions thrown within views. """ from pyramid.view import forbidden_view_config from pyramid.view import notfound_view_config from pyramid.view import view_config from h.i18n import TranslationString as ...
30.688889
85
0.739319
from pyramid.view import forbidden_view_config from pyramid.view import notfound_view_config from pyramid.view import view_config from h.i18n import TranslationString as _ from h.util.view import handle_exception, json_view @forbidden_view_config(renderer="h:templates/notfound.html.jinja2") @notfound_view_config(...
true
true
f71378d9b4bbd2425f740fea28b4a8c207203bad
5,345
py
Python
docs/source/conf.py
jameshilliard/adbus
3b16f02d6cc5ff27b50f1f60b429710ecac7233b
[ "MIT" ]
null
null
null
docs/source/conf.py
jameshilliard/adbus
3b16f02d6cc5ff27b50f1f60b429710ecac7233b
[ "MIT" ]
null
null
null
docs/source/conf.py
jameshilliard/adbus
3b16f02d6cc5ff27b50f1f60b429710ecac7233b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # python-adbus documentation build configuration file, created by # sphinx-quickstart on Mon Jul 24 13:33:19 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this...
30.542857
79
0.682133
import os import sys sys.path.insert(0, os.path.abspath('../../')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', 'sphinx.ext.githubpages'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'python-adbus' copyright = '2017, CCX Technolg...
true
true
f7137a2801a5e44a8c74054d507cfe0d0fe72bf9
964
py
Python
project/urls.py
tinnguyentg/dictionaries-django-web-application
a28649fe8ce069cd0c78932e77bb7125ca3fa7de
[ "MIT" ]
null
null
null
project/urls.py
tinnguyentg/dictionaries-django-web-application
a28649fe8ce069cd0c78932e77bb7125ca3fa7de
[ "MIT" ]
null
null
null
project/urls.py
tinnguyentg/dictionaries-django-web-application
a28649fe8ce069cd0c78932e77bb7125ca3fa7de
[ "MIT" ]
null
null
null
"""practice URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/4.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-base...
34.428571
77
0.711618
from django.conf import settings from django.urls import include, path urlpatterns = [ path("", include("dictionary.urls")), ] if "debug_toolbar" in settings.INSTALLED_APPS: urlpatterns.insert(0, path("__debug__/", include("debug_toolbar.urls")))
true
true
f7137b0991a4259f401f051d901b7ce90d3aaed4
2,363
py
Python
setup.py
tsutterley/Spire-GNSS
26c9fb612ebfe872c18b2c2d884bfdf367c414e3
[ "MIT" ]
1
2021-10-02T00:51:09.000Z
2021-10-02T00:51:09.000Z
setup.py
tsutterley/Spire-GNSS
26c9fb612ebfe872c18b2c2d884bfdf367c414e3
[ "MIT" ]
null
null
null
setup.py
tsutterley/Spire-GNSS
26c9fb612ebfe872c18b2c2d884bfdf367c414e3
[ "MIT" ]
2
2021-12-09T03:08:07.000Z
2022-03-22T03:15:16.000Z
import os import sys import logging from setuptools import setup, find_packages logging.basicConfig(stream=sys.stderr, level=logging.INFO) log = logging.getLogger() # package description and keywords description = ('Python tools for obtaining and working with elevation data ' 'from Spire GNSS grazing angle altime...
32.369863
87
0.706729
import os import sys import logging from setuptools import setup, find_packages logging.basicConfig(stream=sys.stderr, level=logging.INFO) log = logging.getLogger() description = ('Python tools for obtaining and working with elevation data ' 'from Spire GNSS grazing angle altimetry') keywords = 'Spire GNSS, altim...
true
true
f7137bf483b0b3a2a5ebf008a1189bbb0a344bf2
332
py
Python
Arrays/Easy/MoveNegative.py
dhruvilgandhi/DSA-Together-HacktoberFest
fda752e0622544c83e11f1caf1cc99f36792069e
[ "MIT" ]
16
2021-10-02T20:10:51.000Z
2022-03-06T10:31:11.000Z
Arrays/Easy/MoveNegative.py
dhruvilgandhi/DSA-Together-HacktoberFest
fda752e0622544c83e11f1caf1cc99f36792069e
[ "MIT" ]
55
2021-10-02T07:31:41.000Z
2021-10-30T06:19:26.000Z
Arrays/Easy/MoveNegative.py
dhruvilgandhi/DSA-Together-HacktoberFest
fda752e0622544c83e11f1caf1cc99f36792069e
[ "MIT" ]
36
2021-10-02T18:00:08.000Z
2022-01-03T18:50:35.000Z
def rearrange (arr , n ): j = 0 for i in range(0 , n) : if(arr[i] < 0): temp = arr[i] arr[i] = arr[j] arr[j] = temp j = j + 1 print(arr) #Driver code sequence = [1 , 3, - 6 , 9 , -3 , -1] length = len(sequence) print(sequence.sort) rearrange(sequen...
23.714286
37
0.463855
def rearrange (arr , n ): j = 0 for i in range(0 , n) : if(arr[i] < 0): temp = arr[i] arr[i] = arr[j] arr[j] = temp j = j + 1 print(arr) sequence = [1 , 3, - 6 , 9 , -3 , -1] length = len(sequence) print(sequence.sort) rearrange(sequence , length)
true
true
f7137c5d8b25241584c064217536cf2234217efc
717
py
Python
score/jaccard_index.py
GuangmingZhu/ContinuousGR
2b35fe673405744a694b90f1e89943846b3e1de1
[ "MIT" ]
18
2018-08-23T13:38:29.000Z
2022-02-24T09:19:14.000Z
score/jaccard_index.py
NIDONGDEA/ContinuousGR
2b35fe673405744a694b90f1e89943846b3e1de1
[ "MIT" ]
1
2021-09-16T10:20:18.000Z
2021-09-16T10:20:18.000Z
score/jaccard_index.py
NIDONGDEA/ContinuousGR
2b35fe673405744a694b90f1e89943846b3e1de1
[ "MIT" ]
2
2019-10-21T23:12:28.000Z
2022-02-28T01:53:48.000Z
def Jsi(gts, ps, label): g_set = set() p_set = set() for seg in gts: seg_points, g_l = seg s, e = seg_points if g_l == label: g_set.update(range(s, e + 1, 1)) for seg in ps: seg_points, p_l = seg s, e = seg_points if p_l == label: p...
24.724138
45
0.476987
def Jsi(gts, ps, label): g_set = set() p_set = set() for seg in gts: seg_points, g_l = seg s, e = seg_points if g_l == label: g_set.update(range(s, e + 1, 1)) for seg in ps: seg_points, p_l = seg s, e = seg_points if p_l == label: p...
true
true
f7137caf42bf2e7509a5bf266ba34911e95b5fbc
4,637
py
Python
isi_sdk_8_2_1/isi_sdk_8_2_1/models/mapping_users_rules_rule_options_default_user.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_2_1/isi_sdk_8_2_1/models/mapping_users_rules_rule_options_default_user.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_2_1/isi_sdk_8_2_1/models/mapping_users_rules_rule_options_default_user.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 8 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_2_1.models.mapping...
30.913333
117
0.593918
import pprint import re import six from isi_sdk_8_2_1.models.mapping_users_rules_rule_user2 import MappingUsersRulesRuleUser2 class MappingUsersRulesRuleOptionsDefaultUser(object): swagger_types = { 'domain': 'str', 'user': 'str' } attribute_map = { 'domain': 'domain', ...
true
true
f7137d431c55a98733348c0c5c24522a29f62806
2,726
py
Python
basis/cli/commands/upload.py
kvh/dags
4d64e480b68e23cb586516d7ea0ad03bf93fb12d
[ "BSD-3-Clause" ]
null
null
null
basis/cli/commands/upload.py
kvh/dags
4d64e480b68e23cb586516d7ea0ad03bf93fb12d
[ "BSD-3-Clause" ]
null
null
null
basis/cli/commands/upload.py
kvh/dags
4d64e480b68e23cb586516d7ea0ad03bf93fb12d
[ "BSD-3-Clause" ]
null
null
null
from pathlib import Path from typer import Option, Argument from basis.cli.services.deploy import deploy_graph_version from basis.cli.services.graph_components import create_graph_component from basis.cli.services.lookup import IdLookup from basis.cli.services.output import sprint, abort_on_error from basis.cli.servi...
40.686567
85
0.675715
from pathlib import Path from typer import Option, Argument from basis.cli.services.deploy import deploy_graph_version from basis.cli.services.graph_components import create_graph_component from basis.cli.services.lookup import IdLookup from basis.cli.services.output import sprint, abort_on_error from basis.cli.servi...
true
true
f7137df1d05ef90e02779ddb044f006b3d28e341
93,666
py
Python
cinder/tests/unit/backup/test_backup.py
inspur-storage/cinder
c41a2f05c3e01133746ca2cb4eaa480cc581cbdf
[ "Apache-2.0" ]
1
2019-01-22T05:37:38.000Z
2019-01-22T05:37:38.000Z
cinder/tests/unit/backup/test_backup.py
inspur-storage/cinder
c41a2f05c3e01133746ca2cb4eaa480cc581cbdf
[ "Apache-2.0" ]
null
null
null
cinder/tests/unit/backup/test_backup.py
inspur-storage/cinder
c41a2f05c3e01133746ca2cb4eaa480cc581cbdf
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2012 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/LICEN...
46.833
79
0.609154
import copy import ddt import os import uuid import mock from os_brick.initiator.connectors import fake as fake_connectors from oslo_config import cfg from oslo_db import exception as db_exc from oslo_utils import importutils from oslo_utils import timeutils import cinder from cinder.backup import api from cinder.ba...
true
true
f7137e715a3e6f9fc07606848dd44c299df4bd4f
11,604
py
Python
CBCRadio.py
pilona/Utils
643db0128c24dd3b546a38f55e9d4f52aa626831
[ "0BSD" ]
2
2019-08-13T09:12:38.000Z
2019-11-20T17:23:31.000Z
CBCRadio.py
pilona/Utils
643db0128c24dd3b546a38f55e9d4f52aa626831
[ "0BSD" ]
null
null
null
CBCRadio.py
pilona/Utils
643db0128c24dd3b546a38f55e9d4f52aa626831
[ "0BSD" ]
1
2019-05-05T04:55:10.000Z
2019-05-05T04:55:10.000Z
#! /usr/bin/env python3 ''' CBC Radio streams player/downloader ''' from datetime import datetime from argparse import ArgumentParser, OPTIONAL from collections import namedtuple import subprocess import readline import requests from lxml import html _STREAM_SNAPSHOT = [ ("Radio One", "BC", "Kamloops", "ht...
44.290076
110
0.66029
from datetime import datetime from argparse import ArgumentParser, OPTIONAL from collections import namedtuple import subprocess import readline import requests from lxml import html _STREAM_SNAPSHOT = [ ("Radio One", "BC", "Kamloops", "http://cbc_r1_kam.akacast.akamaistream.net/7/440/451661/v1/rc.akacast....
true
true
f7137edee87a9a20dc66bb2873f91f59098223c8
2,115
py
Python
tests/unit/cloud/__init__.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
1
2020-04-09T03:25:10.000Z
2020-04-09T03:25:10.000Z
tests/unit/cloud/__init__.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
tests/unit/cloud/__init__.py
springborland/salt
bee85e477d57e9a171884e54fefb9a59d0835ed0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ tests.unit.cloud ~~~~~~~~~~~~~~~~ """ from __future__ import absolute_import, print_function, unicode_literals import salt.cloud from tests.support.unit import TestCase class CloudTest(TestCase): def test_vm_config_merger(self): """ Validate the vm's config is ...
31.567164
79
0.441135
from __future__ import absolute_import, print_function, unicode_literals import salt.cloud from tests.support.unit import TestCase class CloudTest(TestCase): def test_vm_config_merger(self): main = { "minion": {"master": "172.31.39.213"}, "log_file": "var/log/salt/cloud.log", ...
true
true
f71380836e3db0f659b23bbc07344408251ee1f8
602
py
Python
src/data_integration/pw_corr.py
msenosain/TMA36_dataanalysis
ba390b40e9ffb2bf8ec39b3bd6e8aa000174c313
[ "MIT" ]
null
null
null
src/data_integration/pw_corr.py
msenosain/TMA36_dataanalysis
ba390b40e9ffb2bf8ec39b3bd6e8aa000174c313
[ "MIT" ]
null
null
null
src/data_integration/pw_corr.py
msenosain/TMA36_dataanalysis
ba390b40e9ffb2bf8ec39b3bd6e8aa000174c313
[ "MIT" ]
null
null
null
import pandas as pd import pingouin as pg def pw_corr(data_path="data/TMA36_project/Radiomics/processed/rad_healthmyne.csv", cde_path="data/TMA36_project/CDE/CDE_TMA36_2020FEB25_SA_MF.csv"): rad_hm = pd.read_csv(data_path, index_col=0) cde = pd.read_csv(cde_path, index_col=1) cde_sila = pd.Dat...
46.307692
92
0.73588
import pandas as pd import pingouin as pg def pw_corr(data_path="data/TMA36_project/Radiomics/processed/rad_healthmyne.csv", cde_path="data/TMA36_project/CDE/CDE_TMA36_2020FEB25_SA_MF.csv"): rad_hm = pd.read_csv(data_path, index_col=0) cde = pd.read_csv(cde_path, index_col=1) cde_sila = pd.Dat...
true
true
f713813212c14f8dbe01575043d8136ba327fb4a
10,030
py
Python
utils.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
29
2020-01-30T00:10:59.000Z
2022-03-26T21:25:25.000Z
utils.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
13
2020-04-28T09:38:58.000Z
2022-03-12T00:15:46.000Z
utils.py
kyuhyoung/grasping-invisible
2aaaeb9e28995628ec038a79496453be9f26ffff
[ "BSD-2-Clause" ]
9
2020-09-15T10:34:31.000Z
2021-06-16T20:51:04.000Z
import math import numpy as np from skimage.morphology.convex_hull import convex_hull_image from scipy.ndimage.morphology import binary_dilation def check_grasp_margin(target_mask_heightmap, depth_heightmap): margin_mask = binary_dilation(target_mask_heightmap, iterations=10).astype(np.float32)-target_mask_heigh...
44.185022
305
0.701496
import math import numpy as np from skimage.morphology.convex_hull import convex_hull_image from scipy.ndimage.morphology import binary_dilation def check_grasp_margin(target_mask_heightmap, depth_heightmap): margin_mask = binary_dilation(target_mask_heightmap, iterations=10).astype(np.float32)-target_mask_heigh...
true
true
f71381c785c544888dee52871e6f87b6e325d276
66
py
Python
desafio2.py
rafarbop/Python
e304993a6c73eacd8fffd7c67286206516e5faea
[ "MIT" ]
null
null
null
desafio2.py
rafarbop/Python
e304993a6c73eacd8fffd7c67286206516e5faea
[ "MIT" ]
null
null
null
desafio2.py
rafarbop/Python
e304993a6c73eacd8fffd7c67286206516e5faea
[ "MIT" ]
null
null
null
nome = input('Digite seu nome: ') print(f'Seja bem vindo {nome}!')
33
33
0.666667
nome = input('Digite seu nome: ') print(f'Seja bem vindo {nome}!')
true
true
f713820a7f986fb4725f995796e3a290d8e8ef14
4,604
py
Python
objectModel/Python/cdm/utilities/logging/telemetry_config.py
rt112000/CDM
34bd34f9260140a8f8aa02bd87c23033f3daad4c
[ "CC-BY-4.0", "MIT" ]
884
2019-05-10T02:09:10.000Z
2022-03-31T14:02:00.000Z
objectModel/Python/cdm/utilities/logging/telemetry_config.py
rt112000/CDM
34bd34f9260140a8f8aa02bd87c23033f3daad4c
[ "CC-BY-4.0", "MIT" ]
171
2019-06-10T11:34:37.000Z
2022-03-31T22:50:12.000Z
objectModel/Python/cdm/utilities/logging/telemetry_config.py
rt112000/CDM
34bd34f9260140a8f8aa02bd87c23033f3daad4c
[ "CC-BY-4.0", "MIT" ]
340
2019-05-07T18:00:16.000Z
2022-03-31T12:00:15.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. import msal from typing import Optional, TYPE_CHECKING from cdm.enums import EnvironmentType, AzureCloudEndpoint if TYPE_CHECKING: from cdm.utilities.network....
45.137255
148
0.674848
import msal from typing import Optional, TYPE_CHECKING from cdm.enums import EnvironmentType, AzureCloudEndpoint if TYPE_CHECKING: from cdm.utilities.network.token_provider import TokenProvider class TelemetryConfig: CDM_INFOLOG_TABLE = 'infoLogs' CDM_WARNINGLOG_TABLE = 'warningLogs' CDM_ERROR...
true
true
f7138493a6f92409c9f9cda230a6d7d9c80791c4
10,096
py
Python
tests/test_general_SysmetricLogger.py
aimakerspace/synergos_logger
f59ab068082fab6e1520d9ae7ddde2919beee4f6
[ "Apache-2.0" ]
null
null
null
tests/test_general_SysmetricLogger.py
aimakerspace/synergos_logger
f59ab068082fab6e1520d9ae7ddde2919beee4f6
[ "Apache-2.0" ]
null
null
null
tests/test_general_SysmetricLogger.py
aimakerspace/synergos_logger
f59ab068082fab6e1520d9ae7ddde2919beee4f6
[ "Apache-2.0" ]
1
2022-01-21T00:57:43.000Z
2022-01-21T00:57:43.000Z
#!/usr/bin/env python #################### # Required Modules # #################### # Generic/Built-in import os import logging import time from typing import Callable # Libs import pytest import structlog # Custom from conftest import ( SYSMETRIC_SUPPORTED_METADATA, SYSMETRIC_TRACKERS, DURATION, P...
36.712727
87
0.666204
import os import logging import time from typing import Callable import pytest import structlog from conftest import ( SYSMETRIC_SUPPORTED_METADATA, SYSMETRIC_TRACKERS, DURATION, POLL_INTERVAL, extract_name, reconfigure_global_structlog_params ) from synlogger.config import SYSMETRICS_PREFIX...
true
true
f71384f7b1ad31496b13808388d1421a7c466c4e
2,707
py
Python
ic/identity.py
zkung/ic-py
426d0a95b5826ced58ec3164a99a6994f088957a
[ "MIT" ]
1
2022-03-19T23:23:53.000Z
2022-03-19T23:23:53.000Z
ic/identity.py
dfinity-lab/ic-py
3e6458e245c565339047847c70c5bac50700f9dd
[ "MIT" ]
null
null
null
ic/identity.py
dfinity-lab/ic-py
3e6458e245c565339047847c70c5bac50700f9dd
[ "MIT" ]
null
null
null
import hashlib from ecdsa.curves import Ed25519, SECP256k1 from .principal import Principal import ecdsa class Identity: def __init__(self, privkey = "", type = "ed25519", anonymous = False): privkey = bytes(bytearray.fromhex(privkey)) self.anonymous = anonymous if anonymous: r...
33.012195
111
0.579978
import hashlib from ecdsa.curves import Ed25519, SECP256k1 from .principal import Principal import ecdsa class Identity: def __init__(self, privkey = "", type = "ed25519", anonymous = False): privkey = bytes(bytearray.fromhex(privkey)) self.anonymous = anonymous if anonymous: r...
true
true
f713854f3b5d2bc3bace7fa4697551d52b3eeb02
98
py
Python
ludwig/__init__.py
phueb/Ludw
de426de1e396e700007869cda27dd5bc9b8f5d2d
[ "MIT" ]
null
null
null
ludwig/__init__.py
phueb/Ludw
de426de1e396e700007869cda27dd5bc9b8f5d2d
[ "MIT" ]
1
2022-03-30T14:07:13.000Z
2022-03-30T14:07:13.000Z
ludwig/__init__.py
phueb/Ludw
de426de1e396e700007869cda27dd5bc9b8f5d2d
[ "MIT" ]
2
2020-06-15T13:06:53.000Z
2021-02-12T00:33:29.000Z
__version__ = '4.0.6' def print_ludwig(s): print(f'Ludwig-{__version__}: {s}', flush=True)
14
51
0.642857
__version__ = '4.0.6' def print_ludwig(s): print(f'Ludwig-{__version__}: {s}', flush=True)
true
true
f71385a86952e71464ade64291844060b175054d
4,714
py
Python
indy_node/test/auth_rule/test_auth_map.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
627
2017-07-06T12:38:08.000Z
2022-03-30T13:18:43.000Z
indy_node/test/auth_rule/test_auth_map.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
580
2017-06-29T17:59:57.000Z
2022-03-29T21:37:52.000Z
indy_node/test/auth_rule/test_auth_map.py
Rob-S/indy-node
0aefbda62c5a7412d7e03b2fb9795c500ea67e9f
[ "Apache-2.0" ]
704
2017-06-29T17:45:34.000Z
2022-03-30T07:08:58.000Z
from indy_common.authorize import auth_map def test_auth_map_node(): node_rules = [(auth_map.adding_new_node, "0--ADD--services--*--['VALIDATOR']"), (auth_map.adding_new_node_with_empty_services, "0--ADD--services--*--[]"), (auth_map.demote_node, "0--EDIT--services--['VALIDATOR...
36.828125
92
0.602885
from indy_common.authorize import auth_map def test_auth_map_node(): node_rules = [(auth_map.adding_new_node, "0--ADD--services--*--['VALIDATOR']"), (auth_map.adding_new_node_with_empty_services, "0--ADD--services--*--[]"), (auth_map.demote_node, "0--EDIT--services--['VALIDATOR...
true
true
f713861bd53f0726e5bf5659818fa3fb95359fd7
173,565
py
Python
tests/unit/test_blob.py
yun-cn/python-storage
475c1f946439dc9df9ea9809aabc2f7847f0f590
[ "Apache-2.0" ]
null
null
null
tests/unit/test_blob.py
yun-cn/python-storage
475c1f946439dc9df9ea9809aabc2f7847f0f590
[ "Apache-2.0" ]
null
null
null
tests/unit/test_blob.py
yun-cn/python-storage
475c1f946439dc9df9ea9809aabc2f7847f0f590
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
37.414313
115
0.62716
import base64 import datetime import hashlib import io import json import os import tempfile import unittest import mock import pytest import six from six.moves import http_client from google.cloud.storage.retry import DEFAULT_RETRY_IF_GENERATION_SPECIFIED def _make_credentials(): import google.auth.credential...
true
true
f7138682a10089e0ddf292ce21c018b8f71c8f42
18,123
py
Python
lite/tests/unittest_py/auto_scan_base.py
xiebaiyuan/PaddleLite
6f7280a91741d1c63fcb0296ac5c08c4e81c2a90
[ "Apache-2.0" ]
null
null
null
lite/tests/unittest_py/auto_scan_base.py
xiebaiyuan/PaddleLite
6f7280a91741d1c63fcb0296ac5c08c4e81c2a90
[ "Apache-2.0" ]
null
null
null
lite/tests/unittest_py/auto_scan_base.py
xiebaiyuan/PaddleLite
6f7280a91741d1c63fcb0296ac5c08c4e81c2a90
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
39.227273
159
0.587154
import numpy as np import unittest import abc import os import enum import time import logging import shutil import paddle import paddle.fluid as fluid from paddle.fluid.initializer import NumpyArrayInitializer from paddle.fluid.core import PassVersionChecker import paddle.fluid.core as core from paddle import compat ...
true
true
f71386d08e0198f828a61f421605596b20d2de39
861
py
Python
banme/banme.py
reo-ar/reo-cogs
1424270a41891822e3a6e68bd43a92abe75fa6fc
[ "Unlicense" ]
1
2020-10-22T21:28:55.000Z
2020-10-22T21:28:55.000Z
banme/banme.py
reo-ar/reo-cogs
1424270a41891822e3a6e68bd43a92abe75fa6fc
[ "Unlicense" ]
null
null
null
banme/banme.py
reo-ar/reo-cogs
1424270a41891822e3a6e68bd43a92abe75fa6fc
[ "Unlicense" ]
null
null
null
from typing import Any import discord from redbot.core import commands from redbot.core.utils.predicates import MessagePredicate Cog: Any = getattr(commands, "Cog", object) class BanMe(Cog): """ Ridiculous cog for a ridiculous request """ def __init__(self, bot): self.bot = bot @comman...
27.774194
92
0.614402
from typing import Any import discord from redbot.core import commands from redbot.core.utils.predicates import MessagePredicate Cog: Any = getattr(commands, "Cog", object) class BanMe(Cog): def __init__(self, bot): self.bot = bot @commands.command() async def banme(self, ctx): await c...
true
true
f7138833d6bb52401ccd4e503b1eb3526852629c
3,335
py
Python
tensorflow/python/summary/impl/io_wrapper.py
jdehotin/TensorFlow
a6c5f8e4e013e54fed8dfcf49fb6de365f018022
[ "Apache-2.0" ]
5
2018-03-22T06:56:15.000Z
2018-09-04T02:41:35.000Z
tensorflow/python/summary/impl/io_wrapper.py
jdehotin/TensorFlow
a6c5f8e4e013e54fed8dfcf49fb6de365f018022
[ "Apache-2.0" ]
1
2021-04-12T03:51:59.000Z
2021-04-12T03:51:59.000Z
tensorflow/python/summary/impl/io_wrapper.py
jdehotin/TensorFlow
a6c5f8e4e013e54fed8dfcf49fb6de365f018022
[ "Apache-2.0" ]
5
2018-02-27T00:34:23.000Z
2022-02-28T16:38:08.000Z
# Copyright 2015 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 applica...
32.696078
80
0.71994
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os from tensorflow.python.platform import gfile from tensorflow.python.summary.impl import event_file_loader from tensorflow.python.summary.impl import gcs from tensorflow.python.summary.impl import gcs...
true
true
f7138874e490e4bbf693bf32a7ec22b4a4ec1221
503
py
Python
netbox_topology_views/api/serializers.py
spalmesano/netbox-topology-views
3b4209223e31cc96adf4b133eea36bc982d25d7e
[ "Apache-2.0" ]
201
2020-04-16T16:08:45.000Z
2022-03-28T02:20:34.000Z
netbox_topology_views/api/serializers.py
spalmesano/netbox-topology-views
3b4209223e31cc96adf4b133eea36bc982d25d7e
[ "Apache-2.0" ]
63
2020-04-15T16:20:17.000Z
2022-03-27T01:05:09.000Z
netbox_topology_views/api/serializers.py
spalmesano/netbox-topology-views
3b4209223e31cc96adf4b133eea36bc982d25d7e
[ "Apache-2.0" ]
26
2020-05-14T13:42:23.000Z
2022-03-28T02:20:37.000Z
from rest_framework.serializers import ModelSerializer from dcim.models import DeviceRole, Device from extras.models import Tag class PreDeviceRoleSerializer(ModelSerializer): class Meta: model = DeviceRole fields = ('id', 'name') class PreTagSerializer(ModelSerializer): class Meta: ...
20.958333
54
0.656064
from rest_framework.serializers import ModelSerializer from dcim.models import DeviceRole, Device from extras.models import Tag class PreDeviceRoleSerializer(ModelSerializer): class Meta: model = DeviceRole fields = ('id', 'name') class PreTagSerializer(ModelSerializer): class Meta: ...
true
true
f713888e2eb6650e6c8c4d7d10f378838c57d92c
648
py
Python
compiled/construct/switch_manual_str.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
4
2017-04-08T12:55:11.000Z
2020-12-05T21:09:31.000Z
compiled/construct/switch_manual_str.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
7
2018-04-23T01:30:33.000Z
2020-10-30T23:56:14.000Z
compiled/construct/switch_manual_str.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
6
2017-04-08T11:41:14.000Z
2020-10-30T22:47:31.000Z
from construct import * from construct.lib import * switch_manual_str__opcode__intval = Struct( 'value' / Int8ub, ) switch_manual_str__opcode__strval = Struct( 'value' / NullTerminated(GreedyString(encoding='ASCII'), term=b'\x00', include=False, consume=True), ) switch_manual_str__opcode = Struct( 'code' / FixedS...
29.454545
152
0.770062
from construct import * from construct.lib import * switch_manual_str__opcode__intval = Struct( 'value' / Int8ub, ) switch_manual_str__opcode__strval = Struct( 'value' / NullTerminated(GreedyString(encoding='ASCII'), term=b'\x00', include=False, consume=True), ) switch_manual_str__opcode = Struct( 'code' / FixedS...
true
true
f71388bcab372f438de6790334669998d9e80989
4,156
py
Python
intersight/models/hyperflex_cluster_network_policy_list.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/hyperflex_cluster_network_policy_list.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
intersight/models/hyperflex_cluster_network_policy_list.py
ategaw-cisco/intersight-python
9d6476620507281b1dc358e29ac452d56081bbb0
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Intersight REST API This is Intersight REST API OpenAPI spec version: 1.0.9-262 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class HyperflexClusterNetworkPolicyList(object): """ ...
26.987013
99
0.582531
from pprint import pformat from six import iteritems import re class HyperflexClusterNetworkPolicyList(object): swagger_types = { 'count': 'int', 'results': 'list[HyperflexClusterNetworkPolicy]' } attribute_map = { 'count': 'Count', 'results': 'Results' } def...
true
true
f71388cadb94d8215dddb8bc4a7cb2d38d7823a4
95,078
py
Python
tensorflow/python/keras/engine/training.py
ahoneybun/tensorflow
5134e65300d1ac384eeb1f4ca72a011ad7225bc8
[ "Apache-2.0" ]
5
2018-10-20T03:54:49.000Z
2021-01-02T07:19:53.000Z
tensorflow/python/keras/engine/training.py
liufengdb/tensorflow
51100a8de57ef53e36a8a9f5a9829cbd33fbed04
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/engine/training.py
liufengdb/tensorflow
51100a8de57ef53e36a8a9f5a9829cbd33fbed04
[ "Apache-2.0" ]
2
2018-11-03T01:19:26.000Z
2021-04-23T02:34:07.000Z
# Copyright 2015 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 applica...
42.943993
99
0.640727
from __future__ import absolute_import from __future__ import division from __future__ import print_function import weakref import numpy as np from tensorflow.python.data.ops import dataset_ops from tensorflow.python.data.ops import iterator_ops from tensorflow.python.eager import context from tensorflow.python.frame...
true
true
f713890a52d71352dbedc3981e74a4277fb9c534
3,523
py
Python
pip_services3_components/auth/MemoryCredentialStore.py
pip-services3-python/pip-services3-components-python
d8868f9db9760fb91e5ff7a815de8ce98fdb4b2a
[ "MIT" ]
null
null
null
pip_services3_components/auth/MemoryCredentialStore.py
pip-services3-python/pip-services3-components-python
d8868f9db9760fb91e5ff7a815de8ce98fdb4b2a
[ "MIT" ]
null
null
null
pip_services3_components/auth/MemoryCredentialStore.py
pip-services3-python/pip-services3-components-python
d8868f9db9760fb91e5ff7a815de8ce98fdb4b2a
[ "MIT" ]
1
2020-03-11T21:46:42.000Z
2020-03-11T21:46:42.000Z
# -*- coding: utf-8 -*- """ pip_services3_components.auth.MemoryCredentialStore ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Memory credential store implementation :copyright: Conceptual Vision Consulting LLC 2018-2019, see AUTHORS for more details. :license: MIT, see LICENSE for mo...
34.539216
95
0.629009
from typing import Optional from pip_services3_commons.config.ConfigParams import ConfigParams from pip_services3_commons.config.IReconfigurable import IReconfigurable from pip_services3_commons.data.StringValueMap import StringValueMap from .CredentialParams import CredentialParams from .ICredentialStore import ICre...
true
true
f713896eb30831c63d845d2e4ba3486057cefff3
2,556
py
Python
dags/dcm_dag.py
nsutton00/starthinker
e597d679a95ca85a21af9cf4df3ff935ca34abf8
[ "Apache-2.0" ]
null
null
null
dags/dcm_dag.py
nsutton00/starthinker
e597d679a95ca85a21af9cf4df3ff935ca34abf8
[ "Apache-2.0" ]
null
null
null
dags/dcm_dag.py
nsutton00/starthinker
e597d679a95ca85a21af9cf4df3ff935ca34abf8
[ "Apache-2.0" ]
null
null
null
########################################################################### # # Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org...
26.081633
87
0.552426
from starthinker_airflow.factory import DAG_Factory USER_CONN_ID = "starthinker_user" GCP_CONN_ID = "starthinker_service" INPUTS = { 'account': '', 'body': '{}', 'delete': False, } TASKS = [ { 'dcm': { 'auth': 'user', 'report': { 'account': { 'field': { 'name'...
true
true
f7138aafc10681d11133092224c7fea9e8041dbc
12,211
py
Python
tests/validation/cattlevalidationtest/core/test_github.py
wlan0/validation-tests
606822dfb26f61ba5ce6d4a7358f72a88773c762
[ "Apache-2.0" ]
null
null
null
tests/validation/cattlevalidationtest/core/test_github.py
wlan0/validation-tests
606822dfb26f61ba5ce6d4a7358f72a88773c762
[ "Apache-2.0" ]
null
null
null
tests/validation/cattlevalidationtest/core/test_github.py
wlan0/validation-tests
606822dfb26f61ba5ce6d4a7358f72a88773c762
[ "Apache-2.0" ]
null
null
null
from common_fixtures import * # NOQA from selenium import webdriver from selenium.webdriver.phantomjs.service import Service as PhantomJSService from requests.auth import AuthBase # test the github auth workflow USER_SCOPE = 'github_user' TEAM_SCOPE = 'github_team' ORG_SCOPE = 'github_org' class NewService(PhantomJS...
34.013928
86
0.635001
from common_fixtures import * from selenium import webdriver from selenium.webdriver.phantomjs.service import Service as PhantomJSService from requests.auth import AuthBase USER_SCOPE = 'github_user' TEAM_SCOPE = 'github_team' ORG_SCOPE = 'github_org' class NewService(PhantomJSService): def __init__(self, *args,...
true
true
f7138c64854f49ece2c496eff5f4166bc32c8367
1,271
py
Python
proxypool/processors/server.py
staugur/ProxyPool
e90002d287a541818c4fc811d0a627ae8b4b21a8
[ "MIT" ]
2
2022-01-20T01:11:18.000Z
2022-01-26T08:15:13.000Z
proxypool/processors/server.py
staugur/ProxyPool
e90002d287a541818c4fc811d0a627ae8b4b21a8
[ "MIT" ]
1
2021-12-31T05:02:20.000Z
2021-12-31T05:02:20.000Z
proxypool/processors/server.py
staugur/ProxyPool
e90002d287a541818c4fc811d0a627ae8b4b21a8
[ "MIT" ]
null
null
null
from flask import Flask, g from proxypool.storages.redis import RedisClient from proxypool.setting import API_HOST, API_PORT, API_THREADED, IS_DEV __all__ = ['app'] app = Flask(__name__) if IS_DEV: app.debug = True def get_conn(): """ get redis client object :return: """ if not hasattr(g, '...
18.157143
70
0.608969
from flask import Flask, g from proxypool.storages.redis import RedisClient from proxypool.setting import API_HOST, API_PORT, API_THREADED, IS_DEV __all__ = ['app'] app = Flask(__name__) if IS_DEV: app.debug = True def get_conn(): if not hasattr(g, 'redis'): g.redis = RedisClient() return g.red...
true
true