hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c038a9b78a4e0d06a4abc85d524dc1876b413ad
1,458
py
Python
sdk/python/tests/conftest.py
randxie/feast
cc003155ae0ddaaf4894c88e71c35c4698daf25a
[ "Apache-2.0" ]
3
2021-05-07T06:03:44.000Z
2022-02-20T10:43:59.000Z
sdk/python/tests/conftest.py
randxie/feast
cc003155ae0ddaaf4894c88e71c35c4698daf25a
[ "Apache-2.0" ]
15
2020-11-13T19:01:34.000Z
2022-02-22T15:47:29.000Z
sdk/python/tests/conftest.py
randxie/feast
cc003155ae0ddaaf4894c88e71c35c4698daf25a
[ "Apache-2.0" ]
2
2020-03-21T10:14:01.000Z
2021-03-25T02:25:16.000Z
# Copyright 2019 The Feast Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
30.375
74
0.711248
import multiprocessing from sys import platform import pytest def pytest_configure(config): if platform in ["darwin", "windows"]: multiprocessing.set_start_method("spawn") else: multiprocessing.set_start_method("fork") config.addinivalue_line( "markers", "integration: mark test th...
true
true
1c038b1a9f48498bf4b5032ee8675374dd58092a
658
py
Python
utests/specs/test.py
linarnan/ptf
83444198f295a6fc8486b095379f67d8f7c25ad6
[ "Apache-2.0" ]
113
2016-06-09T08:13:44.000Z
2022-03-25T08:19:24.000Z
utests/specs/test.py
linarnan/ptf
83444198f295a6fc8486b095379f67d8f7c25ad6
[ "Apache-2.0" ]
85
2015-10-08T17:15:11.000Z
2022-01-20T00:49:28.000Z
utests/specs/test.py
linarnan/ptf
83444198f295a6fc8486b095379f67d8f7c25ad6
[ "Apache-2.0" ]
103
2015-12-02T12:43:12.000Z
2022-03-10T03:07:40.000Z
import ptf from ptf.base_tests import BaseTest from ptf import testutils class TestParamsGet(BaseTest): def setUp(self): BaseTest.setUp(self) def runTest(self): params = testutils.test_params_get(default=None) if params is None: print(">>>None") else: fo...
24.37037
56
0.559271
import ptf from ptf.base_tests import BaseTest from ptf import testutils class TestParamsGet(BaseTest): def setUp(self): BaseTest.setUp(self) def runTest(self): params = testutils.test_params_get(default=None) if params is None: print(">>>None") else: fo...
true
true
1c038b6448427fc384b62c9865343f645fcb22bd
1,062
py
Python
tests/test_stat.py
xianba/datadrawer
864e0cd72f169a3cf107b827a5aa1b3a0717dd09
[ "Apache-2.0" ]
null
null
null
tests/test_stat.py
xianba/datadrawer
864e0cd72f169a3cf107b827a5aa1b3a0717dd09
[ "Apache-2.0" ]
null
null
null
tests/test_stat.py
xianba/datadrawer
864e0cd72f169a3cf107b827a5aa1b3a0717dd09
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- ''' @File : test_stat.py.py @Version : 1.0.0 @Author : xiaxianba @License : (C) Copyright 2006-2019 @Contact : xiaxianba@qq.com @Software: PyCharm @Time : 2019/5/6 14:22 @Desc : ''' import unittest from datadrawer.datadrawer.src.stat...
22.125
66
0.597928
''' @File : test_stat.py.py @Version : 1.0.0 @Author : xiaxianba @License : (C) Copyright 2006-2019 @Contact : xiaxianba@qq.com @Software: PyCharm @Time : 2019/5/6 14:22 @Desc : ''' import unittest from datadrawer.datadrawer.src.stat import * class TestStat(unittest.TestCase): ...
false
true
1c038bccb2f9fdbfcc7e252cbef7a26331571969
6,006
py
Python
app/youtube.py
Amperture/amp-stream-viewer
8898d12a1be24a297bbc1aa0651cc184d9d78842
[ "MIT" ]
null
null
null
app/youtube.py
Amperture/amp-stream-viewer
8898d12a1be24a297bbc1aa0651cc184d9d78842
[ "MIT" ]
8
2021-02-08T20:26:34.000Z
2022-02-26T05:48:00.000Z
app/youtube.py
Amperture/amp-stream-viewer
8898d12a1be24a297bbc1aa0651cc184d9d78842
[ "MIT" ]
null
null
null
from app import app, db from flask import jsonify, request from app.util import auth_required from app.models import StreamLog, Broadcaster from googleapiclient.discovery import build from googleapiclient.errors import HttpError import json COMMON_ERRORS = { 'backendError': "yt_backend_error", 'liv...
31.119171
77
0.584416
from app import app, db from flask import jsonify, request from app.util import auth_required from app.models import StreamLog, Broadcaster from googleapiclient.discovery import build from googleapiclient.errors import HttpError import json COMMON_ERRORS = { 'backendError': "yt_backend_error", 'liv...
true
true
1c038be56e55ec7ed76d88e153cd94e0fb164d4d
1,402
py
Python
test/test_inline_response40047.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
5
2021-05-17T04:45:03.000Z
2022-03-23T12:51:46.000Z
test/test_inline_response40047.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
null
null
null
test/test_inline_response40047.py
Crypto-APIs/Crypto_APIs_2.0_SDK_Python
c59ebd914850622b2c6500c4c30af31fb9cecf0e
[ "MIT" ]
2
2021-06-02T07:32:26.000Z
2022-02-12T02:36:23.000Z
""" CryptoAPIs Crypto APIs 2.0 is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs 2.0 can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of thei...
35.948718
484
0.768902
import sys import unittest import cryptoapis from cryptoapis.model.get_hd_wallet_x_pub_y_pub_z_pub_details_e400 import GetHDWalletXPubYPubZPubDetailsE400 globals()['GetHDWalletXPubYPubZPubDetailsE400'] = GetHDWalletXPubYPubZPubDetailsE400 from cryptoapis.model.inline_response40047 import InlineResponse40047 class ...
true
true
1c038d36fff89990e22b987779fb54dbdfeb5e9f
5,382
py
Python
salt/states/host.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
2
2015-09-21T14:13:30.000Z
2016-02-12T11:33:46.000Z
salt/states/host.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
1
2019-09-06T13:57:28.000Z
2019-09-06T13:57:28.000Z
salt/states/host.py
preoctopus/salt
aceaaa0e2f2f2ff29a694393bd82bba0d88fa44d
[ "Apache-2.0" ]
4
2020-11-04T06:28:05.000Z
2022-02-09T10:54:49.000Z
# -*- coding: utf-8 -*- ''' Management of addresses and names in hosts file =============================================== The ``/etc/hosts`` file can be managed to contain definitions for specific hosts: .. code-block:: yaml salt-master: host.present: - ip: 192.168.0.42 Or using the ``names`` di...
27.459184
100
0.524712
from __future__ import absolute_import import salt.utils.validate.net import salt.ext.six as six def present(name, ip): ret = {'name': name, 'changes': {}, 'result': None, 'comment': ''} if not isinstance(ip, list): ip = [ip] comments = [] for _ip in ip: ...
true
true
1c038dc6112494ce1df8ff923dae4adcd997ed70
4,671
py
Python
Lib/site-packages/openpyxl/worksheet/views.py
percevalm/aumyproject
b24b38005188ce9dd41ed663cf54dad5464afef3
[ "bzip2-1.0.6" ]
1
2017-10-31T02:37:37.000Z
2017-10-31T02:37:37.000Z
Lib/site-packages/openpyxl/worksheet/views.py
percevalm/aumyproject
b24b38005188ce9dd41ed663cf54dad5464afef3
[ "bzip2-1.0.6" ]
16
2020-03-24T17:30:37.000Z
2022-03-11T23:57:41.000Z
Lib/site-packages/openpyxl/worksheet/views.py
percevalm/aumyproject
b24b38005188ce9dd41ed663cf54dad5464afef3
[ "bzip2-1.0.6" ]
null
null
null
from __future__ import absolute_import # Copyright (c) 2010-2017 openpyxl from openpyxl.descriptors import ( Bool, Integer, String, Set, Float, Typed, NoneSet, Sequence, ) from openpyxl.descriptors.excel import ExtensionList from openpyxl.descriptors.serialisable import Serialisable c...
30.933775
81
0.651038
from __future__ import absolute_import from openpyxl.descriptors import ( Bool, Integer, String, Set, Float, Typed, NoneSet, Sequence, ) from openpyxl.descriptors.excel import ExtensionList from openpyxl.descriptors.serialisable import Serialisable class Pane(Serialisable): xSplit...
true
true
1c038dfe87a25eed786432649d27ee39cc87ea0e
8,539
py
Python
tests/contrib/tornado/test_wrap_decorator.py
zhammer/dd-trace-py
4c30f6e36bfa34a63cd9b6884677c977f76d2a01
[ "Apache-2.0", "BSD-3-Clause" ]
5
2020-03-07T01:12:29.000Z
2021-04-21T00:53:19.000Z
tests/contrib/tornado/test_wrap_decorator.py
zhammer/dd-trace-py
4c30f6e36bfa34a63cd9b6884677c977f76d2a01
[ "Apache-2.0", "BSD-3-Clause" ]
4
2019-11-22T20:58:01.000Z
2020-08-17T21:16:13.000Z
tests/contrib/tornado/test_wrap_decorator.py
zhammer/dd-trace-py
4c30f6e36bfa34a63cd9b6884677c977f76d2a01
[ "Apache-2.0", "BSD-3-Clause" ]
3
2020-03-18T16:29:20.000Z
2020-07-20T16:05:10.000Z
from ddtrace.ext import http from .utils import TornadoTestCase from ...utils import assert_span_http_status_code class TestTornadoWebWrapper(TornadoTestCase): """ Ensure that Tracer.wrap() works with Tornado web handlers. """ def test_nested_wrap_handler(self): # it should trace a handler th...
47.703911
102
0.660265
from ddtrace.ext import http from .utils import TornadoTestCase from ...utils import assert_span_http_status_code class TestTornadoWebWrapper(TornadoTestCase): def test_nested_wrap_handler(self): response = self.fetch('/nested_wrap/') assert 200 == response.code traces = self.trac...
true
true
1c038e38193f1a5d75fa474b40a19357b91af20d
11,618
py
Python
components/espcoredump/corefile/xtensa.py
leboisdesbruyere/esp-idf
fcf91a9c07492e36ac70a1afaeaf3394b093cc82
[ "Apache-2.0" ]
2
2021-07-30T06:39:34.000Z
2022-03-23T12:25:00.000Z
components/espcoredump/corefile/xtensa.py
leboisdesbruyere/esp-idf
fcf91a9c07492e36ac70a1afaeaf3394b093cc82
[ "Apache-2.0" ]
null
null
null
components/espcoredump/corefile/xtensa.py
leboisdesbruyere/esp-idf
fcf91a9c07492e36ac70a1afaeaf3394b093cc82
[ "Apache-2.0" ]
1
2021-11-24T18:01:39.000Z
2021-11-24T18:01:39.000Z
# # Copyright 2021 Espressif Systems (Shanghai) CO., LTD # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
41.791367
133
0.679635
from construct import Int16ul, Int32ul, Int64ul, Struct from . import BaseArchMethodsMixin, BaseTargetMethods, ESPCoreDumpLoaderError try: from typing import Any, Optional, Tuple except ImportError: pass INVALID_CAUSE_VALUE = 0xFFFF XCHAL_EXCCAUSE_NUM = 64 XTENSA_EXCEPTION_CAUSE_DICT = { 0: ('IllegalI...
true
true
1c038e703b819225b1247507d862edca07876d5d
16,355
py
Python
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_private_endpoint_connections_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-01-24T08:54:57.000Z
2022-01-24T08:54:57.000Z
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_private_endpoint_connections_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2022_01_02_preview/aio/operations/_private_endpoint_connections_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRe...
45.684358
251
0.691532
from typing import Any, Callable, Dict, Optional, TypeVar, Union from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse from azure....
true
true
1c038f838c69a9a9bf47e68dd09a79c99b0910ab
1,050
py
Python
Lib/site-packages/visual/examples/faces_cone.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/visual/examples/faces_cone.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
Lib/site-packages/visual/examples/faces_cone.py
raychorn/svn_Python-2.5.1
425005b1b489ba44ec0bb989e077297e8953d9be
[ "PSF-2.0" ]
null
null
null
from visual import * # Example of use of faces object for building arbitrary shapes (here, a cone) # David Scherer July 2001 f = frame() box( size=(0.5,0.5,0.5) ) # Make a cone (smooth shading, no bottom, normals are not quite physical) N = 20 model = faces( pos = zeros( (N*3,3), Float ), frame = f ) ...
25
95
0.60381
from visual import * f = frame() box( size=(0.5,0.5,0.5) ) N = 20 model = faces( pos = zeros( (N*3,3), Float ), frame = f ) t = arange(0,2*pi+2*pi/N,2*pi/N) model.pos[0::3, 0] = sin(t[:-1]) model.pos[0::3, 2] = cos(t[:-1]) model.pos[1::3, 0] = sin(t[1:]) model.pos[1::3, 2] = cos(t[1:]) model...
true
true
1c03904b06174309f76a3cae21f93ac3c512ae0b
67
py
Python
python/testData/refactoring/introduceVariable/substringNewStyleKeywords.py
jnthn/intellij-community
8fa7c8a3ace62400c838e0d5926a7be106aa8557
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/refactoring/introduceVariable/substringNewStyleKeywords.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/refactoring/introduceVariable/substringNewStyleKeywords.py
Cyril-lamirand/intellij-community
60ab6c61b82fc761dd68363eca7d9d69663cfa39
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
print("<selection>Hello</selection>, {name}!".format(name="World"))
67
67
0.701493
print("<selection>Hello</selection>, {name}!".format(name="World"))
true
true
1c03907ddbbf0fcedd80cb5858852e9d367c32bc
104,700
py
Python
pypy/lib-python/3/doctest.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
1
2021-06-02T23:02:09.000Z
2021-06-02T23:02:09.000Z
pypy/lib-python/3/doctest.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
1
2021-03-30T18:08:41.000Z
2021-03-30T18:08:41.000Z
pypy/lib-python/3/doctest.py
Clear-Sight/cython-vs-pypy-performance
a81df5e1dbc115468ddfd60670ddfad448a5c992
[ "MIT" ]
null
null
null
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
37.432964
79
0.58192
__docformat__ = 'reStructuredText en' __all__ = [ 'register_optionflag', 'DONT_ACCEPT_TRUE_FOR_1', 'DONT_ACCEPT_BLANKLINE', 'NORMALIZE_WHITESPACE', 'ELLIPSIS', 'SKIP', 'IGNORE_EXCEPTION_DETAIL', 'COMPARISON_FLAGS', 'REPORT_UDIFF', 'REPORT_CDIFF', 'REPORT_NDIFF', '...
true
true
1c0390970e9c2e3c5a19013675803e1b4341972f
476
py
Python
cmdbox/profiles/tests/test_views_profile.py
vitorfs/cmdbox
97806c02caf5947ec855286212e61db714e3fb02
[ "MIT" ]
1
2019-09-07T11:49:11.000Z
2019-09-07T11:49:11.000Z
cmdbox/profiles/tests/test_views_profile.py
vitorfs/cmdbox
97806c02caf5947ec855286212e61db714e3fb02
[ "MIT" ]
null
null
null
cmdbox/profiles/tests/test_views_profile.py
vitorfs/cmdbox
97806c02caf5947ec855286212e61db714e3fb02
[ "MIT" ]
2
2018-09-04T08:33:17.000Z
2020-09-18T20:26:46.000Z
from django.core.urlresolvers import reverse as r from django.contrib.auth.models import User from django.test import TestCase class ProfilesProfileTests(TestCase): def setUp(self): self.user = User.objects.create_user('john', 'john@doe.com', '123') self.client.login(username='john', password='123...
34
75
0.701681
from django.core.urlresolvers import reverse as r from django.contrib.auth.models import User from django.test import TestCase class ProfilesProfileTests(TestCase): def setUp(self): self.user = User.objects.create_user('john', 'john@doe.com', '123') self.client.login(username='john', password='123...
true
true
1c0390ec45d44f7b5735c73a6bbdfa37e305e3e7
4,111
py
Python
code/settings.py
fatemehghaffari/PrisonersDilemma
097d9dd8338ec35848fadd1e0449015d49b7390d
[ "MIT" ]
null
null
null
code/settings.py
fatemehghaffari/PrisonersDilemma
097d9dd8338ec35848fadd1e0449015d49b7390d
[ "MIT" ]
null
null
null
code/settings.py
fatemehghaffari/PrisonersDilemma
097d9dd8338ec35848fadd1e0449015d49b7390d
[ "MIT" ]
null
null
null
import axelrod as axl from axelrod.action import Action # Filter to extract all deterministic and memory-one strategies filterset = { 'stochastic': False, # 'memory_depth': 1 'min_memory_depth': 0, 'max_memory_depth': 1 } strategies = axl.filtered_strategies(filterset) # Reduce ...
54.813333
168
0.702019
import axelrod as axl from axelrod.action import Action filterset = { 'stochastic': False, 'min_memory_depth': 0, 'max_memory_depth': 1 } strategies = axl.filtered_strategies(filterset) one_mem_players = [s() for s in strategies] ...
true
true
1c03912cb810623748082bb78c38e6de4b4e9ad5
1,170
py
Python
1-100/24.SwapNodesInPairs.py
Arrackisarookie/leetcode
2e98c81d50a6b4ae0373908fbf9fe2e2c89f43a3
[ "MIT" ]
null
null
null
1-100/24.SwapNodesInPairs.py
Arrackisarookie/leetcode
2e98c81d50a6b4ae0373908fbf9fe2e2c89f43a3
[ "MIT" ]
null
null
null
1-100/24.SwapNodesInPairs.py
Arrackisarookie/leetcode
2e98c81d50a6b4ae0373908fbf9fe2e2c89f43a3
[ "MIT" ]
null
null
null
# # 24. Swap Nodes in Pairs # # Given a linked list, swap every two adjacent nodes and return its head. # # You may not modify the values in the list's nodes, only nodes itself may be # changed. # # Example: # Given 1 -> 2 -> 3 -> 4, you should return the list as 2 -> 1 -> 4 -> 3. # class ListNode(object): de...
22.5
77
0.538462
# changed. # # Example: # Given 1 -> 2 -> 3 -> 4, you should return the list as 2 -> 1 -> 4 -> 3. # class ListNode(object): def __init__(self, x): self.val = x self.next = None class Solution(object): # 迭代 def swapPairs(self, head): prefix = ListNode(0) prefix.next = ...
true
true
1c03922582fda3bca52188acee1f229656a4f852
8,568
py
Python
ax/storage/json_store/registry.py
isabella232/Ax
051054c6f21617937fc263af174773fa55c37818
[ "MIT" ]
null
null
null
ax/storage/json_store/registry.py
isabella232/Ax
051054c6f21617937fc263af174773fa55c37818
[ "MIT" ]
1
2021-04-19T09:51:23.000Z
2021-04-19T09:51:23.000Z
ax/storage/json_store/registry.py
isabella232/Ax
051054c6f21617937fc263af174773fa55c37818
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Any, Callable, Dict, Type from ax.benchmark.benchmark_problem import BenchmarkProblem, SimpleBenchm...
38.945455
87
0.797619
from typing import Any, Callable, Dict, Type from ax.benchmark.benchmark_problem import BenchmarkProblem, SimpleBenchmarkProblem from ax.benchmark.benchmark_result import BenchmarkResult from ax.core import ObservationFeatures from ax.core.arm import Arm from ax.core.base_trial import TrialStatus from ax.core.batch_t...
true
true
1c0393102e0d47b7214d547c4d61ae6ae5f1d8b1
1,187
py
Python
aws_xray_sdk/core/utils/conversion.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
294
2017-10-10T19:01:04.000Z
2022-03-18T15:52:19.000Z
aws_xray_sdk/core/utils/conversion.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
285
2017-10-20T09:27:21.000Z
2022-03-29T15:33:45.000Z
aws_xray_sdk/core/utils/conversion.py
musicinmybrain/aws-xray-sdk-python
b8e59423f1891351ceb1a0bd585603e0cd46c74c
[ "Apache-2.0" ]
134
2017-10-11T13:55:17.000Z
2022-03-23T07:21:17.000Z
import logging log = logging.getLogger(__name__) def metadata_to_dict(obj): """ Convert object to dict with all serializable properties like: dict, list, set, tuple, str, bool, int, float, type, object, etc. """ try: if isinstance(obj, dict): metadata = {} for key, ...
32.972222
69
0.556866
import logging log = logging.getLogger(__name__) def metadata_to_dict(obj): try: if isinstance(obj, dict): metadata = {} for key, value in obj.items(): metadata[key] = metadata_to_dict(value) return metadata elif isinstance(obj, type): ...
true
true
1c039455bbbcd937f9988cd0b91e7a7b60007625
24,829
py
Python
test/functional/test_framework/test_framework.py
tradecraftio/tradecraft
a014fea4d4656df67aef19e379f10322386cf6f8
[ "MIT" ]
10
2019-03-08T04:10:37.000Z
2021-08-20T11:55:14.000Z
test/functional/test_framework/test_framework.py
tradecraftio/tradecraft
a014fea4d4656df67aef19e379f10322386cf6f8
[ "MIT" ]
69
2018-11-09T20:29:29.000Z
2021-10-05T00:08:36.000Z
test/functional/test_framework/test_framework.py
tradecraftio/tradecraft
a014fea4d4656df67aef19e379f10322386cf6f8
[ "MIT" ]
7
2019-01-21T06:00:18.000Z
2021-12-19T16:18:00.000Z
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Copyright (c) 2010-2021 The Freicoin Developers # # This program is free software: you can redistribute it and/or modify it under # the terms of version 3 of the GNU Affero General Public License as published # by the Free Software Foundatio...
42.298126
312
0.627532
import configparser from enum import Enum import logging import argparse import os import pdb import shutil import sys import tempfile import time from .authproxy import JSONRPCException from . import coverage from .test_node import TestNode from .mininode import NetworkThread from .util import ( MAX_NODES, P...
true
true
1c0395400408658aeb6303a72ed65d8e5c7e3c5c
64
py
Python
8_kyu/is_n_divisible_by_x_and_y.py
nik4nd/codewars
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
[ "MIT" ]
null
null
null
8_kyu/is_n_divisible_by_x_and_y.py
nik4nd/codewars
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
[ "MIT" ]
null
null
null
8_kyu/is_n_divisible_by_x_and_y.py
nik4nd/codewars
efae95f1f9fbd5f31fc62b1b4f5a7d1ee511ced0
[ "MIT" ]
null
null
null
def is_divisible(n, x, y): return n % x == 0 and n % y == 0
21.333333
36
0.515625
def is_divisible(n, x, y): return n % x == 0 and n % y == 0
true
true
1c039553f5637c3ae0721bc20d356c028cb2120a
1,890
py
Python
scipy/special/utils/datafunc.py
sargas/scipy
3dcb7b2d5da7fcd9529137aa96b7a771cd47f111
[ "BSD-3-Clause" ]
null
null
null
scipy/special/utils/datafunc.py
sargas/scipy
3dcb7b2d5da7fcd9529137aa96b7a771cd47f111
[ "BSD-3-Clause" ]
null
null
null
scipy/special/utils/datafunc.py
sargas/scipy
3dcb7b2d5da7fcd9529137aa96b7a771cd47f111
[ "BSD-3-Clause" ]
null
null
null
from __future__ import division, print_function, absolute_import import csv import numpy as np def parse_txt_data(filename): f = open(filename) try: reader = csv.reader(f, delimiter=',') data = [] for row in reader: data.append(list(map(float, row))) nc = len(data[...
28.208955
82
0.518519
from __future__ import division, print_function, absolute_import import csv import numpy as np def parse_txt_data(filename): f = open(filename) try: reader = csv.reader(f, delimiter=',') data = [] for row in reader: data.append(list(map(float, row))) nc = len(data[...
true
true
1c03978138521f679f23131951290d29c23e3fe1
11,586
py
Python
sdk/python/pulumi_azure_nextgen/network/v20190201/get_vpn_connection.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20190201/get_vpn_connection.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20190201/get_vpn_connection.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
41.676259
421
0.686777
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetVpnConnectionResult', 'AwaitableGetVpnConnectionResult', 'get_vpn_connection', ] @pulumi.output_type class GetVpnConnect...
true
true
1c039822a90e42ed4685f9581e8724730ea7b099
3,427
py
Python
GCL/models/samplers.py
lem0nle/PyGCL
340b0201a5edf4236fef4c96b958ff373ceb7f28
[ "Apache-2.0" ]
361
2021-07-09T15:15:23.000Z
2022-03-30T07:08:10.000Z
GCL/models/samplers.py
lem0nle/PyGCL
340b0201a5edf4236fef4c96b958ff373ceb7f28
[ "Apache-2.0" ]
25
2021-08-21T11:06:26.000Z
2022-03-29T02:51:56.000Z
GCL/models/samplers.py
lem0nle/PyGCL
340b0201a5edf4236fef4c96b958ff373ceb7f28
[ "Apache-2.0" ]
45
2021-08-07T02:59:45.000Z
2022-03-29T05:07:17.000Z
import torch from abc import ABC, abstractmethod from torch_scatter import scatter class Sampler(ABC): def __init__(self, intraview_negs=False): self.intraview_negs = intraview_negs def __call__(self, anchor, sample, *args, **kwargs): ret = self.sample(anchor, sample, *args, **kwargs) ...
41.792683
107
0.621827
import torch from abc import ABC, abstractmethod from torch_scatter import scatter class Sampler(ABC): def __init__(self, intraview_negs=False): self.intraview_negs = intraview_negs def __call__(self, anchor, sample, *args, **kwargs): ret = self.sample(anchor, sample, *args, **kwargs) ...
true
true
1c0398ed1f5aefd4f62d41a449fd150521a10b58
1,035
py
Python
setup.py
beet-aizu/online-judge-tools
989ed65ae45bfe3153b726da1e80cf34d5dd88fc
[ "MIT" ]
2
2020-04-28T14:02:52.000Z
2020-04-28T14:02:54.000Z
setup.py
beet-aizu/online-judge-tools
989ed65ae45bfe3153b726da1e80cf34d5dd88fc
[ "MIT" ]
null
null
null
setup.py
beet-aizu/online-judge-tools
989ed65ae45bfe3153b726da1e80cf34d5dd88fc
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import imp from setuptools import find_packages, setup def load_module(module_path): path = None for name in module_path.split('.'): file, path, description = imp.find_module(name, path) path = [path] return imp.load_module(name, file, path[0], description) versio...
24.642857
61
0.622222
import imp from setuptools import find_packages, setup def load_module(module_path): path = None for name in module_path.split('.'): file, path, description = imp.find_module(name, path) path = [path] return imp.load_module(name, file, path[0], description) version = load_module('online...
true
true
1c0399590586398c044549003d323fd852373222
13,342
py
Python
source/rttov_test/profile-datasets-py/div83/025.py
bucricket/projectMAScorrection
89489026c8e247ec7c364e537798e766331fe569
[ "BSD-3-Clause" ]
null
null
null
source/rttov_test/profile-datasets-py/div83/025.py
bucricket/projectMAScorrection
89489026c8e247ec7c364e537798e766331fe569
[ "BSD-3-Clause" ]
1
2022-03-12T12:19:59.000Z
2022-03-12T12:19:59.000Z
source/rttov_test/profile-datasets-py/div83/025.py
bucricket/projectMAScorrection
89489026c8e247ec7c364e537798e766331fe569
[ "BSD-3-Clause" ]
null
null
null
""" Profile ../profile-datasets-py/div83/025.py file automaticaly created by prof_gen.py script """ self["ID"] = "../profile-datasets-py/div83/025.py" self["Q"] = numpy.array([ 2.52279400e+00, 3.28307900e+00, 4.66795800e+00, 5.96718400e+00, 6.39052900e+00, 6.35898000e+00, 6.2348...
57.508621
92
0.56918
self["ID"] = "../profile-datasets-py/div83/025.py" self["Q"] = numpy.array([ 2.52279400e+00, 3.28307900e+00, 4.66795800e+00, 5.96718400e+00, 6.39052900e+00, 6.35898000e+00, 6.23483100e+00, 5.97905400e+00, 5.62395800e+00, 5.26674200e+00, 4.97915500e+00, 4.76501700e+00, ...
true
true
1c039ac3da4870aeef9b2f4c3e98f3cd56d41503
926
py
Python
paradox/loader.py
safinsingh/ParadoxSE
12eb1eb07d1115b3c5c30e4062d04177cffce993
[ "MIT" ]
1
2020-06-14T06:24:08.000Z
2020-06-14T06:24:08.000Z
paradox/loader.py
safinsingh/ParadoxSE
12eb1eb07d1115b3c5c30e4062d04177cffce993
[ "MIT" ]
null
null
null
paradox/loader.py
safinsingh/ParadoxSE
12eb1eb07d1115b3c5c30e4062d04177cffce993
[ "MIT" ]
null
null
null
import yaml import os class Loader(): def __init__(self, file, production): """Initialization function for loader Args: file (string): Name of the file to read configuration from production (bool): Whether to build for production """ self.file = os.path.joi...
28.060606
77
0.555076
import yaml import os class Loader(): def __init__(self, file, production): self.file = os.path.join(os.path.dirname(__file__), "..", file) self.production = False def load(self): if not self.production: with open(self.file) as f: data = yaml.safe_load(f, ...
true
true
1c039caca7a43103c86c2f64488e6ed55e3b2208
3,436
py
Python
ansible/venv/lib/python2.7/site-packages/ansible/modules/network/check_point/checkpoint_session.py
gvashchenkolineate/gvashchenkolineate_infra_trytravis
0fb18850afe0d8609693ba4b23f29c7cda17d97f
[ "MIT" ]
17
2017-06-07T23:15:01.000Z
2021-08-30T14:32:36.000Z
ansible/ansible/modules/network/checkpoint/checkpoint_session.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
9
2017-06-25T03:31:52.000Z
2021-05-17T23:43:12.000Z
ansible/ansible/modules/network/checkpoint/checkpoint_session.py
SergeyCherepanov/ansible
875711cd2fd6b783c812241c2ed7a954bf6f670f
[ "MIT" ]
3
2018-05-26T21:31:22.000Z
2019-09-28T17:00:45.000Z
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
29.118644
109
0.696158
from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'network'} DOCUMENTATION = """ --- module: checkpoint_session short_description: Manages session obje...
true
true
1c039d2db00e690ad96ed79cb46b395c91108d76
2,514
py
Python
rootpy/interactive/canvas_events.py
masonproffitt/rootpy
3926935e1f2100d8ba68070c2ab44055d4800f73
[ "BSD-3-Clause" ]
146
2015-01-04T15:16:44.000Z
2022-01-27T11:29:31.000Z
rootpy/interactive/canvas_events.py
masonproffitt/rootpy
3926935e1f2100d8ba68070c2ab44055d4800f73
[ "BSD-3-Clause" ]
143
2015-01-07T00:20:42.000Z
2021-11-04T07:48:26.000Z
rootpy/interactive/canvas_events.py
masonproffitt/rootpy
3926935e1f2100d8ba68070c2ab44055d4800f73
[ "BSD-3-Clause" ]
56
2015-01-30T11:11:07.000Z
2022-03-28T09:42:06.000Z
from __future__ import absolute_import import ROOT from .. import compiled as C __all__ = [ 'close_on_esc_or_middlemouse', 'attach_event_handler', ] C.register_code(""" #include <TPython.h> #include <TPyDispatcher.h> class TPyDispatcherProcessedEvent : public TPyDispatcher { public: TPyDispatcherProces...
33.078947
79
0.68576
from __future__ import absolute_import import ROOT from .. import compiled as C __all__ = [ 'close_on_esc_or_middlemouse', 'attach_event_handler', ] C.register_code(""" #include <TPython.h> #include <TPyDispatcher.h> class TPyDispatcherProcessedEvent : public TPyDispatcher { public: TPyDispatcherProces...
true
true
1c039e6a09ed887a76d72bf85421efc098bed755
448
py
Python
geom2d/point.py
9nnnice/python_training
c1f89965d96c9123a6db32b8e5d67343fc2c22d0
[ "Apache-2.0" ]
null
null
null
geom2d/point.py
9nnnice/python_training
c1f89965d96c9123a6db32b8e5d67343fc2c22d0
[ "Apache-2.0" ]
null
null
null
geom2d/point.py
9nnnice/python_training
c1f89965d96c9123a6db32b8e5d67343fc2c22d0
[ "Apache-2.0" ]
null
null
null
from math import sqrt class Point: def __init__(self, _x, _y): self.x = _x self.y = _y def distance(self, p2): dx = p2.x - self.x dy = p2.y - self.y return sqrt(dx*dx + dy*dy) def __eq__(self, other): return self.x == other.x and self.y == other.y def...
21.333333
54
0.53125
from math import sqrt class Point: def __init__(self, _x, _y): self.x = _x self.y = _y def distance(self, p2): dx = p2.x - self.x dy = p2.y - self.y return sqrt(dx*dx + dy*dy) def __eq__(self, other): return self.x == other.x and self.y == other.y def...
true
true
1c039f25cb4b8be3722d930769775833f4cd350c
1,152
py
Python
setup.py
megagonlabs/teddy
ee0103307f89c975e08b10a3a2b60f177c41e932
[ "Apache-2.0" ]
15
2020-01-13T07:39:27.000Z
2021-04-01T01:38:44.000Z
setup.py
megagonlabs/teddy
ee0103307f89c975e08b10a3a2b60f177c41e932
[ "Apache-2.0" ]
null
null
null
setup.py
megagonlabs/teddy
ee0103307f89c975e08b10a3a2b60f177c41e932
[ "Apache-2.0" ]
5
2020-01-16T05:28:42.000Z
2020-07-12T21:56:39.000Z
from setuptools import find_packages from setuptools import setup with open('README.md') as readme_file: readme = readme_file.read() requirements = [ 'Cython==0.29.13', 'Flask==1.1.1', 'flask-cors==3.0.8', 'gensim==3.8.0', 'lexrank==0.1.0', 'matplotlib==3.1.1', 'nltk==3.4.5', 'nose...
23.04
61
0.59809
from setuptools import find_packages from setuptools import setup with open('README.md') as readme_file: readme = readme_file.read() requirements = [ 'Cython==0.29.13', 'Flask==1.1.1', 'flask-cors==3.0.8', 'gensim==3.8.0', 'lexrank==0.1.0', 'matplotlib==3.1.1', 'nltk==3.4.5', 'nose...
true
true
1c039fa52ad49cc8ccc1733876bc185cf6a1f195
7,991
py
Python
flowserv/service/group/local.py
anrunw/flowserv-core-1
7116b7060aa68ab36bf08e6393be166dc5db955f
[ "MIT" ]
1
2020-02-13T18:57:53.000Z
2020-02-13T18:57:53.000Z
flowserv/service/group/local.py
anrunw/flowserv-core-1
7116b7060aa68ab36bf08e6393be166dc5db955f
[ "MIT" ]
46
2020-02-14T22:14:33.000Z
2021-06-10T21:17:49.000Z
flowserv/service/group/local.py
anrunw/flowserv-core-1
7116b7060aa68ab36bf08e6393be166dc5db955f
[ "MIT" ]
3
2021-05-06T15:22:29.000Z
2021-06-01T16:19:36.000Z
# This file is part of the Reproducible and Reusable Data Analysis Workflow # Server (flowServ). # # Copyright (C) 2019-2021 NYU. # # flowServ is free software; you can redistribute it and/or modify it under the # terms of the MIT License; see LICENSE file for more details. """The workflow user group API component pro...
38.791262
92
0.65799
from typing import Dict, List, Optional from flowserv.controller.base import WorkflowController from flowserv.model.auth import Auth from flowserv.model.group import WorkflowGroupManager from flowserv.model.parameter.base import Parameter from flowserv.model.run import RunManager from flowserv.model.workflow.manager...
true
true
1c039fb48bcf95f9b85b828e6684cb082f5ced73
10,750
py
Python
competition.py
Arctickirillas/Rubrication
35d2d7362aaf4776dcb28d13d7e07942ac8bad85
[ "MIT" ]
5
2015-09-03T09:47:27.000Z
2021-06-11T10:49:49.000Z
competition.py
Arctickirillas/Rubrication
35d2d7362aaf4776dcb28d13d7e07942ac8bad85
[ "MIT" ]
1
2020-07-01T10:15:39.000Z
2020-07-06T18:35:43.000Z
competition.py
Arctickirillas/Rubrication
35d2d7362aaf4776dcb28d13d7e07942ac8bad85
[ "MIT" ]
2
2020-07-01T09:18:49.000Z
2020-07-18T10:16:36.000Z
# coding: utf-8 __author__ = 'Kirill Rudakov' import read as r import quantify as q from nltk.stem.snowball import SnowballStemmer from nltk import word_tokenize from sklearn.feature_extraction.text import TfidfVectorizer from nltk.tokenize import TweetTokenizer from nltk.corpus import stopwords from sklearn import cr...
30.112045
160
0.610326
__author__ = 'Kirill Rudakov' import read as r import quantify as q from nltk.stem.snowball import SnowballStemmer from nltk import word_tokenize from sklearn.feature_extraction.text import TfidfVectorizer from nltk.tokenize import TweetTokenizer from nltk.corpus import stopwords from sklearn import cross_validation i...
true
true
1c03a01f2193edf50024913bc6f091efc23c5d28
2,083
py
Python
wishlist/importer.py
pigmonkey/django-wishlist
cc5e9e5b6bf222ebeae63944c9b30ad29eac4e36
[ "BSD-3-Clause" ]
9
2015-08-15T20:11:05.000Z
2021-09-05T09:45:42.000Z
wishlist/importer.py
pigmonkey/django-wishlist
cc5e9e5b6bf222ebeae63944c9b30ad29eac4e36
[ "BSD-3-Clause" ]
1
2016-10-08T14:53:58.000Z
2021-04-07T19:39:57.000Z
wishlist/importer.py
pigmonkey/django-wishlist
cc5e9e5b6bf222ebeae63944c9b30ad29eac4e36
[ "BSD-3-Clause" ]
1
2020-08-11T17:48:27.000Z
2020-08-11T17:48:27.000Z
from django.contrib.auth.decorators import permission_required from django.shortcuts import render_to_response from BeautifulSoup import BeautifulSoup from wishlist.models import Item from wishlist.views import scrape_price import urllib2 @permission_required('wishlist.add_item') def wishlistr(request, username): ...
31.560606
110
0.613538
from django.contrib.auth.decorators import permission_required from django.shortcuts import render_to_response from BeautifulSoup import BeautifulSoup from wishlist.models import Item from wishlist.views import scrape_price import urllib2 @permission_required('wishlist.add_item') def wishlistr(request, username): ...
true
true
1c03a02dd5831a31a5d97dcad63b8bfb32a82244
1,271
py
Python
2016/two.py
caipre/advent
c8485a5166acba03d31140a50eb671e7de7d3116
[ "MIT" ]
null
null
null
2016/two.py
caipre/advent
c8485a5166acba03d31140a50eb671e7de7d3116
[ "MIT" ]
null
null
null
2016/two.py
caipre/advent
c8485a5166acba03d31140a50eb671e7de7d3116
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 def standard(instructions, key=5): code = '' for line in instructions: for instr in line: if instr == 'U' and key > 3: key -= 3 elif instr == 'D' and key < 6: key += 3 elif instr == 'L' and key % 3 != 1: ...
31
79
0.442958
def standard(instructions, key=5): code = '' for line in instructions: for instr in line: if instr == 'U' and key > 3: key -= 3 elif instr == 'D' and key < 6: key += 3 elif instr == 'L' and key % 3 != 1: key -= 1 ...
true
true
1c03a0a475e96f8787dbaea5bc8b74532893206b
11,385
py
Python
spamhandling.py
Victor-VosMottor/SmokeDetector
199ce0cb658e41f5de81038332adcf8486df6208
[ "Apache-2.0", "MIT" ]
464
2015-01-03T05:57:08.000Z
2022-03-23T05:42:39.000Z
spamhandling.py
Victor-VosMottor/SmokeDetector
199ce0cb658e41f5de81038332adcf8486df6208
[ "Apache-2.0", "MIT" ]
6,210
2015-01-03T05:37:36.000Z
2022-03-31T09:31:45.000Z
spamhandling.py
Victor-VosMottor/SmokeDetector
199ce0cb658e41f5de81038332adcf8486df6208
[ "Apache-2.0", "MIT" ]
322
2015-01-14T05:13:06.000Z
2022-03-28T01:18:31.000Z
# coding=utf-8 import sys import random import findspam import datahandling import chatcommunicate from globalvars import GlobalVars from datetime import datetime, timedelta import regex import parsing import metasmoke import excepthook from classes import Post, PostParseError from helpers import log, escape_format fro...
48.446809
117
0.645674
import sys import random import findspam import datahandling import chatcommunicate from globalvars import GlobalVars from datetime import datetime, timedelta import regex import parsing import metasmoke import excepthook from classes import Post, PostParseError from helpers import log, escape_format from parsing impor...
true
true
1c03a0f08f0a1b972718798e4f803c20987e49a1
8,989
py
Python
tests/test_plotting.py
alejandroviegener/copy-test
c9b32380ce85ec11488092d9f692c63ce51bd9eb
[ "Apache-2.0" ]
22
2020-12-29T18:11:43.000Z
2022-03-30T23:16:53.000Z
tests/test_plotting.py
alejandroviegener/copy-test
c9b32380ce85ec11488092d9f692c63ce51bd9eb
[ "Apache-2.0" ]
3
2021-10-15T21:51:53.000Z
2022-02-23T18:19:26.000Z
tests/test_plotting.py
alejandroviegener/copy-test
c9b32380ce85ec11488092d9f692c63ce51bd9eb
[ "Apache-2.0" ]
1
2022-02-17T01:01:27.000Z
2022-02-17T01:01:27.000Z
"""muttlib.plotting test suite. `muttlib` uses `pytest-mpl` to plots testing. To use, you simply need to mark the function where you want to compare images using @pytest.mark.mpl_image_compare, and make sure that the function returns a Matplotlib figure (or any figure object that has a savefig method): ```python imp...
43.635922
108
0.569919
from copy import deepcopy import numpy as np import pandas as pd import pytest from muttlib.plotting import plot from muttlib.plotting.constants import ( DAILY_TIME_GRANULARITY, HOURLY_TIME_GRANULARITY, PLOT_CONFIG, DS_COL, Y_COL, YHAT_COL, ) @pytest.fixture def sample_data_df(): ret...
true
true
1c03a0f5d665ef4116ae955fe35477ba0af7eac4
5,464
py
Python
orange3/Orange/tests/test_normalize.py
rgschmitz1/BioDepot-workflow-builder
f74d904eeaf91ec52ec9b703d9fb38e9064e5a66
[ "MIT" ]
54
2017-01-08T17:21:49.000Z
2021-11-02T08:46:07.000Z
orange3/Orange/tests/test_normalize.py
Synthia-3/BioDepot-workflow-builder
4ee93abe2d79465755e82a145af3b6a6e1e79fd4
[ "MIT" ]
22
2017-03-28T06:03:14.000Z
2021-07-28T05:43:55.000Z
orange3/Orange/tests/test_normalize.py
Synthia-3/BioDepot-workflow-builder
4ee93abe2d79465755e82a145af3b6a6e1e79fd4
[ "MIT" ]
21
2017-01-26T21:12:09.000Z
2022-01-31T21:34:59.000Z
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring import unittest import numpy as np import scipy.sparse as sp from Orange.data import Table, Domain, ContinuousVariable from Orange.preprocess import Normalize from Orange.tests import test_filename class TestNormaliz...
38.478873
88
0.526171
import unittest import numpy as np import scipy.sparse as sp from Orange.data import Table, Domain, ContinuousVariable from Orange.preprocess import Normalize from Orange.tests import test_filename class TestNormalizer(unittest.TestCase): def compare_tables(self, dataNorm, solution): for i in range(len...
true
true
1c03a19455cd9de5d5f8efba9c7bf1287827a716
3,824
py
Python
format_clipboard.py
cclauss/flake8_for_InferSent
3660d9297b42b20bf076300ec92a8e6f34ca4aab
[ "Apache-2.0" ]
21
2017-07-10T12:39:53.000Z
2022-03-28T07:05:18.000Z
format_clipboard.py
cclauss/flake8_for_InferSent
3660d9297b42b20bf076300ec92a8e6f34ca4aab
[ "Apache-2.0" ]
null
null
null
format_clipboard.py
cclauss/flake8_for_InferSent
3660d9297b42b20bf076300ec92a8e6f34ca4aab
[ "Apache-2.0" ]
3
2019-10-03T01:40:37.000Z
2021-12-20T11:07:57.000Z
#!/usr/bin/env python3 # # from https://github.com/cclauss/itinerant-tester # # Copy the Travis CI output from the macOS Clipboard # Clean up the test output based on simple readability rules # Pastes the resulting text back onto macOS Clipboard to be pasted into a pull request import subprocess EXPLANATION = """ htt...
43.954023
361
0.696653
import subprocess EXPLANATION = """ https://flake8.pycqa.org/en/latest/user/error-codes.html On the flake8 test selection, this PR does _not_ focus on "_style violations_" (the majority of flake8 error codes that [__psf/black__](https://github.com/psf/black) can autocorrect). Instead these tests are focus on runtim...
true
true
1c03a26635e8fe34173a2c09bd2be80139f5baee
28,648
py
Python
bifacial_radiance/HPCScripts/simulate_improvedArray_Oct2127.py
kperrynrel/bifacial_radiance
cf5ae46b4ef93990e3e1619956a186376cb4fd8a
[ "BSD-3-Clause" ]
null
null
null
bifacial_radiance/HPCScripts/simulate_improvedArray_Oct2127.py
kperrynrel/bifacial_radiance
cf5ae46b4ef93990e3e1619956a186376cb4fd8a
[ "BSD-3-Clause" ]
null
null
null
bifacial_radiance/HPCScripts/simulate_improvedArray_Oct2127.py
kperrynrel/bifacial_radiance
cf5ae46b4ef93990e3e1619956a186376cb4fd8a
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import os import pandas as pd import time import math from itertools import chain from itertools import product from bifacial_radiance import AnalysisObj, load, MetObj, RadianceObj from bifacial_radiance.spectral_utils import (spectral_property, spectral...
45.910256
218
0.639032
import numpy as np import os import pandas as pd import time import math from itertools import chain from itertools import product from bifacial_radiance import AnalysisObj, load, MetObj, RadianceObj from bifacial_radiance.spectral_utils import (spectral_property, spectral...
true
true
1c03a36b21b90e16d5c9d2be0c77df79cb173652
8,021
py
Python
src/dispatch/report/flows.py
WouldYouKindly/dispatch
c3e8467fe36e0bd78f45a3d3292ea36384981468
[ "Apache-2.0" ]
1
2020-11-19T08:37:05.000Z
2020-11-19T08:37:05.000Z
src/dispatch/report/flows.py
segmond/dispatch
ab69505334d4689537c7ea0c4d66f6438a6c33b5
[ "Apache-2.0" ]
null
null
null
src/dispatch/report/flows.py
segmond/dispatch
ab69505334d4689537c7ea0c4d66f6438a6c33b5
[ "Apache-2.0" ]
null
null
null
import logging from datetime import date from dispatch.config import INCIDENT_RESOURCE_EXECUTIVE_REPORT_DOCUMENT from dispatch.conversation.messaging import send_feedack_to_user from dispatch.decorators import background_task from dispatch.document import service as document_service from dispatch.document.models impo...
35.96861
144
0.734572
import logging from datetime import date from dispatch.config import INCIDENT_RESOURCE_EXECUTIVE_REPORT_DOCUMENT from dispatch.conversation.messaging import send_feedack_to_user from dispatch.decorators import background_task from dispatch.document import service as document_service from dispatch.document.models impo...
true
true
1c03a3b8ca7e2c9f2d74b9e72a48ccf91fd8bcfc
1,996
py
Python
wse_investor/_financial_indicator.py
meeetju/wse_investor
6ef18b551179c976277ec72deea4af5cd7321381
[ "MIT" ]
null
null
null
wse_investor/_financial_indicator.py
meeetju/wse_investor
6ef18b551179c976277ec72deea4af5cd7321381
[ "MIT" ]
null
null
null
wse_investor/_financial_indicator.py
meeetju/wse_investor
6ef18b551179c976277ec72deea4af5cd7321381
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import logging import requests from wse_investor._company import Company from wse_investor._requirement import Requirement logging.basicConfig(level=logging.INFO) logger = logging.getLogger() class FinancialIndicators: def __init__(self, companies: [Company], requirement: Requirem...
36.962963
99
0.657315
from bs4 import BeautifulSoup import logging import requests from wse_investor._company import Company from wse_investor._requirement import Requirement logging.basicConfig(level=logging.INFO) logger = logging.getLogger() class FinancialIndicators: def __init__(self, companies: [Company], requirement: Requirem...
true
true
1c03a3e6f63d26f56fbab5d0f0a676e54d1e5daf
15,700
py
Python
dvc/objects/db.py
tirkarthi/dvc
61699d1d669159a320f5bb3022cefebf8fe7b9f5
[ "Apache-2.0" ]
null
null
null
dvc/objects/db.py
tirkarthi/dvc
61699d1d669159a320f5bb3022cefebf8fe7b9f5
[ "Apache-2.0" ]
null
null
null
dvc/objects/db.py
tirkarthi/dvc
61699d1d669159a320f5bb3022cefebf8fe7b9f5
[ "Apache-2.0" ]
null
null
null
import itertools import logging from concurrent.futures import ThreadPoolExecutor from contextlib import suppress from copy import copy from functools import partial from typing import TYPE_CHECKING, Optional from dvc.objects.errors import ObjectDBPermissionError, ObjectFormatError from dvc.objects.file import HashFil...
35.600907
79
0.605987
import itertools import logging from concurrent.futures import ThreadPoolExecutor from contextlib import suppress from copy import copy from functools import partial from typing import TYPE_CHECKING, Optional from dvc.objects.errors import ObjectDBPermissionError, ObjectFormatError from dvc.objects.file import HashFil...
true
true
1c03a4e82ea8b5dd908aaf2032a9063f0a17742a
3,322
py
Python
checklist/migrations/0018_followchecklist_notification.py
cagandhi/Checklist-Django
c8edf1d8f821900a71f36abd34a76663d8d8f7da
[ "Apache-2.0" ]
3
2021-07-02T07:35:19.000Z
2022-01-14T11:14:14.000Z
checklist/migrations/0018_followchecklist_notification.py
cagandhi/Checklist-Django
c8edf1d8f821900a71f36abd34a76663d8d8f7da
[ "Apache-2.0" ]
57
2021-01-31T23:39:57.000Z
2022-03-12T00:47:23.000Z
checklist/migrations/0018_followchecklist_notification.py
cagandhi/Checklist-Django
c8edf1d8f821900a71f36abd34a76663d8d8f7da
[ "Apache-2.0" ]
3
2021-08-29T21:46:54.000Z
2022-03-24T13:10:00.000Z
# Generated by Django 3.0.4 on 2021-02-02 21:12 import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
32.252427
76
0.368754
import django.db.models.deletion import django.utils.timezone from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("checklist", "0017_remove_item_priority"), ...
true
true
1c03a53ad08dec8d659dc6c2cec2d09ca5d1588e
2,792
py
Python
tests/test_expr.py
jnothman/mwlib
bb794c3e852104abbed00188e3385d672f69c057
[ "Unlicense" ]
1
2016-12-08T02:33:33.000Z
2016-12-08T02:33:33.000Z
tests/test_expr.py
jnothman/mwlib
bb794c3e852104abbed00188e3385d672f69c057
[ "Unlicense" ]
null
null
null
tests/test_expr.py
jnothman/mwlib
bb794c3e852104abbed00188e3385d672f69c057
[ "Unlicense" ]
null
null
null
#! /usr/bin/env py.test # -*- coding: utf-8 -*- import math from mwlib.expander import expandstr from mwlib import expr def ee(s, expected=None): s = expandstr("{{#expr:%s}}" % (s,)) if isinstance(expected, (float, int, long)): assert math.fabs(float(s) - expected) < 1e-5 elif expected is not Non...
17.559748
94
0.56053
import math from mwlib.expander import expandstr from mwlib import expr def ee(s, expected=None): s = expandstr("{{#expr:%s}}" % (s,)) if isinstance(expected, (float, int, long)): assert math.fabs(float(s) - expected) < 1e-5 elif expected is not None: assert s == expected, "expected %r, g...
false
true
1c03a599aab4cf2bf4042c90aec4fa9e84cd553f
952
py
Python
Problem9/pythagorean_triplet.py
Dumbaz/ProjectEuler
1f3ce450d4e5b79e87be52c9739baf7d26a989d0
[ "MIT" ]
null
null
null
Problem9/pythagorean_triplet.py
Dumbaz/ProjectEuler
1f3ce450d4e5b79e87be52c9739baf7d26a989d0
[ "MIT" ]
null
null
null
Problem9/pythagorean_triplet.py
Dumbaz/ProjectEuler
1f3ce450d4e5b79e87be52c9739baf7d26a989d0
[ "MIT" ]
null
null
null
import math # a^2 + b^2 = c^2 # a < b < c #one such triplet with a+b+c = 1000 # a range 1-995 # b range 2-996 # c range 3-997 def is_pythagorean_triplet(var_a, var_b, var_c): return var_a ** 2 + var_b ** 2 == var_c ** 2 def is_sum_1000(var_a, var_b, var_c): return var_a + var_b + var_c == 1000 def is_bo...
19.833333
89
0.614496
import math def is_pythagorean_triplet(var_a, var_b, var_c): return var_a ** 2 + var_b ** 2 == var_c ** 2 def is_sum_1000(var_a, var_b, var_c): return var_a + var_b + var_c == 1000 def is_both(var_a, var_b, var_c): return is_pythagorean_triplet(var_a, var_b, var_c) & is_sum_1000(var_a, var_b, var_c)...
true
true
1c03a60e95b18cef98cf935f62178804420ae4aa
3,354
py
Python
applications/ExaquteSandboxApplication/python_scripts/GenerateCN.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/ExaquteSandboxApplication/python_scripts/GenerateCN.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/ExaquteSandboxApplication/python_scripts/GenerateCN.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
from math import * import numpy as np import scipy.fftpack as fft class GenerateCN: def __init__(self, corrlen, grid_dimensions=None, grid_shape=None, grid_level=4, ndim=2, const=1e2, **kwargs): self.corrlen = corrlen self.ndim = ndim self.const=const if grid_dimensions is None: ...
30.490909
133
0.53071
from math import * import numpy as np import scipy.fftpack as fft class GenerateCN: def __init__(self, corrlen, grid_dimensions=None, grid_shape=None, grid_level=4, ndim=2, const=1e2, **kwargs): self.corrlen = corrlen self.ndim = ndim self.const=const if grid_dimensions is None: ...
true
true
1c03a6c1ff9cca92bff80f041eaf5e45ded626ce
7,824
py
Python
docs/conf.py
zelgerj/appserver-io.fastcgi
c4d4d0cd1b29161527254fa81c87ce807516c98a
[ "MIT" ]
null
null
null
docs/conf.py
zelgerj/appserver-io.fastcgi
c4d4d0cd1b29161527254fa81c87ce807516c98a
[ "MIT" ]
null
null
null
docs/conf.py
zelgerj/appserver-io.fastcgi
c4d4d0cd1b29161527254fa81c87ce807516c98a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Crunch/FastCGI documentation build configuration file, created by # sphinx-quickstart on Wed Sep 19 22:43:24 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this...
32.065574
80
0.715491
import sys, os extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'Crunch/FastCGI' copyright = '2012, Sebastian Krebs' # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = '1.0' #...
true
true
1c03a72b07d8dd6b6f0656cedc988f41386978b1
5,163
py
Python
python/popart.ir/python_files/ops/matmul.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
null
null
null
python/popart.ir/python_files/ops/matmul.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
null
null
null
python/popart.ir/python_files/ops/matmul.py
gglin001/popart
3225214343f6d98550b6620e809a3544e8bcbfc6
[ "MIT" ]
null
null
null
# Copyright (c) 2021 Graphcore Ltd. All rights reserved. from typing import Optional from typing_extensions import Literal from enum import Enum import popart._internal.ir as _ir from popart.ir.context import get_current_context from popart.ir.tensor import Tensor from popart.ir import dtypes from .utils import check_...
37.143885
104
0.687391
from typing import Optional from typing_extensions import Literal from enum import Enum import popart._internal.ir as _ir from popart.ir.context import get_current_context from popart.ir.tensor import Tensor from popart.ir import dtypes from .utils import check_in_graph, convert_optional_float __all__ = ["matmul", "S...
true
true
1c03a7d364df31fc7e3707c7ffd1ae0ac0c76d4b
984
py
Python
groundstation/ROV/OCR/old-studies/atahan.py
iturov/rov2018
ca1949806d105a2caddf2cf7a1361e2d3f6a1246
[ "MIT" ]
3
2018-01-26T14:00:50.000Z
2018-08-08T06:44:21.000Z
groundstation/ROV/OCR/old-studies/atahan.py
iturov/rov2018
ca1949806d105a2caddf2cf7a1361e2d3f6a1246
[ "MIT" ]
null
null
null
groundstation/ROV/OCR/old-studies/atahan.py
iturov/rov2018
ca1949806d105a2caddf2cf7a1361e2d3f6a1246
[ "MIT" ]
2
2018-08-08T06:44:23.000Z
2020-10-24T11:36:33.000Z
import pyscreenshot as ImageGrab import cv2 import numpy as np import pytesseract from PIL import Image src_path = "C:\\Users\\Public\\ROV\\OCR\\" if __name__ == "__main__": # fullscreen im=ImageGrab.grab() im.show() im.save('init.png') text=[] a = pytesseract.image_to_string(Image.open('init.png')) t...
22.363636
92
0.704268
import pyscreenshot as ImageGrab import cv2 import numpy as np import pytesseract from PIL import Image src_path = "C:\\Users\\Public\\ROV\\OCR\\" if __name__ == "__main__": im=ImageGrab.grab() im.show() im.save('init.png') text=[] a = pytesseract.image_to_string(Image.open('init.png')) text.append(a)...
true
true
1c03a817c3a76a7788c2e981f261238c56e3793e
2,977
py
Python
pypy/module/_md5/test/test_md5.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
333
2015-08-08T18:03:38.000Z
2022-03-22T18:13:12.000Z
pypy/module/_md5/test/test_md5.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
7
2020-02-16T16:49:05.000Z
2021-11-26T09:00:56.000Z
pypy/module/_md5/test/test_md5.py
nanjekyejoannah/pypy
e80079fe13c29eda7b2a6b4cd4557051f975a2d9
[ "Apache-2.0", "OpenSSL" ]
55
2015-08-16T02:41:30.000Z
2022-03-20T20:33:35.000Z
""" Tests for the md5 module implemented at interp-level in pypy/module/md5. """ class AppTestMD5(object): spaceconfig = { 'usemodules': ['_md5', 'binascii', 'time', 'struct'], } def setup_class(cls): cls.w_md5 = cls.space.appexec([], """(): import md5 return md5 ...
29.77
76
0.548875
class AppTestMD5(object): spaceconfig = { 'usemodules': ['_md5', 'binascii', 'time', 'struct'], } def setup_class(cls): cls.w_md5 = cls.space.appexec([], """(): import md5 return md5 """) def test_digest_size(self): import sys assert se...
true
true
1c03a8754f226701a3f4cac2cc11f630c0e6bec7
1,611
py
Python
tests/terraform/checks/resource/aws/test_NetworkACLUnrestrictedIngress22.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
null
null
null
tests/terraform/checks/resource/aws/test_NetworkACLUnrestrictedIngress22.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
null
null
null
tests/terraform/checks/resource/aws/test_NetworkACLUnrestrictedIngress22.py
jamesholland-uk/checkov
d73fd4bd7096d48ab3434a92a177bcc55605460a
[ "Apache-2.0" ]
null
null
null
import unittest from pathlib import Path from checkov.runner_filter import RunnerFilter from checkov.terraform.checks.resource.aws.NetworkACLUnrestrictedIngress22 import check from checkov.terraform.runner import Runner class TestNetworkACLUnrestrictedIngress22(unittest.TestCase): def test(self): # given...
32.877551
109
0.675978
import unittest from pathlib import Path from checkov.runner_filter import RunnerFilter from checkov.terraform.checks.resource.aws.NetworkACLUnrestrictedIngress22 import check from checkov.terraform.runner import Runner class TestNetworkACLUnrestrictedIngress22(unittest.TestCase): def test(self): ...
true
true
1c03a8fcc351123db989718aee8ac59ffffce4bd
1,698
py
Python
networks/layers/standard.py
ChengIC/ryan-sad
09a93245ae6917911bd0f9d39d533d825c23c259
[ "MIT" ]
null
null
null
networks/layers/standard.py
ChengIC/ryan-sad
09a93245ae6917911bd0f9d39d533d825c23c259
[ "MIT" ]
null
null
null
networks/layers/standard.py
ChengIC/ryan-sad
09a93245ae6917911bd0f9d39d533d825c23c259
[ "MIT" ]
null
null
null
import torch from torch.nn import Module from torch.nn import init from torch.nn.parameter import Parameter # Acknowledgements: https://github.com/wohlert/semi-supervised-pytorch class Standardize(Module): """ Applies (element-wise) standardization with trainable translation parameter μ and scale p...
32.037736
119
0.611896
import torch from torch.nn import Module from torch.nn import init from torch.nn.parameter import Parameter class Standardize(Module): __constants__ = ['mu'] def __init__(self, in_features, bias=True, eps=1e-6): super(Standardize, self).__init__() self.in_features = in_features ...
true
true
1c03aa47eb9ff0278e4031307364cfb63c8bd859
12,393
py
Python
applications/mobileblur/modules/newsblur.py
spiffytech/MobileBlur
f9d2469caa05f0fe5c05c2ec83d1480cf6b770d8
[ "BSD-3-Clause" ]
null
null
null
applications/mobileblur/modules/newsblur.py
spiffytech/MobileBlur
f9d2469caa05f0fe5c05c2ec83d1480cf6b770d8
[ "BSD-3-Clause" ]
null
null
null
applications/mobileblur/modules/newsblur.py
spiffytech/MobileBlur
f9d2469caa05f0fe5c05c2ec83d1480cf6b770d8
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python """newsblur.py - An API wrapper library for newsblur.com""" import simplejson import requests __author__ = 'Dananjaya Ramanayake <dananjaya86@gmail.com>, spiffytech <spiffytech@gmail.com>' __version__ = "1.0" nb_url = "http://www.newsblur.com/" class NewsblurException(IOError): pass class ...
28.888112
141
0.590414
import simplejson import requests __author__ = 'Dananjaya Ramanayake <dananjaya86@gmail.com>, spiffytech <spiffytech@gmail.com>' __version__ = "1.0" nb_url = "http://www.newsblur.com/" class NewsblurException(IOError): pass class NewsBlur(): def __init__(self): self.cookies = {} def _n...
true
true
1c03aa56aa083dd0b02c9cf74e539125f57faaf2
1,057
py
Python
scripts/inferKernel.py
Canti17/FirmAE
94071d0a244b7c0b6739d72a9bf5aaa0cf29db76
[ "MIT" ]
226
2020-11-06T09:04:12.000Z
2022-03-30T03:18:23.000Z
scripts/inferKernel.py
Canti17/FirmAE
94071d0a244b7c0b6739d72a9bf5aaa0cf29db76
[ "MIT" ]
38
2020-11-23T22:41:58.000Z
2022-03-19T13:01:02.000Z
scripts/inferKernel.py
Canti17/FirmAE
94071d0a244b7c0b6739d72a9bf5aaa0cf29db76
[ "MIT" ]
50
2020-11-23T02:32:28.000Z
2022-03-23T08:58:14.000Z
#!/usr/bin/env python3 import sys import os import subprocess IID = -1 def ParseInit(cmd, out): for item in cmd.split(' '): if item.find("init=/") != -1: out.write(item + "\n") def ParseCmd(): if not os.path.exists("scratch/" + IID + "/kernelCmd"): return with open("scratch/"...
30.2
101
0.478713
import sys import os import subprocess IID = -1 def ParseInit(cmd, out): for item in cmd.split(' '): if item.find("init=/") != -1: out.write(item + "\n") def ParseCmd(): if not os.path.exists("scratch/" + IID + "/kernelCmd"): return with open("scratch/" + IID + "/kernelCmd") ...
true
true
1c03aa8556e7b52c426b1c5396240f667ab5b732
3,302
py
Python
openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/tables.py
agaldemas/horizon
38c4fb7ea1f1d5a00a8e1fae0f7a864a7d09f1ab
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/tables.py
agaldemas/horizon
38c4fb7ea1f1d5a00a8e1fae0f7a864a7d09f1ab
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/data_processing/nodegroup_templates/tables.py
agaldemas/horizon
38c4fb7ea1f1d5a00a8e1fae0f7a864a7d09f1ab
[ "Apache-2.0" ]
null
null
null
# 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 # distributed under the...
33.353535
77
0.656269
import logging from django.template import defaultfilters as filters from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from horizon import tables from openstack_dashboard.api import sahara as saharaclient LOG = logging.getLogger(__name__) class CreateNodeg...
true
true
1c03ac49bc971555a7f4e284a8a0034d077e840c
6,688
py
Python
dmg/ecore/ecorePallete.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
dmg/ecore/ecorePallete.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
dmg/ecore/ecorePallete.py
Antolin1/DMG-Python
ba3942e13006e1a32f3fe9f1b29615311f667274
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 17 15:35:02 2021 @author: Jose Antonio """ from dmg.edits.pallete import Pallete import dmg.edits.editoperations as ed import networkx as nx dic_nodes_ecore = {'EClass': 0, 'EReference': 1, 'EAttribute': 2, ...
34.297436
87
0.646681
from dmg.edits.pallete import Pallete import dmg.edits.editoperations as ed import networkx as nx dic_nodes_ecore = {'EClass': 0, 'EReference': 1, 'EAttribute': 2, 'EPackage': 3, 'EDataType': 4, 'EEnum': 5, 'EEnumLit...
true
true
1c03ac9108255c8ee4295e6a03a92416cdda70ec
3,446
py
Python
bindings/python/ensmallen/datasets/string/neotomalepida.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
5
2021-02-17T00:44:45.000Z
2021-08-09T16:41:47.000Z
bindings/python/ensmallen/datasets/string/neotomalepida.py
AnacletoLAB/ensmallen_graph
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
18
2021-01-07T16:47:39.000Z
2021-08-12T21:51:32.000Z
bindings/python/ensmallen/datasets/string/neotomalepida.py
AnacletoLAB/ensmallen
b2c1b18fb1e5801712852bcc239f239e03076f09
[ "MIT" ]
3
2021-01-14T02:20:59.000Z
2021-08-04T19:09:52.000Z
""" This file offers the methods to automatically retrieve the graph Neotoma lepida. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string, title={STRING v11: protein--protein associa...
32.819048
223
0.675276
from typing import Dict from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph from ...ensmallen import Graph def NeotomaLepida( directed: bool = False, preprocess: bool = True, load_nodes: bool = True, verbose: int = 2, cache: bool = True, cache_path: str = "graphs/string", ...
true
true
1c03aca51071b1532739392ff455b77d32b85296
887
py
Python
python/conversion/pdf_to_plaintext.py
writecrow/crow_training
17324ce93608acf997c2880b587dd9483729b895
[ "MIT" ]
7
2018-02-27T15:24:10.000Z
2018-02-27T22:20:58.000Z
python/conversion/pdf_to_plaintext.py
writecrow/crow_training
17324ce93608acf997c2880b587dd9483729b895
[ "MIT" ]
11
2018-02-21T03:07:44.000Z
2018-02-27T22:33:29.000Z
python/conversion/pdf_to_plaintext.py
writecrow/crow_training
17324ce93608acf997c2880b587dd9483729b895
[ "MIT" ]
null
null
null
from urllib import request import PyPDF2 from urllib.request import urlretrieve print(("This demonstrates extracting the text from a PDF using the PyPDF2 library").upper()) print(("We'll save the original file to poster.pdf and a plaintext version to poster_plain.txt").upper()) url = "http://writecrow.org/wp-content/...
27.71875
105
0.750846
from urllib import request import PyPDF2 from urllib.request import urlretrieve print(("This demonstrates extracting the text from a PDF using the PyPDF2 library").upper()) print(("We'll save the original file to poster.pdf and a plaintext version to poster_plain.txt").upper()) url = "http://writecrow.org/wp-content/...
true
true
1c03add49dbf0c11214c58c566ffed1895bfbf01
2,171
py
Python
tests/integration/test_broken_part_during_merge/test.py
pdv-ru/ClickHouse
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
[ "Apache-2.0" ]
5
2019-07-29T02:09:56.000Z
2020-03-19T19:05:44.000Z
tests/integration/test_broken_part_during_merge/test.py
pdv-ru/ClickHouse
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
[ "Apache-2.0" ]
30
2021-10-01T00:08:14.000Z
2021-12-06T13:13:12.000Z
tests/integration/test_broken_part_during_merge/test.py
pdv-ru/ClickHouse
0ff975bcf3008fa6c6373cbdfed16328e3863ec5
[ "Apache-2.0" ]
1
2021-06-03T10:40:43.000Z
2021-06-03T10:40:43.000Z
import pytest from helpers.cluster import ClickHouseCluster from multiprocessing.dummy import Pool from helpers.network import PartitionManager from helpers.corrupt_part_data_on_disk import corrupt_part_data_on_disk import time cluster = ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', with_zookeepe...
37.431034
147
0.711193
import pytest from helpers.cluster import ClickHouseCluster from multiprocessing.dummy import Pool from helpers.network import PartitionManager from helpers.corrupt_part_data_on_disk import corrupt_part_data_on_disk import time cluster = ClickHouseCluster(__file__) node1 = cluster.add_instance('node1', with_zookeepe...
true
true
1c03ae0ce55b9f69f4b92fb3ed41edd77488b391
6,759
py
Python
convert.py
reyuwei/deeplab-pytorch
f4e241c83be5f85f0f2e1be5d76160b8c2d7ec9a
[ "MIT" ]
null
null
null
convert.py
reyuwei/deeplab-pytorch
f4e241c83be5f85f0f2e1be5d76160b8c2d7ec9a
[ "MIT" ]
null
null
null
convert.py
reyuwei/deeplab-pytorch
f4e241c83be5f85f0f2e1be5d76160b8c2d7ec9a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # # Author: Kazuto Nakashima # URL: http://kazuto1011.github.io # Created: 2017-11-15 from __future__ import absolute_import, division, print_function import re from collections import OrderedDict import click import numpy as np import torch from libs import caffe_pb2 f...
38.186441
111
0.590472
from __future__ import absolute_import, division, print_function import re from collections import OrderedDict import click import numpy as np import torch from libs import caffe_pb2 from libs.models import DeepLabV2_ResNet101_MSC def parse_caffemodel(model_path): caffemodel = caffe_pb2.NetParameter() wit...
true
true
1c03afa8179744305082a5addee21e3e12d0d23e
4,741
py
Python
citest/json_predicate/simple_binary_predicate.py
armory-io/citest
56f2dfa991a377519e9be4c7f472fb9c80ec9fac
[ "Apache-2.0" ]
69
2016-04-05T15:15:49.000Z
2021-10-21T01:29:36.000Z
citest/json_predicate/simple_binary_predicate.py
armory-io/citest
56f2dfa991a377519e9be4c7f472fb9c80ec9fac
[ "Apache-2.0" ]
95
2016-04-06T13:31:09.000Z
2020-08-13T22:53:40.000Z
citest/json_predicate/simple_binary_predicate.py
armory-io/citest
56f2dfa991a377519e9be4c7f472fb9c80ec9fac
[ "Apache-2.0" ]
50
2016-04-05T14:10:57.000Z
2021-10-21T01:29:26.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 or a...
33.624113
100
0.720523
import logging import re import sys from .base_binary_predicate import ( BinaryPredicate) from .path_value import PathValue from .path_result import ( PathValueResult, TypeMismatchError) if sys.version_info[0] > 2: basestring = str long = int class SimpleBinaryPredicate(BinaryPredicate): def ...
true
true
1c03afd6ac4a4aacb724e5aad7b2839a9b008270
6,609
py
Python
flask/Dashapps/world/Dash_App13.py
SchneiderDaniel/data
741f5d912eb9a62b77ec3cecf4fc54f21133784c
[ "MIT" ]
null
null
null
flask/Dashapps/world/Dash_App13.py
SchneiderDaniel/data
741f5d912eb9a62b77ec3cecf4fc54f21133784c
[ "MIT" ]
null
null
null
flask/Dashapps/world/Dash_App13.py
SchneiderDaniel/data
741f5d912eb9a62b77ec3cecf4fc54f21133784c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from dash import Dash from dash.dependencies import Input, Output, ALL, State, MATCH, ALLSMALLER, ClientsideFunction from Dashapps.Dash_fun import apply_layout_with_auth, load_object, save_object import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_compon...
32.082524
330
0.620215
from dash import Dash from dash.dependencies import Input, Output, ALL, State, MATCH, ALLSMALLER, ClientsideFunction from Dashapps.Dash_fun import apply_layout_with_auth, load_object, save_object import dash_core_components as dcc import dash_html_components as html import dash_bootstrap_components as dbc import panda...
true
true
1c03b035845ef5774801b1166364089d40aea9ba
674
py
Python
bindings/pydrake/test/all_each_import_test.py
RobotLocomotion/drake-python3.7
ae397a4c6985262d23e9675b9bf3927c08d027f5
[ "BSD-3-Clause" ]
2
2021-02-25T02:01:02.000Z
2021-03-17T04:52:04.000Z
bindings/pydrake/test/all_each_import_test.py
RobotLocomotion/drake-python3.7
ae397a4c6985262d23e9675b9bf3927c08d027f5
[ "BSD-3-Clause" ]
null
null
null
bindings/pydrake/test/all_each_import_test.py
RobotLocomotion/drake-python3.7
ae397a4c6985262d23e9675b9bf3927c08d027f5
[ "BSD-3-Clause" ]
1
2021-06-13T12:05:39.000Z
2021-06-13T12:05:39.000Z
import subprocess import sys import unittest import pydrake.all def check_module(name): # Run a new interpreter and ensure we can import the module in isolation. print(name) subprocess.run([sys.executable, "-c", f"import {name}"], check=True) class Test(unittest.TestCase): def test_each_import(self...
24.962963
77
0.605341
import subprocess import sys import unittest import pydrake.all def check_module(name): print(name) subprocess.run([sys.executable, "-c", f"import {name}"], check=True) class Test(unittest.TestCase): def test_each_import(self): names = [] for name in sys.modules.keys(): ...
true
true
1c03b04a70c773b46d9b18d1055bef6f0f1323aa
5,413
py
Python
albumy/blueprints/auth.py
MingruiWang2017/albumy
c7014aa1e095cc45ccb995adfbab491259d9d1a2
[ "MIT" ]
null
null
null
albumy/blueprints/auth.py
MingruiWang2017/albumy
c7014aa1e095cc45ccb995adfbab491259d9d1a2
[ "MIT" ]
null
null
null
albumy/blueprints/auth.py
MingruiWang2017/albumy
c7014aa1e095cc45ccb995adfbab491259d9d1a2
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template, flash, redirect, url_for from flask_login import login_user, logout_user, login_required, current_user, login_fresh, confirm_login from albumy.emails import send_confirm_email, send_reset_password_email from albumy.extensions import db from albumy.forms.auth import LoginFo...
37.590278
111
0.682801
from flask import Blueprint, render_template, flash, redirect, url_for from flask_login import login_user, logout_user, login_required, current_user, login_fresh, confirm_login from albumy.emails import send_confirm_email, send_reset_password_email from albumy.extensions import db from albumy.forms.auth import LoginFo...
true
true
1c03b0c3ae5ced3e2a7ed0f1446cc73cfbed5a07
308
py
Python
tests/dummy_data.py
BRIGHTON-ASUMANI/politico2
8978b4928f741ae023a3651e4b11997547b0ea23
[ "MIT" ]
null
null
null
tests/dummy_data.py
BRIGHTON-ASUMANI/politico2
8978b4928f741ae023a3651e4b11997547b0ea23
[ "MIT" ]
6
2019-02-06T05:08:54.000Z
2021-06-01T23:20:40.000Z
tests/dummy_data.py
BRIGHTON-ASUMANI/politico2
8978b4928f741ae023a3651e4b11997547b0ea23
[ "MIT" ]
1
2019-02-07T12:00:15.000Z
2019-02-07T12:00:15.000Z
party_create={ 'name':'pnu', 'hqAddress': 'Nairobi', 'logoUrl':'https://heroku.com' } party_logourl={ 'name':'pnu', 'hqAddress': 'Nairobi', 'logoUrl':'32413wrtwretw ' } party={ 'name':'pnu', 'hqAddress': 'Nairobi', 'logoUrl':'https://heroku.com', 'party_id': 1 }
14
35
0.551948
party_create={ 'name':'pnu', 'hqAddress': 'Nairobi', 'logoUrl':'https://heroku.com' } party_logourl={ 'name':'pnu', 'hqAddress': 'Nairobi', 'logoUrl':'32413wrtwretw ' } party={ 'name':'pnu', 'hqAddress': 'Nairobi', 'logoUrl':'https://heroku.com', 'party_id': 1 }
true
true
1c03b1a3a841ad2caad0b3749b3abb82915714fc
755
py
Python
main.py
ismaeelakram/jason-python
25fef76a527382521f995001335b771a5ba13a60
[ "MIT" ]
null
null
null
main.py
ismaeelakram/jason-python
25fef76a527382521f995001335b771a5ba13a60
[ "MIT" ]
null
null
null
main.py
ismaeelakram/jason-python
25fef76a527382521f995001335b771a5ba13a60
[ "MIT" ]
null
null
null
from jason import Jason import sys import hashlib jason = Jason() hash = sys.argv[1] hash_type = Jason.detect_hash(hash) def success(password, hash_type): print(f"Password found: {password}, {hash_type}") sys.exit() f = open("db.txt", "a") memories = open("db.txt", "r").read().split('\n') for...
26.034483
131
0.643709
from jason import Jason import sys import hashlib jason = Jason() hash = sys.argv[1] hash_type = Jason.detect_hash(hash) def success(password, hash_type): print(f"Password found: {password}, {hash_type}") sys.exit() f = open("db.txt", "a") memories = open("db.txt", "r").read().split('\n') for...
true
true
1c03b1cfbcc6888dbc7bce3a0e53bbba370ba744
164
py
Python
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_Lag1Trend_Seasonal_Minute_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_Lag1Trend_Seasonal_Minute_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
1
2019-11-30T23:39:38.000Z
2019-12-01T04:34:35.000Z
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_Lag1Trend_Seasonal_Minute_MLP.py
jmabry/pyaf
afbc15a851a2445a7824bf255af612dc429265af
[ "BSD-3-Clause" ]
null
null
null
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['Lag1Trend'] , ['Seasonal_Minute'] , ['MLP'] );
41
86
0.756098
import pyaf.tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['Lag1Trend'] , ['Seasonal_Minute'] , ['MLP'] );
true
true
1c03b43efe5eab54e9eeefb790df45ce34f7da91
4,603
py
Python
task/pose.py
koya-ken/pose-ae-train
e6147778ac4da079db03abb286becaae29653dac
[ "BSD-3-Clause" ]
250
2018-10-09T09:18:05.000Z
2022-03-29T09:10:35.000Z
task/pose.py
koya-ken/pose-ae-train
e6147778ac4da079db03abb286becaae29653dac
[ "BSD-3-Clause" ]
33
2018-10-22T06:56:29.000Z
2022-01-19T12:37:35.000Z
task/pose.py
koya-ken/pose-ae-train
e6147778ac4da079db03abb286becaae29653dac
[ "BSD-3-Clause" ]
50
2018-10-23T02:32:28.000Z
2021-12-26T05:51:54.000Z
""" __config__ contains the options for training and testing Basically all of the variables related to training are put in __config__['train'] """ import torch import numpy as np from torch import nn import os from torch.nn import DataParallel from utils.misc import make_input, make_output, importNet __config__ = { ...
30.282895
106
0.528351
import torch import numpy as np from torch import nn import os from torch.nn import DataParallel from utils.misc import make_input, make_output, importNet __config__ = { 'data_provider': 'data.coco_pose.dp', 'network': 'models.posenet.PoseNet', 'inference': { 'nstack': 4, 'inp_dim': 256, ...
true
true
1c03b498fb0dde46ad63f96d0ce8ccd08371f81b
488
py
Python
cryptokit/otp.py
istommao/cryptok
9630e3744d9ca8c25c58122a5027ece7d93ff40a
[ "MIT" ]
25
2016-10-22T03:23:56.000Z
2021-05-24T12:36:05.000Z
cryptokit/otp.py
istommao/cryptok
9630e3744d9ca8c25c58122a5027ece7d93ff40a
[ "MIT" ]
null
null
null
cryptokit/otp.py
istommao/cryptok
9630e3744d9ca8c25c58122a5027ece7d93ff40a
[ "MIT" ]
6
2017-03-23T05:25:06.000Z
2019-10-24T12:03:32.000Z
# coding: utf-8 """OTP TOTP""" from __future__ import unicode_literals import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.twofactor.hotp import HOTP from cryptography.hazmat.primitives.hashes import SHA1 key = os.urandom(20) def generate_htop(length=6, salt=0): ...
22.181818
63
0.756148
from __future__ import unicode_literals import os from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.twofactor.hotp import HOTP from cryptography.hazmat.primitives.hashes import SHA1 key = os.urandom(20) def generate_htop(length=6, salt=0): hotp = HOTP(key, length, SH...
true
true
1c03b50730525c0effd671edad6bbe8232fb9312
778
py
Python
shadowlands/deploy.py
carver/shadowlands-core
8931254da4af7e4cde3594fe1bcbf92a34ac02a4
[ "MIT" ]
null
null
null
shadowlands/deploy.py
carver/shadowlands-core
8931254da4af7e4cde3594fe1bcbf92a34ac02a4
[ "MIT" ]
null
null
null
shadowlands/deploy.py
carver/shadowlands-core
8931254da4af7e4cde3594fe1bcbf92a34ac02a4
[ "MIT" ]
null
null
null
import json from solc import compile_source import pyperclip import pdb from shadowlands.sl_dapp import SLDapp class Deployer(SLDapp): FILEPATH='./shadowlands/sloader.sol' def initialize(self): contract_source_code = open(self.FILEPATH, 'r').read() compiled_sol = compile_source(contract_source...
31.12
110
0.687661
import json from solc import compile_source import pyperclip import pdb from shadowlands.sl_dapp import SLDapp class Deployer(SLDapp): FILEPATH='./shadowlands/sloader.sol' def initialize(self): contract_source_code = open(self.FILEPATH, 'r').read() compiled_sol = compile_source(contract_source...
true
true
1c03b5b14bb33a013321e9b1e3637bc1e4412226
29,364
py
Python
calm/dsl/cli/projects.py
akbaraziz/calm-dsl
5dfbc3f3a5b31082259294011e7ce8248cd37b58
[ "Apache-2.0" ]
null
null
null
calm/dsl/cli/projects.py
akbaraziz/calm-dsl
5dfbc3f3a5b31082259294011e7ce8248cd37b58
[ "Apache-2.0" ]
null
null
null
calm/dsl/cli/projects.py
akbaraziz/calm-dsl
5dfbc3f3a5b31082259294011e7ce8248cd37b58
[ "Apache-2.0" ]
null
null
null
from inspect import getargs import time import click import arrow import json import sys from distutils.version import LooseVersion as LV from prettytable import PrettyTable from ruamel import yaml from calm.dsl.builtins import create_project_payload, Project from calm.dsl.api import get_api_client, get_resource_api f...
34.424385
112
0.622259
from inspect import getargs import time import click import arrow import json import sys from distutils.version import LooseVersion as LV from prettytable import PrettyTable from ruamel import yaml from calm.dsl.builtins import create_project_payload, Project from calm.dsl.api import get_api_client, get_resource_api f...
true
true
1c03b6ead71526e4556a85a1f223f066ac454c00
51,261
py
Python
daqhats/mcc172.py
patalen/daqhats
90d5a47f5cf5dd8103632df70a9266c4245d9862
[ "MIT" ]
null
null
null
daqhats/mcc172.py
patalen/daqhats
90d5a47f5cf5dd8103632df70a9266c4245d9862
[ "MIT" ]
null
null
null
daqhats/mcc172.py
patalen/daqhats
90d5a47f5cf5dd8103632df70a9266c4245d9862
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines """ Wraps all of the methods from the MCC 172 library for use in Python. """ import sys from collections import namedtuple from ctypes import c_ubyte, c_int, c_ushort, c_ulong, c_long, c_double, \ POINTER, c_char_p, byref, create_string_buffer from enum import IntEnum, unique from d...
41.306205
80
0.626987
import sys from collections import namedtuple from ctypes import c_ubyte, c_int, c_ushort, c_ulong, c_long, c_double, \ POINTER, c_char_p, byref, create_string_buffer from enum import IntEnum, unique from daqhats.hats import Hat, HatError @unique class SourceType(IntEnum): LOCAL = 0 MASTER = 1 S...
true
true
1c03b748c17eb3ec72fdfbe0ef5b46a651672bcc
9,143
py
Python
src/lambda_scripts/importMetadata.py
jtgasper3/mdq-server-lambda
e2dabb69caa60eae5aec578079b0cbf220f65383
[ "Apache-2.0" ]
1
2017-09-02T20:19:45.000Z
2017-09-02T20:19:45.000Z
src/lambda_scripts/importMetadata.py
jtgasper3/mdq-server-lambda
e2dabb69caa60eae5aec578079b0cbf220f65383
[ "Apache-2.0" ]
null
null
null
src/lambda_scripts/importMetadata.py
jtgasper3/mdq-server-lambda
e2dabb69caa60eae5aec578079b0cbf220f65383
[ "Apache-2.0" ]
1
2017-07-17T17:29:11.000Z
2017-07-17T17:29:11.000Z
""" Reads in SAML Metadata Aggregate, validates the signature, splits out each entity descriptor, re-signs each descriptor and stores in DynamoDb. """ from __future__ import print_function import datetime import hashlib import sys from copy import deepcopy import boto3 import botocore import pytz import signxml from...
32.193662
129
0.653724
from __future__ import print_function import datetime import hashlib import sys from copy import deepcopy import boto3 import botocore import pytz import signxml from lxml import etree from urllib.request import urlopen from botocore import exceptions NSMAP = {None: "http://www.w3.org/2000/09/xmldsig#"} URN = '{urn...
true
true
1c03b7933ff53bdaaa587a7d39bbcaf155429d19
2,661
py
Python
Supervised learning/test.py
guanhuaw/BLIPSrecon
b46667861f036eeddc138d97430c6fd7154f6654
[ "BSD-3-Clause" ]
4
2021-08-24T09:07:14.000Z
2022-01-06T05:42:16.000Z
Supervised learning/test.py
guanhuaw/BLIPSrecon
b46667861f036eeddc138d97430c6fd7154f6654
[ "BSD-3-Clause" ]
1
2021-11-21T13:55:32.000Z
2021-12-10T13:55:20.000Z
Supervised learning/test.py
guanhuaw/BLIPSrecon
b46667861f036eeddc138d97430c6fd7154f6654
[ "BSD-3-Clause" ]
4
2021-08-24T09:07:16.000Z
2022-01-06T05:42:10.000Z
import os from options.test_options import TestOptions from data import CreateDataLoader from models import create_model from util.visualizer import save_images from util import html import ntpath import numpy as np if __name__ == '__main__': opt = TestOptions().parse() opt.nThreads = 1 # test code only suppo...
35.959459
116
0.602781
import os from options.test_options import TestOptions from data import CreateDataLoader from models import create_model from util.visualizer import save_images from util import html import ntpath import numpy as np if __name__ == '__main__': opt = TestOptions().parse() opt.nThreads = 1 opt.batchSize = 1 ...
true
true
1c03b7d4caf6e3522a40a39d9a919eb29b2575ec
27
py
Python
aula2/main.py
GussSoares/lead-mentoring
fb2b0a81c8a45c2747af5f50dda1c5d05f501a5d
[ "MIT" ]
1
2021-11-05T19:40:11.000Z
2021-11-05T19:40:11.000Z
aula2/main.py
GussSoares/lead-mentoring
fb2b0a81c8a45c2747af5f50dda1c5d05f501a5d
[ "MIT" ]
null
null
null
aula2/main.py
GussSoares/lead-mentoring
fb2b0a81c8a45c2747af5f50dda1c5d05f501a5d
[ "MIT" ]
null
null
null
from fastapi import FastAPI
27
27
0.888889
from fastapi import FastAPI
true
true
1c03b8d8788c8843268b8d8b5c54867bb08f657d
931
py
Python
s3prl/downstream/libri_phone/hubconf.py
Hem7513/s3prl
325ad5090536aec8e42f2c27d896c06e58ff84f9
[ "MIT" ]
856
2021-01-15T15:40:32.000Z
2022-03-31T07:08:17.000Z
s3prl/downstream/libri_phone/hubconf.py
Hem7513/s3prl
325ad5090536aec8e42f2c27d896c06e58ff84f9
[ "MIT" ]
210
2021-01-15T13:28:50.000Z
2022-03-30T06:13:51.000Z
s3prl/downstream/libri_phone/hubconf.py
Hem7513/s3prl
325ad5090536aec8e42f2c27d896c06e58ff84f9
[ "MIT" ]
208
2021-01-15T03:03:12.000Z
2022-03-31T08:33:27.000Z
import os import torch from s3prl.utility.download import _urls_to_filepaths from .upstream_expert import UpstreamExpert as _UpstreamExpert def libri_posteriorgram_local(ckpt, *args, **kwargs): """ The model from local ckpt ckpt (str): PATH """ assert os.path.isfile(ckpt) return _...
29.09375
96
0.680988
import os import torch from s3prl.utility.download import _urls_to_filepaths from .upstream_expert import UpstreamExpert as _UpstreamExpert def libri_posteriorgram_local(ckpt, *args, **kwargs): assert os.path.isfile(ckpt) return _UpstreamExpert(ckpt, *args, **kwargs) def libri_posteriorgram_url(ckpt, refre...
true
true
1c03b90ba67de5326ace3975d9044f48bfc83177
2,368
py
Python
features/steps/api_add_to_favorites.py
asmuratbek/oobamarket
1053976a13ea84b9aabfcbbcbcffd79549ce9538
[ "MIT" ]
null
null
null
features/steps/api_add_to_favorites.py
asmuratbek/oobamarket
1053976a13ea84b9aabfcbbcbcffd79549ce9538
[ "MIT" ]
7
2020-06-05T23:36:01.000Z
2022-01-13T01:42:07.000Z
features/steps/api_add_to_favorites.py
asmuratbek/oobamarket
1053976a13ea84b9aabfcbbcbcffd79549ce9538
[ "MIT" ]
null
null
null
from behave import * from features.steps import LOGIN_URL from features.helpers import * from apps.product.models import * use_step_matcher("re") @given("a product which user wants to add to favorites list") def step_impl(context): faker = context.faker instances = create_instances(faker, slug_prefix='prefix...
39.466667
129
0.749155
from behave import * from features.steps import LOGIN_URL from features.helpers import * from apps.product.models import * use_step_matcher("re") @given("a product which user wants to add to favorites list") def step_impl(context): faker = context.faker instances = create_instances(faker, slug_prefix='prefix...
true
true
1c03bbdf2daa076fb1e77136bc80f672a58913b3
3,076
py
Python
pandapower/converter/matpower/from_mpc.py
yougnen/pandapower
d206bd91e68dd03675f7fe8ddee141621ef437fc
[ "BSD-3-Clause" ]
104
2017-02-21T17:13:51.000Z
2022-03-21T13:52:27.000Z
pandapower/converter/matpower/from_mpc.py
lvzhibai/pandapower
24ed3056558887cc89f67d15b5527523990ae9a1
[ "BSD-3-Clause" ]
126
2017-02-15T17:09:08.000Z
2018-07-16T13:25:15.000Z
pandapower/converter/matpower/from_mpc.py
lvzhibai/pandapower
24ed3056558887cc89f67d15b5527523990ae9a1
[ "BSD-3-Clause" ]
57
2017-03-08T13:49:32.000Z
2022-02-28T10:36:55.000Z
# -*- coding: utf-8 -*- # Copyright (c) 2016-2021 by University of Kassel and Fraunhofer Institute for Energy Economics # and Energy System Technology (IEE), Kassel. All rights reserved. import numpy as np import scipy.io from pandapower.converter.pypower import from_ppc try: import pplog as logging except Imp...
28.481481
99
0.660273
import numpy as np import scipy.io from pandapower.converter.pypower import from_ppc try: import pplog as logging except ImportError: import logging logger = logging.getLogger(__name__) def from_mpc(mpc_file, f_hz=50, casename_mpc_file='mpc', validate_conversion=False): ppc = _mpc2ppc(mpc_file, case...
true
true
1c03bcdaf65eadc5ae99d8eb2ee9634b42a47d15
10,473
py
Python
nova/tests/unit/image/test_fake.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/image/test_fake.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
null
null
null
nova/tests/unit/image/test_fake.py
bopopescu/nova-token
ec98f69dea7b3e2b9013b27fd55a2c1a1ac6bfb2
[ "Apache-2.0" ]
2
2017-07-20T17:31:34.000Z
2020-07-24T02:42:19.000Z
begin_unit comment|'# Copyright 2011 OpenStack Foundation' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' ...
12.220537
88
0.585315
begin_unit comment|'# Copyright 2011 OpenStack Foundation' nl|'\n' comment|'#' nl|'\n' comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may' nl|'\n' comment|'# not use this file except in compliance with the License. You may obtain' nl|'\n' comment|'# a copy of the License at' ...
false
true
1c03bde241bf929b782ab3f63a23b7e3b2cb72af
543
py
Python
teams/migrations/0002_auto_20191230_0349.py
robotgear/robotgear
15361aef197071e6cf23fca0e574fddeef97152c
[ "MIT" ]
null
null
null
teams/migrations/0002_auto_20191230_0349.py
robotgear/robotgear
15361aef197071e6cf23fca0e574fddeef97152c
[ "MIT" ]
13
2020-03-15T03:44:47.000Z
2022-03-11T23:48:01.000Z
teams/migrations/0002_auto_20191230_0349.py
robotgear/robotgear
15361aef197071e6cf23fca0e574fddeef97152c
[ "MIT" ]
null
null
null
# Generated by Django 3.0.1 on 2019-12-30 03:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('teams', '0001_initial'), ] operations = [ migrations.AddField( model_name='competition', name='first_year', ...
22.625
52
0.576427
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('teams', '0001_initial'), ] operations = [ migrations.AddField( model_name='competition', name='first_year', field=models.IntegerField(default=1992), ...
true
true
1c03be6e5904ce01ed747e9739519c0ee6d6bcf5
19,911
py
Python
rising/transforms/functional/affine.py
PhoenixDL/rising
6de193375dcaac35605163c35cec259c9a2116d1
[ "MIT" ]
276
2019-12-26T12:00:28.000Z
2022-03-23T12:25:41.000Z
rising/transforms/functional/affine.py
Borda/rising
6de193375dcaac35605163c35cec259c9a2116d1
[ "MIT" ]
106
2019-12-13T19:19:09.000Z
2022-01-02T00:55:11.000Z
rising/transforms/functional/affine.py
Borda/rising
6de193375dcaac35605163c35cec259c9a2116d1
[ "MIT" ]
21
2020-05-14T17:30:41.000Z
2022-03-14T09:29:00.000Z
import warnings from typing import Optional, Sequence, Union import torch from torch import Tensor from rising.random import AbstractParameter from rising.utils.affine import ( deg_to_rad, get_batched_eye, matrix_revert_coordinate_order, matrix_to_homogeneous, points_to_cartesian, points_to_ho...
37.710227
120
0.653207
import warnings from typing import Optional, Sequence, Union import torch from torch import Tensor from rising.random import AbstractParameter from rising.utils.affine import ( deg_to_rad, get_batched_eye, matrix_revert_coordinate_order, matrix_to_homogeneous, points_to_cartesian, points_to_ho...
true
true
1c03be9dab809a3ba692b6e241c161af55f6c2cb
959
py
Python
test/with_dummyserver/async/test_poolmanager.py
jab/hip
a42c11e6a77190809e37c2337c50b86baca2c9d9
[ "MIT" ]
null
null
null
test/with_dummyserver/async/test_poolmanager.py
jab/hip
a42c11e6a77190809e37c2337c50b86baca2c9d9
[ "MIT" ]
null
null
null
test/with_dummyserver/async/test_poolmanager.py
jab/hip
a42c11e6a77190809e37c2337c50b86baca2c9d9
[ "MIT" ]
null
null
null
from dummyserver.testcase import HTTPDummyServerTestCase from urllib3 import AsyncPoolManager class TestPoolManager(HTTPDummyServerTestCase): @classmethod def setup_class(self): super(TestPoolManager, self).setup_class() self.base_url = "http://%s:%d" % (self.host, self.port) self.base...
30.935484
71
0.541189
from dummyserver.testcase import HTTPDummyServerTestCase from urllib3 import AsyncPoolManager class TestPoolManager(HTTPDummyServerTestCase): @classmethod def setup_class(self): super(TestPoolManager, self).setup_class() self.base_url = "http://%s:%d" % (self.host, self.port) self.base...
true
true
1c03bf1a04ee144e0daaa052f52a12c8d9f7b5d9
4,723
py
Python
pyclustering/cluster/tests/unit/ut_somsc.py
JosephChataignon/pyclustering
bf4f51a472622292627ec8c294eb205585e50f52
[ "BSD-3-Clause" ]
1,013
2015-01-26T19:50:14.000Z
2022-03-31T07:38:48.000Z
pyclustering/cluster/tests/unit/ut_somsc.py
peterlau0626/pyclustering
bf4f51a472622292627ec8c294eb205585e50f52
[ "BSD-3-Clause" ]
542
2015-01-20T16:44:32.000Z
2022-01-29T14:57:20.000Z
pyclustering/cluster/tests/unit/ut_somsc.py
peterlau0626/pyclustering
bf4f51a472622292627ec8c294eb205585e50f52
[ "BSD-3-Clause" ]
262
2015-03-19T07:28:12.000Z
2022-03-30T07:28:24.000Z
"""! @brief Unit-tests for SOM-SC algorithm. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ import unittest # Generate images without having a window appear. import matplotlib matplotlib.use('Agg') from pyclustering.cluster.somsc import somsc from p...
45.413462
120
0.722634
import unittest import matplotlib matplotlib.use('Agg') from pyclustering.cluster.somsc import somsc from pyclustering.cluster.tests.somsc_templates import SyncnetTestTemplates from pyclustering.samples.definitions import SIMPLE_SAMPLES class SomscUnitTest(unittest.TestCase): def testClusterAll...
true
true
1c03c013d289a3bda969410e0d5d1a5112f540fa
698
py
Python
apps/api_views.py
aishuchen/aishuchen
81df4bb4ee6f798c2018219c4fb176691040c9b6
[ "MIT" ]
null
null
null
apps/api_views.py
aishuchen/aishuchen
81df4bb4ee6f798c2018219c4fb176691040c9b6
[ "MIT" ]
null
null
null
apps/api_views.py
aishuchen/aishuchen
81df4bb4ee6f798c2018219c4fb176691040c9b6
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views import View from apps.models import Comment from apps.public import Response # Create your views here. class CommentView(View): def get(self, request): comments = Comment.objects.all() return render(request, 'comment_transfer.html', {'comments...
29.083333
79
0.669054
from django.shortcuts import render from django.views import View from apps.models import Comment from apps.public import Response class CommentView(View): def get(self, request): comments = Comment.objects.all() return render(request, 'comment_transfer.html', {'comments': comments}) def pos...
true
true
1c03c1030f6a6e6ffb5ecdcdd563985df59f937b
2,646
py
Python
official/cv/warpctc/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
1
2021-11-18T08:17:44.000Z
2021-11-18T08:17:44.000Z
official/cv/warpctc/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
null
null
null
official/cv/warpctc/postprocess.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
2
2019-09-01T06:17:04.000Z
2019-10-04T08:39:45.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
32.666667
115
0.625094
import os import numpy as np from src.model_utils.config import config as cf batch_Size = 1 def is_eq(pred_lbl, target): pred_diff = len(target) - len(pred_lbl) if pred_diff > 0: pred_lbl.extend([10] * pred_diff) return pred_lbl == target def get_prediction(y_pred): seq_len, batch_size, _ =...
true
true
1c03c1aacc0f94b581833bae755d2c34a9f31b9d
44,534
py
Python
mrpython/PyEditor.py
Ikzue/MrPython
2fb12d010c0b67b1119803080574a792ade6f289
[ "PSF-2.0" ]
null
null
null
mrpython/PyEditor.py
Ikzue/MrPython
2fb12d010c0b67b1119803080574a792ade6f289
[ "PSF-2.0" ]
null
null
null
mrpython/PyEditor.py
Ikzue/MrPython
2fb12d010c0b67b1119803080574a792ade6f289
[ "PSF-2.0" ]
null
null
null
import os import string import platform import tkinter.messagebox as tkMessageBox import tkinter.simpledialog as tkSimpleDialog from tkinter.font import Font, nametofont from tkinter import * from configHandler import MrPythonConf from Search import SearchDialog from Search import GrepDialog from Search import Replace...
39.064912
119
0.588202
import os import string import platform import tkinter.messagebox as tkMessageBox import tkinter.simpledialog as tkSimpleDialog from tkinter.font import Font, nametofont from tkinter import * from configHandler import MrPythonConf from Search import SearchDialog from Search import GrepDialog from Search import Replace...
true
true
1c03c1ca10db781b95253372ef1038fe271f534d
7,193
py
Python
sovtoken/sovtoken/test/test_public_xfer_1.py
andkononykhin/token-plugin
5cd2d835ec4235e2423d70f01932173aa3c0c471
[ "Apache-2.0" ]
null
null
null
sovtoken/sovtoken/test/test_public_xfer_1.py
andkononykhin/token-plugin
5cd2d835ec4235e2423d70f01932173aa3c0c471
[ "Apache-2.0" ]
null
null
null
sovtoken/sovtoken/test/test_public_xfer_1.py
andkononykhin/token-plugin
5cd2d835ec4235e2423d70f01932173aa3c0c471
[ "Apache-2.0" ]
null
null
null
import pytest from plenum.common.txn_util import get_seq_no from plenum.common.exceptions import RequestNackedException from plenum.common.types import OPERATION from sovtoken.constants import SIGS, ADDRESS, SEQNO, AMOUNT from sovtoken.test.helper import user1_token_wallet @pytest.fixture def addresses(helpers, user...
31.968889
103
0.680106
import pytest from plenum.common.txn_util import get_seq_no from plenum.common.exceptions import RequestNackedException from plenum.common.types import OPERATION from sovtoken.constants import SIGS, ADDRESS, SEQNO, AMOUNT from sovtoken.test.helper import user1_token_wallet @pytest.fixture def addresses(helpers, user...
true
true
1c03c20e5cd5aa9975e57e30fe5bb3c09d2b714d
11,518
py
Python
pyblnet/blnet_web.py
tumidinoda/pyblnet
6e2d6da484d7a1453fc2ef6d12071b896d40546a
[ "MIT" ]
null
null
null
pyblnet/blnet_web.py
tumidinoda/pyblnet
6e2d6da484d7a1453fc2ef6d12071b896d40546a
[ "MIT" ]
null
null
null
pyblnet/blnet_web.py
tumidinoda/pyblnet
6e2d6da484d7a1453fc2ef6d12071b896d40546a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on 26.09.2017 A module for connecting with, collecting data from and controlling the BLNet via it's HTTP-interface @author: Nielstron """ import requests from htmldom import htmldom import html import re from builtins import int import pickle def test_blne...
34.797583
127
0.548446
import requests from htmldom import htmldom import html import re from builtins import int import pickle def test_blnet(ip, timeout=5, id=0): if not ip.startswith("http://") and not ip.startswith("https://"): ip = "http://" + ip try: r = requests.get(ip, timeout=timeout) except requests.e...
true
true
1c03c2a7b9fdb769919f1564a83148f79d52dffd
908
py
Python
setup.py
sidpremkumar/local-variable-manager
d854ea6eb0083e3f616c9c77c960cae882e2f93c
[ "MIT" ]
null
null
null
setup.py
sidpremkumar/local-variable-manager
d854ea6eb0083e3f616c9c77c960cae882e2f93c
[ "MIT" ]
null
null
null
setup.py
sidpremkumar/local-variable-manager
d854ea6eb0083e3f616c9c77c960cae882e2f93c
[ "MIT" ]
null
null
null
from setuptools import setup from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'requirements.txt'), 'rb') as f: install_requires = f.read().decode('utf-8').split('\n') with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_desc...
30.266667
73
0.67511
from setuptools import setup from os import path this_directory = path.abspath(path.dirname(__file__)) with open(path.join(this_directory, 'requirements.txt'), 'rb') as f: install_requires = f.read().decode('utf-8').split('\n') with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f: long_desc...
true
true
1c03c3c2c90068618ed6a9f6b07d6d1e82ebab7d
218
py
Python
django_jinja/apps.py
hartym/django-jinja
97c93c37b5d9ccc4b2ae34e1fc2f63929780e271
[ "BSD-3-Clause" ]
null
null
null
django_jinja/apps.py
hartym/django-jinja
97c93c37b5d9ccc4b2ae34e1fc2f63929780e271
[ "BSD-3-Clause" ]
null
null
null
django_jinja/apps.py
hartym/django-jinja
97c93c37b5d9ccc4b2ae34e1fc2f63929780e271
[ "BSD-3-Clause" ]
null
null
null
from django.apps import AppConfig from django_jinja import base class DjangoJinjaAppConfig(AppConfig): name = "django_jinja" verbose_name = "Django Jinja" def ready(self): base.env.initialize()
18.166667
38
0.720183
from django.apps import AppConfig from django_jinja import base class DjangoJinjaAppConfig(AppConfig): name = "django_jinja" verbose_name = "Django Jinja" def ready(self): base.env.initialize()
true
true
1c03c427026afb9afd2dc48c08320da7e8e7b43b
1,308
py
Python
nba_api/stats/endpoints/commonteamroster.py
adureja/nba_api
2e1f8ee55e513689aea410bf663a09a3d7c34283
[ "MIT" ]
1
2019-02-20T19:19:19.000Z
2019-02-20T19:19:19.000Z
nba_api/stats/endpoints/commonteamroster.py
adureja/nba_api
2e1f8ee55e513689aea410bf663a09a3d7c34283
[ "MIT" ]
null
null
null
nba_api/stats/endpoints/commonteamroster.py
adureja/nba_api
2e1f8ee55e513689aea410bf663a09a3d7c34283
[ "MIT" ]
2
2020-08-09T06:00:19.000Z
2022-03-04T16:39:30.000Z
from nba_api.stats.endpoints._base import Endpoint from nba_api.stats.library.http import NBAStatsHTTP from nba_api.stats.library.parameters import Season, LeagueIDNullable class CommonTeamRoster(Endpoint): endpoint = 'commonteamroster' expected_data = {'Coaches': ['TEAM_ID', 'SEASON', 'COACH_ID', 'FIRST_NAME...
50.307692
332
0.655199
from nba_api.stats.endpoints._base import Endpoint from nba_api.stats.library.http import NBAStatsHTTP from nba_api.stats.library.parameters import Season, LeagueIDNullable class CommonTeamRoster(Endpoint): endpoint = 'commonteamroster' expected_data = {'Coaches': ['TEAM_ID', 'SEASON', 'COACH_ID', 'FIRST_NAME...
true
true
1c03c47843fde06f061fd8a9a739b25f676f6232
1,317
py
Python
mc/instr/call.py
iximeow/binja-m16c
debf368e5df90a96d6c8b0bc128626a9d6834bb4
[ "0BSD" ]
12
2020-01-15T00:51:06.000Z
2021-10-02T12:45:50.000Z
mc/instr/call.py
iximeow/binja-m16c
debf368e5df90a96d6c8b0bc128626a9d6834bb4
[ "0BSD" ]
2
2020-02-03T08:26:26.000Z
2020-07-01T19:51:44.000Z
mc/instr/call.py
iximeow/binja-m16c
debf368e5df90a96d6c8b0bc128626a9d6834bb4
[ "0BSD" ]
4
2020-02-03T07:51:12.000Z
2021-02-14T19:13:07.000Z
from . import * __all__ = ['Jsr16', 'JsrAbs', 'Jsri', 'JsriAbs', 'Jsrs'] __all__ += ['Enter', 'Exitd', 'Rts', 'Reit'] class Jsr16(SemaCall, InstrShortOpcode): def name(self): return 'JSR.W' def new_operands(self): return [OperRelCodeLabel(2, offset=1)] class JsrAbs(SemaCall, InstrShortOp...
19.086957
57
0.639332
from . import * __all__ = ['Jsr16', 'JsrAbs', 'Jsri', 'JsriAbs', 'Jsrs'] __all__ += ['Enter', 'Exitd', 'Rts', 'Reit'] class Jsr16(SemaCall, InstrShortOpcode): def name(self): return 'JSR.W' def new_operands(self): return [OperRelCodeLabel(2, offset=1)] class JsrAbs(SemaCall, InstrShortOp...
true
true
1c03c48b9e8b8851bb92a7ea8aa6822c15ec0ba6
160
py
Python
meiduo/apps/verifications/models.py
brucedeng123/flask_test1
33f9ab0093754a81324d47ab1eb341f8406e8e45
[ "Apache-2.0" ]
1
2021-04-18T07:00:12.000Z
2021-04-18T07:00:12.000Z
meiduo/apps/verifications/models.py
brucedeng123/flask_test1
33f9ab0093754a81324d47ab1eb341f8406e8e45
[ "Apache-2.0" ]
null
null
null
meiduo/apps/verifications/models.py
brucedeng123/flask_test1
33f9ab0093754a81324d47ab1eb341f8406e8e45
[ "Apache-2.0" ]
null
null
null
from django.db import models from rest_framework.views import APIView # Create your models here. class SMSCodeView(object): def get(self, request, mobile):
26.666667
40
0.78125
from django.db import models from rest_framework.views import APIView class SMSCodeView(object): def get(self, request, mobile):
false
true
1c03c57672db8b9709eb339dacb828f82a321266
23,157
py
Python
hvac/api/secrets_engines/pki.py
GuillaumeRemyCSI/hvac
50ec876dc5f09f8dc03b6f1f31164629184937f7
[ "Apache-2.0" ]
null
null
null
hvac/api/secrets_engines/pki.py
GuillaumeRemyCSI/hvac
50ec876dc5f09f8dc03b6f1f31164629184937f7
[ "Apache-2.0" ]
null
null
null
hvac/api/secrets_engines/pki.py
GuillaumeRemyCSI/hvac
50ec876dc5f09f8dc03b6f1f31164629184937f7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """PKI methods module.""" from hvac import utils from hvac.api.vault_api_base import VaultApiBase DEFAULT_MOUNT_POINT = 'pki' class Pki(VaultApiBase): """Pki Secrets Engine (API). Reference: https://www.vaultproject.io/api/secret/pki/index.html """ def ...
34.408618
121
0.619942
from hvac import utils from hvac.api.vault_api_base import VaultApiBase DEFAULT_MOUNT_POINT = 'pki' class Pki(VaultApiBase): def read_ca_certificate(self, mount_point=DEFAULT_MOUNT_POINT): api_path = utils.format_url('/v1/{mount_point}/ca/pem', mount_point=mount_point) response = self._adapter.g...
true
true
1c03c673637bcafd89fa97744089e5177b374d2b
5,101
py
Python
shapenet/utils/binvox_torch.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
1,028
2020-01-23T23:30:54.000Z
2022-03-27T22:33:50.000Z
shapenet/utils/binvox_torch.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
103
2020-01-24T05:29:48.000Z
2022-03-08T13:04:24.000Z
shapenet/utils/binvox_torch.py
MAYURGAIKWAD/meshrcnn
b47ecd47ca7de7055b7d141e63ddab286c5245f3
[ "BSD-3-Clause" ]
179
2020-01-24T08:14:30.000Z
2022-03-19T00:34:05.000Z
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import torch def read_binvox_coords(f, integer_division=True, dtype=torch.float32): """ Read a binvox file and return the indices of all nonzero voxels. This matches the behavior of binvox_rw.read_as_coord_array (https://github.co...
34.938356
91
0.623799
import torch def read_binvox_coords(f, integer_division=True, dtype=torch.float32): size, translation, scale = _read_binvox_header(f) storage = torch.ByteStorage.from_buffer(f.read()) data = torch.tensor([], dtype=torch.uint8) data.set_(source=storage) vals, counts = data[::2], data[1::2] idxs...
true
true
1c03c73ef3558ff7e2d2860a0e6f21852ffc88b8
6,005
py
Python
research/minigo/utils.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
1
2019-09-11T09:41:11.000Z
2019-09-11T09:41:11.000Z
research/minigo/utils.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
null
null
null
research/minigo/utils.py
vincentcheny/models
afb1a59fc1bc792ac72d1a3e22e2469020529788
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 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...
27.930233
81
0.670941
from __future__ import absolute_import from __future__ import division from __future__ import print_function from contextlib import contextmanager import functools import itertools import math import operator import os import random import re import string import time import tensorflow as tf MODEL_N...
true
true
1c03c79274389c1947bb789fa85e8bf53913ac0b
674
py
Python
util/toxyz.py
anianruoss/StatPhys
46a8d5ffc17e4028e75aaf78e454136d1ed0d0c5
[ "MIT" ]
null
null
null
util/toxyz.py
anianruoss/StatPhys
46a8d5ffc17e4028e75aaf78e454136d1ed0d0c5
[ "MIT" ]
null
null
null
util/toxyz.py
anianruoss/StatPhys
46a8d5ffc17e4028e75aaf78e454136d1ed0d0c5
[ "MIT" ]
null
null
null
# convert coords.final file to xyz file from sys import argv import re atom = 'Ar' coords = re.compile( '^ +[0-9]+ +([0-9Ee\\+-.]+) +([0-9Ee\\+-.]+) +([0-9Ee\\+-.]+)') def parser(line): c = coords.findall(line)[0] return ' '.join((atom, *c)) + '\n' if len(argv) < 2: print('Usage: toxyz coords...
18.722222
71
0.589021
from sys import argv import re atom = 'Ar' coords = re.compile( '^ +[0-9]+ +([0-9Ee\\+-.]+) +([0-9Ee\\+-.]+) +([0-9Ee\\+-.]+)') def parser(line): c = coords.findall(line)[0] return ' '.join((atom, *c)) + '\n' if len(argv) < 2: print('Usage: toxyz coords.final [coords.xyz]') exit(-1) out ...
true
true
1c03c79cdec27a435774e66fafca047adc976454
699
py
Python
taiga/projects/migrations/0056_auto_20161110_1518.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
null
null
null
taiga/projects/migrations/0056_auto_20161110_1518.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
12
2019-11-25T14:08:32.000Z
2021-06-24T10:35:51.000Z
taiga/projects/migrations/0056_auto_20161110_1518.py
threefoldtech/Threefold-Circles
cbc433796b25cf7af9a295af65d665a4a279e2d6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-11-10 15:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0055_json_to_jsonb'), ] operations = [ migrations.AddField( ...
26.884615
83
0.62804
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('projects', '0055_json_to_jsonb'), ] operations = [ migrations.AddField( model_name='project', name='is_contact_activated', ...
true
true
1c03c83c8bcb4466f0bab58722758ff803a368b3
2,915
py
Python
handlers/start.py
itspro-dev/Telegram_Vc_Bot
9db50d810a2de77a168cbb240ae73cd88e5c8c06
[ "Apache-2.0" ]
null
null
null
handlers/start.py
itspro-dev/Telegram_Vc_Bot
9db50d810a2de77a168cbb240ae73cd88e5c8c06
[ "Apache-2.0" ]
null
null
null
handlers/start.py
itspro-dev/Telegram_Vc_Bot
9db50d810a2de77a168cbb240ae73cd88e5c8c06
[ "Apache-2.0" ]
null
null
null
from pyrogram import Client, filters from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton from config import BOT_USERNAME @Client.on_message(filters.command(["start", "start@pro_musicc_bot"]) & filters.private & ~filters.channel) async def start(_, message: Message): await message.reply...
39.931507
228
0.656261
from pyrogram import Client, filters from pyrogram.types import Message, InlineKeyboardMarkup, InlineKeyboardButton from config import BOT_USERNAME @Client.on_message(filters.command(["start", "start@pro_musicc_bot"]) & filters.private & ~filters.channel) async def start(_, message: Message): await message.reply...
true
true
1c03c84d0fd173fb8c3a8393c7e8a4814bbaca95
6,337
py
Python
python-dsl/buck_parser/struct.py
tjcarothers/buck
6071f301718772fd579ab878774b5ce46e299a7c
[ "Apache-2.0" ]
null
null
null
python-dsl/buck_parser/struct.py
tjcarothers/buck
6071f301718772fd579ab878774b5ce46e299a7c
[ "Apache-2.0" ]
null
null
null
python-dsl/buck_parser/struct.py
tjcarothers/buck
6071f301718772fd579ab878774b5ce46e299a7c
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, division, print_function, with_statement import json from collections import OrderedDict from json.encoder import ( INFINITY, JSONEncoder, _make_iterencode, encode_basestring, encode_basestring_ascii, ) from keyword import iskeyword as _iskeyword from operato...
30.912195
90
0.620483
from __future__ import absolute_import, division, print_function, with_statement import json from collections import OrderedDict from json.encoder import ( INFINITY, JSONEncoder, _make_iterencode, encode_basestring, encode_basestring_ascii, ) from keyword import iskeyword as _iskeyword from operato...
true
true