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
f74776c8a9ecb65b6e6598b64beb8af660ef5511
2,320
py
Python
src/generate_instruction_default_field.py
CyberZHG/MIXAL
06ebe91bb5abcc1ed4ff4af71809a1a41272c4f3
[ "MIT" ]
5
2020-07-15T16:16:06.000Z
2021-07-14T04:26:36.000Z
src/generate_instruction_default_field.py
CyberZHG/MIXAL
06ebe91bb5abcc1ed4ff4af71809a1a41272c4f3
[ "MIT" ]
1
2020-08-15T16:13:40.000Z
2020-08-15T16:13:40.000Z
src/generate_instruction_default_field.py
CyberZHG/MIXAL
06ebe91bb5abcc1ed4ff4af71809a1a41272c4f3
[ "MIT" ]
2
2020-08-16T00:41:48.000Z
2021-05-23T18:43:33.000Z
FIELDS = { 'FADD': 6, 'FSUB': 6, 'FMUL': 6, 'FDIV': 6, 'NUM': 0, 'CHAR': 1, 'HLT': 2, 'SLA': 0, 'SRA': 1, 'SLAX': 2, 'SRAX': 3, 'SLC': 4, 'SRC': 5, 'STJ': 2, 'JMP': 0, 'JSJ': 1, 'JOV': 2, 'JNOV': 3, 'JL': 4, 'JE': 5, 'JG': 6, 'JGE': 7, 'JNE': 8, 'JLE': 9, 'JAN': 0, 'JAZ': 1, 'JAP': 2...
35.692308
101
0.423707
FIELDS = { 'FADD': 6, 'FSUB': 6, 'FMUL': 6, 'FDIV': 6, 'NUM': 0, 'CHAR': 1, 'HLT': 2, 'SLA': 0, 'SRA': 1, 'SLAX': 2, 'SRAX': 3, 'SLC': 4, 'SRC': 5, 'STJ': 2, 'JMP': 0, 'JSJ': 1, 'JOV': 2, 'JNOV': 3, 'JL': 4, 'JE': 5, 'JG': 6, 'JGE': 7, 'JNE': 8, 'JLE': 9, 'JAN': 0, 'JAZ': 1, 'JAP': 2...
true
true
f74776cc3735f58a916c18f01991db1ae67c284a
9,585
py
Python
third_party/blink/renderer/bindings/scripts/bind_gen/path_manager.py
Ron423c/chromium
2edf7b980065b648f8b2a6e52193d83832fe36b7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/blink/renderer/bindings/scripts/bind_gen/path_manager.py
Ron423c/chromium
2edf7b980065b648f8b2a6e52193d83832fe36b7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/blink/renderer/bindings/scripts/bind_gen/path_manager.py
Ron423c/chromium
2edf7b980065b648f8b2a6e52193d83832fe36b7
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-03-07T14:20:02.000Z
2021-03-07T14:20:02.000Z
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os.path import posixpath import web_idl from . import name_style from .blink_v8_bridge import blink_class_name class PathManager(object): """ ...
40.273109
136
0.683255
import os.path import posixpath import web_idl from . import name_style from .blink_v8_bridge import blink_class_name class PathManager(object): _REQUIRE_INIT_MESSAGE = ("PathManager.init must be called in advance.") _is_initialized = False @classmethod def init(cls, root_src_dir, root_gen_dir...
true
true
f747798d967e7365323e4a1a767e42f2a3509274
1,022
py
Python
tests/capture/aes/test_control.py
kralka/scaaml
f47e028dad6bc74eb480cbfae83724c1057caf39
[ "Apache-2.0" ]
null
null
null
tests/capture/aes/test_control.py
kralka/scaaml
f47e028dad6bc74eb480cbfae83724c1057caf39
[ "Apache-2.0" ]
null
null
null
tests/capture/aes/test_control.py
kralka/scaaml
f47e028dad6bc74eb480cbfae83724c1057caf39
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.5
74
0.736791
from unittest.mock import MagicMock from scaaml.capture.aes.control import CWControl def test_control(): chip_id = 314159 with CWControl(chip_id=chip_id, scope_io=MagicMock()) as control: assert control.chip_id == chip_id assert control._scope_io.tio1 == "serial_rx" asse...
true
true
f7477a7f692dd8283a2c24c536bdde781edc7d3c
1,150
py
Python
PermutationSequence60.py
Bit64L/LeetCode-Python-
64847cbb1adcaca4561b949e8acc52e8e031a6cb
[ "MIT" ]
null
null
null
PermutationSequence60.py
Bit64L/LeetCode-Python-
64847cbb1adcaca4561b949e8acc52e8e031a6cb
[ "MIT" ]
null
null
null
PermutationSequence60.py
Bit64L/LeetCode-Python-
64847cbb1adcaca4561b949e8acc52e8e031a6cb
[ "MIT" ]
null
null
null
class Solution: def getPermutation(self, n, k): import math nums = range(1, n + 1) ans = '' k -= 1 while n > 0: n -= 1 index, k = divmod(k, math.factorial(n)) ans += str(nums[index]) nums.remove(nums[index]) return ans ...
23.958333
51
0.405217
class Solution: def getPermutation(self, n, k): import math nums = range(1, n + 1) ans = '' k -= 1 while n > 0: n -= 1 index, k = divmod(k, math.factorial(n)) ans += str(nums[index]) nums.remove(nums[index]) return ans ...
true
true
f7477bed0d9c25d89f40c12c17c525e0937b3a6a
1,776
py
Python
run_tests.py
pj1031999/mimiker
ed701132b45dbb6b3b94121cd1ef3820bf4781aa
[ "BSD-3-Clause" ]
185
2016-06-24T16:40:13.000Z
2022-03-24T18:07:18.000Z
run_tests.py
pj1031999/mimiker
ed701132b45dbb6b3b94121cd1ef3820bf4781aa
[ "BSD-3-Clause" ]
586
2016-04-21T22:54:18.000Z
2022-03-25T18:34:01.000Z
run_tests.py
pj1031999/mimiker
ed701132b45dbb6b3b94121cd1ef3820bf4781aa
[ "BSD-3-Clause" ]
57
2016-06-03T14:02:11.000Z
2022-03-12T03:18:54.000Z
#!/usr/bin/env -S python3 -u import argparse import os import random import shutil import signal import subprocess import sys N_SIMPLE = 10 DEFAULT_TIMEOUT = 40 REPEAT = 5 def setup_terminal(): cols, rows = shutil.get_terminal_size(fallback=(132, 43)) os.environ['COLUMNS'] = str(cols) os.environ['LINE...
28.190476
78
0.596284
import argparse import os import random import shutil import signal import subprocess import sys N_SIMPLE = 10 DEFAULT_TIMEOUT = 40 REPEAT = 5 def setup_terminal(): cols, rows = shutil.get_terminal_size(fallback=(132, 43)) os.environ['COLUMNS'] = str(cols) os.environ['LINES'] = str(rows) if sys....
true
true
f7477cd4ffe0ee3eee33e3043bf0f1a5de70b708
137
py
Python
src/pyprobe/sensors/pegasus/__init__.py
dittert/pyprobe
1b0d0e403645ed204332c70c8a89e094f860023a
[ "Apache-2.0" ]
null
null
null
src/pyprobe/sensors/pegasus/__init__.py
dittert/pyprobe
1b0d0e403645ed204332c70c8a89e094f860023a
[ "Apache-2.0" ]
null
null
null
src/pyprobe/sensors/pegasus/__init__.py
dittert/pyprobe
1b0d0e403645ed204332c70c8a89e094f860023a
[ "Apache-2.0" ]
null
null
null
__author__ = 'Dirk Dittert' from sensor_phy_drive import PegasusPhysicalDriveSensor from sensor_enclosure import PegasusEnclosureSensor
27.4
55
0.883212
__author__ = 'Dirk Dittert' from sensor_phy_drive import PegasusPhysicalDriveSensor from sensor_enclosure import PegasusEnclosureSensor
true
true
f7477d8fbf35208c1e5a0fc8ed2d62b5eb821aa2
3,398
py
Python
setup.py
szmmm/speechchain
909724c6f305588a52958f64f584ad21696b5173
[ "Apache-2.0" ]
null
null
null
setup.py
szmmm/speechchain
909724c6f305588a52958f64f584ad21696b5173
[ "Apache-2.0" ]
null
null
null
setup.py
szmmm/speechchain
909724c6f305588a52958f64f584ad21696b5173
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python from distutils.version import LooseVersion import os import pip from setuptools import find_packages from setuptools import setup import sys if LooseVersion(sys.version) < LooseVersion('3.6'): raise RuntimeError( 'ESPnet requires Python>=3.6, ' 'but your Python is {}'.format(...
33.98
80
0.586816
from distutils.version import LooseVersion import os import pip from setuptools import find_packages from setuptools import setup import sys if LooseVersion(sys.version) < LooseVersion('3.6'): raise RuntimeError( 'ESPnet requires Python>=3.6, ' 'but your Python is {}'.format(sys.version)) if Loos...
true
true
f7477e112d8e0bf73e59481fc630e13dd05bf706
575
py
Python
backend/migrations/0005_auto_20210301_0957.py
WilliamOrringe/uthos
e59430f277677158d957ae91226198bd7a43301d
[ "MIT" ]
1
2021-03-04T11:51:43.000Z
2021-03-04T11:51:43.000Z
backend/migrations/0005_auto_20210301_0957.py
WilliamOrringe/uthos
e59430f277677158d957ae91226198bd7a43301d
[ "MIT" ]
23
2021-03-04T16:18:45.000Z
2021-03-11T10:36:38.000Z
backend/migrations/0005_auto_20210301_0957.py
WilliamOrringe/uthos
e59430f277677158d957ae91226198bd7a43301d
[ "MIT" ]
null
null
null
# Generated by Django 3.0.6 on 2021-03-01 09:57 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("backend", "0004_pointsgained_comment"), ] operations = [ migrations.AddField( model_name="community", name="colour",...
23.958333
74
0.584348
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("backend", "0004_pointsgained_comment"), ] operations = [ migrations.AddField( model_name="community", name="colour", field=models.CharField(blank=True,...
true
true
f7477e3998de6426b81794143d9110b7cece84a9
3,474
py
Python
tests/test_plan7/test_profile.py
althonos/pyhmmer
eb6fe7c0e74557e0ae9d647693711583d2d86b68
[ "MIT" ]
26
2020-11-10T22:57:49.000Z
2022-03-24T16:58:55.000Z
tests/test_plan7/test_profile.py
althonos/pyhmmer
eb6fe7c0e74557e0ae9d647693711583d2d86b68
[ "MIT" ]
13
2020-11-12T11:41:08.000Z
2022-03-09T18:17:48.000Z
tests/test_plan7/test_profile.py
althonos/pyhmmer
eb6fe7c0e74557e0ae9d647693711583d2d86b68
[ "MIT" ]
2
2021-04-04T05:13:07.000Z
2021-11-30T09:11:23.000Z
import copy import io import itertools import os import shutil import unittest import tempfile import pkg_resources import pyhmmer from pyhmmer.errors import EaselError, AlphabetMismatch from pyhmmer.easel import Alphabet, SequenceFile from pyhmmer.plan7 import HMM, HMMFile, Profile, Background class TestProfile(uni...
34.74
96
0.661197
import copy import io import itertools import os import shutil import unittest import tempfile import pkg_resources import pyhmmer from pyhmmer.errors import EaselError, AlphabetMismatch from pyhmmer.easel import Alphabet, SequenceFile from pyhmmer.plan7 import HMM, HMMFile, Profile, Background class TestProfile(uni...
true
true
f7477f596be4c1f1cd501f2786dece36ca96b8c7
115
py
Python
myanimelist_forum_queue/forum_queue/urls.py
PythonCoderAS/myanimelist-forum-queue
95ba796db2499432aceecd8ab05d93b3ddc2563f
[ "MIT" ]
null
null
null
myanimelist_forum_queue/forum_queue/urls.py
PythonCoderAS/myanimelist-forum-queue
95ba796db2499432aceecd8ab05d93b3ddc2563f
[ "MIT" ]
null
null
null
myanimelist_forum_queue/forum_queue/urls.py
PythonCoderAS/myanimelist-forum-queue
95ba796db2499432aceecd8ab05d93b3ddc2563f
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.index_view, name='index'), ]
14.375
45
0.678261
from django.urls import path from . import views urlpatterns = [ path('', views.index_view, name='index'), ]
true
true
f74780176d3c6cb1a1ac89886bb91c29b187f401
1,244
py
Python
test/test_delete_record.py
Eduard-z/SF_project_pytest
1dd39c36a9d2c7a231e5933cbeb834209e68c353
[ "Apache-2.0" ]
null
null
null
test/test_delete_record.py
Eduard-z/SF_project_pytest
1dd39c36a9d2c7a231e5933cbeb834209e68c353
[ "Apache-2.0" ]
null
null
null
test/test_delete_record.py
Eduard-z/SF_project_pytest
1dd39c36a9d2c7a231e5933cbeb834209e68c353
[ "Apache-2.0" ]
null
null
null
import pytest import allure from api_requests.preconditions import Preconditions @allure.severity(allure.severity_level.NORMAL) @pytest.mark.account @pytest.mark.delete def test_delete_account(app): app.global_header.navigate_to_object('Account', 'Account') app.list_view_page.open_list_view('All Accounts') ...
36.588235
102
0.774116
import pytest import allure from api_requests.preconditions import Preconditions @allure.severity(allure.severity_level.NORMAL) @pytest.mark.account @pytest.mark.delete def test_delete_account(app): app.global_header.navigate_to_object('Account', 'Account') app.list_view_page.open_list_view('All Accounts') ...
true
true
f74780fdc09f0769bb955bedf137ccc8f745fa68
1,028
py
Python
tests/test_master_utils.py
tcc-unb-fga/debile
84accc5fe14e9f8d0c1df1c3c32afaab19b0dcbc
[ "MIT" ]
null
null
null
tests/test_master_utils.py
tcc-unb-fga/debile
84accc5fe14e9f8d0c1df1c3c32afaab19b0dcbc
[ "MIT" ]
null
null
null
tests/test_master_utils.py
tcc-unb-fga/debile
84accc5fe14e9f8d0c1df1c3c32afaab19b0dcbc
[ "MIT" ]
null
null
null
import debile.master.utils as utils import unittest import mock class MasterUtilsTestCase(unittest.TestCase): def test_init_config(self): config = utils._init_config('tests/resources/master.yaml') self.assertEquals(config['database'], 'sqlite:////srv/debile/debile.db') self.assertIsNotNo...
32.125
80
0.695525
import debile.master.utils as utils import unittest import mock class MasterUtilsTestCase(unittest.TestCase): def test_init_config(self): config = utils._init_config('tests/resources/master.yaml') self.assertEquals(config['database'], 'sqlite:////srv/debile/debile.db') self.assertIsNotNo...
true
true
f747810e183e4d13e1534c2774f3980f8619887a
6,184
py
Python
Python/DDR.py
NathanLoPresto/UI-for-servicing-OP-AMPs
75605aa8b2315c1bbf3e7eee0f8ad706fa7e4f14
[ "MIT" ]
1
2021-11-14T06:11:04.000Z
2021-11-14T06:11:04.000Z
Python/DDR.py
NathanLoPresto/UI-for-servicing-OP-AMPs
75605aa8b2315c1bbf3e7eee0f8ad706fa7e4f14
[ "MIT" ]
null
null
null
Python/DDR.py
NathanLoPresto/UI-for-servicing-OP-AMPs
75605aa8b2315c1bbf3e7eee0f8ad706fa7e4f14
[ "MIT" ]
null
null
null
import ok from fpga import FPGA import numpy as np import time import matplotlib.pyplot as plot import struct from collections import namedtuple BLOCK_SIZE = (16384) WRITE_SIZE=(8*1024*1024) READ_SIZE = (8*1024*1024) g_nMemSize = (8*1024*1024) sample_size = (524288) ep = namedtuple('ep', 'addr bits type') control = ...
34.355556
119
0.657018
import ok from fpga import FPGA import numpy as np import time import matplotlib.pyplot as plot import struct from collections import namedtuple BLOCK_SIZE = (16384) WRITE_SIZE=(8*1024*1024) READ_SIZE = (8*1024*1024) g_nMemSize = (8*1024*1024) sample_size = (524288) ep = namedtuple('ep', 'addr bits type') control = ...
true
true
f74781a288fa3baece671e1ca5d6940b2d12616a
6,428
py
Python
database/postgresql_utils.py
nishanthsolomon/postgresql-database
edba96867c1f7d4b97a62fc9d557056cb9bf2065
[ "MIT" ]
null
null
null
database/postgresql_utils.py
nishanthsolomon/postgresql-database
edba96867c1f7d4b97a62fc9d557056cb9bf2065
[ "MIT" ]
null
null
null
database/postgresql_utils.py
nishanthsolomon/postgresql-database
edba96867c1f7d4b97a62fc9d557056cb9bf2065
[ "MIT" ]
null
null
null
import psycopg2 from database.config import config from database.postgresql_tables import Tables import logging logger = logging.getLogger(__name__) class PostgresqlUtils(): INSERT_COMMAND = 'INSERT INTO {} ({}) VALUES({}) RETURNING {}' SELECT_COMMAND_CONDITION = 'SELECT {} FROM {} {}' WHERE_CLAUSE = 'W...
34.745946
114
0.641257
import psycopg2 from database.config import config from database.postgresql_tables import Tables import logging logger = logging.getLogger(__name__) class PostgresqlUtils(): INSERT_COMMAND = 'INSERT INTO {} ({}) VALUES({}) RETURNING {}' SELECT_COMMAND_CONDITION = 'SELECT {} FROM {} {}' WHERE_CLAUSE = 'W...
true
true
f74781df97284361ef15250ece7c89f4ca01a570
18,677
py
Python
google/cloud/bigquery/dbapi/cursor.py
Topolytics/python-bigquery
aa74f8ee0c7b3232ce268b1de31b010b5e94e8dc
[ "Apache-2.0" ]
null
null
null
google/cloud/bigquery/dbapi/cursor.py
Topolytics/python-bigquery
aa74f8ee0c7b3232ce268b1de31b010b5e94e8dc
[ "Apache-2.0" ]
null
null
null
google/cloud/bigquery/dbapi/cursor.py
Topolytics/python-bigquery
aa74f8ee0c7b3232ce268b1de31b010b5e94e8dc
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.173258
93
0.621245
import collections from collections import abc as collections_abc import copy import logging import re try: from google.cloud.bigquery_storage import ArrowSerializationOptions except ImportError: _ARROW_COMPRESSION_SUPPORT = False else: _ARROW_COMPRESSION_SUPPORT = True from google.clo...
true
true
f74782284ea50075fdce0e92666ab04a64a74c2e
3,182
py
Python
recbole/data/dataset/xgboost_dataset.py
Zephyr-29/RecBole
e8300611765c947ce904f29c610b188033ec8da8
[ "MIT" ]
1
2021-02-03T11:07:05.000Z
2021-02-03T11:07:05.000Z
recbole/data/dataset/xgboost_dataset.py
Zephyr-29/RecBole
e8300611765c947ce904f29c610b188033ec8da8
[ "MIT" ]
null
null
null
recbole/data/dataset/xgboost_dataset.py
Zephyr-29/RecBole
e8300611765c947ce904f29c610b188033ec8da8
[ "MIT" ]
null
null
null
# @Time : 2020/12/17 # @Author : Chen Yang # @Email : 254170321@qq.com """ recbole.data.xgboost_dataset ########################## """ from recbole.data.dataset import Dataset from recbole.utils import FeatureType class XgboostDataset(Dataset): """:class:`XgboostDataset` is based on :class:`~recbole.data.dat...
33.145833
104
0.576053
from recbole.data.dataset import Dataset from recbole.utils import FeatureType class XgboostDataset(Dataset): def __init__(self, config, saved_dataset=None): super().__init__(config, saved_dataset=saved_dataset) def _judge_token_and_convert(self, feat): col_list = [] fo...
true
true
f747829e40c6f4adc0f68558087c07aefa48ed79
9,407
py
Python
lib/SneddonContigFilter2/SneddonContigFilter2Impl.py
msneddon/ContigFilterTest2
5aaa4a9a7b76c17bf9ad81e1e5a2bed856240a61
[ "MIT" ]
null
null
null
lib/SneddonContigFilter2/SneddonContigFilter2Impl.py
msneddon/ContigFilterTest2
5aaa4a9a7b76c17bf9ad81e1e5a2bed856240a61
[ "MIT" ]
null
null
null
lib/SneddonContigFilter2/SneddonContigFilter2Impl.py
msneddon/ContigFilterTest2
5aaa4a9a7b76c17bf9ad81e1e5a2bed856240a61
[ "MIT" ]
null
null
null
#BEGIN_HEADER # The header block is where all import statments should live import sys import traceback import uuid from pprint import pprint, pformat from biokbase.workspace.client import Workspace as workspaceService #END_HEADER class SneddonContigFilter2: ''' Module Name: SneddonContigFilter2 Module...
44.372642
114
0.576379
import sys import traceback import uuid from pprint import pprint, pformat from biokbase.workspace.client import Workspace as workspaceService class SneddonContigFilter2: _length' not in params: raise ValueError('Parameter min_length is not set in input arguments') min_length_orig = pa...
true
true
f747832e3602750bde76f09a8a582e37ef9d487c
3,005
py
Python
improver/cli/wind_gust_diagnostic.py
ddlddl58/improver
37b5b12491a77feccb03e33813efe8ffdebfa25d
[ "BSD-3-Clause" ]
1
2021-05-01T22:59:15.000Z
2021-05-01T22:59:15.000Z
improver/cli/wind_gust_diagnostic.py
ddlddl58/improver
37b5b12491a77feccb03e33813efe8ffdebfa25d
[ "BSD-3-Clause" ]
null
null
null
improver/cli/wind_gust_diagnostic.py
ddlddl58/improver
37b5b12491a77feccb03e33813efe8ffdebfa25d
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2019 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the ...
41.164384
82
0.723794
from improver import cli @cli.clizefy @cli.with_output def process( wind_gust: cli.inputcube, wind_speed: cli.inputcube, *, wind_gust_percentile: float = 50.0, wind_speed_percentile: float = 95.0, ): from improver.wind_calculations.wind_gust_diagnostic import Wi...
true
true
f7478358a84c140cc15cdff55069a511d6356a68
4,822
py
Python
pluto/test/test.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/test/test.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
pluto/test/test.py
chalant/pluto
e7bfd35a2c1fc0e0753bd2f840b0a4385b5124fc
[ "Apache-2.0" ]
null
null
null
import logging from sqlalchemy import create_engine import pandas as pd from numpy import testing import numpy as np from dev import strategy_store, events from pluto import examples from pluto.utils import stream from pluto.control.loop import simulation_loop from pluto.control.processes import processes from ...
26.494505
96
0.603484
import logging from sqlalchemy import create_engine import pandas as pd from numpy import testing import numpy as np from dev import strategy_store, events from pluto import examples from pluto.utils import stream from pluto.control.loop import simulation_loop from pluto.control.processes import processes from ...
true
true
f74783a59fb0fdbccc9ad3811253c7f13e936224
2,437
py
Python
ClsKL/train/train_kl.py
Tommy-Ngx/AutoGradingOA
5e69bd38abaf01f03d8d837da68701a86bac1bb0
[ "MIT" ]
14
2019-10-29T10:48:43.000Z
2022-03-16T08:35:40.000Z
ClsKL/train/train_kl.py
Tommy-Ngx/AutoGradingOA
5e69bd38abaf01f03d8d837da68701a86bac1bb0
[ "MIT" ]
4
2020-03-06T14:49:59.000Z
2021-11-11T07:48:36.000Z
ClsKL/train/train_kl.py
Tommy-Ngx/AutoGradingOA
5e69bd38abaf01f03d8d837da68701a86bac1bb0
[ "MIT" ]
8
2019-09-19T04:59:04.000Z
2022-01-31T12:03:46.000Z
# -*- coding: utf-8 -*- import os, sys, pdb import argparse import torch import numpy as np FILE_PATH = os.path.abspath(__file__) PRJ_PATH = os.path.dirname(os.path.dirname(FILE_PATH)) sys.path.append(PRJ_PATH) from utils.loader import data_load # from utils.model import resnet from utils.model import cls_model fro...
38.078125
107
0.643824
import os, sys, pdb import argparse import torch import numpy as np FILE_PATH = os.path.abspath(__file__) PRJ_PATH = os.path.dirname(os.path.dirname(FILE_PATH)) sys.path.append(PRJ_PATH) from utils.loader import data_load from utils.model import cls_model from utils.train_eng import train_model from utils.eval_en...
true
true
f747845ff5aa418dbf2406302232103758d31e19
16,394
py
Python
pymemcache/test/test_client_hash.py
martinnj/pymemcache
79d98d23cd589556b0dc51a7d10ea338e90a944e
[ "Apache-2.0" ]
618
2015-01-09T14:26:14.000Z
2022-03-29T11:04:47.000Z
pymemcache/test/test_client_hash.py
pinterest/pymemcache
79d98d23cd589556b0dc51a7d10ea338e90a944e
[ "Apache-2.0" ]
211
2015-02-24T14:45:57.000Z
2022-03-30T23:04:20.000Z
pymemcache/test/test_client_hash.py
martinnj/pymemcache
79d98d23cd589556b0dc51a7d10ea338e90a944e
[ "Apache-2.0" ]
180
2015-03-05T02:02:31.000Z
2022-03-22T16:24:47.000Z
from pymemcache.client.hash import HashClient from pymemcache.client.base import Client, PooledClient from pymemcache.exceptions import MemcacheError, MemcacheUnknownError from pymemcache import pool from .test_client import ClientTestMixin, MockSocket import unittest import os import pytest from unittest import mock ...
34.22547
74
0.581676
from pymemcache.client.hash import HashClient from pymemcache.client.base import Client, PooledClient from pymemcache.exceptions import MemcacheError, MemcacheUnknownError from pymemcache import pool from .test_client import ClientTestMixin, MockSocket import unittest import os import pytest from unittest import mock ...
true
true
f74784ec8432058cc80edf5c3cdb3e1d4655e4b6
112,034
py
Python
Cinder/Mitaka/rest_client.py
bingyanh/OpenStack_Driver
8c94f6f86a5ebb1e663aa73df0847cfad09d2960
[ "Apache-2.0" ]
null
null
null
Cinder/Mitaka/rest_client.py
bingyanh/OpenStack_Driver
8c94f6f86a5ebb1e663aa73df0847cfad09d2960
[ "Apache-2.0" ]
null
null
null
Cinder/Mitaka/rest_client.py
bingyanh/OpenStack_Driver
8c94f6f86a5ebb1e663aa73df0847cfad09d2960
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 Huawei Technologies Co., Ltd. # 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 # # ...
38.354673
79
0.567122
import json import netaddr import re import requests import six import threading import time from oslo_concurrency import lockutils from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import strutils from requests.adapters import HTTPAdapter from cinder import exception ...
true
true
f7478567a3d5fd9f327aa7260bc0a6609c186e53
4,506
py
Python
ibkr_app.py
hyw2/Homework1
e1c5d8e343ea11909d9f79bdf33a7d604cf085a8
[ "MIT" ]
null
null
null
ibkr_app.py
hyw2/Homework1
e1c5d8e343ea11909d9f79bdf33a7d604cf085a8
[ "MIT" ]
null
null
null
ibkr_app.py
hyw2/Homework1
e1c5d8e343ea11909d9f79bdf33a7d604cf085a8
[ "MIT" ]
null
null
null
from ib_insync import * from os import listdir, remove from time import sleep import pickle import pandas as pd from helper_functions import * # Define your variables here ########################################################################################### sampling_rate = 1 # How often, in seconds, to check for...
48.451613
120
0.654239
from ib_insync import * from os import listdir, remove from time import sleep import pickle import pandas as pd from helper_functions import *
true
true
f7478667df1055012da1ae00fe7195fd4dc9e8bf
2,671
py
Python
fabfile.py
ArtemioRicardo/openxc-android
64a59533fd0a74b65a2159e329c71f99b7c40491
[ "BSD-3-Clause" ]
1
2019-07-04T12:12:57.000Z
2019-07-04T12:12:57.000Z
fabfile.py
ArtemioRicardo/openxc-android
64a59533fd0a74b65a2159e329c71f99b7c40491
[ "BSD-3-Clause" ]
null
null
null
fabfile.py
ArtemioRicardo/openxc-android
64a59533fd0a74b65a2159e329c71f99b7c40491
[ "BSD-3-Clause" ]
1
2018-04-02T11:16:51.000Z
2018-04-02T11:16:51.000Z
#!/usr/bin/env python import os from fabric.api import * # noqa from fabric.colors import green, yellow from fabric.contrib.console import confirm from prettyprint import pp import re VERSION_PATTERN = r'^v\d+(\.\d+)+?$' env.releases_directory = "release" env.root_dir = os.path.abspath(os.path.dirname(__file__)) en...
30.352273
74
0.633096
import os from fabric.api import * from fabric.colors import green, yellow from fabric.contrib.console import confirm from prettyprint import pp import re VERSION_PATTERN = r'^v\d+(\.\d+)+?$' env.releases_directory = "release" env.root_dir = os.path.abspath(os.path.dirname(__file__)) env.release = "HEAD" proxy =...
true
true
f74786b71dbd9c0ef132f042537770ffed54844c
1,958
py
Python
omd/versions/1.2.8p15.cre/share/check_mk/web/plugins/sidebar/bi.py
NCAR/spol-nagios
4f88bef953983050bc6568d3f1027615fbe223fb
[ "BSD-3-Clause" ]
null
null
null
omd/versions/1.2.8p15.cre/share/check_mk/web/plugins/sidebar/bi.py
NCAR/spol-nagios
4f88bef953983050bc6568d3f1027615fbe223fb
[ "BSD-3-Clause" ]
null
null
null
omd/versions/1.2.8p15.cre/share/check_mk/web/plugins/sidebar/bi.py
NCAR/spol-nagios
4f88bef953983050bc6568d3f1027615fbe223fb
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
46.619048
72
0.516854
import bi def render_bi_groups(): html.write("<ul>") for group in bi.aggregation_groups(): bulletlink(group, "view.py?view_name=aggr_group&aggr_group=%s" % html.urlencode(group)) html.write("</ul>") sidebar_snapins["biaggr_groups"] = { "title" : _(...
true
true
f74787ea25b558bb8b362b11e0bf289b5e0352c3
830
py
Python
pyopteryx/factories/loop_action_factories/stop_action_factory.py
DanielZim/PyOpteryx
dd8fcdb23cc4ca52167820455a6d54c140f3cb00
[ "MIT" ]
null
null
null
pyopteryx/factories/loop_action_factories/stop_action_factory.py
DanielZim/PyOpteryx
dd8fcdb23cc4ca52167820455a6d54c140f3cb00
[ "MIT" ]
2
2021-03-31T19:09:54.000Z
2021-12-13T19:59:46.000Z
pyopteryx/factories/loop_action_factories/stop_action_factory.py
DanielZim/PyOpteryx
dd8fcdb23cc4ca52167820455a6d54c140f3cb00
[ "MIT" ]
null
null
null
from pyopteryx.factories.loop_action_factories.abstract_loop_action_factory import AbstractLoopActionFactory from pyopteryx.utils.builder_utils import add_activity_to_task, add_reply_entry class StopLoopActionFactory(AbstractLoopActionFactory): def __init__(self, action, xml_cache, input_data, processor, mapping_...
51.875
108
0.719277
from pyopteryx.factories.loop_action_factories.abstract_loop_action_factory import AbstractLoopActionFactory from pyopteryx.utils.builder_utils import add_activity_to_task, add_reply_entry class StopLoopActionFactory(AbstractLoopActionFactory): def __init__(self, action, xml_cache, input_data, processor, mapping_...
true
true
f74787f15a61331be3705ba76c93b2ad48f8e6e0
6,294
py
Python
App/jobs/JobProduct.py
PhenomingZ/dicer2
3d50d3854a087eecaf45a744ddfe2fa2e225951a
[ "MIT" ]
1
2020-12-20T12:00:43.000Z
2020-12-20T12:00:43.000Z
App/jobs/JobProduct.py
PhenomingZ/dicer2
3d50d3854a087eecaf45a744ddfe2fa2e225951a
[ "MIT" ]
null
null
null
App/jobs/JobProduct.py
PhenomingZ/dicer2
3d50d3854a087eecaf45a744ddfe2fa2e225951a
[ "MIT" ]
null
null
null
import time import traceback from datetime import datetime from App.controllers.BaseController import BaseController from App.jobs import get_job_pool from App.jobs.JobMultipleHandler import job_multiple_handler from App.jobs.JobQueuePutter import JobSuccessQueuePutter, JobStartedQueuePutter, JobRunningQueuePutter, \...
34.773481
110
0.614871
import time import traceback from datetime import datetime from App.controllers.BaseController import BaseController from App.jobs import get_job_pool from App.jobs.JobMultipleHandler import job_multiple_handler from App.jobs.JobQueuePutter import JobSuccessQueuePutter, JobStartedQueuePutter, JobRunningQueuePutter, \...
true
true
f7478a06b157a80edbc13339f0246fef45f682ad
3,625
py
Python
opsgenie_swagger/models/filter.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/filter.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
null
null
null
opsgenie_swagger/models/filter.py
Logicworks/opsgenie-python-sdk
244c4c40ddcc25e70df5ba4425ab8d7c8da59c18
[ "Apache-2.0" ]
1
2020-11-07T11:27:13.000Z
2020-11-07T11:27:13.000Z
# coding: utf-8 """ OpsGenie REST API OpsGenie OpenAPI Specification # noqa: E501 OpenAPI spec version: 2.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class Filter(object): """NOTE: This class is auto generate...
27.671756
99
0.555034
import pprint import re import six class Filter(object): swagger_types = { 'type': 'str' } attribute_map = { 'type': 'type' } discriminator_value_class_map = { 'match-all': 'MatchAll', 'match-any-condition': 'MatchAnyCondition', 'match-all-conditio...
true
true
f7478a99b38f092b7e4aa40582e2ed689b79d700
2,586
py
Python
core/tests/test_streams/test_artifacts_endpoints.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
core/tests/test_streams/test_artifacts_endpoints.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
core/tests/test_streams/test_artifacts_endpoints.py
Ohtar10/polyaxon
1e41804e4ae6466b6928d06bc6ee6d2d9c7b8931
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
39.181818
84
0.701083
import os from polyaxon import settings from polyaxon.streams.app.main import STREAMS_URL from polyaxon.utils.path_utils import create_path from tests.test_streams.base import create_tmp_files, get_streams_client, set_store from tests.utils import BaseTestCase class TestArtifactsEndpoints(BaseTestCase...
true
true
f7478aab3e803a8f04dfed6bb5befd90cb9771b1
4,143
py
Python
openalpr_api/models/vehicle_candidate.py
westofsun/Traffic-Rule-Violation-Detection-System
47dbf9a7c926712e0e987404e74d5cc3cd79713b
[ "MIT" ]
221
2018-04-25T00:02:30.000Z
2022-03-30T18:46:23.000Z
openalpr_api/models/vehicle_candidate.py
westofsun/Traffic-Rule-Violation-Detection-System
47dbf9a7c926712e0e987404e74d5cc3cd79713b
[ "MIT" ]
39
2018-10-04T04:40:11.000Z
2021-10-04T07:07:46.000Z
openalpr_api/models/vehicle_candidate.py
westofsun/Traffic-Rule-Violation-Detection-System
47dbf9a7c926712e0e987404e74d5cc3cd79713b
[ "MIT" ]
121
2018-04-25T00:02:33.000Z
2022-03-27T10:14:20.000Z
# coding: utf-8 """ OpenALPR Cloud API No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "Licen...
27.256579
104
0.566498
from pprint import pformat from six import iteritems import re class VehicleCandidate(object): def __init__(self, name=None, confidence=None): self.swagger_types = { 'name': 'str', 'confidence': 'float' } self.attribute_map = { 'name': 'name', ...
true
true
f7478c5181b3a190881963fdda829d05ec5633ef
801
py
Python
traceplus/base.py
traceplusplus/traceplus-python
eb20bf8840fed4c789157cacf85eed6fa45a2f26
[ "MIT" ]
null
null
null
traceplus/base.py
traceplusplus/traceplus-python
eb20bf8840fed4c789157cacf85eed6fa45a2f26
[ "MIT" ]
null
null
null
traceplus/base.py
traceplusplus/traceplus-python
eb20bf8840fed4c789157cacf85eed6fa45a2f26
[ "MIT" ]
null
null
null
from __future__ import print_function, unicode_literals import logging from traceplus.common.functional import LazyObjectProxy __all__ = [ 'Tracer', 'NoopTracer', 'tracer' ] class Tracer(object): """The basic Trace++ client. """ logger = logging.getLogger('traceplus.tracer') def __init_...
18.204545
55
0.700375
from __future__ import print_function, unicode_literals import logging from traceplus.common.functional import LazyObjectProxy __all__ = [ 'Tracer', 'NoopTracer', 'tracer' ] class Tracer(object): logger = logging.getLogger('traceplus.tracer') def __init__(self, *args, **kwargs): pass ...
true
true
f7478cdcd532bdfe31276a35c5eab3a7039a9ebc
4,191
py
Python
swagger_client/models/get_alliances_names_200_ok.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
swagger_client/models/get_alliances_names_200_ok.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
swagger_client/models/get_alliances_names_200_ok.py
rseichter/bootini-star
a80258f01a05e4df38748b8cb47dfadabd42c20d
[ "MIT" ]
null
null
null
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online # noqa: E501 OpenAPI spec version: 0.8.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class GetAlliancesNames200Ok(object): """NOTE: This class i...
28.903448
99
0.591983
import pprint import re import six class GetAlliancesNames200Ok(object): swagger_types = { 'alliance_id': 'int', 'alliance_name': 'str' } attribute_map = { 'alliance_id': 'alliance_id', 'alliance_name': 'alliance_name' } def __init__(self, alliance_id=None...
true
true
f7478d93baa3db07fe7f04bc4b6821b16090845e
1,919
py
Python
cumulus/management/commands/container_info.py
rasca/django-cumulus
c1720c27745180a3bec6b20cdf661fda03ac97a1
[ "BSD-3-Clause" ]
null
null
null
cumulus/management/commands/container_info.py
rasca/django-cumulus
c1720c27745180a3bec6b20cdf661fda03ac97a1
[ "BSD-3-Clause" ]
null
null
null
cumulus/management/commands/container_info.py
rasca/django-cumulus
c1720c27745180a3bec6b20cdf661fda03ac97a1
[ "BSD-3-Clause" ]
null
null
null
import cloudfiles import optparse from cumulus import settings from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): args = "[container_name container_name ...]" help = "Display info for cloud files containers" option_list = BaseCommand.option_list + ( opt...
37.627451
96
0.588848
import cloudfiles import optparse from cumulus import settings from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): args = "[container_name container_name ...]" help = "Display info for cloud files containers" option_list = BaseCommand.option_list + ( opt...
false
true
f7478decb3ab989f1b13f21eb949d75d4647e221
4,415
py
Python
src/others/utils.py
ithieund/PreSumModified
f661e2b7b04cfd8f2d279d61eeacd1eb74f64f24
[ "MIT" ]
null
null
null
src/others/utils.py
ithieund/PreSumModified
f661e2b7b04cfd8f2d279d61eeacd1eb74f64f24
[ "MIT" ]
null
null
null
src/others/utils.py
ithieund/PreSumModified
f661e2b7b04cfd8f2d279d61eeacd1eb74f64f24
[ "MIT" ]
null
null
null
import os import re import shutil import time from others import pyrouge REMAP = {"-lrb-": "(", "-rrb-": ")", "-lcb-": "{", "-rcb-": "}", "-lsb-": "[", "-rsb-": "]", "``": '"', "''": '"'} def clean(x): return re.sub( r"-lrb-|-rrb-|-lcb-|-rcb-|-lsb-|-rsb-|``|''", lambda m: REMAP.get(m.gr...
34.492188
104
0.562627
import os import re import shutil import time from others import pyrouge REMAP = {"-lrb-": "(", "-rrb-": ")", "-lcb-": "{", "-rcb-": "}", "-lsb-": "[", "-rsb-": "]", "``": '"', "''": '"'} def clean(x): return re.sub( r"-lrb-|-rrb-|-lcb-|-rcb-|-lsb-|-rsb-|``|''", lambda m: REMAP.get(m.gr...
true
true
f7478ef32c9c72b8a828cc02b5f9dd48ecdad231
2,945
py
Python
bin/calc_graphdna.py
hasibaasma/alfpy
c8c0c1300108015746320cede2207ac57e630d3e
[ "MIT" ]
19
2017-02-20T17:42:02.000Z
2021-12-16T19:07:17.000Z
bin/calc_graphdna.py
eggleader/alfpy
e0782e9551458ef17ab29df8af13fc0f8925e894
[ "MIT" ]
3
2018-03-12T23:54:27.000Z
2020-12-09T21:53:19.000Z
bin/calc_graphdna.py
eggleader/alfpy
e0782e9551458ef17ab29df8af13fc0f8925e894
[ "MIT" ]
6
2016-12-06T09:12:04.000Z
2021-09-24T14:40:47.000Z
#! /usr/bin/env python # Copyright (c) 2016 Zielezinski A, combio.pl import argparse import sys from alfpy import graphdna from alfpy.utils import distmatrix from alfpy.utils import seqrecords from alfpy.version import __version__ def get_parser(): parser = argparse.ArgumentParser( description='''Calcu...
34.244186
79
0.621053
import argparse import sys from alfpy import graphdna from alfpy.utils import distmatrix from alfpy.utils import seqrecords from alfpy.version import __version__ def get_parser(): parser = argparse.ArgumentParser( description='''Calculate distance between DNA sequences based on the two-dimens...
true
true
f7478f4211536e3e64128e8c97a28d01c88c7c05
1,098
py
Python
appointment-conflicts/appointment-conflicts.py
cirosantilli/algorithms-fork
7fd932f460610136af01c1cdd70b0d3997b1d847
[ "MIT" ]
1
2018-10-04T15:12:37.000Z
2018-10-04T15:12:37.000Z
appointment-conflicts/appointment-conflicts.py
cirosantilli/algorithms-fork
7fd932f460610136af01c1cdd70b0d3997b1d847
[ "MIT" ]
null
null
null
appointment-conflicts/appointment-conflicts.py
cirosantilli/algorithms-fork
7fd932f460610136af01c1cdd70b0d3997b1d847
[ "MIT" ]
null
null
null
#!/usr/bin/env python class Appointment(object): def __init__(self, name, start, end): self.name = name self.start = start self.end = end def __lt__(self, other): return self.start < other.start def __str__(self): return self.name def __repr__(self): r...
24.954545
85
0.568306
class Appointment(object): def __init__(self, name, start, end): self.name = name self.start = start self.end = end def __lt__(self, other): return self.start < other.start def __str__(self): return self.name def __repr__(self): return self.name def ...
false
true
f7478f94cf0c8889ef90c08e548d89f37f14e481
4,786
py
Python
python2/koans/about_classes.py
nitinnain/python_koans
271e291911d2d42a1afdace69048374527089a6e
[ "MIT" ]
1
2017-09-01T20:51:57.000Z
2017-09-01T20:51:57.000Z
python2/koans/about_classes.py
nitinnain/python_koans
271e291911d2d42a1afdace69048374527089a6e
[ "MIT" ]
null
null
null
python2/koans/about_classes.py
nitinnain/python_koans
271e291911d2d42a1afdace69048374527089a6e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutClasses(Koan): class Dog(object): "Dogs need regular walkies. Never, ever let them drive." def test_instances_of_classes_can_be_created_adding_parentheses(self): fido = self.Dog() self.assertEqual(Abou...
30.291139
79
0.578771
from runner.koan import * class AboutClasses(Koan): class Dog(object): def test_instances_of_classes_can_be_created_adding_parentheses(self): fido = self.Dog() self.assertEqual(AboutClasses.Dog, fido.__class__) def test_classes_have_docstrings(self): self.assertMatch('Dogs', s...
true
true
f7479018db9b66fc7c858f3b5630f1b963f5f603
416
py
Python
myp/scripts/funcs.py
YunisDEV/py-scripts
c9eccffa3e69bb32a46fef94e0517a149f3701ea
[ "MIT" ]
2
2021-04-03T14:16:16.000Z
2021-04-03T15:38:32.000Z
myp/scripts/funcs.py
YunisDEV/py-scripts
c9eccffa3e69bb32a46fef94e0517a149f3701ea
[ "MIT" ]
null
null
null
myp/scripts/funcs.py
YunisDEV/py-scripts
c9eccffa3e69bb32a46fef94e0517a149f3701ea
[ "MIT" ]
2
2021-04-15T10:28:28.000Z
2021-04-28T19:22:16.000Z
from ..package import MYPReader def addScript(name: str, command: str, description: str = ""): myp = MYPReader() myp.add_script( name=name, command=command, description=description, ) myp.write() print('Script added successfully.') def removeScript(name: str): myp = MY...
21.894737
62
0.639423
from ..package import MYPReader def addScript(name: str, command: str, description: str = ""): myp = MYPReader() myp.add_script( name=name, command=command, description=description, ) myp.write() print('Script added successfully.') def removeScript(name: str): myp = MY...
true
true
f747908f394527767f742247f53f02121243cac2
14,082
py
Python
fairseq/options.py
JustCunn/fairseq
ed74f553041c1b453603bfb20a36558d3e984e89
[ "MIT" ]
null
null
null
fairseq/options.py
JustCunn/fairseq
ed74f553041c1b453603bfb20a36558d3e984e89
[ "MIT" ]
null
null
null
fairseq/options.py
JustCunn/fairseq
ed74f553041c1b453603bfb20a36558d3e984e89
[ "MIT" ]
null
null
null
# 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. import argparse from typing import Callable, List, Optional import torch from fairseq import utils from fairseq.data.indexed_dataset import g...
38.059459
88
0.680443
import argparse from typing import Callable, List, Optional import torch from fairseq import utils from fairseq.data.indexed_dataset import get_available_dataset_impl from fairseq.dataclass.configs import ( CheckpointConfig, CommonConfig, CommonEvalConfig, DatasetConfig, DistributedTrainingCon...
true
true
f74791365421e4998aebdc28a233685654c86c40
9,410
py
Python
ce-host/4.4.0/download_apps.py
GluuFederation/community-edition-build
3254104b0c78c42994f023e9021e67e59782e079
[ "MIT" ]
null
null
null
ce-host/4.4.0/download_apps.py
GluuFederation/community-edition-build
3254104b0c78c42994f023e9021e67e59782e079
[ "MIT" ]
null
null
null
ce-host/4.4.0/download_apps.py
GluuFederation/community-edition-build
3254104b0c78c42994f023e9021e67e59782e079
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import os import sys import json import zipfile import shutil from urllib.request import urlretrieve cur_dir = os.path.dirname(os.path.realpath(__file__)) app_dir = os.path.join(cur_dir, 'opt/dist/app') gluu_app_dir = os.path.join(cur_dir, 'opt/dist/gluu') target = 'el7' if '-el8' in sys.argv: ...
65.804196
254
0.700956
import os import sys import json import zipfile import shutil from urllib.request import urlretrieve cur_dir = os.path.dirname(os.path.realpath(__file__)) app_dir = os.path.join(cur_dir, 'opt/dist/app') gluu_app_dir = os.path.join(cur_dir, 'opt/dist/gluu') target = 'el7' if '-el8' in sys.argv: target = 'el8' e...
true
true
f74791dee96b2b58cbf62de16d4f52044d96fcf3
2,121
py
Python
examples/workbench/persistent_workspace.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
1,080
2015-01-04T14:29:34.000Z
2022-03-29T05:44:51.000Z
examples/workbench/persistent_workspace.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
308
2015-01-05T22:44:13.000Z
2022-03-30T21:19:18.000Z
examples/workbench/persistent_workspace.py
xtuzy/enaml
a1b5c0df71c665b6ef7f61d21260db92d77d9a46
[ "BSD-3-Clause-Clear" ]
123
2015-01-25T16:33:48.000Z
2022-02-25T19:57:10.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #-----------------------------------------------------...
27.545455
79
0.623762
from __future__ import print_function import pickle from atom.api import Str from enaml.widgets.api import Container from enaml.workbench.ui.api import Workspace import enaml with enaml.imports(): from persistent_view import PersistentManifest, create_new_area print('Imported Persistent Workspace!') ...
true
true
f747923b2ff37ac666d143a133db0d97c3ec5935
277
py
Python
Libraries/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-macosx-10.5-intel.egg/matplotlib/ft2font.py
mlewis1973/pyosirix
77757744f250ea1e3be083f50dce70f7aa094c5d
[ "BSD-3-Clause" ]
20
2016-02-02T10:31:41.000Z
2021-11-08T08:35:25.000Z
Libraries/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-macosx-10.5-intel.egg/matplotlib/ft2font.py
mlewis1973/pyosirix
77757744f250ea1e3be083f50dce70f7aa094c5d
[ "BSD-3-Clause" ]
7
2016-10-21T04:15:22.000Z
2020-02-15T04:06:19.000Z
Libraries/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib-1.4.3-py2.7-macosx-10.5-intel.egg/matplotlib/ft2font.py
mlewis1973/pyosirix
77757744f250ea1e3be083f50dce70f7aa094c5d
[ "BSD-3-Clause" ]
9
2018-01-24T21:46:10.000Z
2022-03-08T09:42:42.000Z
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__,'ft2font.so') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
34.625
68
0.783394
def __bootstrap__(): global __bootstrap__, __loader__, __file__ import sys, pkg_resources, imp __file__ = pkg_resources.resource_filename(__name__,'ft2font.so') __loader__ = None; del __bootstrap__, __loader__ imp.load_dynamic(__name__,__file__) __bootstrap__()
true
true
f74792be1e23962965f628b6e167020dda6c1633
7,018
py
Python
src/demo-question-gen.py
chris4540/StudyMaskedLMForQG
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
[ "MIT" ]
6
2020-12-09T11:30:37.000Z
2022-03-03T12:06:44.000Z
src/demo-question-gen.py
chris4540/StudyMaskedLMForQG
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
[ "MIT" ]
null
null
null
src/demo-question-gen.py
chris4540/StudyMaskedLMForQG
2bf477b7b8cfb5d195c028db6d63aadf06af8fc5
[ "MIT" ]
3
2021-03-23T04:56:48.000Z
2022-02-02T19:31:46.000Z
""" This script is to generate """ import os import torch from pathlib import Path from dataclasses import dataclass from utils import save_as_json from utils.logging import logging from models.tokenizer import BertTokenizerWithHLAns from utils.data.datasets.squad import QnGenHLCtxtDataset from utils.eval import clean_...
33.419048
129
0.603163
import os import torch from pathlib import Path from dataclasses import dataclass from utils import save_as_json from utils.logging import logging from models.tokenizer import BertTokenizerWithHLAns from utils.data.datasets.squad import QnGenHLCtxtDataset from utils.eval import clean_hypothesis from utils.logging impor...
true
true
f74792d2a177aa7e4fe363a467a4c6f3e452c4b4
1,501
py
Python
api/urls.py
qinyanjuidavid/Dhana
5a97ab224897bb87ce69d476a88930f3012ae7c5
[ "MIT" ]
null
null
null
api/urls.py
qinyanjuidavid/Dhana
5a97ab224897bb87ce69d476a88930f3012ae7c5
[ "MIT" ]
null
null
null
api/urls.py
qinyanjuidavid/Dhana
5a97ab224897bb87ce69d476a88930f3012ae7c5
[ "MIT" ]
1
2022-02-14T19:11:08.000Z
2022-02-14T19:11:08.000Z
from django.urls import path from accounts.views.api_views import (LoginViewSet, CustomerRegistrationViewSet, RefreshViewSet, VerifyEmail, RequestPasswordResetEmail, Pa...
38.487179
73
0.596269
from django.urls import path from accounts.views.api_views import (LoginViewSet, CustomerRegistrationViewSet, RefreshViewSet, VerifyEmail, RequestPasswordResetEmail, Pa...
true
true
f74793ccfaaff9fb8636b1e21cf893f6952f3e68
4,423
py
Python
Cognitive-Code/Cognitive-Face-Python/sample/view/panel_group.py
PacktPublishing/Smarter-Web-Apps-with-Azure-ML-and-Cognitive-Services
eddf766e6527fd5f4dc55b0ff94253554e906aca
[ "MIT" ]
1
2019-10-30T13:31:12.000Z
2019-10-30T13:31:12.000Z
Cognitive-Code/Cognitive-Face-Python/sample/view/panel_group.py
PacktPublishing/Smarter-Web-Apps-with-Azure-ML-and-Cognitive-Services
eddf766e6527fd5f4dc55b0ff94253554e906aca
[ "MIT" ]
null
null
null
Cognitive-Code/Cognitive-Face-Python/sample/view/panel_group.py
PacktPublishing/Smarter-Web-Apps-with-Azure-ML-and-Cognitive-Services
eddf766e6527fd5f4dc55b0ff94253554e906aca
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ File: panel_group.py Description: Group Panel for Python SDK sample. """ import os import wx import wx.lib.scrolledpanel as scrolled import util import model from view import base class GroupPanel(base.MyPanel): """Group Panel.""" def _...
33.507576
80
0.562062
import os import wx import wx.lib.scrolledpanel as scrolled import util import model from view import base class GroupPanel(base.MyPanel): def __init__(self, parent): super(GroupPanel, self).__init__(parent) self.face_paths = [] self.faces = {} self.vsize...
true
true
f74795354f53f05ecf0fdb70180fca9f5cf71dd1
2,111
py
Python
get_stats.py
ctsit/HCV_Target_reports
971ab5883dd44d136e7c818076fdaa553f30746b
[ "Apache-2.0" ]
null
null
null
get_stats.py
ctsit/HCV_Target_reports
971ab5883dd44d136e7c818076fdaa553f30746b
[ "Apache-2.0" ]
null
null
null
get_stats.py
ctsit/HCV_Target_reports
971ab5883dd44d136e7c818076fdaa553f30746b
[ "Apache-2.0" ]
null
null
null
import json from copy import copy from stat_utils import * with open('time_trimmed.json', 'r') as infile: data = json.loads(infile.read()) subject_stats = {} inr_fields = [ 'inr_im_lborres', ] chem_fields = [ 'alt_im_lborres', 'ast_im_lborres', 'dbil_im_lborres', 'tbil_im_lborres', ] inr_dat...
36.396552
100
0.637139
import json from copy import copy from stat_utils import * with open('time_trimmed.json', 'r') as infile: data = json.loads(infile.read()) subject_stats = {} inr_fields = [ 'inr_im_lborres', ] chem_fields = [ 'alt_im_lborres', 'ast_im_lborres', 'dbil_im_lborres', 'tbil_im_lborres', ] inr_dat...
true
true
f747962537642081b1e1264a180e5441e805a5f3
4,587
bzl
Python
scala/private/rules/scala_junit_test.bzl
justinass-wix/rules_scala
4ba3780fcba8d26980daff4639abc6f18517308b
[ "Apache-2.0" ]
null
null
null
scala/private/rules/scala_junit_test.bzl
justinass-wix/rules_scala
4ba3780fcba8d26980daff4639abc6f18517308b
[ "Apache-2.0" ]
null
null
null
scala/private/rules/scala_junit_test.bzl
justinass-wix/rules_scala
4ba3780fcba8d26980daff4639abc6f18517308b
[ "Apache-2.0" ]
null
null
null
"""Rules for writing tests with JUnit""" load("@bazel_skylib//lib:dicts.bzl", _dicts = "dicts") load( "@io_bazel_rules_scala//scala/private:common_attributes.bzl", "common_attrs", "implicit_deps", "launcher_template", ) load("@io_bazel_rules_scala//scala/private:common_outputs.bzl", "common_outputs") l...
32.764286
117
0.649226
load("@bazel_skylib//lib:dicts.bzl", _dicts = "dicts") load( "@io_bazel_rules_scala//scala/private:common_attributes.bzl", "common_attrs", "implicit_deps", "launcher_template", ) load("@io_bazel_rules_scala//scala/private:common_outputs.bzl", "common_outputs") load( "@io_bazel_rules_scala//scala/pr...
true
true
f747967f1e57469dda9646f7724de30cd7b34d4d
190
py
Python
selectable/tests/views.py
zeehio/django-selectable
40c44559320a98229091b56c034e145eb77e24af
[ "BSD-2-Clause" ]
null
null
null
selectable/tests/views.py
zeehio/django-selectable
40c44559320a98229091b56c034e145eb77e24af
[ "BSD-2-Clause" ]
null
null
null
selectable/tests/views.py
zeehio/django-selectable
40c44559320a98229091b56c034e145eb77e24af
[ "BSD-2-Clause" ]
1
2020-01-08T09:08:21.000Z
2020-01-08T09:08:21.000Z
from django.http import HttpResponseNotFound, HttpResponseServerError def test_404(request): return HttpResponseNotFound() def test_500(request): return HttpResponseServerError()
21.111111
69
0.810526
from django.http import HttpResponseNotFound, HttpResponseServerError def test_404(request): return HttpResponseNotFound() def test_500(request): return HttpResponseServerError()
true
true
f74796ba3553291863fd3571b824b19bdea6374e
4,614
py
Python
heat/openstack/common/loopingcall.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
1
2015-02-26T03:23:23.000Z
2015-02-26T03:23:23.000Z
heat/openstack/common/loopingcall.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
heat/openstack/common/loopingcall.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
31.60274
78
0.596446
import sys from eventlet import event from eventlet import greenthread from heat.openstack.common.gettextutils import _ from heat.openstack.common import log as logging from heat.openstack.common import timeutils LOG = logging.getLogger(__name__) class LoopingCallDone(Exception): def __init__...
true
true
f74796e8e99bbf614222fa8ec6db5b66a8c564ba
1,810
py
Python
comparison/without/buttons.py
cheery/elm-bonsai
22fe5f731bf2b3d711c15e4aa6316eefde4754e0
[ "BSD-3-Clause" ]
null
null
null
comparison/without/buttons.py
cheery/elm-bonsai
22fe5f731bf2b3d711c15e4aa6316eefde4754e0
[ "BSD-3-Clause" ]
null
null
null
comparison/without/buttons.py
cheery/elm-bonsai
22fe5f731bf2b3d711c15e4aa6316eefde4754e0
[ "BSD-3-Clause" ]
null
null
null
import pygame, time, sys class VirtualButton(object): def __init__(self, key, x, y): self.key = key self.down = False self.x = x self.y = y left = VirtualButton(pygame.K_LEFT, 0, 1) up = VirtualButton(pygame.K_UP, 1, 0) right = VirtualButton(pygame.K_RIGHT, 2, 1) down = VirtualButt...
24.794521
74
0.553039
import pygame, time, sys class VirtualButton(object): def __init__(self, key, x, y): self.key = key self.down = False self.x = x self.y = y left = VirtualButton(pygame.K_LEFT, 0, 1) up = VirtualButton(pygame.K_UP, 1, 0) right = VirtualButton(pygame.K_RIGHT, 2, 1) down = VirtualButt...
true
true
f747977ad041e44d2ca3058c7a889ea0a8da1bb2
37
py
Python
IPC/Servers/__init__.py
Seniatical/IPC
145461a932974cb1e2125a134bcda0d12a54dae3
[ "MIT" ]
null
null
null
IPC/Servers/__init__.py
Seniatical/IPC
145461a932974cb1e2125a134bcda0d12a54dae3
[ "MIT" ]
null
null
null
IPC/Servers/__init__.py
Seniatical/IPC
145461a932974cb1e2125a134bcda0d12a54dae3
[ "MIT" ]
null
null
null
from . import ( Async, Sync )
9.25
16
0.513514
from . import ( Async, Sync )
true
true
f74797a94aef29b7dc515687b9016fd59decbd26
14,911
py
Python
test_cyclegan.py
hsuRush/CC-CycleGAN
99646b3bae3bb014ee4b19330531b885a1bfddc1
[ "MIT" ]
null
null
null
test_cyclegan.py
hsuRush/CC-CycleGAN
99646b3bae3bb014ee4b19330531b885a1bfddc1
[ "MIT" ]
null
null
null
test_cyclegan.py
hsuRush/CC-CycleGAN
99646b3bae3bb014ee4b19330531b885a1bfddc1
[ "MIT" ]
null
null
null
from __future__ import print_function, division import scipy from keras.datasets import mnist from instanceNormalization import InstanceNormalization from keras.layers import Input, Dense, Reshape, Flatten, Dropout, Concatenate, GRU, CuDNNGRU, Bidirectional, Lambda from keras.layers import BatchNormalization, Activati...
41.534819
186
0.609684
from __future__ import print_function, division import scipy from keras.datasets import mnist from instanceNormalization import InstanceNormalization from keras.layers import Input, Dense, Reshape, Flatten, Dropout, Concatenate, GRU, CuDNNGRU, Bidirectional, Lambda from keras.layers import BatchNormalization, Activati...
true
true
f74798fffdbb99b5d1e2462eefa184c2e70a558b
11,589
py
Python
python/ray/rllib/agents/impala/vtrace_test.py
BnJam/ray
c32658ff7550f8672923ca6d824d85c5efd82a5b
[ "Apache-2.0" ]
3
2018-06-06T22:36:49.000Z
2018-06-06T22:41:55.000Z
python/ray/rllib/agents/impala/vtrace_test.py
BnJam/ray
c32658ff7550f8672923ca6d824d85c5efd82a5b
[ "Apache-2.0" ]
2
2019-01-28T00:31:25.000Z
2019-11-26T16:57:06.000Z
python/ray/rllib/agents/impala/vtrace_test.py
BnJam/ray
c32658ff7550f8672923ca6d824d85c5efd82a5b
[ "Apache-2.0" ]
2
2020-03-26T16:32:08.000Z
2021-02-05T17:04:11.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
43.081784
79
0.622918
from __future__ import absolute_import from __future__ import division from __future__ import print_function from absl.testing import parameterized import numpy as np import tensorflow as tf import vtrace def _shaped_arange(*shape): return np.arange(np.prod(shape), dtype=np.float32).reshape(*shape)...
true
true
f747998c74b5ab9e185d7dc6b9a2e6d002f2387c
1,950
py
Python
yardstick/benchmark/scenarios/cmri/openlab/router_add_interface.py
mythwm/yardstick-wm
319ced11df92456b42c80cfd6e53c66dbd22a746
[ "Apache-2.0" ]
1
2019-12-08T21:57:31.000Z
2019-12-08T21:57:31.000Z
yardstick/benchmark/scenarios/cmri/openlab/router_add_interface.py
mythwm/yardstick-wm
319ced11df92456b42c80cfd6e53c66dbd22a746
[ "Apache-2.0" ]
null
null
null
yardstick/benchmark/scenarios/cmri/openlab/router_add_interface.py
mythwm/yardstick-wm
319ced11df92456b42c80cfd6e53c66dbd22a746
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others. # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, ...
33.050847
78
0.607179
true
true
f74799a30b8b567e6c177d2af34483f162be421a
20,960
py
Python
reportlab/lib/normalDate.py
gustavohenrique/wms
ec3632626d63d1662c0aa1a4693dd091ba55eb39
[ "CC-BY-3.0" ]
1
2015-08-06T20:58:05.000Z
2015-08-06T20:58:05.000Z
reportlab/lib/normalDate.py
gustavohenrique/wms
ec3632626d63d1662c0aa1a4693dd091ba55eb39
[ "CC-BY-3.0" ]
null
null
null
reportlab/lib/normalDate.py
gustavohenrique/wms
ec3632626d63d1662c0aa1a4693dd091ba55eb39
[ "CC-BY-3.0" ]
1
2020-01-26T20:48:06.000Z
2020-01-26T20:48:06.000Z
#!/usr/bin/env python # normalDate.py - version 1.0 - 20000717 #hacked by Robin Becker 10/Apr/2001 #major changes include # using Types instead of type(0) etc # BusinessDate class # __radd__, __rsub__ methods # formatMS stuff # derived from an original version created # by Jeff Bauer of Rubicon Research and us...
33.697749
103
0.57791
__version__=''' $Id: normalDate.py 3342 2008-12-12 15:55:34Z andy $ ''' __doc__="Jeff Bauer's lightweight date class, extended by us. Predates Python's datetime module." _bigBangScalar = -4345732 _bigCrunchScalar = 2958463 _daysInMonthNormal = [31,28,31,30,31,30,31,31,30,31,30,31] _daysInMonthLeapYea...
false
true
f7479a2c5aaa7806b90c8dc48cc52fc586bbfd1a
6,546
py
Python
pdf4me/Pdf4mePythonClientApi/pdf4me/model/protect_action.py
pdf4me/pdf4me-clientapi-python
17a1c1baae861369084d658475be56be42ca92d0
[ "MIT" ]
1
2020-06-30T22:18:17.000Z
2020-06-30T22:18:17.000Z
pdf4me/Pdf4mePythonClientApi/pdf4me/model/protect_action.py
pdf4me/pdf4me-clientapi-python
17a1c1baae861369084d658475be56be42ca92d0
[ "MIT" ]
null
null
null
pdf4me/Pdf4mePythonClientApi/pdf4me/model/protect_action.py
pdf4me/pdf4me-clientapi-python
17a1c1baae861369084d658475be56be42ca92d0
[ "MIT" ]
1
2018-07-10T17:40:37.000Z
2018-07-10T17:40:37.000Z
# coding: utf-8 """ Pdf4me No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class...
28.837004
157
0.582799
import pprint import re import six class ProtectAction(object): swagger_types = { 'user_password': 'str', 'owner_password': 'str', 'unlock': 'bool', 'permissions': 'list[str]', 'action_id': 'str' } attribute_map = { 'user_password': 'userPassword', ...
true
true
f7479a8edc59b66f47e1e9e7e598ec5457983053
16,697
py
Python
livestyled/models/product.py
Edvinas9/python-sdk
e24413b337f7d2232e28944b93ded7a430df0293
[ "MIT" ]
null
null
null
livestyled/models/product.py
Edvinas9/python-sdk
e24413b337f7d2232e28944b93ded7a430df0293
[ "MIT" ]
1
2020-05-21T10:01:07.000Z
2020-05-21T10:01:07.000Z
livestyled/models/product.py
livestyled/python-sdk
e75263e8bbf7132e4ce0e69d0ca3ad19088661b2
[ "MIT" ]
3
2021-02-01T10:13:36.000Z
2022-02-11T17:47:30.000Z
from typing import List from livestyled.models.fulfilment_point import FulfilmentPoint class ProductVariant: def __init__( self, id, price, stocks, external_id, translations, product, tax=None, tax_rate=No...
30.52468
112
0.547883
from typing import List from livestyled.models.fulfilment_point import FulfilmentPoint class ProductVariant: def __init__( self, id, price, stocks, external_id, translations, product, tax=None, tax_rate=No...
true
true
f7479b3e9fb52398e0f6ad625114aaf2a9307de0
1,867
py
Python
utils/bot.py
davisschenk/Unnamed-Bot
8e05d5a79dfab768574efd4e9061e2d7b22ae9e5
[ "MIT" ]
null
null
null
utils/bot.py
davisschenk/Unnamed-Bot
8e05d5a79dfab768574efd4e9061e2d7b22ae9e5
[ "MIT" ]
null
null
null
utils/bot.py
davisschenk/Unnamed-Bot
8e05d5a79dfab768574efd4e9061e2d7b22ae9e5
[ "MIT" ]
null
null
null
from discord.ext import commands import discord import sys from pathlib import Path import motor.motor_asyncio from config import token, extension_dir from utils.context import UnnamedContext from utils.help import PaginatedHelpCommand class UnnamedBot(commands.Bot): def __init__(self, command_prefix, **options):...
34.574074
83
0.626674
from discord.ext import commands import discord import sys from pathlib import Path import motor.motor_asyncio from config import token, extension_dir from utils.context import UnnamedContext from utils.help import PaginatedHelpCommand class UnnamedBot(commands.Bot): def __init__(self, command_prefix, **options):...
true
true
f7479bc755c5493c55979e8e4e49714f22116282
6,587
py
Python
retro/examples/brute.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
2,706
2018-04-05T18:28:50.000Z
2022-03-29T16:56:59.000Z
retro/examples/brute.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
242
2018-04-05T22:30:42.000Z
2022-03-19T01:55:11.000Z
retro/examples/brute.py
MatPoliquin/retro
c70c174a9818d1e97bc36e61abb4694d28fc68e1
[ "MIT-0", "MIT" ]
464
2018-04-05T19:10:34.000Z
2022-03-28T13:33:32.000Z
""" Implementation of the Brute from "Revisiting the Arcade Learning Environment: Evaluation Protocols and Open Problems for General Agents" by Machado et al. https://arxiv.org/abs/1709.06009 This is an agent that uses the determinism of the environment in order to do pretty well at a number of retro games. It does n...
28.764192
109
0.609838
import random import argparse import numpy as np import retro import gym EXPLORATION_PARAM = 0.005 class Frameskip(gym.Wrapper): def __init__(self, env, skip=4): super().__init__(env) self._skip = skip def reset(self): return self.env.reset() def step(self, act): tota...
true
true
f7479c731f41f66c69005d15cdc90cdfeb1005f0
2,007
py
Python
test/test_adapter_port_channel_settings_ref.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
21
2018-03-29T14:20:35.000Z
2021-10-13T05:11:41.000Z
test/test_adapter_port_channel_settings_ref.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
14
2018-01-30T15:45:46.000Z
2022-02-23T14:23:21.000Z
test/test_adapter_port_channel_settings_ref.py
sdnit-se/intersight-python
551f7685c0f76bb8af60ec83ffb6f9672d49a4ae
[ "Apache-2.0" ]
18
2018-01-03T15:09:56.000Z
2021-07-16T02:21:54.000Z
# coding: utf-8 """ Cisco Intersight Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen...
52.815789
1,052
0.790234
from __future__ import absolute_import import unittest import intersight from intersight.models.adapter_port_channel_settings_ref import AdapterPortChannelSettingsRef from intersight.rest import ApiException class TestAdapterPortChannelSettingsRef(unittest.TestCase): def setUp(self): pass def t...
true
true
f7479ca1fa7f09e8b4efb22fabc1182c04b1cf52
8,557
py
Python
fanbeams.py
ewanbarr/UtmostFanbeamMapper
e20721c4b21fd94977eb48503b81a784a8666045
[ "Apache-2.0" ]
null
null
null
fanbeams.py
ewanbarr/UtmostFanbeamMapper
e20721c4b21fd94977eb48503b81a784a8666045
[ "Apache-2.0" ]
null
null
null
fanbeams.py
ewanbarr/UtmostFanbeamMapper
e20721c4b21fd94977eb48503b81a784a8666045
[ "Apache-2.0" ]
null
null
null
from astropy.io import fits from coords import nsew_of_constant_dec,Molonglo,hadec_to_nsew from scipy.ndimage import filters import ephem as e import numpy as np import copy SEC_TO_SID = 0.9972685185185185 # convert seconds to siderial "seconds" EW_R = np.radians(2.0) # EW beam HWHM NS_R = np.radians(1.0) # NS beam HW...
32.911538
85
0.630595
from astropy.io import fits from coords import nsew_of_constant_dec,Molonglo,hadec_to_nsew from scipy.ndimage import filters import ephem as e import numpy as np import copy SEC_TO_SID = 0.9972685185185185 EW_R = np.radians(2.0) NS_R = np.radians(1.0) class FanBeamTimeMap(object): def __init__(self,data,lsts):...
true
true
f7479d3ff69d52dff8870c93039f17582d44299f
987
py
Python
code/haha.py
Siemingfong/FilmFeatureCrawler
98ab581ca8d9df70452ff28a8d061dc658461459
[ "MIT" ]
null
null
null
code/haha.py
Siemingfong/FilmFeatureCrawler
98ab581ca8d9df70452ff28a8d061dc658461459
[ "MIT" ]
null
null
null
code/haha.py
Siemingfong/FilmFeatureCrawler
98ab581ca8d9df70452ff28a8d061dc658461459
[ "MIT" ]
null
null
null
import time import random import datetime from bs4 import BeautifulSoup as bs import pandas as pd import os import json import requests month=['01','02','03','04','05','06','07','08','09','10','11','12'] year=['2015','2016','2017','2018','2019','2020'] date=[] movies=[] def craw(startdate,enddate): ...
24.073171
102
0.577508
import time import random import datetime from bs4 import BeautifulSoup as bs import pandas as pd import os import json import requests month=['01','02','03','04','05','06','07','08','09','10','11','12'] year=['2015','2016','2017','2018','2019','2020'] date=[] movies=[] def craw(startdate,enddate): ...
true
true
f7479d47d68e9fe3cd0ca67bc1a3837be3f1d6e9
2,156
py
Python
pysnmp/SUPERMICRO-SMI.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/SUPERMICRO-SMI.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/SUPERMICRO-SMI.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module SUPERMICRO-SMI (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SUPERMICRO-SMI # Produced by pysmi-0.3.4 at Mon Apr 29 21:04:30 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2...
93.73913
505
0.78525
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsUnion, ValueRangeConstraint, SingleValueConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuild...
true
true
f7479d944404ffef1df7ac15eba4b8cbcda06d47
1,993
py
Python
app/core/tests/test_models.py
trstocks/recipe-app-api
6b8531365a9334613018955dac502c76939d66d9
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
trstocks/recipe-app-api
6b8531365a9334613018955dac502c76939d66d9
[ "MIT" ]
null
null
null
app/core/tests/test_models.py
trstocks/recipe-app-api
6b8531365a9334613018955dac502c76939d66d9
[ "MIT" ]
null
null
null
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@ceratopsdev.com', password='testPass'): """Create a sample user""" return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_...
33.216667
69
0.64576
from django.test import TestCase from django.contrib.auth import get_user_model from core import models def sample_user(email='test@ceratopsdev.com', password='testPass'): return get_user_model().objects.create_user(email, password) class ModelTests(TestCase): def test_create_user_with_email_successful(self...
true
true
f7479eac9e9c4697f6fb040e22d009a76ee5125a
2,170
py
Python
polII-wf/scripts/plot_boxplot_polII.py
jfear/larval_gonad
624a71741864b74e0372f89bdcca578e5cca3722
[ "MIT" ]
1
2019-09-13T13:24:18.000Z
2019-09-13T13:24:18.000Z
polII-wf/scripts/plot_boxplot_polII.py
jfear/larval_gonad
624a71741864b74e0372f89bdcca578e5cca3722
[ "MIT" ]
65
2019-07-24T16:23:08.000Z
2020-03-06T22:18:47.000Z
polII-wf/scripts/plot_boxplot_polII.py
jfear/larval_gonad
624a71741864b74e0372f89bdcca578e5cca3722
[ "MIT" ]
1
2021-06-02T19:09:35.000Z
2021-06-02T19:09:35.000Z
"""Playing with plots for galletta""" import os import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from scipy.stats import ttest_ind from larval_gonad.plotting.stats import pval_to_string def main(): plt.style.use(["2c", "science_base"]) fig, ...
28.552632
106
0.649309
import os import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import pandas as pd import seaborn as sns from scipy.stats import ttest_ind from larval_gonad.plotting.stats import pval_to_string def main(): plt.style.use(["2c", "science_base"]) fig, (ax1, ax2) = plt.subplots(1, 2, figsiz...
true
true
f7479ee917f94d0dd68d4355400184538d3afd89
243
py
Python
other/remove_pdf_extra_newline_and_blank.py
zzvsjs1/MyPyScripts
0b161d8a0096c5253d2c6a9e7d5c9bebcfbe0f07
[ "MIT" ]
null
null
null
other/remove_pdf_extra_newline_and_blank.py
zzvsjs1/MyPyScripts
0b161d8a0096c5253d2c6a9e7d5c9bebcfbe0f07
[ "MIT" ]
null
null
null
other/remove_pdf_extra_newline_and_blank.py
zzvsjs1/MyPyScripts
0b161d8a0096c5253d2c6a9e7d5c9bebcfbe0f07
[ "MIT" ]
null
null
null
import re import pyperclip def remove(string: str): return re.sub(r'\s+', ' ', string) # return re.sub(r' {2,}', ' ', re.sub(r'\s+', ' ', string)) if __name__ == '__main__': pyperclip.copy(remove(pyperclip.paste()))
20.25
64
0.563786
import re import pyperclip def remove(string: str): return re.sub(r'\s+', ' ', string) if __name__ == '__main__': pyperclip.copy(remove(pyperclip.paste()))
true
true
f7479f1a05ace202d6234fbd90b428551eb021a1
7,989
py
Python
testplan/testing/cpp/cppunit.py
Morgan-Stanley/Testplan
9374d6e0da6ae9aa7a1b5e08b42cd21993485837
[ "Apache-2.0" ]
null
null
null
testplan/testing/cpp/cppunit.py
Morgan-Stanley/Testplan
9374d6e0da6ae9aa7a1b5e08b42cd21993485837
[ "Apache-2.0" ]
null
null
null
testplan/testing/cpp/cppunit.py
Morgan-Stanley/Testplan
9374d6e0da6ae9aa7a1b5e08b42cd21993485837
[ "Apache-2.0" ]
null
null
null
import os from schema import Or from testplan.common.config import ConfigOption from ..base import ProcessRunnerTest, ProcessRunnerTestConfig from ...importers.cppunit import CPPUnitResultImporter, CPPUnitImportedResult class CppunitConfig(ProcessRunnerTestConfig): """ Configuration object for :py:class:`~...
35.506667
80
0.620729
import os from schema import Or from testplan.common.config import ConfigOption from ..base import ProcessRunnerTest, ProcessRunnerTestConfig from ...importers.cppunit import CPPUnitResultImporter, CPPUnitImportedResult class CppunitConfig(ProcessRunnerTestConfig): @classmethod def get_options(cls): ...
true
true
f747a128dd5f65a9a77ed19626010476b4bedd9c
2,337
py
Python
veriloggen/types/util.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
232
2015-09-01T16:07:48.000Z
2022-03-28T14:53:28.000Z
veriloggen/types/util.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
34
2015-08-21T09:13:03.000Z
2022-03-21T23:52:44.000Z
veriloggen/types/util.py
jesseclin/veriloggen
a645f2c53f04e5b88213eef17779d212192ea2b5
[ "Apache-2.0" ]
46
2015-09-24T14:39:57.000Z
2022-02-23T21:59:56.000Z
from __future__ import absolute_import from __future__ import print_function import math import veriloggen.core.vtypes as vtypes import veriloggen.seq.seq as seq t_Input = 'Input' t_Output = 'Output' t_Wire = 'Wire' t_Reg = 'Reg' t_OutputReg = 'OutputReg' def swap_type(cls): return cls._O, cls._I def make_po...
26.556818
64
0.650407
from __future__ import absolute_import from __future__ import print_function import math import veriloggen.core.vtypes as vtypes import veriloggen.seq.seq as seq t_Input = 'Input' t_Output = 'Output' t_Wire = 'Wire' t_Reg = 'Reg' t_OutputReg = 'OutputReg' def swap_type(cls): return cls._O, cls._I def make_po...
true
true
f747a137f6b9b07a00971eac458b7351f435900e
849
py
Python
timeapp/urls.py
jameskomo/time-management-system
0f3f24db276b2d6e4fcd86a71b368cae512d90fc
[ "MIT" ]
1
2020-07-26T11:37:40.000Z
2020-07-26T11:37:40.000Z
timeapp/urls.py
jameskomo/time-management-system
0f3f24db276b2d6e4fcd86a71b368cae512d90fc
[ "MIT" ]
10
2020-02-12T00:39:16.000Z
2022-02-10T07:47:02.000Z
timeapp/urls.py
jameskomo/time-management-system
0f3f24db276b2d6e4fcd86a71b368cae512d90fc
[ "MIT" ]
null
null
null
from django.urls import path from django.conf.urls import url from .views import ( PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, ) from . import views urlpatterns = [ path('', PostListView.as_view(), name='timeapp-home'), path('post/<int:pk>/', PostDetailVie...
35.375
80
0.667845
from django.urls import path from django.conf.urls import url from .views import ( PostListView, PostDetailView, PostCreateView, PostUpdateView, PostDeleteView, ) from . import views urlpatterns = [ path('', PostListView.as_view(), name='timeapp-home'), path('post/<int:pk>/', PostDetailVie...
true
true
f747a25cb33515649e1486af9ce9335f320c79d2
3,360
py
Python
frappe/email/doctype/email_alert/test_email_alert.py
khatrijitendra/lumalock-frappe
b3864278dad21dde5c53604be65aa56c79e5d909
[ "MIT" ]
null
null
null
frappe/email/doctype/email_alert/test_email_alert.py
khatrijitendra/lumalock-frappe
b3864278dad21dde5c53604be65aa56c79e5d909
[ "MIT" ]
7
2020-03-24T17:07:47.000Z
2022-03-11T23:49:25.000Z
frappe/email/doctype/email_alert/test_email_alert.py
khatrijitendra/lumalock-frappe
b3864278dad21dde5c53604be65aa56c79e5d909
[ "MIT" ]
3
2016-01-19T10:59:53.000Z
2018-03-21T16:26:43.000Z
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe, frappe.utils, frappe.utils.scheduler import unittest test_records = frappe.get_test_records('Email Alert') class TestEmailAlert(unittest.TestCase): def setUp(self): frappe....
33.6
90
0.71369
from __future__ import unicode_literals import frappe, frappe.utils, frappe.utils.scheduler import unittest test_records = frappe.get_test_records('Email Alert') class TestEmailAlert(unittest.TestCase): def setUp(self): frappe.db.sql("""delete from `tabBulk Email`""") frappe.set_user("test1@example.com") de...
true
true
f747a26df397b4ab55a8d72ca915d2fec125bd2f
2,614
py
Python
homeassistant/components/sensor/rainmachine.py
don66/home-assistant
a277470363c0758bb305410aad49c257ff8bac40
[ "Apache-2.0" ]
7
2018-08-03T10:15:36.000Z
2019-03-25T13:31:55.000Z
homeassistant/components/sensor/rainmachine.py
sara0871/https-wakatime.com-android-studio
5a15b2c036b332c17d5f6a06664378e9273d684f
[ "Apache-2.0" ]
3
2021-09-08T03:06:43.000Z
2022-03-12T00:56:04.000Z
homeassistant/components/sensor/rainmachine.py
sara0871/https-wakatime.com-android-studio
5a15b2c036b332c17d5f6a06664378e9273d684f
[ "Apache-2.0" ]
3
2018-10-09T08:37:48.000Z
2019-11-16T08:32:27.000Z
""" This platform provides support for sensor data from RainMachine. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.rainmachine/ """ import logging from homeassistant.components.rainmachine import ( DATA_RAINMACHINE, SENSOR_UPDATE_TOPIC, SENS...
29.044444
76
0.674828
import logging from homeassistant.components.rainmachine import ( DATA_RAINMACHINE, SENSOR_UPDATE_TOPIC, SENSORS, RainMachineEntity) from homeassistant.const import CONF_MONITORED_CONDITIONS from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect DEPENDENCIES ...
true
true
f747a292c1faff5cac56ac5fe3ddced9c9b86c5d
4,284
py
Python
Chatbot_Model/Info_Extraction/Entity_Extraction/data.py
chenpocufa/Chatbot_CN
5e13c129c159143610f4dfc99478d401dd5777e6
[ "Apache-2.0" ]
1
2019-08-02T06:09:34.000Z
2019-08-02T06:09:34.000Z
Chatbot_Model/Info_Extraction/Entity_Extraction/data.py
yuxuan2015/Chatbot_CN
1adf1c01d3eced5f0644102bdec9be22705b6f3f
[ "Apache-2.0" ]
null
null
null
Chatbot_Model/Info_Extraction/Entity_Extraction/data.py
yuxuan2015/Chatbot_CN
1adf1c01d3eced5f0644102bdec9be22705b6f3f
[ "Apache-2.0" ]
1
2019-06-10T00:36:17.000Z
2019-06-10T00:36:17.000Z
#-*- coding:utf-8 _*- """ @author:charlesXu @file: data.py @desc: 构建字向量、词向量 @time: 2018/08/08 """ import sys, pickle, os, random import numpy as np import pdb ## tags, BIO 标注策略 标签矩阵 tag2label = {"O": 0, "B-PER": 1, "I-PER": 2, "B-LOC": 3, "I-LOC": 4, "B-ORG": 5, "I-ORG": 6, ...
23.8
107
0.556256
import sys, pickle, os, random import numpy as np import pdb "B-PER": 1, "I-PER": 2, "B-LOC": 3, "I-LOC": 4, "B-ORG": 5, "I-ORG": 6, "B-TIM": 7, "I-TIM": 8 } def read_corpus(corpus_path): data = [] with open(corpus_path, encoding='utf-8') a...
true
true
f747a3188030106f3e5bead83261a715ef2d38a9
41
py
Python
dwdbulk/__init__.py
hoetzgit/dwdbulk
780d784c04a46d64d427b8a7aec303805a842d53
[ "MIT" ]
7
2020-01-07T23:31:27.000Z
2020-07-28T12:44:04.000Z
dwdbulk/__init__.py
hoetzgit/dwdbulk
780d784c04a46d64d427b8a7aec303805a842d53
[ "MIT" ]
4
2020-01-08T08:08:41.000Z
2020-09-28T06:30:15.000Z
dwdbulk/__init__.py
hoetzgit/dwdbulk
780d784c04a46d64d427b8a7aec303805a842d53
[ "MIT" ]
4
2020-02-10T21:42:49.000Z
2020-06-11T01:07:26.000Z
from .api import forecasts, observations
20.5
40
0.829268
from .api import forecasts, observations
true
true
f747a333e3e9f86072e8c3c3d1f6275b338d8f82
409
py
Python
endorsement/test/support/test_notifications.py
uw-it-aca/service-endorsement
a1ba3e4221bb3fe6c81c9f6947ad5e93f10a4a45
[ "Apache-2.0" ]
3
2017-10-16T17:19:32.000Z
2019-07-31T22:31:48.000Z
endorsement/test/support/test_notifications.py
uw-it-aca/service-endorsement
a1ba3e4221bb3fe6c81c9f6947ad5e93f10a4a45
[ "Apache-2.0" ]
284
2016-06-17T18:21:31.000Z
2022-03-21T16:55:03.000Z
endorsement/test/support/test_notifications.py
uw-it-aca/service-endorsement
a1ba3e4221bb3fe6c81c9f6947ad5e93f10a4a45
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from endorsement.test.support import SupportApiTest class TestSupportNotifications(SupportApiTest): @property def reverse_id(self): return 'endorsee_notifications' def test_statistics(self): self._test_...
25.5625
51
0.748166
from endorsement.test.support import SupportApiTest class TestSupportNotifications(SupportApiTest): @property def reverse_id(self): return 'endorsee_notifications' def test_statistics(self): self._test_good_page() def test_bogus_user_statistics(self): self._test_invalid_use...
true
true
f747a38fbb26a5157c21b6d60ed98e858e4c0dcd
8,191
py
Python
commands/song.py
Princ3x/ddmbot
088eb6b46447a1ec184b1bc7fea493b66ee35284
[ "MIT" ]
8
2016-12-13T17:52:51.000Z
2019-06-23T22:11:42.000Z
commands/song.py
Princ3x/ddmbot
088eb6b46447a1ec184b1bc7fea493b66ee35284
[ "MIT" ]
13
2016-12-13T17:35:09.000Z
2017-07-08T10:53:51.000Z
commands/song.py
Princ3x/ddmbot
088eb6b46447a1ec184b1bc7fea493b66ee35284
[ "MIT" ]
4
2016-12-13T17:52:53.000Z
2019-01-01T17:43:33.000Z
import discord.ext.commands as dec import database.song from commands.common import * class Song: """Song insertion, querying and manipulation""" def __init__(self, bot): self._bot = bot self._db = database.song.SongInterface(bot.loop) _help_messages = { 'group': 'Song informatio...
56.881944
120
0.652545
import discord.ext.commands as dec import database.song from commands.common import * class Song: def __init__(self, bot): self._bot = bot self._db = database.song.SongInterface(bot.loop) _help_messages = { 'group': 'Song information, querying and manipulation', 'blacklist':...
true
true
f747a39a401dfc0e13b704b316a3fb06d66e49d9
1,527
py
Python
cleanapp/migrations/0001_initial.py
naorsa/CleanApp
8e8e66edaaf1e774dee99019abb37000a2de7417
[ "Apache-2.0" ]
null
null
null
cleanapp/migrations/0001_initial.py
naorsa/CleanApp
8e8e66edaaf1e774dee99019abb37000a2de7417
[ "Apache-2.0" ]
null
null
null
cleanapp/migrations/0001_initial.py
naorsa/CleanApp
8e8e66edaaf1e774dee99019abb37000a2de7417
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-08-15 12:13 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateM...
33.933333
161
0.569745
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Choice', fields=[ ...
true
true
f747a453c6f5c533aa4b0430c7c325a3824061ba
2,380
py
Python
trioasm/whatshap/build/lib.linux-x86_64-3.6/whatshap/__main__.py
shilpagarg/WHdenovo
7a03798397ee0f131f100402d12ad53eab4334dc
[ "MIT" ]
45
2019-03-18T06:57:23.000Z
2021-06-24T12:24:48.000Z
trioasm/whatshap/build/lib.linux-x86_64-3.7/whatshap/__main__.py
shilpagarg/WHdenovo
7a03798397ee0f131f100402d12ad53eab4334dc
[ "MIT" ]
2
2019-05-06T22:11:22.000Z
2020-01-10T15:14:40.000Z
trioasm/whatshap/build/lib.linux-x86_64-3.7/whatshap/__main__.py
shilpagarg/WHdenovo
7a03798397ee0f131f100402d12ad53eab4334dc
[ "MIT" ]
7
2019-05-06T22:07:47.000Z
2020-12-11T08:48:26.000Z
import sys import importlib import logging from . import __version__ from .args import HelpfulArgumentParser # List of all subcommands. A module of the given name must exist and define # add_arguments() and main() functions. Documentation is taken from the first # line of the module’s docstring. COMMANDS = [ 'phase'...
27.045455
86
0.739916
import sys import importlib import logging from . import __version__ from .args import HelpfulArgumentParser COMMANDS = [ 'phase', 'phaseg', 'stats', 'compare', 'hapcut2vcf', 'unphase', 'haplotag' ] logger = logging.getLogger(__name__) class NiceFormatter(logging.Formatter): def format(self, record): ...
true
true
f747a4e69b0b79a0963e3cfbf40c1fc88eaf552c
10,561
py
Python
transitions/extensions/diagrams.py
thedrow/transitions
8995d9c37c7bab9204d279682073ba86144ffed9
[ "MIT" ]
null
null
null
transitions/extensions/diagrams.py
thedrow/transitions
8995d9c37c7bab9204d279682073ba86144ffed9
[ "MIT" ]
null
null
null
transitions/extensions/diagrams.py
thedrow/transitions
8995d9c37c7bab9204d279682073ba86144ffed9
[ "MIT" ]
null
null
null
from transitions import Transition from transitions.extensions.markup import MarkupMachine from transitions.core import listify import warnings import logging from functools import partial _LOGGER = logging.getLogger(__name__) _LOGGER.addHandler(logging.NullHandler()) # make deprecation warnings of transition visibl...
40.003788
113
0.58716
from transitions import Transition from transitions.extensions.markup import MarkupMachine from transitions.core import listify import warnings import logging from functools import partial _LOGGER = logging.getLogger(__name__) _LOGGER.addHandler(logging.NullHandler()) warnings.filterwarnings(action='default', messa...
true
true
f747a4f022ceed660ce623f692709a3e3ded2295
10,396
py
Python
lib/dnssec.py
NunoEdgarGFlowHub/qtum-electrum
8e37396d77696c162015ed8c0677d533d82fbc23
[ "MIT" ]
null
null
null
lib/dnssec.py
NunoEdgarGFlowHub/qtum-electrum
8e37396d77696c162015ed8c0677d533d82fbc23
[ "MIT" ]
null
null
null
lib/dnssec.py
NunoEdgarGFlowHub/qtum-electrum
8e37396d77696c162015ed8c0677d533d82fbc23
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without...
37.941606
418
0.657561
import traceback import sys import time import struct import dns.name import dns.query import dns.dnssec import dns.message import dns.resolver import dns.rdatatype import dns.rdtypes.ANY.NS import dns.rdtypes.ANY.CNAME import dns.rdtypes.ANY.DLV import dns.rdtypes.ANY.DNSKEY import d...
true
true
f747a633a8fb8ed35dd19b92bdb67dcbad4dbe72
5,047
py
Python
learn_to_infer/lda.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-13T21:48:52.000Z
2022-03-13T21:48:52.000Z
learn_to_infer/lda.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
null
null
null
learn_to_infer/lda.py
gunpowder78/google-research
d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5
[ "Apache-2.0" ]
1
2022-03-30T07:20:29.000Z
2022-03-30T07:20:29.000Z
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
43.886957
80
0.733703
import jax from jax import jit import jax.numpy as jnp from functools import partial @partial(jit, static_argnums=(1,)) def sample_params(key, num_docs, doc_topic_alpha, topic_word_alpha): num_topics = doc_topic_alpha.shape[0] k1, k2 = jax.random.split(key) topic_params = jax.random.diri...
true
true
f747a7e6fd65a6be8340808508d91a8668310c41
578
py
Python
nonebot/matcher.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
null
null
null
nonebot/matcher.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
null
null
null
nonebot/matcher.py
mobyw/nonebot2
36663f1a8a51bd89f4a60110047e73719adcc73d
[ "MIT" ]
null
null
null
"""本模块实现事件响应器的创建与运行,并提供一些快捷方法来帮助用户更好的与机器人进行对话。 FrontMatter: sidebar_position: 3 description: nonebot.matcher 模块 """ from nonebot.internal.matcher import Matcher as Matcher from nonebot.internal.matcher import matchers as matchers from nonebot.internal.matcher import current_bot as current_bot from nonebot.int...
30.421053
71
0.816609
from nonebot.internal.matcher import Matcher as Matcher from nonebot.internal.matcher import matchers as matchers from nonebot.internal.matcher import current_bot as current_bot from nonebot.internal.matcher import current_event as current_event from nonebot.internal.matcher import current_handler as current_handler f...
true
true
f747a84130a9bfd17312f0b2d61d4f2d2e977eaa
4,895
py
Python
affspec/models/cnn_utils.py
BeibinLi/affspec
d00a290cb1c86cb079acef69f914805737cb3696
[ "MIT" ]
null
null
null
affspec/models/cnn_utils.py
BeibinLi/affspec
d00a290cb1c86cb079acef69f914805737cb3696
[ "MIT" ]
null
null
null
affspec/models/cnn_utils.py
BeibinLi/affspec
d00a290cb1c86cb079acef69f914805737cb3696
[ "MIT" ]
null
null
null
import torch.nn as nn __author__ = "Sachin Mehta" __version__ = "1.0.1" __maintainer__ = "Sachin Mehta" class CBR(nn.Module): ''' This class defines the convolution layer with batch normalization and PReLU activation ''' def __init__(self, nIn, nOut, kSize, stride=1, groups=1): ''' :...
29.136905
106
0.573647
import torch.nn as nn __author__ = "Sachin Mehta" __version__ = "1.0.1" __maintainer__ = "Sachin Mehta" class CBR(nn.Module): def __init__(self, nIn, nOut, kSize, stride=1, groups=1): super().__init__() padding = int((kSize - 1) / 2) self.conv = nn.Conv2d(nIn, nOut, kSize, stride=stride, ...
true
true
f747a897d8e129afaee76919be306a14ed4c5791
591
py
Python
elit/datasets/ner/resume.py
emorynlp/levi-graph-amr-parser
f71f1056c13181b8db31d6136451fb8d57114819
[ "Apache-2.0" ]
9
2021-07-12T22:05:47.000Z
2022-02-22T03:10:14.000Z
elit/datasets/ner/resume.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
4
2021-08-31T08:28:37.000Z
2022-03-28T05:52:14.000Z
elit/datasets/ner/resume.py
emorynlp/stem-cell-hypothesis
48a628093d93d653865fbac6409d179cddd99293
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-06-08 12:10 from elit.common.dataset import TransformableDataset from elit.utils.io_util import get_resource, generate_words_tags_from_tsv _RESUME_NER_HOME = 'https://github.com/jiesutd/LatticeLSTM/archive/master.zip#' RESUME_NER_TRAIN = _RESUME_NER_HOME + 'Resume...
34.764706
79
0.764805
from elit.common.dataset import TransformableDataset from elit.utils.io_util import get_resource, generate_words_tags_from_tsv _RESUME_NER_HOME = 'https://github.com/jiesutd/LatticeLSTM/archive/master.zip#' RESUME_NER_TRAIN = _RESUME_NER_HOME + 'ResumeNER/train.char.bmes' RESUME_NER_DEV = _RESUME_NER_HOME + 'Resu...
true
true
f747a9122739267aa10af390ac96ba987b882658
778
py
Python
source/summary.py
arrismo/tripods-testing
4ab9a7059df84cfd1f8984960900a3cf80b5c13c
[ "ECL-2.0" ]
2
2019-09-27T20:17:46.000Z
2020-06-24T22:15:52.000Z
source/summary.py
arrismo/tripods-testing
4ab9a7059df84cfd1f8984960900a3cf80b5c13c
[ "ECL-2.0" ]
3
2021-03-31T19:53:37.000Z
2021-12-13T20:44:25.000Z
source/summary.py
arrismo/tripods-testing
4ab9a7059df84cfd1f8984960900a3cf80b5c13c
[ "ECL-2.0" ]
1
2019-05-22T18:55:39.000Z
2019-05-22T18:55:39.000Z
# -*- coding: utf-8 -*- """ Prints out a simple summary of the courses extracted from the school catalogs. Created on Mon Jun 8 11:51:22 2020 @author: Francisco Vazquez """ import os import pandas as pd n_colleges=0 n_courses = 0 for filename in os.listdir('../courses'): # if current file is the one for all s...
26.827586
80
0.66838
import os import pandas as pd n_colleges=0 n_courses = 0 for filename in os.listdir('../courses'): if filename == "AllSchools.csv": continue csv = pd.read_csv('../courses/'+filename,encoding = 'utf-8') n_colleges +=1 n_courses += len(csv['CourseID']) print('number of courses in ' +...
true
true
f747aa33352005f23373c6e1107642a4943fb357
53
py
Python
pangan/app.py
pangan/pangan
443a5ae04c0566eddd84d2330406753603012bbe
[ "Apache-2.0" ]
null
null
null
pangan/app.py
pangan/pangan
443a5ae04c0566eddd84d2330406753603012bbe
[ "Apache-2.0" ]
null
null
null
pangan/app.py
pangan/pangan
443a5ae04c0566eddd84d2330406753603012bbe
[ "Apache-2.0" ]
null
null
null
def launch(): print('This is the launch method!')
26.5
39
0.660377
def launch(): print('This is the launch method!')
true
true
f747acfbf4d386b309dadf30d48f5a539a51e678
5,409
py
Python
fsee/eye_geometry/make_cyl_proj.py
strawlab/fsee
943073f6f35ceb33d7e08e76661156068cc0cee2
[ "BSD-3-Clause" ]
2
2018-06-22T01:28:01.000Z
2018-12-28T00:07:38.000Z
fsee/eye_geometry/make_cyl_proj.py
strawlab/fsee
943073f6f35ceb33d7e08e76661156068cc0cee2
[ "BSD-3-Clause" ]
2
2018-01-24T17:39:50.000Z
2022-03-15T15:51:28.000Z
fsee/eye_geometry/make_cyl_proj.py
strawlab/fsee
943073f6f35ceb33d7e08e76661156068cc0cee2
[ "BSD-3-Clause" ]
3
2015-09-27T16:32:31.000Z
2022-03-15T14:30:16.000Z
# Copyright (C) 2005-2007 California Institute of Technology, All rights reserved # Author: Andrew D. Straw import math, sys import numpy import scipy import scipy.sparse import scipy.signal as signal import ashelf # NOTE: my coordinate system in phi is flipped from Lindemann's. In my # system, phi increases to the le...
35.123377
110
0.644481
import math, sys import numpy import scipy import scipy.sparse import scipy.signal as signal import ashelf # system, phi increases to the left, but in Lindemann's, it increases D2R = numpy.array(math.pi/180.0,dtype=numpy.float32) R2D = numpy.array(180.0/math.pi,dtype=numpy.float32) eye = 'left' if eye == ...
false
true
f747aeac7a0c1e341d1d3d9d90553638ba819193
2,302
py
Python
scphylo/commands/solver/_phiscs.py
faridrashidi/scphylo-tools
4574e2c015da58e59caa38e3b3e49b398c1379c1
[ "BSD-3-Clause" ]
null
null
null
scphylo/commands/solver/_phiscs.py
faridrashidi/scphylo-tools
4574e2c015da58e59caa38e3b3e49b398c1379c1
[ "BSD-3-Clause" ]
null
null
null
scphylo/commands/solver/_phiscs.py
faridrashidi/scphylo-tools
4574e2c015da58e59caa38e3b3e49b398c1379c1
[ "BSD-3-Clause" ]
null
null
null
import os import click import scphylo as scp @click.command(short_help="Run PhISCS (CSP version).") @click.argument( "genotype_file", required=True, type=click.Path( exists=True, file_okay=True, dir_okay=False, readable=True, resolve_path=True ), ) @click.argument( "alpha", required=...
22.568627
85
0.665508
import os import click import scphylo as scp @click.command(short_help="Run PhISCS (CSP version).") @click.argument( "genotype_file", required=True, type=click.Path( exists=True, file_okay=True, dir_okay=False, readable=True, resolve_path=True ), ) @click.argument( "alpha", required=...
true
true
f747af2536ddffe721a8d83084feac9d93eeadfa
2,089
py
Python
src/maya/compat.py
santiagobasulto/maya
03540c48c1c6c84fd27264478ba442fa24c74ffd
[ "MIT" ]
3,124
2016-12-16T00:24:14.000Z
2022-02-21T23:30:29.000Z
src/maya/compat.py
not-kennethreitz/maya
f3f95a92ee1f29c1eebdd4e1aefdac98da3c3df3
[ "MIT" ]
161
2016-12-16T02:42:11.000Z
2019-07-11T06:57:46.000Z
src/maya/compat.py
not-kennethreitz/maya
f3f95a92ee1f29c1eebdd4e1aefdac98da3c3df3
[ "MIT" ]
240
2016-12-16T01:25:08.000Z
2022-02-08T10:42:33.000Z
# -*- coding: utf-8 -*- """ maya.compat ~~~~~~~~~~~~~~~ This module handles import compatibility issues between Python 2 and Python 3. """ import sys # ------- # Pythons # ------- # Syntax sugar. _ver = sys.version_info # : Python 2.x? is_py2 = _ver[0] == 2 # : Python 3.x? is_py3 = _ver[0] == 3 # --------- # Specific...
20.086538
76
0.543322
import sys _ver = sys.version_info is_py2 = _ver[0] == 2 is_py3 = _ver[0] == 3 if is_py2: cmp = cmp elif is_py3: def cmp(a, b): """ Compare two objects. Returns a negative number if C{a < b}, zero if they are equal, and a positive number if C{a > b}. """ ...
true
true
f747afb295d38e8203bad9f663dfc5ebf20596c8
59,829
py
Python
Tests/test_AlignIO.py
ajmaurais/biopython
f110e06e740d81ff0d762a5da34099bfdca269c3
[ "BSD-3-Clause" ]
1
2020-01-21T02:04:08.000Z
2020-01-21T02:04:08.000Z
Tests/test_AlignIO.py
ajmaurais/biopython
f110e06e740d81ff0d762a5da34099bfdca269c3
[ "BSD-3-Clause" ]
null
null
null
Tests/test_AlignIO.py
ajmaurais/biopython
f110e06e740d81ff0d762a5da34099bfdca269c3
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2008 by Peter Cock. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Tests for AlignIO module.""" import unittest import warnings from io import StringIO from ...
49.486352
725
0.59884
import unittest import warnings from io import StringIO from Bio import SeqIO from Bio import AlignIO from Bio.Align import AlignInfo, MultipleSeqAlignment from Bio.Seq import Seq from Bio.SeqRecord import SeqRecord test_write_read_alignment_formats = sorted(AlignIO._FormatToWriter) test_write_read_align_with...
true
true
f747b001b48de0dec5b20c0adbdaa62ced4b9f7c
385
py
Python
Mentor_Meeting_Application-aditya/django_school/classroom/migrations/0008_auto_20181101_1149.py
AdityaMalani/Mentor-Meet
b3d24d64a42692a4394df5216e8a465daa7fc711
[ "MIT" ]
2
2018-10-24T09:10:15.000Z
2018-10-29T10:54:15.000Z
Mentor_Meeting_Application-aditya/django_school/classroom/migrations/0008_auto_20181101_1149.py
AdityaMalani/Mentor-Meet
b3d24d64a42692a4394df5216e8a465daa7fc711
[ "MIT" ]
null
null
null
Mentor_Meeting_Application-aditya/django_school/classroom/migrations/0008_auto_20181101_1149.py
AdityaMalani/Mentor-Meet
b3d24d64a42692a4394df5216e8a465daa7fc711
[ "MIT" ]
1
2018-10-31T18:16:38.000Z
2018-10-31T18:16:38.000Z
# Generated by Django 2.0.1 on 2018-11-01 11:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('classroom', '0007_auto_20181101_1145'), ] operations = [ migrations.AlterField( model_name='quiz', name='report', ...
20.263158
49
0.592208
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('classroom', '0007_auto_20181101_1145'), ] operations = [ migrations.AlterField( model_name='quiz', name='report', field=models.FileField(upload_to=''),...
true
true
f747b019c75615dbb133a33a36dbb1c03c4e27ee
955
py
Python
lib/PADS/MinimumSpanningTree.py
ncbray/pystream
70bba5646d6512adb6803564c22268d3424c66d8
[ "Apache-2.0" ]
6
2015-09-19T18:22:33.000Z
2020-11-29T15:21:17.000Z
lib/PADS/MinimumSpanningTree.py
ncbray/pystream
70bba5646d6512adb6803564c22268d3424c66d8
[ "Apache-2.0" ]
1
2015-08-04T08:03:46.000Z
2015-08-04T08:03:46.000Z
lib/PADS/MinimumSpanningTree.py
ncbray/pystream
70bba5646d6512adb6803564c22268d3424c66d8
[ "Apache-2.0" ]
1
2019-12-09T08:27:09.000Z
2019-12-09T08:27:09.000Z
"""MinimumSpanningTree.py Kruskal's algorithm for minimum spanning trees. D. Eppstein, April 2006. """ from UnionFind import UnionFind def MinimumSpanningTree(G): """ Return the minimum spanning tree of an undirected graph G. G should be represented in such a way that G[u][v] gives the length of edge...
32.931034
76
0.648168
from UnionFind import UnionFind def MinimumSpanningTree(G): # We use Kruskal's algorithm, first because it is very simple to subtrees = UnionFind() tree = [] edges = [(G[u][v],u,v) for u in G for v in G[u]] edges.sort() for W,u,v in edges: if subtrees[u] != subtrees[v]:...
true
true
f747b15249ba715547fc26e525651060931f03c2
2,799
py
Python
django_airavata/app_config.py
sairohithA007/airavata-django-portal
fe18d65802f02c9faf805c8edfdee3341c66e93a
[ "Apache-2.0" ]
null
null
null
django_airavata/app_config.py
sairohithA007/airavata-django-portal
fe18d65802f02c9faf805c8edfdee3341c66e93a
[ "Apache-2.0" ]
null
null
null
django_airavata/app_config.py
sairohithA007/airavata-django-portal
fe18d65802f02c9faf805c8edfdee3341c66e93a
[ "Apache-2.0" ]
null
null
null
import logging from abc import ABC, abstractmethod from importlib import import_module from django.apps import AppConfig logger = logging.getLogger(__name__) class AiravataAppConfig(AppConfig, ABC): """Custom AppConfig for Django Airavata apps.""" @property def url_app_name(self): """Return th...
27.441176
79
0.67667
import logging from abc import ABC, abstractmethod from importlib import import_module from django.apps import AppConfig logger = logging.getLogger(__name__) class AiravataAppConfig(AppConfig, ABC): @property def url_app_name(self): return get_url_app_name(self) @property @abstractmethod ...
true
true
f747b27d5695bbd2b4a6980d17901592e99e736c
9,535
py
Python
s3_storage_provider.py
srhoulam/synapse-s3-storage-provider
843576b54526c74df8388bc195fb61c6cb9ab970
[ "Apache-2.0" ]
1
2019-05-21T18:20:09.000Z
2019-05-21T18:20:09.000Z
s3_storage_provider.py
srhoulam/synapse-s3-storage-provider
843576b54526c74df8388bc195fb61c6cb9ab970
[ "Apache-2.0" ]
null
null
null
s3_storage_provider.py
srhoulam/synapse-s3-storage-provider
843576b54526c74df8388bc195fb61c6cb9ab970
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2018 New Vector 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 la...
32.431973
101
0.644887
import logging import os import threading from six import string_types import boto3 import botocore from twisted.internet import defer, reactor from twisted.python.failure import Failure from synapse.rest.media.v1._base import Responder from synapse.rest.media.v1.storage_provider import StorageProvid...
true
true
f747b2c6951cd50758af23c359abe198e311991e
2,125
py
Python
web/demo/bff/flaskr/__init__.py
trisacrypto/testnet
46574df999a82ad72dc47c38eb3a36ddef00fdb4
[ "MIT" ]
1
2022-01-20T23:49:28.000Z
2022-01-20T23:49:28.000Z
web/demo/bff/flaskr/__init__.py
trisacrypto/testnet
46574df999a82ad72dc47c38eb3a36ddef00fdb4
[ "MIT" ]
23
2020-12-16T18:26:41.000Z
2021-06-14T20:18:41.000Z
web/demo/bff/flaskr/__init__.py
trisacrypto/testnet
46574df999a82ad72dc47c38eb3a36ddef00fdb4
[ "MIT" ]
1
2021-07-21T01:59:56.000Z
2021-07-21T01:59:56.000Z
import logging import os import jsons from flask import Flask from flask_cors import CORS from flask_restful import Api from flask_socketio import SocketIO from flaskr import db from flaskr.api.vasps import Vasps from flaskr.models.user_wallet import UserWallet from flaskr.models.vasp_details import VaspDetails from ...
27.960526
103
0.685176
import logging import os import jsons from flask import Flask from flask_cors import CORS from flask_restful import Api from flask_socketio import SocketIO from flaskr import db from flaskr.api.vasps import Vasps from flaskr.models.user_wallet import UserWallet from flaskr.models.vasp_details import VaspDetails from ...
true
true
f747b396fa973e21ff69b253e51b84c2462bfea0
2,817
py
Python
src/functions.py
sambit-giri/DMemu
1827832efdab2dfcb735035b6956854e34d17202
[ "MIT" ]
null
null
null
src/functions.py
sambit-giri/DMemu
1827832efdab2dfcb735035b6956854e34d17202
[ "MIT" ]
null
null
null
src/functions.py
sambit-giri/DMemu
1827832efdab2dfcb735035b6956854e34d17202
[ "MIT" ]
null
null
null
import numpy as np import pickle def ps_suppression_8param(theta, emul, return_std=False): log10Mc, mu, thej, gamma, delta, eta, deta, fb = theta # fb = 0.1612 mins = [11, 0.0, 2, 1, 3, 0.2, 0.2, 0.10] maxs = [15, 2.0, 8, 4, 11, 0.4, 0.4, 0.25] assert mins[0]<=log10Mc<=maxs[0] assert mins[1]<...
31.651685
123
0.652112
import numpy as np import pickle def ps_suppression_8param(theta, emul, return_std=False): log10Mc, mu, thej, gamma, delta, eta, deta, fb = theta mins = [11, 0.0, 2, 1, 3, 0.2, 0.2, 0.10] maxs = [15, 2.0, 8, 4, 11, 0.4, 0.4, 0.25] assert mins[0]<=log10Mc<=maxs[0] assert mins[1]<=mu<=maxs[1] ...
true
true
f747b413c526b77e27bb85c0cd7a00874523067e
7,525
py
Python
src/models/train_model.py
egaznep/toy_vae_example
a41bed14454462da9a1b0ca658f4e72998b7d10b
[ "MIT" ]
null
null
null
src/models/train_model.py
egaznep/toy_vae_example
a41bed14454462da9a1b0ca658f4e72998b7d10b
[ "MIT" ]
null
null
null
src/models/train_model.py
egaznep/toy_vae_example
a41bed14454462da9a1b0ca658f4e72998b7d10b
[ "MIT" ]
null
null
null
import re import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import importlib import torch import torch.autograd from torch.utils.data import dataset import torch.utils.data.dataloader import ignite.utils import ignite.handlers.early_stopping import ignite.engine import ...
39.814815
138
0.694086
import re import click import logging from pathlib import Path from dotenv import find_dotenv, load_dotenv import importlib import torch import torch.autograd from torch.utils.data import dataset import torch.utils.data.dataloader import ignite.utils import ignite.handlers.early_stopping import ignite.engine import ...
true
true
f747b4957eed37eaa62e4e88fbd096f632382341
316
py
Python
src/recursividad/invertir.py
GokoshiJr/algoritmos2-py
106dcbed31739309c193a77c671522aac17f6e45
[ "MIT" ]
null
null
null
src/recursividad/invertir.py
GokoshiJr/algoritmos2-py
106dcbed31739309c193a77c671522aac17f6e45
[ "MIT" ]
null
null
null
src/recursividad/invertir.py
GokoshiJr/algoritmos2-py
106dcbed31739309c193a77c671522aac17f6e45
[ "MIT" ]
null
null
null
# 10. Programe un método recursivo que invierta los números de un arreglo de enteros. def invertir(numArray): if (len(numArray) == 0): return [] else: return ([numArray[-1]] + invertir(numArray[:-1])) numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] print(invertir(numeros))
28.727273
87
0.579114
def invertir(numArray): if (len(numArray) == 0): return [] else: return ([numArray[-1]] + invertir(numArray[:-1])) numeros = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] print(invertir(numeros))
true
true
f747b531da863fd51761e605fca32a2a3e0b738f
5,447
py
Python
villager-bot/util/misc.py
Chiruso/Villager-Bot
4801b12241f47a1869a8888a4dd41d7befd8140e
[ "MIT" ]
null
null
null
villager-bot/util/misc.py
Chiruso/Villager-Bot
4801b12241f47a1869a8888a4dd41d7befd8140e
[ "MIT" ]
null
null
null
villager-bot/util/misc.py
Chiruso/Villager-Bot
4801b12241f47a1869a8888a4dd41d7befd8140e
[ "MIT" ]
null
null
null
from urllib.parse import urlparse import classyjson as cj import asyncio import discord import math import time from util.code import format_exception from util.ipc import PacketType def strip_command(ctx): # returns message.clean_content excluding the command used length = len(ctx.prefix) + len(ctx.invoked_wit...
29.928571
126
0.608041
from urllib.parse import urlparse import classyjson as cj import asyncio import discord import math import time from util.code import format_exception from util.ipc import PacketType def strip_command(ctx): length = len(ctx.prefix) + len(ctx.invoked_with) + 1 return ctx.message.clean_content[length:] def...
true
true
f747b68882d3196649ad0a7a4d85d754573fccbe
2,208
py
Python
tests/test_epicurious.py
gloriousDan/recipe-scrapers
4e11b04db92abe11b75d373a147cc566629f265b
[ "MIT" ]
null
null
null
tests/test_epicurious.py
gloriousDan/recipe-scrapers
4e11b04db92abe11b75d373a147cc566629f265b
[ "MIT" ]
null
null
null
tests/test_epicurious.py
gloriousDan/recipe-scrapers
4e11b04db92abe11b75d373a147cc566629f265b
[ "MIT" ]
null
null
null
from recipe_scrapers.epicurious import Epicurious from tests import ScraperTest class TestEpicurious(ScraperTest): scraper_class = Epicurious def test_host(self): self.assertEqual("epicurious.com", self.harvester_class.host()) def test_canonical_url(self): self.assertEqual( ...
38.736842
390
0.65942
from recipe_scrapers.epicurious import Epicurious from tests import ScraperTest class TestEpicurious(ScraperTest): scraper_class = Epicurious def test_host(self): self.assertEqual("epicurious.com", self.harvester_class.host()) def test_canonical_url(self): self.assertEqual( ...
true
true
f747b6f9166c920204ebef4a055aa9f65440146f
3,801
py
Python
src/olympia/constants/permissions.py
nothingisdead/addons-server
e779422102d323d22a213818849fd8ee912b621f
[ "BSD-3-Clause" ]
null
null
null
src/olympia/constants/permissions.py
nothingisdead/addons-server
e779422102d323d22a213818849fd8ee912b621f
[ "BSD-3-Clause" ]
null
null
null
src/olympia/constants/permissions.py
nothingisdead/addons-server
e779422102d323d22a213818849fd8ee912b621f
[ "BSD-3-Clause" ]
null
null
null
from collections import defaultdict, namedtuple AclPermission = namedtuple('AclPermission', 'app, action') # Null rule. Only useful in tests really as no access group should have this. NONE = AclPermission('None', 'None') # A special wildcard permission to use when checking if someone has access to # any admin, or...
39.59375
79
0.770587
from collections import defaultdict, namedtuple AclPermission = namedtuple('AclPermission', 'app, action') NONE = AclPermission('None', 'None') ANY_ADMIN = AclPermission('Admin', '%') SUPERPOWERS = AclPermission('*', '*') ADMIN_TOOLS = AclPermission('Admin', 'Tools') ADMIN_CURATION = AclPermission('Admin'...
true
true