hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d5f112e3cb847698ca40d089838f58dd92a83f4a | 2,459 | py | Python | pandas/tests/test_compat.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | 1 | 2019-03-25T09:31:34.000Z | 2019-03-25T09:31:34.000Z | pandas/tests/test_compat.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | pandas/tests/test_compat.py | MaxVanDeursen/pandas | 9821b77de692716d7c2b62db1a68cac9ffc456c3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Testing that functions from compat work as expected
"""
import re
import pytest
from pandas.compat import (
builtins, get_range_parameters, iteritems, iterkeys, itervalues, lfilter,
lmap, lrange, lzip, re_type)
class TestBuiltinIterators(object):
@classmethod
def check_... | 31.126582 | 77 | 0.619764 |
d5f1181743fc68fa3e9e18306a64faa5b519dae1 | 27,267 | py | Python | salt/modules/snapper.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/modules/snapper.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | salt/modules/snapper.py | cbosdo/salt-1 | 9084d662781f9c0944804ba087e652c2ddb730bf | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Module to manage filesystem snapshots with snapper
.. versionadded:: 2016.11.0
:codeauthor: Duncan Mac-Vicar P. <dmacvicar@suse.de>
:codeauthor: Pablo Suárez Hernández <psuarezhernandez@suse.de>
:depends: ``dbus`` Python module.
:depends: ``snapper`` http://snapper.io, a... | 30.637079 | 126 | 0.620787 |
d5f1306a317abca4b89626366604e27f1acec5fc | 609 | py | Python | email_auth/test/models/test_generate_token.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | 1 | 2020-06-05T23:29:24.000Z | 2020-06-05T23:29:24.000Z | email_auth/test/models/test_generate_token.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | 40 | 2019-08-30T23:08:10.000Z | 2019-12-08T13:58:19.000Z | email_auth/test/models/test_generate_token.py | cdriehuys/django-simple-email-auth | 3ea1e227d7faa61692aeefe40b24c6696ea04f75 | [
"MIT"
] | null | null | null | import string
from unittest import mock
from email_auth import models
@mock.patch("email_auth.models.crypto.get_random_string", autospec=True)
def test_generate_token(mock_random_string):
"""
The generation function should use Django's cryptography utilities
to generate a random alphanumeric string.
... | 30.45 | 76 | 0.760263 |
d5f14431a8aad173ffbf64b98d8043fa0711b4fd | 835 | py | Python | sdk/keyvault/azure-security-keyvault/tests/async_preparer.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/keyvault/azure-security-keyvault/tests/async_preparer.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/keyvault/azure-security-keyvault/tests/async_preparer.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See LICENSE.txt in the project root for
# license information.
# -------------------------------------------------------------------------
import asyn... | 37.954545 | 82 | 0.626347 |
d5f1493cba0dd13c1b2b95b07b03d127c7c7e684 | 2,074 | py | Python | MD_simulation_on_alanine_dipeptide/current_work/src/structural_alignment.py | weiHelloWorld/MD_simulation_research | fe2b98bc81fc0b30db42ca8a83e23adb775a487d | [
"MIT"
] | 19 | 2017-12-06T11:30:22.000Z | 2021-08-31T15:18:18.000Z | MD_simulation_on_alanine_dipeptide/current_work/src/structural_alignment.py | weiHelloWorld/MD_simulation_research | fe2b98bc81fc0b30db42ca8a83e23adb775a487d | [
"MIT"
] | 6 | 2018-10-30T12:38:09.000Z | 2019-12-13T15:21:37.000Z | MD_simulation_on_alanine_dipeptide/current_work/src/structural_alignment.py | weiHelloWorld/MD_simulation_research | fe2b98bc81fc0b30db42ca8a83e23adb775a487d | [
"MIT"
] | 8 | 2018-01-03T22:26:45.000Z | 2020-07-02T14:19:47.000Z | """
modified from the code: https://gist.github.com/andersx/6354971
"""
import Bio.PDB, argparse, subprocess, os
from MDAnalysis import *
from MDAnalysis.analysis.align import *
from MDAnalysis.analysis.rms import rmsd
parser = argparse.ArgumentParser()
parser.add_argument("sample_path", type=str, help="path (file or... | 45.086957 | 127 | 0.713597 |
d5f1545f98f2330c3894c5f98ed0905be434d57d | 4,494 | py | Python | alipay/aop/api/domain/AlipayCommerceTransportTaxiDriverSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayCommerceTransportTaxiDriverSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayCommerceTransportTaxiDriverSendModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayCommerceTransportTaxiDriverSendModel(object):
def __init__(self):
self._alipay_account = None
self._car_no = None
self._driver_cert_no = None
self._driver_jo... | 30.780822 | 79 | 0.595461 |
d5f173a4c2774e01dd566136a551fe3dbc5708ec | 33,102 | py | Python | lib/commands.py | Andymeows/electrum-doge | e5e8c8e3e301cccb53de58445445e9e7fd0e9665 | [
"MIT"
] | 1 | 2017-02-21T17:52:54.000Z | 2017-02-21T17:52:54.000Z | lib/commands.py | Andymeows/electrum-doge | e5e8c8e3e301cccb53de58445445e9e7fd0e9665 | [
"MIT"
] | null | null | null | lib/commands.py | Andymeows/electrum-doge | e5e8c8e3e301cccb53de58445445e9e7fd0e9665 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2011 thomasv@gitorious
#
# 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 witho... | 40.715867 | 205 | 0.617365 |
d5f185bbc515a9684dd42bf51738440497659848 | 21,021 | py | Python | test/api/test_cloud_service.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | test/api/test_cloud_service.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | test/api/test_cloud_service.py | choonho/inventory | cc89757490d28fecb7ffccdfd6f89d4c0aa40da5 | [
"Apache-2.0"
] | null | null | null | import os
import uuid
import unittest
import pprint
from spaceone.core import config
from spaceone.core import pygrpc
from spaceone.core import utils
from spaceone.core.unittest.runner import RichTestRunner
from google.protobuf.json_format import MessageToDict
def random_string():
return uuid.uuid4().hex
class ... | 33.051887 | 114 | 0.558299 |
d5f18cf3c5349f81e392bb7d189342821b375ef9 | 4,906 | py | Python | IMLearn/base/base_estimator.py | Michaliv/IML.HUJI | ff1bd564cc0575dde6da581c810e847c9cd20f27 | [
"MIT"
] | null | null | null | IMLearn/base/base_estimator.py | Michaliv/IML.HUJI | ff1bd564cc0575dde6da581c810e847c9cd20f27 | [
"MIT"
] | null | null | null | IMLearn/base/base_estimator.py | Michaliv/IML.HUJI | ff1bd564cc0575dde6da581c810e847c9cd20f27 | [
"MIT"
] | null | null | null | """
The following file contains base classes for all estimators.
Class design and part of the code is taken and/or influenced
by the Python scikit-learn package, and specifically the
BaseEstimator.py file
# Author: Gilad Green <iml@mail.huji.ac.il>
# License: BSD 3 clause
"""
from __future__ import annotations
from ab... | 28.358382 | 89 | 0.578068 |
d5f193bbe545b4296341787216c5dd19c7d3d853 | 837 | py | Python | setup.py | SymbiFlow/prjuray-tools | cb5201be2c7078375cc3c069256ce05f9467fded | [
"0BSD"
] | 1 | 2021-01-26T18:13:10.000Z | 2021-01-26T18:13:10.000Z | setup.py | SymbiFlow/prjuray-tools | cb5201be2c7078375cc3c069256ce05f9467fded | [
"0BSD"
] | 2 | 2020-07-17T23:32:00.000Z | 2020-08-31T12:58:37.000Z | setup.py | SymbiFlow/prjuray-tools | cb5201be2c7078375cc3c069256ce05f9467fded | [
"0BSD"
] | 1 | 2020-08-27T17:02:52.000Z | 2020-08-27T17:02:52.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 The Project U-Ray Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
import setuptools
setuptools.setup(
... | 27.9 | 53 | 0.673835 |
d5f1ae69ae2295f3ad0a3a6e333961f8c049a674 | 236,091 | py | Python | python_modules/dagster/dagster_tests/core_tests/snap_tests/snapshots/snap_test_pipeline_snap.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/snap_tests/snapshots/snap_test_pipeline_snap.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/snap_tests/snapshots/snap_test_pipeline_snap.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_basic_dep_fan_out 1'] = '''{
"__class__": "PipelineSnapshot",
"config_schema_snapshot": {
"__class__": "ConfigSchemaSnapshot",
... | 32.555295 | 379 | 0.531554 |
d5f1bd2c6e2aa2b35ae0d1f5b6b512689eb61ca2 | 1,446 | py | Python | occrp/forms.py | datamade/occrp-timeline-tool | 855bb59b074331993d7a32a294d206919c9c647b | [
"MIT"
] | 4 | 2017-06-25T14:54:57.000Z | 2020-08-15T10:29:29.000Z | occrp/forms.py | datamade/occrp-timeline-tool | 855bb59b074331993d7a32a294d206919c9c647b | [
"MIT"
] | 19 | 2017-06-30T19:53:09.000Z | 2017-09-22T21:48:36.000Z | occrp/forms.py | datamade/occrp-timeline-tool | 855bb59b074331993d7a32a294d206919c9c647b | [
"MIT"
] | 1 | 2017-07-04T13:49:36.000Z | 2017-07-04T13:49:36.000Z | import sqlalchemy as sa
from flask_wtf import FlaskForm
from wtforms import StringField, DateField
from wtforms.validators import DataRequired
from .utils import parseDateAccuracy
class StoryForm(FlaskForm):
title = StringField('title', validators=[DataRequired()])
# Upon data entry: we should trim all string... | 34.428571 | 80 | 0.689488 |
d5f1c4ea9b07af7b141781dba76b69f14b03ead0 | 4,439 | py | Python | core/apps/student/migrations/0001_initial.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | core/apps/student/migrations/0001_initial.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | core/apps/student/migrations/0001_initial.py | yavuzbektas/StudentAnalayze | 794f433f650633f646bee5cbe08d04afdbd75e84 | [
"MIT"
] | null | null | null | # Generated by Django 4.0 on 2022-02-01 06:55
import apps.student.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('classes', '0001_initial'),
('home', '0001_initial'),
]
operati... | 56.910256 | 193 | 0.590674 |
d5f1c60a6c2f2d0ef44a13e6c9a46fccf337848b | 521 | py | Python | tests/_converter/test_to_builtin_val_from_apysc.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 16 | 2021-04-16T02:01:29.000Z | 2022-01-01T08:53:49.000Z | tests/_converter/test_to_builtin_val_from_apysc.py | ynsnf/apysc | b10ffaf76ec6beb187477d0a744fca00e3efc3fb | [
"MIT"
] | 613 | 2021-03-24T03:37:38.000Z | 2022-03-26T10:58:37.000Z | tests/_converter/test_to_builtin_val_from_apysc.py | simon-ritchie/apyscript | c319f8ab2f1f5f7fad8d2a8b4fc06e7195476279 | [
"MIT"
] | 2 | 2021-06-20T07:32:58.000Z | 2021-12-26T08:22:11.000Z | import apysc as ap
from apysc._converter import to_builtin_val_from_apysc
def test_get_builtin_str_from_apysc_val() -> None:
builtin_val: str = \
to_builtin_val_from_apysc.get_builtin_str_from_apysc_val(
string='Hello')
assert builtin_val == 'Hello'
assert isinstance(builtin_v... | 32.5625 | 76 | 0.721689 |
d5f1ca28f2029c74c24478d843cbfe03a59e81be | 42 | py | Python | modules/emulator/pytari2600/cpu_gen/__init__.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | 17 | 2016-02-23T22:44:09.000Z | 2022-03-16T02:39:15.000Z | modules/emulator/pytari2600/cpu_gen/__init__.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | null | null | null | modules/emulator/pytari2600/cpu_gen/__init__.py | 5space/nesbot | 38a9e8cadf0cbe41ee25e0850c244e2834a6e12c | [
"MIT"
] | 4 | 2018-02-24T19:52:30.000Z | 2020-11-30T00:38:21.000Z | from . import core
from . import pc_state
| 14 | 22 | 0.761905 |
d5f1d964d2d851cc4f636d1899ab0d2e153bac09 | 5,189 | py | Python | phodupe/dupe_finder.py | NYPD/Phodupe | 64ffb2cf0d299ad5d02cd0a4a006fee166dbf597 | [
"MIT"
] | null | null | null | phodupe/dupe_finder.py | NYPD/Phodupe | 64ffb2cf0d299ad5d02cd0a4a006fee166dbf597 | [
"MIT"
] | 8 | 2019-09-24T03:04:28.000Z | 2021-04-01T20:27:43.000Z | phodupe/dupe_finder.py | NYPD/phodupe | 64ffb2cf0d299ad5d02cd0a4a006fee166dbf597 | [
"MIT"
] | null | null | null | import os
import pathlib
import glob
import itertools
class DupeFinder:
"""
Simple utility class for finding and manipulating duplicate files
"""
@staticmethod
def getDuplicateFileNames(directory1, destinationsToDelete, recursivelySearch, matchAllDirectories):
"""
Returns a tup... | 32.63522 | 151 | 0.596454 |
d5f21d088de407c4eec998cd0c9d6dbdcffae84c | 8,679 | py | Python | test/qe/api-validator-multimatch/test_qvalue.py | sharwell/repose | 5d169ccad00ec4518d01379990d4e44e4e55e90e | [
"Apache-2.0"
] | null | null | null | test/qe/api-validator-multimatch/test_qvalue.py | sharwell/repose | 5d169ccad00ec4518d01379990d4e44e4e55e90e | [
"Apache-2.0"
] | null | null | null | test/qe/api-validator-multimatch/test_qvalue.py | sharwell/repose | 5d169ccad00ec4518d01379990d4e44e4e55e90e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
qvalue tests
------------
Description:
"Take into account qvalue. So don't match against all X-Roles values but
only those with highest qvalue. If the highest qvalue is 0.9, and two
values have that qvalue, use those two to compare against @role, and no
others."
Notation:
... | 32.62782 | 79 | 0.61597 |
d5f22e3608b6d697fe167f8f4cbfebc80b2e1d24 | 7,904 | py | Python | data/EpitheliumDataFeed.py | adfoucart/deephisto | f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9 | [
"MIT"
] | 1 | 2021-10-05T13:44:43.000Z | 2021-10-05T13:44:43.000Z | data/EpitheliumDataFeed.py | adfoucart/deephisto | f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9 | [
"MIT"
] | null | null | null | data/EpitheliumDataFeed.py | adfoucart/deephisto | f70fbaad9f95a9b9f2e420c9c33d46bdfab5bdf9 | [
"MIT"
] | 1 | 2021-11-02T14:25:13.000Z | 2021-11-02T14:25:13.000Z | # -*- coding: utf-8 -*-
'''
Author: Adrien Foucart
Load dataset, perform pre-processing and data augmentation, produce mini-batch for the Epithelium dataset.
Dataset downloaded from : http://www.andrewjanowczyk.com/deep-learning/
Citation:
A. Janowczyk and A. Madabhushi, “Deep learning for digital pathology image an... | 47.90303 | 213 | 0.59413 |
d5f23297c4a808b1c423bd57d8a87afa2b1d1185 | 4,103 | py | Python | ros2_ws/src/algorithms/utils/odom_noiser/odom_noiser/noiser_node.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | null | null | null | ros2_ws/src/algorithms/utils/odom_noiser/odom_noiser/noiser_node.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | 2 | 2021-07-05T14:50:09.000Z | 2021-09-14T15:21:11.000Z | ros2_ws/src/algorithms/utils/odom_noiser/odom_noiser/noiser_node.py | FastSense/metalbot | 063c897a16129d9aa88c2c7c52bdf6547af894e4 | [
"MIT"
] | null | null | null | import rclpy
from rclpy.node import Node
import cv2
from nav_msgs.msg import Odometry
import numpy as np
import random
class Noiser(Node):
"""
ROS node for adding noise to ground truth odometry
-----------------------------
Attributes:
odom_sub: ros::Subscriber
Subscriber to /odom topic for... | 39.07619 | 96 | 0.628564 |
d5f24e4e5d10486e038bfcf537d6868a7821913f | 2,539 | py | Python | var/spack/repos/builtin/packages/util-linux/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/util-linux/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 14 | 2021-07-20T01:04:53.000Z | 2022-03-02T01:08:36.000Z | var/spack/repos/builtin/packages/util-linux/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
class UtilLinux(AutotoolsPackage):
"""Util-linux is a suite of essential utilities for... | 43.033898 | 97 | 0.691217 |
d5f2833003d3041865ed0258e8ad38f055744d0d | 400 | py | Python | tests/endpoints/test_metrics.py | nvllsvm/imbi-api | 1a5bd8894ac14c1026f33297994aa10782b0eea0 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T18:34:47.000Z | 2021-06-23T18:34:47.000Z | tests/endpoints/test_metrics.py | nvllsvm/imbi-api | 1a5bd8894ac14c1026f33297994aa10782b0eea0 | [
"BSD-3-Clause"
] | null | null | null | tests/endpoints/test_metrics.py | nvllsvm/imbi-api | 1a5bd8894ac14c1026f33297994aa10782b0eea0 | [
"BSD-3-Clause"
] | 2 | 2022-02-11T22:06:18.000Z | 2022-02-21T19:35:06.000Z | from tests import base
class AsyncHTTPTestCase(base.TestCase):
def test_status_ok(self):
response = self.fetch('/metrics', headers=self.headers)
self.assertEqual(response.code, 200)
self.assertIn(
'# TYPE postgres_pool_free gauge', response.body.decode('utf-8'))
self.a... | 30.769231 | 77 | 0.6575 |
d5f29e8bfbd0349b4f0e428d2728dd92813b8e7d | 5,693 | py | Python | ForgeBlog/forgeblog/tests/functional/test_feeds.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | ForgeBlog/forgeblog/tests/functional/test_feeds.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | ForgeBlog/forgeblog/tests/functional/test_feeds.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 39.262069 | 117 | 0.602846 |
d5f2a1a65355d79caf4284240c36b1b9106d3fbe | 6,210 | py | Python | punnsilm/modules/graphite_input.py | hadara/punnsilm | 71e267ca64b1f3a6c7d5bc304652534e458c49d0 | [
"MIT"
] | 1 | 2021-11-11T17:12:28.000Z | 2021-11-11T17:12:28.000Z | punnsilm/modules/graphite_input.py | hadara/punnsilm | 71e267ca64b1f3a6c7d5bc304652534e458c49d0 | [
"MIT"
] | null | null | null | punnsilm/modules/graphite_input.py | hadara/punnsilm | 71e267ca64b1f3a6c7d5bc304652534e458c49d0 | [
"MIT"
] | null | null | null | import time
import json
import pprint
import logging
import datetime
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
import requests
from punnsilm import core
DEFAULT_POLLING_INTERVAL_SEC = 60
class GraphiteDashboardMonitor(core.Monitor):
"""monitors a Graphite ... | 34.120879 | 106 | 0.589211 |
d5f2a1d56317ab4cc6dd5b1c1acb360949e011c1 | 50,720 | py | Python | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bmesh/ops.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bmesh/ops.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | premade_modules/2.80/e5e885d0ecb9430a73e0a904cdb6035a2ef77e98/bmesh/ops.py | echantry/fake-bpy-module | 004cdf198841e639b7d9a4c4db95ca1c0d3aa2c7 | [
"MIT"
] | null | null | null | def smooth_vert(bm, verts, factor, mirror_clip_x, mirror_clip_y, mirror_clip_z,
clip_dist, use_axis_x, use_axis_y, use_axis_z):
'''Smooths vertices by using a basic vertex averaging scheme.
:param bm: The bmesh to operate on.
:type bm: bmesh.types.BMesh
:param verts: input vertices
... | 34.550409 | 718 | 0.692035 |
d5f2c864f8379b6fc80d71bdccf9304759f755ae | 8,348 | py | Python | src/graphrnn/infinity-mirror.py | satyakisikdar/infinity-mirror | d8b44aa75f1052318dc1c40a770a7ad07e38abb7 | [
"MIT"
] | 5 | 2020-03-13T02:54:03.000Z | 2022-03-18T02:33:12.000Z | src/graphrnn/infinity-mirror.py | satyakisikdar/infinity-mirror | d8b44aa75f1052318dc1c40a770a7ad07e38abb7 | [
"MIT"
] | 2 | 2021-11-10T19:47:00.000Z | 2022-02-10T01:24:59.000Z | src/graphrnn/infinity-mirror.py | satyakisikdar/infinity-mirror | d8b44aa75f1052318dc1c40a770a7ad07e38abb7 | [
"MIT"
] | 1 | 2021-05-24T21:54:44.000Z | 2021-05-24T21:54:44.000Z | """
Fit method for GraphRNN
this is slightly different from the normal ones
1. Fit should take a list of 50 graphs and return a model object
2. Gen should take a model object and generate 50 graphs
"""
import os
import sys
from os.path import join
from pathlib import Path
from random import shuffle
from sys import argv... | 44.641711 | 132 | 0.663033 |
d5f2d11bbbf7160fb58da1f248b0142a8ab396d9 | 996 | py | Python | test/test_ylex.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | null | null | null | test/test_ylex.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | 14 | 2016-10-14T15:09:42.000Z | 2017-03-01T14:29:29.000Z | test/test_ylex.py | joniok/hybra-medialoader | ebc6df58287b5146917d66de69d807309cea4a8f | [
"MIT"
] | 1 | 2020-11-18T13:06:48.000Z | 2020-11-18T13:06:48.000Z | import sys
import os
import filecmp
import importlib
import datetime
import common
path = os.path.abspath('.')
sys.path.append(path)
domain = 'ylex'
url = 'http://yle.fi/ylex/uutiset/kaveri_hei_ala_poraa_iphone_7_-puhelimeen_omaa_kuulokereikaa__tama_nettiohje_on_trolli/3-9195748'
out = 'test/parser_out.txt'
module =... | 24.292683 | 131 | 0.745984 |
d5f2ef8f25375f9a1c35872a377577b391a4d42c | 6,535 | py | Python | examples/market_data/trades_csv_exporter.py | coinmetrics/api-client-python | 0649081013b87795f253269e3d7c0a19829b2e52 | [
"MIT"
] | 9 | 2021-08-31T17:16:38.000Z | 2022-03-25T01:44:26.000Z | examples/market_data/trades_csv_exporter.py | coinmetrics/api-client-python | 0649081013b87795f253269e3d7c0a19829b2e52 | [
"MIT"
] | 3 | 2021-09-15T17:36:04.000Z | 2022-02-14T22:49:59.000Z | examples/market_data/trades_csv_exporter.py | coinmetrics-io/api-client-python | 1fc139fbee9817655a72083eab9e7b59a37f0bf2 | [
"MIT"
] | 4 | 2021-12-28T04:24:50.000Z | 2022-03-22T21:10:42.000Z | import logging
import sys
from datetime import date, datetime, timedelta
from multiprocessing import Pool
from os import environ, makedirs
from os.path import exists
from coinmetrics.api_client import CoinMetricsClient
from coinmetrics.constants import PagingFrom
logger = logging.getLogger()
stream_handler = logging.... | 32.675 | 111 | 0.636113 |
d5f3066549ae974c35a28c1aad8c12dc5a3a1c1d | 1,471 | py | Python | tests/test_models.py | avallbona/periskop-python | c3c6c229b0369f85eb029b876b466cd1dc732de6 | [
"Apache-2.0"
] | 4 | 2020-05-15T18:04:11.000Z | 2020-05-20T20:31:44.000Z | tests/test_models.py | avallbona/periskop-python | c3c6c229b0369f85eb029b876b466cd1dc732de6 | [
"Apache-2.0"
] | 1 | 2020-10-16T10:10:55.000Z | 2020-10-16T10:10:55.000Z | tests/test_models.py | avallbona/periskop-python | c3c6c229b0369f85eb029b876b466cd1dc732de6 | [
"Apache-2.0"
] | 3 | 2020-05-19T11:53:08.000Z | 2021-11-03T10:15:48.000Z | import pytest
from periskop_client.models import ExceptionWithContext, ExceptionInstance, AggregatedException, MAX_ERRORS
def _mock_exception_with_context(stacktrace):
exception_instance = ExceptionInstance(cls="IndexError", message="Out of range", stacktrace=stacktrace)
return ExceptionWithContext(error=exc... | 47.451613 | 107 | 0.766825 |
d5f31c98249d1b2c1f704daaff75c5b7dbd4801e | 1,036 | py | Python | chateau/config.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | chateau/config.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | chateau/config.py | softwerks/chateau | 6218dd623b21298a29f255e9c0d88d69651796e0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Softwerks LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 38.37037 | 87 | 0.782819 |
d5f32011099bfadc17f9ca35372da0faa9612dd5 | 3,616 | py | Python | day12.py | alexa-infra/advent-of-code-2018 | f14e8c87b655c479097ae713572bb0260ec993fc | [
"MIT"
] | null | null | null | day12.py | alexa-infra/advent-of-code-2018 | f14e8c87b655c479097ae713572bb0260ec993fc | [
"MIT"
] | null | null | null | day12.py | alexa-infra/advent-of-code-2018 | f14e8c87b655c479097ae713572bb0260ec993fc | [
"MIT"
] | null | null | null | import re
parse_initial_re = re.compile(
r'initial state: ([\.#]+)')
parse_re = re.compile(
r'(?P<pattern>[\.#]{5}) => (?P<result>[\.#])')
def parse_initial(text):
return parse_initial_re.match(text).group(1)
def parse_rule(text):
m = parse_re.match(text).groupdict()
return m['pattern'], m['resul... | 27.393939 | 63 | 0.534569 |
d5f32d66a5e80da41a551529af7a4ae1838bcc21 | 2,966 | py | Python | homeassistant/components/notify/instapush.py | mbs-technologie/home-assistant | 71fc446425cbb1c0d4670c261ce8ea3bfd83a73d | [
"MIT"
] | 13 | 2017-02-01T13:25:34.000Z | 2022-01-26T01:30:39.000Z | homeassistant/components/notify/instapush.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 9 | 2017-07-26T18:05:32.000Z | 2021-12-05T14:16:34.000Z | homeassistant/components/notify/instapush.py | 1Forward1Back/home-assistant | ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6 | [
"MIT"
] | 21 | 2017-07-26T17:09:40.000Z | 2022-03-27T22:37:22.000Z | """
Instapush notification service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.instapush/
"""
import json
import logging
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.compone... | 32.23913 | 77 | 0.657114 |
d5f34f1071bca58e3cb74f1b4167d5ac0c0272c2 | 2,366 | py | Python | atom3d/util/rosetta.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/util/rosetta.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | atom3d/util/rosetta.py | bfabiandev/atom3d | b2499ff743be2e851c286cabf64696682abffa44 | [
"MIT"
] | null | null | null | import io
import os
from pathlib import Path
import subprocess
import pandas as pd
import tqdm
import atom3d.util.file as fi
class Scores(object):
"""
Class for tracking and looking up Rosetta score files.
:param file_list: List of paths to Rosetta silent files.
:type file_list: list[Union[str, Pat... | 32.410959 | 82 | 0.622147 |
d5f370d9e95ba552430e3c5c0d466d3bf7ceab6a | 3,737 | py | Python | server/assistant/skills/asmr/asmr.py | naturalshine/soother-chatbot | ae24a656d1cf76d10484706f7be5f04211df2d71 | [
"MIT"
] | null | null | null | server/assistant/skills/asmr/asmr.py | naturalshine/soother-chatbot | ae24a656d1cf76d10484706f7be5f04211df2d71 | [
"MIT"
] | null | null | null | server/assistant/skills/asmr/asmr.py | naturalshine/soother-chatbot | ae24a656d1cf76d10484706f7be5f04211df2d71 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import json
import requests
import cherrypy
from padatious import IntentContainer
from adapt.engine import IntentDeterminationEngine
from Skill import Skill
from Brain import Brain
from .intents import (entities, single_regex_entities, skill_intents)
class asmr... | 35.932692 | 221 | 0.704041 |
d5f3717dd247b80996abf8a52949a9c891fca690 | 3,016 | py | Python | src/actions.py | luzpaz/floor-planner | 971334bb7054232035411419910bc860d5da9206 | [
"MIT"
] | null | null | null | src/actions.py | luzpaz/floor-planner | 971334bb7054232035411419910bc860d5da9206 | [
"MIT"
] | null | null | null | src/actions.py | luzpaz/floor-planner | 971334bb7054232035411419910bc860d5da9206 | [
"MIT"
] | null | null | null | from copy import deepcopy
class AddAction:
"""The action container for when a user adds an entity."""
def __init__(self, entity = None):
"""Initializes the add action.
:param entity: The entity the user added
:type entity: Any entity class from 'entities.py'
"""
sel... | 32.782609 | 66 | 0.631963 |
d5f38803b9ddcfe7291343dcfcb25c21dae0aaa5 | 1,613 | py | Python | oscar/lib/python2.7/site-packages/PIL/ImageMode.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/ImageMode.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/ImageMode.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #
# The Python Imaging Library.
# $Id$
#
# standard mode descriptors
#
# History:
# 2006-03-20 fl Added
#
# Copyright (c) 2006 by Secret Labs AB.
# Copyright (c) 2006 by Fredrik Lundh.
#
# See the README file for information on usage and redistribution.
#
# mode descriptor cache
_modes = None
cl... | 28.803571 | 81 | 0.552387 |
d5f38ae2824777708ba8440c4dce5083e59d2091 | 113,620 | py | Python | tensorflow/contrib/layers/python/layers/feature_column_ops_test.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 1 | 2017-02-24T05:09:40.000Z | 2017-02-24T05:09:40.000Z | tensorflow/contrib/layers/python/layers/feature_column_ops_test.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/layers/python/layers/feature_column_ops_test.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 1 | 2022-01-22T05:39:49.000Z | 2022-01-22T05:39:49.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.902628 | 80 | 0.625128 |
d5f3a3c4cc701d2981772787b8fe460accf133e9 | 1,135 | py | Python | var/spack/repos/builtin/packages/r-sp/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-sp/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-sp/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RSp(RPackage):
"""Classes and methods for spatial data; the classes document where the
... | 45.4 | 95 | 0.739207 |
d5f3b945829ae5e391196aafef42b5e1bdfa4ebf | 8,284 | py | Python | ucimlr/helpers.py | JKPawa/ucimlr | b7254414b3bb1bb1c178885cf50e49135c3f7f76 | [
"MIT"
] | 5 | 2020-03-25T09:03:51.000Z | 2021-08-30T13:42:19.000Z | ucimlr/helpers.py | JKPawa/ucimlr | b7254414b3bb1bb1c178885cf50e49135c3f7f76 | [
"MIT"
] | null | null | null | ucimlr/helpers.py | JKPawa/ucimlr | b7254414b3bb1bb1c178885cf50e49135c3f7f76 | [
"MIT"
] | 1 | 2021-06-17T15:59:05.000Z | 2021-06-17T15:59:05.000Z | import os
import zipfile
from copy import deepcopy
from urllib import request
import numpy as np
import pandas as pd
from sklearn.preprocessing import OneHotEncoder, LabelEncoder
from ucimlr.constants import CLASSIFICATION
from ucimlr.constants import TRAIN, VALIDATION, TEST
class RandomStateContext:
def __init... | 32.743083 | 120 | 0.639546 |
d5f3f6f14f81185c0444a71b19c7f481deeed7d2 | 2,519 | py | Python | terrascript/vra/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/vra/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/vra/d.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/vra/d.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class vra_block_device(terrascript.Data):
pass
class vra_block_device_snapshots(terrascript.Data):
pa... | 14.817647 | 79 | 0.774911 |
d5f40059dbacd5c40887978881dd64fa53391ecc | 688 | py | Python | plastering/common.py | MingzheWu418/plastering | 322531e934c3acf2ecc8f520b37a6d255b9959c2 | [
"MIT"
] | 29 | 2018-09-19T01:16:27.000Z | 2022-03-29T14:35:36.000Z | plastering/common.py | MingzheWu418/plastering | 322531e934c3acf2ecc8f520b37a6d255b9959c2 | [
"MIT"
] | 14 | 2019-04-12T18:37:36.000Z | 2022-02-10T00:27:55.000Z | plastering/common.py | MingzheWu418/plastering | 322531e934c3acf2ecc8f520b37a6d255b9959c2 | [
"MIT"
] | 14 | 2019-03-05T23:44:11.000Z | 2022-03-18T07:29:31.000Z |
# Constants
POINT_TAGSET = 'point_tagset'
ALL_TAGSETS = 'tagsets'
FULL_PARSING = 'fullparsing'
POINT_POSTFIXES = ['sensor', 'setpoint', 'alarm', 'command', 'meter', 'status']
# May use point_tagset_list later.
def is_point_tagset(tagset):
if tagset in ['unknown', 'none']:
return True
category_tag =... | 21.5 | 79 | 0.648256 |
d5f423ecda6d3f422109358188263896ef76f7ad | 2,939 | py | Python | sdsapp/handlers/base.py | candle645/sdsapp | 1168bfb7d6d679026f7681adc40c19ba16297297 | [
"MIT"
] | null | null | null | sdsapp/handlers/base.py | candle645/sdsapp | 1168bfb7d6d679026f7681adc40c19ba16297297 | [
"MIT"
] | null | null | null | sdsapp/handlers/base.py | candle645/sdsapp | 1168bfb7d6d679026f7681adc40c19ba16297297 | [
"MIT"
] | null | null | null | '''
Created on Dec 12, 2017
@author: candle
'''
from lxml import etree
class BaseDataHandler(object):
'''
classdocs
'''
def __init__(self, db_conn):
'''
Constructor
'''
self.db = db_conn
def show (self, item_id, target=None):
art... | 29.989796 | 83 | 0.545764 |
d5f426523fb52c97d7c602656d055bcbf6b66fb1 | 5,220 | py | Python | djangopypi2/apps/pypi_packages/release_views.py | popen2/djangopypi2 | 461ac094ae556096a32221cbcd0087435666e6a2 | [
"BSD-3-Clause"
] | 12 | 2015-03-27T22:45:21.000Z | 2017-09-13T03:18:12.000Z | djangopypi2/apps/pypi_packages/release_views.py | popen2/djangopypi2 | 461ac094ae556096a32221cbcd0087435666e6a2 | [
"BSD-3-Clause"
] | 4 | 2015-12-09T20:28:21.000Z | 2019-07-05T03:23:34.000Z | djangopypi2/apps/pypi_packages/release_views.py | popen2/djangopypi2 | 461ac094ae556096a32221cbcd0087435666e6a2 | [
"BSD-3-Clause"
] | 14 | 2015-01-13T15:41:42.000Z | 2020-08-07T20:17:54.000Z | from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse_lazy
from django.forms.models import inlineformset_factory
from django.http import Http404
from django.http import HttpResponseRedirect
from django.views.generic.detail import SingleOb... | 37.553957 | 97 | 0.699808 |
d5f439fc2f584a4395503a419743841d966bee4f | 3,177 | py | Python | obsplan/graphics.py | zachariahmilby/keck-aurora-observation-planning | 9f37e4f7782a3c3a2eb388bb0fac8fcb05ca1882 | [
"MIT"
] | null | null | null | obsplan/graphics.py | zachariahmilby/keck-aurora-observation-planning | 9f37e4f7782a3c3a2eb388bb0fac8fcb05ca1882 | [
"MIT"
] | null | null | null | obsplan/graphics.py | zachariahmilby/keck-aurora-observation-planning | 9f37e4f7782a3c3a2eb388bb0fac8fcb05ca1882 | [
"MIT"
] | null | null | null | import matplotlib.dates as dates
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
import numpy as np
import pytz
color_dict = {'red': '#D62728', 'orange': '#FF7F0E', 'yellow': '#FDB813',
'green': '#2CA02C', 'blue': '#0079C1', 'violet': '#9467BD',
'cyan': '#17BECF', 'magent... | 46.720588 | 79 | 0.612528 |
d5f44dead9fe2d154675dd73cdf2a605120a9e89 | 3,808 | py | Python | alipay/aop/api/domain/AlipayBusinessPaymenthubRefundModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayBusinessPaymenthubRefundModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayBusinessPaymenthubRefundModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.UserIdentity import UserIdentity
from alipay.aop.api.domain.UserIdentityExt import UserIdentityExt
class AlipayBusinessPaymenthubRefundModel(object):
def __init__(self):
... | 30.709677 | 85 | 0.601891 |
d5f4640f2437cfabd2757dbb60f564bddd78678a | 3,691 | py | Python | yolox/utils/optimizers.py | JJLimmm/YOLOx | 85fdb819be84dfec3a8306cb74872a1c0ef28e3e | [
"Apache-2.0"
] | null | null | null | yolox/utils/optimizers.py | JJLimmm/YOLOx | 85fdb819be84dfec3a8306cb74872a1c0ef28e3e | [
"Apache-2.0"
] | null | null | null | yolox/utils/optimizers.py | JJLimmm/YOLOx | 85fdb819be84dfec3a8306cb74872a1c0ef28e3e | [
"Apache-2.0"
] | null | null | null | import torch
from torch import Tensor
from typing import List, Optional
class ClassicSGD(torch.optim.SGD):
def __init__(
self, params, lr, momentum=0, dampening=0, weight_decay=0, nesterov=False,
):
super(ClassicSGD, self).__init__(
params,
lr=lr,
momentum=... | 29.062992 | 116 | 0.531563 |
d5f49bbc1d885298a77561b82d00c98c81acb7de | 705 | py | Python | utils/testApriori.py | igemsoftware/HFUT-China_2015 | 5db86858963d29188ec1a8fdedaf7a98f4528cf4 | [
"Apache-2.0"
] | null | null | null | utils/testApriori.py | igemsoftware/HFUT-China_2015 | 5db86858963d29188ec1a8fdedaf7a98f4528cf4 | [
"Apache-2.0"
] | 3 | 2015-09-21T21:50:45.000Z | 2015-09-22T15:42:28.000Z | utils/testApriori.py | igemsoftware/HFUT-China_2015 | 5db86858963d29188ec1a8fdedaf7a98f4528cf4 | [
"Apache-2.0"
] | 2 | 2020-03-28T01:33:51.000Z | 2021-07-18T13:56:27.000Z | import os
import django
import sys
pro_dir = os.getcwd()
sys.path.append(pro_dir)
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "BioDesigner.settings")
import fpTree
import igemRecomdData
import apriori
from design.models import team_parts
def getPartData():
result = list()
tList = team_part... | 24.310345 | 88 | 0.673759 |
d5f4b4eb4d3705cd3ee7c20a6970990b576c902e | 12,039 | py | Python | src/tools/data/vdb_check/vdb_check.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/tools/data/vdb_check/vdb_check.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/tools/data/vdb_check/vdb_check.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | #
# This is vdbck, like fsck for a VisIt Database
#
# This tool is designed to iterate over all the objects in a database
# and validate that VisIt can process them by doing plots involving
# the objects. It reports cases that fail. This is intended to be a
# way for users to sanity check that they are creating a datab... | 27.486301 | 105 | 0.592076 |
d5f4de58f9665948d0f5fe37c45575341ed99d6a | 2,326 | py | Python | scripts/01_data_formatting/n5_to_zarr.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | scripts/01_data_formatting/n5_to_zarr.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | scripts/01_data_formatting/n5_to_zarr.py | kirchhausenlab/incasem | ee9e007c5c04571e547e2fb5af5e800bd2d2b435 | [
"BSD-3-Clause"
] | null | null | null | import logging
import configargparse as argparse
import incasem as fos
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
def parse_args():
p = argparse.ArgParser(
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
p.add(
'-n',
... | 23.734694 | 79 | 0.563199 |
d5f50c93892aef958c85ff095177774c57f9472e | 1,048 | py | Python | design_patterns/oop/bank/current_account.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | design_patterns/oop/bank/current_account.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | design_patterns/oop/bank/current_account.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | from ..bank import BankAccount
class CurrentAccount(BankAccount):
def __init__(self):
super(CurrentAccount, self).__init__()
self.balance = 0
def withdraw(self, amount_to_withdraw):
try:
if amount_to_withdraw < 0 or not isinstance(amount_to_withdraw, int):
... | 32.75 | 81 | 0.598282 |
d5f519a55cc75eb5b10892ebdf60b55298e36b13 | 1,532 | py | Python | urlsigning/urlsigner.py | markmcd/gmaps-samples | 61b3f58eb1286a428843f8401048226b8648a76b | [
"Apache-2.0"
] | 50 | 2015-08-17T05:07:41.000Z | 2019-05-22T15:16:51.000Z | urlsigning/urlsigner.py | markmcd/gmaps-samples | 61b3f58eb1286a428843f8401048226b8648a76b | [
"Apache-2.0"
] | 9 | 2015-08-04T01:48:30.000Z | 2017-01-27T18:43:03.000Z | urlsigning/urlsigner.py | markmcd/gmaps-samples | 61b3f58eb1286a428843f8401048226b8648a76b | [
"Apache-2.0"
] | 128 | 2015-08-04T22:50:17.000Z | 2019-08-27T13:01:01.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
""" Signs a URL using a URL signing secret """
import hashlib
import hmac
import base64
import urlparse
def sign_url(input_url=None, secret=None):
""" Sign a request URL with a URL signing secret.
Usage:
from urlsigner import sign_url
signed_url = sign_u... | 28.37037 | 77 | 0.701697 |
d5f552c4178cb8f80bde556a0ccc3ec2575248b5 | 199 | py | Python | workmanager/tests.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | workmanager/tests.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | workmanager/tests.py | AlexisDeReyes/PyWorkManagerApi | c04b59ab8884f5ccbe87c0f3ac3dc241c04c9e8d | [
"Apache-2.0"
] | null | null | null | from django.test import TestCase
# Create your tests here.
def test_sum():
assert sum([1, 2, 3]) == 6, "Should be 6"
if __name__ == "__main__":
test_sum()
print("Everything passed")
| 15.307692 | 45 | 0.638191 |
d5f5563824d4c77dc7ce6cbc8428e561aa7e5852 | 586 | py | Python | lawyerd/products/migrations/0002_product_user.py | loobinsk/customer_project | 4f43d4c6db2c99926715ea16451511466569c4ae | [
"MIT"
] | null | null | null | lawyerd/products/migrations/0002_product_user.py | loobinsk/customer_project | 4f43d4c6db2c99926715ea16451511466569c4ae | [
"MIT"
] | null | null | null | lawyerd/products/migrations/0002_product_user.py | loobinsk/customer_project | 4f43d4c6db2c99926715ea16451511466569c4ae | [
"MIT"
] | null | null | null | # Generated by Django 2.2.3 on 2019-11-07 00:22
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('prod... | 24.416667 | 110 | 0.665529 |
d5f572cfc06ecf9c6046ce4f4cc623e20ef595f9 | 3,605 | py | Python | cheblienet/nn/layers/blocks.py | haguettaz/ChebLieNet | 8545122c85513a4b4e8cc34c9f01bacca9140110 | [
"MIT"
] | 7 | 2021-11-25T11:51:01.000Z | 2022-03-06T18:35:32.000Z | cheblienet/nn/layers/blocks.py | haguettaz/ChebLieNet | 8545122c85513a4b4e8cc34c9f01bacca9140110 | [
"MIT"
] | null | null | null | cheblienet/nn/layers/blocks.py | haguettaz/ChebLieNet | 8545122c85513a4b4e8cc34c9f01bacca9140110 | [
"MIT"
] | 1 | 2022-03-06T18:35:42.000Z | 2022-03-06T18:35:42.000Z | # coding=utf-8
import torch
from torch import nn
class NetworkBlock(nn.Module):
"""
A neural network block consisting in a sequence of convolutional layer blocks.
"""
def __init__(self, in_channels, out_channels, num_layers, block, conv, kernel_size, *args, **kwargs):
"""
Args:
... | 32.477477 | 112 | 0.590291 |
d5f59acf969236c41003868642f85417803539c8 | 797 | py | Python | py/examples/template.py | bradowen2011/lightshowpi | 15713bdd64dd4e7be52abee3b1aac9286eebaf9a | [
"BSD-2-Clause"
] | 3 | 2016-10-13T20:47:13.000Z | 2018-11-30T00:53:26.000Z | py/examples/template.py | bradowen2011/lightshowpi | 15713bdd64dd4e7be52abee3b1aac9286eebaf9a | [
"BSD-2-Clause"
] | null | null | null | py/examples/template.py | bradowen2011/lightshowpi | 15713bdd64dd4e7be52abee3b1aac9286eebaf9a | [
"BSD-2-Clause"
] | 8 | 2015-10-10T05:08:59.000Z | 2021-01-31T15:57:27.000Z | """Example Template"""
# This import gives you full acess to the hardware
import hardware_controller as hc
lights = hc._GPIO_PINS
def main():
"""
Empyt script template for you to use
"""
# initialize our hardware for use
hc.initialize()
# USE ONE OF THE BELOW LOOPS AS A STARTING POINT
# ... | 21.540541 | 75 | 0.651192 |
d5f5ad6e9b7dfafa03e34788db45f0b5611d533d | 162 | py | Python | fastapi_models.py | steveryb/fastapi-flask-benchmark | 8ddd8f2d896e261a95e80fef07c80d1dbb15a0e1 | [
"MIT"
] | 4 | 2020-10-14T21:39:22.000Z | 2022-03-11T02:33:43.000Z | fastapi_models.py | steveryb/fastapi-flask-benchmark | 8ddd8f2d896e261a95e80fef07c80d1dbb15a0e1 | [
"MIT"
] | null | null | null | fastapi_models.py | steveryb/fastapi-flask-benchmark | 8ddd8f2d896e261a95e80fef07c80d1dbb15a0e1 | [
"MIT"
] | 1 | 2021-07-03T05:01:55.000Z | 2021-07-03T05:01:55.000Z | from typing import List
from pydantic import BaseModel
class Person(BaseModel):
name: str
age: int
class People(BaseModel):
people: List[Person]
| 12.461538 | 30 | 0.716049 |
d5f5ba1de5bf200d77e3877495a6e897a9afccec | 1,860 | py | Python | altimu10v5/lps25h.py | SvetoslavKuzmanov/altimu10v5 | 87c10bd9918360632d5ea1a356e5cd3fe06eb33f | [
"MIT"
] | 4 | 2018-03-27T05:15:02.000Z | 2022-03-18T13:17:37.000Z | Diddyborg_python/lps25h.py | EEA-sensors/elec-e8740-project-code-template | ef7020a9ed4f2ee25756dd907a16d602bffeb6fe | [
"Apache-2.0"
] | 1 | 2018-06-03T23:35:18.000Z | 2018-06-03T23:35:18.000Z | Diddyborg_python/lps25h.py | EEA-sensors/elec-e8740-project-code-template | ef7020a9ed4f2ee25756dd907a16d602bffeb6fe | [
"Apache-2.0"
] | 6 | 2018-07-31T09:52:10.000Z | 2021-08-30T17:54:27.000Z | # -*- coding: utf-8 -*-
"""Python module for LPS25H digital barometer.
This module is for the Raspberry Pi computer helps interface the LPS25H
digital barometer.The library makes it easy to read the raw barometer
through I²C interface.
The datasheet for the LPS25H is available at
[https://www.pololu.com/file/download... | 30.491803 | 73 | 0.65914 |
d5f5bb200947da6c40927fd473f564eaa2ccea39 | 10,680 | py | Python | external/sbml/bindings/python/test/annotation/TestModelHistory.py | dchandran/evolvenetworks | 072f9e1292552f691a86457ffd16a5743724fb5e | [
"BSD-3-Clause"
] | 1 | 2019-08-22T17:17:41.000Z | 2019-08-22T17:17:41.000Z | external/sbml/bindings/python/test/annotation/TestModelHistory.py | dchandran/evolvenetworks | 072f9e1292552f691a86457ffd16a5743724fb5e | [
"BSD-3-Clause"
] | null | null | null | external/sbml/bindings/python/test/annotation/TestModelHistory.py | dchandran/evolvenetworks | 072f9e1292552f691a86457ffd16a5743724fb5e | [
"BSD-3-Clause"
] | null | null | null | #
# @file TestModelHistory.py
# @brief ModelHistory unit tests
#
# @author Akiya Jouraku (Python conversion)
# @author Sarah Keating
#
# $Id: TestModelHistory.py 9762 2009-07-13 06:51:18Z ajouraku $
# $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/python/test/annotation/TestM... | 37.212544 | 129 | 0.646161 |
d5f5bc472e554614752d3a9086984b50d5b44e48 | 5,218 | py | Python | vmoe/nn/vit_moe_ensemble.py | google-research/vmoe | 38a1e4f75c3eb268b974f8860497ec9f17b46504 | [
"Apache-2.0"
] | 205 | 2021-11-10T12:04:30.000Z | 2022-03-30T08:26:18.000Z | vmoe/nn/vit_moe_ensemble.py | google-research/vmoe | 38a1e4f75c3eb268b974f8860497ec9f17b46504 | [
"Apache-2.0"
] | 3 | 2022-01-18T08:13:17.000Z | 2022-01-25T05:46:11.000Z | vmoe/nn/vit_moe_ensemble.py | google-research/vmoe | 38a1e4f75c3eb268b974f8860497ec9f17b46504 | [
"Apache-2.0"
] | 27 | 2022-01-14T05:38:47.000Z | 2022-03-17T05:20:55.000Z | # Copyright 2022 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, ... | 39.233083 | 92 | 0.722307 |
d5f5cbf3149ea60f7744fb604fc33dc71d2baf4e | 4,506 | py | Python | setup.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | null | null | null | setup.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | null | null | null | setup.py | hulatang/skynet-blockchain | d7d6f7ec84731c13b9d6d307bb171cf0e266be82 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
dependencies = [
"blspy==1.0.6", # Signature library
"skynetvdf==1.0.3.dev8", # timelord and vdf verification
"skynetbip158==1.1.dev3", # bip158-style wallet filters
"skynetpos==1.0.4.dev14", # proof of space
"clvm==0.9.7",
"clvm_rs==0.1.11",
"clvm_tools==0.... | 36.33871 | 90 | 0.619618 |
d5f5d436890978c7718cf588624db19b76b46d3d | 1,863 | py | Python | drive.py | lucifurtun/myquotes | 4b78622acc9223cc18999dce1c2d6374bb52e20f | [
"BSD-3-Clause"
] | 4 | 2016-12-12T12:18:37.000Z | 2017-03-08T07:49:14.000Z | drive.py | lucifurtun/myquotes | 4b78622acc9223cc18999dce1c2d6374bb52e20f | [
"BSD-3-Clause"
] | 24 | 2017-08-25T14:15:52.000Z | 2022-02-26T19:24:17.000Z | drive.py | lucifurtun/myquotes | 4b78622acc9223cc18999dce1c2d6374bb52e20f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import pickle
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from googleapiclient.http import MediaFileUpload
SCOPES = ['https://www.googleapis.com/auth/drive.fil... | 32.12069 | 79 | 0.660225 |
d5f5d602c8b91ea81c9d3faa1d738033dd196b3c | 93,038 | py | Python | gluon/validators.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | 1 | 2017-08-11T20:37:21.000Z | 2017-08-11T20:37:21.000Z | gluon/validators.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | gluon/validators.py | trosa/listool | f175c6e30bcc788a381a92c3a8b818a1f1a88de6 | [
"BSD-3-Clause"
] | null | null | null | #!/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of the web2py Web Framework
Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu>
License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html)
Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE
"""
import os
import re
import datetime
impor... | 32.530769 | 258 | 0.539908 |
d5f5efa65f45c1edf5450731d92cdce999b266c4 | 222 | py | Python | app/__init__.py | dil-delada/Int20h_Petitions | c60682dd4db30130e77c9764ab6fedb7dfb7c0b1 | [
"MIT"
] | 1 | 2018-02-06T00:15:02.000Z | 2018-02-06T00:15:02.000Z | app/__init__.py | dil-delada/Int20h_Petitions | c60682dd4db30130e77c9764ab6fedb7dfb7c0b1 | [
"MIT"
] | null | null | null | app/__init__.py | dil-delada/Int20h_Petitions | c60682dd4db30130e77c9764ab6fedb7dfb7c0b1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Feb 03 2018
@author: Oleh
"""
from flask import Flask
app = Flask(__name__)
app.config.from_object('config') # configuration file
from app import views
| 14.8 | 53 | 0.693694 |
d5f602d100e7ef31c7bec53a7270f342b14e6e90 | 8,256 | py | Python | doc/source/conf.py | fjarri/reikna | 171bf233664f5f7ec4f457e826e0b91849e91384 | [
"MIT"
] | 122 | 2015-05-01T12:42:34.000Z | 2021-09-30T22:47:59.000Z | lib/python/reikna-0.7.5/doc/source/conf.py | voxie-viewer/voxie | d2b5e6760519782e9ef2e51f5322a3baa0cb1198 | [
"MIT"
] | 42 | 2015-05-04T16:55:47.000Z | 2021-09-18T04:53:34.000Z | lib/python/reikna-0.7.5/doc/source/conf.py | voxie-viewer/voxie | d2b5e6760519782e9ef2e51f5322a3baa0cb1198 | [
"MIT"
] | 14 | 2015-05-01T19:22:52.000Z | 2021-09-30T22:48:03.000Z | # -*- coding: utf-8 -*-
#
# reikna documentation build configuration file, created by
# sphinx-quickstart on Mon Apr 23 13:25:02 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | 32.124514 | 80 | 0.713178 |
d5f62cf90951363b3410b1501063590fb234397d | 10,410 | py | Python | pandas/io/tests/test_cparser.py | ssalonen/pandas | 1929563fdb5358a41420d103a388aa2bd494d543 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/io/tests/test_cparser.py | ssalonen/pandas | 1929563fdb5358a41420d103a388aa2bd494d543 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | pandas/io/tests/test_cparser.py | ssalonen/pandas | 1929563fdb5358a41420d103a388aa2bd494d543 | [
"PSF-2.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | """
C/Cython ascii file parser tests
"""
from pandas.compat import StringIO, BytesIO, map
from datetime import datetime
from pandas import compat
import csv
import os
import sys
import re
import unittest
import nose
from numpy import nan
import numpy as np
from pandas import DataFrame, Series, Index, isnull, MultiI... | 31.074627 | 77 | 0.535159 |
d5f6a66a0160817609c849af740ab2045237f39a | 8,585 | py | Python | microbenthos/core/expression.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 3 | 2018-04-23T13:51:36.000Z | 2021-08-05T01:53:51.000Z | microbenthos/core/expression.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 5 | 2018-04-09T20:08:40.000Z | 2018-05-04T23:08:50.000Z | microbenthos/core/expression.py | achennu/microbenthos | c83fb60d05b5614546466601e973721640e685d4 | [
"MIT"
] | 2 | 2018-04-09T20:11:50.000Z | 2021-08-06T03:34:06.000Z | import logging
from collections.abc import Mapping
import sympy as sp
class Expression(object):
"""
Representation of mathematical expressions as strings to be used for definition of processes
in the model domain.
The class relies on :mod:`sympy` to parse the formula, but allows the definition of
... | 35.329218 | 100 | 0.547816 |
d5f6abf12af0c4b0cbfc1b378176e8ca6fff7ea9 | 18,199 | py | Python | mapproxy/test/system/test_seed.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/test/system/test_seed.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | mapproxy/test/system/test_seed.py | kaiCu/mapproxy | 9b28f9ca1286e686b8f2188dd52ce56b607427a7 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # This file is part of the MapProxy project.
# Copyright (C) 2010 Omniscale <http://omniscale.de>
#
# 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... | 46.904639 | 118 | 0.632452 |
d5f6d212cd1b4f01e618e300d719b43cb783171a | 4,052 | py | Python | analysis/computation/contour.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | null | null | null | analysis/computation/contour.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | 4 | 2019-03-18T20:11:30.000Z | 2019-03-18T20:11:59.000Z | analysis/computation/contour.py | msampaio/FlautaSolo | 407253513712462e3521c06bcc35a9b95da0fe19 | [
"BSD-3-Clause"
] | null | null | null | from collections import Counter
import itertools
from analysis.computation import utils
# contour operations #
def translate(cseg):
transition = {}
for translated, original in enumerate(sorted(set(cseg))):
transition[original] = translated
for i in range(len(cseg)):
cseg[i] = transition[... | 31.169231 | 106 | 0.682626 |
d5f6d45bffeced528c5369e83ab04d9d63e72221 | 8,901 | py | Python | mmdet/ops/carafe/carafe.py | i-pan/mmdetection | 1b299b5a7f677c531bbc63b3ecbf9820762fe119 | [
"Apache-2.0"
] | 1 | 2020-05-04T07:01:39.000Z | 2020-05-04T07:01:39.000Z | mmdet/ops/carafe/carafe.py | i-pan/mmdetection | 1b299b5a7f677c531bbc63b3ecbf9820762fe119 | [
"Apache-2.0"
] | null | null | null | mmdet/ops/carafe/carafe.py | i-pan/mmdetection | 1b299b5a7f677c531bbc63b3ecbf9820762fe119 | [
"Apache-2.0"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from mmcv.cnn import normal_init, xavier_init
from torch.autograd import Function
from torch.nn.modules.module import Module
try:
from . import carafe_cuda, carafe_naive_cuda
except ImportError:
print('Unable to import `carafe_cuda, carafe_naiv... | 36.93361 | 79 | 0.639479 |
d5f6fef9d4242becd4c82d650350bde3f054b124 | 3,402 | py | Python | doc/source/ext/listmodules.py | hubo1016/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 252 | 2015-11-17T14:21:50.000Z | 2022-03-11T10:19:47.000Z | doc/source/ext/listmodules.py | SarahZarei/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 23 | 2018-01-09T13:28:52.000Z | 2019-12-12T06:11:44.000Z | doc/source/ext/listmodules.py | SarahZarei/vlcp | 61c4c2595b610675ac0cbc4dbc46f70ec40090d3 | [
"Apache-2.0"
] | 37 | 2016-08-03T04:42:22.000Z | 2021-12-30T16:57:10.000Z | '''
Created on 2017/1/14
:author: hubo
'''
from __future__ import print_function
from pkgutil import walk_packages
from vlcp.server.module import Module, _ProxyModule
from vlcp.server.server import Server
from inspect import getsourcelines, cleandoc, getdoc
try:
from collections import OrderedDict
except Exception... | 40.023529 | 105 | 0.536449 |
d5f70b952aa2db16bef95b6b6bf8de688c4cf021 | 18,004 | py | Python | step3_predict_nodules.py | RishiAlluri/Lung_CT_Nodule_Detection | fd5a22f55b7d1d3609760b29b05b36e6420aff7a | [
"MIT"
] | null | null | null | step3_predict_nodules.py | RishiAlluri/Lung_CT_Nodule_Detection | fd5a22f55b7d1d3609760b29b05b36e6420aff7a | [
"MIT"
] | null | null | null | step3_predict_nodules.py | RishiAlluri/Lung_CT_Nodule_Detection | fd5a22f55b7d1d3609760b29b05b36e6420aff7a | [
"MIT"
] | 1 | 2020-06-17T23:13:51.000Z | 2020-06-17T23:13:51.000Z | import settings
import helpers
import sys
import os
import glob
import random
import pandas
import ntpath
import cv2
import numpy
from typing import List, Tuple
from keras.optimizers import Adam, SGD
from keras.layers import Input, Convolution2D, MaxPooling2D, UpSampling2D, merge, Convolution3D, MaxPooling3... | 49.597796 | 307 | 0.607421 |
d5f720154edd86b309f7aecf1f76c7dc14a929ce | 299 | py | Python | reviews/apps.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 2 | 2020-04-12T13:18:35.000Z | 2021-04-02T04:18:17.000Z | reviews/apps.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 3 | 2020-02-11T23:58:53.000Z | 2020-09-06T18:46:17.000Z | reviews/apps.py | WillieIlus/jobscorner | ed3734468ea0e88a306a1d29bc876562e940f4fb | [
"bzip2-1.0.6"
] | 1 | 2020-08-17T08:29:41.000Z | 2020-08-17T08:29:41.000Z | from django.apps import AppConfig
from django.db.models.signals import post_migrate
from company.signals import handlers
class ReviewsConfig(AppConfig):
name = 'reviews'
verbose_name = 'Review'
def ready(self):
post_migrate.connect(handlers.create_notice_types, sender=self)
| 23 | 71 | 0.762542 |
d5f73175f8845881b804202a66d39614571d7b16 | 914 | py | Python | train_imagenet_inverter.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | train_imagenet_inverter.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | train_imagenet_inverter.py | SimuJenni/Correspondences | 384c0272e438ad3e7c936f5ae78fe6154b188c54 | [
"MIT"
] | null | null | null | from Preprocessor import Preprocessor
from train.AlexNetInverter_Trainer import CNetTrainer
from datasets.ImageNet import ImageNet
from models.AlexNetInverter import AlexNetInverter
from models.AlexNet_layers import AlexNet
from constants import LOG_DIR
import os
target_shape = [128, 128, 3]
alexnet = AlexNet(32, pad=... | 45.7 | 104 | 0.80744 |
d5f74f2275b55efbe3d724c3dd5119f923176106 | 696 | py | Python | logcausality/ci_test/gauss.py | cpflat/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 20 | 2016-11-22T03:21:20.000Z | 2021-06-16T02:44:58.000Z | logcausality/ci_test/gauss.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 1 | 2019-10-23T05:45:34.000Z | 2019-11-01T04:56:01.000Z | logcausality/ci_test/gauss.py | arita37/LogCausalAnalysis | f475f53cb683ab6ad55851c69129758e4ac89fc6 | [
"BSD-3-Clause"
] | 8 | 2015-11-13T03:33:04.000Z | 2021-09-10T09:29:23.000Z | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import logging
_logger = logging.getLogger(__name__)
def zstat(x, y, s, cm, n):
"""float: Get Fisher's Z statistics."""
def log_q1pm(r):
return np.log1p(2 * r / (1 - r))
r = pcor_order(x, y, s, cm)
zstat = np.sqrt(n - len(s) - 3) * 0... | 21.75 | 77 | 0.545977 |
d5f7726c105769d22799147d5d4eadd60a890c13 | 880 | py | Python | data/postgre/__init__.py | eigenphi/gcommon | bce1ee422874fa904d90afee03fd703a06dc7a4d | [
"MIT"
] | 3 | 2021-11-09T09:43:21.000Z | 2021-12-16T18:15:43.000Z | data/postgre/__init__.py | eigenphi/gcommon | bce1ee422874fa904d90afee03fd703a06dc7a4d | [
"MIT"
] | null | null | null | data/postgre/__init__.py | eigenphi/gcommon | bce1ee422874fa904d90afee03fd703a06dc7a4d | [
"MIT"
] | 2 | 2022-03-10T11:24:46.000Z | 2022-03-25T06:39:17.000Z | # -*- coding: utf-8 -*-
# created: 2021-04-19
# creator: liguopeng@liguopeng.net
from .. import BaseManager
class PostgreManager(BaseManager):
def __init__(self, username: str = '', password: str = '', server_addr: str = 'localhost', server_port: int = 5432,
db_name: str = ''):
self.use... | 31.428571 | 119 | 0.607955 |
d5f7b20ff107492913830a6fd6628a0bdd8a5fe8 | 10,194 | py | Python | test_fiber.py | srujanm/EM-network | efa3bc67ad8b9d1b44eee75b278ce537f48c2b42 | [
"MIT"
] | null | null | null | test_fiber.py | srujanm/EM-network | efa3bc67ad8b9d1b44eee75b278ce537f48c2b42 | [
"MIT"
] | null | null | null | test_fiber.py | srujanm/EM-network | efa3bc67ad8b9d1b44eee75b278ce537f48c2b42 | [
"MIT"
] | null | null | null | import os
import numpy as np
import h5py
import time
import argparse
import torch
import torch.utils.data
from em_net.data import AffinityDataset, collate_fn_test
from em_net.model.model_seg import UNetFiber
from em_net.libs.sync import DataParallelWithCallback
# GLOBAL: memory usage ... | 43.751073 | 132 | 0.6031 |
d5f8483d874bc1f3527cf373723cb0e88af406c9 | 78,997 | py | Python | src/sage/groups/braid.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/groups/braid.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/groups/braid.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Braid groups
Braid groups are implemented as a particular case of finitely presented groups,
but with a lot of specific methods for braids.
A braid group can be created by giving the number of strands, and the name of the generators::
sage: BraidGroup(3)
Braid group on 3 strands
... | 33.730572 | 113 | 0.491019 |
d5f8670d0f031a44a80734cf496d0393aa1734b6 | 184 | py | Python | programmers/make_rectangle.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | programmers/make_rectangle.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | programmers/make_rectangle.py | schio/algorithm_test | c240faca428a9adb2970591338d4792b2f4fb7f3 | [
"MIT"
] | null | null | null | # https://programmers.co.kr/learn/courses/30/lessons/12969
a, b = map(int, input().strip().split(' '))
for _ in range(b):
for _ in range(a):
print("*", end="")
print()
| 26.285714 | 58 | 0.576087 |
d5f884d302908ab9fba8e534f212148aba1c42a3 | 1,745 | py | Python | codes/utils/mygraph.py | CristianLazoQuispe/Datathon-Interbank-2020 | 54f5d11fe83eb5a8ea8284be13d96e9e12978354 | [
"MIT"
] | null | null | null | codes/utils/mygraph.py | CristianLazoQuispe/Datathon-Interbank-2020 | 54f5d11fe83eb5a8ea8284be13d96e9e12978354 | [
"MIT"
] | null | null | null | codes/utils/mygraph.py | CristianLazoQuispe/Datathon-Interbank-2020 | 54f5d11fe83eb5a8ea8284be13d96e9e12978354 | [
"MIT"
] | null | null | null | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
path_results = '../results/images/'
# this function receives a dataset with binary target and it will graph a hist of values
def graph_target(data,name="target",figsize=(6,4),title_name=None,color_text="white",save=False,name... | 51.323529 | 140 | 0.671633 |
d5f8928957d5a0bb734503b199988a6785065c67 | 1,337 | py | Python | yt/analysis_modules/level_sets/api.py | philchang/yt | 5fae744569cd0719db61838c0fd2b20fe29c7184 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/analysis_modules/level_sets/api.py | philchang/yt | 5fae744569cd0719db61838c0fd2b20fe29c7184 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/analysis_modules/level_sets/api.py | philchang/yt | 5fae744569cd0719db61838c0fd2b20fe29c7184 | [
"BSD-3-Clause-Clear"
] | null | null | null | """
API for level_sets
"""
#-----------------------------------------------------------------------------
# Copyright (c) yt Development Team. All rights reserved.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#---------... | 28.446809 | 78 | 0.664921 |
d5f8cf1973c00dc56b1ffed896c21bcd9f996a9c | 16,445 | py | Python | recipes/experiments_dtln/dtln_utils/callbacks.py | wimmerb/SpeechEnhancers | 6b4bb708eb25901056615880d4e95d5fc5add48b | [
"MIT"
] | null | null | null | recipes/experiments_dtln/dtln_utils/callbacks.py | wimmerb/SpeechEnhancers | 6b4bb708eb25901056615880d4e95d5fc5add48b | [
"MIT"
] | null | null | null | recipes/experiments_dtln/dtln_utils/callbacks.py | wimmerb/SpeechEnhancers | 6b4bb708eb25901056615880d4e95d5fc5add48b | [
"MIT"
] | null | null | null | import os
import torch
import glob
import warnings
import soundfile
import librosa
import librosa.display
import numpy as np
import matplotlib.pyplot as plt
from datetime import datetime
from .training_process import TrainingProcessCallback
# ignore matplotlib warnings
warnings.filterwarnings("ignore", category=UserWa... | 41.215539 | 80 | 0.496686 |
d5f8d32452c1cdc06a6203bc39887aea983be625 | 7,226 | py | Python | scan/test/fetch/cli_fetch/test_data/cli_fetch_vconnectors_ovs.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/cli_fetch/test_data/cli_fetch_vconnectors_ovs.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | scan/test/fetch/cli_fetch/test_data/cli_fetch_vconnectors_ovs.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 30.880342 | 143 | 0.483117 |
d5f8e01821cdcced397595d6347d8db68fb76cd8 | 4,581 | py | Python | test/mitmproxy/proxy/layers/http/hyper_h2_test_helpers.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | test/mitmproxy/proxy/layers/http/hyper_h2_test_helpers.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | test/mitmproxy/proxy/layers/http/hyper_h2_test_helpers.py | fedosgad/mitmproxy | 7eacc41f3b1079e000cf6b6c19c0f337d6e01177 | [
"MIT"
] | null | null | null | # This file has been copied from https://github.com/python-hyper/hyper-h2/blob/master/test/helpers.py,
# MIT License
# -*- coding: utf-8 -*-
"""
helpers
~~~~~~~
This module contains helpers for the h2 tests.
"""
from hpack.hpack import Encoder
from hyperframe.frame import (
HeadersFrame,
DataFrame,
Settin... | 26.177143 | 102 | 0.599651 |
d5f8f957acb20d633d5dacc0e87961774803d5b1 | 770 | py | Python | python/p210.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p210.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | python/p210.py | forewing/lc | 314468a1a3bb7d38eccf1f34b0d1b7da04a34784 | [
"CC0-1.0"
] | null | null | null | from collections import deque
class Solution:
def findOrder(self, numCourses: int, prerequisites: List[List[int]]) -> List[int]:
n = numCourses
deg = [0] * n
edges = [[] for i in range(n)]
for pre in prerequisites:
deg[pre[0]] += 1
edges[pre[1]].append(pre[... | 22 | 86 | 0.428571 |
d5f9295fb84375dc7f50b1a39af7bf17603cd994 | 414 | py | Python | geoq/core/templatetags/object_class.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 471 | 2015-01-05T15:16:26.000Z | 2022-03-28T05:06:11.000Z | geoq/core/templatetags/object_class.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 109 | 2015-01-06T20:00:58.000Z | 2022-03-11T23:17:53.000Z | geoq/core/templatetags/object_class.py | kaydoh/geoq | 6f10818d0cc3cef4ba8113e8b047d27e79b2f8b0 | [
"MIT"
] | 100 | 2015-01-05T15:16:39.000Z | 2021-12-01T12:13:13.000Z | # -*- coding: utf-8 -*-
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
from django import template
register = template.Library()
@register.filter
def object_cl... | 29.571429 | 104 | 0.722222 |
d5f93c31b4d6b030512ecb09c5a6100ecb2e07d2 | 6,433 | py | Python | tests/test_coqtop.py | j-hui/Coqtail | ab7cc9b7ae5988ab5fbc1fd5526f4fbec6cadb2d | [
"MIT"
] | null | null | null | tests/test_coqtop.py | j-hui/Coqtail | ab7cc9b7ae5988ab5fbc1fd5526f4fbec6cadb2d | [
"MIT"
] | null | null | null | tests/test_coqtop.py | j-hui/Coqtail | ab7cc9b7ae5988ab5fbc1fd5526f4fbec6cadb2d | [
"MIT"
] | null | null | null | # -*- coding: utf8 -*-
"""
File: test_coqtop.py
Author: Wolf Honore
Description: Unit/integration tests for coqtop.py.
TODO: test timeout similarly to manual interrupt
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from subprocess import check_output
... | 29.509174 | 78 | 0.660967 |
d5f93e506c7acd5955ea74e1603b75f5794d8825 | 537 | py | Python | tests/test_misc_whence.py | mavit/proselint | f53c77bda6bc339f07d89eaeb9d0e9aee0deaf0b | [
"BSD-3-Clause"
] | null | null | null | tests/test_misc_whence.py | mavit/proselint | f53c77bda6bc339f07d89eaeb9d0e9aee0deaf0b | [
"BSD-3-Clause"
] | null | null | null | tests/test_misc_whence.py | mavit/proselint | f53c77bda6bc339f07d89eaeb9d0e9aee0deaf0b | [
"BSD-3-Clause"
] | null | null | null | """Tests for misc.whence check."""
from __future__ import absolute_import
from .check import Check
from proselint.checks.misc import whence as chk
class TestCheck(Check):
"""The test class for misc.whence."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return... | 23.347826 | 68 | 0.651769 |
d5f96b077554b28f8e091742efbf42f853efe321 | 5,139 | py | Python | test/unit/test_registry.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 379 | 2020-07-18T22:00:53.000Z | 2022-03-31T05:17:29.000Z | test/unit/test_registry.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 646 | 2020-07-18T08:55:48.000Z | 2022-03-29T02:24:54.000Z | test/unit/test_registry.py | Zhiyuan-w/DeepReg | 3e372d1835fdc9468c026db3767dcf9e8d4a4b0e | [
"Apache-2.0"
] | 62 | 2020-07-26T05:00:23.000Z | 2022-02-22T21:58:19.000Z | import re
import pandas as pd
import pytest
from deepreg.registry import BACKBONE_CLASS, KNOWN_CATEGORIES, LOSS_CLASS, REGISTRY
class TestRegistry:
@pytest.fixture()
def reg(self):
return REGISTRY.copy()
@pytest.mark.parametrize(
"category,key,err_msg",
[
("unknown_c... | 33.154839 | 83 | 0.539015 |
d5f982bda7d1acfda5778a53d70da03e8cae91f5 | 597 | py | Python | examples/samplepkg/setup.py | cernanalysispreservation/invenio-jsonschemas | 5eccecbbdb55ee9407008ecece79b3841c7ee42f | [
"MIT"
] | 6 | 2015-07-09T11:43:56.000Z | 2021-07-22T08:27:01.000Z | examples/samplepkg/setup.py | cernanalysispreservation/invenio-jsonschemas | 5eccecbbdb55ee9407008ecece79b3841c7ee42f | [
"MIT"
] | 60 | 2015-06-29T07:12:45.000Z | 2021-09-30T13:07:52.000Z | examples/samplepkg/setup.py | cernanalysispreservation/invenio-jsonschemas | 5eccecbbdb55ee9407008ecece79b3841c7ee42f | [
"MIT"
] | 41 | 2015-07-13T15:42:14.000Z | 2022-01-13T23:23:38.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Sample Package for Testing Invenio-JSONSchemas."""
from setuptools import setup
... | 23.88 | 72 | 0.666667 |
d5f986d4546129c59c7bb4c5ac973d9b212bd7fb | 4,718 | py | Python | storage/team01/avlMode.py | jorasofra/tytus | a4943af1c7d3c268edd5c8c1df82561419e2a37e | [
"MIT"
] | null | null | null | storage/team01/avlMode.py | jorasofra/tytus | a4943af1c7d3c268edd5c8c1df82561419e2a37e | [
"MIT"
] | null | null | null | storage/team01/avlMode.py | jorasofra/tytus | a4943af1c7d3c268edd5c8c1df82561419e2a37e | [
"MIT"
] | null | null | null | #Funciones que deben estar disponibles para que el componente SQL Parser pueda hacer uso de estas
import avl
from typing import Any
mBBDD = avl.AVL()
#Crea una base de datos. (CREATE)
def createDatabase(database: str) -> int:
res = mBBDD.agregar(database)
return res #0 operación exitosa, 1 error en la operac... | 38.991736 | 125 | 0.701145 |
d5f9a5af306762c27a7a5e4fdcb1f24e6c507971 | 7,391 | py | Python | neuro-sdk/src/neuro_sdk/utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-sdk/src/neuro_sdk/utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-sdk/src/neuro_sdk/utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | import asyncio
import functools
import logging
import sys
from functools import partial
from pathlib import Path
from types import TracebackType
from typing import (
Any,
AsyncIterator,
Awaitable,
Callable,
Coroutine,
Generator,
Generic,
Iterator,
Optional,
Tuple,
Type,
T... | 28.209924 | 88 | 0.63672 |
d5f9b4daf2f0b3e588e22e720f19395b34d85911 | 2,477 | py | Python | src/timeshap/utils/utils.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 49 | 2022-03-25T14:35:52.000Z | 2022-03-31T18:05:51.000Z | src/timeshap/utils/utils.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 1 | 2022-03-31T12:15:55.000Z | 2022-03-31T14:59:06.000Z | src/timeshap/utils/utils.py | feedzai/timeshap | 0d56b3b86222d52fdc5a1e96f125513e0ed18e6c | [
"Apache-2.0"
] | 2 | 2022-03-28T04:32:35.000Z | 2022-03-28T06:39:24.000Z | # Copyright 2022 Feedzai
#
# 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 writi... | 30.580247 | 98 | 0.661688 |
d5f9fe713766ef45b7d763dfa90768f377f21dc3 | 2,542 | py | Python | tests/unit/types/ndarray/test_generic.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 15,179 | 2020-04-28T10:23:56.000Z | 2022-03-31T14:35:25.000Z | tests/unit/types/ndarray/test_generic.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 3,912 | 2020-04-28T13:01:29.000Z | 2022-03-31T14:36:46.000Z | tests/unit/types/ndarray/test_generic.py | Rohitpandit021/jina | f3db4d5e480375d8dc3bceda814ac1963dee76d7 | [
"Apache-2.0"
] | 1,955 | 2020-04-28T10:50:49.000Z | 2022-03-31T12:28:34.000Z | import pytest
import numpy as np
from jina.proto import jina_pb2
from jina.types.ndarray.generic import NdArray
from jina.types.ndarray.dense.numpy import DenseNdArray
from jina.types.ndarray.sparse.tensorflow import SparseNdArray as TFSparseNdArray
from jina.types.ndarray.sparse.pytorch import SparseNdArray as PTSpar... | 26.479167 | 85 | 0.704563 |
d5fa0382117cba15c2c471272ae6792077ef05e9 | 38,215 | py | Python | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/clouduseraccounts/beta/clouduseraccounts_beta_messages.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/clouduseraccounts/beta/clouduseraccounts_beta_messages.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/.install/.backup/lib/googlecloudsdk/third_party/apis/clouduseraccounts/beta/clouduseraccounts_beta_messages.py | KaranToor/MA450 | c98b58aeb0994e011df960163541e9379ae7ea06 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:09:01.000Z | 2020-07-25T12:09:01.000Z | """Generated message classes for clouduseraccounts version beta.
Creates and manages users and groups for accessing Google Compute Engine
virtual machines.
"""
# NOTE: This file is autogenerated and should not be edited by hand.
from apitools.base.protorpclite import messages as _messages
package = 'clouduseraccoun... | 42.226519 | 87 | 0.742771 |
d5fa2424945e89f701a56359bc03fbba8310ab92 | 861 | py | Python | suspicious_urls_ips/feeds/emergingthreatsbot.py | asafben/Suspicious_URLs_and_IPs_List | d6ef745ae7a935d9b945efd6ed48bc19cfb1208c | [
"MIT"
] | null | null | null | suspicious_urls_ips/feeds/emergingthreatsbot.py | asafben/Suspicious_URLs_and_IPs_List | d6ef745ae7a935d9b945efd6ed48bc19cfb1208c | [
"MIT"
] | null | null | null | suspicious_urls_ips/feeds/emergingthreatsbot.py | asafben/Suspicious_URLs_and_IPs_List | d6ef745ae7a935d9b945efd6ed48bc19cfb1208c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Copyright (c) 2014-2019 Maltrail developers (https://github.com/stamparm/maltrail/)
See the file 'LICENSE' for copying permission
"""
import re
from antivirus.lists_based_engine.update import retrieve_content
from antivirus.lists_based_engine.settings import IP_TYPE
from antivirus.lists_bas... | 27.774194 | 92 | 0.745645 |
d5fa249405e7096bee2c04f5d129396b04ee8ab1 | 2,891 | py | Python | national_memographic/meme.py | hacksparr0w/national_memographic | 31ffde67049b213a336fecca207d0d54047ea001 | [
"MIT"
] | 2 | 2021-07-29T10:09:32.000Z | 2021-07-29T10:13:07.000Z | national_memographic/meme.py | hacksparr0w/national_memographic | 31ffde67049b213a336fecca207d0d54047ea001 | [
"MIT"
] | 2 | 2021-08-13T19:58:35.000Z | 2021-08-13T20:00:53.000Z | national_memographic/meme.py | hacksparr0w/national_memographic | 31ffde67049b213a336fecca207d0d54047ea001 | [
"MIT"
] | null | null | null | """
The core API used for programmatic meme generation.
"""
from typing import List, Sequence
from wand.drawing import Drawing # type: ignore
from wand.image import Image # type: ignore
from ._image import draw_bounded_text
from .data import (
get_template_dir_path,
get_template_path,
read_template_fro... | 26.281818 | 78 | 0.655137 |
d5fa2b117771f9e3ff218c5fdf5db45ae11edade | 1,946 | py | Python | src/scs_host/sys/host_serial.py | south-coast-science/scs_host_bbe_southern | 007243c22f2ff258a8748b577c79806b6571c920 | [
"MIT"
] | null | null | null | src/scs_host/sys/host_serial.py | south-coast-science/scs_host_bbe_southern | 007243c22f2ff258a8748b577c79806b6571c920 | [
"MIT"
] | null | null | null | src/scs_host/sys/host_serial.py | south-coast-science/scs_host_bbe_southern | 007243c22f2ff258a8748b577c79806b6571c920 | [
"MIT"
] | null | null | null | """
Created on 26 Dec 2016
@author: Bruno Beloff (bruno.beloff@southcoastscience.com)
https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/port
"""
import serial
import time
from scs_core.sys.serial import Serial
from scs_host.lock.lock import Lock
# ---------------------------------------... | 27.408451 | 118 | 0.426002 |
d5fa6c01113e6057384778e9a95ba30712c78611 | 7,938 | py | Python | ios/dateparser/lib/python2.7/site-packages/convertdate/data/french_republican_days.py | mpercich/Calendarize | d658962d5d205f878afd9876cb64b5381964f112 | [
"MIT"
] | null | null | null | ios/dateparser/lib/python2.7/site-packages/convertdate/data/french_republican_days.py | mpercich/Calendarize | d658962d5d205f878afd9876cb64b5381964f112 | [
"MIT"
] | null | null | null | ios/dateparser/lib/python2.7/site-packages/convertdate/data/french_republican_days.py | mpercich/Calendarize | d658962d5d205f878afd9876cb64b5381964f112 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of convertdate.
# http://github.com/fitnr/convertdate
# Licensed under the GPL-v3.0 license:
# http://opensource.org/licenses/MIT
# Copyright (c) 2016, fitnr <fitnr@fakeisthenewreal>
# source: Wikipedia
# month 13 is the Sansculottides
french_republic... | 19.503686 | 52 | 0.404762 |
d5fa77907810f718a1186609bf19a70706762ebe | 2,014 | py | Python | tests/test_message_consumer.py | aiomessaging/aiomessaging | 0fe2296d5a772a9b28c3173259e7a6ace6e45624 | [
"MIT"
] | 4 | 2018-07-08T18:49:10.000Z | 2018-08-16T20:17:29.000Z | tests/test_message_consumer.py | aiomessaging/aiomessaging | 0fe2296d5a772a9b28c3173259e7a6ace6e45624 | [
"MIT"
] | 23 | 2018-07-08T18:52:42.000Z | 2018-10-25T16:58:50.000Z | tests/test_message_consumer.py | aiomessaging/aiomessaging | 0fe2296d5a772a9b28c3173259e7a6ace6e45624 | [
"MIT"
] | null | null | null | """
Message consumer tests.
"""
import asyncio
import pytest
from aiomessaging.consumers import MessageConsumer
from aiomessaging.message import Message
from aiomessaging.queues import QueueBackend
from aiomessaging.router import Router
from aiomessaging.contrib.dummy.pipelines import example_pipeline
from .helpers i... | 26.155844 | 69 | 0.716485 |
d5fb061a3a4378d9720ff3a451d5983678f6ed08 | 2,712 | py | Python | venv/lib/python3.8/site-packages/dateparser/data/date_translation_data/ebu.py | yuta-komura/vishnu | 67173b674d5f4f3be189474103612447ef69ab44 | [
"MIT"
] | 1 | 2021-11-17T04:55:14.000Z | 2021-11-17T04:55:14.000Z | dateparser/data/date_translation_data/ebu.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | dateparser/data/date_translation_data/ebu.py | cool-RR/dateparser | c38336df521cc57d947dc2c9111539a72f801652 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
info = {
"name": "ebu",
"date_order": "DMY",
"january": [
"mweri wa mbere",
"mbe"
],
"february": [
"mweri wa kaĩri",
"kai"
],
"march": [
"mweri wa kathatũ",
"kat"
],
"april": [
"mweri wa kana",
"k... | 15.859649 | 34 | 0.289823 |
d5fb0d15a6b8166b709e583e5574307660167177 | 107 | py | Python | bitmex_liquidation/__init__.py | philipperemy/bitmex-liquidations | 1569f7bf0fb7cf89f79d23261d7204fe350b25f1 | [
"MIT"
] | 30 | 2019-11-10T04:52:08.000Z | 2022-01-27T22:41:46.000Z | bitmex_liquidation/__init__.py | kccheung/bitmex-liquidations | 1569f7bf0fb7cf89f79d23261d7204fe350b25f1 | [
"MIT"
] | 3 | 2020-01-17T23:53:15.000Z | 2021-01-17T17:29:28.000Z | bitmex_liquidation/__init__.py | kccheung/bitmex-liquidations | 1569f7bf0fb7cf89f79d23261d7204fe350b25f1 | [
"MIT"
] | 8 | 2019-11-10T09:12:19.000Z | 2022-02-02T14:42:14.000Z | from bitmex_liquidation.api import BitMEXLiquidation
from bitmex_liquidation.api import LiquidationPrinter
| 35.666667 | 53 | 0.906542 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.