hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f756c51557a978fc88985347d59b003a40ca2e20
13,004
py
Python
extra_foam/gui/ctrl_widgets/correlation_ctrl_widget.py
European-XFEL/EXtra-foam
f8d225db6b8923d0cce9db2b8c8a80613600b64c
[ "BSD-3-Clause" ]
7
2019-11-27T09:31:37.000Z
2022-02-12T21:28:49.000Z
extra_foam/gui/ctrl_widgets/correlation_ctrl_widget.py
European-XFEL/EXtra-foam
f8d225db6b8923d0cce9db2b8c8a80613600b64c
[ "BSD-3-Clause" ]
172
2019-12-03T07:56:02.000Z
2022-03-25T15:46:45.000Z
extra_foam/gui/ctrl_widgets/correlation_ctrl_widget.py
European-XFEL/EXtra-foam
f8d225db6b8923d0cce9db2b8c8a80613600b64c
[ "BSD-3-Clause" ]
9
2019-11-27T09:32:38.000Z
2022-01-05T09:56:10.000Z
""" Distributed under the terms of the BSD 3-Clause License. The full license is in the file LICENSE, distributed with this software. Author: Jun Zhu <jun.zhu@xfel.eu>, Ebad Kamil <ebad.kamil@xfel.eu> Copyright (C) European X-Ray Free-Electron Laser Facility GmbH. All rights reserved. """ import functools from PyQt5...
37.367816
77
0.631575
import functools from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt from PyQt5.QtGui import QDoubleValidator from PyQt5.QtWidgets import ( QCheckBox, QComboBox, QFrame, QGridLayout, QHeaderView, QHBoxLayout, QLabel, QPushButton, QTableWidget ) from .curve_fitting_ctrl_widget import _BaseFittingCtrlWidget from ...
true
true
f756c55dccfee3a433d65bb620750a0fe1694f5e
1,762
py
Python
openstack_dashboard/dashboards/project/images_and_snapshots/volume_snapshots/tabs.py
dreamhost/horizon
55569d540e6c1a6957d5127f9bae6a699ed60823
[ "Apache-2.0" ]
3
2017-02-13T15:11:01.000Z
2021-07-28T08:28:09.000Z
openstack_dashboard/dashboards/project/images_and_snapshots/volume_snapshots/tabs.py
dreamhost/horizon
55569d540e6c1a6957d5127f9bae6a699ed60823
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/images_and_snapshots/volume_snapshots/tabs.py
dreamhost/horizon
55569d540e6c1a6957d5127f9bae6a699ed60823
[ "Apache-2.0" ]
2
2018-08-29T10:56:04.000Z
2019-11-11T11:45:20.000Z
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
35.24
78
0.677639
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import tabs from openstack_dashboard.api import cinder class OverviewTab(tabs.Tab): name = _("Overview") slug = "overview" template_name = ("pr...
true
true
f756c7ef7fad32e0cc03202fa3b2fbc715472a31
18,872
py
Python
tests/test_init.py
scotte/pysma
9c5aee24ee4091f88ce10e06958727a510190267
[ "MIT" ]
null
null
null
tests/test_init.py
scotte/pysma
9c5aee24ee4091f88ce10e06958727a510190267
[ "MIT" ]
null
null
null
tests/test_init.py
scotte/pysma
9c5aee24ee4091f88ce10e06958727a510190267
[ "MIT" ]
null
null
null
"""Test pysma init.""" import logging import re from unittest.mock import patch import aiohttp import pytest from pysma import SMA from pysma.const import ( DEVCLASS_INVERTER, ENERGY_METER_VIA_INVERTER, OPTIMIZERS_VIA_INVERTER, ) from pysma.definitions import device_type as device_type_sensor from pysma.d...
35.274766
91
0.4867
import logging import re from unittest.mock import patch import aiohttp import pytest from pysma import SMA from pysma.const import ( DEVCLASS_INVERTER, ENERGY_METER_VIA_INVERTER, OPTIMIZERS_VIA_INVERTER, ) from pysma.definitions import device_type as device_type_sensor from pysma.definitions import senso...
true
true
f756c8bcdfac2ee15825e29ca9bf25d4b17a6e88
1,533
py
Python
examples/example.py
jamadagni/textattr
a9a1ed34c3fcd3bc1db00530a84df7d5a5599826
[ "BSD-2-Clause" ]
6
2018-11-08T14:48:07.000Z
2021-04-28T21:25:17.000Z
examples/example.py
jamadagni/textattr
a9a1ed34c3fcd3bc1db00530a84df7d5a5599826
[ "BSD-2-Clause" ]
null
null
null
examples/example.py
jamadagni/textattr
a9a1ed34c3fcd3bc1db00530a84df7d5a5599826
[ "BSD-2-Clause" ]
1
2020-09-05T23:36:24.000Z
2020-09-05T23:36:24.000Z
#! /usr/bin/env python3 # Hello! This is a simple example file for textattr. # All you need to do to use textattr is this line at the beginning: from textattr import * # You can get the escape code for a set of attributes using ta() and save it: taYellowOnBlue = ta("y /b") # You can then input it to print() and such...
45.088235
115
0.705153
from textattr import * taYellowOnBlue = ta("y /b") print(taYellowOnBlue, "Hello!", ta("off"), sep = "") tawrite("@g i u", "text", "@w", "attr", "@off", " tries to be helpful by providing different error messages:\n") badSpecs = ("", "c /r m /g y /b k /l c /r m /g y /b k /l", "longerThanAnyValidSpec",...
true
true
f756c9423bad192a8120a2dff1318b466ba468b1
6,732
py
Python
python/ray/experimental/serve/tests/test_api.py
eisber/ray
94a286ef1d8ad5a3093b7f996a811727fa0e2d3e
[ "Apache-2.0" ]
4
2019-10-18T17:44:58.000Z
2021-04-14T14:37:21.000Z
python/ray/experimental/serve/tests/test_api.py
eisber/ray
94a286ef1d8ad5a3093b7f996a811727fa0e2d3e
[ "Apache-2.0" ]
1
2022-03-30T17:52:44.000Z
2022-03-30T17:52:44.000Z
python/ray/experimental/serve/tests/test_api.py
eisber/ray
94a286ef1d8ad5a3093b7f996a811727fa0e2d3e
[ "Apache-2.0" ]
1
2020-06-26T07:54:25.000Z
2020-06-26T07:54:25.000Z
import time import pytest import requests from ray.experimental import serve from ray.experimental.serve import BackendConfig import ray def test_e2e(serve_instance): serve.init() # so we have access to global state serve.create_endpoint("endpoint", "/api", blocking=True) result = serve.api._get_global_...
33.492537
79
0.677956
import time import pytest import requests from ray.experimental import serve from ray.experimental.serve import BackendConfig import ray def test_e2e(serve_instance): serve.init() serve.create_endpoint("endpoint", "/api", blocking=True) result = serve.api._get_global_state().route_table.list_service() ...
true
true
f756ca9d485f573fb059a623a86acaa4f953f19c
1,232
py
Python
test/sync_tests/test_scopes.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
1
2021-08-13T20:23:56.000Z
2021-08-13T20:23:56.000Z
test/sync_tests/test_scopes.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
null
null
null
test/sync_tests/test_scopes.py
livioribeiro/dependency-injector
ab76415233d7e6f82ff13479d10c2aa0f100c173
[ "Unlicense" ]
null
null
null
import pytest from dependency_injector import Scope from dependency_injector.errors import InvalidScopeError from ..utils import Context from . import ioc class Service1: pass class Service2: def __init__(self, service1: Service1): self.service1 = service1 def test_inject_transient_into_dependen...
22.4
58
0.750812
import pytest from dependency_injector import Scope from dependency_injector.errors import InvalidScopeError from ..utils import Context from . import ioc class Service1: pass class Service2: def __init__(self, service1: Service1): self.service1 = service1 def test_inject_transient_into_dependen...
true
true
f756ccb0c0a7a66b1a558979946105d11a71e212
3,798
py
Python
src/sentry/plugins/providers/integration_repository.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
null
null
null
src/sentry/plugins/providers/integration_repository.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
null
null
null
src/sentry/plugins/providers/integration_repository.py
AlexWayfer/sentry
ef935cda2b2e960bd602fda590540882d1b0712d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import import six from django.db import IntegrityError, transaction from rest_framework.response import Response from sentry import analytics from sentry.api.serializers import serialize from sentry.integrations.exceptions import IntegrationError from sentry.models import Repository fr...
31.65
88
0.550553
from __future__ import absolute_import import six from django.db import IntegrityError, transaction from rest_framework.response import Response from sentry import analytics from sentry.api.serializers import serialize from sentry.integrations.exceptions import IntegrationError from sentry.models import Repository fr...
true
true
f756cd23bb149795654fbacdc1282beadb855109
615
py
Python
bridge_sim/internal/plot/geometry/node.py
jerbaroo/bridge-sim
c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af
[ "MIT" ]
2
2020-05-12T11:41:49.000Z
2020-08-10T15:00:58.000Z
bridge_sim/internal/plot/geometry/node.py
barischrooneyj/bridge-sim
c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af
[ "MIT" ]
48
2020-05-11T23:58:22.000Z
2020-09-18T20:28:52.000Z
bridge_sim/internal/plot/geometry/node.py
jerbaroo/bridge-sim
c4ec1c18a07a78462ccf3b970a99a1bd7efcc2af
[ "MIT" ]
1
2020-05-27T12:43:37.000Z
2020-05-27T12:43:37.000Z
from typing import List import numpy as np from bridge_sim.internal.plot import plt from bridge_sim.internal.plot.geometry.angles import ax_3d from bridge_sim.sim.model import Node def node_scatter_3d(nodes: List[Node], new_fig: bool = True): # Split into separate arrays of x, y and z position, and colors. ...
26.73913
68
0.660163
from typing import List import numpy as np from bridge_sim.internal.plot import plt from bridge_sim.internal.plot.geometry.angles import ax_3d from bridge_sim.sim.model import Node def node_scatter_3d(nodes: List[Node], new_fig: bool = True): xs = np.array([n.x for n in nodes]) ys = np.array([n.y for n...
true
true
f756d08711874c4f6ea73a9b17c4461eb5821039
808
py
Python
setup.py
carlos-gutier/lambdata
d41129a8f43d741c19db8ccd1fdd001007c969b3
[ "MIT" ]
null
null
null
setup.py
carlos-gutier/lambdata
d41129a8f43d741c19db8ccd1fdd001007c969b3
[ "MIT" ]
4
2020-03-24T16:45:55.000Z
2021-06-01T23:29:49.000Z
setup.py
carlos-gutier/lambdata
d41129a8f43d741c19db8ccd1fdd001007c969b3
[ "MIT" ]
1
2019-02-14T16:06:25.000Z
2019-02-14T16:06:25.000Z
#!/usr/bin/env python """ Package setup/installation and metadata for lambdata """ import setuptools REQUIRED = [ "numpy", "pandas", "sklearn" ] with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() setuptools.setup( name="lambdata-carlosgutier", version="0.0.8", author="carlos...
24.484848
64
0.665842
import setuptools REQUIRED = [ "numpy", "pandas", "sklearn" ] with open("README.md", "r") as fh: LONG_DESCRIPTION = fh.read() setuptools.setup( name="lambdata-carlosgutier", version="0.0.8", author="carlos-gutier", description="A collection of Data Science helper functions", lon...
true
true
f756d0e72b5214bd19f4c2e3ac20e16c3990c0b1
3,850
py
Python
qtcnc.py
dakoner/qtcnc
0f7246ad9aaaadef1b0d13e54180f995dc7f4202
[ "Apache-2.0" ]
1
2021-03-04T21:44:39.000Z
2021-03-04T21:44:39.000Z
qtcnc.py
dakoner/qtcnc
0f7246ad9aaaadef1b0d13e54180f995dc7f4202
[ "Apache-2.0" ]
null
null
null
qtcnc.py
dakoner/qtcnc
0f7246ad9aaaadef1b0d13e54180f995dc7f4202
[ "Apache-2.0" ]
null
null
null
from PyQt5 import QtWidgets, QtCore, uic import sys import os from mqtt_qobject import MqttClient def distance_for_button(button): on = button.objectName() if on == 'distance_point1': return 0.1 elif on == 'distance_1': return 1 elif on == 'distance_10': return 10 elif on...
33.77193
107
0.656364
from PyQt5 import QtWidgets, QtCore, uic import sys import os from mqtt_qobject import MqttClient def distance_for_button(button): on = button.objectName() if on == 'distance_point1': return 0.1 elif on == 'distance_1': return 1 elif on == 'distance_10': return 10 elif on...
true
true
f756d11b9f8fa11ea125981a153245dc5d978d99
125
py
Python
hooks/post_gen_project.py
claui/cookiecutter-ansible-playbook
8a19523441807e67ea572ffc96f83825766980af
[ "Apache-2.0" ]
2
2021-05-05T21:28:18.000Z
2021-05-09T16:53:17.000Z
hooks/post_gen_project.py
claui/cookiecutter-ansible-playbook
8a19523441807e67ea572ffc96f83825766980af
[ "Apache-2.0" ]
null
null
null
hooks/post_gen_project.py
claui/cookiecutter-ansible-playbook
8a19523441807e67ea572ffc96f83825766980af
[ "Apache-2.0" ]
null
null
null
import os import shutil os.unlink('filter_plugins/.keep') os.unlink('inventory/group_vars/.keep') shutil.rmtree('licenses')
17.857143
39
0.776
import os import shutil os.unlink('filter_plugins/.keep') os.unlink('inventory/group_vars/.keep') shutil.rmtree('licenses')
true
true
f756d199a4d8d730b641971f8f55d5f560f6757f
825
py
Python
copulas/univariate/__init__.py
pvk-developer/Copulas
4de54e946ecb1e2bf831874e6a00a7d04d302804
[ "MIT" ]
71
2018-06-20T12:07:34.000Z
2020-01-03T21:43:01.000Z
copulas/univariate/__init__.py
Hooddi/Copulas
86dc1304fe4ffb51302fc37801d7f18c4ab4d88d
[ "MIT" ]
75
2018-06-20T09:46:07.000Z
2019-12-23T15:04:19.000Z
copulas/univariate/__init__.py
Hooddi/Copulas
86dc1304fe4ffb51302fc37801d7f18c4ab4d88d
[ "MIT" ]
25
2018-06-24T18:01:11.000Z
2020-01-02T14:30:09.000Z
"""Univariate copulas module.""" from copulas.univariate.base import BoundedType, ParametricType, Univariate from copulas.univariate.beta import BetaUnivariate from copulas.univariate.gamma import GammaUnivariate from copulas.univariate.gaussian import GaussianUnivariate from copulas.univariate.gaussian_kde import Gau...
31.730769
75
0.801212
from copulas.univariate.base import BoundedType, ParametricType, Univariate from copulas.univariate.beta import BetaUnivariate from copulas.univariate.gamma import GammaUnivariate from copulas.univariate.gaussian import GaussianUnivariate from copulas.univariate.gaussian_kde import GaussianKDE from copulas.univariate....
true
true
f756d36b3794a1bf28f31821b4e133b6550b5f71
11,830
py
Python
endpoints/api/robot.py
sferich888/quay
4672db1df76874238baf134d04e74112ac9f630d
[ "Apache-2.0" ]
1
2020-10-16T19:30:41.000Z
2020-10-16T19:30:41.000Z
endpoints/api/robot.py
sferich888/quay
4672db1df76874238baf134d04e74112ac9f630d
[ "Apache-2.0" ]
15
2020-06-18T15:32:06.000Z
2022-03-03T23:06:24.000Z
endpoints/api/robot.py
sferich888/quay
4672db1df76874238baf134d04e74112ac9f630d
[ "Apache-2.0" ]
null
null
null
""" Manage user and organization robot accounts. """ from endpoints.api import ( resource, nickname, ApiResource, log_action, related_user_resource, require_user_admin, require_scope, path_param, parse_args, query_param, validate_json_request, max_json_size, ) from endpo...
32.952646
98
0.655368
from endpoints.api import ( resource, nickname, ApiResource, log_action, related_user_resource, require_user_admin, require_scope, path_param, parse_args, query_param, validate_json_request, max_json_size, ) from endpoints.api.robot_models_pre_oci import pre_oci_model as...
true
true
f756d4d4313a30f55d891f7959d655cbc188e8c8
1,808
py
Python
pandaserver/test/testEvgen17.py
virthead/panda-server
d2b65f788c4539dc103641ca2a8052cb18729d44
[ "Apache-2.0" ]
7
2015-03-30T14:15:35.000Z
2021-12-22T06:48:22.000Z
pandaserver/test/testEvgen17.py
virthead/panda-server
d2b65f788c4539dc103641ca2a8052cb18729d44
[ "Apache-2.0" ]
16
2015-06-01T13:48:01.000Z
2022-02-08T15:03:32.000Z
pandaserver/test/testEvgen17.py
virthead/panda-server
d2b65f788c4539dc103641ca2a8052cb18729d44
[ "Apache-2.0" ]
15
2015-03-02T08:57:35.000Z
2022-03-01T09:48:45.000Z
import sys import time import uuid import pandaserver.userinterface.Client as Client from pandaserver.taskbuffer.JobSpec import JobSpec from pandaserver.taskbuffer.FileSpec import FileSpec site = sys.argv[1] cloud = sys.argv[2] datasetName = 'panda.destDB.%s' % str(uuid.uuid4()) destName = None jobList = [] fo...
30.644068
92
0.646018
import sys import time import uuid import pandaserver.userinterface.Client as Client from pandaserver.taskbuffer.JobSpec import JobSpec from pandaserver.taskbuffer.FileSpec import FileSpec site = sys.argv[1] cloud = sys.argv[2] datasetName = 'panda.destDB.%s' % str(uuid.uuid4()) destName = None jobList = [] fo...
true
true
f756d61597eb5dea8dfc0cfbae0f1c1983047260
823
py
Python
subnet_calculator/modules/validate_ip_input.py
datboyblu3/Subnet_Calculator
f008baec7c28ab0c94e625150261886180a3027f
[ "MIT" ]
null
null
null
subnet_calculator/modules/validate_ip_input.py
datboyblu3/Subnet_Calculator
f008baec7c28ab0c94e625150261886180a3027f
[ "MIT" ]
null
null
null
subnet_calculator/modules/validate_ip_input.py
datboyblu3/Subnet_Calculator
f008baec7c28ab0c94e625150261886180a3027f
[ "MIT" ]
null
null
null
import os.path import argparse #Author: Daniel Edwards #Date: 12-08-2021 #Validate IP file existence parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', help='Specify the file and/or the file\'s path containing IP addresses') parser.add_argument('-i', '--ip', nargs='+', help='Specify IP address(es)...
20.575
108
0.707169
import os.path import argparse parser = argparse.ArgumentParser() parser.add_argument('-f', '--file', help='Specify the file and/or the file\'s path containing IP addresses') parser.add_argument('-i', '--ip', nargs='+', help='Specify IP address(es)') args = parser.parse_args() #Determine def validate_ip_input():...
true
true
f756d650995fe564dd688c5026af41062386cb87
1,400
py
Python
actstream/jsonfield.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
actstream/jsonfield.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
actstream/jsonfield.py
pandabearcoder/django-activity-stream
5f83213031a69bb2608327f97ff50e6bff125776
[ "BSD-3-Clause" ]
null
null
null
''' Decide on a JSONField implementation based on available packages. There are two possible options, preferred in the following order: - JSONField from django-jsonfield with django-jsonfield-compat - JSONField from django-mysql (needs MySQL 5.7+) Raises an ImportError if USE_JSONFIELD is True but none of these ...
27.45098
70
0.702857
from django.db import models from django.core.exceptions import ImproperlyConfigured from actstream.settings import USE_JSONFIELD __all__ = ('DataField', 'register_app') def register_app(app): pass DataField = models.TextField if USE_JSONFIELD: try: from jsonfield_compat import JSONField, regist...
true
true
f756d8f4819b5f77a64a8d1128f1b0142aa9e6a1
1,307
py
Python
jang_src/csi_opencv_tester/src/bridger.py
leesuengyeol/goingHome_project
0c32f9f4194f0294510720ff2302d5d4a1df8ed5
[ "Apache-2.0" ]
null
null
null
jang_src/csi_opencv_tester/src/bridger.py
leesuengyeol/goingHome_project
0c32f9f4194f0294510720ff2302d5d4a1df8ed5
[ "Apache-2.0" ]
null
null
null
jang_src/csi_opencv_tester/src/bridger.py
leesuengyeol/goingHome_project
0c32f9f4194f0294510720ff2302d5d4a1df8ed5
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import roslib roslib.load_manifest('csi_opencv_tester') import sys import rospy import cv2 from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init__(self): # sel...
25.134615
94
0.717674
from __future__ import print_function import roslib roslib.load_manifest('csi_opencv_tester') import sys import rospy import cv2 from std_msgs.msg import String from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError class image_converter: def __init__(self): self.bridge = CvBrid...
true
true
f756da708a9e02ad42537b2ba3ca4bd233adcb4c
8,753
py
Python
releasenotes/source/conf.py
mail2nsrajesh/puppet-ceilometer
7da50571cf98d215c8551b52cacb4f891d5f4207
[ "Apache-2.0" ]
null
null
null
releasenotes/source/conf.py
mail2nsrajesh/puppet-ceilometer
7da50571cf98d215c8551b52cacb4f891d5f4207
[ "Apache-2.0" ]
null
null
null
releasenotes/source/conf.py
mail2nsrajesh/puppet-ceilometer
7da50571cf98d215c8551b52cacb4f891d5f4207
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software...
33.155303
109
0.722724
import openstackdocstheme extensions = [ 'reno.sphinxext', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'puppet-ceilometer Release Notes' copyright = u'2017, Puppet OpenStack Developers' # |version| and |release|, also used in var...
true
true
f756db772fe9a55d60853169edcbf2a64dd0f79b
2,860
py
Python
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb3.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
2,757
2018-04-28T21:41:36.000Z
2022-03-29T06:33:36.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb3.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
20
2019-07-23T15:29:32.000Z
2022-01-21T12:53:04.000Z
AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_bsddb3.py
CEOALT1/RefindPlusUDK
116b957ad735f96fbb6d80a0ba582046960ba164
[ "BSD-2-Clause" ]
449
2018-05-09T05:54:05.000Z
2022-03-30T14:54:18.000Z
# Test driver for bsddb package. """ Run all test cases. """ import os import sys import tempfile import time import unittest from test.test_support import requires, run_unittest, import_module # Skip test if _bsddb module was not built. import_module('_bsddb') # Silence Py3k warning import_module('bsddb...
34.878049
81
0.656294
import os import sys import tempfile import time import unittest from test.test_support import requires, run_unittest, import_module import_module('_bsddb') import_module('bsddb', deprecated=True) if __name__ != '__main__': requires('bsddb') verbose = False if 'verbose' in sys.argv: verbo...
true
true
f756dca41c72bb8dc4ed9edccf254680ef8ee21d
6,816
py
Python
testing/python/show_fixtures_per_test.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
9,225
2015-06-15T21:56:14.000Z
2022-03-31T20:47:38.000Z
testing/python/show_fixtures_per_test.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
7,794
2015-06-15T21:06:34.000Z
2022-03-31T10:56:54.000Z
testing/python/show_fixtures_per_test.py
markshao/pytest
611b579d21f7e62b4c8ed54ab70fbfee7c6f5f64
[ "MIT" ]
2,598
2015-06-15T21:42:39.000Z
2022-03-29T13:48:22.000Z
from _pytest.pytester import Pytester def test_no_items_should_not_show_output(pytester: Pytester) -> None: result = pytester.runpytest("--fixtures-per-test") result.stdout.no_fnmatch_line("*fixtures used by*") assert result.ret == 0 def test_fixtures_in_module(pytester: Pytester) -> None: p = pytes...
26.729412
80
0.527435
from _pytest.pytester import Pytester def test_no_items_should_not_show_output(pytester: Pytester) -> None: result = pytester.runpytest("--fixtures-per-test") result.stdout.no_fnmatch_line("*fixtures used by*") assert result.ret == 0 def test_fixtures_in_module(pytester: Pytester) -> None: p = pytes...
true
true
f756dcf215bf612082a8f00ebc76f549e5e18374
5,060
py
Python
.openshift-ci/runners.py
stackrox/stackrox
3b2929fd5f2bc68d5742bd958a22e03202ae6be4
[ "Apache-2.0" ]
22
2022-03-31T14:32:18.000Z
2022-03-31T22:11:30.000Z
.openshift-ci/runners.py
stackrox/stackrox
3b2929fd5f2bc68d5742bd958a22e03202ae6be4
[ "Apache-2.0" ]
5
2022-03-31T14:35:28.000Z
2022-03-31T22:40:13.000Z
.openshift-ci/runners.py
stackrox/stackrox
3b2929fd5f2bc68d5742bd958a22e03202ae6be4
[ "Apache-2.0" ]
4
2022-03-31T16:33:58.000Z
2022-03-31T22:19:26.000Z
#!/usr/bin/env python3 """ Common test run patterns """ from datetime import datetime from clusters import NullCluster from pre_tests import NullPreTest from ci_tests import NullTest from post_tests import NullPostTest class ClusterTestSetsRunner: """A cluster test runner that runs multiple sets of pre, test & ...
32.435897
85
0.519763
from datetime import datetime from clusters import NullCluster from pre_tests import NullPreTest from ci_tests import NullTest from post_tests import NullPostTest class ClusterTestSetsRunner: def __init__( self, cluster=NullCluster(), final_post=NullPostTest(), sets=None, )...
true
true
f756ddf67db85cf74cd46b5e90ed19ef6fd17367
32,091
py
Python
gazoo_device/fire_manager.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
gazoo_device/fire_manager.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
1
2021-06-24T19:20:50.000Z
2021-06-24T19:20:50.000Z
gazoo_device/fire_manager.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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, ...
38.249106
109
0.675361
import codecs import enum import inspect import json import logging import os.path import pydoc import re import sys import textwrap import time from typing import Any, Collection, Optional, Type from gazoo_device import config from gazoo_device import decorators from gazoo_device import errors from gazo...
true
true
f756de245c2070683bc1690cfe53c5a5df42e448
3,829
py
Python
mythril/ethereum/interface/leveldb/state.py
afuch05/mythril-classic
de562335a62703429e085de7088a3e543f84e94f
[ "MIT" ]
6
2021-02-13T05:03:32.000Z
2021-09-19T14:57:58.000Z
mythril/ethereum/interface/leveldb/state.py
cryptobarbossa/mythril-classic
5dd544d301238db2bc536d7cee69b96e9a15e9c4
[ "MIT" ]
null
null
null
mythril/ethereum/interface/leveldb/state.py
cryptobarbossa/mythril-classic
5dd544d301238db2bc536d7cee69b96e9a15e9c4
[ "MIT" ]
2
2020-05-26T15:03:20.000Z
2021-07-29T09:09:05.000Z
import rlp import binascii from ethereum.utils import ( normalize_address, hash32, trie_root, big_endian_int, address, int256, encode_hex, encode_int, big_endian_to_int, int_to_addr, zpad, parse_as_bin, parse_as_int, decode_hex, sha3, is_string, is_num...
26.047619
85
0.58971
import rlp import binascii from ethereum.utils import ( normalize_address, hash32, trie_root, big_endian_int, address, int256, encode_hex, encode_int, big_endian_to_int, int_to_addr, zpad, parse_as_bin, parse_as_int, decode_hex, sha3, is_string, is_num...
true
true
f756de3c3c132563ef2c9f33c4f282ec7b7d6d98
1,339
py
Python
tests/unit/test_onnx_bert_rerank.py
dravog7/nboost
e0c086db2eaa8601c20244c81d8f5483b7491902
[ "Apache-2.0" ]
5
2020-03-30T12:50:56.000Z
2022-01-20T22:45:29.000Z
tests/unit/test_onnx_bert_rerank.py
dravog7/nboost
e0c086db2eaa8601c20244c81d8f5483b7491902
[ "Apache-2.0" ]
9
2020-11-13T18:41:44.000Z
2022-02-10T01:58:28.000Z
tests/unit/test_onnx_bert_rerank.py
dravog7/nboost
e0c086db2eaa8601c20244c81d8f5483b7491902
[ "Apache-2.0" ]
1
2020-03-30T17:29:05.000Z
2020-03-30T17:29:05.000Z
from nboost.plugins.models import resolve_model from nboost import defaults import unittest import numpy as np class TestPtBertRerankModelPlugin(unittest.TestCase): def setUp(self): self.model = resolve_model( model_dir='onnx-bert-base-msmarco', data_dir=defaults.data_dir, ...
33.475
84
0.652726
from nboost.plugins.models import resolve_model from nboost import defaults import unittest import numpy as np class TestPtBertRerankModelPlugin(unittest.TestCase): def setUp(self): self.model = resolve_model( model_dir='onnx-bert-base-msmarco', data_dir=defaults.data_dir, ...
true
true
f756de837c866b083260fdda782261d0f95e7d90
21,818
py
Python
thermostat_daemon.py
mholgatem/ThermOS
44fc4398d26ee45958228158dd9957262cc81521
[ "MIT" ]
79
2016-09-09T11:18:27.000Z
2022-03-26T03:40:19.000Z
thermostat_daemon.py
mholgatem/ThermOS
44fc4398d26ee45958228158dd9957262cc81521
[ "MIT" ]
21
2016-09-19T16:30:24.000Z
2022-03-02T18:20:51.000Z
thermostat_daemon.py
mholgatem/ThermOS
44fc4398d26ee45958228158dd9957262cc81521
[ "MIT" ]
26
2016-09-09T12:17:22.000Z
2022-01-22T22:53:44.000Z
#! /usr/bin/python -u from __future__ import print_function from datetime import * import os import RPi.GPIO as GPIO import scheduler import signal import smtplib import sqlite3 import subprocess import sys import time import forecastio import tempSensor __version__ = 2.3 # set working directory to where "thermos_da...
45.932632
156
0.504171
from __future__ import print_function from datetime import * import os import RPi.GPIO as GPIO import scheduler import signal import smtplib import sqlite3 import subprocess import sys import time import forecastio import tempSensor __version__ = 2.3 abspath = os.path.abspath(__file__) dname = os.path.dirname(absp...
true
true
f756de858442a095cd631c5309190df1d108d65f
1,876
py
Python
test/test_grid.py
G-linch/pyecharts
8cee0f9fd9800ea388b1199ec6ac4746dd8e5455
[ "MIT" ]
1
2019-07-02T18:45:29.000Z
2019-07-02T18:45:29.000Z
test/test_grid.py
G-linch/pyecharts
8cee0f9fd9800ea388b1199ec6ac4746dd8e5455
[ "MIT" ]
1
2019-08-16T06:20:23.000Z
2019-08-16T06:20:23.000Z
test/test_grid.py
G-linch/pyecharts
8cee0f9fd9800ea388b1199ec6ac4746dd8e5455
[ "MIT" ]
1
2020-07-06T05:51:14.000Z
2020-07-06T05:51:14.000Z
from nose.tools import eq_ from pyecharts import options as opts from pyecharts.charts import Bar, Grid, Line def _chart_for_grid() -> Bar: x_data = ["{}月".format(i) for i in range(1, 13)] bar = ( Bar() .add_xaxis(x_data) .add_yaxis( "蒸发量", [2.0, 4...
30.754098
87
0.535181
from nose.tools import eq_ from pyecharts import options as opts from pyecharts.charts import Bar, Grid, Line def _chart_for_grid() -> Bar: x_data = ["{}月".format(i) for i in range(1, 13)] bar = ( Bar() .add_xaxis(x_data) .add_yaxis( "蒸发量", [2.0, 4...
true
true
f756dfde4bca406a69d86e29cbf10a3a4b24edf2
22,654
py
Python
civpy/survey/alignment.py
mpewsey/civpy
bbf74b1c04ca9f7604831f5280cc80d796240e67
[ "BSD-3-Clause" ]
9
2019-07-02T01:16:02.000Z
2022-02-10T21:30:32.000Z
civpy/survey/alignment.py
mpewsey/civpy
bbf74b1c04ca9f7604831f5280cc80d796240e67
[ "BSD-3-Clause" ]
2
2019-05-05T02:46:18.000Z
2019-05-05T04:47:11.000Z
civpy/survey/alignment.py
mpewsey/civpy
bbf74b1c04ca9f7604831f5280cc80d796240e67
[ "BSD-3-Clause" ]
1
2019-04-20T05:29:55.000Z
2019-04-20T05:29:55.000Z
""" Copyright (c) 2019, Matt Pewsey """ import attr import numpy as np import matplotlib.pyplot as plt from .spatial_hash import SpatialHash __all__ = ['Alignment'] @attr.s(hash=False) class Alignment(object): """ A class representing a survey alignment. Parameters ---------- name : str ...
31.551532
85
0.51876
import attr import numpy as np import matplotlib.pyplot as plt from .spatial_hash import SpatialHash __all__ = ['Alignment'] @attr.s(hash=False) class Alignment(object): BISC_TOL = 1e-4 name = attr.ib() pis = attr.ib(default=[]) stakes = attr.ib(default=[]) grid = attr.ib(default=10)...
true
true
f756dfdff5e52b4671981215e6ccb93c117657c3
10,403
py
Python
examples/pytorch/rgcn-hetero-ogbn-mag/model.py
lfchener/dgl
77f4287a4118db64c46f4f413a426e1419a09d53
[ "Apache-2.0" ]
9,516
2018-12-08T22:11:31.000Z
2022-03-31T13:04:33.000Z
examples/pytorch/rgcn-hetero-ogbn-mag/model.py
lfchener/dgl
77f4287a4118db64c46f4f413a426e1419a09d53
[ "Apache-2.0" ]
2,494
2018-12-08T22:43:00.000Z
2022-03-31T21:16:27.000Z
examples/pytorch/rgcn-hetero-ogbn-mag/model.py
lfchener/dgl
77f4287a4118db64c46f4f413a426e1419a09d53
[ "Apache-2.0" ]
2,529
2018-12-08T22:56:14.000Z
2022-03-31T13:07:41.000Z
from typing import Callable, Dict, List, Union import dgl import dgl.nn.pytorch as dglnn import torch import torch.nn as nn class RelGraphEmbedding(nn.Module): def __init__( self, hg: dgl.DGLHeteroGraph, embedding_size: int, num_nodes: Dict[str, int], node_feats: Dict[str,...
31.524242
92
0.537441
from typing import Callable, Dict, List, Union import dgl import dgl.nn.pytorch as dglnn import torch import torch.nn as nn class RelGraphEmbedding(nn.Module): def __init__( self, hg: dgl.DGLHeteroGraph, embedding_size: int, num_nodes: Dict[str, int], node_feats: Dict[str,...
true
true
f756e1cb060aa3df9fc8c9866ac06683a65aec2c
4,435
py
Python
src/oci/vulnerability_scanning/models/host_scan_agent_configuration_oci.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/vulnerability_scanning/models/host_scan_agent_configuration_oci.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/vulnerability_scanning/models/host_scan_agent_configuration_oci.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
42.644231
245
0.733258
from .host_scan_agent_configuration import HostScanAgentConfiguration from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class HostScanAgentConfigurationOCI(HostScanAgentConfiguration)...
true
true
f756e393d8bf919629514d5501168ff1da73e7ed
204
py
Python
penerimaan_biji/penerimaan_biji/doctype/tambang/test_tambang.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
penerimaan_biji/penerimaan_biji/doctype/tambang/test_tambang.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
penerimaan_biji/penerimaan_biji/doctype/tambang/test_tambang.py
bobzz-zone/Biji
02bf9001c7bd505041de57c4b952733421b80815
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2018, PT DAS and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest class TestTambang(unittest.TestCase): pass
18.545455
45
0.759804
from __future__ import unicode_literals import frappe import unittest class TestTambang(unittest.TestCase): pass
true
true
f756e39f72503e3b3d61640e1653d0cae597d516
1,080
py
Python
tests/switch/test_switch.py
aroberge/ideas
f0c8a49f7030276f629101480be77138db07d881
[ "MIT" ]
36
2020-02-23T19:06:24.000Z
2022-02-20T22:53:02.000Z
tests/switch/test_switch.py
aroberge/ideas
f0c8a49f7030276f629101480be77138db07d881
[ "MIT" ]
13
2020-02-21T15:25:40.000Z
2021-07-01T09:56:35.000Z
tests/switch/test_switch.py
aroberge/ideas
f0c8a49f7030276f629101480be77138db07d881
[ "MIT" ]
1
2020-11-05T13:12:07.000Z
2020-11-05T13:12:07.000Z
from ideas.examples import switch from ideas.import_hook import remove_hook def test_transform(): source = """ switch EXPR: case EXPR_1: SUITE case EXPR_2: SUITE case in (EXPR_3, EXPR_4, ...): SUITE else: ...
21.176471
75
0.524074
from ideas.examples import switch from ideas.import_hook import remove_hook def test_transform(): source = """ switch EXPR: case EXPR_1: SUITE case EXPR_2: SUITE case in (EXPR_3, EXPR_4, ...): SUITE else: ...
true
true
f756e3e02d6dd3f3a3d92dd6ddeec4e467dcfefb
25,216
py
Python
cloudmersive_validate_api_client/api_client.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
3
2018-06-23T21:37:21.000Z
2020-04-20T23:07:36.000Z
cloudmersive_validate_api_client/api_client.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
1
2019-02-04T17:03:35.000Z
2019-03-02T20:16:52.000Z
cloudmersive_validate_api_client/api_client.py
Cloudmersive/Cloudmersive.APIClient.Python.Validate
894a3f578c3860db41b3eed179dcc52e02f565a0
[ "Apache-2.0" ]
2
2019-03-21T15:54:15.000Z
2020-05-27T17:30:43.000Z
# coding: utf-8 """ validateapi The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501 OpenAPI spec version: v1 Gen...
39.461659
240
0.554965
from __future__ import absolute_import import datetime import json import mimetypes from multiprocessing.pool import ThreadPool import os import re import tempfile import six from six.moves.urllib.parse import quote from cloudmersive_validate_api_client.configuration import Configuration import cloudmersive_valid...
true
true
f756e5327d748cb64fba07bd6b64031c554fc8df
16,874
py
Python
scripts/mgear/maya/transform.py
KRNKRS/mgear
06ddc26c5adb5eab07ca470c7fafa77404c8a1de
[ "MIT" ]
94
2017-12-16T07:42:06.000Z
2022-03-28T07:40:04.000Z
scripts/mgear/maya/transform.py
KRNKRS/mgear
06ddc26c5adb5eab07ca470c7fafa77404c8a1de
[ "MIT" ]
66
2017-12-02T14:30:35.000Z
2019-01-14T01:17:38.000Z
scripts/mgear/maya/transform.py
KRNKRS/mgear
06ddc26c5adb5eab07ca470c7fafa77404c8a1de
[ "MIT" ]
27
2018-06-11T14:16:17.000Z
2022-01-09T15:19:32.000Z
"""Functions to work with matrix and transformations""" import math from pymel import util from pymel.core import datatypes, nodetypes from . import vector ############################################# # TRANSFORM ############################################# def getTranslation(node): """Return the position o...
25.336336
74
0.52329
import math from pymel import util from pymel.core import datatypes, nodetypes from . import vector ] else: v0 = positions[i - 1] v1 = positions[i] v2 = positions[i + 1] if i > 0 and i != len(positions) - 1: normal = vector.getTransposedVect...
true
true
f756e58cbbfc3c8865b1e046aa201d8c98c49fce
1,403
py
Python
Easy/589.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
6
2017-09-25T18:05:50.000Z
2019-03-27T00:23:15.000Z
Easy/589.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
1
2017-10-29T12:04:41.000Z
2018-08-16T18:00:37.000Z
Easy/589.py
Hellofafar/Leetcode
7a459e9742958e63be8886874904e5ab2489411a
[ "CNRI-Python" ]
null
null
null
# ------------------------------ # 589. N-ary Tree Preorder Traversal # # Description: # Given an n-ary tree, return the preorder traversal of its nodes' values. # For example, given a 3-ary tree: # Return its preorder traversal as: [1,3,5,6,2,4]. # Note: Recursive solution is trivial, could you do it iteratively? # ...
28.632653
139
0.564505
# For example, given a 3-ary tree: # Return its preorder traversal as: [1,3,5,6,2,4]. # Note: Recursive solution is trivial, could you do it iteratively? # # Version: 1.0 # 07/20/18 by Jianfa # ------------------------------ class Solution(object): def preorder(self, root): if not root: r...
true
true
f756e63a77c58fdd2f3cc0a68e7bff34b43d8d91
1,948
py
Python
test.py
iptk/iptk-py
356e3a4b1acee05b03d25c14f2545a1d12f83787
[ "MIT" ]
null
null
null
test.py
iptk/iptk-py
356e3a4b1acee05b03d25c14f2545a1d12f83787
[ "MIT" ]
null
null
null
test.py
iptk/iptk-py
356e3a4b1acee05b03d25c14f2545a1d12f83787
[ "MIT" ]
1
2020-05-17T21:45:01.000Z
2020-05-17T21:45:01.000Z
# A DatasetStore can be used to create and retrieve IPTK Datasets from iptk import DatasetStore ds = DatasetStore("test_store/") # Each IPTK dataset needs a unique identifier. Using the SHA1 hash of a unique # descriptor of the files in the dataset is strongly recommended. For DICOM # data, the SeriesInstanceUID field...
43.288889
87
0.771047
from iptk import DatasetStore ds = DatasetStore("test_store/") import hashlib, pydicom dicom_info = pydicom.read_file("test_data/IM-0001-0001.dcm") hash = hashlib.sha1(dicom_info.SeriesInstanceUID.encode('utf-8')).hexdigest().lower() dataset = ds.dataset(hash) # the dataset, copy files to that location. from gl...
true
true
f756e7746121602d81f98f64c8fb49f0ec7cb53d
625
py
Python
data_processing/make_regions.py
markloboda/PR21mlfjis
0ebf388236daab02ce1efc514284802b8ab07ef9
[ "MIT" ]
null
null
null
data_processing/make_regions.py
markloboda/PR21mlfjis
0ebf388236daab02ce1efc514284802b8ab07ef9
[ "MIT" ]
null
null
null
data_processing/make_regions.py
markloboda/PR21mlfjis
0ebf388236daab02ce1efc514284802b8ab07ef9
[ "MIT" ]
null
null
null
from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="appleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Mobile Safari/537.36") location = geolocator.geocode("jugovzhodna Slovenija", geometry="wkt") geometry = location.raw["geotext"].replace("POLYGON((", "").replace("))", "") geometry = ge...
32.894737
117
0.6752
from geopy.geocoders import Nominatim geolocator = Nominatim(user_agent="appleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Mobile Safari/537.36") location = geolocator.geocode("jugovzhodna Slovenija", geometry="wkt") geometry = location.raw["geotext"].replace("POLYGON((", "").replace("))", "") geometry = ge...
true
true
f756e816f927a7e2b59a49a4342727c6402d275c
790
py
Python
server/util/connector.py
1214367903/CubeOnline
1005847f836352f64ad3f8685d8b7882ff5bbdfe
[ "MIT" ]
null
null
null
server/util/connector.py
1214367903/CubeOnline
1005847f836352f64ad3f8685d8b7882ff5bbdfe
[ "MIT" ]
1
2021-03-03T14:05:56.000Z
2021-03-03T14:10:26.000Z
server/util/connector.py
1214367903/CubeOnline
1005847f836352f64ad3f8685d8b7882ff5bbdfe
[ "MIT" ]
null
null
null
""" 目前的服务主要是请求本地的一个接口,以及微信获取open_id的接口 因此,使用连接池理论上会有更好的性能 tornado没有自带的连接池,只好上aiohttp了 """ from typing import Optional import aiohttp from config import connection_config from util import UtilError _client = None async def init() -> None: global _client if _client is not None: return # client对象...
19.268293
65
0.721519
from typing import Optional import aiohttp from config import connection_config from util import UtilError _client = None async def init() -> None: global _client if _client is not None: return _client = aiohttp.ClientSession(**connection_config) def get_client() -> Optional[aiohttp.Cli...
true
true
f756e92b670506cc7755a944b4cf9ed463b78e8c
22,615
py
Python
graph_class.py
vishalbelsare/GNN_tf_2.x
4b6429ed58f2c0922257600a9287d5cc5a10395b
[ "BSD-3-Clause" ]
3
2021-04-09T08:45:04.000Z
2021-12-06T12:00:18.000Z
graph_class.py
vishalbelsare/GNN_tf_2.x
4b6429ed58f2c0922257600a9287d5cc5a10395b
[ "BSD-3-Clause" ]
null
null
null
graph_class.py
vishalbelsare/GNN_tf_2.x
4b6429ed58f2c0922257600a9287d5cc5a10395b
[ "BSD-3-Clause" ]
2
2020-11-23T09:57:00.000Z
2021-03-24T05:37:13.000Z
# coding=utf-8 import os import shutil import numpy as np import tensorflow as tf from scipy.sparse import coo_matrix ####################################################################################################################### ## GRAPH OBJECT CLASS ########################################################...
60.630027
144
0.593854
import os import shutil import numpy as np import tensorflow as tf from scipy.sparse import coo_matrix
true
true
f756eb427d0acaadb1cc5e83a1207aaafbe679c2
5,436
py
Python
ambari-agent/src/main/python/ambari_agent/DataCleaner.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2015-05-04T12:19:05.000Z
2015-05-04T12:19:05.000Z
ambari-agent/src/main/python/ambari_agent/DataCleaner.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
null
null
null
ambari-agent/src/main/python/ambari_agent/DataCleaner.py
nexr/ambari
8452f207d7b9343a162698f2a2b79bf2c512e9d3
[ "Apache-2.0" ]
1
2021-01-07T08:55:01.000Z
2021-01-07T08:55:01.000Z
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
40.567164
115
0.697756
import AmbariConfig import threading import os import time import re import logging logger = logging.getLogger() class DataCleaner(threading.Thread): COMMAND_FILE_NAMES_PATTERN = 'errors-\d+.txt|output-\d+.txt|site-\d+.pp|structured-out-\d+.json|command-\d+.json' AUTO_COMMAND_FILE_NAMES_PATTERN = \ 'auto_c...
true
true
f756eb5a002fc4c4ab484a9f3aa7cff66872c828
1,807
py
Python
test/functional/rpc_setban.py
FihlaTV/lbrycrd
c54af21ce2758490ae3f8340c73cf0f2401801cc
[ "MIT" ]
null
null
null
test/functional/rpc_setban.py
FihlaTV/lbrycrd
c54af21ce2758490ae3f8340c73cf0f2401801cc
[ "MIT" ]
null
null
null
test/functional/rpc_setban.py
FihlaTV/lbrycrd
c54af21ce2758490ae3f8340c73cf0f2401801cc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the setban rpc call.""" from test_framework.test_framework import BitcoinTestFramework from test_...
37.645833
96
0.652463
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( connect_nodes, p2p_port ) class SetBanTests(BitcoinTestFramework): def set_test_params(self): self.num_nodes = 2 self.setup_clean_chain = True self.extra_args = [[],[]] def run...
true
true
f756ed93a57192482f58eea11ff11a79c8787303
9,864
py
Python
bot.py
frizensami/sg-blood-stocks-bot
7783399330dcdf04870be85d004323a5c516a29a
[ "MIT" ]
1
2022-01-25T02:54:31.000Z
2022-01-25T02:54:31.000Z
bot.py
frizensami/sg-blood-stocks-bot
7783399330dcdf04870be85d004323a5c516a29a
[ "MIT" ]
4
2021-06-07T12:19:32.000Z
2021-06-09T05:02:36.000Z
bot.py
frizensami/sgbloodstocksbot
7783399330dcdf04870be85d004323a5c516a29a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from telegram import Update from telegram.ext import ( Updater, CommandHandler, CallbackContext, MessageHandler, Filters, CallbackQueryHandler, ) import telegram import sys from datetime import datetime import pytz # Us from scraper import get_bloodstocks from strings imp...
32.235294
156
0.667985
from telegram import Update from telegram.ext import ( Updater, CommandHandler, CallbackContext, MessageHandler, Filters, CallbackQueryHandler, ) import telegram import sys from datetime import datetime import pytz from scraper import get_bloodstocks from strings import HELLO_MSG, ABOUT_MSG, ...
true
true
f756ef20f76b186984c2dec3985cf25d83c5115d
18,770
py
Python
oss2/auth.py
xkdcc/aliyun-oss-python-sdk
c34c10c830b3a0f884af4bd2a1b501b3d4e52038
[ "MIT" ]
null
null
null
oss2/auth.py
xkdcc/aliyun-oss-python-sdk
c34c10c830b3a0f884af4bd2a1b501b3d4e52038
[ "MIT" ]
null
null
null
oss2/auth.py
xkdcc/aliyun-oss-python-sdk
c34c10c830b3a0f884af4bd2a1b501b3d4e52038
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import hmac import hashlib import time from . import utils from .compat import urlquote, to_bytes, is_py2 from .headers import * import logging from .credentials import StaticCredentialsProvider AUTH_VERSION_1 = 'v1' AUTH_VERSION_2 = 'v2' logger = logging.getLogger(__name__) def make_auth(...
38.861284
132
0.638892
import hmac import hashlib import time from . import utils from .compat import urlquote, to_bytes, is_py2 from .headers import * import logging from .credentials import StaticCredentialsProvider AUTH_VERSION_1 = 'v1' AUTH_VERSION_2 = 'v2' logger = logging.getLogger(__name__) def make_auth(access_key_id, access_k...
true
true
f756f0c176a620399a4f5919fcce8eda28191c56
1,731
py
Python
tests/test_color.py
stephen-bunn/chalk
8bcaaab309cc4f4b5eee019bce08e2765d72cf02
[ "0BSD" ]
2
2020-12-24T16:38:55.000Z
2021-12-09T21:54:56.000Z
tests/test_color.py
stephen-bunn/chalk
8bcaaab309cc4f4b5eee019bce08e2765d72cf02
[ "0BSD" ]
null
null
null
tests/test_color.py
stephen-bunn/chalk
8bcaaab309cc4f4b5eee019bce08e2765d72cf02
[ "0BSD" ]
null
null
null
# -*- encoding: utf-8 -*- # Copyright (c) 2020 Stephen Bunn <stephen@bunn.io> # ISC License <https://choosealicense.com/licenses/isc> """ """ from string import printable from typing import Optional import pytest from hypothesis import given from hypothesis.strategies import SearchStrategy, composite, from_regex, in...
28.85
87
0.742923
from string import printable from typing import Optional import pytest from hypothesis import given from hypothesis.strategies import SearchStrategy, composite, from_regex, integers, text from chalky.color import TrueColor @composite def hex_color(draw) -> SearchStrategy[str]: return draw(from_regex(r"\A#?...
true
true
f756f180022c94a03551bd57a6fcb7c3984d432a
3,891
py
Python
lego/apps/comments/tests/test_notifications.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
lego/apps/comments/tests/test_notifications.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
lego/apps/comments/tests/test_notifications.py
andrinelo/lego
9b53c8fe538d9107b980a70e2a21fb487cc3b290
[ "MIT" ]
null
null
null
from unittest.mock import patch from lego.apps.articles.models import Article from lego.apps.comments.models import Comment from lego.apps.comments.notifications import CommentNotification, CommentReplyNotification from lego.apps.users.models import User from lego.utils.test_utils import BaseTestCase @patch('lego.ut...
41.393617
97
0.694937
from unittest.mock import patch from lego.apps.articles.models import Article from lego.apps.comments.models import Comment from lego.apps.comments.notifications import CommentNotification, CommentReplyNotification from lego.apps.users.models import User from lego.utils.test_utils import BaseTestCase @patch('lego.ut...
true
true
f756f2452bbce1420f18fe385ff5da4f983dbf7a
796
py
Python
trabajos_entregas/parcial/pablo_b.py
AgustinParmisano/tecnicatura_analisis_sistemas
e64a1922eaf3685706652a2fb9414671014118fc
[ "PSF-2.0" ]
2
2019-11-05T22:10:02.000Z
2019-12-26T22:24:16.000Z
trabajos_entregas/parcial/pablo_b.py
AgustinParmisano/tecnicatura_analisis_sistemas
e64a1922eaf3685706652a2fb9414671014118fc
[ "PSF-2.0" ]
null
null
null
trabajos_entregas/parcial/pablo_b.py
AgustinParmisano/tecnicatura_analisis_sistemas
e64a1922eaf3685706652a2fb9414671014118fc
[ "PSF-2.0" ]
null
null
null
num1 = input('Ingrese el numero 1 ') num2 = input('Ingrese el numero 2 ') num3 = input('Ingrese el numero 3 ') def multiplicacion(num1,num2,num3): resultado = num1 * num2 if(num3 > num1): print('El numero %s es mayor a %s' %(num3,num1)) elif(num3 < num1): print('El numero %s es men...
23.411765
69
0.603015
num1 = input('Ingrese el numero 1 ') num2 = input('Ingrese el numero 2 ') num3 = input('Ingrese el numero 3 ') def multiplicacion(num1,num2,num3): resultado = num1 * num2 if(num3 > num1): print('El numero %s es mayor a %s' %(num3,num1)) elif(num3 < num1): print('El numero %s es men...
true
true
f756f2beea01972d39c325f9fb132c9a737a8db3
9,372
py
Python
2019/6-azureml-movie-recommendation/reco_utils/dataset/spark_splitters.py
sarkarpr/azure-python-labs
0ceae2d814e1f4af836fb117077f26339c4df026
[ "MIT" ]
116
2019-05-02T23:31:07.000Z
2022-02-07T17:38:27.000Z
2019/6-azureml-movie-recommendation/reco_utils/dataset/spark_splitters.py
luabud/azure-python-labs
10ad5d69175cec7fc8ff465368e9867440d034f3
[ "MIT" ]
39
2019-05-03T16:37:33.000Z
2022-01-13T02:48:34.000Z
2019/6-azureml-movie-recommendation/reco_utils/dataset/spark_splitters.py
luabud/azure-python-labs
10ad5d69175cec7fc8ff465368e9867440d034f3
[ "MIT" ]
85
2019-05-03T15:59:58.000Z
2022-03-14T05:22:32.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import numpy as np from pyspark.sql import Window from pyspark.sql.functions import col, row_number, broadcast, rand from reco_utils.common.constants import ( DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_TIMESTAM...
36.046154
112
0.652155
import numpy as np from pyspark.sql import Window from pyspark.sql.functions import col, row_number, broadcast, rand from reco_utils.common.constants import ( DEFAULT_ITEM_COL, DEFAULT_USER_COL, DEFAULT_TIMESTAMP_COL, DEFAULT_RATING_COL, ) from reco_utils.dataset.split_utils import process_split_ra...
true
true
f756f38bf251a4358549eb63ee9ec97790afd966
2,388
py
Python
code.py
Sangeetha8034/python-mini-challenges
703b7f379f1c216b29d31c6ecb86fae4a0a9d940
[ "MIT" ]
null
null
null
code.py
Sangeetha8034/python-mini-challenges
703b7f379f1c216b29d31c6ecb86fae4a0a9d940
[ "MIT" ]
null
null
null
code.py
Sangeetha8034/python-mini-challenges
703b7f379f1c216b29d31c6ecb86fae4a0a9d940
[ "MIT" ]
null
null
null
# -------------- #Code starts here def palindrome(num): l=[] t=num while t>0: l.append(t%10) t=t//10 l.reverse() tlen=len(l) if l.count(9)==tlen: return num+2 else: return smallPalin(l,tlen) def smallPalin(lis,n): mid=n//2 left=mid-1 ...
19.104
46
0.436348
def palindrome(num): l=[] t=num while t>0: l.append(t%10) t=t//10 l.reverse() tlen=len(l) if l.count(9)==tlen: return num+2 else: return smallPalin(l,tlen) def smallPalin(lis,n): mid=n//2 left=mid-1 npalin=False right=mid+1 ...
true
true
f756f4c1b0855ac60bcf15770fbe3cd271ee9817
905
py
Python
loft/helpers.py
dotKom/loft
73a57cf4d2b8bfd90c12911b454e3496502d6e85
[ "MIT" ]
null
null
null
loft/helpers.py
dotKom/loft
73a57cf4d2b8bfd90c12911b454e3496502d6e85
[ "MIT" ]
3
2018-01-25T17:28:20.000Z
2018-03-07T20:53:30.000Z
loft/helpers.py
dotkom/loft
73a57cf4d2b8bfd90c12911b454e3496502d6e85
[ "MIT" ]
null
null
null
import subprocess def du(path): du = subprocess.run(["du", "-sb", path], stdout=subprocess.PIPE) # Decode binary string, split return and fetch first entry # in array which is the size in bytes size = du.stdout.decode().split()[0] return size def du_remote(host, path): du = subprocess.run(["...
27.424242
103
0.636464
import subprocess def du(path): du = subprocess.run(["du", "-sb", path], stdout=subprocess.PIPE) size = du.stdout.decode().split()[0] return size def du_remote(host, path): du = subprocess.run(["ssh", host, "du", "-sb", path], stdout=subprocess.PIPE) size = du.stdout.decode().split()[0...
true
true
f756f52f2f693140c0a31d86f25e11be48184acf
3,874
py
Python
pytorch_lightning/plugins/training_type/sharded_spawn.py
calebrob6/pytorch-lightning
4c79b3a5b343866217784c66d122819c59a92c1d
[ "Apache-2.0" ]
1
2021-12-03T03:37:20.000Z
2021-12-03T03:37:20.000Z
pytorch_lightning/plugins/training_type/sharded_spawn.py
calebrob6/pytorch-lightning
4c79b3a5b343866217784c66d122819c59a92c1d
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/plugins/training_type/sharded_spawn.py
calebrob6/pytorch-lightning
4c79b3a5b343866217784c66d122819c59a92c1d
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
41.212766
115
0.729479
from typing import Optional import torch import pytorch_lightning as pl from pytorch_lightning.plugins.precision.sharded_native_amp import ShardedNativeMixedPrecisionPlugin from pytorch_lightning.plugins.training_type.ddp_spawn import DDPSpawnPlugin from pytorch_lightning.trainer.states import TrainerFn ...
true
true
f756f71fb27b6a3ff7e3046789d645471f54a086
1,883
py
Python
hummingbot/client/settings.py
peatio-net/hummingbot-tunex
a0c94c46af3d40c456ec0653dbe31ea56b3431ca
[ "Apache-2.0" ]
null
null
null
hummingbot/client/settings.py
peatio-net/hummingbot-tunex
a0c94c46af3d40c456ec0653dbe31ea56b3431ca
[ "Apache-2.0" ]
null
null
null
hummingbot/client/settings.py
peatio-net/hummingbot-tunex
a0c94c46af3d40c456ec0653dbe31ea56b3431ca
[ "Apache-2.0" ]
null
null
null
from os.path import ( realpath, join, ) from typing import List from hummingbot import get_strategy_list # Global variables required_exchanges: List[str] = [] # Global static values KEYFILE_PREFIX = "key_file_" KEYFILE_POSTFIX = ".json" ENCYPTED_CONF_PREFIX = "encrypted_" ENCYPTED_CONF_POSTFIX = ".json" GLOB...
22.416667
95
0.654275
from os.path import ( realpath, join, ) from typing import List from hummingbot import get_strategy_list required_exchanges: List[str] = [] KEYFILE_PREFIX = "key_file_" KEYFILE_POSTFIX = ".json" ENCYPTED_CONF_PREFIX = "encrypted_" ENCYPTED_CONF_POSTFIX = ".json" GLOBAL_CONFIG_PATH = "conf/conf_global.yml" ...
true
true
f756f9348c904151b7f98588aefd69cb9215833a
472
py
Python
character_tracker/initiate.py
llpk79/motw
30e1782404085834f631725f1df07bacdfb21b9c
[ "MIT" ]
null
null
null
character_tracker/initiate.py
llpk79/motw
30e1782404085834f631725f1df07bacdfb21b9c
[ "MIT" ]
null
null
null
character_tracker/initiate.py
llpk79/motw
30e1782404085834f631725f1df07bacdfb21b9c
[ "MIT" ]
1
2021-01-07T03:00:15.000Z
2021-01-07T03:00:15.000Z
from pprint import pprint as pp from character_tracker.character import Character from character_tracker.utils import validate_option_choice, get_int_input class Initiate(Character): def __init__(self): super().__init__() def get_me_some_gear(self): pass def show_me_the_moves(self): ...
19.666667
73
0.688559
from pprint import pprint as pp from character_tracker.character import Character from character_tracker.utils import validate_option_choice, get_int_input class Initiate(Character): def __init__(self): super().__init__() def get_me_some_gear(self): pass def show_me_the_moves(self): ...
true
true
f756fa523051137b4f38205537796d21dc248009
5,171
py
Python
vendor/utils/encrypt.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
vendor/utils/encrypt.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
vendor/utils/encrypt.py
diudiu/featurefactory
ee02ad9e3ea66e2eeafe6e11859801f0420c7d9e
[ "MIT" ]
null
null
null
# -*- coding:utf-8 -*- """ License SYPH-L. Copyright (c) 2013- SYPH(Shaohan Niu), All Rights Reserved. ----------------------------------------------------------- Author: Date: 2016/12/22 Change Activity: """ import os import base64 import json import pyDes from Crypto.Hash import SHA from C...
32.936306
118
0.589054
import os import base64 import json import pyDes from Crypto.Hash import SHA from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 as pk from Crypto.Cipher import DES from Crypto.Cipher import AES class Cryption(object): block_size = DES.block_size UTILS_DIR = os.path.dirname(__file__) ...
true
true
f756fa6e4a9624e4c30c95806ab6e9955eec58ef
137
py
Python
Configuration/Eras/python/Modifier_run2_HE_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
852
2015-01-11T21:03:51.000Z
2022-03-25T21:14:00.000Z
Configuration/Eras/python/Modifier_run2_HE_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
30,371
2015-01-02T00:14:40.000Z
2022-03-31T23:26:05.000Z
Configuration/Eras/python/Modifier_run2_HE_2018_cff.py
ckamtsikis/cmssw
ea19fe642bb7537cbf58451dcf73aa5fd1b66250
[ "Apache-2.0" ]
3,240
2015-01-02T05:53:18.000Z
2022-03-31T17:24:21.000Z
import FWCore.ParameterSet.Config as cms # This modifier is for HE-specific changes for sim, reco, etc. run2_HE_2018 = cms.Modifier()
22.833333
62
0.766423
import FWCore.ParameterSet.Config as cms run2_HE_2018 = cms.Modifier()
true
true
f756faa4ccc0b0f9c4e9be5fc9fc10c860878352
5,191
py
Python
src/scs_core/gas/a4/a4_calibrated_datum_vB.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
3
2019-03-12T01:59:58.000Z
2020-09-12T07:27:42.000Z
src/scs_core/gas/a4/a4_calibrated_datum_vB.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
1
2018-04-20T07:58:38.000Z
2021-03-27T08:52:45.000Z
src/scs_core/gas/a4/a4_calibrated_datum_vB.py
south-coast-science/scs_core
81ad4010abb37ca935f3a31ac805639ef53b1bcf
[ "MIT" ]
4
2017-09-29T13:08:43.000Z
2019-10-09T09:13:58.000Z
""" Created on 9 Dec 2020 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) The A4CalibratedDatum is designed to provide a model training data set that encapsulates the calibration of the electrochemical sensor - we_v_zero_x_cal is only relevant to sensors with NO2 cross-sensitivity. example document: {"weV...
31.083832
118
0.475824
from collections import OrderedDict from scs_core.data.datum import Datum from scs_core.gas.a4.a4_calib import A4Calib from scs_core.gas.a4.a4_datum import A4Datum class A4Calibrator(object): def __init__(self, calib: A4Calib): self.__calib = calib ...
true
true
f756fb54e3a583308004414176117ced417da710
3,067
py
Python
test_model.py
tkuri/noise2noise
a293f4952d3d1c997f4eb298a20fd5fac50a2dd3
[ "MIT" ]
1
2021-06-10T17:51:09.000Z
2021-06-10T17:51:09.000Z
test_model.py
tkuri/noise2noise
a293f4952d3d1c997f4eb298a20fd5fac50a2dd3
[ "MIT" ]
null
null
null
test_model.py
tkuri/noise2noise
a293f4952d3d1c997f4eb298a20fd5fac50a2dd3
[ "MIT" ]
null
null
null
import argparse import numpy as np from pathlib import Path import cv2 from model import get_model # from noise_model import get_noise_model MAX_8BIT = 255. MAX_16BIT = 65535. def get_args(): parser = argparse.ArgumentParser(description="Test trained model", formatter_class=ar...
33.703297
96
0.605804
import argparse import numpy as np from pathlib import Path import cv2 from model import get_model MAX_8BIT = 255. MAX_16BIT = 65535. def get_args(): parser = argparse.ArgumentParser(description="Test trained model", formatter_class=argparse.ArgumentDefaultsHelpFormatter) ...
true
true
f756fbc8ba9f1dc9b0974cdf6e76563d2b4ea425
5,262
py
Python
NLP/para_match.py
Brian-ZhenLiu/Course_Project
dca53c6385c98f682e217ebd630b673d05e42427
[ "MIT" ]
null
null
null
NLP/para_match.py
Brian-ZhenLiu/Course_Project
dca53c6385c98f682e217ebd630b673d05e42427
[ "MIT" ]
null
null
null
NLP/para_match.py
Brian-ZhenLiu/Course_Project
dca53c6385c98f682e217ebd630b673d05e42427
[ "MIT" ]
null
null
null
import numpy as np from numpy import* import csv # def traceBack(matchList, s, t, src, tgt, dTable, btTable): # if btTable[s][t] == " ": # return # #print(str(s) + ", " + str(t)) # if btTable[s][t] == "DI": # traceBack(matchList, s - 1, t - 1, src, tgt, dTable, btTable) # #if dTab...
33.303797
141
0.461612
import numpy as np from numpy import* import csv in range(len(src) + 1): btTable.append([]) for i in range(len(src), 0, -1): for j in range(len(tgt), 0, -1): if dTable[i, j] == 0: btTable[i].insert(0, (" ")) else: if src[i - 1] == tgt[j ...
true
true
f756fc7dbd97d508668cbc755a086d9f2bcfed51
27,675
py
Python
pytorch/gaugan/gaugan.py
quickgrid/paper-implementations
90de1e93cc664e8f5e1e49c57c030f3d9d14fdf9
[ "Apache-2.0" ]
null
null
null
pytorch/gaugan/gaugan.py
quickgrid/paper-implementations
90de1e93cc664e8f5e1e49c57c030f3d9d14fdf9
[ "Apache-2.0" ]
8
2022-02-12T11:58:24.000Z
2022-02-20T21:29:59.000Z
pytorch/gaugan/gaugan.py
quickgrid/paper-implementations
90de1e93cc664e8f5e1e49c57c030f3d9d14fdf9
[ "Apache-2.0" ]
null
null
null
"""Pytorch GauGAN implementation. Either segmentation one hot mask or rgb mask can be passed to discriminator with little modification. Todo - Modify to try to generate and match mask also as loss. - Try discriminator with either segmentation image or label. - Use multiscale feature from discriminator to ...
38.652235
118
0.584932
import os import pathlib from datetime import datetime from typing import Tuple import torch import torch.nn as nn import torch.optim as optim import torchvision from torchvision.models.feature_extraction import get_graph_node_names, create_feature_extractor from torchvision.transforms import transforms from torchvis...
true
true
f756fce471851f4a87e36f4bb90c38196ed2d6ec
1,300
py
Python
zorro/io.py
codebyzeb/Zorro
bb6e12e7891a6bc3e00891ef0519f48acb3454f9
[ "MIT" ]
2
2021-11-10T12:11:47.000Z
2021-11-12T09:39:55.000Z
zorro/io.py
codebyzeb/Zorro
bb6e12e7891a6bc3e00891ef0519f48acb3454f9
[ "MIT" ]
1
2020-05-06T22:29:27.000Z
2020-05-06T22:29:27.000Z
zorro/io.py
codebyzeb/Zorro
bb6e12e7891a6bc3e00891ef0519f48acb3454f9
[ "MIT" ]
1
2020-04-30T17:10:06.000Z
2020-04-30T17:10:06.000Z
from typing import Dict, List, Optional from pathlib import Path from zorro import configs def get_group2model_output_paths(group_names: List[str], phenomenon: str, paradigm: str, step: str = '*', ...
34.210526
100
0.553846
from typing import Dict, List, Optional from pathlib import Path from zorro import configs def get_group2model_output_paths(group_names: List[str], phenomenon: str, paradigm: str, step: str = '*', ...
true
true
f756fd0ba6459dc77039ccc58d1759ba93b95351
3,165
py
Python
ceee/common/initializing_coclass.py
Gitman1989/chromium
2b1cceae1075ef012fb225deec8b4c8bbe4bc897
[ "BSD-3-Clause" ]
2
2017-09-02T19:08:28.000Z
2021-11-15T15:15:14.000Z
ceee/common/initializing_coclass.py
Gitman1989/chromium
2b1cceae1075ef012fb225deec8b4c8bbe4bc897
[ "BSD-3-Clause" ]
null
null
null
ceee/common/initializing_coclass.py
Gitman1989/chromium
2b1cceae1075ef012fb225deec8b4c8bbe4bc897
[ "BSD-3-Clause" ]
1
2020-04-13T05:45:10.000Z
2020-04-13T05:45:10.000Z
# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A generator for initializing_coclass.h, which contains a bunch of repeated code that can't be produced through the preprocessor.""" import sys from st...
29.305556
79
0.676461
import sys from string import Template HEADER_ = """\ // This file is autogenerated by initializing_coclass.py, do not edit. #ifndef CEEE_COMMON_INITIALIZING_COCLASS_GEN_INL_ #define CEEE_COMMON_INITIALIZING_COCLASS_GEN_INL_ """ FOOTER_ = """\ #endif // CEEE_COMMON_INITIALIZING_COCLASS_GEN_INL_ """ TEMPLATE_ ...
true
true
f756fe71bf6842b38c42d5f99aceb0303c083979
2,039
py
Python
pandas/tests/io/parser/dialect.py
vimalromeo/pandas
7c14e4f14aff216be558bf5d4d2d00b4838c2360
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
69
2020-03-31T06:40:17.000Z
2022-02-25T11:48:18.000Z
venv/lib/python3.7/site-packages/pandas/tests/io/parser/dialect.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
8
2019-12-04T23:44:11.000Z
2022-02-10T08:31:40.000Z
venv/lib/python3.7/site-packages/pandas/tests/io/parser/dialect.py
John1001Song/Big-Data-Robo-Adviser
9444dce96954c546333d5aecc92a06c3bfd19aa5
[ "MIT" ]
28
2020-04-15T15:24:17.000Z
2021-12-26T04:05:02.000Z
# -*- coding: utf-8 -*- """ Tests that dialects are properly handled during parsing for all of the parsers defined in parsers.py """ import csv from pandas import DataFrame from pandas.compat import StringIO from pandas.errors import ParserWarning import pandas.util.testing as tm class DialectTests(object): ...
25.810127
78
0.622364
import csv from pandas import DataFrame from pandas.compat import StringIO from pandas.errors import ParserWarning import pandas.util.testing as tm class DialectTests(object): def test_dialect(self): data = """\ label1,label2,label3 index1,"a,c,e index2,b,d,f """ dia = csv.excel() d...
true
true
f75700070314187ff579d94e29a59a49fe643a46
5,508
py
Python
firststreet/api/adaptation.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
firststreet/api/adaptation.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
firststreet/api/adaptation.py
opleban/fsf_api_access_python
ebe4af99e0f1dd59f7273fa62e6f05953aa8a510
[ "MIT" ]
null
null
null
# Author: Kelvin Lai <kelvin@firststreet.org> # Copyright: This module is owned by First Street Foundation # Standard Imports import logging # Internal Imports from firststreet.api import csv_format from firststreet.api.api import Api from firststreet.errors import InvalidArgument from firststreet.models.adaptation i...
43.03125
119
0.671569
import logging from firststreet.api import csv_format from firststreet.api.api import Api from firststreet.errors import InvalidArgument from firststreet.models.adaptation import AdaptationDetail, AdaptationSummary class Adaptation(Api): def get_detail(self, search_item, csv=False, output_dir=None, extra_p...
true
true
f75700a48c795528f774f9f593d2490f2008b660
34,866
py
Python
pandas/tests/window/test_rolling.py
luijkr/pandas
bc29dfb5bf4c82f8d616857c2316fc8f17d8f2a5
[ "BSD-3-Clause" ]
3
2021-12-13T05:53:26.000Z
2022-03-07T01:38:02.000Z
pandas/tests/window/test_rolling.py
luijkr/pandas
bc29dfb5bf4c82f8d616857c2316fc8f17d8f2a5
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/window/test_rolling.py
luijkr/pandas
bc29dfb5bf4c82f8d616857c2316fc8f17d8f2a5
[ "BSD-3-Clause" ]
1
2021-12-13T05:53:20.000Z
2021-12-13T05:53:20.000Z
from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import UnsupportedFunctionCall from pandas import ( DataFrame, DatetimeIndex, MultiIndex, Series, Timedelta, Timestamp, date_range, period_range, to_datetime, to_timedelta, ) import pa...
30.964476
88
0.518155
from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import UnsupportedFunctionCall from pandas import ( DataFrame, DatetimeIndex, MultiIndex, Series, Timedelta, Timestamp, date_range, period_range, to_datetime, to_timedelta, ) import pa...
true
true
f75700ffe5f83f4b15a357c4bd31de22d08be29a
627
py
Python
src/products_crawler/spiders/bearbrick.py
RyouMon/GoodsCrawer
81a679307adeccb9f0874567848735322023d687
[ "MIT" ]
null
null
null
src/products_crawler/spiders/bearbrick.py
RyouMon/GoodsCrawer
81a679307adeccb9f0874567848735322023d687
[ "MIT" ]
null
null
null
src/products_crawler/spiders/bearbrick.py
RyouMon/GoodsCrawer
81a679307adeccb9f0874567848735322023d687
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from scrapy.linkextractors import LinkExtractor from scrapy.spiders import Rule from . import GenericSpider class BearbrickSpider(GenericSpider): name = 'bearbrick' allowed_domains = ['bearbrick.com'] rules = ( # Match each product in product list. Rule( ...
25.08
59
0.54067
from scrapy.linkextractors import LinkExtractor from scrapy.spiders import Rule from . import GenericSpider class BearbrickSpider(GenericSpider): name = 'bearbrick' allowed_domains = ['bearbrick.com'] rules = ( Rule( LinkExtractor( allow=r'.*html', ...
true
true
f757023bff256369b64a6c6ddf178819e8accb79
3,191
py
Python
chrome/common/extensions/docs/server2/content_provider.py
SlimKatLegacy/android_external_chromium_org
ee480ef5039d7c561fc66ccf52169ead186f1bea
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2015-03-04T02:36:53.000Z
2016-06-25T11:22:17.000Z
chrome/common/extensions/docs/server2/content_provider.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/common/extensions/docs/server2/content_provider.py
j4ckfrost/android_external_chromium_org
a1a3dad8b08d1fcf6b6b36c267158ed63217c780
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
4
2015-02-09T08:49:30.000Z
2017-08-26T02:03:34.000Z
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import mimetypes import os from compiled_file_system import SingleFile from directory_zipper import DirectoryZipper from docs_server_utils import ToUnicode ...
34.311828
80
0.689126
import mimetypes import os from compiled_file_system import SingleFile from directory_zipper import DirectoryZipper from docs_server_utils import ToUnicode from future import Gettable, Future from third_party.handlebar import Handlebar class ContentAndType(object): def __init__(self, content, content_type): ...
true
true
f757037366ce618933d8a52295f4160fe9af76cd
7,451
py
Python
chainercmd/train.py
mitmul/chainercmd
1925d7a8c27bdbc8946483090688c45a292e37f7
[ "MIT" ]
10
2017-07-18T12:29:05.000Z
2018-07-18T17:49:24.000Z
chainercmd/train.py
mitmul/chainercmd
1925d7a8c27bdbc8946483090688c45a292e37f7
[ "MIT" ]
null
null
null
chainercmd/train.py
mitmul/chainercmd
1925d7a8c27bdbc8946483090688c45a292e37f7
[ "MIT" ]
2
2021-01-08T01:17:04.000Z
2021-01-23T09:28:16.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import shutil import time from importlib import import_module import chainer import yaml from chainer import iterators from chainer import serializers from chainer import training from chainer.training import extensions from chainer.training import tri...
36.886139
79
0.652798
import os import re import shutil import time from importlib import import_module import chainer import yaml from chainer import iterators from chainer import serializers from chainer import training from chainer.training import extensions from chainer.training import triggers from chainer.training import updaters ...
true
true
f75705e86138a389ec24fc9d031cbe134091be40
1,640
py
Python
lightning_plus/urls.py
twocucao/lightning-plus
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
1
2021-04-15T14:52:12.000Z
2021-04-15T14:52:12.000Z
lightning_plus/urls.py
twocucao/lightning
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
null
null
null
lightning_plus/urls.py
twocucao/lightning
e69c81da9c15fdfc37355e0362ff7ed804e94b2a
[ "MIT" ]
null
null
null
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views import defaults as default_views from lightning_plus.puzzle.urls import urlpatterns as puzzle_urls from lightning_plus.graphql.admin.view import graph...
32.156863
85
0.627439
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views import defaults as default_views from lightning_plus.puzzle.urls import urlpatterns as puzzle_urls from lightning_plus.graphql.admin.view import graph...
true
true
f75706dd3eabacb82d30091636d33133617e163e
2,072
py
Python
PRYMETIME/nucmer4.py
tyler-e-marshall/prymetime
c1daa783c8091adbc5900a51d98522b1269d0107
[ "MIT" ]
null
null
null
PRYMETIME/nucmer4.py
tyler-e-marshall/prymetime
c1daa783c8091adbc5900a51d98522b1269d0107
[ "MIT" ]
null
null
null
PRYMETIME/nucmer4.py
tyler-e-marshall/prymetime
c1daa783c8091adbc5900a51d98522b1269d0107
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Title: Sending Contigs to Nucmer Created on Tue Aug 13 2019 @author: Eric @email: ericyoung7@gmail.com """ import glob, os import pandas as pd from Bio import SeqIO from pymummer import nucmer from pathlib import Path path_to_file = "pilon.fasta" path = Path(path_to_file) short_contigs = ...
25.268293
111
0.620656
import glob, os import pandas as pd from Bio import SeqIO from pymummer import nucmer from pathlib import Path path_to_file = "pilon.fasta" path = Path(path_to_file) short_contigs = [] contigs = [] if path.is_file(): for x in SeqIO.parse(open("pilon.fasta"),'fasta'): if len(x.seq) < 50000: ...
true
true
f757080eadc72c3e6472bb9d4b079640e9e1a675
8,329
py
Python
tests/components/locative/test_init.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
2
2017-10-26T19:43:55.000Z
2017-12-30T23:29:00.000Z
tests/components/locative/test_init.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
3
2021-09-08T03:34:57.000Z
2022-03-12T00:59:48.000Z
tests/components/locative/test_init.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-06-19T07:43:11.000Z
2019-06-19T07:43:11.000Z
"""The tests the for Locative device tracker platform.""" from unittest.mock import patch, Mock import pytest from homeassistant import data_entry_flow from homeassistant.components import locative from homeassistant.components.device_tracker import \ DOMAIN as DEVICE_TRACKER_DOMAIN from homeassistant.components....
30.509158
76
0.626726
from unittest.mock import patch, Mock import pytest from homeassistant import data_entry_flow from homeassistant.components import locative from homeassistant.components.device_tracker import \ DOMAIN as DEVICE_TRACKER_DOMAIN from homeassistant.components.locative import DOMAIN, TRACKER_UPDATE from homeassistant....
true
true
f757085b639966a0e159575f9ab3793a64412562
49,176
py
Python
idem_azurerm/exec/azurerm/compute/virtual_machine.py
johnoneill98/idem-azurerm
37e0743fd236f758b093f5898cc99e95ffde9889
[ "Apache-2.0" ]
null
null
null
idem_azurerm/exec/azurerm/compute/virtual_machine.py
johnoneill98/idem-azurerm
37e0743fd236f758b093f5898cc99e95ffde9889
[ "Apache-2.0" ]
null
null
null
idem_azurerm/exec/azurerm/compute/virtual_machine.py
johnoneill98/idem-azurerm
37e0743fd236f758b093f5898cc99e95ffde9889
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Azure Resource Manager (ARM) Compute Virtual Machine Execution Module .. versionadded:: 1.0.0 .. versionchanged:: 2.0.0 :maintainer: <devops@eitr.tech> :configuration: This module requires Azure Resource Manager credentials to be passed as keyword arguments to every function or via ac...
37.827692
120
0.632707
from __future__ import absolute_import import logging import os HAS_LIBS = False try: import azure.mgmt.compute.models from msrest.exceptions import SerializationError from msrestazure.azure_exceptions import CloudError from msrestazure.tools import is_valid_resource_id, parse_resource_id HAS...
true
true
f757087b4b1ae435518aa3d5b018f637646dd1c4
540
py
Python
study_algorithm/python/Sort/Selection Sort.py
AlphaSunny/study
4e65127fefa9078b7ae6b9db92369c93e61e4327
[ "MIT" ]
null
null
null
study_algorithm/python/Sort/Selection Sort.py
AlphaSunny/study
4e65127fefa9078b7ae6b9db92369c93e61e4327
[ "MIT" ]
null
null
null
study_algorithm/python/Sort/Selection Sort.py
AlphaSunny/study
4e65127fefa9078b7ae6b9db92369c93e61e4327
[ "MIT" ]
null
null
null
def selection_sort(arr): # For every slot in array for fillslot in range(len(arr)-1,0,-1): positionOfMax=0 # For every set of 0 to fillslot+1 for location in range(1,fillslot+1): # Set maximum's location if arr[location]>arr[positionOfMax]: ...
25.714286
49
0.553704
def selection_sort(arr): for fillslot in range(len(arr)-1,0,-1): positionOfMax=0 for location in range(1,fillslot+1): if arr[location]>arr[positionOfMax]: positionOfMax = location temp = arr[fillslot] arr...
true
true
f7570945aebc5967e767c3f6ca863f9a03c344f0
5,006
py
Python
python/example_code/kinesis/kinesisanalyticsv2_demo.py
iconara/aws-doc-sdk-examples
52706b31b4fce8fb89468e56743edf5369e69628
[ "Apache-2.0" ]
5,166
2016-09-02T08:48:38.000Z
2022-03-31T19:12:43.000Z
python/example_code/kinesis/kinesisanalyticsv2_demo.py
iconara/aws-doc-sdk-examples
52706b31b4fce8fb89468e56743edf5369e69628
[ "Apache-2.0" ]
1,186
2016-09-28T23:05:19.000Z
2022-03-31T18:07:47.000Z
python/example_code/kinesis/kinesisanalyticsv2_demo.py
iconara/aws-doc-sdk-examples
52706b31b4fce8fb89468e56743edf5369e69628
[ "Apache-2.0" ]
4,003
2016-08-29T19:51:40.000Z
2022-03-31T16:40:02.000Z
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """ Purpose Shows how to use the AWS SDK for Python (Boto3) with Amazon Kinesis and version 2 of the Amazon Kinesis Data Analytics API to create an application that reads data from an input stream, uses SQL code...
36.540146
87
0.726328
import logging from pprint import pprint import sys import threading import time import boto3 from analyticsv2.analytics_application import KinesisAnalyticsApplicationV2 from streams.kinesis_stream import KinesisStream from streams.dg_anomaly import generate sys.path.append('../..') from demo_tools.custom_waiter...
true
true
f7570968e2e69af18bc54d033adef3cba461d766
3,448
py
Python
harvardcs50/project1env/lib/python3.7/site-packages/passwordmeter/test_passwordmeter.py
snowyrainkun/webdevelop
9792d8d05b70f35586616a95ba26ed0daf1f72b3
[ "MIT" ]
22
2015-03-18T20:33:59.000Z
2021-05-13T15:01:33.000Z
harvardcs50/project1env/lib/python3.7/site-packages/passwordmeter/test_passwordmeter.py
snowyrainkun/webdevelop
9792d8d05b70f35586616a95ba26ed0daf1f72b3
[ "MIT" ]
2
2015-04-03T19:48:46.000Z
2015-10-01T23:23:19.000Z
harvardcs50/project1env/lib/python3.7/site-packages/passwordmeter/test_passwordmeter.py
snowyrainkun/webdevelop
9792d8d05b70f35586616a95ba26ed0daf1f72b3
[ "MIT" ]
10
2015-06-19T03:21:56.000Z
2021-08-31T15:02:58.000Z
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # file: $Id$ # auth: Philip J Grabner <grabner@cadit.com> # date: 2013/10/29 # copy: (C) Copyright 2013 Cadit Health Inc., All Rights Reserved. #-----------------------------------------------------------------------...
35.546392
88
0.453306
import unittest import passwordmeter as pwm class TestFactor(pwm.Factor): category = 'test' def __init__(self, prefix='test value is', *args, **kw): self.prefix = prefix super(TestFactor, self).__init__(*args, **kw) def test(self, value, extra): return (0.5, self.prefix + ': ' + value) clas...
true
true
f75709ac1fc41efd76b4e3b7c7cc60eaa877b19d
8,820
py
Python
pool/singleton.py
spacefarmers/pool-reference
275db66215340acb6309dd7ca14e67019e61459b
[ "Apache-2.0" ]
null
null
null
pool/singleton.py
spacefarmers/pool-reference
275db66215340acb6309dd7ca14e67019e61459b
[ "Apache-2.0" ]
null
null
null
pool/singleton.py
spacefarmers/pool-reference
275db66215340acb6309dd7ca14e67019e61459b
[ "Apache-2.0" ]
null
null
null
from typing import List, Optional, Tuple import logging from blspy import G2Element from chia.consensus.coinbase import pool_parent_id from chia.pools.pool_puzzles import ( create_absorb_spend, solution_to_pool_state, get_most_recent_singleton_coin_from_coin_spend, pool_state_to_inner_puzzle, creat...
41.603774
120
0.710544
from typing import List, Optional, Tuple import logging from blspy import G2Element from chia.consensus.coinbase import pool_parent_id from chia.pools.pool_puzzles import ( create_absorb_spend, solution_to_pool_state, get_most_recent_singleton_coin_from_coin_spend, pool_state_to_inner_puzzle, creat...
true
true
f7570a06461d0a7f3169f48ab9b4b2488d352e53
933
py
Python
avwx/data/build_navaids.py
flyinactor91/AVWX-Engine
0d3ce2c6e962d2a3ec9db711caf9d1c94658fa80
[ "MIT" ]
30
2015-09-08T20:38:41.000Z
2019-03-10T07:10:47.000Z
avwx/data/build_navaids.py
sthagen/avwx-engine
af235b9d26e5495f04076ed5499cf8cd131d4efc
[ "MIT" ]
5
2015-08-12T15:50:07.000Z
2019-04-16T00:42:12.000Z
avwx/data/build_navaids.py
sthagen/avwx-engine
af235b9d26e5495f04076ed5499cf8cd131d4efc
[ "MIT" ]
11
2016-01-17T10:10:29.000Z
2019-01-13T17:55:36.000Z
""" Build navaid coordinate map """ import json from pathlib import Path import httpx # redirect https://ourairports.com/data/navaids.csv URL = "https://davidmegginson.github.io/ourairports-data/navaids.csv" OUTPUT_PATH = Path(__file__).parent / "files" / "navaids.json" def main(): """Builds the navaid coordina...
24.552632
80
0.585209
import json from pathlib import Path import httpx URL = "https://davidmegginson.github.io/ourairports-data/navaids.csv" OUTPUT_PATH = Path(__file__).parent / "files" / "navaids.json" def main(): text = httpx.get(URL).text lines = text.strip().split("\n") lines.pop(0) data = {} for line in lines...
true
true
f7570a6dcb5ac4fa320728619fa097b43aaaeb08
3,281
py
Python
examples/legacy/evaluate_defaults_live.py
pfistfl/openml-defaults
0678167f807512bd0c957f82a83ff8181461090c
[ "BSD-3-Clause" ]
1
2019-08-01T13:44:47.000Z
2019-08-01T13:44:47.000Z
examples/legacy/evaluate_defaults_live.py
pfistfl/openml-defaults
0678167f807512bd0c957f82a83ff8181461090c
[ "BSD-3-Clause" ]
null
null
null
examples/legacy/evaluate_defaults_live.py
pfistfl/openml-defaults
0678167f807512bd0c957f82a83ff8181461090c
[ "BSD-3-Clause" ]
1
2019-08-29T15:54:38.000Z
2019-08-29T15:54:38.000Z
import argparse import copy import matplotlib.pyplot as plt import seaborn as sns import openmldefaults import os import pandas as pd # sshfs jv2657@habanero.rcs.columbia.edu:/rigel/home/jv2657/experiments ~/habanero_experiments def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--datas...
36.865169
214
0.698263
import argparse import copy import matplotlib.pyplot as plt import seaborn as sns import openmldefaults import os import pandas as pd def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--dataset_path', type=str, default=os.path.expanduser('~') + '/data/openml-de...
true
true
f7570b284543607a989de10f3477bc095ba3cf10
2,301
py
Python
torchnlp/encoders/encoder.py
MPetrochuk/PyTorch-NLP
d7814a297811c9b0dfb285fe0475098b86f3d348
[ "BSD-3-Clause" ]
2,125
2018-03-17T23:31:03.000Z
2022-03-31T12:20:14.000Z
torchnlp/encoders/encoder.py
zhengmingzhang/PyTorch-NLP
34a98b5fa5d2e13761546b94770aed12388528f2
[ "BSD-3-Clause" ]
109
2018-03-21T00:38:51.000Z
2021-12-24T08:34:55.000Z
torchnlp/encoders/encoder.py
zhengmingzhang/PyTorch-NLP
34a98b5fa5d2e13761546b94770aed12388528f2
[ "BSD-3-Clause" ]
270
2018-03-18T16:47:01.000Z
2022-03-17T08:01:58.000Z
class Encoder(object): """ Base class for a encoder employing an identity function. Args: enforce_reversible (bool, optional): Check for reversibility on ``Encoder.encode`` and ``Encoder.decode``. Formally, reversible means: ``Encoder.decode(Encoder.encode(object_)) == object_``...
31.520548
94
0.579313
class Encoder(object): def __init__(self, enforce_reversible=False): self.enforce_reversible = enforce_reversible def encode(self, object_): if self.enforce_reversible: self.enforce_reversible = False encoded_decoded = self.decode(self.encode(object_)) self....
true
true
f7570c4691610dfebb9f130a70ada62e5039c3b0
37,895
py
Python
scripts/irods/test/test_rulebase.py
stefan-wolfsheimer/irods
f6eb6c72786288878706e2562a370b91b7d0802e
[ "BSD-3-Clause" ]
null
null
null
scripts/irods/test/test_rulebase.py
stefan-wolfsheimer/irods
f6eb6c72786288878706e2562a370b91b7d0802e
[ "BSD-3-Clause" ]
null
null
null
scripts/irods/test/test_rulebase.py
stefan-wolfsheimer/irods
f6eb6c72786288878706e2562a370b91b7d0802e
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import copy import inspect import json import os import socket import tempfile import time # remove once file hash fix is committed #2279 import subprocess from .. import lib from...
49.150454
211
0.651036
from __future__ import print_function import sys if sys.version_info >= (2, 7): import unittest else: import unittest2 as unittest import copy import inspect import json import os import socket import tempfile import time rt subprocess from .. import lib from .. import paths from .. import test from . import ...
true
true
f7570cb11e4b5ec29ee283c6e19ad9d094add547
21,262
py
Python
tiledb_cli/tests/test_convert_from.py
TileDB-Inc/TileDB-CLI
e18e148fe5c6044b87d28595f5370eecac0b3c8f
[ "MIT" ]
3
2021-09-15T12:55:59.000Z
2021-12-22T16:39:38.000Z
tiledb_cli/tests/test_convert_from.py
TileDB-Inc/TileDB-CLI
e18e148fe5c6044b87d28595f5370eecac0b3c8f
[ "MIT" ]
7
2021-09-24T00:12:51.000Z
2022-02-03T20:30:34.000Z
tiledb_cli/tests/test_convert_from.py
TileDB-Inc/TileDB-CLI
e18e148fe5c6044b87d28595f5370eecac0b3c8f
[ "MIT" ]
null
null
null
import tiledb from tiledb_cli.root import root from tiledb_cli.convert_from import parse_kwargs from click.testing import CliRunner import os import numpy as np import pandas as pd import pytest @pytest.fixture(autouse=True, scope="session") def create_test_simple_csv(temp_rootdir): """ Create a simple dense...
31.734328
107
0.523704
import tiledb from tiledb_cli.root import root from tiledb_cli.convert_from import parse_kwargs from click.testing import CliRunner import os import numpy as np import pandas as pd import pytest @pytest.fixture(autouse=True, scope="session") def create_test_simple_csv(temp_rootdir): path = os.path.abspath(os.pat...
true
true
f7570ccad063c348517c633cdb082a5dc19d41b1
873
py
Python
tests/test_linenotipy.py
10mohi6/line-notify-python
f2c41b2c77b92116a62f6e7829b82a086e05f3ad
[ "MIT" ]
2
2019-10-06T13:09:58.000Z
2021-10-18T10:46:08.000Z
tests/test_linenotipy.py
10mohi6/line-notify-python
f2c41b2c77b92116a62f6e7829b82a086e05f3ad
[ "MIT" ]
3
2020-02-24T19:56:08.000Z
2021-12-06T15:01:32.000Z
tests/test_linenotipy.py
10mohi6/line-notify-python
f2c41b2c77b92116a62f6e7829b82a086e05f3ad
[ "MIT" ]
2
2019-10-23T15:19:33.000Z
2021-12-17T05:27:34.000Z
import os import pytest import time from linenotipy import Line @pytest.fixture(scope="module", autouse=True) def scope_module(): token = os.environ["line_notify_token"] yield Line(token=token) @pytest.fixture(scope="function", autouse=True) def line(scope_module): time.sleep(1) yield scope_module ...
22.973684
82
0.705613
import os import pytest import time from linenotipy import Line @pytest.fixture(scope="module", autouse=True) def scope_module(): token = os.environ["line_notify_token"] yield Line(token=token) @pytest.fixture(scope="function", autouse=True) def line(scope_module): time.sleep(1) yield scope_module ...
true
true
f7570d3ec598c1374ebc8619a8097ea681c2c49d
3,584
py
Python
ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py
alexa-labs/alexa-apis-for-python
52838be4f57ee1a2479402ea78b1247b56017942
[ "Apache-2.0" ]
90
2018-09-19T21:56:42.000Z
2022-03-30T11:25:21.000Z
ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py
ishitaojha/alexa-apis-for-python
a68f94b7a0e41f819595d6fe56e800403e8a4194
[ "Apache-2.0" ]
11
2018-09-23T12:16:48.000Z
2021-06-10T19:49:45.000Z
ask-smapi-model/ask_smapi_model/v1/skill/alexa_hosted/hosted_skill_metadata.py
ishitaojha/alexa-apis-for-python
a68f94b7a0e41f819595d6fe56e800403e8a4194
[ "Apache-2.0" ]
28
2018-09-19T22:30:38.000Z
2022-02-22T22:57:07.000Z
# coding: utf-8 # # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "lice...
32.581818
115
0.610491
import pprint import re import six import typing from enum import Enum if typing.TYPE_CHECKING: from typing import Dict, List, Optional, Union, Any from datetime import datetime from ask_smapi_model.v1.skill.alexa_hosted.hosted_skill_info import HostedSkillInfo as HostedSkillInfo_de0ff179...
true
true
f7570de1002cb227589ce907c00d73a4c07f4621
1,554
py
Python
yingzi_csv.py
Admingyu/csv-GPS-data-wash
9e99ef4323d58a97d0b09377cc59724a7f9d3ab8
[ "MIT" ]
null
null
null
yingzi_csv.py
Admingyu/csv-GPS-data-wash
9e99ef4323d58a97d0b09377cc59724a7f9d3ab8
[ "MIT" ]
null
null
null
yingzi_csv.py
Admingyu/csv-GPS-data-wash
9e99ef4323d58a97d0b09377cc59724a7f9d3ab8
[ "MIT" ]
null
null
null
import csv import os # csv文件路径 path = './csv/' # 定义数据清洗函数data_wash, 接收filename[文件名], la_max[最大纬度], ln_max[最大精度]参数, def data_wash(filename, la_max, ln_max): # 定义csv文件和写入器,用于保存生成的csv文件,保存的文件名为:原文件文件名+_output csv_out_file = open(path + filename + '_output', 'w') csv_writer = csv.writer(csv_out_file) # ...
28.777778
80
0.598456
import csv import os path = './csv/' def data_wash(filename, la_max, ln_max): csv_out_file = open(path + filename + '_output', 'w') csv_writer = csv.writer(csv_out_file) with open(path + filename, 'r') as csv_file: csv_reader = csv.reader(csv_file) line_count = 0 ...
true
true
f7570e570d93ed50d34880b89b90c050d905a54d
866
py
Python
streamdeck_manager/samples/tiled_image.py
vgonisanz/streamdeck_manager
f022094dfc88f5d39a6a7535406ab4ac986f50a9
[ "MIT" ]
8
2021-08-14T14:55:47.000Z
2022-01-28T12:24:18.000Z
streamdeck_manager/samples/tiled_image.py
vgonisanz/streamdeck_manager
f022094dfc88f5d39a6a7535406ab4ac986f50a9
[ "MIT" ]
null
null
null
streamdeck_manager/samples/tiled_image.py
vgonisanz/streamdeck_manager
f022094dfc88f5d39a6a7535406ab4ac986f50a9
[ "MIT" ]
2
2022-01-18T14:57:05.000Z
2022-01-27T22:53:59.000Z
import os import typer from streamdeck_manager.core import Core def end_sample_callback(): exit(0) def main(asset_path: str=os.path.join(os.path.dirname(__file__), "..", "assets"), photo: str="Harold.jpg"): core = Core() if len(core.streamdecks) <= 0: print("Not Stream deck found") ...
24.742857
111
0.670901
import os import typer from streamdeck_manager.core import Core def end_sample_callback(): exit(0) def main(asset_path: str=os.path.join(os.path.dirname(__file__), "..", "assets"), photo: str="Harold.jpg"): core = Core() if len(core.streamdecks) <= 0: print("Not Stream deck found") ...
true
true
f7570e927df59101cc117c0fa21dfad5e68671e9
59
py
Python
tests/plugins/export.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
1
2022-01-26T12:52:33.000Z
2022-01-26T12:52:33.000Z
tests/plugins/export.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
null
null
null
tests/plugins/export.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
null
null
null
from nonebot import export @export() def test(): ...
8.428571
26
0.610169
from nonebot import export @export() def test(): ...
true
true
f757100a8e2fe00830c58e5cd56b5af6557dcbef
253
py
Python
examples/logger.py
CzaOrz/loggus
2bf3f75af268aaec95eeee2e798963290fa81c48
[ "MIT" ]
5
2020-11-04T04:56:51.000Z
2021-05-10T12:32:39.000Z
examples/logger.py
czasg/loggus
b29815a6a420051eabd9ff88208dd6057189b197
[ "MIT" ]
1
2021-10-14T03:22:07.000Z
2021-10-14T03:22:07.000Z
examples/logger.py
czasg/loggus
b29815a6a420051eabd9ff88208dd6057189b197
[ "MIT" ]
null
null
null
# coding: utf-8 import loggus if __name__ == '__main__': logger1 = loggus.NewLogger() logger1.SetFormatter(loggus.JsonFormatter) logger1.info("logger1 output json") logger2 = loggus.NewLogger() logger2.info("but logger2 is text")
21.083333
46
0.699605
import loggus if __name__ == '__main__': logger1 = loggus.NewLogger() logger1.SetFormatter(loggus.JsonFormatter) logger1.info("logger1 output json") logger2 = loggus.NewLogger() logger2.info("but logger2 is text")
true
true
f75710fe7c4d9af216ba4c379fed6801e10471bc
605
py
Python
trails/feeds/blocklist.py
jayvdb/maltrail
4a23621cea36309a195bffb8703d42fb2ab88908
[ "MIT" ]
2
2020-03-26T14:55:59.000Z
2020-12-16T09:13:51.000Z
trails/feeds/blocklist.py
BUGUB/maltrail
09873f89c1d1592a8d6867e5ad6ab7ad0f4ea26e
[ "MIT" ]
null
null
null
trails/feeds/blocklist.py
BUGUB/maltrail
09873f89c1d1592a8d6867e5ad6ab7ad0f4ea26e
[ "MIT" ]
1
2020-11-09T07:16:27.000Z
2020-11-09T07:16:27.000Z
#!/usr/bin/env python """ Copyright (c) 2014-2020 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ from core.common import retrieve_content __url__ = "https://lists.blocklist.de/lists/all.txt" __info__ = "known attacker" __reference__ = "blocklist.de" def...
24.2
83
0.667769
from core.common import retrieve_content __url__ = "https://lists.blocklist.de/lists/all.txt" __info__ = "known attacker" __reference__ = "blocklist.de" def fetch(): retval = {} content = retrieve_content(__url__) for line in content.split('\n'): line = line.strip() if not line or line...
true
true
f7571119a4f449f503918fe65ae8ed84cb10b619
8,152
py
Python
efficientnetv2/efficientnet_v2.py
hankyul2/EfficientNetV2-pytorch
bce59dae3ce69e3e7e8aa99e4f32214b015dd1f8
[ "Apache-2.0" ]
9
2021-11-13T08:49:10.000Z
2022-03-24T12:37:26.000Z
efficientnetv2/efficientnet_v2.py
hankyul2/EfficientNetV2-pytorch
bce59dae3ce69e3e7e8aa99e4f32214b015dd1f8
[ "Apache-2.0" ]
2
2021-11-12T02:07:32.000Z
2021-11-22T04:50:04.000Z
efficientnetv2/efficientnet_v2.py
hankyul2/EfficientNetV2-pytorch
bce59dae3ce69e3e7e8aa99e4f32214b015dd1f8
[ "Apache-2.0" ]
3
2021-11-30T03:03:54.000Z
2022-01-08T14:47:35.000Z
import copy from functools import partial from collections import OrderedDict import torch from torch import nn from efficientnetv2 import get_efficientnet_v2_structure from efficientnetv2 import load_from_zoo class ConvBNAct(nn.Sequential): """Convolution-Normalization-Activation Module""" def __init__(sel...
39.572816
142
0.654809
import copy from functools import partial from collections import OrderedDict import torch from torch import nn from efficientnetv2 import get_efficientnet_v2_structure from efficientnetv2 import load_from_zoo class ConvBNAct(nn.Sequential): def __init__(self, in_channel, out_channel, kernel_size, stride, group...
true
true
f75711e7673714e980140d95602d3fe767cbd7d4
135
py
Python
super32emu/__init__.py
xsjad0/Super32
75cf5828b17cdbce144447a69ff3d1be7ad601f2
[ "BSD-3-Clause" ]
1
2019-12-07T01:56:31.000Z
2019-12-07T01:56:31.000Z
super32emu/__init__.py
xsjad0/Super32
75cf5828b17cdbce144447a69ff3d1be7ad601f2
[ "BSD-3-Clause" ]
42
2019-11-30T12:57:07.000Z
2020-02-26T16:30:33.000Z
super32emu/__init__.py
xsjad0/Super32
75cf5828b17cdbce144447a69ff3d1be7ad601f2
[ "BSD-3-Clause" ]
4
2019-11-27T15:05:33.000Z
2020-05-13T06:51:21.000Z
""" Super32 Emulator """ import logging from logging import NullHandler logging.getLogger(__name__).addHandler(logging.NullHandler())
16.875
61
0.8
import logging from logging import NullHandler logging.getLogger(__name__).addHandler(logging.NullHandler())
true
true
f757124e654aece197d1dcbf7c5ec93394e6cf15
3,712
py
Python
server_cluster/app.py
nlp-tlp/quickgraph
34d888b055a78939095005f9cef363c0430664be
[ "Apache-2.0" ]
1
2022-02-20T09:22:54.000Z
2022-02-20T09:22:54.000Z
server_cluster/app.py
nlp-tlp/quickgraph
34d888b055a78939095005f9cef363c0430664be
[ "Apache-2.0" ]
null
null
null
server_cluster/app.py
nlp-tlp/quickgraph
34d888b055a78939095005f9cef363c0430664be
[ "Apache-2.0" ]
1
2022-02-20T09:22:56.000Z
2022-02-20T09:22:56.000Z
''' API for rank order clustering documents. ''' import itertools import pathlib from collections import Counter, defaultdict from enum import Enum from typing import List, Optional import numpy as np import uvicorn from fastapi import Body, FastAPI, HTTPException from loguru import logger from nltk import FreqDi...
30.677686
112
0.718481
import itertools import pathlib from collections import Counter, defaultdict from enum import Enum from typing import List, Optional import numpy as np import uvicorn from fastapi import Body, FastAPI, HTTPException from loguru import logger from nltk import FreqDist from pydantic import BaseModel, Field from sentenc...
true
true
f7571269c35f6cafcdd3ec54798dd1693e704794
130
py
Python
abc/abc036/abc036c.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc036/abc036c.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc036/abc036c.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
N, *a = map(int, open(0).read().split()) d = {} for i, j in enumerate(sorted(set(a))): d[j] = i for e in a: print(d[e])
14.444444
40
0.507692
N, *a = map(int, open(0).read().split()) d = {} for i, j in enumerate(sorted(set(a))): d[j] = i for e in a: print(d[e])
true
true
f75713a82b3ca7ea21958a0f7eab14947aff9966
4,213
py
Python
tests/data23/recipe-440622.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-05T08:53:26.000Z
2020-06-05T08:53:26.000Z
tests/data23/recipe-440622.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-06-04T13:47:19.000Z
2020-06-04T13:47:57.000Z
tests/data23/recipe-440622.py
JohannesBuchner/pystrict3
f442a89ac6a23f4323daed8ef829d8e9e1197f90
[ "BSD-2-Clause" ]
1
2020-11-07T17:02:46.000Z
2020-11-07T17:02:46.000Z
from random import randint, seed from time import time def game(): print('Welcome to WAR V2!') print() asking = True while asking: try: players = int(input('How many players are there? ')) if players < 2: print('There must be at least two players.') ...
36.008547
99
0.468787
from random import randint, seed from time import time def game(): print('Welcome to WAR V2!') print() asking = True while asking: try: players = int(input('How many players are there? ')) if players < 2: print('There must be at least two players.') ...
true
true
f7571559e5144cb153e821436b665f483807d888
20,304
py
Python
lib/googleappengine/python/google/appengine/ext/remote_api/throttle.py
mtktauseef/wordpresstoblogger
151cc2e1b6c7f4f835dc51dfb8f50a1b0d5caa74
[ "Apache-2.0" ]
1
2015-10-28T21:28:29.000Z
2015-10-28T21:28:29.000Z
lib/googleappengine/python/google/appengine/ext/remote_api/throttle.py
mtktauseef/wordpresstoblogger
151cc2e1b6c7f4f835dc51dfb8f50a1b0d5caa74
[ "Apache-2.0" ]
null
null
null
lib/googleappengine/python/google/appengine/ext/remote_api/throttle.py
mtktauseef/wordpresstoblogger
151cc2e1b6c7f4f835dc51dfb8f50a1b0d5caa74
[ "Apache-2.0" ]
5
2016-05-26T18:35:17.000Z
2020-04-15T06:53:24.000Z
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
31.52795
80
0.717199
import logging import threading import time import urllib2 import urlparse from google.appengine.api import apiproxy_stub_map from google.appengine.ext.remote_api import remote_api_stub from google.appengine.tools import appengine_rpc logger = logging.getLogger('google.appengine.ext.remote_api.thro...
true
true
f75715b999ee3bc1949b08a263b317462848461d
10,745
py
Python
flopy/modflow/mfdrn.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
1
2019-11-03T15:06:10.000Z
2019-11-03T15:06:10.000Z
flopy/modflow/mfdrn.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
flopy/modflow/mfdrn.py
ritchie46/flopy
8e7284dcb3aaf5c12293d442248c2c2d9959f835
[ "CC0-1.0", "BSD-3-Clause" ]
null
null
null
""" mfdrn module. Contains the ModflowDrn class. Note that the user can access the ModflowDrn class as `flopy.modflow.ModflowDrn`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?drn.htm>`_. """ import...
36.300676
99
0.54993
import sys import numpy as np from ..pakbase import Package from ..utils.util_list import MfList from ..utils.recarray_utils import create_empty_recarray class ModflowDrn(Package): def __init__(self, model, ipakcb=None, stress_period_data=None, dtype=None, extension='drn', unitnumber=N...
true
true
f75715c992563c935c5c4a9bce26002ed30c1cbb
27,513
py
Python
python/ray/serve/api.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
1
2022-03-07T06:40:06.000Z
2022-03-07T06:40:06.000Z
python/ray/serve/api.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
29
2021-11-24T00:50:07.000Z
2022-03-19T07:11:36.000Z
python/ray/serve/api.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
null
null
null
import collections import inspect import logging from typing import ( Any, Callable, Dict, Optional, Tuple, Union, overload, ) from fastapi import APIRouter, FastAPI from starlette.requests import Request from uvicorn.config import Config from uvicorn.lifespan.on import LifespanOn from ray...
38.533613
88
0.66067
import collections import inspect import logging from typing import ( Any, Callable, Dict, Optional, Tuple, Union, overload, ) from fastapi import APIRouter, FastAPI from starlette.requests import Request from uvicorn.config import Config from uvicorn.lifespan.on import LifespanOn from ray...
true
true
f75715ebd4823aa5650615c2e818d3cbd1f61b3f
3,085
py
Python
scripts/e72.py
JackKelly/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
38
2015-08-14T14:38:52.000Z
2021-12-15T03:21:04.000Z
scripts/e72.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
null
null
null
scripts/e72.py
VidipG/neuralnilm_prototype
2119292e7d5c8a137797ad3c9abf9f37e7f749af
[ "MIT" ]
26
2015-09-24T20:55:26.000Z
2021-12-07T15:42:09.000Z
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, Dens...
25.286885
92
0.62269
from __future__ import print_function, division from neuralnilm import Net, RealApplianceSource, BLSTMLayer, SubsampleLayer, DimshuffleLayer from lasagne.nonlinearities import sigmoid, rectify from lasagne.objectives import crossentropy from lasagne.init import Uniform, Normal from lasagne.layers import LSTMLayer, Dens...
true
true
f757177f79c39ea8eee8f6b41f61f93db9413dc6
5,168
py
Python
src/mongoengine/queryset/visitor.py
saurabh1e/flask-mongo-starter
8bceac18bddb0b4c6632940cb6a41220fa338a16
[ "MIT" ]
1
2016-08-13T11:30:48.000Z
2016-08-13T11:30:48.000Z
src/mongoengine/queryset/visitor.py
saurabh1e/flask-mongo-starter
8bceac18bddb0b4c6632940cb6a41220fa338a16
[ "MIT" ]
null
null
null
src/mongoengine/queryset/visitor.py
saurabh1e/flask-mongo-starter
8bceac18bddb0b4c6632940cb6a41220fa338a16
[ "MIT" ]
null
null
null
import copy from mongoengine.errors import InvalidQueryError from mongoengine.python_support import product, reduce from mongoengine.queryset import transform __all__ = ('Q',) class QNodeVisitor(object): """Base visitor class for visiting Q-object nodes in a query tree. """ def visit_combination(self,...
29.19774
117
0.605457
import copy from mongoengine.errors import InvalidQueryError from mongoengine.python_support import product, reduce from mongoengine.queryset import transform __all__ = ('Q',) class QNodeVisitor(object): def visit_combination(self, combination): return combination def visit_query(self, query): ...
true
true
f75718fb615d2a27cdca73136a1917afd91199b5
981
py
Python
src/tweetengine/utils.py
Arachnid/tweetengine
2e111a8cfb5316c868f644a10536e25edca9a179
[ "Apache-2.0" ]
2
2017-09-03T20:55:23.000Z
2020-05-31T17:07:57.000Z
src/tweetengine/utils.py
Arachnid/tweetengine
2e111a8cfb5316c868f644a10536e25edca9a179
[ "Apache-2.0" ]
null
null
null
src/tweetengine/utils.py
Arachnid/tweetengine
2e111a8cfb5316c868f644a10536e25edca9a179
[ "Apache-2.0" ]
null
null
null
from tweetengine import model from google.appengine.api import users def setConfiguration(): account_name='tweet_engine' password='passwd' oauth_key='fookey' oauth_secret='foosecret' conf = model.Configuration.instance() conf.oauth_key = oauth_key conf.oauth_secret = oauth_secret con...
25.153846
61
0.647299
from tweetengine import model from google.appengine.api import users def setConfiguration(): account_name='tweet_engine' password='passwd' oauth_key='fookey' oauth_secret='foosecret' conf = model.Configuration.instance() conf.oauth_key = oauth_key conf.oauth_secret = oauth_secret con...
true
true
f7571902dc7e51b184bce055e1e57c45c40cd3a5
591
py
Python
ticketing/forms.py
Receiling/cinema_ticketing
fb88606fb6aa304bd661368b855464de6388f82c
[ "MIT" ]
null
null
null
ticketing/forms.py
Receiling/cinema_ticketing
fb88606fb6aa304bd661368b855464de6388f82c
[ "MIT" ]
null
null
null
ticketing/forms.py
Receiling/cinema_ticketing
fb88606fb6aa304bd661368b855464de6388f82c
[ "MIT" ]
null
null
null
from django import forms from ticketing.models import Customer, Employee, Movie_comment, Cinema_comment class MovieCommentForm(forms.ModelForm): """电影评价的表单""" class Meta: model = Movie_comment fields = ['comment', 'score'] labels = {'comment': '评论', 'score': '评分'} widgets = {'...
26.863636
78
0.610829
from django import forms from ticketing.models import Customer, Employee, Movie_comment, Cinema_comment class MovieCommentForm(forms.ModelForm): class Meta: model = Movie_comment fields = ['comment', 'score'] labels = {'comment': '评论', 'score': '评分'} widgets = {'email': forms.Text...
true
true
f75719347e1136a7cea1252419992ace23bc9a89
5,399
py
Python
configs/_trans_drone_wide/yolact_r50_1x8_coco_mix.py
qilei123/mmdetection
6c18ff0866938d982f4555a8c43979733dba1c7a
[ "Apache-2.0" ]
null
null
null
configs/_trans_drone_wide/yolact_r50_1x8_coco_mix.py
qilei123/mmdetection
6c18ff0866938d982f4555a8c43979733dba1c7a
[ "Apache-2.0" ]
null
null
null
configs/_trans_drone_wide/yolact_r50_1x8_coco_mix.py
qilei123/mmdetection
6c18ff0866938d982f4555a8c43979733dba1c7a
[ "Apache-2.0" ]
null
null
null
_base_ = '../_base_/default_runtime.py' # model settings img_size = 550 classes=('Small 1-piece vehicle', 'Large 1-piece vehicle', 'Extra-large 2-piece truck') model = dict( type='YOLACT', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices...
31.946746
79
0.587146
_base_ = '../_base_/default_runtime.py' img_size = 550 classes=('Small 1-piece vehicle', 'Large 1-piece vehicle', 'Extra-large 2-piece truck') model = dict( type='YOLACT', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), ...
true
true
f7571b2326313cfc6d04bd98a426a256b8b2935d
8,362
py
Python
NYS-covasim/second_wave_scenarios.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
NYS-covasim/second_wave_scenarios.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
NYS-covasim/second_wave_scenarios.py
molkjar/bachelor
a0591691b820c6c8a45d16f8d55f3a7e80ea384b
[ "MIT" ]
null
null
null
import covasim as cv import covasim.utils as cvu import optuna as op import sciris as sc import pandas as pd import numpy as np import os from collections import defaultdict import population ## Interesting part starts around line 200 ## First part is setup, optimization workers and alike - Important to run before ana...
26.13125
154
0.603683
import covasim as cv import covasim.utils as cvu import optuna as op import sciris as sc import pandas as pd import numpy as np import os from collections import defaultdict import population days=[0, 141, 142], vals=[0, 10, 0])), ] interventions.insert(0, population.UpdateNetworks()) retur...
true
true
f7571bd88ea0a8b7b7a00fd973906d50ad04a2e3
17,990
py
Python
tutorials/bios-boot-tutorial/bios-boot-tutorial.py
Arielce/dio
eb8035664f605783f86b41d34006aeb9ef861f13
[ "MIT" ]
null
null
null
tutorials/bios-boot-tutorial/bios-boot-tutorial.py
Arielce/dio
eb8035664f605783f86b41d34006aeb9ef861f13
[ "MIT" ]
null
null
null
tutorials/bios-boot-tutorial/bios-boot-tutorial.py
Arielce/dio
eb8035664f605783f86b41d34006aeb9ef861f13
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import argparse import json import numpy import os import random import re import subprocess import sys import time args = None logFile = None unlockTimeout = 999999999 fastUnstakeSystem = './fast.refund/dccio.system/dccio.system.wasm' systemAccounts = [ 'dccio.bpay', 'dccio.msig', ...
43.878049
213
0.610506
import argparse import json import numpy import os import random import re import subprocess import sys import time args = None logFile = None unlockTimeout = 999999999 fastUnstakeSystem = './fast.refund/dccio.system/dccio.system.wasm' systemAccounts = [ 'dccio.bpay', 'dccio.msig', 'dccio.names', '...
true
true