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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f752a6e37dc39657eb35e2a6040256c10a9265c9 | 33 | py | Python | mpf/platforms/lisy/__init__.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 163 | 2015-01-25T02:19:50.000Z | 2022-03-26T12:00:28.000Z | mpf/platforms/lisy/__init__.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 1,086 | 2015-03-23T19:53:17.000Z | 2022-03-24T20:46:11.000Z | mpf/platforms/lisy/__init__.py | Scottacus64/mpf | fcfb6c5698b9c7d8bf0eb64b021aaa389ea6478a | [
"MIT"
] | 148 | 2015-01-28T02:31:39.000Z | 2022-03-22T13:54:01.000Z | """LISY System 1/80 platform."""
| 16.5 | 32 | 0.636364 | true | true | |
f752a710831ddd9175a70eee1fc14d430dcd8c52 | 22 | py | Python | ionic_liquids/visualization/__init__.py | qize/ionic_liquids | 64eebaf505b1d89b2e2ef82f8fa8959b0a0c3956 | [
"MIT"
] | 2 | 2020-10-21T08:41:41.000Z | 2021-08-05T10:20:24.000Z | ionic_liquids/visualization/__init__.py | qize/ionic_liquids | 64eebaf505b1d89b2e2ef82f8fa8959b0a0c3956 | [
"MIT"
] | null | null | null | ionic_liquids/visualization/__init__.py | qize/ionic_liquids | 64eebaf505b1d89b2e2ef82f8fa8959b0a0c3956 | [
"MIT"
] | 3 | 2017-11-08T23:03:10.000Z | 2020-10-21T08:41:48.000Z | #Visualization Module
| 11 | 21 | 0.863636 | true | true | |
f752a820c85c186245f600d40577c34c4890e711 | 635 | py | Python | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/mixed_precision/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | 2 | 2020-09-30T00:11:09.000Z | 2021-10-04T13:00:38.000Z | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/mixed_precision/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | null | null | null | ProgettoLube/WebInspector/venv/Lib/site-packages/tensorflow/python/keras/api/_v1/keras/mixed_precision/__init__.py | Lube-Project/ProgettoLube | cbf33971e2c2e865783ec1a2302625539186a338 | [
"MIT"
] | 1 | 2021-01-28T01:57:41.000Z | 2021-01-28T01:57:41.000Z | # This file is MACHINE GENERATED! Do not edit.
# Generated by: tensorflow/python/tools/api/generator/create_python_api.py script.
"""Public API for tf.keras.mixed_precision namespace.
"""
from __future__ import print_function as _print_function
import sys as _sys
from . import experimental
del _print_function
from... | 31.75 | 90 | 0.801575 |
from __future__ import print_function as _print_function
import sys as _sys
from . import experimental
del _print_function
from tensorflow.python.util import module_wrapper as _module_wrapper
if not isinstance(_sys.modules[__name__], _module_wrapper.TFModuleWrapper):
_sys.modules[__name__] = _module_wrapper.T... | true | true |
f752a84c199321d4db4be936ffa6f5e8775d7582 | 11,363 | py | Python | wavefront_api_client/models/customer_facing_user_object.py | mdennehy/python-client | 4d9cfa32075a6a65d88a38fe9e72b282e87b8808 | [
"Apache-2.0"
] | null | null | null | wavefront_api_client/models/customer_facing_user_object.py | mdennehy/python-client | 4d9cfa32075a6a65d88a38fe9e72b282e87b8808 | [
"Apache-2.0"
] | null | null | null | wavefront_api_client/models/customer_facing_user_object.py | mdennehy/python-client | 4d9cfa32075a6a65d88a38fe9e72b282e87b8808 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Wavefront REST API
<p>The Wavefront REST API enables you to interact with Wavefront servers using standard REST API tools. You can use the REST API to automate commonly executed operations such as automatically tagging sources.</p><p>When you make REST API calls outside the Wavefront REST ... | 32.84104 | 409 | 0.624747 |
import pprint
import re
import six
class CustomerFacingUserObject(object):
swagger_types = {
'customer': 'str',
'escaped_identifier': 'str',
'gravatar_url': 'str',
'groups': 'list[str]',
'id': 'str',
'identifier': 'str',
'last_successful_login': 'int... | true | true |
f752a953fdc878924a8d06767dd98c77f89ddd8f | 3,670 | py | Python | test/TestUrlInstaller.py | nitehawck/DevEnvManager | 425b0d621be577fe73f22b4641f7099eac65669e | [
"MIT"
] | 1 | 2016-05-16T23:13:47.000Z | 2016-05-16T23:13:47.000Z | test/TestUrlInstaller.py | nitehawck/DevEnvManager | 425b0d621be577fe73f22b4641f7099eac65669e | [
"MIT"
] | 41 | 2016-01-22T00:56:14.000Z | 2016-05-12T14:38:37.000Z | test/TestUrlInstaller.py | nitehawck/DevEnvManager | 425b0d621be577fe73f22b4641f7099eac65669e | [
"MIT"
] | null | null | null | import os
import unittest
import mock
from dem.dependency.url import UrlInstaller
from dem.project.cache import PackageCache
class TestUrlInstaller(unittest.TestCase):
@mock.patch('wget.download')
def test_will_get_packages_and_download(self, mock_wget):
cache = mock.MagicMock(spec = PackageCache)
... | 45.308642 | 113 | 0.648229 | import os
import unittest
import mock
from dem.dependency.url import UrlInstaller
from dem.project.cache import PackageCache
class TestUrlInstaller(unittest.TestCase):
@mock.patch('wget.download')
def test_will_get_packages_and_download(self, mock_wget):
cache = mock.MagicMock(spec = PackageCache)
... | true | true |
f752a969deb31ece7e7159fbb6b61f42287277c4 | 10,412 | py | Python | test/workers/test_websocket_worker.py | shubhamsingh987/PySyft | ff967e3735bd7d47667d1d3e5038ba1493ca2e90 | [
"Apache-2.0"
] | 1 | 2020-05-25T13:44:29.000Z | 2020-05-25T13:44:29.000Z | test/workers/test_websocket_worker.py | shubhamsingh987/PySyft | ff967e3735bd7d47667d1d3e5038ba1493ca2e90 | [
"Apache-2.0"
] | 2 | 2020-03-09T09:17:06.000Z | 2020-04-09T13:33:12.000Z | test/workers/test_websocket_worker.py | shubhamsingh987/PySyft | ff967e3735bd7d47667d1d3e5038ba1493ca2e90 | [
"Apache-2.0"
] | 1 | 2022-03-06T06:22:21.000Z | 2022-03-06T06:22:21.000Z | import io
from os.path import exists, join
import time
from socket import gethostname
from OpenSSL import crypto, SSL
import pytest
import torch
import syft as sy
from syft.generic.frameworks.hook import hook_args
from syft.frameworks.torch.fl import utils
from syft.workers.websocket_client import WebsocketClientWorke... | 30.623529 | 151 | 0.689109 | import io
from os.path import exists, join
import time
from socket import gethostname
from OpenSSL import crypto, SSL
import pytest
import torch
import syft as sy
from syft.generic.frameworks.hook import hook_args
from syft.frameworks.torch.fl import utils
from syft.workers.websocket_client import WebsocketClientWorke... | true | true |
f752aa351e1d134bf0a1b57639df2b692ec1fb2b | 5,082 | py | Python | service/api/resources/devices.py | alanquillin/rpi-light-controller | a22d1bbe661e9842ac61aea38164b9faf6fa1cc8 | [
"MIT"
] | null | null | null | service/api/resources/devices.py | alanquillin/rpi-light-controller | a22d1bbe661e9842ac61aea38164b9faf6fa1cc8 | [
"MIT"
] | null | null | null | service/api/resources/devices.py | alanquillin/rpi-light-controller | a22d1bbe661e9842ac61aea38164b9faf6fa1cc8 | [
"MIT"
] | null | null | null | from flask import request
from resources import BaseResource, ResourceMixinBase
from db import session_scope
from db.devices import Devices as DevicesDB
from lib import devices as devicesLib
class DeviceResourceMixin(ResourceMixinBase):
def __init__(self):
super().__init__()
def get_status(self, ... | 37.367647 | 151 | 0.61039 | from flask import request
from resources import BaseResource, ResourceMixinBase
from db import session_scope
from db.devices import Devices as DevicesDB
from lib import devices as devicesLib
class DeviceResourceMixin(ResourceMixinBase):
def __init__(self):
super().__init__()
def get_status(self, ... | true | true |
f752aa71e6a98de7a9e902643ab96eaff7eb972c | 1,150 | py | Python | bootcamp/articles/migrations/0009_auto_20220323_2348.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | bootcamp/articles/migrations/0009_auto_20220323_2348.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | bootcamp/articles/migrations/0009_auto_20220323_2348.py | elbakouchi/bootcamp | 2c7a0cd2ddb7632acb3009f94d728792ddf9644f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.12 on 2022-03-23 23:48
import django.core.validators
from django.db import migrations, models
import django_ckeditor_5.fields
class Migration(migrations.Migration):
dependencies = [
('articles', '0008_auto_20220320_1346'),
]
operations = [
migrations.AlterField... | 31.944444 | 143 | 0.612174 |
import django.core.validators
from django.db import migrations, models
import django_ckeditor_5.fields
class Migration(migrations.Migration):
dependencies = [
('articles', '0008_auto_20220320_1346'),
]
operations = [
migrations.AlterField(
model_name='article',
... | true | true |
f752abd3e7e97e5788172f1002cf0feae4a6c745 | 5,305 | py | Python | ding/hpc_rl/tests/test_lstm.py | sailxjx/DI-engine | c6763f8e2ba885a2a02f611195a1b5f8b50bff00 | [
"Apache-2.0"
] | 464 | 2021-07-08T07:26:33.000Z | 2022-03-31T12:35:16.000Z | ding/hpc_rl/tests/test_lstm.py | sailxjx/DI-engine | c6763f8e2ba885a2a02f611195a1b5f8b50bff00 | [
"Apache-2.0"
] | 177 | 2021-07-09T08:22:55.000Z | 2022-03-31T07:35:22.000Z | ding/hpc_rl/tests/test_lstm.py | sailxjx/DI-engine | c6763f8e2ba885a2a02f611195a1b5f8b50bff00 | [
"Apache-2.0"
] | 92 | 2021-07-08T12:16:37.000Z | 2022-03-31T09:24:41.000Z | import time
import torch
from hpc_rll.origin.rnn import get_lstm
from hpc_rll.torch_utils.network.rnn import LSTM
from testbase import mean_relative_error, times
assert torch.cuda.is_available()
use_cuda = True
seq_len = 64
batch_size = 3
input_size = 1792
hidden_size = 384
num_layers = 3
norm_type = 'LN'
dropout = 0... | 37.624113 | 145 | 0.651838 | import time
import torch
from hpc_rll.origin.rnn import get_lstm
from hpc_rll.torch_utils.network.rnn import LSTM
from testbase import mean_relative_error, times
assert torch.cuda.is_available()
use_cuda = True
seq_len = 64
batch_size = 3
input_size = 1792
hidden_size = 384
num_layers = 3
norm_type = 'LN'
dropout = 0... | true | true |
f752acf642764fb0cce0183aa4742b306ee49ec4 | 1,382 | py | Python | plugins/better_tables/__init__.py | jeorryb/datarambler | 1968ccdc018182f3ad9d34ffaf7c743cebc92357 | [
"MIT"
] | 13 | 2015-02-19T22:14:07.000Z | 2021-02-07T14:16:34.000Z | plugins/better_tables/__init__.py | jeorryb/datarambler | 1968ccdc018182f3ad9d34ffaf7c743cebc92357 | [
"MIT"
] | 2 | 2015-07-28T10:02:57.000Z | 2017-07-28T18:08:59.000Z | pelican-plugins/better_tables/__init__.py | JN-Blog/jn-blog.com | 669bf9a9c6813f2b7980792fb137f6718077aea1 | [
"MIT"
] | 7 | 2015-08-26T16:52:00.000Z | 2019-10-11T05:32:37.000Z | # Copyright (c) 2015 Alex Waite
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute... | 43.1875 | 79 | 0.767004 |
__title__ = 'better-tables'
__version__ = '0.1.0'
__author__ = 'Alex Waite'
__credits__ = ["Alex Waite"]
__maintainer__ = "Alex Waite"
__email__ = "Alexqw85@gmail.com"
__status__ = "Stable"
__license__ = 'MIT'
__copyright__ = 'Copyright 2015'
from .better_tables import *
| true | true |
f752ad809751257eeefc25facdc6911f8de7aa74 | 2,010 | py | Python | tests/codegen/handlers/test_attribute_effect_choice.py | pashashocky/xsdata | 1cd681598d2235626d0e21716fc9fb885d26e351 | [
"MIT"
] | null | null | null | tests/codegen/handlers/test_attribute_effect_choice.py | pashashocky/xsdata | 1cd681598d2235626d0e21716fc9fb885d26e351 | [
"MIT"
] | null | null | null | tests/codegen/handlers/test_attribute_effect_choice.py | pashashocky/xsdata | 1cd681598d2235626d0e21716fc9fb885d26e351 | [
"MIT"
] | null | null | null | from xsdata.codegen.handlers import AttributeEffectiveChoiceHandler
from xsdata.codegen.models import Restrictions
from xsdata.utils.testing import AttrFactory
from xsdata.utils.testing import ClassFactory
from xsdata.utils.testing import FactoryTestCase
class AttributeEffectiveChoiceHandlerTests(FactoryTestCase):
... | 40.2 | 86 | 0.692537 | from xsdata.codegen.handlers import AttributeEffectiveChoiceHandler
from xsdata.codegen.models import Restrictions
from xsdata.utils.testing import AttrFactory
from xsdata.utils.testing import ClassFactory
from xsdata.utils.testing import FactoryTestCase
class AttributeEffectiveChoiceHandlerTests(FactoryTestCase):
... | true | true |
f752aedf208bba00b38ad9b975d75f81f1b03eff | 424 | py | Python | geopy/__init__.py | pivotal-energy-solutions/geopy | f34f14c92224964e6eeb161e65238f9bae50694b | [
"MIT"
] | 1 | 2019-02-16T01:31:41.000Z | 2019-02-16T01:31:41.000Z | geopy/__init__.py | pivotal-energy-solutions/geopy | f34f14c92224964e6eeb161e65238f9bae50694b | [
"MIT"
] | null | null | null | geopy/__init__.py | pivotal-energy-solutions/geopy | f34f14c92224964e6eeb161e65238f9bae50694b | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from geopy.point import Point
from geopy.location import Location
from geopy import geocoders
__name__ = 'geopy'
__author__ = 'Brian Beck'
__version_info__ = (1, 0, 0)
__version__ = '.'.join(map(str, __version_info__))
__date__ = '2014/07/22 4:47:00 PM'
__credits__ = ['Brian Be... | 30.285714 | 67 | 0.759434 | from __future__ import unicode_literals
from geopy.point import Point
from geopy.location import Location
from geopy import geocoders
__name__ = 'geopy'
__author__ = 'Brian Beck'
__version_info__ = (1, 0, 0)
__version__ = '.'.join(map(str, __version_info__))
__date__ = '2014/07/22 4:47:00 PM'
__credits__ = ['Brian Be... | true | true |
f752af8d1e84a5d41818f4c70e7b9661f5a949b4 | 76 | py | Python | social/backends/facebook.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 1,987 | 2015-01-01T16:12:45.000Z | 2022-03-29T14:24:25.000Z | social/backends/facebook.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 731 | 2015-01-01T22:55:25.000Z | 2022-03-10T15:07:51.000Z | virtual/lib/python3.6/site-packages/social/backends/facebook.py | dennismwaniki67/awards | 80ed10541f5f751aee5f8285ab1ad54cfecba95f | [
"MIT"
] | 1,082 | 2015-01-01T16:27:26.000Z | 2022-03-22T21:18:33.000Z | from social_core.backends.facebook import FacebookOAuth2, FacebookAppOAuth2
| 38 | 75 | 0.894737 | from social_core.backends.facebook import FacebookOAuth2, FacebookAppOAuth2
| true | true |
f752af965b3c5d1687e51da493cb99eac4ccfd11 | 2,003 | py | Python | django_extensions/management/commands/compile_pyc.py | AsymmetricVentures/django-extensions | 4abd62bd33fef2f3685731658a8852085442d8c9 | [
"MIT"
] | 1 | 2021-12-23T08:16:17.000Z | 2021-12-23T08:16:17.000Z | django_extensions/management/commands/compile_pyc.py | DeronW/django-extensions | 40020f5b4788064af3be54b44c1768c5231cf7ee | [
"MIT"
] | null | null | null | django_extensions/management/commands/compile_pyc.py | DeronW/django-extensions | 40020f5b4788064af3be54b44c1768c5231cf7ee | [
"MIT"
] | null | null | null | import os
import time
import fnmatch
import warnings
import py_compile
from django.core.management.base import NoArgsCommand
from django.conf import settings
from django_extensions.management.utils import get_project_root
from optparse import make_option
from os.path import join as _j
class Command(NoArgsCommand):
... | 37.792453 | 118 | 0.640539 | import os
import time
import fnmatch
import warnings
import py_compile
from django.core.management.base import NoArgsCommand
from django.conf import settings
from django_extensions.management.utils import get_project_root
from optparse import make_option
from os.path import join as _j
class Command(NoArgsCommand):
... | true | true |
f752afb77ebf990e016020ee433eff5c208736f1 | 96 | py | Python | base/urls.py | frederikkoenigwork/my_python_django_website | 1ec644c7c420f119c55d45365ca0ff342bc7e3aa | [
"Unlicense"
] | null | null | null | base/urls.py | frederikkoenigwork/my_python_django_website | 1ec644c7c420f119c55d45365ca0ff342bc7e3aa | [
"Unlicense"
] | null | null | null | base/urls.py | frederikkoenigwork/my_python_django_website | 1ec644c7c420f119c55d45365ca0ff342bc7e3aa | [
"Unlicense"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.home),
]
| 10.666667 | 28 | 0.65625 | from django.urls import path
from . import views
urlpatterns = [
path('', views.home),
]
| true | true |
f752b131ed8a09c47a840c5eac4520b6c0910a5e | 11,971 | py | Python | buzzard/test/test_vectorproxy_opencreate.py | azarz/buzzard | 1b61d0455a3e87808040a1d761de2c8935f3fe4d | [
"Apache-2.0"
] | null | null | null | buzzard/test/test_vectorproxy_opencreate.py | azarz/buzzard | 1b61d0455a3e87808040a1d761de2c8935f3fe4d | [
"Apache-2.0"
] | null | null | null | buzzard/test/test_vectorproxy_opencreate.py | azarz/buzzard | 1b61d0455a3e87808040a1d761de2c8935f3fe4d | [
"Apache-2.0"
] | null | null | null | """Test:
- Vector opening
- Vector creation
- Attributes validity
- Vector deletion
"""
# pylint: disable=redefined-outer-name
from __future__ import division, print_function
import itertools
import os
import uuid
import tempfile
import operator
from pprint import pprint
import numpy as np
import pytest
from osgeo i... | 26.66147 | 279 | 0.536881 |
from __future__ import division, print_function
import itertools
import os
import uuid
import tempfile
import operator
from pprint import pprint
import numpy as np
import pytest
from osgeo import gdal
import shapely.geometry as sg
from .tools import get_srs_by_name, eq
from buzzard import Footprint, DataSource, sr... | true | true |
f752b2046fa25034d63ea70d9037916af73dbb22 | 8,008 | py | Python | mars/tensor/merge/concatenate.py | wdkwyf/mars | 3f750e360e64380eab779301a5103994d4886b6a | [
"Apache-2.0"
] | null | null | null | mars/tensor/merge/concatenate.py | wdkwyf/mars | 3f750e360e64380eab779301a5103994d4886b6a | [
"Apache-2.0"
] | null | null | null | mars/tensor/merge/concatenate.py | wdkwyf/mars | 3f750e360e64380eab779301a5103994d4886b6a | [
"Apache-2.0"
] | null | null | null | # Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 37.952607 | 98 | 0.605894 |
import itertools
import operator
from collections import Iterable
import numpy as np
from ... import opcodes as OperandDef
from ...compat import six, lrange, lmap
from ...serialize import AnyField
from ..array_utils import device, as_same_device
from ..utils import validate_axis, unify_chunks
from ..dat... | true | true |
f752b2b3a9c27bd7e5fe5ddc77d33af8b95e02a2 | 20,385 | py | Python | tensorflow/contrib/learn/python/learn/estimators/estimator.py | ash-vs/tensorflow | 303dc341a6300a4a2eee820679bca30547426aa6 | [
"Apache-2.0"
] | 42 | 2016-08-22T03:49:32.000Z | 2020-06-29T14:00:27.000Z | tensorflow/contrib/learn/python/learn/estimators/estimator.py | alanponce/tensorflow | 303dc341a6300a4a2eee820679bca30547426aa6 | [
"Apache-2.0"
] | 6 | 2016-09-02T03:44:35.000Z | 2018-11-27T13:20:36.000Z | tensorflow/contrib/learn/python/learn/estimators/estimator.py | alanponce/tensorflow | 303dc341a6300a4a2eee820679bca30547426aa6 | [
"Apache-2.0"
] | 12 | 2017-03-18T22:22:28.000Z | 2020-06-19T20:54:53.000Z | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 36.207815 | 80 | 0.677312 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import abc
import os
import tempfile
import time
import six
from tensorflow.contrib import framework as contrib_framework
from tensorflow.contrib import layers
from tensorflow.contrib import los... | true | true |
f752b3ba726b744c6b780014cd9a1b48978bfed5 | 6,182 | py | Python | basic_skills/views_ex/views_two_scoops_of_django.py | bluebamus/django_miscellaneous_book | 22e0851b3a07aeef94bb723b334f036ed5c17f72 | [
"MIT"
] | null | null | null | basic_skills/views_ex/views_two_scoops_of_django.py | bluebamus/django_miscellaneous_book | 22e0851b3a07aeef94bb723b334f036ed5c17f72 | [
"MIT"
] | null | null | null | basic_skills/views_ex/views_two_scoops_of_django.py | bluebamus/django_miscellaneous_book | 22e0851b3a07aeef94bb723b334f036ed5c17f72 | [
"MIT"
] | null | null | null |
from django.views.generic import CreateView, UpdateView, DetailView, ListView
from ..models_ex.models_two_scoops_of_django import Flavor
from django import forms
# reference : https://blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=pjok1122&logNo=221609547295
# sub reference : https://m.blog.naver.com/pjok1... | 33.967033 | 107 | 0.598997 |
from django.views.generic import CreateView, UpdateView, DetailView, ListView
from ..models_ex.models_two_scoops_of_django import Flavor
from django import forms
class OrderForm(forms.ModelForm):
def __init__(self, request, *args, **kwargs):
super().__init__(*args, **kwargs)
self.request = re... | true | true |
f752b3d371b92798fe5547bb9503013909c18198 | 1,305 | py | Python | upstream_utils/update_fmt.py | shueja-personal/allwpilib | 4b2f6be29e21986703d9c3ddcd2fe07121b2ff6b | [
"BSD-3-Clause"
] | 1 | 2022-01-12T19:59:09.000Z | 2022-01-12T19:59:09.000Z | upstream_utils/update_fmt.py | shueja-personal/allwpilib | 4b2f6be29e21986703d9c3ddcd2fe07121b2ff6b | [
"BSD-3-Clause"
] | null | null | null | upstream_utils/update_fmt.py | shueja-personal/allwpilib | 4b2f6be29e21986703d9c3ddcd2fe07121b2ff6b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import os
import shutil
from upstream_utils import setup_upstream_repo, comment_out_invalid_includes, walk_cwd_and_copy_if, apply_patches
def main():
root, repo = setup_upstream_repo("https://github.com/fmtlib/fmt", "8.1.1")
wpiutil = os.path.join(root, "wpiutil")
# Delete old in... | 32.625 | 113 | 0.672031 |
import os
import shutil
from upstream_utils import setup_upstream_repo, comment_out_invalid_includes, walk_cwd_and_copy_if, apply_patches
def main():
root, repo = setup_upstream_repo("https://github.com/fmtlib/fmt", "8.1.1")
wpiutil = os.path.join(root, "wpiutil")
for d in ["src/main/native/fmtli... | true | true |
f752b59568a74f56c9b581651e54d1cab2af227f | 341 | bzl | Python | tensorflow/core/kernels/fuzzing/tf_ops_fuzz_target_lib.bzl | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 850 | 2018-01-18T05:56:02.000Z | 2022-03-31T08:17:34.000Z | tensorflow/core/kernels/fuzzing/tf_ops_fuzz_target_lib.bzl | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/core/kernels/fuzzing/tf_ops_fuzz_target_lib.bzl | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 364 | 2018-01-22T02:11:16.000Z | 2022-03-27T12:58:47.000Z | """Fuzzing template for TensorFlow ops."""
def tf_ops_fuzz_target_lib(name):
native.cc_library(
name = name + "_fuzz_lib",
srcs = [name + "_fuzz.cc"],
deps = [
"//tensorflow/core/kernels/fuzzing:fuzz_session",
"//tensorflow/cc:cc_ops",
],
tags = ["no_windows"],
... | 24.357143 | 59 | 0.571848 |
def tf_ops_fuzz_target_lib(name):
native.cc_library(
name = name + "_fuzz_lib",
srcs = [name + "_fuzz.cc"],
deps = [
"//tensorflow/core/kernels/fuzzing:fuzz_session",
"//tensorflow/cc:cc_ops",
],
tags = ["no_windows"],
alwayslink = 1,
)
| true | true |
f752b5ddf3ec6808a88716047e6f7c36999ac7ad | 8,479 | py | Python | networkx/readwrite/adjlist.py | Dosenpfand/networkx | 77eb43b8f03fe8afdfdce94a88bc65d7c904b398 | [
"BSD-3-Clause"
] | null | null | null | networkx/readwrite/adjlist.py | Dosenpfand/networkx | 77eb43b8f03fe8afdfdce94a88bc65d7c904b398 | [
"BSD-3-Clause"
] | null | null | null | networkx/readwrite/adjlist.py | Dosenpfand/networkx | 77eb43b8f03fe8afdfdce94a88bc65d7c904b398 | [
"BSD-3-Clause"
] | 1 | 2019-01-30T17:57:36.000Z | 2019-01-30T17:57:36.000Z | # -*- coding: utf-8 -*-
"""
**************
Adjacency List
**************
Read and write NetworkX graphs as adjacency lists.
Adjacency list format is useful for graphs without data associated
with nodes or edges and for nodes that can be meaningfully represented
as strings.
Format
------
The adjacency list format cons... | 27.003185 | 76 | 0.581436 |
__author__ = '\n'.join(['Aric Hagberg <hagberg@lanl.gov>',
'Dan Schult <dschult@colgate.edu>',
'Loïc Séguin-C. <loicseguin@gmail.com>'])
__all__ = ['generate_adjlist',
'write_adjlist',
'parse_adjlist',
'read_adjlist']
from network... | true | true |
f752b618458066e8641d5b055cac155ae365e097 | 693 | py | Python | ninja/security/base.py | Stamper/django-ninja | 39479db2937b0a8a918cfe1c0790ad7016db7edc | [
"MIT"
] | 1 | 2021-05-03T15:38:41.000Z | 2021-05-03T15:38:41.000Z | ninja/security/base.py | Stamper/django-ninja | 39479db2937b0a8a918cfe1c0790ad7016db7edc | [
"MIT"
] | null | null | null | ninja/security/base.py | Stamper/django-ninja | 39479db2937b0a8a918cfe1c0790ad7016db7edc | [
"MIT"
] | null | null | null | from ninja.errors import ConfigError
class SecuritySchema(dict):
def __init__(self, type: str, **kwargs):
super().__init__(type=type, **kwargs)
class AuthBase:
def __init__(self):
if not hasattr(self, "openapi_type"):
raise ConfigError("If you extend AuthBase you need to define o... | 30.130435 | 87 | 0.627706 | from ninja.errors import ConfigError
class SecuritySchema(dict):
def __init__(self, type: str, **kwargs):
super().__init__(type=type, **kwargs)
class AuthBase:
def __init__(self):
if not hasattr(self, "openapi_type"):
raise ConfigError("If you extend AuthBase you need to define o... | true | true |
f752b7d442718cb715c949377b64f1f19f6bd5a6 | 9,663 | py | Python | tests/python/compiler/test_top_level2.py | ThomsonTan/nnvm | dab5ce8ab6adbf4edd8bd2fa89f1a99f343b6e38 | [
"Apache-2.0"
] | 1,872 | 2016-09-01T03:31:45.000Z | 2022-02-23T08:56:53.000Z | tests/python/compiler/test_top_level2.py | ThomsonTan/nnvm | dab5ce8ab6adbf4edd8bd2fa89f1a99f343b6e38 | [
"Apache-2.0"
] | 313 | 2016-09-08T16:18:18.000Z | 2018-09-11T09:34:52.000Z | tests/python/compiler/test_top_level2.py | ThomsonTan/nnvm | dab5ce8ab6adbf4edd8bd2fa89f1a99f343b6e38 | [
"Apache-2.0"
] | 375 | 2016-09-01T03:50:05.000Z | 2022-03-18T16:00:53.000Z | import numpy as np
import tvm
from tvm.contrib import graph_runtime
import topi
import topi.testing
import nnvm.symbol as sym
import nnvm.compiler
from nnvm.testing.config import ctx_list
def test_conv2d():
x = sym.Variable("x")
y = sym.conv2d(x, channels=10, kernel_size=(3,3),
name="y", p... | 39.765432 | 88 | 0.597951 | import numpy as np
import tvm
from tvm.contrib import graph_runtime
import topi
import topi.testing
import nnvm.symbol as sym
import nnvm.compiler
from nnvm.testing.config import ctx_list
def test_conv2d():
x = sym.Variable("x")
y = sym.conv2d(x, channels=10, kernel_size=(3,3),
name="y", p... | true | true |
f752b858b55feab6fe951eb34eab3c8df7e34027 | 647 | py | Python | non_block_client.py | baset-sarker/python-socket-smt | 4bfdca5f619d1d0b982f6d9bb31b84e50b7fa8ce | [
"MIT"
] | null | null | null | non_block_client.py | baset-sarker/python-socket-smt | 4bfdca5f619d1d0b982f6d9bb31b84e50b7fa8ce | [
"MIT"
] | null | null | null | non_block_client.py | baset-sarker/python-socket-smt | 4bfdca5f619d1d0b982f6d9bb31b84e50b7fa8ce | [
"MIT"
] | null | null | null | import websocket
import threading
from time import sleep
def on_message(ws, message):
print(message)
def on_close(ws):
print("closed")
if __name__ == "__main__":
websocket.enableTrace(True)
ws = websocket.WebSocketApp("ws://localhost:9001", on_message = on_message, on_close = on_close)
wst = thre... | 23.962963 | 100 | 0.66306 | import websocket
import threading
from time import sleep
def on_message(ws, message):
print(message)
def on_close(ws):
print("closed")
if __name__ == "__main__":
websocket.enableTrace(True)
ws = websocket.WebSocketApp("ws://localhost:9001", on_message = on_message, on_close = on_close)
wst = thre... | true | true |
f752b8c8b4ee879789503b541ffbf114963d79ab | 42 | py | Python | src/server/blueprints/exposable/__init__.py | sudo-at-night/palmox | 90651be4349ae09c3c1fc77b42eb75901fb10d81 | [
"MIT"
] | 1 | 2021-05-18T07:32:37.000Z | 2021-05-18T07:32:37.000Z | src/server/blueprints/exposable/__init__.py | sudo-at-night/palmox | 90651be4349ae09c3c1fc77b42eb75901fb10d81 | [
"MIT"
] | null | null | null | src/server/blueprints/exposable/__init__.py | sudo-at-night/palmox | 90651be4349ae09c3c1fc77b42eb75901fb10d81 | [
"MIT"
] | null | null | null | from .blueprint import exposable_blueprint | 42 | 42 | 0.904762 | from .blueprint import exposable_blueprint | true | true |
f752ba90efddf604225a0ef5c587279b6cb77629 | 1,582 | py | Python | Final/Best_Practices.py | varunkm192002/Pandemic-Warrior | 04481b74ebacb0086733a2084bbdf6dbb15c1d1f | [
"BSD-3-Clause"
] | null | null | null | Final/Best_Practices.py | varunkm192002/Pandemic-Warrior | 04481b74ebacb0086733a2084bbdf6dbb15c1d1f | [
"BSD-3-Clause"
] | null | null | null | Final/Best_Practices.py | varunkm192002/Pandemic-Warrior | 04481b74ebacb0086733a2084bbdf6dbb15c1d1f | [
"BSD-3-Clause"
] | null | null | null | import sys
from PyQt5 import QtWidgets
from PyQt5.QtCore import (Qt, QRectF)
from PyQt5.QtGui import (QCursor, QPainterPath, QRegion)
from Best_Practices_gui import Ui_Form
class Form(QtWidgets.QWidget, Ui_Form):
def __init__(self):
super().__init__()
self.setupUi(self)
self.btn_minimize_... | 29.849057 | 116 | 0.665613 | import sys
from PyQt5 import QtWidgets
from PyQt5.QtCore import (Qt, QRectF)
from PyQt5.QtGui import (QCursor, QPainterPath, QRegion)
from Best_Practices_gui import Ui_Form
class Form(QtWidgets.QWidget, Ui_Form):
def __init__(self):
super().__init__()
self.setupUi(self)
self.btn_minimize_... | true | true |
f752ba941e3e058e3c6cbca3957a0e09291f9f00 | 2,985 | py | Python | jsparse/bili/bili_relation.py | PyDee/Spiders | 6fc0a414060032b5ba4332302285e3fcc9a6113e | [
"Apache-2.0"
] | 6 | 2020-06-02T16:22:58.000Z | 2021-09-18T03:20:16.000Z | jsparse/bili/bili_relation.py | PyDee/Spiders | 6fc0a414060032b5ba4332302285e3fcc9a6113e | [
"Apache-2.0"
] | 4 | 2021-03-31T19:54:37.000Z | 2022-03-12T00:33:41.000Z | jsparse/bili/bili_relation.py | PyDee/Spiders | 6fc0a414060032b5ba4332302285e3fcc9a6113e | [
"Apache-2.0"
] | 5 | 2020-06-02T16:23:00.000Z | 2021-09-03T02:16:15.000Z | import os
import time
import json
import redis
import requests
import signal
import random
from multiprocessing import Process, Pool
from bos_filter import RedisDB, BosFilter
from bili_mongo import BosMongo
rdb = RedisDB()
mbd = BosMongo()
bf = BosFilter()
r = redis.Redis(host="127.0.0.1")
redis_key = "bili_relation_... | 30.459184 | 199 | 0.574874 | import os
import time
import json
import redis
import requests
import signal
import random
from multiprocessing import Process, Pool
from bos_filter import RedisDB, BosFilter
from bili_mongo import BosMongo
rdb = RedisDB()
mbd = BosMongo()
bf = BosFilter()
r = redis.Redis(host="127.0.0.1")
redis_key = "bili_relation_... | true | true |
f752bbb7746f58a2c0509090ae7794a80b91fd18 | 407 | py | Python | QCDAnalysis/Skimming/python/diMuonOutputModule_cfi.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | QCDAnalysis/Skimming/python/diMuonOutputModule_cfi.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | QCDAnalysis/Skimming/python/diMuonOutputModule_cfi.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
from QCDAnalysis.Skimming.diMuonEventContent_cfi import *
diMuonOutputModule = cms.OutputModule("PoolOutputModule",
diMuonEventSelection,
diMuonEventContent,
dataset = cms.untracked.PSet(
filterName = cms.untracked.string('diMuons'),
dataTier = cms.u... | 27.133333 | 57 | 0.732187 | import FWCore.ParameterSet.Config as cms
from QCDAnalysis.Skimming.diMuonEventContent_cfi import *
diMuonOutputModule = cms.OutputModule("PoolOutputModule",
diMuonEventSelection,
diMuonEventContent,
dataset = cms.untracked.PSet(
filterName = cms.untracked.string('diMuons'),
dataTier = cms.u... | true | true |
f752bc69572188791d98b120dc4ff5953d3c7aa7 | 1,619 | py | Python | video_parallel_processing/ffmpeg_wrapper.py | dadus33/opencv-video-parallel | eb5765bc361161656e022262402390afca11d35f | [
"BSD-3-Clause"
] | null | null | null | video_parallel_processing/ffmpeg_wrapper.py | dadus33/opencv-video-parallel | eb5765bc361161656e022262402390afca11d35f | [
"BSD-3-Clause"
] | null | null | null | video_parallel_processing/ffmpeg_wrapper.py | dadus33/opencv-video-parallel | eb5765bc361161656e022262402390afca11d35f | [
"BSD-3-Clause"
] | 1 | 2019-03-05T14:05:22.000Z | 2019-03-05T14:05:22.000Z | import os
import re
import subprocess
class FfmpegWrapper:
length_frames_regex = r"frame *\= *(?P<frames>[\d\.]+).*"
def __init__(self, ffmpeg_path):
self.ffmpeg_path = ffmpeg_path
@staticmethod
def _read_lines(process):
while True:
process.stderr.flush()
line... | 32.38 | 105 | 0.610871 | import os
import re
import subprocess
class FfmpegWrapper:
length_frames_regex = r"frame *\= *(?P<frames>[\d\.]+).*"
def __init__(self, ffmpeg_path):
self.ffmpeg_path = ffmpeg_path
@staticmethod
def _read_lines(process):
while True:
process.stderr.flush()
line... | true | true |
f752bdd1f32ccef9d81aa782593770a301b84a0f | 672 | py | Python | setup.py | xyproto/fnu | 47e41824ab7ce7746637036d60cf37ac9f381a61 | [
"MIT"
] | 3 | 2020-03-11T21:18:55.000Z | 2020-10-05T12:42:30.000Z | setup.py | xyproto/minitree | 47e41824ab7ce7746637036d60cf37ac9f381a61 | [
"MIT"
] | null | null | null | setup.py | xyproto/minitree | 47e41824ab7ce7746637036d60cf37ac9f381a61 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
setup(name="minitree",
version="0.4.1",
description="List files in columns",
url="https://github.com/xyproto/minitree",
author="Alexander F. Rødseth",
author_email="xyproto@archlinux.org",
license="MIT",
... | 24 | 51 | 0.541667 |
import os
import sys
from setuptools import setup
setup(name="minitree",
version="0.4.1",
description="List files in columns",
url="https://github.com/xyproto/minitree",
author="Alexander F. Rødseth",
author_email="xyproto@archlinux.org",
license="MIT",
py_modules=["mt"],
... | true | true |
f752bdd6e8e00675fb025c05606b980f2f5cccd1 | 1,053 | py | Python | tests/iptables.py | premandfriends/boardfarm-1 | 3c952c94507fff25ba9955cad993610ea4a95e2e | [
"BSD-3-Clause-Clear"
] | null | null | null | tests/iptables.py | premandfriends/boardfarm-1 | 3c952c94507fff25ba9955cad993610ea4a95e2e | [
"BSD-3-Clause-Clear"
] | 1 | 2019-02-03T17:06:21.000Z | 2019-02-03T17:06:21.000Z | tests/iptables.py | mgualco-contractor/boardfarm | 6a033e5dc84c7368fdd8ec2738b08b35ca7b07e7 | [
"BSD-3-Clause-Clear"
] | null | null | null | import rootfs_boot
import os
from devices import board
class IPTablesDump(rootfs_boot.RootFSBootTest):
'''Dumps all IPTables rules with stats'''
def runTest(self):
pp = board.get_pp_dev()
with open(os.path.join(self.config.output_dir, 'iptables.log'), 'w') as ipt_log:
for tbl in [... | 31.909091 | 88 | 0.614435 | import rootfs_boot
import os
from devices import board
class IPTablesDump(rootfs_boot.RootFSBootTest):
def runTest(self):
pp = board.get_pp_dev()
with open(os.path.join(self.config.output_dir, 'iptables.log'), 'w') as ipt_log:
for tbl in ['filter', 'nat', 'mangle', 'raw', 'security']:... | true | true |
f752bde3d2a1c434047bc3865c3ece5c90f41061 | 230 | py | Python | utilities/utility_logger.py | th3h3d/bubil4s-tool-automation-v2 | 6741b98dc762d3cb7e8bbd263269bcea37e743a5 | [
"MIT"
] | null | null | null | utilities/utility_logger.py | th3h3d/bubil4s-tool-automation-v2 | 6741b98dc762d3cb7e8bbd263269bcea37e743a5 | [
"MIT"
] | null | null | null | utilities/utility_logger.py | th3h3d/bubil4s-tool-automation-v2 | 6741b98dc762d3cb7e8bbd263269bcea37e743a5 | [
"MIT"
] | null | null | null | import time
class UtilityLogger:
@classmethod
def log_this(cls, err_log):
fo = open("./utilities/logs/{}.log".format(time.strftime("%Y%m%d", time.localtime())), "a")
fo.write(err_log)
fo.close()
| 20.909091 | 99 | 0.6 | import time
class UtilityLogger:
@classmethod
def log_this(cls, err_log):
fo = open("./utilities/logs/{}.log".format(time.strftime("%Y%m%d", time.localtime())), "a")
fo.write(err_log)
fo.close()
| true | true |
f752bf4ac87d6747a498098da315ecfcb4e4e9c7 | 1,018 | py | Python | python/cugraph/community/__init__.py | efajardo-nv/cugraph | 39565d57f7a4ef71bd511fee1995c12f96b9c32d | [
"Apache-2.0"
] | null | null | null | python/cugraph/community/__init__.py | efajardo-nv/cugraph | 39565d57f7a4ef71bd511fee1995c12f96b9c32d | [
"Apache-2.0"
] | null | null | null | python/cugraph/community/__init__.py | efajardo-nv/cugraph | 39565d57f7a4ef71bd511fee1995c12f96b9c32d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 40.72 | 74 | 0.801572 |
from cugraph.community.louvain import louvain
from cugraph.community.ecg import ecg
from cugraph.community.spectral_clustering import (
spectralBalancedCutClustering,
spectralModularityMaximizationClustering,
analyzeClustering_modularity,
analyzeClustering_edge_cut,
analyzeClustering_ra... | true | true |
f752bfd2aedf6e687e92a360def63fe1d50b82e8 | 8,476 | py | Python | scripts/ulogme_serve.py | adamkw/uLogMe | 08c12b2d1913fb71a7438a69a95345afd4c1cc1e | [
"MIT"
] | null | null | null | scripts/ulogme_serve.py | adamkw/uLogMe | 08c12b2d1913fb71a7438a69a95345afd4c1cc1e | [
"MIT"
] | null | null | null | scripts/ulogme_serve.py | adamkw/uLogMe | 08c12b2d1913fb71a7438a69a95345afd4c1cc1e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# ulogme_serve.py for https://github.com/Naereen/uLogMe/
# MIT Licensed, https://lbesson.mit-license.org/
#
from __future__ import print_function # Python 2 compatibility
from __future__ import absolute_import # Python 2 compatibility
import sys
import os
import subproc... | 44.145833 | 176 | 0.607362 |
from __future__ import print_function
from __future__ import absolute_import
import sys
import os
import subprocess
import cgi
import socket
try:
import socketserver
except ImportError:
import SocketServer as socketserver
try:
import http.server as http_server
except Impor... | true | true |
f752c0bd44139130c3c0c316675544d890d7cf14 | 3,606 | py | Python | tests/examples/minlplib/kall_congruentcircles_c51.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 2 | 2021-07-03T13:19:10.000Z | 2022-02-06T10:48:13.000Z | tests/examples/minlplib/kall_congruentcircles_c51.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 1 | 2021-07-04T14:52:14.000Z | 2021-07-15T10:17:11.000Z | tests/examples/minlplib/kall_congruentcircles_c51.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | null | null | null | # NLP written by GAMS Convert at 04/21/18 13:52:27
#
# Equation counts
# Total E G L N X C B
# 34 2 10 22 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... | 33.700935 | 91 | 0.524681 |
from pyomo.environ import *
model = m = ConcreteModel()
m.x1 = Var(within=Reals,bounds=(0.25,32),initialize=0.25)
m.x2 = Var(within=Reals,bounds=(0.5,7.5),initialize=0.5)
m.x3 = Var(within=Reals,bounds=(0.5,3.5),initialize=0.5)
m.x4 = Var(within=Reals,bounds=(0.5,7.5),initialize=0.5)
m.x5 = Var(with... | true | true |
f752c0ea513cf318d7f384255cd8acd341c617d9 | 446 | py | Python | rminst/test.py | tuxzz/codebase | a7279a4b1e782811b12d4adc30f7381e7ed94b70 | [
"Unlicense"
] | null | null | null | rminst/test.py | tuxzz/codebase | a7279a4b1e782811b12d4adc30f7381e7ed94b70 | [
"Unlicense"
] | null | null | null | rminst/test.py | tuxzz/codebase | a7279a4b1e782811b12d4adc30f7381e7ed94b70 | [
"Unlicense"
] | null | null | null | import core
from common import *
wX, sr = loadWav("x.wav")
wY, sr = loadWav("y.wav")
out = None
for iChannel in range(wX.shape[1]):
print("Ch", iChannel)
x = wX.T[iChannel]
y = wY.T[iChannel]
processor = core.Processor(sr, [(0.208, 0.509), (14.579, 15.031)], method = "simple")
o = processor(x, y... | 21.238095 | 89 | 0.585202 | import core
from common import *
wX, sr = loadWav("x.wav")
wY, sr = loadWav("y.wav")
out = None
for iChannel in range(wX.shape[1]):
print("Ch", iChannel)
x = wX.T[iChannel]
y = wY.T[iChannel]
processor = core.Processor(sr, [(0.208, 0.509), (14.579, 15.031)], method = "simple")
o = processor(x, y... | true | true |
f752c19c9c4ac6ad6926b50f82cbb3c21e002228 | 888 | py | Python | superlists/lists/tests.py | kentaro0919/obeythetestinggoat | 631b8ffce3c9e5709fa4241a0c484d47af2f9352 | [
"MIT"
] | null | null | null | superlists/lists/tests.py | kentaro0919/obeythetestinggoat | 631b8ffce3c9e5709fa4241a0c484d47af2f9352 | [
"MIT"
] | null | null | null | superlists/lists/tests.py | kentaro0919/obeythetestinggoat | 631b8ffce3c9e5709fa4241a0c484d47af2f9352 | [
"MIT"
] | null | null | null | from django.core.urlresolvers import resolve
from django.http import HttpRequest
from django.template.loader import render_to_string
from django.test import TestCase
from lists.views import home_page
class HomePageTest(TestCase):
def test_root_url_resolves_to_home_page_view(self):
found = resolve('/')
... | 34.153846 | 67 | 0.721847 | from django.core.urlresolvers import resolve
from django.http import HttpRequest
from django.template.loader import render_to_string
from django.test import TestCase
from lists.views import home_page
class HomePageTest(TestCase):
def test_root_url_resolves_to_home_page_view(self):
found = resolve('/')
... | true | true |
f752c21ac580158ec36f4767bb2f38f0dfd5a768 | 881 | py | Python | Products/PloneGlossary/content/__init__.py | collective/Products.PloneGlossary | ae040e0590040a23e20933e588324b9da222918e | [
"Unlicense"
] | null | null | null | Products/PloneGlossary/content/__init__.py | collective/Products.PloneGlossary | ae040e0590040a23e20933e588324b9da222918e | [
"Unlicense"
] | 2 | 2016-03-02T10:45:42.000Z | 2021-04-29T09:56:41.000Z | Products/PloneGlossary/content/__init__.py | collective/Products.PloneGlossary | ae040e0590040a23e20933e588324b9da222918e | [
"Unlicense"
] | 2 | 2017-05-21T20:11:42.000Z | 2019-08-22T13:13:09.000Z | # -*- coding: utf-8 -*-
##
# Copyright (C) 2007 Ingeniweb
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This progr... | 35.24 | 73 | 0.757094 |
import PloneGlossary
import PloneGlossaryDefinition
| true | true |
f752c36d24357b015d3ef4166af6ba942cf033dc | 2,829 | py | Python | third_party/Paste/paste/debug/debugapp.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | third_party/Paste/paste/debug/debugapp.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 4,640 | 2015-07-08T16:19:08.000Z | 2019-12-02T15:01:27.000Z | third_party/Paste/paste/debug/debugapp.py | tingshao/catapult | a8fe19e0c492472a8ed5710be9077e24cc517c5c | [
"BSD-3-Clause"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# (c) 2005 Clark C. Evans
# This module is part of the Python Paste Project and is released under
# the MIT License: http://www.opensource.org/licenses... | 35.3625 | 84 | 0.582185 |
import time
__all__ = ['SimpleApplication', 'SlowConsumer']
class SimpleApplication(object):
def __call__(self, environ, start_response):
body = b"<html><body>simple</body></html>"
start_response("200 OK", [('Content-Type', 'text/html'),
('Content-Length', ... | true | true |
f752c3771bb7aaf28a89fc1b13414bb0ea0b21ec | 825 | py | Python | cuppa/methods/filter.py | pwj58/cuppa | 6c598a124c5aa52b459637ca1865cda2e2d300bd | [
"BSL-1.0"
] | 25 | 2015-09-24T07:04:45.000Z | 2022-02-19T03:31:03.000Z | cuppa/methods/filter.py | pwj58/cuppa | 6c598a124c5aa52b459637ca1865cda2e2d300bd | [
"BSL-1.0"
] | 46 | 2015-05-20T12:48:12.000Z | 2022-01-10T10:38:55.000Z | cuppa/methods/filter.py | pwj58/cuppa | 6c598a124c5aa52b459637ca1865cda2e2d300bd | [
"BSL-1.0"
] | 13 | 2015-07-12T09:55:03.000Z | 2021-07-02T15:32:12.000Z |
# Copyright Jamie Allsop 2016-2017
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#-------------------------------------------------------------------------------
# FilterMethod
#----------... | 30.555556 | 80 | 0.563636 |
import cuppa.utility
import cuppa.progress
from cuppa.utility.filter import filter_nodes
class FilterMethod:
def __call__( self, env, nodes, match, exclude=None ):
filtered_nodes = filter_nodes( nodes, match, exclude )
cuppa.progress.NotifyProgress.add( env, filtered_nodes )
ret... | true | true |
f752c3eb4038888dd254a450026750f5859aa7ba | 867 | py | Python | pyEX/_version.py | vishalbelsare/pyEX | 254acd2b0cf7cb7183100106f4ecc11d1860c46a | [
"Apache-2.0"
] | 107 | 2021-03-05T05:18:34.000Z | 2022-03-30T22:25:13.000Z | pyEX/_version.py | vishalbelsare/pyEX | 254acd2b0cf7cb7183100106f4ecc11d1860c46a | [
"Apache-2.0"
] | 112 | 2021-03-05T03:41:21.000Z | 2021-12-01T03:24:22.000Z | pyEX/_version.py | vishalbelsare/pyEX | 254acd2b0cf7cb7183100106f4ecc11d1860c46a | [
"Apache-2.0"
] | 37 | 2021-03-04T18:32:09.000Z | 2022-03-24T02:20:12.000Z | # *****************************************************************************
#
# Copyright (c) 2020, the pyEX authors.
#
# This file is part of the pyEX library, distributed under the terms of
# the Apache License 2.0. The full license can be found in the LICENSE file.
#
from collections import namedtuple
VersionI... | 29.896552 | 84 | 0.595156 |
from collections import namedtuple
VersionInfo = namedtuple(
"VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"]
)
version_info = VersionInfo(0, 6, 0, "candidate", 0)
_specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": ""}
__version__ = "{}.{}.{}{}".format(
version... | true | true |
f752c6326ccfbcf62307c7d0289af73510258f7b | 25 | py | Python | python_practice/thread/__init__.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | python_practice/thread/__init__.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | python_practice/thread/__init__.py | xu6148152/Binea_Python_Project | d943eb5f4685d08f080b372dcf1a7cbd5d63efed | [
"MIT"
] | null | null | null | __author__ = 'xubinggui'
| 12.5 | 24 | 0.76 | __author__ = 'xubinggui'
| true | true |
f752c63f381267ad9898ebe0be9e1ec2d8fcf35f | 54,707 | py | Python | numpy/testing/tests/test_utils.py | weidan-wd/numpy | b7c27bd2a3817f59c84b004b87bba5db57d9a9b0 | [
"BSD-3-Clause"
] | 1 | 2020-02-01T11:13:07.000Z | 2020-02-01T11:13:07.000Z | numpy/testing/tests/test_utils.py | weidan-wd/numpy | b7c27bd2a3817f59c84b004b87bba5db57d9a9b0 | [
"BSD-3-Clause"
] | null | null | null | numpy/testing/tests/test_utils.py | weidan-wd/numpy | b7c27bd2a3817f59c84b004b87bba5db57d9a9b0 | [
"BSD-3-Clause"
] | null | null | null | import warnings
import sys
import os
import itertools
import textwrap
import pytest
import weakref
import numpy as np
from numpy.testing import (
assert_equal, assert_array_equal, assert_almost_equal,
assert_array_almost_equal, assert_array_less, build_err_msg, raises,
assert_raises, assert_warns, assert_n... | 34.277569 | 86 | 0.590564 | import warnings
import sys
import os
import itertools
import textwrap
import pytest
import weakref
import numpy as np
from numpy.testing import (
assert_equal, assert_array_equal, assert_almost_equal,
assert_array_almost_equal, assert_array_less, build_err_msg, raises,
assert_raises, assert_warns, assert_n... | true | true |
f752c691c5d06a0fef12389ad65bdc868032fce0 | 21,602 | py | Python | reframe/core/systems.py | Lumi-supercomputer/reframe | f1e46807663db0b4f7e6b1252c4fcda6fbcc3270 | [
"BSD-3-Clause"
] | null | null | null | reframe/core/systems.py | Lumi-supercomputer/reframe | f1e46807663db0b4f7e6b1252c4fcda6fbcc3270 | [
"BSD-3-Clause"
] | 3 | 2022-03-11T09:51:33.000Z | 2022-03-31T08:20:19.000Z | reframe/core/systems.py | Lumi-supercomputer/reframe | f1e46807663db0b4f7e6b1252c4fcda6fbcc3270 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich)
# ReFrame Project Developers. See the top-level LICENSE file for details.
#
# SPDX-License-Identifier: BSD-3-Clause
import re
import json
import reframe.utility as util
import reframe.utility.jsonext as jsonext
from reframe.core.backends imp... | 30.904149 | 79 | 0.5799 |
import re
import json
import reframe.utility as util
import reframe.utility.jsonext as jsonext
from reframe.core.backends import (getlauncher, getscheduler)
from reframe.core.environments import (Environment, ProgEnvironment)
from reframe.core.logging import getlogger
from reframe.core.modules import ModulesSyste... | true | true |
f752c753d6b622ebcae972dc486ecad34d3c7aa8 | 2,224 | py | Python | pybb/proxies.py | thoas/pybbm | 0e7ab7ef60f15951660015f2b9be0ff7192f1095 | [
"BSD-2-Clause"
] | 1 | 2015-05-18T09:19:30.000Z | 2015-05-18T09:19:30.000Z | pybb/proxies.py | ulule/pybbm | 0e7ab7ef60f15951660015f2b9be0ff7192f1095 | [
"BSD-2-Clause"
] | 5 | 2017-06-13T16:25:34.000Z | 2018-07-17T20:30:56.000Z | pybb/proxies.py | ulule/pybbm | 0e7ab7ef60f15951660015f2b9be0ff7192f1095 | [
"BSD-2-Clause"
] | 1 | 2018-10-29T13:12:59.000Z | 2018-10-29T13:12:59.000Z | from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from guardian.models import UserObjectPermission as BaseUserObjectPermission
from guardian.managers import UserObjectPermissionManager as BaseUserObjectPermissionManager
from guardian.exceptions import ObjectNo... | 34.215385 | 92 | 0.629047 | from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from guardian.models import UserObjectPermission as BaseUserObjectPermission
from guardian.managers import UserObjectPermissionManager as BaseUserObjectPermissionManager
from guardian.exceptions import ObjectNo... | true | true |
f752c831830930aa220fe7ecb0bcd9d9d2dfbf26 | 2,520 | py | Python | tests/conftest.py | keiv-fly/python-tcod | 5cb861090ea5400d21ba0c875e6d85a37e1a0e37 | [
"BSD-2-Clause"
] | null | null | null | tests/conftest.py | keiv-fly/python-tcod | 5cb861090ea5400d21ba0c875e6d85a37e1a0e37 | [
"BSD-2-Clause"
] | null | null | null | tests/conftest.py | keiv-fly/python-tcod | 5cb861090ea5400d21ba0c875e6d85a37e1a0e37 | [
"BSD-2-Clause"
] | null | null | null |
import random
import warnings
import pytest
import tcod
def pytest_addoption(parser):
parser.addoption("--no-window", action="store_true",
help="Skip tests which need a rendering context.")
@pytest.fixture(scope="session", params=['SDL', 'SDL2'])
def session_console(request):
if(request.config.geto... | 26.808511 | 78 | 0.659524 |
import random
import warnings
import pytest
import tcod
def pytest_addoption(parser):
parser.addoption("--no-window", action="store_true",
help="Skip tests which need a rendering context.")
@pytest.fixture(scope="session", params=['SDL', 'SDL2'])
def session_console(request):
if(request.config.geto... | true | true |
f752c8485c3a7f8df14d7ceedeb8a07d8619ddf3 | 4,435 | py | Python | plugins/modules/panos_email_server.py | dstogsdill/pan-os-ansible | ce7be004d435a07ab32252903447d0a9fc691f00 | [
"Apache-2.0"
] | null | null | null | plugins/modules/panos_email_server.py | dstogsdill/pan-os-ansible | ce7be004d435a07ab32252903447d0a9fc691f00 | [
"Apache-2.0"
] | 5 | 2021-06-01T05:58:47.000Z | 2022-02-01T19:01:44.000Z | plugins/modules/panos_email_server.py | dstogsdill/pan-os-ansible | ce7be004d435a07ab32252903447d0a9fc691f00 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2019 Palo Alto Networks, 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
#
#... | 27.893082 | 83 | 0.660203 |
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = """
---
module: panos_email_server
short_description: Manage email servers in an email profile.
description:
- Manages email servers in an email server profile.
author: "Garfield Lee Freeman (@sh... | true | true |
f752c84c33e28b38f132fd1dfa44e858bece5bd8 | 4,458 | py | Python | sleepAnalytics/Sleep Analysis.py | ISTE-NITK/istesleep | caff596dfc02c67fc4fc11f4d386ba04b6e1a0d7 | [
"MIT"
] | null | null | null | sleepAnalytics/Sleep Analysis.py | ISTE-NITK/istesleep | caff596dfc02c67fc4fc11f4d386ba04b6e1a0d7 | [
"MIT"
] | null | null | null | sleepAnalytics/Sleep Analysis.py | ISTE-NITK/istesleep | caff596dfc02c67fc4fc11f4d386ba04b6e1a0d7 | [
"MIT"
] | null | null | null |
# coding: utf-8
# In[1]:
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
from matplotlib.dates import date2num
import datetime
import matplotlib.dates as mdates
import time
import numpy as np
from datetime import date
import matplotlib.lines as mlines
from mpl_toolkits.mplot3d import Axes3D
imp... | 20.263636 | 145 | 0.637506 |
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
from matplotlib.dates import date2num
import datetime
import matplotlib.dates as mdates
import time
import numpy as np
from datetime import date
import matplotlib.lines as mlines
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.patches ... | true | true |
f752cae01ac0412f3417077b702ab543c0d0114e | 11,353 | py | Python | redash/handlers/query_results.py | PicolotoLF/redash | 42be730cf30ccf03e4071a09f616f4e5c7169fe0 | [
"BSD-2-Clause"
] | 1 | 2020-03-20T14:12:27.000Z | 2020-03-20T14:12:27.000Z | redash/handlers/query_results.py | PicolotoLF/redash | 42be730cf30ccf03e4071a09f616f4e5c7169fe0 | [
"BSD-2-Clause"
] | 8 | 2018-04-10T14:39:53.000Z | 2022-02-13T15:50:30.000Z | redash/handlers/query_results.py | chriszs/redash | d2882c77eb2f093fee3687abe931e68a51b01625 | [
"BSD-2-Clause"
] | null | null | null | import logging
import time
from flask import make_response, request
from flask_login import current_user
from flask_restful import abort
from redash import models, settings
from redash.tasks import QueryTask
from redash.permissions import require_permission, not_view_only, has_access, require_access, view_only
from re... | 40.838129 | 136 | 0.640976 | import logging
import time
from flask import make_response, request
from flask_login import current_user
from flask_restful import abort
from redash import models, settings
from redash.tasks import QueryTask
from redash.permissions import require_permission, not_view_only, has_access, require_access, view_only
from re... | true | true |
f752cb10963113d149d4a4a339348a6c575a1efa | 2,988 | py | Python | PyPrograms/contacts/functions.py | JymPatel/Python | 6c643339ce12d26071336c87a88e94550cb13ea8 | [
"MIT"
] | null | null | null | PyPrograms/contacts/functions.py | JymPatel/Python | 6c643339ce12d26071336c87a88e94550cb13ea8 | [
"MIT"
] | null | null | null | PyPrograms/contacts/functions.py | JymPatel/Python | 6c643339ce12d26071336c87a88e94550cb13ea8 | [
"MIT"
] | null | null | null | fname = 0
lname = 1
number = 2
email = 3
def printallcontacts(arraylen, array):
print("")
print("== YOUR CONTACT LIST ==")
print("|")
i1 = 0
# print all names
while i1 < arraylen:
print(f"| {array[fname][i1]} {array[lname][i1]}, {array[number][i1]} {array[email][i1]}"... | 32.129032 | 101 | 0.477912 | fname = 0
lname = 1
number = 2
email = 3
def printallcontacts(arraylen, array):
print("")
print("== YOUR CONTACT LIST ==")
print("|")
i1 = 0
while i1 < arraylen:
print(f"| {array[fname][i1]} {array[lname][i1]}, {array[number][i1]} {array[email][i1]}")
i1 += 1... | true | true |
f752cbfef4c82660390a9fe6dec369c15ddaa331 | 945 | py | Python | ulid/consts.py | xkortex/ulid | 96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1 | [
"Apache-2.0"
] | 303 | 2017-06-15T14:41:41.000Z | 2022-03-28T11:46:50.000Z | ulid/consts.py | xkortex/ulid | 96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1 | [
"Apache-2.0"
] | 387 | 2017-06-16T14:47:31.000Z | 2022-03-24T05:55:44.000Z | ulid/consts.py | xkortex/ulid | 96bdb1daad7ce96f6db8c91ac0410b66d2e1c4c1 | [
"Apache-2.0"
] | 21 | 2017-06-16T20:00:33.000Z | 2022-03-23T04:14:04.000Z | """
ulid/consts
~~~~~~~~~~~
Contains public API constant values.
"""
from . import ulid
__all__ = ['MIN_TIMESTAMP', 'MAX_TIMESTAMP', 'MIN_RANDOMNESS', 'MAX_RANDOMNESS', 'MIN_ULID', 'MAX_ULID']
#: Minimum possible timestamp value (0).
MIN_TIMESTAMP = ulid.Timestamp(b'\x00\x00\x00\x00\x00\x00')
#: Maximu... | 28.636364 | 104 | 0.739683 | from . import ulid
__all__ = ['MIN_TIMESTAMP', 'MAX_TIMESTAMP', 'MIN_RANDOMNESS', 'MAX_RANDOMNESS', 'MIN_ULID', 'MAX_ULID']
MIN_TIMESTAMP = ulid.Timestamp(b'\x00\x00\x00\x00\x00\x00')
MAX_TIMESTAMP = ulid.Timestamp(b'\xff\xff\xff\xff\xff\xff')
MIN_RANDOMNESS = ulid.Randomness(b'\x00\x00\x00\x00\x00\x00\x00\x00... | true | true |
f752ccdc4d1425963ee3a3657e462fda4da334fc | 3,422 | py | Python | common.py | romanian-parlamint/parsers | a2fc870c0b06fc5b9db00b92d91f4d33ad5ded4a | [
"MIT"
] | null | null | null | common.py | romanian-parlamint/parsers | a2fc870c0b06fc5b9db00b92d91f4d33ad5ded4a | [
"MIT"
] | 1 | 2022-03-02T10:41:33.000Z | 2022-03-02T10:41:33.000Z | common.py | romanian-parlamint/parsers | a2fc870c0b06fc5b9db00b92d91f4d33ad5ded4a | [
"MIT"
] | null | null | null | import re
def build_speaker_id(speaker_name):
"""Builds the id of the speaker from its name.
Parameters
----------
speaker_name: str
The name of the speaker.
Returns
-------
speaker_id: str
The id of the speaker.
"""
canonical_name = re.sub(r'\s+', '-', speaker_na... | 27.376 | 107 | 0.62069 | import re
def build_speaker_id(speaker_name):
canonical_name = re.sub(r'\s+', '-', speaker_name, 0, re.MULTILINE)
speaker_id = "#{}".format(canonical_name)
return speaker_id
def get_element_text(element):
text = ''.join(element.itertext())
return text
class OrganizationType:
Independent = ... | true | true |
f752cd4b86ced7571c52f76bbc42f3014d07fb96 | 1,329 | py | Python | test/test_copyright_license.py | Theosakamg/colcon-ros-bazel | 8fdde5e0b1284e4b3c8a5812b64c6a3519a83b28 | [
"Apache-2.0"
] | 6 | 2018-08-24T00:46:59.000Z | 2022-03-09T02:09:55.000Z | test/test_copyright_license.py | Theosakamg/colcon-ros-bazel | 8fdde5e0b1284e4b3c8a5812b64c6a3519a83b28 | [
"Apache-2.0"
] | 1 | 2018-09-12T04:38:03.000Z | 2018-10-12T21:57:06.000Z | test/test_copyright_license.py | Theosakamg/colcon-ros-bazel | 8fdde5e0b1284e4b3c8a5812b64c6a3519a83b28 | [
"Apache-2.0"
] | 3 | 2018-09-01T16:07:24.000Z | 2021-12-23T05:09:38.000Z | # Copyright 2016-2018 Dirk Thomas
# Copyright 2018 Mickael Gaillard
# Licensed under the Apache License, Version 2.0
from pathlib import Path
import sys
def test_copyright_licence():
missing = check_files([Path(__file__).parents[1]])
assert not len(missing), \
'In some files no copyright / license li... | 31.642857 | 75 | 0.544771 |
from pathlib import Path
import sys
def test_copyright_licence():
missing = check_files([Path(__file__).parents[1]])
assert not len(missing), \
'In some files no copyright / license line was found'
def check_files(paths):
missing = []
for path in paths:
if path.is_dir():
... | true | true |
f752ce5bd80e9695dbdc7db47c8430254f065339 | 1,481 | py | Python | gpvdm_gui/gui/gui_enable.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 12 | 2016-09-13T08:58:13.000Z | 2022-01-17T07:04:52.000Z | gpvdm_gui/gui/gui_enable.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 3 | 2017-11-11T12:33:02.000Z | 2019-03-08T00:48:08.000Z | gpvdm_gui/gui/gui_enable.py | roderickmackenzie/gpvdm | 914fd2ee93e7202339853acaec1d61d59b789987 | [
"BSD-3-Clause"
] | 6 | 2019-01-03T06:17:12.000Z | 2022-01-01T15:59:00.000Z | #
# General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for 1st, 2nd and 3rd generation solar cells.
# Copyright (C) 2008-2022 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com
#
# https://www.gpvdm.com
#
# This program is free software; you can redist... | 25.982456 | 108 | 0.72181 |
t os
enabled=False
def gui_test():
global enabled
for arg in sys.argv:
if arg.startswith("--") and arg!="--load":
enabled=False
return
try:
from PyQt5.QtWidgets import QWidget
enabled=True
except:
enabled=False
pass
def set_gui(value):
global enabled
enabled=value
def ... | true | true |
f752ce757ff6009cd63eb80491f7f8e9b664773d | 11,596 | py | Python | util/device.py | cztian/prjbureau | 22d959ab2988570052e79a4ad96bc0bca3ad723f | [
"0BSD"
] | 34 | 2019-12-12T07:52:47.000Z | 2022-03-12T13:52:51.000Z | util/device.py | RobertBaruch/prjbureau | 8631e0f661047747de7121e5ab3e6da5f2828c48 | [
"0BSD"
] | 9 | 2020-08-10T15:22:59.000Z | 2021-06-13T19:33:08.000Z | util/device.py | RobertBaruch/prjbureau | 8631e0f661047747de7121e5ab3e6da5f2828c48 | [
"0BSD"
] | 4 | 2020-08-10T15:13:45.000Z | 2021-06-12T16:37:03.000Z | # Be careful modifying this file: line ranges from it are included in docs/jtag/as.rst.
import enum
from bitarray import bitarray
__all__ = ['ATF15xxInstr', 'ATF1502ASDevice', 'ATF1504ASDevice', 'ATF1508ASDevice']
class ATF15xxInstr(enum.IntEnum):
EXTEST = 0x000
SAMPLE = 0x055
... | 37.286174 | 87 | 0.541652 |
import enum
from bitarray import bitarray
__all__ = ['ATF15xxInstr', 'ATF1502ASDevice', 'ATF1504ASDevice', 'ATF1508ASDevice']
class ATF15xxInstr(enum.IntEnum):
EXTEST = 0x000
SAMPLE = 0x055
IDCODE = 0x059
ISC_READ_UES = 0x270
ISC_CONFIG =... | true | true |
f752cf4edd2a7a89ac0584d8b8cf4ba2fc64be09 | 1,925 | py | Python | collecte/postes_plage_snsm/convert.py | entrepreneur-interet-general/predisauvetage | 4d985ee79355652709da322db48daffb3e5a895a | [
"MIT"
] | 6 | 2018-02-16T15:07:17.000Z | 2020-10-09T09:34:29.000Z | collecte/postes_plage_snsm/convert.py | entrepreneur-interet-general/predisauvetage | 4d985ee79355652709da322db48daffb3e5a895a | [
"MIT"
] | 107 | 2018-03-29T14:55:33.000Z | 2021-12-13T19:44:50.000Z | collecte/postes_plage_snsm/convert.py | entrepreneur-interet-general/predisauvetage | 4d985ee79355652709da322db48daffb3e5a895a | [
"MIT"
] | 1 | 2021-03-03T21:02:33.000Z | 2021-03-03T21:02:33.000Z | # -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import pandas as pd
# Likely coming from
# https://www.google.com/maps/d/viewer?mid=151Itl_57S7UlpC7P-TdfvT2Pz7Y
class KMLConverter(object):
def __init__(self, filepath):
self.filepath = filepath
self.postes = []
self.parse()
def ... | 35.648148 | 79 | 0.539221 |
from bs4 import BeautifulSoup
import pandas as pd
class KMLConverter(object):
def __init__(self, filepath):
self.filepath = filepath
self.postes = []
self.parse()
def clean_key(self, key):
return {
u'DÉPARTEMENT': 'departement',
'NB DE SAUVETEURS SN... | true | true |
f752cfd667b2437606e420767fde3526c3b5b2f7 | 37,113 | py | Python | presto/Preprocessors/Upscale/Structured/StructuredUpscalingMethods.py | padmec-reservoir/PRESTO | d9ab92f2df020a36d13040ce6157162402b93c8e | [
"MIT"
] | 42 | 2017-05-04T05:29:19.000Z | 2021-09-15T14:03:33.000Z | presto/Preprocessors/Upscale/Structured/StructuredUpscalingMethods.py | jpra2/Presto2 | 71525a8dece2bcc4f16ff4a2120d7627e9ecd776 | [
"CNRI-Python"
] | null | null | null | presto/Preprocessors/Upscale/Structured/StructuredUpscalingMethods.py | jpra2/Presto2 | 71525a8dece2bcc4f16ff4a2120d7627e9ecd776 | [
"CNRI-Python"
] | 15 | 2017-06-19T20:09:06.000Z | 2021-06-02T12:40:42.000Z | import numpy as np
import collections
import time
from pymoab import types
from pymoab import topo_util
from PyTrilinos import Epetra, AztecOO, ML
class StructuredUpscalingMethods:
"""Defines a structured upscaling mesh representation
Parameters
----------
coarse_ratio: List or array of integers
... | 44.287589 | 79 | 0.488589 | import numpy as np
import collections
import time
from pymoab import types
from pymoab import topo_util
from PyTrilinos import Epetra, AztecOO, ML
class StructuredUpscalingMethods:
def __init__(self, coarse_ratio, mesh_size, block_size, method, moab):
self.coarse_ratio = coarse_ratio
self.mesh_si... | true | true |
f752d08074fc614533e2e4b3e936f97f4e2ac97d | 3,108 | py | Python | events_library/admin.py | SelfHacked/events-library | cc60e9db70fd77281f773215082cc43b3232b1b5 | [
"MIT"
] | null | null | null | events_library/admin.py | SelfHacked/events-library | cc60e9db70fd77281f773215082cc43b3232b1b5 | [
"MIT"
] | 1 | 2021-04-09T15:30:13.000Z | 2021-04-09T15:30:13.000Z | events_library/admin.py | SelfHacked/events-library | cc60e9db70fd77281f773215082cc43b3232b1b5 | [
"MIT"
] | 2 | 2021-03-28T11:19:03.000Z | 2021-06-03T11:43:43.000Z | import typing
from django.contrib import admin
from django.db.models import Model, QuerySet
from django.http.request import HttpRequest
from .core import EventApi
from .domain import EventLog, HandlerLog, SyncTask
class InmutableAdminModel(admin.ModelAdmin):
"""Admin model class that disables the
Add and Ed... | 27.504425 | 87 | 0.627091 | import typing
from django.contrib import admin
from django.db.models import Model, QuerySet
from django.http.request import HttpRequest
from .core import EventApi
from .domain import EventLog, HandlerLog, SyncTask
class InmutableAdminModel(admin.ModelAdmin):
def has_add_permission(self, request: HttpRequest) -... | true | true |
f752d12c41bdb58d8a797ff5179d17433e2b6b1f | 816 | py | Python | apps/account/urls.py | convers39/IR-ecommerce | 57665aace80c14b52a40a9576de8b433a13f8f3f | [
"MIT"
] | 2 | 2021-10-12T11:04:57.000Z | 2022-01-04T08:17:11.000Z | apps/account/urls.py | convers39/IR-ecommerce | 57665aace80c14b52a40a9576de8b433a13f8f3f | [
"MIT"
] | null | null | null | apps/account/urls.py | convers39/IR-ecommerce | 57665aace80c14b52a40a9576de8b433a13f8f3f | [
"MIT"
] | 1 | 2021-04-30T16:43:29.000Z | 2021-04-30T16:43:29.000Z | from django.urls import path
from .views import (LoginView, LogoutView, RegisterView, ActivateView, PasswordResetView,
AccountCenterView, OrderListView, AddressView, WishlistView)
app_name = 'account'
urlpatterns = [
path('', AccountCenterView.as_view(), name='center'),
path('order/', Orde... | 48 | 89 | 0.686275 | from django.urls import path
from .views import (LoginView, LogoutView, RegisterView, ActivateView, PasswordResetView,
AccountCenterView, OrderListView, AddressView, WishlistView)
app_name = 'account'
urlpatterns = [
path('', AccountCenterView.as_view(), name='center'),
path('order/', Orde... | true | true |
f752d16ce8105909fcf9dc454fe5dbe22ad46152 | 5,509 | py | Python | wsgidav/samples/mongo_dav_provider.py | jaredrunyon/wsgidav | 2e375551f1961380d7afd2cbcf3bef32bb98b8d7 | [
"MIT"
] | 62 | 2015-02-05T08:16:33.000Z | 2022-02-25T20:51:32.000Z | wsgidav/samples/mongo_dav_provider.py | jaredrunyon/wsgidav | 2e375551f1961380d7afd2cbcf3bef32bb98b8d7 | [
"MIT"
] | 32 | 2015-01-29T09:46:18.000Z | 2022-02-15T03:27:29.000Z | wsgidav/samples/mongo_dav_provider.py | jaredrunyon/wsgidav | 2e375551f1961380d7afd2cbcf3bef32bb98b8d7 | [
"MIT"
] | 59 | 2015-02-02T02:36:16.000Z | 2022-02-14T01:55:21.000Z | # -*- coding: utf-8 -*-
# (c) 2009-2020 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
Implementation of a WebDAV provider that provides a very basic, read-only
resource layer emulation of a MongoDB dat... | 33.591463 | 91 | 0.5943 |
from bson.objectid import ObjectId
from pprint import pformat
from wsgidav import compat, util
from wsgidav.dav_provider import DAVCollection, DAVNonCollection, DAVProvider
from wsgidav.util import join_uri
import pymongo
__docformat__ = "reStructuredText"
_logger = util.get_module_logger(__name__)
class Co... | true | true |
f752d1cd0aa959a32f09313b203ecafab721cdc9 | 12,099 | py | Python | tensorflow/python/module/module.py | satsumas/tensorflow | 6a286bfcfeebcfa2b91b95334d83d9f0edf735b9 | [
"Apache-2.0"
] | 3 | 2017-11-09T17:40:28.000Z | 2021-11-17T10:24:19.000Z | tensorflow/python/module/module.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/module/module.py | jensfreudenau/tensorflow | 3fe3f2b1984aab6f159b89aa3ab0069988925689 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.08169 | 80 | 0.661129 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import re
from tensorflow.python.framework import ops
from tensorflow.python.ops import resource_variable_ops
from tensorflow.python.ops import variables
from tensorflow.python.training.tracking... | true | true |
f752d279d1015f3b8a3fa8572aff6d39c3b69f42 | 2,826 | py | Python | special_k/tests/test_registry.py | namoopsoo/special_k | 816ad200e8608d862e20971dc2bc4d2724aaf0bc | [
"Apache-2.0"
] | null | null | null | special_k/tests/test_registry.py | namoopsoo/special_k | 816ad200e8608d862e20971dc2bc4d2724aaf0bc | [
"Apache-2.0"
] | null | null | null | special_k/tests/test_registry.py | namoopsoo/special_k | 816ad200e8608d862e20971dc2bc4d2724aaf0bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2020-present Kensho Technologies, LLC.
import unittest
from ..serializers.base import BaseIO
from ..serializers.base_serializers import PickleIO, get_base_serializer_map
from ..serializers.registry import SerializerRegistry
class MockSerializer(BaseIO):
@staticmethod
def _deserialize_from_stream(... | 38.712329 | 88 | 0.703468 |
import unittest
from ..serializers.base import BaseIO
from ..serializers.base_serializers import PickleIO, get_base_serializer_map
from ..serializers.registry import SerializerRegistry
class MockSerializer(BaseIO):
@staticmethod
def _deserialize_from_stream(stream):
@staticmethod
def _serialize_to_... | true | true |
f752d2ababf0ccbf3b48c5f2e174011cbb4c235f | 6,311 | py | Python | tests/test_assert_immediate.py | leonardt/fault | b16dec55fa287f0cf96e4083ec98a82a721bc971 | [
"BSD-3-Clause"
] | 31 | 2018-07-16T15:03:14.000Z | 2022-03-10T08:36:09.000Z | tests/test_assert_immediate.py | leonardt/fault | b16dec55fa287f0cf96e4083ec98a82a721bc971 | [
"BSD-3-Clause"
] | 216 | 2018-07-18T20:00:34.000Z | 2021-10-05T17:40:47.000Z | tests/test_assert_immediate.py | leonardt/fault | b16dec55fa287f0cf96e4083ec98a82a721bc971 | [
"BSD-3-Clause"
] | 10 | 2019-02-17T00:56:58.000Z | 2021-11-05T13:31:37.000Z | from contextlib import nullcontext
import tempfile
import pytest
import fault as f
import magma as m
from fault.verilator_utils import verilator_version
from .test_property import requires_ncsim
@pytest.mark.parametrize('success_msg', [None, "OK"])
@pytest.mark.parametrize('failure_msg', [None, "FAILED"])
@pytest.ma... | 35.256983 | 78 | 0.55427 | from contextlib import nullcontext
import tempfile
import pytest
import fault as f
import magma as m
from fault.verilator_utils import verilator_version
from .test_property import requires_ncsim
@pytest.mark.parametrize('success_msg', [None, "OK"])
@pytest.mark.parametrize('failure_msg', [None, "FAILED"])
@pytest.ma... | true | true |
f752d2d9c8fc88d1a9bf4d9ff7c758dc752a3044 | 1,557 | py | Python | tests/test_openDataset.py | 1271756664/xgrads | d563a3668a37f10c525711ee8a76ca614962377f | [
"MIT"
] | 40 | 2020-03-15T13:09:47.000Z | 2022-01-18T15:36:34.000Z | tests/test_openDataset.py | wqshen/xgrads | d563a3668a37f10c525711ee8a76ca614962377f | [
"MIT"
] | 31 | 2020-03-09T06:27:17.000Z | 2022-03-28T03:57:04.000Z | tests/test_openDataset.py | wqshen/xgrads | d563a3668a37f10c525711ee8a76ca614962377f | [
"MIT"
] | 15 | 2020-03-24T03:26:53.000Z | 2021-12-10T02:13:50.000Z | # -*- coding: utf-8 -*-
"""
Created on 2020.03.02
@author: MiniUFO
Copyright 2018. All rights reserved. Use is subject to license terms.
"""
from xgrads.xgrads import open_CtlDataset, open_mfdataset
import xarray as xr
dset = open_CtlDataset('D:/Data/ULFI/output/2017101712_1721.ctl')
dset.sst[-1].where(dset.sst[-1]!=... | 27.803571 | 69 | 0.716763 |
from xgrads.xgrads import open_CtlDataset, open_mfdataset
import xarray as xr
dset = open_CtlDataset('D:/Data/ULFI/output/2017101712_1721.ctl')
dset.sst[-1].where(dset.sst[-1]!=-999).plot()
dset = open_CtlDataset('D:/Data/ERAInterim/ElenaIsen/ElenaTest.ctl')
dset.ut[-1].plot()
dset = open_CtlDataset('D:/Data/ERAI... | true | true |
f752d3e5777b0e167bf352166b64fdec1029469b | 9,836 | py | Python | sdk/python/pulumi_azure/databasemigration/service.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/databasemigration/service.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/databasemigration/service.py | suresh198526/pulumi-azure | bf27206a38d7a5c58b3c2c57ec8769fe3d0fc5d7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 50.183673 | 243 | 0.670089 |
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilities, _tables
__all__ = ['Service']
class Service(pulumi.CustomResource):
def __init__(__self__,
resource_name: str,
opts: Optional[pulumi.Reso... | true | true |
f752d4ec1ad09c86be66179d096418913c8ffdc5 | 478 | py | Python | P25019-Beijing-Panda/week01/000_confirm_name.py | tonylhb/python-25 | 321793d5abe92b71fe5a89f0d5022cced9277406 | [
"Apache-2.0"
] | 1 | 2019-09-11T23:24:58.000Z | 2019-09-11T23:24:58.000Z | P25019-Beijing-Panda/week01/000_confirm_name.py | tonylhb/python-25 | 321793d5abe92b71fe5a89f0d5022cced9277406 | [
"Apache-2.0"
] | null | null | null | P25019-Beijing-Panda/week01/000_confirm_name.py | tonylhb/python-25 | 321793d5abe92b71fe5a89f0d5022cced9277406 | [
"Apache-2.0"
] | 5 | 2019-09-11T06:33:34.000Z | 2020-02-17T12:52:31.000Z | while True:
s = input('Input your Github directory name: ')
if not s.startswith('P'):
print('The name must starts with P !')
continue
name_list = s.split('-')
if len(name_list) != 3:
print('The name must be like P25000-Beijing-Wei !')
continue
if name_list != [x.ca... | 25.157895 | 59 | 0.585774 | while True:
s = input('Input your Github directory name: ')
if not s.startswith('P'):
print('The name must starts with P !')
continue
name_list = s.split('-')
if len(name_list) != 3:
print('The name must be like P25000-Beijing-Wei !')
continue
if name_list != [x.ca... | true | true |
f752d67a346ec58cb3a82c1863fc798491691221 | 2,251 | py | Python | uw_libraries/mylib.py | uw-it-aca/uw-restclients-libraries | 4c72049b2c6c8df3bb5f6aba78af8135532d1685 | [
"Apache-2.0"
] | null | null | null | uw_libraries/mylib.py | uw-it-aca/uw-restclients-libraries | 4c72049b2c6c8df3bb5f6aba78af8135532d1685 | [
"Apache-2.0"
] | 8 | 2017-04-17T16:46:10.000Z | 2021-04-16T22:35:41.000Z | uw_libraries/mylib.py | uw-it-aca/uw-restclients-libraries | 4c72049b2c6c8df3bb5f6aba78af8135532d1685 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
"""
This is the interface for interacting with the UW Libraries Web Service.
"""
from datetime import datetime
from dateutil.parser import parse
import json
from urllib.parse import urlencode
from uw_libraries.dao import MyLib_DAO
... | 29.618421 | 78 | 0.717459 |
from datetime import datetime
from dateutil.parser import parse
import json
from urllib.parse import urlencode
from uw_libraries.dao import MyLib_DAO
from uw_libraries.models import MyLibAccount
from restclients_core.exceptions import DataFailureException
MyLibDao = MyLib_DAO()
mylib_url_prefix = '/mylibinfo/v1/'
... | true | true |
f752d6d0db33081f49a824401035745f30f5ad9d | 5,153 | py | Python | gbpclient/gbp/v2_0/purge.py | noironetworks/python-group-based-policy-client | 150c9b0d752bfea79651253d9fa3382842df1a69 | [
"Apache-2.0"
] | null | null | null | gbpclient/gbp/v2_0/purge.py | noironetworks/python-group-based-policy-client | 150c9b0d752bfea79651253d9fa3382842df1a69 | [
"Apache-2.0"
] | null | null | null | gbpclient/gbp/v2_0/purge.py | noironetworks/python-group-based-policy-client | 150c9b0d752bfea79651253d9fa3382842df1a69 | [
"Apache-2.0"
] | 1 | 2015-09-29T21:36:04.000Z | 2015-09-29T21:36:04.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 42.586777 | 78 | 0.556957 |
import re
import sys
from neutronclient.common import exceptions as nexc
from neutronclient.neutron.v2_0 import purge as n_purge
AUTO_PTG_REGEX = 'auto[0-9a-f]{32}\Z'
class Purge(n_purge.Purge):
def _pluralize(self, string):
if re.search('_policy$', string):
return re.sub('_pol... | true | true |
f752d73b8ec133c11bf505c8924a991ee04c73aa | 6,075 | py | Python | scripts/cra-bundle-stats-diff.py | wikimedia/operations-debs-karma | c51b0caafd687d043617070cbb97ff446b55ae7a | [
"Apache-2.0"
] | 1,533 | 2018-09-10T04:02:07.000Z | 2022-03-31T12:17:31.000Z | scripts/cra-bundle-stats-diff.py | supertassu/karma | c564229c8e34109db861b8464d18884106b63a38 | [
"Apache-2.0"
] | 1,331 | 2018-09-09T13:34:04.000Z | 2022-03-31T19:24:23.000Z | scripts/cra-bundle-stats-diff.py | supertassu/karma | c564229c8e34109db861b8464d18884106b63a38 | [
"Apache-2.0"
] | 153 | 2018-09-14T21:18:34.000Z | 2022-03-22T14:19:21.000Z | #!/usr/bin/env python3
from collections import namedtuple
import json
import os
import sys
Bundle = namedtuple('Bundle' , 'seq ext bundleName totalBytes files')
Diff = namedtuple('Diff', 'status path oldBytes newBytes isBigger diff')
BundleDiff = namedtuple('BundleDiff', 'total files')
class Status:
added ... | 26.413043 | 78 | 0.534156 |
from collections import namedtuple
import json
import os
import sys
Bundle = namedtuple('Bundle' , 'seq ext bundleName totalBytes files')
Diff = namedtuple('Diff', 'status path oldBytes newBytes isBigger diff')
BundleDiff = namedtuple('BundleDiff', 'total files')
class Status:
added = 'added'
modifie... | true | true |
f752d7728292ad7c2868c0af279d38064cb8111f | 408 | py | Python | CalendarApp/migrations/0002_calendar_test.py | FranckyCastell/DjangoCalendar | f6d75bff0c23b7d3fd259aea260f61a852ae4e6e | [
"Apache-2.0"
] | null | null | null | CalendarApp/migrations/0002_calendar_test.py | FranckyCastell/DjangoCalendar | f6d75bff0c23b7d3fd259aea260f61a852ae4e6e | [
"Apache-2.0"
] | null | null | null | CalendarApp/migrations/0002_calendar_test.py | FranckyCastell/DjangoCalendar | f6d75bff0c23b7d3fd259aea260f61a852ae4e6e | [
"Apache-2.0"
] | null | null | null | # Generated by Django 4.0 on 2021-12-11 18:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('CalendarApp', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='calendar',
name='test',
f... | 21.473684 | 83 | 0.602941 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('CalendarApp', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='calendar',
name='test',
field=models.DateTimeField(blank=True, null=Tr... | true | true |
f752d8a8b681fd9b65d1a26ee2bba64b041c4ac3 | 4,480 | py | Python | ProjectJarvis.py | ming2242/project_jarvis_for_linux | 5bb93f8e6a55d38e7146d55d362314ab890aa776 | [
"MIT"
] | null | null | null | ProjectJarvis.py | ming2242/project_jarvis_for_linux | 5bb93f8e6a55d38e7146d55d362314ab890aa776 | [
"MIT"
] | null | null | null | ProjectJarvis.py | ming2242/project_jarvis_for_linux | 5bb93f8e6a55d38e7146d55d362314ab890aa776 | [
"MIT"
] | null | null | null | #build by mingH 06/12/2016 01:00
import speech_recognition as sr
from datetime import datetime
import pyttsx
import os
import time
import pyowm
import re
#set up the text to speech engine
engine = pyttsx.init()
rate = engine.getProperty('rate')
engine.setProperty('rate', 150)
engine.setProperty('voice', 1)
#openweathe... | 35.84 | 109 | 0.621652 |
import speech_recognition as sr
from datetime import datetime
import pyttsx
import os
import time
import pyowm
import re
engine = pyttsx.init()
rate = engine.getProperty('rate')
engine.setProperty('rate', 150)
engine.setProperty('voice', 1)
owmAPI_key = '01ac0d6eccb4b34fc0e9ee925ac40a3d'
owm = pyowm.OWM(owmAPI_key)... | true | true |
f752d9223bd52af14c8cbf480e39a707c146f401 | 10,711 | py | Python | src/main/python/OptionsData.py | RookiePC/Img2url | 04cc58516429a1c927bfa2f18e31984bf830aab1 | [
"MIT"
] | 1 | 2020-02-16T15:12:46.000Z | 2020-02-16T15:12:46.000Z | src/main/python/OptionsData.py | RookiePC/Img2url | 04cc58516429a1c927bfa2f18e31984bf830aab1 | [
"MIT"
] | null | null | null | src/main/python/OptionsData.py | RookiePC/Img2url | 04cc58516429a1c927bfa2f18e31984bf830aab1 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2019 RookiePC
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 36.308475 | 117 | 0.647185 | import os
import sys
import enum
import configparser
from Tools import ShareTools
class WorkMode(enum.Enum):
key_word_replace_mode = 1
hot_key_mode = 2
class Options:
def __init__(self):
super().__init__()
self.platform: str = sys.platform
self.config_parser: configparse... | true | true |
f752d9278b70cce864c845598ce98a7f1ee21c54 | 27,025 | py | Python | sim/fighters.py | Tjorriemorrie/ufc | 46918c91e1ccf464d9d03dc8524dab91eca239d2 | [
"Apache-2.0"
] | 1 | 2019-11-10T14:14:42.000Z | 2019-11-10T14:14:42.000Z | sim/fighters.py | Tjorriemorrie/ufc | 46918c91e1ccf464d9d03dc8524dab91eca239d2 | [
"Apache-2.0"
] | 2 | 2020-09-25T23:55:31.000Z | 2022-02-10T00:20:20.000Z | sim/fighters.py | Tjorriemorrie/ufc | 46918c91e1ccf464d9d03dc8524dab91eca239d2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################################
# mens
###############################################################################################
MENS_CATCH_WEIGHT = 'mens catch weight' # ??.?kg
MENS_STRAWWEIGHT = 'mens strawweight' # 52.5kg
MENS_FLYWEIGHT = '... | 32.172619 | 95 | 0.771397 | h'
EVAN_DUNHAM = 'Evan Dunham'
FELIPE_SILVA = 'Felipe Silva'
FRANCISCO_TRINALDO = 'Francisco Trinaldo'
FRANKIE_PEREZ = 'Frankie Perez'
GILBERT_BURNS = 'Gilbert Burns'
GLEISON_TIBAU = 'gleison Tibau'
GREGOR_GILLESPIE = 'Gregor Gillepsie'
HACRAN_DIAS = 'Hacran Dias'
ISLAM_MAKHACHEV = 'Islam Makhachev'
JAMES_VICK = 'James... | true | true |
f752d934dc65851a7786406ea5fa7a85ebec2119 | 1,425 | py | Python | observations/r/smoking.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 199 | 2017-07-24T01:34:27.000Z | 2022-01-29T00:50:55.000Z | observations/r/smoking.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 46 | 2017-09-05T19:27:20.000Z | 2019-01-07T09:47:26.000Z | observations/r/smoking.py | hajime9652/observations | 2c8b1ac31025938cb17762e540f2f592e302d5de | [
"Apache-2.0"
] | 45 | 2017-07-26T00:10:44.000Z | 2022-03-16T20:44:59.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def smoking(path):
"""smoking
A simple data set with only 6 observatio... | 23.360656 | 71 | 0.670175 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import csv
import numpy as np
import os
import sys
from observations.util import maybe_download_and_extract
def smoking(path):
import pandas as pd
path = os.path.expanduser(path)
filename = 'smoking.c... | true | true |
f752d93795cee5934a67cdb7ac48c883eb6503c6 | 5,521 | py | Python | motion_blur/blur_image.py | pikerbright/DeblurGAN | 31fdc7f83d45e05d0d0a352aa1b8a960e42d618b | [
"BSD-3-Clause"
] | 2,253 | 2017-07-14T09:00:51.000Z | 2022-03-30T06:56:13.000Z | motion_blur/blur_image.py | milletzcz/DeblurGAN | 39e8a4b408b90d0ef98608c5c4562eae3e184251 | [
"BSD-3-Clause"
] | 206 | 2017-11-25T08:25:21.000Z | 2022-03-24T07:59:12.000Z | motion_blur/blur_image.py | milletzcz/DeblurGAN | 39e8a4b408b90d0ef98608c5c4562eae3e184251 | [
"BSD-3-Clause"
] | 543 | 2017-07-12T05:53:25.000Z | 2022-03-30T06:56:15.000Z | import numpy as np
import matplotlib.pyplot as plt
import cv2
import os
from scipy import signal
from scipy import misc
from motion_blur.generate_PSF import PSF
from motion_blur.generate_trajectory import Trajectory
class BlurImage(object):
def __init__(self, image_path, PSFs=None, part=None, path__to_save=None)... | 45.628099 | 116 | 0.561855 | import numpy as np
import matplotlib.pyplot as plt
import cv2
import os
from scipy import signal
from scipy import misc
from motion_blur.generate_PSF import PSF
from motion_blur.generate_trajectory import Trajectory
class BlurImage(object):
def __init__(self, image_path, PSFs=None, part=None, path__to_save=None)... | true | true |
f752d93982fd8f29cadb131ffc91ed0fa98d196a | 517 | py | Python | examples/SvmSgd.py | vibhatha/PSGDSVMPY | 69ed88f5db8d9a250ee944f44b88e54351f8696f | [
"Apache-2.0"
] | null | null | null | examples/SvmSgd.py | vibhatha/PSGDSVMPY | 69ed88f5db8d9a250ee944f44b88e54351f8696f | [
"Apache-2.0"
] | null | null | null | examples/SvmSgd.py | vibhatha/PSGDSVMPY | 69ed88f5db8d9a250ee944f44b88e54351f8696f | [
"Apache-2.0"
] | null | null | null | import numpy as np
X = np.array([
[-2,4,-1],
[4,1,-1],
[1, 6, -1],
[2, 4, -1],
[6, 2, -1],
])
y = np.array([-1,-1,1,1,1])
def svm_sgd(X, Y):
w = np.zeros(len(X[0]))
eta = 1
epochs = 100000
for epoch in range(1,epochs):
for i, x in enumerate(X):
if (Y[i]*np.d... | 16.677419 | 69 | 0.388781 | import numpy as np
X = np.array([
[-2,4,-1],
[4,1,-1],
[1, 6, -1],
[2, 4, -1],
[6, 2, -1],
])
y = np.array([-1,-1,1,1,1])
def svm_sgd(X, Y):
w = np.zeros(len(X[0]))
eta = 1
epochs = 100000
for epoch in range(1,epochs):
for i, x in enumerate(X):
if (Y[i]*np.d... | true | true |
f752d9c9ad5d805eeb83d529ee2e6b93c29b6559 | 310 | py | Python | Python/bot swagbuck gold survey/belajar.py | AnnasJK/annas | 21627f13d72112ce5ce65e3a635cbf5d2f8e5e41 | [
"MIT"
] | 2 | 2021-01-17T17:13:28.000Z | 2021-05-20T13:00:44.000Z | Python/bot swagbuck gold survey/belajar.py | AnnasJK/annas | 21627f13d72112ce5ce65e3a635cbf5d2f8e5e41 | [
"MIT"
] | null | null | null | Python/bot swagbuck gold survey/belajar.py | AnnasJK/annas | 21627f13d72112ce5ce65e3a635cbf5d2f8e5e41 | [
"MIT"
] | 1 | 2021-02-09T07:15:33.000Z | 2021-02-09T07:15:33.000Z | import pyautogui
import random
from time import sleep
sleep(2)
while True:
for i in range(random.randrange(350,450), random.randrange(550,650), 3):
if i > random.randrange(480, 600) and i < random.randrange(548,647):
pyautogui.click(1188, 300)
pyautogui.click(1188, i)
| 31 | 77 | 0.658065 | import pyautogui
import random
from time import sleep
sleep(2)
while True:
for i in range(random.randrange(350,450), random.randrange(550,650), 3):
if i > random.randrange(480, 600) and i < random.randrange(548,647):
pyautogui.click(1188, 300)
pyautogui.click(1188, i)
| true | true |
f752da015d1582755abf43598480df6861c2236b | 6,451 | py | Python | run_energy_model_mnist.py | SudeepSarkar/equilibrium-propagation | ba6d9ee5426445e9ad91c96c816fa5287ff97258 | [
"MIT"
] | 18 | 2020-01-07T11:25:45.000Z | 2022-01-24T18:25:13.000Z | run_energy_model_mnist.py | SudeepSarkar/equilibrium-propagation | ba6d9ee5426445e9ad91c96c816fa5287ff97258 | [
"MIT"
] | null | null | null | run_energy_model_mnist.py | SudeepSarkar/equilibrium-propagation | ba6d9ee5426445e9ad91c96c816fa5287ff97258 | [
"MIT"
] | 5 | 2020-06-26T23:37:22.000Z | 2021-09-04T12:22:49.000Z | # MIT License
# Copyright (c) 2020 Simon Schug, João Sacramento
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, ... | 39.820988 | 99 | 0.674779 |
import argparse
import json
import logging
import sys
import torch
from lib import config, data, energy, train, utils
def load_default_config(energy):
if energy == "restr_hopfield":
default_config = "etc/energy_restr_hopfield.json"
elif energy == "cond_gaussian":
defaul... | true | true |
f752db5b452781cb38e9d2fabcf1b69a20fcf21b | 643 | py | Python | seminars/seminar_oop/hr_registry.py | dmitry-uraev/programming-2021-19fpl | 8d0c12c7f9ba246e51914ff74b6c3887b88ae783 | [
"MIT"
] | null | null | null | seminars/seminar_oop/hr_registry.py | dmitry-uraev/programming-2021-19fpl | 8d0c12c7f9ba246e51914ff74b6c3887b88ae783 | [
"MIT"
] | null | null | null | seminars/seminar_oop/hr_registry.py | dmitry-uraev/programming-2021-19fpl | 8d0c12c7f9ba246e51914ff74b6c3887b88ae783 | [
"MIT"
] | null | null | null | from seminars.seminar_oop.employee import Employee
class HRRegistry:
def __init__(self, name: str, location: str):
self.name = name
self.location = location
self.registry = {}
self.counter = 1
def add_employee(self, employee: Employee):
self.registry[self.counter] = em... | 25.72 | 50 | 0.712286 | from seminars.seminar_oop.employee import Employee
class HRRegistry:
def __init__(self, name: str, location: str):
self.name = name
self.location = location
self.registry = {}
self.counter = 1
def add_employee(self, employee: Employee):
self.registry[self.counter] = em... | true | true |
f752dba43d79fe779ca262d1ae976eac74d50927 | 3,801 | py | Python | hy/model_patterns.py | lafrenierejm/hy | abd5ef6a8a3c42c0f097e5ae424296b177d1221f | [
"MIT"
] | null | null | null | hy/model_patterns.py | lafrenierejm/hy | abd5ef6a8a3c42c0f097e5ae424296b177d1221f | [
"MIT"
] | null | null | null | hy/model_patterns.py | lafrenierejm/hy | abd5ef6a8a3c42c0f097e5ae424296b177d1221f | [
"MIT"
] | null | null | null | "Parser combinators for pattern-matching Hy model trees."
from collections import namedtuple
from functools import reduce
from itertools import repeat
from math import isinf
from operator import add
from funcparserlib.parser import (
NoParseError,
Parser,
State,
a,
finished,
many,
skip,
... | 24.681818 | 84 | 0.632991 |
from collections import namedtuple
from functools import reduce
from itertools import repeat
from math import isinf
from operator import add
from funcparserlib.parser import (
NoParseError,
Parser,
State,
a,
finished,
many,
skip,
some,
)
from hy.models import (
Bytes,
Complex,... | true | true |
f752dc622751eb068e8f1326a265e1315200c00e | 27,414 | py | Python | axelrod/strategies/titfortat.py | HarryLi98/Axelrod | 3e9877d6b3db83815e15c78abc16bbbd296277d3 | [
"MIT"
] | null | null | null | axelrod/strategies/titfortat.py | HarryLi98/Axelrod | 3e9877d6b3db83815e15c78abc16bbbd296277d3 | [
"MIT"
] | null | null | null | axelrod/strategies/titfortat.py | HarryLi98/Axelrod | 3e9877d6b3db83815e15c78abc16bbbd296277d3 | [
"MIT"
] | null | null | null | from axelrod.action import Action, actions_to_str
from axelrod.player import Player
from axelrod.strategy_transformers import (
FinalTransformer,
TrackHistoryTransformer,
)
C, D = Action.C, Action.D
class TitForTat(Player):
"""
A player starts by cooperating and then mimics the previous action of the... | 28.735849 | 100 | 0.60046 | from axelrod.action import Action, actions_to_str
from axelrod.player import Player
from axelrod.strategy_transformers import (
FinalTransformer,
TrackHistoryTransformer,
)
C, D = Action.C, Action.D
class TitForTat(Player):
name = "Tit For Tat"
classifier = {
"memory_depth": 1,
... | true | true |
f752dd4295b489dedaa5172ea01bceb8c78b17ef | 2,140 | py | Python | app/documents/api_v1_0/resources.py | dgazcon27/api_erp_gestional_inc | e759120ce6177615a32616681539e2dbc722beba | [
"MIT"
] | null | null | null | app/documents/api_v1_0/resources.py | dgazcon27/api_erp_gestional_inc | e759120ce6177615a32616681539e2dbc722beba | [
"MIT"
] | null | null | null | app/documents/api_v1_0/resources.py | dgazcon27/api_erp_gestional_inc | e759120ce6177615a32616681539e2dbc722beba | [
"MIT"
] | null | null | null | from flask import request, Blueprint
from flask_restful import Api, Resource, reqparse
from flask_jwt_extended import jwt_required, get_jwt
from werkzeug import datastructures, utils
import os
import uuid
from .schemas import DocumentsSchema
from ..models import Documents
from config.default import UPLOAD_FOLDER
docu... | 31.470588 | 93 | 0.643925 | from flask import request, Blueprint
from flask_restful import Api, Resource, reqparse
from flask_jwt_extended import jwt_required, get_jwt
from werkzeug import datastructures, utils
import os
import uuid
from .schemas import DocumentsSchema
from ..models import Documents
from config.default import UPLOAD_FOLDER
docu... | true | true |
f752deaa769d3ec55fac10bf2d4f501680b4d01f | 5,562 | py | Python | src/python/pants/backend/java/target_types.py | asherf/pants | e010b93c4123b4446a631cac5db0b7ea15634686 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/java/target_types.py | asherf/pants | e010b93c4123b4446a631cac5db0b7ea15634686 | [
"Apache-2.0"
] | 14 | 2021-05-03T13:54:41.000Z | 2022-03-30T10:20:58.000Z | src/python/pants/backend/java/target_types.py | asherf/pants | e010b93c4123b4446a631cac5db0b7ea15634686 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
from dataclasses import dataclass
from pants.core.goals.package import OutputPathField
from pants.engine.rules import Get, collect_rules, rule
from pan... | 27.671642 | 97 | 0.67278 |
from __future__ import annotations
from dataclasses import dataclass
from pants.core.goals.package import OutputPathField
from pants.engine.rules import Get, collect_rules, rule
from pants.engine.target import (
COMMON_TARGET_FIELDS,
Dependencies,
FieldSet,
GeneratedTargets,
GenerateTargetsRequ... | true | true |
f752def2b77616895a57d0d557ad9cf1c8a50603 | 3,014 | py | Python | sedkit/tests/test_modelgrid.py | hover2pi/sedkit | 76ea2bda7492b6a724818dc0ad4b7d3301bdde42 | [
"MIT"
] | 6 | 2020-09-15T01:14:19.000Z | 2021-12-07T21:11:06.000Z | sedkit/tests/test_modelgrid.py | hover2pi/sedkit | 76ea2bda7492b6a724818dc0ad4b7d3301bdde42 | [
"MIT"
] | 19 | 2018-10-29T18:19:36.000Z | 2021-11-29T14:18:37.000Z | sedkit/tests/test_modelgrid.py | hover2pi/sedkit | 76ea2bda7492b6a724818dc0ad4b7d3301bdde42 | [
"MIT"
] | 4 | 2019-01-04T14:18:34.000Z | 2021-03-05T10:58:39.000Z | import unittest
import os
from pkg_resources import resource_filename
import astropy.units as q
from .. import modelgrid as mg
from .. import utilities as u
class TestModelGrid(unittest.TestCase):
"""Tests for the ModelGrid class"""
def setUp(self):
# Make Model class for testing
params = [... | 29.54902 | 126 | 0.626742 | import unittest
import os
from pkg_resources import resource_filename
import astropy.units as q
from .. import modelgrid as mg
from .. import utilities as u
class TestModelGrid(unittest.TestCase):
def setUp(self):
params = ['spty']
grid = mg.ModelGrid('Test', params, q.AA, q.erg/q.s/q.... | true | true |
f752df10f06ea89586e7bda3f973b11ae5a7c2ed | 3,152 | py | Python | python/cugraph/tests/test_triangle_count.py | rgsl888prabhu/cugraph | e030a2fe22ad308fba05d6146765a3c9aa865e5b | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_triangle_count.py | rgsl888prabhu/cugraph | e030a2fe22ad308fba05d6146765a3c9aa865e5b | [
"Apache-2.0"
] | null | null | null | python/cugraph/tests/test_triangle_count.py | rgsl888prabhu/cugraph | e030a2fe22ad308fba05d6146765a3c9aa865e5b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA CORPORATION.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 29.735849 | 75 | 0.706536 |
import gc
from itertools import product
import pytest
from scipy.io import mmread
import cudf
import cugraph
from librmm_cffi import librmm as rmm
from librmm_cffi import librmm_config as rmm_cfg
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=Deprecat... | true | true |
f752dfde75df7e3d4681aa6894b869f8bd2289ad | 27,152 | py | Python | wf_psf/SimPSFToolkit.py | tobias-liaudat/wf-psf | 0ff1a12d06c46bd8599061d227785393fb528d76 | [
"MIT"
] | 7 | 2022-03-10T10:49:01.000Z | 2022-03-17T16:06:12.000Z | wf_psf/SimPSFToolkit.py | tobias-liaudat/wf-psf | 0ff1a12d06c46bd8599061d227785393fb528d76 | [
"MIT"
] | null | null | null | wf_psf/SimPSFToolkit.py | tobias-liaudat/wf-psf | 0ff1a12d06c46bd8599061d227785393fb528d76 | [
"MIT"
] | null | null | null | import numpy as np
import scipy.signal as spsig
import scipy.interpolate as sinterp
import PIL
import matplotlib.pyplot as plt
import matplotlib as mpl
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
from mpl_toolkits.axes_grid1 import make_axes_locatable
try:
from cv2 import resize, INTER_ARE... | 35.82058 | 100 | 0.604265 | import numpy as np
import scipy.signal as spsig
import scipy.interpolate as sinterp
import PIL
import matplotlib.pyplot as plt
import matplotlib as mpl
from matplotlib.colors import ListedColormap, LinearSegmentedColormap
from mpl_toolkits.axes_grid1 import make_axes_locatable
try:
from cv2 import resize, INTER_ARE... | true | true |
f752e18eea219c2ffde214bbed23f8de7e1f63cf | 52,700 | py | Python | rpython/jit/backend/llsupport/rewrite.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | rpython/jit/backend/llsupport/rewrite.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | null | null | null | rpython/jit/backend/llsupport/rewrite.py | hollmmax/zig | d80baa5a5fcbc82b3e2294b398edc20a98737a52 | [
"MIT"
] | 1 | 2022-03-30T11:42:37.000Z | 2022-03-30T11:42:37.000Z | from rpython.rlib import rgc
from rpython.rlib.objectmodel import we_are_translated, always_inline
from rpython.rlib.rarithmetic import ovfcheck, highest_bit
from rpython.rtyper.lltypesystem import llmemory, lltype, rstr
from rpython.rtyper.annlowlevel import cast_instance_to_gcref
from rpython.jit.metainterp.history i... | 46.390845 | 101 | 0.594668 | from rpython.rlib import rgc
from rpython.rlib.objectmodel import we_are_translated, always_inline
from rpython.rlib.rarithmetic import ovfcheck, highest_bit
from rpython.rtyper.lltypesystem import llmemory, lltype, rstr
from rpython.rtyper.annlowlevel import cast_instance_to_gcref
from rpython.jit.metainterp.history i... | true | true |
f752e1b8fafc252ecc747c068de9b36a34ee996b | 1,148 | py | Python | 0_main.py | RobosaurusFLL/CityShaper | 60f9959fcf681fe6b30606e1b7a0694395b4950c | [
"Apache-2.0"
] | null | null | null | 0_main.py | RobosaurusFLL/CityShaper | 60f9959fcf681fe6b30606e1b7a0694395b4950c | [
"Apache-2.0"
] | null | null | null | 0_main.py | RobosaurusFLL/CityShaper | 60f9959fcf681fe6b30606e1b7a0694395b4950c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env micropython
import sys
import time
from ev3dev2.button import Button
from time import sleep
from push_blocks import blocks_and_crane
from swing2ramp import swing2ramp
from Traffic_Tree import Traffic_Tree
import os
os.system('setfont Lat15-TerminusBold32x16')
btn = Button()
function_list = [blocks_a... | 26.697674 | 67 | 0.594948 |
import sys
import time
from ev3dev2.button import Button
from time import sleep
from push_blocks import blocks_and_crane
from swing2ramp import swing2ramp
from Traffic_Tree import Traffic_Tree
import os
os.system('setfont Lat15-TerminusBold32x16')
btn = Button()
function_list = [blocks_and_crane, Traffic_Tree, sw... | true | true |
f752e222a1e03fcfb14bd171131d20b6c6a15a25 | 3,873 | py | Python | src/sentry/integrations/pipeline.py | rob-opsi/sentry | bbfe97c5dec8e300d5733cab440f620fb04c5dc8 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/integrations/pipeline.py | rob-opsi/sentry | bbfe97c5dec8e300d5733cab440f620fb04c5dc8 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/integrations/pipeline.py | rob-opsi/sentry | bbfe97c5dec8e300d5733cab440f620fb04c5dc8 | [
"BSD-3-Clause"
] | 1 | 2020-07-03T00:52:19.000Z | 2020-07-03T00:52:19.000Z | from __future__ import absolute_import, print_function
__all__ = ['IntegrationPipeline']
from django.db import IntegrityError
from django.db.models import Q
from django.http import HttpResponse
from django.utils import timezone
from sentry.api.serializers import serialize
from sentry.models import Identity, Identity... | 31.487805 | 91 | 0.59747 | from __future__ import absolute_import, print_function
__all__ = ['IntegrationPipeline']
from django.db import IntegrityError
from django.db.models import Q
from django.http import HttpResponse
from django.utils import timezone
from sentry.api.serializers import serialize
from sentry.models import Identity, Identity... | true | true |
f752e241f402d0ab49bb37c681005bca1632987f | 559 | py | Python | creational/first_lazy_initialization.py | MADTeacher/design-patterns | 8cac737a923f3e3dbfd4c5f38f95eeb74b0ca020 | [
"MIT"
] | 11 | 2021-07-23T10:10:25.000Z | 2022-02-09T08:54:16.000Z | creational/first_lazy_initialization.py | MADTeacher/design-patterns | 8cac737a923f3e3dbfd4c5f38f95eeb74b0ca020 | [
"MIT"
] | null | null | null | creational/first_lazy_initialization.py | MADTeacher/design-patterns | 8cac737a923f3e3dbfd4c5f38f95eeb74b0ca020 | [
"MIT"
] | 8 | 2021-03-26T17:57:15.000Z | 2022-01-03T13:23:42.000Z | class Pizza:
def __init__(self, pizza_name: str):
self.name = pizza_name
def __str__(self):
return self.name
class PizzaPlace:
def __init__(self) -> None:
self.pizzas = {}
def get_pizza(self, pizza_name: str) -> Pizza:
if pizza_name not in self.pizzas:
sel... | 23.291667 | 55 | 0.649374 | class Pizza:
def __init__(self, pizza_name: str):
self.name = pizza_name
def __str__(self):
return self.name
class PizzaPlace:
def __init__(self) -> None:
self.pizzas = {}
def get_pizza(self, pizza_name: str) -> Pizza:
if pizza_name not in self.pizzas:
sel... | true | true |
f752e313317f7bf7107edbff56c08407b2b77d6c | 4,049 | py | Python | utils/postprocess.py | binfen/FBDD | 26c859a2dbe3d308711898ef1d149a5f8c49055f | [
"MIT"
] | null | null | null | utils/postprocess.py | binfen/FBDD | 26c859a2dbe3d308711898ef1d149a5f8c49055f | [
"MIT"
] | null | null | null | utils/postprocess.py | binfen/FBDD | 26c859a2dbe3d308711898ef1d149a5f8c49055f | [
"MIT"
] | null | null | null | import time
import numpy as np
import pandas as pd
from molecules import mol_from_smiles
from molecules import add_property
from molecules import (
add_atom_counts, add_bond_counts, add_ring_counts)
from .config import get_dataset_info
from .filesystem import load_dataset
SCORES = ["validity", "novelty", "unique... | 28.514085 | 73 | 0.656705 | import time
import numpy as np
import pandas as pd
from molecules import mol_from_smiles
from molecules import add_property
from molecules import (
add_atom_counts, add_bond_counts, add_ring_counts)
from .config import get_dataset_info
from .filesystem import load_dataset
SCORES = ["validity", "novelty", "unique... | true | true |
f752e3162c266b364089f4420733223b25102b98 | 4,675 | py | Python | src/pypine/_ChainNodeP.py | jkpubsrc/PyPine | e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03 | [
"Apache-1.1"
] | null | null | null | src/pypine/_ChainNodeP.py | jkpubsrc/PyPine | e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03 | [
"Apache-1.1"
] | null | null | null | src/pypine/_ChainNodeP.py | jkpubsrc/PyPine | e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03 | [
"Apache-1.1"
] | null | null | null |
import os
import typing
import jk_typing
import jk_utils
#import jk_prettyprintobj
from .utils.TreeHelper import TreeHelper
from ._INode import _INode
from .EnumAction import EnumAction
from .FileTypeInfo import FileTypeInfo
from .Context import Context
from .AbstractProcessor import AbstractProcessor
from .utils.... | 31.166667 | 170 | 0.529198 |
import os
import typing
import jk_typing
import jk_utils
from .utils.TreeHelper import TreeHelper
from ._INode import _INode
from .EnumAction import EnumAction
from .FileTypeInfo import FileTypeInfo
from .Context import Context
from .AbstractProcessor import AbstractProcessor
from .utils.Color import Color
... | true | true |
f752e3223f28a9a09268748c9d23b25198db40b7 | 3,263 | py | Python | prepare_data.py | violetcodes/hiking-ridge | b10550f32172a0e36371e1ad84563be32e67ab4a | [
"Apache-2.0"
] | null | null | null | prepare_data.py | violetcodes/hiking-ridge | b10550f32172a0e36371e1ad84563be32e67ab4a | [
"Apache-2.0"
] | null | null | null | prepare_data.py | violetcodes/hiking-ridge | b10550f32172a0e36371e1ad84563be32e67ab4a | [
"Apache-2.0"
] | null | null | null | import utils
from tqdm import tqdm
jfile_texts = lambda jload: [i['section_title'] + ': ' + i['text'] for i in jload]
def find_index(text, target, width=100, find_only=False, lowr=True):
if lowr:
text = utils.clean_text(text)
target = utils.clean_text(target)
if find_only:
return t... | 32.306931 | 82 | 0.517315 | import utils
from tqdm import tqdm
jfile_texts = lambda jload: [i['section_title'] + ': ' + i['text'] for i in jload]
def find_index(text, target, width=100, find_only=False, lowr=True):
if lowr:
text = utils.clean_text(text)
target = utils.clean_text(target)
if find_only:
return t... | true | true |
f752e530740fb1e79ca1e76d6efe27daa4c4ec30 | 10,982 | py | Python | test/functional/test_framework/test_node.py | thaotlh94/usdacoin | 87edf5821fae5aa8385afdff62395be8fd8583e4 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | thaotlh94/usdacoin | 87edf5821fae5aa8385afdff62395be8fd8583e4 | [
"MIT"
] | null | null | null | test/functional/test_framework/test_node.py | thaotlh94/usdacoin | 87edf5821fae5aa8385afdff62395be8fd8583e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Class for bitcoind node under test"""
import decimal
import errno
import http.client
import json
import log... | 38.669014 | 248 | 0.629667 |
import decimal
import errno
import http.client
import json
import logging
import os
import re
import subprocess
import time
from .authproxy import JSONRPCException
from .util import (
assert_equal,
delete_cookie_file,
get_rpc_proxy,
rpc_url,
wait_until,
p2p_port,
)
JSONDecodeError = geta... | true | true |
f752e71183e4acd7fdaf700577c1091ca15432f6 | 22,581 | py | Python | pyccl/tests/test_power.py | Jappenn/CCL | a37cad61f060f3928fa5d47b1e2670db3e9bce6f | [
"BSD-3-Clause"
] | 91 | 2017-07-14T02:45:59.000Z | 2022-03-28T08:55:54.000Z | pyccl/tests/test_power.py | Jappenn/CCL | a37cad61f060f3928fa5d47b1e2670db3e9bce6f | [
"BSD-3-Clause"
] | 703 | 2017-07-07T16:27:17.000Z | 2022-03-30T14:40:10.000Z | pyccl/tests/test_power.py | Jappenn/CCL | a37cad61f060f3928fa5d47b1e2670db3e9bce6f | [
"BSD-3-Clause"
] | 54 | 2017-07-12T13:08:25.000Z | 2022-02-06T13:12:10.000Z | import numpy as np
import pytest
import pyccl as ccl
from pyccl import CCLError, CCLWarning
COSMO = ccl.Cosmology(
Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96,
transfer_function='bbks', matter_power_spectrum='halofit')
COSMO_HM = ccl.Cosmology(
Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.... | 36.836868 | 78 | 0.591604 | import numpy as np
import pytest
import pyccl as ccl
from pyccl import CCLError, CCLWarning
COSMO = ccl.Cosmology(
Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.8, n_s=0.96,
transfer_function='bbks', matter_power_spectrum='halofit')
COSMO_HM = ccl.Cosmology(
Omega_c=0.27, Omega_b=0.045, h=0.67, sigma8=0.... | true | true |
f752e72c67790ca11d79f3921945dbc9731df9cc | 18,455 | py | Python | tests/integration/test_storage_s3/test.py | r1j1k/ClickHouse | c5df9433f051e272bdfa731a79a4b592a8859b0b | [
"Apache-2.0"
] | 1 | 2020-10-01T01:54:37.000Z | 2020-10-01T01:54:37.000Z | tests/integration/test_storage_s3/test.py | r1j1k/ClickHouse | c5df9433f051e272bdfa731a79a4b592a8859b0b | [
"Apache-2.0"
] | null | null | null | tests/integration/test_storage_s3/test.py | r1j1k/ClickHouse | c5df9433f051e272bdfa731a79a4b592a8859b0b | [
"Apache-2.0"
] | null | null | null | import gzip
import json
import logging
import os
import random
import StringIO
import threading
import time
import helpers.client
import pytest
from helpers.cluster import ClickHouseCluster, ClickHouseInstance
logging.getLogger().setLevel(logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
# Creat... | 39.433761 | 155 | 0.602818 | import gzip
import json
import logging
import os
import random
import StringIO
import threading
import time
import helpers.client
import pytest
from helpers.cluster import ClickHouseCluster, ClickHouseInstance
logging.getLogger().setLevel(logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler())
def pr... | true | true |
f752e9468e334d361da0a8c8c316b96fa818e09f | 688 | py | Python | azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/__init__.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/__init__.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | 37 | 2020-04-27T07:45:19.000Z | 2021-04-05T07:27:15.000Z | azure-devops/azext_devops/vstsCompressed/file_container/v4_1/models/__init__.py | vijayraavi/azure-devops-cli-extension | 88f1420c5815cb09bea15b050f4c553e0f326dad | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 43 | 94 | 0.452035 |
from .models import FileContainer
from .models import FileContainerItem
__all__ = [
'FileContainer',
'FileContainerItem',
]
| true | true |
f752ea9886ce3bdfa3c640d4cae06802596a7467 | 34,159 | py | Python | src/python/pants/backend/scala/compile/scalac_test.py | betaboon/pants | 05ec375c8bfcaa0396c673847bb139326883cc08 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/scala/compile/scalac_test.py | betaboon/pants | 05ec375c8bfcaa0396c673847bb139326883cc08 | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/scala/compile/scalac_test.py | betaboon/pants | 05ec375c8bfcaa0396c673847bb139326883cc08 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import annotations
import itertools
import textwrap
from textwrap import dedent
import pytest
from pants.backend.scala.compile.scalac import CompileScalaSourceRequest
fr... | 36.185381 | 115 | 0.524283 |
from __future__ import annotations
import itertools
import textwrap
from textwrap import dedent
import pytest
from pants.backend.scala.compile.scalac import CompileScalaSourceRequest
from pants.backend.scala.compile.scalac import rules as scalac_rules
from pants.backend.scala.dependency_inference.rules import rul... | true | true |
f752eca8c8b10c1307679c84762b9d2edf1fc3e7 | 1,371 | py | Python | python/frame_convert2.py | vinzdef/rorrim | 7a3fd4a212420b6fbe6590005300ea095938bf66 | [
"Unlicense"
] | null | null | null | python/frame_convert2.py | vinzdef/rorrim | 7a3fd4a212420b6fbe6590005300ea095938bf66 | [
"Unlicense"
] | null | null | null | python/frame_convert2.py | vinzdef/rorrim | 7a3fd4a212420b6fbe6590005300ea095938bf66 | [
"Unlicense"
] | null | null | null | import numpy as np
import matplotlib
def to_hsv(numb):
hue = np.interp(numb, [0, 1024], [0, 1])
rgb = matplotlib.colors.hsv_to_rgb(np.array([hue, 0.5, 1]))
bgr = rgb[:, :, ::-1] # RGB -> BGR
return np.array(bgr)
def hsv_depth(depth):
depth = to_hsv(depth)
return depth
def pretty_depth(depth)... | 24.482143 | 71 | 0.652808 | import numpy as np
import matplotlib
def to_hsv(numb):
hue = np.interp(numb, [0, 1024], [0, 1])
rgb = matplotlib.colors.hsv_to_rgb(np.array([hue, 0.5, 1]))
bgr = rgb[:, :, ::-1]
return np.array(bgr)
def hsv_depth(depth):
depth = to_hsv(depth)
return depth
def pretty_depth(depth):
np.cli... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.